@remit/web-client-dist 0.0.134 → 0.0.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{ComposeBody-Bb-eV7oX.js → ComposeBody-5KqS6Ij5.js} +3 -3
- package/assets/{ErrorState-DaIYWAtU.js → ErrorState-P3tyjYd6.js} +1 -1
- package/assets/OnboardingWizard-BtgUIapF.js +1 -0
- package/assets/{account-form-helpers-C1-XCp2v.js → account-form-helpers-DKi90s1d.js} +1 -1
- package/assets/accounts-DVe_U34F.js +1 -0
- package/assets/{advanced-hyewI6NP.js → advanced-BJudDEtv.js} +1 -1
- package/assets/{appearance-CEbzMr1T.js → appearance-B9BfHWr3.js} +1 -1
- package/assets/{avatar-WAi3XoGV.js → avatar-CR0MjNQb.js} +1 -1
- package/assets/{browser-ponyfill-odsmUzM4.js → browser-ponyfill-D4K5nA2g.js} +1 -1
- package/assets/{circle-check-Ccc0DpRT.js → circle-check-CQc7Z-g_.js} +1 -1
- package/assets/{download-B21Knqu2.js → download-BwZZ6fHn.js} +1 -1
- package/assets/filters-BqQU0AaG.js +1 -0
- package/assets/{flagged-CWyvtGeg.js → flagged-wi9oE00y.js} +1 -1
- package/assets/folders-xo8V7q4o.js +1 -0
- package/assets/index-BppznZgS.js +1 -0
- package/assets/{index-ChxiTmNG.css → index-d_OAoL-b.css} +1 -1
- package/assets/{index-DFY6-7Ge.js → index-mw9-5Sfa.js} +1 -1
- package/assets/index-y4HM-c82.js +295 -0
- package/assets/{kbd-BKNut3M9.js → kbd-ggO-xzUV.js} +1 -1
- package/assets/mail-CXuKcONg.js +118 -0
- package/assets/move-mailbox-picker-DjM7YNDC.js +1 -0
- package/assets/move-targets-B73391KU.js +1 -0
- package/assets/onboarding-BxdiSSnh.js +1 -0
- package/assets/{rotate-ccw-EQBbw3Gs.js → rotate-ccw-Dqu0WVzd.js} +1 -1
- package/assets/search-BDq8flHN.js +1 -0
- package/assets/senders-CMInGGgI.js +1 -0
- package/assets/settings-DOa_f_nW.js +1 -0
- package/assets/{settings-screen-6C3zeyy1.js → settings-screen-Bv6OlQNg.js} +1 -1
- package/assets/{suggested-vips-BvoEfJ52.js → suggested-vips-ikj4fiec.js} +1 -1
- package/assets/useDebouncedValue-BfSwxm-5.js +1 -0
- package/assets/useRulePreview-CNOJHtad.js +1 -0
- package/assets/{useSignature-B22ZnEj4.js → useSignature-BhNCrBVz.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/OnboardingWizard-74ApF1TM.js +0 -1
- package/assets/accounts-BCrN_WZY.js +0 -1
- package/assets/filters-Tqa-_zb9.js +0 -1
- package/assets/folder-DOSErHSR.js +0 -1
- package/assets/folders-CLWqJfFM.js +0 -1
- package/assets/index-DsR4Mk7n.js +0 -295
- package/assets/index-aL9qdiwR.js +0 -1
- package/assets/mail-BMBn_nLi.js +0 -118
- package/assets/onboarding-yY91msSU.js +0 -1
- package/assets/senders-DKiu2US4.js +0 -1
- package/assets/settings-BGBibXai.js +0 -1
- package/assets/useDebouncedValue-C_J4lOpx.js +0 -1
- package/assets/useRulePreview-Ct7Q8uG2.js +0 -1
package/assets/index-DsR4Mk7n.js
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-BMBn_nLi.js","assets/useDebouncedValue-C_J4lOpx.js","assets/avatar-WAi3XoGV.js","assets/kbd-BKNut3M9.js","assets/account-form-helpers-C1-XCp2v.js","assets/useSignature-B22ZnEj4.js","assets/useRulePreview-Ct7Q8uG2.js","assets/ErrorState-DaIYWAtU.js","assets/format-B6Elex-n.js","assets/rotate-ccw-EQBbw3Gs.js","assets/circle-check-Ccc0DpRT.js","assets/folder-DOSErHSR.js","assets/onboarding-yY91msSU.js","assets/OnboardingWizard-74ApF1TM.js","assets/index-DFY6-7Ge.js","assets/flagged-CWyvtGeg.js","assets/accounts-BCrN_WZY.js","assets/settings-screen-6C3zeyy1.js","assets/download-B21Knqu2.js","assets/advanced-hyewI6NP.js","assets/appearance-CEbzMr1T.js","assets/filters-Tqa-_zb9.js","assets/folders-CLWqJfFM.js","assets/senders-DKiu2US4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function g6(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 Ug=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Va(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $1={exports:{}},wf={};var $N;function Rq(){if($N)return wf;$N=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 wf.Fragment=e,wf.jsx=n,wf.jsxs=n,wf}var qN;function Iq(){return qN||(qN=1,$1.exports=Rq()),$1.exports}var O=Iq();const Oq="Logging",Nq="x-amz-user-agent",Mq="NoHubcallbackProvidedException";var ss;(function(t){t.DEBUG="DEBUG",t.ERROR="ERROR",t.INFO="INFO",t.WARN="WARN",t.VERBOSE="VERBOSE",t.NONE="NONE"})(ss||(ss={}));const WN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class sr{constructor(e,n=ss.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;sr.LOG_LEVEL&&(r=sr.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=WN[r];if(!(WN[e]>=s))return;let a=console.log.bind(console);e===ss.ERROR&&console.error&&(a=console.error.bind(console)),e===ss.WARN&&console.warn&&(a=console.warn.bind(console)),sr.BIND_ALL_LOG_LEVELS&&(e===ss.INFO&&console.info&&(a=console.info.bind(console)),e===ss.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 h={message:c,timestamp:Date.now()};f.pushLogs([h])}}log(...e){this._log(ss.INFO,...e)}info(...e){this._log(ss.INFO,...e)}warn(...e){this._log(ss.WARN,...e)}error(...e){this._log(ss.ERROR,...e)}debug(...e){this._log(ss.DEBUG,...e)}verbose(...e){this._log(ss.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===Oq&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}sr.LOG_LEVEL=null;sr.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 ka;(function(t){t.NoEndpointId="NoEndpointId",t.PlatformNotSupported="PlatformNotSupported",t.Unknown="Unknown",t.NetworkError="NetworkError"})(ka||(ka={}));const _y=(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})},_o=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",xf=new sr("Hub");class m6{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){xf.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===_o||xf.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){xf.error(a)}}listen(e,n,r="noname"){let s;if(typeof n!="function")throw new Hr({name:Mq,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=>{xf.debug(`Dispatching to ${n} with `,r);try{o.callback(e)}catch(a){xf.error(a)}})}}const Ao=new m6("__default__"),Sv=new m6("internal-hub"),zA=()=>{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."})},Pq=()=>{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."})},kq=()=>{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."})},jA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),kq()(n)}};var Eo;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Eo||(Eo={}));const Dq={[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."}},BA=_y(Dq);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,BA(e,Eo.AuthUserPoolException)}function Ay(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;BA(e,Eo.OAuthNotConfigureException)}function Wm(t){const e=!!t?.identityPoolId;BA(e,Eo.InvalidIdentityPoolIdException)}function mi(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(jA.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 v6=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&v6(r)}return Object.freeze(t)},Lq=new sr("parseAWSExports"),Uq={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},Fq=(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:h,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:A,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:N,geo:I,oauth:k,predictions:F,aws_cloud_logic_custom:H,Notifications:D,modelIntrospection:z}=t,q={};C&&(q.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:V,Push:ee}=D??{};if(V?.AWSPinpoint||ee?.AWSPinpoint){if(V?.AWSPinpoint){const{appId:J,region:oe}=V.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:J,region:oe}}}}if(ee?.AWSPinpoint){const{appId:J,region:oe}=ee.AWSPinpoint;q.Notifications={...q.Notifications,PushNotification:{Pinpoint:{appId:J,region:oe}}}}}if(Array.isArray(o)&&(q.Interactions={LexV1:Object.fromEntries(o.map(J=>[J.name,J]))}),r){const J=Uq[n];J||Lq.debug(`Invalid authentication type ${n}. Falling back to IAM.`),q.API={GraphQL:{endpoint:r,apiKey:e,region:s,defaultAuthMode:J??"iam"}},z&&(q.API.GraphQL.modelIntrospection=z)}const $=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,te=h?{minLength:h.passwordPolicyMinLength,requireLowercase:h.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:h.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:h.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:h.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,L=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(q.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:de,userPoolClientId:N,userPoolId:M,mfa:$,passwordFormat:te,loginWith:{username:!(Ae||L),email:Ae,phone:L}}});const K=k?Object.keys(k).length>0:!1,Y=y?y.length>0:!1;if(q.Auth&&K&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...zq(k),...Y&&{providers:jq(y)}}}),A&&(q.Storage={S3:{bucket:A,region:T,dangerouslyConnectToHttpEndpointForTesting:R}}),I){const{amazon_location_service:J}=I;q.Geo={LocationService:{maps:J.maps,geofenceCollections:J.geofenceCollections,searchIndices:J.search_indices,region:J.region}}}if(H&&(q.API={...q.API,REST:H.reduce((J,oe)=>{const{name:he,endpoint:ue,region:ve,service:xe}=oe;return{...J,[he]:{endpoint:ue,...xe?{service:xe}:void 0,...ve?{region:ve}:void 0}}},{})}),F){const{VoiceId:J}=F?.convert?.speechGenerator?.defaults??{};q.Predictions=J?{...F,convert:{...F.convert,speechGenerator:{...F.convert.speechGenerator,defaults:{voiceId:J}}}}:F}return q},VN=t=>t?.split(",")??[],zq=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:VN(n),redirectSignOut:VN(r),responseType:s}),jq=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),y6=Symbol("oauth-listener"),er=[];for(let t=0;t<256;++t)er.push((t+256).toString(16).slice(1));function Bq(t,e=0){return(er[t[e+0]]+er[t[e+1]]+er[t[e+2]]+er[t[e+3]]+"-"+er[t[e+4]]+er[t[e+5]]+"-"+er[t[e+6]]+er[t[e+7]]+"-"+er[t[e+8]]+er[t[e+9]]+"-"+er[t[e+10]]+er[t[e+11]]+er[t[e+12]]+er[t[e+13]]+er[t[e+14]]+er[t[e+15]]).toLowerCase()}let q1;const Hq=new Uint8Array(16);function $q(){if(!q1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");q1=crypto.getRandomValues.bind(crypto)}return q1(Hq)}const qq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),GN={randomUUID:qq};function Wq(t,e,n){if(GN.randomUUID&&!e&&!t)return GN.randomUUID();t=t||{};const r=t.random??t.rng?.()??$q();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 Bq(r)}function Vq(t){const{version:e}=t;return e?e.startsWith("1"):!1}function Gq(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&sW(r)}}}function Kq(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:h,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:rW(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:nW(c.identity_providers)}}),f&&(y.Cognito.loginWith={...y.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),h&&(y.Cognito.userAttributes=h.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 Yq(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function Zq(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 Xq(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:b6(n),region:e,apiKey:s,modelIntrospection:o}}}function Qq(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:b6(s),region:n,apiKey:r}}}function Jq(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 eW(t){const e={};if(t.storage&&(e.Storage=Gq(t.storage)),t.auth&&(e.Auth=Kq(t.auth)),t.analytics&&(e.Analytics=Yq(t.analytics)),t.geo&&(e.Geo=Zq(t.geo)),t.data&&(e.API=Xq(t.data)),t.custom){const n=Qq(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=Jq(t.notifications)),e}const tW={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function b6(t){return tW[t]}const KN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function nW(t=[]){return t.reduce((e,n)=>(KN[n]!==void 0&&e.push(KN[n]),e),[])}function rW(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function sW(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 S6=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?Fq(t):Vq(t)?eW(t):t;var YN=function(){return YN=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},YN.apply(this,arguments)};function JTe(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 oW(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(h){try{f(r.next(h))}catch(g){a(g)}}function c(h){try{f(r.throw(h))}catch(g){a(g)}}function f(h){h.done?o(h.value):s(h.value).then(u,c)}f((r=r.apply(t,e||[])).next())})}function iW(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(h){return c([f,h])}}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(h){f=[6,h],s=0}finally{r=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function eRe(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,aW=32,lW=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]),uW=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],cW=Math.pow(2,53)-1,Vm=(function(){function t(){this.state=Int32Array.from(uW),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>cW)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(aW),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],h=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&h)|0)+(g+(lW[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=h,h=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]+=h,r[7]+=g},t})();const dW=t=>new TextEncoder().encode(t);var fW=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:dW;function E6(t){return t instanceof Uint8Array?t:typeof t=="string"?fW(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function hW(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Bl=(function(){function t(e){this.secret=e,this.hash=new Vm,this.reset()}return t.prototype.update=function(e){if(!(hW(e)||this.error))try{this.hash.update(E6(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 oW(this,void 0,void 0,function(){return iW(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new Vm,this.secret){this.outer=new Vm;var e=pW(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 pW(t){var e=E6(t);if(e.byteLength>_s){var n=new Vm;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 _n;(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"})(_n||(_n={}));var Is;(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"})(Is||(Is={}));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 ZN;(function(t){t.Record="1",t.IdentifyUser="2"})(ZN||(ZN={}));var XN;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(XN||(XN={}));var Ke;(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"})(Ke||(Ke={}));var QN;(function(t){t.Subscribe="1",t.GraphQl="2"})(QN||(QN={}));var uh;(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"})(uh||(uh={}));var Lx;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(Lx||(Lx={}));var JN;(function(t){t.None="0"})(JN||(JN={}));var eM;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(eM||(eM={}));var tM;(function(t){t.Subscribe="1"})(tM||(tM={}));var nM;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(nM||(nM={}));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 gW="6.18.0",Ty=()=>typeof global<"u",ad=()=>typeof window<"u",C6=()=>typeof document<"u",HA=()=>typeof process<"u",wh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var rM={};function mW(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return C6()&&n().some(e)}function vW(){return HA()&&typeof rM<"u"&&!!Object.keys(rM).find(t=>t.includes("react"))}function yW(){return ad()&&wh(window,"__VUE")}function bW(){return Ty()&&wh(global,"__VUE")}var sM={};function SW(){return ad()&&wh(window,"__SVELTE")}function EW(){return HA()&&typeof sM<"u"&&!!Object.keys(sM).find(t=>t.includes("svelte"))}function CW(){return ad()&&window.next&&typeof window.next=="object"}function wW(){return Ty()&&(wh(global,"__next")||wh(global,"__NEXT"))}function xW(){return ad()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function _W(){return Ty()&&typeof global.__NUXT_PATHS__<"u"}var oM={};function AW(){const t=!!(C6()&&document.querySelector("[ng-version]")),e=!!(ad()&&typeof window.ng<"u");return t||e}function TW(){return HA()&&typeof oM=="object"&&oM.npm_lifecycle_script?.startsWith("ng ")||!1}function RW(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function IW(){return Ty()&&typeof global.expo<"u"}function OW(){return ad()}const NW=[{platform:_n.Expo,detectionMethod:IW},{platform:_n.ReactNative,detectionMethod:RW},{platform:_n.NextJs,detectionMethod:CW},{platform:_n.Nuxt,detectionMethod:xW},{platform:_n.Angular,detectionMethod:AW},{platform:_n.React,detectionMethod:mW},{platform:_n.VueJs,detectionMethod:yW},{platform:_n.Svelte,detectionMethod:SW},{platform:_n.WebUnknown,detectionMethod:OW},{platform:_n.NextJsSSR,detectionMethod:wW},{platform:_n.NuxtSSR,detectionMethod:_W},{platform:_n.ReactSSR,detectionMethod:vW},{platform:_n.VueJsSSR,detectionMethod:bW},{platform:_n.AngularSSR,detectionMethod:TW},{platform:_n.SvelteSSR,detectionMethod:EW}];function MW(){return NW.find(t=>t.detectionMethod())?.platform||_n.ServerSideUnknown}let ch;const W1=[];let Ux=!1;const PW=10,kW=10,DW=1e3,w6=()=>{if(!ch){if(ch=MW(),Ux)for(;W1.length;)W1.pop()?.();else W1.forEach(t=>{t()});iM(_n.ServerSideUnknown,PW),iM(_n.WebUnknown,kW)}return ch};function LW(){ch=void 0}function iM(t,e){ch===t&&!Ux&&setTimeout(()=>{LW(),Ux=!0,setTimeout(w6,DW)},e)}const ga={},Jo=t=>{ga[t.category]=t.apis.reduce((r,s)=>({...r,[s]:{refCount:r[s]?.refCount?r[s].refCount+1:1,additionalDetails:t.additionalDetails}}),ga[t.category]??{});let e=!1;return()=>{e||(e=!0,t.apis.forEach(r=>{const s=ga[t.category][r].refCount;s>1?ga[t.category][r].refCount=s-1:(delete ga[t.category][r],Object.keys(ga[t.category]).length||delete ga[t.category])}))}},UW=(t,e)=>ga[t]?.[e]?.additionalDetails,FW="aws-amplify",zW=t=>t.replace(/\+.*/,""),jW=({category:t,action:e}={})=>{const n=[[FW,zW(gW)]];if(t&&n.push([t,e]),n.push(["framework",w6()]),t&&e){const r=UW(t,e);r&&r.forEach(s=>{n.push(s)})}return n},Ry=t=>jW(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),Iy=()=>typeof window<"u"&&typeof window.document<"u",aM=new sr("Auth");class BW{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&aM.warn(lM("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&aM.warn(lM("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 lM=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class HW{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new BW}configure(e,n){const r=S6(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=v6(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",_o),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}[y6](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 $t=new HW,x6=(t,e)=>t.Auth.fetchAuthSession(e),Oy=t=>x6($t,t);function _6(){return $t.Auth.clearCredentials()}const Ny=t=>{const{headers:e,statusCode:n}=t;return{...$W(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"]}},$W=t=>typeof t?.$metadata=="object",ld=async t=>{if(!t||t.statusCode<300)return;const e=await ep(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:Ny(t)})},ep=async t=>{if(!t.body)throw new Error("Missing response payload");const e=await t.body.json();return Object.assign(e,{$metadata:Ny(t)})},In=(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)},qW=300*1e3;function WW(t=qW){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const A6=3,uM="amz-sdk-invocation-id",VW="amz-sdk-request",cM=300*1e3,T6=t=>{const n=WW(cM)(t);return n===!1?cM:n},GW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],KW=t=>!!t&&GW.includes(t),R6=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:QW(n)||XW(o,s)||KW(s)||JW(o,s)}},YW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],ZW=["TimeoutError","RequestTimeout","RequestTimeoutException"],XW=(t,e)=>t===429||!!e&&YW.includes(e),QW=t=>[ka.NetworkError,"ERR_NETWORK"].includes(t?.name),JW=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&ZW.includes(e),I6="cognito-identity",O6={service:I6,retryDecider:R6(ld),computeDelay:T6,cache:"no-store"},eV=({maxAttempts:t=A6,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,h;const g=()=>{if(h)return dM(h,f),h;throw dM(c,f),c};for(;!r?.aborted&&f<t;){try{h=await s(u),c=void 0}catch(S){c=S,h=void 0}f=(o.attemptsCount??0)>f?o.attemptsCount??0:f+1,o.attemptsCount=f;const{isCredentialsExpiredError:m,retryable:y}=await e(h,c,o);if(y){if(o.isCredentialsExpired=!!m,!r?.aborted&&f<t){const S=n(f);await tV(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},tV=(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},dM=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},nV=Wq,rV=()=>t=>async function(n){return n.headers[uM]||(n.headers[uM]=nV()),t(n)},sV=({maxAttempts:t=A6})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[VW]=`attempt=${o+1}; max=${t}`,e(s)},oV=({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)}},$A=(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)},V1=t=>{let e;return()=>(e||(e=t()),e)},iV=t=>!["HEAD","GET"].includes(t.toUpperCase()),aV=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:iV(e)?r:void 0,signal:s,cache:o,credentials:a?"include":"same-origin"})}catch(g){throw g instanceof TypeError?new Hr({name:ka.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},h=Object.assign(u.body??{},{text:V1(()=>u.text()),blob:V1(()=>u.blob()),json:V1(()=>u.json())});return{...f,body:h}},N6=$A(aV,[oV,rV,eV,sV]),lV=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},M6=$A(N6,[lV]),P6=t=>(e,n)=>{const r=uV(t),s=JSON.stringify(e);return cV(n,r,s)},uV=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),cV=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),fM=t=>In(M6,P6("GetCredentialsForIdentity"),dV,{...O6,...t,userAgentValue:Ry()}),dV=async t=>{if(t.statusCode>=300)throw await ld(t);const e=await ep(t);return{IdentityId:e.IdentityId,Credentials:fV(e.Credentials),$metadata:Ny(t)}},fV=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),hV=t=>In(M6,P6("GetId"),pV,{...O6,...t,userAgentValue:Ry()}),pV=async t=>{if(t.statusCode>=300)throw await ld(t);return{IdentityId:(await ep(t)).IdentityId,$metadata:Ny(t)}},k6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},gV={partitions:[k6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},D6=t=>{const{partitions:e}=gV;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 k6.outputs.dnsSuffix},Ga=URL,mV=({region:t})=>({url:new Ga(`https://${I6}.${t}.${D6(t)}`)});class Kf extends Hr{constructor(){super({name:ka.PlatformNotSupported,message:"Function not supported on current platform"})}}class L6{constructor(e){this.storage=e}async setItem(e,n){if(!this.storage)throw new Kf;this.storage.setItem(e,n)}async getItem(e){if(!this.storage)throw new Kf;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new Kf;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new Kf;this.storage.clear()}}class U6{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 F6=new sr("CoreStorageUtils"),vV=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{F6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new U6},z6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return F6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new U6}};class yV extends L6{constructor(){super(vV())}}class bV extends L6{constructor(){super(z6())}}class SV{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new Kf;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 EV extends SV{constructor(){super(z6())}}function Fg(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 CV={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 Fx(t,e){function n(s,o,a){if(!(typeof document>"u")){a=Fg({},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 h=decodeURIComponent(c[0]);if(h in a||(a[h]=t.read(f,h)),s===h)break}catch{}}return s?a[s]:a}}return Object.create({set:n,get:r,remove:function(s,o){n(s,"",Fg({},o,{expires:-1}))},withAttributes:function(s){return Fx(this.converter,Fg({},this.attributes,s))},withConverter:function(s){return Fx(Fg({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var zg=Fx(CV,{path:"/"});class wV{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){zg.set(e,n,this.getData())}async getItem(e){return zg.get(e)??null}async removeItem(e){zg.remove(e,this.getData())}async clear(){const e=zg.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 tp=new yV;new bV;const ci=new EV,xV=new sr("I18n");let _V=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),xV.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 xl;(function(t){t.NotConfigured="NotConfigured"})(xl||(xl={}));const AV={[xl.NotConfigured]:{message:"i18n is not configured."}},jg=_y(AV),hM=new sr("I18n");let Bg={language:null},js=null,j6=class El{static configure(e){return hM.debug("configure I18n"),e&&(Bg=Object.assign({},Bg,e.I18n||e),El.createInstance()),Bg}static getModuleName(){return"I18n"}static createInstance(){hM.debug("create I18n instance"),!js&&(js=new _V)}static setLanguage(e){El.checkConfig(),jg(!!js,xl.NotConfigured),js.setLanguage(e)}static get(e,n){return El.checkConfig(),jg(!!js,xl.NotConfigured),js.get(e,n)}static putVocabulariesForLanguage(e,n){El.checkConfig(),jg(!!js,xl.NotConfigured),js.putVocabulariesForLanguage(e,n)}static putVocabularies(e){El.checkConfig(),jg(!!js,xl.NotConfigured),js.putVocabularies(e)}static checkConfig(){return js||El.createInstance(),!0}};j6.createInstance();const TV=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);zA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function RV(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function IV(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const OV=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 pM({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const NV=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 MV(t){return Array.from(t,e=>String.fromCodePoint(e)).join("")}const Bc={convert(t,e={urlSafe:!1,skipPadding:!1}){const n=typeof t=="string"?t:MV(t);let r=Pq()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function PV(){return zA().getRandomValues(new Uint32Array(1))[0]}function kV(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 qA{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(PV());return new qA(n,e)}toString(){return kV(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 B6={[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 jn;(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"})(jn||(jn={}));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 fn(t,e){const{message:n,recoverySuggestion:r}=B6[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 zx(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 gM(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function DV(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var mM;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(mM||(mM={}));var vM;(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"})(vM||(vM={}));var yM;(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"})(yM||(yM={}));var bM;(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"})(bM||(bM={}));var SM;(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"})(SM||(SM={}));var EM;(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"})(EM||(EM={}));var CM;(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"})(CM||(CM={}));var wM;(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"})(wM||(wM={}));var xM;(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"})(xM||(xM={}));var _M;(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"})(_M||(_M={}));var AM;(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"})(AM||(AM={}));var TM;(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"})(TM||(TM={}));var RM;(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"})(RM||(RM={}));var IM;(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"})(IM||(IM={}));var Ev;(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"})(Ev||(Ev={}));var OM;(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"})(OM||(OM={}));var NM;(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"})(NM||(NM={}));var MM;(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"})(MM||(MM={}));var jx;(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"})(jx||(jx={}));var PM;(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"})(PM||(PM={}));var kM;(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"})(kM||(kM={}));var DM;(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"})(DM||(DM={}));var LM;(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"})(LM||(LM={}));var UM;(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"})(UM||(UM={}));const My="UserUnAuthenticatedException",LV="UserAlreadyAuthenticatedException",UV="DeviceMetadataNotFoundException",H6="AutoSignInException",FV="InvalidRedirectException",zV="InvalidAppSchemeException",jV="InvalidPreferredRedirectUrlException",BV=new Le({name:FV,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:zV,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:jV,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 HV="InvalidOriginException",$V=new Le({name:HV,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."}),qV="OAuthSignOutException",WV="TokenRefreshException",VV="UnexpectedSignInInterruptionException";function ud(t){if(!t||!t.accessToken)throw new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function GV(t){if(!t||!t.idToken)throw new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const KV=new Le({name:WV,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
|
|
3
|
-
Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
|
|
4
|
-
E.g { responseType: 'code' }`}),YV=new Le({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function $6(t){if(QV(t))throw KV;if(!XV(t))throw YV}function q6(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Le({name:UV,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 ZV={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function W6(t){return t?.accessToken||t?.idToken}function XV(t){return W6(t)&&t?.refreshToken}function QV(t){return W6(t)&&!t?.refreshToken}const JV=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const n=await t.Auth.getTokens({forceRefresh:!1});ud(n);const{"cognito:username":r,sub:s}=n.idToken?.payload??{},o={username:r,userId:s},a=eG(n);return a&&(o.signInDetails=a),o};function eG(t){return t?.signInDetails}const Py=async()=>JV($t),Mt=(t,e)=>Ry({category:Is.Auth,action:t,...e}),Hn=t=>(e,n)=>{const r=tG(t),s=JSON.stringify(e);return nG(n,r,s)},tG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),nG=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Os(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Le({name:ka.Unknown,message:"An unknown error has occurred.",underlyingError:t})}const ar=()=>async t=>{if(t.statusCode>=300){const e=await ld(t);throw Os(e),new Le({name:e.name,message:e.message,metadata:e.$metadata})}return ep(t)},rG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await $t.libraryOptions?.Auth?.headers?.()},t(r)},$n=$A(N6,[rG]),V6="cognito-idp",qn={service:V6,retryDecider:R6(ld),computeDelay:T6,get userAgentValue(){return Ry()},cache:"no-store"},np=t=>In($n,Hn("InitiateAuth"),ar(),{...qn,...t}),as=t=>In($n,Hn("RespondToAuthChallenge"),ar(),{...qn,...t}),sG=t=>In($n,Hn("VerifySoftwareToken"),ar(),{...qn,...t}),oG=t=>In($n,Hn("AssociateSoftwareToken"),ar(),{...qn,...t}),iG=({region:t})=>({url:new Ga(`https://${V6}.${t}.${D6(t)}`)}),bt=({endpointOverride:t})=>e=>t?{url:new Ga(t)}:iG(e),aG=t=>In($n,Hn("GetTokensFromRefreshToken"),ar(),{...qn,...t}),lG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=yt(s);$6(t);const c=aG({endpointResolver:bt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),h=mi(f?.AccessToken??""),g=f?.IdToken?mi(f.IdToken):void 0,{iat:m}=h.payload;if(!m)throw new Le({name:"iatNotFoundException",message:"iat not found in access token"});const y=m*1e3-new Date().getTime();return{accessToken:h,idToken:g,clockDrift:y,refreshToken:f?.RefreshToken??t.refreshToken,username:n}},uG=OV(lG),cG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var Cv;(function(t){t.InvalidAuthTokens="InvalidAuthTokens"})(Cv||(Cv={}));const dG={[Cv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},fG=_y(dG),FM="CognitoIdentityServiceProvider";class hG{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=mi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?mi(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),h={accessToken:r,idToken:o,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(h.signInDetails=JSON.parse(f)),h}catch{return null}}async storeTokens(e){fG(e!==void 0,Cv.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 pG(FM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${FM}.${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 pG=(t,e)=>WA(cG)(`${t}`,e);function WA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const zM="amplify-signin-with-hostedUI",ho="CognitoIdentityServiceProvider";class G6{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(zM),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(zM),[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)=>WA(ZV)(t,e),Fr=new G6(tp),Bx=[],gG=t=>{Bx.push(t)},K6=()=>{for(;Bx.length;)Bx.pop()?.()};class mG{constructor(){this.waitForInflightOAuth=Iy()?async()=>{if(await Fr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{gG(e)}),this.inflightPromise)}:async()=>{}}setAuthConfig(e){Fr.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&&pM({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=pM({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",_o),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Os(e),this.isAuthenticationError(e)&&this.clearTokens(),Ao.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",_o),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 vG{constructor(){this.authTokenStore=new hG,this.authTokenStore.setKeyValueStorage(tp),this.tokenOrchestrator=new mG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(uG)}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 Gm=new vG,{tokenOrchestrator:$r}=Gm;async function Ai(t){if(t.AccessToken){const e=mi(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=mi(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 yG="Unable to get user session following successful sign-in.",Ka=async()=>{try{Ao.dispatch("auth",{event:"signedIn",data:await Py()},"Auth",_o)}catch(t){throw t.name===My?new Le({name:VV,message:yG,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 Y6(){return{active:!1}}const bG=(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 Y6();default:return t}},SG=t=>{let e=t(Y6(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ta=SG(bG),EG=180*1e3,Hg="CognitoSignInState",di={username:`${Hg}.username`,challengeName:`${Hg}.challengeName`,signInSession:`${Hg}.signInSession`,expiry:`${Hg}.expiry`},CG=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return $g({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return $g(e.value),{...e.value};case"SET_CHALLENGE_NAME":return $g({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return $g({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return xG();case"RESET_STATE":return Z6(),VA();default:return t}},wG=t=>{const e=Number(t),n=Date.now();return e<=n},Qs=()=>{Ro.dispatch({type:"RESET_STATE"})},Z6=()=>{for(const t of Object.values(di))ci.removeItem(t)},VA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),xG=()=>{const t=ci.getItem(di.expiry);if(!t||wG(t))return Z6(),VA();const e=ci.getItem(di.username)??void 0,n=ci.getItem(di.challengeName)??void 0,r=ci.getItem(di.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},_G=t=>{let e=t(VA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ro=_G(CG);function nu(t){Ro.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const $g=({challengeName:t,signInSession:e,username:n})=>{n&&ci.setItem(di.username,n),t&&ci.setItem(di.challengeName,t),e&&(ci.setItem(di.signInSession,e),ci.setItem(di.expiry,String(Date.now()+EG)))},jM="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 Rs extends Hr{constructor(e){super(e),this.constructor=Rs,Object.setPrototypeOf(this,Rs.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 G1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",BM="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",Hc={[Bt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:jM},[Bt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:BM},[Bt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:BM},[Bt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:jM},[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:G1},[Bt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:G1},[Bt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:G1},[Bt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},cd=_y(Hc,Rs),X6=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyOperationAborted];return new Rs({name:Bt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Hc[Bt.RelyingPartyMismatch];return new Rs({name:Bt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Rs({name:ka.Unknown,message:"An unknown error has occurred.",underlyingError:t})},AG=t=>{if(t instanceof Rs)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAuthenticationCanceled];return new Rs({name:Bt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return X6(t)},Q6=()=>Iy()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Co=t=>Bc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),dh=t=>Uint8Array.from(jA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,TG=t=>{const e=dh(t.user.id),n=dh(t.challenge),r=(t.excludeCredentials||[]).map(s=>({...s,id:dh(s.id)}));return{...t,excludeCredentials:r,challenge:n,user:{...t.user,id:e}}},RG=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},IG=t=>{const e=dh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:dh(r.id)}));return{...t,challenge:e,allowCredentials:n}},OG=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 NG(t){cd([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),Bt.InvalidPasskeyRegistrationOptions)}function MG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,Bt.PasskeyRegistrationFailed)}function PG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,Bt.PasskeyRetrievalFailed)}const kG=async t=>{try{const e=Q6();cd(e,Bt.PasskeyNotSupported);const n=IG(t),r=await navigator.credentials.get({publicKey:n});return PG(r),OG(r)}catch(e){throw AG(e)}},DG=t=>In($n,Hn("ConfirmDevice"),ar(),{...qn,...t}),Km={convert(t){return new TextEncoder().encode(t)}};function Ie(t,e){t!=null&&this.fromString(t,e)}function _r(){return new Ie(null,null)}let Oa;const LG=0xdeadbeefcafe,HM=(LG&16777215)===15715070;function UG(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 FG(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,h=u*c+f*a;c=a*c+((h&32767)<<15)+n[r]+(s&1073741823),s=(c>>>30)+(h>>>15)+u*f+(s>>>30),n[r++]=c&1073741823}return s}function zG(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,h=u*c+f*a;c=a*c+((h&16383)<<14)+n[r]+s,s=(c>>28)+(h>>14)+u*f,n[r++]=c&268435455}return s}const $M=typeof navigator<"u";$M&&HM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=FG,Oa=30):$M&&HM&&navigator.appName!=="Netscape"?(Ie.prototype.am=UG,Oa=26):(Ie.prototype.am=zG,Oa=28);Ie.prototype.DB=Oa;Ie.prototype.DM=(1<<Oa)-1;Ie.prototype.DV=1<<Oa;const GA=52;Ie.prototype.FV=Math.pow(2,GA);Ie.prototype.F1=GA-Oa;Ie.prototype.F2=2*Oa-GA;const jG="0123456789abcdefghijklmnopqrstuvwxyz",ky=[];let dd,As;dd=48;for(As=0;As<=9;++As)ky[dd++]=As;dd=97;for(As=10;As<36;++As)ky[dd++]=As;dd=65;for(As=10;As<36;++As)ky[dd++]=As;function qM(t){return jG.charAt(t)}function BG(t,e){const n=ky[t.charCodeAt(e)];return n??-1}function HG(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function $G(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 KA(t){const e=_r();return e.fromInt(t),e}function qG(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=BG(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 WG(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function VG(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=qM(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+=qM(r));return s?o:"0"}function GG(){const t=_r();return Ie.ZERO.subTo(this,t),t}function KG(){return this.s<0?this.negate():this}function YG(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 YA(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 ZG(){return this.t<=0?0:this.DB*(this.t-1)+YA(this[this.t-1]^this.s&this.DM)}function XG(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 QG(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 JG(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 eK(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 tK(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 nK(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 rK(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 sK(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=_r());const o=_r(),a=this.s,u=t.s,c=this.DB-YA(r[r.t-1]);c>0?(r.lShiftTo(c,o),s.lShiftTo(c,n)):(r.copyTo(o),s.copyTo(n));const f=o.t,h=o[f-1];if(h===0)return;const g=h*(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?_r():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 A=n[--E]===h?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,A,n,C,0,f))<A)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--A;)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 oK(t){const e=_r();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(Ie.ZERO)>0&&t.subTo(e,e),e}function iK(){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 aK(t){return this.compareTo(t)===0}function lK(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 uK(t){const e=_r();return this.addTo(t,e),e}function cK(t){const e=_r();return this.subTo(t,e),e}function dK(t){const e=_r();return this.multiplyTo(t,e),e}function fK(t){const e=_r();return this.divRemTo(t,e,null),e}function fd(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 hK(t){const e=_r();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 pK(t){const e=_r();return t.copyTo(e),this.reduce(e),e}function gK(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 mK(t,e){t.squareTo(e),this.reduce(e)}function vK(t,e,n){t.multiplyTo(e,n),this.reduce(n)}fd.prototype.convert=hK;fd.prototype.revert=pK;fd.prototype.reduce=gK;fd.prototype.mulTo=vK;fd.prototype.sqrTo=mK;function yK(t,e,n){let r=t.bitLength(),s,o=KA(1);const a=new fd(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,h=(1<<s)-1;if(u[1]=a.convert(this),s>1){const w=_r();for(a.sqrTo(u[1],w);c<=h;)u[c]=_r(),a.mulTo(w,u[c-2],u[c]),c+=2}let g=t.t-1,m,y=!0,S=_r(),E;for(r=YA(t[g])-1;g>=0;){for(r>=f?m=t[g]>>r-f&h:(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=HG;Ie.prototype.fromInt=$G;Ie.prototype.fromString=qG;Ie.prototype.clamp=WG;Ie.prototype.dlShiftTo=XG;Ie.prototype.drShiftTo=QG;Ie.prototype.lShiftTo=JG;Ie.prototype.rShiftTo=eK;Ie.prototype.subTo=tK;Ie.prototype.multiplyTo=nK;Ie.prototype.squareTo=rK;Ie.prototype.divRemTo=sK;Ie.prototype.invDigit=iK;Ie.prototype.addTo=lK;Ie.prototype.toString=VG;Ie.prototype.negate=GG;Ie.prototype.abs=KG;Ie.prototype.compareTo=YG;Ie.prototype.bitLength=ZG;Ie.prototype.mod=oK;Ie.prototype.equals=aK;Ie.prototype.add=uK;Ie.prototype.subtract=cK;Ie.prototype.multiply=dK;Ie.prototype.divide=fK;Ie.prototype.modPow=yK;Ie.ZERO=KA(0);Ie.ONE=KA(1);const bK=async({a:t,g:e,k:n,x:r,B:s,N:o,U:a})=>new Promise((u,c)=>{e.modPow(r,o,(f,h)=>{if(f){c(f);return}s.subtract(n.multiply(h)).modPow(t.add(a.multiply(r)),o,(g,m)=>{if(g){c(g);return}u(m.mod(o))})})}),SK="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",J6={},Hx={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),J6[t]=e,Hx[e]=t}const $c=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 Hx)e[n/2]=Hx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},ZA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=J6[t[n]];return e},$x=t=>{const e=new Bl;e.update(t);const n=e.digestSync(),r=ZA(n);return new Array(64-r.length).join("0")+r},Ym=t=>$x($c(t)),EK=/^[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=EK.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},CK=({A:t,B:e})=>{const n=new Ie(Ym(ii(t)+ii(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},wK=(t,e,n)=>{const r=new Bl(e);r.update(t);const s=r.digestSync(),o=new Bl(s);return o.update(n),o.digestSync().slice(0,16)},XA=t=>{const e=new qA().random(t).toString();return $c(e)},xK=()=>Bc.convert(XA(40));class _K{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=Km,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Ym(`${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=xK();const r=`${e}${n}:${this.randomPassword}`,s=$x(r),o=ZA(XA(16));return this.saltToHashDevices=ii(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Ym(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=CK({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=$x(a),c=new Ie(Ym(ii(s)+u),16),f=await bK({a:this.a,g:this.g,k:this.k,x:c,B:r,N:this.N,U:o}),h=this.encoder.convert("Caldera Derived Key"),g=this.encoder.convert(""),m=new Uint8Array(h.byteLength+g.byteLength);return m.set(h,0),m.set(g,h.byteLength),wK($c(ii(f)),$c(ii(o)),m)}}const AK=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)})}),rp=async t=>{const e=new Ie(SK,16),n=new Ie("2",16),r=TK(),s=await AK({a:r,g:n,N:e});return new _K({userPoolName:t,a:r,g:n,A:s,N:e})},TK=()=>{const t=ZA(XA(128));return new Ie(t,16)};async function ru({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await rp(s),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await o.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:Bc.convert($c(o.getSaltToHashDevices())),PasswordVerifier:Bc.convert($c(o.getVerifierDevices()))},f=o.getRandomPassword();try{return await DG({endpointResolver:bt({endpointOverride:e})})({region:yt(t)},{AccessToken:r,DeviceName:await NV(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function RK(t){const e=$t.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;cd(!!a,Bt.InvalidPasskeyAuthenticationOptions);const u=await kG(JSON.parse(a)),c=as({endpointResolver:bt({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:g,Session:m}=await c({region:yt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(nu({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await Ai({...g,username:n,NewDeviceMetadata:await ru({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Ro.dispatch({type:"RESET_STATE"}),await Ka(),{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:h}}function Wn({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 IK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],OK=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e8=()=>{const t=new Date,e=OK[t.getUTCDay()],n=IK[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}`},t8=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=Km.convert(t),a=Km.convert(e),u=NK(n.SECRET_BLOCK),c=Km.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 h=new Bl(s);h.update(f);const g=h.digestSync();return Bc.convert(g)},NK=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=jA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function sp({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);q6(c);const f=await rp(c.deviceGroupKey),h={USERNAME:t,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},g={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:h,ClientMetadata:n,Session:r},m=as({endpointResolver:bt({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:yt(o)},g);return MK(t,y,n,S,f,e,s)}async function MK(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);q6(f);const h=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:h,salt:g}),E=e8(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:t8({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=Wn({username:t,userPoolId:o,userPoolClientId:a}),A={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o)},A)}async function QA(t,e,n,r,s,o,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,h=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=e8(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:t8({username:y,userPoolName:h,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const A=Wn({username:y,userPoolId:u,userPoolClientId:c}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:A},M=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u)},T);return M.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:y,config:o,clientMetadata:n,session:M.Session,tokenOrchestrator:a}):M}async function hd(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 su(t){const{dispatch:e}=Ro;e({type:"SET_USERNAME",value:t})}async function n8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:o,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,h=u?.split("_")[1]||"",g=await rp(h),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=Wn({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await np({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.SignIn)},S),{ChallengeParameters:w,Session:A}=C,T=w?.USERNAME??t;return su(T),C.ChallengeName==="PASSWORD_VERIFIER"?hd(QA,[e,w,n,A,g,r,s],T,s):C}async function PK({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return as({endpointResolver:bt({endpointOverride:r.userPoolEndpoint})})({region:yt(r.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function kK(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=Wn({username:t,userPoolId:o,userPoolClientId:a}),g=await as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return su(m),g}async function DK(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",h=await rp(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:h.A.toString(16)},m=Wn({username:t,userPoolId:a,userPoolClientId:u}),S=await as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return su(E),S.ChallengeName==="PASSWORD_VERIFIER"?hd(QA,[e,S.ChallengeParameters,n,S.Session,h,r,o],E,o):S}const qx="userAttributes.";function LK(t){return"isSignedIn"in t&&"nextStep"in t}async function UK({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},h=await o?.getDeviceMetadata(r);h&&h.deviceKey&&(f.DEVICE_KEY=h.deviceKey);const g=Wn({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:e,ClientId:u,UserContextData:g},S=await as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function FK({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=sG({endpointResolver:bt({endpointOverride:c})}),{Session:y}=await m({region:yt(a),userAgentValue:Mt(Ke.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 as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},S)}if(t.includes("@")){f.EMAIL=t;const m={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:u};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.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 zK({challengeResponse:t,username:e,clientMetadata:n,session:r,config:s}){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s;fn(t==="TOTP"||t==="SMS"||t==="EMAIL",Ge.IncorrectMFAMethod);const c={USERNAME:e,ANSWER:YK(t)},f=Wn({username:e,userPoolId:o,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return as({endpointResolver:bt({endpointOverride:u})})({region:yt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},h)}async function jK({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...GK(s),NEW_PASSWORD:t,USERNAME:r},h=Wn({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:h};return as({endpointResolver:bt({endpointOverride:c})})({region:yt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},g)}async function BK(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 h=Wn({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:h},y=await np({endpointResolver:bt({endpointOverride:u})})({region:yt(a),userAgentValue:Mt(Ke.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return su(S),y.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function HK(t,e,n,r,s){return n8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function $K(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=Wn({username:t,userPoolId:o,userPoolClientId:s}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await np({endpointResolver:bt({endpointOverride:a})})({region:yt(o),userAgentValue:Mt(Ke.SignIn)},h),y=m.ChallengeParameters?.USERNAME??t;return su(y),m.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function qK(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await rp(c),h={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=Wn({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:g},y=np({endpointResolver:bt({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:yt(o),userAgentValue:Mt(Ke.SignIn)},m),C=S?.USERNAME??t;return su(C),hd(QA,[e,S,n,E,f,r,s],C,s)}async function ou(t){const{challengeName:e,challengeParameters:n,availableChallenges:r}=t,s=$t.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=WM(VM(n.MFAS_CAN_SETUP))||[],c=XK(u),f=c.includes("TOTP"),h=c.includes("EMAIL");if(f&&h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const g=oG({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:WK(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:VK(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:WM(VM(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 RK(n);return LK(o)?o:ou(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 WK(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Ga(s)}}}function pd(t){if(t===Ev.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(t===Ev.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function VK(t){return t?JSON.parse(t).map(n=>n.includes(qx)?n.replace(qx,""):n):[]}function GK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${qx}${n}`]=r)}),e}async function KK(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:{}}:PK({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return zK({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return FK({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return jK({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return hd(UK,[{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 QK({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return kK(t,r,a,s,n);case"PASSWORD_SRP":return DK(t,r,a,s,n,o)}throw new Le({name:To.SignInException,message:`An error occurred during the sign in process.
|
|
5
|
-
${e} challengeName returned by the underlying service was not addressed.`})}function YK(t){let e="SMS_MFA";return t==="TOTP"&&(e="SOFTWARE_TOKEN_MFA"),t==="EMAIL"&&(e="EMAIL_OTP"),e}function ZK(t){if(t==="SMS_MFA")return"SMS";if(t==="SOFTWARE_TOKEN_MFA")return"TOTP";if(t==="EMAIL_OTP")return"EMAIL"}function WM(t){if(t)return t.map(ZK).filter(Boolean)}function VM(t){return t?JSON.parse(t):[]}function XK(t){return t.filter(e=>e==="EMAIL"||e==="TOTP")}async function r8(){let t;try{t=await Py()}catch{}if(t&&t.userId&&t.username)throw new Le({name:LV,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function op(t){return Ro.getState().username??t}async function QK({challengeName:t,challengeResponse:e,clientMetadata:n,session:r,username:s,config:o,tokenOrchestrator:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=o,h={USERNAME:s};t==="EMAIL_OTP"&&(h.EMAIL_OTP_CODE=e),t==="SMS_MFA"&&(h.SMS_MFA_CODE=e),t==="SMS_OTP"&&(h.SMS_OTP_CODE=e),t==="SOFTWARE_TOKEN_MFA"&&(h.SOFTWARE_TOKEN_MFA_CODE=e);const g=await a?.getDeviceMetadata(s);g&&g.deviceKey&&(h.DEVICE_KEY=g.deviceKey);const m=Wn({username:s,userPoolId:u,userPoolClientId:c}),y={ChallengeName:t,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:c,UserContextData:m},E=await as({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.ConfirmSignIn)},y);return E.ChallengeName==="DEVICE_SRP_AUTH"?sp({username:s,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:a}):E}async function JK(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{username:n,password:r,options:s}=t,o={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=s?.clientMetadata;fn(!!n,Ge.EmptySignInUsername),fn(!r,Ge.CustomAuthSignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd($K,[n,a,e,$r],n,$r),g=op(n);return nu({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ai({username:g,...f,NewDeviceMetadata:await ru({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Qs(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:u,challengeParameters:c})}catch(u){Qs(),Os(u);const c=pd(u.name);if(c)return c;throw u}}async function eY(t){const{username:e,password:n,options:r}=t,s={loginId:e,authFlowType:"CUSTOM_WITH_SRP"},o=$t.getConfig().Auth?.Cognito;lt(o);const a=r?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await qK(e,n,a,o,$r),g=op(e);return nu({signInSession:h,username:g,challengeName:u,signInDetails:s}),f?(await Ai({username:g,...f,NewDeviceMetadata:await ru({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Qs(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:u,challengeParameters:c})}catch(u){Qs(),Os(u);const c=pd(u.name);if(c)return c;throw u}}const s8=async()=>{throw new Le({name:H6,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 JA=s8;function Wx(t){JA=t}function jr(t=!0){t&&(JA=s8),Ta.dispatch({type:"RESET"})}async function GM(t){const{username:e,password:n}=t,r=$t.getConfig().Auth?.Cognito,s={loginId:e,authFlowType:"USER_SRP_AUTH"};lt(r);const o=t.options?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:c,Session:f}=await HK(e,n,o,r,$r),h=op(e);return nu({signInSession:f,username:h,challengeName:a,signInDetails:s}),c?(await Ai({username:h,...c,NewDeviceMetadata:await ru({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:c.NewDeviceMetadata,accessToken:c.AccessToken}),signInDetails:s}),Qs(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:a,challengeParameters:u})}catch(a){Qs(),jr(),Os(a);const u=pd(a.name);if(u)return u;throw a}}async function tY(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_PASSWORD_AUTH"};lt(s);const a=r?.clientMetadata;fn(!!e,Ge.EmptySignInUsername),fn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd(BK,[e,n,a,s,$r],e,$r),g=op(e);return nu({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ai({...f,username:g,NewDeviceMetadata:await ru({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Qs(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:u,challengeParameters:c})}catch(u){Qs(),jr(),Os(u);const c=pd(u.name);if(c)return c;throw u}}async function nY({username:t,clientMetadata:e,config:n,tokenOrchestrator:r,preferredChallenge:s,password:o,session:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=n,h=Wn({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)&&fn(!1,Ge.InvalidPreferredChallenge),s==="PASSWORD_SRP")return fn(!!o,Ge.EmptySignInPassword),n8({username:t,password:o,clientMetadata:e,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:s});s==="PASSWORD"&&(fn(!!o,Ge.EmptySignInPassword),g.PASSWORD=o),g.PREFERRED_CHALLENGE=s}const m={AuthFlow:"USER_AUTH",AuthParameters:g,ClientMetadata:e,ClientId:c,UserContextData:h};a&&(m.Session=a);const S=await np({endpointResolver:bt({endpointOverride:f})})({region:yt(u),userAgentValue:Mt(Ke.SignIn)},m);return su(t),S}async function o8(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o={loginId:e,authFlowType:"USER_AUTH"};lt(s);const a=r?.clientMetadata,u=r?.preferredChallenge??s?.passwordless?.preferredChallenge;fn(!!e,Ge.EmptySignInUsername);try{const c={username:e,config:s,tokenOrchestrator:$r,clientMetadata:a,preferredChallenge:u,password:n},f=Ta.getState();f.active&&f.username===e&&(c.session=f.session);const h=await nY(c),g=op(e);return nu({signInSession:h.Session,username:g,challengeName:h.ChallengeName,signInDetails:o}),h.AuthenticationResult?(await Ai({username:g,...h.AuthenticationResult,NewDeviceMetadata:await ru({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:o}),Qs(),await Ka(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(c){Qs(),jr(),Os(c);const f=pd(c.name);if(f)return f;throw c}}async function eT(t){jr(!1);const e=t.options?.authFlowType;switch(await r8(),e){case"USER_SRP_AUTH":return GM(t);case"USER_PASSWORD_AUTH":return tY(t);case"CUSTOM_WITHOUT_SRP":return JK(t);case"CUSTOM_WITH_SRP":return eY(t);case"USER_AUTH":return o8(t);default:return GM(t)}}const i8=180*1e3;function rY(t){const e=Sv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(Sv.dispatch("auth-internal",{event:"autoSignIn"}),Wx(l8(t)),e())}),n=setTimeout(()=>{e(),clearTimeout(n),jr()},i8)}function a8(t,e){let n;return r=>{n||t(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},e)}}function sY(t,e,n){const r=Date.now(),s=setInterval(async()=>{if(Date.now()-r>i8)clearInterval(s),n(new Le({name:H6,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."})),jr();else try{const u=await eT(t);u.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(e(u),clearInterval(s),jr())}catch(u){clearInterval(s),n(u),jr()}},5e3)}const oY=a8(sY,300),iY=a8(lY,300);function aY(t){return async()=>new Promise((e,n)=>{oY([t,e,n])})}async function lY(t,e,n){try{const r=t?.options?.authFlowType==="USER_AUTH"?await o8(t):await eT(t);e(r),jr()}catch(r){n(r),jr()}}function l8(t){return async()=>new Promise((e,n)=>{iY([t,e,n])})}const uY=l8,cY=()=>async t=>{if(t.statusCode>=300){const e=await ld(t);if(Os(e),e.name===jx.InvalidParameterException&&/'password'/.test(e.message)&&/Member must not be null/.test(e.message)){const n=Ge.EmptySignUpPassword,{message:r,recoverySuggestion:s}=B6[n];throw new Le({name:n,message:r,recoverySuggestion:s})}throw new Le({name:e.name,message:e.message})}return ep(t)},dY=t=>In($n,Hn("SignUp"),cY(),{...qn,...t});async function fY(t){const{username:e,password:n,options:r}=t,s=$t.getConfig().Auth?.Cognito,o=s?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:u,autoSignIn:c}=t.options??{};lt(s),fn(!!e,Ge.EmptySignUpUsername);const f=typeof c!="boolean"?c:void 0,h={username:e,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(h.password=n);const{userPoolId:g,userPoolClientId:m,userPoolEndpoint:y}=s,S=dY({endpointResolver:bt({endpointOverride:y})}),E={Username:e,Password:void 0,UserAttributes:r?.userAttributes&&gM(r?.userAttributes),ClientMetadata:a,ValidationData:u&&gM(u),ClientId:m,UserContextData:Wn({username:e,userPoolId:g,userPoolClientId:m})};n&&(E.Password=n);const{UserSub:C,CodeDeliveryDetails:w,UserConfirmed:A,Session:T}=await S({region:yt(g),userAgentValue:Mt(Ke.SignUp)},E);(f||c===!0)&&(Ta.dispatch({type:"START"}),Ta.dispatch({type:"SET_USERNAME",value:e}),Ta.dispatch({type:"SET_SESSION",value:T}));const R={destination:w?.Destination,deliveryMedium:w?.DeliveryMedium,attributeName:w?.AttributeName},M=!!A,N=Ta.getState().active;if(M)return N?(Wx(uY(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:C}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:C};if(N){if(o==="link")return Wx(aY(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:R},userId:C};rY(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:R},userId:C}}const hY=t=>In($n,Hn("ForgotPassword"),ar(),{...qn,...t});async function u8(t){const{username:e}=t;fn(!!e,Ge.EmptyResetPasswordUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Wn({username:e,userPoolId:s,userPoolClientId:r}),h=(await hY({endpointResolver:bt({endpointOverride:o})})({region:yt(s),userAgentValue:Mt(Ke.ResetPassword)},{Username:e,ClientMetadata:a,ClientId:r,UserContextData:u})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:h?.DeliveryMedium,destination:h?.Destination,attributeName:h?.AttributeName}}}}const pY=t=>In($n,Hn("ConfirmForgotPassword"),ar(),{...qn,...t});async function gY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:s}=e,{username:o,newPassword:a}=t;fn(!!o,Ge.EmptyConfirmResetPasswordUsername),fn(!!a,Ge.EmptyConfirmResetPasswordNewPassword);const u=t.confirmationCode;fn(!!u,Ge.EmptyConfirmResetPasswordConfirmationCode);const c=t.options?.clientMetadata,f=Wn({username:o,userPoolId:r,userPoolClientId:n});await pY({endpointResolver:bt({endpointOverride:s})})({region:yt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmResetPassword)},{Username:o,ConfirmationCode:u,Password:a,ClientMetadata:c,ClientId:e.userPoolClientId,UserContextData:f})}const mY=t=>In($n,Hn("ResendConfirmationCode"),ar(),{...qn,...t});async function vY(t){const{username:e}=t;fn(!!e,Ge.EmptySignUpUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Wn({username:e,userPoolId:s,userPoolClientId:r}),c=mY({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(n.userPoolId),userAgentValue:Mt(Ke.ResendSignUpCode)},{Username:e,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:u}),{DeliveryMedium:h,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:h,attributeName:g||void 0}}const yY=t=>In($n,Hn("ConfirmSignUp"),ar(),{...qn,...t});async function bY(t){const{username:e,confirmationCode:n,options:r}=t,s=$t.getConfig().Auth?.Cognito;lt(s);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s,c=r?.clientMetadata;fn(!!e,Ge.EmptyConfirmSignUpUsername),fn(!!n,Ge.EmptyConfirmSignUpCode);const f=Wn({username:e,userPoolId:o,userPoolClientId:a}),h=yY({endpointResolver:bt({endpointOverride:u})}),{Session:g}=await h({region:yt(s.userPoolId),userAgentValue:Mt(Ke.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=Ta.getState();if(!E.active||E.username!==e){m(S),jr();return}Ta.dispatch({type:"SET_SESSION",value:g});const C=Sv.listen("auth-internal",({payload:w})=>{w.event==="autoSignIn"&&(m({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),C())});Sv.dispatch("auth-internal",{event:"confirmSignUp",data:S})}catch(S){y(S)}})}async function c8(t){const{challengeResponse:e,options:n}=t,{username:r,challengeName:s,signInSession:o,signInDetails:a}=Ro.getState(),u=$t.getConfig().Auth?.Cognito;lt(u);const c=n?.clientMetadata;if(fn(!!e,Ge.EmptyChallengeResponse),!r||!s||!o)throw new Le({name:To.SignInException,message:`
|
|
6
|
-
An error occurred during the sign in process.
|
|
7
|
-
|
|
8
|
-
This most likely occurred due to:
|
|
9
|
-
1. signIn was not called before confirmSignIn.
|
|
10
|
-
2. signIn threw an exception.
|
|
11
|
-
3. page was refreshed during the sign in flow and session has expired.
|
|
12
|
-
`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:h,AuthenticationResult:g,ChallengeParameters:m}=await KK(r,s,o,e,u,$r,c,n);return nu({signInSession:f,username:r,challengeName:h,signInDetails:a}),g?(await Ai({username:r,...g,NewDeviceMetadata:await ru({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Qs(),await Ka(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):ou({challengeName:h,challengeParameters:m})}catch(f){Os(f);const h=pd(f.name);if(h)return h;throw f}}const SY=t=>In($n,Hn("GetUser"),ar(),{...qn,...t}),EY=t=>In($n,Hn("VerifyUserAttribute"),ar(),{...qn,...t});async function CY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;fn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await Oy({forceRefresh:!1});ud(a),await EY({endpointResolver:bt({endpointOverride:n})})({region:yt(r),userAgentValue:Mt(Ke.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new sr("AuthError");const wY={oauthSignInError:{message:jn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:jn.DEFAULT_MSG},missingAuthConfig:{message:jn.DEFAULT_MSG},emptyUsername:{message:jn.EMPTY_USERNAME},invalidUsername:{message:jn.INVALID_USERNAME},emptyPassword:{message:jn.EMPTY_PASSWORD},emptyCode:{message:jn.EMPTY_CODE},signUpError:{message:jn.SIGN_UP_ERROR},noMFA:{message:jn.NO_MFA},invalidMFA:{message:jn.INVALID_MFA},emptyChallengeResponse:{message:jn.EMPTY_CHALLENGE},noUserSession:{message:jn.NO_USER_SESSION},deviceConfig:{message:jn.DEVICE_CONFIG},networkError:{message:jn.NETWORK_ERROR},autoSignInError:{message:jn.AUTOSIGNIN_ERROR},default:{message:jn.DEFAULT_MSG}},Da=(t,e)=>new Le({message:t??"An error has occurred during the oauth process.",name:To.OAuthSignInError,recoverySuggestion:wY.oauthSignInError.log});var Vx;(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"})(Vx||(Vx={}));const xY="`signInWithRedirect` has been canceled.",_Y="An error occurred while validating the state.",AY="Try to initiate an OAuth flow from Amplify",d8=async t=>{const e=await Fr.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Le({name:Vx.OAuthSignInError,message:t===null?xY:_Y,recoverySuggestion:t===null?void 0:AY});return n},f8=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Ga(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw Da(f??c);return s==="code"?TY({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):RY({currentUrl:t,redirectUri:r,preferPrivateSession:a})},TY=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Ga(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw Da("User cancelled OAuth flow.");const f=await d8(c),h="https://"+s+"/oauth2/token",g=await Fr.loadPKCE(),m={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...g?{code_verifier:g}:{}},y=Object.entries(m).map(([N,I])=>`${encodeURIComponent(N)}=${encodeURIComponent(I)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:A,token_type:T,expires_in:R}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[Nq]:e},body:y})).json();if(w)throw Da(A??w);const M=(S&&mi(S).payload.username)??"username";return await Ai({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),h8({redirectUri:r,state:f,preferPrivateSession:o})},RY=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Ga(t),{id_token:s,access_token:o,state:a,token_type:u,expires_in:c,error_description:f,error:h}=(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(h)throw Da(f??h);if(!o)throw Da("No access token returned from OAuth flow.");const g=await d8(a),m=(o&&mi(o).payload.username)??"username";return await Ai({username:m,AccessToken:o,IdToken:s}),h8({redirectUri:e,state:g,preferPrivateSession:n})},h8=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await $r.setOAuthMetadata({oauthSignIn:!0}),await Fr.clearOAuthData(),await Fr.storeOAuthSignIn(!0,n),K6(),NY(t),IY(e)&&Ao.dispatch("auth",{event:"customOAuthState",data:RV(OY(e))},"Auth",_o),Ao.dispatch("auth",{event:"signInWithRedirect"},"Auth",_o),await Ka()},IY=t=>/-/.test(t),OY=t=>t.split("-").splice(1).join("-"),NY=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function tT(t,e){{const n=t?.find(MY)??t?.find(PY),r=t?.find(DY)??t?.find(kY);if(n)return n;throw r?$V:BV}}const MY=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),PY=t=>t.includes(String(window.location.hostname)),kY=t=>t.startsWith("http://"),DY=t=>t.startsWith("https://"),nT=async t=>{K6(),await Fr.clearOAuthInflightData(),Ao.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",_o)},LY=async t=>{try{lt(t),Ay(t),Fr.setAuthConfig(t)}catch{return}if(await Fr.loadOAuthInFlight())try{const e=window.location.href,{loginWith:n,userPoolClientId:r}=t,{domain:s,redirectSignIn:o,responseType:a}=n.oauth,u=tT(o);await f8({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Mt(Ke.SignInWithRedirect)})}catch(e){await nT(e)}};Iy()&&$t[y6](LY);const UY={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},p8=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},KM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",FY=t=>{const e=new Uint8Array(t);zA().getRandomValues(e);let n="",r;for(const s of e)n+=KM.charAt(s%KM.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=zY(n),r)}}};function zY(t){const e=new Bl;return e.update(t),jY(Bc.convert(e.digestSync(),{urlSafe:!0}))}function jY(t){return t.replace(/=/g,"")}const BY=()=>TV(32),HY=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=Da("User cancelled OAuth flow.");await nT(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function g8(t){const e=$t.getConfig().Auth?.Cognito;lt(e),Ay(e),Fr.setAuthConfig(e),t?.options?.prompt||await r8();let n="COGNITO",r;return typeof t?.provider=="string"?n=UY[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),$Y({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 $Y=async({oauthConfig:t,provider:e,idpIdentifier:n,clientId:r,customState:s,preferPrivateSession:o,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:h,scopes:g}=t,{loginHint:m,lang:y,nonce:S,prompt:E}=a??{},C=BY(),w=u||p8,A=s?`${C}-${IV(s)}`:C,{value:T,method:R,toCodeChallenge:M}=FY(128),N=tT(t.redirectSignIn);Iy()&&Fr.storeOAuthInFlight(!0),Fr.storeOAuthState(A),Fr.storePKCE(T);const I=new URLSearchParams;I.append("redirect_uri",N),I.append("response_type",h),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",A),h==="code"&&(I.append("code_challenge",M()),I.append("code_challenge_method",R));const k=`https://${c}/oauth2/authorize?${I.toString()}`;HY(Fr);const{type:F,error:H,url:D}=await w(k,f,o)??{};try{if(F==="error")throw Da(String(H));if(F==="canceled")throw Da(String(F));F==="success"&&D&&await f8({currentUrl:D,clientId:r,domain:c,redirectUri:N,responseType:h,userAgentValue:Mt(Ke.SignInWithRedirect),preferPrivateSession:o})}catch(z){throw await nT(z),z}},qY=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await x6(t,{forceRefresh:!1});ud(s);const o=SY({endpointResolver:bt({endpointOverride:n})}),{UserAttributes:a}=await o({region:yt(r),userAgentValue:Mt(Ke.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return DV(a)},m8=()=>qY($t),WY=async t=>{await t.clearOAuthData(),$r.clearTokens(),await _6(),Ao.dispatch("auth",{event:"signedOut"},"Auth",_o)},VY=async(t,e=!1,n)=>{Ay(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=tT(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return p8(c)},GY=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await WY(e),s||o?.oauthSignIn)return VY(t,!1)},KY=t=>In($n,Hn("RevokeToken"),ar(),{...qn,...t}),YY=new sr("Auth");async function ZY(t){const e=$t.getConfig().Auth?.Cognito;lt(e),await XY(e);let n;try{Ay(e),n=!0}catch{n=!1}if(n){const r=new G6(tp);r.setAuthConfig(e);const{type:s}=await GY(e,r,$r)??{};if(s==="error")throw new Le({name:qV,message:"An error occurred when attempting to log out from OAuth provider."})}else $r.clearTokens(),await _6(),Ao.dispatch("auth",{event:"signedOut"},"Auth",_o)}async function XY(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await $r.getTokenStore().loadTokens();$6(s),QY(s.accessToken)&&await KY({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Mt(Ke.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{YY.debug("Client signOut error caught but will proceed with token removal")}}const QY=t=>!!t?.payload?.origin_jti,JY=t=>In($n,Hn("GetUserAttributeVerificationCode"),ar(),{...qn,...t}),eZ=async t=>{const{userAttributeKey:e,options:n}=t,r=$t.getConfig().Auth?.Cognito,s=n?.clientMetadata;lt(r);const{userPoolEndpoint:o,userPoolId:a}=r,{tokens:u}=await Oy({forceRefresh:!1});ud(u);const c=JY({endpointResolver:bt({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:yt(a),userAgentValue:Mt(Ke.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:s,AttributeName:e}),{DeliveryMedium:h,AttributeName:g,Destination:m}={...f};return{destination:m,deliveryMedium:h,attributeName:g}},tZ={identityId:"identityId"},nZ=new sr("DefaultIdentityIdStore");class v8{setAuthConfig(e){Wm(e.Cognito),this.authConfig=e,this._authKeys=rZ("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){Wm(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 nZ.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){Wm(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 rZ=(t,e)=>WA(tZ)(`com.amplify.${t}`,e),Gx=({endpointOverride:t})=>e=>t?{url:new Ga(t)}:mV(e);function y8(t){const e=mi(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 sZ({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?y8(t.idToken.toString()):{},o=await oZ(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function oZ(t,e){const n=e?.identityPoolId,r=zx(n),s=hV({endpointResolver:Gx({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Os(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 qg=new sr("CognitoCredentialsProvider"),YM=3e3*1e3;class b8{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){qg.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){qg.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{Wm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await sZ({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(GV(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 qg.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=zx(n.identityPoolId),s=fM({endpointResolver:Gx({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Os(a),new Le(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+YM;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 qg.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?y8(n.idToken.toString()):{},o=zx(e.identityPoolId),a=fM({endpointResolver:Gx({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Os(c),new Le(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+YM;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 iZ=new b8(new v8(tp)),S8={configure(t,e){const n=S6(t),r=new wV({sameSite:"lax"}),s=e?.ssr?r:tp,o=e?.ssr?new b8(new v8(r)):iZ;if(!n.Auth||e?.Auth){$t.configure(n,e);return}Gm.setAuthConfig(n.Auth),Gm.setKeyValueStorage(s),$t.configure(n,{...e,Auth:{tokenProvider:Gm,credentialsProvider:o}})},getConfig(){return $t.getConfig()}},Dy=()=>{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}},aZ=()=>{const t=Dy(),{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}},Kx=aZ(),Ly=()=>Kx!==null,E8=()=>{if(!Kx){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}=Kx;S8.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}}})};var lZ={};const Zm=Object.create(null),_f=t=>lZ||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Zm:globalThis),ma=new Proxy(Zm,{get(t,e){return _f()[e]??Zm[e]},has(t,e){return e in _f()||e in Zm},set(t,e,n){const r=_f(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;const n=_f(!0);return delete n[e],!0},ownKeys(){const t=_f(!0);return Object.keys(t)}});ma.NODE_ENV;var Xm=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const uZ=47;function C8(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===uZ;)e--;return e===t.length?t:t.slice(0,e)}function cZ(t){try{return(C8(new URL(t).pathname)||"/")!=="/"}catch{throw new Xm(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function dZ(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Xm(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof Xm?e:new Xm(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function ZM(t,e="/api/auth"){if(dZ(t),cZ(t))return t;const n=C8(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function fZ(t,e,n,r,s){{const o=ma.BETTER_AUTH_URL||ma.NEXT_PUBLIC_BETTER_AUTH_URL||ma.PUBLIC_BETTER_AUTH_URL||ma.NUXT_PUBLIC_BETTER_AUTH_URL||ma.NUXT_PUBLIC_AUTH_URL||(ma.BASE_URL!=="/"?ma.BASE_URL:void 0);if(o)return ZM(o,e)}if(typeof window<"u"&&window.location)return ZM(window.location.origin,e)}const hZ={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*:/},pZ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,XM={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},gZ=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function mZ(t){return t instanceof Date&&!isNaN(t.getTime())}function vZ(t){const e=gZ.exec(t);if(!e)return null;const[,n,r,s,o,a,u,c,f,h,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(h,10)*60+parseInt(g,10))*(f==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+y)}return mZ(m)?m:null}function yZ(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 XM)return XM[u];if(!pZ.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(hZ).some(([c,f])=>{const h=f.test(a);return h&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),h})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,h)=>{if(f==="__proto__"||f==="constructor"&&h&&typeof h=="object"&&"prototype"in h){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(o&&typeof h=="string"){const g=vZ(h);if(g)return g}return s?s(f,h):h})}catch(c){if(n)throw c;return t}}function bZ(t,e={strict:!0}){return yZ(t,e)}const SZ=["javascript:","data:","vbscript:"];function EZ(t){let e;try{e=new URL(t)}catch{return!0}return!SZ.includes(e.protocol)}const CZ={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&EZ(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Gs=[],va=0;const Qm=4,wZ=globalThis.nanostoresGlobal||={epoch:0};let xZ=()=>{for(va=0;va<Gs.length;va+=Qm)Gs[va](Gs[va+1].value,Gs[va+2],Gs[va+3]);Gs.length=0};const QM=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=va+Qm;o<Gs.length;)Gs[o]===r?Gs.splice(o,Qm):o+=Qm;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){wZ.epoch++;let o=!Gs.length&&!0;for(let a of e)Gs.push(a,n,r,s);o&&xZ()},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},_Z=2,AZ=5,Wg=6,Vg=10;let w8=(t,e,n,r)=>(t.events=t.events||{},t.events[n+Vg]||(t.events[n+Vg]=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+Vg](),delete t.events[n+Vg])}),TZ=(t,e)=>w8(t,e,_Z,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 RZ=1e3;let IZ=(t,e)=>w8(t,r=>{let s=e(r);s&&t.events[Wg].push(s)},AZ,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[Wg]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[Wg])a();t.events[Wg]=[]}},RZ)},()=>{t.listen=s,t.off=o}});function OZ(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 JM(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function wv(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(!wv(t[n],e[n]))return!1;return!0}if(JM(t)&&JM(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)||!wv(t[s],e[s]))return!1;return!0}return!1}function NZ(t,e){return TZ(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const K1=Symbol.for("better-auth:broadcast-channel"),MZ=()=>Math.floor(Date.now()/1e3);var PZ=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:MZ()}))}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 Y1(t="better-auth.message"){return globalThis[K1]||(globalThis[K1]=new PZ(t)),globalThis[K1]}const Z1=Symbol.for("better-auth:focus-manager");var kZ=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 eP(){return globalThis[Z1]||(globalThis[Z1]=new kZ),globalThis[Z1]}const X1=Symbol.for("better-auth:online-manager");var DZ=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 Q1(){return globalThis[X1]||(globalThis[X1]=new DZ),globalThis[X1]}const J1=()=>Math.floor(Date.now()/1e3),LZ=5;function UZ(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||Q1().isOnline,h=T=>{if(f()){if(T?.event==="storage"){e();return}if(T?.event==="poll"){c.lastSessionRequest=J1(),e();return}if(T?.event==="visibilitychange"){if(J1()-c.lastSessionRequest<LZ)return;c.lastSessionRequest=J1(),e();return}e()}},g=T=>{Y1().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{n()&&h({event:"poll"})},o*1e3))},y=()=>{c.unsubscribeBroadcast=Y1().subscribe(()=>{h({event:"storage"})})},S=()=>{a&&(c.unsubscribeFocus=eP().subscribe(()=>{h({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=Q1().subscribe(T=>{T&&h({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{e()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,m(),y(),S(),E(),C(),c.cleanupBroadcastSetup=Y1().setup(),c.cleanupFocusSetup=eP().setup(),c.cleanupOnlineSetup=Q1().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:h,broadcastSessionUpdate:g}}const FZ=()=>typeof window>"u";function tP(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function zZ(t){return!t||t.session===null&&t.user===null?null:t}function jZ(t,e){return wv(t.data,e.data)&&t.error===e.error&&t.isPending===e.isPending&&t.isRefetching===e.isRefetching&&t.refetch===e.refetch}function BZ(t,e){const n=QM(!1);let r;const s=f=>u(f),o=QM({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});NZ(o,jZ);const a=f=>{if(r!==f)return;const h=o.get();r=void 0,!(!h.isPending&&!h.isRefetching)&&o.set({...h,isPending:!1,isRefetching:!1,refetch:s})},u=async f=>{r?.abort();const h=new AbortController;r=h;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:h.signal});if(h.signal.aborted){a(h);return}let{data:y,error:S}=tP(m);if(y?.needsRefresh)try{const A=await t("/get-session",{method:"POST",signal:h.signal});if(h.signal.aborted){a(h);return}({data:y,error:S}=tP(A))}catch{if(h.signal.aborted){a(h);return}}if(S){const A=o.get(),T=S?.status===401;o.set({data:T?null:A.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=zZ(y),C=o.get(),w=C.data!=null&&E!=null&&wv(C.data,E)?C.data:E;o.set({data:w,error:null,isPending:!1,isRefetching:!1,refetch:s})}catch(m){if(h.signal.aborted){a(h);return}const y=o.get();o.set({data:y.data,error:m,isPending:!1,isRefetching:!1,refetch:s})}};let c=()=>{};return IZ(o,()=>{let f;FZ()||(f=setTimeout(()=>{u()},0));const h=UZ({fetchSession:u,shouldPollSession:()=>o.get().data!=null,sessionSignal:n,options:e});return h.init(),c=h.broadcastSessionUpdate,()=>{f&&clearTimeout(f);const g=r;g?.abort(),g&&a(g),h.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:f=>c(f)}}function eS(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 Yx(t,e,n=".",r){if(!eS(e))return Yx(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]]:eS(a)&&eS(s[o])?s[o]=Yx(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function HZ(t){return(...e)=>e.reduce((n,r)=>Yx(n,r,"",t),{})}const $Z=HZ();var qZ=Object.defineProperty,WZ=Object.defineProperties,VZ=Object.getOwnPropertyDescriptors,nP=Object.getOwnPropertySymbols,GZ=Object.prototype.hasOwnProperty,KZ=Object.prototype.propertyIsEnumerable,rP=(t,e,n)=>e in t?qZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ws=(t,e)=>{for(var n in e||(e={}))GZ.call(e,n)&&rP(t,n,e[n]);if(nP)for(var n of nP(e))KZ.call(e,n)&&rP(t,n,e[n]);return t},bo=(t,e)=>WZ(t,VZ(e)),YZ=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)}},ZZ=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 h of e?.plugins||[]){if(h.init){const g=await((n=h.init)==null?void 0:n.call(h,t.toString(),e));c=g.options||c,t=g.url}f.onRequest.push((r=h.hooks)==null?void 0:r.onRequest),f.onResponse.push((s=h.hooks)==null?void 0:s.onResponse),f.onSuccess.push((o=h.hooks)==null?void 0:o.onSuccess),f.onError.push((a=h.hooks)==null?void 0:a.onError),f.onRetry.push((u=h.hooks)==null?void 0:u.onRetry)}return{url:t,options:c,hooks:f}},sP=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}},XZ=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 QZ(t){if(typeof t=="number")return new sP({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new sP(t);case"exponential":return new XZ(t);default:throw new Error("Invalid retry strategy")}}var JZ=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},eX=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function tX(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 eX.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function nX(t){try{return JSON.parse(t),!0}catch{return!1}}function x8(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 oP(t){try{return JSON.parse(t)}catch{return t}}function iP(t){return typeof t=="function"}function rX(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&iP(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&iP(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function _8(...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 sX(t){const e=new Headers(_8(t?.headers,await JZ(t)));if(!e.has("content-type")){const n=oX(t?.body);n&&e.set("content-type",n)}return e}function oX(t){return x8(t)?"application/json":null}function iX(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function aX(t,e){const{body:n}=t;return n?!x8(n)||typeof n=="string"?n:iX(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function lX(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 T8.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function uX(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var cX=class A8 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,A8.prototype)}};async function Yf(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new cX(n.issues);return n.value}var T8=["get","post","put","patch","delete"],dX=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 h=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 Yf(f.headers,m),S={};for(const[E,C]of Object.entries(y))S[E.toLowerCase()]=C;h=S}let g=bo(Ws({},n),{method:f.method,output:f.output,headers:h});return n?.disableValidation||(g=bo(Ws({},g),{body:f.input?await Yf(f.input,n?.body):n?.body,params:f.params?await Yf(f.params,n?.params):n?.params,query:f.query?await Yf(f.query,n?.query):n?.query})),{url:e,options:g}}}return{url:e,options:n}}}),fX=t=>{async function e(n,r){const s=bo(Ws(Ws({},t),r),{headers:_8(t?.headers,r?.headers),plugins:[...t?.plugins||[],dX(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await Zx(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 Zx(n,s)}return e},hX=t=>t==="."||t==="..";function pX(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(hX(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function gX(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];T8.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=>pX(m,f)).join("/"),a=a.replace(/^\/+/,"");let h=c.toString();return h=h.length>0?`?${h}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${h}`,o):`${o}${a}${h}`}var Zx=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:h,url:g,options:m}=await ZZ(t,e),y=rX(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=gX(g,m),w=await sX(m),A=aX(m,w),T=lX(g,m),R=bo(Ws({},m),{url:C,headers:w,body:A,method:T,signal:E});for(const q of h.onRequest)if(q){const V=await q(R);typeof V=="object"&&V!==null&&Object.assign(R,V)}("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}=uX(m,S);let N=await y(R.url,R);M();const I={response:N,request:R};for(const q of h.onResponse)if(q){const V=await q(bo(Ws({},I),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?N.clone():N}));V instanceof Response?N=V:typeof V=="object"&&V!==null&&(N=V.response)}if(N.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const V=tX(N),ee={data:null,response:N,request:R};if(V==="json"||V==="text"){const $=await N.text(),te=(o=R.jsonParser)!=null?o:oP;ee.data=await te($)}else ee.data=await N[V]();R?.output&&R.output&&!R.disableValidation&&(ee.data=await Yf(R.output,ee.data));for(const $ of h.onSuccess)$&&await $(bo(Ws({},ee),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?N.clone():N}));return e?.throw?ee.data:{data:ee.data,error:null}}const k=(u=e?.jsonParser)!=null?u:oP,F=await N.text(),H=nX(F),D=H?await k(F):null,z={response:N,responseText:F,request:R,error:bo(Ws({},D),{status:N.status,statusText:N.statusText})};for(const q of h.onError)q&&await q(bo(Ws({},z),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?N.clone():N}));if(e?.retry){const q=QZ(e.retry),V=(f=e.retryAttempt)!=null?f:0;if(await q.shouldAttemptRetry(V,N)){for(const $ of h.onRetry)$&&await $(I);const ee=q.getDelay(V);return await new Promise($=>setTimeout($,ee)),await Zx(t,bo(Ws({},e),{retryAttempt:V+1}))}}if(e?.throw)throw new YZ(N.status,N.statusText,H?D:F);return{data:null,error:bo(Ws({},D),{status:N.status,statusText:N.statusText})}},vl={};const mX=t=>{if(typeof process>"u")return;const e="/api/auth";if(vl.NEXT_PUBLIC_AUTH_URL)return vl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(vl.NEXTAUTH_URL)try{return vl.NEXTAUTH_URL}catch{}if(vl.VERCEL_URL)try{const n=vl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${vl.VERCEL_URL}`).origin}${e}`}catch{}}},vX=(t,e)=>{const n="credentials"in Request.prototype,r=fZ(t?.baseURL,t?.basePath)??mX()??"/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,...h}={},g=fX({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?bZ(M,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[o,...h.plugins||[],CZ,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=BZ(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},A={"/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(A,M.pathMethods),M.atomListeners&&T.push(...M.atomListeners);const R={notify:M=>{w[M].set(!w[M].get())},listen:(M,N)=>{w[M].subscribe(N)},atoms:w};for(const M of E)M.getActions&&(C=$Z(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:A,atomListeners:T,$fetch:g,$store:R}};function yX(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function bX(t){return t.charAt(0).toUpperCase()+t.slice(1)}const SX=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),EX=/['\u2019]/g;function CX(t){return t.replace(EX,"").match(SX)??[]}function wX(t){return CX(t).map(e=>e.toLowerCase()).join("-")}function xX(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 _X(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 h=t;for(const g of f)if(h&&typeof h=="object"&&g in h)h=h[g];else{h=void 0;break}return typeof h=="function"||yX(h)?h:o(f)},apply:async(u,c,f)=>{const h="/"+a.map(wX).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=xX(h,n,g);return await e(h,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(A){if(await C?.onSuccess?.(A),!s||C.disableSignal)return;const T=s.filter(M=>M.matcher(h));if(!T.length)return;const R=new Set;for(const M of T){const N=r[M.signal];if(!N)return;if(R.has(M.signal))continue;R.add(M.signal);const I=N.get();setTimeout(()=>{N.set(!I)},10),M.callback?.(h)}}})}})}return o()}var tS={exports:{}},Ve={};var aP;function AX(){if(aP)return Ve;aP=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"),h=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),m=Symbol.iterator;function y(L){return L===null||typeof L!="object"?null:(L=m&&L[m]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function w(L,K,Y){this.props=L,this.context=K,this.refs=C,this.updater=Y||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,K){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,K,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=w.prototype;function T(L,K,Y){this.props=L,this.context=K,this.refs=C,this.updater=Y||S}var R=T.prototype=new A;R.constructor=T,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function N(){}var I={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function F(L,K,Y){var J=Y.ref;return{$$typeof:t,type:L,key:K,ref:J!==void 0?J:null,props:Y}}function H(L,K){return F(L.type,K,L.props)}function D(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function z(L){var K={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(Y){return K[Y]})}var q=/\/+/g;function V(L,K){return typeof L=="object"&&L!==null&&L.key!=null?z(""+L.key):K.toString(36)}function ee(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(N,N):(L.status="pending",L.then(function(K){L.status==="pending"&&(L.status="fulfilled",L.value=K)},function(K){L.status==="pending"&&(L.status="rejected",L.reason=K)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function $(L,K,Y,J,oe){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var ue=!1;if(L===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(L.$$typeof){case t:case e:ue=!0;break;case h:return ue=L._init,$(ue(L._payload),K,Y,J,oe)}}if(ue)return oe=oe(L),ue=J===""?"."+V(L,0):J,M(oe)?(Y="",ue!=null&&(Y=ue.replace(q,"$&/")+"/"),$(oe,K,Y,"",function(Xe){return Xe})):oe!=null&&(D(oe)&&(oe=H(oe,Y+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(q,"$&/")+"/")+ue)),K.push(oe)),1;ue=0;var ve=J===""?".":J+":";if(M(L))for(var xe=0;xe<L.length;xe++)J=L[xe],he=ve+V(J,xe),ue+=$(J,K,Y,he,oe);else if(xe=y(L),typeof xe=="function")for(L=xe.call(L),xe=0;!(J=L.next()).done;)J=J.value,he=ve+V(J,xe++),ue+=$(J,K,Y,he,oe);else if(he==="object"){if(typeof L.then=="function")return $(ee(L),K,Y,J,oe);throw K=String(L),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return ue}function te(L,K,Y){if(L==null)return L;var J=[],oe=0;return $(L,J,"","",function(he){return K.call(Y,he,oe++)}),J}function fe(L){if(L._status===-1){var K=L._result;K=K(),K.then(function(Y){(L._status===0||L._status===-1)&&(L._status=1,L._result=Y)},function(Y){(L._status===0||L._status===-1)&&(L._status=2,L._result=Y)}),L._status===-1&&(L._status=0,L._result=K)}if(L._status===1)return L._result.default;throw L._result}var de=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},Ae={map:te,forEach:function(L,K,Y){te(L,function(){K.apply(this,arguments)},Y)},count:function(L){var K=0;return te(L,function(){K++}),K},toArray:function(L){return te(L,function(K){return K})||[]},only:function(L){if(!D(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ve.Activity=g,Ve.Children=Ae,Ve.Component=w,Ve.Fragment=n,Ve.Profiler=s,Ve.PureComponent=T,Ve.StrictMode=r,Ve.Suspense=c,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(L){return I.H.useMemoCache(L)}},Ve.cache=function(L){return function(){return L.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(L,K,Y){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var J=E({},L.props),oe=L.key;if(K!=null)for(he in K.key!==void 0&&(oe=""+K.key),K)!k.call(K,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&K.ref===void 0||(J[he]=K[he]);var he=arguments.length-2;if(he===1)J.children=Y;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];J.children=ue}return F(L.type,oe,J)},Ve.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ve.createElement=function(L,K,Y){var J,oe={},he=null;if(K!=null)for(J in K.key!==void 0&&(he=""+K.key),K)k.call(K,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(oe[J]=K[J]);var ue=arguments.length-2;if(ue===1)oe.children=Y;else if(1<ue){for(var ve=Array(ue),xe=0;xe<ue;xe++)ve[xe]=arguments[xe+2];oe.children=ve}if(L&&L.defaultProps)for(J in ue=L.defaultProps,ue)oe[J]===void 0&&(oe[J]=ue[J]);return F(L,he,oe)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(L){return{$$typeof:u,render:L}},Ve.isValidElement=D,Ve.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:fe}},Ve.memo=function(L,K){return{$$typeof:f,type:L,compare:K===void 0?null:K}},Ve.startTransition=function(L){var K=I.T,Y={};I.T=Y;try{var J=L(),oe=I.S;oe!==null&&oe(Y,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(N,de)}catch(he){de(he)}finally{K!==null&&Y.types!==null&&(K.types=Y.types),I.T=K}},Ve.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ve.use=function(L){return I.H.use(L)},Ve.useActionState=function(L,K,Y){return I.H.useActionState(L,K,Y)},Ve.useCallback=function(L,K){return I.H.useCallback(L,K)},Ve.useContext=function(L){return I.H.useContext(L)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(L,K){return I.H.useDeferredValue(L,K)},Ve.useEffect=function(L,K){return I.H.useEffect(L,K)},Ve.useEffectEvent=function(L){return I.H.useEffectEvent(L)},Ve.useId=function(){return I.H.useId()},Ve.useImperativeHandle=function(L,K,Y){return I.H.useImperativeHandle(L,K,Y)},Ve.useInsertionEffect=function(L,K){return I.H.useInsertionEffect(L,K)},Ve.useLayoutEffect=function(L,K){return I.H.useLayoutEffect(L,K)},Ve.useMemo=function(L,K){return I.H.useMemo(L,K)},Ve.useOptimistic=function(L,K){return I.H.useOptimistic(L,K)},Ve.useReducer=function(L,K,Y){return I.H.useReducer(L,K,Y)},Ve.useRef=function(L){return I.H.useRef(L)},Ve.useState=function(L){return I.H.useState(L)},Ve.useSyncExternalStore=function(L,K,Y){return I.H.useSyncExternalStore(L,K,Y)},Ve.useTransition=function(){return I.H.useTransition()},Ve.version="19.2.7",Ve}var lP;function ip(){return lP||(lP=1,tS.exports=AX()),tS.exports}var _=ip();const j=Va(_),R8=g6({__proto__:null,default:j},[_]);function TX(t,e={}){const n=_.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=_.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?OZ(t,r,c):t.listen(c)},s),a=()=>n.current;return _.useSyncExternalStore(o,a,a)}function RX(t){return`use${bX(t)}`}function IX(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=vX(t),u={};for(const[c,f]of Object.entries(r))u[RX(c)]=()=>TX(f);return _X({...n,...u,$fetch:s,$store:o},s,e,r,a)}const OX=10,Pc=[],NX=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function MX(t){const e=typeof t=="string"?t:t instanceof URL?t.href:t.url;try{return new URL(e,window.location.origin).pathname}catch{return e.split(/[?#]/)[0]}}function PX(t,e){return e?.method?e.method.toUpperCase():typeof t!="string"&&!(t instanceof URL)&&t.method?t.method.toUpperCase():"GET"}function kX(t){for(const e of NX){const n=t.headers.get(e);if(n)return n}}function DX(t){Pc.push(t),Pc.length>OX&&Pc.shift()}function uP(t){const{input:e,init:n,response:r,durationMs:s}=t;DX({method:PX(e,n),path:MX(e),status:r?.status??0,durationMs:Math.round(s),correlationId:r?kX(r):void 0,timestamp:new Date().toISOString()})}function LX(){return Pc.slice()}function UX(){for(let t=Pc.length-1;t>=0;t--){const e=Pc[t];if(e.status===0||e.status>=400)return e}}class rT extends Error{constructor(e){super(e instanceof Error&&e.message?e.message:"The request could not be completed.",{cause:e}),this.name="NetworkError"}}const FX=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",I8=async(t,e)=>{const n=performance.now();try{const r=await fetch(t,e);return uP({input:t,init:e,response:r,durationMs:performance.now()-n}),r}catch(r){throw FX(r)?r:(uP({input:t,init:e,durationMs:performance.now()-n}),new rT(r))}},Uy=()=>Dy().betterAuthEnabled,zX="EMAIL_PASSWORD_SIGN_UP_DISABLED",jX=t=>typeof t=="object"&&t!==null&&t.code===zX,xh=IX(),BX=60,HX=30,Xx="remit.better-auth.token",O8=()=>{try{return globalThis.sessionStorage??null}catch{return null}},$X=()=>{const t=O8()?.getItem(Xx);if(!t)return null;try{const e=JSON.parse(t);if(e&&typeof e=="object"&&typeof e.value=="string"&&typeof e.expiresAt=="number")return{value:e.value,expiresAt:e.expiresAt}}catch{}return null},N8=t=>{const e=O8();if(e)try{if(!t){e.removeItem(Xx);return}e.setItem(Xx,JSON.stringify(t))}catch{}};let _l=null,xv=0;const qX=()=>_l||(_l=$X(),_l),Nl=()=>Math.floor(Date.now()/1e3),WX=t=>{const[,e]=t.split(".");if(!e)return Nl();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:Nl()}catch{return Nl()}};class _v extends Error{status;constructor(e,n){super(e),this.name="AuthTokenError",this.status=n}}const VX=async()=>{const t=await I8("/api/auth/token",{credentials:"include"});if(!t.ok)throw new _v(`Could not mint a session token: ${t.status} ${t.statusText}`,t.status);const e=await t.json();if(e&&typeof e=="object"&&"token"in e&&typeof e.token=="string")return e.token;throw new _v("The token endpoint returned no token")};let Af=null;const GX=()=>Af||(Af=VX().then(t=>(_l={value:t,expiresAt:WX(t)},N8(_l),xv=0,t)).finally(()=>{Af=null}),Af),KX=t=>t.expiresAt-BX>Nl(),cP=t=>t.expiresAt>Nl(),YX=t=>t instanceof rT?!0:t instanceof _v?t.status===408||t.status===429||(t.status??0)>=500:!1,ZX=t=>t instanceof _v&&(t.status===401||t.status===403),XX=async()=>{const t=qX();if(t&&KX(t)||t&&cP(t)&&Nl()<xv)return t.value;try{return await GX()}catch(e){if(ZX(e))throw sT(),e;if(t&&cP(t)&&YX(e))return xv=Nl()+HX,t.value;throw e}},sT=()=>{xv=0,N8(null),_l=null};function M8(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=M8(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function P8(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=M8(t))&&(r&&(r+=" "),r+=e);return r}var nS={exports:{}},cr={};var dP;function QX(){if(dP)return cr;dP=1;var t=ip();function e(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}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,h){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:h}}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 cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cr.createPortal=function(c,f){var h=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,h)},cr.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},cr.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))},cr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},cr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,g=u(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:m,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:g,integrity:m,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},cr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,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)},cr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,g=u(h,f.crossOrigin);r.d.L(c,h,{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})}},cr.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},cr.requestFormReset=function(c){r.d.r(c)},cr.unstable_batchedUpdates=function(c,f){return c(f)},cr.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},cr.useFormStatus=function(){return a.H.useHostTransitionStatus()},cr.version="19.2.7",cr}var fP;function k8(){if(fP)return nS.exports;fP=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(),nS.exports=QX(),nS.exports}var D8=k8();const nRe=Va(D8);var rS={exports:{}},sS={};var hP;function JX(){if(hP)return sS;hP=1;var t=ip();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 h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return sS.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,sS}var pP;function eQ(){return pP||(pP=1,rS.exports=JX()),rS.exports}const tQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L8=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var nQ={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 rQ=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>_.createElement("svg",{ref:c,...nQ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:L8("lucide",s),...u},[...a.map(([f,h])=>_.createElement(f,h)),...Array.isArray(o)?o:[o]]));const vn=(t,e)=>{const n=_.forwardRef(({className:r,...s},o)=>_.createElement(rQ,{ref:o,iconNode:e,className:L8(`lucide-${tQ(t)}`,r),...s}));return n.displayName=`${t}`,n};const sQ=vn("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);const oQ=vn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Qx=vn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const iQ=vn("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 aQ=vn("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const lQ=vn("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const uQ=vn("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 U8=vn("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 cQ=vn("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 Jx=vn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const dQ=vn("Mails",[["rect",{width:"16",height:"13",x:"6",y:"4",rx:"2",key:"1drq3f"}],["path",{d:"m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7",key:"xn252p"}],["path",{d:"M2 8v11c0 1.1.9 2 2 2h14",key:"n13cji"}]]);const oT=vn("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 fQ=vn("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 hQ=vn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const pQ=vn("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const gP=vn("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const gQ=vn("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);const mQ=vn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const F8=vn("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 vQ=vn("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 yQ=vn("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 La=vn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),iT="-",bQ=t=>{const e=EQ(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(iT);return u[0]===""&&u.length!==1&&u.shift(),z8(u,e)||SQ(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},z8=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?z8(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(iT);return e.validators.find(({validator:a})=>a(o))?.classGroupId},mP=/^\[(.+)\]$/,SQ=t=>{if(mP.test(t)){const e=mP.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},EQ=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return wQ(Object.entries(t.classGroups),n).forEach(([o,a])=>{e_(a,r,o,e)}),r},e_=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:vP(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(CQ(s)){e_(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{e_(a,vP(e,o),n,r)})})},vP=(t,e)=>{let n=t;return e.split(iT).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},CQ=t=>t.isThemeGetter,wQ=(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,xQ=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)}}},j8="!",_Q=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],o=e.length,a=u=>{const c=[];let f=0,h=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(h,C)),h=C+o;continue}if(w==="/"){g=C;continue}}w==="["?f++:w==="]"&&f--}const m=c.length===0?u:u.substring(h),y=m.startsWith(j8),S=y?m.substring(1):m,E=g&&g>h?g-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:E}};return n?u=>n({className:u,parseClassName:a}):a},AQ=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},TQ=t=>({cache:xQ(t.cacheSize),parseClassName:_Q(t),...bQ(t)}),RQ=/\s+/,IQ=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(RQ);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:h,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=AQ(h).join(":"),w=g?C+j8:C,A=w+E;if(o.includes(A))continue;o.push(A);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 OQ(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=B8(e))&&(r&&(r+=" "),r+=n);return r}const B8=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=B8(t[r]))&&(n&&(n+=" "),n+=e);return n};function NQ(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((h,g)=>g(h),t());return n=TQ(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 h=IQ(c,n);return s(c,h),h}return function(){return o(OQ.apply(null,arguments))}}const Zt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},H8=/^\[(?:([a-z-]+):)?(.+)\]$/i,MQ=/^\d+\/\d+$/,PQ=new Set(["px","full","screen"]),kQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DQ=/\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$/,LQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=t=>kc(t)||PQ.has(t)||MQ.test(t),da=t=>gd(t,"length",VQ),kc=t=>!!t&&!Number.isNaN(Number(t)),oS=t=>gd(t,"number",kc),Tf=t=>!!t&&Number.isInteger(Number(t)),zQ=t=>t.endsWith("%")&&kc(t.slice(0,-1)),et=t=>H8.test(t),fa=t=>kQ.test(t),jQ=new Set(["length","size","percentage"]),BQ=t=>gd(t,jQ,$8),HQ=t=>gd(t,"position",$8),$Q=new Set(["image","url"]),qQ=t=>gd(t,$Q,KQ),WQ=t=>gd(t,"",GQ),Rf=()=>!0,gd=(t,e,n)=>{const r=H8.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},VQ=t=>DQ.test(t)&&!LQ.test(t),$8=()=>!1,GQ=t=>UQ.test(t),KQ=t=>FQ.test(t),YQ=()=>{const t=Zt("colors"),e=Zt("spacing"),n=Zt("blur"),r=Zt("brightness"),s=Zt("borderColor"),o=Zt("borderRadius"),a=Zt("borderSpacing"),u=Zt("borderWidth"),c=Zt("contrast"),f=Zt("grayscale"),h=Zt("hueRotate"),g=Zt("invert"),m=Zt("gap"),y=Zt("gradientColorStops"),S=Zt("gradientColorStopPositions"),E=Zt("inset"),C=Zt("margin"),w=Zt("opacity"),A=Zt("padding"),T=Zt("saturate"),R=Zt("scale"),M=Zt("sepia"),N=Zt("skew"),I=Zt("space"),k=Zt("translate"),F=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",et,e],z=()=>[et,e],q=()=>["",ei,da],V=()=>["auto",kc,et],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],te=()=>["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"],L=()=>[kc,et];return{cacheSize:500,separator:":",theme:{colors:[Rf],spacing:[ei,da],blur:["none","",fa,et],brightness:L(),borderColor:[t],borderRadius:["none","","full",fa,et],borderSpacing:z(),borderWidth:q(),contrast:L(),grayscale:de(),hueRotate:L(),invert:de(),gap:z(),gradientColorStops:[t],gradientColorStopPositions:[zQ,da],inset:D(),margin:D(),opacity:L(),padding:z(),saturate:L(),scale:L(),sepia:de(),skew:L(),space:z(),translate:z()},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:[...ee(),et]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],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",Tf,et]}],basis:[{basis:D()}],"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",Tf,et]}],"grid-cols":[{"grid-cols":[Rf]}],"col-start-end":[{col:["auto",{span:["full",Tf,et]},et]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[Rf]}],"row-start-end":[{row:["auto",{span:[Tf,et]},et]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"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:[A]}],px:[{px:[A]}],py:[{py:[A]}],ps:[{ps:[A]}],pe:[{pe:[A]}],pt:[{pt:[A]}],pr:[{pr:[A]}],pb:[{pb:[A]}],pl:[{pl:[A]}],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",oS]}],"font-family":[{font:[Rf]}],"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",kc,oS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ei,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",ei,da]}],"underline-offset":[{"underline-offset":["auto",ei,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:z()}],"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:[...ee(),HQ]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BQ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qQ]}],"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":[ei,et]}],"outline-w":[{outline:[ei,da]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ei,da]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",fa,WQ]}],"shadow-color":[{shadow:[Rf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],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":[h]}],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":[h]}],"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:L()}],ease:[{ease:["linear","in","out","in-out",et]}],delay:[{delay:L()}],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:[Tf,et]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"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":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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:[ei,da,oS]}],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"]}}},q8=NQ(YQ);function Rt(...t){return q8(P8(t))}const ZQ=1024,XQ=1280;function QQ(t,e=ZQ,n=XQ){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function JQ(t){const e=_.useRef(null),[n,r]=_.useState(t??null);return _.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 eJ=[{id:"all",label:"All"},{id:"personal",label:"Personal"},{id:"uncategorized",label:"Unclassified"},{id:"newsletter",label:"Newsletters"},{id:"marketing",label:"Marketing"},{id:"automated",label:"Automated"},{id:"transactional",label:"Transactional"},{id:"social",label:"Social"}],tJ={uncategorized:"neutral",personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function nJ({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=_.useRef(null),c=_.useCallback(m=>{m.key==="Escape"&&(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(_.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),_.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",h=a==="right",g=f||h;return O.jsxs("div",{className:Rt("fixed inset-0 z-50 flex",f?"items-stretch justify-start":h?"items-stretch justify-end":"items-center justify-center px-4"),role:"presentation",onClick:e,children:[O.jsx("div",{className:Rt("absolute inset-0",!g&&"bg-canvas/80")}),O.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:Rt("relative z-10 overflow-hidden border-line bg-surface shadow-xl",f?"h-full w-72 max-w-[85vw] border-r":h?"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:[O.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const Fy=_.createContext(null);Fy.displayName="PanelGroupContext";const mn={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"},aT=10,Ml=_.useLayoutEffect,yP=R8.useId,rJ=typeof yP=="function"?yP:()=>null;let sJ=0;function lT(t=null){const e=rJ(),n=_.useRef(t||e||null);return n.current===null&&(n.current=""+sJ++),t??n.current}function W8({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:a,maxSize:u,minSize:c,onCollapse:f,onExpand:h,onResize:g,order:m,style:y,tagName:S="div",...E}){const C=_.useContext(Fy);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:A,getPanelSize:T,getPanelStyle:R,groupId:M,isPanelCollapsed:N,reevaluatePanelConstraints:I,registerPanel:k,resizePanel:F,unregisterPanel:H}=C,D=lT(a),z=_.useRef({callbacks:{onCollapse:f,onExpand:h,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:c},id:D,idIsFromProps:a!==void 0,order:m});_.useRef({didLogMissingDefaultSizeWarning:!1}),Ml(()=>{const{callbacks:V,constraints:ee}=z.current,$={...ee};z.current.id=D,z.current.idIsFromProps=a!==void 0,z.current.order=m,V.onCollapse=f,V.onExpand=h,V.onResize=g,ee.collapsedSize=n,ee.collapsible=r,ee.defaultSize=s,ee.maxSize=u,ee.minSize=c,($.collapsedSize!==ee.collapsedSize||$.collapsible!==ee.collapsible||$.maxSize!==ee.maxSize||$.minSize!==ee.minSize)&&I(z.current,$)}),Ml(()=>{const V=z.current;return k(V),()=>{H(V)}},[m,D,k,H]),_.useImperativeHandle(o,()=>({collapse:()=>{w(z.current)},expand:V=>{A(z.current,V)},getId(){return D},getSize(){return T(z.current)},isCollapsed(){return N(z.current)},isExpanded(){return!N(z.current)},resize:V=>{F(z.current,V)}}),[w,A,T,N,D,F]);const q=R(z.current,s);return _.createElement(S,{...E,children:t,className:e,id:D,style:{...q,...y},[mn.groupId]:M,[mn.panel]:"",[mn.panelCollapsible]:r||void 0,[mn.panelId]:D,[mn.panelSize]:parseFloat(""+q.flexGrow).toFixed(1)})}const V8=_.forwardRef((t,e)=>_.createElement(W8,{...t,forwardedRef:e}));W8.displayName="Panel";V8.displayName="forwardRef(Panel)";let t_=null,Jm=-1,Ca=null;function oJ(t,e){if(e){const n=(e&X8)!==0,r=(e&Q8)!==0,s=(e&J8)!==0,o=(e&e9)!==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 iJ(){Ca!==null&&(document.head.removeChild(Ca),t_=null,Ca=null,Jm=-1)}function iS(t,e){var n,r;const s=oJ(t,e);if(t_!==s){if(t_=s,Ca===null&&(Ca=document.createElement("style"),document.head.appendChild(Ca)),Jm>=0){var o;(o=Ca.sheet)===null||o===void 0||o.removeRule(Jm)}Jm=(n=(r=Ca.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function G8(t){return t.type==="keydown"}function K8(t){return t.type.startsWith("pointer")}function Y8(t){return t.type.startsWith("mouse")}function zy(t){if(K8(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Y8(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function aJ(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function lJ(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 uJ(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:EP(t),b:EP(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:SP(bP(n.a)),b:SP(bP(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 cJ=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function dJ(t){var e;const n=getComputedStyle((e=Z8(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function fJ(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||dJ(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"||cJ.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function bP(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),fJ(n))return n}return null}function SP(t){return t&&Number(getComputedStyle(t).zIndex)||0}function EP(t){const e=[];for(;t;)e.push(t),t=Z8(t);return e}function Z8(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const X8=1,Q8=2,J8=4,e9=8,hJ=aJ()==="coarse";let Ys=[],Dc=!1,wl=new Map,jy=new Map;const _h=new Set;function pJ(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=wl.get(a))!==null&&o!==void 0?o:0;return wl.set(a,c+1),_h.add(u),Av(),function(){var h;jy.delete(t),_h.delete(u);const g=(h=wl.get(a))!==null&&h!==void 0?h:1;if(wl.set(a,g-1),Av(),g===1&&wl.delete(a),Ys.includes(u)){const m=Ys.indexOf(u);m>=0&&Ys.splice(m,1),cT(),s("up",!0,null)}}}function gJ(t){const{target:e}=t,{x:n,y:r}=zy(t);Dc=!0,uT({target:e,x:n,y:r}),Av(),Ys.length>0&&(Tv("down",t),t.preventDefault(),t9(e)||t.stopImmediatePropagation())}function aS(t){const{x:e,y:n}=zy(t);if(Dc&&t.buttons===0&&(Dc=!1,Tv("up",t)),!Dc){const{target:r}=t;uT({target:r,x:e,y:n})}Tv("move",t),cT(),Ys.length>0&&t.preventDefault()}function lS(t){const{target:e}=t,{x:n,y:r}=zy(t);jy.clear(),Dc=!1,Ys.length>0&&(t.preventDefault(),t9(e)||t.stopImmediatePropagation()),Tv("up",t),uT({target:e,x:n,y:r}),cT(),Av()}function t9(t){let e=t;for(;e;){if(e.hasAttribute(mn.resizeHandle))return!0;e=e.parentElement}return!1}function uT({target:t,x:e,y:n}){Ys.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:h,top:g}=u,m=hJ?a.coarse:a.fine;if(e>=f-m&&e<=h+m&&n>=g-m&&n<=c+m){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&uJ(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(lJ(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Ys.push(s)}})}function uS(t,e){jy.set(t,e)}function cT(){let t=!1,e=!1;Ys.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;jy.forEach(r=>{n|=r}),t&&e?iS("intersection",n):t?iS("horizontal",n):e?iS("vertical",n):iJ()}let cS=new AbortController;function Av(){cS.abort(),cS=new AbortController;const t={capture:!0,signal:cS.signal};_h.size&&(Dc?(Ys.length>0&&wl.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",lS,t),r.addEventListener("pointerleave",aS,t),r.addEventListener("pointermove",aS,t))}),window.addEventListener("pointerup",lS,t),window.addEventListener("pointercancel",lS,t)):wl.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",gJ,t),r.addEventListener("pointermove",aS,t))}))}function Tv(t,e){_h.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ys.includes(n);r(t,s,e)})}function mJ(){const[t,e]=_.useState(0);return _.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function Hl(t,e,n=aT){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function li(t,e,n=aT){return Hl(t,e,n)===0}function os(t,e,n){return Hl(t,e,n)===0}function vJ(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(!os(s,o,n))return!1}return!0}function xc({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(Hl(n,u)<0)if(o){const c=(s+u)/2;Hl(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(aT)),n}function Zf({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(os(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}`),os(C,y)){const w=E-C;Hl(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}`),os(C,E)){const w=C-y;Hl(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=xc({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=xc({panelConstraints:n,panelIndex:m,size:E});if(!os(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(vJ(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=xc({panelConstraints:n,panelIndex:g,size:y});if(a[g]=S,!os(S,y)){let E=y-S,w=t<0?c:u;for(;w>=0&&w<n.length;){const A=a[w];tt(A!=null,`Previous layout not found for panel index ${w}`);const T=A+E,R=xc({panelConstraints:n,panelIndex:w,size:T});if(os(A,R)||(E-=R-A,a[w]=R),os(E,0))break;t>0?w--:w++}}}const h=a.reduce((g,m)=>m+g,0);return os(h,100)?a:s}function yJ({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),h=t[u];return{valueMax:c,valueMin:f,valueNow:h}}function Ah(t,e=document){return Array.from(e.querySelectorAll(`[${mn.resizeHandleId}][data-panel-group-id="${t}"]`))}function n9(t,e,n=document){const s=Ah(t,n).findIndex(o=>o.getAttribute(mn.resizeHandleId)===e);return s??null}function r9(t,e,n){const r=n9(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function s9(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 By(t,e=document){const n=e.querySelector(`[${mn.resizeHandleId}="${t}"]`);return n||null}function bJ(t,e,n,r=document){var s,o,a,u;const c=By(e,r),f=Ah(t,r),h=c?f.indexOf(c):-1,g=(s=(o=n[h])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,m=(a=(u=n[h+1])===null||u===void 0?void 0:u.id)!==null&&a!==void 0?a:null;return[g,m]}function SJ({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){_.useRef({didWarnAboutMissingResizeHandle:!1}),Ml(()=>{if(!o)return;const u=Ah(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:h,valueNow:g}=yJ({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(h)),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]),_.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=s9(n,o);tt(f!=null,`No group found for id "${n}"`);const h=Ah(n,o);tt(h,`No resize handles found for group id "${n}"`);const g=h.map(m=>{const y=m.getAttribute(mn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=bJ(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const A=c.findIndex(T=>T.id===S);if(A>=0){const T=c[A];tt(T,`No panel data found for index ${A}`);const R=r[A],{collapsedSize:M=0,collapsible:N,minSize:I=0}=T.constraints;if(R!=null&&N){const k=Zf({delta:os(R,M)?I-M:M-R,initialLayout:r,panelConstraints:c.map(F=>F.constraints),pivotIndices:r9(n,y,o),prevLayout:r,trigger:"keyboard"});r!==k&&a(k)}}break}}};return m.addEventListener("keydown",C),()=>{m.removeEventListener("keydown",C)}});return()=>{g.forEach(m=>m())}},[o,t,e,n,r,s,a])}function CP(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 o9(t,e){const n=t==="horizontal",{x:r,y:s}=zy(e);return n?r:s}function EJ(t,e,n,r,s){const o=n==="horizontal",a=By(e,s);tt(a,`No resize handle element found for id "${e}"`);const u=a.getAttribute(mn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=o9(n,t),h=s9(u,s);tt(h,`No group element found for id "${u}"`);const g=h.getBoundingClientRect(),m=o?g.width:g.height;return(f-c)/m*100}function CJ(t,e,n,r,s,o){if(G8(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:EJ(t,e,n,r,o)}function wJ({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 ec(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:h}=u,g=n[c];if(g==null||r!==g){n[c]=r;const{onCollapse:m,onExpand:y,onResize:S}=a;S&&S(r,g),h&&(m||y)&&(y&&(g==null||li(g,f))&&!li(r,f)&&y(),m&&(g==null||!li(g,f))&&li(r,f)&&m())}})}function Gg(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 xJ({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 _J(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function wP(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 i9(t){return`react-resizable-panels:${t}`}function a9(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 l9(t,e){try{const n=i9(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function AJ(t,e,n){var r,s;const o=(r=l9(t,n))!==null&&r!==void 0?r:{},a=a9(e);return(s=o[a])!==null&&s!==void 0?s:null}function TJ(t,e,n,r,s){var o;const a=i9(t),u=a9(e),c=(o=l9(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 xP({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(!os(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=xc({panelConstraints:e,panelIndex:o,size:a});a!=u&&(s+=a-u,n[o]=u)}if(!os(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=xc({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,os(s,0)))break}return n}const RJ=100,Xf={getItem:t=>(wP(Xf),Xf.getItem(t)),setItem:(t,e)=>{wP(Xf),Xf.setItem(t,e)}},_P={};function u9({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:a=null,keyboardResizeBy:u=null,storage:c=Xf,style:f,tagName:h="div",...g}){const m=lT(o),y=_.useRef(null),[S,E]=_.useState(null),[C,w]=_.useState([]),A=mJ(),T=_.useRef({}),R=_.useRef(new Map),M=_.useRef(0),N=_.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),I=_.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});_.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),_.useImperativeHandle(s,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:Y}=I.current;return Y},setLayout:Y=>{const{onLayout:J}=N.current,{layout:oe,panelDataArray:he}=I.current,ue=xP({layout:Y,panelConstraints:he.map(ve=>ve.constraints)});CP(oe,ue)||(w(ue),I.current.layout=ue,J&&J(ue),ec(he,ue,T.current))}}),[]),Ml(()=>{N.current.autoSaveId=t,N.current.direction=r,N.current.dragState=S,N.current.id=m,N.current.onLayout=a,N.current.storage=c}),SJ({committedValuesRef:N,eagerValuesRef:I,groupId:m,layout:C,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),_.useEffect(()=>{const{panelDataArray:Y}=I.current;if(t){if(C.length===0||C.length!==Y.length)return;let J=_P[t];J==null&&(J=_J(TJ,RJ),_P[t]=J);const oe=[...Y],he=new Map(R.current);J(t,oe,he,C,c)}},[t,C,c]),_.useEffect(()=>{});const k=_.useCallback(Y=>{const{onLayout:J}=N.current,{layout:oe,panelDataArray:he}=I.current;if(Y.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:xe,pivotIndices:Xe}=yl(he,Y,oe);if(tt(xe!=null,`Panel size not found for panel "${Y.id}"`),!li(xe,ve)){R.current.set(Y.id,xe);const pt=gc(he,Y)===he.length-1?xe-ve:ve-xe,Ce=Zf({delta:pt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});Gg(oe,Ce)||(w(Ce),I.current.layout=Ce,J&&J(Ce),ec(he,Ce,T.current))}}},[]),F=_.useCallback((Y,J)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=I.current;if(Y.constraints.collapsible){const ve=ue.map(ze=>ze.constraints),{collapsedSize:xe=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:pt}=yl(ue,Y,he),Ce=J??Ee;if(li(Xe,xe)){const ze=R.current.get(Y.id),je=ze!=null&&ze>=Ce?ze:Ce,gr=gc(ue,Y)===ue.length-1?Xe-je:je-Xe,Et=Zf({delta:gr,initialLayout:he,panelConstraints:ve,pivotIndices:pt,prevLayout:he,trigger:"imperative-api"});Gg(he,Et)||(w(Et),I.current.layout=Et,oe&&oe(Et),ec(ue,Et,T.current))}}},[]),H=_.useCallback(Y=>{const{layout:J,panelDataArray:oe}=I.current,{panelSize:he}=yl(oe,Y,J);return tt(he!=null,`Panel size not found for panel "${Y.id}"`),he},[]),D=_.useCallback((Y,J)=>{const{panelDataArray:oe}=I.current,he=gc(oe,Y);return xJ({defaultSize:J,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),z=_.useCallback(Y=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=yl(oe,Y,J);return tt(ve!=null,`Panel size not found for panel "${Y.id}"`),ue===!0&&li(ve,he)},[]),q=_.useCallback(Y=>{const{layout:J,panelDataArray:oe}=I.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=yl(oe,Y,J);return tt(ve!=null,`Panel size not found for panel "${Y.id}"`),!ue||Hl(ve,he)>0},[]),V=_.useCallback(Y=>{const{panelDataArray:J}=I.current;J.push(Y),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,A()},[A]);Ml(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:Y,onLayout:J,storage:oe}=N.current,{layout:he,panelDataArray:ue}=I.current;let ve=null;if(Y){const Xe=AJ(Y,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=wJ({panelDataArray:ue}));const xe=xP({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});CP(he,xe)||(w(xe),I.current.layout=xe,J&&J(xe),ec(ue,xe,T.current))}}),Ml(()=>{const Y=I.current;return()=>{Y.layout=[]}},[]);const ee=_.useCallback(Y=>{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:xe,dragState:Xe,id:Ee,keyboardResizeBy:pt,onLayout:Ce}=N.current,{layout:ze,panelDataArray:je}=I.current,{initialLayout:He}=Xe??{},gr=r9(Ee,Y,ve);let Et=CJ(ue,Y,xe,Xe,pt,ve);const Gr=xe==="horizontal";Gr&&J&&(Et=-Et);const Kn=je.map(Rr=>Rr.constraints),Tr=Zf({delta:Et,initialLayout:He??ze,panelConstraints:Kn,pivotIndices:gr,prevLayout:ze,trigger:G8(ue)?"keyboard":"mouse-or-touch"}),to=!Gg(ze,Tr);(K8(ue)||Y8(ue))&&M.current!=Et&&(M.current=Et,!to&&Et!==0?Gr?uS(Y,Et<0?X8:Q8):uS(Y,Et<0?J8:e9):uS(Y,0)),to&&(w(Tr),I.current.layout=Tr,Ce&&Ce(Tr),ec(je,Tr,T.current))}},[]),$=_.useCallback((Y,J)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=I.current,ve=ue.map(ze=>ze.constraints),{panelSize:xe,pivotIndices:Xe}=yl(ue,Y,he);tt(xe!=null,`Panel size not found for panel "${Y.id}"`);const pt=gc(ue,Y)===ue.length-1?xe-J:J-xe,Ce=Zf({delta:pt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});Gg(he,Ce)||(w(Ce),I.current.layout=Ce,oe&&oe(Ce),ec(ue,Ce,T.current))},[]),te=_.useCallback((Y,J)=>{const{layout:oe,panelDataArray:he}=I.current,{collapsedSize:ue=0,collapsible:ve}=J,{collapsedSize:xe=0,collapsible:Xe,maxSize:Ee=100,minSize:pt=0}=Y.constraints,{panelSize:Ce}=yl(he,Y,oe);Ce!=null&&(ve&&Xe&&li(Ce,ue)?li(ue,xe)||$(Y,xe):Ce<pt?$(Y,pt):Ce>Ee&&$(Y,Ee))},[$]),fe=_.useCallback((Y,J)=>{const{direction:oe}=N.current,{layout:he}=I.current;if(!y.current)return;const ue=By(Y,y.current);tt(ue,`Drag handle element not found for id "${Y}"`);const ve=o9(oe,J);E({dragHandleId:Y,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),de=_.useCallback(()=>{E(null)},[]),Ae=_.useCallback(Y=>{const{panelDataArray:J}=I.current,oe=gc(J,Y);oe>=0&&(J.splice(oe,1),delete T.current[Y.id],I.current.panelDataArrayChanged=!0,A())},[A]),L=_.useMemo(()=>({collapsePanel:k,direction:r,dragState:S,expandPanel:F,getPanelSize:H,getPanelStyle:D,groupId:m,isPanelCollapsed:z,isPanelExpanded:q,reevaluatePanelConstraints:te,registerPanel:V,registerResizeHandle:ee,resizePanel:$,startDragging:fe,stopDragging:de,unregisterPanel:Ae,panelGroupElement:y.current}),[k,S,r,F,H,D,m,z,q,te,V,ee,$,fe,de,Ae]),K={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return _.createElement(Fy.Provider,{value:L},_.createElement(h,{...g,children:e,className:n,id:o,ref:y,style:{...K,...f},[mn.group]:"",[mn.groupDirection]:r,[mn.groupId]:m}))}const c9=_.forwardRef((t,e)=>_.createElement(u9,{...t,forwardedRef:e}));u9.displayName="PanelGroup";c9.displayName="forwardRef(PanelGroup)";function gc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function yl(t,e,n){const r=gc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function IJ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){_.useEffect(()=>{if(t||n==null||r==null)return;const s=By(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(mn.groupId);tt(u,`No group element found for id "${u}"`);const c=Ah(u,r),f=n9(u,e,r);tt(f!==null,`No resize element found for id "${e}"`);const h=a.shiftKey?f>0?f-1:c.length-1:f+1<c.length?f+1:0;c[h].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,t,e,n])}function d9({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:a,onDragging:u,onFocus:c,onPointerDown:f,onPointerUp:h,style:g={},tabIndex:m=0,tagName:y="div",...S}){var E,C;const w=_.useRef(null),A=_.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:h});_.useEffect(()=>{A.current.onClick=a,A.current.onDragging=u,A.current.onPointerDown=f,A.current.onPointerUp=h});const T=_.useContext(Fy);if(T===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:N,startDragging:I,stopDragging:k,panelGroupElement:F}=T,H=lT(s),[D,z]=_.useState("inactive"),[q,V]=_.useState(!1),[ee,$]=_.useState(null),te=_.useRef({state:D});Ml(()=>{te.current.state=D}),_.useEffect(()=>{if(n)$(null);else{const L=N(H);$(()=>L)}},[n,H,N]);const fe=(E=r?.coarse)!==null&&E!==void 0?E:15,de=(C=r?.fine)!==null&&C!==void 0?C:5;_.useEffect(()=>{if(n||ee==null)return;const L=w.current;tt(L,"Element ref not attached");let K=!1;return pJ(H,L,R,{coarse:fe,fine:de},(J,oe,he)=>{if(!oe){z("inactive");return}switch(J){case"down":{z("drag"),K=!1,tt(he,'Expected event to be defined for "down" action'),I(H,he);const{onDragging:ue,onPointerDown:ve}=A.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=te.current;K=!0,ue!=="drag"&&z("hover"),tt(he,'Expected event to be defined for "move" action'),ee(he);break}case"up":{z("hover"),k();const{onClick:ue,onDragging:ve,onPointerUp:xe}=A.current;ve?.(!1),xe?.(),K||ue?.();break}}})},[fe,R,n,de,N,H,ee,I,k]),IJ({disabled:n,handleId:H,resizeHandler:ee,panelGroupElement:F});const Ae={touchAction:"none",userSelect:"none"};return _.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{V(!1),o?.()},onFocus:()=>{V(!0),c?.()},ref:w,role:"separator",style:{...Ae,...g},tabIndex:m,[mn.groupDirection]:R,[mn.groupId]:M,[mn.resizeHandle]:"",[mn.resizeHandleActive]:D==="drag"?"pointer":q?"keyboard":void 0,[mn.resizeHandleEnabled]:!n,[mn.resizeHandleId]:H,[mn.resizeHandleState]:D})}d9.displayName="PanelResizeHandle";function AP({className:t,...e}){return O.jsx(c9,{className:Rt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const If=V8;function dS({className:t,...e}){return O.jsx(d9,{className:Rt("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 f9=_.createContext(null);function rRe(){return _.useContext(f9)}function sRe({nav:t,list:e,reading:n,intelligence:r,intelligenceOpen:s=!0,hasThread:o=!0,density:a="comfortable",header:u,topBar:c,overlay:f,skeleton:h,isLoading:g=!1,initialWidth:m,navOpen:y,onOpenNav:S,onCloseNav:E}){const[C,w]=JQ(m),A=QQ(w??0),T=A.nav,R=A.reading&&!!n,M=A.intelligence,[N,I]=_.useState(!1),k=y!==void 0,F=k?y:N,H=()=>{k||I(!0),S?.()},D=()=>{k||I(!1),E?.()},z=M&&s&&o&&!!r,q={panes:A,containerWidth:w,showNavPane:T,openNav:H,showReadingPane:R,showIntelligencePane:M},V=O.jsxs(AP,{direction:"horizontal",className:"min-h-0 flex-1",children:[O.jsx(If,{id:"list",order:1,defaultSize:R?a==="compact"?43:33:100,minSize:22,maxSize:R?58:100,className:"min-w-0",children:e}),R&&O.jsxs(O.Fragment,{children:[O.jsx(dS,{}),O.jsx(If,{id:"reading",order:2,minSize:29,className:"min-w-0",children:n})]}),z&&O.jsxs(O.Fragment,{children:[O.jsx(dS,{}),O.jsx(If,{id:"intelligence",order:3,defaultSize:25,minSize:18,maxSize:39,className:"min-w-0",children:r})]})]}),ee=O.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[c,!T&&u&&O.jsx("div",{className:"shrink-0",children:u}),V]});return O.jsx(f9.Provider,{value:q,children:O.jsx("div",{ref:C,className:"@container flex h-dvh w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:g&&h?h:O.jsxs(O.Fragment,{children:[T?O.jsxs(AP,{direction:"horizontal",className:"min-h-0 flex-1",children:[O.jsx(If,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),O.jsx(dS,{}),O.jsx(If,{id:"content",order:2,className:"flex min-w-0 flex-col",children:ee})]}):ee,!T&&O.jsx(nJ,{open:F,onClose:D,title:"Folders",anchor:"left",children:t}),f]})})})}const h9="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",p9={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"},g9={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"};function pi({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return O.jsxs("button",{type:"button",className:Rt(h9,p9[t],g9[e],r),...o,children:[n,s]})}function oRe({variant:t="primary",size:e="md",icon:n,external:r,className:s,children:o,...a}){return O.jsxs("a",{className:Rt(h9,p9[t],g9[e],s),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,o]})}const OJ={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"},NJ={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function TP({tone:t="neutral",dot:e,className:n,children:r,...s}){return O.jsxs("span",{className:Rt("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",OJ[t],n),...s,children:[e&&O.jsx("span",{className:Rt("size-1.5 rounded-full",NJ[t])}),r]})}const iRe={"data-list-row":""},MJ="[data-list-row]";function PJ(t,e,n,r="vertical"){if(n===0)return null;const s=r==="vertical"?"ArrowDown":"ArrowRight",o=r==="vertical"?"ArrowUp":"ArrowLeft";return t===s?e<0?0:Math.min(e+1,n-1):t===o?e<=0?0:e-1:t==="Home"?0:t==="End"?n-1:null}function RP(t,e){return Array.from(t.querySelectorAll(e))}function kJ({containerRef:t,itemSelector:e,orientation:n="vertical",enabled:r=!0}){_.useEffect(()=>{if(!r)return;const s=t.current;if(!s)return;const o=()=>{const u=RP(s,e);if(u.length===0)return;const f=u.find(h=>h===document.activeElement)??u[0];for(const h of u)h.tabIndex=h===f?0:-1},a=u=>{const c=RP(s,e),f=c.indexOf(document.activeElement),h=PJ(u.key,f,c.length,n);h===null||h===f||(u.preventDefault(),u.stopPropagation(),c[h]?.focus())};return o(),s.addEventListener("focusin",o),s.addEventListener("keydown",a),()=>{s.removeEventListener("focusin",o),s.removeEventListener("keydown",a)}})}const IP=10;function DJ({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=_.useState(r),[c,f]=_.useState(s),h=t.threads.length>IP,m=!a&&h?t.threads.slice(0,IP):t.threads,y=t.threads.length-m.length;return O.jsxs("div",{children:[t.label&&O.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 outline-none transition-colors hover:bg-surface focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",children:[O.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),O.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),O.jsx(Qx,{className:Rt("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"divide-y divide-line",children:m.map(S=>O.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),h&&O.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 outline-none transition-colors hover:bg-surface focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",children:[a?"Show less":`Show ${y} more`,!a&&O.jsx(Qx,{className:"ml-1 size-3"})]})]})]})}function LJ(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function UJ({className:t}){return O.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:O.jsx("path",{d:"M2 4l4 4 4-4"})})}function OP({className:t}){return O.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:O.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function FJ({categories:t,filters:e,sources:n,sourcesNote:r,selectedCategory:s,activeFilters:o,expanded:a,onSelectCategory:u,onSelectSource:c,onToggleFilter:f,onClear:h,onExpandedChange:g,children:m}){const y=a!==void 0,[S,E]=_.useState(!1),C=y?a:S,w=_.useCallback(ee=>{y||E(ee),g?.(ee)},[y,g]),A=t[0],T=A!==void 0&&s===A.id,R=n?.[0],M=n?.find(ee=>ee.active),N=R===void 0||M?.id===R.id,I=!T||o.size>0||!N&&!!M,k=_.useCallback(()=>{R&&c?.(R.id)},[R,c]),F=_.useCallback(()=>{h(),k()},[h,k]),H=t.find(ee=>ee.id===s),D=I?O.jsxs(O.Fragment,{children:[!N&&M&&O.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&&O.jsx(TP,{tone:H.tone??"neutral",children:H.label}),e.filter(ee=>o.has(ee.id)).map(ee=>O.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:ee.label},ee.id))]}):O.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),z=n&&n.length>1&&O.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(ee=>O.jsxs("button",{type:"button",onClick:()=>c?.(ee.id),className:Rt("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",ee.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[ee.label,ee.count!=null&&ee.count>0&&O.jsx("span",{className:"tabular-nums opacity-70",children:ee.count})]},ee.id)),r&&O.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),q=O.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(ee=>{const $=s===ee.id;return O.jsx("button",{type:"button",onClick:()=>u(ee.id),className:Rt("shrink-0 rounded-full transition-opacity",$?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:O.jsx(TP,{tone:ee.tone??"neutral",children:ee.label})},ee.id)})}),V=O.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(ee=>{const $=o.has(ee.id);return O.jsx("button",{type:"button",onClick:()=>f(ee.id),className:Rt("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:ee.label},ee.id)}),I&&O.jsxs("button",{type:"button",onClick:F,className:"ml-auto flex items-center gap-1 px-1 text-2xs text-fg-subtle hover:text-fg-muted",children:[O.jsx(OP,{className:"size-3"}),"Clear"]})]});return O.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[O.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:ee=>{LJ(ee)&&(ee.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:[D,I&&O.jsx("button",{type:"button","aria-label":"Clear filters",onClick:ee=>{ee.stopPropagation(),F()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:O.jsx(OP,{className:"size-3"})}),O.jsx(UJ,{className:Rt("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&O.jsxs("div",{className:"shrink-0",children:[z,q,V]}),O.jsx("div",{className:"flex-1 overflow-y-auto",children:m})]})}function zJ(t){return t.sentDate!=null?new Date(t.sentDate).toDateString()===new Date().toDateString():/^\d{1,2}:\d{2}$/.test(t.timeLabel)}const m9=[{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:zJ}],jJ=m9.map(({id:t,label:e})=>({id:t,label:e}));function aRe({sections:t,briefCategory:e="all",selectedThreadId:n,Row:r,onSelectThread:s,onSelectBriefCategory:o,sources:a,sourcesNote:u,onSelectSource:c,defaultExpanded:f=!1,manageFocus:h=!0}){const[g,m]=_.useState(new Set),[y,S]=_.useState(f),E=_.useRef(null);kJ({containerRef:E,itemSelector:MJ,enabled:h});const C=D=>{m(z=>{const q=new Set(z);return q.has(D)?q.delete(D):q.add(D),q})},w=m9.filter(D=>g.has(D.id)),A=D=>(e==="all"||D.category===e)&&w.every(z=>z.match(D)),T=e==="all",R=t.map(D=>({...D,threads:D.threads.filter(A)})).filter(D=>D.threads.length>0),M=t.flatMap(D=>D.threads).filter(A),N=eJ.map(D=>({id:D.id,label:D.label,tone:D.id==="all"?"neutral":tJ[D.id]})),I=jJ,k=()=>{o?.("all"),m(new Set)},F=T?R.length===0:M.length===0,H=O.jsxs("div",{ref:E,children:[T?R.map(D=>O.jsx(DJ,{section:D,Row:r,selectedThreadId:n,onSelectThread:s},D.id)):O.jsx("div",{className:"divide-y divide-line",children:M.map(D=>O.jsx(r,{thread:D,active:D.id===n,onClick:()=>s?.(D.id)},D.id))}),F&&O.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return O.jsx(FJ,{categories:N,filters:I,sources:a,sourcesNote:u,selectedCategory:e,activeFilters:g,expanded:y,onExpandedChange:S,onSelectCategory:D=>o?.(D),onSelectSource:c,onToggleFilter:D=>C(D),onClear:k,children:H})}const BJ={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"},HJ={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"},$J={info:"status",success:"status",warning:"alert",danger:"alert"};function n_({tone:t="info",variant:e="framed",onDismiss:n,role:r,className:s,children:o,...a}){const u=e==="soft";return O.jsxs("div",{role:r??$J[t],className:Rt("flex gap-2 px-3 py-2 text-sm",u?Rt("items-start rounded-md",HJ[t]):Rt("items-center border",BJ[t]),s),...a,children:[O.jsx("div",{className:"flex-1 min-w-0",children:o}),n&&(u?O.jsx(pi,{variant:"ghost",size:"sm",icon:O.jsx(La,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):O.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:O.jsx(La,{className:"size-4","aria-hidden":"true"})}))]})}function NP(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 qJ(t){if(Array.isArray(t))return t}function WJ(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(h){f=!0,s=h}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw s}}return u}}function VJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GJ(t,e){return qJ(t)||WJ(t,e)||KJ(t,e)||VJ()}function KJ(t,e){if(t){if(typeof t=="string")return NP(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)?NP(t,e):void 0}}const v9=Object.entries,MP=Object.setPrototypeOf,YJ=Object.isFrozen,ZJ=Object.getPrototypeOf,XJ=Object.getOwnPropertyDescriptor;let rr=Object.freeze,or=Object.seal,mc=Object.create,y9=typeof Reflect<"u"&&Reflect,r_=y9.apply,s_=y9.construct;rr||(rr=function(e){return e});or||(or=function(e){return e});r_||(r_=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)});s_||(s_=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 tc=Rn(Array.prototype.forEach),QJ=Rn(Array.prototype.lastIndexOf),PP=Rn(Array.prototype.pop),nc=Rn(Array.prototype.push),JJ=Rn(Array.prototype.splice),wa=Array.isArray,Qf=Rn(String.prototype.toLowerCase),fS=Rn(String.prototype.toString),kP=Rn(String.prototype.match),Of=Rn(String.prototype.replace),DP=Rn(String.prototype.indexOf),eee=Rn(String.prototype.trim),tee=Rn(Number.prototype.toString),nee=Rn(Boolean.prototype.toString),LP=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),UP=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),Bn=Rn(Object.prototype.hasOwnProperty),Nf=Rn(Object.prototype.toString),zn=Rn(RegExp.prototype.test),bl=ree(TypeError);function Rn(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 r_(t,e,r)}}function ree(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return s_(t,n)}}function mt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qf;if(MP&&MP(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&&(YJ(e)||(e[r]=o),s=o)}t[s]=!0}return t}function see(t){for(let e=0;e<t.length;e++)Bn(t,e)||(t[e]=null);return t}function Sr(t){const e=mc(null);for(const r of v9(t)){var n=GJ(r,2);const s=n[0],o=n[1];Bn(t,s)&&(wa(o)?e[s]=see(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=Sr(o):e[s]=o)}return e}function oee(t){switch(typeof t){case"string":return t;case"number":return tee(t);case"boolean":return nee(t);case"bigint":return LP?LP(t):"0";case"symbol":return UP?UP(t):"Symbol()";case"undefined":return Nf(t);case"function":case"object":{if(t===null)return Nf(t);const e=t,n=mo(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Nf(r)}return Nf(t)}default:return Nf(t)}}function mo(t,e){for(;t!==null;){const r=XJ(t,e);if(r){if(r.get)return Rn(r.get);if(typeof r.value=="function")return Rn(r.value)}t=ZJ(t)}function n(){return null}return n}function iee(t){try{return zn(t,""),!0}catch{return!1}}const FP=rr(["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"]),hS=rr(["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"]),pS=rr(["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"]),aee=rr(["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"]),gS=rr(["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"]),lee=rr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zP=rr(["#text"]),jP=rr(["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"]),mS=rr(["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"]),BP=rr(["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"]),Kg=rr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),uee=or(/{{[\w\W]*|^[\w\W]*}}/g),cee=or(/<%[\w\W]*|^[\w\W]*%>/g),dee=or(/\${[\w\W]*/g),fee=or(/^data-[\-\w.\u00B7-\uFFFF]+$/),hee=or(/^aria-[\-\w]+$/),HP=or(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pee=or(/^(?:\w+script|data):/i),gee=or(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mee=or(/^html$/i),vee=or(/^[a-z][.\w]*(-[.\w]+)+$/i),$P=or(/<[/\w!]/g),qP=or(/<[/\w]/g),yee=or(/<\/no(script|embed|frames)/i),bee=or(/\/>/i),rs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},See=function(){return typeof window>"u"?null:window},Eee=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}},WP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ha=function(e,n,r,s){return Bn(e,n)&&wa(e[n])?mt(s.base?Sr(s.base):{},e[n],s.transform):r};function b9(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:See();const e=pe=>b9(pe);if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==rs.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 h=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"),A=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 N,I="",k,F=!1,H=0;const D=function(){if(H>0)throw bl('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.')},z=function(U){D(),H++;try{return N.createHTML(U)}finally{H--}},q=function(U){D(),H++;try{return N.createScriptURL(U)}finally{H--}},V=function(){return F||(k=Eee(g,s),F=!0),k},ee=n,$=ee.implementation,te=ee.createNodeIterator,fe=ee.createDocumentFragment,de=ee.getElementsByTagName,Ae=r.importNode;let L=WP();e.isSupported=typeof v9=="function"&&typeof w=="function"&&$&&$.createHTMLDocument!==void 0;const K=uee,Y=cee,J=dee,oe=fee,he=hee,ue=pee,ve=gee,xe=vee;let Xe=HP,Ee=null;const pt=mt({},[...FP,...hS,...pS,...gS,...zP]);let Ce=null;const ze=mt({},[...jP,...mS,...BP,...Kg]);let je=Object.seal(mc(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,gr=null;const Et=Object.seal(mc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Kn=!0,Tr=!1,to=!0,Rr=!1,Gt=!0,gt=!1,yn=!1,Ir=null,no=null,Cd=!1,ko=!1,mu=!1,vu=!1,Pi=!0,lr=!1;const Ps="user-content-";let Yn=!0,wd=!1,ki={},ps=null;const Di=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 Ya=null;const Za=mt({},["audio","video","img","source","image","track"]);let ks=null;const Xa=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ro="http://www.w3.org/1998/Math/MathML",yu="http://www.w3.org/2000/svg",Kr="http://www.w3.org/1999/xhtml";let so=Kr,Do=!1,xd=null;const Cp=mt({},[ro,yu,Kr],fS),_d=rr(["mi","mo","mn","ms","mtext"]);let bu=mt({},_d);const Su=rr(["annotation-xml"]);let Qa=mt({},Su);const wp=mt({},["title","style","font","a","script"]);let Li=null;const oo=["application/xhtml+xml","text/html"],On="text/html";let nt=null,Yr=null;const Ad=n.createElement("form"),xp=function(U){return U instanceof RegExp||U instanceof Function},Td=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Yr&&Yr===U)return;(!U||typeof U!="object")&&(U={}),U=Sr(U),Li=oo.indexOf(U.PARSER_MEDIA_TYPE)===-1?On:U.PARSER_MEDIA_TYPE,nt=Li==="application/xhtml+xml"?fS:Qf,Ee=ha(U,"ALLOWED_TAGS",pt,{transform:nt}),Ce=ha(U,"ALLOWED_ATTR",ze,{transform:nt}),xd=ha(U,"ALLOWED_NAMESPACES",Cp,{transform:fS}),ks=ha(U,"ADD_URI_SAFE_ATTR",Xa,{transform:nt,base:Xa}),Ya=ha(U,"ADD_DATA_URI_TAGS",Za,{transform:nt,base:Za}),ps=ha(U,"FORBID_CONTENTS",Di,{transform:nt}),He=ha(U,"FORBID_TAGS",Sr({}),{transform:nt}),gr=ha(U,"FORBID_ATTR",Sr({}),{transform:nt}),ki=Bn(U,"USE_PROFILES")?U.USE_PROFILES&&typeof U.USE_PROFILES=="object"?Sr(U.USE_PROFILES):U.USE_PROFILES:!1,Gr=U.ALLOW_ARIA_ATTR!==!1,Kn=U.ALLOW_DATA_ATTR!==!1,Tr=U.ALLOW_UNKNOWN_PROTOCOLS||!1,to=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rr=U.SAFE_FOR_TEMPLATES||!1,Gt=U.SAFE_FOR_XML!==!1,gt=U.WHOLE_DOCUMENT||!1,ko=U.RETURN_DOM||!1,mu=U.RETURN_DOM_FRAGMENT||!1,vu=U.RETURN_TRUSTED_TYPE||!1,Cd=U.FORCE_BODY||!1,Pi=U.SANITIZE_DOM!==!1,lr=U.SANITIZE_NAMED_PROPS||!1,Yn=U.KEEP_CONTENT!==!1,wd=U.IN_PLACE||!1,Xe=iee(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:HP,so=typeof U.NAMESPACE=="string"?U.NAMESPACE:Kr,bu=Bn(U,"MATHML_TEXT_INTEGRATION_POINTS")&&U.MATHML_TEXT_INTEGRATION_POINTS&&typeof U.MATHML_TEXT_INTEGRATION_POINTS=="object"?Sr(U.MATHML_TEXT_INTEGRATION_POINTS):mt({},_d),Qa=Bn(U,"HTML_INTEGRATION_POINTS")&&U.HTML_INTEGRATION_POINTS&&typeof U.HTML_INTEGRATION_POINTS=="object"?Sr(U.HTML_INTEGRATION_POINTS):mt({},Su);const Z=Bn(U,"CUSTOM_ELEMENT_HANDLING")&&U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING=="object"?Sr(U.CUSTOM_ELEMENT_HANDLING):mc(null);if(je=mc(null),Bn(Z,"tagNameCheck")&&xp(Z.tagNameCheck)&&(je.tagNameCheck=Z.tagNameCheck),Bn(Z,"attributeNameCheck")&&xp(Z.attributeNameCheck)&&(je.attributeNameCheck=Z.attributeNameCheck),Bn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(je.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),or(je),Rr&&(Kn=!1),mu&&(ko=!0),ki&&(Ee=mt({},zP),Ce=mc(null),ki.html===!0&&(mt(Ee,FP),mt(Ce,jP)),ki.svg===!0&&(mt(Ee,hS),mt(Ce,mS),mt(Ce,Kg)),ki.svgFilters===!0&&(mt(Ee,pS),mt(Ce,mS),mt(Ce,Kg)),ki.mathMl===!0&&(mt(Ee,gS),mt(Ce,BP),mt(Ce,Kg))),Et.tagCheck=null,Et.attributeCheck=null,Bn(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?Et.tagCheck=U.ADD_TAGS:wa(U.ADD_TAGS)&&(Ee===pt&&(Ee=Sr(Ee)),mt(Ee,U.ADD_TAGS,nt))),Bn(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?Et.attributeCheck=U.ADD_ATTR:wa(U.ADD_ATTR)&&(Ce===ze&&(Ce=Sr(Ce)),mt(Ce,U.ADD_ATTR,nt))),Bn(U,"ADD_URI_SAFE_ATTR")&&wa(U.ADD_URI_SAFE_ATTR)&&mt(ks,U.ADD_URI_SAFE_ATTR,nt),Bn(U,"FORBID_CONTENTS")&&wa(U.FORBID_CONTENTS)&&(ps===Di&&(ps=Sr(ps)),mt(ps,U.FORBID_CONTENTS,nt)),Bn(U,"ADD_FORBID_CONTENTS")&&wa(U.ADD_FORBID_CONTENTS)&&(ps===Di&&(ps=Sr(ps)),mt(ps,U.ADD_FORBID_CONTENTS,nt)),Yn&&(Ee["#text"]=!0),gt&&mt(Ee,["html","head","body"]),Ee.table&&(mt(Ee,["tbody"]),delete He.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw bl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ce=N;N=U.TRUSTED_TYPES_POLICY;try{I=z("")}catch(Te){throw N=ce,Te}}else U.TRUSTED_TYPES_POLICY===null?(N=void 0,I=""):(N===void 0&&(N=V()),N&&typeof I=="string"&&(I=z("")));rr&&rr(U),Yr=U},Rd=mt({},[...hS,...pS,...aee]),Ui=mt({},[...gS,...lee]),Id=function(U,Z,ce){return Z.namespaceURI===Kr?U==="svg":Z.namespaceURI===ro?U==="svg"&&(ce==="annotation-xml"||bu[ce]):!!Rd[U]},Fi=function(U,Z,ce){return Z.namespaceURI===Kr?U==="math":Z.namespaceURI===yu?U==="math"&&Qa[ce]:!!Ui[U]},zi=function(U,Z,ce){return Z.namespaceURI===yu&&!Qa[ce]||Z.namespaceURI===ro&&!bu[ce]?!1:!Ui[U]&&(wp[U]||!Rd[U])},Ja=function(U){let Z=w(U);(!Z||!Z.tagName)&&(Z={namespaceURI:so,tagName:"template"});const ce=Qf(U.tagName),Te=Qf(Z.tagName);return xd[U.namespaceURI]?U.namespaceURI===yu?Id(ce,Z,Te):U.namespaceURI===ro?Fi(ce,Z,Te):U.namespaceURI===Kr?zi(ce,Z,Te):!!(Li==="application/xhtml+xml"&&xd[U.namespaceURI]):!1},mr=function(U){nc(e.removed,{element:U});try{w(U).removeChild(U)}catch{if(S(U),!w(U))throw bl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ln=function(U){Ds(U);const Z=C(U);if(Z){const Te=[];tc(Z,ke=>{nc(Te,ke)}),tc(Te,ke=>{try{S(ke)}catch{}})}const ce=T(U);if(ce)for(let Te=ce.length-1;Te>=0;--Te){const ke=ce[Te],Ue=ke&&ke.name;if(typeof Ue=="string")try{U.removeAttribute(Ue)}catch{}}},io=function(U,Z){try{nc(e.removed,{attribute:Z.getAttributeNode(U),from:Z})}catch{nc(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(U),U==="is")if(ko||mu)try{mr(Z)}catch{}else try{Z.setAttribute(U,"")}catch{}},_p=function(U){const Z=T(U);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{U.removeAttribute(ke)}catch{}}},Ds=function(U){const Z=[U];for(;Z.length>0;){const ce=Z.pop();(R?R(ce):ce.nodeType)===rs.element&&_p(ce);const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},ji=function(U){if(!Gt)return;const Z=[U];for(;Z.length>0;){const ce=Z.pop(),Te=R?R(ce):ce.nodeType;if(Te===rs.processingInstruction||Te===rs.comment&&zn(qP,ce.data)){try{S(ce)}catch{}continue}if(Te===rs.element){const Ue=ce,tn=nt(M?M(ce):ce.nodeName);try{Ue.hasAttribute&&Ue.hasAttribute("patchsrc")&&Ue.removeAttribute("patchsrc"),Ue.hasAttribute&&Ue.hasAttribute("for")&&tn!=="label"&&tn!=="output"&&Ue.removeAttribute("for")}catch{}}const ke=C(ce);if(ke)for(let Ue=ke.length-1;Ue>=0;--Ue)Z.push(ke[Ue])}},Ap=function(U){let Z=null,ce=null;if(Cd)U="<remove></remove>"+U;else{const Ue=kP(U,/^[\r\n\t ]+/);ce=Ue&&Ue[0]}Li==="application/xhtml+xml"&&so===Kr&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Te=N?z(U):U;if(so===Kr)try{Z=new h().parseFromString(Te,Li)}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 U&&ce&&ke.insertBefore(n.createTextNode(ce),ke.childNodes[0]||null),so===Kr?de.call(Z,gt?"html":"body")[0]:gt?Z.documentElement:ke},Od=function(U){return te.call(U.ownerDocument||U,U,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},el=function(U){return U=Of(U,K," "),U=Of(U,Y," "),U=Of(U,J," "),U},Nd=function(U){var Z;U.normalize();const ce=te.call(U.ownerDocument||U,U,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=ce.nextNode();for(;Te;)Te.data=el(Te.data),Te=ce.nextNode();const ke=(Z=U.querySelectorAll)===null||Z===void 0?void 0:Z.call(U,"template");ke&&tc(ke,Ue=>{Ls(Ue.content)&&Nd(Ue.content)})},Lo=function(U){const Z=M?M(U):null;return typeof Z!="string"||nt(Z)!=="form"?!1:typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||U.attributes!==T(U)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function"||U.nodeType!==R(U)||U.childNodes!==C(U)},Ls=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return R(U)===rs.documentFragment}catch{return!1}},vr=function(U){if(!R||typeof U!="object"||U===null)return!1;try{return typeof R(U)=="number"}catch{return!1}};function un(pe,U,Z){pe.length!==0&&tc(pe,ce=>{ce.call(e,U,Z,Yr)})}const Tp=function(U,Z){return!!(Gt&&U.hasChildNodes()&&!vr(U.firstElementChild)&&zn($P,U.textContent)&&zn($P,U.innerHTML)||Gt&&U.namespaceURI===Kr&&Z==="style"&&vr(U.firstElementChild)||U.nodeType===rs.processingInstruction||Gt&&U.nodeType===rs.comment&&zn(qP,U.data))},Bb=function(U,Z){if(!He[Z]&&Rp(Z)&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,Z)||je.tagNameCheck instanceof Function&&je.tagNameCheck(Z)))return!1;if(Yn&&!ps[Z]){const ce=w(U),Te=C(U);if(Te&&ce){const ke=Te.length;for(let Ue=ke-1;Ue>=0;--Ue){const tn=wd?Te[Ue]:y(Te[Ue],!0);ce.insertBefore(tn,E(U))}}}return mr(U),!0},Eu=function(U,Z){if(un(L.beforeSanitizeElements,U,null),U!==Z&&w(U)===null)return!0;if(Lo(U))return mr(U),!0;const ce=nt(M?M(U):U.nodeName);if(un(L.uponSanitizeElement,U,{tagName:ce,allowedTags:Ee}),U!==Z&&w(U)===null)return!0;if(Tp(U,ce))return mr(U),!0;if(He[ce]||!(Et.tagCheck instanceof Function&&Et.tagCheck(ce))&&!Ee[ce]){const ke=Bb(U,ce);return ke===!1&&un(L.afterSanitizeElements,U,null),ke}if((R?R(U):U.nodeType)===rs.element&&!Ja(U)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&zn(yee,U.innerHTML))return mr(U),!0;if(Rr&&U.nodeType===rs.text){const ke=el(U.textContent);U.textContent!==ke&&(nc(e.removed,{element:U.cloneNode()}),U.textContent=ke)}return un(L.afterSanitizeElements,U,null),!1},Md=function(U,Z,ce){if(gr[Z]||Gt&&Z==="patchsrc"||Gt&&Z==="for"&&U!=="label"&&U!=="output"||Pi&&(Z==="id"||Z==="name")&&(ce in n||ce in Ad))return!1;const Te=Ce[Z]||Et.attributeCheck instanceof Function&&Et.attributeCheck(Z,U);if(!(Kn&&zn(oe,Z))){if(!(Gr&&zn(he,Z))){if(Te){if(!ks[Z]){if(!zn(Xe,Of(ce,ve,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&U!=="script"&&DP(ce,"data:")===0&&Ya[U])){if(!(Tr&&!zn(ue,Of(ce,ve,"")))){if(ce)return!1}}}}}else if(!(Rp(U)&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,U)||je.tagNameCheck instanceof Function&&je.tagNameCheck(U))&&(je.attributeNameCheck instanceof RegExp&&zn(je.attributeNameCheck,Z)||je.attributeNameCheck instanceof Function&&je.attributeNameCheck(Z,U))||Z==="is"&&je.allowCustomizedBuiltInElements&&(je.tagNameCheck instanceof RegExp&&zn(je.tagNameCheck,ce)||je.tagNameCheck instanceof Function&&je.tagNameCheck(ce))))return!1}}return!0},Cu=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Rp=function(U){return!Cu[Qf(U)]&&zn(xe,U)},Or=function(U,Z,ce,Te){if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ce)switch(g.getAttributeType(U,Z)){case"TrustedHTML":return z(Te);case"TrustedScriptURL":return q(Te)}return Te},Pd=function(U,Z,ce,Te){try{ce?U.setAttributeNS(ce,Z,Te):U.setAttribute(Z,Te),Lo(U)?mr(U):PP(e.removed)}catch{io(Z,U)}},kd=function(U){un(L.beforeSanitizeAttributes,U,null);const Z=U.attributes;if(!Z||Lo(U))return;const ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=Z.length;const ke=nt(U.nodeName);for(;Te--;){const Ue=Z[Te],tn=Ue.name,Un=Ue.namespaceURI,ur=Ue.value,nn=nt(tn),yr=ur;let Nn=tn==="value"?yr:eee(yr);if(ce.attrName=nn,ce.attrValue=Nn,ce.keepAttr=!0,ce.forceKeepAttr=void 0,un(L.uponSanitizeAttribute,U,ce),Nn=ce.attrValue,lr&&(nn==="id"||nn==="name")&&DP(Nn,Ps)!==0&&(io(tn,U),Nn=Ps+Nn),Gt&&zn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Nn)){io(tn,U);continue}if(nn==="attributename"&&kP(Nn,"href")){io(tn,U);continue}if(!ce.forceKeepAttr){if(!ce.keepAttr){io(tn,U);continue}if(!to&&zn(bee,Nn)){io(tn,U);continue}if(Rr&&(Nn=el(Nn)),!Md(ke,nn,Nn)){io(tn,U);continue}Nn=Or(ke,nn,Un,Nn),Nn!==yr&&Pd(U,tn,Un,Nn)}}un(L.afterSanitizeAttributes,U,null)},Bi=function(U){let Z=null;const ce=Od(U);for(un(L.beforeSanitizeShadowDOM,U,null);Z=ce.nextNode();)if(un(L.uponSanitizeShadowNode,Z,null),Eu(Z,U),kd(Z),Ls(Z.content)&&Bi(Z.content),(R?R(Z):Z.nodeType)===rs.element){const ke=A(Z);Ls(ke)&&(ao(ke),Bi(ke))}un(L.afterSanitizeShadowDOM,U,null)},ao=function(U){const Z=[{node:U,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)===rs.element,tn=C(Te);if(tn)for(let Un=tn.length-1;Un>=0;--Un)Z.push({node:tn[Un],shadow:null});if(Ue){const Un=M?M(Te):null;if(typeof Un=="string"&&nt(Un)==="template"){const ur=Te.content;Ls(ur)&&Z.push({node:ur,shadow:null})}}if(Ue){const Un=A(Te);Ls(Un)&&Z.push({node:null,shadow:Un},{node:Un,shadow:null})}}};return e.sanitize=function(pe){let U=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"&&!vr(pe)&&(pe=oee(pe),typeof pe!="string"))throw bl("dirty is not a string, aborting");if(!e.isSupported)return pe;yn?(Ee=Ir,Ce=no):Td(U),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(Ee=Sr(Ee)),L.uponSanitizeAttribute.length>0&&(Ce=Sr(Ce)),e.removed=[];const Ue=wd&&typeof pe!="string"&&vr(pe);if(Ue){ji(pe);const nn=M?M(pe):pe.nodeName;if(typeof nn=="string"){const yr=nt(nn);if(!Ee[yr]||He[yr])throw ln(pe),bl("root node is forbidden and cannot be sanitized in-place")}if(Lo(pe))throw ln(pe),bl("root node is clobbered and cannot be sanitized in-place");try{ao(pe)}catch(yr){throw ln(pe),yr}}else if(vr(pe))Z=Ap("<!---->"),ce=Z.ownerDocument.importNode(pe,!0),ce.nodeType===rs.element&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Z=ce:Z.appendChild(ce),ao(ce);else{if(!ko&&!Rr&&!gt&&pe.indexOf("<")===-1)return N&&vu?z(pe):pe;if(Z=Ap(pe),!Z)return ko?null:vu?I:""}Z&&Cd&&mr(Z.firstChild);const tn=Ue?pe:Z,Un=Od(tn);try{for(;Te=Un.nextNode();)Eu(Te,tn),kd(Te),Ls(Te.content)&&Bi(Te.content)}catch(nn){throw Ue&&(ln(pe),tc(e.removed,yr=>{yr.element&&Ds(yr.element)})),nn}if(Ue)return tc(e.removed,nn=>{nn.element&&Ds(nn.element)}),Rr&&Nd(pe),pe;if(ko){if(Rr&&Nd(Z),mu)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 ur=gt?Z.outerHTML:Z.innerHTML;return gt&&Ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&zn(mee,Z.ownerDocument.doctype.name)&&(ur="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
14
|
-
`+ur),Rr&&(ur=el(ur)),N&&vu?z(ur):ur},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Td(pe),yn=!0,Ir=Ee,no=Ce},e.clearConfig=function(){Yr=null,yn=!1,Ir=null,no=null,N=k,I=""},e.isValidAttribute=function(pe,U,Z){Yr||Td({});const ce=nt(pe),Te=nt(U);return Md(ce,Te,Z)},e.addHook=function(pe,U){typeof U=="function"&&Bn(L,pe)&&nc(L[pe],U)},e.removeHook=function(pe,U){if(Bn(L,pe)){if(U!==void 0){const Z=QJ(L[pe],U);return Z===-1?void 0:JJ(L[pe],Z,1)[0]}return PP(L[pe])}},e.removeHooks=function(pe){Bn(L,pe)&&(L[pe]=[])},e.removeAllHooks=function(){L=WP()},e}var lRe=b9();function S9({children:t,className:e}){return O.jsx("div",{"data-auth-page":!0,className:Rt("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:O.jsx("div",{className:"w-full max-w-[26rem]",children:t})})}const Cee="Secure sign-in powered by AWS Cognito";function E9(t){const e=t?.note??"Secure sign-in";return O.jsx("div",{className:"text-center pt-5",children:O.jsx("p",{className:"text-xs text-fg-muted",children:e})})}const wee=()=>O.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:[O.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),O.jsx("path",{d:"M3 7l9 6 9-6"})]});function C9({wordmark:t="remit,",tagline:e="your email client in the cloud.",mark:n=O.jsx(wee,{})}){return O.jsxs("div",{className:"text-center pb-6",children:[O.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),O.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:t}),O.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:e})]})}const xee={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function ev(t){return xee[t]}const _ee={ListId:"The mailing list's List-Id header, matched exactly. New mail is matched as it arrives — mail delivered before this was set up may not carry it yet.",FromDomain:"The sender's registrable domain — matches anyone at it, subdomains included (a look-alike like example.com.evil.test never matches)."};function Aee(t){return _ee[t]}const Tee=["From","Subject","HasWords","ListId","FromDomain"];function VP(t){return`Similar to these ${t.anchorCount}`}const Ree={all:"Match all",any:"Match any"};function GP(t){return Ree[t]}function Iee(t){return t==="all"?"and":"or"}function Oee(t){if(t.status==="loading")return"Counting matches…";if(t.status==="error")return t.reason;if(t.count===0)return"No mail matches yet";const e=t.count===1?"message":"messages",n=`${t.count} ${e} match`;return t.stale?`${n} — recounting`:n}function Nee(t){return t==="once"?"Apply now":t==="standing"?"Save rule":"Save until then"}function Mee(t,e){if(!(t.clauses.length>0||t.widen!==void 0&&!t.widen.inactive))return"Add a clause so the rule has something to match.";if(!t.moveMailboxId)return"Pick a folder to move matches into — labeling isn't available yet.";if((t.scope==="standing"||t.scope==="until")&&(t.name??"").trim()==="")return"Name this rule so you can find it later.";if(t.scope==="until"&&!t.until)return"Pick the date this rule should stop on.";if(e.status==="loading")return"Counting matches — save once the count settles.";if(e.status==="ready"&&e.stale)return"Recounting matches — save once the count settles."}const Pee={default:Rt("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 Lc({icon:t,className:e,variant:n="default",ref:r,...s}){return O.jsxs("div",{className:Rt(Pee[n],e),children:[t&&O.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),O.jsx("input",{ref:r,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s})]})}function w9({icon:t,className:e,children:n,...r}){return O.jsxs("div",{className:Rt("relative flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken pl-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors",e),children:[t&&O.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),O.jsx("select",{className:"min-w-0 flex-1 appearance-none bg-transparent py-0 pr-8 text-fg outline-none",...r,children:n}),O.jsx(Qx,{className:"pointer-events-none absolute right-2.5 size-4 text-fg-subtle"})]})}const Rv="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs";function kee({clause:t,onEdit:e,onRemove:n}){return O.jsxs("span",{className:Rt(Rv,t.derived?"border-dashed border-line-strong bg-surface-sunken":"border-line bg-surface"),children:[O.jsxs("button",{type:"button",onClick:e,"aria-label":`Edit ${ev(t.field)} clause`,className:"flex items-center gap-1 text-left",children:[O.jsx("span",{className:"font-medium text-fg-muted",children:ev(t.field)}),O.jsx("span",{className:"text-fg",children:t.value})]}),t.derived&&O.jsx("span",{className:"text-2xs text-fg-subtle",children:"from sender"}),n&&O.jsx("button",{type:"button",onClick:n,"aria-label":`Remove ${ev(t.field)} clause`,className:"flex size-4 items-center justify-center rounded-full text-fg-subtle hover:bg-surface-sunken hover:text-fg-muted",children:O.jsx(La,{className:"size-3"})})]})}function KP({onRemove:t}){return O.jsx("button",{type:"button",onClick:t,"aria-label":"Remove the similar-mail widen",className:"flex size-4 items-center justify-center rounded-full hover:bg-fg-subtle/20",children:O.jsx(La,{className:"size-3"})})}function Dee({widen:t,onRemove:e}){return t.inactive?O.jsxs("span",{className:Rt(Rv,"border-dashed border-line-strong bg-surface-sunken text-fg-subtle"),children:[O.jsx(gP,{className:"size-3 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"line-through",children:VP(t)}),O.jsx("span",{className:"text-2xs",children:"not available here"}),e&&O.jsx(KP,{onRemove:e})]}):O.jsxs("span",{className:Rt(Rv,"border-accent-2 bg-accent-2-soft text-accent-2"),children:[O.jsx(gP,{className:"size-3 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"font-medium",children:"…and anything similar"}),O.jsx("span",{className:"text-2xs opacity-80",children:VP(t)}),e&&O.jsx(KP,{onRemove:e})]})}function YP({label:t,onClick:e}){return O.jsxs("button",{type:"button",onClick:e,className:Rt(Rv,"border-dashed border-line-strong text-fg-muted hover:border-accent-2 hover:text-accent-2"),children:[O.jsx(hQ,{className:"size-3","aria-hidden":"true"}),t]})}function Lee({draft:t,mode:e,fields:n=Tee,onChangeField:r,onChangeValue:s,onSubmit:o,onCancel:a}){const u=Aee(t.field);return O.jsxs("div",{className:"space-y-1.5 rounded-lg border border-accent-2 bg-surface p-2",children:[O.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[O.jsx(w9,{"aria-label":"Clause field",value:t.field,onChange:c=>r?.(c.target.value),className:"h-8 w-32 shrink-0",children:n.map(c=>O.jsx("option",{value:c,children:ev(c)},c))}),O.jsx(Lc,{"aria-label":"Clause value",value:t.value,placeholder:"value…",onChange:c=>s?.(c.target.value),onKeyDown:c=>{c.key==="Enter"&&o?.()},className:"h-8 min-w-40 flex-1"}),O.jsx(pi,{variant:"primary",size:"sm",onClick:o,disabled:t.value.trim()==="",className:"shrink-0",children:e==="add"?"Add":"Save"}),O.jsx(pi,{variant:"ghost",size:"sm",onClick:a,"aria-label":"Cancel clause edit",icon:O.jsx(La,{className:"size-4"}),className:"shrink-0 px-2"})]}),u&&O.jsx("p",{className:"px-0.5 text-2xs text-fg-subtle",children:u})]})}function Uee({preview:t}){const e=Oee(t);if(t.status==="loading")return O.jsxs("p",{className:"flex items-center gap-2 text-xs text-fg-muted","aria-live":"polite",children:[O.jsx(Jx,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]});if(t.status==="error")return O.jsxs("p",{className:"flex items-center gap-2 text-xs text-danger",role:"alert",children:[O.jsx(F8,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e]});const n=t.count===0;return O.jsxs("p",{className:Rt("flex items-center gap-2 text-xs",t.stale?"text-fg-subtle":n?"text-fg-muted":"font-medium text-fg"),"aria-live":"polite",children:[t.stale&&O.jsx(Jx,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]})}const Fee={sm:"min-h-9 px-3 text-xs",md:"min-h-11 px-4 text-sm"};function ZP({name:t,options:e,value:n,onChange:r,size:s="md","aria-label":o}){const a=e.findIndex(u=>u.value===n);return O.jsx("div",{role:"radiogroup","aria-label":o,className:"inline-flex rounded-md border border-line bg-surface-sunken p-0.5",children:e.map((u,c)=>{const f=u.value===n,h=!f&&c<e.length-1&&a!==c+1;return O.jsxs("label",{className:Rt("relative flex cursor-pointer items-center justify-center rounded-[5px] font-medium transition-colors",Fee[s],f?"bg-surface text-fg shadow":"text-fg-muted hover:text-fg",h&&"after:pointer-events-none after:absolute after:right-0 after:top-1/4 after:h-1/2 after:w-px after:bg-line"),children:[O.jsx("input",{type:"radio",name:t,value:u.value,checked:f,onChange:()=>r(u.value),className:"sr-only"}),u.label]},u.value)})})}const zee=[{value:"all",label:GP("all")},{value:"any",label:GP("any")}],jee=[{value:"once",label:"Just once"},{value:"standing",label:"Keep doing this"},{value:"until",label:"Until a date"}];function uRe({rule:t,folders:e,preview:n,notice:r,semanticAvailable:s=!1,clauseFields:o,lifecycleLocked:a=!1,clauseEdit:u,onStartAddClause:c,onStartEditClause:f,onRemoveClause:h,onChangeDraftField:g,onChangeDraftValue:m,onSubmitClause:y,onCancelClause:S,onAddWiden:E,onRemoveWiden:C,onChangeMatchOperator:w,onChangeMove:A,onChangeScope:T,onChangeName:R,onChangeUntil:M,onCommit:N,onCancel:I}){const k=t.widen&&!t.widen.inactive?1:0,H=t.clauses.length+k>=2,D=Iee(t.matchOperator),z=Mee(t,n),q=t.scope==="standing"||t.scope==="until";return O.jsxs("div",{className:"flex min-h-0 flex-col",children:[O.jsxs("div",{className:"border-b border-line px-5 py-3",children:[O.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Filter rule"}),O.jsx("p",{className:"mt-0.5 text-xs text-fg-muted",children:"These chips are the whole rule — what you see is what applies."})]}),O.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4",children:[r,O.jsxs("section",{className:"space-y-3",children:[O.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.clauses.map((V,ee)=>O.jsxs(_.Fragment,{children:[ee>0&&O.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:D}),O.jsx(kee,{clause:V,onEdit:()=>f?.(V.id),onRemove:()=>h?.(V.id)})]},V.id)),t.widen&&O.jsxs(O.Fragment,{children:[t.clauses.length>0&&!t.widen.inactive&&O.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:D}),O.jsx(Dee,{widen:t.widen,onRemove:C})]}),!u&&O.jsx(YP,{label:"Add clause",onClick:c}),!t.widen&&s&&!u&&O.jsx(YP,{label:"…and similar",onClick:E})]}),u&&O.jsx(Lee,{draft:u.draft,mode:u.mode,fields:o,onChangeField:g,onChangeValue:m,onSubmit:y,onCancel:S}),H&&O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx("span",{className:"text-xs text-fg-muted",children:"Match"}),O.jsx(ZP,{name:"match-operator",size:"sm","aria-label":"Match operator",options:zee,value:t.matchOperator,onChange:V=>w?.(V)})]})]}),O.jsxs("section",{className:"space-y-2",children:[O.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Move matches to"}),O.jsxs(w9,{"aria-label":"Destination folder",value:t.moveMailboxId??"",onChange:V=>A?.(V.target.value),children:[O.jsx("option",{value:"",children:"Choose a folder…"}),e.map(V=>O.jsx("option",{value:V.id,children:V.label},V.id))]}),O.jsxs("div",{className:"flex items-center gap-2 pt-0.5",children:[O.jsx("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted",children:"label them…"}),O.jsx("span",{className:"text-2xs text-fg-subtle",children:"Labeling isn't available yet — arrives with mail-labeling (RFC 031)."})]})]}),O.jsxs("section",{className:"space-y-2",children:[O.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"How long"}),a?O.jsx("p",{className:"text-xs text-fg",children:t.scope==="until"?`Until ${t.until??""}`:"Always — runs on matching mail"}):O.jsx(ZP,{name:"rule-scope",size:"sm","aria-label":"Rule scope",options:jee,value:t.scope,onChange:V=>T?.(V)}),q&&O.jsx(Lc,{value:t.name??"",onChange:V=>R?.(V.target.value),placeholder:"Name this rule (e.g. Receipts)","aria-label":"Rule name",className:"w-full"}),!a&&t.scope==="until"&&O.jsxs("div",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[O.jsx("span",{children:"Until"}),O.jsx(Lc,{type:"date",value:t.until??"",onChange:V=>M?.(V.target.value),"aria-label":"Expiry date",className:"flex-1"})]}),a&&O.jsx("p",{className:"text-2xs text-fg-subtle",children:t.widen?"The scope, expiry, and similar-mail match are set when a filter is created.":"The scope and expiry are set when a filter is created."})]}),O.jsx("div",{className:"border-t border-line pt-3",children:O.jsx(Uee,{preview:n})})]}),O.jsxs("div",{className:"space-y-2 border-t border-line px-5 py-3",children:[z&&O.jsx("p",{className:"text-xs text-fg-subtle",role:"status",children:z}),O.jsx(pi,{variant:"primary",onClick:N,disabled:z!==void 0,className:"w-full",children:Nee(t.scope)}),O.jsx(pi,{variant:"ghost",onClick:I,className:"w-full",children:"Not now"})]})]})}const Bee={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function Hee(t){return Bee[t]}function $ee(t){const e=t.split("/");return e[e.length-1]||t}const qee=new Set(["all","flagged"]);function Wee(t){return qee.has(t)}const Vee=new Set(["[Gmail]","[Google Mail]"]);function Gee(t){if(t.role)return Wee(t.role)?void 0:Hee(t.role);if(t.providerPath&&!Vee.has(t.providerPath.split("/")[0]))return $ee(t.providerPath)}function cRe(t){return t==="inbox"?O.jsx(U8,{className:"size-4"}):t==="drafts"?O.jsx(aQ,{className:"size-4"}):t==="sent"?O.jsx(pQ,{className:"size-4"}):t==="archive"?O.jsx(sQ,{className:"size-4"}):t==="junk"?O.jsx(oT,{className:"size-4"}):t==="trash"?O.jsx(mQ,{className:"size-4"}):t==="flagged"?O.jsx(gQ,{className:"size-4"}):O.jsx(dQ,{className:"size-4"})}const x9={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},Kee=({label:t,onRemove:e,tone:n="filter",className:r})=>O.jsxs("span",{className:Rt("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",x9[n],r),children:[O.jsx("span",{children:t}),O.jsx("button",{type:"button",onClick:e,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${t}`,children:O.jsx(La,{className:"size-3"})})]}),Yee=_.forwardRef(({label:t,onRemove:e,onActivate:n,tone:r="filter",focused:s=!1,onKeyDown:o,onFocusLabel:a,className:u},c)=>O.jsxs("span",{role:"row",tabIndex:-1,className:Rt("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",x9[r],s&&"ring-2 ring-ring",u),children:[O.jsx("button",{ref:c,type:"button",role:"gridcell",tabIndex:s?0:-1,onClick:n,onFocus:a,onKeyDown:o,className:Rt("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:t}),O.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:e,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${t}`,children:O.jsx(La,{className:"size-3"})})]}));Yee.displayName="SearchChipRow";const dRe=({tokens:t,className:e})=>t.length===0?null:O.jsx("div",{className:Rt("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",e),children:t.map(n=>O.jsx(Kee,{label:n.label,onRemove:n.onRemove},n.label))});var Th;(function(t){t[t.UP=-1]="UP",t[t.DOWN=1]="DOWN"})(Th||(Th={}));function Zee(t){var e=getComputedStyle(t).overflowY;return t===document.scrollingElement&&e==="visible"?!0:!(e!=="scroll"&&e!=="auto")}function Xee(t,e){if(!Zee(t))return!1;if(e===Th.DOWN){var n=t.scrollTop+t.clientHeight;return n<t.scrollHeight}if(e===Th.UP)return t.scrollTop>0;throw new Error("unsupported direction")}function _9(t,e){return Xee(t,e)?!0:t.parentElement==null?!1:_9(t.parentElement,e)}function A9(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 Qee=`.lds-ellipsis {
|
|
15
|
-
display: inline-block;
|
|
16
|
-
position: relative;
|
|
17
|
-
width: 64px;
|
|
18
|
-
height: 64px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.lds-ellipsis div {
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 27px;
|
|
24
|
-
width: 11px;
|
|
25
|
-
height: 11px;
|
|
26
|
-
border-radius: 50%;
|
|
27
|
-
background: rgb(54, 54, 54);
|
|
28
|
-
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.lds-ellipsis div:nth-child(1) {
|
|
32
|
-
left: 6px;
|
|
33
|
-
animation: lds-ellipsis1 0.6s infinite;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.lds-ellipsis div:nth-child(2) {
|
|
37
|
-
left: 6px;
|
|
38
|
-
animation: lds-ellipsis2 0.6s infinite;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.lds-ellipsis div:nth-child(3) {
|
|
42
|
-
left: 26px;
|
|
43
|
-
animation: lds-ellipsis2 0.6s infinite;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.lds-ellipsis div:nth-child(4) {
|
|
47
|
-
left: 45px;
|
|
48
|
-
animation: lds-ellipsis3 0.6s infinite;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@keyframes lds-ellipsis1 {
|
|
52
|
-
0% {
|
|
53
|
-
transform: scale(0);
|
|
54
|
-
}
|
|
55
|
-
100% {
|
|
56
|
-
transform: scale(1);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
@keyframes lds-ellipsis3 {
|
|
60
|
-
0% {
|
|
61
|
-
transform: scale(1);
|
|
62
|
-
}
|
|
63
|
-
100% {
|
|
64
|
-
transform: scale(0);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
@keyframes lds-ellipsis2 {
|
|
68
|
-
0% {
|
|
69
|
-
transform: translate(0, 0);
|
|
70
|
-
}
|
|
71
|
-
100% {
|
|
72
|
-
transform: translate(19px, 0);
|
|
73
|
-
}
|
|
74
|
-
}`;A9(Qee);var Jee=function(){return j.createElement("div",{className:"lds-ellipsis"},j.createElement("div",null),j.createElement("div",null),j.createElement("div",null),j.createElement("div",null))},ete=function(){return j.createElement("div",null,j.createElement("p",null,"↧ pull to refresh ↧"))},tte=`.ptr,
|
|
75
|
-
.ptr__children {
|
|
76
|
-
height: 100%;
|
|
77
|
-
width: 100%;
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
-webkit-overflow-scrolling: touch;
|
|
80
|
-
position: relative;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.ptr.ptr--fetch-more-treshold-breached .ptr__fetch-more {
|
|
84
|
-
display: block;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.ptr__fetch-more {
|
|
88
|
-
display: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Pull down transition
|
|
93
|
-
*/
|
|
94
|
-
.ptr__children,
|
|
95
|
-
.ptr__pull-down {
|
|
96
|
-
transition: transform 0.2s cubic-bezier(0, 0, 0.31, 1);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ptr__pull-down {
|
|
100
|
-
position: absolute;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
left: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
top: 0;
|
|
105
|
-
visibility: hidden;
|
|
106
|
-
}
|
|
107
|
-
.ptr__pull-down > div {
|
|
108
|
-
display: none;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.ptr--dragging {
|
|
112
|
-
/**
|
|
113
|
-
* Hide PullMore content is treshold breached
|
|
114
|
-
*/
|
|
115
|
-
}
|
|
116
|
-
.ptr--dragging.ptr--pull-down-treshold-breached .ptr__pull-down--pull-more {
|
|
117
|
-
display: none;
|
|
118
|
-
}
|
|
119
|
-
.ptr--dragging {
|
|
120
|
-
/**
|
|
121
|
-
* Otherwize, display content
|
|
122
|
-
*/
|
|
123
|
-
}
|
|
124
|
-
.ptr--dragging .ptr__pull-down--pull-more {
|
|
125
|
-
display: block;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.ptr--pull-down-treshold-breached {
|
|
129
|
-
/**
|
|
130
|
-
* Force opacity to 1 is pull down trashold breached
|
|
131
|
-
*/
|
|
132
|
-
}
|
|
133
|
-
.ptr--pull-down-treshold-breached .ptr__pull-down {
|
|
134
|
-
opacity: 1 !important;
|
|
135
|
-
}
|
|
136
|
-
.ptr--pull-down-treshold-breached {
|
|
137
|
-
/**
|
|
138
|
-
* And display loader
|
|
139
|
-
*/
|
|
140
|
-
}
|
|
141
|
-
.ptr--pull-down-treshold-breached .ptr__pull-down--loading {
|
|
142
|
-
display: block;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.ptr__loader {
|
|
146
|
-
margin: 0 auto;
|
|
147
|
-
text-align: center;
|
|
148
|
-
}`;A9(tte);var fRe=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?j.createElement(Jee,null):u,f=t.pullingContent,h=f===void 0?j.createElement(ete,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,A=t.resistance,T=A===void 0?1:A,R=t.backgroundColor,M=t.className,N=M===void 0?"":M,I=_.useRef(null),k=_.useRef(null),F=_.useRef(null),H=_.useRef(null),D=!1,z=!1,q=!1,V=0,ee=0;_.useEffect(function(){if(!(!n||!k||!k.current)){var K=k.current;return K.addEventListener("touchstart",fe,{passive:!0}),K.addEventListener("mousedown",fe),K.addEventListener("touchmove",de,{passive:!1}),K.addEventListener("mousemove",de),window.addEventListener("scroll",Ae),K.addEventListener("touchend",L),K.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){K.removeEventListener("touchstart",fe),K.removeEventListener("mousedown",fe),K.removeEventListener("touchmove",de),K.removeEventListener("mousemove",de),window.removeEventListener("scroll",Ae),K.removeEventListener("touchend",L),K.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),_.useEffect(function(){var K;if(!((K=I)===null||K===void 0)&&K.current){var Y=I.current.classList.contains("ptr--fetch-more-treshold-breached");Y||s&&$()<E&&a&&(I.current.classList.add("ptr--fetch-more-treshold-breached"),z=!0,a().then(te).catch(te))}},[s,g]);var $=function(){if(!k||!k.current)return-1;var K=window.scrollY,Y=k.current.scrollHeight;return Y-K-window.innerHeight},te=function(){requestAnimationFrame(function(){k.current&&(k.current.style.overflowX="hidden",k.current.style.overflowY="auto",k.current.style.transform="unset"),F.current&&(F.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")),D&&(D=!1),z&&(z=!1)})},fe=function(K){q=!1,K instanceof MouseEvent&&(V=K.pageY),window.TouchEvent&&K instanceof TouchEvent&&(V=K.touches[0].pageY),ee=V,!(K.type==="touchstart"&&_9(K.target,Th.UP))&&(k.current.getBoundingClientRect().top<0||(q=!0))},de=function(K){if(q){if(window.TouchEvent&&K instanceof TouchEvent?ee=K.touches[0].pageY:ee=K.pageY,I.current.classList.add("ptr--dragging"),ee<V){q=!1;return}K.cancelable&&K.preventDefault();var Y=Math.min((ee-V)/T,w);Y>=y&&(q=!0,D=!0,I.current.classList.remove("ptr--dragging"),I.current.classList.add("ptr--pull-down-treshold-breached")),!(Y>=w)&&(F.current.style.opacity=(Y/65).toString(),k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+Y+"px)",F.current.style.visibility="visible")}},Ae=function(K){z||s&&$()<E&&a&&(z=!0,I.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(te).catch(te))},L=function(){if(q=!1,V=0,ee=0,!D){F.current&&(F.current.style.visibility="hidden"),te();return}k.current&&(k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+y+"px)"),o().then(te).catch(te)};return j.createElement("div",{className:"ptr "+N,style:{backgroundColor:R},ref:I},j.createElement("div",{className:"ptr__pull-down",ref:F},j.createElement("div",{className:"ptr__loader ptr__pull-down--loading"},c),j.createElement("div",{className:"ptr__pull-down--pull-more"},h)),j.createElement("div",{className:"ptr__children",ref:k},g,j.createElement("div",{className:"ptr__fetch-more",ref:H},j.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const nte={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function XP(t){return nte[t]}function rte(t){return t<90?"This usually takes about a minute.":t<240?"Longer than usual. Remit is still trying to reach the server.":"Still no answer. Remit keeps trying."}function hRe(t,e=Date.now()){const n=Math.floor((e-t)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function pRe(t){return new Date(t).toLocaleDateString(void 0,{dateStyle:"medium"})}function ste({children:t,show:e,label:n="Update available"}){return O.jsxs("span",{className:"relative inline-flex",children:[t,e&&O.jsxs(O.Fragment,{children:[O.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),O.jsx("span",{className:"sr-only",children:n})]})]})}const QP=["preparing","restarting","reconnecting"],ote='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function T9(t){_.useEffect(()=>{const e=t.current;if(!e)return;const n=()=>Array.from(e.querySelectorAll(ote));(n()[0]??e).focus();const r=s=>{if(s.key!=="Tab")return;const o=n();if(o.length===0){s.preventDefault(),e.focus();return}const a=o[0],u=o[o.length-1],c=document.activeElement;if(s.shiftKey&&(c===a||!e.contains(c))){s.preventDefault(),u.focus();return}!s.shiftKey&&(c===u||!e.contains(c))&&(s.preventDefault(),a.focus())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[t])}const R9="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function ite({target:t,phase:e,elapsedSeconds:n}){const r=_.useRef(null);T9(r);const s=QP.indexOf(e);return O.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:R9,children:[O.jsxs("div",{className:"max-w-md space-y-2",children:[O.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",t]}),O.jsx("p",{className:"text-sm text-fg-muted",children:"Remit is restarting, so this page has no server to talk to for a moment. Leave this open — it reconnects on its own."})]}),O.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:QP.map((o,a)=>{const u=a<s,c=a===s;return O.jsxs("li",{className:Rt("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",c?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[u?O.jsx(oQ,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):c?O.jsx(Jx,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):O.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),XP(o)]},o)})}),O.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[O.jsx("span",{className:"sr-only",children:`${XP(e)}. `}),rte(n)]})]})}function ate({attemptedVersion:t,previousVersion:e,elapsedSeconds:n,logsCommand:r,onRetryConnection:s}){const o=_.useRef(null);T9(o);const a=Math.max(1,Math.round(n/60));return O.jsxs("div",{ref:o,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:R9,children:[O.jsx(oT,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),O.jsxs("p",{className:"text-sm text-fg-muted",children:["Installing ",t," started ",a," minute",a===1?"":"s"," ago and the server has been silent since. Your mail is safe at your provider — it was never part of the update."]}),O.jsxs("p",{className:"text-sm text-fg-muted",children:["Remit rolls back to ",e," on its own when the new version fails to start, but this page cannot confirm that from here. Check the server directly:"]}),O.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),O.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:O.jsx(pi,{size:"sm",onClick:s,children:"Try connecting again"})})]})}const lte=()=>O.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:[O.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>O.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[O.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),ute=()=>O.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>O.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[O.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),O.jsxs("div",{className:"flex-1 space-y-1.5",children:[O.jsxs("div",{className:"flex justify-between gap-2",children:[O.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),O.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),dT=()=>O.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[O.jsx(lte,{}),O.jsx(ute,{})]}),fT="b13e9850b9ff885b657758ef8754cd0b0fa47049",cte="2026-07-25T07:26:13.590Z",dte=fT.slice(0,7),fte=/^[0-9a-f]{40}$/.test(fT),hte=fte?`https://github.com/remit-mail/reader/commit/${fT}`:void 0,pte="https://github.com/remit-mail/reader/issues/new";class o_ extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const iu=t=>{if(t instanceof o_)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}},I9=t=>iu(t)!==void 0,Hy=t=>{const e=iu(t);return e!==void 0&&e>=500&&e<=599},$y=t=>!!(typeof DOMException<"u"&&t instanceof DOMException&&t.name==="AbortError"||t&&typeof t=="object"&&"name"in t&&t.name==="AbortError"),gte=()=>typeof navigator<"u"&&navigator.onLine===!1,O9=t=>$y(t)||I9(t)?!1:t instanceof rT?!0:gte(),mte=t=>!I9(t)&&!$y(t)&&!O9(t),N9=t=>Hy(t)||mte(t),vte=t=>t?.softError===!0,M9=(t,e)=>Hy(t)?!0:$y(t)||O9(t)?!1:N9(t)?!0:!vte(e),yte=t=>Hy(t),i_=new Set;let P9=null,k9=null;const bte=t=>{k9=t},Ste=t=>t instanceof Error?t:new Error(D9(t)),D9=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.",Ete=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,$l=(t,e)=>{const n={error:t,message:D9(t),correlationId:Ete(),at:Date.now(),recoverable:e?.recoverable??yte(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};P9=n,Tte(`Fatal: ${n.message} [${n.correlationId}]`),k9?.recordError(Ste(t),{fatal:"true",correlationId:n.correlationId});for(const r of i_)r(n);return n},Cte=t=>(i_.add(t),()=>{i_.delete(t)}),wte=()=>P9,xte=20,tv=[],_te=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function Ate(t){return typeof t!="string"?!1:_te.has(t.replace(/\.\s*$/,""))}function nv(t){tv.push(t),tv.length>xte&&tv.shift()}function Tte(t){nv(t)}function Rte(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 Ite(){const t=console.error.bind(console);console.error=(...e)=>{nv(Rte(e)),t(...e)},window.addEventListener("error",e=>{Ate(e.message)||(nv(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),$l(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{const n=e.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);nv(`Unhandled rejection: ${r}`),$l(n)})}function Ote(){return tv.slice()}const Nte=8,vc=[];function Mte(t){const e=t.split(/[?#]/)[0],n=vc[vc.length-1];n&&n.path===e||(vc.push({path:e,timestamp:new Date().toISOString()}),vc.length>Nte&&vc.shift())}function Pte(){return vc.slice()}const vS=7500,JP=`
|
|
149
|
-
… (truncated — the copy action on this screen has the full report)`;function e3(t){return{appShortSha:dte,appCommitUrl:hte,appBuildTime:cte,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:Ote(),requests:LX(),routes:Pte(),failingRequest:UX(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function yS(t){return["```",t,"```"].join(`
|
|
150
|
-
`)}function L9(t){const e=/T(\d{2}:\d{2}:\d{2})/.exec(t);return e?e[1]:t}function kte(t){return`- **Version**: ${t.appCommitUrl?`[\`${t.appShortSha}\`](${t.appCommitUrl})`:`\`${t.appShortSha}\``} built ${t.appBuildTime}`}function Dte(t){const e=t.status===0?"no response (transport failure)":`${t.status}`;return["## Failing request",`- **Endpoint**: \`${t.path}\``,`- **Method**: ${t.method}`,`- **Status**: ${e}`,`- **Correlation id**: ${t.correlationId??"(none)"}`,""]}function Lte(t){return t.length===0?["## Recent API requests","(none)",""]:["## Recent API requests","| Time | Method | Path | Status | Duration | Correlation |","| --- | --- | --- | --- | --- | --- |",...t.map(n=>{const r=n.status===0?"ERR":`${n.status}`;return`| ${L9(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function Ute(t){return t.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...t.map(n=>`- ${L9(n.timestamp)} \`${n.path}\``),""]}function U9(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
|
|
151
|
-
`):" (none)",r=["## Environment",kte(t),`- **Browser**: ${t.userAgent}`,`- **Viewport**: ${t.viewport}`,`- **Time**: ${t.timestamp} (${t.timezone})`,"","## URL",t.href,""];if(t.errorMessage&&r.push("## Error",t.errorMessage,""),t.failingRequest&&r.push(...Dte(t.failingRequest)),t.quarantine){const o=e?.quarantineStructure??t.quarantine.structure;r.push(t.quarantine.head,"",yS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",yS(s),""),t.componentStack&&r.push("## Component stack",yS(t.componentStack),""),r.push(...Lte(t.requests)),r.push(...Ute(t.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
|
|
152
|
-
`)}function Fte(t){if(t.title)return t.title;if(!t.errorMessage)return"Bug: ";const e=t.errorMessage.split(`
|
|
153
|
-
`)[0].trim();return`Bug: ${e.length>120?`${e.slice(0,117)}…`:e}`}function Yg(t,e){const n=new URLSearchParams({title:Fte(t),body:U9(t,e)});return`${pte}?${n.toString()}`}function zte(t){return U9(t)}function jte(t){const e=Yg(t);if(e.length<=vS)return e;const n={...t,componentStack:void 0},r=[];t.stack&&r.push(["stack",t.stack]),t.quarantine?.structure&&r.push(["quarantineStructure",t.quarantine.structure]),r.sort((o,a)=>a[1].length-o[1].length);let s={};for(const[o,a]of r){if(Yg(n,s).length<=vS)break;let u=0,c=a.length,f=0;for(;u<=c;){const h=u+c>>1;Yg(n,{...s,[o]:a.slice(0,h)+JP}).length<=vS?(f=h,u=h+1):c=h-1}s={...s,[o]:a.slice(0,f)+JP}}return Yg(n,s)}const Bte="/mail",F9=()=>{const[t,e]=_.useState(()=>wte());return _.useEffect(()=>Cte(e),[]),t?O.jsx(z9,{fatal:t}):null},t3=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),z9=({fatal:t,onRetry:e})=>{const[n,r]=_.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=jte(e3(t3(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=zte(e3(t3(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 O.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:[O.jsx(oT,{className:"size-16 shrink-0","aria-hidden":"true"}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),O.jsx("p",{className:"text-base text-red-50",children:c}),O.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),O.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),O.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?O.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"}):O.jsx("a",{href:Bte,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"}),O.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"}),O.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"})]})]})},Hte=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",j9=t=>Hte(t)==="cognito"?Cee:void 0,$te="Fetch Error",hT=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},pT=t=>hT(t,"message"),qte=t=>$y(t)?!1:hT(t,"statusText")===$te?!0:iu(t)===void 0,Wte=t=>{if(qte(t))return"network";const e=iu(t);return e===void 0||e===404||e>=500?"fatal":pT(t)?"validation":"fatal"},Vte="Can't reach the server. You may be offline — check your connection and try again.",Gte=(t,e)=>e==="network"?Vte:pT(t)??"Please check your details and try again.",Kte=t=>{const e=iu(t);if(e===void 0)return"no response";const n=hT(t,"statusText");return n?`${e} ${n}`:String(e)},Yte=(t,e)=>{const n=Kte(t),r=iu(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=pT(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},Zte=(t,e)=>{$l(new Error(Yte(t,e)),{recoverable:!1})},Xte={method:"POST",path:"/api/auth/sign-up/email"},Qte={method:"POST",path:"/api/auth/sign-in/email"},Jte=()=>{const[t,e]=_.useState("signIn"),[n,r]=_.useState(""),[s,o]=_.useState(""),[a,u]=_.useState(""),[c,f]=_.useState(null),[h,g]=_.useState(!1),[m,y]=_.useState(!1),S=m?"signIn":t,E=(w,A)=>{if(jX(w)){y(!0),e("signIn");return}const T=Wte(w);if(T==="fatal"){Zte(w,A);return}f(Gte(w,T))},C=async w=>{if(w.preventDefault(),h)return;f(null),g(!0);const A=S==="signUp"?Xte:Qte,T=await(S==="signUp"?xh.signUp.email({email:s,password:a,name:n}):xh.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),T&&E(T,A)};return O.jsxs(O.Fragment,{children:[O.jsx(F9,{}),O.jsxs(S9,{children:[O.jsx(C9,{}),O.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?O.jsx(n_,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):O.jsxs("div",{className:"flex gap-1",children:[O.jsx(pi,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),O.jsx(pi,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&O.jsx(n_,{tone:"danger",children:c}),S==="signUp"&&O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),O.jsx(Lc,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),O.jsx(Lc,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),O.jsx(Lc,{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})]}),O.jsx(pi,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),O.jsx(E9,{note:j9({betterAuthEnabled:Uy(),cognitoConfigured:!1})})]})]})},ene=({children:t})=>{const{data:e,isPending:n}=xh.useSession();return n?O.jsx(dT,{}):e?O.jsx(O.Fragment,{children:t}):O.jsx(Jte,{})},tne=({children:t,fallback:e=null})=>{const{data:n}=xh.useSession();if(!n)return O.jsx(O.Fragment,{children:e});const r=async()=>{await xh.signOut(),sT()};return O.jsx(O.Fragment,{children:t({email:n.user.email??null,signOut:r})})},Iv={configure:()=>{},getToken:XX,resetToken:sT,Shell:ene,Account:tne};var bS,n3;function nne(){if(n3)return bS;n3=1;function t(){this.__data__=[],this.size=0}return bS=t,bS}var SS,r3;function ap(){if(r3)return SS;r3=1;function t(e,n){return e===n||e!==e&&n!==n}return SS=t,SS}var ES,s3;function qy(){if(s3)return ES;s3=1;var t=ap();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return ES=e,ES}var CS,o3;function rne(){if(o3)return CS;o3=1;var t=qy(),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 CS=r,CS}var wS,i3;function sne(){if(i3)return wS;i3=1;var t=qy();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return wS=e,wS}var xS,a3;function one(){if(a3)return xS;a3=1;var t=qy();function e(n){return t(this.__data__,n)>-1}return xS=e,xS}var _S,l3;function ine(){if(l3)return _S;l3=1;var t=qy();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 _S=e,_S}var AS,u3;function Wy(){if(u3)return AS;u3=1;var t=nne(),e=rne(),n=sne(),r=one(),s=ine();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,AS=o,AS}var TS,c3;function ane(){if(c3)return TS;c3=1;var t=Wy();function e(){this.__data__=new t,this.size=0}return TS=e,TS}var RS,d3;function lne(){if(d3)return RS;d3=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return RS=t,RS}var IS,f3;function une(){if(f3)return IS;f3=1;function t(e){return this.__data__.get(e)}return IS=t,IS}var OS,h3;function cne(){if(h3)return OS;h3=1;function t(e){return this.__data__.has(e)}return OS=t,OS}var NS,p3;function B9(){if(p3)return NS;p3=1;var t=typeof Ug=="object"&&Ug&&Ug.Object===Object&&Ug;return NS=t,NS}var MS,g3;function No(){if(g3)return MS;g3=1;var t=B9(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return MS=n,MS}var PS,m3;function Vy(){if(m3)return PS;m3=1;var t=No(),e=t.Symbol;return PS=e,PS}var kS,v3;function dne(){if(v3)return kS;v3=1;var t=Vy(),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 h=r.call(a);return f&&(u?a[s]=c:delete a[s]),h}return kS=o,kS}var DS,y3;function fne(){if(y3)return DS;y3=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return DS=n,DS}var LS,b3;function md(){if(b3)return LS;b3=1;var t=Vy(),e=dne(),n=fne(),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 LS=a,LS}var US,S3;function Ti(){if(S3)return US;S3=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return US=t,US}var FS,E3;function gT(){if(E3)return FS;E3=1;var t=md(),e=Ti(),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 FS=a,FS}var zS,C3;function hne(){if(C3)return zS;C3=1;var t=No(),e=t["__core-js_shared__"];return zS=e,zS}var jS,w3;function pne(){if(w3)return jS;w3=1;var t=hne(),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 jS=n,jS}var BS,x3;function H9(){if(x3)return BS;x3=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 BS=n,BS}var HS,_3;function gne(){if(_3)return HS;_3=1;var t=gT(),e=pne(),n=Ti(),r=H9(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,h=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)?h:o;return y.test(r(m))}return HS=g,HS}var $S,A3;function mne(){if(A3)return $S;A3=1;function t(e,n){return e?.[n]}return $S=t,$S}var qS,T3;function au(){if(T3)return qS;T3=1;var t=gne(),e=mne();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return qS=n,qS}var WS,R3;function mT(){if(R3)return WS;R3=1;var t=au(),e=No(),n=t(e,"Map");return WS=n,WS}var VS,I3;function Gy(){if(I3)return VS;I3=1;var t=au(),e=t(Object,"create");return VS=e,VS}var GS,O3;function vne(){if(O3)return GS;O3=1;var t=Gy();function e(){this.__data__=t?t(null):{},this.size=0}return GS=e,GS}var KS,N3;function yne(){if(N3)return KS;N3=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return KS=t,KS}var YS,M3;function bne(){if(M3)return YS;M3=1;var t=Gy(),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 YS=s,YS}var ZS,P3;function Sne(){if(P3)return ZS;P3=1;var t=Gy(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return ZS=r,ZS}var XS,k3;function Ene(){if(k3)return XS;k3=1;var t=Gy(),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 XS=n,XS}var QS,D3;function Cne(){if(D3)return QS;D3=1;var t=vne(),e=yne(),n=bne(),r=Sne(),s=Ene();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,QS=o,QS}var JS,L3;function wne(){if(L3)return JS;L3=1;var t=Cne(),e=Wy(),n=mT();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return JS=r,JS}var eE,U3;function xne(){if(U3)return eE;U3=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return eE=t,eE}var tE,F3;function Ky(){if(F3)return tE;F3=1;var t=xne();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return tE=e,tE}var nE,z3;function _ne(){if(z3)return nE;z3=1;var t=Ky();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return nE=e,nE}var rE,j3;function Ane(){if(j3)return rE;j3=1;var t=Ky();function e(n){return t(this,n).get(n)}return rE=e,rE}var sE,B3;function Tne(){if(B3)return sE;B3=1;var t=Ky();function e(n){return t(this,n).has(n)}return sE=e,sE}var oE,H3;function Rne(){if(H3)return oE;H3=1;var t=Ky();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 oE=e,oE}var iE,$3;function vT(){if($3)return iE;$3=1;var t=wne(),e=_ne(),n=Ane(),r=Tne(),s=Rne();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,iE=o,iE}var aE,q3;function Ine(){if(q3)return aE;q3=1;var t=Wy(),e=mT(),n=vT(),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 aE=s,aE}var lE,W3;function yT(){if(W3)return lE;W3=1;var t=Wy(),e=ane(),n=lne(),r=une(),s=cne(),o=Ine();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,lE=a,lE}var uE,V3;function One(){if(V3)return uE;V3=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return uE=e,uE}var cE,G3;function Nne(){if(G3)return cE;G3=1;function t(e){return this.__data__.has(e)}return cE=t,cE}var dE,K3;function Mne(){if(K3)return dE;K3=1;var t=vT(),e=One(),n=Nne();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,dE=r,dE}var fE,Y3;function Pne(){if(Y3)return fE;Y3=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 fE=t,fE}var hE,Z3;function kne(){if(Z3)return hE;Z3=1;function t(e,n){return e.has(n)}return hE=t,hE}var pE,X3;function $9(){if(X3)return pE;X3=1;var t=Mne(),e=Pne(),n=kne(),r=1,s=2;function o(a,u,c,f,h,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,A=!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 N=m?f(M,R,w,u,a,g):f(R,M,w,a,u,g);if(N!==void 0){if(N)continue;A=!1;break}if(T){if(!e(u,function(I,k){if(!n(T,k)&&(R===I||h(R,I,c,f,g)))return T.push(k)})){A=!1;break}}else if(!(R===M||h(R,M,c,f,g))){A=!1;break}}return g.delete(a),g.delete(u),A}return pE=o,pE}var gE,Q3;function q9(){if(Q3)return gE;Q3=1;var t=No(),e=t.Uint8Array;return gE=e,gE}var mE,J3;function Dne(){if(J3)return mE;J3=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return mE=t,mE}var vE,ek;function Lne(){if(ek)return vE;ek=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return vE=t,vE}var yE,tk;function Une(){if(tk)return yE;tk=1;var t=Vy(),e=q9(),n=ap(),r=$9(),s=Dne(),o=Lne(),a=1,u=2,c="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Map]",m="[object Number]",y="[object RegExp]",S="[object Set]",E="[object String]",C="[object Symbol]",w="[object ArrayBuffer]",A="[object DataView]",T=t?t.prototype:void 0,R=T?T.valueOf:void 0;function M(N,I,k,F,H,D,z){switch(k){case A:if(N.byteLength!=I.byteLength||N.byteOffset!=I.byteOffset)return!1;N=N.buffer,I=I.buffer;case w:return!(N.byteLength!=I.byteLength||!D(new e(N),new e(I)));case c:case f:case m:return n(+N,+I);case h:return N.name==I.name&&N.message==I.message;case y:case E:return N==I+"";case g:var q=s;case S:var V=F&a;if(q||(q=o),N.size!=I.size&&!V)return!1;var ee=z.get(N);if(ee)return ee==I;F|=u,z.set(N,I);var $=r(q(N),q(I),F,H,D,z);return z.delete(N),$;case C:if(R)return R.call(N)==R.call(I)}return!1}return yE=M,yE}var bE,nk;function W9(){if(nk)return bE;nk=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 bE=t,bE}var SE,rk;function Ri(){if(rk)return SE;rk=1;var t=Array.isArray;return SE=t,SE}var EE,sk;function V9(){if(sk)return EE;sk=1;var t=W9(),e=Ri();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return EE=n,EE}var CE,ok;function Fne(){if(ok)return CE;ok=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 CE=t,CE}var wE,ik;function G9(){if(ik)return wE;ik=1;function t(){return[]}return wE=t,wE}var xE,ak;function K9(){if(ak)return xE;ak=1;var t=Fne(),e=G9(),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 xE=o,xE}var _E,lk;function zne(){if(lk)return _E;lk=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return _E=t,_E}var AE,uk;function lu(){if(uk)return AE;uk=1;function t(e){return e!=null&&typeof e=="object"}return AE=t,AE}var TE,ck;function jne(){if(ck)return TE;ck=1;var t=md(),e=lu(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return TE=r,TE}var RE,dk;function bT(){if(dk)return RE;dk=1;var t=jne(),e=lu(),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 RE=o,RE}var Jf={exports:{}},IE,fk;function Bne(){if(fk)return IE;fk=1;function t(){return!1}return IE=t,IE}Jf.exports;var hk;function ST(){return hk||(hk=1,(function(t,e){var n=No(),r=Bne(),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})(Jf,Jf.exports)),Jf.exports}var OE,pk;function Yy(){if(pk)return OE;pk=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 OE=n,OE}var NE,gk;function ET(){if(gk)return NE;gk=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return NE=e,NE}var ME,mk;function Hne(){if(mk)return ME;mk=1;var t=md(),e=ET(),n=lu(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",g="[object Object]",m="[object RegExp]",y="[object Set]",S="[object String]",E="[object WeakMap]",C="[object ArrayBuffer]",w="[object DataView]",A="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",N="[object Int32Array]",I="[object Uint8Array]",k="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",D={};D[A]=D[T]=D[R]=D[M]=D[N]=D[I]=D[k]=D[F]=D[H]=!0,D[r]=D[s]=D[C]=D[o]=D[w]=D[a]=D[u]=D[c]=D[f]=D[h]=D[g]=D[m]=D[y]=D[S]=D[E]=!1;function z(q){return n(q)&&e(q.length)&&!!D[t(q)]}return ME=z,ME}var PE,vk;function $ne(){if(vk)return PE;vk=1;function t(e){return function(n){return e(n)}}return PE=t,PE}var eh={exports:{}};eh.exports;var yk;function qne(){return yk||(yk=1,(function(t,e){var n=B9(),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})(eh,eh.exports)),eh.exports}var kE,bk;function CT(){if(bk)return kE;bk=1;var t=Hne(),e=$ne(),n=qne(),r=n&&n.isTypedArray,s=r?e(r):t;return kE=s,kE}var DE,Sk;function Y9(){if(Sk)return DE;Sk=1;var t=zne(),e=bT(),n=Ri(),r=ST(),s=Yy(),o=CT(),a=Object.prototype,u=a.hasOwnProperty;function c(f,h){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 A in f)(h||u.call(f,A))&&!(E&&(A=="length"||y&&(A=="offset"||A=="parent")||S&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||s(A,w)))&&C.push(A);return C}return DE=c,DE}var LE,Ek;function wT(){if(Ek)return LE;Ek=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return LE=e,LE}var UE,Ck;function Z9(){if(Ck)return UE;Ck=1;function t(e,n){return function(r){return e(n(r))}}return UE=t,UE}var FE,wk;function Wne(){if(wk)return FE;wk=1;var t=Z9(),e=t(Object.keys,Object);return FE=e,FE}var zE,xk;function Vne(){if(xk)return zE;xk=1;var t=wT(),e=Wne(),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 zE=s,zE}var jE,_k;function Zy(){if(_k)return jE;_k=1;var t=gT(),e=ET();function n(r){return r!=null&&e(r.length)&&!t(r)}return jE=n,jE}var BE,Ak;function X9(){if(Ak)return BE;Ak=1;var t=Y9(),e=Vne(),n=Zy();function r(s){return n(s)?t(s):e(s)}return BE=r,BE}var HE,Tk;function Gne(){if(Tk)return HE;Tk=1;var t=V9(),e=K9(),n=X9();function r(s){return t(s,n,e)}return HE=r,HE}var $E,Rk;function Kne(){if(Rk)return $E;Rk=1;var t=Gne(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,a,u,c,f,h){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 A=h.get(o),T=h.get(a);if(A&&T)return A==a&&T==o;var R=!0;h.set(o,a),h.set(a,o);for(var M=g;++C<y;){w=m[C];var N=o[w],I=a[w];if(c)var k=g?c(I,N,w,a,o,h):c(N,I,w,o,a,h);if(!(k===void 0?N===I||f(N,I,u,c,h):k)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var F=o.constructor,H=a.constructor;F!=H&&"constructor"in o&&"constructor"in a&&!(typeof F=="function"&&F instanceof F&&typeof H=="function"&&H instanceof H)&&(R=!1)}return h.delete(o),h.delete(a),R}return $E=s,$E}var qE,Ik;function Yne(){if(Ik)return qE;Ik=1;var t=au(),e=No(),n=t(e,"DataView");return qE=n,qE}var WE,Ok;function Zne(){if(Ok)return WE;Ok=1;var t=au(),e=No(),n=t(e,"Promise");return WE=n,WE}var VE,Nk;function Xne(){if(Nk)return VE;Nk=1;var t=au(),e=No(),n=t(e,"Set");return VE=n,VE}var GE,Mk;function Qne(){if(Mk)return GE;Mk=1;var t=au(),e=No(),n=t(e,"WeakMap");return GE=n,GE}var KE,Pk;function Jne(){if(Pk)return KE;Pk=1;var t=Yne(),e=mT(),n=Zne(),r=Xne(),s=Qne(),o=md(),a=H9(),u="[object Map]",c="[object Object]",f="[object Promise]",h="[object Set]",g="[object WeakMap]",m="[object DataView]",y=a(t),S=a(e),E=a(n),C=a(r),w=a(s),A=o;return(t&&A(new t(new ArrayBuffer(1)))!=m||e&&A(new e)!=u||n&&A(n.resolve())!=f||r&&A(new r)!=h||s&&A(new s)!=g)&&(A=function(T){var R=o(T),M=R==c?T.constructor:void 0,N=M?a(M):"";if(N)switch(N){case y:return m;case S:return u;case E:return f;case C:return h;case w:return g}return R}),KE=A,KE}var YE,kk;function ere(){if(kk)return YE;kk=1;var t=yT(),e=$9(),n=Une(),r=Kne(),s=Jne(),o=Ri(),a=ST(),u=CT(),c=1,f="[object Arguments]",h="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,A,T,R){var M=o(E),N=o(C),I=M?h:s(E),k=N?h:s(C);I=I==f?g:I,k=k==f?g:k;var F=I==g,H=k==g,D=I==k;if(D&&a(E)){if(!a(C))return!1;M=!0,F=!1}if(D&&!F)return R||(R=new t),M||u(E)?e(E,C,w,A,T,R):n(E,C,I,w,A,T,R);if(!(w&c)){var z=F&&y.call(E,"__wrapped__"),q=H&&y.call(C,"__wrapped__");if(z||q){var V=z?E.value():E,ee=q?C.value():C;return R||(R=new t),T(V,ee,w,A,R)}}return D?(R||(R=new t),r(E,C,w,A,T,R)):!1}return YE=S,YE}var ZE,Dk;function Q9(){if(Dk)return ZE;Dk=1;var t=ere(),e=lu();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 ZE=n,ZE}var XE={exports:{}},QE={};var Lk;function tre(){if(Lk)return QE;Lk=1;var t=ip(),e=eQ();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}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 QE.useSyncExternalStoreWithSelector=function(f,h,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(N){if(!A){if(A=!0,T=N,N=m(N),y!==void 0&&E.hasValue){var I=E.value;if(y(I,N))return R=I}return R=N}if(I=R,r(T,N))return I;var k=m(N);return y!==void 0&&y(I,k)?(T=N,I):(T=N,R=k)}var A=!1,T,R,M=g===void 0?null:g;return[function(){return w(h())},M===null?void 0:function(){return w(M())}]},[h,g,m,y]);var C=s(f,S[0],S[1]);return a(function(){E.hasValue=!0,E.value=C},[C]),c(C),C},QE}var Uk;function nre(){return Uk||(Uk=1,XE.exports=tre()),XE.exports}var xT=nre();const gRe=Va(xT);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 _T(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 Jt(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 Dt;(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"})(Dt||(Dt={}));var ql;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(ql||(ql={}));var a_=Dt.Start,AT=Dt.Stop,lp=Dt.Raise,Xy=Dt.Send,J9=Dt.Cancel,rre=Dt.NullEvent,TT=Dt.Assign;Dt.After;Dt.DoneState;var eF=Dt.Log,sre=Dt.Init,l_=Dt.Invoke;Dt.ErrorExecution;var Fk=Dt.ErrorPlatform,ore=Dt.ErrorCustom,RT=Dt.Update,ire=Dt.Choose,are=Dt.Pure,tF=".",zk={},u_="xstate.guard",lre="",Zg;function IT(t,e,n){n===void 0&&(n=tF);var r=fh(t,n),s=fh(e,n);return Ot(s)?Ot(r)?s===r:!1:Ot(r)?r in s:Object.keys(r).every(function(o){return o in s?IT(r[o],s[o]):!1})}function nF(t){try{return Ot(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 c_(t,e){try{return vd(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function ure(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function fh(t,e){if(ure(t))return t.value;if(vd(t))return Ov(t);if(typeof t!="string")return t;var n=c_(t,e);return Ov(n)}function Ov(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 th(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 jk(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(h){r={error:h}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}var cre=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 dre(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 rv(t){if(!t)return[[]];if(Ot(t))return[[t]];var e=dn(Object.keys(t).map(function(n){var r=t[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:rv(t[n]).map(function(s){return[n].concat(s)})}));return e}function dn(t){var e;return(e=[]).concat.apply(e,Jt([],At(t),!1))}function rF(t){return vd(t)?t:[t]}function Hs(t){return t===void 0?[]:rF(t)}function Nv(t,e,n){var r,s;if(Nt(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];Nt(f)?o[c]=f(e,n.data):o[c]=f}}catch(h){r={error:h}}finally{try{u&&!u.done&&(s=a.return)&&s.call(a)}finally{if(r)throw r.error}}return o}function fre(t){return/^(done|error)\./.test(t)}function Bk(t){return!!(t instanceof Promise||t!==null&&(Nt(t)||typeof t=="object")&&Nt(t.then))}function hre(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function pre(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(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[o,a]}function sF(t,e){return th(t.states,function(n,r){if(n){var s=(Ot(e)?void 0:e[r])||(n?n.current:void 0);if(s)return{current:s,states:sF(n,s)}}})}function gre(t,e){return{current:e,states:sF(t,e)}}function Hk(t,e,n,r){var s=t&&n.reduce(function(o,a){var u,c,f=a.assignment,h={state:r,action:a,_event:e},g={};if(Nt(f))g=f(o,e.data,h);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]=Nt(E)?E(o,e.data,h):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 mre=function(){};function vd(t){return Array.isArray(t)}function Nt(t){return typeof t=="function"}function Ot(t){return typeof t=="string"}function oF(t,e){if(t)return Ot(t)?{type:u_,name:t,predicate:e?e[t]:void 0}:Nt(t)?{type:u_,name:t.name,predicate:t}:t}function vre(t){try{return"subscribe"in t&&Nt(t.subscribe)}catch{return!1}}var xa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Zg={},Zg[xa]=function(){return this},Zg[Symbol.observable]=function(){return this};function qc(t){return!!t&&"__xstatenode"in t}function yre(t){return!!t&&typeof t.send=="function"}var bre=(function(){var t=0;return function(){return t++,t.toString(16)}})();function Qy(t,e){return Ot(t)||typeof t=="number"?me({type:t},e):t}function nr(t,e){if(!Ot(t)&&"$$type"in t&&t.$$type==="scxml")return t;var n=Qy(t);return me({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function rc(t,e){var n=rF(e).map(function(r){return typeof r>"u"||typeof r=="string"||qc(r)?{target:r,event:t}:me(me({},r),{event:t})});return n}function Sre(t){if(!(t===void 0||t===lre))return Hs(t)}function iF(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===u_)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 aF(t){return typeof t=="string"?{type:t}:t}function hh(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 Xg(t,e){return"".concat(t,":invocation[").concat(e,"]")}function d_(t){return(t.type===lp||t.type===Xy&&t.to===ql.Internal)&&typeof t.delay!="number"}var Pl=nr({type:sre});function Mv(t,e){return e&&e[t]||void 0}function Wc(t,e){var n;if(Ot(t)||typeof t=="number"){var r=Mv(t,e);Nt(r)?n={type:t,exec:r}:r?n=r:n={type:t,exec:void 0}}else if(Nt(t))n={type:t.name||t.toString(),exec:t};else{var r=Mv(t.type,e);if(Nt(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 ui=function(t,e){if(!t)return[];var n=vd(t)?t:[t];return n.map(function(r){return Wc(r,e)})};function Jy(t){var e=Wc(t);return me(me({id:Ot(t)?t:e.id},e),{type:e.type})}function lF(t,e){return{type:lp,event:typeof t=="function"?t:Qy(t),delay:e?e.delay:void 0,id:e?.id}}function uF(t,e,n,r){var s={_event:n},o=nr(Nt(t.event)?t.event(e,n.data,s):t.event),a;if(Ot(t.delay)){var u=r&&r[t.delay];a=Nt(u)?u(e,n.data,s):u}else a=Nt(t.delay)?t.delay(e,n.data,s):t.delay;return me(me({},t),{type:lp,_event:o,delay:a})}function eb(t,e){return{to:e?e.to:void 0,type:Xy,event:Nt(t)?t:Qy(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:Nt(t)?t.name:nF(t)}}function cF(t,e,n,r){var s={_event:n},o=nr(Nt(t.event)?t.event(e,n.data,s):t.event),a;if(Ot(t.delay)){var u=r&&r[t.delay];a=Nt(u)?u(e,n.data,s):u}else a=Nt(t.delay)?t.delay(e,n.data,s):t.delay;var c=Nt(t.to)?t.to(e,n.data,s):t.to;return me(me({},t),{to:c,_event:o,event:o.data,delay:a})}function dF(t,e){return eb(t,me(me({},e),{to:ql.Parent}))}function fF(){return dF(RT)}var hF=function(t,e,n){return me(me({},t),{value:Ot(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},pF=function(t){return{type:J9,sendId:t}};function gF(t){var e=Jy(t);return{type:Dt.Start,activity:e,exec:void 0}}function mF(t){var e=Nt(t)?t:Jy(t);return{type:Dt.Stop,activity:e,exec:void 0}}function vF(t,e,n){var r=Nt(t.activity)?t.activity(e,n.data):t.activity,s=typeof r=="string"?{id:r}:r,o={type:Dt.Stop,activity:s};return o}var yF=function(t){return{type:TT,assignment:t}};function bF(t,e){var n=e?"#".concat(e):"";return"".concat(Dt.After,"(").concat(t,")").concat(n)}function nh(t,e){var n="".concat(Dt.DoneState,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function ph(t,e){var n="".concat(Dt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function _c(t,e){var n="".concat(Dt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function SF(t,e){return eb(function(n,r){return r},me(me({},e),{to:t}))}function Ere(t){return{type:Dt.Choose,conds:t}}var Cre=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===TT){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 Rh(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:Cre(s),c=u.length?Hk(n,r,u,e):n,f=a?[n]:void 0,h=[];function g(S,E){var C;switch(E.type){case lp:{var w=uF(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case Xy:var A=cF(E,c,r,t.options.delays);return o&&A.to!==ql.Internal&&(S==="entry"?h.push(A):o(A,c,r)),A;case eF:{var T=hF(E,c,r);return o?.(T,c,r),T}case ire:{var R=E,M=(C=R.conds.find(function($){var te=oF($.cond,t.options.guards);return!te||iF(t,te,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var N=At(Rh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),I=N[0],k=N[1];return c=k,f?.push(c),I}case are:{var M=E.get(c,r.data);if(!M)return[];var F=At(Rh(t,e,c,r,[{type:S,actions:ui(Hs(M),t.options.actions)}],o,a),2),H=F[0],D=F[1];return c=D,f?.push(c),H}case AT:{var T=vF(E,c,r);return o?.(T,n,r),T}case TT:{c=Hk(c,r,[E],o?void 0:e),f?.push(c);break}default:var z=Wc(E,t.options.actions),q=z.exec;if(o)o(z,c,r);else if(q&&f){var V=f.length-1,ee=me(me({},z),{exec:function($){for(var te=[],fe=1;fe<arguments.length;fe++)te[fe-1]=arguments[fe];q.apply(void 0,Jt([f[V]],At(te),!1))}});z=ee}return z}}function m(S){var E,C,w=[];try{for(var A=ht(S.actions),T=A.next();!T.done;T=A.next()){var R=T.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(N){E={error:N}}finally{try{T&&!T.done&&(C=A.return)&&C.call(A)}finally{if(E)throw E.error}}return h.forEach(function(N){o(N,c,r)}),h.length=0,w}var y=dn(s.map(m));return[y,c]}const EF=Object.freeze(Object.defineProperty({__proto__:null,after:bF,assign:yF,cancel:pF,choose:Ere,done:nh,doneInvoke:ph,error:_c,forwardTo:SF,getActionFunction:Mv,initEvent:Pl,raise:lF,resolveActions:Rh,resolveLog:hF,resolveRaise:uF,resolveSend:cF,resolveStop:vF,send:eb,sendParent:dF,sendUpdate:fF,start:gF,stop:mF,toActionObject:Wc,toActionObjects:ui,toActivityDefinition:Jy},Symbol.toStringTag,{value:"Module"}));var Pv=[],yc=function(t,e){Pv.push(t);var n=e(t);return Pv.pop(),n},wre=function(t){return t(Pv[Pv.length-1])};function CF(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[xa]=function(){return this},e}function xre(t,e,n,r){var s,o=aF(t.src),a=(s=e?.options.services)===null||s===void 0?void 0:s[o.type],u=t.data?Nv(t.data,n,r):void 0,c=a?OT(a,t.id,u):CF(t.id);return c.meta=t,c}function OT(t,e,n){var r=CF(e);if(r.deferred=!0,qc(t)){var s=r.state=yc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function _re(t){try{return typeof t.send=="function"}catch{return!1}}function Are(t){return _re(t)&&"id"in t}function Tre(t){var e;return me((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[xa]=function(){return this},e),t)}var kv=function(t){return t.type==="atomic"||t.type==="final"};function wF(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Ih(t){return wF(t).filter(function(e){return e.type!=="history"})}function xF(t){var e=[t];return kv(t)?e:e.concat(dn(Ih(t).map(xF)))}function rh(t,e){var n,r,s,o,a,u,c,f,h=new Set(t),g=f_(h),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(F){n={error:F}}finally{try{S&&!S.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}var w=f_(m);try{for(var A=ht(m),T=A.next();!T.done;T=A.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(Ih(E))),M=R.next();!M.done;M=R.next()){var N=M.value;m.has(N)||(m.add(N),g.get(N)?g.get(N).forEach(function(H){return m.add(H)}):N.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(F){s={error:F}}finally{try{T&&!T.done&&(o=A.return)&&o.call(A)}finally{if(s)throw s.error}}try{for(var I=ht(m),k=I.next();!k.done;k=I.next())for(var E=k.value,C=E.parent;C&&!m.has(C);)m.add(C),C=C.parent}catch(F){c={error:F}}finally{try{k&&!k.done&&(f=I.return)&&f.call(I)}finally{if(c)throw c.error}}return m}function _F(t,e){var n=e.get(t);if(!n)return{};if(t.type==="compound"){var r=n[0];if(r){if(kv(r))return r.key}else return{}}var s={};return n.forEach(function(o){s[o.key]=_F(o,e)}),s}function f_(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 Rre(t,e){var n=rh([t],e);return _F(t,f_(n))}function sh(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function Ire(t){return Jt([],At(new Set(dn(Jt([],At(t.map(function(e){return e.ownEvents})),!1)))),!1)}function sv(t,e){return e.type==="compound"?Ih(e).some(function(n){return n.type==="final"&&sh(t,n)}):e.type==="parallel"?Ih(e).every(function(n){return sv(t,n)}):!1}function Ore(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function $k(t){return new Set(dn(t.map(function(e){return e.tags})))}function AF(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(Ot(t)||Ot(e))return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(s){return AF(t[s],e[s])})}function Nre(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function Mre(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=zk,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||zk,this.meta=Ore(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 Ire(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=Pl;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=Pl;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="."),Ot(e))return[e];var s=Object.keys(e);return s.concat.apply(s,Jt([],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=_T(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return IT(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;mre(!!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})(),Pre={deferEvents:!1},qk=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},Pre),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})(),JE=new Map,kre=0,Mf={bookId:function(){return"x:".concat(kre++)},register:function(t,e){return JE.set(t,e),t},get:function(t){return JE.get(t)},free:function(t){JE.delete(t)}};function NT(){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 Dre(){var t=NT();if(t&&"__xstate__"in t)return t.__xstate__}function Lre(t){if(NT()){var e=Dre();e&&e.register(t)}}function Ure(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(h){return h.next(n)})}o=!1}},u=Tre({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,g){var m=hh(f,h,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 h_={sync:!1,autoForward:!1},Pn;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(Pn||(Pn={}));var Fre=(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=Pn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,g){if(vd(h))return r.batch(h),r.state;var m=nr(Qy(h,g));if(r.status===Pn.Stopped)return r.state;if(r.status!==Pn.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.
|
|
154
|
-
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(h,g,m){var y=r.parent&&(g===ql.Parent||r.parent.id===g),S=y?r.parent:Ot(g)?g===ql.Internal?r:r.children.get(g)||Mf.get(g):yre(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!==Pn.Stopped||r.parent!==S||r.state.done){var E=me(me({},h),{name:h.name===ore?"".concat(_c(r.id)):h.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,h.data]):S.send(h.data)},this._exec=function(h,g,m,y){y===void 0&&(y=r.machine.options.actions);var S=h.exec||Mv(h.type,y),E=Nt(S)?S:S?S.exec:h.exec;if(E)try{return E(g,m.data,r.machine.config.predictableActionArguments?{action:h,_event:m}:{action:h,state:r.state,_event:m})}catch(V){throw r.parent&&r.parent.send({type:"xstate.error",data:V}),V}switch(h.type){case lp:{var C=h;r.defer(C);break}case Xy:var w=h;if(typeof w.delay=="number"){r.defer(w);return}else w.to?r.sendTo(w._event,w.to,m===Pl):r.send(w._event);break;case J9:r.cancel(h.sendId);break;case a_:{if(r.status!==Pn.Running)return;var A=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[A.id||A.type])break;if(A.type===Dt.Invoke){var T=aF(A.src),R=r.machine.options.services?r.machine.options.services[T.type]:void 0,M=A.id,N=A.data,I="autoForward"in A?A.autoForward:!!A.forward;if(!R)return;var k=N?Nv(N,g,m):void 0;if(typeof R=="string")return;var F=Nt(R)?R(g,m.data,{data:k,src:T,meta:A.meta}):R;if(!F)return;var H=void 0;qc(F)&&(F=k?F.withContext(k):F,H={autoForward:I}),r.spawn(F,M,H)}else r.spawnActivity(A);break}case AT:{r.stopChild(h.activity.id);break}case eF:var D=h,z=D.label,q=D.value;z?r.logger(z,q):r.logger(q);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 qk({deferEvents:this.options.deferEvents}),this.sessionId=Mf.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:yc(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,h,g=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||n===Pl)&&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(F){g.state.children[F.id]=F}),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(F){r={error:F}}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(F){o={error:F}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var A=ht(this.contextListeners),T=A.next();!T.done;T=A.next()){var R=T.value;R(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(F){u={error:F}}finally{try{T&&!T.done&&(c=A.return)&&c.call(A)}finally{if(u)throw u.error}}if(this.state.done){var M=e.configuration.find(function(F){return F.type==="final"&&F.parent===g.machine}),N=M&&M.doneData?Nv(M.doneData,e.context,n):void 0;this._doneEvent=ph(this.id,N);try{for(var I=ht(this.doneListeners),k=I.next();!k.done;k=I.next()){var E=k.value;E(this._doneEvent)}}catch(F){f={error:F}}finally{try{k&&!k.done&&(h=I.return)&&h.call(I)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Mf.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Pn.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,n,r){var s=this,o=hh(e,n,r);this.listeners.add(o.next),this.status!==Pn.NotStarted&&o.next(this.state);var a=function(){s.doneListeners.delete(a),s.stopListeners.delete(a),o.complete()};return this.status===Pn.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===Pn.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===Pn.Running)return this;this.machine._init(),Mf.register(this.sessionId,this),this.initialized=!0,this.status=Pn.Running;var r=e===void 0?this.initialState:yc(this,function(){return Nre(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,Pl)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){Nt(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,n,r,s,o,a,u,c,f,h;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 A=ht(this.doneListeners),T=A.next();!T.done;T=A.next()){var y=T.value;this.doneListeners.delete(y)}}catch(I){u={error:I}}finally{try{T&&!T.done&&(c=A.return)&&c.call(A)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Pn.Stopped,this._initialState=void 0;try{for(var R=ht(Object.keys(this.delayedEventsMap)),M=R.next();!M.done;M=R.next()){var N=M.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(I){f={error:I}}finally{try{M&&!M.done&&(h=R.return)&&h.call(R)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new qk({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=nr({type:"xstate.stop"}),o=yc(e,function(){var a=dn(Jt([],At(e.state.configuration),!1).sort(function(g,m){return m.order-g.order}).map(function(g){return ui(g.onExit,e.machine.options.actions)})),u=At(Rh(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],h=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!d_(g)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return h.changed=!0,h});e.update(o,s),e._stopChildren(),Mf.free(e.sessionId)}}),this},t.prototype.batch=function(e){var n=this;if(!(this.status===Pn.NotStarted&&this.options.deferEvents)){if(this.status!==Pn.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=nr(y);n.forward(S),a=yc(n,function(){return n.machine.transition(a,S,void 0,r||void 0)}),c.push.apply(c,Jt([],At(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(E){return Mre(E,a)})),!1)),u=u||!!a.changed};try{for(var h=ht(e),g=h.next();!g.done;g=h.next()){var m=g.value;f(m)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}a.changed=u,a.actions=c,n.update(a,nr(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=nr(e);if(s.name.indexOf(Fk)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Fk)===0}))throw s.data.data;var o=yc(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),Nt(n.stop)&&n.stop())},t.prototype.spawn=function(e,n,r){if(this.status!==Pn.Running)return OT(e,n);if(Bk(e))return this.spawnPromise(Promise.resolve(e),n);if(Nt(e))return this.spawnCallback(e,n);if(Are(e))return this.spawnActor(e,n);if(vre(e))return this.spawnObservable(e,n);if(qc(e))return this.spawnMachine(e,me(me({},r),{id:n}));if(hre(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({},h_),n);o.sync&&s.onTransition(function(u){r.send(RT,{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(nr(u,{origin:s.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=Ure(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(nr(ph(n,c),{origin:n})))},function(c){if(!o){s.removeChild(n);var f=_c(n,c);try{s.send(nr(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,h){var g=hh(c,f,h),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[xa]=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(nr(m,{origin:n}))},h;try{h=e(f,function(m){a.add(m)})}catch(m){this.send(_c(n,m))}if(Bk(h))return this.spawnPromise(h,n);var g=(r={id:n,send:function(m){return a.forEach(function(y){return y(m)})},subscribe:function(m){var y=hh(m);return u.add(y.next),{unsubscribe:function(){u.delete(y.next)}}},stop:function(){o=!0,Nt(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[xa]=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(nr(c,{origin:n}))},function(c){s.removeChild(n),s.send(nr(_c(n,c),{origin:n}))},function(){s.removeChild(n),s.send(nr(ph(n),{origin:n}))}),u=(r={id:n,send:function(){},subscribe:function(c,f,h){return e.subscribe(c,f,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},r[xa]=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[xa]=function(){return this},r))},t.prototype.attachDev=function(){var e=NT();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)}Lre(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[xa]=function(){return this},t.prototype.getSnapshot=function(){return this.status===Pn.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=TF,t})(),zre=function(t){return Ot(t)?me(me({},h_),{name:t}):me(me(me({},h_),{name:bre()}),t)};function Pf(t,e){var n=zre(e);return wre(function(r){return r?r.spawn(t,n.name,n):OT(t,n.name)})}function TF(t,e){var n=new Fre(t,e);return n}function jre(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Qg(t){return me(me({type:l_},t),{toJSON:function(){t.onDone,t.onError;var e=_T(t,["onDone","onError"]);return me(me({},e),{type:l_,src:jre(t.src)})}})}var Jg="",p_="#",eC="*",sc={},oc=function(t){return t[0]===p_},Bre=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Hre=(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(Bre(),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:tF),this.id=this.config.id||Jt([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?th(this.config.states,function(f,h){var g,m=new t(f,{},void 0,{parent:o,key:h});return Object.assign(o.idMap,me((g={},g[m.id]=m,g),m.idMap)),m}):sc;var u=0;function c(f){var h,g;f.order=u++;try{for(var m=ht(wF(f)),y=m.next();!y.done;y=m.next()){var S=y.value;c(S)}}catch(E){h={error:E}}finally{try{y&&!y.done&&(g=m.return)&&g.call(m)}finally{if(h)throw h.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 h=f.event;return h===Jg}):Jg in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Hs(this.config.entry||this.config.onEntry).map(function(f){return Wc(f)}),this.onExit=Hs(this.config.exit||this.config.onExit).map(function(f){return Wc(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,h){var g,m;if(qc(f)){var y=Xg(o.id,h);return o.machine.options.services=me((g={},g[y]=f,g),o.machine.options.services),Qg({src:y,id:y})}else if(Ot(f.src)){var y=f.id||Xg(o.id,h);return Qg(me(me({},f),{id:y,src:f.src}))}else if(qc(f.src)||Nt(f.src)){var y=f.id||Xg(o.id,h);return o.machine.options.services=me((m={},m[y]=f.src,m),o.machine.options.services),Qg(me(me({id:y},f),{src:y}))}else{var S=f.src;return Qg(me(me({id:Xg(o.id,h)},f),{src:S}))}}),this.activities=Hs(this.config.activities).concat(this.invoke).map(function(f){return Jy(f)}),this.transition=this.transition.bind(this),this.tags=Hs(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||xF(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 Nt(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:th(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===Jg,r=this.transitions.filter(function(s){var o=s.eventType===e;return n?o:o||s.eventType===eC});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=Nt(o)?"".concat(e.id,":delay[").concat(a,"]"):o,c=bF(u,e.id);return e.onEntry.push(eb(c,{delay:o})),e.onExit.push(pF(c)),c},s=vd(n)?n.map(function(o,a){var u=r(o.delay,a);return me(me({},o),{event:u})}):dn(Object.keys(n).map(function(o,a){var u=n[o],c=Ot(u)?{target:u}:u,f=isNaN(+o)?o:+o,h=r(f,a);return Hs(c).map(function(g){return me(me({},g),{event:h,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:fh(e,this.delimiter);if(Ot(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,Jt([],At(dn(a.map(function(c){return r.getStateNode(c).getStateNodes(s[c])}))),!1)),u},t.prototype.handles=function(e){var n=nF(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof $s?e:$s.create(e),r=Array.from(rh([],this.getStateNodes(n.value)));return new $s(me(me({},n),{value:this.resolve(n.value),configuration:r,done:sv(r,this),tags:$k(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,h=e[f];if(h){var g=this.getStateNode(f),m=g._transition(h,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=dn(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=dn(Object.keys(a).map(function(w){return a[w].configuration}));return{transitions:S,exitSet:dn(y.map(function(w){return w.exitSet})),configuration:C,source:n,actions:dn(Object.keys(a).map(function(w){return a[w].actions}))}},t.prototype._transition=function(e,n,r){return Ot(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,nr(n))},t.prototype.next=function(e,n){var r,s,o=this,a=n.name,u=[],c=[],f;try{for(var h=ht(this.getCandidates(a)),g=h.next();!g.done;g=h.next()){var m=g.value,y=m.cond,S=m.in,E=e.context,C=S?Ot(S)&&oc(S)?e.matches(fh(this.getStateNodeById(S).path,this.delimiter)):IT(fh(S,this.delimiter),cre(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!y||iF(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,`':
|
|
155
|
-
`).concat(R.message))}if(w&&C){m.target!==void 0&&(c=m.target),u.push.apply(u,Jt([],At(m.actions),!1)),f=m;break}}}catch(R){r={error:R}}finally{try{g&&!g.done&&(s=h.return)&&s.call(h)}finally{if(r)throw r.error}}if(f){if(!c.length)return{transitions:[f],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var A=dn(c.map(function(R){return o.getRelativeStateNodes(R,e.historyValue)})),T=!!f.internal;return{transitions:[f],exitSet:T?[]:dn(c.map(function(R){return o.getPotentiallyReenteringNodes(R)})),configuration:A,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,h,g,m=this,y=a?rh([],this.getStateNodes(a.value)):[],S=new Set;try{for(var E=ht(Array.from(e).sort(function(D,z){return D.order-z.order})),C=E.next();!C.done;C=E.next()){var w=C.value;(!sh(y,w)||sh(r.exitSet,w)||w.parent&&S.has(w.parent))&&S.add(w)}}catch(D){c={error:D}}finally{try{C&&!C.done&&(f=E.return)&&f.call(E)}finally{if(c)throw c.error}}try{for(var A=ht(y),T=A.next();!T.done;T=A.next()){var w=T.value;(!sh(e,w)||sh(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(D){h={error:D}}finally{try{T&&!T.done&&(g=A.return)&&g.call(A)}finally{if(h)throw h.error}}r.exitSet.sort(function(D,z){return z.order-D.order});var R=Array.from(S).sort(function(D,z){return D.order-z.order}),M=new Set(r.exitSet),N=dn(R.map(function(D){var z=[];if(D.type!=="final")return z;var q=D.parent;if(!q.parent)return z;z.push(nh(D.id,D.doneData),nh(q.id,D.doneData?Nv(D.doneData,s,o):void 0));var V=q.parent;return V.type==="parallel"&&Ih(V).every(function(ee){return sv(r.configuration,ee)})&&z.push(nh(V.id)),z})),I=R.map(function(D){var z=D.onEntry,q=D.activities.map(function(V){return gF(V)});return{type:"entry",actions:ui(u?Jt(Jt([],At(z),!1),At(q),!1):Jt(Jt([],At(q),!1),At(z),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(D){return lF(D)})}),k=Array.from(M).map(function(D){return{type:"exit",actions:ui(Jt(Jt([],At(D.onExit),!1),At(D.activities.map(function(z){return mF(z)})),!1),m.machine.options.actions)}}),F=k.concat({type:"transition",actions:ui(r.actions,this.machine.options.actions)}).concat(I);if(n){var H=ui(dn(Jt([],At(e),!1).sort(function(D,z){return z.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!d_(D)});return F.concat({type:"stop",actions:H})}return F},t.prototype.transition=function(e,n,r,s){e===void 0&&(e=this.initialState);var o=nr(n),a;if(e instanceof $s)a=r===void 0?e:this.resolveState($s.from(e,r));else{var u=Ot(e)?this.resolve(Ov(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)&&!fre(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:[]},h=rh([],this.getStateNodes(a.value)),g=f.configuration.length?rh(h,f.configuration):h;return f.configuration=Jt([],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,Jt([],At(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,s,o){var a,u,c,f,h=this;o===void 0&&(o=Pl);var g=e.configuration,m=!n||e.transitions.length>0,y=m?e.configuration:n?n.configuration:[],S=sv(y,this),E=m?Rre(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),A=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 N=(c=void 0,ht(M.actions)),I=N.next();!I.done;I=N.next()){var k=I.value;k.type===a_?A[k.activity.id||k.activity.type]=k:k.type===AT&&(A[k.activity.id||k.activity.type]=!1)}}catch(J){c={error:J}}finally{try{I&&!I.done&&(f=N.return)&&f.call(N)}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 F=At(Rh(this,n,r,o,w,s,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=F[0],D=F[1],z=At(pre(H,d_),2),q=z[0],V=z[1],ee=H.filter(function(J){var oe;return J.type===a_&&((oe=J.activity)===null||oe===void 0?void 0:oe.type)===l_}),$=ee.reduce(function(J,oe){return J[oe.activity.id]=xre(oe.activity,h.machine,D,o),J},n?me({},n.children):{}),te=new $s({value:E||n.value,context:D,_event:o,_sessionid:n?n._sessionid:null,historyValue:E?C?gre(C,E):void 0:n?n.historyValue:void 0,history:!E||e.source?n:void 0,actions:E?V:[],activities:E?A:n?n.activities:{},events:[],configuration:y,transitions:e.transitions,children:$,done:S,tags:$k(y),machine:this}),fe=r!==D;te.changed=o.name===RT||fe;var de=te.history;de&&delete de.history;var Ae=!S&&(this._transient||g.some(function(J){return J._transient}));if(!m&&(!Ae||o.name===Jg))return te;var L=te;if(!S)for(Ae&&(L=this.resolveRaisedTransition(L,{type:rre},o,s));q.length;){var K=q.shift();L=this.resolveRaisedTransition(L,K._event,o,s)}var Y=L.changed||(de?!!L.actions.length||fe||typeof de.value!=typeof L.value||!AF(L.value,de.value):void 0);return L.changed=Y,L.history=de,L},t.prototype.getStateNode=function(e){if(oc(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=oc(e)?e.slice(p_.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"&&oc(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=c_(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||sc;switch(this.type){case"parallel":return th(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(e[a]||o):sc});case"compound":if(Ot(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?th(e,function(o,a){return o?r.getStateNode(a).resolve(o):sc}):this.initialStateValue||{};default:return e||sc}},t.prototype.getResolvedPath=function(e){if(oc(e)){var n=this.machine.idMap[e.slice(p_.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return c_(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=jk(this.states,function(r){return r.initialStateValue||sc},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=kv(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;Ot(n.target)?e=oc(n.target)?Ov(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(kv(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=rv(this.initialStateValue);return dn(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:jk(this.states,function(n,r){if(!e)return n.historyValue();var s=Ot(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?dn(rv(s).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=dre(r.path,"states")(e).current;return Ot(o)?[r.getStateNode(o)]:dn(rv(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=dn(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,h=o[f];if(h.states)try{for(var g=(r=void 0,ht(h.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(!Ot(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,`':
|
|
156
|
-
`).concat(u.message))}else return n.getStateNodeByPath(o)})},t.prototype.formatTransition=function(e){var n=this,r=Sre(e.target),s="internal"in e?e.internal:r?r.some(function(c){return Ot(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(r),u=me(me({},e),{actions:ui(Hs(e.actions)),cond:oF(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=eC,u=o[a],c=u===void 0?[]:u,f=_T(o,[typeof a=="symbol"?a:a+""]);s=dn(Object.keys(f).map(function(A){var T=rc(A,f[A]);return T}).concat(rc(eC,c)))}var h=this.config.always?rc("",this.config.always):[],g=this.config.onDone?rc(String(nh(this.id)),this.config.onDone):[],m=dn(this.invoke.map(function(A){var T=[];return A.onDone&&T.push.apply(T,Jt([],At(rc(String(ph(A.id)),A.onDone)),!1)),A.onError&&T.push.apply(T,Jt([],At(rc(String(_c(A.id)),A.onError)),!1)),T})),y=this.after,S=dn(Jt(Jt(Jt(Jt([],At(g),!1),At(m),!1),At(s),!1),At(h),!1).map(function(A){return Hs(A).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(A){e={error:A}}finally{try{C&&!C.done&&(n=E.return)&&n.call(E)}finally{if(e)throw e.error}}return S},t})();function yd(t,e){return new Hre(t,e)}var ti=yF,tb=fF,$re=SF,qre=_.useLayoutEffect;function Wk(t){var e=_.useRef();return e.current||(e.current={v:t()}),e.current.v}var Dv=function(){return Dv=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},Dv.apply(this,arguments)},Wre=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},Vre=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 Gre(t,e){var n=Wk(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=Wre(e,["context","guards","actions","activities","services","delays","state"]),h=Wk(function(){var g={context:r,guards:s,actions:o,activities:a,services:u,delays:c},m=n.withConfig(g,function(){return Dv(Dv({},n.context),r)});return TF(m,f)});return qre(function(){Object.assign(h.machine.options.actions,o),Object.assign(h.machine.options.guards,s),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,u),Object.assign(h.machine.options.delays,c)},[o,s,a,u,c]),h}function Kre(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=Vre(e,2),s=r[0],o=s===void 0?{}:s,a=r[1],u=Gre(t,o);return _.useEffect(function(){if(a){var c=u.subscribe(hh(a));return function(){c.unsubscribe()}}},[a]),_.useEffect(function(){var c=o.state;return u.start(c?$s.create(c):void 0),function(){u.stop(),u.status=Pn.NotStarted}},[]),u}function Yre(t){return t.status!==0?t.getSnapshot():t.machine.initialState}function Zre(t){return"state"in t&&"machine"in t}function Xre(t){return"state"in t}var Qre=function(t,e){return t===e},Jre=function(t,e){if(Zre(t)){if(t.status===0&&e.current)return e.current;var n=Yre(t);return e.current=t.status===0?n:null,n}return Xre(t)?t.state:void 0};function ese(t,e,n,r){n===void 0&&(n=Qre);var s=_.useRef(null),o=_.useCallback(function(c){var f=t.subscribe(c).unsubscribe;return f},[t]),a=_.useCallback(function(){return Jre(t,s)},[t,r]),u=xT.useSyncExternalStoreWithSelector(o,a,a,e,n);return u}const tse=t=>{if(t instanceof Rs)return t;if(t instanceof Error){if(t.name==="InvalidStateError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAlreadyExists];return new Rs({name:Bt.PasskeyAlreadyExists,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyRegistrationCanceled];return new Rs({name:Bt.PasskeyRegistrationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}}return X6(t)},nse=async t=>{try{const e=Q6();cd(e,Bt.PasskeyNotSupported);const n=TG(t),r=await navigator.credentials.create({publicKey:n});return MG(r),RG(r)}catch(e){throw tse(e)}},rse=t=>In($n,Hn("StartWebAuthnRegistration"),ar(),{...qn,...t}),sse=t=>In($n,Hn("CompleteWebAuthnRegistration"),ar(),{...qn,...t});async function ose(){const t=$t.getConfig().Auth?.Cognito;lt(t);const{userPoolEndpoint:e,userPoolId:n}=t,{tokens:r}=await Oy();ud(r);const s=rse({endpointResolver:bt({endpointOverride:e})}),{CredentialCreationOptions:o}=await s({region:yt(n),userAgentValue:Mt(Ke.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});NG(o);const a=await nse(o);await sse({endpointResolver:bt({endpointOverride:e})})({region:yt(n),userAgentValue:Mt(Ke.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const ise=t=>In($n,Hn("ListWebAuthnCredentials"),ar(),{...qn,...t});async function ase(t,e){const n=t.getConfig().Auth?.Cognito;lt(n);const{userPoolEndpoint:r,userPoolId:s}=n,{tokens:o}=await t.Auth.fetchAuthSession();ud(o);const a=ise({endpointResolver:bt({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:yt(s),userAgentValue:Mt(Ke.ListWebAuthnCredentials)},{AccessToken:o.accessToken.toString(),MaxResults:e?.pageSize,NextToken:e?.nextToken});return{credentials:u.map(h=>({credentialId:h.CredentialId,friendlyCredentialName:h.FriendlyCredentialName,relyingPartyId:h.RelyingPartyId,authenticatorAttachment:h.AuthenticatorAttachment,authenticatorTransports:h.AuthenticatorTransports,createdAt:h.CreatedAt?new Date(h.CreatedAt*1e3):void 0})),nextToken:c}}async function MT(t){return ase($t,t)}const PT=t=>t.context.actorRef?.getSnapshot(),Oh=t=>PT(t)?.context,lse={category:Is.AI,apis:[oi.CreateConversation,oi.DeleteConversation,oi.ListConversations,oi.UpdateConversation,oi.OnMessage,oi.SendMessage,oi.Generation]},use={apis:[Ke.DeleteUser,Ke.UpdatePassword],category:Is.Auth},cse={apis:[Ke.SignUp,Ke.ConfirmSignUp,Ke.ResendSignUpCode,Ke.SignIn,Ke.ConfirmSignIn,Ke.FetchUserAttributes,Ke.SignOut,Ke.ResetPassword,Ke.ConfirmResetPassword,Ke.SignInWithRedirect],category:Is.Auth},dse={apis:[qs.UploadData],category:Is.Storage},fse={apis:[Lx.NotifyMessageInteraction],category:Is.InAppMessaging},hse={category:Is.Geo,apis:[uh.SearchByText,uh.SearchForSuggestions,uh.SearchByPlaceId]},pse={category:Is.Geo,apis:[]},gse={apis:[qs.UploadData],category:Is.Storage},mse={apis:[qs.UploadData,qs.Copy,qs.GetUrl,qs.List,qs.Remove,qs.GetDataAccess,qs.ListCallerAccessGrants],category:Is.Storage};function ls(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function vi(t){return typeof t=="string"||typeof t=="object"&&Object.prototype.toString.call(t)==="[object String]"}function vse(t){return ls(t)&&Object.prototype.toString.call(t)==="[object Map]"}function yse(t){return ls(t)&&Object.prototype.toString.call(t)==="[object Set]"}function kT(t){if(t==null)return!0;if(ls(t)&&(vse(t)||yse(t)))return!t.size;if(ls(t)&&(vi(t)||Array.isArray(t)))return!t.length;for(const e in t)if(yi(t,e))return!1;return!0}function bse(t){return Array.isArray(t)&&kT(t)}function Sse(...t){return t.every(bse)}function RF(t){return ls(t)&&kT(t)}function Ese(...t){return t.every(RF)}function yi(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function bi(t){return typeof t=="function"}const Ht=(t,e)=>e?`${t}--${e}`:"",Br=(t,e,n)=>n?`${t}--${e}`:"";function Cse(...t){}function wse(t,e){const n={},r={};return Object.entries(t).forEach(([s,o])=>{e(s)?n[s]=o:r[s]=o}),[n,r]}const IF=({payload:t},e,n)=>{const{data:r,event:s}=t,{send:o}=e,{onSignIn:a,onSignOut:u}=n??{};switch(s){case"signedIn":{bi(a)&&a(t);break}case"signInWithRedirect":{o("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{bi(u)&&u(),o("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===ka.NetworkError)return;o("SIGN_OUT");break}}},xse=(t,e=IF)=>{const n=r=>e(r,t);return Ao.listen("auth",n,"authenticator-hub-handler")},OF=["+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"],nb={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:OF,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}},_se=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Ase=(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}},Tse=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")}},Rse=t=>{const e=Oh(t)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:s,codeDeliveryDetails:o,preferredChallenge:a,remoteError:u,selectedAuthMethod:c,validationError:f,totpSecretCode:h=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),A=PT(t),T=t.hasTag("pending")||A?.hasTag("pending"),R=Ase(t,A),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:h,unverifiedUserAttributes:g,user:C,username:m,validationErrors:f}},Ise=({send:t,state:e})=>{const n=Tse(t),r=Rse(e);return{...n,...r}};var Ac;(function(t){t.Apple="Apple",t.Amazon="Amazon",t.Facebook="Facebook",t.Google="Google"})(Ac||(Ac={}));var Vk;(function(t){t.Email="email",t.PhoneNumber="phone_number"})(Vk||(Vk={}));const Ose=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],Nse=["username","email","phone_number"],NF=[...Nse,...Ose,"confirmation_code","password","confirm_password"],Mse=t=>NF.includes(t),MF=t=>NF.includes(t),Pse=t=>Array.isArray(t),kse=t=>t?Pse(t)?t:[t]:null,Dse=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("")},Lse=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("")},Use=t=>{const e=t.split("@");return`${Dse(e[0])}@${e[1]}`},Fse=(t,e)=>t==="Phone Number"?Lse(e):Use(e),zse=t=>_se.some(e=>t.includes(e)),jse=(t,e,n)=>encodeURI(`otpauth://totp/${t}:${e}?secret=${n}&issuer=${t}`);function Bse(t,...e){return Object.entries(t).reduce((n,[r,s])=>({...n,[r]:e.includes(r)?s:s?.trim()}),{})}const Hse={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"},ov={...Hse},we={...ov};function ye(t){return j6.get(t)}const DT=t=>{const e=t?.context.config?.loginMechanisms,[n]=e??["username"];return n},$se=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},qse=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),Wse="+1",Si=t=>{let e=nb[t];const{type:n}=e;return n==="tel"&&(e={...e,dialCode:Wse}),e},rb=t=>{const e=DT(t);return{...Si(e),autocomplete:"username"}},iv=t=>({confirmation_code:{...Si("confirmation_code"),label:"Code *",placeholder:"Code"}}),Vse=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:{...rb(t)}};return s&&(o.password={...Si("password"),autocomplete:"current-password"}),o},Gse=t=>{const{loginMechanisms:e,signUpAttributes:n}=t.context.config,r=DT(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(MF(f)){const h=f===r?rb(t):Si(f),g=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");c[f]={...h,...g&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return c},Kse=t=>({confirmation_code:{...Si("confirmation_code"),placeholder:"Enter your code"}}),Yse=t=>{const e=DT(t),{label:n}=nb[e];return{username:{...rb(t),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Zse=t=>({...iv(),password:{...Si("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Si("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Xse=t=>{const e=PT(t),{missingAttributes:n}=e.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),s={};for(const o of r)MF(o)?s[o]={...Si(o)}:console.debug(`Authenticator does not have a default implementation for ${o}. Customize ForceNewPassword FormFields to add your own.`);return s},Qse=t=>({email:Si("email")}),Jse={signIn:Vse,signUp:Gse,confirmSignUp:Kse,confirmSignIn:iv,forceNewPassword:Xse,forgotPassword:Yse,confirmResetPassword:Zse,confirmVerifyUser:iv,setupEmail:Qse,setupTotp:iv},eoe=(t,e)=>{const n=Jse[t];return n(e)},toe=(t,e)=>{const n=Oh(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={...rb(e),...o};return{...r,[s]:u}}else if(Mse(s)){const u={...nb[s],...o};return{...r,[s]:u}}else return{...r,[s]:o}},{})},noe=(t,e)=>{const n=eoe(t,e),r=toe(t,e),s={...n,...r};return delete s.QR,$se(s)},roe=t=>t.map(e=>{const n=e[0],r={...e[1],order:void 0};return[n,r]}),soe=(t,e)=>{const n=noe(t,e);return roe(qse(n))},ooe=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)}},ioe=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}.`},aoe=t=>{const{DeliveryMedium:e}=t??{},n=e==="EMAIL";return ye(!n&&e==="SMS"?we.WE_SENT_CODE:n?we.WE_EMAILED:we.WE_TEXTED)},loe={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},uoe=(t,e)=>ye(`Sign ${t==="signIn"?"In":"Up"} with ${loe[e]}`),coe=t=>ye(t==="MFA_SETUP"?we.MFA_SETUP_SELECTION:we.MFA_SELECTION),doe=t=>{switch(t){case"email":return ye(we.EMAIL_ADDRESS);case"phone_number":return ye(we.PHONE_NUMBER);default:return ye(we.USERNAME)}},foe=t=>{switch(t){case"EMAIL":return ye(ov.EMAIL_OTP);case"SMS":return ye(ov.SMS_MFA);case"TOTP":return ye(ov.SOFTWARE_TOKEN_MFA);default:return ye(t)}},Ln={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:ioe,getDeliveryMethodText:aoe,getChallengeText:ooe,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:uoe,getMfaTypeLabelByValue:foe,getSelectMfaTypeByChallengeName:coe,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:doe,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var tC,Gk;function PF(){if(Gk)return tC;Gk=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 tC=t,tC}var nC,Kk;function hoe(){if(Kk)return nC;Kk=1;var t=yT(),e=Q9(),n=1,r=2;function s(o,a,u,c){var f=u.length,h=f,g=!c;if(o==null)return!h;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<h;){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 nC=s,nC}var rC,Yk;function kF(){if(Yk)return rC;Yk=1;var t=Ti();function e(n){return n===n&&!t(n)}return rC=e,rC}var sC,Zk;function poe(){if(Zk)return sC;Zk=1;var t=kF(),e=X9();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 sC=n,sC}var oC,Xk;function DF(){if(Xk)return oC;Xk=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return oC=t,oC}var iC,Qk;function goe(){if(Qk)return iC;Qk=1;var t=hoe(),e=poe(),n=DF();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 iC=r,iC}var aC,Jk;function LT(){if(Jk)return aC;Jk=1;var t=md(),e=lu(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return aC=r,aC}var lC,eD;function UT(){if(eD)return lC;eD=1;var t=Ri(),e=LT(),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 lC=s,lC}var uC,tD;function moe(){if(tD)return uC;tD=1;var t=vT(),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,uC=n,uC}var cC,nD;function voe(){if(nD)return cC;nD=1;var t=moe(),e=500;function n(r){var s=t(r,function(a){return o.size===e&&o.clear(),a}),o=s.cache;return s}return cC=n,cC}var dC,rD;function yoe(){if(rD)return dC;rD=1;var t=voe(),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 dC=r,dC}var fC,sD;function boe(){if(sD)return fC;sD=1;var t=Vy(),e=PF(),n=Ri(),r=LT(),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 fC=a,fC}var hC,oD;function FT(){if(oD)return hC;oD=1;var t=boe();function e(n){return n==null?"":t(n)}return hC=e,hC}var pC,iD;function sb(){if(iD)return pC;iD=1;var t=Ri(),e=UT(),n=yoe(),r=FT();function s(o,a){return t(o)?o:e(o,a)?[o]:n(r(o))}return pC=s,pC}var gC,aD;function up(){if(aD)return gC;aD=1;var t=LT();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return gC=e,gC}var mC,lD;function zT(){if(lD)return mC;lD=1;var t=sb(),e=up();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 mC=n,mC}var vC,uD;function Soe(){if(uD)return vC;uD=1;var t=zT();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return vC=e,vC}var yC,cD;function Eoe(){if(cD)return yC;cD=1;function t(e,n){return e!=null&&n in Object(e)}return yC=t,yC}var bC,dD;function Coe(){if(dD)return bC;dD=1;var t=sb(),e=bT(),n=Ri(),r=Yy(),s=ET(),o=up();function a(u,c,f){c=t(c,u);for(var h=-1,g=c.length,m=!1;++h<g;){var y=o(c[h]);if(!(m=u!=null&&f(u,y)))break;u=u[y]}return m||++h!=g?m:(g=u==null?0:u.length,!!g&&s(g)&&r(y,g)&&(n(u)||e(u)))}return bC=a,bC}var SC,fD;function woe(){if(fD)return SC;fD=1;var t=Eoe(),e=Coe();function n(r,s){return r!=null&&e(r,s,t)}return SC=n,SC}var EC,hD;function xoe(){if(hD)return EC;hD=1;var t=Q9(),e=Soe(),n=woe(),r=UT(),s=kF(),o=DF(),a=up(),u=1,c=2;function f(h,g){return r(h)&&s(g)?o(a(h),g):function(m){var y=e(m,h);return y===void 0&&y===g?n(m,h):t(g,y,u|c)}}return EC=f,EC}var CC,pD;function jT(){if(pD)return CC;pD=1;function t(e){return e}return CC=t,CC}var wC,gD;function _oe(){if(gD)return wC;gD=1;function t(e){return function(n){return n?.[e]}}return wC=t,wC}var xC,mD;function Aoe(){if(mD)return xC;mD=1;var t=zT();function e(n){return function(r){return t(r,n)}}return xC=e,xC}var _C,vD;function Toe(){if(vD)return _C;vD=1;var t=_oe(),e=Aoe(),n=UT(),r=up();function s(o){return n(o)?t(r(o)):e(o)}return _C=s,_C}var AC,yD;function Roe(){if(yD)return AC;yD=1;var t=goe(),e=xoe(),n=jT(),r=Ri(),s=Toe();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 AC=o,AC}var TC,bD;function LF(){if(bD)return TC;bD=1;var t=au(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return TC=e,TC}var RC,SD;function BT(){if(SD)return RC;SD=1;var t=LF();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return RC=e,RC}var IC,ED;function UF(){if(ED)return IC;ED=1;var t=BT(),e=ap(),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 IC=s,IC}var OC,CD;function Ioe(){if(CD)return OC;CD=1;var t=UF(),e=sb(),n=Yy(),r=Ti(),s=up();function o(a,u,c,f){if(!r(a))return a;u=e(u,a);for(var h=-1,g=u.length,m=g-1,y=a;y!=null&&++h<g;){var S=s(u[h]),E=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return a;if(h!=m){var C=y[S];E=f?f(C,S,y):void 0,E===void 0&&(E=r(C)?C:n(u[h+1])?[]:{})}t(y,S,E),y=y[S]}return a}return OC=o,OC}var NC,wD;function Ooe(){if(wD)return NC;wD=1;var t=zT(),e=Ioe(),n=sb();function r(s,o,a){for(var u=-1,c=o.length,f={};++u<c;){var h=o[u],g=t(s,h);a(g,h)&&e(f,n(h,s),g)}return f}return NC=r,NC}var MC,xD;function HT(){if(xD)return MC;xD=1;var t=Z9(),e=t(Object.getPrototypeOf,Object);return MC=e,MC}var PC,_D;function Noe(){if(_D)return PC;_D=1;var t=W9(),e=HT(),n=K9(),r=G9(),s=Object.getOwnPropertySymbols,o=s?function(a){for(var u=[];a;)t(u,n(a)),a=e(a);return u}:r;return PC=o,PC}var kC,AD;function Moe(){if(AD)return kC;AD=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return kC=t,kC}var DC,TD;function Poe(){if(TD)return DC;TD=1;var t=Ti(),e=wT(),n=Moe(),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 DC=o,DC}var LC,RD;function $T(){if(RD)return LC;RD=1;var t=Y9(),e=Poe(),n=Zy();function r(s){return n(s)?t(s,!0):e(s)}return LC=r,LC}var UC,ID;function koe(){if(ID)return UC;ID=1;var t=V9(),e=Noe(),n=$T();function r(s){return t(s,n,e)}return UC=r,UC}var FC,OD;function Doe(){if(OD)return FC;OD=1;var t=PF(),e=Roe(),n=Ooe(),r=koe();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 FC=s,FC}var Loe=Doe();const Uoe=Va(Loe),Foe=!0,zoe="",Nh=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),joe=(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:")}},Boe=t=>{const{phone_number:e,...n}=Uoe(t,joe);if(vi(e)&&e!==zoe){const{country_code:r}=t;return{...n,phone_number:Nh(r,e)}}return n},Hoe=(t,e,n,r)=>{const{password:s,...o}=e,a=Boe(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}:Foe,userAttributes:{...n==="phone_number"?{...c,phone_number:t}:c}};return{username:t,password:u?void 0:s,options:f}},$oe=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:s,phone_number:o}=t;return Nh(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 Nh(s,o)}return t[r]},qoe=(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}=EF,Woe=ot({actorDoneData:void 0}),Voe=ot({challengeName:void 0}),Goe=ot({missingAttributes:void 0}),Koe=ot({remoteError:void 0}),Yoe=ot({formValues:t=>({username:t.formValues?.username})}),Zoe=ot({touched:{}}),Xoe=ot({user:void 0}),Qoe=ot({validationError:{}}),Joe=ot({totpSecretCode:(t,{data:e})=>{const{sharedSecret:n}=e.nextStep?.totpSetupDetails??{};return n}}),eie=ot({allowedMfaTypes:(t,{data:e})=>e.nextStep?.allowedMFATypes}),tie=ot({step:"SIGN_IN"}),nie=ot({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),rie=ot({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),sie=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}}}),oie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Nh(s,r):r}}),iie=ot({username:$oe}),aie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Nh(s,r):r}}),lie=ot({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),uie=ot({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),cie=ot({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),die=ot({missingAttributes:(t,{data:e})=>e.nextStep?.missingAttributes}),fie=ot({validationError:(t,{data:e})=>e}),hie=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}}),pie=ot({user:(t,{data:e})=>e}),ND=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),gie=ot({codeDeliveryDetails:(t,{data:e})=>e?.nextStep?.codeDeliveryDetails?ND(e.nextStep.codeDeliveryDetails):ND(e)}),mie=ot({formValues:(t,{data:e})=>{const{name:n,value:r}=e;return{...t.formValues,[n]:r}}}),vie=ot({formValues:(t,{data:e})=>Bse({...t.formValues,...e},"password")}),yie=ot({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),bie=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}}}}),Sie=ot({selectedUserAttribute:void 0}),Eie=ot({selectedUserAttribute:t=>t.formValues?.unverifiedAttr}),Cie=ot({step:"CONFIRM_SIGN_UP"}),wie=ot({selectedAuthMethod:(t,{data:e})=>e.method}),xie=ot({selectedAuthMethod:(t,{data:e})=>e?.__authMethod||"PASSWORD"}),_ie=ot({step:"SELECT_AUTH_METHOD"}),Aie=ot({fetchedUserAttributes:(t,e)=>e.data}),Tie=ot({hasExistingPasskeys:(t,e)=>e.data}),Rie=ot({hasExistingPasskeys:!1}),cp={clearActorDoneData:Woe,clearChallengeName:Voe,clearError:Koe,clearFormValues:Yoe,clearHasExistingPasskeys:Rie,clearMissingAttributes:Goe,clearSelectedUserAttribute:Sie,clearTouched:Zoe,clearUser:Xoe,clearValidationError:Qoe,handleBlur:yie,handleInput:mie,handleSubmit:vie,setAllowedMfaTypes:eie,setChallengeName:sie,setCodeDeliveryDetails:gie,setFetchedUserAttributes:Aie,setFieldErrors:fie,setHasExistingPasskeys:Tie,setMissingAttributes:die,setNextResetPasswordStep:cie,setNextSignInStep:lie,setNextSignUpStep:uie,setRemoteError:hie,setConfirmAttributeCompleteStep:rie,setConfirmSignUpSignUpStep:Cie,setSelectAuthMethodStep:_ie,setSelectedAuthMethod:wie,setSelectedAuthMethodFromForm:xie,setShouldVerifyUserAttributeStep:nie,setSelectedUserAttribute:Eie,setSignInStep:tie,setTotpSecretCode:Joe,setUser:pie,setUnverifiedUserAttributes:bie,setUsernameForgotPassword:oie,setUsernameSignIn:aie,setUsernameSignUp:iie},Iie=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],Oie=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Nie=(t,{data:e})=>e?.nextStep?.signInStep==="RESET_PASSWORD",Mie=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_UP",Pie=(t,{data:e})=>e?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",kie=(t,{data:e})=>e?.nextStep.signUpStep==="DONE"&&t.step==="CONFIRM_SIGN_UP",Die=(t,{data:e})=>e?.nextStep.signInStep==="DONE",Lie=(t,{data:e})=>e?.nextStep.signUpStep==="DONE",Uie=(t,{data:e})=>e?.nextStep.resetPasswordStep==="DONE",Fie=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_COMPLETE",zie=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",jie=(t,{data:e})=>e?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",Bie=(t,{data:e})=>e?.step==="RESET_PASSWORD",Hie=(t,{data:e})=>e?.step==="CONFIRM_SIGN_UP",$ie=({step:t})=>Iie.includes(t),qie=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Wie=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Vie=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),Gie=({step:t})=>t==="RESET_PASSWORD",Kie=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Yie=({step:t})=>t==="CONFIRM_SIGN_UP",Zie=(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")},Xie=(t,{data:e})=>e.message==="User is already confirmed.",Qie=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),Jie=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},eae=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},tae=({passwordless:t})=>t?.passkeyRegistrationPrompts!=null,nae=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",ob={hasCompletedAttributeConfirmation:Fie,hasCompletedResetPassword:Uie,hasCompletedSignIn:Die,hasCompletedSignUp:Lie,hasPasskeyRegistrationPrompts:tae,isConfirmSignUpStep:Hie,isConfirmUserAttributeStep:zie,isResetPasswordStep:Bie,isShouldConfirmUserAttributeStep:jie,isUserAlreadyConfirmed:Xie,shouldAutoSignIn:Pie,shouldManualSignIn:kie,shouldConfirmResetPassword:Kie,shouldConfirmSignIn:$ie,shouldConfirmSignInWithNewPassword:Oie,shouldConfirmSignUp:Yie,shouldConfirmSignUpFromSignIn:Mie,shouldResetPassword:Gie,shouldResetPasswordFromSignIn:Nie,shouldReturnToSelectMethod:nae,shouldSelectAuthMethod:Qie,shouldSetupTotp:qie,shouldSetupEmail:Wie,shouldSelectMfaType:Vie,shouldVerifyAttribute:Zie,shouldPromptPasskeyRegistration:Jie,shouldPromptPasskeyRegistrationAfterSignup:eae};var zC,MD;function FF(){if(MD)return zC;MD=1;var t=BT(),e=ap();function n(r,s,o){(o!==void 0&&!e(r[s],o)||o===void 0&&!(s in r))&&t(r,s,o)}return zC=n,zC}var jC,PD;function rae(){if(PD)return jC;PD=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 jC=t,jC}var BC,kD;function sae(){if(kD)return BC;kD=1;var t=rae(),e=t();return BC=e,BC}var oh={exports:{}};oh.exports;var DD;function oae(){return DD||(DD=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,h){if(h)return f.slice();var g=f.length,m=u?u(g):new f.constructor(g);return f.copy(m),m}t.exports=c})(oh,oh.exports)),oh.exports}var HC,LD;function iae(){if(LD)return HC;LD=1;var t=q9();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return HC=e,HC}var $C,UD;function aae(){if(UD)return $C;UD=1;var t=iae();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return $C=e,$C}var qC,FD;function lae(){if(FD)return qC;FD=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 qC=t,qC}var WC,zD;function uae(){if(zD)return WC;zD=1;var t=Ti(),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 WC=n,WC}var VC,jD;function cae(){if(jD)return VC;jD=1;var t=uae(),e=HT(),n=wT();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return VC=r,VC}var GC,BD;function dae(){if(BD)return GC;BD=1;var t=Zy(),e=lu();function n(r){return e(r)&&t(r)}return GC=n,GC}var KC,HD;function fae(){if(HD)return KC;HD=1;var t=md(),e=HT(),n=lu(),r="[object Object]",s=Function.prototype,o=Object.prototype,a=s.toString,u=o.hasOwnProperty,c=a.call(Object);function f(h){if(!n(h)||t(h)!=r)return!1;var g=e(h);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 KC=f,KC}var YC,$D;function zF(){if($D)return YC;$D=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return YC=t,YC}var ZC,qD;function hae(){if(qD)return ZC;qD=1;var t=UF(),e=BT();function n(r,s,o,a){var u=!o;o||(o={});for(var c=-1,f=s.length;++c<f;){var h=s[c],g=a?a(o[h],r[h],h,o,r):void 0;g===void 0&&(g=r[h]),u?e(o,h,g):t(o,h,g)}return o}return ZC=n,ZC}var XC,WD;function pae(){if(WD)return XC;WD=1;var t=hae(),e=$T();function n(r){return t(r,e(r))}return XC=n,XC}var QC,VD;function gae(){if(VD)return QC;VD=1;var t=FF(),e=oae(),n=aae(),r=lae(),s=cae(),o=bT(),a=Ri(),u=dae(),c=ST(),f=gT(),h=Ti(),g=fae(),m=CT(),y=zF(),S=pae();function E(C,w,A,T,R,M,N){var I=y(C,A),k=y(w,A),F=N.get(k);if(F){t(C,A,F);return}var H=M?M(I,k,A+"",C,w,N):void 0,D=H===void 0;if(D){var z=a(k),q=!z&&c(k),V=!z&&!q&&m(k);H=k,z||q||V?a(I)?H=I:u(I)?H=r(I):q?(D=!1,H=e(k,!0)):V?(D=!1,H=n(k,!0)):H=[]:g(k)||o(k)?(H=I,o(I)?H=S(I):(!h(I)||f(I))&&(H=s(k))):D=!1}D&&(N.set(k,H),R(H,k,T,M,N),N.delete(k)),t(C,A,H)}return QC=E,QC}var JC,GD;function mae(){if(GD)return JC;GD=1;var t=yT(),e=FF(),n=sae(),r=gae(),s=Ti(),o=$T(),a=zF();function u(c,f,h,g,m){c!==f&&n(f,function(y,S){if(m||(m=new t),s(y))r(c,f,S,h,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 JC=u,JC}var ew,KD;function vae(){if(KD)return ew;KD=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 ew=t,ew}var tw,YD;function yae(){if(YD)return tw;YD=1;var t=vae(),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 h=Array(s+1);++u<s;)h[u]=a[u];return h[s]=o(f),t(r,this,h)}}return tw=n,tw}var nw,ZD;function bae(){if(ZD)return nw;ZD=1;function t(e){return function(){return e}}return nw=t,nw}var rw,XD;function Sae(){if(XD)return rw;XD=1;var t=bae(),e=LF(),n=jT(),r=e?function(s,o){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n;return rw=r,rw}var sw,QD;function Eae(){if(QD)return sw;QD=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 sw=r,sw}var ow,JD;function Cae(){if(JD)return ow;JD=1;var t=Sae(),e=Eae(),n=e(t);return ow=n,ow}var iw,eL;function wae(){if(eL)return iw;eL=1;var t=jT(),e=yae(),n=Cae();function r(s,o){return n(e(s,o,t),s+"")}return iw=r,iw}var aw,tL;function xae(){if(tL)return aw;tL=1;var t=ap(),e=Zy(),n=Yy(),r=Ti();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 aw=s,aw}var lw,nL;function _ae(){if(nL)return lw;nL=1;var t=wae(),e=xae();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 h=o[a];h&&r(s,h,a,c)}return s})}return lw=n,lw}var uw,rL;function Aae(){if(rL)return uw;rL=1;var t=mae(),e=_ae(),n=e(function(r,s,o){t(r,s,o)});return uw=n,uw}var Tae=Aae();const Rae=Va(Tae),ib=async(t,e,n,r)=>{const s=await Promise.all(r.map(a=>a(t,e,n))),o=Rae({},...s);return kT(o)?Promise.resolve():Promise.reject(o)},Iae=8,Oae=t=>Array.isArray(t),Nae=t=>{if(t)return Oae(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Ua={async getAmplifyConfig(){const t=S8.getConfig(),e=t.Auth?.Cognito,{loginWith:n,userAttributes:r}=t.Auth?.Cognito??{},s=n?Object.entries(n).filter(([f,h])=>f!=="oauth").filter(([f,h])=>!!h).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,o=Nae(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:Py,handleSignIn:eT,handleSignUp:fY,handleConfirmSignIn:c8,handleConfirmSignUp:bY,handleForgotPasswordSubmit:gY,handleForgotPassword:u8,handleResendSignUpCode:vY,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??Iae;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&&!zse(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 Mae({services:t}){return yd({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:{...cp,sendUpdate:tb()},guards:ob,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 ib(e.formValues,e.touched,e.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const jF=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),Pae=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",av={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"}},em=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",...av}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function kae({services:t}){return yd({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:{...jF("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 MT();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:av.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},av.onError]}}}},confirmSignIn:{...em(["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",...av}}}}}},setupTotp:{...em(["clearFormValues","clearError","clearTouched"])},setupEmail:{...em(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...em(["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:{...cp,sendUpdate:tb()},guards:ob,services:{async fetchUserAttributes(){return m8()},resetPassword({username:e}){return u8({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=Pae(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}),c8({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(e,{data:n}){return g8(n)},async validateFields(e){return ib(e.formValues,e.touched,e.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const Dae={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Lae={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 Uae({services:t}){return yd({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Lae}},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 MT();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:{...jF("signUp")},resetPassword:{invoke:{src:"resetPassword",...Dae}},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:{...cp,sendUpdate:tb()},guards:ob,services:{autoSignIn(){return JA()},async fetchUserAttributes(){return m8()},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 g8(n)},handleSignUp(e){const{formValues:n,loginMechanisms:r,username:s,selectedAuthMethod:o,preferredChallenge:a}=e,u=r[0],f=Hoe(s,n,u,o??a);return t.handleSignUp(f)},async validateSignUp(e){return ib(e.formValues,e.touched,e.passwordSettings,[t.validateFormPassword,t.validateConfirmPassword,t.validatePreferredUsername,t.validateRequiredFieldsForAuthMethod,t.validateCustomSignUp])}}})}const Fae=()=>yd({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:()=>ZY()}});function zae(){return yd({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:{...cp,sendUpdate:tb()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){return eZ({userAttributeKey:t})},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){return CY({confirmationCode:t,userAttributeKey:e})},async validateFields(t){return ib(t.formValues,t.touched,t.passwordSettings,[Ua.validateFormPassword,Ua.validateConfirmPassword])}}})}const tm=(t,e)=>{const n=qoe(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:jae,stop:Bae}=EF,kf=t=>Bae(t),Hae={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},$ae={always:{actions:"configure",target:"getConfig"}};function qae(t){const{useNextWaitConfig:e,...n}=t??{};return yd({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Ua,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?$ae:Hae,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:kf("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:kf("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:kf("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:kf("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:kf("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:{...cp,forwardToActor:jae([{cond:"hasActor",actions:$re(({actorRef:s})=>s)}]),setActorDoneData:ti({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:ti({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:h,passwordSettings:g=o.passwordFormat??{},passwordless:m}=s.config;return a.length===0&&a.push("username"),{formFields:Wae(h)??{},initialState:f,loginMechanisms:a,passwordSettings:g,passwordless:m,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=kae({services:a}).withContext(tm(s,"SIGN_IN"));return Pf(u,{name:"signInActor"})}}),spawnSignUpActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=Uae({services:a}).withContext(tm(s,"SIGN_UP"));return Pf(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:ti({actorRef:(s,o)=>{const{services:a}=s,u=Mae({services:a}).withContext(tm(s,"FORGOT_PASSWORD"));return Pf(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ti({actorRef:s=>{const o=zae().withContext(tm(s));return Pf(o,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ti({actorRef:s=>{const o=Fae().withContext({user:s?.user});return Pf(o,{name:"signOutActor"})}}),configure:ti((s,o)=>{const{services:a,...u}=RF(n)?o.data??{}:n;return{services:{...Ua,...a},config:u}}),setHasSetup:ti({hasSetup:!0})},guards:{...ob,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 Wae(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 Vae={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Gae={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"}},Kae={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}"}}},Yae={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}"}}}},Zae={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}"}}}},Xae={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}"}}}},Qae={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}"}}},Jae={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}"}}},ele={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"}}}},tle={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}"}}},nle={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}"}}},rle={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}"}}}},sle={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},ole={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}"}}}}},ile={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}"}}},ale={height:{value:"{space.relative.full.value}"}},lle={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}"}},ule={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}"}}},cle={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)"}}}},dle={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}"}}},fle={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}"}}}}},hle={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},ple={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}"}},gle={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}"}}},mle={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"}}}},vle={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},yle={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}"}}},ble={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},Sle={lineHeight:{value:1},height:{value:"1em"}},Ele={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}"}}},Cle={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},wle={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}"}}},xle={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}"}}},_le={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Ale={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}"}}},Tle={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}"}}},Rle={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"}}}},Ile={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}"}}},Ole={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}"}}}},Nle={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},Mle={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}"}}},Ple={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}"}}}},kle={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}"}}},Dle={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}"}}},Lle={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}"}}}},Ule={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}"}}}},Fle={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}"}}},zle={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"}}}},jle={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}"}}}},Ble={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"}}}},Hle={_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}"}}}},$le={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}"}}}},qle={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}"}}},Wle={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}"}}},Vle={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Gle={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}"}}},Kle={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}"}}}}},Yle={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Zle={accordion:cle,aiConversation:Yae,alert:Kae,authenticator:Xae,autocomplete:Zae,avatar:Qae,badge:Jae,breadcrumbs:ele,button:tle,card:nle,checkbox:rle,checkboxfield:sle,collection:ole,copy:ile,countrycodeselect:ale,divider:lle,dropzone:ule,field:dle,fieldcontrol:fle,fieldgroup:hle,fieldmessages:gle,fieldset:ple,fileuploader:mle,flex:vle,heading:yle,icon:Sle,highlightmatch:ble,image:Cle,inappmessaging:wle,input:Ele,link:xle,liveness:_le,loader:Ale,menu:Tle,message:Rle,pagination:Ile,passwordfield:Ole,phonenumberfield:Nle,placeholder:Mle,radio:Ple,radiogroup:kle,rating:Dle,searchfield:Lle,select:Ule,selectfield:Fle,sliderfield:zle,stepperfield:jle,storagemanager:Ble,switchfield:Hle,table:$le,tabs:qle,text:Wle,textareafield:Vle,textfield:Gle,togglebutton:Kle,togglebuttongroup:Yle},Xle={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
|
|
157
|
-
'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
158
|
-
sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
|
|
159
|
-
'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"}},Qle={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}},Jle={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},eue={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"}},tue={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},nue={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},rue={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},sue={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%"}}},oue={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},iue={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},aue={components:Zle,borderWidths:Vae,colors:Gae,fonts:Xle,fontSizes:ni,fontWeights:Qle,lineHeights:Jle,opacities:eue,outlineOffsets:tue,outlineWidths:nue,radii:rue,shadows:sue,space:ri,time:oue,transforms:iue};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 lue={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},BF={tokens:aue,breakpoints:lue,name:"default-theme"};var cw,sL;function uue(){if(sL)return cw;sL=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 cw=t,cw}var dw,oL;function cue(){if(oL)return dw;oL=1;function t(e){return function(n){return e?.[n]}}return dw=t,dw}var fw,iL;function due(){if(iL)return fw;iL=1;var t=cue(),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 fw=n,fw}var hw,aL;function fue(){if(aL)return hw;aL=1;var t=due(),e=FT(),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(h){return h=e(h),h&&h.replace(n,t).replace(c,"")}return hw=f,hw}var pw,lL;function hue(){if(lL)return pw;lL=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return pw=e,pw}var gw,uL;function pue(){if(uL)return gw;uL=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 gw=e,gw}var mw,cL;function gue(){if(cL)return mw;cL=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",h=" \\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+h,S="['’]",E="["+y+"]",C="["+s+"]",w="\\d+",A="["+o+"]",T="["+a+"]",R="[^"+t+y+w+o+a+g+"]",M="\\ud83c[\\udffb-\\udfff]",N="(?:"+C+"|"+M+")",I="[^"+t+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",H="["+g+"]",D="\\u200d",z="(?:"+T+"|"+R+")",q="(?:"+H+"|"+R+")",V="(?:"+S+"(?:d|ll|m|re|s|t|ve))?",ee="(?:"+S+"(?:D|LL|M|RE|S|T|VE))?",$=N+"?",te="["+m+"]?",fe="(?:"+D+"(?:"+[I,k,F].join("|")+")"+te+$+")*",de="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ae="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",L=te+$+fe,K="(?:"+[A,k,F].join("|")+")"+L,Y=RegExp([H+"?"+T+"+"+V+"(?="+[E,H,"$"].join("|")+")",q+"+"+ee+"(?="+[E,H+z,"$"].join("|")+")",H+"?"+z+"+"+V,H+"+"+ee,Ae,de,w,K].join("|"),"g");function J(oe){return oe.match(Y)||[]}return mw=J,mw}var vw,dL;function mue(){if(dL)return vw;dL=1;var t=hue(),e=pue(),n=FT(),r=gue();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 vw=s,vw}var yw,fL;function vue(){if(fL)return yw;fL=1;var t=uue(),e=fue(),n=mue(),r="['’]",s=RegExp(r,"g");function o(a){return function(u){return t(n(e(u).replace(s,"")),a,"")}}return yw=o,yw}var bw,hL;function yue(){if(hL)return bw;hL=1;var t=vue(),e=t(function(n,r,s){return n+(s?"-":"")+r.toLowerCase()});return bw=e,bw}var bue=yue();const HF=Va(bue),Sue=/\{([^}]+)\}/g;function $F(t){const e=new RegExp(Sue);if(typeof t=="string")return e.test(t);if(typeof t=="object"){let n=!1;for(const r in t)if(yi(t,r)){const s=t[r];if($F(s)){n=!0;break}}return n}return!1}const Eue="amplify";function g_(t){return Object.entries(t).map(([e,n])=>{const r=ab(n)?n.toString():qF({value:n});return`${HF(e)}:${r}; `}).join(" ")}function qT({path:t=[]}){return`${HF([Eue,...t].join(" "))}`}const Cue=["offsetX","offsetY","blurRadius","spreadRadius","color"];function qF(t){const{value:e}=t;return vi(e)?gL(e):pL(e)?Cue.map(n=>gL(pL(t)?t[n]:e[n])).join(" "):e}function ab(t){return ls(t)&&yi(t,"value")}function pL(t){return ls(t)&&yi(t,"offsetX")}function gL(t){if(!t)return"";if($F(t)){const e=t.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${qT({path:e})})`}return t}const mL=({token:t,path:e})=>{const n=`--${qT({path:e})}`,{value:r}=t,s=qF(t);return{name:n,original:r,path:e,value:s,toString:()=>`var(${n})`}};function m_({tokens:t,path:e=[],setupToken:n}){if(yi(t,"value"))return n({token:t,path:e});const r={};for(const s in t)if(yi(t,s)){const o=t[s],a=ls(o)?o:{value:o};r[s]=m_({tokens:a,path:e.concat(s),setupToken:n})}return r}function v_(t,e){e=e||[];for(var n in t)yi(t,n)&&(ls(t[n])&&"value"in t[n]?e.push(t[n]):ls(t[n])&&v_(t[n],e));return e}function WF(t,e,n){if(t==null)return{};var r,s,o,a,u,c,f=t[0]||{},h=1,g=t.length;for(n=n||[],typeof f!="object"&&(f={});h<g;h++)if((u=t[h])!=null){for(a in u)if(yi(u,a)&&a!=="__proto__"&&(r=f[a],o=u[a],f!==o))if(o&&(ls(o)||(s=Array.isArray(o)))){s?(s=!1,c=r&&Array.isArray(r)?r:[]):c=r&&ls(r)?r:{};var m=n.slice(0);m.push(a),f[a]=WF([c,o],e,m)}else o!==void 0&&(f[a]=o)}return f}function vL(t,e){return e?`${t} { ${Object.entries(e).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
|
|
160
|
-
`:""}function ya(t,e){let n="";const{_modifiers:r={},_element:s={},_vars:o,...a}=e;if(Object.keys(a).length){const[u,c]=wse(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(u).forEach(([f,h])=>{const{_modifiers:g={},_element:m={},_vars:y,...S}=h;n+=`${t}${f} { ${g_(S)} }
|
|
161
|
-
`,n+=vL(`${t}${f}`,y)}),n+=`${t} { ${g_(c)} }
|
|
162
|
-
`}return n+=vL(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 wue({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}`,h=`[data-amplify-theme="${s}"] .${f}`,g=bi(u)?u(r):u;n+=ya(h,g),c&&c.forEach(m=>{const y=bi(m.theme)?m.theme(r):m.theme;if("mediaQuery"in m&&(n+=`@media (${m.mediaQuery}) {
|
|
163
|
-
${ya(h,y)}
|
|
164
|
-
}`),"breakpoint"in m){const S=o.values[m.breakpoint];n+=`
|
|
165
|
-
@media (min-width: ${S}px) {
|
|
166
|
-
${ya(h,y)}
|
|
167
|
-
}`}"selector"in m&&(n+=ya(`${m.selector} .${f}`,y)),"colorMode"in m&&(n+=`
|
|
168
|
-
@media (prefers-color-scheme: ${m.colorMode}) {
|
|
169
|
-
${ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="system"] .${f}`,y)}
|
|
170
|
-
}
|
|
171
|
-
`,n+=ya(`[data-amplify-theme="${s}"][data-amplify-color-mode="${m.colorMode}"] .${f}`,y))})}),n}function yL({keys:t,value:e}){return t.reduce((n,r)=>({...n,[r]:{value:`{colors.${e}.${r}.value}`}}),{})}function xue({animations:t,tokens:e}){let n="";return Object.entries(t).forEach(([r,s])=>{n+=`
|
|
172
|
-
@keyframes ${r} {`,Object.entries(s).forEach(([o,a])=>{n+=`
|
|
173
|
-
${o} {
|
|
174
|
-
`;const u=bi(a)?a(e):a;n+=g_(u),n+=`
|
|
175
|
-
}`}),n+=`
|
|
176
|
-
}`}),n}function lb(t,e=BF){const n=WF([{},e,{...t,components:{}}]),{primaryColor:r,secondaryColor:s}=n;vi(r)&&(n.tokens.colors.primary=yL({keys:Object.keys(n.tokens.colors[r]),value:r})),vi(s)&&(n.tokens.colors.secondary=yL({keys:Object.keys(n.tokens.colors[s]),value:s}));const o=m_({tokens:n.tokens,setupToken:mL}),{breakpoints:a,name:u}=n;let c=`[data-amplify-theme="${u}"] {
|
|
177
|
-
`+v_(o).map(h=>`${h.name}: ${h.value};`).join(`
|
|
178
|
-
`)+`
|
|
179
|
-
}
|
|
180
|
-
`;t?.components&&(c+=wue({theme:{...n,tokens:o},components:t.components}));let f=[];return n.animations&&(c+=xue({animations:n.animations,tokens:o})),n.overrides&&(f=n.overrides.map(h=>{const g=m_({tokens:h.tokens,setupToken:mL}),m=v_(g).map(y=>`${y.name}: ${y.value};`).join(`
|
|
181
|
-
`);if("selector"in h&&(c+=`
|
|
182
|
-
${h.selector} {
|
|
183
|
-
${m}
|
|
184
|
-
}
|
|
185
|
-
`),"mediaQuery"in h&&(c+=`
|
|
186
|
-
@media (${h.mediaQuery}) {
|
|
187
|
-
[data-amplify-theme="${u}"] {
|
|
188
|
-
${m}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
`),"breakpoint"in h){const y=n.breakpoints.values[h.breakpoint];c+=`
|
|
192
|
-
@media (min-width: ${y}px) {
|
|
193
|
-
[data-amplify-theme="${u}"] {
|
|
194
|
-
${m}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
`}return"colorMode"in h&&(c+=`
|
|
198
|
-
@media (prefers-color-scheme: ${h.colorMode}) {
|
|
199
|
-
[data-amplify-theme="${u}"][data-amplify-color-mode="system"] {
|
|
200
|
-
${m}
|
|
201
|
-
color-scheme: ${h.colorMode};
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
`,c+=`
|
|
205
|
-
[data-amplify-theme="${u}"][data-amplify-color-mode="${h.colorMode}"] {
|
|
206
|
-
${m}
|
|
207
|
-
color-scheme: ${h.colorMode};
|
|
208
|
-
}
|
|
209
|
-
`),{...h,tokens:g}})),{tokens:o,breakpoints:a,name:u,cssText:c,containerProps:({colorMode:h}={})=>({"data-amplify-theme":u,"data-amplify-color-mode":h}),overrides:f}}const Be=(...t)=>{const e=[];for(const n of t)if(n){if(vi(n)){e.push(n);continue}if(typeof n=="number"){e.push(n.toString());continue}if(Array.isArray(n)){e.push(Be(...n));continue}if(ls(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){e.push(n.toString());continue}for(const r in n)yi(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"},_ue=({componentName:t,packageName:e,version:n})=>{const r=[`ui-${e}`,n];switch(t){case"AIConversation":{Jo({...lse,additionalDetails:[[t],r]});break}case"Authenticator":{Jo({...cse,additionalDetails:[[t],r]});break}case"ChangePassword":case"DeleteUser":{Jo({...use,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{Jo({...dse,additionalDetails:[[t],r]});break}case"InAppMessaging":{Jo({...fse,additionalDetails:[[t],r]});break}case"LocationSearch":{Jo({...hse,additionalDetails:[[t],r]});break}case"MapView":{Jo({...pse,additionalDetails:[[t],r]});break}case"StorageManager":{Jo({...gse,additionalDetails:[[t],r]});break}case"StorageBrowser":{Jo({...mse,additionalDetails:[[t],r]});break}}return Cse},y_=j.createContext(null),Aue=t=>(e,n)=>{IF(e,n,t)};function VF({children:t}){const[e,n]=j.useState("configuring");j.useEffect(()=>{Py().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=_.useContext(y_),s=Kre(qae),o=_.useMemo(()=>r??{authStatus:e,service:s},[e,r,s]),{service:a}=o;return _.useEffect(()=>xse(a,Aue({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),j.createElement(y_.Provider,{value:o},t)}const Tue="`useAuthenticator` must be used inside an `Authenticator.Provider`.",Rue=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],Iue=t=>Rue.some(e=>e===t),Oue=()=>!1;function Nue(t,e){return t.length!==e.length?!1:t.every((n,r)=>{const s=e[r];return Sse(n,s)||Ese(n,s)?!0:n===s})}const Mue=t=>(e,n)=>{const r=t(e),s=t(n);return Nue(r,s)},Pue=t=>({...Oh(t)?.formFields?.setupTotp?.QR}),kue=t=>t.flatMap(([e,n])=>({name:e,...n})),Due=(t={})=>t&&Object.entries(t).map(([e,n])=>!vi(n)||!e?{}:{name:e,label:n,type:"radio",value:n}),Lue=(t=[])=>t.map(e=>({name:"mfa_type",label:Ln.getMfaTypeLabelByValue(e),type:"radio",value:e})),Uue=(t,e)=>Iue(t)?t==="verifyUser"?Due(Oh(e).unverifiedUserAttributes):t==="selectMfaType"?Lue(Oh(e).allowedMfaTypes):kue(soe(t,e)):[];function St(t){const e=j.useContext(y_);if(!e)throw new Error(Tue);const{service:n}=e,{send:r}=n,s=_.useCallback(E=>({...Ise({send:r,state:E})}),[r]),o=t?Mue(t):Oue,{authStatus:a}=e,u=ese(n,s,o),{route:c,totpSecretCode:f,user:h,...g}=u,m=n.getSnapshot(),y=c==="setupTotp"?Pue(m):null,S=Uue(c,m);return{...g,authStatus:a,route:c,totpSecretCode:f,user:h,fields:S,QRFields:y}}const Fue=({route:t})=>[t];function zue(t){const{route:e,initializeMachine:n}=St(Fue),r=j.useRef(!1);j.useEffect(()=>{!r.current&&e==="setup"&&(n(t),r.current=!0)},[n,e,t])}const jue=({shouldWarn:t,message:e})=>{_.useEffect(()=>{},[t,e])};function Bue({componentName:t,packageName:e,version:n}){_.useEffect(()=>_ue({componentName:t,packageName:e,version:n}),[t,e,n])}const GF=_.createContext({theme:lb(),colorMode:void 0}),WT={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"},VT={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},b_={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"},Hue=t=>t in b_,KF=t=>typeof t=="string"&&t.length===0,bL=t=>t==null||KF(t),ub=t=>Object.keys(t),GT=(t,e,n)=>{if(typeof e!="string")return e;if(e.includes(" "))return e.split(" ").map(r=>GT(t,r,n)).join(" ");if(Hue(t)){const r=e.split("."),s=b_[t];let o=n[s];for(let a=0;a<r.length;a++){if(o){o=o[r[a]];continue}break}return ab(o)?`var(--${qT({path:[b_[t],...r]})})`:e}return e},$ue=({breakpoint:t,breakpoints:e,values:n})=>{const r=n[t];if(r!==void 0)return r;const s=ub(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},que=t=>ub(t).reduce((e,n)=>n in BF.breakpoints.values?{...e,[n]:t[n]}:e,{}),Wue=({breakpoint:t,breakpoints:e,values:n})=>{let r={};const s=ub(e).sort((o,a)=>e[o]-e[a]);return Array.isArray(n)?n.forEach((o,a)=>{r[s[a]]=o}):typeof n=="object"&&(r=que(n)),$ue({breakpoint:t,breakpoints:e,values:r})},Vue=({breakpoints:t})=>{const e=ub(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}})},Gue=typeof window>"u"?_.useEffect:_.useLayoutEffect,Kue=({breakpoints:t,defaultBreakpoint:e})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,s=_.useMemo(()=>Vue({breakpoints:t}),[t]),[o,a]=_.useState(e),u=_.useCallback((c,f)=>{c&&a(f)},[a]);return Gue(()=>{if(!r)return;const c=s.map(({query:f,breakpoint:h})=>{const g=r(f);u(g.matches,h);const m=y=>{y.matches&&a(h)};return g.addEventListener("change",m),()=>g.removeEventListener("change",m)});return()=>{c.forEach(f=>f())}},[t,a,r,s]),_.useDebugValue(o,c=>c),o},Yue=t=>typeof t>"u"||typeof t.theme>"u"?lb():t.theme,Zue=()=>{const t=_.useContext(GF);return Yue(t)},Xue=({value:t,propKey:e,tokens:n})=>ab(t)?t.toString():vi(t)?vi(e)?GT(e,t,n):t:null,Que=t=>t==="auto"||typeof t=="number"&&!isNaN(t)||typeof t=="string"&&!isNaN(parseFloat(t)),Sw=t=>t==="auto"?"auto":`span ${t}`,SL=t=>Que(t)?Sw(t):Array.isArray(t)?t.map(e=>Sw(e)):typeof t=="object"&&t!=null?Object.entries(t).reduce((e,[n,r])=>({...e,[n]:Sw(r)}),{}):null,Jue=t=>{const{rowSpan:e,columnSpan:n,row:r,column:s,...o}=t,{rowFromSpanValue:a,columnFromSpanValue:u}=_.useMemo(()=>({rowFromSpanValue:SL(e),columnFromSpanValue:SL(n)}),[e,n]);return{row:bL(r)?a:r,column:bL(s)?u:s,...o}},ece=t=>t in WT,tce=({props:t={},style:e={},breakpoint:n,breakpoints:r,tokens:s})=>{const o={};return Object.keys(t).filter(a=>t[a]!==null).forEach(a=>{if(ece(a)){const u=t[a];if(u==null||KF(u))return;const c=WT[a];let f="";ab(u)?f=u.toString():typeof u=="string"?f=GT(a,u,s):typeof u=="number"?f=u:typeof u=="object"&&(f=Xue({propKey:a,tokens:s,value:Wue({values:u,breakpoint:n,breakpoints:r})})),e={...e,[c]:f}}else typeof t[a]<"u"&&(o[a]=t[a])}),{propStyles:e,nonStyleProps:o}},nce=(t,e)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:s}=Zue(),o=Kue({breakpoints:n,defaultBreakpoint:r}),a=Jue(t);return _.useMemo(()=>tce({props:a,style:e,breakpoint:o,breakpoints:n,tokens:s}),[a,e,n,o,s])},qt=t=>_.forwardRef(t),rce=({as:t="div",children:e,testId:n,ariaLabel:r,isDisabled:s,style:o,inert:a,...u},c)=>{const{propStyles:f,nonStyleProps:h}=nce(u,o);return _.createElement(t,{"aria-label":r,"data-testid":n,disabled:s,ref:c,inert:a?"":null,style:f,...h},e)},$e=qt(rce);$e.displayName="View";const Df={minX:0,minY:0,width:24,height:24},sce=({className:t,as:e="svg",fill:n="currentColor",pathData:r,viewBox:s=Df,children:o,paths:a,...u},c)=>{const f=s.minX??Df.minX,h=s.minY??Df.minY,g=s.width??Df.width,m=s.height??Df.height;let y;return o&&(y=o),a&&(y=a.map((S,E)=>_.createElement("path",{...S,key:E}))),r&&(y=_.createElement("path",{d:r,fill:n})),_.createElement($e,{as:e,className:Be(le.Icon,t),ref:c,viewBox:`${f} ${h} ${g} ${m}`,...u},y)},YF=qt(sce);YF.displayName="Icon";const oce=_.createContext({});function cb(t){const e=_.useContext(oce);if(t&&e)return e[t]}const ice=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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"})))},ace=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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"})))},lce=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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"})))},uce=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},ZF=({variation:t,ariaHidden:e,ariaLabel:n,role:r})=>{const s=cb("alert");let o;switch(t){case"info":o=s?.info??_.createElement(lce,{"aria-hidden":e,"aria-label":n,role:r});break;case"error":o=s?.error??_.createElement(ace,{"aria-hidden":e,"aria-label":n,role:r});break;case"warning":o=s?.warning??_.createElement(uce,{"aria-hidden":e,"aria-label":n,role:r});break;case"success":o=s?.success??_.createElement(ice,{"aria-hidden":e,"aria-label":n,role:r});break}return o?_.createElement("span",{className:le.AlertIcon},o):null};ZF.displayName="AlertIcon";const cce=globalThis?.document?_.useLayoutEffect:()=>{},dce="amplify-id",fce=R8.useId||(()=>{});let hce=0;const Fa=t=>{const[e,n]=_.useState(fce());return cce(()=>{t||n(r=>r??String(hce++))},[t]),t??(e?`${dce}-${e}`:"")},XF=_.createContext({isFieldsetDisabled:!1}),dp=t=>{let n=_.useContext(XF).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=t),{isFieldsetDisabled:n}},pce=({className:t,children:e,...n},r)=>_.createElement($e,{className:Be(le.Flex,t),ref:r,...n},e),Fe=qt(pce);Fe.displayName="Flex";const gce="linear-empty",mce="linear-filled",vce="circular-empty",yce="circular-filled",EL=8,S_=42,nm=2*S_*Math.PI,bce=({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 h=`${u}%`,g=Be(le.Loader,Ht(le.Loader,r),Ht(le.Loader,s),Br(le.Loader,"determinate",o),t),m=_.createElement("g",null,_.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":gce}),_.createElement("line",{x1:"0",x2:o?h:"100%",y1:"50%",y2:"50%",style:{stroke:o&&u===0?"none":e?String(e):void 0},"data-testid":mce}),o?_.createElement("text",{"aria-live":"polite",className:Be(le.LoaderLabel,a?le.VisuallyHidden:null),x:`${-1+u}%`,y:"200%"},h):null),y=_.createElement("g",null,_.createElement("circle",{cx:"50%",cy:"50%",r:`${S_}%`,strokeWidth:`${EL}%`,style:{stroke:String(n)},"data-testid":vce}),_.createElement("circle",{cx:"50%",cy:"50%",r:`${S_}%`,strokeWidth:`${EL}%`,style:{stroke:String(e),strokeDasharray:o?`${nm}% ${nm}%`:void 0,strokeDashoffset:o?`${nm-nm*u/100}%`:void 0},"data-testid":yce}),o?_.createElement("text",{"aria-live":"polite",className:Be(le.LoaderLabel,a?le.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return _.createElement($e,{as:"svg","aria-valuenow":o?u:void 0,className:g,ref:f,role:"progressbar",...c},s==="linear"?m:y)},QF=qt(bce);QF.displayName="Loader";const Sce=["link","primary",void 0],Ece=({className:t,children:e,colorTheme:n,isFullWidth:r=!1,isDisabled:s,isLoading:o,loadingText:a="",size:u,type:c="button",variation:f,...h},g)=>{const m=Sce.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:y}=dp(s??o??h.disabled),S=Be(le.Button,le.FieldGroupControl,Ht(le.Button,f),Ht(le.Button,m),Ht(le.Button,u),Br(le.Button,"disabled",y),Br(le.Button,"loading",o),Br(le.Button,"fullwidth",r),t);return _.createElement($e,{ref:g,as:"button",className:S,isDisabled:y,type:c,...h},o?_.createElement(Fe,{as:"span",className:le.ButtonLoaderWrapper},_.createElement(QF,{size:u}),a||null):e)},en=qt(Ece);en.displayName="Button";const Cce=t=>{const{className:e,size:n,...r}=t;return _.createElement($e,{as:"span",width:n??"1em",height:n??"1em",className:Be(le.Icon,e),...r},_.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},_.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"})))},wce=({as:t="p",className:e,children:n,isTruncated:r,variation:s,...o},a)=>{const u=Be(le.Text,Ht(le.Text,s),Br(le.Text,"truncated",r),e);return _.createElement($e,{as:t,className:u,ref:a,...o},n)},Ts=qt(wce);Ts.displayName="Text";const xce="qa-field-description",db=({descriptiveText:t,labelHidden:e,...n})=>t?_.createElement(Ts,{"data-testid":xce,className:Be(le.FieldDescription,{[le.VisuallyHidden]:e}),...n},t):null;db.displayName="FieldDescription";const fb=({errorMessage:t,hasError:e,...n})=>e&&t?_.createElement(Ts,{className:le.FieldErrorMessage,...n},t):null;fb.displayName="FieldErrorMessage";const _ce=({children:t,className:e,visuallyHidden:n,...r},s)=>_.createElement($e,{as:"label",className:Be(le.Label,e,{[le.VisuallyHidden]:n}),ref:s,...r},t),KT=qt(_ce);KT.displayName="Label";const Ace=({buttonRef:t,children:e,className:n,dismissButtonLabel:r=VT.Alert.dismissButtonLabel,hasIcon:s=!0,heading:o,isDismissible:a=!1,onDismiss:u,variation:c,...f},h)=>{const[g,m]=_.useState(!1),y=cb("alert"),S=_.useCallback(()=>{m(!g),bi(u)&&u()},[m,u,g]);return g?null:_.createElement(Fe,{className:Be(le.Alert,n,Ht(le.Alert,c)),ref:h,role:"alert",...f},s&&_.createElement(ZF,{variation:c,ariaHidden:!0}),_.createElement($e,{flex:"1"},o&&_.createElement($e,{className:le.AlertHeading},o),_.createElement($e,{className:le.AlertBody},e)),a&&_.createElement(en,{ariaLabel:r,variation:"link",className:le.AlertDismiss,onClick:S,ref:t},y?.close??_.createElement(Cce,{"aria-hidden":"true"})))},JF=qt(Ace);JF.displayName="Alert";const kl=(t,e)=>t&&e?`${t}-${e}`:void 0,Tce=({children:t,className:e,innerEndComponent:n,innerStartComponent:r,orientation:s="horizontal",outerEndComponent:o,outerStartComponent:a,variation:u,...c},f)=>{const h=r!=null,g=n!=null,m=h?le.FieldGroupHasInnerStart:null,y=g?le.FieldGroupHasInnerEnd:null,S=Be(le.FieldGroup,m,y,Ht(le.FieldGroup,s),e);return _.createElement(Fe,{className:S,ref:f,...c},a&&_.createElement($e,{className:Be(le.FieldGroupOuterStart,Ht(le.FieldGroupOuterStart,u))},a),_.createElement($e,{className:Be(le.FieldGroupFieldWrapper,Ht(le.FieldGroupFieldWrapper,s))},r&&_.createElement($e,{className:le.FieldGroupInnerStart},r),t,n&&_.createElement($e,{className:le.FieldGroupInnerEnd},n)),o&&_.createElement($e,{className:Be(le.FieldGroupOuterEnd,Ht(le.FieldGroupOuterEnd,u))},o))},e7=qt(Tce);e7.displayName="FieldGroup";const Rce=({autoComplete:t,checked:e,className:n,defaultChecked:r,defaultValue:s,id:o,isDisabled:a,isReadOnly:u,isRequired:c,size:f,type:h="text",hasError:g=!1,value:m,variation:y,...S},E)=>{const C=Be(le.Input,le.FieldGroupControl,Ht(le.Input,y),Br(le.Input,"error",g),Ht(le.Input,f),n),{isFieldsetDisabled:w}=dp(a);return _.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:h,value:m,...S})},YT=qt(Rce);YT.displayName="Input";const Ice=t=>t in WT,t7=t=>{const e={styleProps:{},rest:{}};return Object.keys(t).forEach(n=>{Ice(n)?e.styleProps={...e.styleProps,[n]:t[n]}:e.rest={...e.rest,[n]:t[n]}}),e},ZT=t=>{const e=t.filter(n=>n!==void 0).join(" ");return e.length>0?e:void 0},XT="error",QT="description",Oce=(t,e)=>{const{className:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,innerEndComponent:u,innerStartComponent:c,label:f,labelHidden:h=!1,outerEndComponent:g,outerStartComponent:m,size:y,testId:S,variation:E,inputStyles:C,...w}=t,A=Fa(a),T=Fa(),R=r?kl(T,QT):void 0,M=o?kl(T,XT):void 0,N=ZT([M,R]),{styleProps:I,rest:k}=t7(w);return _.createElement(Fe,{className:Be(le.Field,Ht(le.Field,y),le.TextField,n),testId:S,...I},_.createElement(KT,{htmlFor:A,visuallyHidden:h},f),_.createElement(db,{id:R,labelHidden:h,descriptiveText:r}),_.createElement(e7,{outerStartComponent:m,outerEndComponent:g,innerStartComponent:c,innerEndComponent:u,variation:E},_.createElement(YT,{"aria-describedby":N,hasError:o,id:A,ref:e,size:y,variation:E,...C,...k})),_.createElement(fb,{id:M,hasError:o,errorMessage:s}))},fp=qt(Oce);fp.displayName="TextField";const Nce=({as:t="span",children:e,className:n,...r},s)=>_.createElement($e,{as:t,className:Be(le.VisuallyHidden,n),ref:s,...r},e),hb=qt(Nce);hb.displayName="VisuallyHidden";const Mce=({className:t,orientation:e="horizontal",size:n,label:r,...s},o)=>{const a=Be(le.Divider,Ht(le.Divider,e),Ht(le.Divider,n),t);return _.createElement($e,{"aria-orientation":e,as:"hr",className:a,"data-label":r,ref:o,...s})},JT=qt(Mce);JT.displayName="Divider";const Pce=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},kce=({children:t,className:e,isDisabled:n,legend:r,legendHidden:s,size:o,testId:a,variation:u="plain",...c},f)=>{const{isFieldsetDisabled:h}=dp(n),g=_.useMemo(()=>({isFieldsetDisabled:h}),[h]),m=Be(le.Fieldset,Ht(le.Fieldset,u),Ht(le.Fieldset,o),e),y=Be(le.FieldsetLegend,Ht(le.FieldsetLegend,o),{[le.VisuallyHidden]:s});return _.createElement(XF.Provider,{value:g},_.createElement(Fe,{as:"fieldset",className:m,ref:f,disabled:h,testId:a,...c},_.createElement(hb,{as:"legend"},r),_.createElement($e,{as:"div","aria-hidden":"true",className:y},r),t))},n7=qt(kce);n7.displayName="Fieldset";const Dce={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},Lce=({className:t,children:e,isTruncated:n,level:r=6,...s},o)=>_.createElement($e,{as:Dce[r],className:Be(le.Heading,Ht(le.Heading,r),Br(le.Heading,"truncated",n),t),ref:o,...s},e),Ar=qt(Lce);Ar.displayName="Heading";var Uce=_.createContext(void 0),Fce=t=>{const{dir:e,children:n}=t;return O.jsx(Uce.Provider,{value:e,children:n})};const zce=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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"})))},jce=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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:Bce,passwordIsShown:Hce,showPassword:$ce}=VT.PasswordField,qce=({fieldType:t,passwordIsHiddenLabel:e=Bce,passwordIsShownLabel:n=Hce,showPasswordButtonLabel:r=$ce,size:s,hasError:o,...a},u)=>{const c=cb("passwordField"),f=Be(le.FieldShowPassword,Br(le.FieldShowPassword,"error",o)),h=t==="password"?c?.visibility??_.createElement(jce,{"aria-hidden":"true"}):c?.visibilityOff??_.createElement(zce,{"aria-hidden":"true"});return _.createElement(en,{"aria-checked":t!=="password",ariaLabel:r,className:f,colorTheme:o?"error":void 0,ref:u,role:"switch",size:s,...a},_.createElement(hb,{"aria-live":"polite"},t==="password"?e:n),h)},r7=qt(qce);r7.displayName="ShowPasswordButton";const Wce=({autoComplete:t="current-password",label:e,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:s,passwordIsShownLabel:o,showPasswordButtonLabel:a,showPasswordButtonRef:u,size:c,hasError:f,...h},g)=>{const[m,y]=_.useState("password"),S=_.useCallback(()=>{y(m==="password"?"text":"password")},[y,m]);return _.createElement(fp,{autoComplete:t,outerEndComponent:r?null:_.createElement(r7,{fieldType:m,onClick:S,passwordIsHiddenLabel:s,passwordIsShownLabel:o,ref:u,size:c,showPasswordButtonLabel:a,hasError:f}),size:c,type:m,label:e,className:Be(le.PasswordField,n),ref:g,hasError:f,...h})},eR=qt(Wce);eR.displayName="PasswordField";const Vce=({autoComplete:t,className:e,size:n,variation:r,value:s,defaultValue:o,hasError:a,icon:u,iconColor:c,children:f,placeholder:h,isDisabled:g,isRequired:m,isMultiple:y=!1,selectSize:S=1,...E},C)=>{const A=s===void 0&&o===void 0&&h,T=y||S>1,R=Be(le.Select,le.FieldGroupControl,Ht(le.Select,n),Ht(le.Select,r),Br(le.Select,"error",a),Br(le.Select,"expanded",T),e),M=cb("select"),{isFieldsetDisabled:N}=dp(g);return _.createElement($e,{className:le.SelectWrapper},_.createElement($e,{"aria-invalid":a,as:"select",autoComplete:t,value:s,defaultValue:A?"":o,isDisabled:N,multiple:y,size:S,required:m,className:R,ref:C,...E},h&&_.createElement("option",{value:""},h),f),T?null:_.createElement(Fe,{className:Be(le.SelectIcon,Ht(le.SelectIcon,n)),color:c,"aria-hidden":"true"},u??M?.expand??_.createElement(Pce,null)))},s7=qt(Vce);s7.displayName="Select";const Gce=({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)=>_.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),Kce=(t,e)=>{const{children:n,className:r,descriptiveText:s,errorMessage:o,hasError:a=!1,id:u,label:c,labelHidden:f=!1,options:h,size:g,testId:m,inputStyles:y,...S}=t,E=Fa(u),C=Fa(),w=s?kl(C,QT):void 0,A=a?kl(C,XT):void 0,T=ZT([A,w]),{styleProps:R,rest:M}=t7(S);return _.createElement(Fe,{className:Be(le.Field,Ht(le.Field,g),le.SelectField,r),testId:m,...R},_.createElement(KT,{htmlFor:E,visuallyHidden:f},c),_.createElement(db,{id:w,labelHidden:f,descriptiveText:s}),_.createElement(s7,{"aria-describedby":T,hasError:a,id:E,ref:e,size:g,...M,...y},Gce({children:n,options:h})),_.createElement(fb,{id:A,hasError:a,errorMessage:o}))},o7=qt(Kce);o7.displayName="SelectField";const Yce=({className:t,dialCodeList:e,isReadOnly:n,...r},s)=>{const o=e??OF,a=_.useMemo(()=>o.map(u=>_.createElement("option",{key:u,value:u,disabled:n},u)),[o,n]);return _.createElement(o7,{"aria-disabled":n,autoComplete:"tel-country-code",className:Be(le.CountryCodeSelect,le.DialCodeSelect,t),labelHidden:!0,ref:s,...r},a)},i7=qt(Yce);i7.displayName="DialCodeSelect";const Zce=({autoComplete:t="tel-national",className:e,defaultDialCode:n,dialCodeLabel:r=VT.PhoneNumberField.countryCodeLabel,dialCodeList:s,dialCodeName:o,dialCodeRef:a,hasError:u,isDisabled:c,isReadOnly:f,onDialCodeChange:h,onInput:g,size:m,variation:y,...S},E)=>_.createElement(fp,{outerStartComponent:_.createElement(i7,{defaultValue:n,dialCodeList:s,className:e,hasError:u,isDisabled:c,isReadOnly:f,label:r,name:o,onChange:h,ref:a,size:m,variation:y}),autoComplete:t,className:Be(le.PhoneNumberField,e),hasError:u,isDisabled:c,isReadOnly:f,onInput:g,ref:E,size:m,type:"tel",variation:y,...S}),a7=qt(Zce);a7.displayName="PhoneNumberField";const Xce={name:"default"},l7=j.createContext(Xce),Qce=()=>_.useContext(l7),Jce=({children:t,className:e,id:n,isDisabled:r=!1,testId:s,value:o,labelPosition:a,...u},c)=>{const{currentValue:f,defaultValue:h,name:g,hasError:m,isGroupDisabled:y=!1,isRequired:S,isReadOnly:E,onChange:C,size:w,labelPosition:A}=Qce(),{isFieldsetDisabled:T}=dp(y||r||E&&h!==o),R=f!==void 0?o===f:void 0,M=h!==void 0?o===h:void 0,N=a??A;return _.createElement(Fe,{as:"label",className:Be(le.Radio,Br(le.Radio,"disabled",T),N?`amplify-label-${N}`:null,e)},t&&_.createElement(Ts,{as:"span",className:Be(le.RadioLabel,Br(le.RadioLabel,"disabled",T))},t),_.createElement(YT,{checked:R,className:Be(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}),_.createElement(Fe,{"aria-hidden":"true",as:"span",className:Be(le.RadioButton,Ht(le.RadioButton,w)),testId:s}))},tR=qt(Jce);tR.displayName="Radio";const ede=({children:t,className:e,defaultValue:n,descriptiveText:r,errorMessage:s,hasError:o=!1,id:a,isDisabled:u,isRequired:c,isReadOnly:f,legend:h,legendHidden:g=!1,labelPosition:m,onChange:y,name:S,size:E,testId:C,value:w,variation:A,...T},R)=>{const M=Fa(a),N=Fa(),I=r?kl(N,QT):void 0,k=o?kl(N,XT):void 0,F=ZT([k,I]),H=kl(C,le.RadioGroup),D=_.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 _.createElement(n7,{className:Be(le.Field,Ht(le.Field,E),le.RadioGroupField,e),isDisabled:u,legend:h,legendHidden:g,ref:R,role:"radiogroup",size:E,testId:C,variation:A,...T},_.createElement(db,{id:I,labelHidden:g,descriptiveText:r}),_.createElement(Fe,{"aria-describedby":F,className:le.RadioGroup,id:M,testId:H},_.createElement(l7.Provider,{value:D},t)),_.createElement(fb,{id:k,hasError:o,errorMessage:s}))},nR=qt(ede);nR.displayName="RadioGroupField";const pb=_.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),u7="-",tde=({className:t,value:e,children:n,onClick:r,as:s="button",role:o="tab",...a},u)=>{const{activeTab:c,setActiveTab:f,groupId:h}=_.useContext(pb);let g=e;typeof g=="string"&&(g=g.replace(" ",u7));const m=c===e,y=S=>{bi(r)&&r?.(S),f(e)};return _.createElement($e,{...a,role:o,as:s,id:`${h}-tab-${g}`,"aria-selected":m,"aria-controls":`${h}-panel-${g}`,tabIndex:m?void 0:-1,className:Be(le.TabsItem,Br(le.TabsItem,"active",c===e),t),ref:u,onClick:y},n)},rR=qt(tde);rR.displayName="Tabs.Item";const nde=t=>_.isValidElement(t),rde=({className:t,children:e,indicatorPosition:n,spacing:r,role:s="tablist",...o},a)=>{const u=_.useRef(null),{activeTab:c,setActiveTab:f}=_.useContext(pb);_.useImperativeHandle(a,()=>u.current);const h=_.useMemo(()=>_.Children.toArray(e).map(E=>{if(E&&nde(E))return E.props.value}).filter(E=>!!E),[e]),g=h.indexOf(c),m=_.useCallback(()=>{let E=g===h.length-1?0:g+1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===h.length-1?E=0:E++;const w=h[E];if(w){f(w);const A=C[E];A?.focus(),A?.click()}},[g,f,h]),y=_.useCallback(()=>{let E=g===0?h.length-1:g-1;const C=u.current?.querySelectorAll("button")??[];for(;C[E].disabled;)E===0?E=h.length-1:E--;const w=h[E];if(w){f(w);const A=C[E];A?.focus(),A?.click()}},[g,f,h]),S=_.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 _.createElement($e,{...o,role:s,onKeyDown:S,className:Be(le.TabsList,n?Ht(le.TabsList,n):null,r?Ht(le.TabsList,r):null,t),ref:u},e)},sR=qt(rde);sR.displayName="Tabs.List";const sde=({className:t,value:e,children:n,role:r="tabpanel",...s},o)=>{const{activeTab:a,isLazy:u,groupId:c}=_.useContext(pb);if(u&&a!==e)return null;let f=e;return typeof f=="string"&&(f=f.replace(" ",u7)),_.createElement($e,{...s,role:r,id:`${c}-panel-${f}`,"aria-labelledby":`${c}-tab-${f}`,className:Be(le.TabsPanel,Br(le.TabsPanel,"active",a===e),t),ref:o},n)},oR=qt(sde);oR.displayName="Tabs.Panel";const ode=({children:t,defaultValue:e,className:n,value:r,onValueChange:s,isLazy:o,...a},u)=>{const c=Fa(),f=r!==void 0,[h,g]=_.useState(()=>f?r:e),m=f?r:h??"",y=_.useCallback(E=>{bi(s)&&s(E),f||g(E)},[s,f]),S=_.useMemo(()=>({activeTab:m,isLazy:o,setActiveTab:y,groupId:c}),[m,y,o,c]);return _.createElement(pb.Provider,{value:S},_.createElement($e,{...a,ref:u,className:Be(n,le.Tabs)},t))},iR=qt(ode);iR.displayName="Tabs.Container";const ide=({items:t,indicatorPosition:e,justifyContent:n,spacing:r,...s},o)=>_.createElement(iR,{...s,ref:o},_.createElement(sR,{indicatorPosition:e,justifyContent:n,spacing:r},t?.map(({value:a,label:u,content:c,...f})=>_.createElement(rR,{...f,key:a,value:a},u))),t?.map(({value:a,content:u,isDisabled:c})=>_.createElement(oR,{key:a,value:a,isDisabled:c},u))),Cl=Object.assign(qt(ide),{Item:rR,List:sR,Panel:oR,Container:iR});Cl.displayName="Tabs";const Ew=({errors:t,id:e,dataAttr:n})=>{if(!(t?.length>0))return null;const r=n?{[n]:!0}:{};return j.createElement($e,{...r,id:e},t.map(s=>j.createElement(Ts,{key:s,role:"alert",variation:"error"},ye(s))))},ade="6.15.4",lde=({message:t,shouldWarn:e})=>{jue({message:t,shouldWarn:e})},c7=_.createContext(null),cs=()=>{const t=_.useContext(c7);if(!t)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return t},ude=t=>{const e=new FormData(t.target);return Object.fromEntries(e)};function ds(){const{submitForm:t,updateBlur:e,updateForm:n}=St(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=_.useCallback(({target:{name:a}})=>{e({name:a})},[e]),s=_.useCallback(({target:{checked:a,name:u,type:c,value:f}})=>{n({name:u,value:c==="checkbox"&&!a?void 0:f})},[n]),o=_.useCallback(a=>{a.preventDefault(),t(ude(a))},[t]);return{handleBlur:r,handleChange:s,handleSubmit:o}}const Vr=()=>{const{error:t}=St(e=>[e.error]);return j.createElement(j.Fragment,null,t?j.createElement(JF,{variation:"error",isDismissible:!0},ye(t)):null)};function CL({autocomplete:t,dialCode:e,name:n,type:r,...s}){const{validationErrors:o}=St(({validationErrors:h})=>[h]),a=_.useMemo(()=>kse(o[n]),[n,o]),u=a?.length>0,c=Fa(),f=u?c:void 0;return r==="tel"?_.createElement(_.Fragment,null,_.createElement(a7,{...s,name:n,defaultDialCode:e,dialCodeName:"country_code",autoComplete:t,hasError:u,"aria-describedby":f}),_.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):r==="password"?_.createElement(_.Fragment,null,_.createElement(eR,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,"aria-describedby":f}),_.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):_.createElement(_.Fragment,null,_.createElement(fp,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,type:r,"aria-describedby":f}),_.createElement(Ew,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c}))}function Mo({includePassword:t}={}){const{fields:e}=St(({route:u})=>[u]),{selectedAuthMethod:n,preferredChallenge:r}=St(u=>[u.selectedAuthMethod,u.preferredChallenge]),s=n??r,o=t??(!s||s==="PASSWORD"),a=_.useRef(e.map((u,c)=>(u.name==="password"||u.name==="confirm_password")&&!o?_.createElement(CL,{key:c,...u,isRequired:!1}):_.createElement(CL,{key:c,...u})).filter(Boolean)).current;return _.createElement(_.Fragment,null,a)}function qr({children:t,className:e,variation:n="default"}){St(({route:o})=>[o]);const{components:{Header:r,Footer:s}}=cs();return j.createElement($e,{className:e,"data-amplify-authenticator":"","data-variation":n},j.createElement($e,{"data-amplify-container":""},j.createElement(r,null),j.createElement($e,{"data-amplify-router":"","data-amplify-router-content":void 0},t),j.createElement(s,null)))}const{getDeliveryMessageText:cde,getDeliveryMethodText:dde,getConfirmingText:fde,getConfirmText:hde,getResendCodeText:pde}=Ln;function Wl({className:t,variation:e}){const{isPending:n,resendCode:r,codeDeliveryDetails:s}=St(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignUp:{Header:u=Wl.Header,Footer:c=Wl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:o,onSubmit:a},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(Fe,{direction:"column"},j.createElement(Ts,{className:"amplify-authenticator__subtitle"},cde(s)),j.createElement(Mo,null),j.createElement(Vr,null),j.createElement(en,{variation:"primary",isDisabled:n,type:"submit",loadingText:fde(),isLoading:n},hde()),j.createElement(en,{onClick:r,type:"button"},pde())),j.createElement(c,null))))}const gde=()=>{const{codeDeliveryDetails:t}=St(e=>[e.codeDeliveryDetails]);return j.createElement(Ar,{level:4},dde(t))};Wl.Header=gde;Wl.Footer=function(){return null};const{getChangePasswordText:d7,getChangingText:mde,getBackToSignInText:vde}=Ln,Zs=({className:t,variation:e})=>{const{isPending:n,toSignIn:r}=St(h=>[h.isPending,h.toSignIn]),{handleBlur:s,handleChange:o,handleSubmit:a}=ds(),{components:{ForceNewPassword:{FormFields:u=Zs.FormFields,Header:c=Zs.Header,Footer:f=Zs.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:o,onSubmit:a,onBlur:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(c,null),j.createElement(u,null),j.createElement(Vr,null),j.createElement(en,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:mde()},d7()),j.createElement(en,{onClick:r,type:"button",variation:"link",size:"small"},vde()),j.createElement(f,null))))};Zs.FormFields=function(){return j.createElement(Mo,null)};Zs.Header=function(){return j.createElement(Ar,{level:4},d7())};Zs.Footer=function(){return null};var ic={},Cw,wL;function yde(){return wL||(wL=1,Cw=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Cw}var ww={},pa={},xL;function uu(){if(xL)return pa;xL=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 pa.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},pa.getSymbolTotalCodewords=function(r){return e[r]},pa.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},pa.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},pa.isKanjiModeEnabled=function(){return typeof t<"u"},pa.toSJIS=function(r){return t(r)},pa}var xw={},_L;function aR(){return _L||(_L=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}}})(xw)),xw}var _w,AL;function bde(){if(AL)return _w;AL=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++}},_w=t,_w}var Aw,TL;function Sde(){if(TL)return Aw;TL=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]},Aw=t,Aw}var Tw={},RL;function Ede(){return RL||(RL=1,(function(t){const e=uu().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}})(Tw)),Tw}var Rw={},IL;function Cde(){if(IL)return Rw;IL=1;const t=uu().getSymbolSize,e=7;return Rw.getPositions=function(r){const s=t(r);return[[0,0],[s-e,0],[0,s-e]]},Rw}var Iw={},OL;function wde(){return OL||(OL=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,h=null;for(let g=0;g<o;g++){u=c=0,f=h=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===h?c++:(c>=5&&(a+=e.N1+(c-5)),h=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 h=0;h<o;h++)u=u<<1&2047|s.get(f,h),h>=10&&(u===1488||u===93)&&a++,c=c<<1&2047|s.get(h,f),h>=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 h=t.getPenaltyN1(s)+t.getPenaltyN2(s)+t.getPenaltyN3(s)+t.getPenaltyN4(s);t.applyMask(f,s),h<c&&(c=h,u=f)}return u}})(Iw)),Iw}var rm={},NL;function f7(){if(NL)return rm;NL=1;const t=aR(),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 rm.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}},rm.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}},rm}var Ow={},Lf={},ML;function xde(){if(ML)return Lf;ML=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]})(),Lf.log=function(r){if(r<1)throw new Error("log("+r+")");return e[r]},Lf.exp=function(r){return t[r]},Lf.mul=function(r,s){return r===0||s===0?0:t[e[r]+e[s]]},Lf}var PL;function _de(){return PL||(PL=1,(function(t){const e=xde();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}})(Ow)),Ow}var Nw,kL;function Ade(){if(kL)return Nw;kL=1;const t=_de();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},Nw=e,Nw}var Mw={},Pw={},kw={},DL;function h7(){return DL||(DL=1,kw.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),kw}var go={},LL;function p7(){if(LL)return go;LL=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
|
|
210
|
-
]))+`;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 UL;function cu(){return UL||(UL=1,(function(t){const e=h7(),n=p7();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}}})(Pw)),Pw}var FL;function Tde(){return FL||(FL=1,(function(t){const e=uu(),n=f7(),r=aR(),s=cu(),o=h7(),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 h(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(h(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),A=(C-w)*8;if(E===s.MIXED)return A;const T=A-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}})(Mw)),Mw}var Dw={},zL;function Rde(){if(zL)return Dw;zL=1;const t=uu(),e=1335,n=21522,r=t.getBCHDigit(e);return Dw.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},Dw}var Lw={},Uw,jL;function Ide(){if(jL)return Uw;jL=1;const t=cu();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 Fw,BL;function Ode(){if(BL)return Fw;BL=1;const t=cu(),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)},Fw=n,Fw}var zw,HL;function Nde(){return HL||(HL=1,zw=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}),zw}var jw,$L;function Mde(){if($L)return jw;$L=1;const t=Nde(),e=cu();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)},jw=n,jw}var Bw,qL;function Pde(){if(qL)return Bw;qL=1;const t=cu(),e=uu();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]+`
|
|
211
|
-
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},Bw=n,Bw}var Hw={exports:{}},WL;function kde(){return WL||(WL=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,h,g,m,y,S,E,C;!u.empty();){c=u.pop(),f=c.value,g=c.cost,m=n[f]||{};for(h in m)m.hasOwnProperty(h)&&(y=m[h],S=g+y,E=a[h],C=typeof a[h]>"u",(C||E>S)&&(a[h]=S,u.push(h,S),o[h]=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})(Hw)),Hw.exports}var VL;function Dde(){return VL||(VL=1,(function(t){const e=cu(),n=Ide(),r=Ode(),s=Mde(),o=Pde(),a=p7(),u=uu(),c=kde();function f(w){return unescape(encodeURIComponent(w)).length}function h(w,A,T){const R=[];let M;for(;(M=w.exec(T))!==null;)R.push({data:M[0],index:M.index,mode:A,length:M[0].length});return R}function g(w){const A=h(a.NUMERIC,e.NUMERIC,w),T=h(a.ALPHANUMERIC,e.ALPHANUMERIC,w);let R,M;return u.isKanjiModeEnabled()?(R=h(a.BYTE,e.BYTE,w),M=h(a.KANJI,e.KANJI,w)):(R=h(a.BYTE_KANJI,e.BYTE,w),M=[]),A.concat(T,R,M).sort(function(I,k){return I.index-k.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function m(w,A){switch(A){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(A,T){const R=A.length-1>=0?A[A.length-1]:null;return R&&R.mode===T.mode?(A[A.length-1].data+=T.data,A):(A.push(T),A)},[])}function S(w){const A=[];for(let T=0;T<w.length;T++){const R=w[T];switch(R.mode){case e.NUMERIC:A.push([R,{data:R.data,mode:e.ALPHANUMERIC,length:R.length},{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.ALPHANUMERIC:A.push([R,{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.KANJI:A.push([R,{data:R.data,mode:e.BYTE,length:f(R.data)}]);break;case e.BYTE:A.push([{data:R.data,mode:e.BYTE,length:f(R.data)}])}}return A}function E(w,A){const T={},R={start:{}};let M=["start"];for(let N=0;N<w.length;N++){const I=w[N],k=[];for(let F=0;F<I.length;F++){const H=I[F],D=""+N+F;k.push(D),T[D]={node:H,lastCount:0},R[D]={};for(let z=0;z<M.length;z++){const q=M[z];T[q]&&T[q].node.mode===H.mode?(R[q][D]=m(T[q].lastCount+H.length,H.mode)-m(T[q].lastCount,H.mode),T[q].lastCount+=H.length):(T[q]&&(T[q].lastCount=H.length),R[q][D]=m(H.length,H.mode)+4+e.getCharCountIndicator(H.mode,A))}}M=k}for(let N=0;N<M.length;N++)R[M[N]].end=0;return{map:R,table:T}}function C(w,A){let T;const R=e.getBestModeForData(w);if(T=e.from(A,R),T!==e.BYTE&&T.bit<R.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(T)+`.
|
|
212
|
-
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(A){return A.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(A,T){const R=g(A,u.isKanjiModeEnabled()),M=S(R),N=E(M,T),I=c.find_path(N.map,"start","end"),k=[];for(let F=1;F<I.length-1;F++)k.push(N.table[I[F]].node);return t.fromArray(y(k))},t.rawSplit=function(A){return t.fromArray(g(A,u.isKanjiModeEnabled()))}})(Lw)),Lw}var GL;function Lde(){if(GL)return ww;GL=1;const t=uu(),e=aR(),n=bde(),r=Sde(),s=Ede(),o=Cde(),a=wde(),u=f7(),c=Ade(),f=Tde(),h=Rde(),g=cu(),m=Dde();function y(N,I){const k=N.size,F=o.getPositions(I);for(let H=0;H<F.length;H++){const D=F[H][0],z=F[H][1];for(let q=-1;q<=7;q++)if(!(D+q<=-1||k<=D+q))for(let V=-1;V<=7;V++)z+V<=-1||k<=z+V||(q>=0&&q<=6&&(V===0||V===6)||V>=0&&V<=6&&(q===0||q===6)||q>=2&&q<=4&&V>=2&&V<=4?N.set(D+q,z+V,!0,!0):N.set(D+q,z+V,!1,!0))}}function S(N){const I=N.size;for(let k=8;k<I-8;k++){const F=k%2===0;N.set(k,6,F,!0),N.set(6,k,F,!0)}}function E(N,I){const k=s.getPositions(I);for(let F=0;F<k.length;F++){const H=k[F][0],D=k[F][1];for(let z=-2;z<=2;z++)for(let q=-2;q<=2;q++)z===-2||z===2||q===-2||q===2||z===0&&q===0?N.set(H+z,D+q,!0,!0):N.set(H+z,D+q,!1,!0)}}function C(N,I){const k=N.size,F=f.getEncodedBits(I);let H,D,z;for(let q=0;q<18;q++)H=Math.floor(q/3),D=q%3+k-8-3,z=(F>>q&1)===1,N.set(H,D,z,!0),N.set(D,H,z,!0)}function w(N,I,k){const F=N.size,H=h.getEncodedBits(I,k);let D,z;for(D=0;D<15;D++)z=(H>>D&1)===1,D<6?N.set(D,8,z,!0):D<8?N.set(D+1,8,z,!0):N.set(F-15+D,8,z,!0),D<8?N.set(8,F-D-1,z,!0):D<9?N.set(8,15-D-1+1,z,!0):N.set(8,15-D-1,z,!0);N.set(F-8,8,1,!0)}function A(N,I){const k=N.size;let F=-1,H=k-1,D=7,z=0;for(let q=k-1;q>0;q-=2)for(q===6&&q--;;){for(let V=0;V<2;V++)if(!N.isReserved(H,q-V)){let ee=!1;z<I.length&&(ee=(I[z]>>>D&1)===1),N.set(H,q-V,ee),D--,D===-1&&(z++,D=7)}if(H+=F,H<0||k<=H){H-=F,F=-F;break}}}function T(N,I,k){const F=new n;k.forEach(function(V){F.put(V.mode.bit,4),F.put(V.getLength(),g.getCharCountIndicator(V.mode,N)),V.write(F)});const H=t.getSymbolTotalCodewords(N),D=u.getTotalCodewordsCount(N,I),z=(H-D)*8;for(F.getLengthInBits()+4<=z&&F.put(0,4);F.getLengthInBits()%8!==0;)F.putBit(0);const q=(z-F.getLengthInBits())/8;for(let V=0;V<q;V++)F.put(V%2?17:236,8);return R(F,N,I)}function R(N,I,k){const F=t.getSymbolTotalCodewords(I),H=u.getTotalCodewordsCount(I,k),D=F-H,z=u.getBlocksCount(I,k),q=F%z,V=z-q,ee=Math.floor(F/z),$=Math.floor(D/z),te=$+1,fe=ee-$,de=new c(fe);let Ae=0;const L=new Array(z),K=new Array(z);let Y=0;const J=new Uint8Array(N.buffer);for(let xe=0;xe<z;xe++){const Xe=xe<V?$:te;L[xe]=J.slice(Ae,Ae+Xe),K[xe]=de.encode(L[xe]),Ae+=Xe,Y=Math.max(Y,Xe)}const oe=new Uint8Array(F);let he=0,ue,ve;for(ue=0;ue<Y;ue++)for(ve=0;ve<z;ve++)ue<L[ve].length&&(oe[he++]=L[ve][ue]);for(ue=0;ue<fe;ue++)for(ve=0;ve<z;ve++)oe[he++]=K[ve][ue];return oe}function M(N,I,k,F){let H;if(Array.isArray(N))H=m.fromArray(N);else if(typeof N=="string"){let ee=I;if(!ee){const $=m.rawSplit(N);ee=f.getBestVersionForData($,k)}H=m.fromString(N,ee||40)}else throw new Error("Invalid data");const D=f.getBestVersionForData(H,k);if(!D)throw new Error("The amount of data is too big to be stored in a QR Code");if(!I)I=D;else if(I<D)throw new Error(`
|
|
213
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
214
|
-
Minimum version required to store current data is: `+D+`.
|
|
215
|
-
`);const z=T(I,k,H),q=t.getSymbolSize(I),V=new r(q);return y(V,I),S(V),E(V,I),w(V,k,0),I>=7&&C(V,I),A(V,z),isNaN(F)&&(F=a.getBestMask(V,w.bind(null,V,k))),a.applyMask(F,V),w(V,k,F),{modules:V,version:I,errorCorrectionLevel:k,maskPattern:F,segments:H}}return ww.create=function(I,k){if(typeof I>"u"||I==="")throw new Error("No input text");let F=e.M,H,D;return typeof k<"u"&&(F=e.from(k.errorCorrectionLevel,e.M),H=f.from(k.version),D=a.from(k.maskPattern),k.toSJISFunc&&t.setToSJISFunction(k.toSJISFunc)),M(I,H,F,D)},ww}var $w={},qw={},KL;function g7(){return KL||(KL=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),h=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>=h&&y>=h&&m<f-h&&y<f-h){const C=Math.floor((m-h)/c),w=Math.floor((y-h)/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}}})(qw)),qw}var YL;function Ude(){return YL||(YL=1,(function(t){const e=g7();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 h=e.getImageWidth(o.modules.size,c),g=f.getContext("2d"),m=g.createImageData(h,h);return e.qrToImageData(m.data,o,c),n(g,f,h),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),h=c.type||"image/png",g=c.rendererOpts||{};return f.toDataURL(h,g.quality)}})($w)),$w}var Ww={},ZL;function Fde(){if(ZL)return Ww;ZL=1;const t=g7();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,h=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]?(h++,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",h),h=0)):c++}return u}return Ww.render=function(o,a,u){const c=t.getOptions(a),f=o.modules.size,h=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(h,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>
|
|
216
|
-
`;return typeof u=="function"&&u(null,C),C},Ww}var XL;function zde(){if(XL)return ic;XL=1;const t=yde(),e=Lde(),n=Ude(),r=Fde();function s(o,a,u,c,f){const h=[].slice.call(arguments,1),g=h.length,m=typeof h[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 ic.create=e.create,ic.toCanvas=s.bind(null,n.render),ic.toDataURL=s.bind(null,n.renderToDataURL),ic.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ic}var jde=zde();const Bde=Va(jde),Hde=t=>t==="signIn"||t==="signUp",lR=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:$de,getConfirmingText:qde,getBackToSignInText:Wde,getResendCodeText:Vde}=Ln,gb=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=St(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=lR(n)&&a&&r;return j.createElement(Fe,{direction:"column"},j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:qde()},$de()),u&&j.createElement(en,{onClick:r,type:"button"},Vde()),j.createElement(en,{onClick:e,type:"button",variation:"link",size:"small"},Wde()))},Gde=new sr("SetupTotp-logger"),{getSetupTotpText:Kde,getCopiedText:Yde,getLoadingText:Zde}=Ln,za=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=St(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=ds(),{components:{SetupTotp:{Header:c=za.Header,Footer:f=za.Footer}}}=cs(),[h,g]=_.useState(!0),[m,y]=_.useState(),[S,E]=_.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},A=_.useCallback(async()=>{try{const R=jse(C,w,n),M=await Bde.toDataURL(R);y(M)}catch(R){Gde.error(R)}finally{g(!1)}},[C,w,n]);_.useEffect(()=>{m||A()},[A,m]);const T=()=>{navigator.clipboard.writeText(n),E(Yde())};return _.createElement(qr,{className:t,variation:e},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},_.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:r},_.createElement(c,null),_.createElement(Fe,{direction:"column"},h?_.createElement("p",null,Zde(),"…"):_.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),_.createElement(Fe,{"data-amplify-copy":!0},_.createElement("div",null,n),_.createElement(Fe,{"data-amplify-copy-svg":!0,onClick:T},_.createElement("div",{"data-amplify-copy-tooltip":!0},S),_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},_.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"})))),_.createElement(Mo,null),_.createElement(Vr,null)),_.createElement(gb,null),_.createElement(f,null))))};za.Header=function(){return _.createElement(Ar,{level:3},Kde())};za.Footer=function(){return null};const{getSubmitText:Xde,getSubmittingText:Qde}=Ln,mb=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=St(g=>[g.isPending]),c=()=>{switch(e){case"SKIP":a();break;case"RESEND":o();break;case"SIGN_IN":u();break;default:return}},f=s?j.createElement(j.Fragment,null,Qde(),"…"):j.createElement(j.Fragment,null,Xde()),h=r??f;return j.createElement(Fe,{direction:"column"},j.createElement(en,{variation:"primary",isDisabled:s,type:"submit"},h),j.createElement(Fe,{direction:"column",alignItems:"center"},j.createElement(en,{onClick:c,type:"button",variation:"link",size:"small"},n)))},Jde=()=>j.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"},j.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"})),efe=()=>j.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"},j.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"}),j.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"}),j.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"}),j.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"})),tfe=()=>j.createElement(YF,{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"}),nfe=()=>j.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"},j.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"}),j.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"})),sm=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=St(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=j.createElement(tfe,null):e==="google"?a=j.createElement(efe,null):e==="amazon"?a=j.createElement(nfe,null):e==="apple"&&(a=j.createElement(Jde,null)),j.createElement(en,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,j.createElement(Ts,{as:"span"},r))},{getSignInWithFederationText:om,getOrText:rfe}=Ln;function m7(){const{route:t,socialProviders:e}=St(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:j.createElement(Fe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return j.createElement(sm,{icon:"amazon",key:n,provider:Ac.Amazon,text:om(t,n)});case"apple":return j.createElement(sm,{icon:"apple",key:n,provider:Ac.Apple,text:om(t,n)});case"facebook":return j.createElement(sm,{icon:"facebook",key:n,provider:Ac.Facebook,text:om(t,n)});case"google":return j.createElement(sm,{icon:"google",key:n,provider:Ac.Google,text:om(t,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),j.createElement(JT,{size:"small",label:rfe()}))}const{getSignInText:im,getSigningInText:sfe,getForgotPasswordText:ofe,getSignInWithEmailText:ife,getSignInWithSmsText:afe,getSignInWithPasskeyText:lfe,getOtherSignInOptionsText:ufe,getEnterUsernameFirstText:cfe}=Ln;function Ei(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=St(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=ds(),[a,u]=j.useState(""),{components:{SignIn:{Header:c=Ei.Header,Footer:f=Ei.Footer}}}=cs(),g=e&&e.length>1&&n,m=a.trim().length>0,y=j.useCallback(w=>{const{name:A,value:T}=w.target;A==="username"&&typeof T=="string"&&u(T),s(w)},[s]),S=()=>{if(!n)return im();switch(n){case"EMAIL_OTP":return ife();case"SMS_OTP":return afe();case"WEB_AUTHN":return lfe();default:return im()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return j.createElement($e,null,j.createElement(c,null),j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:g?E:o,onChange:y},j.createElement(m7,null),j.createElement(Fe,{direction:"column"},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:t},j.createElement(hb,null,j.createElement("legend",null,im())),j.createElement(Mo,null)),j.createElement(Vr,null),j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:sfe()},g?S():im()),g&&j.createElement(en,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:cfe()},ufe()),j.createElement(f,null))))}const dfe=()=>{const{toForgotPassword:t}=St(e=>[e.toForgotPassword]);return j.createElement($e,{"data-amplify-footer":""},j.createElement(en,{onClick:t,size:"small",variation:"link"},ofe()))};Ei.Footer=dfe;Ei.Header=function(){return null};const{getCreateAccountText:QL,getCreatingAccountText:ffe,getCreateAccountWithEmailText:hfe,getCreateAccountWithPasswordText:pfe,getCreateAccountWithSmsText:gfe,getOrText:mfe}=Ln;function Xs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=St(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=ds(),{components:{SignUp:{Header:c=Xs.Header,FormFields:f=Xs.FormFields,Footer:h=Xs.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 hfe();case"SMS_OTP":return gfe();case"PASSWORD":return m?pfe():QL();default:return QL()}},A=T=>R=>{R.preventDefault();const M=R.target.closest("form");if(M){if(!M.__authMethod){const N=document.createElement("input");N.name="__authMethod",M.appendChild(N)}M.__authMethod.type="hidden",M.__authMethod.value=T,M.requestSubmit()}};return j.createElement($e,null,j.createElement(c,null),j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:o,onSubmit:u,onBlur:a},j.createElement(m7,null),j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:e},j.createElement(Fe,{direction:"column"},j.createElement(f,{includePassword:!C}),j.createElement(Vr,null)),j.createElement(en,{isDisabled:(!m||S.length==0)&&t||e,isFullWidth:!0,type:"submit",variation:"primary",isLoading:e,loadingText:ffe(),onClick:A(y)},w(y)),m&&S.length>0&&j.createElement(j.Fragment,null,j.createElement(Fe,{justifyContent:"center",padding:"medium 0"},mfe()),S.map(T=>j.createElement(en,{key:T,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:A(T)},w(T)))),j.createElement(h,null))))}Xs.Header=function(){return null};Xs.FormFields=function(){return j.createElement(Mo,null)};Xs.Footer=function(){return null};const{getSignInTabText:vfe,getSignUpTabText:yfe}=Ln,bfe=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=St(a=>[a.route,a.toSignIn,a.toSignUp]);return j.createElement(qr,{className:t,variation:n},e?j.createElement($e,{"data-amplify-router-content":""},r==="signIn"&&j.createElement(Ei,null)):j.createElement(Cl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},j.createElement(Cl.List,{spacing:"equal",indicatorPosition:"top"},j.createElement(Cl.Item,{value:"signIn"},vfe()),j.createElement(Cl.Item,{value:"signUp"},yfe())),j.createElement(Cl.Panel,{value:"signIn","data-amplify-router-content":""},j.createElement(Ei,null)),j.createElement(Cl.Panel,{value:"signUp","data-amplify-router-content":""},j.createElement(Xs,null))))},{getAccountRecoveryInfoText:Sfe,getSkipText:Efe}=Ln,Vl=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ConfirmVerifyUser:{Header:o=Vl.Header,Footer:a=Vl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(Fe,{direction:"column"},j.createElement(Mo,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Efe(),cancelButtonSendType:"SKIP"}),j.createElement(a,null))))};Vl.Header=function(){return j.createElement(Ar,{level:3},Sfe())};Vl.Footer=function(){return null};const{getSkipText:Cfe,getVerifyText:wfe,getVerifyContactText:xfe,getAccountRecoveryInfoText:_fe}=Ln,Afe=t=>Object.entries(t).map(([e,n],r)=>{const s=nb[e].label;return j.createElement(tR,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",Fse(s,n))}),Gl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=Gl.Header,Footer:r=Gl.Footer}}}=cs(),{isPending:s,unverifiedUserAttributes:o}=St(({isPending:h,unverifiedUserAttributes:g})=>[h,g]),{handleChange:a,handleSubmit:u}=ds(),c=s?j.createElement(j.Fragment,null,"Verifying…"):j.createElement(j.Fragment,null,wfe()),f=j.createElement(nR,{legend:xfe(),name:"verify_context",isDisabled:s,legendHidden:!0},Afe(o));return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:s},j.createElement(n,null),f,j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Cfe(),cancelButtonSendType:"SKIP",submitButtonText:c}),j.createElement(r,null))))};Gl.Header=function(){return j.createElement(Ar,{level:3},_fe())};Gl.Footer=function(){return null};const{getChallengeText:Tfe,getDeliveryMessageText:Rfe,getDeliveryMethodText:Ife}=Ln,Kl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=St(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=ds(),{components:{ConfirmSignIn:{Header:u=Kl.Header,Footer:c=Kl.Footer}}}=cs(),f=lR(r)&&s;return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:o,onSubmit:a},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(Fe,{direction:"column"},f&&j.createElement(Ts,{className:"amplify-authenticator__subtitle"},Rfe(s)),j.createElement(Mo,null),j.createElement(Vr,null)),j.createElement(gb,null),j.createElement(c,null))))};function Ofe(){const{challengeName:t,codeDeliveryDetails:e}=St(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=lR(t)&&e;return j.createElement(j.Fragment,null,j.createElement(Ar,{level:3},Tfe(t)),n&&j.createElement(Ar,{level:5},Ife(e)))}Kl.Header=Ofe;Kl.Footer=function(){return null};const{getResendCodeText:Nfe,getResetYourPasswordText:Mfe}=Ln,Yl=({className:t,variation:e})=>{const{isPending:n}=St(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=ds(),{components:{ConfirmResetPassword:{Header:a=Yl.Header,Footer:u=Yl.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:o,onChange:s,onBlur:r},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(a,null),j.createElement(Fe,{direction:"column"},j.createElement(Mo,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonSendType:"RESEND",cancelButtonText:Nfe()}),j.createElement(u,null))))};Yl.Header=function(){const e=Mfe();return j.createElement(Ar,{level:3},e)};Yl.Footer=function(){return null};const{getBackToSignInText:Pfe,getSendingText:kfe,getSendCodeText:Dfe,getResetYourPasswordText:Lfe}=Ln,ja=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{ForgotPassword:{Header:o=ja.Header,Footer:a=ja.Footer}}}=cs();return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:s},j.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(Fe,{direction:"column"},j.createElement(Mo,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Pfe(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?j.createElement(j.Fragment,null,kfe(),"…"):j.createElement(j.Fragment,null,Dfe())}),j.createElement(a,null))))};ja.Header=function(){return j.createElement(Ar,{level:3},Lfe())};ja.Footer=function(){return null};const{getMfaTypeLabelByValue:Ufe,getSelectMfaTypeByChallengeName:Ffe,getSelectMfaTypeText:zfe}=Ln,Ba=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=St(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=ds(),{components:{SelectMfaType:{Header:a=Ba.Header,Footer:u=Ba.Footer}}}=cs();return _.createElement(qr,{className:t,variation:e},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},_.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(a,null),_.createElement(Fe,{direction:"column"},_.createElement(nR,{name:"mfa_type",legend:zfe(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>_.createElement(tR,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},Ufe(c)))),_.createElement(Vr,null)),_.createElement(gb,null),_.createElement(u,null))))};Ba.Header=function(){const{challengeName:e}=St(n=>[n.challengeName]);return _.createElement(Ar,{level:3},Ffe(e))};Ba.Footer=function(){return null};const{getSetupEmailText:jfe}=Ln,Ha=({className:t,variation:e})=>{const{isPending:n}=St(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=ds(),{components:{SetupEmail:{Header:o=Ha.Header,Footer:a=Ha.Footer}}}=cs();return _.createElement(qr,{className:t,variation:e},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},_.createElement(Fe,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(o,null),_.createElement(Fe,{direction:"column"},_.createElement(Mo,null),_.createElement(Vr,null)),_.createElement(gb,null),_.createElement(a,null))))};Ha.Header=function(){return _.createElement(Ar,{level:3},jfe())};Ha.Footer=function(){return null};const{getSignInWithPasswordText:E_,getSignInWithEmailText:Bfe,getSignInWithSmsText:Hfe,getSignInWithPasskeyText:$fe,getSigningInText:qfe,getBackToSignInText:Wfe,getOrText:Vfe,getUsernameLabelByLoginMechanism:Gfe}=Ln,Kfe=t=>{switch(t){case"EMAIL_OTP":return Bfe();case"SMS_OTP":return Hfe();case"WEB_AUTHN":return $fe();case"PASSWORD":return E_();default:return E_()}},Yfe=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=St(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=ds(),h=s??[],g=h.includes("PASSWORD"),m=h.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=Gfe(u);return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},j.createElement(Fe,{direction:"column"},j.createElement(fp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&j.createElement(j.Fragment,null,j.createElement(eR,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),j.createElement(en,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:qfe()},E_())),g&&m.length>0&&j.createElement(JT,{label:Vfe()}),m.length>0&&j.createElement(Fe,{direction:"column",gap:"0.5rem"},m.map(E=>j.createElement(en,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},Kfe(E)))),j.createElement(Vr,null),j.createElement(en,{onClick:o,size:"small",variation:"link",isDisabled:n},Wfe()))))},Zfe=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.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"})))},Xfe=t=>{const{className:e,...n}=t;return _.createElement($e,{as:"span",width:"1em",height:"1em",className:Be(le.Icon,e),...n},_.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),_.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"}),_.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},_.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"})),_.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)"}),_.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.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"}),_.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"}),_.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:Qfe,getPasskeyPromptDescriptionText:Jfe,getCreatePasskeyText:ehe,getRegisteringText:the,getContinueWithoutPasskeyText:nhe,getPasskeyCreatedSuccessText:rhe,getPasskeyRegisteredText:she,getPasskeyRegistrationFailedText:ohe,getPasskeyLabelText:ihe,getExistingPasskeysText:ahe,getSetupAnotherPasskeyText:lhe,getContinueText:uhe}=Ln;function che({className:t,variation:e}){const[n,r]=j.useState(!1),[s,o]=j.useState(null),[a,u]=j.useState(!1),[c,f]=j.useState([]),{submitForm:h,isPending:g}=St(w=>[w.submitForm,w.isPending]),m=j.useCallback(async()=>{try{const w=await MT();f(w.credentials||[])}catch{}},[]);j.useEffect(()=>{n&&m()},[n,m]);const y=j.useCallback(()=>{h({type:"SKIP"})},[h]),S=j.useCallback(()=>{h({type:"SUBMIT"})},[h]),E=j.useCallback(async()=>{try{o(null),u(!0),await ose(),r(!0)}catch(w){const A=w,T=A.name??"",R=A.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(ohe())}finally{u(!1)}},[y]);if(n)return j.createElement(qr,{className:t,variation:e},j.createElement(Fe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},j.createElement(Fe,{direction:"column",gap:"xs"},j.createElement(Zfe,{className:"amplify-authenticator__passkey-success-icon"}),j.createElement(Ar,{level:4},rhe()),j.createElement(Ts,null,she())),c.length>0&&j.createElement($e,{marginTop:"large"},j.createElement(Ar,{level:5},ahe()),j.createElement(Fe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,A)=>j.createElement($e,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},j.createElement(Ts,{fontSize:"small"},w.friendlyCredentialName??`${ihe()} ${A+1}`))))),j.createElement(Fe,{direction:"column",gap:"medium",marginTop:"large"},j.createElement(en,{onClick:()=>{r(!1),E()},variation:"link"},lhe()),j.createElement(en,{onClick:()=>S(),variation:"primary",isFullWidth:!0},uhe()))));const C=g||a;return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},j.createElement(Fe,{direction:"column",gap:"medium"},j.createElement(Ar,{level:4},Qfe()),j.createElement(Ts,null,Jfe()),j.createElement(Fe,{justifyContent:"center"},j.createElement(Xfe,{className:"amplify-authenticator__passkey-icon"})),j.createElement(Fe,{direction:"column",gap:"medium"},j.createElement(en,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:the()},ehe()),j.createElement(en,{onClick:y,variation:"link",isDisabled:C},nhe()),s&&j.createElement(Ts,{className:"amplify-authenticator__passkey-error"},s),j.createElement(Vr,null)))))}function JL(){return null}const dhe=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return JL;case"confirmSignUp":return Wl;case"confirmSignIn":return Kl;case"selectMfaType":return Ba;case"setupEmail":return Ha;case"setupTotp":return za;case"signIn":case"signUp":return bfe;case"signInSelectAuthFactor":return Yfe;case"passkeyPrompt":return che;case"forceNewPassword":return Zs;case"forgotPassword":return ja;case"confirmResetPassword":return Yl;case"verifyUser":return Gl;case"confirmVerifyUser":return Vl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),JL}};function fhe({className:t,hideSignUp:e,variation:n}){const{route:r}=St(({route:o})=>[o]),s=_.useMemo(()=>dhe(r),[r]);return j.createElement(s,{className:t,hideSignUp:Hde(r)?e:void 0,variation:n})}const hhe={Header:()=>null,SignIn:{Header:Ei.Header,Footer:Ei.Footer},SignUp:{Header:Xs.Header,FormFields:Xs.FormFields,Footer:Xs.Footer},ConfirmSignUp:{Header:Wl.Header,Footer:Wl.Footer},SelectMfaType:{Header:Ba.Header,Footer:Ba.Footer},SetupEmail:{Header:Ha.Header,Footer:Ha.Footer},SetupTotp:{Header:za.Header,Footer:za.Footer},ConfirmResetPassword:{Header:Yl.Header,Footer:Yl.Footer},ConfirmSignIn:{Header:Kl.Header,Footer:Kl.Footer},VerifyUser:{Header:Gl.Header,Footer:Gl.Footer},ConfirmVerifyUser:{Header:Vl.Header,Footer:Vl.Footer},ForceNewPassword:{Header:Zs.Header,Footer:Zs.Footer,FormFields:Zs.FormFields},ForgotPassword:{Header:ja.Header,Footer:ja.Footer},Footer:()=>null};function phe({children:t,className:e,components:n,formFields:r,hideSignUp:s,initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:h,socialProviders:g,variation:m}){lde({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}=St(({route:A,signOut:T,user:R})=>[A,T,R]);zue({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:h,signUpAttributes:f,socialProviders:g,formFields:r});const C=_.useMemo(()=>({components:{...hhe,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?_.createElement(_.Fragment,null,bi(t)?t({signOut:S,user:E}):t):null:_.createElement(c7.Provider,{value:C},_.createElement(fhe,{className:e,hideSignUp:s,variation:m}))}function Po(t){return Bue({componentName:"Authenticator",packageName:"react",version:ade}),_.createElement(VF,null,_.createElement(phe,{...t}))}Po.Provider=VF;Po.ForgotPassword=ja;Po.SetupTotp=za;Po.SignIn=Ei;Po.SignUp=Xs;Po.ForceNewPassword=Zs;Po.SelectMfaType=Ba;Po.SetupEmail=Ha;const v7=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:_.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});v7.displayName="Style";const y7=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return _.createElement(v7,{...e,cssText:r,id:`amplify-theme-${n}`})};y7.displayName="ThemeStyle";function ghe({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=_.useMemo(()=>({theme:lb(s),colorMode:e}),[s,e]);return _.createElement(GF.Provider,{value:o},_.createElement(Fce,{dir:n},_.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?_.createElement(y7,{theme:o.theme,nonce:r}):null))}const mhe=({configured:t,authStatus:e})=>e==="authenticated",vhe=t=>t?t.signInDetails?.loginId??t.username??null:null,yhe=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=St(o=>[o.authStatus,o.signOut,o.user]);return mhe({configured:!0,authStatus:n})?O.jsx(O.Fragment,{children:t({email:vhe(s),signOut:()=>r()})}):O.jsx(O.Fragment,{children:e})},bhe=({children:t,fallback:e=null})=>Ly()?O.jsx(yhe,{fallback:e,children:t}):O.jsx(O.Fragment,{children:e}),eU='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ii=t=>`var(${t})`,cn=Ii("--accent"),She=Ii("--accent-hover"),tU=Ii("--accent-soft"),Uf=Ii("--accent-fg"),nU=Ii("--surface"),ac=Ii("--fg"),Ehe=Ii("--surface-sunken"),am=Ii("--fg-muted"),Ff=Ii("--line"),Che=lb({name:"remit",tokens:{colors:{brand:{primary:{10:{value:tU},20:{value:tU},40:{value:cn},60:{value:cn},80:{value:cn},90:{value:cn},100:{value:cn}}},background:{primary:{value:nU},secondary:{value:Ehe}},font:{primary:{value:ac},secondary:{value:am},tertiary:{value:am},interactive:{value:cn},inverse:{value:Uf},hover:{value:cn},focus:{value:cn},active:{value:cn}},border:{primary:{value:Ff},secondary:{value:Ff},focus:{value:cn}}},fonts:{default:{variable:{value:eU},static:{value:eU}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Ff},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:nU}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:am}}},button:{color:{value:ac},primary:{backgroundColor:{value:cn},color:{value:Uf},_hover:{backgroundColor:{value:She},color:{value:Uf}},_focus:{backgroundColor:{value:cn},color:{value:Uf}},_active:{backgroundColor:{value:cn},color:{value:Uf}}},link:{color:{value:cn},_hover:{color:{value:cn},backgroundColor:{value:"transparent"}},_focus:{color:{value:cn},backgroundColor:{value:"transparent"}},_active:{color:{value:cn},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:ac},borderColor:{value:Ff},_focus:{borderColor:{value:cn},boxShadow:{value:`0 0 0 2px ${cn}`}}},field:{label:{color:{value:ac}}},tabs:{borderColor:{value:Ff},item:{color:{value:am},backgroundColor:{value:"transparent"},_active:{color:{value:cn},borderColor:{value:cn},backgroundColor:{value:"transparent"}},_hover:{color:{value:cn}},_focus:{color:{value:cn}}}},heading:{color:{value:ac}},text:{color:{value:ac}}}}}),whe={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"}}},xhe=()=>O.jsx(n_,{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:O.jsxs("span",{className:"flex items-center gap-2",children:[O.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),O.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."}),O.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),_he=()=>O.jsx(E9,{note:j9({betterAuthEnabled:!1,cognitoConfigured:Ly()})}),Ahe=({children:t})=>{const{authStatus:e}=St(n=>[n.authStatus]);return e==="authenticated"?O.jsx(O.Fragment,{children:t}):e==="configuring"?O.jsx(dT,{}):O.jsx(ghe,{theme:Che,children:O.jsxs(S9,{children:[O.jsx(C9,{}),O.jsx(Po,{hideSignUp:!1,formFields:whe,components:{Footer:_he}})]})})},The=({children:t})=>Ly()?O.jsx(Po.Provider,{children:O.jsx(Ahe,{children:t})}):O.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[O.jsx(xhe,{}),t]}),b7=60;let Uc=null;const S7=()=>Math.floor(Date.now()/1e3),Rhe=t=>t!==null&&t.expiresAt-b7>S7(),Ihe=async()=>{const e=(await Oy()).tokens?.idToken;return e?(Uc={value:e.toString(),expiresAt:e.payload.exp??S7()+b7},Uc.value):(Uc=null,null)},Ohe=async()=>Ly()?Rhe(Uc)?Uc.value:Ihe():null,Nhe=()=>{Uc=null},Lv={configure:E8,getToken:Ohe,resetToken:Nhe,Shell:The,Account:bhe},Mhe=({children:t})=>Uy()?O.jsx(Iv.Shell,{children:t}):O.jsx(Lv.Shell,{children:t}),Phe=t=>Uy()?O.jsx(Iv.Account,{...t}):O.jsx(Lv.Account,{...t}),khe={configure:E8,getToken:()=>Uy()?Iv.getToken():Lv.getToken(),resetToken:()=>{Iv.resetToken(),Lv.resetToken()},Shell:Mhe,Account:Phe};var bd=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(){}},Dhe=class extends bd{#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"}},uR=new Dhe,Lhe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Uhe=class{#e=Lhe;#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)}},Al=new Uhe;function Fhe(t){setTimeout(t,0)}var zhe=typeof window>"u"||"Deno"in globalThis;function Er(){}function jhe(t,e){return typeof t=="function"?t(e):t}function C_(t){return typeof t=="number"&&t>=0&&t!==1/0}function E7(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Na(t,e){return typeof t=="function"?t(e):t}function is(t,e){return typeof t=="function"?t(e):t}function rU(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==cR(a,e.options))return!1}else if(!Mh(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 sU(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Zl(e.options.mutationKey)!==Zl(o))return!1}else if(!Mh(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function cR(t,e){return(e?.queryKeyHashFn||Zl)(t)}function Zl(t){return JSON.stringify(t,(e,n)=>w_(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Mh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Mh(t[n],e[n])):!1}var Bhe=Object.prototype.hasOwnProperty;function C7(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=oU(t)&&oU(e);if(!r&&!(w_(t)&&w_(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 h=0;h<u;h++){const g=r?h:a[h],m=t[g],y=e[g];if(m===y){c[g]=m,(r?h<o:Bhe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=C7(m,y,n+1);c[g]=S,S===m&&f++}return o===u&&f===o?t:c}function Uv(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 oU(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function w_(t){if(!iU(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!iU(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function iU(t){return Object.prototype.toString.call(t)==="[object Object]"}function Hhe(t){return new Promise(e=>{Al.setTimeout(e,t)})}function x_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?C7(t,e):e}function mRe(t){return t}function $he(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function qhe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var dR=Symbol();function w7(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===dR?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function fR(t,e){return typeof t=="function"?t(...e):!!t}function Whe(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=()=>zhe;return{isServer(){return t()},setIsServer(e){t=e}}})();function __(){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 Vhe=Fhe;function Ghe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=Vhe;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 Dn=Ghe(),Khe=class extends bd{#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}},Fv=new Khe;function Yhe(t){return Math.min(1e3*2**t,3e4)}function x7(t){return(t??"online")==="online"?Fv.isOnline():!0}var A_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _7(t){let e=!1,n=0,r;const s=__(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new A_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>uR.isFocused()&&(t.networkMode==="always"||Fv.isOnline())&&t.canRun(),h=()=>x7(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 A=t.retry??(Ph.isServer()?0:3),T=t.retryDelay??Yhe,R=typeof T=="function"?T(n,w):T,M=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),Hhe(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:h,start:()=>(h()?S():y().then(S),s)}}var A7=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),C_(this.gcTime)&&(this.#e=Al.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&&(Al.clearTimeout(this.#e),this.#e=void 0)}};function Zhe(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 h=!1;const g=S=>{Whe(S,()=>e.signal,()=>h=!0)},m=w7(e.options,e.fetchOptions),y=async(S,E,C)=>{if(h)return Promise.reject(e.signal.reason);if(E==null&&S.pages.length)return Promise.resolve(S);const A=(()=>{const N={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(N),N})(),T=await m(A),{maxPages:R}=e.options,M=C?qhe:$he;return{pages:M(S.pages,T,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?T7:T_,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:T_(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 T_(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 T7(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function vRe(t,e){return e?T_(t,e)!=null:!1}function yRe(t,e){return!e||!t.getPreviousPageParam?!1:T7(t,e)!=null}var Xhe=class extends A7{#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=lU(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=lU(this.options);e.data!==void 0&&(this.setState(aU(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=x_(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(Er).catch(Er):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=>is(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dR||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Na(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:!E7(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=w7(this.options,e),h=(()=>{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,h,this):c(h)},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"?Zhe(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=_7({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof A_&&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 A_){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,...R7(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...aU(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),Dn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function R7(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:x7(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function aU(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function lU(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 Qhe=class extends bd{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=__(),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),uU(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return R_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return R_(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 is(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&&!Uv(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&cU(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(e.enabled,this.#t)||Na(this.options.staleTime,this.#t)!==Na(e.staleTime,this.#t))&&this.#m();const s=this.#v();r&&(this.#t!==n||is(this.options.enabled,this.#t)!==is(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 epe(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(Er)),e}#m(){this.#S();const t=Na(this.options.staleTime,this.#t);if(Ph.isServer()||this.#r.isStale||!C_(t))return;const n=E7(this.#r.dataUpdatedAt,t)+1;this.#d=Al.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()||is(this.options.enabled,this.#t)===!1||!C_(this.#u)||this.#u===0)&&(this.#f=Al.setInterval(()=>{(this.options.refetchIntervalInBackground||uR.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(Al.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(Al.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 h={...f},g=!1,m;if(e._optimisticResults){const k=this.hasListeners(),F=!k&&uU(t,e),H=k&&cU(t,n,e,r);(F||H)&&(h={...h,...R7(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:S,status:E}=h;m=h.data;let C=!1;if(e.placeholderData!==void 0&&m===void 0&&E==="pending"){let k;s?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(k=s.data,C=!0):k=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,k!==void 0&&(E="success",m=x_(s?.data,k,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=x_(s?.data,m,e),this.#l=m,this.#i=null}catch(k){this.#i=k}this.#i&&(y=this.#i,m=this.#l,S=Date.now(),E="error");const w=h.fetchStatus==="fetching",A=E==="pending",T=E==="error",R=A&&w,M=m!==void 0,I={status:E,fetchStatus:h.fetchStatus,isPending:A,isSuccess:E==="success",isError:T,isInitialLoading:R,isLoading:R,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:S,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!A,isLoadingError:T&&!M,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:hR(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=I.data!==void 0,F=I.status==="error"&&!k,H=q=>{F?q.reject(I.error):k&&q.resolve(I.data)},D=()=>{const q=this.#a=I.promise=__();H(q)},z=this.#a;switch(z.status){case"pending":t.queryHash===n.queryHash&&H(z);break;case"fulfilled":(F||I.data!==z.value)&&D();break;case"rejected":(!F||I.error!==z.reason)&&D();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),Uv(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){Dn.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Jhe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function uU(t,e){return Jhe(t,e)||t.state.data!==void 0&&R_(t,e,e.refetchOnMount)}function R_(t,e,n){if(is(e.enabled,t)!==!1&&Na(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&hR(t,e)}return!1}function cU(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&hR(t,n)}function hR(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Na(e.staleTime,t))}function epe(t,e){return!Uv(t.getCurrentResult(),e)}var tpe=class extends A7{#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||I7(),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=_7({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),Dn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function I7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var O7=class extends bd{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 tpe({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=lm(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=lm(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=lm(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=lm(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Dn.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=>sU(e,n))}findAll(t={}){return this.getAll().filter(e=>sU(t,e))}notify(t){Dn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Dn.batch(()=>Promise.all(t.map(e=>e.continue().catch(Er))))}};function lm(t){return t.options.scope?.id}var npe=class extends bd{#e;#t=void 0;#n;#r;constructor(e,n){super(),this.#e=e,this.setOptions(n),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const n=this.options;this.options=this.#e.defaultMutationOptions(e),Uv(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Zl(n.mutationKey)!==Zl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#s(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#s()}mutate(e,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#o(){const e=this.#n?.state??I7();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#s(e){Dn.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,n,r,s)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(e.data,null,n,r,s)}catch(o){Promise.reject(o)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,n,r,s)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(void 0,e.error,n,r,s)}catch(o){Promise.reject(o)}}}this.listeners.forEach(n=>{n(this.#t)})})}},N7=class extends bd{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,s=e.queryHash??cR(r,e);let o=this.get(s);return o||(o=new Xhe({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(){Dn.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=>rU(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>rU(t,n)):e}notify(t){Dn.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},rpe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new N7,this.#t=t.mutationCache||new O7,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=uR.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Fv.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(Na(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=jhe(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Dn.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;Dn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return Dn.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Dn.batch(()=>this.#e.findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Er).catch(Er)}invalidateQueries(t,e={}){return Dn.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=Dn.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(Er)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Er)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Na(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Er).catch(Er)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Er).catch(Er)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Fv.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(Zl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{Mh(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(Zl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{Mh(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=cR(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===dR&&(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()}},M7=_.createContext(void 0),vb=t=>{const e=_.useContext(M7);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},spe=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),O.jsx(M7.Provider,{value:t,children:e})),P7=_.createContext(!1),ope=()=>_.useContext(P7);P7.Provider;function ipe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var ape=_.createContext(ipe()),lpe=()=>_.useContext(ape),upe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?fR(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},cpe=t=>{_.useEffect(()=>{t.clearReset()},[t])},dpe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||fR(n,[t.error,r])),fpe=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))}},hpe=(t,e)=>t.isLoading&&t.isFetching&&!e,ppe=(t,e)=>t?.suspense&&e.isPending,dU=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function gpe(t,e,n){const r=ope(),s=lpe(),o=vb(),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,fpe(a),upe(a,s,u),cpe(s);const f=!o.getQueryCache().get(a.queryHash),[h]=_.useState(()=>new e(o,a)),g=h.getOptimisticResult(a),m=!r&&c;if(_.useSyncExternalStore(_.useCallback(y=>{const S=m?h.subscribe(Dn.batchCalls(y)):Er;return h.updateResult(),S},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),_.useEffect(()=>{h.setOptions(a)},[a,h]),ppe(a,g))throw dU(a,h,s);if(dpe({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()&&hpe(g,r)&&(f?dU(a,h,s):u?.promise)?.catch(Er).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?g:h.trackResult(g)}function k7(t,e){return gpe(t,Qhe)}function mpe(t,e){const n=vb(),[r]=_.useState(()=>new npe(n,t));_.useEffect(()=>{r.setOptions(t)},[r,t]);const s=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(Dn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=_.useCallback((a,u)=>{r.mutate(a,u).catch(Er)},[r]);if(s.error&&fR(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const vpe="modulepreload",ype=function(t){return"/"+t},fU={},Vn=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(h=>Promise.resolve(h).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=ype(f),f in fU)return;fU[f]=!0;const h=f.endsWith(".css"),g=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":vpe,h||(m.as="script"),m.crossOrigin="",m.href=f,u&&m.setAttribute("nonce",u),document.head.appendChild(m),h)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 hU=_.use,Tc=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Vw(t){const e=_.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function bpe(t,e,n={},r={}){_.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 Spe(t){const e=_.useRef(null);return _.useImperativeHandle(t,()=>e.current,[]),e}const D7=!1;function kh(t){return t[t.length-1]}function Epe(t){return typeof t=="function"}function Tl(t,e){return Epe(t)?t(e):t}const L7=Object.prototype.hasOwnProperty,pU=Object.prototype.propertyIsEnumerable;function U7(t){for(const e in t)if(L7.call(t,e))return!0;return!1}const Cpe=()=>Object.create(null),Sl=(t,e)=>Rl(t,e,Cpe);function Rl(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=vU(t)&&vU(s);if(!o&&!(zv(t)&&zv(s)))return s;const a=o?t:gU(t);if(!a)return s;const u=o?s:gU(s);if(!u)return s;const c=a.length,f=u.length,h=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){h[y]=S,(o?m<c:L7.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){h[y]=E;continue}const C=Rl(S,E,n,r+1);h[y]=C,C===S&&g++}return c===f&&g===c?t:h}function gU(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!pU.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(!pU.call(t,s))return!1;r.push(s)}return r}function zv(t){if(!mU(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!mU(n)||!n.hasOwnProperty("isPrototypeOf"))}function mU(t){return Object.prototype.toString.call(t)==="[object Object]"}function vU(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Dl(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(!Dl(t[r],e[r],n))return!1;return!0}if(zv(t)&&zv(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Dl(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||!Dl(t[a],e[a],n)))return!1;return s===o}return!1}function Vc(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 wpe(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 Dh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const xpe=/[\x00-\x1f\x7f"<>`{}]/g;function _pe(t){return t.replace(xpe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function yU(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 _pe(e)}const Ape=["http:","https:","mailto:","tel:"];function jv(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function zf(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+=yU(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+yU(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Tpe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Rpe(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 gi(){throw new Error("Invariant failed")}function Lh(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 Ra=4,F7=5;function Ipe(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 z7(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=Ipe(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 h=u+3,g=c;if(h<g)return n[0]=3,n[1]=e+u,n[2]=e+h,n[3]=e+g,n[4]=e+c+1,n[5]=s,n}}else if(f===36){const h=u+1,g=u+2;return g===c?(n[0]=2,n[1]=e+u,n[2]=e+h,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 yb(t,e,n,r,s,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,h=n.options?.caseSensitive??t,g=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const y=z7(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(h){const A=s.static?.get(w);if(A)S=A;else{s.static??=new Map;const T=Il(n.fullPath??n.from);T.parent=s,T.depth=o,S=T,s.static.set(w,T)}}else{const A=w.toLowerCase(),T=s.staticInsensitive?.get(A);if(T)S=T;else{s.staticInsensitive??=new Map;const R=Il(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(A,R)}}break}case 1:{const w=c.substring(E,y[1]),A=c.substring(y[4],C),T=h&&!!(w||A),R=w?T?w:w.toLowerCase():void 0,M=A?T?A:A.toLowerCase():void 0,N=!g&&s.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(N)S=N;else{const I=Kw(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]),A=c.substring(y[4],C),T=h&&!!(w||A),R=w?T?w:w.toLowerCase():void 0,M=A?T?A:A.toLowerCase():void 0,N=!g&&s.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===M);if(N)S=N;else{const I=Kw(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]),A=c.substring(y[4],C),T=h&&!!(w||A),R=w?T?w:w.toLowerCase():void 0,M=A?T?A:A.toLowerCase():void 0,N=Kw(2,n.fullPath??n.from,T,R,M);S=N,N.parent=s,N.depth=o,s.wildcard??=[],s.wildcard.push(N)}}s=S}if(g&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const y=Il(n.fullPath??n.from);y.kind=F7,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=Il(n.fullPath??n.from);y.kind=Ra,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)yb(t,e,c,u,s,o,a)}function Gw(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 ba(t){if(t.pathless)for(const e of t.pathless)ba(e);if(t.static)for(const e of t.static.values())ba(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ba(e);if(t.dynamic?.length){t.dynamic.sort(Gw);for(const e of t.dynamic)ba(e)}if(t.optional?.length){t.optional.sort(Gw);for(const e of t.optional)ba(e)}if(t.wildcard?.length){t.wildcard.sort(Gw);for(const e of t.wildcard)ba(e)}}function Il(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 Kw(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 Ope(t,e){const n=Il("/"),r=new Uint16Array(6);for(const s of t)yb(!1,r,s,1,n,0);ba(n),e.masksTree=n,e.flatCache=Lh(1e3)}function Npe(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=pR(t,e.masksTree);return e.flatCache.set(t,r),r}function Mpe(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Il("/"),yb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),pR(r,a,n)}function Ppe(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=pR(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=B7(o.route)),e.matchCache.set(r,o),o}function kpe(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Dpe(t,e=!1,n){const r=Il(t.fullPath),s=new Uint16Array(6),o={},a={};let u=0;return yb(e,s,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&gi(),o[c.id]=c,u!==0&&c.path){const f=kpe(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ba(r),{processedTree:{segmentTree:r,singleCache:Lh(1e3),matchCache:Lh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function pR(t,e,n=!1){const r=t.split("/"),s=Upe(t,r,e,n);if(!s)return null;const[o]=j7(t,r,s);return{route:s.node.route,rawParams:o}}function j7(t,e,n){const r=Lpe(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 h=r[u];if(h.kind===Ra)break;if(h.kind===F7){f--,a--,c--;continue}const g=e[a],m=c;if(g&&(c+=g.length),h.kind===1){s??=n.node.fullPath.split("/");const y=s[f],S=h.prefix?.length??0;if(y.charCodeAt(S)===123){const E=h.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(h.kind===3){if(n.skipped&1<<u){a--,c=m-1;continue}s??=n.node.fullPath.split("/");const y=s[f],S=h.prefix?.length??0,E=h.suffix?.length??0,C=y.substring(S+3,y.length-E-1),w=h.suffix||h.prefix?g.substring(S,g.length-E):g;w&&(o[C]=decodeURIComponent(w))}else if(h.kind===2){const y=h,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 B7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Lpe(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function Upe(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!kh(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 h=u.pop(),{node:g,index:m,skipped:y,depth:S,statics:E,dynamics:C,optionals:w}=h;let{extract:A,rawParams:T}=h;if(g.kind===2&&g.route&&!cm(f,h))continue;if(g.parse){if(!bU(t,e,h))continue;T=h.rawParams,A=h.extract}r&&g.route&&g.kind!==Ra&&cm(c,h)&&(c=h);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ra||g.kind===2)&&cm(f,h)&&(f=h),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const M=R?void 0:e[m];let N;if(R&&g.index){const I={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:A,rawParams:T};let k=!0;if(g.index.parse&&(bU(t,e,I)||(k=!1)),k){if(!C&&!w&&!y&&Fpe(E,a))return I;cm(f,I)&&(f=I)}}if(g.wildcard)for(let I=g.wildcard.length-1;I>=0;I--){const k=g.wildcard[I],{prefix:F,suffix:H}=k;if(!(F&&(R||!(k.caseSensitive?M:N??=M.toLowerCase()).startsWith(F)))){if(H){if(R)continue;const D=e.slice(m).join("/").slice(-H.length);if((k.caseSensitive?D:D.toLowerCase())!==H)continue}u.push({node:k,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:A,rawParams:T})}}if(g.optional){const I=y|1<<S,k=S+1;for(let F=g.optional.length-1;F>=0;F--){const H=g.optional[F];u.push({node:H,index:m,skipped:I,depth:k,statics:E,dynamics:C,optionals:w,extract:A,rawParams:T})}if(!R)for(let F=g.optional.length-1;F>=0;F--){const H=g.optional[F],{prefix:D,suffix:z}=H;if(D||z){const q=H.caseSensitive?M:N??=M.toLowerCase();if(D&&!q.startsWith(D)||z&&!q.endsWith(z))continue}u.push({node:H,index:m+1,skipped:y,depth:k,statics:E,dynamics:C,optionals:w+um(a,m),extract:A,rawParams:T})}}if(!R&&g.dynamic&&M)for(let I=g.dynamic.length-1;I>=0;I--){const k=g.dynamic[I],{prefix:F,suffix:H}=k;if(F||H){const D=k.caseSensitive?M:N??=M.toLowerCase();if(F&&!D.startsWith(F)||H&&!D.endsWith(H))continue}u.push({node:k,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+um(a,m),optionals:w,extract:A,rawParams:T})}if(!R&&g.staticInsensitive){const I=g.staticInsensitive.get(N??=M.toLowerCase());I&&u.push({node:I,index:m+1,skipped:y,depth:S+1,statics:E+um(a,m),dynamics:C,optionals:w,extract:A,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+um(a,m),dynamics:C,optionals:w,extract:A,rawParams:T})}if(g.pathless){const I=S+1;for(let k=g.pathless.length-1;k>=0;k--){const F=g.pathless[k];u.push({node:F,index:m,skipped:y,depth:I,statics:E,dynamics:C,optionals:w,extract:A,rawParams:T})}}}if(f)return f;if(r&&c){let h=c.index;for(let m=0;m<c.index;m++)h+=e[m].length;const g=h===t.length?"/":t.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(g),c}return null}function um(t,e){return 2**(t-e-1)}function Fpe(t,e){return t===2**(e-1)-1}function bU(t,e,n){let r,s;try{[r,s]=j7(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 cm(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===Ra)>(t.node.kind===Ra)||e.node.kind===Ra==(t.node.kind===Ra)&&e.depth>t.depth))):!0}function lv(t){return gR(t.filter(e=>e!==void 0).join("/"))}function gR(t){return t.replace(/\/{2,}/g,"/")}function H7(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function fi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function $7(t){return fi(H7(t))}function Bv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function zpe(t,e,n){return Bv(t,n)===Bv(e,n)}function jpe({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&&kh(u)==="";)u.pop();const f=e.split("/");for(let h=0,g=f.length;h<g;h++){const m=f[h];m===""?h?h===g-1&&u.push(m):u=[m]:m===".."?u.pop():m==="."||u.push(m)}}u.length>1&&(kh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=gR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function Bpe(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 Yw(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=>EU(s,n)).join("/"):EU(r,n)}function SU({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 h=u;c=z7(t,h,c);const g=c[5];if(u=g+1,h===g)continue;const m=c[0];if(m===0){f+="/"+t.substring(h,g);continue}if(m===2){const y=e._splat;o._splat=y,o["*"]=y;const S=t.substring(h,c[1]),E=t.substring(c[4],g);if(!y){s=!0,(S||E)&&(f+="/"+S+E);continue}const C=Yw("_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(h,c[1]),E=t.substring(c[4],g),C=Yw(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(h,c[1]),C=t.substring(c[4],g),w=Yw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function EU(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function fr(t){return t?.isNotFound===!0}function Hpe(){try{return sessionStorage}catch{return}}const $pe="tsr-scroll-restoration-v1_3",q7=Hpe();function qpe(){try{return JSON.parse(q7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Wpe(){try{q7?.setItem($pe,JSON.stringify(bc))}catch{}}const bc=qpe(),CU="data-scroll-restoration-id",Vpe=t=>t.state.__TSR_key||t.href;function Gpe(t){const e=t.getAttribute(CU);if(e)return`[${CU}="${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 dm=!1;const uv="window";function I_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function wU(t){const e=new Set;for(const n of t){if(n===uv)continue;const r=I_(n);r&&e.add(r)}return e}function Kpe(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||Vpe,o=new Set,a=u=>{const c=bc[u]||={};for(const f of o)f===document?c[uv]={scrollX,scrollY}:f.isConnected&&(c[Gpe(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,dm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{dm||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())),Wpe()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,h=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=bc[S];if(E){let C=bc[y];for(const w in E){if(w===uv){if(h)continue}else{const A=I_(w);if(!A||h&&f&&(m??=wU(f),m.has(A)))continue}C||(C=bc[y]={}),C[w]??=E[w]}}}dm=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!E&&f&&(m??=wU(f));const A=E&&C&&g,T=r.restoring?bc[y]:void 0;if(T)for(const R in T){const{scrollX:M,scrollY:N}=T[R];if(R===uv){if(A)continue;scrollTo({top:N,left:M,behavior:c}),w=!0}else{const I=I_(R);I&&(I.scrollLeft=M,I.scrollTop=N,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{dm=!1}}))}function Ype(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 Zw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Zpe(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]=Zw(s):Array.isArray(o)?o.push(Zw(s)):n[r]=[o,Zw(s)]}return n}const Xpe=Jpe(JSON.parse),Qpe=ege(JSON.stringify,JSON.parse);function Jpe(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Zpe(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function ege(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=Ype(s,r);return o?`?${o}`:""}}const Ll="__root__";function W7(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 zr(t){return t instanceof Response&&!!t.options}function tge(t){return{input:({url:e})=>{for(const n of t)e=O_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=V7(t[n],e);return e}}}function nge(t){const e=$7(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=lv(["/",e,o.pathname]),o)}}function O_(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 V7(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 rge(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),h=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([]),A=n([]),T=n([]),R=r(()=>Xw(a,w.get())),M=r(()=>Xw(u,A.get())),N=r(()=>Xw(c,T.get())),I=r(()=>w.get()[0]),k=r(()=>w.get().some(te=>a.get(te)?.get().status==="pending")),F=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:g.get(),isTransitioning:m.get(),matches:R.get(),location:y.get(),resolvedLocation:S.get(),statusCode:E.get(),redirect:C.get()})),D=Lh(64);function z(te){let fe=D.get(te);return fe||(fe=r(()=>{const de=w.get();for(const Ae of de){const L=a.get(Ae);if(L&&L.routeId===te)return L.get()}}),D.set(te,fe)),fe}const q={status:f,loadedAt:h,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:A,cachedIds:T,matches:R,pendingMatches:M,cachedMatches:N,firstId:I,hasPending:k,matchRouteDeps:F,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:H,getRouteMatchStore:z,setMatches:V,setPending:ee,setCached:$};V(t.matches),o?.(q);function V(te){Qw(te,a,w,n,s)}function ee(te){Qw(te,u,A,n,s)}function $(te){Qw(te,c,T,n,s)}return q}function Xw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Qw(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)}Rpe(n.get(),o)||n.set(o)})}const N_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},sge=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),bb=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Ul=(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},xU=(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},Ia=(t,e,n)=>{if(!(!zr(n)&&!fr(n)))throw zr(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:zr(n)?"redirected":fr(n)?"notFound":r.status==="pending"?"success":r.status,context:Ul(t,e.index),isFetching:!1,error:n})),fr(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),zr(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},G7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},_U=(t,e,n)=>{const r=Ul(t,n);t.updateMatch(e,s=>({...s,context:r}))},jf=(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,Ia(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,Ia(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&&!zr(n)&&!fr(n)&&(t.serialError??=n)},K7=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!bb(t,e)&&(n.options.loader||n.options.beforeLoad||Z7(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{N_(t)},s);r._nonReactive.pendingTimeout=o}},oge=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;K7(t,e,n,r);const s=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ia(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},ige=(t,e,n,r)=>{const s=t.router.getMatch(e);let o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Vc(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=s;a&&jf(t,n,a),u&&jf(t,n,u),K7(t,e,r,s);const c=new AbortController;let f=!1;const h=()=>{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(()=>{h(),g()});return}s._nonReactive.beforeLoadPromise=Vc();const m={...Ul(t,n,!1),...s.__routeContext},{search:y,params:S,cause:E}=s,C=bb(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},A=R=>{if(R===void 0){t.router.batch(()=>{h(),g()});return}(zr(R)||fr(R))&&(h(),jf(t,n,R)),t.router.batch(()=>{h(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let T;try{if(T=r.options.beforeLoad(w),Dh(T))return h(),T.catch(R=>{jf(t,n,R)}).then(A)}catch(R){h(),jf(t,n,R)}A(T)},age=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>ige(t,n,e,s),u=()=>{if(G7(t,n))return;const c=oge(t,n,s);return Dh(c)?c.then(a):a()};return o()},lge=(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}))},Y7=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),h=Ul(t,r),g=bb(t,n);return{params:a,deps:u,preload:!!g,parentMatchPromise:o,abortController:c,context:h,location:t.location,navigate:m=>t.router.navigate({...m,_fromLocation:t.location}),cause:g?"preload":f,route:s,...t.router.options.additionalContext}},AU=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(D7??t.router.isServer)||o.ssr===!0)&&Uh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(Y7(t,e,n,r,s)),f=!!u&&Dh(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;Ia(t,t.router.getMatch(n),g),g!==void 0&&t.updateMatch(n,m=>({...m,loaderData:g}))}s._lazyPromise&&await s._lazyPromise;const h=o._nonReactive.minPendingPromise;h&&await h,s._componentsPromise&&await s._componentsPromise,t.updateMatch(n,g=>({...g,error:void 0,context:Ul(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:Ul(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,fr(a)&&await s.options.notFoundComponent?.preload?.(),Ia(t,t.router.getMatch(n),a);try{s.options.onError?.(a)}catch(f){u=f,Ia(t,t.router.getMatch(n),f)}!zr(u)&&!fr(u)&&await Uh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Ul(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ia(t,a,o)}},uge=async(t,e,n)=>{async function r(y,S,E,C,w){const A=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(Y7(t,e,s,n,w)):R,{status:N,invalid:I}=C,k=A>=T&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=N==="success"&&(I||(M??k)),y&&w.options.preload===!1||(a&&!t.sync&&h?(u=!0,(async()=>{try{await AU(t,e,s,n,w);const F=t.router.getMatch(s);F._nonReactive.loaderPromise?.resolve(),F._nonReactive.loadPromise?.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){zr(F)&&await t.router.navigate(F.options)}})()):N!=="success"||a?await AU(t,e,s,n,w):_U(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,h=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(G7(t,s)){if(!t.router.getMatch(s))return t.matches[n];_U(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=bb(t,s);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!t.sync&&!y.preload&&h)return y;await y._nonReactive.loaderPromise;const w=t.router.getMatch(s),A=w._nonReactive.error||w.error;A&&Ia(t,w,A),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),A=t.router.getMatch(s);A._nonReactive.loaderPromise=Vc(),w!==A.preload&&t.updateMatch(s,T=>({...T,preload:w})),await r(C,y,E,A,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 TU(t){const e=t,n=[];sge(e.router)&&N_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=age(e,m);Dh(y)&&await y}catch(y){if(zr(y))throw y;if(fr(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?xU(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(uge(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(zr(S))throw S;fr(S)?u??=S:c??=S}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let h=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const m=xU(e,f);m===void 0&&gi();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})),h=m,await Uh(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 Uh(m,["errorComponent"])}for(let m=0;m<=h;m++){const{id:y,routeId:S}=e.matches[m],E=e.router.looseRoutesById[S];try{const C=lge(e,y,E);if(C){const w=await C;e.updateMatch(y,A=>({...A,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=N_(e);if(Dh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function RU(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Uh(t,e=cv){!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===cv?(()=>{if(t._componentsPromise===void 0){const r=RU(t,cv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():RU(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function Z7(t){for(const e of cv)if(t.options[e]?.preload)return!0;return!1}const cv=["component","errorComponent","pendingComponent","notFoundComponent"];var Ma="__TSR_index",IU="popstate",OU="beforeunload";function cge(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?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const g of f){const m=Hv(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[Ma];u=NU(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[Ma];u=NU(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[Ma]!==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 NU(t,e){e||(e={});const n=mR();return{...e,key:n,__TSR_key:n,[Ma]:t}}function dge(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let s=[];const o=()=>s,a=k=>s=k,u=(k=>k),c=(()=>Hv(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const k=mR();e.history.replaceState({[Ma]:0,key:k,__TSR_key:k},"")}let f=c(),h,g=!1,m=!1,y=!1,S=!1;const E=()=>f;let C,w;const A=()=>{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,h=void 0)},T=(k,F,H)=>{const D=u(F);w||(h=f),f=Hv(F,H),C={href:D,state:H,isPush:C?.isPush||k==="push"},w||(w=Promise.resolve().then(()=>A()))},R=k=>{f=c(),I.notify({type:k})},M=async()=>{if(m){m=!1;return}const k=c(),F=k.state[Ma]-f.state[Ma],H=F===1,D=F===-1,z=!H&&!D||g;g=!1;const q=z?"GO":D?"BACK":"FORWARD",V=z?{type:"GO",index:F}:{type:D?"BACK":"FORWARD"};if(y)y=!1;else{const ee=o();if(typeof document<"u"&&ee.length){for(const $ of ee)if(await $.blockerFn({currentLocation:f,nextLocation:k,action:q})){m=!0,e.history.go(1),I.notify(V);return}}}f=c(),I.notify(V)},N=k=>{if(S){S=!1;return}let F=!1;const H=o();if(typeof document<"u"&&H.length)for(const D of H){const z=D.enableBeforeUnload??!0;if(z===!0){F=!0;break}if(typeof z=="function"&&z()===!0){F=!0;break}}if(F)return k.preventDefault(),k.returnValue=""},I=cge({getLocation:E,getLength:()=>e.history.length,pushState:(k,F)=>T("push",k,F),replaceState:(k,F)=>T("replace",k,F),back:k=>(k&&(y=!0),S=!0,e.history.back()),forward:k=>{k&&(y=!0),S=!0,e.history.forward()},go:k=>{g=!0,e.history.go(k)},createHref:k=>u(k),flush:A,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(OU,N,{capture:!0}),e.removeEventListener(IU,M)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(OU,N,{capture:!0}),e.addEventListener(IU,M),e.history.pushState=function(...k){const F=n.apply(e.history,k);return I._ignoreSubscribers||R("PUSH"),F},e.history.replaceState=function(...k){const F=r.apply(e.history,k);return I._ignoreSubscribers||R("REPLACE"),F},I}function fge(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Hv(t,e){const n=fge(t),r=n.indexOf("#"),s=n.indexOf("?"),o=mR();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||{[Ma]:0,key:o,__TSR_key:o}}}function mR(){return(Math.random()+1).toString(36).substring(7)}function Fc(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 hge=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=Bpe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=dge()),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 h;this.resolvePathCache=Lh(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=rge(gge(this.latestLocation),h),Kpe(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==c||a!==f){this.basepath=c;const h=[],g=$7(c);g&&g!=="/"&&h.push(nge({basepath:c})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:tge(h),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=Dpe(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Ope(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:h,href:g,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(f),A=this.options.stringifySearch(w);return{href:c+A+h,publicHref:c+A+h,pathname:zf(c).path,external:!1,searchStr:A,search:Sl(r?.search,w),hash:zf(h.slice(1)).path,state:Rl(r?.state,m)}}const y=new URL(g,this.origin),S=O_(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:zf(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:C,search:Sl(r?.search,E),hash:zf(S.hash.slice(1)).path,state:Rl(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)=>jpe({base:n,to:r.includes("//")?gR(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=>mge({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,h=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,Tl(o.params,g)),E=this.routesByPath[fi(y)];let C;if(E)C=this.getRouteBranch(E);else if(y.includes("$"))C=[];else{const D=this.getMatchedRoutes(y);C=D.matchedRoutes,this.options.notFoundRoute&&(!D.foundRoute||D.foundRoute.path!=="/"&&D.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&U7(S))for(const D of C){const z=D.options.params?.stringify??D.options.stringifyParams;if(z)try{Object.assign(S,z(S))}catch{}}const w=n.leaveParams?y:zf(SU({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=h;if(n._includeValidateSearch&&this.options.search?.strict){const D={};C.forEach(z=>{if(z.options.validateSearch)try{Object.assign(D,dv(z.options.validateSearch,{...D,...A}))}catch{}}),A=D}A=vge({search:A,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),A=Sl(h,A);const T=this.options.stringifySearch(A),R=o.hash===!0?a.hash:o.hash?Tl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let N=o.state===!0?a.state:o.state?Tl(o.state,a.state):{};N=Rl(a.state,N);const I=`${w}${T}${M}`;let k,F,H=!1;if(this.rewrite){const D=new URL(I,this.origin),z=V7(this.rewrite,D);k=D.href.replace(D.origin,""),z.origin!==this.origin?(F=z.href,H=!0):F=z.pathname+z.search+z.hash}else k=Tpe(I),F=k;return{publicHref:F,href:k,pathname:w,search:A,searchStr:T,state:N,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 h=Npe(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:g,params:m,...y}=h.route,S=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,Tl(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 h=Dl(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),h},u=fi(this.latestLocation.href)===fi(s.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Vc(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...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=h??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=Hv(u,{__TSR_index:n?g:g+1}),y=new URL(m.pathname,this.origin);c.to=O_(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 h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},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(jv(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.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 h=this.latestLocation,g=Fc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await TU({router:this,sync:n?.sync,forceStaleReload:u.href===h.href,matches:this.stores.pendingMatches.get(),location:h,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,A=this.stores.matches.get();m=w?A.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?A.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)):A,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 A of C)this.looseRoutesById[A.routeId].options[w]?.(A)})})}})}catch(h){zr(h)?(s=h,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):fr(h)&&(o=h);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(Fc(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&&jv(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=Uh,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 TU({router:this,matches:s,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?s=s.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),s}catch(c){if(zr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});fr(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=Mpe(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Dl(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Dl(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??Qpe,parseSearch:t.parseSearch??Xpe,protocolAllowlist:t.protocolAllowlist??Ape}),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=B7(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["**"]:fi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?bge(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const h of this.stores.matchStores.values())h.routeId&&f.set(h.routeId,h.get());for(let h=0;h<o.length;h++){const g=o[h],m=c[h-1];let y,S,E;{const z=m?.search??t.search,q=m?._strictSearch??void 0;try{const V=dv(g.options.validateSearch,{...z})??void 0;y={...z,...V},S={...q,...V},E=void 0}catch(V){let ee=V;if(V instanceof $v||(ee=new $v(V.message,{cause:V})),e?.throwOnError)throw ee;y=z,S={},E=ee}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:A,usedParams:T}=SU({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+A+w,M=this.getMatch(R),N=f.get(g.id),I=M?._strictParams??T;let k;if(!M)try{MU(g,I)}catch(z){if(fr(z)||zr(z)?k=z:k=new pge(z.message,{cause:z}),e?.throwOnError)throw k}Object.assign(s,I);const F=N?"stay":"enter";let H;if(M)H={...M,cause:F,params:N?.params??s,_strictParams:I,search:Sl(N?N.search:M.search,y),_strictSearch:S};else{const z=g.options.loader||g.options.beforeLoad||g.lazyFn||Z7(g)?"pending":"success";H={id:R,ssr:g.options.ssr,index:h,routeId:g.id,params:N?.params??s,_strictParams:I,pathname:A,updatedAt:Date.now(),search:N?Sl(N.search,y):y,_strictSearch:S,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:Vc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:N?Rl(N.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 D=this.getParentContext(m);H.context={...D,...H.__routeContext,...H.__beforeLoadContext},c[h]=H}for(let h=0;h<c.length;h++){const g=c[h],m=this.looseRoutesById[g.routeId],y=this.getMatch(g.id),S=f.get(g.routeId);if(g.params=S?Sl(S.params,s):s,!y){const E=c[h-1],C=this.getParentContext(E);if(m.options.context){const w={deps:g.loaderDeps,params:g.params,context:C??{},location:t,navigate:A=>this.navigate({...A,_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=kh(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=kh(r),a={...t.search};for(const g of r)try{Object.assign(a,dv(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{MU(m,g)}catch{}f=g}const h={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,h]),h}},$v=class extends Error{},pge=class extends Error{};function gge(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function dv(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new $v("Async validation not supported");if(n.issues)throw new $v(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 mge({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=fi(t);let o;const a=Ppe(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function vge({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return yge(n)(t,e,r??!1)}function yge(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:h})=>{const g=h(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:h,meta:g})=>{const m=h(f);if(n)try{const y=dv(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=Tl(e.search,a);return u&&(u.explicit=f),f}const c=(f,h)=>{if(h){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 bge(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 Ll}function MU(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 Sge="Error preloading route! ☝️";var X7=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=Ll:this.parentRoute||gi();let s=r?Ll:n?.path;s&&s!=="/"&&(s=H7(s));const o=n?.id||s;let a=r?Ll:lv([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=lv(["/",a]));const u=a==="__root__"?"/":lv([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=u,this._to=fi(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=>W7({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.")}},Ege=class extends X7{constructor(t){super(t)}};function vR(t){const e=t.errorComponent??yR;return O.jsx(Cge,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?_.createElement(e,{error:n,reset:r}):t.children})}var Cge=class extends _.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 yR({error:t}){const[e,n]=_.useState(!1);return O.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[O.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),O.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),O.jsx("div",{style:{height:".25rem"}}),e?O.jsx("div",{children:O.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?O.jsx("code",{children:t.message}):null})}):null]})}function wge({children:t,fallback:e=null}){return Q7()?O.jsx(j.Fragment,{children:t}):O.jsx(j.Fragment,{children:e})}function Q7(){return j.useSyncExternalStore(xge,()=>!0,()=>!1)}function xge(){return()=>{}}var J7=_.createContext(null);function fs(t){return _.useContext(J7)}var Sb=_.createContext(void 0),_ge=_.createContext(void 0),sn=(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))(sn||{});function Age({update:t,notify:e,unwatched:n}){return{link:r,unlink:s,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,g){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:h.deps;if(y!==void 0&&y.dep===f){y.version=g,h.depsTail=y;return}const S=f.subsTail;if(S!==void 0&&S.version===g&&S.sub===h)return;const E=h.depsTail=f.subsTail={version:g,dep:f,sub:h,prevDep:m,nextDep:y,prevSub:S,nextSub:void 0};y!==void 0&&(y.prevDep=E),m!==void 0?m.nextDep=E:h.deps=E,S!==void 0?S.nextSub=E:f.subs=E}function s(f,h=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:h.depsTail=m,m!==void 0?m.nextDep=y:h.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 h=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:h,prev:g},h=E);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;g!==void 0;)if(f=g.value,g=g.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let g,m=0,y=!1;e:do{const S=f.dep,E=S.flags;if(h.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,h=S,++m;continue}if(!y){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;m--;){const C=h.subs,w=C.nextSub!==void 0;if(w?(f=g.value,g=g.prev):f=C,y){if(t(h)){w&&u(C),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const A=f.nextDep;if(A!==void 0){f=A;continue e}}return y}while(!0)}function u(f){do{const h=f.sub,g=h.flags;(g&48)===32&&(h.flags=g|16,(g&6)===2&&e(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let g=h.depsTail;for(;g!==void 0;){if(g===f)return!0;g=g.prevDep}return!1}}function Tge(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 M_=[];let fv=0;const{link:PU,unlink:Rge,propagate:Ige,checkDirty:ez,shallowPropagate:kU}=Age({update(t){return t._update()},notify(t){M_[P_++]=t,t.flags&=~sn.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=sn.Mutable|sn.Dirty,qv(t))}});let fm=0,P_=0,So,k_=0;function tz(t){try{++k_,t()}finally{--k_||nz()}}function qv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=Rge(n,t)}function nz(){if(!(k_>0)){for(;fm<P_;){const t=M_[fm];M_[fm++]=void 0,t.notify()}fm=0,P_=0}}function DU(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?sn.None:sn.Mutable,get(){return So!==void 0&&PU(s,So,fv),s._snapshot},subscribe(o){const a=Tge(o),u={current:!1},c=Oge(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=So,u=e?.compare??Object.is;if(n)So=s,++fv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=sn.Mutable|sn.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{So=a,n&&(s.flags&=~sn.RecursedCheck),qv(s)}}};return n?(s.flags=sn.Mutable|sn.Dirty,s.get=function(){const o=s.flags;if(o&sn.Dirty||o&sn.Pending&&ez(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&kU(a)}}else o&sn.Pending&&(s.flags=o&~sn.Pending);return So!==void 0&&PU(s,So,fv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(Ige(a),kU(a),nz())}},s}function Oge(t){const e=()=>{const r=So;So=n,++fv,n.depsTail=void 0,n.flags=sn.Watching|sn.RecursedCheck;try{return t()}finally{So=r,n.flags&=~sn.RecursedCheck,qv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:sn.Watching|sn.RecursedCheck,notify(){const r=this.flags;r&sn.Dirty||r&sn.Pending&&ez(this.deps,this)?e():this.flags=sn.Watching},stop(){this.flags=sn.None,this.depsTail=void 0,qv(this)}};return e(),n}function Nge(t,e){return t===e}function Wr(t,e,n=Nge){const r=_.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=_.useCallback(()=>t?.get(),[t]);return xT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var Jw={get(){},subscribe(){return{unsubscribe(){}}}};function Mge(t,e){const n=_.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Rl(n.current,s):s}}function du(t){const e=fs(),n=_.useContext(t.from?_ge:Sb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=Mge(t,e),o=Wr(r??Jw,a=>a?s(a):Jw);if(o!==Jw)return o;(t.shouldThrow??!0)&&gi()}function rz(t){return du({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function sz(t){const{select:e,...n}=t;return du({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function oz(t){return du({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 iz(t){return du({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function bR(t){const e=fs();return _.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function SRe(t){const e=fs(),n=bR(),r=_.useRef(null);return Tc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function az(t){return du({...t,select:e=>t.select?t.select(e.context):e.context})}function Pge(t,e){const n=fs(),r=Spe(e),{activeProps:s,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:g,replace:m,startTransition:y,resetScroll:S,viewTransition:E,children:C,target:w,disabled:A,style:T,className:R,onClick:M,onBlur:N,onFocus:I,onMouseEnter:k,onMouseLeave:F,onTouchStart:H,ignoreBlocker:D,params:z,search:q,hash:V,state:ee,mask:$,reloadDocument:te,unsafeRelative:fe,from:de,_fromLocation:Ae,...L}=t,K=Q7(),Y=_.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),J=Wr(n.stores.location,gt=>gt,(gt,yn)=>gt.href===yn.href),oe=_.useMemo(()=>{const gt={_fromLocation:J,...Y};return n.buildLocation(gt)},[n,J,Y]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=_.useMemo(()=>zge(he,ue,n.history,A),[A,ue,he,n.history]),xe=_.useMemo(()=>{if(ve?.external)return jv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!jge(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),jv(u,n.protocolAllowlist)?void 0:u}catch{}},[u,ve,n.protocolAllowlist]),Xe=_.useMemo(()=>{if(xe)return!1;if(a?.exact){if(!zpe(J.pathname,oe.pathname,n.basepath))return!1}else{const gt=Bv(J.pathname,n.basepath),yn=Bv(oe.pathname,n.basepath);if(!(gt.startsWith(yn)&&(gt.length===yn.length||gt[yn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Dl(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?K&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,xe,K,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?Tl(s,{})??kge:ex,pt=Xe?ex:Tl(o,{})??ex,Ce=[R,Ee.className,pt.className].filter(Boolean).join(" "),ze=(T||Ee.style||pt.style)&&{...T,...Ee.style,...pt.style},[je,He]=_.useState(!1),gr=_.useRef(!1),Et=t.reloadDocument||xe?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Kn=_.useCallback(()=>{n.preloadRoute({...Y,_builtLocation:oe}).catch(gt=>{console.warn(gt),console.warn(Sge)})},[n,Y,oe]);bpe(r,_.useCallback(gt=>{gt?.isIntersecting&&Kn()},[Kn]),Fge,{disabled:!!A||Et!=="viewport"}),_.useEffect(()=>{gr.current||!A&&Et==="render"&&(Kn(),gr.current=!0)},[A,Kn,Et]);const Tr=gt=>{const yn=gt.currentTarget.getAttribute("target"),Ir=w!==void 0?w:yn;if(!A&&!Bge(gt)&&!gt.defaultPrevented&&(!Ir||Ir==="_self")&>.button===0){gt.preventDefault(),D8.flushSync(()=>{He(!0)});const no=n.subscribe("onResolved",()=>{no(),He(!1)});n.navigate({...Y,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:D})}};if(xe)return{...L,ref:r,href:xe,...C&&{children:C},...w&&{target:w},...A&&{disabled:A},...T&&{style:T},...R&&{className:R},...M&&{onClick:M},...N&&{onBlur:N},...I&&{onFocus:I},...k&&{onMouseEnter:k},...F&&{onMouseLeave:F},...H&&{onTouchStart:H}};const to=gt=>{if(A||Et!=="intent")return;if(!Gr){Kn();return}const yn=gt.currentTarget;if(Bf.has(yn))return;const Ir=setTimeout(()=>{Bf.delete(yn),Kn()},Gr);Bf.set(yn,Ir)},Rr=gt=>{A||Et!=="intent"||Kn()},Gt=gt=>{if(A||!Et||!Gr)return;const yn=gt.currentTarget,Ir=Bf.get(yn);Ir&&(clearTimeout(Ir),Bf.delete(yn))};return{...L,...Ee,...pt,href:ve?.href,ref:r,onClick:lc([M,Tr]),onBlur:lc([N,Gt]),onFocus:lc([I,to]),onMouseEnter:lc([k,to]),onMouseLeave:lc([F,Gt]),onTouchStart:lc([H,Rr]),disabled:!!A,target:w,...ze&&{style:ze},...Ce&&{className:Ce},...A&&Dge,...Xe&&Lge,...K&&je&&Uge}}var ex={},kge={className:"active"},Dge={role:"link","aria-disabled":!0},Lge={"data-status":"active","aria-current":"page"},Uge={"data-transitioning":"transitioning"},Bf=new WeakMap,Fge={rootMargin:"100px"},lc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function zge(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function jge(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var lz=_.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=Pge(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return _.createElement("a",c,a)}return _.createElement(n,o,a)});function Bge(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var Hge=class extends X7{constructor(e){super(e),this.useMatch=n=>du({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>az({...n,from:this.id}),this.useSearch=n=>iz({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>oz({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>sz({...n,from:this.id}),this.useLoaderData=n=>rz({...n,from:this.id}),this.useNavigate=()=>bR({from:this.fullPath}),this.Link=j.forwardRef((n,r)=>O.jsx(lz,{ref:r,from:this.fullPath,...n}))}};function $ge(t){return new Hge(t)}function qge(){return t=>Vge(t)}var Wge=class extends Ege{constructor(t){super(t),this.useMatch=e=>du({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>az({...e,from:this.id}),this.useSearch=e=>iz({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>oz({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>sz({...e,from:this.id}),this.useLoaderData=e=>rz({...e,from:this.id}),this.useNavigate=()=>bR({from:this.fullPath}),this.Link=j.forwardRef((e,n)=>O.jsx(lz,{ref:n,from:this.fullPath,...e}))}};function Vge(t){return new Wge(t)}function hr(t){return new Gge(t,{silent:!0}).createRoute}var Gge=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=$ge(n);return r.isRoot=!1,r},this.silent=e?.silent}};function ir(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,wpe(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(hU)hU(a());else throw a();return _.createElement(r,f)};return u.preload=a,u}function Kge(t){const e=fs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return O.jsx(vR,{getResetKey:()=>n,onCatch:(r,s)=>{if(fr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(fr(r))return t.fallback?.(r);throw r},children:t.children})}function Yge(){return O.jsx("p",{children:"Not Found"})}function Sc(t){return O.jsx(O.Fragment,{children:t.children})}function uz(t,e,n){return e.options.notFoundComponent?O.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?O.jsx(t.options.defaultNotFoundComponent,{...n}):O.jsx(Yge,{})}function Zge(t){return null}function Xge(){return Zge(fs()),null}var Qge=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,Jge=(t,e)=>t[0]===e[0]&&t[1]===e[1],cz=_.memo(function({matchId:e}){const n=fs(),r=n.stores.matchStores.get(e);r||gi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,Qge);return O.jsx(eme,{router:n,matchId:e,resetKey:s,matchState:_.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 eme({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?O.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,h=r.ssr===!1||r.ssr==="data-only",g=(!s.isRoot||s.options.wrapInSuspense||h)&&(s.options.wrapInSuspense??o??(s.options.errorComponent?.preload||h))?_.Suspense:Sc,m=u?vR:Sc,y=f?Kge:Sc;return O.jsxs(s.isRoot?s.options.shellComponent??Sc:Sc,{children:[O.jsx(Sb.Provider,{value:e,children:O.jsx(g,{fallback:a,children:O.jsx(m,{getResetKey:()=>n,errorComponent:u||yR,onCatch:(S,E)=>{if(fr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:O.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return _.createElement(f,S)},children:h||r._displayPending?O.jsx(wge,{fallback:a,children:O.jsx(LU,{matchId:e})}):O.jsx(LU,{matchId:e})})})})}),r.parentRouteId===Ll?O.jsxs(O.Fragment,{children:[O.jsx(tme,{}),t.options.scrollRestoration&&D7?O.jsx(Xge,{}):null]}):null]})}function tme(){const t=fs(),e=_.useRef();return Tc(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...Fc(t.stores.location.get(),r??n)}),e.current=n},[Wr(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var LU=_.memo(function({matchId:e}){const n=fs(),r=(h,g)=>n.getMatch(h.id)?._nonReactive[g]??h._nonReactive[g],s=n.stores.matchStores.get(e);s||gi();const o=Wr(s,h=>h),a=o.routeId,u=n.routesById[a],c=_.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=_.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?O.jsx(h,{},c):O.jsx(dz,{})},[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 h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const g=n.getMatch(o.id);if(g&&!g._nonReactive.minPendingPromise){const m=Vc();g._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),g._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return fr(o.error)||gi(),uz(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||gi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),dz=_.memo(function(){const e=fs(),n=_.useContext(Sb);let r,s=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,s]=Wr(f,h=>[h?.routeId,h?.globalNotFound??!1],Jge),o=Wr(e.stores.matchesId,h=>h[h.findIndex(g=>g===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?O.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||gi(),uz(e,a,void 0);if(!o)return null;const c=O.jsx(cz,{matchId:o});return r===Ll?O.jsx(_.Suspense,{fallback:u,children:c}):c});function nme(){const t=fs(),e=_.useRef({router:t,mounted:!1}),[n,r]=_.useState(!1),s=Wr(t.stores.isLoading,g=>g),o=Wr(t.stores.hasPending,g=>g),a=Vw(s),u=s||n||o,c=Vw(u),f=s||o,h=Vw(f);return t.startTransition=g=>{r(!0),_.startTransition(()=>{g(),r(!1)})},_.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 fi(t.latestLocation.publicHref)!==fi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Tc(()=>{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]),Tc(()=>{a&&!s&&t.emit({type:"onLoad",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Tc(()=>{h&&!f&&t.emit({type:"onBeforeRouteMount",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,h,t]),Tc(()=>{if(c&&!u){const g=Fc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),tz(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function rme(){const t=fs(),e=t.routesById[Ll].options.pendingComponent??t.options.defaultPendingComponent,n=e?O.jsx(e,{}):null,r=O.jsxs(typeof document<"u"&&t.ssr?Sc:_.Suspense,{fallback:n,children:[O.jsx(nme,{}),O.jsx(sme,{})]});return t.options.InnerWrap?O.jsx(t.options.InnerWrap,{children:r}):r}function sme(){const t=fs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?O.jsx(cz,{matchId:e}):null;return O.jsx(Sb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:O.jsx(vR,{getResetKey:()=>n,errorComponent:yR,onCatch:void 0,children:r})})}var ome=t=>({createMutableStore:DU,createReadonlyStore:DU,batch:tz}),ime=t=>new ame(t),ame=class extends hge{constructor(t){super(t,ome)}};function lme({router:t,children:e,...n}){U7(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=O.jsx(J7.Provider,{value:t,children:e});return t.options.Wrap?O.jsx(t.options.Wrap,{children:r}):r}function ume({router:t,...e}){return O.jsx(lme,{router:t,...e,children:O.jsx(rme,{})})}var tx={exports:{}},Hf={},nx={exports:{}},rx={};var UU;function cme(){return UU||(UU=1,(function(t){function e($,te){var fe=$.length;$.push(te);e:for(;0<fe;){var de=fe-1>>>1,Ae=$[de];if(0<s(Ae,te))$[de]=te,$[fe]=Ae,fe=de;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var te=$[0],fe=$.pop();if(fe!==te){$[0]=fe;e:for(var de=0,Ae=$.length,L=Ae>>>1;de<L;){var K=2*(de+1)-1,Y=$[K],J=K+1,oe=$[J];if(0>s(Y,fe))J<Ae&&0>s(oe,Y)?($[de]=oe,$[J]=fe,de=J):($[de]=Y,$[K]=fe,de=K);else if(J<Ae&&0>s(oe,fe))$[de]=oe,$[J]=fe,de=J;else break e}}return te}function s($,te){var fe=$.sortIndex-te.sortIndex;return fe!==0?fe:$.id-te.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=[],h=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R($){for(var te=n(f);te!==null;){if(te.callback===null)r(f);else if(te.startTime<=$)r(f),te.sortIndex=te.expirationTime,e(c,te);else break;te=n(f)}}function M($){if(E=!1,R($),!S)if(n(c)!==null)S=!0,N||(N=!0,z());else{var te=n(f);te!==null&&ee(M,te.startTime-$)}}var N=!1,I=-1,k=5,F=-1;function H(){return C?!0:!(t.unstable_now()-F<k)}function D(){if(C=!1,N){var $=t.unstable_now();F=$;var te=!0;try{e:{S=!1,E&&(E=!1,A(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($),te=!0;break t}g===n(c)&&r(c),R($)}else r(c);g=n(c)}if(g!==null)te=!0;else{var L=n(f);L!==null&&ee(M,L.startTime-$),te=!1}}break e}finally{g=null,m=fe,y=!1}te=void 0}}finally{te?z():N=!1}}}var z;if(typeof T=="function")z=function(){T(D)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,V=q.port2;q.port1.onmessage=D,z=function(){V.postMessage(null)}}else z=function(){w(D,0)};function ee($,te){I=w(function(){$(t.unstable_now())},te)}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"):k=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function($){switch(m){case 1:case 2:case 3:var te=3;break;default:te=m}var fe=m;m=te;try{return $()}finally{m=fe}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function($,te){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=m;m=$;try{return te()}finally{m=fe}},t.unstable_scheduleCallback=function($,te,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:h++,callback:te,priorityLevel:$,startTime:fe,expirationTime:Ae,sortIndex:-1},fe>de?($.sortIndex=fe,e(f,$),n(c)===null&&$===n(f)&&(E?(A(I),I=-1):E=!0,ee(M,fe-de))):($.sortIndex=Ae,e(c,$),S||y||(S=!0,N||(N=!0,z()))),$},t.unstable_shouldYield=H,t.unstable_wrapCallback=function($){var te=m;return function(){var fe=m;m=te;try{return $.apply(this,arguments)}finally{m=fe}}}})(rx)),rx}var FU;function dme(){return FU||(FU=1,nx.exports=cme()),nx.exports}var zU;function fme(){if(zU)return Hf;zU=1;var t=dme(),e=ip(),n=k8();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,p=l;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(p=v.return,p!==null){d=p;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return c(v),i;if(b===p)return c(v),l;b=b.sibling}throw Error(r(188))}if(d.return!==p.return)d=v,p=b;else{for(var x=!1,P=v.child;P;){if(P===d){x=!0,d=v,p=b;break}if(P===p){x=!0,p=v,d=b;break}P=P.sibling}if(!x){for(P=b.child;P;){if(P===d){x=!0,d=b,p=v;break}if(P===p){x=!0,p=b,d=v;break}P=P.sibling}if(!x)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function h(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=h(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"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),D=Symbol.iterator;function z(i){return i===null||typeof i!="object"?null:(i=D&&i[D]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function V(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?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 N:return"SuspenseList";case F:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case A: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:V(i.type)||"Memo";case k:l=i._payload,i=i._init;try{return V(i(l))}catch{}}return null}var ee=Array.isArray,$=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=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 L(i){return{current:i}}function K(i){0>Ae||(i.current=de[Ae],de[Ae]=null,Ae--)}function Y(i,l){Ae++,de[Ae]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(Y(he,l),Y(oe,i),Y(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?fN(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=fN(l),i=hN(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}K(J),Y(J,i)}function xe(){K(J),K(oe),K(he)}function Xe(i){i.memoizedState!==null&&Y(ue,i);var l=J.current,d=hN(l,i.type);l!==d&&(Y(oe,i),Y(J,d))}function Ee(i){oe.current===i&&(K(J),K(oe)),ue.current===i&&(K(ue),bf._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(`
|
|
217
|
-
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
218
|
-
`+pt+i+Ce}var je=!1;function He(i,l){if(!i||je)return"";je=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={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 ne=re}Reflect.construct(i,[],ae)}else{try{ae.call()}catch(re){ne=re}i.call(ae.prototype)}}else{try{throw Error()}catch(re){ne=re}(ae=i())&&typeof ae.catch=="function"&&ae.catch(function(){})}}catch(re){if(re&&ne&&typeof re.stack=="string")return[re.stack,ne.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=p.DetermineComponentFrameRoot(),x=b[0],P=b[1];if(x&&P){var B=x.split(`
|
|
219
|
-
`),Q=P.split(`
|
|
220
|
-
`);for(v=p=0;p<B.length&&!B[p].includes("DetermineComponentFrameRoot");)p++;for(;v<Q.length&&!Q[v].includes("DetermineComponentFrameRoot");)v++;if(p===B.length||v===Q.length)for(p=B.length-1,v=Q.length-1;1<=p&&0<=v&&B[p]!==Q[v];)v--;for(;1<=p&&0<=v;p--,v--)if(B[p]!==Q[v]){if(p!==1||v!==1)do if(p--,v--,0>v||B[p]!==Q[v]){var se=`
|
|
221
|
-
`+B[p].replace(" at new "," at ");return i.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",i.displayName)),se}while(1<=p&&0<=v);break}}}finally{je=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ze(d):""}function gr(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 Et(i){try{var l="",d=null;do l+=gr(i,d),d=i,i=i.return;while(i);return l}catch(p){return`
|
|
222
|
-
Error generating stack: `+p.message+`
|
|
223
|
-
`+p.stack}}var Gr=Object.prototype.hasOwnProperty,Kn=t.unstable_scheduleCallback,Tr=t.unstable_cancelCallback,to=t.unstable_shouldYield,Rr=t.unstable_requestPaint,Gt=t.unstable_now,gt=t.unstable_getCurrentPriorityLevel,yn=t.unstable_ImmediatePriority,Ir=t.unstable_UserBlockingPriority,no=t.unstable_NormalPriority,Cd=t.unstable_LowPriority,ko=t.unstable_IdlePriority,mu=t.log,vu=t.unstable_setDisableYieldValue,Pi=null,lr=null;function Ps(i){if(typeof mu=="function"&&vu(i),lr&&typeof lr.setStrictMode=="function")try{lr.setStrictMode(Pi,i)}catch{}}var Yn=Math.clz32?Math.clz32:ps,wd=Math.log,ki=Math.LN2;function ps(i){return i>>>=0,i===0?32:31-(wd(i)/ki|0)|0}var Di=256,Ya=262144,Za=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 Xa(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var v=0,b=i.suspendedLanes,x=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~b,p!==0?v=ks(p):(x&=P,x!==0?v=ks(x):d||(d=P&~i,d!==0&&(v=ks(d))))):(P=p&~b,P!==0?v=ks(P):x!==0?v=ks(x):d||(d=p&~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 yu(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 Kr(){var i=Za;return Za<<=1,(Za&62914560)===0&&(Za=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 xd(i,l,d,p,v,b){var x=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 P=i.entanglements,B=i.expirationTimes,Q=i.hiddenUpdates;for(d=x&~d;0<d;){var se=31-Yn(d),ae=1<<se;P[se]=0,B[se]=-1;var ne=Q[se];if(ne!==null)for(Q[se]=null,se=0;se<ne.length;se++){var re=ne[se];re!==null&&(re.lane&=-536870913)}d&=~ae}p!==0&&Cp(i,p,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(x&~l))}function Cp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-Yn(l);i.entangledLanes|=l,i.entanglements[p]=i.entanglements[p]|1073741824|d&261930}function _d(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var p=31-Yn(d),v=1<<p;v&l|i[p]&l&&(i[p]|=l),d&=~v}}function bu(i,l){var d=l&-l;return d=(d&42)!==0?1:Su(d),(d&(i.suspendedLanes|l))!==0?0:d}function Su(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 Qa(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function wp(){var i=te.p;return i!==0?i:(i=window.event,i===void 0?32:LN(i.type))}function Li(i,l){var d=te.p;try{return te.p=i,l()}finally{te.p=d}}var oo=Math.random().toString(36).slice(2),On="__reactFiber$"+oo,nt="__reactProps$"+oo,Yr="__reactContainer$"+oo,Ad="__reactEvents$"+oo,xp="__reactListeners$"+oo,Td="__reactHandles$"+oo,Rd="__reactResources$"+oo,Ui="__reactMarker$"+oo;function Id(i){delete i[On],delete i[nt],delete i[Ad],delete i[xp],delete i[Td]}function Fi(i){var l=i[On];if(l)return l;for(var d=i.parentNode;d;){if(l=d[Yr]||d[On]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=SN(i);i!==null;){if(d=i[On])return d;i=SN(i)}return l}i=d,d=i.parentNode}return null}function zi(i){if(i=i[On]||i[Yr]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Ja(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function mr(i){var l=i[Rd];return l||(l=i[Rd]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function ln(i){i[Ui]=!0}var io=new Set,_p={};function Ds(i,l){ji(i,l),ji(i+"Capture",l)}function ji(i,l){for(_p[i]=l,i=0;i<l.length;i++)io.add(l[i])}var Ap=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]*$"),Od={},el={};function Nd(i){return Gr.call(el,i)?!0:Gr.call(Od,i)?!1:Ap.test(i)?el[i]=!0:(Od[i]=!0,!1)}function Lo(i,l,d){if(Nd(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="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 vr(i,l,d,p){if(p===null)i.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+p)}}function un(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Tp(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Bb(i,l,d){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var v=p.get,b=p.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return v.call(this)},set:function(x){d=""+x,b.call(this,x)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Eu(i){if(!i._valueTracker){var l=Tp(i)?"checked":"value";i._valueTracker=Bb(i,l,""+i[l])}}function Md(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return i&&(p=Tp(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function Cu(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 Rp=/[\n"\\]/g;function Or(i){return i.replace(Rp,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pd(i,l,d,p,v,b,x,P){i.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.type=x:i.removeAttribute("type"),l!=null?x==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+un(l)):i.value!==""+un(l)&&(i.value=""+un(l)):x!=="submit"&&x!=="reset"||i.removeAttribute("value"),l!=null?Bi(i,x,un(l)):d!=null?Bi(i,x,un(d)):p!=null&&i.removeAttribute("value"),v==null&&b!=null&&(i.defaultChecked=!!b),v!=null&&(i.checked=v&&typeof v!="function"&&typeof v!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?i.name=""+un(P):i.removeAttribute("name")}function kd(i,l,d,p,v,b,x,P){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)){Eu(i);return}d=d!=null?""+un(d):"",l=l!=null?""+un(l):d,P||l===i.value||(i.value=l),i.defaultValue=l}p=p??v,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=P?i.checked:!!p,i.defaultChecked=!!p,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.name=x),Eu(i)}function Bi(i,l,d){l==="number"&&Cu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function ao(i,l,d,p){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&&p&&(i[d].defaultSelected=!0)}else{for(d=""+un(d),l=null,v=0;v<i.length;v++){if(i[v].value===d){i[v].selected=!0,p&&(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=""+un(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+un(d):""}function U(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(ee(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=un(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),Eu(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 p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":p?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 p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var v in l)p=l[v],l.hasOwnProperty(v)&&d[v]!==p&&Te(i,v,p)}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 tn=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"]]),Un=/^[\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 ur(i){return Un.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function nn(){}var yr=null;function Nn(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var wu=null,xu=null;function dI(i){var l=zi(i);if(l&&(i=l.stateNode)){var d=i[nt]||null;e:switch(i=l.stateNode,l.type){case"input":if(Pd(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="'+Or(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==i&&p.form===i.form){var v=p[nt]||null;if(!v)throw Error(r(90));Pd(p,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===i.form&&Md(p)}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 Hb=!1;function fI(i,l,d){if(Hb)return i(l,d);Hb=!0;try{var p=i(l);return p}finally{if(Hb=!1,(wu!==null||xu!==null)&&(gg(),wu&&(l=wu,i=xu,xu=wu=null,dI(l),i)))for(l=0;l<i.length;l++)dI(i[l])}}function Dd(i,l){var d=i.stateNode;if(d===null)return null;var p=d[nt]||null;if(p===null)return null;d=p[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":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;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 Ld={};Object.defineProperty(Ld,"passive",{get:function(){$b=!0}}),window.addEventListener("test",Ld,Ld),window.removeEventListener("test",Ld,Ld)}catch{$b=!1}var Hi=null,qb=null,Ip=null;function hI(){if(Ip)return Ip;var i,l=qb,d=l.length,p,v="value"in Hi?Hi.value:Hi.textContent,b=v.length;for(i=0;i<d&&l[i]===v[i];i++);var x=d-i;for(p=1;p<=x&&l[d-p]===v[b-p];p++);return Ip=v.slice(i,1<p?1-p:void 0)}function Op(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 Np(){return!0}function pI(){return!1}function Nr(i){function l(d,p,v,b,x){this._reactName=d,this._targetInst=v,this.type=p,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(d=i[P],this[P]=d?d(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Np:pI,this.isPropagationStopped=pI,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=Np)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Np)},persist:function(){},isPersistent:Np}),l}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mp=Nr(tl),Ud=g({},tl,{view:0,detail:0}),AH=Nr(Ud),Wb,Vb,Fd,Pp=g({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kb,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!==Fd&&(Fd&&i.type==="mousemove"?(Wb=i.screenX-Fd.screenX,Vb=i.screenY-Fd.screenY):Vb=Wb=0,Fd=i),Wb)},movementY:function(i){return"movementY"in i?i.movementY:Vb}}),gI=Nr(Pp),TH=g({},Pp,{dataTransfer:0}),RH=Nr(TH),IH=g({},Ud,{relatedTarget:0}),Gb=Nr(IH),OH=g({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),NH=Nr(OH),MH=g({},tl,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),PH=Nr(MH),kH=g({},tl,{data:0}),mI=Nr(kH),DH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LH={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"},UH={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FH(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=UH[i])?!!l[i]:!1}function Kb(){return FH}var zH=g({},Ud,{key:function(i){if(i.key){var l=DH[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Op(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?LH[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kb,charCode:function(i){return i.type==="keypress"?Op(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Op(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),jH=Nr(zH),BH=g({},Pp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vI=Nr(BH),HH=g({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kb}),$H=Nr(HH),qH=g({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),WH=Nr(qH),VH=g({},Pp,{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}),GH=Nr(VH),KH=g({},tl,{newState:0,oldState:0}),YH=Nr(KH),ZH=[9,13,27,32],Yb=Uo&&"CompositionEvent"in window,zd=null;Uo&&"documentMode"in document&&(zd=document.documentMode);var XH=Uo&&"TextEvent"in window&&!zd,yI=Uo&&(!Yb||zd&&8<zd&&11>=zd),bI=" ",SI=!1;function EI(i,l){switch(i){case"keyup":return ZH.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CI(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var _u=!1;function QH(i,l){switch(i){case"compositionend":return CI(l);case"keypress":return l.which!==32?null:(SI=!0,bI);case"textInput":return i=l.data,i===bI&&SI?null:i;default:return null}}function JH(i,l){if(_u)return i==="compositionend"||!Yb&&EI(i,l)?(i=hI(),Ip=qb=Hi=null,_u=!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 yI&&l.locale!=="ko"?null:l.data;default:return null}}var e$={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 wI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!e$[i.type]:l==="textarea"}function xI(i,l,d,p){wu?xu?xu.push(p):xu=[p]:wu=p,l=Cg(l,"onChange"),0<l.length&&(d=new Mp("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var jd=null,Bd=null;function t$(i){iN(i,0)}function kp(i){var l=Ja(i);if(Md(l))return i}function _I(i,l){if(i==="change")return l}var AI=!1;if(Uo){var Zb;if(Uo){var Xb="oninput"in document;if(!Xb){var TI=document.createElement("div");TI.setAttribute("oninput","return;"),Xb=typeof TI.oninput=="function"}Zb=Xb}else Zb=!1;AI=Zb&&(!document.documentMode||9<document.documentMode)}function RI(){jd&&(jd.detachEvent("onpropertychange",II),Bd=jd=null)}function II(i){if(i.propertyName==="value"&&kp(Bd)){var l=[];xI(l,Bd,i,Nn(i)),fI(t$,l)}}function n$(i,l,d){i==="focusin"?(RI(),jd=l,Bd=d,jd.attachEvent("onpropertychange",II)):i==="focusout"&&RI()}function r$(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return kp(Bd)}function s$(i,l){if(i==="click")return kp(l)}function o$(i,l){if(i==="input"||i==="change")return kp(l)}function i$(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Zr=typeof Object.is=="function"?Object.is:i$;function Hd(i,l){if(Zr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var v=d[p];if(!Gr.call(l,v)||!Zr(i[v],l[v]))return!1}return!0}function OI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function NI(i,l){var d=OI(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=l&&p>=l)return{node:d,offset:l-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=OI(d)}}function MI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?MI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function PI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=Cu(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=Cu(i.document)}return l}function Qb(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 a$=Uo&&"documentMode"in document&&11>=document.documentMode,Au=null,Jb=null,$d=null,e0=!1;function kI(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;e0||Au==null||Au!==Cu(p)||(p=Au,"selectionStart"in p&&Qb(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),$d&&Hd($d,p)||($d=p,p=Cg(Jb,"onSelect"),0<p.length&&(l=new Mp("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=Au)))}function nl(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Tu={animationend:nl("Animation","AnimationEnd"),animationiteration:nl("Animation","AnimationIteration"),animationstart:nl("Animation","AnimationStart"),transitionrun:nl("Transition","TransitionRun"),transitionstart:nl("Transition","TransitionStart"),transitioncancel:nl("Transition","TransitionCancel"),transitionend:nl("Transition","TransitionEnd")},t0={},DI={};Uo&&(DI=document.createElement("div").style,"AnimationEvent"in window||(delete Tu.animationend.animation,delete Tu.animationiteration.animation,delete Tu.animationstart.animation),"TransitionEvent"in window||delete Tu.transitionend.transition);function rl(i){if(t0[i])return t0[i];if(!Tu[i])return i;var l=Tu[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in DI)return t0[i]=l[d];return i}var LI=rl("animationend"),UI=rl("animationiteration"),FI=rl("animationstart"),l$=rl("transitionrun"),u$=rl("transitionstart"),c$=rl("transitioncancel"),zI=rl("transitionend"),jI=new Map,n0="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(" ");n0.push("scrollEnd");function Us(i,l){jI.set(i,l),Ds(l,[i])}var Dp=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)},gs=[],Ru=0,r0=0;function Lp(){for(var i=Ru,l=r0=Ru=0;l<i;){var d=gs[l];gs[l++]=null;var p=gs[l];gs[l++]=null;var v=gs[l];gs[l++]=null;var b=gs[l];if(gs[l++]=null,p!==null&&v!==null){var x=p.pending;x===null?v.next=v:(v.next=x.next,x.next=v),p.pending=v}b!==0&&BI(d,v,b)}}function Up(i,l,d,p){gs[Ru++]=i,gs[Ru++]=l,gs[Ru++]=d,gs[Ru++]=p,r0|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function s0(i,l,d,p){return Up(i,l,d,p),Fp(i)}function sl(i,l){return Up(i,null,null,l),Fp(i)}function BI(i,l,d){i.lanes|=d;var p=i.alternate;p!==null&&(p.lanes|=d);for(var v=!1,b=i.return;b!==null;)b.childLanes|=d,p=b.alternate,p!==null&&(p.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-Yn(d),i=b.hiddenUpdates,p=i[v],p===null?i[v]=[l]:p.push(l),l.lane=d|536870912),b):null}function Fp(i){if(50<ff)throw ff=0,h1=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Iu={};function d$(i,l,d,p){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=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(i,l,d,p){return new d$(i,l,d,p)}function o0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Fo(i,l){var d=i.alternate;return d===null?(d=Xr(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 HI(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 zp(i,l,d,p,v,b){var x=0;if(p=i,typeof i=="function")o0(i)&&(x=1);else if(typeof i=="string")x=mq(i,d,J.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case F:return i=Xr(31,d,l,v),i.elementType=F,i.lanes=b,i;case E:return ol(d.children,v,b,l);case C:x=8,v|=24;break;case w:return i=Xr(12,d,l,v|2),i.elementType=w,i.lanes=b,i;case M:return i=Xr(13,d,l,v),i.elementType=M,i.lanes=b,i;case N:return i=Xr(19,d,l,v),i.elementType=N,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:x=10;break e;case A:x=9;break e;case R:x=11;break e;case I:x=14;break e;case k:x=16,p=null;break e}x=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=Xr(x,d,l,v),l.elementType=i,l.type=p,l.lanes=b,l}function ol(i,l,d,p){return i=Xr(7,i,p,l),i.lanes=d,i}function i0(i,l,d){return i=Xr(6,i,null,l),i.lanes=d,i}function $I(i){var l=Xr(18,null,null,0);return l.stateNode=i,l}function a0(i,l,d){return l=Xr(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var qI=new WeakMap;function ms(i,l){if(typeof i=="object"&&i!==null){var d=qI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Et(l)},qI.set(i,l),l)}return{value:i,source:l,stack:Et(l)}}var Ou=[],Nu=0,jp=null,qd=0,vs=[],ys=0,$i=null,lo=1,uo="";function zo(i,l){Ou[Nu++]=qd,Ou[Nu++]=jp,jp=i,qd=l}function WI(i,l,d){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=$i,$i=i;var p=lo;i=uo;var v=32-Yn(p)-1;p&=~(1<<v),d+=1;var b=32-Yn(l)+v;if(30<b){var x=v-v%5;b=(p&(1<<x)-1).toString(32),p>>=x,v-=x,lo=1<<32-Yn(l)+v|d<<v|p,uo=b+i}else lo=1<<b|d<<v|p,uo=i}function l0(i){i.return!==null&&(zo(i,1),WI(i,1,0))}function u0(i){for(;i===jp;)jp=Ou[--Nu],Ou[Nu]=null,qd=Ou[--Nu],Ou[Nu]=null;for(;i===$i;)$i=vs[--ys],vs[ys]=null,uo=vs[--ys],vs[ys]=null,lo=vs[--ys],vs[ys]=null}function VI(i,l){vs[ys++]=lo,vs[ys++]=uo,vs[ys++]=$i,lo=l.id,uo=l.overflow,$i=i}var Zn=null,Kt=null,dt=!1,qi=null,bs=!1,c0=Error(r(519));function Wi(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wd(ms(l,i)),c0}function GI(i){var l=i.stateNode,d=i.type,p=i.memoizedProps;switch(l[On]=i,l[nt]=p,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<pf.length;d++)at(pf[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),kd(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":at("invalid",l);break;case"textarea":at("invalid",l),U(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||cN(l.textContent,d)?(p.popover!=null&&(at("beforetoggle",l),at("toggle",l)),p.onScroll!=null&&at("scroll",l),p.onScrollEnd!=null&&at("scrollend",l),p.onClick!=null&&(l.onclick=nn),l=!0):l=!1,l||Wi(i,!0)}function KI(i){for(Zn=i.return;Zn;)switch(Zn.tag){case 5:case 31:case 13:bs=!1;return;case 27:case 3:bs=!0;return;default:Zn=Zn.return}}function Mu(i){if(i!==Zn)return!1;if(!dt)return KI(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")||R1(i.type,i.memoizedProps)),d=!d),d&&Kt&&Wi(i),KI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=bN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=bN(i)}else l===27?(l=Kt,oa(i.type)?(i=P1,P1=null,Kt=i):Kt=l):Kt=Zn?Es(i.stateNode.nextSibling):null;return!0}function il(){Kt=Zn=null,dt=!1}function d0(){var i=qi;return i!==null&&(Dr===null?Dr=i:Dr.push.apply(Dr,i),qi=null),i}function Wd(i){qi===null?qi=[i]:qi.push(i)}var f0=L(null),al=null,jo=null;function Vi(i,l,d){Y(f0,l._currentValue),l._currentValue=d}function Bo(i){i._currentValue=f0.current,K(f0)}function h0(i,l,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),i===d)break;i=i.return}}function p0(i,l,d,p){var v=i.child;for(v!==null&&(v.return=i);v!==null;){var b=v.dependencies;if(b!==null){var x=v.child;b=b.firstContext;e:for(;b!==null;){var P=b;b=v;for(var B=0;B<l.length;B++)if(P.context===l[B]){b.lanes|=d,P=b.alternate,P!==null&&(P.lanes|=d),h0(b.return,d,i),p||(x=null);break e}b=P.next}}else if(v.tag===18){if(x=v.return,x===null)throw Error(r(341));x.lanes|=d,b=x.alternate,b!==null&&(b.lanes|=d),h0(x,d,i),x=null}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===i){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}}function Pu(i,l,d,p){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 x=v.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var P=v.type;Zr(v.pendingProps.value,x.value)||(i!==null?i.push(P):i=[P])}}else if(v===ue.current){if(x=v.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(i!==null?i.push(bf):i=[bf])}v=v.return}i!==null&&p0(l,i,d,p),l.flags|=262144}function Bp(i){for(i=i.firstContext;i!==null;){if(!Zr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ll(i){al=i,jo=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Xn(i){return YI(al,i)}function Hp(i,l){return al===null&&ll(i),YI(i,l)}function YI(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},jo===null){if(i===null)throw Error(r(308));jo=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else jo=jo.next=l;return d}var f$=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,p){i.push(p)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},h$=t.unstable_scheduleCallback,p$=t.unstable_NormalPriority,En={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function g0(){return{controller:new f$,data:new Map,refCount:0}}function Vd(i){i.refCount--,i.refCount===0&&h$(p$,function(){i.controller.abort()})}var Gd=null,m0=0,ku=0,Du=null;function g$(i,l){if(Gd===null){var d=Gd=[];m0=0,ku=b1(),Du={status:"pending",value:void 0,then:function(p){d.push(p)}}}return m0++,l.then(ZI,ZI),l}function ZI(){if(--m0===0&&Gd!==null){Du!==null&&(Du.status="fulfilled");var i=Gd;Gd=null,ku=0,Du=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function m$(i,l){var d=[],p={status:"pending",value:null,reason:null,then:function(v){d.push(v)}};return i.then(function(){p.status="fulfilled",p.value=l;for(var v=0;v<d.length;v++)(0,d[v])(l)},function(v){for(p.status="rejected",p.reason=v,v=0;v<d.length;v++)(0,d[v])(void 0)}),p}var XI=$.S;$.S=function(i,l){kO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&g$(i,l),XI!==null&&XI(i,l)};var ul=L(null);function v0(){var i=ul.current;return i!==null?i:Wt.pooledCache}function $p(i,l){l===null?Y(ul,ul.current):Y(ul,l.pool)}function QI(){var i=v0();return i===null?null:{parent:En._currentValue,pool:i}}var Lu=Error(r(460)),y0=Error(r(474)),qp=Error(r(542)),Wp={then:function(){}};function JI(i){return i=i.status,i==="fulfilled"||i==="rejected"}function e2(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(nn,nn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,n2(i),i;default:if(typeof l.status=="string")l.then(nn,nn);else{if(i=Wt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(p){if(l.status==="pending"){var v=l;v.status="fulfilled",v.value=p}},function(p){if(l.status==="pending"){var v=l;v.status="rejected",v.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,n2(i),i}throw dl=l,Lu}}function cl(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(dl=d,Lu):d}}var dl=null;function t2(){if(dl===null)throw Error(r(459));var i=dl;return dl=null,i}function n2(i){if(i===Lu||i===qp)throw Error(r(483))}var Uu=null,Kd=0;function Vp(i){var l=Kd;return Kd+=1,Uu===null&&(Uu=[]),e2(Uu,i,l)}function Yd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Gp(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 r2(i){function l(G,W){if(i){var X=G.deletions;X===null?(G.deletions=[W],G.flags|=16):X.push(W)}}function d(G,W){if(!i)return null;for(;W!==null;)l(G,W),W=W.sibling;return null}function p(G){for(var W=new Map;G!==null;)G.key!==null?W.set(G.key,G):W.set(G.index,G),G=G.sibling;return W}function v(G,W){return G=Fo(G,W),G.index=0,G.sibling=null,G}function b(G,W,X){return G.index=X,i?(X=G.alternate,X!==null?(X=X.index,X<W?(G.flags|=67108866,W):X):(G.flags|=67108866,W)):(G.flags|=1048576,W)}function x(G){return i&&G.alternate===null&&(G.flags|=67108866),G}function P(G,W,X,ie){return W===null||W.tag!==6?(W=i0(X,G.mode,ie),W.return=G,W):(W=v(W,X),W.return=G,W)}function B(G,W,X,ie){var Pe=X.type;return Pe===E?se(G,W,X.props.children,ie,X.key):W!==null&&(W.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===k&&cl(Pe)===W.type)?(W=v(W,X.props),Yd(W,X),W.return=G,W):(W=zp(X.type,X.key,X.props,null,G.mode,ie),Yd(W,X),W.return=G,W)}function Q(G,W,X,ie){return W===null||W.tag!==4||W.stateNode.containerInfo!==X.containerInfo||W.stateNode.implementation!==X.implementation?(W=a0(X,G.mode,ie),W.return=G,W):(W=v(W,X.children||[]),W.return=G,W)}function se(G,W,X,ie,Pe){return W===null||W.tag!==7?(W=ol(X,G.mode,ie,Pe),W.return=G,W):(W=v(W,X),W.return=G,W)}function ae(G,W,X){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=i0(""+W,G.mode,X),W.return=G,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return X=zp(W.type,W.key,W.props,null,G.mode,X),Yd(X,W),X.return=G,X;case S:return W=a0(W,G.mode,X),W.return=G,W;case k:return W=cl(W),ae(G,W,X)}if(ee(W)||z(W))return W=ol(W,G.mode,X,null),W.return=G,W;if(typeof W.then=="function")return ae(G,Vp(W),X);if(W.$$typeof===T)return ae(G,Hp(G,W),X);Gp(G,W)}return null}function ne(G,W,X,ie){var Pe=W!==null?W.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Pe!==null?null:P(G,W,""+X,ie);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case y:return X.key===Pe?B(G,W,X,ie):null;case S:return X.key===Pe?Q(G,W,X,ie):null;case k:return X=cl(X),ne(G,W,X,ie)}if(ee(X)||z(X))return Pe!==null?null:se(G,W,X,ie,null);if(typeof X.then=="function")return ne(G,W,Vp(X),ie);if(X.$$typeof===T)return ne(G,W,Hp(G,X),ie);Gp(G,X)}return null}function re(G,W,X,ie,Pe){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(X)||null,P(W,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,B(W,G,ie,Pe);case S:return G=G.get(ie.key===null?X:ie.key)||null,Q(W,G,ie,Pe);case k:return ie=cl(ie),re(G,W,X,ie,Pe)}if(ee(ie)||z(ie))return G=G.get(X)||null,se(W,G,ie,Pe,null);if(typeof ie.then=="function")return re(G,W,X,Vp(ie),Pe);if(ie.$$typeof===T)return re(G,W,X,Hp(W,ie),Pe);Gp(W,ie)}return null}function Re(G,W,X,ie){for(var Pe=null,xt=null,Ne=W,Je=W=0,ct=null;Ne!==null&&Je<X.length;Je++){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var _t=ne(G,Ne,X[Je],ie);if(_t===null){Ne===null&&(Ne=ct);break}i&&Ne&&_t.alternate===null&&l(G,Ne),W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t,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&&(W=b(Ne,W,Je),xt===null?Pe=Ne:xt.sibling=Ne,xt=Ne);return dt&&zo(G,Je),Pe}for(Ne=p(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),W=b(ct,W,Je),xt===null?Pe=ct:xt.sibling=ct,xt=ct);return i&&Ne.forEach(function(ca){return l(G,ca)}),dt&&zo(G,Je),Pe}function De(G,W,X,ie){if(X==null)throw Error(r(151));for(var Pe=null,xt=null,Ne=W,Je=W=0,ct=null,_t=X.next();Ne!==null&&!_t.done;Je++,_t=X.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ca=ne(G,Ne,_t.value,ie);if(ca===null){Ne===null&&(Ne=ct);break}i&&Ne&&ca.alternate===null&&l(G,Ne),W=b(ca,W,Je),xt===null?Pe=ca:xt.sibling=ca,xt=ca,Ne=ct}if(_t.done)return d(G,Ne),dt&&zo(G,Je),Pe;if(Ne===null){for(;!_t.done;Je++,_t=X.next())_t=ae(G,_t.value,ie),_t!==null&&(W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return dt&&zo(G,Je),Pe}for(Ne=p(Ne);!_t.done;Je++,_t=X.next())_t=re(Ne,G,Je,_t.value,ie),_t!==null&&(i&&_t.alternate!==null&&Ne.delete(_t.key===null?Je:_t.key),W=b(_t,W,Je),xt===null?Pe=_t:xt.sibling=_t,xt=_t);return i&&Ne.forEach(function(Tq){return l(G,Tq)}),dt&&zo(G,Je),Pe}function jt(G,W,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;W!==null;){if(W.key===Pe){if(Pe=X.type,Pe===E){if(W.tag===7){d(G,W.sibling),ie=v(W,X.props.children),ie.return=G,G=ie;break e}}else if(W.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===k&&cl(Pe)===W.type){d(G,W.sibling),ie=v(W,X.props),Yd(ie,X),ie.return=G,G=ie;break e}d(G,W);break}else l(G,W);W=W.sibling}X.type===E?(ie=ol(X.props.children,G.mode,ie,X.key),ie.return=G,G=ie):(ie=zp(X.type,X.key,X.props,null,G.mode,ie),Yd(ie,X),ie.return=G,G=ie)}return x(G);case S:e:{for(Pe=X.key;W!==null;){if(W.key===Pe)if(W.tag===4&&W.stateNode.containerInfo===X.containerInfo&&W.stateNode.implementation===X.implementation){d(G,W.sibling),ie=v(W,X.children||[]),ie.return=G,G=ie;break e}else{d(G,W);break}else l(G,W);W=W.sibling}ie=a0(X,G.mode,ie),ie.return=G,G=ie}return x(G);case k:return X=cl(X),jt(G,W,X,ie)}if(ee(X))return Re(G,W,X,ie);if(z(X)){if(Pe=z(X),typeof Pe!="function")throw Error(r(150));return X=Pe.call(X),De(G,W,X,ie)}if(typeof X.then=="function")return jt(G,W,Vp(X),ie);if(X.$$typeof===T)return jt(G,W,Hp(G,X),ie);Gp(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,W!==null&&W.tag===6?(d(G,W.sibling),ie=v(W,X),ie.return=G,G=ie):(d(G,W),ie=i0(X,G.mode,ie),ie.return=G,G=ie),x(G)):d(G,W)}return function(G,W,X,ie){try{Kd=0;var Pe=jt(G,W,X,ie);return Uu=null,Pe}catch(Ne){if(Ne===Lu||Ne===qp)throw Ne;var xt=Xr(29,Ne,null,G.mode);return xt.lanes=ie,xt.return=G,xt}}}var fl=r2(!0),s2=r2(!1),Gi=!1;function b0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function S0(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 Ki(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Yi(i,l,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(It&2)!==0){var v=p.pending;return v===null?l.next=l:(l.next=v.next,v.next=l),p.pending=l,l=Fp(i),BI(i,null,d),l}return Up(i,p,l,d),Fp(i)}function Zd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,_d(i,d)}}function E0(i,l){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var x={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=x:b=b.next=x,d=d.next}while(d!==null);b===null?v=b=l:b=b.next=l}else v=b=l;d={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:p.shared,callbacks:p.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var C0=!1;function Xd(){if(C0){var i=Du;if(i!==null)throw i}}function Qd(i,l,d,p){C0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,x=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var B=P,Q=B.next;B.next=null,x===null?b=Q:x.next=Q,x=B;var se=i.alternate;se!==null&&(se=se.updateQueue,P=se.lastBaseUpdate,P!==x&&(P===null?se.firstBaseUpdate=Q:P.next=Q,se.lastBaseUpdate=B))}if(b!==null){var ae=v.baseState;x=0,se=Q=B=null,P=b;do{var ne=P.lane&-536870913,re=ne!==P.lane;if(re?(ut&ne)===ne:(p&ne)===ne){ne!==0&&ne===ku&&(C0=!0),se!==null&&(se=se.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Re=i,De=P;ne=l;var jt=d;switch(De.tag){case 1:if(Re=De.payload,typeof Re=="function"){ae=Re.call(jt,ae,ne);break e}ae=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=De.payload,ne=typeof Re=="function"?Re.call(jt,ae,ne):Re,ne==null)break e;ae=g({},ae,ne);break e;case 2:Gi=!0}}ne=P.callback,ne!==null&&(i.flags|=64,re&&(i.flags|=8192),re=v.callbacks,re===null?v.callbacks=[ne]:re.push(ne))}else re={lane:ne,tag:P.tag,payload:P.payload,callback:P.callback,next:null},se===null?(Q=se=re,B=ae):se=se.next=re,x|=ne;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;re=P,P=re.next,re.next=null,v.lastBaseUpdate=re,v.shared.pending=null}}while(!0);se===null&&(B=ae),v.baseState=B,v.firstBaseUpdate=Q,v.lastBaseUpdate=se,b===null&&(v.shared.lanes=0),ea|=x,i.lanes=x,i.memoizedState=ae}}function o2(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function i2(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)o2(d[i],l)}var Fu=L(null),Kp=L(0);function a2(i,l){i=Zo,Y(Kp,i),Y(Fu,l),Zo=i|l.baseLanes}function w0(){Y(Kp,Zo),Y(Fu,Fu.current)}function x0(){Zo=Kp.current,K(Fu),K(Kp)}var Qr=L(null),Ss=null;function Zi(i){var l=i.alternate;Y(bn,bn.current&1),Y(Qr,i),Ss===null&&(l===null||Fu.current!==null||l.memoizedState!==null)&&(Ss=i)}function _0(i){Y(bn,bn.current),Y(Qr,i),Ss===null&&(Ss=i)}function l2(i){i.tag===22?(Y(bn,bn.current),Y(Qr,i),Ss===null&&(Ss=i)):Xi()}function Xi(){Y(bn,bn.current),Y(Qr,Qr.current)}function Jr(i){K(Qr),Ss===i&&(Ss=null),K(bn)}var bn=L(0);function Yp(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||N1(d)||M1(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,Ft=null,Cn=null,Zp=!1,zu=!1,hl=!1,Xp=0,Jd=0,ju=null,v$=0;function hn(){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(!Zr(i[d],l[d]))return!1;return!0}function T0(i,l,d,p,v,b){return Ho=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,$.H=i===null||i.memoizedState===null?W2:H0,hl=!1,b=d(p,v),hl=!1,zu&&(b=c2(l,d,p,v)),u2(i),b}function u2(i){$.H=nf;var l=Ft!==null&&Ft.next!==null;if(Ho=0,Cn=Ft=Qe=null,Zp=!1,Jd=0,ju=null,l)throw Error(r(300));i===null||wn||(i=i.dependencies,i!==null&&Bp(i)&&(wn=!0))}function c2(i,l,d,p){Qe=i;var v=0;do{if(zu&&(ju=null),Jd=0,zu=!1,25<=v)throw Error(r(301));if(v+=1,Cn=Ft=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=V2,b=l(d,p)}while(zu);return b}function y$(){var i=$.H,l=i.useState()[0];return l=typeof l.then=="function"?ef(l):l,i=i.useState()[0],(Ft!==null?Ft.memoizedState:null)!==i&&(Qe.flags|=1024),l}function R0(){var i=Xp!==0;return Xp=0,i}function I0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function O0(i){if(Zp){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Zp=!1}Ho=0,Cn=Ft=Qe=null,zu=!1,Jd=Xp=0,ju=null}function br(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Cn===null?Qe.memoizedState=Cn=i:Cn=Cn.next=i,Cn}function Sn(){if(Ft===null){var i=Qe.alternate;i=i!==null?i.memoizedState:null}else i=Ft.next;var l=Cn===null?Qe.memoizedState:Cn.next;if(l!==null)Cn=l,Ft=i;else{if(i===null)throw Qe.alternate===null?Error(r(467)):Error(r(310));Ft=i,i={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},Cn===null?Qe.memoizedState=Cn=i:Cn=Cn.next=i}return Cn}function Qp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ef(i){var l=Jd;return Jd+=1,ju===null&&(ju=[]),i=e2(ju,i,l),l=Qe,(Cn===null?l.memoizedState:Cn.next)===null&&(l=l.alternate,$.H=l===null||l.memoizedState===null?W2:H0),i}function Jp(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ef(i);if(i.$$typeof===T)return Xn(i)}throw Error(r(438,String(i)))}function N0(i){var l=null,d=Qe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Qe.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(v){return v.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Qp(),Qe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),p=0;p<i;p++)d[p]=H;return l.index++,d}function $o(i,l){return typeof l=="function"?l(i):l}function eg(i){var l=Sn();return M0(l,Ft,i)}function M0(i,l,d){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var v=i.baseQueue,b=p.pending;if(b!==null){if(v!==null){var x=v.next;v.next=b.next,b.next=x}l.baseQueue=v=b,p.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var P=x=null,B=null,Q=l,se=!1;do{var ae=Q.lane&-536870913;if(ae!==Q.lane?(ut&ae)===ae:(Ho&ae)===ae){var ne=Q.revertLane;if(ne===0)B!==null&&(B=B.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ae===ku&&(se=!0);else if((Ho&ne)===ne){Q=Q.next,ne===ku&&(se=!0);continue}else ae={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(P=B=ae,x=b):B=B.next=ae,Qe.lanes|=ne,ea|=ne;ae=Q.action,hl&&d(b,ae),b=Q.hasEagerState?Q.eagerState:d(b,ae)}else ne={lane:ae,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},B===null?(P=B=ne,x=b):B=B.next=ne,Qe.lanes|=ae,ea|=ae;Q=Q.next}while(Q!==null&&Q!==l);if(B===null?x=b:B.next=P,!Zr(b,i.memoizedState)&&(wn=!0,se&&(d=Du,d!==null)))throw d;i.memoizedState=b,i.baseState=x,i.baseQueue=B,p.lastRenderedState=b}return v===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function P0(i){var l=Sn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,v=d.pending,b=l.memoizedState;if(v!==null){d.pending=null;var x=v=v.next;do b=i(b,x.action),x=x.next;while(x!==v);Zr(b,l.memoizedState)||(wn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,p]}function d2(i,l,d){var p=Qe,v=Sn(),b=dt;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var x=!Zr((Ft||v).memoizedState,d);if(x&&(v.memoizedState=d,wn=!0),v=v.queue,L0(p2.bind(null,p,v,i),[i]),v.getSnapshot!==l||x||Cn!==null&&Cn.memoizedState.tag&1){if(p.flags|=2048,Bu(9,{destroy:void 0},h2.bind(null,p,v,d,l),null),Wt===null)throw Error(r(349));b||(Ho&127)!==0||f2(p,l,d)}return d}function f2(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Qp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function h2(i,l,d,p){l.value=d,l.getSnapshot=p,g2(l)&&m2(i)}function p2(i,l,d){return d(function(){g2(l)&&m2(i)})}function g2(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function m2(i){var l=sl(i,2);l!==null&&Lr(l,i,2)}function k0(i){var l=br();if(typeof i=="function"){var d=i;if(i=d(),hl){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 v2(i,l,d,p){return i.baseState=d,M0(i,Ft,typeof p=="function"?p:$o)}function b$(i,l,d,p,v){if(rg(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(x){b.listeners.push(x)}};$.T!==null?d(!0):b.isTransition=!1,p(b),d=l.pending,d===null?(b.next=l.pending=b,y2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function y2(i,l){var d=l.action,p=l.payload,v=i.state;if(l.isTransition){var b=$.T,x={};$.T=x;try{var P=d(v,p),B=$.S;B!==null&&B(x,P),b2(i,l,P)}catch(Q){D0(i,l,Q)}finally{b!==null&&x.types!==null&&(b.types=x.types),$.T=b}}else try{b=d(v,p),b2(i,l,b)}catch(Q){D0(i,l,Q)}}function b2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){S2(i,l,p)},function(p){return D0(i,l,p)}):S2(i,l,d)}function S2(i,l,d){l.status="fulfilled",l.value=d,E2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,y2(i,d)))}function D0(i,l,d){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,E2(l),l=l.next;while(l!==p)}i.action=null}function E2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function C2(i,l){return l}function w2(i,l){if(dt){var d=Wt.formState;if(d!==null){e:{var p=Qe;if(dt){if(Kt){t:{for(var v=Kt,b=bs;v.nodeType!==8;){if(!b){v=null;break t}if(v=Es(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){Kt=Es(v.nextSibling),p=v.data==="F!";break e}}Wi(p)}p=!1}p&&(l=d[0])}}return d=br(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:C2,lastRenderedState:l},d.queue=p,d=H2.bind(null,Qe,p),p.dispatch=d,p=k0(!1),b=B0.bind(null,Qe,!1,p.queue),p=br(),v={state:l,dispatch:null,action:i,pending:null},p.queue=v,d=b$.bind(null,Qe,v,b,d),v.dispatch=d,p.memoizedState=i,[l,d,!1]}function x2(i){var l=Sn();return _2(l,Ft,i)}function _2(i,l,d){if(l=M0(i,l,C2)[0],i=eg($o)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ef(l)}catch(x){throw x===Lu?qp:x}else p=l;l=Sn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,Bu(9,{destroy:void 0},S$.bind(null,v,d),null)),[p,b,i]}function S$(i,l){i.action=l}function A2(i){var l=Sn(),d=Ft;if(d!==null)return _2(l,d,i);Sn(),l=l.memoizedState,d=Sn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function Bu(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Qp(),Qe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,l.lastEffect=i),i}function T2(){return Sn().memoizedState}function tg(i,l,d,p){var v=br();Qe.flags|=i,v.memoizedState=Bu(1|l,{destroy:void 0},d,p===void 0?null:p)}function ng(i,l,d,p){var v=Sn();p=p===void 0?null:p;var b=v.memoizedState.inst;Ft!==null&&p!==null&&A0(p,Ft.memoizedState.deps)?v.memoizedState=Bu(l,b,d,p):(Qe.flags|=i,v.memoizedState=Bu(1|l,b,d,p))}function R2(i,l){tg(8390656,8,i,l)}function L0(i,l){ng(2048,8,i,l)}function E$(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Qp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function I2(i){var l=Sn().memoizedState;return E$({ref:l,nextImpl:i}),function(){if((It&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function O2(i,l){return ng(4,2,i,l)}function N2(i,l){return ng(4,4,i,l)}function M2(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 P2(i,l,d){d=d!=null?d.concat([i]):null,ng(4,4,M2.bind(null,l,i),d)}function U0(){}function k2(i,l){var d=Sn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&A0(l,p[1])?p[0]:(d.memoizedState=[i,l],i)}function D2(i,l){var d=Sn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&A0(l,p[1]))return p[0];if(p=i(),hl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[p,l],p}function F0(i,l,d){return d===void 0||(Ho&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=LO(),Qe.lanes|=i,ea|=i,d)}function L2(i,l,d,p){return Zr(d,l)?d:Fu.current!==null?(i=F0(i,d,p),Zr(i,l)||(wn=!0),i):(Ho&42)===0||(Ho&1073741824)!==0&&(ut&261930)===0?(wn=!0,i.memoizedState=d):(i=LO(),Qe.lanes|=i,ea|=i,l)}function U2(i,l,d,p,v){var b=te.p;te.p=b!==0&&8>b?b:8;var x=$.T,P={};$.T=P,B0(i,!1,l,d);try{var B=v(),Q=$.S;if(Q!==null&&Q(P,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=m$(B,p);tf(i,l,se,ns(i))}else tf(i,l,p,ns(i))}catch(ae){tf(i,l,{then:function(){},status:"rejected",reason:ae},ns())}finally{te.p=b,x!==null&&P.types!==null&&(x.types=P.types),$.T=x}}function C$(){}function z0(i,l,d,p){if(i.tag!==5)throw Error(r(476));var v=F2(i).queue;U2(i,v,l,fe,d===null?C$:function(){return z2(i),d(p)})}function F2(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 z2(i){var l=F2(i);l.next===null&&(l=i.alternate.memoizedState),tf(i,l.next.queue,{},ns())}function j0(){return Xn(bf)}function j2(){return Sn().memoizedState}function B2(){return Sn().memoizedState}function w$(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=ns();i=Ki(d);var p=Yi(l,i,d);p!==null&&(Lr(p,l,d),Zd(p,l,d)),l={cache:g0()},i.payload=l;return}l=l.return}}function x$(i,l,d){var p=ns();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},rg(i)?$2(l,d):(d=s0(i,l,d,p),d!==null&&(Lr(d,i,p),q2(d,l,p)))}function H2(i,l,d){var p=ns();tf(i,l,d,p)}function tf(i,l,d,p){var v={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(rg(i))$2(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var x=l.lastRenderedState,P=b(x,d);if(v.hasEagerState=!0,v.eagerState=P,Zr(P,x))return Up(i,l,v,0),Wt===null&&Lp(),!1}catch{}if(d=s0(i,l,v,p),d!==null)return Lr(d,i,p),q2(d,l,p),!0}return!1}function B0(i,l,d,p){if(p={lane:2,revertLane:b1(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},rg(i)){if(l)throw Error(r(479))}else l=s0(i,d,p,2),l!==null&&Lr(l,i,2)}function rg(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function $2(i,l){zu=Zp=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function q2(i,l,d){if((d&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,_d(i,d)}}var nf={readContext:Xn,use:Jp,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useLayoutEffect:hn,useInsertionEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useSyncExternalStore:hn,useId:hn,useHostTransitionStatus:hn,useFormState:hn,useActionState:hn,useOptimistic:hn,useMemoCache:hn,useCacheRefresh:hn};nf.useEffectEvent=hn;var W2={readContext:Xn,use:Jp,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Xn,useEffect:R2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,tg(4194308,4,M2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return tg(4194308,4,i,l)},useInsertionEffect:function(i,l){tg(4,2,i,l)},useMemo:function(i,l){var d=br();l=l===void 0?null:l;var p=i();if(hl){Ps(!0);try{i()}finally{Ps(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=br();if(d!==void 0){var v=d(l);if(hl){Ps(!0);try{d(l)}finally{Ps(!1)}}}else v=l;return p.memoizedState=p.baseState=v,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:v},p.queue=i,i=i.dispatch=x$.bind(null,Qe,i),[p.memoizedState,i]},useRef:function(i){var l=br();return i={current:i},l.memoizedState=i},useState:function(i){i=k0(i);var l=i.queue,d=H2.bind(null,Qe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:U0,useDeferredValue:function(i,l){var d=br();return F0(d,i,l)},useTransition:function(){var i=k0(!1);return i=U2.bind(null,Qe,i.queue,!0,!1),br().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=Qe,v=br();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Wt===null)throw Error(r(349));(ut&127)!==0||f2(p,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,R2(p2.bind(null,p,b,i),[i]),p.flags|=2048,Bu(9,{destroy:void 0},h2.bind(null,p,b,d,l),null),d},useId:function(){var i=br(),l=Wt.identifierPrefix;if(dt){var d=uo,p=lo;d=(p&~(1<<32-Yn(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Xp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=v$++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:j0,useFormState:w2,useActionState:w2,useOptimistic:function(i){var l=br();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=B0.bind(null,Qe,!0,d),d.dispatch=l,[i,l]},useMemoCache:N0,useCacheRefresh:function(){return br().memoizedState=w$.bind(null,Qe)},useEffectEvent:function(i){var l=br(),d={impl:i};return l.memoizedState=d,function(){if((It&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},H0={readContext:Xn,use:Jp,useCallback:k2,useContext:Xn,useEffect:L0,useImperativeHandle:P2,useInsertionEffect:O2,useLayoutEffect:N2,useMemo:D2,useReducer:eg,useRef:T2,useState:function(){return eg($o)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return L2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=eg($o)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:d2,useId:j2,useHostTransitionStatus:j0,useFormState:x2,useActionState:x2,useOptimistic:function(i,l){var d=Sn();return v2(d,Ft,i,l)},useMemoCache:N0,useCacheRefresh:B2};H0.useEffectEvent=I2;var V2={readContext:Xn,use:Jp,useCallback:k2,useContext:Xn,useEffect:L0,useImperativeHandle:P2,useInsertionEffect:O2,useLayoutEffect:N2,useMemo:D2,useReducer:P0,useRef:T2,useState:function(){return P0($o)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return Ft===null?F0(d,i,l):L2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=P0($o)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:d2,useId:j2,useHostTransitionStatus:j0,useFormState:A2,useActionState:A2,useOptimistic:function(i,l){var d=Sn();return Ft!==null?v2(d,Ft,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:N0,useCacheRefresh:B2};V2.useEffectEvent=I2;function $0(i,l,d,p){l=i.memoizedState,d=d(p,l),d=d==null?l:g({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var q0={enqueueSetState:function(i,l,d){i=i._reactInternals;var p=ns(),v=Ki(p);v.payload=l,d!=null&&(v.callback=d),l=Yi(i,v,p),l!==null&&(Lr(l,i,p),Zd(l,i,p))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var p=ns(),v=Ki(p);v.tag=1,v.payload=l,d!=null&&(v.callback=d),l=Yi(i,v,p),l!==null&&(Lr(l,i,p),Zd(l,i,p))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=ns(),p=Ki(d);p.tag=2,l!=null&&(p.callback=l),l=Yi(i,p,d),l!==null&&(Lr(l,i,d),Zd(l,i,d))}};function G2(i,l,d,p,v,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,b,x):l.prototype&&l.prototype.isPureReactComponent?!Hd(d,p)||!Hd(v,b):!0}function K2(i,l,d,p){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==i&&q0.enqueueReplaceState(l,l.state,null)}function pl(i,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}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 Y2(i){Dp(i)}function Z2(i){console.error(i)}function X2(i){Dp(i)}function sg(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function Q2(i,l,d){try{var p=i.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function W0(i,l,d){return d=Ki(d),d.tag=3,d.payload={element:null},d.callback=function(){sg(i,l)},d}function J2(i){return i=Ki(i),i.tag=3,i}function eO(i,l,d,p){var v=d.type.getDerivedStateFromError;if(typeof v=="function"){var b=p.value;i.payload=function(){return v(b)},i.callback=function(){Q2(l,d,p)}}var x=d.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){Q2(l,d,p),typeof v!="function"&&(ta===null?ta=new Set([this]):ta.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function _$(i,l,d,p,v){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Pu(l,d,v,!0),d=Qr.current,d!==null){switch(d.tag){case 31:case 13:return Ss===null?mg():d.alternate===null&&pn===0&&(pn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,p===Wp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),m1(i,p,v)),!1;case 22:return d.flags|=65536,p===Wp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),m1(i,p,v)),!1}throw Error(r(435,d.tag))}return m1(i,p,v),mg(),!1}if(dt)return l=Qr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=v,p!==c0&&(i=Error(r(422),{cause:p}),Wd(ms(i,d)))):(p!==c0&&(l=Error(r(423),{cause:p}),Wd(ms(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,p=ms(p,d),v=W0(i.stateNode,p,v),E0(i,v),pn!==4&&(pn=2)),!1;var b=Error(r(520),{cause:p});if(b=ms(b,d),df===null?df=[b]:df.push(b),pn!==4&&(pn=2),l===null)return!0;p=ms(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=v&-v,d.lanes|=i,i=W0(d.stateNode,p,i),E0(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"&&(ta===null||!ta.has(b))))return d.flags|=65536,v&=-v,d.lanes|=v,v=J2(v),eO(v,i,d,p),E0(d,v),!1}d=d.return}while(d!==null);return!1}var V0=Error(r(461)),wn=!1;function Qn(i,l,d,p){l.child=i===null?s2(l,null,d,p):fl(l,i.child,d,p)}function tO(i,l,d,p,v){d=d.render;var b=l.ref;if("ref"in p){var x={};for(var P in p)P!=="ref"&&(x[P]=p[P])}else x=p;return ll(l),p=T0(i,l,d,x,b,v),P=R0(),i!==null&&!wn?(I0(i,l,v),qo(i,l,v)):(dt&&P&&l0(l),l.flags|=1,Qn(i,l,p,v),l.child)}function nO(i,l,d,p,v){if(i===null){var b=d.type;return typeof b=="function"&&!o0(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,rO(i,l,b,p,v)):(i=zp(d.type,null,p,l,l.mode,v),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!e1(i,v)){var x=b.memoizedProps;if(d=d.compare,d=d!==null?d:Hd,d(x,p)&&i.ref===l.ref)return qo(i,l,v)}return l.flags|=1,i=Fo(b,p),i.ref=l.ref,i.return=l,l.child=i}function rO(i,l,d,p,v){if(i!==null){var b=i.memoizedProps;if(Hd(b,p)&&i.ref===l.ref)if(wn=!1,l.pendingProps=p=b,e1(i,v))(i.flags&131072)!==0&&(wn=!0);else return l.lanes=i.lanes,qo(i,l,v)}return G0(i,l,d,p,v)}function sO(i,l,d,p){var v=p.children,b=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|d:d,i!==null){for(p=l.child=i.child,v=0;p!==null;)v=v|p.lanes|p.childLanes,p=p.sibling;p=v&~b}else p=0,l.child=null;return oO(i,l,b,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&$p(l,b!==null?b.cachePool:null),b!==null?a2(l,b):w0(),l2(l);else return p=l.lanes=536870912,oO(i,l,b!==null?b.baseLanes|d:d,d,p)}else b!==null?($p(l,b.cachePool),a2(l,b),Xi(),l.memoizedState=null):(i!==null&&$p(l,null),w0(),Xi());return Qn(i,l,v,d),l.child}function rf(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function oO(i,l,d,p,v){var b=v0();return b=b===null?null:{parent:En._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&$p(l,null),w0(),l2(l),i!==null&&Pu(i,l,p,!0),l.childLanes=v,null}function og(i,l){return l=ag({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function iO(i,l,d){return fl(l,i.child,null,d),i=og(l,l.pendingProps),i.flags|=2,Jr(l),l.memoizedState=null,i}function A$(i,l,d){var p=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(dt){if(p.mode==="hidden")return i=og(l,p),l.lanes=536870912,rf(null,i);if(_0(l),(i=Kt)?(i=yN(i,bs),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=$I(i),d.return=l,l.child=d,Zn=l,Kt=null)):i=null,i===null)throw Wi(l);return l.lanes=536870912,null}return og(l,p)}var b=i.memoizedState;if(b!==null){var x=b.dehydrated;if(_0(l),v)if(l.flags&256)l.flags&=-257,l=iO(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(wn||Pu(i,l,d,!1),v=(d&i.childLanes)!==0,wn||v){if(p=Wt,p!==null&&(x=bu(p,d),x!==0&&x!==b.retryLane))throw b.retryLane=x,sl(i,x),Lr(p,i,x),V0;mg(),l=iO(i,l,d)}else i=b.treeContext,Kt=Es(x.nextSibling),Zn=l,dt=!0,qi=null,bs=!1,i!==null&&VI(l,i),l=og(l,p),l.flags|=4096;return l}return i=Fo(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function ig(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 G0(i,l,d,p,v){return ll(l),d=T0(i,l,d,p,void 0,v),p=R0(),i!==null&&!wn?(I0(i,l,v),qo(i,l,v)):(dt&&p&&l0(l),l.flags|=1,Qn(i,l,d,v),l.child)}function aO(i,l,d,p,v,b){return ll(l),l.updateQueue=null,d=c2(l,p,d,v),u2(i),p=R0(),i!==null&&!wn?(I0(i,l,b),qo(i,l,b)):(dt&&p&&l0(l),l.flags|=1,Qn(i,l,d,b),l.child)}function lO(i,l,d,p,v){if(ll(l),l.stateNode===null){var b=Iu,x=d.contextType;typeof x=="object"&&x!==null&&(b=Xn(x)),b=new d(p,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=q0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=p,b.state=l.memoizedState,b.refs={},b0(l),x=d.contextType,b.context=typeof x=="object"&&x!==null?Xn(x):Iu,b.state=l.memoizedState,x=d.getDerivedStateFromProps,typeof x=="function"&&($0(l,d,x,p),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(x=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),x!==b.state&&q0.enqueueReplaceState(b,b.state,null),Qd(l,p,b,v),Xd(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(i===null){b=l.stateNode;var P=l.memoizedProps,B=pl(d,P);b.props=B;var Q=b.context,se=d.contextType;x=Iu,typeof se=="object"&&se!==null&&(x=Xn(se));var ae=d.getDerivedStateFromProps;se=typeof ae=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||Q!==x)&&K2(l,b,p,x),Gi=!1;var ne=l.memoizedState;b.state=ne,Qd(l,p,b,v),Xd(),Q=l.memoizedState,P||ne!==Q||Gi?(typeof ae=="function"&&($0(l,d,ae,p),Q=l.memoizedState),(B=Gi||G2(l,d,B,p,ne,Q,x))?(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=p,l.memoizedState=Q),b.props=p,b.state=Q,b.context=x,p=B):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{b=l.stateNode,S0(i,l),x=l.memoizedProps,se=pl(d,x),b.props=se,ae=l.pendingProps,ne=b.context,Q=d.contextType,B=Iu,typeof Q=="object"&&Q!==null&&(B=Xn(Q)),P=d.getDerivedStateFromProps,(Q=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(x!==ae||ne!==B)&&K2(l,b,p,B),Gi=!1,ne=l.memoizedState,b.state=ne,Qd(l,p,b,v),Xd();var re=l.memoizedState;x!==ae||ne!==re||Gi||i!==null&&i.dependencies!==null&&Bp(i.dependencies)?(typeof P=="function"&&($0(l,d,P,p),re=l.memoizedState),(se=Gi||G2(l,d,se,p,ne,re,B)||i!==null&&i.dependencies!==null&&Bp(i.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,re,B),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,re,B)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&ne===i.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=re),b.props=p,b.state=re,b.context=B,p=se):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&ne===i.memoizedState||(l.flags|=1024),p=!1)}return b=p,ig(i,l),p=(l.flags&128)!==0,b||p?(b=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&p?(l.child=fl(l,i.child,null,v),l.child=fl(l,null,d,v)):Qn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=qo(i,l,v),i}function uO(i,l,d,p){return il(),l.flags|=256,Qn(i,l,d,p),l.child}var K0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Y0(i){return{baseLanes:i,cachePool:QI()}}function Z0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function cO(i,l,d){var p=l.pendingProps,v=!1,b=(l.flags&128)!==0,x;if((x=b)||(x=i!==null&&i.memoizedState===null?!1:(bn.current&2)!==0),x&&(v=!0,l.flags&=-129),x=(l.flags&32)!==0,l.flags&=-33,i===null){if(dt){if(v?Zi(l):Xi(),(i=Kt)?(i=yN(i,bs),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:lo,overflow:uo}:null,retryLane:536870912,hydrationErrors:null},d=$I(i),d.return=l,l.child=d,Zn=l,Kt=null)):i=null,i===null)throw Wi(l);return M1(i)?l.lanes=32:l.lanes=536870912,null}var P=p.children;return p=p.fallback,v?(Xi(),v=l.mode,P=ag({mode:"hidden",children:P},v),p=ol(p,v,d,null),P.return=l,p.return=l,P.sibling=p,l.child=P,p=l.child,p.memoizedState=Y0(d),p.childLanes=Z0(i,x,d),l.memoizedState=K0,rf(null,p)):(Zi(l),X0(l,P))}var B=i.memoizedState;if(B!==null&&(P=B.dehydrated,P!==null)){if(b)l.flags&256?(Zi(l),l.flags&=-257,l=Q0(i,l,d)):l.memoizedState!==null?(Xi(),l.child=i.child,l.flags|=128,l=null):(Xi(),P=p.fallback,v=l.mode,p=ag({mode:"visible",children:p.children},v),P=ol(P,v,d,null),P.flags|=2,p.return=l,P.return=l,p.sibling=P,l.child=p,fl(l,i.child,null,d),p=l.child,p.memoizedState=Y0(d),p.childLanes=Z0(i,x,d),l.memoizedState=K0,l=rf(null,p));else if(Zi(l),M1(P)){if(x=P.nextSibling&&P.nextSibling.dataset,x)var Q=x.dgst;x=Q,p=Error(r(419)),p.stack="",p.digest=x,Wd({value:p,source:null,stack:null}),l=Q0(i,l,d)}else if(wn||Pu(i,l,d,!1),x=(d&i.childLanes)!==0,wn||x){if(x=Wt,x!==null&&(p=bu(x,d),p!==0&&p!==B.retryLane))throw B.retryLane=p,sl(i,p),Lr(x,i,p),V0;N1(P)||mg(),l=Q0(i,l,d)}else N1(P)?(l.flags|=192,l.child=i.child,l=null):(i=B.treeContext,Kt=Es(P.nextSibling),Zn=l,dt=!0,qi=null,bs=!1,i!==null&&VI(l,i),l=X0(l,p.children),l.flags|=4096);return l}return v?(Xi(),P=p.fallback,v=l.mode,B=i.child,Q=B.sibling,p=Fo(B,{mode:"hidden",children:p.children}),p.subtreeFlags=B.subtreeFlags&65011712,Q!==null?P=Fo(Q,P):(P=ol(P,v,d,null),P.flags|=2),P.return=l,p.return=l,p.sibling=P,l.child=p,rf(null,p),p=l.child,P=i.child.memoizedState,P===null?P=Y0(d):(v=P.cachePool,v!==null?(B=En._currentValue,v=v.parent!==B?{parent:B,pool:B}:v):v=QI(),P={baseLanes:P.baseLanes|d,cachePool:v}),p.memoizedState=P,p.childLanes=Z0(i,x,d),l.memoizedState=K0,rf(i.child,p)):(Zi(l),d=i.child,i=d.sibling,d=Fo(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(x=l.deletions,x===null?(l.deletions=[i],l.flags|=16):x.push(i)),l.child=d,l.memoizedState=null,d)}function X0(i,l){return l=ag({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function ag(i,l){return i=Xr(22,i,null,l),i.lanes=0,i}function Q0(i,l,d){return fl(l,i.child,null,d),i=X0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function dO(i,l,d){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l),h0(i.return,l,d)}function J0(i,l,d,p,v,b){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:v,treeForkCount:b}:(x.isBackwards=l,x.rendering=null,x.renderingStartTime=0,x.last=p,x.tail=d,x.tailMode=v,x.treeForkCount=b)}function fO(i,l,d){var p=l.pendingProps,v=p.revealOrder,b=p.tail;p=p.children;var x=bn.current,P=(x&2)!==0;if(P?(x=x&1|2,l.flags|=128):x&=1,Y(bn,x),Qn(i,l,p,d),p=dt?qd:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&dO(i,d,l);else if(i.tag===19)dO(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&&Yp(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),J0(l,!1,v,d,b,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,v=l.child,l.child=null;v!==null;){if(i=v.alternate,i!==null&&Yp(i)===null){l.child=v;break}i=v.sibling,v.sibling=d,d=v,v=i}J0(l,!0,d,null,b,p);break;case"together":J0(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function qo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),ea|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Pu(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 e1(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&Bp(i)))}function T$(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Vi(l,En,i.memoizedState.cache),il();break;case 27:case 5:Xe(l);break;case 4:ve(l,l.stateNode.containerInfo);break;case 10:Vi(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,_0(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(Zi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?cO(i,l,d):(Zi(l),i=qo(i,l,d),i!==null?i.sibling:null);Zi(l);break;case 19:var v=(i.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Pu(i,l,d,!1),p=(d&l.childLanes)!==0),v){if(p)return fO(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Y(bn,bn.current),p)break;return null;case 22:return l.lanes=0,sO(i,l,d,l.pendingProps);case 24:Vi(l,En,i.memoizedState.cache)}return qo(i,l,d)}function hO(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)wn=!0;else{if(!e1(i,d)&&(l.flags&128)===0)return wn=!1,T$(i,l,d);wn=(i.flags&131072)!==0}else wn=!1,dt&&(l.flags&1048576)!==0&&WI(l,qd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=cl(l.elementType),l.type=i,typeof i=="function")o0(i)?(p=pl(i,p),l.tag=1,l=lO(null,l,i,p,d)):(l.tag=0,l=G0(null,l,i,p,d));else{if(i!=null){var v=i.$$typeof;if(v===R){l.tag=11,l=tO(null,l,i,p,d);break e}else if(v===I){l.tag=14,l=nO(null,l,i,p,d);break e}}throw l=V(i)||i,Error(r(306,l,""))}}return l;case 0:return G0(i,l,l.type,l.pendingProps,d);case 1:return p=l.type,v=pl(p,l.pendingProps),lO(i,l,p,v,d);case 3:e:{if(ve(l,l.stateNode.containerInfo),i===null)throw Error(r(387));p=l.pendingProps;var b=l.memoizedState;v=b.element,S0(i,l),Qd(l,p,null,d);var x=l.memoizedState;if(p=x.cache,Vi(l,En,p),p!==b.cache&&p0(l,[En],d,!0),Xd(),p=x.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:x.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=uO(i,l,p,d);break e}else if(p!==v){v=ms(Error(r(424)),l),Wd(v),l=uO(i,l,p,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Kt=Es(i.firstChild),Zn=l,dt=!0,qi=null,bs=!0,d=s2(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(il(),p===v){l=qo(i,l,d);break e}Qn(i,l,p,d)}l=l.child}return l;case 26:return ig(i,l),i===null?(d=xN(l.type,null,l.pendingProps,null))?l.memoizedState=d:dt||(d=l.type,i=l.pendingProps,p=wg(he.current).createElement(d),p[On]=l,p[nt]=i,Jn(p,d,i),ln(p),l.stateNode=p):l.memoizedState=xN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&dt&&(p=l.stateNode=EN(l.type,l.pendingProps,he.current),Zn=l,bs=!0,v=Kt,oa(l.type)?(P1=v,Kt=Es(p.firstChild)):Kt=v),Qn(i,l,l.pendingProps.children,d),ig(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&dt&&((v=p=Kt)&&(p=rq(p,l.type,l.pendingProps,bs),p!==null?(l.stateNode=p,Zn=l,Kt=Es(p.firstChild),bs=!1,v=!0):v=!1),v||Wi(l)),Xe(l),v=l.type,b=l.pendingProps,x=i!==null?i.memoizedProps:null,p=b.children,R1(v,b)?p=null:x!==null&&R1(v,x)&&(l.flags|=32),l.memoizedState!==null&&(v=T0(i,l,y$,null,null,d),bf._currentValue=v),ig(i,l),Qn(i,l,p,d),l.child;case 6:return i===null&&dt&&((i=d=Kt)&&(d=sq(d,l.pendingProps,bs),d!==null?(l.stateNode=d,Zn=l,Kt=null,i=!0):i=!1),i||Wi(l)),null;case 13:return cO(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=fl(l,null,p,d):Qn(i,l,p,d),l.child;case 11:return tO(i,l,l.type,l.pendingProps,d);case 7:return Qn(i,l,l.pendingProps,d),l.child;case 8:return Qn(i,l,l.pendingProps.children,d),l.child;case 12:return Qn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Vi(l,l.type,p.value),Qn(i,l,p.children,d),l.child;case 9:return v=l.type._context,p=l.pendingProps.children,ll(l),v=Xn(v),p=p(v),l.flags|=1,Qn(i,l,p,d),l.child;case 14:return nO(i,l,l.type,l.pendingProps,d);case 15:return rO(i,l,l.type,l.pendingProps,d);case 19:return fO(i,l,d);case 31:return A$(i,l,d);case 22:return sO(i,l,d,l.pendingProps);case 24:return ll(l),p=Xn(En),i===null?(v=v0(),v===null&&(v=Wt,b=g0(),v.pooledCache=b,b.refCount++,b!==null&&(v.pooledCacheLanes|=d),v=b),l.memoizedState={parent:p,cache:v},b0(l),Vi(l,En,v)):((i.lanes&d)!==0&&(S0(i,l),Qd(l,null,null,d),Xd()),v=i.memoizedState,b=l.memoizedState,v.parent!==p?(v={parent:p,cache:p},l.memoizedState=v,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=v),Vi(l,En,p)):(p=b.cache,Vi(l,En,p),p!==v.cache&&p0(l,[En],d,!0))),Qn(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 t1(i,l,d,p,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(jO())i.flags|=8192;else throw dl=Wp,y0}else i.flags&=-16777217}function pO(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!IN(l))if(jO())i.flags|=8192;else throw dl=Wp,y0}function lg(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Kr():536870912,i.lanes|=l,Wu|=l)}function sf(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 p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Yt(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(l)for(var v=i.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags&65011712,p|=v.flags&65011712,v.return=i,v=v.sibling;else for(v=i.child;v!==null;)d|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=i,v=v.sibling;return i.subtreeFlags|=p,i.childLanes=d,l}function R$(i,l,d){var p=l.pendingProps;switch(u0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yt(l),null;case 1:return Yt(l),null;case 3:return d=l.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),Bo(En),xe(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Mu(l)?Wo(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,d0())),Yt(l),null;case 26:var v=l.type,b=l.memoizedState;return i===null?(Wo(l),b!==null?(Yt(l),pO(l,b)):(Yt(l),t1(l,v,null,p,d))):b?b!==i.memoizedState?(Wo(l),Yt(l),pO(l,b)):(Yt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&Wo(l),Yt(l),t1(l,v,i,p,d)),null;case 27:if(Ee(l),d=he.current,v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&Wo(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}i=J.current,Mu(l)?GI(l):(i=EN(v,p,d),l.stateNode=i,Wo(l))}return Yt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&Wo(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}if(b=J.current,Mu(l))GI(l);else{var x=wg(he.current);switch(b){case 1:b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=x.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=x.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=x.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?x.createElement("select",{is:p.is}):x.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?x.createElement(v,{is:p.is}):x.createElement(v)}}b[On]=l,b[nt]=p;e:for(x=l.child;x!==null;){if(x.tag===5||x.tag===6)b.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===l)break e;for(;x.sibling===null;){if(x.return===null||x.return===l)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}l.stateNode=b;e:switch(Jn(b,v,p),v){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Wo(l)}}return Yt(l),t1(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&Wo(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,Mu(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,v=Zn,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}i[On]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||cN(i.nodeValue,d)),i||Wi(l,!0)}else i=wg(i).createTextNode(p),i[On]=l,l.stateNode=i}return Yt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(p=Mu(l),d!==null){if(i===null){if(!p)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[On]=l}else il(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yt(l),i=!1}else d=d0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Jr(l),l):(Jr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Yt(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(v=Mu(l),p!==null&&p.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[On]=l}else il(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Yt(l),v=!1}else v=d0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=v),v=!0;if(!v)return l.flags&256?(Jr(l),l):(Jr(l),null)}return Jr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,i=i!==null&&i.memoizedState!==null,d&&(p=l.child,v=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(v=p.alternate.memoizedState.cachePool.pool),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==v&&(p.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),lg(l,l.updateQueue),Yt(l),null);case 4:return xe(),i===null&&w1(l.stateNode.containerInfo),Yt(l),null;case 10:return Bo(l.type),Yt(l),null;case 19:if(K(bn),p=l.memoizedState,p===null)return Yt(l),null;if(v=(l.flags&128)!==0,b=p.rendering,b===null)if(v)sf(p,!1);else{if(pn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=Yp(i),b!==null){for(l.flags|=128,sf(p,!1),i=b.updateQueue,l.updateQueue=i,lg(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)HI(d,i),d=d.sibling;return Y(bn,bn.current&1|2),dt&&zo(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Gt()>hg&&(l.flags|=128,v=!0,sf(p,!1),l.lanes=4194304)}else{if(!v)if(i=Yp(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,lg(l,i),sf(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!dt)return Yt(l),null}else 2*Gt()-p.renderingStartTime>hg&&d!==536870912&&(l.flags|=128,v=!0,sf(p,!1),l.lanes=4194304);p.isBackwards?(b.sibling=l.child,l.child=b):(i=p.last,i!==null?i.sibling=b:l.child=b,p.last=b)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Gt(),i.sibling=null,d=bn.current,Y(bn,v?d&1|2:d&1),dt&&zo(l,p.treeForkCount),i):(Yt(l),null);case 22:case 23:return Jr(l),x0(),p=l.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(Yt(l),l.subtreeFlags&6&&(l.flags|=8192)):Yt(l),d=l.updateQueue,d!==null&&lg(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),i!==null&&K(ul),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Bo(En),Yt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function I$(i,l){switch(u0(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return Bo(En),xe(),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(Jr(l),l.alternate===null)throw Error(r(340));il()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Jr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));il()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return K(bn),null;case 4:return xe(),null;case 10:return Bo(l.type),null;case 22:case 23:return Jr(l),x0(),i!==null&&K(ul),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return Bo(En),null;case 25:return null;default:return null}}function gO(i,l){switch(u0(l),l.tag){case 3:Bo(En),xe();break;case 26:case 27:case 5:Ee(l);break;case 4:xe();break;case 31:l.memoizedState!==null&&Jr(l);break;case 13:Jr(l);break;case 19:K(bn);break;case 10:Bo(l.type);break;case 22:case 23:Jr(l),x0(),i!==null&&K(ul);break;case 24:Bo(En)}}function of(i,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var v=p.next;d=v;do{if((d.tag&i)===i){p=void 0;var b=d.create,x=d.inst;p=b(),x.destroy=p}d=d.next}while(d!==v)}}catch(P){kt(l,l.return,P)}}function Qi(i,l,d){try{var p=l.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var b=v.next;p=b;do{if((p.tag&i)===i){var x=p.inst,P=x.destroy;if(P!==void 0){x.destroy=void 0,v=l;var B=d,Q=P;try{Q()}catch(se){kt(v,B,se)}}}p=p.next}while(p!==b)}}catch(se){kt(l,l.return,se)}}function mO(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{i2(l,d)}catch(p){kt(i,i.return,p)}}}function vO(i,l,d){d.props=pl(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(p){kt(i,l,p)}}function af(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof d=="function"?i.refCleanup=d(p):d.current=p}}catch(v){kt(i,l,v)}}function co(i,l){var d=i.ref,p=i.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(v){kt(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){kt(i,l,v)}else d.current=null}function yO(i){var l=i.type,d=i.memoizedProps,p=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(v){kt(i,i.return,v)}}function n1(i,l,d){try{var p=i.stateNode;X$(p,i.type,d,l),p[nt]=l}catch(v){kt(i,i.return,v)}}function bO(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&oa(i.type)||i.tag===4}function r1(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||bO(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&&oa(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 s1(i,l,d){var p=i.tag;if(p===5||p===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=nn));else if(p!==4&&(p===27&&oa(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(s1(i,l,d),i=i.sibling;i!==null;)s1(i,l,d),i=i.sibling}function ug(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(p!==4&&(p===27&&oa(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(ug(i,l,d),i=i.sibling;i!==null;)ug(i,l,d),i=i.sibling}function SO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);Jn(l,p,d),l[On]=i,l[nt]=d}catch(b){kt(i,i.return,b)}}var Vo=!1,xn=!1,o1=!1,EO=typeof WeakSet=="function"?WeakSet:Set,Fn=null;function O$(i,l){if(i=i.containerInfo,A1=Og,i=PI(i),Qb(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var v=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var x=0,P=-1,B=-1,Q=0,se=0,ae=i,ne=null;t:for(;;){for(var re;ae!==d||v!==0&&ae.nodeType!==3||(P=x+v),ae!==b||p!==0&&ae.nodeType!==3||(B=x+p),ae.nodeType===3&&(x+=ae.nodeValue.length),(re=ae.firstChild)!==null;)ne=ae,ae=re;for(;;){if(ae===i)break t;if(ne===d&&++Q===v&&(P=x),ne===b&&++se===p&&(B=x),(re=ae.nextSibling)!==null)break;ae=ne,ne=ae.parentNode}ae=re}d=P===-1||B===-1?null:{start:P,end:B}}else d=null}d=d||{start:0,end:0}}else d=null;for(T1={focusedElem:i,selectionRange:d},Og=!1,Fn=l;Fn!==null;)if(l=Fn,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Fn=i;else for(;Fn!==null;){switch(l=Fn,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,p=d.stateNode;try{var Re=pl(d.type,v);i=p.getSnapshotBeforeUpdate(Re,b),p.__reactInternalSnapshotBeforeUpdate=i}catch(De){kt(d,d.return,De)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)O1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":O1(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,Fn=i;break}Fn=l.return}}function CO(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:Ko(i,d),p&4&&of(5,d);break;case 1:if(Ko(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(x){kt(d,d.return,x)}else{var v=pl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(x){kt(d,d.return,x)}}p&64&&mO(d),p&512&&af(d,d.return);break;case 3:if(Ko(i,d),p&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{i2(i,l)}catch(x){kt(d,d.return,x)}}break;case 27:l===null&&p&4&&SO(d);case 26:case 5:Ko(i,d),l===null&&p&4&&yO(d),p&512&&af(d,d.return);break;case 12:Ko(i,d);break;case 31:Ko(i,d),p&4&&_O(i,d);break;case 13:Ko(i,d),p&4&&AO(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=z$.bind(null,d),oq(i,d))));break;case 22:if(p=d.memoizedState!==null||Vo,!p){l=l!==null&&l.memoizedState!==null||xn,v=Vo;var b=xn;Vo=p,(xn=l)&&!b?Yo(i,d,(d.subtreeFlags&8772)!==0):Ko(i,d),Vo=v,xn=b}break;case 30:break;default:Ko(i,d)}}function wO(i){var l=i.alternate;l!==null&&(i.alternate=null,wO(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&Id(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 rn=null,Mr=!1;function Go(i,l,d){for(d=d.child;d!==null;)xO(i,l,d),d=d.sibling}function xO(i,l,d){if(lr&&typeof lr.onCommitFiberUnmount=="function")try{lr.onCommitFiberUnmount(Pi,d)}catch{}switch(d.tag){case 26:xn||co(d,l),Go(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:xn||co(d,l);var p=rn,v=Mr;oa(d.type)&&(rn=d.stateNode,Mr=!1),Go(i,l,d),mf(d.stateNode),rn=p,Mr=v;break;case 5:xn||co(d,l);case 6:if(p=rn,v=Mr,rn=null,Go(i,l,d),rn=p,Mr=v,rn!==null)if(Mr)try{(rn.nodeType===9?rn.body:rn.nodeName==="HTML"?rn.ownerDocument.body:rn).removeChild(d.stateNode)}catch(b){kt(d,l,b)}else try{rn.removeChild(d.stateNode)}catch(b){kt(d,l,b)}break;case 18:rn!==null&&(Mr?(i=rn,mN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),Ju(i)):mN(rn,d.stateNode));break;case 4:p=rn,v=Mr,rn=d.stateNode.containerInfo,Mr=!0,Go(i,l,d),rn=p,Mr=v;break;case 0:case 11:case 14:case 15:Qi(2,d,l),xn||Qi(4,d,l),Go(i,l,d);break;case 1:xn||(co(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&vO(d,l,p)),Go(i,l,d);break;case 21:Go(i,l,d);break;case 22:xn=(p=xn)||d.memoizedState!==null,Go(i,l,d),xn=p;break;default:Go(i,l,d)}}function _O(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ju(i)}catch(d){kt(l,l.return,d)}}}function AO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ju(i)}catch(d){kt(l,l.return,d)}}function N$(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new EO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new EO),l;default:throw Error(r(435,i.tag))}}function cg(i,l){var d=N$(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var v=j$.bind(null,i,p);p.then(v,v)}})}function Pr(i,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var v=d[p],b=i,x=l,P=x;e:for(;P!==null;){switch(P.tag){case 27:if(oa(P.type)){rn=P.stateNode,Mr=!1;break e}break;case 5:rn=P.stateNode,Mr=!1;break e;case 3:case 4:rn=P.stateNode.containerInfo,Mr=!0;break e}P=P.return}if(rn===null)throw Error(r(160));xO(b,x,v),rn=null,Mr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)TO(l,i),l=l.sibling}var Fs=null;function TO(i,l){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Pr(l,i),kr(i),p&4&&(Qi(3,i,i.return),of(3,i),Qi(5,i,i.return));break;case 1:Pr(l,i),kr(i),p&512&&(xn||d===null||co(d,d.return)),p&64&&Vo&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var v=Fs;if(Pr(l,i),kr(i),p&512&&(xn||d===null||co(d,d.return)),p&4){var b=d!==null?d.memoizedState:null;if(p=i.memoizedState,d===null)if(p===null)if(i.stateNode===null){e:{p=i.type,d=i.memoizedProps,v=v.ownerDocument||v;t:switch(p){case"title":b=v.getElementsByTagName("title")[0],(!b||b[Ui]||b[On]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=v.createElement(p),v.head.insertBefore(b,v.querySelector("head > title"))),Jn(b,p,d),b[On]=i,ln(b),p=b;break e;case"link":var x=TN("link","href",v).get(p+(d.href||""));if(x){for(var P=0;P<x.length;P++)if(b=x[P],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)){x.splice(P,1);break t}}b=v.createElement(p),Jn(b,p,d),v.head.appendChild(b);break;case"meta":if(x=TN("meta","content",v).get(p+(d.content||""))){for(P=0;P<x.length;P++)if(b=x[P],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)){x.splice(P,1);break t}}b=v.createElement(p),Jn(b,p,d),v.head.appendChild(b);break;default:throw Error(r(468,p))}b[On]=i,ln(b),p=b}i.stateNode=p}else RN(v,i.type,i.stateNode);else i.stateNode=AN(v,p,i.memoizedProps);else b!==p?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,p===null?RN(v,i.type,i.stateNode):AN(v,p,i.memoizedProps)):p===null&&i.stateNode!==null&&n1(i,i.memoizedProps,d.memoizedProps)}break;case 27:Pr(l,i),kr(i),p&512&&(xn||d===null||co(d,d.return)),d!==null&&p&4&&n1(i,i.memoizedProps,d.memoizedProps);break;case 5:if(Pr(l,i),kr(i),p&512&&(xn||d===null||co(d,d.return)),i.flags&32){v=i.stateNode;try{Z(v,"")}catch(Re){kt(i,i.return,Re)}}p&4&&i.stateNode!=null&&(v=i.memoizedProps,n1(i,v,d!==null?d.memoizedProps:v)),p&1024&&(o1=!0);break;case 6:if(Pr(l,i),kr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,d=i.stateNode;try{d.nodeValue=p}catch(Re){kt(i,i.return,Re)}}break;case 3:if(Ag=null,v=Fs,Fs=xg(l.containerInfo),Pr(l,i),Fs=v,kr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{Ju(l.containerInfo)}catch(Re){kt(i,i.return,Re)}o1&&(o1=!1,RO(i));break;case 4:p=Fs,Fs=xg(i.stateNode.containerInfo),Pr(l,i),kr(i),Fs=p;break;case 12:Pr(l,i),kr(i);break;case 31:Pr(l,i),kr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 13:Pr(l,i),kr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(fg=Gt()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 22:v=i.memoizedState!==null;var B=d!==null&&d.memoizedState!==null,Q=Vo,se=xn;if(Vo=Q||v,xn=se||B,Pr(l,i),xn=se,Vo=Q,kr(i),p&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||B||Vo||xn||gl(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){B=d=l;try{if(b=B.stateNode,v)x=b.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{P=B.stateNode;var ae=B.memoizedProps.style,ne=ae!=null&&ae.hasOwnProperty("display")?ae.display:null;P.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(Re){kt(B,B.return,Re)}}}else if(l.tag===6){if(d===null){B=l;try{B.stateNode.nodeValue=v?"":B.memoizedProps}catch(Re){kt(B,B.return,Re)}}}else if(l.tag===18){if(d===null){B=l;try{var re=B.stateNode;v?vN(re,!0):vN(B.stateNode,!1)}catch(Re){kt(B,B.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}p&4&&(p=i.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,cg(i,d))));break;case 19:Pr(l,i),kr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,cg(i,p)));break;case 30:break;case 21:break;default:Pr(l,i),kr(i)}}function kr(i){var l=i.flags;if(l&2){try{for(var d,p=i.return;p!==null;){if(bO(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var v=d.stateNode,b=r1(i);ug(i,b,v);break;case 5:var x=d.stateNode;d.flags&32&&(Z(x,""),d.flags&=-33);var P=r1(i);ug(i,P,x);break;case 3:case 4:var B=d.stateNode.containerInfo,Q=r1(i);s1(i,Q,B);break;default:throw Error(r(161))}}catch(se){kt(i,i.return,se)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function RO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;RO(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;)CO(i,l.alternate,l),l=l.sibling}function gl(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:Qi(4,l,l.return),gl(l);break;case 1:co(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&vO(l,l.return,d),gl(l);break;case 27:mf(l.stateNode);case 26:case 5:co(l,l.return),gl(l);break;case 22:l.memoizedState===null&&gl(l);break;case 30:gl(l);break;default:gl(l)}i=i.sibling}}function Yo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,v=i,b=l,x=b.flags;switch(b.tag){case 0:case 11:case 15:Yo(v,b,d),of(4,b);break;case 1:if(Yo(v,b,d),p=b,v=p.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(Q){kt(p,p.return,Q)}if(p=b,v=p.updateQueue,v!==null){var P=p.stateNode;try{var B=v.shared.hiddenCallbacks;if(B!==null)for(v.shared.hiddenCallbacks=null,v=0;v<B.length;v++)o2(B[v],P)}catch(Q){kt(p,p.return,Q)}}d&&x&64&&mO(b),af(b,b.return);break;case 27:SO(b);case 26:case 5:Yo(v,b,d),d&&p===null&&x&4&&yO(b),af(b,b.return);break;case 12:Yo(v,b,d);break;case 31:Yo(v,b,d),d&&x&4&&_O(v,b);break;case 13:Yo(v,b,d),d&&x&4&&AO(v,b);break;case 22:b.memoizedState===null&&Yo(v,b,d),af(b,b.return);break;case 30:break;default:Yo(v,b,d)}l=l.sibling}}function i1(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&&Vd(d))}function a1(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Vd(i))}function zs(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)IO(i,l,d,p),l=l.sibling}function IO(i,l,d,p){var v=l.flags;switch(l.tag){case 0:case 11:case 15:zs(i,l,d,p),v&2048&&of(9,l);break;case 1:zs(i,l,d,p);break;case 3:zs(i,l,d,p),v&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&Vd(i)));break;case 12:if(v&2048){zs(i,l,d,p),i=l.stateNode;try{var b=l.memoizedProps,x=b.id,P=b.onPostCommit;typeof P=="function"&&P(x,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(B){kt(l,l.return,B)}}else zs(i,l,d,p);break;case 31:zs(i,l,d,p);break;case 13:zs(i,l,d,p);break;case 23:break;case 22:b=l.stateNode,x=l.alternate,l.memoizedState!==null?b._visibility&2?zs(i,l,d,p):lf(i,l):b._visibility&2?zs(i,l,d,p):(b._visibility|=2,Hu(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),v&2048&&i1(x,l);break;case 24:zs(i,l,d,p),v&2048&&a1(l.alternate,l);break;default:zs(i,l,d,p)}}function Hu(i,l,d,p,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,x=l,P=d,B=p,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Hu(b,x,P,B,v),of(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Hu(b,x,P,B,v):lf(b,x):(se._visibility|=2,Hu(b,x,P,B,v)),v&&Q&2048&&i1(x.alternate,x);break;case 24:Hu(b,x,P,B,v),v&&Q&2048&&a1(x.alternate,x);break;default:Hu(b,x,P,B,v)}l=l.sibling}}function lf(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,p=l,v=p.flags;switch(p.tag){case 22:lf(d,p),v&2048&&i1(p.alternate,p);break;case 24:lf(d,p),v&2048&&a1(p.alternate,p);break;default:lf(d,p)}l=l.sibling}}var uf=8192;function $u(i,l,d){if(i.subtreeFlags&uf)for(i=i.child;i!==null;)OO(i,l,d),i=i.sibling}function OO(i,l,d){switch(i.tag){case 26:$u(i,l,d),i.flags&uf&&i.memoizedState!==null&&vq(d,Fs,i.memoizedState,i.memoizedProps);break;case 5:$u(i,l,d);break;case 3:case 4:var p=Fs;Fs=xg(i.stateNode.containerInfo),$u(i,l,d),Fs=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=uf,uf=16777216,$u(i,l,d),uf=p):$u(i,l,d));break;default:$u(i,l,d)}}function NO(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 cf(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Fn=p,PO(p,i)}NO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)MO(i),i=i.sibling}function MO(i){switch(i.tag){case 0:case 11:case 15:cf(i),i.flags&2048&&Qi(9,i,i.return);break;case 3:cf(i);break;case 12:cf(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,dg(i)):cf(i);break;default:cf(i)}}function dg(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];Fn=p,PO(p,i)}NO(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Qi(8,l,l.return),dg(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,dg(l));break;default:dg(l)}i=i.sibling}}function PO(i,l){for(;Fn!==null;){var d=Fn;switch(d.tag){case 0:case 11:case 15:Qi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Vd(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,Fn=p;else e:for(d=i;Fn!==null;){p=Fn;var v=p.sibling,b=p.return;if(wO(p),p===d){Fn=null;break e}if(v!==null){v.return=b,Fn=v;break e}Fn=b}}}var M$={getCacheForType:function(i){var l=Xn(En),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Xn(En).controller.signal}},P$=typeof WeakMap=="function"?WeakMap:Map,It=0,Wt=null,it=null,ut=0,Pt=0,es=null,Ji=!1,qu=!1,l1=!1,Zo=0,pn=0,ea=0,ml=0,u1=0,ts=0,Wu=0,df=null,Dr=null,c1=!1,fg=0,kO=0,hg=1/0,pg=null,ta=null,Mn=0,na=null,Vu=null,Xo=0,d1=0,f1=null,DO=null,ff=0,h1=null;function ns(){return(It&2)!==0&&ut!==0?ut&-ut:$.T!==null?b1():wp()}function LO(){if(ts===0)if((ut&536870912)===0||dt){var i=Ya;Ya<<=1,(Ya&3932160)===0&&(Ya=262144),ts=i}else ts=536870912;return i=Qr.current,i!==null&&(i.flags|=32),ts}function Lr(i,l,d){(i===Wt&&(Pt===2||Pt===9)||i.cancelPendingCommit!==null)&&(Gu(i,0),ra(i,ut,ts,!1)),Do(i,d),((It&2)===0||i!==Wt)&&(i===Wt&&((It&2)===0&&(ml|=d),pn===4&&ra(i,ut,ts,!1)),fo(i))}function UO(i,l,d){if((It&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||ro(i,l),v=p?L$(i,l):g1(i,l,!0),b=p;do{if(v===0){qu&&!p&&ra(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!k$(d)){v=g1(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var x=0;else x=i.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){l=x;e:{var P=i;v=df;var B=P.current.memoizedState.isDehydrated;if(B&&(Gu(P,x).flags|=256),x=g1(P,x,!1),x!==2){if(l1&&!B){P.errorRecoveryDisabledLanes|=b,ml|=b,v=4;break e}b=Dr,Dr=v,b!==null&&(Dr===null?Dr=b:Dr.push.apply(Dr,b))}v=x}if(b=!1,v!==2)continue}}if(v===1){Gu(i,0),ra(i,l,0,!0);break}e:{switch(p=i,b=v,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ra(p,l,ts,!Ji);break e;case 2:Dr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(v=fg+300-Gt(),10<v)){if(ra(p,l,ts,!Ji),Xa(p,0,!0)!==0)break e;Xo=l,p.timeoutHandle=pN(FO.bind(null,p,d,Dr,pg,c1,l,ts,ml,Wu,Ji,b,"Throttled",-0,0),v);break e}FO(p,d,Dr,pg,c1,l,ts,ml,Wu,Ji,b,null,-0,0)}}break}while(!0);fo(i)}function FO(i,l,d,p,v,b,x,P,B,Q,se,ae,ne,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:nn},OO(l,b,ae);var Re=(b&62914560)===b?fg-Gt():(b&4194048)===b?kO-Gt():0;if(Re=yq(ae,Re),Re!==null){Xo=b,i.cancelPendingCommit=Re(VO.bind(null,i,l,b,d,p,v,x,P,B,se,ae,null,ne,re)),ra(i,b,x,!Q);return}}VO(i,l,b,d,p,v,x,P,B)}function k$(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 p=0;p<d.length;p++){var v=d[p],b=v.getSnapshot;v=v.value;try{if(!Zr(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 ra(i,l,d,p){l&=~u1,l&=~ml,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var v=l;0<v;){var b=31-Yn(v),x=1<<b;p[b]=-1,v&=~x}d!==0&&Cp(i,d,l)}function gg(){return(It&6)===0?(hf(0),!1):!0}function p1(){if(it!==null){if(Pt===0)var i=it.return;else i=it,jo=al=null,O0(i),Uu=null,Kd=0,i=it;for(;i!==null;)gO(i.alternate,i),i=i.return;it=null}}function Gu(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,eq(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Xo=0,p1(),Wt=i,it=d=Fo(i.current,null),ut=l,Pt=0,es=null,Ji=!1,qu=ro(i,l),l1=!1,Wu=ts=u1=ml=ea=pn=0,Dr=df=null,c1=!1,(l&8)!==0&&(l|=l&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=l;0<p;){var v=31-Yn(p),b=1<<v;l|=i[v],p&=~b}return Zo=l,Lp(),d}function zO(i,l){Qe=null,$.H=nf,l===Lu||l===qp?(l=t2(),Pt=3):l===y0?(l=t2(),Pt=4):Pt=l===V0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,es=l,it===null&&(pn=1,sg(i,ms(l,i.current)))}function jO(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Ss===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Ss:!1}function BO(){var i=$.H;return $.H=nf,i===null?nf:i}function HO(){var i=$.A;return $.A=M$,i}function mg(){pn=4,Ji||(ut&4194048)!==ut&&Qr.current!==null||(qu=!0),(ea&134217727)===0&&(ml&134217727)===0||Wt===null||ra(Wt,ut,ts,!1)}function g1(i,l,d){var p=It;It|=2;var v=BO(),b=HO();(Wt!==i||ut!==l)&&(pg=null,Gu(i,l)),l=!1;var x=pn;e:do try{if(Pt!==0&&it!==null){var P=it,B=es;switch(Pt){case 8:p1(),x=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(l=!0);var Q=Pt;if(Pt=0,es=null,Ku(i,P,B,Q),d&&qu){x=0;break e}break;default:Q=Pt,Pt=0,es=null,Ku(i,P,B,Q)}}D$(),x=pn;break}catch(se){zO(i,se)}while(!0);return l&&i.shellSuspendCounter++,jo=al=null,It=p,$.H=v,$.A=b,it===null&&(Wt=null,ut=0,Lp()),x}function D$(){for(;it!==null;)$O(it)}function L$(i,l){var d=It;It|=2;var p=BO(),v=HO();Wt!==i||ut!==l?(pg=null,hg=Gt()+500,Gu(i,l)):qu=ro(i,l);e:do try{if(Pt!==0&&it!==null){l=it;var b=es;t:switch(Pt){case 1:Pt=0,es=null,Ku(i,l,b,1);break;case 2:case 9:if(JI(b)){Pt=0,es=null,qO(l);break}l=function(){Pt!==2&&Pt!==9||Wt!==i||(Pt=7),fo(i)},b.then(l,l);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:JI(b)?(Pt=0,es=null,qO(l)):(Pt=0,es=null,Ku(i,l,b,7));break;case 5:var x=null;switch(it.tag){case 26:x=it.memoizedState;case 5:case 27:var P=it;if(x?IN(x):P.stateNode.complete){Pt=0,es=null;var B=P.sibling;if(B!==null)it=B;else{var Q=P.return;Q!==null?(it=Q,vg(Q)):it=null}break t}}Pt=0,es=null,Ku(i,l,b,5);break;case 6:Pt=0,es=null,Ku(i,l,b,6);break;case 8:p1(),pn=6;break e;default:throw Error(r(462))}}U$();break}catch(se){zO(i,se)}while(!0);return jo=al=null,$.H=p,$.A=v,It=d,it!==null?0:(Wt=null,ut=0,Lp(),pn)}function U$(){for(;it!==null&&!to();)$O(it)}function $O(i){var l=hO(i.alternate,i,Zo);i.memoizedProps=i.pendingProps,l===null?vg(i):it=l}function qO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=aO(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=aO(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:O0(l);default:gO(d,l),l=it=HI(l,Zo),l=hO(d,l,Zo)}i.memoizedProps=i.pendingProps,l===null?vg(i):it=l}function Ku(i,l,d,p){jo=al=null,O0(l),Uu=null,Kd=0;var v=l.return;try{if(_$(i,v,l,d,ut)){pn=1,sg(i,ms(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;pn=1,sg(i,ms(d,i.current)),it=null;return}l.flags&32768?(dt||p===1?i=!0:qu||(ut&536870912)!==0?i=!1:(Ji=i=!0,(p===2||p===9||p===3||p===6)&&(p=Qr.current,p!==null&&p.tag===13&&(p.flags|=16384))),WO(l,i)):vg(l)}function vg(i){var l=i;do{if((l.flags&32768)!==0){WO(l,Ji);return}i=l.return;var d=R$(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);pn===0&&(pn=5)}function WO(i,l){do{var d=I$(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);pn=6,it=null}function VO(i,l,d,p,v,b,x,P,B){i.cancelPendingCommit=null;do yg();while(Mn!==0);if((It&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=r0,xd(i,d,b,x,P,B),i===Wt&&(it=Wt=null,ut=0),Vu=l,na=i,Xo=d,d1=b,f1=v,DO=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,B$(no,function(){return XO(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=$.T,$.T=null,v=te.p,te.p=2,x=It,It|=4;try{O$(i,l,d)}finally{It=x,te.p=v,$.T=p}}Mn=1,GO(),KO(),YO()}}function GO(){if(Mn===1){Mn=0;var i=na,l=Vu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=$.T,$.T=null;var p=te.p;te.p=2;var v=It;It|=4;try{TO(l,i);var b=T1,x=PI(i.containerInfo),P=b.focusedElem,B=b.selectionRange;if(x!==P&&P&&P.ownerDocument&&MI(P.ownerDocument.documentElement,P)){if(B!==null&&Qb(P)){var Q=B.start,se=B.end;if(se===void 0&&(se=Q),"selectionStart"in P)P.selectionStart=Q,P.selectionEnd=Math.min(se,P.value.length);else{var ae=P.ownerDocument||document,ne=ae&&ae.defaultView||window;if(ne.getSelection){var re=ne.getSelection(),Re=P.textContent.length,De=Math.min(B.start,Re),jt=B.end===void 0?De:Math.min(B.end,Re);!re.extend&&De>jt&&(x=jt,jt=De,De=x);var G=NI(P,De),W=NI(P,jt);if(G&&W&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==W.node||re.focusOffset!==W.offset)){var X=ae.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),De>jt?(re.addRange(X),re.extend(W.node,W.offset)):(X.setEnd(W.node,W.offset),re.addRange(X))}}}}for(ae=[],re=P;re=re.parentNode;)re.nodeType===1&&ae.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ae.length;P++){var ie=ae[P];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Og=!!A1,T1=A1=null}finally{It=v,te.p=p,$.T=d}}i.current=l,Mn=2}}function KO(){if(Mn===2){Mn=0;var i=na,l=Vu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=$.T,$.T=null;var p=te.p;te.p=2;var v=It;It|=4;try{CO(i,l.alternate,l)}finally{It=v,te.p=p,$.T=d}}Mn=3}}function YO(){if(Mn===4||Mn===3){Mn=0,Rr();var i=na,l=Vu,d=Xo,p=DO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Mn=5:(Mn=0,Vu=na=null,ZO(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ta=null),Qa(d),l=l.stateNode,lr&&typeof lr.onCommitFiberRoot=="function")try{lr.onCommitFiberRoot(Pi,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=$.T,v=te.p,te.p=2,$.T=null;try{for(var b=i.onRecoverableError,x=0;x<p.length;x++){var P=p[x];b(P.value,{componentStack:P.stack})}}finally{$.T=l,te.p=v}}(Xo&3)!==0&&yg(),fo(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===h1?ff++:(ff=0,h1=i):ff=0,hf(0)}}function ZO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,Vd(l)))}function yg(){return GO(),KO(),YO(),XO()}function XO(){if(Mn!==5)return!1;var i=na,l=d1;d1=0;var d=Qa(Xo),p=$.T,v=te.p;try{te.p=32>d?32:d,$.T=null,d=f1,f1=null;var b=na,x=Xo;if(Mn=0,Vu=na=null,Xo=0,(It&6)!==0)throw Error(r(331));var P=It;if(It|=4,MO(b.current),IO(b,b.current,x,d),It=P,hf(0,!1),lr&&typeof lr.onPostCommitFiberRoot=="function")try{lr.onPostCommitFiberRoot(Pi,b)}catch{}return!0}finally{te.p=v,$.T=p,ZO(i,l)}}function QO(i,l,d){l=ms(d,l),l=W0(i.stateNode,l,2),i=Yi(i,l,2),i!==null&&(Do(i,2),fo(i))}function kt(i,l,d){if(i.tag===3)QO(i,i,d);else for(;l!==null;){if(l.tag===3){QO(l,i,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ta===null||!ta.has(p))){i=ms(d,i),d=J2(2),p=Yi(l,d,2),p!==null&&(eO(d,p,l,i),Do(p,2),fo(p));break}}l=l.return}}function m1(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new P$;var v=new Set;p.set(l,v)}else v=p.get(l),v===void 0&&(v=new Set,p.set(l,v));v.has(d)||(l1=!0,v.add(d),i=F$.bind(null,i,l,d),l.then(i,i))}function F$(i,l,d){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,Wt===i&&(ut&d)===d&&(pn===4||pn===3&&(ut&62914560)===ut&&300>Gt()-fg?(It&2)===0&&Gu(i,0):u1|=d,Wu===ut&&(Wu=0)),fo(i)}function JO(i,l){l===0&&(l=Kr()),i=sl(i,l),i!==null&&(Do(i,l),fo(i))}function z$(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),JO(i,d)}function j$(i,l){var d=0;switch(i.tag){case 31:case 13:var p=i.stateNode,v=i.memoizedState;v!==null&&(d=v.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),JO(i,d)}function B$(i,l){return Kn(i,l)}var bg=null,Yu=null,v1=!1,Sg=!1,y1=!1,sa=0;function fo(i){i!==Yu&&i.next===null&&(Yu===null?bg=Yu=i:Yu=Yu.next=i),Sg=!0,v1||(v1=!0,$$())}function hf(i,l){if(!y1&&Sg){y1=!0;do for(var d=!1,p=bg;p!==null;){if(i!==0){var v=p.pendingLanes;if(v===0)var b=0;else{var x=p.suspendedLanes,P=p.pingedLanes;b=(1<<31-Yn(42|i)+1)-1,b&=v&~(x&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,rN(p,b))}else b=ut,b=Xa(p,p===Wt?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||ro(p,b)||(d=!0,rN(p,b));p=p.next}while(d);y1=!1}}function H$(){eN()}function eN(){Sg=v1=!1;var i=0;sa!==0&&J$()&&(i=sa);for(var l=Gt(),d=null,p=bg;p!==null;){var v=p.next,b=tN(p,l);b===0?(p.next=null,d===null?bg=v:d.next=v,v===null&&(Yu=d)):(d=p,(i!==0||(b&3)!==0)&&(Sg=!0)),p=v}Mn!==0&&Mn!==5||hf(i),sa!==0&&(sa=0)}function tN(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var x=31-Yn(b),P=1<<x,B=v[x];B===-1?((P&d)===0||(P&p)!==0)&&(v[x]=yu(P,l)):B<=l&&(i.expiredLanes|=P),b&=~P}if(l=Wt,d=ut,d=Xa(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,d===0||i===l&&(Pt===2||Pt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Tr(p),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||ro(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Tr(p),Qa(d)){case 2:case 8:d=Ir;break;case 32:d=no;break;case 268435456:d=ko;break;default:d=no}return p=nN.bind(null,i),d=Kn(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Tr(p),i.callbackPriority=2,i.callbackNode=null,2}function nN(i,l){if(Mn!==0&&Mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(yg()&&i.callbackNode!==d)return null;var p=ut;return p=Xa(i,i===Wt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(UO(i,p,l),tN(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?nN.bind(null,i):null)}function rN(i,l){if(yg())return null;UO(i,l,!0)}function $$(){tq(function(){(It&6)!==0?Kn(yn,H$):eN()})}function b1(){if(sa===0){var i=ku;i===0&&(i=Di,Di<<=1,(Di&261888)===0&&(Di=256)),sa=i}return sa}function sN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:ur(""+i)}function oN(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 q$(i,l,d,p,v){if(l==="submit"&&d&&d.stateNode===v){var b=sN((v[nt]||null).action),x=p.submitter;x&&(l=(l=x[nt]||null)?sN(l.formAction):x.getAttribute("formAction"),l!==null&&(b=l,x=null));var P=new Mp("action","action",null,p,v);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(sa!==0){var B=x?oN(v,x):new FormData(v);z0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(P.preventDefault(),B=x?oN(v,x):new FormData(v),z0(d,{pending:!0,data:B,method:v.method,action:b},b,B))},currentTarget:v}]})}}for(var S1=0;S1<n0.length;S1++){var E1=n0[S1],W$=E1.toLowerCase(),V$=E1[0].toUpperCase()+E1.slice(1);Us(W$,"on"+V$)}Us(LI,"onAnimationEnd"),Us(UI,"onAnimationIteration"),Us(FI,"onAnimationStart"),Us("dblclick","onDoubleClick"),Us("focusin","onFocus"),Us("focusout","onBlur"),Us(l$,"onTransitionRun"),Us(u$,"onTransitionStart"),Us(c$,"onTransitionCancel"),Us(zI,"onTransitionEnd"),ji("onMouseEnter",["mouseout","mouseover"]),ji("onMouseLeave",["mouseout","mouseover"]),ji("onPointerEnter",["pointerout","pointerover"]),ji("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 pf="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(" "),G$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pf));function iN(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],v=p.event;p=p.listeners;e:{var b=void 0;if(l)for(var x=p.length-1;0<=x;x--){var P=p[x],B=P.instance,Q=P.currentTarget;if(P=P.listener,B!==b&&v.isPropagationStopped())break e;b=P,v.currentTarget=Q;try{b(v)}catch(se){Dp(se)}v.currentTarget=null,b=B}else for(x=0;x<p.length;x++){if(P=p[x],B=P.instance,Q=P.currentTarget,P=P.listener,B!==b&&v.isPropagationStopped())break e;b=P,v.currentTarget=Q;try{b(v)}catch(se){Dp(se)}v.currentTarget=null,b=B}}}}function at(i,l){var d=l[Ad];d===void 0&&(d=l[Ad]=new Set);var p=i+"__bubble";d.has(p)||(aN(l,i,2,!1),d.add(p))}function C1(i,l,d){var p=0;l&&(p|=4),aN(d,i,p,l)}var Eg="_reactListening"+Math.random().toString(36).slice(2);function w1(i){if(!i[Eg]){i[Eg]=!0,io.forEach(function(d){d!=="selectionchange"&&(G$.has(d)||C1(d,!1,i),C1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Eg]||(l[Eg]=!0,C1("selectionchange",!1,l))}}function aN(i,l,d,p){switch(LN(l)){case 2:var v=Eq;break;case 8:v=Cq;break;default:v=F1}d=v.bind(null,l,d,i),v=void 0,!$b||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(v=!0),p?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 x1(i,l,d,p,v){var b=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var x=p.tag;if(x===3||x===4){var P=p.stateNode.containerInfo;if(P===v)break;if(x===4)for(x=p.return;x!==null;){var B=x.tag;if((B===3||B===4)&&x.stateNode.containerInfo===v)return;x=x.return}for(;P!==null;){if(x=Fi(P),x===null)return;if(B=x.tag,B===5||B===6||B===26||B===27){p=b=x;continue e}P=P.parentNode}}p=p.return}fI(function(){var Q=b,se=Nn(d),ae=[];e:{var ne=jI.get(i);if(ne!==void 0){var re=Mp,Re=i;switch(i){case"keypress":if(Op(d)===0)break e;case"keydown":case"keyup":re=jH;break;case"focusin":Re="focus",re=Gb;break;case"focusout":Re="blur",re=Gb;break;case"beforeblur":case"afterblur":re=Gb;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=gI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=RH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=$H;break;case LI:case UI:case FI:re=NH;break;case zI:re=WH;break;case"scroll":case"scrollend":re=AH;break;case"wheel":re=GH;break;case"copy":case"cut":case"paste":re=PH;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=vI;break;case"toggle":case"beforetoggle":re=YH}var De=(l&4)!==0,jt=!De&&(i==="scroll"||i==="scrollend"),G=De?ne!==null?ne+"Capture":null:ne;De=[];for(var W=Q,X;W!==null;){var ie=W;if(X=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||X===null||G===null||(ie=Dd(W,G),ie!=null&&De.push(gf(W,ie,X))),jt)break;W=W.return}0<De.length&&(ne=new re(ne,Re,null,d,se),ae.push({event:ne,listeners:De}))}}if((l&7)===0){e:{if(ne=i==="mouseover"||i==="pointerover",re=i==="mouseout"||i==="pointerout",ne&&d!==yr&&(Re=d.relatedTarget||d.fromElement)&&(Fi(Re)||Re[Yr]))break e;if((re||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,re?(Re=d.relatedTarget||d.toElement,re=Q,Re=Re?Fi(Re):null,Re!==null&&(jt=o(Re),De=Re.tag,Re!==jt||De!==5&&De!==27&&De!==6)&&(Re=null)):(re=null,Re=Q),re!==Re)){if(De=gI,ie="onMouseLeave",G="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(De=vI,ie="onPointerLeave",G="onPointerEnter",W="pointer"),jt=re==null?ne:Ja(re),X=Re==null?ne:Ja(Re),ne=new De(ie,W+"leave",re,d,se),ne.target=jt,ne.relatedTarget=X,ie=null,Fi(se)===Q&&(De=new De(G,W+"enter",Re,d,se),De.target=X,De.relatedTarget=jt,ie=De),jt=ie,re&&Re)t:{for(De=K$,G=re,W=Re,X=0,ie=G;ie;ie=De(ie))X++;ie=0;for(var Pe=W;Pe;Pe=De(Pe))ie++;for(;0<X-ie;)G=De(G),X--;for(;0<ie-X;)W=De(W),ie--;for(;X--;){if(G===W||W!==null&&G===W.alternate){De=G;break t}G=De(G),W=De(W)}De=null}else De=null;re!==null&&lN(ae,ne,re,De,!1),Re!==null&&jt!==null&&lN(ae,jt,Re,De,!0)}}e:{if(ne=Q?Ja(Q):window,re=ne.nodeName&&ne.nodeName.toLowerCase(),re==="select"||re==="input"&&ne.type==="file")var xt=_I;else if(wI(ne))if(AI)xt=o$;else{xt=r$;var Ne=n$}else re=ne.nodeName,!re||re.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?Q&&Ue(Q.elementType)&&(xt=_I):xt=s$;if(xt&&(xt=xt(i,Q))){xI(ae,xt,d,se);break e}Ne&&Ne(i,ne,Q),i==="focusout"&&Q&&ne.type==="number"&&Q.memoizedProps.value!=null&&Bi(ne,"number",ne.value)}switch(Ne=Q?Ja(Q):window,i){case"focusin":(wI(Ne)||Ne.contentEditable==="true")&&(Au=Ne,Jb=Q,$d=null);break;case"focusout":$d=Jb=Au=null;break;case"mousedown":e0=!0;break;case"contextmenu":case"mouseup":case"dragend":e0=!1,kI(ae,d,se);break;case"selectionchange":if(a$)break;case"keydown":case"keyup":kI(ae,d,se)}var Je;if(Yb)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 _u?EI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(yI&&d.locale!=="ko"&&(_u||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&_u&&(Je=hI()):(Hi=se,qb="value"in Hi?Hi.value:Hi.textContent,_u=!0)),Ne=Cg(Q,ct),0<Ne.length&&(ct=new mI(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=CI(d),Je!==null&&(ct.data=Je)))),(Je=XH?QH(i,d):JH(i,d))&&(ct=Cg(Q,"onBeforeInput"),0<ct.length&&(Ne=new mI("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),q$(ae,i,Q,d,se)}iN(ae,l)})}function gf(i,l,d){return{instance:i,listener:l,currentTarget:d}}function Cg(i,l){for(var d=l+"Capture",p=[];i!==null;){var v=i,b=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||b===null||(v=Dd(i,d),v!=null&&p.unshift(gf(i,v,b)),v=Dd(i,l),v!=null&&p.push(gf(i,v,b))),i.tag===3)return p;i=i.return}return[]}function K$(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function lN(i,l,d,p,v){for(var b=l._reactName,x=[];d!==null&&d!==p;){var P=d,B=P.alternate,Q=P.stateNode;if(P=P.tag,B!==null&&B===p)break;P!==5&&P!==26&&P!==27||Q===null||(B=Q,v?(Q=Dd(d,b),Q!=null&&x.unshift(gf(d,Q,B))):v||(Q=Dd(d,b),Q!=null&&x.push(gf(d,Q,B)))),d=d.return}x.length!==0&&i.push({event:l,listeners:x})}var Y$=/\r\n?/g,Z$=/\u0000|\uFFFD/g;function uN(i){return(typeof i=="string"?i:""+i).replace(Y$,`
|
|
224
|
-
`).replace(Z$,"")}function cN(i,l){return l=uN(l),uN(i)===l}function zt(i,l,d,p,v,b){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||Z(i,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&Z(i,""+p);break;case"className":Ls(i,"class",p);break;case"tabIndex":Ls(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ls(i,d,p);break;case"style":ke(i,p,b);break;case"data":if(l!=="object"){Ls(i,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=ur(""+p),i.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="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"&&zt(i,l,"name",v.name,v,null),zt(i,l,"formEncType",v.formEncType,v,null),zt(i,l,"formMethod",v.formMethod,v,null),zt(i,l,"formTarget",v.formTarget,v,null)):(zt(i,l,"encType",v.encType,v,null),zt(i,l,"method",v.method,v,null),zt(i,l,"target",v.target,v,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=ur(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=nn);break;case"onScroll":p!=null&&at("scroll",i);break;case"onScrollEnd":p!=null&&at("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}d=ur(""+p),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":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""+p):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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":p===!0?i.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,p):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(d,p):i.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(d):i.setAttribute(d,p);break;case"popover":at("beforetoggle",i),at("toggle",i),Lo(i,"popover",p);break;case"xlinkActuate":vr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":vr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":vr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":vr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":vr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":vr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":vr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":vr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":vr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Lo(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=tn.get(d)||d,Lo(i,d,p))}}function _1(i,l,d,p,v,b){switch(d){case"style":ke(i,p,b);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(v.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof p=="string"?Z(i,p):(typeof p=="number"||typeof p=="bigint")&&Z(i,""+p);break;case"onScroll":p!=null&&at("scroll",i);break;case"onScrollEnd":p!=null&&at("scrollend",i);break;case"onClick":p!=null&&(i.onclick=nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_p.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 p=="function")){typeof b!="function"&&b!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,p,v);break e}d in i?i[d]=p:p===!0?i.setAttribute(d,""):Lo(i,d,p)}}}function Jn(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 p=!1,v=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":p=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:zt(i,l,b,x,d,null)}}v&&zt(i,l,"srcSet",d.srcSet,d,null),p&&zt(i,l,"src",d.src,d,null);return;case"input":at("invalid",i);var P=b=x=v=null,B=null,Q=null;for(p in d)if(d.hasOwnProperty(p)){var se=d[p];if(se!=null)switch(p){case"name":v=se;break;case"type":x=se;break;case"checked":B=se;break;case"defaultChecked":Q=se;break;case"value":b=se;break;case"defaultValue":P=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,l));break;default:zt(i,l,p,se,d,null)}}kd(i,b,P,B,Q,x,v,!1);return;case"select":at("invalid",i),p=x=b=null;for(v in d)if(d.hasOwnProperty(v)&&(P=d[v],P!=null))switch(v){case"value":b=P;break;case"defaultValue":x=P;break;case"multiple":p=P;default:zt(i,l,v,P,d,null)}l=b,d=x,i.multiple=!!p,l!=null?ao(i,!!p,l,!1):d!=null&&ao(i,!!p,d,!0);return;case"textarea":at("invalid",i),b=v=p=null;for(x in d)if(d.hasOwnProperty(x)&&(P=d[x],P!=null))switch(x){case"value":p=P;break;case"defaultValue":v=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:zt(i,l,x,P,d,null)}U(i,p,v,b);return;case"option":for(B in d)d.hasOwnProperty(B)&&(p=d[B],p!=null)&&(B==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":zt(i,l,B,p,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(p=0;p<pf.length;p++)at(pf[p],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)&&(p=d[Q],p!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:zt(i,l,Q,p,d,null)}return;default:if(Ue(l)){for(se in d)d.hasOwnProperty(se)&&(p=d[se],p!==void 0&&_1(i,l,se,p,d,void 0));return}}for(P in d)d.hasOwnProperty(P)&&(p=d[P],p!=null&&zt(i,l,P,p,d,null))}function X$(i,l,d,p){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,x=null,P=null,B=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":B=ae;default:p.hasOwnProperty(re)||zt(i,l,re,null,p,ae)}}for(var ne in p){var re=p[ne];if(ae=d[ne],p.hasOwnProperty(ne)&&(re!=null||ae!=null))switch(ne){case"type":b=re;break;case"name":v=re;break;case"checked":Q=re;break;case"defaultChecked":se=re;break;case"value":x=re;break;case"defaultValue":P=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:re!==ae&&zt(i,l,ne,re,p,ae)}}Pd(i,x,P,B,Q,se,b,v);return;case"select":re=x=P=ne=null;for(b in d)if(B=d[b],d.hasOwnProperty(b)&&B!=null)switch(b){case"value":break;case"multiple":re=B;default:p.hasOwnProperty(b)||zt(i,l,b,null,p,B)}for(v in p)if(b=p[v],B=d[v],p.hasOwnProperty(v)&&(b!=null||B!=null))switch(v){case"value":ne=b;break;case"defaultValue":P=b;break;case"multiple":x=b;default:b!==B&&zt(i,l,v,b,p,B)}l=P,d=x,p=re,ne!=null?ao(i,!!d,ne,!1):!!p!=!!d&&(l!=null?ao(i,!!d,l,!0):ao(i,!!d,d?[]:"",!1));return;case"textarea":re=ne=null;for(P in d)if(v=d[P],d.hasOwnProperty(P)&&v!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:zt(i,l,P,null,p,v)}for(x in p)if(v=p[x],b=d[x],p.hasOwnProperty(x)&&(v!=null||b!=null))switch(x){case"value":ne=v;break;case"defaultValue":re=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==b&&zt(i,l,x,v,p,b)}pe(i,ne,re);return;case"option":for(var Re in d)ne=d[Re],d.hasOwnProperty(Re)&&ne!=null&&!p.hasOwnProperty(Re)&&(Re==="selected"?i.selected=!1:zt(i,l,Re,null,p,ne));for(B in p)ne=p[B],re=d[B],p.hasOwnProperty(B)&&ne!==re&&(ne!=null||re!=null)&&(B==="selected"?i.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":zt(i,l,B,ne,p,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)ne=d[De],d.hasOwnProperty(De)&&ne!=null&&!p.hasOwnProperty(De)&&zt(i,l,De,null,p,ne);for(Q in p)if(ne=p[Q],re=d[Q],p.hasOwnProperty(Q)&&ne!==re&&(ne!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,l));break;default:zt(i,l,Q,ne,p,re)}return;default:if(Ue(l)){for(var jt in d)ne=d[jt],d.hasOwnProperty(jt)&&ne!==void 0&&!p.hasOwnProperty(jt)&&_1(i,l,jt,void 0,p,ne);for(se in p)ne=p[se],re=d[se],!p.hasOwnProperty(se)||ne===re||ne===void 0&&re===void 0||_1(i,l,se,ne,p,re);return}}for(var G in d)ne=d[G],d.hasOwnProperty(G)&&ne!=null&&!p.hasOwnProperty(G)&&zt(i,l,G,null,p,ne);for(ae in p)ne=p[ae],re=d[ae],!p.hasOwnProperty(ae)||ne===re||ne==null&&re==null||zt(i,l,ae,ne,p,re)}function dN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q$(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var v=d[p],b=v.transferSize,x=v.initiatorType,P=v.duration;if(b&&P&&dN(x)){for(x=0,P=v.responseEnd,p+=1;p<d.length;p++){var B=d[p],Q=B.startTime;if(Q>P)break;var se=B.transferSize,ae=B.initiatorType;se&&dN(ae)&&(B=B.responseEnd,x+=se*(B<P?1:(P-Q)/(B-Q)))}if(--p,l+=8*(b+x)/(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,T1=null;function wg(i){return i.nodeType===9?i:i.ownerDocument}function fN(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 hN(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 R1(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 I1=null;function J$(){var i=window.event;return i&&i.type==="popstate"?i===I1?!1:(I1=i,!0):(I1=null,!1)}var pN=typeof setTimeout=="function"?setTimeout:void 0,eq=typeof clearTimeout=="function"?clearTimeout:void 0,gN=typeof Promise=="function"?Promise:void 0,tq=typeof queueMicrotask=="function"?queueMicrotask:typeof gN<"u"?function(i){return gN.resolve(null).then(i).catch(nq)}:pN;function nq(i){setTimeout(function(){throw i})}function oa(i){return i==="head"}function mN(i,l){var d=l,p=0;do{var v=d.nextSibling;if(i.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"||d==="/&"){if(p===0){i.removeChild(v),Ju(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")mf(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,mf(d);for(var b=d.firstChild;b;){var x=b.nextSibling,P=b.nodeName;b[Ui]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&mf(i.ownerDocument.body);d=v}while(d);Ju(l)}function vN(i,l){var d=i;i=0;do{var p=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||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=p}while(d)}function O1(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":O1(d),Id(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function rq(i,l,d,p){for(;i.nodeType===1;){var v=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Ui])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=Es(i.nextSibling),i===null)break}return null}function sq(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Es(i.nextSibling),i===null))return null;return i}function yN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Es(i.nextSibling),i===null))return null;return i}function N1(i){return i.data==="$?"||i.data==="$~"}function M1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function oq(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Es(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 bN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Es(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function SN(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 EN(i,l,d){switch(l=wg(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 mf(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);Id(i)}var Cs=new Map,CN=new Set;function xg(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qo=te.d;te.d={f:iq,r:aq,D:lq,C:uq,L:cq,m:dq,X:hq,S:fq,M:pq};function iq(){var i=Qo.f(),l=gg();return i||l}function aq(i){var l=zi(i);l!==null&&l.tag===5&&l.type==="form"?z2(l):Qo.r(i)}var Zu=typeof document>"u"?null:document;function wN(i,l,d){var p=Zu;if(p&&typeof l=="string"&&l){var v=Or(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),CN.has(v)||(CN.add(v),i={rel:i,crossOrigin:d,href:l},p.querySelector(v)===null&&(l=p.createElement("link"),Jn(l,"link",i),ln(l),p.head.appendChild(l)))}}function lq(i){Qo.D(i),wN("dns-prefetch",i,null)}function uq(i,l){Qo.C(i,l),wN("preconnect",i,l)}function cq(i,l,d){Qo.L(i,l,d);var p=Zu;if(p&&i&&l){var v='link[rel="preload"][as="'+Or(l)+'"]';l==="image"&&d&&d.imageSrcSet?(v+='[imagesrcset="'+Or(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(v+='[imagesizes="'+Or(d.imageSizes)+'"]')):v+='[href="'+Or(i)+'"]';var b=v;switch(l){case"style":b=Xu(i);break;case"script":b=Qu(i)}Cs.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Cs.set(b,i),p.querySelector(v)!==null||l==="style"&&p.querySelector(vf(b))||l==="script"&&p.querySelector(yf(b))||(l=p.createElement("link"),Jn(l,"link",i),ln(l),p.head.appendChild(l)))}}function dq(i,l){Qo.m(i,l);var d=Zu;if(d&&i){var p=l&&typeof l.as=="string"?l.as:"script",v='link[rel="modulepreload"][as="'+Or(p)+'"][href="'+Or(i)+'"]',b=v;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Qu(i)}if(!Cs.has(b)&&(i=g({rel:"modulepreload",href:i},l),Cs.set(b,i),d.querySelector(v)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(yf(b)))return}p=d.createElement("link"),Jn(p,"link",i),ln(p),d.head.appendChild(p)}}}function fq(i,l,d){Qo.S(i,l,d);var p=Zu;if(p&&i){var v=mr(p).hoistableStyles,b=Xu(i);l=l||"default";var x=v.get(b);if(!x){var P={loading:0,preload:null};if(x=p.querySelector(vf(b)))P.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Cs.get(b))&&k1(i,d);var B=x=p.createElement("link");ln(B),Jn(B,"link",i),B._p=new Promise(function(Q,se){B.onload=Q,B.onerror=se}),B.addEventListener("load",function(){P.loading|=1}),B.addEventListener("error",function(){P.loading|=2}),P.loading|=4,_g(x,l,p)}x={type:"stylesheet",instance:x,count:1,state:P},v.set(b,x)}}}function hq(i,l){Qo.X(i,l);var d=Zu;if(d&&i){var p=mr(d).hoistableScripts,v=Qu(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0},l),(l=Cs.get(v))&&D1(i,l),b=d.createElement("script"),ln(b),Jn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function pq(i,l){Qo.M(i,l);var d=Zu;if(d&&i){var p=mr(d).hoistableScripts,v=Qu(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=Cs.get(v))&&D1(i,l),b=d.createElement("script"),ln(b),Jn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function xN(i,l,d,p){var v=(v=he.current)?xg(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=Xu(d.href),d=mr(v).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=Xu(d.href);var b=mr(v).hoistableStyles,x=b.get(i);if(x||(v=v.ownerDocument||v,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=v.querySelector(vf(i)))&&!b._p&&(x.instance=b,x.state.loading=5),Cs.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},Cs.set(i,d),b||gq(v,i,d,x.state))),l&&p===null)throw Error(r(528,""));return x}if(l&&p!==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=Qu(d),d=mr(v).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function Xu(i){return'href="'+Or(i)+'"'}function vf(i){return'link[rel="stylesheet"]['+i+"]"}function _N(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function gq(i,l,d,p){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=i.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Jn(l,"link",d),ln(l),i.head.appendChild(l))}function Qu(i){return'[src="'+Or(i)+'"]'}function yf(i){return"script[async]"+i}function AN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+Or(d.href)+'"]');if(p)return l.instance=p,ln(p),p;var v=g({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),ln(p),Jn(p,"style",v),_g(p,d.precedence,i),l.instance=p;case"stylesheet":v=Xu(d.href);var b=i.querySelector(vf(v));if(b)return l.state.loading|=4,l.instance=b,ln(b),b;p=_N(d),(v=Cs.get(v))&&k1(p,v),b=(i.ownerDocument||i).createElement("link"),ln(b);var x=b;return x._p=new Promise(function(P,B){x.onload=P,x.onerror=B}),Jn(b,"link",p),l.state.loading|=4,_g(b,d.precedence,i),l.instance=b;case"script":return b=Qu(d.src),(v=i.querySelector(yf(b)))?(l.instance=v,ln(v),v):(p=d,(v=Cs.get(b))&&(p=g({},d),D1(p,v)),i=i.ownerDocument||i,v=i.createElement("script"),ln(v),Jn(v,"link",p),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&&(p=l.instance,l.state.loading|=4,_g(p,d.precedence,i));return l.instance}function _g(i,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=p.length?p[p.length-1]:null,b=v,x=0;x<p.length;x++){var P=p[x];if(P.dataset.precedence===l)b=P;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 k1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function D1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var Ag=null;function TN(i,l,d){if(Ag===null){var p=new Map,v=Ag=new Map;v.set(d,p)}else v=Ag,p=v.get(d),p||(p=new Map,v.set(d,p));if(p.has(i))return p;for(p.set(i,null),d=d.getElementsByTagName(i),v=0;v<d.length;v++){var b=d[v];if(!(b[Ui]||b[On]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var P=p.get(x);P?P.push(b):p.set(x,[b])}}return p}function RN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function mq(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 IN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function vq(i,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var v=Xu(p.href),b=l.querySelector(vf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Tg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,ln(b);return}b=l.ownerDocument||l,p=_N(p),(v=Cs.get(v))&&k1(p,v),b=b.createElement("link"),ln(b);var x=b;x._p=new Promise(function(P,B){x.onload=P,x.onerror=B}),Jn(b,"link",p),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=Tg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var L1=0;function yq(i,l){return i.stylesheets&&i.count===0&&Ig(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&Ig(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&L1===0&&(L1=62500*Q$());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Ig(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>L1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(v)}}:null}function Tg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ig(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Rg=null;function Ig(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Rg=new Map,l.forEach(bq,i),Rg=null,Tg.call(i))}function bq(i,l){if(!(l.state.loading&4)){var d=Rg.get(i);if(d)var p=d.get(null);else{d=new Map,Rg.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var x=v[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),p=x)}p&&d.set(null,p)}v=l.instance,x=v.getAttribute("data-precedence"),b=d.get(x)||p,b===p&&d.set(null,v),d.set(x,v),this.count++,p=Tg.bind(this),v.addEventListener("load",p),v.addEventListener("error",p),b?b.parentNode.insertBefore(v,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(v,i.firstChild)),l.state.loading|=4}}var bf={$$typeof:T,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function Sq(i,l,d,p,v,b,x,P,B){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=p,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function ON(i,l,d,p,v,b,x,P,B,Q,se,ae){return i=new Sq(i,l,d,x,B,Q,se,ae,P),l=1,b===!0&&(l|=24),b=Xr(3,null,null,l),i.current=b,b.stateNode=i,l=g0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:p,isDehydrated:d,cache:l},b0(b),i}function NN(i){return i?(i=Iu,i):Iu}function MN(i,l,d,p,v,b){v=NN(v),p.context===null?p.context=v:p.pendingContext=v,p=Ki(l),p.payload={element:d},b=b===void 0?null:b,b!==null&&(p.callback=b),d=Yi(i,p,l),d!==null&&(Lr(d,i,l),Zd(d,i,l))}function PN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function U1(i,l){PN(i,l),(i=i.alternate)&&PN(i,l)}function kN(i){if(i.tag===13||i.tag===31){var l=sl(i,67108864);l!==null&&Lr(l,i,67108864),U1(i,67108864)}}function DN(i){if(i.tag===13||i.tag===31){var l=ns();l=Su(l);var d=sl(i,l);d!==null&&Lr(d,i,l),U1(i,l)}}var Og=!0;function Eq(i,l,d,p){var v=$.T;$.T=null;var b=te.p;try{te.p=2,F1(i,l,d,p)}finally{te.p=b,$.T=v}}function Cq(i,l,d,p){var v=$.T;$.T=null;var b=te.p;try{te.p=8,F1(i,l,d,p)}finally{te.p=b,$.T=v}}function F1(i,l,d,p){if(Og){var v=z1(p);if(v===null)x1(i,l,p,Ng,d),UN(i,p);else if(xq(v,i,l,d,p))p.stopPropagation();else if(UN(i,p),l&4&&-1<wq.indexOf(i)){for(;v!==null;){var b=zi(v);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=ks(b.pendingLanes);if(x!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;x;){var B=1<<31-Yn(x);P.entanglements[1]|=B,x&=~B}fo(b),(It&6)===0&&(hg=Gt()+500,hf(0))}}break;case 31:case 13:P=sl(b,2),P!==null&&Lr(P,b,2),gg(),U1(b,2)}if(b=z1(p),b===null&&x1(i,l,p,Ng,d),b===v)break;v=b}v!==null&&p.stopPropagation()}else x1(i,l,p,null,d)}}function z1(i){return i=Nn(i),j1(i)}var Ng=null;function j1(i){if(Ng=null,i=Fi(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 Ng=i,null}function LN(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 yn:return 2;case Ir:return 8;case no:case Cd:return 32;case ko:return 268435456;default:return 32}default:return 32}}var B1=!1,ia=null,aa=null,la=null,Sf=new Map,Ef=new Map,ua=[],wq="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 UN(i,l){switch(i){case"focusin":case"focusout":ia=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":la=null;break;case"pointerover":case"pointerout":Sf.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ef.delete(l.pointerId)}}function Cf(i,l,d,p,v,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:b,targetContainers:[v]},l!==null&&(l=zi(l),l!==null&&kN(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function xq(i,l,d,p,v){switch(l){case"focusin":return ia=Cf(ia,i,l,d,p,v),!0;case"dragenter":return aa=Cf(aa,i,l,d,p,v),!0;case"mouseover":return la=Cf(la,i,l,d,p,v),!0;case"pointerover":var b=v.pointerId;return Sf.set(b,Cf(Sf.get(b)||null,i,l,d,p,v)),!0;case"gotpointercapture":return b=v.pointerId,Ef.set(b,Cf(Ef.get(b)||null,i,l,d,p,v)),!0}return!1}function FN(i){var l=Fi(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,Li(i.priority,function(){DN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Li(i.priority,function(){DN(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 Mg(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=z1(i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);yr=p,d.target.dispatchEvent(p),yr=null}else return l=zi(d),l!==null&&kN(l),i.blockedOn=d,!1;l.shift()}return!0}function zN(i,l,d){Mg(i)&&d.delete(l)}function _q(){B1=!1,ia!==null&&Mg(ia)&&(ia=null),aa!==null&&Mg(aa)&&(aa=null),la!==null&&Mg(la)&&(la=null),Sf.forEach(zN),Ef.forEach(zN)}function Pg(i,l){i.blockedOn===l&&(i.blockedOn=null,B1||(B1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_q)))}var kg=null;function jN(i){kg!==i&&(kg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){kg===i&&(kg=null);for(var l=0;l<i.length;l+=3){var d=i[l],p=i[l+1],v=i[l+2];if(typeof p!="function"){if(j1(p||d)===null)continue;break}var b=zi(d);b!==null&&(i.splice(l,3),l-=3,z0(b,{pending:!0,data:v,method:d.method,action:p},p,v))}}))}function Ju(i){function l(B){return Pg(B,i)}ia!==null&&Pg(ia,i),aa!==null&&Pg(aa,i),la!==null&&Pg(la,i),Sf.forEach(l),Ef.forEach(l);for(var d=0;d<ua.length;d++){var p=ua[d];p.blockedOn===i&&(p.blockedOn=null)}for(;0<ua.length&&(d=ua[0],d.blockedOn===null);)FN(d),d.blockedOn===null&&ua.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var v=d[p],b=d[p+1],x=v[nt]||null;if(typeof b=="function")x||jN(d);else if(x){var P=null;if(b&&b.hasAttribute("formAction")){if(v=b,x=b[nt]||null)P=x.formAction;else if(j1(v)!==null)continue}else P=x.action;typeof P=="function"?d[p+1]=P:(d.splice(p,3),p-=3),jN(d)}}}function BN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return v=x})},focusReset:"manual",scroll:"manual"})}function l(){v!==null&&(v(),v=null),p||setTimeout(d,20)}function d(){if(!p&&!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 p=!1,v=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),v!==null&&(v(),v=null)}}}function H1(i){this._internalRoot=i}Dg.prototype.render=H1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=ns();MN(d,p,i,l,null,null)},Dg.prototype.unmount=H1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;MN(i.current,2,null,i,null,null),gg(),l[Yr]=null}};function Dg(i){this._internalRoot=i}Dg.prototype.unstable_scheduleHydration=function(i){if(i){var l=wp();i={blockedOn:null,target:i,priority:l};for(var d=0;d<ua.length&&l!==0&&l<ua[d].priority;d++);ua.splice(d,0,i),d===0&&FN(i)}};var HN=e.version;if(HN!=="19.2.7")throw Error(r(527,HN,"19.2.7"));te.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?h(i):null,i=i===null?null:i.stateNode,i};var Aq={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lg.isDisabled&&Lg.supportsFiber)try{Pi=Lg.inject(Aq),lr=Lg}catch{}}return Hf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,p="",v=Y2,b=Z2,x=X2;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=ON(i,1,!1,null,null,d,p,null,v,b,x,BN),i[Yr]=l.current,w1(i),new H1(l)},Hf.hydrateRoot=function(i,l,d){if(!s(i))throw Error(r(299));var p=!1,v="",b=Y2,x=Z2,P=X2,B=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(v=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=ON(i,1,!0,l,d??null,p,v,B,b,x,P,BN),l.context=NN(null),d=l.current,p=ns(),p=Su(p),v=Ki(p),v.callback=null,Yi(d,v,p),d=p,l.current.lanes=d,Do(l,d),fo(l),i[Yr]=l.current,w1(i),new Dg(l)},Hf.version="19.2.7",Hf}var jU;function hme(){if(jU)return tx.exports;jU=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(),tx.exports=fme(),tx.exports}var pme=hme();const gme={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},mme=({onRequest:t,onSseError:e,onSseEvent:n,responseTransformer:r,responseValidator:s,sseDefaultRetryDelay:o,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...h})=>{let g;const m=c??(E=>new Promise(C=>setTimeout(C,E)));return{stream:async function*(){let E=o??3e3,C=0;const w=h.signal??new AbortController().signal;for(;!w.aborted;){C++;const A=h.headers instanceof Headers?h.headers:new Headers(h.headers);g!==void 0&&A.set("Last-Event-ID",g);try{const T={redirect:"follow",...h,body:h.serializedBody,headers:A,signal:w};let R=new Request(f,T);t&&(R=await t(f,T));const N=await(h.fetch??globalThis.fetch)(R);if(!N.ok)throw new Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw new Error("No body in SSE response");const I=N.body.pipeThrough(new TextDecoderStream).getReader();let k="";const F=()=>{try{I.cancel()}catch{}};w.addEventListener("abort",F);try{for(;;){const{done:H,value:D}=await I.read();if(H)break;k+=D,k=k.replace(/\r\n/g,`
|
|
225
|
-
`).replace(/\r/g,`
|
|
226
|
-
`);const z=k.split(`
|
|
227
|
-
|
|
228
|
-
`);k=z.pop()??"";for(const q of z){const V=q.split(`
|
|
229
|
-
`),ee=[];let $;for(const de of V)if(de.startsWith("data:"))ee.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 te,fe=!1;if(ee.length){const de=ee.join(`
|
|
230
|
-
`);try{te=JSON.parse(de),fe=!0}catch{te=de}}fe&&(s&&await s(te),r&&(te=await r(te))),n?.({data:te,event:$,id:g,retry:E}),ee.length&&(yield te)}}}finally{w.removeEventListener("abort",F),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)}}}()}},vme=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},yme=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},bme=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},fz=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(yme(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=vme(r),a=s.map(u=>r==="label"||r==="simple"?t?u:encodeURIComponent(u):Eb({allowReserved:t,name:n,value:u})).join(o);return r==="label"||r==="matrix"?o+a:a},Eb=({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)}`},hz=({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(([h,g])=>{c=[...c,h,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=bme(r),u=Object.entries(s).map(([c,f])=>Eb({allowReserved:t,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Sme=/\{[^{}]+\}/g,Eme=({path:t,url:e})=>{let n=e;const r=e.match(Sme);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,fz({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,hz({explode:o,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(s,`;${Eb({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(s,f)}return n},Cme=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Eme({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function BU(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 wme=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},pz=({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=fz({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=hz({allowReserved:u.allowReserved,explode:!0,name:o,style:"deepObject",value:a,...u.object});c&&s.push(c)}else{const c=Eb({allowReserved:u.allowReserved,name:o,value:a});c&&s.push(c)}}return s.join("&")},xme=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"}},_me=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,Ame=async({security:t,...e})=>{for(const n of t){if(_me(e,n.name))continue;const r=await wme(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}}},HU=t=>Cme({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:pz(t.querySerializer),url:t.url}),$U=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=gz(t.headers,e.headers),n},Tme=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},gz=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?Tme(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 sx{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 Rme=()=>({error:new sx,request:new sx,response:new sx}),Ime=pz({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Ome={"Content-Type":"application/json"},mz=(t={})=>({...gme,headers:Ome,parseAs:"auto",querySerializer:Ime,...t}),Nme=(t={})=>{let e=$U(mz(),t);const n=()=>({...e}),r=f=>(e=$U(e,f),n()),s=Rme(),o=async f=>{const h={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:gz(e.headers,f.headers),serializedBody:void 0};h.security&&await Ame({...h,security:h.security}),h.requestValidator&&await h.requestValidator(h),h.body!==void 0&&h.bodySerializer&&(h.serializedBody=h.bodySerializer(h.body)),(h.body===void 0||h.serializedBody==="")&&h.headers.delete("Content-Type");const g=HU(h);return{opts:h,url:g}},a=async f=>{const{opts:h,url:g}=await o(f),m={redirect:"follow",...h,body:BU(h)};let y=new Request(g,m);for(const M of s.request.fns)M&&(y=await M(y,h));const S=h.fetch;let E;try{E=await S(y)}catch(M){let N=M;for(const I of s.error.fns)I&&(N=await I(M,void 0,y,h));if(N=N||{},h.throwOnError)throw N;return h.responseStyle==="data"?void 0:{error:N,request:y,response:void 0}}for(const M of s.response.fns)M&&(E=await M(E,y,h));const C={request:y,response:E};if(E.ok){const M=(h.parseAs==="auto"?xme(E.headers.get("Content-Type")):h.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 h.responseStyle==="data"?I:{data:I,...C}}let N;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":N=await E[M]();break;case"json":{const I=await E.text();N=I?JSON.parse(I):{};break}case"stream":return h.responseStyle==="data"?E.body:{data:E.body,...C}}return M==="json"&&(h.responseValidator&&await h.responseValidator(N),h.responseTransformer&&(N=await h.responseTransformer(N))),h.responseStyle==="data"?N:{data:N,...C}}const w=await E.text();let A;try{A=JSON.parse(w)}catch{}const T=A??w;let R=T;for(const M of s.error.fns)M&&(R=await M(T,E,y,h));if(R=R||{},h.throwOnError)throw R;return h.responseStyle==="data"?void 0:{error:R,...C}},u=f=>h=>a({...h,method:f}),c=f=>async h=>{const{opts:g,url:m}=await o(h);return mme({...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:BU(g),url:m})};return{buildUrl:HU,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")}},qe=Nme(mz({baseUrl:"https://api.remit.example.com"}));let qU=!1;const Mme=t=>{qU||(qe.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),qU=!0)},Pme=({children:t})=>O.jsx(O.Fragment,{children:t}),kme={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:Pme,Account:({fallback:t=null})=>O.jsx(O.Fragment,{children:t})},vz=_.createContext(kme),Dme=vz.Provider,CRe=()=>_.useContext(vz),Lme=(t,e)=>{M9(t,e.meta)&&$l(t)},Ume=(t,e,n,r)=>{M9(t,r.meta)&&$l(t)},D_=t=>new TextEncoder().encode(t),yz={},L_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),yz[t]=e,L_[e]=t}function Fme(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 L_)e[n/2]=L_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function Fl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=yz[t[n]];return e}const Fh=t=>t instanceof Uint8Array?t:typeof t=="string"?D_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),zme=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class Ci{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 Ci({...e,headers:{...e.headers}});return n.query&&(n.query=jme(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 Ci.clone(this)}}function jme(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class zh{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 WU=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},zl=t=>encodeURIComponent(t).replace(/[!'()*]/g,Bme),Bme=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function SR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=zl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${zl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${zl(r)}`),e.push(s)}}return e.join("&")}const hm="[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 hm;const s=r.split(`
|
|
231
|
-
`);if(s.length<4)return hm;const o=s[3];if(!o)return hm;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",h=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${h}]`}return`[aws-rum-web:${u}]`}}catch{}return hm}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 VU=2048,GU=.2,Hme=()=>typeof CompressionStream<"u",$me=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},qme=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!Hme())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<VU)return be.debug(`Payload size ${e}B below threshold ${VU}B, skipping compression`),{body:t,compressed:!1};const n=await $me(t),r=1-n.length/e;return r>=GU?(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 ${GU*100}%, skipping`),{body:t,compressed:!1})},Wme="POST",Vme="application/json",Gme="text/plain;charset=UTF-8",Kme=64e3;class Yme{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(KU(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 qme(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,c,Vme,f);let g=new Ci(h);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(KU(r));if(s.length>Kme)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,Gme,!1);let a=new Ci(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:Wme,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 KU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Zme(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},Zme=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class Xme{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new zh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=SR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const Qme=(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 Jme=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=SR(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 h=new Request(u,f),g=[this.fetchFunction.apply(window,[h]).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 zh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new zh({headers:S,statusCode:m.status,body:C})}))}),Qme(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{}}},pm;const eve=new Uint8Array(16);function tve(){if(!pm&&(pm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pm(eve)}const tr=[];for(let t=0;t<256;++t)tr.push((t+256).toString(16).slice(1));function nve(t,e=0){return tr[t[e+0]]+tr[t[e+1]]+tr[t[e+2]]+tr[t[e+3]]+"-"+tr[t[e+4]]+tr[t[e+5]]+"-"+tr[t[e+6]]+tr[t[e+7]]+"-"+tr[t[e+8]]+tr[t[e+9]]+"-"+tr[t[e+10]]+tr[t[e+11]]+tr[t[e+12]]+tr[t[e+13]]+tr[t[e+14]]+tr[t[e+15]]}const rve=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),YU={randomUUID:rve};function gh(t,e,n){if(YU.randomUUID&&!t)return YU.randomUUID();t=t||{};const r=t.random||(t.rng||tve)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,nve(r)}const ER=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},bz=[];for(let t=0;t<256;t++)bz[t]=(t+256).toString(16).substr(1);const Cb="X-Amzn-Trace-Id",wb="traceparent",sve=2,ove=32,ive=16,ave=4,Sz=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,Ez={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},lve=t=>200<=t&&t<300,Cz=t=>Math.floor(t/100)===4,CR=t=>Math.floor(t/100)===5,wR=t=>t===429,wz=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Rc=()=>Date.now()/1e3,uve=(t,e,n)=>{const r={request:{}};return r.request.method=e?.method?e.method:"GET",r.request.traced=n,r.request.url=hv(t),r},xz=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:Tz(),start_time:e,trace_id:n?gve():pve(),end_time:void 0,subsegments:[],in_progress:!1}),_z=(t,e,n)=>{const r={id:Tz(),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},Az=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},cve=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[wb]=_R(e,n):t.headers[Cb]=xR(e,n)},dve=(t,e,n,r)=>{r?t.set(wb,_R(e,n)):t.set(Cb,xR(e,n))},xR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",_R=(t,e)=>"00-"+t+"-"+e+"-01",fve=t=>t?.length===ave&&t[0].length===sve&&t[1].length===ove&&t[2].length===ive&&(t[3]==="00"||t[3]==="01"),hve=(t,e)=>{var n,r;const s={};if(t)if(e){const o=(n=t.get(wb))===null||n===void 0?void 0:n.split("-");o&&fve(o)&&(s.traceId=o[1],s.segmentId=o[2])}else{const o=(r=t.get(Cb))===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},hv=t=>t.url?t.url:t.toString(),pve=()=>`1-${mve()}-${vve()}`,gve=()=>{const t=new Uint8Array(16);return ER(t),`${AR(t)}`},Tz=()=>{const t=new Uint8Array(8);return ER(t),AR(t)},mve=()=>Math.floor(Date.now()/1e3).toString(16),vve=()=>{const t=new Uint8Array(12);return ER(t),AR(t)},AR=t=>{let e="";for(let n=0;n<t.length;n++)e+=bz[t[n]];return e};class yve{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(lve(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!wR(r)&&!CR(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 Gc="cwr_c",Wv="cwr_i",Vv="cwr_s",Gv="cwr_u",bve=3e4,Sve="arw-module",ZU="CWR: Cannot dispatch; no AWS credentials.";class Eve{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 h=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new Yme({fetchRequestHandler:new yve(new Jme({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new Xme,endpoint:a,region:u,credentials:c,headers:this.headers,compressionStrategy:f},h)},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(ZU)),sendBeacon:()=>Promise.reject(new Error(ZU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Gc}_${e}`:Gc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Wv}_${e}`:Wv}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:gh(),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 Rz={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),Rz[t]=e}function Cve(t){let e="";for(let n=0;n<t.byteLength;n++)e+=Rz[t[n]];return e}class wve{format(e){const n=[];for(const o of Object.keys(e)){const a=D_(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?xs.boolTrue:xs.boolFalse]);case"byte":return Uint8Array.from([xs.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,xs.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,xs.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=xs.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,xs.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=D_(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,xs.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const h=new Uint8Array(9);return h[0]=xs.timestamp,h.set(TR.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!xve.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=xs.uuid,g.set(Fme(e.value.replace(/-/g,"")),1),g}}}var xs;(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"})(xs||(xs={}));const xve=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class TR{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&&XU(n),new TR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&XU(e),parseInt(Fl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function XU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const _ve="X-Amz-Algorithm",Ave="X-Amz-Credential",Iz="X-Amz-Date",Tve="X-Amz-SignedHeaders",Rve="X-Amz-Expires",Oz="X-Amz-Signature",Nz="X-Amz-Security-Token",Mz="authorization",Pz=Iz.toLowerCase(),Ive="date",Ove=[Mz,Pz,Ive],Nve=Oz.toLowerCase(),U_="x-amz-content-sha256",Mve=Nz.toLowerCase(),Pve={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},kve=/^proxy-/,Dve=/^sec-/,ox="AWS4-HMAC-SHA256",Lve="AWS4-HMAC-SHA256-PAYLOAD",Uve="UNSIGNED-PAYLOAD",Fve=50,kz="aws4_request",zve=3600*24*7,jve=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===Nve)continue;const s=zl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${zl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${zl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},Bve=t=>Hve(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Hve=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class $ve{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=WU(r),this.credentialProvider=WU(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
|
|
232
|
-
${this.getCanonicalPath(e)}
|
|
233
|
-
${jve(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(Fh(r));const a=await o.digest();return`${s}
|
|
239
|
-
${e}
|
|
240
|
-
${n}
|
|
241
|
-
${Fl(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 zl(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=Bve(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const gm={},ix=[],ax=(t,e,n)=>`${t}/${e}/${n}/${kz}`,qve=async(t,e,n,r,s)=>{const o=await QU(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${Fl(o)}:${e.sessionToken}`;if(a in gm)return gm[a];for(ix.push(a);ix.length>Fve;)delete gm[ix.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,kz])u=await QU(t,u,c);return gm[a]=u},QU=(t,e,n)=>{const r=new t(e);return r.update(Fh(n)),r.digest()},JU=({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 Pve||e?.has(o)||kve.test(o)||Dve.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},lx=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===U_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||zme(e)){const r=new n;return r.update(Fh(e)),Fl(await r.digest())}return Uve},Wve=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},Vve=(t,e={})=>{const{headers:n,query:r={}}=Ci.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}},e4=t=>{t=Ci.clone(t);for(const e of Object.keys(t.headers))Ove.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class Gve extends $ve{headerFormatter=new wve;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:h}=n,g=await this.credentialProvider();this.validateResolvedCredentials(g);const m=f??await this.regionProvider(),{longDate:y,shortDate:S}=this.formatDate(r);if(s>zve)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=ax(S,m,h??this.service),C=Vve(e4(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Nz]=g.sessionToken),C.query[_ve]=ox,C.query[Ave]=`${g.accessKeyId}/${E}`,C.query[Iz]=y,C.query[Rve]=s.toString(10);const w=JU(C,o,u);return C.query[Tve]=this.getCanonicalHeaderList(w),C.query[Oz]=await this.getSignature(y,E,this.getSigningKey(g,m,S,h),this.createCanonicalRequest(C,w,await lx(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:h}=this.formatDate(r),g=ax(f,c,a??this.service),m=await lx({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=Fl(await y.digest()),E=[Lve,h,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(Fh(e)),Fl(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=e4(e),{longDate:h,shortDate:g}=this.formatDate(n),m=ax(g,c,a??this.service);f.headers[Pz]=h,u.sessionToken&&(f.headers[Mve]=u.sessionToken);const y=await lx(f,this.sha256);!Wve(U_,f.headers)&&this.applyChecksum&&(f.headers[U_]=y);const S=JU(f,s,r),E=await this.getSignature(h,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Mz]=`${ox} 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,ox),a=new this.sha256(await r);return a.update(Fh(o)),Fl(await a.digest())}getSigningKey(e,n,r,s){return qve(this.sha256,e,r,n,s||this.service)}}const Kve="rum",Yve={expiresIn:60},Zve=(t,e)=>{const n=new Gve({applyChecksum:!0,credentials:t,region:e,service:Kve,uriEscapePath:!0,sha256:Bl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Yve),hashAndEncode:async r=>{const s=new Bl;return s.update(r),Cve(await s.digest()).toLowerCase()}}};function t4(t,e){return new Request(t,e)}function Xve(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 ux={supported:void 0};class xb{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new xb(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(n=>n||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),ux.supported===void 0&&(ux.supported=typeof Request<"u"&&"keepalive"in t4("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 A=n4(n);return Promise.reject(A)}let u=e.path;const c=SR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const A=e.username??"",T=e.password??"";f=`${A}:${T}@`}const{port:h,method:g}=e,m=`${e.protocol}//${f}${e.hostname}${h?`:${h}`:""}${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),ux.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=t4(m,S),w=[fetch(C).then(A=>{const T=A.headers,R={};for(const N of T.entries())R[N[0]]=N[1];return A.body!=null?{response:new zh({headers:R,reason:A.statusText,statusCode:A.status,body:A.body})}:A.blob().then(N=>({response:new zh({headers:R,reason:A.statusText,statusCode:A.status,body:N})}))}),Xve(s)];return n&&w.push(new Promise((A,T)=>{const R=()=>{const M=n4(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 n4(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 cx=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},Qve=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},Jve="POST",eye="application/x-www-form-urlencoded",tye="https:",nye="AssumeRoleWithWebIdentity",rye="2011-06-15";class sye{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:nye,Version:rye}),s=new URLSearchParams(Object.entries(r)).toString(),o=new Ci({method:Jve,headers:{"content-type":eye,host:this.hostname},protocol:tye,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await Qve(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 oye="POST",iye="application/x-amz-json-1.1",aye="https:",lye="AWSCognitoIdentityService.GetId",uye="AWSCognitoIdentityService.GetOpenIdToken",cye="AWSCognitoIdentityService.GetCredentialsForIdentity";class dye{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(lye,a),c=await cx((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(uye,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await cx(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(cye,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await cx(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:h,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 Ci({method:oye,headers:{"content-type":iye,"x-amz-target":r},protocol:aye,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?`${Wv}_${e.applicationId}`:Wv}}class Dz{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 dye({fetchRequestHandler:new xb,region:r,clientConfig:e,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Gc}_${n}`:Gc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const e=new Date(this.credentials.expiration.getTime()-bve);return new Date>e}}class fye extends Dz{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 sye({fetchRequestHandler:new xb,region:r})}}class hye extends Dz{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 hs="com.amazon.rum",pye="com.amazonaws.rum",Kv=`${hs}.http_event`,Lz=`${hs}.xray_trace_event`,gye=`${hs}.largest_contentful_paint_event`,mye=`${hs}.first_input_delay_event`,vye=`${hs}.cumulative_layout_shift_event`,yye=`${hs}.interaction_to_next_paint_event`,F_=`${hs}.performance_navigation_event`,Uz=`${hs}.performance_resource_event`,bye=`${hs}.dom_event`,Sye=`${hs}.js_error_event`,Eye=`${hs}.page_view_event`,z_=`${hs}.session_start_event`,r4=`${hs}.rrweb_event`;class Ns{constructor(e){this.enabled=!0,this.pluginId=Ns.generatePluginId(e)}static generatePluginId(e){return`${Ns.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Ns.idPrefix=pye;class Cye{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(Ns.generatePluginId(e))}}const s4=(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},wye=(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},o4=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var mh;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(mh||(mh={}));const xye=()=>{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"}},mm="00000000-0000-0000-0000-000000000000",_ye="desktop",Aye="web";class Tye{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?`${Vv}_${this.appMonitorDetails.id}`:Vv,this.session={sessionId:mm,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===mm?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(z_,{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:mm}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||gh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=gh()}createOrRenewSessionCookie(e,n){btoa&&s4(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){s4(Gv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return o4(Gv)}getSessionFromCookie(){if(this.useCookies()){const e=o4(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:gh(),record:this.session.sessionId===mm?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(z_,{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=xye();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:_ye,platformType:Aye,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 Rye{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(Eye,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 jh;(function(t){t.EVENT="event"})(jh||(jh={}));class Fz{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 Iye="3.1.0",Oye=new Set(["pageId","parentPageId","interaction","pageTags","title"]),dx=(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")&&Oye.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 Nye{constructor(e,n,r=new Fz){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!==z_&&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(jh.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=dx(a,"event");let h={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(h=dx(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),h),f),m={id:gh(),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 Rye(n,this.recordEvent),this.sessionManager=new Tye(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(dx(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":Iye})}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 Tn;(function(t){t.OTHER="other",t.STYLESHEET="stylesheet",t.DOCUMENT="document",t.SCRIPT="script",t.IMAGE="image",t.FONT="font"})(Tn||(Tn={}));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 i4=t=>[t.startTime,t.duration].join("#"),Mye=[{name:Tn.STYLESHEET,list:["css","less"]},{name:Tn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:Tn.SCRIPT,list:["js"]},{name:Tn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:Tn.FONT,list:["fnt","fon","otf","ttf","woff"]}],a4=(t,e)=>{let n=Tn.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];Mye.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===Tn.OTHER)switch(e){case ai.IMAGE:case ai.IMG:case ai.INPUT:n=Tn.IMAGE;break;case ai.IFRAME:case ai.FRAME:n=Tn.DOCUMENT;break;case ai.SCRIPT:n=Tn.SCRIPT;break;case ai.CSS:n=Tn.STYLESHEET;break}return n},Pye=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),kye=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,Dye=(t,e)=>{try{return new URL(t).hostname===e&&kye.test(t)}catch{return!1}},zz="dom-event",Lye={interactionId:()=>"",enableMutationObserver:!1,events:[]};class RR extends Ns{constructor(e){super(zz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},Lye),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=RR.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(bye,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 Uye=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},Fye=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},zye=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},jye=(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)},jz=t=>t!==Object(t)&&t!==void 0&&t!==null,IR=(t,e)=>{const n=Fye(t),r=t.error;return Uye(r)?jye(n,r,e):jz(r)&&zye(n,r),n},Bz="js-error",Bye={stackTraceLength:1e3,ignore:()=>!1};class Hye extends Ns{constructor(e){super(Bz),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({},Bye),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(Sye,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 $ye=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),OR={eventLimit:10,ignore:$ye,recordAllTypes:[Tn.DOCUMENT,Tn.SCRIPT,Tn.STYLESHEET,Tn.FONT],sampleTypes:[Tn.IMAGE,Tn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},qye="navigation",uc="navigation",fx="load";class Wye extends Ns{constructor(e){super(qye),this.eventListener=()=>{performance.getEntriesByType(uc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===uc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[uc]})},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(F_,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(F_,s)},this.config=Object.assign(Object.assign({},OR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(fx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(fx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(uc).length?!!window.performance.getEntriesByType(uc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(uc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(fx,this.eventListener))}}var hx,l4;function Vye(){if(l4)return hx;l4=1;function t(c){return typeof c=="function"}var e=console.error.bind(console);function n(c,f,h){var g=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:g,writable:!0,value:h})}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,h){if(!c||!c[f]){e("no original function "+f+" to wrap");return}if(!h){e("no wrapper function"),e(new Error().stack);return}if(!t(c[f])||!t(h)){e("original object and wrapper must be functions");return}var g=c[f],m=h(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,h){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,h)})})}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(h){f.forEach(function(g){a(h,g)})})}return r.wrap=s,r.massWrap=o,r.unwrap=a,r.massUnwrap=u,hx=r,hx}var Yv=Vye();const Gye=Va(Yv),u4=g6({__proto__:null,default:Gye},[Yv]);class NR extends Ns{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const e=Yv.wrap.bind(u4);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Yv.unwrap.bind(u4);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 Kye="page-view";class Yye extends NR{constructor(){super(Kye),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 mh.PathAndHash:return e&&n?e+n:e||n||"";case mh.Hash:return n||"";case mh.Path:default:return e||""}}}const Zye="resource",px="resource";class Xye extends Ns{constructor(e){super(Zye),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==px||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=a4(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(!Dye(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:a4(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(Uz,c)}},this.config=Object.assign(Object.assign({},OR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:px,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:px,buffered:!0})}}var j_,c4,_b=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},MR=function(t){if(document.readyState==="loading")return"loading";var e=_b();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"},Qye=function(t){var e=t.nodeName;return t.nodeType===1?e.toLowerCase():e.toUpperCase().replace(/^#/,"")},Ab=function(t,e){var n="";try{for(;t&&t.nodeType!==9;){var r=t,s=r.id?"#"+r.id:Qye(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},Hz=-1,Jye=function(){return Hz},Sd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Hz=e.timeStamp,t(e))}),!0)},PR=function(){var t=_b();return t&&t.activationStart||0},Io=function(t,e){var n=_b(),r="navigate";return Jye()>=0?r="back-forward-cache":n&&(document.prerendering||PR()>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}},fu=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))}},kR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},hp=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},Tb=function(t){var e=!1;return function(){e||(t(),e=!0)}},Ic=-1,d4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Zv=function(t){document.visibilityState==="hidden"&&Ic>-1&&(Ic=t.type==="visibilitychange"?t.timeStamp:0,ebe())},f4=function(){addEventListener("visibilitychange",Zv,!0),addEventListener("prerenderingchange",Zv,!0)},ebe=function(){removeEventListener("visibilitychange",Zv,!0),removeEventListener("prerenderingchange",Zv,!0)},DR=function(){return Ic<0&&(Ic=d4(),f4(),Sd((function(){setTimeout((function(){Ic=d4(),f4()}),0)}))),{get firstHiddenTime(){return Ic}}},Rb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},h4=[1800,3e3],tbe=function(t,e){e=e||{},Rb((function(){var n,r=DR(),s=Io("FCP"),o=fu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-PR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=Oo(t,s,h4,e.reportAllChanges),Sd((function(a){s=Io("FCP"),n=Oo(t,s,h4,e.reportAllChanges),kR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},p4=[.1,.25],nbe=function(t,e){(function(n,r){r=r||{},tbe(Tb((function(){var s,o=Io("CLS",0),a=0,u=[],c=function(h){h.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=fu("layout-shift",c);f&&(s=Oo(n,o,p4,r.reportAllChanges),hp((function(){c(f.takeRecords()),s(!0)})),Sd((function(){a=0,o=Io("CLS",0),s=Oo(n,o,p4,r.reportAllChanges),kR((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,h){return f&&f.value>h.value?f:h}));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:Ab(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:MR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},$z=0,gx=1/0,vm=0,rbe=function(t){t.forEach((function(e){e.interactionId&&(gx=Math.min(gx,e.interactionId),vm=Math.max(vm,e.interactionId),$z=vm?(vm-gx)/7+1:0)}))},qz=function(){return j_?$z:performance.interactionCount||0},sbe=function(){"interactionCount"in performance||j_||(j_=fu("event",rbe,{type:"event",buffered:!0,durationThreshold:0}))},Vs=[],vh=new Map,Wz=0,obe=function(){var t=Math.min(Vs.length-1,Math.floor((qz()-Wz)/50));return Vs[t]},Vz=[],ibe=function(t){if(Vz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Vs[Vs.length-1],n=vh.get(t.interactionId);if(n||Vs.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]};vh.set(r.id,r),Vs.push(r)}Vs.sort((function(s,o){return o.latency-s.latency})),Vs.length>10&&Vs.splice(10).forEach((function(s){return vh.delete(s.id)}))}}},LR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=Tb(t),document.visibilityState==="hidden"?t():(n=e(t),hp(t)),n},g4=[200,500],abe=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},Rb((function(){var n;sbe();var r,s=Io("INP"),o=function(u){LR((function(){u.forEach(ibe);var c=obe();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=fu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=Oo(t,s,g4,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),hp((function(){o(a.takeRecords()),r(!0)})),Sd((function(){Wz=qz(),Vs.length=0,vh.clear(),s=Io("INP"),r=Oo(t,s,g4,e.reportAllChanges)})))})))},zc=[],_a=[],B_=0,UR=new WeakMap,jc=new Map,H_=-1,lbe=function(t){zc=zc.concat(t),Gz()},Gz=function(){H_<0&&(H_=LR(ube))},ube=function(){jc.size>10&&jc.forEach((function(a,u){vh.has(u)||jc.delete(u)}));var t=Vs.map((function(a){return UR.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];Yz(s.startTime,s.processingEnd).forEach((function(a){n.add(a)}))}var o=zc.length-1-50;zc=zc.filter((function(a,u){return a.startTime>B_&&u>o||n.has(a)})),H_=-1};Vz.push((function(t){t.interactionId&&t.target&&!jc.has(t.interactionId)&&jc.set(t.interactionId,t.target)}),(function(t){var e,n=t.startTime+t.duration;B_=Math.max(B_,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")&&UR.set(t,e),Gz()}));var Aa,yh,Kz,Xv,Yz=function(t,e){for(var n,r=[],s=0;n=zc[s];s++)if(!(n.startTime+n.duration<t)){if(n.startTime>e)break;r.push(n)}return r},cbe=function(t,e){c4||(c4=fu("long-animation-frame",lbe)),abe((function(n){var r=(function(s){var o=s.entries[0],a=UR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),h=Yz(o.startTime,c),g=s.entries.find((function(C){return C.target})),m=g&&g.target||jc.get(o.interactionId),y=[o.startTime+o.duration,c].concat(h.map((function(C){return C.startTime+C.duration}))),S=Math.max.apply(Math,y),E={interactionTarget:Ab(m),interactionTargetElement:m,interactionType:o.name.startsWith("key")?"keyboard":"pointer",interactionTime:o.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:h,inputDelay:u-o.startTime,processingDuration:c-u,presentationDelay:Math.max(S-c,0),loadState:MR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},m4=[2500,4e3],mx={},dbe=function(t,e){(function(n,r){r=r||{},Rb((function(){var s,o=DR(),a=Io("LCP"),u=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-PR(),0),a.entries=[g],s())}))},c=fu("largest-contentful-paint",u);if(c){s=Oo(n,a,m4,r.reportAllChanges);var f=Tb((function(){mx[a.id]||(u(c.takeRecords()),c.disconnect(),mx[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return LR(f)}),{once:!0,capture:!0})})),hp(f),Sd((function(h){a=Io("LCP"),s=Oo(n,a,m4,r.reportAllChanges),kR((function(){a.value=performance.now()-h.timeStamp,mx[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=_b();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],h=Math.max(0,a.responseStart-u),g=Math.max(h,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:Ab(c.element),timeToFirstByte:h,resourceLoadDelay:g-h,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)},ih={passive:!0,capture:!0},fbe=new Date,v4=function(t,e){Aa||(Aa=e,yh=t,Kz=new Date,Xz(removeEventListener),Zz())},Zz=function(){if(yh>=0&&yh<Kz-fbe){var t={entryType:"first-input",name:Aa.type,target:Aa.target,cancelable:Aa.cancelable,startTime:Aa.timeStamp,processingStart:Aa.timeStamp+yh};Xv.forEach((function(e){e(t)})),Xv=[]}},hbe=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(){v4(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",s,ih),removeEventListener("pointercancel",o,ih)};addEventListener("pointerup",s,ih),addEventListener("pointercancel",o,ih)})(e,t):v4(e,t)}},Xz=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,hbe,ih)}))},y4=[100,300],pbe=function(t,e){e=e||{},Rb((function(){var n,r=DR(),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=fu("first-input",a);n=Oo(t,s,y4,e.reportAllChanges),u&&(hp(Tb((function(){a(u.takeRecords()),u.disconnect()}))),Sd((function(){var c;s=Io("FID"),n=Oo(t,s,y4,e.reportAllChanges),Xv=[],yh=-1,Aa=null,Xz(addEventListener),c=o,Xv.push(c),Zz()})))}))},gbe=function(t,e){pbe((function(n){var r=(function(s){var o=s.entries[0],a={eventTarget:Ab(o.target),eventType:o.name,eventTime:o.startTime,eventEntry:o,loadState:MR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const mbe="web-vitals";class vbe extends Ns{constructor(e){super(mbe),this.resourceEventIds=new Map,this.cacheLCPCandidates=Pye(),this.handleEvent=n=>{switch(n.type){case Uz:const r=n.details;this.cacheLCPCandidates&&r.fileType===Tn.IMAGE&&this.resourceEventIds.set(i4(n.details),n.id);break;case F_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},OR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(jh.EVENT,this.handleEvent),dbe(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),gbe(e=>this.handleFID(e)),nbe(e=>this.handleCLS(e),{reportAllChanges:!0}),cbe(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=i4(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(gye,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(jh.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)(vye,{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(mye,{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)(yye,{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 ybe="fetch";class bbe extends NR{constructor(e){super(ybe),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=Rc(),a=uve(n,r,!0),u=xz(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=_z(Az(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 dve(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),cve(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Rc();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},wR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):Cz(r.status)?(n.subsegments[0].error=!0,n.error=!0):CR(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):jz(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(Lz,n)}},this.createHttpEvent=(n,r)=>{const s=n;return{version:"1.0.0",request:{url:hv(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(Kv,n))},this.recordHttpEventWithError=(n,r)=>{n.error=IR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Kv,n)},this.fetch=(n,r,s,o,a)=>{const u=this.createHttpEvent(o,a);let c;if(!wz(hv(o),this.config))return n.apply(r,s);const f=hve(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(h=>(this.endTrace(c,h,void 0),this.recordHttpEventWithResponse(u,h),h)).catch(h=>{throw this.endTrace(c,void 0,h),this.recordHttpEventWithError(u,h),h})},this.fetchWrapper=()=>{const n=this;return r=>function(s,o){return n.fetch(r,this,arguments,s,o)}},this.config=Object.assign(Object.assign({},Ez),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=hv(e);return Sz(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 Sbe extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Ebe="xhr";class Cbe extends NR{constructor(e){super(Ebe),this.addXRayTraceIdHeader=n=>Sz(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=Rc();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},wR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):Cz(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):CR(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=Rc();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 Sbe(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=Rc();n.trace=xz(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(_z(Az(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(wb,_R(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(Cb,xR(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 wz(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},Ez),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=Rc();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(Kv,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(Kv,s)}recordTraceEvent(e){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(Lz,e)}}var Qv={},wbe=Object.defineProperty,xbe=(t,e,n)=>e in t?wbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>xbe(t,typeof e!="symbol"?e+"":e,n),b4,_be=Object.defineProperty,Abe=(t,e,n)=>e in t?_be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S4=(t,e,n)=>Abe(t,typeof e!="symbol"?e+"":e,n),kn=(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))(kn||{});const E4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},C4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ym={},Tbe=()=>!!globalThis.Zone;function FR(t){if(ym[t])return ym[t];const e=globalThis[t],n=e.prototype,r=t in E4?E4[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 C4?C4[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&&!Tbe())return ym[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?ym[t]=f:n}catch{return n}}const vx={};function Oi(t,e,n){var r;const s=`${t}.${String(n)}`;if(vx[s])return vx[s].call(e);const o=FR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(vx[s]=a,a.call(e)):e[n]}const yx={};function Qz(t,e,n){const r=`${t}.${String(n)}`;if(yx[r])return yx[r].bind(e);const o=FR(t)[n];return typeof o!="function"?e[n]:(yx[r]=o,o.bind(e))}function Rbe(t){return Oi("Node",t,"ownerDocument")}function Ibe(t){return Oi("Node",t,"childNodes")}function Obe(t){return Oi("Node",t,"parentNode")}function Nbe(t){return Oi("Node",t,"parentElement")}function Mbe(t){return Oi("Node",t,"textContent")}function Pbe(t,e){return Qz("Node",t,"contains")(e)}function kbe(t){return Qz("Node",t,"getRootNode")()}function Dbe(t){return!t||!("host"in t)?null:Oi("ShadowRoot",t,"host")}function Lbe(t){return t.styleSheets}function Ube(t){return!t||!("shadowRoot"in t)?null:Oi("Element",t,"shadowRoot")}function Fbe(t,e){return Oi("Element",t,"querySelector")(e)}function zbe(t,e){return Oi("Element",t,"querySelectorAll")(e)}function jbe(){return FR("MutationObserver").constructor}function Bbe(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 dr={ownerDocument:Rbe,childNodes:Ibe,parentNode:Obe,parentElement:Nbe,textContent:Mbe,contains:Pbe,getRootNode:kbe,host:Dbe,styleSheets:Lbe,shadowRoot:Ube,querySelector:Fbe,querySelectorAll:zbe,mutationObserver:jbe,patch:Bbe};function Jz(t){return t.nodeType===t.ELEMENT_NODE}function bh(t){const e=t&&"host"in t&&"mode"in t&&dr.host(t)||null;return!!(e&&"shadowRoot"in e&&dr.shadowRoot(e)===t)}function Sh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Hbe(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 $be(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 $_(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=>ej(s,n)).join("");return Hbe(r)}catch{return null}}function ej(t,e){if(Wbe(t)){let n;try{n=$_(t.styleSheet)||$be(t)}catch{n=t.cssText}return t.styleSheet.href?ty(n,t.styleSheet.href):n}else{let n=t.cssText;return Vbe(t)&&t.selectorText.includes(":")&&(n=qbe(n)),e?ty(n,e):n}}function qbe(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function Wbe(t){return"styleSheet"in t}function Vbe(t){return"selectorText"in t}class tj{constructor(){S4(this,"idNodeMap",new Map),S4(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 Gbe(){return new tj}function Jv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Xl(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Xl(t){return t.toLowerCase()}const w4="__rrweb_original__";function Kbe(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=w4 in o?o[w4]: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 ey(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Xl(e):null}function nj(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 Ybe(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const Zbe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Xbe=/^(?:[a-z+]+:)?\/\//i,Qbe=/^www\..*/i,Jbe=/^(data:)([^,]*),(.*)/i;function ty(t,e){return(t||"").replace(Zbe,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(Xbe.test(c)||Qbe.test(c))return`url(${f}${c}${f})`;if(Jbe.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${Ybe(e)+c}${f})`;const h=e.split("/"),g=c.split("/");h.pop();for(const m of g)m!=="."&&(m===".."?h.pop():h.push(m));return`url(${f}${h.join("/")}${f})`})}function bm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function e0e(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=bm(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=bm(r[c].textContent,n),h=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=h+1}else g===f.length-1&&(S=a.indexOf(m));if(y.length>=2&&g>h){const E=r[c-1].textContent;if(E&&typeof E=="string"){const C=bm(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=bm(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 t0e(t,e){return e0e(t,e).join("/* rr_split */")}let n0e=1;const r0e=new RegExp("[^a-z0-9-_:]"),Bh=-2;function rj(){return n0e++}function s0e(t){if(t instanceof HTMLFormElement)return"form";const e=Xl(t.tagName);return r0e.test(e)?"div":e}let cc,x4;const o0e=/^[^ \t\n\r\u000c]+/,i0e=/^[, \t\n\r\u000c]+/;function a0e(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(i0e),!(n>=e.length);){let o=r(o0e);if(o.slice(-1)===",")o=Oc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=Oc(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 _4=new WeakMap;function Oc(t,e){return!e||e.trim()===""?e:zR(t,e)}function l0e(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function zR(t,e){let n=_4.get(t);if(n||(n=t.createElement("a"),_4.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function sj(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)?Oc(t,r):n==="srcset"?a0e(t,r):n==="style"?ty(r,zR(t)):e==="object"&&n==="data"?Oc(t,r):r)}function oj(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function u0e(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 ny(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?ny(dr.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?ny(dr.parentNode(t),e,n):!1}function ij(t,e,n,r){let s;if(Jz(t)){if(s=t,!dr.childNodes(s).length)return!1}else{if(dr.parentElement(t)===null)return!1;s=dr.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(ny(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 c0e(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 d0e(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 f0e(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:h,dataURLOptions:g={},inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:C=!1}=e,w=h0e(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:kn.Document,childNodes:[],compatMode:t.compatMode}:{type:kn.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:kn.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return g0e(t,{doc:n,blockClass:s,blockSelector:o,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:S,newlyAddedElement:E,rootId:w});case t.TEXT_NODE:return p0e(t,{doc:n,needsMask:a,maskTextFn:f,rootId:w,cssCaptured:C});case t.CDATA_SECTION_NODE:return{type:kn.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:kn.Comment,textContent:dr.textContent(t)||"",rootId:w};default:return!1}}function h0e(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function p0e(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=dr.parentNode(t),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0;return h?c="SCRIPT_PLACEHOLDER":o||(c=dr.textContent(t),f&&c&&(c=ty(c,zR(e.doc)))),!f&&!h&&c&&n&&(c=r?r(c,dr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:kn.Text,textContent:c||"",rootId:s}}function g0e(t,e){const{doc:n,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:y}=e,S=u0e(t,r,s),E=s0e(t);let C={};const w=t.attributes.length;for(let T=0;T<w;T++){const R=t.attributes[T];oj(E,R.name,R.value)||(C[R.name]=sj(n,E,Xl(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=$_(T)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let T=$_(t.sheet);T&&(t.childNodes.length>1&&(T=t0e(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=Jv({element:t,type:ey(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"&&h){if(t.__context==="2d")Kbe(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){cc||(cc=n.createElement("canvas"),x4=cc.getContext("2d"));const T=t,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",M=T.crossOrigin,N=()=>{T.removeEventListener("load",N);try{cc.width=T.naturalWidth,cc.height=T.naturalHeight,x4.drawImage(T,0,0),C.rr_dataURL=cc.toDataURL(c.type,c.quality)}catch(I){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?N():T.addEventListener("load",N);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?N():T.addEventListener("load",N)}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 A;try{customElements.get(E)&&(A=!0)}catch{}return{type:kn.Element,tagName:E,attributes:C,childNodes:[],isSVG:l0e(t)||void 0,needBlock:S,rootId:y,isCustom:A}}function Vt(t){return t==null?"":t.toLowerCase()}function aj(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 m0e(t,e){if(e.comment&&t.type===kn.Comment)return!0;if(t.type===kn.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"&&nj(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Vt(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Vt(t.attributes.name)==="application-name"||Vt(t.attributes.rel)==="icon"||Vt(t.attributes.rel)==="apple-touch-icon"||Vt(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Vt(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Vt(t.attributes.property).match(/^(og|twitter|fb):/)||Vt(t.attributes.name).match(/^(og|twitter):/)||Vt(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Vt(t.attributes.name)==="robots"||Vt(t.attributes.name)==="googlebot"||Vt(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Vt(t.attributes.name)==="author"||Vt(t.attributes.name)==="generator"||Vt(t.attributes.name)==="framework"||Vt(t.attributes.name)==="publisher"||Vt(t.attributes.name)==="progid"||Vt(t.attributes.property).match(/^article:/)||Vt(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Vt(t.attributes.name)==="google-site-verification"||Vt(t.attributes.name)==="yandex-verification"||Vt(t.attributes.name)==="csrf-token"||Vt(t.attributes.name)==="p:domain_verify"||Vt(t.attributes.name)==="verify-v1"||Vt(t.attributes.name)==="verification"||Vt(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Nc(t,e){const{doc:n,mirror:r,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:w,onIframeLoad:A,iframeLoadTimeout:T=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:I=!1,cssCaptured:k=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:H=!0}=e;F||(F=ij(t,a,u,F===void 0));const D=f0e(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,dataURLOptions:S,inlineImages:E,recordCanvas:C,keepIframeSrcFn:N,newlyAddedElement:I,cssCaptured:k});if(!D)return console.warn(t,"not serialized"),null;let z;r.hasNode(t)?z=r.getId(t):m0e(D,y)||!H&&D.type===kn.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?z=Bh:z=rj();const q=Object.assign(D,{id:z});if(r.add(t,q),z===Bh)return null;w&&w(t);let V=!c;if(q.type===kn.Element){V=V&&!q.needBlock,delete q.needBlock;const $=dr.shadowRoot(t);$&&Sh($)&&(q.isShadowHost=!0)}if((q.type===kn.Document||q.type===kn.Element)&&V){y.headWhitespace&&q.type===kn.Element&&q.tagName==="head"&&(H=!1);const $={doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N,cssCaptured:!1};if(!(q.type===kn.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0)){q.type===kn.Element&&q.attributes._cssText!==void 0&&typeof q.attributes._cssText=="string"&&($.cssCaptured=!0);for(const fe of Array.from(dr.childNodes(t))){const de=Nc(fe,$);de&&q.childNodes.push(de)}}let te=null;if(Jz(t)&&(te=dr.shadowRoot(t)))for(const fe of Array.from(dr.childNodes(te))){const de=Nc(fe,$);de&&(Sh(te)&&(de.isShadow=!0),q.childNodes.push(de))}}const ee=dr.parentNode(t);return ee&&bh(ee)&&Sh(ee)&&(q.isShadow=!0),q.type===kn.Element&&q.tagName==="iframe"&&c0e(t,()=>{const $=t.contentDocument;if($&&A){const te=Nc($,{doc:$,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});te&&A(t,te)}},T),q.type===kn.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&nj(q.attributes.href)==="css")&&d0e(t,()=>{if(R){const $=Nc(t,{doc:n,mirror:r,blockClass:s,blockSelector:o,needsMask:F,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:S,inlineImages:E,recordCanvas:C,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});$&&R(t,$)}},M),q}function v0e(t,e){const{mirror:n=new tj,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:g,maskInputFn:m,slimDOM:y=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M=()=>!1}=e||{},N=h===!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}:h===!1?{password:!0}:h,I=aj(y);return Nc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:N,maskTextFn:g,maskInputFn:m,slimDOMOptions:I,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function y0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function b0e(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 jR={exports:{}},Xt=String,lj=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}};jR.exports=lj();jR.exports.createColors=lj;var S0e=jR.exports;const E0e={},C0e=Object.freeze(Object.defineProperty({__proto__:null,default:E0e},Symbol.toStringTag,{value:"Module"})),Js=b0e(C0e);let A4=S0e,T4=Js,q_=class uj 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,uj)}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=A4.isColorSupported),T4&&e&&(n=T4(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:h,red:g}=A4.createColors(!0);u=m=>f(g(m)),c=m=>h(m)}else u=c=f=>f;return r.slice(s,o).map((f,h)=>{let g=s+1+h,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 BR=q_;q_.default=q_;var pp={};pp.isClean=Symbol("isClean");pp.my=Symbol("my");const R4={after:`
|
|
248
|
-
`,beforeClose:`
|
|
249
|
-
`,beforeComment:`
|
|
250
|
-
`,beforeDecl:`
|
|
251
|
-
`,beforeOpen:" ",beforeRule:`
|
|
252
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function w0e(t){return t[0].toUpperCase()+t.slice(1)}let W_=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 R4[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"+w0e(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=R4[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 cj=W_;W_.default=W_;let x0e=cj;function V_(t,e){new x0e(e).stringify(t)}var Ib=V_;V_.default=V_;let{isClean:Sm,my:_0e}=pp,A0e=BR,T0e=cj,R0e=Ib;function G_(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=>G_(a,n)):(o==="object"&&s!==null&&(s=G_(s)),n[r]=s)}return n}let K_=class{constructor(e={}){this.raws={},this[Sm]=!1,this[_0e]=!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=G_(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 A0e(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[Sm]){this[Sm]=!1;let e=this;for(;e=e.parent;)e[Sm]=!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 T0e().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=R0e){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 Ob=K_;K_.default=K_;let I0e=Ob,Y_=class extends I0e{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 Nb=Y_;Y_.default=Y_;let O0e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",N0e=(t=21)=>{let e="",n=t;for(;n--;)e+=O0e[Math.random()*64|0];return e};var M0e={nanoid:N0e};let{SourceMapConsumer:I4,SourceMapGenerator:O4}=Js,{existsSync:P0e,readFileSync:k0e}=Js,{dirname:bx,join:D0e}=Js;function L0e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Z_=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=bx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new I4(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 L0e(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=bx(e),P0e(e))return this.mapFile=e,k0e(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 I4)return O4.fromSourceMap(n).toString();if(n instanceof O4)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=D0e(bx(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 dj=Z_;Z_.default=Z_;let{SourceMapConsumer:U0e,SourceMapGenerator:F0e}=Js,{fileURLToPath:N4,pathToFileURL:Em}=Js,{isAbsolute:X_,resolve:Q_}=Js,{nanoid:z0e}=M0e,Sx=Js,M4=BR,j0e=dj,Ex=Symbol("fromOffsetCache"),B0e=!!(U0e&&F0e),P4=!!(Q_&&X_),ry=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&&(!P4||/^\w+:\/\//.test(n.from)||X_(n.from)?this.file=n.from:this.file=Q_(n.from)),P4&&B0e){let r=new j0e(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 "+z0e(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,h=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 h.offset=="number"){let g=this.fromOffset(h.offset);a=g.line,u=g.col}else a=h.line,u=h.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 M4(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 M4(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&&(Em&&(o.input.url=Em(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[Ex])r=this[Ex];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[Ex]=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:Q_(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;X_(a.source)?c=Em(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Em(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(N4)f.file=N4(c);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(f.source=h),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 Mb=ry;ry.default=ry;Sx&&Sx.registerInput&&Sx.registerInput(ry);let{SourceMapConsumer:fj,SourceMapGenerator:pv}=Js,{dirname:gv,relative:hj,resolve:pj,sep:gj}=Js,{pathToFileURL:k4}=Js,H0e=Mb,$0e=!!(fj&&pv),q0e=!!(gv&&pj&&hj&&gj),W0e=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||gv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new fj(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(),q0e&&$0e&&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=pv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new pv({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 pv({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 h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.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?gv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=gv(pj(r,this.mapOpts.annotation)));let s=hj(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 H0e(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(k4){let r=k4(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;gj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var mj=W0e;let V0e=Ob,J_=class extends V0e{constructor(e){super(e),this.type="comment"}};var Pb=J_;J_.default=J_;let{isClean:vj,my:yj}=pp,bj=Nb,Sj=Pb,G0e=Ob,Ej,HR,$R,Cj;function wj(t){return t.map(e=>(e.nodes&&(e.nodes=wj(e.nodes)),delete e.source,e))}function xj(t){if(t[vj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)xj(e)}let wi=class _j 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=wj(Ej(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 bj(e)]}else if(e.selector)e=[new HR(e)];else if(e.name)e=[new $R(e)];else if(e.text)e=[new Sj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[yj]||_j.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[vj]&&xj(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=>{Ej=t};wi.registerRule=t=>{HR=t};wi.registerAtRule=t=>{$R=t};wi.registerRoot=t=>{Cj=t};var hu=wi;wi.default=wi;wi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,$R.prototype):t.type==="rule"?Object.setPrototypeOf(t,HR.prototype):t.type==="decl"?Object.setPrototypeOf(t,bj.prototype):t.type==="comment"?Object.setPrototypeOf(t,Sj.prototype):t.type==="root"&&Object.setPrototypeOf(t,Cj.prototype),t[yj]=!0,t.nodes&&t.nodes.forEach(e=>{wi.rebuild(e)})};let K0e=hu,Aj,Tj,Hh=class extends K0e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Aj(new Tj,this,e).stringify()}};Hh.registerLazyResult=t=>{Aj=t};Hh.registerProcessor=t=>{Tj=t};var qR=Hh;Hh.default=Hh;let eA=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 Rj=eA;eA.default=eA;let Y0e=Rj,tA=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 Y0e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var WR=tA;tA.default=tA;const Cx=39,D4=34,Cm=92,L4=47,wm=10,$f=32,xm=12,_m=9,Am=13,Z0e=91,X0e=93,Q0e=40,J0e=41,e1e=123,t1e=125,n1e=59,r1e=42,s1e=58,o1e=64,Tm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,i1e=/.[\r\n"'(/\\]/,U4=/[\da-f]/i;var a1e=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,h,g,m,y,S,E=r.length,C=0,w=[],A=[];function T(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return A.length===0&&C>=E}function N(k){if(A.length)return A.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case wm:case $f:case _m:case Am:case xm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===$f||o===wm||o===_m||o===Am||o===xm);S=["space",r.slice(C,a)],C=a-1;break}case Z0e:case X0e:case e1e:case t1e:case s1e:case n1e:case J0e:{let H=String.fromCharCode(o);S=[H,H,C];break}case Q0e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==Cx&&y!==D4&&y!==$f&&y!==wm&&y!==_m&&y!==xm&&y!==Am){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(s||F){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Cm;)g-=1,h=!h}while(h);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||i1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case Cx:case D4:{u=o===Cx?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(s||F){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Cm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case o1e:{Tm.lastIndex=C+1,Tm.test(r),Tm.lastIndex===0?a=r.length-1:a=Tm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Cm:{for(a=C,f=!0;r.charCodeAt(a+1)===Cm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==L4&&o!==$f&&o!==wm&&o!==_m&&o!==Am&&o!==xm&&(a+=1,U4.test(r.charAt(a)))){for(;U4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===$f&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===L4&&r.charCodeAt(C+1)===r1e?(a=r.indexOf("*/",C+2)+1,a===0&&(s||F?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Rm.lastIndex=C+1,Rm.test(r),Rm.lastIndex===0?a=r.length-1:a=Rm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(k){A.push(k)}return{back:I,endOfFile:M,nextToken:N,position:T}};let Ij=hu,sy=class extends Ij{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 VR=sy;sy.default=sy;Ij.registerAtRule(sy);let Oj=hu,Nj,Mj,Kc=class extends Oj{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 Nj(new Mj,this,e).stringify()}};Kc.registerLazyResult=t=>{Nj=t};Kc.registerProcessor=t=>{Mj=t};var gp=Kc;Kc.default=Kc;Oj.registerRoot(Kc);let $h={comma(t){return $h.split(t,[","],!0)},space(t){let e=[" ",`
|
|
265
|
-
`," "];return $h.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let h of t)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&r.push(s.trim()),r}};var Pj=$h;$h.default=$h;let kj=hu,l1e=Pj,oy=class extends kj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return l1e.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 GR=oy;oy.default=oy;kj.registerRule(oy);let u1e=Nb,c1e=a1e,d1e=Pb,f1e=VR,h1e=gp,F4=GR;const z4={empty:!0,space:!0};function p1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let g1e=class{constructor(e){this.input=e,this.root=new h1e,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 f1e;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 d1e;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=c1e(this.input)}decl(e,n){let r=new u1e;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]||p1e(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 h=this.stringFrom(e,f);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),g="";for(let m=f;m>0;m--){let y=h[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=h.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=h)}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 F4;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,h,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",h=r[m+1]?r[m+1][0]:"empty",!z4[g]&&!z4[h]?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 F4;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 m1e=g1e;let v1e=hu,y1e=m1e,b1e=Mb;function iy(t,e){let n=new b1e(t,e),r=new y1e(n);try{r.parse()}catch(s){throw s}return r.root}var KR=iy;iy.default=iy;v1e.registerParse(iy);let{isClean:vo,my:S1e}=pp,E1e=mj,C1e=Ib,w1e=hu,x1e=qR,j4=WR,_1e=KR,A1e=gp;const T1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},R1e={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},I1e={Once:!0,postcssPlugin:!0,prepare:!0},Yc=0;function qf(t){return typeof t=="object"&&typeof t.then=="function"}function Dj(t){let e=!1,n=T1e[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Yc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Yc,n+"Exit"]:[n,n+"Exit"]}function B4(t){let e;return t.type==="document"?e=["Document",Yc,"DocumentExit"]:t.type==="root"?e=["Root",Yc,"RootExit"]:e=Dj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function nA(t){return t[vo]=!1,t.nodes&&t.nodes.forEach(e=>nA(e)),t}let rA={},Zc=class Lj{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=nA(n);else if(n instanceof Lj||n instanceof j4)s=nA(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=_1e;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[S1e]&&w1e.rebuild(s)}this.result=new j4(e,s,r),this.helpers={...rA,postcss:rA,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(!R1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!I1e[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(qf(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=[B4(e)];for(;n.length>0;){let r=this.visitTick(n);if(qf(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 qf(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=C1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new E1e(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(qf(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(qf(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(B4(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===Yc){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=Dj(e);for(let r of n)if(r===Yc)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"}};Zc.registerPostcss=t=>{rA=t};var Uj=Zc;Zc.default=Zc;A1e.registerLazyResult(Zc);x1e.registerLazyResult(Zc);let O1e=mj,N1e=Ib,M1e=KR;const P1e=WR;let sA=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=N1e;this.result=new P1e(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new O1e(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=M1e;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 k1e=sA;sA.default=sA;let D1e=k1e,L1e=Uj,U1e=qR,F1e=gp,qh=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 D1e(this,e,n):new L1e(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var z1e=qh;qh.default=qh;F1e.registerProcessor(qh);U1e.registerProcessor(qh);let j1e=Nb,B1e=dj,H1e=Pb,$1e=VR,q1e=Mb,W1e=gp,V1e=GR;function Wh(t,e){if(Array.isArray(t))return t.map(s=>Wh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:q1e.prototype};o.map&&(o.map={...o.map,__proto__:B1e.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Wh(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 W1e(r);if(r.type==="decl")return new j1e(r);if(r.type==="rule")return new V1e(r);if(r.type==="comment")return new H1e(r);if(r.type==="atrule")return new $1e(r);throw new Error("Unknown node type: "+t.type)}var G1e=Wh;Wh.default=Wh;let K1e=BR,Fj=Nb,Y1e=Uj,Z1e=hu,YR=z1e,X1e=Ib,Q1e=G1e,zj=qR,J1e=Rj,jj=Pb,Bj=VR,eSe=WR,tSe=Mb,nSe=KR,rSe=Pj,Hj=GR,$j=gp,sSe=Ob;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new YR(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:
|
|
266
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),Qv.LANG&&Qv.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 YR().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=X1e;Lt.parse=nSe;Lt.fromJSON=Q1e;Lt.list=rSe;Lt.comment=t=>new jj(t);Lt.atRule=t=>new Bj(t);Lt.decl=t=>new Fj(t);Lt.rule=t=>new Hj(t);Lt.root=t=>new $j(t);Lt.document=t=>new zj(t);Lt.CssSyntaxError=K1e;Lt.Declaration=Fj;Lt.Container=Z1e;Lt.Processor=YR;Lt.Document=zj;Lt.Comment=jj;Lt.Warning=J1e;Lt.AtRule=Bj;Lt.Result=eSe;Lt.Input=tSe;Lt.Rule=Hj;Lt.Root=$j;Lt.Node=sSe;Y1e.registerPostcss(Lt);var oSe=Lt;Lt.default=Lt;const on=y0e(oSe);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;var iSe=Object.defineProperty,aSe=(t,e,n)=>e in t?iSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ws=(t,e,n)=>aSe(t,typeof e!="symbol"?e+"":e,n);function lSe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function uSe(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 ZR={exports:{}},Qt=String,qj=function(){return{isColorSupported:!1,reset:Qt,bold:Qt,dim:Qt,italic:Qt,underline:Qt,inverse:Qt,hidden:Qt,strikethrough:Qt,black:Qt,red:Qt,green:Qt,yellow:Qt,blue:Qt,magenta:Qt,cyan:Qt,white:Qt,gray:Qt,bgBlack:Qt,bgRed:Qt,bgGreen:Qt,bgYellow:Qt,bgBlue:Qt,bgMagenta:Qt,bgCyan:Qt,bgWhite:Qt}};ZR.exports=qj();ZR.exports.createColors=qj;var cSe=ZR.exports;const dSe={},fSe=Object.freeze(Object.defineProperty({__proto__:null,default:dSe},Symbol.toStringTag,{value:"Module"})),eo=uSe(fSe);let H4=cSe,$4=eo,oA=class Wj 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,Wj)}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=H4.isColorSupported),$4&&e&&(n=$4(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:h,red:g}=H4.createColors(!0);u=m=>f(g(m)),c=m=>h(m)}else u=c=f=>f;return r.slice(s,o).map((f,h)=>{let g=s+1+h,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 XR=oA;oA.default=oA;var mp={};mp.isClean=Symbol("isClean");mp.my=Symbol("my");const q4={after:`
|
|
273
|
-
`,beforeClose:`
|
|
274
|
-
`,beforeComment:`
|
|
275
|
-
`,beforeDecl:`
|
|
276
|
-
`,beforeOpen:" ",beforeRule:`
|
|
277
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function hSe(t){return t[0].toUpperCase()+t.slice(1)}let iA=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 q4[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"+hSe(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=q4[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 Vj=iA;iA.default=iA;let pSe=Vj;function aA(t,e){new pSe(e).stringify(t)}var kb=aA;aA.default=aA;let{isClean:Im,my:gSe}=mp,mSe=XR,vSe=Vj,ySe=kb;function lA(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=>lA(a,n)):(o==="object"&&s!==null&&(s=lA(s)),n[r]=s)}return n}let uA=class{constructor(e={}){this.raws={},this[Im]=!1,this[gSe]=!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=lA(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 mSe(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[Im]){this[Im]=!1;let e=this;for(;e=e.parent;)e[Im]=!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 vSe().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=ySe){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 Db=uA;uA.default=uA;let bSe=Db,cA=class extends bSe{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 Lb=cA;cA.default=cA;let SSe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ESe=(t=21)=>{let e="",n=t;for(;n--;)e+=SSe[Math.random()*64|0];return e};var CSe={nanoid:ESe};let{SourceMapConsumer:W4,SourceMapGenerator:V4}=eo,{existsSync:wSe,readFileSync:xSe}=eo,{dirname:wx,join:_Se}=eo;function ASe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let dA=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=wx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new W4(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 ASe(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=wx(e),wSe(e))return this.mapFile=e,xSe(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 W4)return V4.fromSourceMap(n).toString();if(n instanceof V4)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=_Se(wx(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 Gj=dA;dA.default=dA;let{SourceMapConsumer:TSe,SourceMapGenerator:RSe}=eo,{fileURLToPath:G4,pathToFileURL:Om}=eo,{isAbsolute:fA,resolve:hA}=eo,{nanoid:ISe}=CSe,xx=eo,K4=XR,OSe=Gj,_x=Symbol("fromOffsetCache"),NSe=!!(TSe&&RSe),Y4=!!(hA&&fA),ay=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&&(!Y4||/^\w+:\/\//.test(n.from)||fA(n.from)?this.file=n.from:this.file=hA(n.from)),Y4&&NSe){let r=new OSe(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 "+ISe(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,h=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 h.offset=="number"){let g=this.fromOffset(h.offset);a=g.line,u=g.col}else a=h.line,u=h.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 K4(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 K4(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&&(Om&&(o.input.url=Om(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[_x])r=this[_x];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[_x]=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:hA(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;fA(a.source)?c=Om(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Om(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(G4)f.file=G4(c);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(f.source=h),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 Ub=ay;ay.default=ay;xx&&xx.registerInput&&xx.registerInput(ay);let{SourceMapConsumer:Kj,SourceMapGenerator:mv}=eo,{dirname:vv,relative:Yj,resolve:Zj,sep:Xj}=eo,{pathToFileURL:Z4}=eo,MSe=Ub,PSe=!!(Kj&&mv),kSe=!!(vv&&Zj&&Yj&&Xj),DSe=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||vv(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Kj(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(),kSe&&PSe&&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=mv.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new mv({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 mv({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 h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.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?vv(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=vv(Zj(r,this.mapOpts.annotation)));let s=Yj(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 MSe(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(Z4){let r=Z4(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;Xj==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Qj=DSe;let LSe=Db,pA=class extends LSe{constructor(e){super(e),this.type="comment"}};var Fb=pA;pA.default=pA;let{isClean:Jj,my:eB}=mp,tB=Lb,nB=Fb,USe=Db,rB,QR,JR,sB;function oB(t){return t.map(e=>(e.nodes&&(e.nodes=oB(e.nodes)),delete e.source,e))}function iB(t){if(t[Jj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)iB(e)}let xi=class aB extends USe{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=oB(rB(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 tB(e)]}else if(e.selector)e=[new QR(e)];else if(e.name)e=[new JR(e)];else if(e.text)e=[new nB(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[eB]||aB.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Jj]&&iB(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]}};xi.registerParse=t=>{rB=t};xi.registerRule=t=>{QR=t};xi.registerAtRule=t=>{JR=t};xi.registerRoot=t=>{sB=t};var pu=xi;xi.default=xi;xi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,JR.prototype):t.type==="rule"?Object.setPrototypeOf(t,QR.prototype):t.type==="decl"?Object.setPrototypeOf(t,tB.prototype):t.type==="comment"?Object.setPrototypeOf(t,nB.prototype):t.type==="root"&&Object.setPrototypeOf(t,sB.prototype),t[eB]=!0,t.nodes&&t.nodes.forEach(e=>{xi.rebuild(e)})};let FSe=pu,lB,uB,Vh=class extends FSe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new lB(new uB,this,e).stringify()}};Vh.registerLazyResult=t=>{lB=t};Vh.registerProcessor=t=>{uB=t};var eI=Vh;Vh.default=Vh;let gA=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 cB=gA;gA.default=gA;let zSe=cB,mA=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 zSe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var tI=mA;mA.default=mA;const Ax=39,X4=34,Nm=92,Q4=47,Mm=10,Wf=32,Pm=12,km=9,Dm=13,jSe=91,BSe=93,HSe=40,$Se=41,qSe=123,WSe=125,VSe=59,GSe=42,KSe=58,YSe=64,Lm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Um=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ZSe=/.[\r\n"'(/\\]/,J4=/[\da-f]/i;var XSe=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,o,a,u,c,f,h,g,m,y,S,E=r.length,C=0,w=[],A=[];function T(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return A.length===0&&C>=E}function N(k){if(A.length)return A.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Mm:case Wf:case km:case Dm:case Pm:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Wf||o===Mm||o===km||o===Dm||o===Pm);S=["space",r.slice(C,a)],C=a-1;break}case jSe:case BSe:case qSe:case WSe:case KSe:case VSe:case $Se:{let H=String.fromCharCode(o);S=[H,H,C];break}case HSe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==Ax&&y!==X4&&y!==Wf&&y!==Mm&&y!==km&&y!==Pm&&y!==Dm){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(s||F){a=C;break}else R("bracket");for(g=a;r.charCodeAt(g-1)===Nm;)g-=1,h=!h}while(h);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||ZSe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case Ax:case X4:{u=o===Ax?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(s||F){a=C+1;break}else R("string");for(g=a;r.charCodeAt(g-1)===Nm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case YSe:{Lm.lastIndex=C+1,Lm.test(r),Lm.lastIndex===0?a=r.length-1:a=Lm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Nm:{for(a=C,f=!0;r.charCodeAt(a+1)===Nm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==Q4&&o!==Wf&&o!==Mm&&o!==km&&o!==Dm&&o!==Pm&&(a+=1,J4.test(r.charAt(a)))){for(;J4.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===Wf&&(a+=1)}S=["word",r.slice(C,a+1),C,a],C=a;break}default:{o===Q4&&r.charCodeAt(C+1)===GSe?(a=r.indexOf("*/",C+2)+1,a===0&&(s||F?a=r.length:R("comment")),S=["comment",r.slice(C,a+1),C,a],C=a):(Um.lastIndex=C+1,Um.test(r),Um.lastIndex===0?a=r.length-1:a=Um.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function I(k){A.push(k)}return{back:I,endOfFile:M,nextToken:N,position:T}};let dB=pu,ly=class extends dB{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 nI=ly;ly.default=ly;dB.registerAtRule(ly);let fB=pu,hB,pB,Xc=class extends fB{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 hB(new pB,this,e).stringify()}};Xc.registerLazyResult=t=>{hB=t};Xc.registerProcessor=t=>{pB=t};var vp=Xc;Xc.default=Xc;fB.registerRoot(Xc);let Gh={comma(t){return Gh.split(t,[","],!0)},space(t){let e=[" ",`
|
|
290
|
-
`," "];return Gh.split(t,e)},split(t,e,n){let r=[],s="",o=!1,a=0,u=!1,c="",f=!1;for(let h of t)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&r.push(s.trim()),r}};var gB=Gh;Gh.default=Gh;let mB=pu,QSe=gB,uy=class extends mB{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return QSe.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 rI=uy;uy.default=uy;mB.registerRule(uy);let JSe=Lb,eEe=XSe,tEe=Fb,nEe=nI,rEe=vp,e5=rI;const t5={empty:!0,space:!0};function sEe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let oEe=class{constructor(e){this.input=e,this.root=new rEe,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 nEe;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 tEe;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=eEe(this.input)}decl(e,n){let r=new JSe;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]||sEe(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 h=this.stringFrom(e,f);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),g="";for(let m=f;m>0;m--){let y=h[m][0];if(g.trim().indexOf("!")===0&&y!=="space")break;g=h.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=h)}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 e5;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,h,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",h=r[m+1]?r[m+1][0]:"empty",!t5[g]&&!t5[h]?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 e5;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 iEe=oEe;let aEe=pu,lEe=iEe,uEe=Ub;function cy(t,e){let n=new uEe(t,e),r=new lEe(n);try{r.parse()}catch(s){throw s}return r.root}var sI=cy;cy.default=cy;aEe.registerParse(cy);let{isClean:yo,my:cEe}=mp,dEe=Qj,fEe=kb,hEe=pu,pEe=eI,n5=tI,gEe=sI,mEe=vp;const vEe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yEe={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},bEe={Once:!0,postcssPlugin:!0,prepare:!0},Qc=0;function Vf(t){return typeof t=="object"&&typeof t.then=="function"}function vB(t){let e=!1,n=vEe[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,Qc,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,Qc,n+"Exit"]:[n,n+"Exit"]}function r5(t){let e;return t.type==="document"?e=["Document",Qc,"DocumentExit"]:t.type==="root"?e=["Root",Qc,"RootExit"]:e=vB(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function vA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>vA(e)),t}let yA={},Jc=class yB{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=vA(n);else if(n instanceof yB||n instanceof n5)s=vA(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=gEe;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[cEe]&&hEe.rebuild(s)}this.result=new n5(e,s,r),this.helpers={...yA,postcss:yA,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(!yEe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!bEe[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(Vf(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=[r5(e)];for(;n.length>0;){let r=this.visitTick(n);if(Vf(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 Vf(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=fEe;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new dEe(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(Vf(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(Vf(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(r5(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===Qc){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=vB(e);for(let r of n)if(r===Qc)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"}};Jc.registerPostcss=t=>{yA=t};var bB=Jc;Jc.default=Jc;mEe.registerLazyResult(Jc);pEe.registerLazyResult(Jc);let SEe=Qj,EEe=kb,CEe=sI;const wEe=tI;let bA=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=EEe;this.result=new wEe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new SEe(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=CEe;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 xEe=bA;bA.default=bA;let _Ee=xEe,AEe=bB,TEe=eI,REe=vp,Kh=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 _Ee(this,e,n):new AEe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var IEe=Kh;Kh.default=Kh;REe.registerProcessor(Kh);TEe.registerProcessor(Kh);let OEe=Lb,NEe=Gj,MEe=Fb,PEe=nI,kEe=Ub,DEe=vp,LEe=rI;function Yh(t,e){if(Array.isArray(t))return t.map(s=>Yh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:kEe.prototype};o.map&&(o.map={...o.map,__proto__:NEe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Yh(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 DEe(r);if(r.type==="decl")return new OEe(r);if(r.type==="rule")return new LEe(r);if(r.type==="comment")return new MEe(r);if(r.type==="atrule")return new PEe(r);throw new Error("Unknown node type: "+t.type)}var UEe=Yh;Yh.default=Yh;let FEe=XR,SB=Lb,zEe=bB,jEe=pu,oI=IEe,BEe=kb,HEe=UEe,EB=eI,$Ee=cB,CB=Fb,wB=nI,qEe=tI,WEe=Ub,VEe=sI,GEe=gB,xB=rI,_B=vp,KEe=Db;function Ut(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new oI(t)}Ut.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`),Qv.LANG&&Qv.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 oI().version,u}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(a,u,c){return Ut([s(c)]).process(a,u)},s};Ut.stringify=BEe;Ut.parse=VEe;Ut.fromJSON=HEe;Ut.list=GEe;Ut.comment=t=>new CB(t);Ut.atRule=t=>new wB(t);Ut.decl=t=>new SB(t);Ut.rule=t=>new xB(t);Ut.root=t=>new _B(t);Ut.document=t=>new EB(t);Ut.CssSyntaxError=FEe;Ut.Declaration=SB;Ut.Container=jEe;Ut.Processor=oI;Ut.Document=EB;Ut.Comment=CB;Ut.Warning=$Ee;Ut.AtRule=wB;Ut.Result=qEe;Ut.Input=WEe;Ut.Rule=xB;Ut.Root=_B;Ut.Node=KEe;zEe.registerPostcss(Ut);var YEe=Ut;Ut.default=Ut;const an=lSe(YEe);an.stringify;an.fromJSON;an.plugin;an.parse;an.list;an.document;an.comment;an.atRule;an.rule;an.decl;an.root;an.CssSyntaxError;an.Declaration;an.Container;an.Processor;an.Document;an.Comment;an.Warning;an.AtRule;an.Result;an.Input;an.Rule;an.Root;an.Node;class iI{constructor(...e){ws(this,"parentElement",null),ws(this,"parentNode",null),ws(this,"ownerDocument"),ws(this,"firstChild",null),ws(this,"lastChild",null),ws(this,"previousSibling",null),ws(this,"nextSibling",null),ws(this,"ELEMENT_NODE",1),ws(this,"TEXT_NODE",3),ws(this,"nodeType"),ws(this,"nodeName"),ws(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 iI){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 s5={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},o5={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fm={},ZEe=()=>!!globalThis.Zone;function aI(t){if(Fm[t])return Fm[t];const e=globalThis[t],n=e.prototype,r=t in s5?s5[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 o5?o5[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&&!ZEe())return Fm[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?Fm[t]=f:n}catch{return n}}const Tx={};function Ni(t,e,n){var r;const s=`${t}.${String(n)}`;if(Tx[s])return Tx[s].call(e);const o=aI(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(Tx[s]=a,a.call(e)):e[n]}const Rx={};function AB(t,e,n){const r=`${t}.${String(n)}`;if(Rx[r])return Rx[r].bind(e);const o=aI(t)[n];return typeof o!="function"?e[n]:(Rx[r]=o,o.bind(e))}function XEe(t){return Ni("Node",t,"ownerDocument")}function QEe(t){return Ni("Node",t,"childNodes")}function JEe(t){return Ni("Node",t,"parentNode")}function eCe(t){return Ni("Node",t,"parentElement")}function tCe(t){return Ni("Node",t,"textContent")}function nCe(t,e){return AB("Node",t,"contains")(e)}function rCe(t){return AB("Node",t,"getRootNode")()}function sCe(t){return!t||!("host"in t)?null:Ni("ShadowRoot",t,"host")}function oCe(t){return t.styleSheets}function iCe(t){return!t||!("shadowRoot"in t)?null:Ni("Element",t,"shadowRoot")}function aCe(t,e){return Ni("Element",t,"querySelector")(e)}function lCe(t,e){return Ni("Element",t,"querySelectorAll")(e)}function TB(){return aI("MutationObserver").constructor}function gu(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:XEe,childNodes:QEe,parentNode:JEe,parentElement:eCe,textContent:tCe,contains:nCe,getRootNode:rCe,host:sCe,styleSheets:oCe,shadowRoot:iCe,querySelector:aCe,querySelectorAll:lCe,mutationObserver:TB,patch:gu};function Cr(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Ec=`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 i5={map:{},getId(){return console.error(Ec),-1},getNode(){return console.error(Ec),null},removeNodeFromMap(){console.error(Ec)},has(){return console.error(Ec),!1},reset(){console.error(Ec)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(i5=new Proxy(i5,{get(t,e,n){return e==="map"&&console.error(Ec),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 zb(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)}}),()=>zb(t,e,o||{},!0)}let dy=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(dy=()=>new Date().getTime());function RB(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 IB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function OB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function NB(t){return t?t.nodeType===t.ELEMENT_NODE?t:rt.parentElement(t):null}function wr(t,e,n,r){if(!t)return!1;const s=NB(t);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(ny(s,e,r))return!0}catch{}return!!(n&&(s.matches(n)||r&&s.closest(n)!==null))}function uCe(t,e){return e.getId(t)!==-1}function Ix(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Bh}function MB(t,e){if(bh(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?MB(r,e):!0}function SA(t){return!!t.changedTouches}function cCe(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 PB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function kB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function EA(t){return t?t instanceof iI&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class dCe{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 DB(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 fCe(t){let e=t,n;for(;n=DB(e);)e=n;return e}function hCe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=fCe(t);return rt.contains(e,n)}function LB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||hCe(t):!1}var Ct=(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))(Ct||{}),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||{}),Ur=(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))(Ur||{}),si=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(si||{}),ed=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ed||{}),Cc=(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))(Cc||{}),UB=(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))(UB||{});function a5(t){return"__ln"in t}class pCe{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&&a5(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&&a5(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 l5=(t,e)=>`${t}@${e}`;class gCe{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 pCe,s=c=>{let f=c,h=Bh;for(;h===Bh;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},o=c=>{const f=rt.parentNode(c);if(!f||!LB(c))return;let h=!1;if(c.nodeType===Node.TEXT_NODE){const S=f.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(f)&&(h=!0)}const g=bh(f)?this.mirror.getId(DB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=Nc(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=>{PB(S,this.mirror)&&this.iframeManager.addIframe(S),kB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),EA(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:h});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)u5(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!c5(this.droppedSet,c)&&!u5(this.removesSubTreeCache,c,this.mirror)||c5(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)),h=s(a.value);f!==-1&&h!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const h=f;if(f=f.previous,h){const g=this.mirror.getId(rt.parentNode(h.value));if(s(h.value)===-1)continue;if(g!==-1){c=h;break}else{const y=h.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=h;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,h=rt.parentNode(f);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{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 h=JSON.stringify(c.styleDiff),g=JSON.stringify(c._unchangedStyles);h.length<f.style.length&&(h+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=Jv({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ey(e),value:r,maskInputFn:this.maskInputFn})}),Se(this,"processMutation",e=>{if(!Ix(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const n=rt.textContent(e.target);!wr(e.target,this.blockClass,this.blockSelector,!1)&&n!==e.oldValue&&this.texts.push({value:ij(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,NB(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=ey(n);s=Jv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(wr(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"),!oj(n.tagName,r))if(o.attributes[r]=sj(this.doc,Xl(n.tagName),Xl(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(wr(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=bh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);wr(e.target,this.blockClass,this.blockSelector,!1)||Ix(n,this.mirror,this.slimDOMOptions)||!uCe(n,this.mirror)||(this.addedSet.has(n)?(CA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||MB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[l5(r,s)]?CA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:bh(e.target)&&Sh(e.target)?!0:void 0}),mCe(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(Ix(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[l5(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);wr(e,this.blockClass,this.blockSelector,!1)||(rt.childNodes(e).forEach(r=>this.genAdds(r)),EA(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 CA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>CA(t,n))}function mCe(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 u5(t,e,n){return t.size===0?!1:vCe(t,e)}function vCe(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function c5(t,e){return t.size===0?!1:FB(t,e)}function FB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:FB(t,n):!1}let Eh;function yCe(t){Eh=t}function bCe(){Eh=void 0}const vt=t=>Eh?(...n)=>{try{return t(...n)}catch(r){if(Eh&&Eh(r)===!0)return;throw r}}:t,Ol=[];function yp(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 zB(t,e){const n=new gCe;Ol.push(n),n.init(t);const r=new(TB())(vt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function SCe({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=yp(g),{clientX:y,clientY:S}=SA(g)?g.changedTouches[0]:g;u||(u=dy()),a.push({x:y,y:S,id:r.getId(m),timeOffset:dy()-u}),c(typeof DragEvent<"u"&&g instanceof DragEvent?ft.Drag:g instanceof MouseEvent?ft.MouseMove:ft.TouchMove)}),s,{trailing:!1})),h=[Cr("mousemove",f,n),Cr("touchmove",f,n),Cr("drag",f,n)];return vt(()=>{h.forEach(g=>g())})}function ECe({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=h=>g=>{const m=yp(g);if(wr(m,r,s,!0))return;let y=null,S=h;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?Ur[h]===Ur.MouseDown?S="TouchStart":Ur[h]===Ur.MouseUp&&(S="TouchEnd"):si.Pen}else SA(g)&&(y=si.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===si.Touch||S.startsWith("Mouse")&&y===si.Mouse)&&(y=null)):Ur[h]===Ur.Click&&(y=c,c=null);const E=SA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:A}=E;vt(t)({type:Ur[S],id:C,x:w,y:A,...y!==null&&{pointerType:y}})};return Object.keys(Ur).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let g=Xl(h);const m=f(h);if(window.PointerEvent)switch(Ur[h]){case Ur.MouseDown:case Ur.MouseUp:g=g.replace("mouse","pointer");break;case Ur.TouchStart:case Ur.TouchEnd:return}u.push(Cr(g,m,e))}),vt(()=>{u.forEach(h=>h())})}function jB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=vt(Zh(vt(u=>{const c=yp(u);if(!c||wr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const h=RB(e.defaultView);t({id:f,x:h.left,y:h.top})}else t({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Cr("scroll",a,e)}function CCe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=vt(Zh(vt(()=>{const o=IB(),a=OB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Cr("resize",s,e)}const wCe=["INPUT","TEXTAREA","SELECT"],d5=new WeakMap;function xCe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:h}){function g(A){let T=yp(A);const R=A.isTrusted,M=T&&T.tagName;if(T&&M==="OPTION"&&(T=rt.parentElement(T)),!T||!M||wCe.indexOf(M)<0||wr(T,r,s,!0)||T.classList.contains(o)||a&&T.matches(a))return;let N=T.value,I=!1;const k=ey(T)||"";k==="radio"||k==="checkbox"?I=T.checked:(u[M.toLowerCase()]||u[k])&&(N=Jv({element:T,maskInputOptions:u,tagName:M,type:k,value:N,maskInputFn:c})),m(T,h?{text:N,isChecked:I,userTriggered:R}:{text:N,isChecked:I});const F=T.name;k==="radio"&&F&&I&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(H=>{if(H!==T){const D=H.value;m(H,h?{text:D,isChecked:!I,userTriggered:!1}:{text:D,isChecked:!I})}})}function m(A,T){const R=d5.get(A);if(!R||R.text!==T.text||R.isChecked!==T.isChecked){d5.set(A,T);const M=n.getId(A);vt(t)({...T,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(A=>Cr(A,vt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(A=>A())};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(A=>zb(A[0],A[1],{set(){vt(g)({target:this,isTrusted:!1})}},!1,E))),vt(()=>{S.forEach(A=>A())})}function fy(t){const e=[];function n(r,s){if(zm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||zm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||zm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||zm("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 Sa(t,e,n){let r,s;return t?(t.ownerNode?r=e.getId(t.ownerNode):s=n.getId(t),{styleId:s,id:r}):{}}function _Ce({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((h,g,m)=>{const[y,S]=m,{id:E,styleId:C}=Sa(g,e,n.styleMirror);return(E&&E!==-1||C&&C!==-1)&&t({id:E,styleId:C,adds:[{rule:y,index:S}]}),h.apply(g,m)})}),r.CSSStyleSheet.prototype.addRule=function(h,g,m=this.cssRules.length){const y=`${h} { ${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((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,removes:[{index:y}]}),h.apply(g,m)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:vt((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replace:y}),h.apply(g,m)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:vt((h,g,m)=>{const[y]=m,{id:S,styleId:E}=Sa(g,e,n.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,replaceSync:y}),h.apply(g,m)})}));const c={};jm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(jm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),jm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),jm("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([h,g])=>{f[h]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(f[h].insertRule,{apply:vt((m,y,S)=>{const[E,C]=S,{id:w,styleId:A}=Sa(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||A&&A!==-1)&&t({id:w,styleId:A,adds:[{rule:E,index:[...fy(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:vt((m,y,S)=>{const[E]=S,{id:C,styleId:w}=Sa(y.parentStyleSheet,e,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&t({id:C,styleId:w,removes:[{index:[...fy(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(([h,g])=>{g.prototype.insertRule=f[h].insertRule,g.prototype.deleteRule=f[h].deleteRule})})}function BB({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 h;const g=(h=c.set)==null?void 0:h.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 ACe({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 h;const[g,m,y]=f;if(n.has(g))return o.apply(c,[g,m,y]);const{id:S,styleId:E}=Sa((h=c.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&t({id:S,styleId:E,set:{property:g,value:m,priority:y},index:fy(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 h;const[g]=f;if(n.has(g))return a.apply(c,[g]);const{id:m,styleId:y}=Sa((h=c.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&t({id:m,styleId:y,remove:{property:g},index:fy(c.parentRule)}),u.apply(c,f)})}),vt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function TCe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=vt(c=>Zh(vt(f=>{const h=yp(f);if(!h||wr(h,e,n,!0))return;const{currentTime:g,volume:m,muted:y,playbackRate:S,loop:E}=h;t({type:c,id:r.getId(h),currentTime:g,volume:m,muted:y,playbackRate:S,loop:E})}),s.media||500)),u=[Cr("play",a(Cc.Play),o),Cr("pause",a(Cc.Pause),o),Cr("seeked",a(Cc.Seeked),o),Cr("volumechange",a(Cc.VolumeChange),o),Cr("ratechange",a(Cc.RateChange),o)];return vt(()=>{u.forEach(c=>c())})}function RCe({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(c,f,h){const g=new o(c,f,h);return s.set(g,{family:c,buffer:typeof f!="string",descriptors:h,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),g};const a=gu(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 ICe(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=[],h=c.rangeCount||0;for(let g=0;g<h;g++){const m=c.getRangeAt(g),{startContainer:y,startOffset:S,endContainer:E,endOffset:C}=m;wr(y,r,s,!0)||wr(E,r,s,!0)||f.push({start:n.getId(y),startOffset:S,end:n.getId(E),endOffset:C})}o({ranges:f})});return u(),Cr("selectionchange",u)}function OCe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:gu(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 NCe(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:h,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),h(...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 MCe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};NCe(t,e);let r;t.recordDOM&&(r=zB(t,t.doc));const s=SCe(t),o=ECe(t),a=jB(t),u=CCe(t,{win:n}),c=xCe(t),f=TCe(t);let h=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(h=_Ce(t,{win:n}),g=BB(t,t.doc),m=ACe(t,{win:n}),t.collectFonts&&(y=RCe(t)));const S=ICe(t),E=OCe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return vt(()=>{Ol.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),h(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function zm(t){return typeof window[t]<"u"}function jm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class f5{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 PCe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new f5(rj)),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 f5(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 Ct.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:Ct.IncrementalSnapshot,data:{source:ft.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ct.Meta:case Ct.Load:case Ct.DomContentLoaded:return!1;case Ct.Plugin:return n;case Ct.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case Ct.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!==UB.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class kCe{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(!Sh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=zB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(jB({...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(BB({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(gu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&LB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Mc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",DCe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bm=0;Bm<Mc.length;Bm++)DCe[Mc.charCodeAt(Bm)]=Bm;var LCe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=Mc[e[n]>>2],s+=Mc[(e[n]&3)<<4|e[n+1]>>4],s+=Mc[(e[n+1]&15)<<2|e[n+2]>>6],s+=Mc[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 h5=new Map;function UCe(t,e){let n=h5.get(t);return n||(n=new Map,h5.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const HB=(t,e,n)=>{if(!t||!(qB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=UCe(n,r);let o=s.indexOf(t);return o===-1&&(o=s.length,s.push(t)),o};function yv(t,e,n){if(t instanceof Array)return t.map(r=>yv(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=LCe(t);return{rr_type:r,base64:s}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[yv(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:[yv(t.data,e,n),t.width,t.height]};if(qB(t,e)||typeof t=="object"){const r=t.constructor.name,s=HB(t,e,n);return{rr_type:r,index:s}}}}return t}const $B=(t,e,n)=>t.map(r=>yv(r,e,n)),qB=(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 FCe(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=gu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return wr(this.canvas,n,r,!0)||setTimeout(()=>{const h=$B(f,e,this);t(this.canvas,{type:ed["2D"],property:a,args:h})},0),c.apply(this,f)}});s.push(u)}catch{const u=zb(e.CanvasRenderingContext2D.prototype,a,{set(c){t(this.canvas,{type:ed["2D"],property:a,args:[c],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function zCe(t){return t==="experimental-webgl"?"webgl":t}function p5(t,e,n,r){const s=[];try{const o=gu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!wr(this,e,n,!0)){const f=zCe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const h=c[0];h.preserveDrawingBuffer||(h.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 g5(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=gu(t,c,function(h){return function(...g){const m=h.apply(this,g);if(HB(m,o,this),"tagName"in this.canvas&&!wr(this.canvas,r,s,!0)){const y=$B(g,o,this),S={type:e,property:c,args:y};n(this.canvas,S)}return m}});a.push(f)}catch{const f=zb(t,c,{set(h){n(this.canvas,{type:e,property:c,args:[h],setter:!0})}});a.push(f)}return a}function jCe(t,e,n,r){const s=[];return s.push(...g5(e.WebGLRenderingContext.prototype,ed.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...g5(e.WebGL2RenderingContext.prototype,ed.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const WB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",BCe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),m5=typeof window<"u"&&window.Blob&&new Blob([BCe(WB)],{type:"text/javascript;charset=utf-8"});function HCe(t){let e;try{if(e=m5&&(window.URL||window.webkitURL).createObjectURL(m5),!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,"+WB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class $Ce{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=p5(n,r,s,!0),u=new Map,c=new HCe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:A,height:T}=S.data;this.mutationCb({id:E,type:ed["2D"],commands:[{property:"clearRect",args:[0,0,A,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 h=0,g;const m=()=>{const S=[];return n.document.querySelectorAll("canvas").forEach(E=>{wr(E,r,s,!0)||S.push(E)}),S},y=S=>{if(h&&S-h<f){g=requestAnimationFrame(y);return}h=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 A=await createImageBitmap(E);c.postMessage({id:w,bitmap:A,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[A])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=p5(e,n,r,!1),o=FCe(this.processMutation.bind(this),e,n,r),a=jCe(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 qCe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new dCe),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:ej(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 WCe{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 gn,bv,Ox,hy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((b4=t.contentWindow)==null?void 0:b4.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Bs=Gbe();function bp(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:h=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:y,maskInputFn:S,maskTextFn:E,hooks:C,packFn:w,sampling:A={},dataURLOptions:T={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:N=!1,recordCrossOriginIframes:I=!1,recordAfter:k=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:H=!1,inlineImages:D=!1,plugins:z,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:V=new Set([]),errorHandler:ee}=t;yCe(ee);const $=I?window.parent===window:!0;let te=!1;if(!$)try{window.parent.document&&(te=!1)}catch{te=!0}if($&&!e)throw new Error("emit function is required");if(!$&&!te)return()=>{};R!==void 0&&A.mousemove===void 0&&(A.mousemove=R),Bs.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=aj(y);cCe();let Ae,L=0;const K=Ee=>{for(const pt of z||[])pt.eventProcessor&&(Ee=pt.eventProcessor(Ee));return w&&!te&&(Ee=w(Ee)),Ee};gn=(Ee,pt)=>{var Ce;const ze=Ee;if(ze.timestamp=dy(),(Ce=Ol[0])!=null&&Ce.isFrozen()&&ze.type!==Ct.FullSnapshot&&!(ze.type===Ct.IncrementalSnapshot&&ze.data.source===ft.Mutation)&&Ol.forEach(je=>je.unfreeze()),$)e?.(K(ze),pt);else if(te){const je={type:"rrweb",event:K(ze),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(je,"*")}if(ze.type===Ct.FullSnapshot)Ae=ze,L=0;else if(ze.type===Ct.IncrementalSnapshot){if(ze.data.source===ft.Mutation&&ze.data.isAttachIframe)return;L++;const je=r&&L>=r,He=n&&ze.timestamp-Ae.timestamp>n;(je||He)&&bv(!0)}};const Y=Ee=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Mutation,...Ee}})},J=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Scroll,...Ee}}),oe=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.CanvasMutation,...Ee}}),he=Ee=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.AdoptedStyleSheet,...Ee}}),ue=new qCe({mutationCb:Y,adoptedStyleSheetCb:he}),ve=new PCe({mirror:Bs,mutationCb:Y,stylesheetManager:ue,recordCrossOriginIframes:I,wrappedEmit:gn});for(const Ee of z||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Bs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const xe=new WCe;Ox=new $Ce({recordCanvas:N,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Bs,sampling:A.canvas,dataURLOptions:T});const Xe=new kCe({mutationCb:Y,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:fe,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:N,inlineImages:D,sampling:A,slimDOMOptions:de,iframeManager:ve,stylesheetManager:ue,canvasManager:Ox,keepIframeSrcFn:q,processedNodeManager:xe},mirror:Bs});bv=(Ee=!1)=>{if(!M)return;gn({type:Ct.Meta,data:{href:window.location.href,width:OB(),height:IB()}},Ee),ue.reset(),Xe.init(),Ol.forEach(Ce=>Ce.lock());const pt=v0e(document,{mirror:Bs,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:fe,maskTextFn:E,maskInputFn:S,slimDOM:de,dataURLOptions:T,recordCanvas:N,inlineImages:D,onSerialize:Ce=>{PB(Ce,Bs)&&ve.addIframe(Ce),kB(Ce,Bs)&&ue.trackLinkElement(Ce),EA(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:q});if(!pt)return console.warn("Failed to snapshot the document");gn({type:Ct.FullSnapshot,data:{node:pt,initialOffset:RB(window)}},Ee),Ol.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,Bs.getId(document))};try{const Ee=[],pt=ze=>{var je;return vt(MCe)({mutationCb:Y,mousemoveCb:(He,gr)=>gn({type:Ct.IncrementalSnapshot,data:{source:gr,positions:He}}),mouseInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MouseInteraction,...He}}),scrollCb:J,viewportResizeCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.ViewportResize,...He}}),inputCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Input,...He}}),mediaInteractionCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.MediaInteraction,...He}}),styleSheetRuleCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleSheetRule,...He}}),styleDeclarationCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.StyleDeclaration,...He}}),canvasMutationCb:oe,fontCb:He=>gn({type:Ct.IncrementalSnapshot,data:{source:ft.Font,...He}}),selectionCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.Selection,...He}})},customElementCb:He=>{gn({type:Ct.IncrementalSnapshot,data:{source:ft.CustomElement,...He}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:fe,inlineStylesheet:h,sampling:A,recordDOM:M,recordCanvas:N,inlineImages:D,userTriggeredOnInput:F,collectFonts:H,doc:ze,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:q,blockSelector:o,slimDOMOptions:de,dataURLOptions:T,mirror:Bs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:xe,canvasManager:Ox,ignoreCSSAttributes:V,plugins:((je=z?.filter(He=>He.observer))==null?void 0:je.map(He=>({observer:He.observer,options:He.options,callback:gr=>gn({type:Ct.Plugin,data:{plugin:He.name,payload:gr}})})))||[]},C)};ve.addLoadListener(ze=>{try{Ee.push(pt(ze.contentDocument))}catch(je){console.warn(je)}});const Ce=()=>{bv(),Ee.push(pt(document)),hy=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Cr("DOMContentLoaded",()=>{gn({type:Ct.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&Ce()})),Ee.push(Cr("load",()=>{gn({type:Ct.Load,data:{}}),k==="load"&&Ce()},window))),()=>{Ee.forEach(ze=>{try{ze()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),xe.destroy(),hy=!1,bCe()}}catch(Ee){console.warn(Ee)}}bp.addCustomEvent=(t,e)=>{if(!hy)throw new Error("please add custom event after start recording");gn({type:Ct.Custom,data:{tag:t,payload:e}})};bp.freezePage=()=>{Ol.forEach(t=>t.freeze())};bp.takeFullSnapshot=t=>{if(!hy)throw new Error("please take full snapshot after start recording");bv(t)};bp.mirror=Bs;var v5;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(v5||(v5={}));const VCe="rrweb",GCe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},KCe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},y5=KCe;class YCe extends Ns{constructor(e){super(VCe),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({},y5.recordOptions),e?.recordOptions),GCe);this.config=Object.assign(Object.assign(Object.assign({},y5),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=bp(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(r4,n),be.info("RRWebPlugin events sent to RUM",{eventType:r4,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var ZCe=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},wA;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(wA||(wA={}));const VB="us-west-2",xA=`https://dataplane.rum.${VB}.amazonaws.com`,GB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),KB=t=>({allowCookies:!1,batchLimit:100,client:Sve,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:xA,endpointUrl:new URL(xA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:wA.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 XCe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=ZCe(s,["cookieAttributes"]);this.eventBus=new Fz,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},GB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},KB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:xA.replace(VB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new Nye({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;[Vv,Gv,Gc,`${Vv}_${this.applicationId}`,`${Gv}_${this.applicationId}`,`${Gc}_${this.applicationId}`].forEach(r=>wye(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 Eve(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 Cye(r);return this.config.disableAutoPageView||s.addPlugin(new Yye),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 b5;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(b5||(b5={}));const QCe=t=>Object.assign(Object.assign({},KB(t)),{signing:!0,telemetries:[Ks.Errors,Ks.Performance,Ks.Http,Ks.Replay]});class JCe extends XCe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},QCe(GB())),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(Zve),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new fye(c,o).ChainAnonymousCredentialsProvider:new hye(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(Bz,e)}registerDomEvents(e){this.pluginManager.updatePlugin(zz,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 Hye(e)],[Ks.Performance]:e=>[new Wye(e),new Xye(e),new vbe(e)],[Ks.Interaction]:e=>[new RR(e)],[Ks.Http]:e=>[new Cbe(e),new bbe(e)],[Ks.Replay]:e=>[new YCe(e)]}}}const YB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},ewe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function ZB(t){return t.replace(ewe,"[redacted]")}function twe(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 ZB(t.slice(0,r))}function nwe(t){const e=ZB(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function rwe(t){return{recordPageView(e){t.recordPageView(twe(e))},recordError(e,n){t.recordError(nwe(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 S5(t){return t instanceof Error?t:new Error(String(t))}function swe(t){window.addEventListener("error",e=>{t.recordError(S5(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(S5(e.reason))})}function owe(){const{appMonitorId:t,identityPoolId:e,region:n}=Dy().rum;if(!t)return YB;const r=new JCe(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=rwe(r);return swe(s),s}const XB=_.createContext(YB);function rIe(){return _.useContext(XB)}const _A="remit.theme",iwe="dark";function E5(){return typeof localStorage>"u"?"system":localStorage.getItem(_A)??"system"}function AA(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(iwe,e)}function sIe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(_A):localStorage.setItem(_A,t)),AA(t)}const awe=()=>{if(typeof window>"u"||(AA(E5()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{AA(E5())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},lwe=(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);jl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},C5={},TA=(t,e,n,r)=>{jl(n)&&C5[n]||(jl(n)&&(C5[n]=new Date),lwe(t,e,n,r))},QB=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},RA=(t,e,n)=>{t.loadNamespaces(e,QB(t,n))},w5=(t,e,n,r)=>{if(jl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return RA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,QB(t,r))},uwe=(t,e,n={})=>!e.languages||!e.languages.length?(TA(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}}),jl=t=>typeof t=="string",cwe=t=>typeof t=="object"&&t!==null,dwe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fwe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},hwe=t=>fwe[t],pwe=t=>t.replace(dwe,hwe);let IA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:pwe};const gwe=(t={})=>{IA={...IA,...t}},mwe=()=>IA;let JB;const vwe=t=>{JB=t},ywe=()=>JB,bwe={type:"3rdParty",init(t){gwe(t.options.react),vwe(t)}},Swe=_.createContext();class Ewe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Cwe=(t,e)=>{const n=_.useRef();return _.useEffect(()=>{n.current=t},[t,e]),n.current},eH=(t,e,n,r)=>t.getFixedT(e,n,r),wwe=(t,e,n,r)=>_.useCallback(eH(t,e,n,r),[t,e,n,r]),xwe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=_.useContext(Swe)||{},o=n||r||ywe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Ewe),!o){TA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(N,I)=>jl(I)?I:cwe(I)&&jl(I.defaultValue)?I.defaultValue:Array.isArray(N)?N[N.length-1]:N,M=[R,{},!1];return M.t=R,M.i18n={},M.ready=!1,M}o.options.react?.wait&&TA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...mwe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=jl(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const h=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>uwe(R,o,a)),g=wwe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>eH(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=_.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=Cwe(C),A=_.useRef(!0);_.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;A.current=!0,!h&&!u&&(e.lng?w5(o,e.lng,f,()=>{A.current&&E(y)}):RA(o,f,()=>{A.current&&E(y)})),h&&w&&w!==C&&A.current&&E(y);const N=()=>{A.current&&E(y)};return R&&o?.on(R,N),M&&o?.store.on(M,N),()=>{A.current=!1,o&&R&&R?.split(" ").forEach(I=>o.off(I,N)),M&&o&&M.split(" ").forEach(I=>o.store.off(I,N))}},[o,C]),_.useEffect(()=>{A.current&&h&&E(m)},[o,c,h]);const T=[S,o,h];if(T.t=S,T.i18n=o,T.ready=h,h||!h&&!u)return T;throw new Promise(R=>{e.lng?w5(o,e.lng,f,()=>R()):RA(o,f,()=>R())})},_we=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),Awe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),Twe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),Rwe=t=>(t.client??qe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),Iwe=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Owe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),Nwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),Mwe=t=>(t.client??qe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),Pwe=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),kwe=t=>(t.client??qe).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Dwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),Lwe=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Uwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),Fwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),zwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),jwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),Bwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),Hwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),$we=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),qwe=t=>(t?.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),oIe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),Wwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),Vwe=t=>(t.client??qe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),Gwe=t=>(t?.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),Kwe=t=>(t?.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),Ywe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),Zwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),Xwe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),Qwe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),Jwe=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),exe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),txe=t=>(t?.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),nxe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),rxe=t=>(t.client??qe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),sxe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),oxe=t=>(t.client??qe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),ixe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),axe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),lxe=t=>(t?.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t}),uxe=t=>(t.client??qe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t,headers:{"Content-Type":"application/json",...t.headers}}),cxe=t=>(t?.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),dxe=t=>(t.client??qe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),iIe=t=>({mutationFn:async n=>{const{data:r}=await _we({...t,...n,throwOnError:!0});return r}}),Gn=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??qe).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]},aIe=t=>({mutationFn:async n=>{const{data:r}=await Awe({...t,...n,throwOnError:!0});return r}}),lIe=t=>({mutationFn:async n=>{const{data:r}=await Twe({...t,...n,throwOnError:!0});return r}}),uIe=t=>({mutationFn:async n=>{const{data:r}=await Rwe({...t,...n,throwOnError:!0});return r}}),cIe=t=>({mutationFn:async n=>{const{data:r}=await Iwe({...t,...n,throwOnError:!0});return r}}),fxe=t=>Gn("filterOperationsListFilters",t),dIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Owe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:fxe(t)}),fIe=t=>({mutationFn:async n=>{const{data:r}=await Nwe({...t,...n,throwOnError:!0});return r}}),hIe=t=>({mutationFn:async n=>{const{data:r}=await Mwe({...t,...n,throwOnError:!0});return r}}),pIe=t=>Gn("filterDetailOperationsGetFilter",t),gIe=t=>({mutationFn:async n=>{const{data:r}=await Pwe({...t,...n,throwOnError:!0});return r}}),mIe=t=>({mutationFn:async n=>{const{data:r}=await kwe({...t,...n,throwOnError:!0});return r}}),hxe=t=>Gn("mailboxOperationsListMailboxes",t),vIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Dwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:hxe(t)}),yIe=t=>({mutationFn:async n=>{const{data:r}=await Lwe({...t,...n,throwOnError:!0});return r}}),bIe=t=>({mutationFn:async n=>{const{data:r}=await Uwe({...t,...n,throwOnError:!0});return r}}),SIe=t=>({mutationFn:async n=>{const{data:r}=await Fwe({...t,...n,throwOnError:!0});return r}}),pxe=t=>Gn("organizeJobDetailOperationsGetOrganizeJob",t),EIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await zwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:pxe(t)}),CIe=t=>({mutationFn:async n=>{const{data:r}=await jwe({...t,...n,throwOnError:!0});return r}}),gxe=t=>Gn("syncOperationsGetSyncStatus",t),wIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Bwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:gxe(t)}),mxe=t=>Gn("addressOperationsSearchAddresses",t),xIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Hwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:mxe(t)}),_Ie=t=>({mutationFn:async n=>{const{data:r}=await $we({...t,...n,throwOnError:!0});return r}}),vxe=t=>Gn("configOperationsGetConfig",t),yxe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await qwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:vxe(t)}),AIe=t=>Gn("threadOperationsListThreads",t),bxe=t=>Gn("threadOperationsSearchThreads",t),TIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Wwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:bxe(t)}),RIe=t=>({mutationFn:async n=>{const{data:r}=await Vwe({...t,...n,throwOnError:!0});return r}}),IIe=t=>({mutationFn:async n=>{const{data:r}=await Gwe({...t,...n,throwOnError:!0});return r}}),Sxe=t=>Gn("meOperationsListVipSuggestions",t),OIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Kwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Sxe(t)}),NIe=t=>({mutationFn:async n=>{const{data:r}=await Ywe({...t,...n,throwOnError:!0});return r}}),MIe=t=>({mutationFn:async n=>{const{data:r}=await Zwe({...t,...n,throwOnError:!0});return r}}),PIe=t=>({mutationFn:async n=>{const{data:r}=await Xwe({...t,...n,throwOnError:!0});return r}}),Exe=t=>Gn("messageOperationsDescribeMessage",t),kIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Qwe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Exe(t)}),DIe=t=>({mutationFn:async n=>{const{data:r}=await Jwe({...t,...n,throwOnError:!0});return r}}),Cxe=t=>Gn("messageOperationsGetRawMessage",t),LIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await exe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Cxe(t)}),tH=t=>Gn("outboxOperationsListOutboxMessages",t),UIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await txe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:tH(t)}),FIe=t=>({mutationFn:async n=>{const{data:r}=await nxe({...t,...n,throwOnError:!0});return r}}),zIe=t=>({mutationFn:async n=>{const{data:r}=await rxe({...t,...n,throwOnError:!0});return r}}),wxe=t=>Gn("outboxDetailOperationsGetOutboxMessage",t),xxe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await sxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:wxe(t)}),jIe=t=>({mutationFn:async n=>{const{data:r}=await oxe({...t,...n,throwOnError:!0});return r}}),BIe=t=>({mutationFn:async n=>{const{data:r}=await ixe({...t,...n,throwOnError:!0});return r}}),_xe=t=>Gn("semanticSearchOperationsSemanticSearch",t),HIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await axe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:_xe(t)}),nH=t=>Gn("systemOperationsGetSystemUpdate",t),Axe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await lxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:nH(t)}),Txe=t=>({mutationFn:async n=>{const{data:r}=await uxe({...t,...n,throwOnError:!0});return r}}),Rxe=t=>Gn("unifiedThreadOperationsListAllThreads",t),Ixe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await cxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Rxe(t)}),Oxe=t=>Gn("threadDetailOperationsListThreadMessages",t),$Ie=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await dxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Oxe(t)}),rH=_.createContext(void 0),x5={isOpen:!1,mode:"new"},Nxe=2e3,Mxe=6e4,Pxe=({children:t})=>{const[e,n]=_.useState(x5),[r,s]=_.useState(),o=_.useRef(0),a=vb(),{data:u}=k7({...xxe({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>Mxe?!1:Nxe}});_.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:tH()}))},[u,r,a]);const c=_.useCallback(y=>{n({...y,isOpen:!0})},[]),f=_.useCallback(()=>{n(x5)},[]),h=_.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=_.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=_.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:h,startSendPolling:g}),[e,c,f,h,g]);return O.jsx(rH.Provider,{value:m,children:t})},qIe=()=>{const t=_.useContext(rH);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},lI="remit.self-update.run",kxe=600,Dxe=300,_5="remit logs",Lxe="https://github.com/remit-mail/reader/releases/tag/",Uxe={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function OA(t){return Uxe[t]??"reconnecting"}function sH(t){const e=iu(t);return e===404||e===403||e===401}function oH(t,e){const n=t?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:py(n.publishedAt)??e,releaseNotesUrl:n.releaseNotesUrl??aH(n.latestVersion),summary:n.summary??""}}function Fxe(t){const e=t?.check.schemaVersion,n=t?.currentSchemaVersion;return e===void 0||n===void 0?!1:e>n}function zxe(){try{const t=localStorage.getItem(lI);if(!t)return null;const e=JSON.parse(t);return Bxe(e)?e:null}catch{return null}}function jxe(t){try{localStorage.setItem(lI,JSON.stringify(t))}catch{}}function A5(){try{localStorage.removeItem(lI)}catch{}}function Bxe(t){if(!t||typeof t!="object")return!1;const e=t;return typeof e.runId=="string"&&typeof e.attemptedVersion=="string"&&typeof e.previousVersion=="string"&&typeof e.startedAt=="number"}function T5(){return kxe+Dxe}function iH(t,e){return Math.max(0,Math.floor((e-t)/1e3))}function py(t){if(!t)return;const e=Date.parse(t);return Number.isNaN(e)?void 0:e}function aH(t){return`${Lxe}${t}`}function ah(t,e,n,r,s){return{status:"applying",runId:t,version:e,target:n,phase:r,elapsedSeconds:s}}function Hxe(t,e,n){switch(n){case"succeeded":return{status:"succeeded",runId:e.runId,version:e.targetVersion,previousVersion:e.fromVersion,releaseNotesUrl:t.check.releaseNotesUrl??aH(e.targetVersion)};case"rolledBack":return{status:"rolledBack",runId:e.runId,version:e.fromVersion,attemptedVersion:e.targetVersion,reason:e.message,logsCommand:e.logCommand};case"rollbackFailed":return{status:"rollbackFailed",runId:e.runId,attemptedVersion:e.targetVersion,previousVersion:e.fromVersion,reason:e.message,logsCommand:e.logCommand};case"abandoned":return{status:"abandoned",runId:e.runId,version:e.fromVersion,attemptedVersion:e.targetVersion,reason:e.message,logsCommand:e.logCommand};default:return n}}function $xe(t,e,n){const r=t.check;if(e)return{status:"checking",version:t.currentVersion};if(r.status==="failed")return{status:"checkFailed",version:t.currentVersion,reason:r.error??"Remit could not reach the update service.",lastCheckedAt:py(r.lastCheckedAt)};if(r.status==="disabled")return{status:"neverChecked",version:t.currentVersion};const s=oH(t,n);return s?{status:"available",version:t.currentVersion,release:s}:{status:"upToDate",version:t.currentVersion,checkedAt:py(r.lastCheckedAt)??n}}function Hm(t,e,n,r){return{surface:{status:"ready",section:t,overlay:e},clearStoredRun:n,releaseHeld:r}}function qxe(t,e,n,r,s){const o=iH(t.startedAt,s),a=e?.currentVersion??t.previousVersion,u=!r&&n!==null&&n.runId===t.runId;if(u&&n!==null&&n.outcome!==null)return null;if(u&&n!==null){const f=OA(n.phase);return Hm(ah(n.runId,a,n.targetVersion,f,o),{kind:"applying",target:n.targetVersion,phase:f,elapsedSeconds:o},!1,!1)}if(r){const f=ah(t.runId,t.previousVersion,t.attemptedVersion,"reconnecting",o);return o>T5()?{surface:{status:"ready",section:f,overlay:{kind:"neverCameBack",attemptedVersion:t.attemptedVersion,previousVersion:t.previousVersion,elapsedSeconds:o,logsCommand:_5}},clearStoredRun:!0,releaseHeld:!1}:Hm(f,{kind:"applying",target:t.attemptedVersion,phase:"reconnecting",elapsedSeconds:o},!1,!1)}if(e===void 0)return Hm(ah(t.runId,a,t.attemptedVersion,"preparing",o),{kind:"applying",target:t.attemptedVersion,phase:"preparing",elapsedSeconds:o},!1,!1);if(o>T5())return{surface:{status:"ready",section:{status:"unreachable",runId:t.runId,previousVersion:t.previousVersion,attemptedVersion:t.attemptedVersion,elapsedSeconds:o,logsCommand:n?.logCommand??_5},overlay:{kind:"none"}},clearStoredRun:!0,releaseHeld:!0};const c=n!==null&&n.outcome===null?OA(n.phase):"preparing";return Hm(ah(t.runId,a,t.attemptedVersion,c,o),{kind:"applying",target:t.attemptedVersion,phase:c,elapsedSeconds:o},!1,!1)}function R5(t){const{data:e,isError:n,isFetching:r,dismissedRunId:s,checkRequested:o,now:a}=t;if(n)return{surface:{status:"ready",section:{status:"checkFailed",version:e?.currentVersion??"the current version",reason:"Remit could not reach the update service."},overlay:{kind:"none"}},clearStoredRun:!0};if(!e)return{surface:{status:"loading"},clearStoredRun:!1};const u=e.run,c=u!==null&&s!==null&&u.runId===s;if(u!==null&&!c&&u.outcome!==null)return{surface:{status:"ready",section:Hxe(e,u,u.outcome),overlay:{kind:"none"}},clearStoredRun:!0};if(u!==null&&!c&&u.outcome===null){const f=iH(py(u.startedAt)??a,a),h=OA(u.phase);return{surface:{status:"ready",section:ah(u.runId,u.fromVersion,u.targetVersion,h,f),overlay:{kind:"applying",target:u.targetVersion,phase:h,elapsedSeconds:f}},clearStoredRun:!1}}return{surface:{status:"ready",section:$xe(e,o&&r,a),overlay:{kind:"none"}},clearStoredRun:!1}}function Wxe(t){const{data:e,isError:n,error:r,held:s,now:o}=t,a=e?.run??null;if(sH(r)&&!s)return{surface:{status:"absent"},clearStoredRun:!0,releaseHeld:!0};if(s){const c=qxe(s,e,a,n,o);return c||{surface:R5(t).surface,clearStoredRun:!0,releaseHeld:!0}}const u=R5(t);return{surface:u.surface,clearStoredRun:u.clearStoredRun,releaseHeld:!1}}const Vxe=3e4,Gxe=5e3;function Kxe(t,e,n){if(sH(t)&&!n)return!1;const r=e!==null&&e.outcome===null;return n||r?Gxe:Vxe}function Yxe(){const t=vb(),[e,n]=_.useState(()=>zxe()),[r,s]=_.useState(null),[o,a]=_.useState(!1),u=_.useRef(e);u.current=e;const c=k7({...Axe(),retry:!1,meta:{softError:!0},refetchInterval:R=>Kxe(R.state.error,R.state.data?.run??null,u.current!==null)}),f=Wxe({data:c.data,isError:c.isError,error:c.error,isFetching:c.isFetching,held:e,dismissedRunId:r,checkRequested:o,now:Date.now()}),h=_.useRef(null);h.current=f.surface.status==="ready"&&"runId"in f.surface.section?f.surface.section.runId:null;const{clearStoredRun:g,releaseHeld:m}=f;_.useEffect(()=>{g&&A5()},[g]),_.useEffect(()=>{m&&n(R=>R===null?R:null)},[m]),_.useEffect(()=>{o&&!c.isFetching&&a(!1)},[o,c.isFetching]);const{refetch:y}=c,S=_.useCallback(()=>{a(!0),y()},[y]),E=_.useCallback(()=>{y()},[y]),C=mpe({...Txe(),meta:{softError:!0},onSuccess:R=>{const M=R.run;if(M!==null){const N={runId:M.runId,attemptedVersion:M.targetVersion,previousVersion:M.fromVersion,startedAt:Date.now()};jxe(N),n(N),s(null)}t.setQueryData(nH(),R)},onError:()=>{y()}}),{mutate:w}=C,A=_.useCallback(R=>{w({body:{targetVersion:R}})},[w]),T=_.useCallback(()=>{h.current!==null&&s(h.current),A5(),n(null)},[]);return{surface:f.surface,appliesSchemaMigration:Fxe(c.data),currentVersion:c.data?.currentVersion,release:oH(c.data,Date.now()),onCheck:S,install:A,onDismissResult:T,onRetryConnection:E}}const uI=_.createContext(null);function Zxe({children:t}){const e=Yxe();return _.createElement(uI.Provider,{value:e},t)}function Xxe(){const t=_.useContext(uI);if(t===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return t}function Qxe(){return _.useContext(uI)}function Jxe(){const{surface:t,onRetryConnection:e}=Xxe();if(t.status!=="ready")return null;const{overlay:n}=t;return n.kind==="applying"?O.jsx(ite,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?O.jsx(ate,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:e}):null}const Nx=(...t)=>q8(P8(t)),e_e={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},t_e={error:iQ,warning:F8,info:cQ},n_e={error:"Error",warning:"Warning",info:"Information"},r_e=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=e_e[e],a=t_e[e];return O.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Nx("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[O.jsx(a,{className:Nx("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("p",{className:Nx("text-sm font-medium",o.title),children:n}),r&&O.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),O.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 ${n_e[e].toLowerCase()}`,children:O.jsx(La,{className:"size-4","aria-hidden":"true"})})]})},s_e=({errors:t,onDismiss:e})=>t.length===0?null:O.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:O.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>O.jsx(r_e,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),I5=5,WIe=(t,e,n)=>({title:t,detail:lH(n)??e,error:n}),lH=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}},VIe=t=>{const e=lH(t);return e?e.startsWith("Message not found"):!1},o_e=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,i_e=(t,e)=>{const r=[...t.filter(s=>!o_e(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=I5?r:r.slice(r.length-I5)},a_e=(t,e)=>t.filter(n=>n.id!==e),l_e=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),uH=_.createContext(void 0),u_e=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,c_e=({children:t})=>{const[e,n]=_.useState([]),r=_.useCallback(u=>{if(u.error!=null&&N9(u.error))return $l(u.error).correlationId;const c=l_e(u,u_e(),Date.now());return n(f=>i_e(f,c)),c.id},[]),s=_.useCallback(u=>{n(c=>a_e(c,u))},[]),o=_.useCallback(()=>{n([])},[]),a=_.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return O.jsxs(uH.Provider,{value:a,children:[t,O.jsx(s_e,{errors:e,onDismiss:s})]})},GIe=()=>{const t=_.useContext(uH);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},d_e=({error:t,reset:e,info:n})=>{const r=Hy(t),s=$l(t,{recoverable:r,componentStack:n?.componentStack});return O.jsx(z9,{fatal:s,onRetry:r?e:void 0})},Sp=qge()({component:h_e,errorComponent:d_e}),f_e=()=>{const{t}=xwe("common",{useSuspense:!1});return O.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 h_e(){return O.jsxs(c_e,{children:[O.jsxs(Zxe,{children:[O.jsxs(Pxe,{children:[O.jsx(f_e,{}),O.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:O.jsx(_.Suspense,{fallback:O.jsx(dT,{}),children:O.jsx(dz,{})})})]}),O.jsx(Jxe,{})]}),O.jsx(F9,{})]})}const p_e=hr("/")({beforeLoad:()=>{throw W7({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 O5;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(O5||(O5={}));const Oe=Tt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ea=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 NA=(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 g_e=NA;function m_e(){return g_e}const v_e=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 _e(t,e){const n=m_e(),r=v_e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===NA?void 0:NA].filter(s=>!!s)});t.common.issues.push(r)}class us{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 Ye;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 us.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 Ye;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 Ye=Object.freeze({status:"aborted"}),lh=t=>({status:"dirty",value:t}),Ms=t=>({status:"valid",value:t}),N5=t=>t.status==="aborted",M5=t=>t.status==="dirty",td=t=>t.status==="valid",gy=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 $a{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 P5=(t,e)=>{if(td(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 Ea(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Ea(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new us,ctx:{common:e.parent.common,data:e.data,parsedType:Ea(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(gy(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:Ea(e)},s=this._parseSync({data:e,path:r.path,parent:r});return P5(r,s)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Ea(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return td(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=>td(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:Ea(e)},s=this._parse({data:e,path:r.path,parent:r}),o=await(gy(s)?s:Promise.resolve(s));return P5(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 sd({schema:this,typeName:Ze.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 Pa.create(this,this._def)}nullable(){return od.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xo.create(this)}promise(){return by.create(this,this._def)}or(e){return vy.create([this,e],this._def)}and(e){return yy.create(this,e,this._def)}transform(e){return new sd({...st(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new PA({...st(this._def),innerType:this,defaultValue:n,typeName:Ze.ZodDefault})}brand(){return new j_e({typeName:Ze.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new kA({...st(this._def),innerType:this,catchValue:n,typeName:Ze.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return cI.create(this,e)}readonly(){return DA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const y_e=/^c[^\s-]{8,}$/i,b_e=/^[0-9a-z]+$/,S_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,E_e=/^[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,C_e=/^[a-z0-9_-]{21}$/i,w_e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,x_e=/^[-+]?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)?)??$/,__e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,A_e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Mx;const T_e=/^(?:(?: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])$/,R_e=/^(?:(?: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])$/,I_e=/^(([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]))$/,O_e=/^(([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])$/,N_e=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,M_e=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cH="((\\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])))",P_e=new RegExp(`^${cH}$`);function dH(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 k_e(t){return new RegExp(`^${dH(t)}$`)}function D_e(t){let e=`${cH}T${dH(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 L_e(t,e){return!!((e==="v4"||!e)&&T_e.test(t)||(e==="v6"||!e)&&I_e.test(t))}function U_e(t,e){if(!w_e.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 F_e(t,e){return!!((e==="v4"||!e)&&R_e.test(t)||(e==="v6"||!e)&&O_e.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 _e(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ye}const r=new us;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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?_e(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&_e(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")__e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Mx||(Mx=new RegExp(A_e,"u")),Mx.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")E_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")C_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")y_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")b_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")S_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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),_e(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),_e(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),_e(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),_e(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),_e(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?D_e(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?P_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?k_e(o).test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?x_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?L_e(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?U_e(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?F_e(e.data,o.version)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?N_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?M_e.test(e.data)||(s=this._getOrReturnCtx(e,s),_e(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:Ze.ZodString,coerce:t?.coerce??!1,...st(t)});function z_e(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 Ql 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 _e(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ye}let r;const s=new us;for(const o of this._def.checks)o.kind==="int"?Tt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),_e(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),_e(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),_e(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?z_e(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),_e(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),_e(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 Ql({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Ql({...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)}}Ql.create=t=>new Ql({checks:[],typeName:Ze.ZodNumber,coerce:t?.coerce||!1,...st(t)});class Jl 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 us;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),_e(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),_e(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),_e(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 _e(n,{code:ge.invalid_type,expected:Oe.bigint,received:n.parsedType}),Ye}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 Jl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new Jl({...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}}Jl.create=t=>new Jl({checks:[],typeName:Ze.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class my extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ye}return Ms(e.data)}}my.create=t=>new my({typeName:Ze.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class nd 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 _e(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ye}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return _e(o,{code:ge.invalid_date}),Ye}const r=new us;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),_e(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),_e(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 nd({...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}}nd.create=t=>new nd({checks:[],coerce:t?.coerce||!1,typeName:Ze.ZodDate,...st(t)});class k5 extends wt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ye}return Ms(e.data)}}k5.create=t=>new k5({typeName:Ze.ZodSymbol,...st(t)});class D5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ye}return Ms(e.data)}}D5.create=t=>new D5({typeName:Ze.ZodUndefined,...st(t)});class L5 extends wt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ye}return Ms(e.data)}}L5.create=t=>new L5({typeName:Ze.ZodNull,...st(t)});class U5 extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ms(e.data)}}U5.create=t=>new U5({typeName:Ze.ZodAny,...st(t)});class F5 extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ms(e.data)}}F5.create=t=>new F5({typeName:Ze.ZodUnknown,...st(t)});class qa extends wt{_parse(e){const n=this._getOrReturnCtx(e);return _e(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ye}}qa.create=t=>new qa({typeName:Ze.ZodNever,...st(t)});class z5 extends wt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ye}return Ms(e.data)}}z5.create=t=>new z5({typeName:Ze.ZodVoid,...st(t)});class xo extends wt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return _e(n,{code:ge.invalid_type,expected:Oe.array,received:n.parsedType}),Ye;if(s.exactLength!==null){const a=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(a||u)&&(_e(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&&(_e(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&&(_e(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 $a(n,a,n.path,u)))).then(a=>us.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new $a(n,a,n.path,u)));return us.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new xo({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new xo({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new xo({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}xo.create=(t,e)=>new xo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...st(e)});function wc(t){if(t instanceof An){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Pa.create(wc(r))}return new An({...t._def,shape:()=>e})}else return t instanceof xo?new xo({...t._def,type:wc(t.element)}):t instanceof Pa?Pa.create(wc(t.unwrap())):t instanceof od?od.create(wc(t.unwrap())):t instanceof eu?eu.create(t.items.map(e=>wc(e))):t}class An 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 _e(f,{code:ge.invalid_type,expected:Oe.object,received:f.parsedType}),Ye}const{status:r,ctx:s}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),u=[];if(!(this._def.catchall instanceof qa&&this._def.unknownKeys==="strip"))for(const f in s.data)a.includes(f)||u.push(f);const c=[];for(const f of a){const h=o[f],g=s.data[f];c.push({key:{status:"valid",value:f},value:h._parse(new $a(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof qa){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of u)c.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(f==="strict")u.length>0&&(_e(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 h of u){const g=s.data[h];c.push({key:{status:"valid",value:h},value:f._parse(new $a(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of c){const g=await h.key,m=await h.value;f.push({key:g,value:m,alwaysSet:h.alwaysSet})}return f}).then(f=>us.mergeObjectSync(r,f)):us.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return Me.errToObj,new An({...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 An({...this._def,unknownKeys:"strip"})}passthrough(){return new An({...this._def,unknownKeys:"passthrough"})}extend(e){return new An({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new An({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ze.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new An({...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 An({...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 An({...this._def,shape:()=>n})}deepPartial(){return wc(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 An({...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 Pa;)o=o._def.innerType;n[r]=o}return new An({...this._def,shape:()=>n})}keyof(){return fH(Tt.objectKeys(this.shape))}}An.create=(t,e)=>new An({shape:()=>t,unknownKeys:"strip",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});An.strictCreate=(t,e)=>new An({shape:()=>t,unknownKeys:"strict",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});An.lazycreate=(t,e)=>new An({shape:t,unknownKeys:"strip",catchall:qa.create(),typeName:Ze.ZodObject,...st(e)});class vy 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 _e(n,{code:ge.invalid_union,unionErrors:a}),Ye}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},h=c._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!o&&(o={result:h,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 _e(n,{code:ge.invalid_union,unionErrors:u}),Ye}}get options(){return this._def.options}}vy.create=(t,e)=>new vy({options:t,typeName:Ze.ZodUnion,...st(e)});function MA(t,e){const n=Ea(t),r=Ea(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=MA(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=MA(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 yy extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(N5(o)||N5(a))return Ye;const u=MA(o.value,a.value);return u.valid?((M5(o)||M5(a))&&n.dirty(),{status:n.value,value:u.data}):(_e(r,{code:ge.invalid_intersection_types}),Ye)};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}))}}yy.create=(t,e,n)=>new yy({left:t,right:e,typeName:Ze.ZodIntersection,...st(n)});class eu extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return _e(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ye;if(r.data.length<this._def.items.length)return _e(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ye;!this._def.rest&&r.data.length>this._def.items.length&&(_e(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 $a(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>us.mergeArray(n,a)):us.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new eu({...this._def,rest:e})}}eu.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new eu({items:t,typeName:Ze.ZodTuple,rest:null,...st(e)})};class j5 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 _e(r,{code:ge.invalid_type,expected:Oe.map,received:r.parsedType}),Ye;const s=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([u,c],f)=>({key:s._parse(new $a(r,u,r.path,[f,"key"])),value:o._parse(new $a(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,h=await c.value;if(f.status==="aborted"||h.status==="aborted")return Ye;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const c of a){const f=c.key,h=c.value;if(f.status==="aborted"||h.status==="aborted")return Ye;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}}}}j5.create=(t,e,n)=>new j5({valueType:e,keyType:t,typeName:Ze.ZodMap,...st(n)});class Xh extends wt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return _e(r,{code:ge.invalid_type,expected:Oe.set,received:r.parsedType}),Ye;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(_e(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&&(_e(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 h of c){if(h.status==="aborted")return Ye;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((c,f)=>o._parse(new $a(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Xh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Xh({...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)}}Xh.create=(t,e)=>new Xh({valueType:t,minSize:null,maxSize:null,typeName:Ze.ZodSet,...st(e)});class B5 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})}}B5.create=(t,e)=>new B5({getter:t,typeName:Ze.ZodLazy,...st(e)});class H5 extends wt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return _e(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}H5.create=(t,e)=>new H5({value:t,typeName:Ze.ZodLiteral,...st(e)});function fH(t,e){return new rd({values:t,typeName:Ze.ZodEnum,...st(e)})}class rd extends wt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return _e(n,{expected:Tt.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ye}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 _e(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ye}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 rd.create(e,{...this._def,...n})}exclude(e,n=this._def){return rd.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}rd.create=fH;class $5 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 _e(r,{expected:Tt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(Tt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Tt.objectValues(n);return _e(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ye}return Ms(e.data)}get enum(){return this._def.values}}$5.create=(t,e)=>new $5({values:t,typeName:Ze.ZodNativeEnum,...st(e)});class by 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 _e(n,{code:ge.invalid_type,expected:Oe.promise,received:n.parsedType}),Ye;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})))}}by.create=(t,e)=>new by({type:t,typeName:Ze.ZodPromise,...st(e)});class sd extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.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=>{_e(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 Ye;const c=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return c.status==="aborted"?Ye:c.status==="dirty"||n.value==="dirty"?lh(c.value):c});{if(n.value==="aborted")return Ye;const u=this._def.schema._parseSync({data:a,path:r.path,parent:r});return u.status==="aborted"?Ye:u.status==="dirty"||n.value==="dirty"?lh(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"?Ye:(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"?Ye:(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(!td(a))return Ye;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=>td(a)?Promise.resolve(s.transform(a.value,o)).then(u=>({status:n.value,value:u})):Ye);Tt.assertNever(s)}}sd.create=(t,e,n)=>new sd({schema:t,typeName:Ze.ZodEffects,effect:e,...st(n)});sd.createWithPreprocess=(t,e,n)=>new sd({schema:e,effect:{type:"preprocess",transform:t},typeName:Ze.ZodEffects,...st(n)});class Pa extends wt{_parse(e){return this._getType(e)===Oe.undefined?Ms(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pa.create=(t,e)=>new Pa({innerType:t,typeName:Ze.ZodOptional,...st(e)});class od extends wt{_parse(e){return this._getType(e)===Oe.null?Ms(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}od.create=(t,e)=>new od({innerType:t,typeName:Ze.ZodNullable,...st(e)});class PA 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}}PA.create=(t,e)=>new PA({innerType:t,typeName:Ze.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class kA 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 gy(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}}kA.create=(t,e)=>new kA({innerType:t,typeName:Ze.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class q5 extends wt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return _e(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ye}return{status:"valid",value:e.data}}}q5.create=t=>new q5({typeName:Ze.ZodNaN,...st(t)});class j_e 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 cI 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"?Ye:o.status==="dirty"?(n.dirty(),lh(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"?Ye: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 cI({in:e,out:n,typeName:Ze.ZodPipeline})}}class DA extends wt{_parse(e){const n=this._def.innerType._parse(e),r=s=>(td(s)&&(s.value=Object.freeze(s.value)),s);return gy(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}DA.create=(t,e)=>new DA({innerType:t,typeName:Ze.ZodReadonly,...st(e)});var Ze;(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"})(Ze||(Ze={}));const xr=hi.create;Ql.create;Jl.create;const B_e=my.create;nd.create;qa.create;xo.create;const Ed=An.create;vy.create;yy.create;eu.create;rd.create;by.create;Pa.create;od.create;const KIe={string:(t=>hi.create({...t,coerce:!0})),number:(t=>Ql.create({...t,coerce:!0})),boolean:(t=>my.create({...t,coerce:!0})),bigint:(t=>Jl.create({...t,coerce:!0})),date:(t=>nd.create({...t,coerce:!0}))},H_e=Dy().apiUrl;qe.setConfig({baseUrl:H_e,fetch:I8});qe.interceptors.error.use((t,e)=>{if(t instanceof o_||!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 o_(r,e.status,n)});const Px={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},YIe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},W5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function $_e(t){const e=new Map,n=[...t].sort((r,s)=>W5.indexOf(Px[r.role])-W5.indexOf(Px[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=Px[r.role];s&&e.set(r.mailboxId,s)}return e}const q_e=t=>{const e=t.split("/");return e[e.length-1]||t};function ZIe(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=q_e(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const W_e=new Set(["sent","drafts","trash"]),XIe=t=>t===void 0||!W_e.has(t),V_e=new Map;function QIe(t){const e=new Map;for(const n of t){const r=$_e(n.folderAppointments);for(const[s,o]of r)e.set(s,{role:o});for(const s of n.mailboxes){const o=r.get(s.mailboxId);e.set(s.mailboxId,{...o?{role:o}:{},providerPath:s.fullPath})}}return e}function JIe(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&Gee(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const G_e=_.createContext(null),e2e=()=>_.useContext(G_e)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:V_e,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},K_e=()=>Vn(()=>import("./mail-BMBn_nLi.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),Y_e=Ed({q:xr().optional()}),Z_e=hr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(yxe()),t.prefetchQuery({...Ixe(),staleTime:6e4})},component:ir(K_e,"component"),validateSearch:Y_e}),X_e=()=>Vn(()=>import("./onboarding-yY91msSU.js"),__vite__mapDeps([12,13,3,4])),Q_e=hr("/onboarding")({component:ir(X_e,"component")});function J_e(){const t=Qxe(),e=t?.surface.status==="ready"&&t.surface.section.status==="available";return O.jsx(ste,{show:e,children:O.jsx(yQ,{className:"size-4"})})}const eAe=()=>Vn(()=>import("./settings-BGBibXai.js"),[]),t2e=[{id:"accounts",label:"Accounts",icon:O.jsx(U8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:O.jsx(vQ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:O.jsx(uQ,{className:"size-4"})},{id:"filters",label:"Filters",icon:O.jsx(lQ,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:O.jsx(fQ,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:O.jsx(J_e,{})}],n2e={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",appearance:"/settings/appearance",advanced:"/settings/advanced"},tAe=hr("/settings")({component:ir(eAe,"component")}),nAe=()=>Vn(()=>import("./index-DFY6-7Ge.js"),__vite__mapDeps([14,7])),rAe=()=>Vn(()=>import("./index-DtqBFgK5.js"),[]),sAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),selectedMailboxId:xr().optional(),q:xr().optional()}),oAe=hr("/mail/")({component:ir(rAe,"component"),validateSearch:sAe,errorComponent:ir(nAe,"errorComponent")}),iAe=()=>Vn(()=>import("./_mailboxId-DtqBFgK5.js"),[]),aAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),q:xr().optional()}),lAe=hr("/mail/$mailboxId")({component:ir(iAe,"component"),validateSearch:aAe}),uAe=()=>Vn(()=>import("./flagged-CWyvtGeg.js"),__vite__mapDeps([15,7])),cAe=()=>Vn(()=>import("./flagged-DtqBFgK5.js"),[]),dAe=Ed({selectedMessageId:xr().optional(),q:xr().optional()}),fAe=hr("/mail/flagged")({component:ir(cAe,"component"),validateSearch:dAe,errorComponent:ir(uAe,"errorComponent")}),hAe=()=>Vn(()=>import("./outbox-DtqBFgK5.js"),[]),pAe=Ed({selectedOutboxMessageId:xr().optional(),q:xr().optional()}),gAe=hr("/mail/outbox")({component:ir(hAe,"component"),validateSearch:pAe}),mAe=()=>Vn(()=>import("./index-aL9qdiwR.js"),[]),vAe=hr("/settings/")({component:ir(mAe,"component")}),yAe=()=>Vn(()=>import("./accounts-BCrN_WZY.js"),__vite__mapDeps([16,5,17,2,13,3,4,18,7,8])),bAe=Ed({editAccountId:xr().optional(),focusSmtp:B_e().optional(),connected:xr().optional(),oauthError:xr().optional()}),SAe=hr("/settings/accounts")({component:ir(yAe,"component"),validateSearch:bAe}),EAe=()=>Vn(()=>import("./advanced-hyewI6NP.js"),__vite__mapDeps([19,17,2,18,9,10])),CAe=hr("/settings/advanced")({component:ir(EAe,"component")}),wAe=()=>Vn(()=>import("./appearance-CEbzMr1T.js"),__vite__mapDeps([20,17,2])),xAe=hr("/settings/appearance")({component:ir(wAe,"component")}),_Ae=()=>Vn(()=>import("./filters-Tqa-_zb9.js"),__vite__mapDeps([21,17,2,6,10,7])),AAe=hr("/settings/filters")({component:ir(_Ae,"component")}),TAe=()=>Vn(()=>import("./folders-CLWqJfFM.js"),__vite__mapDeps([22,11,17,2,7])),RAe=hr("/settings/folders")({component:ir(TAe,"component")}),IAe=()=>Vn(()=>import("./senders-DKiu2US4.js"),__vite__mapDeps([23,3,17,2,7,1,8])),OAe=hr("/settings/senders")({component:ir(IAe,"component")}),NAe=()=>Vn(()=>import("./suggested-vips-BvoEfJ52.js"),[]),MAe=hr("/settings/suggested-vips")({component:ir(NAe,"component")}),PAe=p_e.update({id:"/",path:"/",getParentRoute:()=>Sp}),Ep=Z_e.update({id:"/mail",path:"/mail",getParentRoute:()=>Sp}),kAe=Q_e.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Sp}),Mi=tAe.update({id:"/settings",path:"/settings",getParentRoute:()=>Sp}),DAe=oAe.update({id:"/",path:"/",getParentRoute:()=>Ep}),LAe=lAe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>Ep}),UAe=fAe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>Ep}),FAe=gAe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>Ep}),zAe=vAe.update({id:"/",path:"/",getParentRoute:()=>Mi}),jAe=SAe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Mi}),BAe=CAe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Mi}),HAe=xAe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Mi}),$Ae=AAe.update({id:"/filters",path:"/filters",getParentRoute:()=>Mi}),qAe=RAe.update({id:"/folders",path:"/folders",getParentRoute:()=>Mi}),WAe=OAe.update({id:"/senders",path:"/senders",getParentRoute:()=>Mi}),VAe=MAe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Mi}),GAe={MailMailboxIdRoute:LAe,MailFlaggedRoute:UAe,MailOutboxRoute:FAe,MailIndexRoute:DAe},KAe=Ep._addFileChildren(GAe),YAe={SettingsAccountsRoute:jAe,SettingsAdvancedRoute:BAe,SettingsAppearanceRoute:HAe,SettingsFiltersRoute:$Ae,SettingsFoldersRoute:qAe,SettingsSendersRoute:WAe,SettingsSuggestedVipsRoute:VAe,SettingsIndexRoute:zAe},ZAe=Mi._addFileChildren(YAe),XAe={IndexRoute:PAe,MailRoute:KAe,OnboardingRoute:kAe,SettingsRoute:ZAe},QAe=Sp._addFileChildren(XAe)._addFileTypes(),JAe=(t,e)=>{const n=ime({routeTree:QAe,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname),Mte(r.toLocation.pathname)}),n},We=t=>typeof t=="string",Gf=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},V5=t=>t==null?"":""+t,eTe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},tTe=/###/g,G5=t=>t&&t.indexOf("###")>-1?t.replace(tTe,"."):t,K5=t=>!t||We(t),Ch=(t,e,n)=>{const r=We(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(K5(t))return{};const o=G5(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return K5(t)?{}:{obj:t,k:G5(r[s])}},Y5=(t,e,n)=>{const{obj:r,k:s}=Ch(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=Ch(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=Ch(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},nTe=(t,e,n,r)=>{const{obj:s,k:o}=Ch(t,e,Object);s[o]=s[o]||[],s[o].push(n)},Sy=(t,e)=>{const{obj:n,k:r}=Ch(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},rTe=(t,e,n)=>{const r=Sy(t,n);return r!==void 0?r:Sy(e,n)},hH=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?We(t[r])||t[r]instanceof String||We(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):hH(t[r],e[r],n):t[r]=e[r]);return t},dc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var sTe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const oTe=t=>We(t)?t.replace(/[&<>"'\/]/g,e=>sTe[e]):t;class iTe{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 aTe=[" ",",","?","!",";"],lTe=new iTe(20),uTe=(t,e,n)=>{e=e||"",n=n||"";const r=aTe.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=lTe.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},LA=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},Ey=t=>t?.replace("_","-"),cTe={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 Cy{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||cTe,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:(We(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Cy(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Cy(this.logger,e)}}var wo=new Cy;class jb{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 Z5 extends jb{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):We(r)&&o?u.push(...r.split(o)):u.push(r)));const c=Sy(this.data,u);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!We(r)?c:LA(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),Y5(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)(We(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=Sy(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?hH(c,r,o):c={...c,...r},Y5(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 pH={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 X5={},Q5=t=>!We(t)&&typeof t!="boolean"&&typeof t!="number";class wy extends jb{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),eTe(["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&&!uTe(e,r,s);if(a&&!u){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:We(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:We(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,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(h){const D=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${D}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${D}${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,A=n.count!==void 0&&!We(n.count),T=wy.hasDefaultValue(n),R=A?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&A?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",N=A&&!n.ordinal&&n.count===0,I=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let k=m;w&&!m&&T&&(k=I);const F=Q5(k),H=Object.prototype.toString.apply(k);if(w&&k&&F&&E.indexOf(H)<0&&!(We(C)&&Array.isArray(k))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,k,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(g.res=D,g.usedParams=this.getUsedParamsDetails(n),g):D}if(o){const D=Array.isArray(k),z=D?[]:{},q=D?S:y;for(const V in k)if(Object.prototype.hasOwnProperty.call(k,V)){const ee=`${q}${o}${V}`;T&&!m?z[V]=this.translate(ee,{...n,defaultValue:Q5(I)?I[V]:void 0,joinArrays:!1,ns:u}):z[V]=this.translate(ee,{...n,joinArrays:!1,ns:u}),z[V]===ee&&(z[V]=k[V])}m=z}}else if(w&&We(C)&&Array.isArray(m))m=m.join(C),m&&(m=this.extendTranslation(m,e,n,r));else{let D=!1,z=!1;!this.isValidLookup(m)&&T&&(D=!0,m=I),this.isValidLookup(m)||(z=!0,m=a);const V=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:m,ee=T&&I!==m&&this.options.updateMissing;if(z||D||ee){if(this.logger.log(ee?"updateKey":"missingKey",f,c,a,ee?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 te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&te&&te[0])for(let de=0;de<te.length;de++)$.push(te[de]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(n.lng||this.language):$.push(n.lng||this.language);const fe=(de,Ae,L)=>{const K=T&&L!==m?L:V;this.options.missingKeyHandler?this.options.missingKeyHandler(de,c,Ae,K,ee,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(de,c,Ae,K,ee,n),this.emit("missingKey",de,c,Ae,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?$.forEach(de=>{const Ae=this.pluralResolver.getSuffixes(de,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(L=>{fe([de],a+L,n[`defaultValue${L}`]||I)})}):fe($,a,I))}m=this.extendTranslation(m,e,n,g,r),z&&m===a&&this.options.appendNamespaceToMissingKey&&(m=`${c}:${a}`),(z||D)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,D?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=We(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const m=e.match(this.interpolator.nestingRegexp);h=m&&m.length}let g=r.replace&&!We(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;h<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=We(u)?[u]:u;return e!=null&&c?.length&&r.applyPostProcessor!==!1&&(e=pH.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 We(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,n),h=f.key;s=h;let g=f.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!We(n.count),y=m&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(We(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,!X5[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(X5[`${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 A=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(A,h,w,C,n);else{let R;m&&(R=this.pluralResolver.getSuffix(w,n.count,n));const M=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(A.push(h+R),n.ordinal&&R.indexOf(N)===0&&A.push(h+R.replace(N,this.options.pluralSeparator)),y&&A.push(h+M)),S){const I=`${h}${this.options.contextSeparator}${n.context}`;A.push(I),m&&(A.push(I+R),n.ordinal&&R.indexOf(N)===0&&A.push(I+R.replace(N,this.options.pluralSeparator)),y&&A.push(I+M))}}let T;for(;T=A.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&&!We(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 J5{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(e){if(e=Ey(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=Ey(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(We(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)),We(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 We(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))):We(e)&&o(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&o(this.formatLanguageCode(a))}),s}}const e6={zero:0,one:1,two:2,few:3,many:4,other:5},t6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class dTe{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=Ey(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!"),t6;if(!e.match(/-|_/))return t6;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)=>e6[s]-e6[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 n6=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=rTe(t,e,n);return!o&&s&&We(n)&&(o=LA(t,n,r),o===void 0&&(o=LA(e,n,r))),o},kx=t=>t.replace(/\$/g,"$$$$");class fTe{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:h,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:E,nestingOptionsSeparator:C,maxReplaces:w,alwaysFormat:A}=e.interpolation;this.escape=n!==void 0?n:oTe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?dc(o):a||"{{",this.suffix=u?dc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?dc(m):y||dc("$t("),this.nestingSuffix=S?dc(S):E||dc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=A!==void 0?A:!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=n6(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(n6(n,c,E,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...n,interpolationkey:E})};this.resetRegExp();const h=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,g=s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>kx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?kx(this.escape(y)):kx(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 h=="function"){const C=h(e,o,s);a=We(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!We(a)&&!this.useRawValueToEscape&&(a=V5(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 h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;const g=c.split(new RegExp(`${h}[ ]*{`));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}${h}${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&&!We(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 h=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=h.shift(),c=h,f=!0}if(o=n(u.call(this,s[1].trim(),a),a),o&&s[0]===e&&!We(o))return o;We(o)||(o=V5(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),f&&(o=c.reduce((h,g)=>this.format(h,g,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const hTe=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,""),h=u.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:e,formatOptions:n}},fc=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(Ey(r),s),e[a]=u),u(n)}};class pTe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=wo.create("formatter"),this.options=e,this.formats={number:fc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:fc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:fc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:fc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:fc((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()]=fc(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:h}=hTe(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,{...h,...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 gTe=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class mTe extends jb{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 h=!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,h=!1,a[m]===void 0&&(a[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),h||(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=>{nTe(c.loaded,[o],a),gTe(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const h=c.loaded[f];h.length&&h.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,h)=>{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&&h&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,a)},o);return}a(f,h)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(e,n);f&&typeof f.then=="function"?f.then(h=>u(null,h)).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();We(e)&&(e=this.languageUtils.toResolveHierarchy(e)),We(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 h;f.length===5?h=f(e,n,r,s,c):h=f(e,n,r,s),h&&typeof h.then=="function"?h.then(g=>u(null,g)).catch(u):u(null,h)}catch(h){u(h)}else f(e,n,r,s,u,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const r6=()=>({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]),We(t[1])&&(e.defaultValue=t[1]),We(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}}),s6=t=>(We(t.ns)&&(t.ns=[t.ns]),We(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),We(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),$m=()=>{},vTe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Qh extends jb{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=s6(e),this.services={},this.logger=wo,this.modules={external:[]},vTe(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&&(We(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=r6();this.options={...s,...this.options,...s6(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=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?wo.init(o(this.modules.logger),this.options):wo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=pTe;const g=new J5(this.options);this.store=new Z5(this.options.resources,this.options);const m=this.services;m.logger=wo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new dTe(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(m.formatter=o(h),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new fTe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new mTe(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 wy(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=$m),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=function(){return e.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return e.store[h](...arguments),e}});const c=Gf(),f=()=>{const h=(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 h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};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]:$m;const s=We(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=Gf();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=$m),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"&&pH.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=Gf();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=We(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,h=>{a(h,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,h=new Array(f>2?f-2:0),g=2;g<f;g++)h[g-2]=arguments[g];c=s.options.overloadTranslationOptionHandler([a,u].concat(h))}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 We(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=Gf();return this.options.ns?(We(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=Gf();We(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 J5(r6());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 Qh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$m;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Qh(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((h,g)=>(h[g]={...c[f][g]},h),{})),{});o.store=new Z5(u,s),o.services.resourceStore=o.store}return o.translator=new wy(o.services,s),o.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),h=1;h<c;h++)f[h-1]=arguments[h];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 pr=Qh.createInstance();pr.createInstance=Qh.createInstance;pr.createInstance;pr.dir;pr.init;pr.loadResources;pr.reloadResources;pr.use;pr.changeLanguage;pr.getFixedT;pr.t;pr.exists;pr.setDefaultNamespace;pr.hasLoadedNamespace;pr.loadNamespaces;pr.loadLanguages;const{slice:yTe,forEach:bTe}=[];function STe(t){return bTe.call(yTe.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function ETe(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 o6=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,CTe=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(!o6.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!o6.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},i6={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=CTe(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 wTe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return i6.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&i6.create(n,t,r,s,o)}},xTe={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}},_Te={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 hc=null;const a6=()=>{if(hc!==null)return hc;try{if(hc=typeof window<"u"&&window.localStorage!==null,!hc)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{hc=!1}return hc};var ATe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&a6())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&a6()&&window.localStorage.setItem(n,t)}};let pc=null;const l6=()=>{if(pc!==null)return pc;try{if(pc=typeof window<"u"&&window.sessionStorage!==null,!pc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{pc=!1}return pc};var TTe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&l6())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&l6()&&window.sessionStorage.setItem(n,t)}},RTe={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}},ITe={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}},OTe={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}},NTe={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 gH=!1;try{document.cookie,gH=!0}catch{}const mH=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];gH||mH.splice(1,1);const MTe=()=>({order:mH,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class vH{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=STe(n,this.options||{},MTe()),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(wTe),this.addDetector(xTe),this.addDetector(ATe),this.addDetector(TTe),this.addDetector(RTe),this.addDetector(ITe),this.addDetector(OTe),this.addDetector(NTe),this.addDetector(_Te)}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&&!ETe(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)}))}}vH.type="languageDetector";function PTe(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=kTe(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 kTe(t,e){if(t){if(typeof t=="string")return u6(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)?u6(t,e):void 0}}function u6(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 UA(t){"@babel/helpers - typeof";return UA=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},UA(t)}var yH=["__proto__","constructor","prototype"];function bH(t){return!(typeof t!="string"||t.length===0||t.length>128||yH.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function SH(t){return!(!bH(t)||t.indexOf("/")>-1)}function DTe(t){return bH(t)}var LTe={lng:SH,ns:DTe};function qm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function UTe(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 EH(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":UA(XMLHttpRequest))==="object"}function FTe(t){return!!t&&typeof t.then=="function"}function zTe(t){return FTe(t)?t:Promise.resolve(t)}var jTe=/\{\{(.+?)\}\}/g;function c6(t,e){var n=!1,r=t.replace(jTe,function(s,o){var a=o.trim();if(yH.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=LTe[a]||SH,f=String(u).split("+"),h=PTe(f),g;try{for(h.s();!(g=h.n()).done;){var m=g.value;if(!c(m))return n=!0,s}}catch(y){h.e(y)}finally{h.f()}return f.join("+")});return n?null:r}function d6(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 f6(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?d6(Object(n),!0).forEach(function(r){BTe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function BTe(t,e,n){return(e=HTe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HTe(t){var e=$Te(t,"string");return tu(e)=="symbol"?e:e+""}function $Te(t,e){if(tu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tu(t){"@babel/helpers - typeof";return tu=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},tu(t)}var Wa=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Wa=global.fetch:typeof window<"u"&&window.fetch&&(Wa=window.fetch);var Jh;EH()&&(typeof global<"u"&&global.XMLHttpRequest?Jh=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Jh=window.XMLHttpRequest));var xy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?xy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(xy=window.ActiveXObject));typeof Wa!="function"&&(Wa=void 0);if(!Wa&&!Jh&&!xy)try{Vn(()=>import("./browser-ponyfill-odsmUzM4.js").then(t=>t.b),[]).then(function(t){Wa=t.default}).catch(function(){})}catch{}var CH=["__proto__","constructor","prototype"],FA=function(e,n){if(n&&tu(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];CH.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},h6=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):Wa(e,n).then(o).catch(r)},qTe=function(e,n,r,s){e.queryStringParams&&(n=FA(n,e.queryStringParams));var o=f6({},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=f6({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{h6(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(h){delete u[h]}),h6(n,u,s,c),e._omitFetchOptions=!0}catch(h){s(h)}}},WTe=function(e,n,r,s){r&&tu(r)==="object"&&(r=FA("",r).slice(1)),e.queryStringParams&&(n=FA(n,e.queryStringParams));try{var o=Jh?new Jh:new xy("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];CH.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(h){console&&console.log(h)}},VTe=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Wa&&n.indexOf("file:")!==0)return qTe(e,n,r,s);if(EH()||typeof ActiveXObject=="function")return WTe(e,n,r,s);s(new Error("No fetch and no xhr implementation found!"))};function id(t){"@babel/helpers - typeof";return id=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},id(t)}function p6(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 Dx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?p6(Object(n),!0).forEach(function(r){wH(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function GTe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function KTe(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,xH(r.key),r)}}function YTe(t,e,n){return e&&KTe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function wH(t,e,n){return(e=xH(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xH(t){var e=ZTe(t,"string");return id(e)=="symbol"?e:e+""}function ZTe(t,e){if(id(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var XTe=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 wH({},r,s||"")},parseLoadPayload:function(n,r){},request:VTe,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},_H=(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]:{};GTe(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return YTe(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=Dx(Dx(Dx({},XTe()),this.options||{}),s),this.allOptions=o,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);id(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=zTe(c),c.then(function(f){if(!f)return a(null,{});var h=c6(f,{lng:n.join("+"),ns:s.join("+")});if(h==null){var g=n.map(qm).join(", "),m=s.map(qm).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(h,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),h=qm(UTe(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 "+h+"; status code: "+m.status,!0);if(m&&m.status>=400&&m.status<500)return r("failed loading "+h+"; 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 "+h+": "+qm(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 "+h+" 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,h=[],g=[];n.forEach(function(m){var y=u.options.addPath;typeof u.options.addPath=="function"&&(y=u.options.addPath(m,r));var S=c6(y,{lng:m,ns:r});if(S==null){f+=1,a&&f===n.length&&a(h,g);return}u.options.request(u.options,S,c,function(E,C){f+=1,h.push(E),g.push(C),f===n.length&&typeof a=="function"&&a(h,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(h){return f(h)}),c.forEach(function(h){n.allOptions.ns.forEach(function(g){s.read(h,g,"read",null,null,function(m,y){m&&a.warn("loading namespace ".concat(g," for language ").concat(h," failed"),m),!m&&y&&a.log("loaded namespace ".concat(g," for language ").concat(h),y),s.loaded("".concat(h,"|").concat(g),m,y)})})})}}}])})();_H.type="backend";pr.use(_H).use(vH).use(bwe).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"}});const QTe=({authProvider:t,rootElementId:e="root"})=>{Ite(),awe(),t.configure(),Mme(t);const n=owe();bte(n);const r=new rpe({queryCache:new N7({onError:Lme}),mutationCache:new O7({onError:Ume}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=JAe(r,n);n.recordPageView(window.location.pathname);const o=document.getElementById(e);if(!o)throw new Error(`Root element not found: #${e}`);const{Shell:a}=t;pme.createRoot(o).render(O.jsx(_.StrictMode,{children:O.jsx(XB.Provider,{value:n,children:O.jsxs(spe,{client:r,children:[O.jsx(Dme,{value:t,children:O.jsx(a,{children:O.jsx(ume,{router:s})})}),!1]})})}))};QTe({authProvider:khe});export{vb as $,sQ as A,pi as B,Qx as C,nJ as D,jJ as E,aQ as F,R8 as G,D8 as H,cQ as I,JTe as J,eRe as K,iRe as L,dQ as M,yRe as N,oT as O,fRe as P,Qhe as Q,j as R,gQ as S,mQ as T,vRe as U,bd as V,Dn as W,La as X,Uv as Y,C7 as Z,YN as _,vn as a,lz as a$,ope as a0,lpe as a1,fpe as a2,upe as a3,cpe as a4,Er as a5,ppe as a6,dU as a7,dpe as a8,gpe as a9,xxe as aA,lH as aB,BIe as aC,WIe as aD,zIe as aE,Vn as aF,AIe as aG,bxe as aH,Rxe as aI,hxe as aJ,MIe as aK,Oxe as aL,DIe as aM,PIe as aN,q_e as aO,NIe as aP,_Ie as aQ,iz as aR,LIe as aS,kIe as aT,VIe as aU,$Ie as aV,HIe as aW,JIe as aX,SIe as aY,uRe as aZ,rRe as a_,fs as aa,Wr as ab,Mge as ac,qIe as ad,bR as ae,vIe as af,$_e as ag,Nx as ah,CRe as ai,e3 as aj,jte as ak,oz as al,xwe as am,ZIe as an,e2e as ao,rIe as ap,k7 as aq,Exe as ar,I8 as as,mpe as at,FIe as au,jIe as av,UIe as aw,xIe as ax,yxe as ay,GIe as az,Rt as b,EIe as b$,Ixe as b0,Hy as b1,mxe as b2,$l as b3,cxe as b4,tH as b5,Wwe as b6,Xwe as b7,Zwe as b8,Ywe as b9,SAe as bA,aIe as bB,uIe as bC,t2e as bD,hQ as bE,n2e as bF,wIe as bG,pRe as bH,oRe as bI,hRe as bJ,Xxe as bK,hte as bL,dte as bM,cte as bN,E5 as bO,ZP as bP,sIe as bQ,pIe as bR,gIe as bS,Oee as bT,Dee as bU,W5 as bV,dIe as bW,hIe as bX,fxe as bY,fIe as bZ,bIe as b_,CIe as ba,TIe as bb,mRe as bc,oIe as bd,XIe as be,QIe as bf,Va as bg,jwe as bh,M9 as bi,Dy as bj,G_e as bk,sRe as bl,dT as bm,dz as bn,vxe as bo,SRe as bp,lIe as bq,iIe as br,cIe as bs,w9 as bt,Ed as bu,B_e as bv,xr as bw,KIe as bx,RIe as by,IIe as bz,P8 as c,$ee as c0,cRe as c1,Hee as c2,mIe as c3,yIe as c4,Px as c5,YIe as c6,OIe as c7,Sxe as c8,Ug as c9,aae as cA,Jne as cB,lu as cC,qne as cD,$ne as cE,yT as cF,UF as cG,oae as cH,Gne as cI,koe as cJ,cae as cK,ST as cL,lae as cM,Rae as cN,HF as cO,nRe as cP,ip as cQ,gRe as cR,zT as cS,sb as cT,up as cU,wae as cV,ap as cW,xae as cX,vae as cY,Q9 as ca,No as cb,LT as cc,Ti as cd,fae as ce,Ri as cf,sae as cg,X9 as ch,Zy as ci,PF as cj,Roe as ck,mae as cl,_ae as cm,Ooe as cn,woe as co,Vy as cp,bT as cq,W9 as cr,Cae as cs,yae as ct,Doe as cu,hae as cv,$T as cw,K9 as cx,Noe as cy,iae as cz,TP as d,gP as e,iQ as f,tJ as g,oQ as h,Jx as i,O as j,n_ as k,MJ as l,aRe as m,U8 as n,LJ as o,lRe as p,pQ as q,_ as r,Yee as s,Gee as t,kJ as u,dRe as v,lQ as w,FJ as x,Lc as y,F8 as z};
|