@remit/web-client-dist 0.0.201 → 0.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/assets/{ComposeBody-CJwQ-5ri.js → ComposeBody-DfPsFqyj.js} +1 -1
  2. package/assets/{ConfirmDialog-Bv82OMuZ.js → ConfirmDialog-BsBBMbMX.js} +1 -1
  3. package/assets/{ErrorState-Bohf_-oR.js → ErrorState-DFPg-W7o.js} +1 -1
  4. package/assets/{OnboardingWizard-DHXggzOL.js → OnboardingWizard-sboUIJmG.js} +1 -1
  5. package/assets/{account-form-helpers-BpOwqwNr.js → account-form-helpers-Dp2AjIyP.js} +1 -1
  6. package/assets/{accounts-acXs4eC4.js → accounts-D-i4YL2C.js} +1 -1
  7. package/assets/{advanced-B7NoXsKD.js → advanced-C5y6g57X.js} +1 -1
  8. package/assets/{appearance-Dhv_uAhj.js → appearance-DXBcRryN.js} +1 -1
  9. package/assets/{avatar-Czt2WUmG.js → avatar-BgTFAbSd.js} +1 -1
  10. package/assets/{browser-ponyfill-BVkCMLYU.js → browser-ponyfill-EnUB7evv.js} +1 -1
  11. package/assets/{circle-check-CegrtM_f.js → circle-check-BVqIaumD.js} +1 -1
  12. package/assets/{download-BU_VLvDl.js → download-BNjLvt59.js} +1 -1
  13. package/assets/{filters-CQIcTi4-.js → filters-DDkS53ky.js} +1 -1
  14. package/assets/{flagged-BjEnVwwW.js → flagged-Boi78KRu.js} +1 -1
  15. package/assets/{folders-CDkO7bp3.js → folders-DNDWoiW4.js} +1 -1
  16. package/assets/index-B0enGamE.js +295 -0
  17. package/assets/{index-B_o2k4vi.js → index-BI92apvi.js} +1 -1
  18. package/assets/index-C0WhKjlT.js +1 -0
  19. package/assets/{kbd-BqaI8uDF.js → kbd-Cbahjwb0.js} +1 -1
  20. package/assets/{labels-CG1STcSC.js → labels-xViSbgCM.js} +1 -1
  21. package/assets/mail-DauBjwfC.js +118 -0
  22. package/assets/{move-mailbox-picker-D_V1MWbw.js → move-mailbox-picker-BLrbSWjA.js} +1 -1
  23. package/assets/{move-targets-BNX20jB1.js → move-targets-COnGOA0-.js} +1 -1
  24. package/assets/{onboarding-BNGNPdEA.js → onboarding-DQKQfFTi.js} +1 -1
  25. package/assets/{search-BEDItR13.js → search-DoMCy6Mu.js} +1 -1
  26. package/assets/{senders-be4RszaY.js → senders-CdDf24z0.js} +1 -1
  27. package/assets/settings-ClOOVl5v.js +1 -0
  28. package/assets/{settings-screen-Bg_B152C.js → settings-screen-hqgmXP2J.js} +1 -1
  29. package/assets/{shield-check-h-icaSBd.js → shield-check-jl7_IwGq.js} +1 -1
  30. package/assets/{suggested-vips-BGKAB2ch.js → suggested-vips-CzhIKpBu.js} +1 -1
  31. package/assets/{useDebouncedValue-DHKoiyoD.js → useDebouncedValue-Dw8sNbOG.js} +1 -1
  32. package/assets/{useLabels-CuOu4bk3.js → useLabels-DJpM3wD9.js} +1 -1
  33. package/assets/useRulePreview-DSKrnXEQ.js +1 -0
  34. package/assets/{useSignature-BkpaxHOZ.js → useSignature-DRvItZWu.js} +1 -1
  35. package/index.html +1 -1
  36. package/package.json +1 -1
  37. package/assets/index-CCN_kElr.js +0 -1
  38. package/assets/index-CjjdPqU1.js +0 -295
  39. package/assets/mail-DFpibu0-.js +0 -118
  40. package/assets/settings-DNL4mY8Z.js +0 -1
  41. package/assets/useRulePreview-2A1FYSkL.js +0 -1
@@ -1,295 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mail-DFpibu0-.js","assets/search-BEDItR13.js","assets/avatar-Czt2WUmG.js","assets/kbd-BqaI8uDF.js","assets/shield-check-h-icaSBd.js","assets/account-form-helpers-BpOwqwNr.js","assets/useSignature-BkpaxHOZ.js","assets/useDebouncedValue-DHKoiyoD.js","assets/useRulePreview-2A1FYSkL.js","assets/ErrorState-Bohf_-oR.js","assets/format-B6Elex-n.js","assets/move-targets-BNX20jB1.js","assets/move-mailbox-picker-D_V1MWbw.js","assets/circle-check-CegrtM_f.js","assets/ConfirmDialog-Bv82OMuZ.js","assets/useLabels-CuOu4bk3.js","assets/onboarding-BNGNPdEA.js","assets/OnboardingWizard-DHXggzOL.js","assets/index-B_o2k4vi.js","assets/flagged-BjEnVwwW.js","assets/accounts-acXs4eC4.js","assets/settings-screen-Bg_B152C.js","assets/download-BU_VLvDl.js","assets/advanced-B7NoXsKD.js","assets/appearance-Dhv_uAhj.js","assets/filters-CQIcTi4-.js","assets/folders-CDkO7bp3.js","assets/labels-CG1STcSC.js","assets/senders-be4RszaY.js"])))=>i.map(i=>d[i]);
2
- function C6(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 Fg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ga(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $1={exports:{}},wf={};var VN;function kq(){if(VN)return wf;VN=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 GN;function Dq(){return GN||(GN=1,$1.exports=kq()),$1.exports}var I=Dq();const Lq="Logging",Uq="x-amz-user-agent",Fq="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 KN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class or{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;or.LOG_LEVEL&&(r=or.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const s=KN[r];if(!(KN[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)),or.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()===Lq&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}or.LOG_LEVEL=null;or.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})},Ao=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",xf=new or("Hub");class w6{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===Ao||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:Fq,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 To=new w6("__default__"),Sv=new w6("internal-hub"),BA=()=>{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."})},zq=()=>{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."})},jq=()=>{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."})},HA={convert(t,e){let n=t;return e?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),jq()(n)}};var Co;(function(t){t.AuthTokenConfigException="AuthTokenConfigException",t.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",t.AuthUserPoolException="AuthUserPoolException",t.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",t.OAuthNotConfigureException="OAuthNotConfigureException"})(Co||(Co={}));const Bq={[Co.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Co.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Co.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Co.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Co.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},$A=_y(Bq);function lt(t){let e=!0;t?e=!!t.userPoolId&&!!t.userPoolClientId:e=!1,$A(e,Co.AuthUserPoolException)}function Ay(t){const e=!!t?.loginWith?.oauth?.domain&&!!t?.loginWith?.oauth?.redirectSignOut&&!!t?.loginWith?.oauth?.redirectSignIn&&!!t?.loginWith?.oauth?.responseType;$A(e,Co.OAuthNotConfigureException)}function Vm(t){const e=!!t?.identityPoolId;$A(e,Co.InvalidIdentityPoolIdException)}function vi(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(HA.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 x6=t=>{const e=Reflect.ownKeys(t);for(const n of e){const r=t[n];(r&&typeof r=="object"||typeof r=="function")&&x6(r)}return Object.freeze(t)},Hq=new or("parseAWSExports"),$q={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},qq=(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:T,aws_user_files_s3_bucket_region:_,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:O,oauth:k,predictions:F,aws_cloud_logic_custom:$,Notifications:D,modelIntrospection:z}=t,q={};C&&(q.Analytics={Pinpoint:{appId:C,region:w}});const{InAppMessaging:Y,Push:te}=D??{};if(Y?.AWSPinpoint||te?.AWSPinpoint){if(Y?.AWSPinpoint){const{appId:J,region:oe}=Y.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:J,region:oe}}}}if(te?.AWSPinpoint){const{appId:J,region:oe}=te.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=$q[n];J||Hq.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 H=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=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,ce=Array.from(new Set([...g??[],...m??[]])).reduce((J,oe)=>({...J,[oe.toLowerCase()]:{required:!0}}),{}),xe=S?.includes("EMAIL")??!1,L=S?.includes("PHONE_NUMBER")??!1;(a||M)&&(q.Auth={Cognito:{identityPoolId:a,allowGuestAccess:E!=="enable",signUpVerificationMethod:u,userAttributes:ce,userPoolClientId:N,userPoolId:M,mfa:H,passwordFormat:ee,loginWith:{username:!(xe||L),email:xe,phone:L}}});const V=k?Object.keys(k).length>0:!1,K=y?y.length>0:!1;if(q.Auth&&V&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...Wq(k),...K&&{providers:Vq(y)}}}),T&&(q.Storage={S3:{bucket:T,region:_,dangerouslyConnectToHttpEndpointForTesting:R}}),O){const{amazon_location_service:J}=O;q.Geo={LocationService:{maps:J.maps,geofenceCollections:J.geofenceCollections,searchIndices:J.search_indices,region:J.region}}}if($&&(q.API={...q.API,REST:$.reduce((J,oe)=>{const{name:he,endpoint:ue,region:ve,service:_e}=oe;return{...J,[he]:{endpoint:ue,..._e?{service:_e}:void 0,...ve?{region:ve}:void 0}}},{})}),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},YN=t=>t?.split(",")??[],Wq=({domain:t,scope:e,redirectSignIn:n,redirectSignOut:r,responseType:s})=>({domain:t,scopes:e,redirectSignIn:YN(n),redirectSignOut:YN(r),responseType:s}),Vq=t=>t.map(e=>{const n=e.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),_6=Symbol("oauth-listener"),tr=[];for(let t=0;t<256;++t)tr.push((t+256).toString(16).slice(1));function Gq(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]]).toLowerCase()}let q1;const Kq=new Uint8Array(16);function Yq(){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(Kq)}const Zq=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ZN={randomUUID:Zq};function Xq(t,e,n){if(ZN.randomUUID&&!e&&!t)return ZN.randomUUID();t=t||{};const r=t.random??t.rng?.()??Yq();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 Gq(r)}function Qq(t){const{version:e}=t;return e?e.startsWith("1"):!1}function Jq(t){if(!t)return;const{bucket_name:e,aws_region:n,buckets:r}=t;return{S3:{bucket:e,region:n,buckets:r&&cW(r)}}}function eW(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:uW(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:lW(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 tW(t){if(!t?.amazon_pinpoint)return;const{amazon_pinpoint:e}=t;return{Pinpoint:{appId:e.app_id,region:e.aws_region}}}function nW(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 rW(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:A6(n),region:e,apiKey:s,modelIntrospection:o}}}function sW(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:A6(s),region:n,apiKey:r}}}function oW(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 iW(t){const e={};if(t.storage&&(e.Storage=Jq(t.storage)),t.auth&&(e.Auth=eW(t.auth)),t.analytics&&(e.Analytics=tW(t.analytics)),t.geo&&(e.Geo=nW(t.geo)),t.data&&(e.API=rW(t.data)),t.custom){const n=sW(t.custom);n&&"Events"in n&&(e.API={...e.API,...n})}return t.notifications&&(e.Notifications=oW(t.notifications)),e}const aW={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function A6(t){return aW[t]}const XN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function lW(t=[]){return t.reduce((e,n)=>(XN[n]!==void 0&&e.push(XN[n]),e),[])}function uW(t){return t==="OPTIONAL"?"optional":t==="REQUIRED"?"on":"off"}function cW(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 T6=t=>Object.keys(t).some(e=>e.startsWith("aws_"))?qq(t):Qq(t)?iW(t):t;var QN=function(){return QN=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},QN.apply(this,arguments)};function DRe(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 dW(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 fW(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 LRe(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 As=64,hW=32,pW=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]),gW=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],mW=Math.pow(2,53)-1,Gm=(function(){function t(){this.state=Int32Array.from(gW),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>mW)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[n++],r--,this.bufferLength===As&&(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%As>=As-8){for(var s=this.bufferLength;s<As;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<As-8;s++)n.setUint8(s,0);n.setUint32(As-8,Math.floor(e/4294967296),!0),n.setUint32(As-4,e),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(hW),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<As;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+(pW[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 vW=t=>new TextEncoder().encode(t);var yW=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:vW;function R6(t){return t instanceof Uint8Array?t:typeof t=="string"?yW(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function bW(t){return typeof t=="string"?t.length===0:t.byteLength===0}var Hl=(function(){function t(e){this.secret=e,this.hash=new Gm,this.reset()}return t.prototype.update=function(e){if(!(bW(e)||this.error))try{this.hash.update(R6(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 dW(this,void 0,void 0,function(){return fW(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new Gm,this.secret){this.outer=new Gm;var e=SW(this.secret),n=new Uint8Array(As);n.set(e);for(var r=0;r<As;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 SW(t){var e=R6(t);if(e.byteLength>As){var n=new Gm;n.update(e),e=n.digest()}var r=new Uint8Array(As);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 Os;(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"})(Os||(Os={}));var ai;(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"})(ai||(ai={}));var JN;(function(t){t.Record="1",t.IdentifyUser="2"})(JN||(JN={}));var eM;(function(t){t.GraphQl="1",t.Get="2",t.Post="3",t.Put="4",t.Patch="5",t.Del="6",t.Head="7"})(eM||(eM={}));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 tM;(function(t){t.Subscribe="1",t.GraphQl="2"})(tM||(tM={}));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 Ux;(function(t){t.SyncMessages="1",t.IdentifyUser="2",t.NotifyMessageInteraction="3"})(Ux||(Ux={}));var nM;(function(t){t.None="0"})(nM||(nM={}));var rM;(function(t){t.Convert="1",t.Identify="2",t.Interpret="3"})(rM||(rM={}));var sM;(function(t){t.Subscribe="1"})(sM||(sM={}));var oM;(function(t){t.InitializePushNotifications="1",t.IdentifyUser="2"})(oM||(oM={}));var Ws;(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"})(Ws||(Ws={}));const EW="6.18.0",Ty=()=>typeof global<"u",ad=()=>typeof window<"u",I6=()=>typeof document<"u",qA=()=>typeof process<"u",xh=(t,e)=>!!Object.keys(t).find(n=>n.startsWith(e));var iM={};function CW(){const t=r=>r.startsWith("_react")||r.startsWith("__react"),e=r=>Object.keys(r).find(t),n=()=>Array.from(document.querySelectorAll("[id]"));return I6()&&n().some(e)}function wW(){return qA()&&typeof iM<"u"&&!!Object.keys(iM).find(t=>t.includes("react"))}function xW(){return ad()&&xh(window,"__VUE")}function _W(){return Ty()&&xh(global,"__VUE")}var aM={};function AW(){return ad()&&xh(window,"__SVELTE")}function TW(){return qA()&&typeof aM<"u"&&!!Object.keys(aM).find(t=>t.includes("svelte"))}function RW(){return ad()&&window.next&&typeof window.next=="object"}function IW(){return Ty()&&(xh(global,"__next")||xh(global,"__NEXT"))}function OW(){return ad()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function NW(){return Ty()&&typeof global.__NUXT_PATHS__<"u"}var lM={};function MW(){const t=!!(I6()&&document.querySelector("[ng-version]")),e=!!(ad()&&typeof window.ng<"u");return t||e}function PW(){return qA()&&typeof lM=="object"&&lM.npm_lifecycle_script?.startsWith("ng ")||!1}function kW(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function DW(){return Ty()&&typeof global.expo<"u"}function LW(){return ad()}const UW=[{platform:_n.Expo,detectionMethod:DW},{platform:_n.ReactNative,detectionMethod:kW},{platform:_n.NextJs,detectionMethod:RW},{platform:_n.Nuxt,detectionMethod:OW},{platform:_n.Angular,detectionMethod:MW},{platform:_n.React,detectionMethod:CW},{platform:_n.VueJs,detectionMethod:xW},{platform:_n.Svelte,detectionMethod:AW},{platform:_n.WebUnknown,detectionMethod:LW},{platform:_n.NextJsSSR,detectionMethod:IW},{platform:_n.NuxtSSR,detectionMethod:NW},{platform:_n.ReactSSR,detectionMethod:wW},{platform:_n.VueJsSSR,detectionMethod:_W},{platform:_n.AngularSSR,detectionMethod:PW},{platform:_n.SvelteSSR,detectionMethod:TW}];function FW(){return UW.find(t=>t.detectionMethod())?.platform||_n.ServerSideUnknown}let ch;const W1=[];let Fx=!1;const zW=10,jW=10,BW=1e3,O6=()=>{if(!ch){if(ch=FW(),Fx)for(;W1.length;)W1.pop()?.();else W1.forEach(t=>{t()});uM(_n.ServerSideUnknown,zW),uM(_n.WebUnknown,jW)}return ch};function HW(){ch=void 0}function uM(t,e){ch===t&&!Fx&&setTimeout(()=>{HW(),Fx=!0,setTimeout(O6,BW)},e)}const ga={},ti=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])}))}},$W=(t,e)=>ga[t]?.[e]?.additionalDetails,qW="aws-amplify",WW=t=>t.replace(/\+.*/,""),VW=({category:t,action:e}={})=>{const n=[[qW,WW(EW)]];if(t&&n.push([t,e]),n.push(["framework",O6()]),t&&e){const r=$W(t,e);r&&r.forEach(s=>{n.push(s)})}return n},Ry=t=>VW(t).map(([r,s])=>r&&s?`${r}/${s}`:r).join(" "),Iy=()=>typeof window<"u"&&typeof window.document<"u",cM=new or("Auth");class GW{configure(e,n){this.authConfig=e,this.authOptions=n,e&&e.Cognito?.userPoolEndpoint&&cM.warn(dM("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&cM.warn(dM("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 dM=t=>`You are using a custom Amazon ${t} endpoint, ensure the endpoint is correct.`;class KW{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new GW}configure(e,n){const r=T6(e);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=x6(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."),To.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Ao),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}[_6](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 KW,N6=(t,e)=>t.Auth.fetchAuthSession(e),Oy=t=>N6($t,t);function M6(){return $t.Auth.clearCredentials()}const Ny=t=>{const{headers:e,statusCode:n}=t;return{...YW(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"]}},YW=t=>typeof t?.$metadata=="object",ld=async t=>{if(!t||t.statusCode<300)return;const e=await tp(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)})},tp=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)},ZW=300*1e3;function XW(t=ZW){return r=>{const s=2**r*100+100*Math.random();return s>t?!1:s}}const P6=3,fM="amz-sdk-invocation-id",QW="amz-sdk-request",hM=300*1e3,k6=t=>{const n=XW(hM)(t);return n===!1?hM:n},JW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],eV=t=>!!t&&JW.includes(t),D6=t=>async(e,n)=>{const r=n??await t(e)??void 0,s=r?.code||r?.name,o=e?.statusCode;return{retryable:sV(n)||rV(o,s)||eV(s)||oV(o,s)}},tV=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],nV=["TimeoutError","RequestTimeout","RequestTimeoutException"],rV=(t,e)=>t===429||!!e&&tV.includes(e),sV=t=>[ka.NetworkError,"ERR_NETWORK"].includes(t?.name),oV=(t,e)=>!!t&&[500,502,503,504].includes(t)||!!e&&nV.includes(e),L6="cognito-identity",U6={service:L6,retryDecider:D6(ld),computeDelay:k6,cache:"no-store"},iV=({maxAttempts:t=P6,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 pM(h,f),h;throw pM(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 aV(S,r)}continue}else return g()}if(r?.aborted)throw new Error("Request aborted.");return g()}},aV=(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},pM=(t,e)=>{Object.prototype.toString.call(t)==="[object Object]"&&(t.$metadata={...t.$metadata??{},attempts:e})},lV=Xq,uV=()=>t=>async function(n){return n.headers[fM]||(n.headers[fM]=lV()),t(n)},cV=({maxAttempts:t=P6})=>(e,n)=>async function(s){const o=n.attemptsCount??0;return s.headers[QW]=`attempt=${o+1}; max=${t}`,e(s)},dV=({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)}},WA=(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)},fV=t=>!["HEAD","GET"].includes(t.toUpperCase()),hV=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:fV(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}},F6=WA(hV,[dV,uV,iV,cV]),pV=()=>t=>async function(n){return n.headers["cache-control"]="no-store",t(n)},z6=WA(F6,[pV]),j6=t=>(e,n)=>{const r=gV(t),s=JSON.stringify(e);return mV(n,r,s)},gV=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${t}`}),mV=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"}),gM=t=>In(z6,j6("GetCredentialsForIdentity"),vV,{...U6,...t,userAgentValue:Ry()}),vV=async t=>{if(t.statusCode>=300)throw await ld(t);const e=await tp(t);return{IdentityId:e.IdentityId,Credentials:yV(e.Credentials),$metadata:Ny(t)}},yV=({Expiration:t,...e}={})=>({...e,Expiration:t&&new Date(t*1e3)}),bV=t=>In(z6,j6("GetId"),SV,{...U6,...t,userAgentValue:Ry()}),SV=async t=>{if(t.statusCode>=300)throw await ld(t);return{IdentityId:(await tp(t)).IdentityId,$metadata:Ny(t)}},B6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},EV={partitions:[B6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},H6=t=>{const{partitions:e}=EV;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 B6.outputs.dnsSuffix},Ka=URL,CV=({region:t})=>({url:new Ka(`https://${L6}.${t}.${H6(t)}`)});class Kf extends Hr{constructor(){super({name:ka.PlatformNotSupported,message:"Function not supported on current platform"})}}class $6{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 q6{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 W6=new or("CoreStorageUtils"),wV=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{W6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new q6},V6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return W6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new q6}};class xV extends $6{constructor(){super(wV())}}class _V extends $6{constructor(){super(V6())}}class AV{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 TV extends AV{constructor(){super(V6())}}function zg(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 RV={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 zx(t,e){function n(s,o,a){if(!(typeof document>"u")){a=zg({},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,"",zg({},o,{expires:-1}))},withAttributes:function(s){return zx(this.converter,zg({},this.attributes,s))},withConverter:function(s){return zx(zg({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var jg=zx(RV,{path:"/"});class IV{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){jg.set(e,n,this.getData())}async getItem(e){return jg.get(e)??null}async removeItem(e){jg.remove(e,this.getData())}async clear(){const e=jg.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 np=new xV;new _V;const fi=new TV,OV=new or("I18n");let NV=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),OV.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 _l;(function(t){t.NotConfigured="NotConfigured"})(_l||(_l={}));const MV={[_l.NotConfigured]:{message:"i18n is not configured."}},Bg=_y(MV),mM=new or("I18n");let Hg={language:null},Bs=null,G6=class Cl{static configure(e){return mM.debug("configure I18n"),e&&(Hg=Object.assign({},Hg,e.I18n||e),Cl.createInstance()),Hg}static getModuleName(){return"I18n"}static createInstance(){mM.debug("create I18n instance"),!Bs&&(Bs=new NV)}static setLanguage(e){Cl.checkConfig(),Bg(!!Bs,_l.NotConfigured),Bs.setLanguage(e)}static get(e,n){return Cl.checkConfig(),Bg(!!Bs,_l.NotConfigured),Bs.get(e,n)}static putVocabulariesForLanguage(e,n){Cl.checkConfig(),Bg(!!Bs,_l.NotConfigured),Bs.putVocabulariesForLanguage(e,n)}static putVocabularies(e){Cl.checkConfig(),Bg(!!Bs,_l.NotConfigured),Bs.putVocabularies(e)}static checkConfig(){return Bs||Cl.createInstance(),!0}};G6.createInstance();const PV=t=>{const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(t);BA().getRandomValues(r);for(const s of r)n.push(e[s%e.length]);return n.join("")};function kV(t){return(t.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function DV(t){return t.split("").map(e=>e.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const LV=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 vM({expiresAt:t,clockDrift:e,tolerance:n=5e3}){return Date.now()+e+n>t}const UV=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 FV(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:FV(t);let r=zq()(n);return e.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),e.skipPadding&&(r=r.replace(/=/g,"")),r}};function zV(){return BA().getRandomValues(new Uint32Array(1))[0]}function jV(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 VA{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(zV());return new VA(n,e)}toString(){return jV(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 K6={[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 Hn;(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"})(Hn||(Hn={}));var Ro;(function(t){t.SignInException="SignInException",t.OAuthSignInError="OAuthSignInException"})(Ro||(Ro={}));class Ue extends Hr{constructor(e){super(e),this.constructor=Ue,Object.setPrototypeOf(this,Ue.prototype)}}function hn(t,e){const{message:n,recoverySuggestion:r}=K6[e];if(!t)throw new Ue({name:e,message:n,recoverySuggestion:r})}function bt(t){const e=t?.split("_")[0];if(!t||t.indexOf("_")<0||!e||typeof e!="string")throw new Ue({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return e}function jx(t){if(!t||!t.includes(":"))throw new Ue({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return t.split(":")[0]}function yM(t){return Object.entries(t).map(([e,n])=>({Name:e,Value:n}))}function BV(t){const e={};return t?.forEach(n=>{n.Name&&(e[n.Name]=n.Value)}),e}var bM;(function(t){t.ConcurrentModificationException="ConcurrentModificationException",t.ForbiddenException="ForbiddenException",t.InternalErrorException="InternalErrorException",t.InvalidParameterException="InvalidParameterException",t.NotAuthorizedException="NotAuthorizedException",t.ResourceNotFoundException="ResourceNotFoundException",t.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(bM||(bM={}));var SM;(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"})(SM||(SM={}));var EM;(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"})(EM||(EM={}));var CM;(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"})(CM||(CM={}));var wM;(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"})(wM||(wM={}));var xM;(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"})(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.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"})(AM||(AM={}));var TM;(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"})(TM||(TM={}));var RM;(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"})(RM||(RM={}));var IM;(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"})(IM||(IM={}));var OM;(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"})(OM||(OM={}));var NM;(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"})(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.TooManyRequestsException="TooManyRequestsException",t.UserNotConfirmedException="UserNotConfirmedException"})(MM||(MM={}));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 PM;(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"})(PM||(PM={}));var kM;(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"})(kM||(kM={}));var DM;(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"})(DM||(DM={}));var Bx;(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"})(Bx||(Bx={}));var LM;(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"})(LM||(LM={}));var UM;(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"})(UM||(UM={}));var FM;(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"})(FM||(FM={}));var zM;(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"})(zM||(zM={}));var jM;(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"})(jM||(jM={}));const My="UserUnAuthenticatedException",HV="UserAlreadyAuthenticatedException",$V="DeviceMetadataNotFoundException",Y6="AutoSignInException",qV="InvalidRedirectException",WV="InvalidAppSchemeException",VV="InvalidPreferredRedirectUrlException",GV=new Ue({name:qV,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 Ue({name:WV,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 Ue({name:VV,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 KV="InvalidOriginException",YV=new Ue({name:KV,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."}),ZV="OAuthSignOutException",XV="TokenRefreshException",QV="UnexpectedSignInInterruptionException";function ud(t){if(!t||!t.accessToken)throw new Ue({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function JV(t){if(!t||!t.idToken)throw new Ue({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const eG=new Ue({name:XV,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' }`}),tG=new Ue({name:My,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function Z6(t){if(sG(t))throw eG;if(!rG(t))throw tG}function X6(t){if(!t||!t.deviceKey||!t.deviceGroupKey||!t.randomPassword)throw new Ue({name:$V,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 nG={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function Q6(t){return t?.accessToken||t?.idToken}function rG(t){return Q6(t)&&t?.refreshToken}function sG(t){return Q6(t)&&!t?.refreshToken}const oG=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=iG(n);return a&&(o.signInDetails=a),o};function iG(t){return t?.signInDetails}const Py=async()=>oG($t),Mt=(t,e)=>Ry({category:Os.Auth,action:t,...e}),Wn=t=>(e,n)=>{const r=aG(t),s=JSON.stringify(e);return lG(n,r,s)},aG=t=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${t}`}),lG=({url:t},e,n)=>({headers:e,url:t,body:n,method:"POST"});function Ns(t){if(!t||t.name==="Error"||t instanceof TypeError)throw new Ue({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 Ns(e),new Ue({name:e.name,message:e.message,metadata:e.$metadata})}return tp(t)},uG=()=>(t,e)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await $t.libraryOptions?.Auth?.headers?.()},t(r)},Vn=WA(F6,[uG]),J6="cognito-idp",Gn={service:J6,retryDecider:D6(ld),computeDelay:k6,get userAgentValue(){return Ry()},cache:"no-store"},rp=t=>In(Vn,Wn("InitiateAuth"),ar(),{...Gn,...t}),ls=t=>In(Vn,Wn("RespondToAuthChallenge"),ar(),{...Gn,...t}),cG=t=>In(Vn,Wn("VerifySoftwareToken"),ar(),{...Gn,...t}),dG=t=>In(Vn,Wn("AssociateSoftwareToken"),ar(),{...Gn,...t}),fG=({region:t})=>({url:new Ka(`https://${J6}.${t}.${H6(t)}`)}),St=({endpointOverride:t})=>e=>t?{url:new Ka(t)}:fG(e),hG=t=>In(Vn,Wn("GetTokensFromRefreshToken"),ar(),{...Gn,...t}),pG=async({tokens:t,authConfig:e,username:n,clientMetadata:r})=>{lt(e?.Cognito);const{userPoolId:s,userPoolClientId:o,userPoolEndpoint:a}=e.Cognito,u=bt(s);Z6(t);const c=hG({endpointResolver:St({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:o,RefreshToken:t.refreshToken,DeviceKey:t.deviceMetadata?.deviceKey,ClientMetadata:r}),h=vi(f?.AccessToken??""),g=f?.IdToken?vi(f.IdToken):void 0,{iat:m}=h.payload;if(!m)throw new Ue({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}},gG=LV(pG),mG={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 vG={[Cv.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},yG=_y(vG),BM="CognitoIdentityServiceProvider";class bG{getKeyValueStorage(){if(!this.keyValueStorage)throw new Ue({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 Ue({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=vi(n),s=await this.getKeyValueStorage().getItem(e.idToken),o=s?vi(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){yG(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 SG(BM,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){lt(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${BM}.${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 SG=(t,e)=>GA(mG)(`${t}`,e);function GA(t){const e=Object.values({...t});return(n,r)=>e.reduce((s,o)=>({...s,[o]:`${n}.${r}.${o}`}),{})}const HM="amplify-signin-with-hostedUI",po="CognitoIdentityServiceProvider";class e8{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){lt(this.cognitoConfig);const e=go(po,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=go(po,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(HM),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,e)}loadPKCE(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(e.inflightOAuth)==="true"}async storeOAuthInFlight(e){lt(this.cognitoConfig);const n=go(po,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${e}`)}async loadOAuthSignIn(){lt(this.cognitoConfig);const e=go(po,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(HM),[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=go(po,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${e},${n}`)}}const go=(t,e)=>GA(nG)(t,e),Fr=new e8(np),Hx=[],EG=t=>{Hx.push(t)},t8=()=>{for(;Hx.length;)Hx.pop()?.()};class CG{constructor(){this.waitForInflightOAuth=Iy()?async()=>{if(await Fr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((e,n)=>{EG(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 Ue({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Ue({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&&vM({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),o=vM({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}),To.dispatch("auth",{event:"tokenRefresh"},"Auth",Ao),o}catch(s){return this.handleErrors(s)}}handleErrors(e){if(Ns(e),this.isAuthenticationError(e)&&this.clearTokens(),To.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",Ao),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 wG{constructor(){this.authTokenStore=new bG,this.authTokenStore.setKeyValueStorage(np),this.tokenOrchestrator=new CG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(gG)}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 Km=new wG,{tokenOrchestrator:$r}=Km;async function Ti(t){if(t.AccessToken){const e=vi(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=vi(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 xG="Unable to get user session following successful sign-in.",Ya=async()=>{try{To.dispatch("auth",{event:"signedIn",data:await Py()},"Auth",Ao)}catch(t){throw t.name===My?new Ue({name:QV,message:xG,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 n8(){return{active:!1}}const _G=(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 n8();default:return t}},AG=t=>{let e=t(n8(),{type:"RESET"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Ta=AG(_G),TG=180*1e3,$g="CognitoSignInState",hi={username:`${$g}.username`,challengeName:`${$g}.challengeName`,signInSession:`${$g}.signInSession`,expiry:`${$g}.expiry`},RG=(t,e)=>{switch(e.type){case"SET_SIGN_IN_SESSION":return qg({signInSession:e.value}),{...t,signInSession:e.value};case"SET_SIGN_IN_STATE":return qg(e.value),{...e.value};case"SET_CHALLENGE_NAME":return qg({challengeName:e.value}),{...t,challengeName:e.value};case"SET_USERNAME":return qg({username:e.value}),{...t,username:e.value};case"SET_INITIAL_STATE":return OG();case"RESET_STATE":return r8(),KA();default:return t}},IG=t=>{const e=Number(t),n=Date.now();return e<=n},Js=()=>{Io.dispatch({type:"RESET_STATE"})},r8=()=>{for(const t of Object.values(hi))fi.removeItem(t)},KA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),OG=()=>{const t=fi.getItem(hi.expiry);if(!t||IG(t))return r8(),KA();const e=fi.getItem(hi.username)??void 0,n=fi.getItem(hi.challengeName)??void 0,r=fi.getItem(hi.signInSession)??void 0;return{username:e,challengeName:n,signInSession:r}},NG=t=>{let e=t(KA(),{type:"SET_INITIAL_STATE"});return{getState:()=>e,dispatch:n=>{e=t(e,n)}}},Io=NG(RG);function ru(t){Io.dispatch({type:"SET_SIGN_IN_STATE",value:t})}const qg=({challengeName:t,signInSession:e,username:n})=>{n&&fi.setItem(hi.username,n),t&&fi.setItem(hi.challengeName,t),e&&(fi.setItem(hi.signInSession,e),fi.setItem(hi.expiry,String(Date.now()+TG)))},$M="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 Is extends Hr{constructor(e){super(e),this.constructor=Is,Object.setPrototypeOf(this,Is.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.",qM="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:$M},[Bt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:qM},[Bt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:qM},[Bt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:$M},[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,Is),s8=t=>{if(t instanceof Error){if(t.name==="AbortError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyOperationAborted];return new Is({name:Bt.PasskeyOperationAborted,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="SecurityError"){const{message:e,recoverySuggestion:n}=Hc[Bt.RelyingPartyMismatch];return new Is({name:Bt.RelyingPartyMismatch,message:e,recoverySuggestion:n,underlyingError:t})}}return new Is({name:ka.Unknown,message:"An unknown error has occurred.",underlyingError:t})},MG=t=>{if(t instanceof Is)return t;if(t instanceof Error&&t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAuthenticationCanceled];return new Is({name:Bt.PasskeyAuthenticationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}return s8(t)},o8=()=>Iy()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",wo=t=>Bc.convert(new Uint8Array(t),{urlSafe:!0,skipPadding:!0}),dh=t=>Uint8Array.from(HA.convert(t,{urlSafe:!0}),e=>e.charCodeAt(0)).buffer,PG=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}}},kG=t=>{const e={clientDataJSON:wo(t.response.clientDataJSON),attestationObject:wo(t.response.attestationObject),transports:t.response.getTransports(),publicKeyAlgorithm:t.response.getPublicKeyAlgorithm(),authenticatorData:wo(t.response.getAuthenticatorData())},n=t.response.getPublicKey();n&&(e.publicKey=wo(n));const r={type:t.type,id:t.id,rawId:wo(t.rawId),clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(r.authenticatorAttachment=t.authenticatorAttachment),r},DG=t=>{const e=dh(t.challenge),n=(t.allowCredentials||[]).map(r=>({...r,id:dh(r.id)}));return{...t,challenge:e,allowCredentials:n}},LG=t=>{const e={clientDataJSON:wo(t.response.clientDataJSON),authenticatorData:wo(t.response.authenticatorData),signature:wo(t.response.signature)};t.response.userHandle&&(e.userHandle=wo(t.response.userHandle));const n={id:t.id,rawId:wo(t.rawId),type:t.type,clientExtensionResults:t.getClientExtensionResults(),response:e};return t.authenticatorAttachment&&(n.authenticatorAttachment=t.authenticatorAttachment),n};function UG(t){cd([!!t,!!t?.challenge,!!t?.user,!!t?.rp,!!t?.pubKeyCredParams].every(Boolean),Bt.InvalidPasskeyRegistrationOptions)}function FG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAttestationResponse,Bt.PasskeyRegistrationFailed)}function zG(t){cd(t&&t instanceof PublicKeyCredential&&t.response instanceof AuthenticatorAssertionResponse,Bt.PasskeyRetrievalFailed)}const jG=async t=>{try{const e=o8();cd(e,Bt.PasskeyNotSupported);const n=DG(t),r=await navigator.credentials.get({publicKey:n});return zG(r),LG(r)}catch(e){throw MG(e)}},BG=t=>In(Vn,Wn("ConfirmDevice"),ar(),{...Gn,...t}),Ym={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 HG=0xdeadbeefcafe,WM=(HG&16777215)===15715070;function $G(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 qG(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 WG(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 VM=typeof navigator<"u";VM&&WM&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=qG,Oa=30):VM&&WM&&navigator.appName!=="Netscape"?(Ie.prototype.am=$G,Oa=26):(Ie.prototype.am=WG,Oa=28);Ie.prototype.DB=Oa;Ie.prototype.DM=(1<<Oa)-1;Ie.prototype.DV=1<<Oa;const YA=52;Ie.prototype.FV=Math.pow(2,YA);Ie.prototype.F1=YA-Oa;Ie.prototype.F2=2*Oa-YA;const VG="0123456789abcdefghijklmnopqrstuvwxyz",ky=[];let dd,Ts;dd=48;for(Ts=0;Ts<=9;++Ts)ky[dd++]=Ts;dd=97;for(Ts=10;Ts<36;++Ts)ky[dd++]=Ts;dd=65;for(Ts=10;Ts<36;++Ts)ky[dd++]=Ts;function GM(t){return VG.charAt(t)}function GG(t,e){const n=ky[t.charCodeAt(e)];return n??-1}function KG(t){for(let e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function YG(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 ZA(t){const e=_r();return e.fromInt(t),e}function ZG(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=GG(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 XG(){const t=this.s&this.DM;for(;this.t>0&&this[this.t-1]==t;)--this.t}function QG(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=GM(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+=GM(r));return s?o:"0"}function JG(){const t=_r();return Ie.ZERO.subTo(this,t),t}function eK(){return this.s<0?this.negate():this}function tK(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 XA(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 nK(){return this.t<=0?0:this.DB*(this.t-1)+XA(this[this.t-1]^this.s&this.DM)}function rK(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 sK(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 oK(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 iK(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 aK(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 lK(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 uK(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 cK(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-XA(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 T=n[--E]===h?this.DM:Math.floor(n[E]*m+(n[E-1]+S)*y);if((n[E]+=o.am(0,T,n,C,0,f))<T)for(o.dlShiftTo(C,w),n.subTo(w,n);n[E]<--T;)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 dK(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 fK(){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 hK(t){return this.compareTo(t)===0}function pK(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 gK(t){const e=_r();return this.addTo(t,e),e}function mK(t){const e=_r();return this.subTo(t,e),e}function vK(t){const e=_r();return this.multiplyTo(t,e),e}function yK(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 bK(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 SK(t){const e=_r();return t.copyTo(e),this.reduce(e),e}function EK(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 CK(t,e){t.squareTo(e),this.reduce(e)}function wK(t,e,n){t.multiplyTo(e,n),this.reduce(n)}fd.prototype.convert=bK;fd.prototype.revert=SK;fd.prototype.reduce=EK;fd.prototype.mulTo=wK;fd.prototype.sqrTo=CK;function xK(t,e,n){let r=t.bitLength(),s,o=ZA(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=XA(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=KG;Ie.prototype.fromInt=YG;Ie.prototype.fromString=ZG;Ie.prototype.clamp=XG;Ie.prototype.dlShiftTo=rK;Ie.prototype.drShiftTo=sK;Ie.prototype.lShiftTo=oK;Ie.prototype.rShiftTo=iK;Ie.prototype.subTo=aK;Ie.prototype.multiplyTo=lK;Ie.prototype.squareTo=uK;Ie.prototype.divRemTo=cK;Ie.prototype.invDigit=fK;Ie.prototype.addTo=pK;Ie.prototype.toString=QG;Ie.prototype.negate=JG;Ie.prototype.abs=eK;Ie.prototype.compareTo=tK;Ie.prototype.bitLength=nK;Ie.prototype.mod=dK;Ie.prototype.equals=hK;Ie.prototype.add=gK;Ie.prototype.subtract=mK;Ie.prototype.multiply=vK;Ie.prototype.divide=yK;Ie.prototype.modPow=xK;Ie.ZERO=ZA(0);Ie.ONE=ZA(1);const _K=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))})})}),AK="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",i8={},$x={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),i8[t]=e,$x[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 $x)e[n/2]=$x[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e},QA=t=>{let e="";for(let n=0;n<t.byteLength;n++)e+=i8[t[n]];return e},qx=t=>{const e=new Hl;e.update(t);const n=e.digestSync(),r=QA(n);return new Array(64-r.length).join("0")+r},Zm=t=>qx($c(t)),TK=/^[89a-f]/i,li=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=TK.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},RK=({A:t,B:e})=>{const n=new Ie(Zm(li(t)+li(e)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},IK=(t,e,n)=>{const r=new Hl(e);r.update(t);const s=r.digestSync(),o=new Hl(s);return o.update(n),o.digestSync().slice(0,16)},JA=t=>{const e=new VA().random(t).toString();return $c(e)},OK=()=>Bc.convert(JA(40));class NK{constructor({userPoolName:e,a:n,g:r,A:s,N:o}){this.encoder=Ym,this.userPoolName=e,this.a=n,this.g=r,this.A=s,this.N=o,this.k=new Ie(Zm(`${li(o)}${li(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Ue({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Ue({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Ue({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(e,n){this.randomPassword=OK();const r=`${e}${n}:${this.randomPassword}`,s=qx(r),o=QA(JA(16));return this.saltToHashDevices=li(new Ie(o,16)),new Promise((a,u)=>{this.g.modPow(new Ie(Zm(this.saltToHashDevices+s),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=li(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=RK({A:this.A,B:r}),a=`${this.userPoolName}${e}:${n}`,u=qx(a),c=new Ie(Zm(li(s)+u),16),f=await _K({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),IK($c(li(f)),$c(li(o)),m)}}const MK=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)})}),sp=async t=>{const e=new Ie(AK,16),n=new Ie("2",16),r=PK(),s=await MK({a:r,g:n,N:e});return new NK({userPoolName:t,a:r,g:n,A:s,N:e})},PK=()=>{const t=QA(JA(128));return new Ie(t,16)};async function su({userPoolId:t,userPoolEndpoint:e,newDeviceMetadata:n,accessToken:r}){if(!n)return;const s=t.split("_")[1]||"",o=await sp(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 BG({endpointResolver:St({endpointOverride:e})})({region:bt(t)},{AccessToken:r,DeviceName:await UV(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function kK(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{username:n,signInSession:r,signInDetails:s,challengeName:o}=Io.getState();if(o!=="WEB_AUTHN"||!n)throw new Ue({name:Ro.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=t;cd(!!a,Bt.InvalidPasskeyAuthenticationOptions);const u=await jG(JSON.parse(a)),c=ls({endpointResolver:St({endpointOverride:e.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:g,Session:m}=await c({region:bt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:e.userPoolClientId,Session:r});if(ru({signInSession:m,username:n,challengeName:f,signInDetails:s}),g)return await Ti({...g,username:n,NewDeviceMetadata:await su({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:s}),Io.dispatch({type:"RESET_STATE"}),await Ya(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Ue({name:Ro.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:h}}function Kn({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 DK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],LK=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a8=()=>{const t=new Date,e=LK[t.getUTCDay()],n=DK[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}`},l8=({userPoolName:t,username:e,challengeParameters:n,dateNow:r,hkdf:s})=>{const o=Ym.convert(t),a=Ym.convert(e),u=UK(n.SECRET_BLOCK),c=Ym.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 Hl(s);h.update(f);const g=h.digestSync();return Bc.convert(g)},UK=t=>{const e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/-/g,"+").replace(/_/g,"/"),r=HA.convert(n),s=new Uint8Array(r.length);for(let o=0;o<r.length;++o)s[o]=r.charCodeAt(o);return s};async function op({username:t,config:e,clientMetadata:n,session:r,tokenOrchestrator:s}){const{userPoolId:o,userPoolEndpoint:a}=e,u=e.userPoolClientId,c=await s?.getDeviceMetadata(t);X6(c);const f=await sp(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=ls({endpointResolver:St({endpointOverride:a})}),{ChallengeParameters:y,Session:S}=await m({region:bt(o)},g);return FK(t,y,n,S,f,e,s)}async function FK(t,e,n,r,s,{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(t);X6(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=a8(),C={USERNAME:e?.USERNAME??t,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:l8({username:m,userPoolName:y,challengeParameters:e,dateNow:E,hkdf:S}),DEVICE_KEY:m},w=Kn({username:t,userPoolId:o,userPoolClientId:a}),T={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:w};return ls({endpointResolver:St({endpointOverride:u})})({region:bt(o)},T)}async function eT(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 Ue({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=a8(),C={USERNAME:y,PASSWORD_CLAIM_SECRET_BLOCK:e?.SECRET_BLOCK,TIMESTAMP:E,PASSWORD_CLAIM_SIGNATURE:l8({username:y,userPoolName:h,challengeParameters:e,dateNow:E,hkdf:S})},w=await a.getDeviceMetadata(y);w&&w.deviceKey&&(C.DEVICE_KEY=w.deviceKey);const T=Kn({username:y,userPoolId:u,userPoolClientId:c}),_={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:T},M=await ls({endpointResolver:St({endpointOverride:f})})({region:bt(u)},_);return M.ChallengeName==="DEVICE_SRP_AUTH"?op({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 Ue&&s.name==="ResourceNotFoundException"&&s.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),t(...e);throw s}}function ou(t){const{dispatch:e}=Io;e({type:"SET_USERNAME",value:t})}async function u8({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 sp(h),m={USERNAME:t,SRP_A:g.A.toString(16)};o==="USER_AUTH"&&a&&(m.PREFERRED_CHALLENGE=a);const y=Kn({username:t,userPoolId:u,userPoolClientId:c}),S={AuthFlow:o,AuthParameters:m,ClientMetadata:n,ClientId:c,UserContextData:y},C=await rp({endpointResolver:St({endpointOverride:f})})({region:bt(u),userAgentValue:Mt(Ke.SignIn)},S),{ChallengeParameters:w,Session:T}=C,_=w?.USERNAME??t;return ou(_),C.ChallengeName==="PASSWORD_VERIFIER"?hd(eT,[e,w,n,T,g,r,s],_,s):C}async function zK({username:t,session:e,selectedChallenge:n,config:r,clientMetadata:s}){return ls({endpointResolver:St({endpointOverride:r.userPoolEndpoint})})({region:bt(r.userPoolId),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:t,ANSWER:n},ClientId:r.userPoolClientId,Session:e,ClientMetadata:s})}async function jK(t,e,n,r,s){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:t,PASSWORD:e},f=Kn({username:t,userPoolId:o,userPoolClientId:a}),g=await ls({endpointResolver:St({endpointOverride:u})})({region:bt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:s,UserContextData:f}),m=g.ChallengeParameters?.USERNAME??t;return ou(m),g}async function BK(t,e,n,r,s,o){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",h=await sp(f),g={ANSWER:"PASSWORD_SRP",USERNAME:t,SRP_A:h.A.toString(16)},m=Kn({username:t,userPoolId:a,userPoolClientId:u}),S=await ls({endpointResolver:St({endpointOverride:c})})({region:bt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:g,ClientId:u,ClientMetadata:n,Session:s,UserContextData:m}),E=S.ChallengeParameters?.USERNAME??t;return ou(E),S.ChallengeName==="PASSWORD_VERIFIER"?hd(eT,[e,S.ChallengeParameters,n,S.Session,h,r,o],E,o):S}const Wx="userAttributes.";function HK(t){return"isSignedIn"in t&&"nextStep"in t}async function $K({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=Kn({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:e,ClientId:u,UserContextData:g},S=await ls({endpointResolver:St({endpointOverride:c})})({region:bt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},m);return S.ChallengeName==="DEVICE_SRP_AUTH"?op({username:r,config:s,clientMetadata:e,session:S.Session,tokenOrchestrator:o}):S}async function qK({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=cG({endpointResolver:St({endpointOverride:c})}),{Session:y}=await m({region:bt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},{UserCode:t,Session:r,FriendlyDeviceName:s});Io.dispatch({type:"SET_SIGN_IN_SESSION",value:y});const S={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:y,ClientMetadata:n,ClientId:u};return ls({endpointResolver:St({endpointOverride:c})})({region:bt(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 ls({endpointResolver:St({endpointOverride:c})})({region:bt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},m)}throw new Ue({name:Ro.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 WK({challengeResponse:t,username:e,clientMetadata:n,session:r,config:s}){const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=s;hn(t==="TOTP"||t==="SMS"||t==="EMAIL",Ge.IncorrectMFAMethod);const c={USERNAME:e,ANSWER:tY(t)},f=Kn({username:e,userPoolId:o,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return ls({endpointResolver:St({endpointOverride:u})})({region:bt(o),userAgentValue:Mt(Ke.ConfirmSignIn)},h)}async function VK({challengeResponse:t,clientMetadata:e,session:n,username:r,requiredAttributes:s,config:o}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={...JK(s),NEW_PASSWORD:t,USERNAME:r},h=Kn({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:e,Session:n,ClientId:u,UserContextData:h};return ls({endpointResolver:St({endpointOverride:c})})({region:bt(a),userAgentValue:Mt(Ke.ConfirmSignIn)},g)}async function GK(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=Kn({username:t,userPoolId:a,userPoolClientId:o}),g={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:o,UserContextData:h},y=await rp({endpointResolver:St({endpointOverride:u})})({region:bt(a),userAgentValue:Mt(Ke.SignIn)},g),S=y.ChallengeParameters?.USERNAME??y.ChallengeParameters?.USER_ID_FOR_SRP??t;return ou(S),y.ChallengeName==="DEVICE_SRP_AUTH"?op({username:S,config:r,clientMetadata:n,session:y.Session,tokenOrchestrator:s}):y}async function KK(t,e,n,r,s){return u8({username:t,password:e,clientMetadata:n,config:r,tokenOrchestrator:s,authFlow:"USER_SRP_AUTH"})}async function YK(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=Kn({username:t,userPoolId:o,userPoolClientId:s}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:e,ClientId:s,UserContextData:f},m=await rp({endpointResolver:St({endpointOverride:a})})({region:bt(o),userAgentValue:Mt(Ke.SignIn)},h),y=m.ChallengeParameters?.USERNAME??t;return ou(y),m.ChallengeName==="DEVICE_SRP_AUTH"?op({username:y,config:n,clientMetadata:e,session:m.Session,tokenOrchestrator:r}):m}async function ZK(t,e,n,r,s){lt(r);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:u}=r,c=o?.split("_")[1]||"",f=await sp(c),h={USERNAME:t,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},g=Kn({username:t,userPoolId:o,userPoolClientId:a}),m={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:g},y=rp({endpointResolver:St({endpointOverride:u})}),{ChallengeParameters:S,Session:E}=await y({region:bt(o),userAgentValue:Mt(Ke.SignIn)},m),C=S?.USERNAME??t;return ou(C),hd(eT,[e,S,n,E,f,r,s],C,s)}async function iu(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}=Io.getState(),u=KM(YM(n.MFAS_CAN_SETUP))||[],c=rY(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=dG({endpointResolver:St({endpointOverride:s.userPoolEndpoint})}),{Session:m,SecretCode:y}=await g({region:bt(s.userPoolId)},{Session:o});return Io.dispatch({type:"SET_SIGN_IN_SESSION",value:m}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:XK(y,a)}}}throw new Ue({name:Ro.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:QK(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:KM(YM(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 kK(n);return HK(o)?o:iu(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 Ue({name:Ro.SignInException,message:`An error occurred during the sign in process. ${e} challengeName returned by the underlying service was not addressed.`})}function XK(t,e){return{sharedSecret:t,getSetupUri:(n,r)=>{const s=`otpauth://totp/${n}:${r??e}?secret=${t}&issuer=${n}`;return new Ka(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 QK(t){return t?JSON.parse(t).map(n=>n.includes(Wx)?n.replace(Wx,""):n):[]}function JK(t){if(!t)return{};const e={};return Object.entries(t).forEach(([n,r])=>{r&&(e[`${Wx}${n}`]=r)}),e}async function eY(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:{}}:zK({username:t,session:n,selectedChallenge:r,config:s,clientMetadata:a});case"SELECT_MFA_TYPE":return WK({challengeResponse:r,clientMetadata:a,session:n,username:t,config:s});case"MFA_SETUP":return qK({challengeResponse:r,clientMetadata:a,session:n,username:t,deviceName:f,config:s});case"NEW_PASSWORD_REQUIRED":return VK({challengeResponse:r,clientMetadata:a,session:n,username:t,requiredAttributes:c,config:s});case"CUSTOM_CHALLENGE":return hd($K,[{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 sY({challengeName:e,challengeResponse:r,clientMetadata:a,session:n,username:t,config:s,tokenOrchestrator:o});case"PASSWORD":return jK(t,r,a,s,n);case"PASSWORD_SRP":return BK(t,r,a,s,n,o)}throw new Ue({name:Ro.SignInException,message:`An error occurred during the sign in process.
5
- ${e} challengeName returned by the underlying service was not addressed.`})}function tY(t){let e="SMS_MFA";return t==="TOTP"&&(e="SOFTWARE_TOKEN_MFA"),t==="EMAIL"&&(e="EMAIL_OTP"),e}function nY(t){if(t==="SMS_MFA")return"SMS";if(t==="SOFTWARE_TOKEN_MFA")return"TOTP";if(t==="EMAIL_OTP")return"EMAIL"}function KM(t){if(t)return t.map(nY).filter(Boolean)}function YM(t){return t?JSON.parse(t):[]}function rY(t){return t.filter(e=>e==="EMAIL"||e==="TOTP")}async function c8(){let t;try{t=await Py()}catch{}if(t&&t.userId&&t.username)throw new Ue({name:HV,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function ip(t){return Io.getState().username??t}async function sY({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=Kn({username:s,userPoolId:u,userPoolClientId:c}),y={ChallengeName:t,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:c,UserContextData:m},E=await ls({endpointResolver:St({endpointOverride:f})})({region:bt(u),userAgentValue:Mt(Ke.ConfirmSignIn)},y);return E.ChallengeName==="DEVICE_SRP_AUTH"?op({username:s,config:o,clientMetadata:n,session:E.Session,tokenOrchestrator:a}):E}async function oY(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;hn(!!n,Ge.EmptySignInUsername),hn(!r,Ge.CustomAuthSignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd(YK,[n,a,e,$r],n,$r),g=ip(n);return ru({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ti({username:g,...f,NewDeviceMetadata:await su({userPoolId:e.userPoolId,userPoolEndpoint:e.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Js(),await Ya(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),Ns(u);const c=pd(u.name);if(c)return c;throw u}}async function iY(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;hn(!!e,Ge.EmptySignInUsername),hn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await ZK(e,n,a,o,$r),g=ip(e);return ru({signInSession:h,username:g,challengeName:u,signInDetails:s}),f?(await Ti({username:g,...f,NewDeviceMetadata:await su({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Js(),await Ya(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),Ns(u);const c=pd(u.name);if(c)return c;throw u}}const d8=async()=>{throw new Ue({name:Y6,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 tT=d8;function Vx(t){tT=t}function jr(t=!0){t&&(tT=d8),Ta.dispatch({type:"RESET"})}async function ZM(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;hn(!!e,Ge.EmptySignInUsername),hn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:c,Session:f}=await KK(e,n,o,r,$r),h=ip(e);return ru({signInSession:f,username:h,challengeName:a,signInDetails:s}),c?(await Ti({username:h,...c,NewDeviceMetadata:await su({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:c.NewDeviceMetadata,accessToken:c.AccessToken}),signInDetails:s}),Js(),await Ya(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:a,challengeParameters:u})}catch(a){Js(),jr(),Ns(a);const u=pd(a.name);if(u)return u;throw a}}async function aY(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;hn(!!e,Ge.EmptySignInUsername),hn(!!n,Ge.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await hd(GK,[e,n,a,s,$r],e,$r),g=ip(e);return ru({signInSession:h,username:g,challengeName:u,signInDetails:o}),f?(await Ti({...f,username:g,NewDeviceMetadata:await su({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Js(),await Ya(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:u,challengeParameters:c})}catch(u){Js(),jr(),Ns(u);const c=pd(u.name);if(c)return c;throw u}}async function lY({username:t,clientMetadata:e,config:n,tokenOrchestrator:r,preferredChallenge:s,password:o,session:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=n,h=Kn({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)&&hn(!1,Ge.InvalidPreferredChallenge),s==="PASSWORD_SRP")return hn(!!o,Ge.EmptySignInPassword),u8({username:t,password:o,clientMetadata:e,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:s});s==="PASSWORD"&&(hn(!!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 rp({endpointResolver:St({endpointOverride:f})})({region:bt(u),userAgentValue:Mt(Ke.SignIn)},m);return ou(t),S}async function f8(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;hn(!!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 lY(c),g=ip(e);return ru({signInSession:h.Session,username:g,challengeName:h.ChallengeName,signInDetails:o}),h.AuthenticationResult?(await Ti({username:g,...h.AuthenticationResult,NewDeviceMetadata:await su({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:o}),Js(),await Ya(),jr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(c){Js(),jr(),Ns(c);const f=pd(c.name);if(f)return f;throw c}}async function nT(t){jr(!1);const e=t.options?.authFlowType;switch(await c8(),e){case"USER_SRP_AUTH":return ZM(t);case"USER_PASSWORD_AUTH":return aY(t);case"CUSTOM_WITHOUT_SRP":return oY(t);case"CUSTOM_WITH_SRP":return iY(t);case"USER_AUTH":return f8(t);default:return ZM(t)}}const h8=180*1e3;function uY(t){const e=Sv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(Sv.dispatch("auth-internal",{event:"autoSignIn"}),Vx(g8(t)),e())}),n=setTimeout(()=>{e(),clearTimeout(n),jr()},h8)}function p8(t,e){let n;return r=>{n||t(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},e)}}function cY(t,e,n){const r=Date.now(),s=setInterval(async()=>{if(Date.now()-r>h8)clearInterval(s),n(new Ue({name:Y6,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 nT(t);u.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(e(u),clearInterval(s),jr())}catch(u){clearInterval(s),n(u),jr()}},5e3)}const dY=p8(cY,300),fY=p8(pY,300);function hY(t){return async()=>new Promise((e,n)=>{dY([t,e,n])})}async function pY(t,e,n){try{const r=t?.options?.authFlowType==="USER_AUTH"?await f8(t):await nT(t);e(r),jr()}catch(r){n(r),jr()}}function g8(t){return async()=>new Promise((e,n)=>{fY([t,e,n])})}const gY=g8,mY=()=>async t=>{if(t.statusCode>=300){const e=await ld(t);if(Ns(e),e.name===Bx.InvalidParameterException&&/'password'/.test(e.message)&&/Member must not be null/.test(e.message)){const n=Ge.EmptySignUpPassword,{message:r,recoverySuggestion:s}=K6[n];throw new Ue({name:n,message:r,recoverySuggestion:s})}throw new Ue({name:e.name,message:e.message})}return tp(t)},vY=t=>In(Vn,Wn("SignUp"),mY(),{...Gn,...t});async function yY(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),hn(!!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=vY({endpointResolver:St({endpointOverride:y})}),E={Username:e,Password:void 0,UserAttributes:r?.userAttributes&&yM(r?.userAttributes),ClientMetadata:a,ValidationData:u&&yM(u),ClientId:m,UserContextData:Kn({username:e,userPoolId:g,userPoolClientId:m})};n&&(E.Password=n);const{UserSub:C,CodeDeliveryDetails:w,UserConfirmed:T,Session:_}=await S({region:bt(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:_}));const R={destination:w?.Destination,deliveryMedium:w?.DeliveryMedium,attributeName:w?.AttributeName},M=!!T,N=Ta.getState().active;if(M)return N?(Vx(gY(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:C}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:C};if(N){if(o==="link")return Vx(hY(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:R},userId:C};uY(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:R},userId:C}}const bY=t=>In(Vn,Wn("ForgotPassword"),ar(),{...Gn,...t});async function m8(t){const{username:e}=t;hn(!!e,Ge.EmptyResetPasswordUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Kn({username:e,userPoolId:s,userPoolClientId:r}),h=(await bY({endpointResolver:St({endpointOverride:o})})({region:bt(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 SY=t=>In(Vn,Wn("ConfirmForgotPassword"),ar(),{...Gn,...t});async function EY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:s}=e,{username:o,newPassword:a}=t;hn(!!o,Ge.EmptyConfirmResetPasswordUsername),hn(!!a,Ge.EmptyConfirmResetPasswordNewPassword);const u=t.confirmationCode;hn(!!u,Ge.EmptyConfirmResetPasswordConfirmationCode);const c=t.options?.clientMetadata,f=Kn({username:o,userPoolId:r,userPoolClientId:n});await SY({endpointResolver:St({endpointOverride:s})})({region:bt(e.userPoolId),userAgentValue:Mt(Ke.ConfirmResetPassword)},{Username:o,ConfirmationCode:u,Password:a,ClientMetadata:c,ClientId:e.userPoolClientId,UserContextData:f})}const CY=t=>In(Vn,Wn("ResendConfirmationCode"),ar(),{...Gn,...t});async function wY(t){const{username:e}=t;hn(!!e,Ge.EmptySignUpUsername);const n=$t.getConfig().Auth?.Cognito;lt(n);const{userPoolClientId:r,userPoolId:s,userPoolEndpoint:o}=n,a=t.options?.clientMetadata,u=Kn({username:e,userPoolId:s,userPoolClientId:r}),c=CY({endpointResolver:St({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:bt(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 xY=t=>In(Vn,Wn("ConfirmSignUp"),ar(),{...Gn,...t});async function _Y(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;hn(!!e,Ge.EmptyConfirmSignUpUsername),hn(!!n,Ge.EmptyConfirmSignUpCode);const f=Kn({username:e,userPoolId:o,userPoolClientId:a}),h=xY({endpointResolver:St({endpointOverride:u})}),{Session:g}=await h({region:bt(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 v8(t){const{challengeResponse:e,options:n}=t,{username:r,challengeName:s,signInSession:o,signInDetails:a}=Io.getState(),u=$t.getConfig().Auth?.Cognito;lt(u);const c=n?.clientMetadata;if(hn(!!e,Ge.EmptyChallengeResponse),!r||!s||!o)throw new Ue({name:Ro.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 eY(r,s,o,e,u,$r,c,n);return ru({signInSession:f,username:r,challengeName:h,signInDetails:a}),g?(await Ti({username:r,...g,NewDeviceMetadata:await su({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:g.NewDeviceMetadata,accessToken:g.AccessToken}),signInDetails:a}),Js(),await Ya(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):iu({challengeName:h,challengeParameters:m})}catch(f){Ns(f);const h=pd(f.name);if(h)return h;throw f}}const AY=t=>In(Vn,Wn("GetUser"),ar(),{...Gn,...t}),TY=t=>In(Vn,Wn("VerifyUserAttribute"),ar(),{...Gn,...t});async function RY(t){const e=$t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{confirmationCode:s,userAttributeKey:o}=t;hn(!!s,Ge.EmptyConfirmUserAttributeCode);const{tokens:a}=await Oy({forceRefresh:!1});ud(a),await TY({endpointResolver:St({endpointOverride:n})})({region:bt(r),userAgentValue:Mt(Ke.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:o,Code:s})}new or("AuthError");const IY={oauthSignInError:{message:Hn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Hn.DEFAULT_MSG},missingAuthConfig:{message:Hn.DEFAULT_MSG},emptyUsername:{message:Hn.EMPTY_USERNAME},invalidUsername:{message:Hn.INVALID_USERNAME},emptyPassword:{message:Hn.EMPTY_PASSWORD},emptyCode:{message:Hn.EMPTY_CODE},signUpError:{message:Hn.SIGN_UP_ERROR},noMFA:{message:Hn.NO_MFA},invalidMFA:{message:Hn.INVALID_MFA},emptyChallengeResponse:{message:Hn.EMPTY_CHALLENGE},noUserSession:{message:Hn.NO_USER_SESSION},deviceConfig:{message:Hn.DEVICE_CONFIG},networkError:{message:Hn.NETWORK_ERROR},autoSignInError:{message:Hn.AUTOSIGNIN_ERROR},default:{message:Hn.DEFAULT_MSG}},Da=(t,e)=>new Ue({message:t??"An error has occurred during the oauth process.",name:Ro.OAuthSignInError,recoverySuggestion:IY.oauthSignInError.log});var Gx;(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"})(Gx||(Gx={}));const OY="`signInWithRedirect` has been canceled.",NY="An error occurred while validating the state.",MY="Try to initiate an OAuth flow from Amplify",y8=async t=>{const e=await Fr.loadOAuthState(),n=t===e?e:void 0;if(!n)throw new Ue({name:Gx.OAuthSignInError,message:t===null?OY:NY,recoverySuggestion:t===null?void 0:MY});return n},b8=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,responseType:s,domain:o,preferPrivateSession:a})=>{const u=new Ka(t),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw Da(f??c);return s==="code"?PY({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a}):kY({currentUrl:t,redirectUri:r,preferPrivateSession:a})},PY=async({currentUrl:t,userAgentValue:e,clientId:n,redirectUri:r,domain:s,preferPrivateSession:o})=>{const a=new Ka(t),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw Da("User cancelled OAuth flow.");const f=await y8(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,O])=>`${encodeURIComponent(N)}=${encodeURIComponent(O)}`).join("&"),{access_token:S,refresh_token:E,id_token:C,error:w,error_message:T,token_type:_,expires_in:R}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[Uq]:e},body:y})).json();if(w)throw Da(T??w);const M=(S&&vi(S).payload.username)??"username";return await Ti({username:M,AccessToken:S,IdToken:C,RefreshToken:E}),S8({redirectUri:r,state:f,preferPrivateSession:o})},kY=async({currentUrl:t,redirectUri:e,preferPrivateSession:n})=>{const r=new Ka(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 y8(a),m=(o&&vi(o).payload.username)??"username";return await Ti({username:m,AccessToken:o,IdToken:s}),S8({redirectUri:e,state:g,preferPrivateSession:n})},S8=async({redirectUri:t,state:e,preferPrivateSession:n})=>{await $r.setOAuthMetadata({oauthSignIn:!0}),await Fr.clearOAuthData(),await Fr.storeOAuthSignIn(!0,n),t8(),UY(t),DY(e)&&To.dispatch("auth",{event:"customOAuthState",data:kV(LY(e))},"Auth",Ao),To.dispatch("auth",{event:"signInWithRedirect"},"Auth",Ao),await Ya()},DY=t=>/-/.test(t),LY=t=>t.split("-").splice(1).join("-"),UY=t=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",t)};function rT(t,e){{const n=t?.find(FY)??t?.find(zY),r=t?.find(BY)??t?.find(jY);if(n)return n;throw r?YV:GV}}const FY=t=>t.startsWith(String(window.location.origin+(window.location.pathname||"/"))),zY=t=>t.includes(String(window.location.hostname)),jY=t=>t.startsWith("http://"),BY=t=>t.startsWith("https://"),sT=async t=>{t8(),await Fr.clearOAuthInflightData(),To.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:t}},"Auth",Ao)},HY=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=rT(o);await b8({currentUrl:e,clientId:r,domain:s,redirectUri:u,responseType:a,userAgentValue:Mt(Ke.SignInWithRedirect)})}catch(e){await sT(e)}};Iy()&&$t[_6](HY);const $Y={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},E8=async t=>{window?.location&&(window.location.href=t.replace("http://","https://"))},XM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",qY=t=>{const e=new Uint8Array(t);BA().getRandomValues(e);let n="",r;for(const s of e)n+=XM.charAt(s%XM.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=WY(n),r)}}};function WY(t){const e=new Hl;return e.update(t),VY(Bc.convert(e.digestSync(),{urlSafe:!0}))}function VY(t){return t.replace(/=/g,"")}const GY=()=>PV(32),KY=t=>{async function e(n){if(n.persisted&&await t.loadOAuthInFlight()){const s=Da("User cancelled OAuth flow.");await sT(s)}window.removeEventListener("pageshow",e)}window.addEventListener("pageshow",e)};async function C8(t){const e=$t.getConfig().Auth?.Cognito;lt(e),Ay(e),Fr.setAuthConfig(e),t?.options?.prompt||await c8();let n="COGNITO",r;return typeof t?.provider=="string"?n=$Y[t.provider]:t?.provider?.custom?n=t.provider.custom:t?.provider?.idpIdentifier&&({idpIdentifier:r}=t.provider),YY({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 YY=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=GY(),w=u||E8,T=s?`${C}-${DV(s)}`:C,{value:_,method:R,toCodeChallenge:M}=qY(128),N=rT(t.redirectSignIn);Iy()&&Fr.storeOAuthInFlight(!0),Fr.storeOAuthState(T),Fr.storePKCE(_);const O=new URLSearchParams;O.append("redirect_uri",N),O.append("response_type",h),O.append("client_id",r),n?O.append("idp_identifier",n):O.append("identity_provider",e),O.append("scope",g.join(" ")),m&&O.append("login_hint",m),y&&O.append("lang",y),S&&O.append("nonce",S),E&&O.append("prompt",E.toLowerCase()),O.append("state",T),h==="code"&&(O.append("code_challenge",M()),O.append("code_challenge_method",R));const k=`https://${c}/oauth2/authorize?${O.toString()}`;KY(Fr);const{type:F,error:$,url:D}=await w(k,f,o)??{};try{if(F==="error")throw Da(String($));if(F==="canceled")throw Da(String(F));F==="success"&&D&&await b8({currentUrl:D,clientId:r,domain:c,redirectUri:N,responseType:h,userAgentValue:Mt(Ke.SignInWithRedirect),preferPrivateSession:o})}catch(z){throw await sT(z),z}},ZY=async t=>{const e=t.getConfig().Auth?.Cognito;lt(e);const{userPoolEndpoint:n,userPoolId:r}=e,{tokens:s}=await N6(t,{forceRefresh:!1});ud(s);const o=AY({endpointResolver:St({endpointOverride:n})}),{UserAttributes:a}=await o({region:bt(r),userAgentValue:Mt(Ke.FetchUserAttributes)},{AccessToken:s.accessToken.toString()});return BV(a)},w8=()=>ZY($t),XY=async t=>{await t.clearOAuthData(),$r.clearTokens(),await M6(),To.dispatch("auth",{event:"signedOut"},"Auth",Ao)},QY=async(t,e=!1,n)=>{Ay(t);const{loginWith:r,userPoolClientId:s}=t,{domain:o,redirectSignOut:a}=r.oauth,u=rT(a),c=`https://${o}/logout?${Object.entries({client_id:s,logout_uri:encodeURIComponent(u)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return E8(c)},JY=async(t,e,n,r)=>{const{isOAuthSignIn:s}=await e.loadOAuthSignIn(),o=await n.getOAuthMetadata();if(await XY(e),s||o?.oauthSignIn)return QY(t,!1)},eZ=t=>In(Vn,Wn("RevokeToken"),ar(),{...Gn,...t}),tZ=new or("Auth");async function nZ(t){const e=$t.getConfig().Auth?.Cognito;lt(e),await rZ(e);let n;try{Ay(e),n=!0}catch{n=!1}if(n){const r=new e8(np);r.setAuthConfig(e);const{type:s}=await JY(e,r,$r)??{};if(s==="error")throw new Ue({name:ZV,message:"An error occurred when attempting to log out from OAuth provider."})}else $r.clearTokens(),await M6(),To.dispatch("auth",{event:"signedOut"},"Auth",Ao)}async function rZ(t){try{const{userPoolEndpoint:e,userPoolId:n,userPoolClientId:r}=t,s=await $r.getTokenStore().loadTokens();Z6(s),sZ(s.accessToken)&&await eZ({endpointResolver:St({endpointOverride:e})})({region:bt(n),userAgentValue:Mt(Ke.SignOut)},{ClientId:r,Token:s.refreshToken})}catch{tZ.debug("Client signOut error caught but will proceed with token removal")}}const sZ=t=>!!t?.payload?.origin_jti,oZ=t=>In(Vn,Wn("GetUserAttributeVerificationCode"),ar(),{...Gn,...t}),iZ=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=oZ({endpointResolver:St({endpointOverride:o})}),{CodeDeliveryDetails:f}=await c({region:bt(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}},aZ={identityId:"identityId"},lZ=new or("DefaultIdentityIdStore");class x8{setAuthConfig(e){Vm(e.Cognito),this.authConfig=e,this._authKeys=uZ("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){Vm(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 lZ.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){Vm(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 uZ=(t,e)=>GA(aZ)(`com.amplify.${t}`,e),Kx=({endpointOverride:t})=>e=>t?{url:new Ka(t)}:CV(e);function _8(t){const e=vi(t).payload.iss,n={};if(!e)throw new Ue({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=e.replace(/(^\w+:|^)\/\//,"");return n[r]=t,n}async function cZ({tokens:t,authConfig:e,identityIdStore:n}){n.setAuthConfig({Cognito:e});const r=await n.loadIdentityId();if(r)return r.id;const s=t?.idToken?_8(t.idToken.toString()):{},o=await dZ(s,e);return n.storeIdentityId({id:o,type:t?"primary":"guest"}),o}async function dZ(t,e){const n=e?.identityPoolId,r=jx(n),s=bV({endpointResolver:Kx({endpointOverride:e.identityPoolEndpoint})});let o;try{o=(await s({region:r},{IdentityPoolId:n,Logins:t})).IdentityId}catch(a){throw Ns(a),new Ue(a)}if(!o)throw new Ue({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return o}const Wg=new or("CognitoCredentialsProvider"),QM=3e3*1e3;class A8{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){Wg.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Wg.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const n=e.authenticated,{tokens:r}=e,{authConfig:s}=e;try{Vm(s?.Cognito)}catch{return}if(!n&&!s.Cognito.allowGuestAccess)return;const{forceRefresh:o}=e,a=this.hasTokenChanged(r),u=await cZ({tokens:r,authConfig:s.Cognito,identityIdStore:this._identityIdStore});return(o||a)&&this.clearCredentials(),n?(JV(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 Wg.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=jx(n.identityPoolId),s=gM({endpointResolver:Kx({endpointOverride:n.identityPoolEndpoint})});let o;try{o=await s({region:r},{IdentityId:e})}catch(a){throw Ns(a),new Ue(a)}if(o?.Credentials?.AccessKeyId&&o?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+QM;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 Ue({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 Wg.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const s=n.idToken?_8(n.idToken.toString()):{},o=jx(e.identityPoolId),a=gM({endpointResolver:Kx({endpointOverride:e.identityPoolEndpoint})});let u;try{u=await a({region:o},{IdentityId:r,Logins:s})}catch(c){throw Ns(c),new Ue(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+QM;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 Ue({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 fZ=new A8(new x8(np)),T8={configure(t,e){const n=T6(t),r=new IV({sameSite:"lax"}),s=e?.ssr?r:np,o=e?.ssr?new A8(new x8(r)):fZ;if(!n.Auth||e?.Auth){$t.configure(n,e);return}Km.setAuthConfig(n.Auth),Km.setKeyValueStorage(s),$t.configure(n,{...e,Auth:{tokenProvider:Km,credentialsProvider:o}})},getConfig(){return $t.getConfig()}},hZ=["internal","acme","tailscale","off"],pZ=t=>typeof t=="string"&&hZ.includes(t),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,tlsMode:pZ(t.tlsMode)?t.tlsMode:"off"}},gZ=()=>{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}},Yx=gZ(),Ly=()=>Yx!==null,R8=()=>{if(!Yx){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}=Yx;T8.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 mZ={};const Xm=Object.create(null),_f=t=>mZ||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?Xm:globalThis),ma=new Proxy(Xm,{get(t,e){return _f()[e]??Xm[e]},has(t,e){return e in _f()||e in Xm},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 Qm=class extends Error{constructor(t,e){super(t,e),this.name="BetterAuthError",this.message=t,this.stack=""}};const vZ=47;function I8(t){let e=t.length;for(;e>0&&t.charCodeAt(e-1)===vZ;)e--;return e===t.length?t:t.slice(0,e)}function yZ(t){try{return(I8(new URL(t).pathname)||"/")!=="/"}catch{throw new Qm(`Invalid base URL: ${t}. Please provide a valid base URL.`)}}function bZ(t){try{const e=new URL(t);if(e.protocol!=="http:"&&e.protocol!=="https:")throw new Qm(`Invalid base URL: ${t}. URL must include 'http://' or 'https://'`)}catch(e){throw e instanceof Qm?e:new Qm(`Invalid base URL: ${t}. Please provide a valid base URL.`,{cause:e})}}function JM(t,e="/api/auth"){if(bZ(t),yZ(t))return t;const n=I8(t);return!e||e==="/"?n:(e=e.startsWith("/")?e:`/${e}`,`${n}${e}`)}function SZ(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 JM(o,e)}if(typeof window<"u"&&window.location)return JM(window.location.origin,e)}const EZ={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*:/},CZ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,eP={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},wZ=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function xZ(t){return t instanceof Date&&!isNaN(t.getTime())}function _Z(t){const e=wZ.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 xZ(m)?m:null}function AZ(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 eP)return eP[u];if(!CZ.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return t}if(Object.entries(EZ).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=_Z(h);if(g)return g}return s?s(f,h):h})}catch(c){if(n)throw c;return t}}function TZ(t,e={strict:!0}){return AZ(t,e)}const RZ=["javascript:","data:","vbscript:"];function IZ(t){let e;try{e=new URL(t)}catch{return!0}return!RZ.includes(e.protocol)}const OZ={id:"redirect",name:"Redirect",hooks:{onSuccess(t){if(t.data?.url&&t.data?.redirect&&IZ(t.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=t.data.url}catch{}}}};let Ks=[],va=0;const Jm=4,NZ=globalThis.nanostoresGlobal||={epoch:0};let MZ=()=>{for(va=0;va<Ks.length;va+=Jm)Ks[va](Ks[va+1].value,Ks[va+2],Ks[va+3]);Ks.length=0};const tP=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+Jm;o<Ks.length;)Ks[o]===r?Ks.splice(o,Jm):o+=Jm;let s=e.indexOf(r);~s&&(e.splice(s,1),--n.lc||n.off())}},notify(r,s){NZ.epoch++;let o=!Ks.length&&!0;for(let a of e)Ks.push(a,n,r,s);o&&MZ()},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},PZ=2,kZ=5,Vg=6,Gg=10;let O8=(t,e,n,r)=>(t.events=t.events||{},t.events[n+Gg]||(t.events[n+Gg]=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+Gg](),delete t.events[n+Gg])}),DZ=(t,e)=>O8(t,e,PZ,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 LZ=1e3;let UZ=(t,e)=>O8(t,r=>{let s=e(r);s&&t.events[Vg].push(s)},kZ,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[Vg]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[Vg])a();t.events[Vg]=[]}},LZ)},()=>{t.listen=s,t.off=o}});function FZ(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 nP(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(nP(t)&&nP(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 zZ(t,e){return DZ(t,({newValue:n,abort:r})=>{e(t.value,n)&&r()})}const K1=Symbol.for("better-auth:broadcast-channel"),jZ=()=>Math.floor(Date.now()/1e3);var BZ=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:jZ()}))}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 BZ(t)),globalThis[K1]}const Z1=Symbol.for("better-auth:focus-manager");var HZ=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 rP(){return globalThis[Z1]||(globalThis[Z1]=new HZ),globalThis[Z1]}const X1=Symbol.for("better-auth:online-manager");var $Z=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 $Z),globalThis[X1]}const J1=()=>Math.floor(Date.now()/1e3),qZ=5;function WZ(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=_=>{if(f()){if(_?.event==="storage"){e();return}if(_?.event==="poll"){c.lastSessionRequest=J1(),e();return}if(_?.event==="visibilitychange"){if(J1()-c.lastSessionRequest<qZ)return;c.lastSessionRequest=J1(),e();return}e()}},g=_=>{Y1().post({event:"session",data:{trigger:_},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=rP().subscribe(()=>{h({event:"visibilitychange"})}))},E=()=>{c.unsubscribeOnline=Q1().subscribe(_=>{_&&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=rP().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 VZ=()=>typeof window>"u";function sP(t){return typeof t=="object"&&t!==null&&"data"in t&&"error"in t?t:{data:t,error:null}}function GZ(t){return!t||t.session===null&&t.user===null?null:t}function KZ(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 YZ(t,e){const n=tP(!1);let r;const s=f=>u(f),o=tP({data:null,error:null,isPending:!0,isRefetching:!1,refetch:s});zZ(o,KZ);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}=sP(m);if(y?.needsRefresh)try{const T=await t("/get-session",{method:"POST",signal:h.signal});if(h.signal.aborted){a(h);return}({data:y,error:S}=sP(T))}catch{if(h.signal.aborted){a(h);return}}if(S){const T=o.get(),_=S?.status===401;o.set({data:_?null:T.data,error:S,isPending:!1,isRefetching:!1,refetch:s});return}const E=GZ(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 UZ(o,()=>{let f;VZ()||(f=setTimeout(()=>{u()},0));const h=WZ({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 Zx(t,e,n=".",r){if(!eS(e))return Zx(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]=Zx(a,s[o],(n?`${n}.`:"")+o.toString(),r):s[o]=a))}return s}function ZZ(t){return(...e)=>e.reduce((n,r)=>Zx(n,r,"",t),{})}const XZ=ZZ();var QZ=Object.defineProperty,JZ=Object.defineProperties,eX=Object.getOwnPropertyDescriptors,oP=Object.getOwnPropertySymbols,tX=Object.prototype.hasOwnProperty,nX=Object.prototype.propertyIsEnumerable,iP=(t,e,n)=>e in t?QZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vs=(t,e)=>{for(var n in e||(e={}))tX.call(e,n)&&iP(t,n,e[n]);if(oP)for(var n of oP(e))nX.call(e,n)&&iP(t,n,e[n]);return t},So=(t,e)=>JZ(t,eX(e)),rX=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)}},sX=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}},aP=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}},oX=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 iX(t){if(typeof t=="number")return new aP({type:"linear",attempts:t,delay:1e3});switch(t.type){case"linear":return new aP(t);case"exponential":return new oX(t);default:throw new Error("Invalid retry strategy")}}var aX=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},lX=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function uX(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 lX.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function cX(t){try{return JSON.parse(t),!0}catch{return!1}}function N8(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 lP(t){try{return JSON.parse(t)}catch{return t}}function uP(t){return typeof t=="function"}function dX(t){if(t?.customFetchImpl)return t.customFetchImpl;if(typeof globalThis<"u"&&uP(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&uP(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function M8(...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 fX(t){const e=new Headers(M8(t?.headers,await aX(t)));if(!e.has("content-type")){const n=hX(t?.body);n&&e.set("content-type",n)}return e}function hX(t){return N8(t)?"application/json":null}function pX(t){const e=t.get("content-type");return e?e.split(";")[0].trim().toLowerCase():null}function gX(t,e){const{body:n}=t;return n?!N8(n)||typeof n=="string"?n:pX(e)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function mX(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 k8.includes(r)?r.toUpperCase():e?.body?"POST":"GET"}return e?.body?"POST":"GET"}function vX(t,e){let n;return!t?.signal&&t?.timeout&&(n=setTimeout(()=>e?.abort(),t?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var yX=class P8 extends Error{constructor(e,n){super(n||JSON.stringify(e,null,2)),this.issues=e,Object.setPrototypeOf(this,P8.prototype)}};async function Yf(t,e){const n=await t["~standard"].validate(e);if(n.issues)throw new yX(n.issues);return n.value}var k8=["get","post","put","patch","delete"],bX=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=So(Vs({},n),{method:f.method,output:f.output,headers:h});return n?.disableValidation||(g=So(Vs({},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}}}),SX=t=>{async function e(n,r){const s=So(Vs(Vs({},t),r),{headers:M8(t?.headers,r?.headers),plugins:[...t?.plugins||[],bX(t||{}),...r?.plugins||[]]});if(t?.catchAllError)try{return await Xx(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 Xx(n,s)}return e},EX=t=>t==="."||t==="..";function CX(t,e){let n=t;for(const[r,s]of e)n=n.replace(r,s);if(EX(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function wX(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];k8.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=>CX(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 Xx=async(t,e)=>{var n,r,s,o,a,u,c,f;const{hooks:h,url:g,options:m}=await sX(t,e),y=dX(m),S=new AbortController,E=(n=m.signal)!=null?n:S.signal,C=wX(g,m),w=await fX(m),T=gX(m,w),_=mX(g,m),R=So(Vs({},m),{url:C,headers:w,body:T,method:_,signal:E});for(const q of h.onRequest)if(q){const Y=await q(R);typeof Y=="object"&&Y!==null&&Object.assign(R,Y)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=e?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:M}=vX(m,S);let N=await y(R.url,R);M();const O={response:N,request:R};for(const q of h.onResponse)if(q){const Y=await q(So(Vs({},O),{response:(s=e?.hookOptions)!=null&&s.cloneResponse?N.clone():N}));Y instanceof Response?N=Y:typeof Y=="object"&&Y!==null&&(N=Y.response)}if(N.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Y=uX(N),te={data:null,response:N,request:R};if(Y==="json"||Y==="text"){const H=await N.text(),ee=(o=R.jsonParser)!=null?o:lP;te.data=await ee(H)}else te.data=await N[Y]();R?.output&&R.output&&!R.disableValidation&&(te.data=await Yf(R.output,te.data));for(const H of h.onSuccess)H&&await H(So(Vs({},te),{response:(a=e?.hookOptions)!=null&&a.cloneResponse?N.clone():N}));return e?.throw?te.data:{data:te.data,error:null}}const k=(u=e?.jsonParser)!=null?u:lP,F=await N.text(),$=cX(F),D=$?await k(F):null,z={response:N,responseText:F,request:R,error:So(Vs({},D),{status:N.status,statusText:N.statusText})};for(const q of h.onError)q&&await q(So(Vs({},z),{response:(c=e?.hookOptions)!=null&&c.cloneResponse?N.clone():N}));if(e?.retry){const q=iX(e.retry),Y=(f=e.retryAttempt)!=null?f:0;if(await q.shouldAttemptRetry(Y,N)){for(const H of h.onRetry)H&&await H(O);const te=q.getDelay(Y);return await new Promise(H=>setTimeout(H,te)),await Xx(t,So(Vs({},e),{retryAttempt:Y+1}))}}if(e?.throw)throw new rX(N.status,N.statusText,$?D:F);return{data:null,error:So(Vs({},D),{status:N.status,statusText:N.statusText})}},yl={};const xX=t=>{if(typeof process>"u")return;const e="/api/auth";if(yl.NEXT_PUBLIC_AUTH_URL)return yl.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(yl.NEXTAUTH_URL)try{return yl.NEXTAUTH_URL}catch{}if(yl.VERCEL_URL)try{const n=yl.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${yl.VERCEL_URL}`).origin}${e}`}catch{}}},_X=(t,e)=>{const n="credentials"in Request.prototype,r=SZ(t?.baseURL,t?.basePath)??xX()??"/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=SX({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?TZ(M,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[o,...h.plugins||[],OZ,...s]}),{$sessionSignal:m,session:y,broadcastSessionUpdate:S}=YZ(g,t),E=[];let C={};const w={$sessionSignal:m,session:y},T={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},_=[{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(T,M.pathMethods),M.atomListeners&&_.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=XZ(M.getActions?.(g,R,t)??{},C));return{get baseURL(){return r},pluginsActions:C,pluginsAtoms:w,pluginPathMethods:T,atomListeners:_,$fetch:g,$store:R}};function AX(t){return typeof t=="object"&&t!==null&&"get"in t&&typeof t.get=="function"&&"lc"in t&&typeof t.lc=="number"}function TX(t){return t.charAt(0).toUpperCase()+t.slice(1)}const RX=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),IX=/['\u2019]/g;function OX(t){return t.replace(IX,"").match(RX)??[]}function NX(t){return OX(t).map(e=>e.toLowerCase()).join("-")}function MX(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 PX(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"||AX(h)?h:o(f)},apply:async(u,c,f)=>{const h="/"+a.map(NX).join("/"),g=f[0]||{},m=f[1]||{},{query:y,fetchOptions:S,...E}=g,C={...m,...S},w=MX(h,n,g);return await e(h,{...C,body:w==="GET"?void 0:{...E,...C?.body||{}},query:y||C?.query,method:w,async onSuccess(T){if(await C?.onSuccess?.(T),!s||C.disableSignal)return;const _=s.filter(M=>M.matcher(h));if(!_.length)return;const R=new Set;for(const M of _){const N=r[M.signal];if(!N)return;if(R.has(M.signal))continue;R.add(M.signal);const O=N.get();setTimeout(()=>{N.set(!O)},10),M.callback?.(h)}}})}})}return o()}var tS={exports:{}},Ve={};var cP;function kX(){if(cP)return Ve;cP=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,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}w.prototype.isReactComponent={},w.prototype.setState=function(L,V){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,V,"setState")},w.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function T(){}T.prototype=w.prototype;function _(L,V,K){this.props=L,this.context=V,this.refs=C,this.updater=K||S}var R=_.prototype=new T;R.constructor=_,E(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function N(){}var O={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function F(L,V,K){var J=K.ref;return{$$typeof:t,type:L,key:V,ref:J!==void 0?J:null,props:K}}function $(L,V){return F(L.type,V,L.props)}function D(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function z(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(K){return V[K]})}var q=/\/+/g;function Y(L,V){return typeof L=="object"&&L!==null&&L.key!=null?z(""+L.key):V.toString(36)}function te(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(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function H(L,V,K,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,H(ue(L._payload),V,K,J,oe)}}if(ue)return oe=oe(L),ue=J===""?"."+Y(L,0):J,M(oe)?(K="",ue!=null&&(K=ue.replace(q,"$&/")+"/"),H(oe,V,K,"",function(Xe){return Xe})):oe!=null&&(D(oe)&&(oe=$(oe,K+(oe.key==null||L&&L.key===oe.key?"":(""+oe.key).replace(q,"$&/")+"/")+ue)),V.push(oe)),1;ue=0;var ve=J===""?".":J+":";if(M(L))for(var _e=0;_e<L.length;_e++)J=L[_e],he=ve+Y(J,_e),ue+=H(J,V,K,he,oe);else if(_e=y(L),typeof _e=="function")for(L=_e.call(L),_e=0;!(J=L.next()).done;)J=J.value,he=ve+Y(J,_e++),ue+=H(J,V,K,he,oe);else if(he==="object"){if(typeof L.then=="function")return H(te(L),V,K,J,oe);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ue}function ee(L,V,K){if(L==null)return L;var J=[],oe=0;return H(L,J,"","",function(he){return V.call(K,he,oe++)}),J}function de(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(K){(L._status===0||L._status===-1)&&(L._status=1,L._result=K)},function(K){(L._status===0||L._status===-1)&&(L._status=2,L._result=K)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var ce=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},xe={map:ee,forEach:function(L,V,K){ee(L,function(){V.apply(this,arguments)},K)},count:function(L){var V=0;return ee(L,function(){V++}),V},toArray:function(L){return ee(L,function(V){return V})||[]},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=xe,Ve.Component=w,Ve.Fragment=n,Ve.Profiler=s,Ve.PureComponent=_,Ve.StrictMode=r,Ve.Suspense=c,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(L){return O.H.useMemoCache(L)}},Ve.cache=function(L){return function(){return L.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(L,V,K){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(V!=null)for(he in V.key!==void 0&&(oe=""+V.key),V)!k.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(J[he]=V[he]);var he=arguments.length-2;if(he===1)J.children=K;else if(1<he){for(var ue=Array(he),ve=0;ve<he;ve++)ue[ve]=arguments[ve+2];J.children=ue}return 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,V,K){var J,oe={},he=null;if(V!=null)for(J in V.key!==void 0&&(he=""+V.key),V)k.call(V,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(oe[J]=V[J]);var ue=arguments.length-2;if(ue===1)oe.children=K;else if(1<ue){for(var ve=Array(ue),_e=0;_e<ue;_e++)ve[_e]=arguments[_e+2];oe.children=ve}if(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:de}},Ve.memo=function(L,V){return{$$typeof:f,type:L,compare:V===void 0?null:V}},Ve.startTransition=function(L){var V=O.T,K={};O.T=K;try{var J=L(),oe=O.S;oe!==null&&oe(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(N,ce)}catch(he){ce(he)}finally{V!==null&&K.types!==null&&(V.types=K.types),O.T=V}},Ve.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Ve.use=function(L){return O.H.use(L)},Ve.useActionState=function(L,V,K){return O.H.useActionState(L,V,K)},Ve.useCallback=function(L,V){return O.H.useCallback(L,V)},Ve.useContext=function(L){return O.H.useContext(L)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(L,V){return O.H.useDeferredValue(L,V)},Ve.useEffect=function(L,V){return O.H.useEffect(L,V)},Ve.useEffectEvent=function(L){return O.H.useEffectEvent(L)},Ve.useId=function(){return O.H.useId()},Ve.useImperativeHandle=function(L,V,K){return O.H.useImperativeHandle(L,V,K)},Ve.useInsertionEffect=function(L,V){return O.H.useInsertionEffect(L,V)},Ve.useLayoutEffect=function(L,V){return O.H.useLayoutEffect(L,V)},Ve.useMemo=function(L,V){return O.H.useMemo(L,V)},Ve.useOptimistic=function(L,V){return O.H.useOptimistic(L,V)},Ve.useReducer=function(L,V,K){return O.H.useReducer(L,V,K)},Ve.useRef=function(L){return O.H.useRef(L)},Ve.useState=function(L){return O.H.useState(L)},Ve.useSyncExternalStore=function(L,V,K){return O.H.useSyncExternalStore(L,V,K)},Ve.useTransition=function(){return O.H.useTransition()},Ve.version="19.2.7",Ve}var dP;function ap(){return dP||(dP=1,tS.exports=kX()),tS.exports}var x=ap();const j=Ga(x),D8=C6({__proto__:null,default:j},[x]);function DX(t,e={}){const n=x.useRef(t.get()),{keys:r,deps:s=[t,r]}=e,o=x.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(t.value),r?.length?FZ(t,r,c):t.listen(c)},s),a=()=>n.current;return x.useSyncExternalStore(o,a,a)}function LX(t){return`use${TX(t)}`}function UX(t){const{pluginPathMethods:e,pluginsActions:n,pluginsAtoms:r,$fetch:s,$store:o,atomListeners:a}=_X(t),u={};for(const[c,f]of Object.entries(r))u[LX(c)]=()=>DX(f);return PX({...n,...u,$fetch:s,$store:o},s,e,r,a)}const FX=10,kc=[],zX=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function jX(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 BX(t,e){return e?.method?e.method.toUpperCase():typeof t!="string"&&!(t instanceof URL)&&t.method?t.method.toUpperCase():"GET"}function HX(t){for(const e of zX){const n=t.headers.get(e);if(n)return n}}function $X(t){kc.push(t),kc.length>FX&&kc.shift()}function fP(t){const{input:e,init:n,response:r,durationMs:s}=t;$X({method:BX(e,n),path:jX(e),status:r?.status??0,durationMs:Math.round(s),correlationId:r?HX(r):void 0,timestamp:new Date().toISOString()})}function qX(){return kc.slice()}function WX(){for(let t=kc.length-1;t>=0;t--){const e=kc[t];if(e.status===0||e.status>=400)return e}}class oT extends Error{constructor(e){super(e instanceof Error&&e.message?e.message:"The request could not be completed.",{cause:e}),this.name="NetworkError"}}const VX=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",L8=async(t,e)=>{const n=performance.now();try{const r=await fetch(t,e);return fP({input:t,init:e,response:r,durationMs:performance.now()-n}),r}catch(r){throw VX(r)?r:(fP({input:t,init:e,durationMs:performance.now()-n}),new oT(r))}},Uy=()=>Dy().betterAuthEnabled,GX="EMAIL_PASSWORD_SIGN_UP_DISABLED",KX=t=>typeof t=="object"&&t!==null&&t.code===GX,_h=UX(),YX=60,ZX=30,Qx="remit.better-auth.token",U8=()=>{try{return globalThis.sessionStorage??null}catch{return null}},XX=()=>{const t=U8()?.getItem(Qx);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},F8=t=>{const e=U8();if(e)try{if(!t){e.removeItem(Qx);return}e.setItem(Qx,JSON.stringify(t))}catch{}};let Al=null,xv=0;const QX=()=>Al||(Al=XX(),Al),Ml=()=>Math.floor(Date.now()/1e3),JX=t=>{const[,e]=t.split(".");if(!e)return Ml();try{const n=JSON.parse(atob(e.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:Ml()}catch{return Ml()}};class _v extends Error{status;constructor(e,n){super(e),this.name="AuthTokenError",this.status=n}}const eQ=async()=>{const t=await L8("/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 tQ=()=>Af||(Af=eQ().then(t=>(Al={value:t,expiresAt:JX(t)},F8(Al),xv=0,t)).finally(()=>{Af=null}),Af),nQ=t=>t.expiresAt-YX>Ml(),hP=t=>t.expiresAt>Ml(),rQ=t=>t instanceof oT?!0:t instanceof _v?t.status===408||t.status===429||(t.status??0)>=500:!1,sQ=t=>t instanceof _v&&(t.status===401||t.status===403),oQ=async()=>{const t=QX();if(t&&nQ(t)||t&&hP(t)&&Ml()<xv)return t.value;try{return await tQ()}catch(e){if(sQ(e))throw iT(),e;if(t&&hP(t)&&rQ(e))return xv=Ml()+ZX,t.value;throw e}},iT=()=>{xv=0,F8(null),Al=null};function z8(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=z8(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function j8(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=z8(t))&&(r&&(r+=" "),r+=e);return r}var nS={exports:{}},dr={};var pP;function iQ(){if(pP)return dr;pP=1;var t=ap();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 dr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,dr.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)},dr.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()}},dr.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))},dr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},dr.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})}},dr.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)},dr.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})}},dr.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)},dr.requestFormReset=function(c){r.d.r(c)},dr.unstable_batchedUpdates=function(c,f){return c(f)},dr.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},dr.useFormStatus=function(){return a.H.useHostTransitionStatus()},dr.version="19.2.7",dr}var gP;function B8(){if(gP)return nS.exports;gP=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=iQ(),nS.exports}var H8=B8();const FRe=Ga(H8);var rS={exports:{}},sS={};var mP;function aQ(){if(mP)return sS;mP=1;var t=ap();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 vP;function lQ(){return vP||(vP=1,rS.exports=aQ()),rS.exports}const uQ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$8=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();var cQ={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 dQ=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...u},c)=>x.createElement("svg",{ref:c,...cQ,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:$8("lucide",s),...u},[...a.map(([f,h])=>x.createElement(f,h)),...Array.isArray(o)?o:[o]]));const tn=(t,e)=>{const n=x.forwardRef(({className:r,...s},o)=>x.createElement(dQ,{ref:o,iconNode:e,className:$8(`lucide-${uQ(t)}`,r),...s}));return n.displayName=`${t}`,n};const fQ=tn("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 hQ=tn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Jx=tn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const pQ=tn("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 gQ=tn("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const mQ=tn("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const vQ=tn("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 yQ=tn("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);const bQ=tn("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 q8=tn("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 SQ=tn("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 e_=tn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const EQ=tn("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 aT=tn("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 CQ=tn("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 wQ=tn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const xQ=tn("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 yP=tn("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 _Q=tn("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 AQ=tn("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);const TQ=tn("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 W8=tn("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 RQ=tn("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 IQ=tn("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=tn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lT="-",OQ=t=>{const e=MQ(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const u=a.split(lT);return u[0]===""&&u.length!==1&&u.shift(),V8(u,e)||NQ(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},V8=(t,e)=>{if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?V8(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(lT);return e.validators.find(({validator:a})=>a(o))?.classGroupId},bP=/^\[(.+)\]$/,NQ=t=>{if(bP.test(t)){const e=bP.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},MQ=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return kQ(Object.entries(t.classGroups),n).forEach(([o,a])=>{t_(a,r,o,e)}),r},t_=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:SP(e,s);o.classGroupId=n;return}if(typeof s=="function"){if(PQ(s)){t_(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{t_(a,SP(e,o),n,r)})})},SP=(t,e)=>{let n=t;return e.split(lT).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PQ=t=>t.isThemeGetter,kQ=(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,DQ=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)}}},G8="!",LQ=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(G8),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},UQ=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},FQ=t=>({cache:DQ(t.cacheSize),parseClassName:LQ(t),...OQ(t)}),zQ=/\s+/,jQ=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,o=[],a=t.trim().split(zQ);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=UQ(h).join(":"),w=g?C+G8:C,T=w+E;if(o.includes(T))continue;o.push(T);const _=s(E,S);for(let R=0;R<_.length;++R){const M=_[R];o.push(w+M)}u=f+(u.length>0?" "+u:u)}return u};function BQ(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=K8(e))&&(r&&(r+=" "),r+=n);return r}const K8=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=K8(t[r]))&&(n&&(n+=" "),n+=e);return n};function HQ(t,...e){let n,r,s,o=a;function a(c){const f=e.reduce((h,g)=>g(h),t());return n=FQ(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=jQ(c,n);return s(c,h),h}return function(){return o(BQ.apply(null,arguments))}}const Zt=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},Y8=/^\[(?:([a-z-]+):)?(.+)\]$/i,$Q=/^\d+\/\d+$/,qQ=new Set(["px","full","screen"]),WQ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VQ=/\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$/,GQ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,KQ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YQ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ni=t=>Dc(t)||qQ.has(t)||$Q.test(t),da=t=>gd(t,"length",rJ),Dc=t=>!!t&&!Number.isNaN(Number(t)),oS=t=>gd(t,"number",Dc),Tf=t=>!!t&&Number.isInteger(Number(t)),ZQ=t=>t.endsWith("%")&&Dc(t.slice(0,-1)),et=t=>Y8.test(t),fa=t=>WQ.test(t),XQ=new Set(["length","size","percentage"]),QQ=t=>gd(t,XQ,Z8),JQ=t=>gd(t,"position",Z8),eJ=new Set(["image","url"]),tJ=t=>gd(t,eJ,oJ),nJ=t=>gd(t,"",sJ),Rf=()=>!0,gd=(t,e,n)=>{const r=Y8.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},rJ=t=>VQ.test(t)&&!GQ.test(t),Z8=()=>!1,sJ=t=>KQ.test(t),oJ=t=>YQ.test(t),iJ=()=>{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"),T=Zt("padding"),_=Zt("saturate"),R=Zt("scale"),M=Zt("sepia"),N=Zt("skew"),O=Zt("space"),k=Zt("translate"),F=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",et,e],z=()=>[et,e],q=()=>["",ni,da],Y=()=>["auto",Dc,et],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",et],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>[Dc,et];return{cacheSize:500,separator:":",theme:{colors:[Rf],spacing:[ni,da],blur:["none","",fa,et],brightness:L(),borderColor:[t],borderRadius:["none","","full",fa,et],borderSpacing:z(),borderWidth:q(),contrast:L(),grayscale:ce(),hueRotate:L(),invert:ce(),gap:z(),gradientColorStops:[t],gradientColorStopPositions:[ZQ,da],inset:D(),margin:D(),opacity:L(),padding:z(),saturate:L(),scale:L(),sepia:ce(),skew:L(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",et]}],container:["container"],columns:[{columns:[fa]}],"break-after":[{"break-after":xe()}],"break-before":[{"break-before":xe()}],"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:[...te(),et]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],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:ce()}],shrink:[{shrink:ce()}],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":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Rf]}],"row-start-end":[{row:["auto",{span:[Tf,et]},et]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",et]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",et]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...de()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...de(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...de(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],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":[O]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[O]}],"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",Dc,oS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ni,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:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ni,da]}],"underline-offset":[{"underline-offset":["auto",ni,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:[...te(),JQ]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QQ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tJ]}],"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:[...H(),"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:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[ni,et]}],"outline-w":[{outline:[ni,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":[ni,da]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",fa,nJ]}],"shadow-color":[{shadow:[Rf]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",fa,et]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[_]}],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":[_]}],"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:[ni,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"]}}},X8=HQ(iJ);function dt(...t){return X8(j8(t))}const aJ=1024,lJ=1280;function uJ(t,e=aJ,n=lJ){const r=t>=e;return{nav:r,reading:r,intelligence:t>=n}}function cJ(t){const e=x.useRef(null),[n,r]=x.useState(t??null);return x.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 dJ=[{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"}],fJ={uncategorized:"neutral",personal:"accent",newsletter:"neutral",marketing:"neutral",automated:"neutral",transactional:"positive",social:"warning"};function hJ({open:t,onClose:e,title:n,titleId:r="dialog-title",children:s,className:o,anchor:a="center"}){const u=x.useRef(null),c=x.useCallback(m=>{if(m.key!=="Escape")return;const y=document.activeElement;y instanceof Element&&y.closest("[data-escape-owner]")||(m.preventDefault(),m.stopImmediatePropagation(),e())},[e]);if(x.useEffect(()=>{if(t)return window.addEventListener("keydown",c,!0),()=>window.removeEventListener("keydown",c,!0)},[t,c]),x.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 I.jsxs("div",{className:dt("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:[I.jsx("div",{className:dt("absolute inset-0",!g&&"bg-canvas/80")}),I.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":r,className:dt("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:[I.jsx("h2",{id:r,className:"sr-only",children:n}),s]})]})}const Fy=x.createContext(null);Fy.displayName="PanelGroupContext";const vn={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"},uT=10,Pl=x.useLayoutEffect,EP=D8.useId,pJ=typeof EP=="function"?EP:()=>null;let gJ=0;function cT(t=null){const e=pJ(),n=x.useRef(t||e||null);return n.current===null&&(n.current=""+gJ++),t??n.current}function Q8({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=x.useContext(Fy);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:T,getPanelSize:_,getPanelStyle:R,groupId:M,isPanelCollapsed:N,reevaluatePanelConstraints:O,registerPanel:k,resizePanel:F,unregisterPanel:$}=C,D=cT(a),z=x.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});x.useRef({didLogMissingDefaultSizeWarning:!1}),Pl(()=>{const{callbacks:Y,constraints:te}=z.current,H={...te};z.current.id=D,z.current.idIsFromProps=a!==void 0,z.current.order=m,Y.onCollapse=f,Y.onExpand=h,Y.onResize=g,te.collapsedSize=n,te.collapsible=r,te.defaultSize=s,te.maxSize=u,te.minSize=c,(H.collapsedSize!==te.collapsedSize||H.collapsible!==te.collapsible||H.maxSize!==te.maxSize||H.minSize!==te.minSize)&&O(z.current,H)}),Pl(()=>{const Y=z.current;return k(Y),()=>{$(Y)}},[m,D,k,$]),x.useImperativeHandle(o,()=>({collapse:()=>{w(z.current)},expand:Y=>{T(z.current,Y)},getId(){return D},getSize(){return _(z.current)},isCollapsed(){return N(z.current)},isExpanded(){return!N(z.current)},resize:Y=>{F(z.current,Y)}}),[w,T,_,N,D,F]);const q=R(z.current,s);return x.createElement(S,{...E,children:t,className:e,id:D,style:{...q,...y},[vn.groupId]:M,[vn.panel]:"",[vn.panelCollapsible]:r||void 0,[vn.panelId]:D,[vn.panelSize]:parseFloat(""+q.flexGrow).toFixed(1)})}const J8=x.forwardRef((t,e)=>x.createElement(Q8,{...t,forwardedRef:e}));Q8.displayName="Panel";J8.displayName="forwardRef(Panel)";let n_=null,ev=-1,Ca=null;function mJ(t,e){if(e){const n=(e&s9)!==0,r=(e&o9)!==0,s=(e&i9)!==0,o=(e&a9)!==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 vJ(){Ca!==null&&(document.head.removeChild(Ca),n_=null,Ca=null,ev=-1)}function iS(t,e){var n,r;const s=mJ(t,e);if(n_!==s){if(n_=s,Ca===null&&(Ca=document.createElement("style"),document.head.appendChild(Ca)),ev>=0){var o;(o=Ca.sheet)===null||o===void 0||o.removeRule(ev)}ev=(n=(r=Ca.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function e9(t){return t.type==="keydown"}function t9(t){return t.type.startsWith("pointer")}function n9(t){return t.type.startsWith("mouse")}function zy(t){if(t9(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(n9(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function yJ(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function bJ(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 SJ(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:xP(t),b:xP(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:wP(CP(n.a)),b:wP(CP(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 EJ=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function CJ(t){var e;const n=getComputedStyle((e=r9(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function wJ(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||CJ(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"||EJ.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function CP(t){let e=t.length;for(;e--;){const n=t[e];if(tt(n,"Missing node"),wJ(n))return n}return null}function wP(t){return t&&Number(getComputedStyle(t).zIndex)||0}function xP(t){const e=[];for(;t;)e.push(t),t=r9(t);return e}function r9(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const s9=1,o9=2,i9=4,a9=8,xJ=yJ()==="coarse";let Zs=[],Lc=!1,xl=new Map,jy=new Map;const Ah=new Set;function _J(t,e,n,r,s){var o;const{ownerDocument:a}=e,u={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(o=xl.get(a))!==null&&o!==void 0?o:0;return xl.set(a,c+1),Ah.add(u),Av(),function(){var h;jy.delete(t),Ah.delete(u);const g=(h=xl.get(a))!==null&&h!==void 0?h:1;if(xl.set(a,g-1),Av(),g===1&&xl.delete(a),Zs.includes(u)){const m=Zs.indexOf(u);m>=0&&Zs.splice(m,1),fT(),s("up",!0,null)}}}function AJ(t){const{target:e}=t,{x:n,y:r}=zy(t);Lc=!0,dT({target:e,x:n,y:r}),Av(),Zs.length>0&&(Tv("down",t),t.preventDefault(),l9(e)||t.stopImmediatePropagation())}function aS(t){const{x:e,y:n}=zy(t);if(Lc&&t.buttons===0&&(Lc=!1,Tv("up",t)),!Lc){const{target:r}=t;dT({target:r,x:e,y:n})}Tv("move",t),fT(),Zs.length>0&&t.preventDefault()}function lS(t){const{target:e}=t,{x:n,y:r}=zy(t);jy.clear(),Lc=!1,Zs.length>0&&(t.preventDefault(),l9(e)||t.stopImmediatePropagation()),Tv("up",t),dT({target:e,x:n,y:r}),fT(),Av()}function l9(t){let e=t;for(;e;){if(e.hasAttribute(vn.resizeHandle))return!0;e=e.parentElement}return!1}function dT({target:t,x:e,y:n}){Zs.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ah.forEach(s=>{const{element:o,hitAreaMargins:a}=s,u=o.getBoundingClientRect(),{bottom:c,left:f,right:h,top:g}=u,m=xJ?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)&&SJ(r,o)>0){let S=r,E=!1;for(;S&&!S.contains(o);){if(bJ(S.getBoundingClientRect(),u)){E=!0;break}S=S.parentElement}if(E)return}Zs.push(s)}})}function uS(t,e){jy.set(t,e)}function fT(){let t=!1,e=!1;Zs.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):vJ()}let cS=new AbortController;function Av(){cS.abort(),cS=new AbortController;const t={capture:!0,signal:cS.signal};Ah.size&&(Lc?(Zs.length>0&&xl.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)):xl.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",AJ,t),r.addEventListener("pointermove",aS,t))}))}function Tv(t,e){Ah.forEach(n=>{const{setResizeHandlerState:r}=n,s=Zs.includes(n);r(t,s,e)})}function TJ(){const[t,e]=x.useState(0);return x.useCallback(()=>e(n=>n+1),[])}function tt(t,e){if(!t)throw console.error(e),Error(e)}function $l(t,e,n=uT){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ci(t,e,n=uT){return $l(t,e,n)===0}function os(t,e,n){return $l(t,e,n)===0}function RJ(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 _c({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($l(n,u)<0)if(o){const c=(s+u)/2;$l(n,c)<0?n=s:n=u}else n=u;return n=Math.min(a,n),n=parseFloat(n.toFixed(uT)),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;$l(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;$l(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=_c({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=_c({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(RJ(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=_c({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 T=a[w];tt(T!=null,`Previous layout not found for panel index ${w}`);const _=T+E,R=_c({panelConstraints:n,panelIndex:w,size:_});if(os(T,R)||(E-=R-T,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 IJ({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 Th(t,e=document){return Array.from(e.querySelectorAll(`[${vn.resizeHandleId}][data-panel-group-id="${t}"]`))}function u9(t,e,n=document){const s=Th(t,n).findIndex(o=>o.getAttribute(vn.resizeHandleId)===e);return s??null}function c9(t,e,n){const r=u9(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function d9(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(`[${vn.resizeHandleId}="${t}"]`);return n||null}function OJ(t,e,n,r=document){var s,o,a,u;const c=By(e,r),f=Th(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 NJ({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:a}){x.useRef({didWarnAboutMissingResizeHandle:!1}),Pl(()=>{if(!o)return;const u=Th(n,o);for(let c=0;c<s.length-1;c++){const{valueMax:f,valueMin:h,valueNow:g}=IJ({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]),x.useEffect(()=>{if(!o)return;const u=e.current;tt(u,"Eager values not found");const{panelDataArray:c}=u,f=d9(n,o);tt(f!=null,`No group found for id "${n}"`);const h=Th(n,o);tt(h,`No resize handles found for group id "${n}"`);const g=h.map(m=>{const y=m.getAttribute(vn.resizeHandleId);tt(y,"Resize handle element has no handle id attribute");const[S,E]=OJ(n,y,c,o);if(S==null||E==null)return()=>{};const C=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const T=c.findIndex(_=>_.id===S);if(T>=0){const _=c[T];tt(_,`No panel data found for index ${T}`);const R=r[T],{collapsedSize:M=0,collapsible:N,minSize:O=0}=_.constraints;if(R!=null&&N){const k=Zf({delta:os(R,M)?O-M:M-R,initialLayout:r,panelConstraints:c.map(F=>F.constraints),pivotIndices:c9(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 _P(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 f9(t,e){const n=t==="horizontal",{x:r,y:s}=zy(e);return n?r:s}function MJ(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(vn.groupId);tt(u,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const f=f9(n,t),h=d9(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 PJ(t,e,n,r,s,o){if(e9(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:MJ(t,e,n,r,o)}function kJ({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 tc(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||ci(g,f))&&!ci(r,f)&&y(),m&&(g==null||!ci(g,f))&&ci(r,f)&&m())}})}function Kg(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 DJ({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 LJ(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function AP(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 h9(t){return`react-resizable-panels:${t}`}function p9(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 g9(t,e){try{const n=h9(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function UJ(t,e,n){var r,s;const o=(r=g9(t,n))!==null&&r!==void 0?r:{},a=p9(e);return(s=o[a])!==null&&s!==void 0?s:null}function FJ(t,e,n,r,s){var o;const a=h9(t),u=p9(e),c=(o=g9(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 TP({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=_c({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=_c({panelConstraints:e,panelIndex:o,size:u});if(a!==c&&(s-=c-a,n[o]=c,os(s,0)))break}return n}const zJ=100,Xf={getItem:t=>(AP(Xf),Xf.getItem(t)),setItem:(t,e)=>{AP(Xf),Xf.setItem(t,e)}},RP={};function m9({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=cT(o),y=x.useRef(null),[S,E]=x.useState(null),[C,w]=x.useState([]),T=TJ(),_=x.useRef({}),R=x.useRef(new Map),M=x.useRef(0),N=x.useRef({autoSaveId:t,direction:r,dragState:S,id:m,keyboardResizeBy:u,onLayout:a,storage:c}),O=x.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});x.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),x.useImperativeHandle(s,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:K}=O.current;return K},setLayout:K=>{const{onLayout:J}=N.current,{layout:oe,panelDataArray:he}=O.current,ue=TP({layout:K,panelConstraints:he.map(ve=>ve.constraints)});_P(oe,ue)||(w(ue),O.current.layout=ue,J&&J(ue),tc(he,ue,_.current))}}),[]),Pl(()=>{N.current.autoSaveId=t,N.current.direction=r,N.current.dragState=S,N.current.id=m,N.current.onLayout=a,N.current.storage=c}),NJ({committedValuesRef:N,eagerValuesRef:O,groupId:m,layout:C,panelDataArray:O.current.panelDataArray,setLayout:w,panelGroupElement:y.current}),x.useEffect(()=>{const{panelDataArray:K}=O.current;if(t){if(C.length===0||C.length!==K.length)return;let J=RP[t];J==null&&(J=LJ(FJ,zJ),RP[t]=J);const oe=[...K],he=new Map(R.current);J(t,oe,he,C,c)}},[t,C,c]),x.useEffect(()=>{});const k=x.useCallback(K=>{const{onLayout:J}=N.current,{layout:oe,panelDataArray:he}=O.current;if(K.constraints.collapsible){const ue=he.map(Ee=>Ee.constraints),{collapsedSize:ve=0,panelSize:_e,pivotIndices:Xe}=bl(he,K,oe);if(tt(_e!=null,`Panel size not found for panel "${K.id}"`),!ci(_e,ve)){R.current.set(K.id,_e);const gt=mc(he,K)===he.length-1?_e-ve:ve-_e,Ce=Zf({delta:gt,initialLayout:oe,panelConstraints:ue,pivotIndices:Xe,prevLayout:oe,trigger:"imperative-api"});Kg(oe,Ce)||(w(Ce),O.current.layout=Ce,J&&J(Ce),tc(he,Ce,_.current))}}},[]),F=x.useCallback((K,J)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=O.current;if(K.constraints.collapsible){const ve=ue.map(je=>je.constraints),{collapsedSize:_e=0,panelSize:Xe=0,minSize:Ee=0,pivotIndices:gt}=bl(ue,K,he),Ce=J??Ee;if(ci(Xe,_e)){const je=R.current.get(K.id),Be=je!=null&&je>=Ce?je:Ce,gr=mc(ue,K)===ue.length-1?Xe-Be:Be-Xe,Ct=Zf({delta:gr,initialLayout:he,panelConstraints:ve,pivotIndices:gt,prevLayout:he,trigger:"imperative-api"});Kg(he,Ct)||(w(Ct),O.current.layout=Ct,oe&&oe(Ct),tc(ue,Ct,_.current))}}},[]),$=x.useCallback(K=>{const{layout:J,panelDataArray:oe}=O.current,{panelSize:he}=bl(oe,K,J);return tt(he!=null,`Panel size not found for panel "${K.id}"`),he},[]),D=x.useCallback((K,J)=>{const{panelDataArray:oe}=O.current,he=mc(oe,K);return DJ({defaultSize:J,dragState:S,layout:C,panelData:oe,panelIndex:he})},[S,C]),z=x.useCallback(K=>{const{layout:J,panelDataArray:oe}=O.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=bl(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),ue===!0&&ci(ve,he)},[]),q=x.useCallback(K=>{const{layout:J,panelDataArray:oe}=O.current,{collapsedSize:he=0,collapsible:ue,panelSize:ve}=bl(oe,K,J);return tt(ve!=null,`Panel size not found for panel "${K.id}"`),!ue||$l(ve,he)>0},[]),Y=x.useCallback(K=>{const{panelDataArray:J}=O.current;J.push(K),J.sort((oe,he)=>{const ue=oe.order,ve=he.order;return ue==null&&ve==null?0:ue==null?-1:ve==null?1:ue-ve}),O.current.panelDataArrayChanged=!0,T()},[T]);Pl(()=>{if(O.current.panelDataArrayChanged){O.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:oe}=N.current,{layout:he,panelDataArray:ue}=O.current;let ve=null;if(K){const Xe=UJ(K,ue,oe);Xe&&(R.current=new Map(Object.entries(Xe.expandToSizes)),ve=Xe.layout)}ve==null&&(ve=kJ({panelDataArray:ue}));const _e=TP({layout:ve,panelConstraints:ue.map(Xe=>Xe.constraints)});_P(he,_e)||(w(_e),O.current.layout=_e,J&&J(_e),tc(ue,_e,_.current))}}),Pl(()=>{const K=O.current;return()=>{K.layout=[]}},[]);const te=x.useCallback(K=>{let J=!1;const oe=y.current;return oe&&window.getComputedStyle(oe,null).getPropertyValue("direction")==="rtl"&&(J=!0),function(ue){ue.preventDefault();const ve=y.current;if(!ve)return()=>null;const{direction:_e,dragState:Xe,id:Ee,keyboardResizeBy:gt,onLayout:Ce}=N.current,{layout:je,panelDataArray:Be}=O.current,{initialLayout:$e}=Xe??{},gr=c9(Ee,K,ve);let Ct=PJ(ue,K,_e,Xe,gt,ve);const Gr=_e==="horizontal";Gr&&J&&(Ct=-Ct);const Yn=Be.map(Rr=>Rr.constraints),Tr=Zf({delta:Ct,initialLayout:$e??je,panelConstraints:Yn,pivotIndices:gr,prevLayout:je,trigger:e9(ue)?"keyboard":"mouse-or-touch"}),no=!Kg(je,Tr);(t9(ue)||n9(ue))&&M.current!=Ct&&(M.current=Ct,!no&&Ct!==0?Gr?uS(K,Ct<0?s9:o9):uS(K,Ct<0?i9:a9):uS(K,0)),no&&(w(Tr),O.current.layout=Tr,Ce&&Ce(Tr),tc(Be,Tr,_.current))}},[]),H=x.useCallback((K,J)=>{const{onLayout:oe}=N.current,{layout:he,panelDataArray:ue}=O.current,ve=ue.map(je=>je.constraints),{panelSize:_e,pivotIndices:Xe}=bl(ue,K,he);tt(_e!=null,`Panel size not found for panel "${K.id}"`);const gt=mc(ue,K)===ue.length-1?_e-J:J-_e,Ce=Zf({delta:gt,initialLayout:he,panelConstraints:ve,pivotIndices:Xe,prevLayout:he,trigger:"imperative-api"});Kg(he,Ce)||(w(Ce),O.current.layout=Ce,oe&&oe(Ce),tc(ue,Ce,_.current))},[]),ee=x.useCallback((K,J)=>{const{layout:oe,panelDataArray:he}=O.current,{collapsedSize:ue=0,collapsible:ve}=J,{collapsedSize:_e=0,collapsible:Xe,maxSize:Ee=100,minSize:gt=0}=K.constraints,{panelSize:Ce}=bl(he,K,oe);Ce!=null&&(ve&&Xe&&ci(Ce,ue)?ci(ue,_e)||H(K,_e):Ce<gt?H(K,gt):Ce>Ee&&H(K,Ee))},[H]),de=x.useCallback((K,J)=>{const{direction:oe}=N.current,{layout:he}=O.current;if(!y.current)return;const ue=By(K,y.current);tt(ue,`Drag handle element not found for id "${K}"`);const ve=f9(oe,J);E({dragHandleId:K,dragHandleRect:ue.getBoundingClientRect(),initialCursorPosition:ve,initialLayout:he})},[]),ce=x.useCallback(()=>{E(null)},[]),xe=x.useCallback(K=>{const{panelDataArray:J}=O.current,oe=mc(J,K);oe>=0&&(J.splice(oe,1),delete _.current[K.id],O.current.panelDataArrayChanged=!0,T())},[T]),L=x.useMemo(()=>({collapsePanel:k,direction:r,dragState:S,expandPanel:F,getPanelSize:$,getPanelStyle:D,groupId:m,isPanelCollapsed:z,isPanelExpanded:q,reevaluatePanelConstraints:ee,registerPanel:Y,registerResizeHandle:te,resizePanel:H,startDragging:de,stopDragging:ce,unregisterPanel:xe,panelGroupElement:y.current}),[k,S,r,F,$,D,m,z,q,ee,Y,te,H,de,ce,xe]),V={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return x.createElement(Fy.Provider,{value:L},x.createElement(h,{...g,children:e,className:n,id:o,ref:y,style:{...V,...f},[vn.group]:"",[vn.groupDirection]:r,[vn.groupId]:m}))}const v9=x.forwardRef((t,e)=>x.createElement(m9,{...t,forwardedRef:e}));m9.displayName="PanelGroup";v9.displayName="forwardRef(PanelGroup)";function mc(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function bl(t,e,n){const r=mc(t,e),o=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:o}}function jJ({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){x.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(vn.groupId);tt(u,`No group element found for id "${u}"`);const c=Th(u,r),f=u9(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 y9({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=x.useRef(null),T=x.useRef({onClick:a,onDragging:u,onPointerDown:f,onPointerUp:h});x.useEffect(()=>{T.current.onClick=a,T.current.onDragging=u,T.current.onPointerDown=f,T.current.onPointerUp=h});const _=x.useContext(Fy);if(_===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:N,startDragging:O,stopDragging:k,panelGroupElement:F}=_,$=cT(s),[D,z]=x.useState("inactive"),[q,Y]=x.useState(!1),[te,H]=x.useState(null),ee=x.useRef({state:D});Pl(()=>{ee.current.state=D}),x.useEffect(()=>{if(n)H(null);else{const L=N($);H(()=>L)}},[n,$,N]);const de=(E=r?.coarse)!==null&&E!==void 0?E:15,ce=(C=r?.fine)!==null&&C!==void 0?C:5;x.useEffect(()=>{if(n||te==null)return;const L=w.current;tt(L,"Element ref not attached");let V=!1;return _J($,L,R,{coarse:de,fine:ce},(J,oe,he)=>{if(!oe){z("inactive");return}switch(J){case"down":{z("drag"),V=!1,tt(he,'Expected event to be defined for "down" action'),O($,he);const{onDragging:ue,onPointerDown:ve}=T.current;ue?.(!0),ve?.();break}case"move":{const{state:ue}=ee.current;V=!0,ue!=="drag"&&z("hover"),tt(he,'Expected event to be defined for "move" action'),te(he);break}case"up":{z("hover"),k();const{onClick:ue,onDragging:ve,onPointerUp:_e}=T.current;ve?.(!1),_e?.(),V||ue?.();break}}})},[de,R,n,ce,N,$,te,O,k]),jJ({disabled:n,handleId:$,resizeHandler:te,panelGroupElement:F});const xe={touchAction:"none",userSelect:"none"};return x.createElement(y,{...S,children:t,className:e,id:s,onBlur:()=>{Y(!1),o?.()},onFocus:()=>{Y(!0),c?.()},ref:w,role:"separator",style:{...xe,...g},tabIndex:m,[vn.groupDirection]:R,[vn.groupId]:M,[vn.resizeHandle]:"",[vn.resizeHandleActive]:D==="drag"?"pointer":q?"keyboard":void 0,[vn.resizeHandleEnabled]:!n,[vn.resizeHandleId]:$,[vn.resizeHandleState]:D})}y9.displayName="PanelResizeHandle";function IP({className:t,...e}){return I.jsx(v9,{className:dt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}const If=J8;function dS({className:t,...e}){return I.jsx(y9,{className:dt("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 b9=x.createContext(null);function zRe(){return x.useContext(b9)}function jRe({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]=cJ(m),T=uJ(w??0),_=T.nav,R=T.reading&&!!n,M=T.intelligence,[N,O]=x.useState(!1),k=y!==void 0,F=k?y:N,$=()=>{k||O(!0),S?.()},D=()=>{k||O(!1),E?.()},z=M&&s&&o&&!!r,q={panes:T,containerWidth:w,showNavPane:_,openNav:$,showReadingPane:R,showIntelligencePane:M},Y=I.jsxs(IP,{direction:"horizontal",className:"min-h-0 flex-1",children:[I.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&&I.jsxs(I.Fragment,{children:[I.jsx(dS,{}),I.jsx(If,{id:"reading",order:2,minSize:29,className:"min-w-0",children:n})]}),z&&I.jsxs(I.Fragment,{children:[I.jsx(dS,{}),I.jsx(If,{id:"intelligence",order:3,defaultSize:25,minSize:18,maxSize:39,className:"min-w-0",children:r})]})]}),te=I.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[c,!_&&u&&I.jsx("div",{className:"shrink-0",children:u}),Y]});return I.jsx(b9.Provider,{value:q,children:I.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:I.jsxs(I.Fragment,{children:[_?I.jsxs(IP,{direction:"horizontal",className:"min-h-0 flex-1",children:[I.jsx(If,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:t}),I.jsx(dS,{}),I.jsx(If,{id:"content",order:2,className:"flex min-w-0 flex-col",children:te})]}):te,!_&&I.jsx(hJ,{open:F,onClose:D,title:"Folders",anchor:"left",children:t}),f]})})})}const S9="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",E9={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"},C9={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"};function as({variant:t="primary",size:e="md",icon:n,className:r,children:s,...o}){return I.jsxs("button",{type:"button",className:dt(S9,E9[t],C9[e],r),...o,children:[n,s]})}function BRe({variant:t="primary",size:e="md",icon:n,external:r,className:s,children:o,...a}){return I.jsxs("a",{className:dt(S9,E9[t],C9[e],s),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,o]})}const BJ={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"},HJ={neutral:"bg-fg-subtle",accent:"bg-accent-2",positive:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function OP({tone:t="neutral",dot:e,className:n,children:r,...s}){return I.jsxs("span",{className:dt("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-2xs font-medium",BJ[t],n),...s,children:[e&&I.jsx("span",{className:dt("size-1.5 rounded-full",HJ[t])}),r]})}const HRe={"data-list-row":""},$J="[data-list-row]";function qJ(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 NP(t,e){return Array.from(t.querySelectorAll(e))}function WJ({containerRef:t,itemSelector:e,orientation:n="vertical",enabled:r=!0}){x.useEffect(()=>{if(!r)return;const s=t.current;if(!s)return;const o=()=>{const u=NP(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=NP(s,e),f=c.indexOf(document.activeElement),h=qJ(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 MP=10;function VJ({section:t,Row:e,selectedThreadId:n,initialExpanded:r=!1,initialCollapsed:s=!1,onSelectThread:o}){const[a,u]=x.useState(r),[c,f]=x.useState(s),h=t.threads.length>MP,m=!a&&h?t.threads.slice(0,MP):t.threads,y=t.threads.length-m.length;return I.jsxs("div",{children:[t.label&&I.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:[I.jsx("span",{className:"flex-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),I.jsx("span",{className:"text-2xs text-fg-subtle tabular-nums",children:t.threads.length}),I.jsx(Jx,{className:dt("size-3 shrink-0 text-fg-subtle transition-transform duration-200",c?"rotate-0":"rotate-180")})]}),!c&&I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"divide-y divide-line",children:m.map(S=>I.jsx(e,{thread:S,active:S.id===n,onClick:()=>o?.(S.id)},S.id))}),h&&I.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&&I.jsx(Jx,{className:"ml-1 size-3"})]})]})]})}function GJ(t){return t.target!==t.currentTarget?!1:t.key==="Enter"||t.key===" "}function KJ({className:t}){return I.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:I.jsx("path",{d:"M2 4l4 4 4-4"})})}function PP({className:t}){return I.jsx("svg",{viewBox:"0 0 12 12",className:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:I.jsx("path",{d:"M3 3l6 6M9 3l-6 6"})})}function YJ({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]=x.useState(!1),C=y?a:S,w=x.useCallback(te=>{y||E(te),g?.(te)},[y,g]),T=t[0],_=T!==void 0&&s===T.id,R=n?.[0],M=n?.find(te=>te.active),N=R===void 0||M?.id===R.id,O=!_||o.size>0||!N&&!!M,k=x.useCallback(()=>{R&&c?.(R.id)},[R,c]),F=x.useCallback(()=>{h(),k()},[h,k]),$=t.find(te=>te.id===s),D=O?I.jsxs(I.Fragment,{children:[!N&&M&&I.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}),!_&&$&&I.jsx(OP,{tone:$.tone??"neutral",children:$.label}),e.filter(te=>o.has(te.id)).map(te=>I.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:te.label},te.id))]}):I.jsx("span",{className:"text-2xs text-fg-subtle",children:"Filters"}),z=n&&n.length>1&&I.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(te=>I.jsxs("button",{type:"button",onClick:()=>c?.(te.id),className:dt("flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",te.active?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:[te.label,te.count!=null&&te.count>0&&I.jsx("span",{className:"tabular-nums opacity-70",children:te.count})]},te.id)),r&&I.jsx("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:r})]}),q=I.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(te=>{const H=s===te.id;return I.jsx("button",{type:"button",onClick:()=>u(te.id),className:dt("shrink-0 rounded-full transition-opacity",H?"opacity-100 ring-1 ring-accent-2":"opacity-60 hover:opacity-100"),children:I.jsx(OP,{tone:te.tone??"neutral",children:te.label})},te.id)})}),Y=I.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(te=>{const H=o.has(te.id);return I.jsx("button",{type:"button",onClick:()=>f(te.id),className:dt("shrink-0 rounded-full border px-2.5 py-0.5 text-2xs transition-colors",H?"border-accent-2 bg-accent-2-soft font-medium text-accent-2":"border-line text-fg-muted hover:border-line-strong"),children:te.label},te.id)}),O&&I.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:[I.jsx(PP,{className:"size-3"}),"Clear"]})]});return I.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[I.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":C,"aria-label":C?"Collapse filters":"Expand filters",onClick:()=>w(!C),onKeyDown:te=>{GJ(te)&&(te.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,O&&I.jsx("button",{type:"button","aria-label":"Clear filters",onClick:te=>{te.stopPropagation(),F()},className:"flex size-6 items-center justify-center text-fg-subtle hover:text-fg-muted",children:I.jsx(PP,{className:"size-3"})}),I.jsx(KJ,{className:dt("ml-auto size-3 shrink-0 text-fg-subtle transition-transform duration-200",C?"rotate-180":"rotate-0")})]}),C&&I.jsxs("div",{className:"shrink-0",children:[z,q,Y]}),I.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 w9=[{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}],XJ=w9.map(({id:t,label:e})=>({id:t,label:e}));function $Re({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]=x.useState(new Set),[y,S]=x.useState(f),E=x.useRef(null);WJ({containerRef:E,itemSelector:$J,enabled:h});const C=D=>{m(z=>{const q=new Set(z);return q.has(D)?q.delete(D):q.add(D),q})},w=w9.filter(D=>g.has(D.id)),T=D=>(e==="all"||D.category===e)&&w.every(z=>z.match(D)),_=e==="all",R=t.map(D=>({...D,threads:D.threads.filter(T)})).filter(D=>D.threads.length>0),M=t.flatMap(D=>D.threads).filter(T),N=dJ.map(D=>({id:D.id,label:D.label,tone:D.id==="all"?"neutral":fJ[D.id]})),O=XJ,k=()=>{o?.("all"),m(new Set)},F=_?R.length===0:M.length===0,$=I.jsxs("div",{ref:E,children:[_?R.map(D=>I.jsx(VJ,{section:D,Row:r,selectedThreadId:n,onSelectThread:s},D.id)):I.jsx("div",{className:"divide-y divide-line",children:M.map(D=>I.jsx(r,{thread:D,active:D.id===n,onClick:()=>s?.(D.id)},D.id))}),F&&I.jsx("div",{className:"px-row-inset py-6 text-center text-2xs text-fg-subtle",children:"No threads match these filters."})]});return I.jsx(YJ,{categories:N,filters:O,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:$})}const r_={Default:"bg-fg-subtle",Red:"bg-red-500",Orange:"bg-orange-500",Yellow:"bg-yellow-500",Green:"bg-green-500",Teal:"bg-teal-500",Blue:"bg-blue-500",Purple:"bg-purple-500",Gray:"bg-gray-500"},qRe=["Default","Red","Orange","Yellow","Green","Teal","Blue","Purple","Gray"],QJ=t=>Object.hasOwn(r_,t);function JJ({label:t,onRemove:e,className:n}){const r=QJ(t.color)?r_[t.color]:r_.Default;return I.jsxs("span",{className:dt("inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted shrink-0",n),children:[I.jsx("span",{className:dt("size-1.5 shrink-0 rounded-full",r)}),I.jsx("span",{className:"truncate",children:t.name}),e&&I.jsx("button",{type:"button",onClick:()=>e(t.labelId),"aria-label":`Remove label ${t.name}`,className:"ml-0.5 rounded-full text-fg-subtle hover:text-fg",children:"×"})]})}const eee={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"},tee={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"},nee={info:"status",success:"status",warning:"alert",danger:"alert"};function s_({tone:t="info",variant:e="framed",onDismiss:n,role:r,className:s,children:o,...a}){const u=e==="soft";return I.jsxs("div",{role:r??nee[t],className:dt("flex gap-2 px-3 py-2 text-sm",u?dt("items-start rounded-md",tee[t]):dt("items-center border",eee[t]),s),...a,children:[I.jsx("div",{className:"flex-1 min-w-0",children:o}),n&&(u?I.jsx(as,{variant:"ghost",size:"sm",icon:I.jsx(La,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):I.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:I.jsx(La,{className:"size-4","aria-hidden":"true"})}))]})}function kP(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 ree(t){if(Array.isArray(t))return t}function see(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 oee(){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 iee(t,e){return ree(t)||see(t,e)||aee(t,e)||oee()}function aee(t,e){if(t){if(typeof t=="string")return kP(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)?kP(t,e):void 0}}const x9=Object.entries,DP=Object.setPrototypeOf,lee=Object.isFrozen,uee=Object.getPrototypeOf,cee=Object.getOwnPropertyDescriptor;let sr=Object.freeze,ir=Object.seal,vc=Object.create,_9=typeof Reflect<"u"&&Reflect,o_=_9.apply,i_=_9.construct;sr||(sr=function(e){return e});ir||(ir=function(e){return e});o_||(o_=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)});i_||(i_=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 nc=Rn(Array.prototype.forEach),dee=Rn(Array.prototype.lastIndexOf),LP=Rn(Array.prototype.pop),rc=Rn(Array.prototype.push),fee=Rn(Array.prototype.splice),wa=Array.isArray,Qf=Rn(String.prototype.toLowerCase),fS=Rn(String.prototype.toString),UP=Rn(String.prototype.match),Of=Rn(String.prototype.replace),FP=Rn(String.prototype.indexOf),hee=Rn(String.prototype.trim),pee=Rn(Number.prototype.toString),gee=Rn(Boolean.prototype.toString),zP=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),jP=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),$n=Rn(Object.prototype.hasOwnProperty),Nf=Rn(Object.prototype.toString),Bn=Rn(RegExp.prototype.test),Sl=mee(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 o_(t,e,r)}}function mee(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return i_(t,n)}}function vt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qf;if(DP&&DP(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&&(lee(e)||(e[r]=o),s=o)}t[s]=!0}return t}function vee(t){for(let e=0;e<t.length;e++)$n(t,e)||(t[e]=null);return t}function Sr(t){const e=vc(null);for(const r of x9(t)){var n=iee(r,2);const s=n[0],o=n[1];$n(t,s)&&(wa(o)?e[s]=vee(o):o&&typeof o=="object"&&o.constructor===Object?e[s]=Sr(o):e[s]=o)}return e}function yee(t){switch(typeof t){case"string":return t;case"number":return pee(t);case"boolean":return gee(t);case"bigint":return zP?zP(t):"0";case"symbol":return jP?jP(t):"Symbol()";case"undefined":return Nf(t);case"function":case"object":{if(t===null)return Nf(t);const e=t,n=vo(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 vo(t,e){for(;t!==null;){const r=cee(t,e);if(r){if(r.get)return Rn(r.get);if(typeof r.value=="function")return Rn(r.value)}t=uee(t)}function n(){return null}return n}function bee(t){try{return Bn(t,""),!0}catch{return!1}}const BP=sr(["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=sr(["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=sr(["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"]),See=sr(["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=sr(["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"]),Eee=sr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),HP=sr(["#text"]),$P=sr(["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=sr(["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"]),qP=sr(["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"]),Yg=sr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cee=ir(/{{[\w\W]*|^[\w\W]*}}/g),wee=ir(/<%[\w\W]*|^[\w\W]*%>/g),xee=ir(/\${[\w\W]*/g),_ee=ir(/^data-[\-\w.\u00B7-\uFFFF]+$/),Aee=ir(/^aria-[\-\w]+$/),WP=ir(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tee=ir(/^(?:\w+script|data):/i),Ree=ir(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Iee=ir(/^html$/i),Oee=ir(/^[a-z][.\w]*(-[.\w]+)+$/i),VP=ir(/<[/\w!]/g),GP=ir(/<[/\w]/g),Nee=ir(/<\/no(script|embed|frames)/i),Mee=ir(/\/>/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},Pee=function(){return typeof window>"u"?null:window},kee=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}},KP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ha=function(e,n,r,s){return $n(e,n)&&wa(e[n])?vt(s.base?Sr(s.base):{},e[n],s.transform):r};function A9(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pee();const e=pe=>A9(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=vo(m,"cloneNode"),S=vo(m,"remove"),E=vo(m,"nextSibling"),C=vo(m,"childNodes"),w=vo(m,"parentNode"),T=vo(m,"shadowRoot"),_=vo(m,"attributes"),R=a&&a.prototype?vo(a.prototype,"nodeType"):null,M=a&&a.prototype?vo(a.prototype,"nodeName"):null;if(typeof o=="function"){const pe=n.createElement("template");pe.content&&pe.content.ownerDocument&&(n=pe.content.ownerDocument)}let N,O="",k,F=!1,$=0;const D=function(){if($>0)throw Sl('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(),$++;try{return N.createHTML(U)}finally{$--}},q=function(U){D(),$++;try{return N.createScriptURL(U)}finally{$--}},Y=function(){return F||(k=kee(g,s),F=!0),k},te=n,H=te.implementation,ee=te.createNodeIterator,de=te.createDocumentFragment,ce=te.getElementsByTagName,xe=r.importNode;let L=KP();e.isSupported=typeof x9=="function"&&typeof w=="function"&&H&&H.createHTMLDocument!==void 0;const V=Cee,K=wee,J=xee,oe=_ee,he=Aee,ue=Tee,ve=Ree,_e=Oee;let Xe=WP,Ee=null;const gt=vt({},[...BP,...hS,...pS,...gS,...HP]);let Ce=null;const je=vt({},[...$P,...mS,...qP,...Yg]);let Be=Object.seal(vc(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}})),$e=null,gr=null;const Ct=Object.seal(vc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Gr=!0,Yn=!0,Tr=!1,no=!0,Rr=!1,Gt=!0,mt=!1,yn=!1,Ir=null,ro=null,Cd=!1,Lo=!1,vu=!1,yu=!1,Pi=!0,ur=!1;const ks="user-content-";let Zn=!0,wd=!1,ki={},gs=null;const Di=vt({},["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 Za=null;const Xa=vt({},["audio","video","img","source","image","track"]);let Ds=null;const Qa=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),so="http://www.w3.org/1998/Math/MathML",bu="http://www.w3.org/2000/svg",Kr="http://www.w3.org/1999/xhtml";let oo=Kr,Uo=!1,xd=null;const wp=vt({},[so,bu,Kr],fS),_d=sr(["mi","mo","mn","ms","mtext"]);let Su=vt({},_d);const Eu=sr(["annotation-xml"]);let Ja=vt({},Eu);const xp=vt({},["title","style","font","a","script"]);let Li=null;const io=["application/xhtml+xml","text/html"],On="text/html";let nt=null,Yr=null;const Ad=n.createElement("form"),_p=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=io.indexOf(U.PARSER_MEDIA_TYPE)===-1?On:U.PARSER_MEDIA_TYPE,nt=Li==="application/xhtml+xml"?fS:Qf,Ee=ha(U,"ALLOWED_TAGS",gt,{transform:nt}),Ce=ha(U,"ALLOWED_ATTR",je,{transform:nt}),xd=ha(U,"ALLOWED_NAMESPACES",wp,{transform:fS}),Ds=ha(U,"ADD_URI_SAFE_ATTR",Qa,{transform:nt,base:Qa}),Za=ha(U,"ADD_DATA_URI_TAGS",Xa,{transform:nt,base:Xa}),gs=ha(U,"FORBID_CONTENTS",Di,{transform:nt}),$e=ha(U,"FORBID_TAGS",Sr({}),{transform:nt}),gr=ha(U,"FORBID_ATTR",Sr({}),{transform:nt}),ki=$n(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,Yn=U.ALLOW_DATA_ATTR!==!1,Tr=U.ALLOW_UNKNOWN_PROTOCOLS||!1,no=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Rr=U.SAFE_FOR_TEMPLATES||!1,Gt=U.SAFE_FOR_XML!==!1,mt=U.WHOLE_DOCUMENT||!1,Lo=U.RETURN_DOM||!1,vu=U.RETURN_DOM_FRAGMENT||!1,yu=U.RETURN_TRUSTED_TYPE||!1,Cd=U.FORCE_BODY||!1,Pi=U.SANITIZE_DOM!==!1,ur=U.SANITIZE_NAMED_PROPS||!1,Zn=U.KEEP_CONTENT!==!1,wd=U.IN_PLACE||!1,Xe=bee(U.ALLOWED_URI_REGEXP)?U.ALLOWED_URI_REGEXP:WP,oo=typeof U.NAMESPACE=="string"?U.NAMESPACE:Kr,Su=$n(U,"MATHML_TEXT_INTEGRATION_POINTS")&&U.MATHML_TEXT_INTEGRATION_POINTS&&typeof U.MATHML_TEXT_INTEGRATION_POINTS=="object"?Sr(U.MATHML_TEXT_INTEGRATION_POINTS):vt({},_d),Ja=$n(U,"HTML_INTEGRATION_POINTS")&&U.HTML_INTEGRATION_POINTS&&typeof U.HTML_INTEGRATION_POINTS=="object"?Sr(U.HTML_INTEGRATION_POINTS):vt({},Eu);const Z=$n(U,"CUSTOM_ELEMENT_HANDLING")&&U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING=="object"?Sr(U.CUSTOM_ELEMENT_HANDLING):vc(null);if(Be=vc(null),$n(Z,"tagNameCheck")&&_p(Z.tagNameCheck)&&(Be.tagNameCheck=Z.tagNameCheck),$n(Z,"attributeNameCheck")&&_p(Z.attributeNameCheck)&&(Be.attributeNameCheck=Z.attributeNameCheck),$n(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(Be.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),ir(Be),Rr&&(Yn=!1),vu&&(Lo=!0),ki&&(Ee=vt({},HP),Ce=vc(null),ki.html===!0&&(vt(Ee,BP),vt(Ce,$P)),ki.svg===!0&&(vt(Ee,hS),vt(Ce,mS),vt(Ce,Yg)),ki.svgFilters===!0&&(vt(Ee,pS),vt(Ce,mS),vt(Ce,Yg)),ki.mathMl===!0&&(vt(Ee,gS),vt(Ce,qP),vt(Ce,Yg))),Ct.tagCheck=null,Ct.attributeCheck=null,$n(U,"ADD_TAGS")&&(typeof U.ADD_TAGS=="function"?Ct.tagCheck=U.ADD_TAGS:wa(U.ADD_TAGS)&&(Ee===gt&&(Ee=Sr(Ee)),vt(Ee,U.ADD_TAGS,nt))),$n(U,"ADD_ATTR")&&(typeof U.ADD_ATTR=="function"?Ct.attributeCheck=U.ADD_ATTR:wa(U.ADD_ATTR)&&(Ce===je&&(Ce=Sr(Ce)),vt(Ce,U.ADD_ATTR,nt))),$n(U,"ADD_URI_SAFE_ATTR")&&wa(U.ADD_URI_SAFE_ATTR)&&vt(Ds,U.ADD_URI_SAFE_ATTR,nt),$n(U,"FORBID_CONTENTS")&&wa(U.FORBID_CONTENTS)&&(gs===Di&&(gs=Sr(gs)),vt(gs,U.FORBID_CONTENTS,nt)),$n(U,"ADD_FORBID_CONTENTS")&&wa(U.ADD_FORBID_CONTENTS)&&(gs===Di&&(gs=Sr(gs)),vt(gs,U.ADD_FORBID_CONTENTS,nt)),Zn&&(Ee["#text"]=!0),mt&&vt(Ee,["html","head","body"]),Ee.table&&(vt(Ee,["tbody"]),delete $e.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Sl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Sl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=N;N=U.TRUSTED_TYPES_POLICY;try{O=z("")}catch(Te){throw N=fe,Te}}else U.TRUSTED_TYPES_POLICY===null?(N=void 0,O=""):(N===void 0&&(N=Y()),N&&typeof O=="string"&&(O=z("")));sr&&sr(U),Yr=U},Rd=vt({},[...hS,...pS,...See]),Ui=vt({},[...gS,...Eee]),Id=function(U,Z,fe){return Z.namespaceURI===Kr?U==="svg":Z.namespaceURI===so?U==="svg"&&(fe==="annotation-xml"||Su[fe]):!!Rd[U]},Fi=function(U,Z,fe){return Z.namespaceURI===Kr?U==="math":Z.namespaceURI===bu?U==="math"&&Ja[fe]:!!Ui[U]},zi=function(U,Z,fe){return Z.namespaceURI===bu&&!Ja[fe]||Z.namespaceURI===so&&!Su[fe]?!1:!Ui[U]&&(xp[U]||!Rd[U])},el=function(U){let Z=w(U);(!Z||!Z.tagName)&&(Z={namespaceURI:oo,tagName:"template"});const fe=Qf(U.tagName),Te=Qf(Z.tagName);return xd[U.namespaceURI]?U.namespaceURI===bu?Id(fe,Z,Te):U.namespaceURI===so?Fi(fe,Z,Te):U.namespaceURI===Kr?zi(fe,Z,Te):!!(Li==="application/xhtml+xml"&&xd[U.namespaceURI]):!1},mr=function(U){rc(e.removed,{element:U});try{w(U).removeChild(U)}catch{if(S(U),!w(U))throw Sl("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},un=function(U){Ls(U);const Z=C(U);if(Z){const Te=[];nc(Z,De=>{rc(Te,De)}),nc(Te,De=>{try{S(De)}catch{}})}const fe=_(U);if(fe)for(let Te=fe.length-1;Te>=0;--Te){const De=fe[Te],Fe=De&&De.name;if(typeof Fe=="string")try{U.removeAttribute(Fe)}catch{}}},ao=function(U,Z){try{rc(e.removed,{attribute:Z.getAttributeNode(U),from:Z})}catch{rc(e.removed,{attribute:null,from:Z})}if(Z.removeAttribute(U),U==="is")if(Lo||vu)try{mr(Z)}catch{}else try{Z.setAttribute(U,"")}catch{}},Ap=function(U){const Z=_(U);if(Z)for(let fe=Z.length-1;fe>=0;--fe){const Te=Z[fe],De=Te&&Te.name;if(!(typeof De!="string"||Ce[nt(De)]))try{U.removeAttribute(De)}catch{}}},Ls=function(U){const Z=[U];for(;Z.length>0;){const fe=Z.pop();(R?R(fe):fe.nodeType)===rs.element&&Ap(fe);const De=C(fe);if(De)for(let Fe=De.length-1;Fe>=0;--Fe)Z.push(De[Fe])}},ji=function(U){if(!Gt)return;const Z=[U];for(;Z.length>0;){const fe=Z.pop(),Te=R?R(fe):fe.nodeType;if(Te===rs.processingInstruction||Te===rs.comment&&Bn(GP,fe.data)){try{S(fe)}catch{}continue}if(Te===rs.element){const Fe=fe,nn=nt(M?M(fe):fe.nodeName);try{Fe.hasAttribute&&Fe.hasAttribute("patchsrc")&&Fe.removeAttribute("patchsrc"),Fe.hasAttribute&&Fe.hasAttribute("for")&&nn!=="label"&&nn!=="output"&&Fe.removeAttribute("for")}catch{}}const De=C(fe);if(De)for(let Fe=De.length-1;Fe>=0;--Fe)Z.push(De[Fe])}},Tp=function(U){let Z=null,fe=null;if(Cd)U="<remove></remove>"+U;else{const Fe=UP(U,/^[\r\n\t ]+/);fe=Fe&&Fe[0]}Li==="application/xhtml+xml"&&oo===Kr&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Te=N?z(U):U;if(oo===Kr)try{Z=new h().parseFromString(Te,Li)}catch{}if(!Z||!Z.documentElement){Z=H.createDocument(oo,"template",null);try{Z.documentElement.innerHTML=Uo?O:Te}catch{}}const De=Z.body||Z.documentElement;return U&&fe&&De.insertBefore(n.createTextNode(fe),De.childNodes[0]||null),oo===Kr?ce.call(Z,mt?"html":"body")[0]:mt?Z.documentElement:De},Od=function(U){return ee.call(U.ownerDocument||U,U,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},tl=function(U){return U=Of(U,V," "),U=Of(U,K," "),U=Of(U,J," "),U},Nd=function(U){var Z;U.normalize();const fe=ee.call(U.ownerDocument||U,U,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Te=fe.nextNode();for(;Te;)Te.data=tl(Te.data),Te=fe.nextNode();const De=(Z=U.querySelectorAll)===null||Z===void 0?void 0:Z.call(U,"template");De&&nc(De,Fe=>{Us(Fe.content)&&Nd(Fe.content)})},Fo=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!==_(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)},Us=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 cn(pe,U,Z){pe.length!==0&&nc(pe,fe=>{fe.call(e,U,Z,Yr)})}const Rp=function(U,Z){return!!(Gt&&U.hasChildNodes()&&!vr(U.firstElementChild)&&Bn(VP,U.textContent)&&Bn(VP,U.innerHTML)||Gt&&U.namespaceURI===Kr&&Z==="style"&&vr(U.firstElementChild)||U.nodeType===rs.processingInstruction||Gt&&U.nodeType===rs.comment&&Bn(GP,U.data))},Bb=function(U,Z){if(!$e[Z]&&Ip(Z)&&(Be.tagNameCheck instanceof RegExp&&Bn(Be.tagNameCheck,Z)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(Z)))return!1;if(Zn&&!gs[Z]){const fe=w(U),Te=C(U);if(Te&&fe){const De=Te.length;for(let Fe=De-1;Fe>=0;--Fe){const nn=wd?Te[Fe]:y(Te[Fe],!0);fe.insertBefore(nn,E(U))}}}return mr(U),!0},Cu=function(U,Z){if(cn(L.beforeSanitizeElements,U,null),U!==Z&&w(U)===null)return!0;if(Fo(U))return mr(U),!0;const fe=nt(M?M(U):U.nodeName);if(cn(L.uponSanitizeElement,U,{tagName:fe,allowedTags:Ee}),U!==Z&&w(U)===null)return!0;if(Rp(U,fe))return mr(U),!0;if($e[fe]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(fe))&&!Ee[fe]){const De=Bb(U,fe);return De===!1&&cn(L.afterSanitizeElements,U,null),De}if((R?R(U):U.nodeType)===rs.element&&!el(U)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&Bn(Nee,U.innerHTML))return mr(U),!0;if(Rr&&U.nodeType===rs.text){const De=tl(U.textContent);U.textContent!==De&&(rc(e.removed,{element:U.cloneNode()}),U.textContent=De)}return cn(L.afterSanitizeElements,U,null),!1},Md=function(U,Z,fe){if(gr[Z]||Gt&&Z==="patchsrc"||Gt&&Z==="for"&&U!=="label"&&U!=="output"||Pi&&(Z==="id"||Z==="name")&&(fe in n||fe in Ad))return!1;const Te=Ce[Z]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(Z,U);if(!(Yn&&Bn(oe,Z))){if(!(Gr&&Bn(he,Z))){if(Te){if(!Ds[Z]){if(!Bn(Xe,Of(fe,ve,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&U!=="script"&&FP(fe,"data:")===0&&Za[U])){if(!(Tr&&!Bn(ue,Of(fe,ve,"")))){if(fe)return!1}}}}}else if(!(Ip(U)&&(Be.tagNameCheck instanceof RegExp&&Bn(Be.tagNameCheck,U)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(U))&&(Be.attributeNameCheck instanceof RegExp&&Bn(Be.attributeNameCheck,Z)||Be.attributeNameCheck instanceof Function&&Be.attributeNameCheck(Z,U))||Z==="is"&&Be.allowCustomizedBuiltInElements&&(Be.tagNameCheck instanceof RegExp&&Bn(Be.tagNameCheck,fe)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(fe))))return!1}}return!0},wu=vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ip=function(U){return!wu[Qf(U)]&&Bn(_e,U)},Or=function(U,Z,fe,Te){if(N&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!fe)switch(g.getAttributeType(U,Z)){case"TrustedHTML":return z(Te);case"TrustedScriptURL":return q(Te)}return Te},Pd=function(U,Z,fe,Te){try{fe?U.setAttributeNS(fe,Z,Te):U.setAttribute(Z,Te),Fo(U)?mr(U):LP(e.removed)}catch{ao(Z,U)}},kd=function(U){cn(L.beforeSanitizeAttributes,U,null);const Z=U.attributes;if(!Z||Fo(U))return;const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ce,forceKeepAttr:void 0};let Te=Z.length;const De=nt(U.nodeName);for(;Te--;){const Fe=Z[Te],nn=Fe.name,zn=Fe.namespaceURI,cr=Fe.value,rn=nt(nn),yr=cr;let Nn=nn==="value"?yr:hee(yr);if(fe.attrName=rn,fe.attrValue=Nn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,cn(L.uponSanitizeAttribute,U,fe),Nn=fe.attrValue,ur&&(rn==="id"||rn==="name")&&FP(Nn,ks)!==0&&(ao(nn,U),Nn=ks+Nn),Gt&&Bn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Nn)){ao(nn,U);continue}if(rn==="attributename"&&UP(Nn,"href")){ao(nn,U);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){ao(nn,U);continue}if(!no&&Bn(Mee,Nn)){ao(nn,U);continue}if(Rr&&(Nn=tl(Nn)),!Md(De,rn,Nn)){ao(nn,U);continue}Nn=Or(De,rn,zn,Nn),Nn!==yr&&Pd(U,nn,zn,Nn)}}cn(L.afterSanitizeAttributes,U,null)},Bi=function(U){let Z=null;const fe=Od(U);for(cn(L.beforeSanitizeShadowDOM,U,null);Z=fe.nextNode();)if(cn(L.uponSanitizeShadowNode,Z,null),Cu(Z,U),kd(Z),Us(Z.content)&&Bi(Z.content),(R?R(Z):Z.nodeType)===rs.element){const De=T(Z);Us(De)&&(lo(De),Bi(De))}cn(L.afterSanitizeShadowDOM,U,null)},lo=function(U){const Z=[{node:U,shadow:null}];for(;Z.length>0;){const fe=Z.pop();if(fe.shadow){Bi(fe.shadow);continue}const Te=fe.node,Fe=(R?R(Te):Te.nodeType)===rs.element,nn=C(Te);if(nn)for(let zn=nn.length-1;zn>=0;--zn)Z.push({node:nn[zn],shadow:null});if(Fe){const zn=M?M(Te):null;if(typeof zn=="string"&&nt(zn)==="template"){const cr=Te.content;Us(cr)&&Z.push({node:cr,shadow:null})}}if(Fe){const zn=T(Te);Us(zn)&&Z.push({node:null,shadow:zn},{node:zn,shadow:null})}}};return e.sanitize=function(pe){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,fe=null,Te=null,De=null;if(Uo=!pe,Uo&&(pe="<!-->"),typeof pe!="string"&&!vr(pe)&&(pe=yee(pe),typeof pe!="string"))throw Sl("dirty is not a string, aborting");if(!e.isSupported)return pe;yn?(Ee=Ir,Ce=ro):Td(U),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(Ee=Sr(Ee)),L.uponSanitizeAttribute.length>0&&(Ce=Sr(Ce)),e.removed=[];const Fe=wd&&typeof pe!="string"&&vr(pe);if(Fe){ji(pe);const rn=M?M(pe):pe.nodeName;if(typeof rn=="string"){const yr=nt(rn);if(!Ee[yr]||$e[yr])throw un(pe),Sl("root node is forbidden and cannot be sanitized in-place")}if(Fo(pe))throw un(pe),Sl("root node is clobbered and cannot be sanitized in-place");try{lo(pe)}catch(yr){throw un(pe),yr}}else if(vr(pe))Z=Tp("<!---->"),fe=Z.ownerDocument.importNode(pe,!0),fe.nodeType===rs.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?Z=fe:Z.appendChild(fe),lo(fe);else{if(!Lo&&!Rr&&!mt&&pe.indexOf("<")===-1)return N&&yu?z(pe):pe;if(Z=Tp(pe),!Z)return Lo?null:yu?O:""}Z&&Cd&&mr(Z.firstChild);const nn=Fe?pe:Z,zn=Od(nn);try{for(;Te=zn.nextNode();)Cu(Te,nn),kd(Te),Us(Te.content)&&Bi(Te.content)}catch(rn){throw Fe&&(un(pe),nc(e.removed,yr=>{yr.element&&Ls(yr.element)})),rn}if(Fe)return nc(e.removed,rn=>{rn.element&&Ls(rn.element)}),Rr&&Nd(pe),pe;if(Lo){if(Rr&&Nd(Z),vu)for(De=de.call(Z.ownerDocument);Z.firstChild;)De.appendChild(Z.firstChild);else De=Z;return(Ce.shadowroot||Ce.shadowrootmode)&&(De=xe.call(r,De,!0)),De}let cr=mt?Z.outerHTML:Z.innerHTML;return mt&&Ee["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&Bn(Iee,Z.ownerDocument.doctype.name)&&(cr="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
14
- `+cr),Rr&&(cr=tl(cr)),N&&yu?z(cr):cr},e.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Td(pe),yn=!0,Ir=Ee,ro=Ce},e.clearConfig=function(){Yr=null,yn=!1,Ir=null,ro=null,N=k,O=""},e.isValidAttribute=function(pe,U,Z){Yr||Td({});const fe=nt(pe),Te=nt(U);return Md(fe,Te,Z)},e.addHook=function(pe,U){typeof U=="function"&&$n(L,pe)&&rc(L[pe],U)},e.removeHook=function(pe,U){if($n(L,pe)){if(U!==void 0){const Z=dee(L[pe],U);return Z===-1?void 0:fee(L[pe],Z,1)[0]}return LP(L[pe])}},e.removeHooks=function(pe){$n(L,pe)&&(L[pe]=[])},e.removeAllHooks=function(){L=KP()},e}var WRe=A9();function T9({children:t,className:e}){return I.jsx("div",{"data-auth-page":!0,className:dt("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:I.jsx("div",{className:"w-full max-w-[26rem]",children:t})})}const Dee="Secure sign-in powered by AWS Cognito";function R9(t){const e=t?.note??"Secure sign-in";return I.jsx("div",{className:"text-center pt-5",children:I.jsx("p",{className:"text-xs text-fg-muted",children:e})})}const Lee=()=>I.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:[I.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),I.jsx("path",{d:"M3 7l9 6 9-6"})]});function I9({wordmark:t="remit,",tagline:e="your email client in the cloud.",mark:n=I.jsx(Lee,{})}){return I.jsxs("div",{className:"text-center pb-6",children:[I.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),I.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:t}),I.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:e})]})}const YP={type:"none"};function Uee(t){if(!t.open||t.count<=0)return YP;if(t.key==="ArrowDown"){const n=t.activeIndex+1;return{type:"move",index:n>=t.count?0:n}}if(t.key==="ArrowUp"){const n=t.activeIndex-1;return{type:"move",index:n<0?t.count-1:n}}return t.key==="Escape"?{type:"dismiss"}:(t.key==="Enter"||(t.acceptKeys??[]).includes(t.key))&&t.activeIndex>=0&&t.activeIndex<t.count?{type:"accept",index:t.activeIndex}:YP}function Fee({count:t,onAccept:e,acceptKeys:n}){const[r,s]=x.useState(!1),[o,a]=x.useState(-1),u=x.useId().replace(/[^a-zA-Z0-9_-]/g,""),c=`suggest-${u}`,f=x.useCallback(m=>`suggest-${u}-option-${m}`,[u]);x.useEffect(()=>{a(-1),s(!1)},[t]);const h=t>0&&!r,g=x.useCallback(m=>{const y=Uee({key:m.key,open:h,count:t,activeIndex:o,acceptKeys:n});return y.type==="none"?!1:(m.preventDefault(),y.type==="move"&&a(y.index),y.type==="dismiss"&&s(!0),y.type==="accept"&&e(y.index),!0)},[h,t,o,n,e]);return{open:h,activeIndex:o,setActiveIndex:a,dismiss:x.useCallback(()=>s(!0),[]),reopen:x.useCallback(()=>s(!1),[]),handleKeyDown:g,listId:c,optionId:f,comboboxProps:{role:"combobox","aria-expanded":h,"aria-controls":c,"aria-autocomplete":"list",...o>=0?{"aria-activedescendant":f(o)}:{},...h?{"data-escape-owner":""}:{}}}}const zee={similar:"Anything similar",properties:"Its properties"};function ZP(t){return zee[t]}const jee={similar:"Reads the messages you picked and finds more that read like them.",properties:"Matches on what the messages say about themselves — sender, subject, list. No reading involved."};function Bee(t){return jee[t]}const Hee={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function fh(t){return Hee[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 qee(t){return $ee[t]}function Wee(t){return t==="HasWords"}function Vee(t){return t.widen!==void 0&&!t.widen.inactive}function Gee(t){return Vee(t)?[]:t.clauses.filter(e=>Wee(e.field))}const Kee=["From","Subject","HasWords","ListId","FromDomain"];function XP(t){return`Similar to these ${t.anchorCount}`}const Yee={all:"Match all",any:"Match any"};function QP(t){return Yee[t]}function Zee(t){return t==="all"?"and":"or"}function Xee(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 Qee(t){return t==="once"?"Apply now":t==="standing"?"Save rule":"Save until then"}function Jee(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.scope==="once"&&Gee(t).length>0)return"Applying once can't read message bodies. Save this as a rule instead, or drop the “has the words” clause.";if(!t.moveMailboxId&&!t.labelId)return"Pick a folder to move into, or a label to apply.";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 ete={default:dt("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 Ua({icon:t,className:e,variant:n="default",trailing:r,ref:s,...o}){return I.jsxs("div",{className:dt(ete[n],e),children:[t&&I.jsx("span",{className:"text-fg-subtle shrink-0",children:t}),I.jsx("input",{ref:s,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...o}),r]})}function hT({icon:t,className:e,children:n,...r}){return I.jsxs("div",{className:dt("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&&I.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),I.jsx("select",{className:"min-w-0 flex-1 appearance-none bg-transparent py-0 pr-8 text-fg outline-none",...r,children:n}),I.jsx(Jx,{className:"pointer-events-none absolute right-2.5 size-4 text-fg-subtle"})]})}function tte({id:t,suggestions:e,activeIndex:n,optionId:r,onPick:s,onHighlight:o,label:a,className:u}){return e.length===0?null:I.jsx("div",{id:t,role:"listbox","aria-label":a,className:dt("max-h-44 overflow-y-auto rounded-md border border-line bg-surface py-1 shadow-sm",u),children:e.map((c,f)=>I.jsxs("div",{id:r(f),role:"option",tabIndex:-1,"aria-selected":f===n,className:dt("flex cursor-pointer items-baseline gap-2 px-3 py-2 text-sm text-fg",f===n&&"bg-accent-2-soft"),onMouseDown:h=>{h.preventDefault(),s(c)},onMouseEnter:()=>o(f),children:[I.jsx("span",{className:"min-w-0 flex-1 truncate",children:c.label??c.value}),c.hint&&I.jsx("span",{className:"shrink-0 truncate text-2xs text-fg-subtle",children:c.hint}),c.source&&I.jsx("span",{className:"shrink-0 text-2xs text-fg-subtle",children:c.source})]},c.value))})}const Rv="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs";function nte({clause:t,onEdit:e,onRemove:n}){return I.jsxs("span",{className:dt(Rv,t.derived?"border-dashed border-line-strong bg-surface-sunken":"border-line bg-surface"),children:[I.jsxs("button",{type:"button",onClick:e,"aria-label":`Edit ${fh(t.field)} clause`,className:"flex items-center gap-1 text-left",children:[I.jsx("span",{className:"font-medium text-fg-muted",children:fh(t.field)}),I.jsx("span",{className:"text-fg",children:t.value})]}),t.derived&&I.jsx("span",{className:"text-2xs text-fg-subtle",children:"from sender"}),n&&I.jsx("button",{type:"button",onClick:n,"aria-label":`Remove ${fh(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:I.jsx(La,{className:"size-3"})})]})}function JP({onRemove:t}){return I.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:I.jsx(La,{className:"size-3"})})}function rte({widen:t,onRemove:e}){return t.inactive?I.jsxs("span",{className:dt(Rv,"border-dashed border-line-strong bg-surface-sunken text-fg-subtle"),children:[I.jsx(yP,{className:"size-3 shrink-0","aria-hidden":"true"}),I.jsx("span",{className:"line-through",children:XP(t)}),I.jsx("span",{className:"text-2xs",children:"not available here"}),e&&I.jsx(JP,{onRemove:e})]}):I.jsxs("span",{className:dt(Rv,"border-accent-2 bg-accent-2-soft text-accent-2"),children:[I.jsx(yP,{className:"size-3 shrink-0","aria-hidden":"true"}),I.jsx("span",{className:"font-medium",children:"…and anything similar"}),I.jsx("span",{className:"text-2xs opacity-80",children:XP(t)}),e&&I.jsx(JP,{onRemove:e})]})}function e3({label:t,onClick:e}){return I.jsxs("button",{type:"button",onClick:e,className:dt(Rv,"border-dashed border-line-strong text-fg-muted hover:border-accent-2 hover:text-accent-2"),children:[I.jsx(wQ,{className:"size-3","aria-hidden":"true"}),t]})}function ste({draft:t,mode:e,fields:n=Kee,suggestions:r=[],onChangeField:s,onChangeValue:o,onSubmit:a,onCancel:u}){const c=qee(t.field),f=Fee({count:r.length,onAccept:h=>o?.(r[h].value)});return I.jsxs("div",{className:"space-y-1.5 rounded-lg border border-accent-2 bg-surface p-2",children:[I.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[I.jsx(hT,{"aria-label":"Clause field",value:t.field,onChange:h=>s?.(h.target.value),className:"h-8 w-32 shrink-0",children:n.map(h=>I.jsx("option",{value:h,children:fh(h)},h))}),I.jsx(Ua,{"aria-label":"Clause value",value:t.value,placeholder:"value…",autoComplete:"off",onChange:h=>{f.reopen(),o?.(h.target.value)},onKeyDown:h=>{f.handleKeyDown(h)||h.key==="Enter"&&a?.()},className:"h-8 min-w-40 flex-1",...f.comboboxProps}),I.jsx(as,{variant:"primary",size:"sm",onClick:a,disabled:t.value.trim()==="",className:"shrink-0",children:e==="add"?"Add":"Save"}),I.jsx(as,{variant:"ghost",size:"sm",onClick:u,"aria-label":"Cancel clause edit",icon:I.jsx(La,{className:"size-4"}),className:"shrink-0 px-2"})]}),f.open&&I.jsx(tte,{id:f.listId,suggestions:r,activeIndex:f.activeIndex,optionId:f.optionId,onPick:h=>{o?.(h.value),f.dismiss()},onHighlight:f.setActiveIndex,label:`${fh(t.field)} suggestions`}),c&&I.jsx("p",{className:"px-0.5 text-2xs text-fg-subtle",children:c})]})}function ote({preview:t}){const e=Xee(t);if(t.status==="loading")return I.jsxs("p",{className:"flex items-center gap-2 text-xs text-fg-muted","aria-live":"polite",children:[I.jsx(e_,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]});if(t.status==="error")return I.jsxs("p",{className:"flex items-center gap-2 text-xs text-danger",role:"alert",children:[I.jsx(W8,{className:"size-3.5 shrink-0","aria-hidden":"true"}),e]});const n=t.count===0;return I.jsxs("p",{className:dt("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&&I.jsx(e_,{className:"size-3.5 animate-spin","aria-hidden":"true"}),e]})}const ite=t=>typeof t=="object"&&t!==null&&"name"in t&&t.name==="AbortError",ate={sm:"min-h-9 px-3 text-xs",md:"min-h-11 px-4 text-sm"};function vS({name:t,options:e,value:n,onChange:r,size:s="md","aria-label":o}){const a=e.findIndex(u=>u.value===n);return I.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 I.jsxs("label",{className:dt("relative flex cursor-pointer items-center justify-center rounded-[5px] font-medium transition-colors",ate[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:[I.jsx("input",{type:"radio",name:t,value:u.value,checked:f,onChange:()=>r(u.value),className:"sr-only"}),u.label]},u.value)})})}const lte=[{value:"all",label:QP("all")},{value:"any",label:QP("any")}],ute=[{value:"similar",label:ZP("similar")},{value:"properties",label:ZP("properties")}],t3=[{value:"once",label:"Just once"},{value:"standing",label:"Keep doing this"},{value:"until",label:"Until a date"}],n3="__filter_create_folder__",r3="__filter_create_label__";function cte({folders:t,value:e,onChangeMove:n,onCreateFolder:r}){const[s,o]=x.useState(!1),[a,u]=x.useState(""),[c,f]=x.useState(!1),[h,g]=x.useState(),[m,y]=x.useState([]),S=x.useRef(null);x.useEffect(()=>()=>S.current?.abort(),[]);const E=x.useMemo(()=>{const _=new Set(t.map(R=>R.id));return[...t,...m.filter(R=>!_.has(R.id))]},[t,m]),C=_=>{if(_===n3){g(void 0),o(!0);return}n?.(_)},w=()=>{if(!r)return;const _=a.trim();if(_==="")return;f(!0),g(void 0),S.current?.abort();const R=new AbortController;S.current=R,r(_,R.signal).then(M=>{y(N=>N.some(O=>O.id===M.id)?N:[...N,M]),n?.(M.id),o(!1),u(""),f(!1)}).catch(M=>{ite(M)||(g(M instanceof Error?M.message:"Couldn't create that folder. Please try again."),f(!1))})},T=()=>{S.current?.abort(),o(!1),u(""),g(void 0),f(!1)};return I.jsxs("div",{className:"space-y-2",children:[I.jsxs(hT,{"aria-label":"Destination folder",value:e,onChange:_=>C(_.target.value),children:[I.jsx("option",{value:"",children:"Choose a folder…"}),E.map(_=>I.jsx("option",{value:_.id,children:_.label},_.id)),r&&I.jsx("option",{value:n3,children:"+ New folder…"})]}),s&&I.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-surface-sunken p-2",children:[I.jsx(Ua,{value:a,onChange:_=>u(_.target.value),placeholder:"Folder name","aria-label":"New folder name",disabled:c,autoFocus:!0,onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),w()),_.key==="Escape"&&(_.preventDefault(),T())}}),h&&I.jsx("p",{className:"text-2xs text-danger",role:"alert",children:h}),I.jsxs("div",{className:"flex gap-2",children:[I.jsx(as,{variant:"primary",size:"sm",onClick:w,disabled:c||a.trim()==="",children:c?"Creating folder…":"Create folder"}),I.jsx(as,{variant:"ghost",size:"sm",onClick:T,disabled:c,children:"Cancel"})]})]})]})}function dte({labels:t,value:e,onChangeLabel:n,onCreateLabel:r}){const[s,o]=x.useState(!1),[a,u]=x.useState(""),[c,f]=x.useState(!1),[h,g]=x.useState(),[m,y]=x.useState([]),S=x.useMemo(()=>{const _=new Set(t.map(R=>R.id));return[...t,...m.filter(R=>!_.has(R.id))]},[t,m]),E=S.find(_=>_.id===e),C=_=>{if(_===r3){g(void 0),o(!0);return}n?.(_)},w=()=>{if(!r)return;const _=a.trim();_!==""&&(f(!0),g(void 0),r(_).then(R=>{y(M=>M.some(N=>N.id===R.id)?M:[...M,R]),n?.(R.id),o(!1),u(""),f(!1)}).catch(R=>{g(R instanceof Error?R.message:"Couldn't create that label. Please try again."),f(!1)}))},T=()=>{o(!1),u(""),g(void 0)};return I.jsxs("div",{className:"space-y-2",children:[I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsxs(hT,{"aria-label":"Label to apply",value:e,onChange:_=>C(_.target.value),className:"flex-1",children:[I.jsx("option",{value:"",children:"No label"}),S.map(_=>I.jsx("option",{value:_.id,children:_.name},_.id)),r&&I.jsx("option",{value:r3,children:"+ New label…"})]}),E&&I.jsx(JJ,{label:{...E,labelId:E.id}})]}),s&&I.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-surface-sunken p-2",children:[I.jsx(Ua,{value:a,onChange:_=>u(_.target.value),placeholder:"Label name","aria-label":"New label name",disabled:c,autoFocus:!0,onKeyDown:_=>{_.key==="Enter"&&(_.preventDefault(),w()),_.key==="Escape"&&(_.preventDefault(),T())}}),h&&I.jsx("p",{className:"text-2xs text-danger",role:"alert",children:h}),I.jsxs("div",{className:"flex gap-2",children:[I.jsx(as,{variant:"primary",size:"sm",onClick:w,disabled:c||a.trim()==="",children:c?"Creating…":"Create label"}),I.jsx(as,{variant:"ghost",size:"sm",onClick:T,disabled:c,children:"Cancel"})]})]})]})}function VRe({rule:t,folders:e,labels:n=[],preview:r,notice:s,semanticAvailable:o=!1,matchMode:a,onChangeMatchMode:u,clauseFields:c,anchorLocked:f=!1,clauseSuggestions:h,clauseEdit:g,onStartAddClause:m,onStartEditClause:y,onRemoveClause:S,onChangeDraftField:E,onChangeDraftValue:C,onSubmitClause:w,onCancelClause:T,onAddWiden:_,onRemoveWiden:R,onChangeMatchOperator:M,onChangeMove:N,onCreateFolder:O,onChangeLabel:k,onCreateLabel:F,onChangeScope:$,onChangeName:D,onChangeUntil:z,onCommit:q,onCancel:Y}){const te=t.widen&&!t.widen.inactive?1:0,ee=t.clauses.length+te>=2,de=Zee(t.matchOperator),ce=Jee(t,r),xe=t.scope==="standing"||t.scope==="until",L=f?t3.filter(V=>V.value!=="once"):t3;return I.jsxs("div",{className:"flex min-h-0 flex-col",children:[I.jsxs("div",{className:"border-b border-line px-5 py-3",children:[I.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Filter rule"}),I.jsx("p",{className:"mt-0.5 text-xs text-fg-muted",children:"These chips are the whole rule — what you see is what applies."})]}),I.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4",children:[s,a&&I.jsxs("section",{className:"space-y-1.5",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Match on"}),I.jsx(vS,{name:"rule-match-mode",size:"sm","aria-label":"What the rule matches on",options:ute,value:a,onChange:V=>u?.(V)}),I.jsx("p",{className:"text-2xs text-fg-subtle",children:Bee(a)})]}),I.jsxs("section",{className:"space-y-3",children:[I.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.clauses.map((V,K)=>I.jsxs(x.Fragment,{children:[K>0&&I.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:de}),I.jsx(nte,{clause:V,onEdit:()=>y?.(V.id),onRemove:()=>S?.(V.id)})]},V.id)),t.widen&&I.jsxs(I.Fragment,{children:[t.clauses.length>0&&!t.widen.inactive&&I.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:de}),I.jsx(rte,{widen:t.widen,onRemove:f?void 0:R})]}),!g&&I.jsx(e3,{label:"Add clause",onClick:m}),!t.widen&&!f&&o&&a!=="properties"&&!g&&I.jsx(e3,{label:"…and similar",onClick:_})]}),g&&I.jsx(ste,{draft:g.draft,mode:g.mode,fields:c,suggestions:h,onChangeField:E,onChangeValue:C,onSubmit:w,onCancel:T}),f&&t.widen&&I.jsx("p",{className:"text-2xs text-fg-subtle",children:"This filter's similar-mail match is fixed to the message it was created from — create a new filter to change it."}),ee&&I.jsxs("div",{className:"flex items-center gap-2",children:[I.jsx("span",{className:"text-xs text-fg-muted",children:"Match"}),I.jsx(vS,{name:"match-operator",size:"sm","aria-label":"Match operator",options:lte,value:t.matchOperator,onChange:V=>M?.(V)})]})]}),I.jsxs("section",{className:"space-y-2",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Move matches to"}),I.jsx(cte,{folders:e,value:t.moveMailboxId??"",onChangeMove:N,onCreateFolder:O})]}),I.jsxs("section",{className:"space-y-2",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Apply a label"}),I.jsx(dte,{labels:n,value:t.labelId??"",onChangeLabel:k,onCreateLabel:F})]}),I.jsxs("section",{className:"space-y-2",children:[I.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"How long"}),I.jsx(vS,{name:"rule-scope",size:"sm","aria-label":"Rule scope",options:L,value:t.scope,onChange:V=>$?.(V)}),xe&&I.jsx(Ua,{value:t.name??"",onChange:V=>D?.(V.target.value),placeholder:"Name this rule (e.g. Receipts)","aria-label":"Rule name",className:"w-full"}),t.scope==="until"&&I.jsxs("div",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[I.jsx("span",{children:"Until"}),I.jsx(Ua,{type:"date",value:t.until??"",onChange:V=>z?.(V.target.value),"aria-label":"Expiry date",className:"flex-1"})]})]}),I.jsx("div",{className:"border-t border-line pt-3",children:I.jsx(ote,{preview:r})})]}),I.jsxs("div",{className:"space-y-2 border-t border-line px-5 py-3",children:[ce&&I.jsx("p",{className:"text-xs text-fg-subtle",role:"status",children:ce}),I.jsx(as,{variant:"primary",onClick:q,disabled:ce!==void 0,className:"w-full",children:Qee(t.scope)}),I.jsx(as,{variant:"ghost",onClick:Y,className:"w-full",children:"Not now"})]})]})}const fte={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function hte(t){return fte[t]}function pte(t){const e=t.split("/");return e[e.length-1]||t}const gte=new Set(["all","flagged"]);function mte(t){return gte.has(t)}const vte=new Set(["[Gmail]","[Google Mail]"]);function yte(t){if(t.role)return mte(t.role)?void 0:hte(t.role);if(t.providerPath&&!vte.has(t.providerPath.split("/")[0]))return pte(t.providerPath)}function GRe(t){return t==="inbox"?I.jsx(q8,{className:"size-4"}):t==="drafts"?I.jsx(vQ,{className:"size-4"}):t==="sent"?I.jsx(xQ,{className:"size-4"}):t==="archive"?I.jsx(fQ,{className:"size-4"}):t==="junk"?I.jsx(aT,{className:"size-4"}):t==="trash"?I.jsx(TQ,{className:"size-4"}):t==="flagged"?I.jsx(_Q,{className:"size-4"}):I.jsx(EQ,{className:"size-4"})}const O9={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},bte=({label:t,onRemove:e,tone:n="filter",className:r})=>I.jsxs("span",{className:dt("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",O9[n],r),children:[I.jsx("span",{children:t}),I.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:I.jsx(La,{className:"size-3"})})]}),Ste=x.forwardRef(({label:t,onRemove:e,onActivate:n,tone:r="filter",focused:s=!1,onKeyDown:o,onFocusLabel:a,className:u},c)=>I.jsxs("span",{role:"row",tabIndex:-1,className:dt("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",O9[r],s&&"ring-2 ring-ring",u),children:[I.jsx("button",{ref:c,type:"button",role:"gridcell",tabIndex:s?0:-1,onClick:n,onFocus:a,onKeyDown:o,className:dt("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:t}),I.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:I.jsx(La,{className:"size-3"})})]}));Ste.displayName="SearchChipRow";const KRe=({tokens:t,className:e})=>t.length===0?null:I.jsx("div",{className:dt("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=>I.jsx(bte,{label:n.label,onRemove:n.onRemove},n.label))});function Ete(t){const[e,n]=x.useState(!1),r=e?gQ:mQ,s=e?"Hide password":"Show password";return I.jsx(Ua,{...t,type:e?"text":"password",trailing:I.jsx("button",{type:"button","aria-label":s,"aria-pressed":e,title:s,onClick:()=>n(o=>!o),className:"-my-1 -mr-2 flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-subtle transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:I.jsx(r,{className:"size-4","aria-hidden":!0})})})}var Rh;(function(t){t[t.UP=-1]="UP",t[t.DOWN=1]="DOWN"})(Rh||(Rh={}));function Cte(t){var e=getComputedStyle(t).overflowY;return t===document.scrollingElement&&e==="visible"?!0:!(e!=="scroll"&&e!=="auto")}function wte(t,e){if(!Cte(t))return!1;if(e===Rh.DOWN){var n=t.scrollTop+t.clientHeight;return n<t.scrollHeight}if(e===Rh.UP)return t.scrollTop>0;throw new Error("unsupported direction")}function N9(t,e){return wte(t,e)?!0:t.parentElement==null?!1:N9(t.parentElement,e)}function M9(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 xte=`.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
- }`;M9(xte);var _te=function(){return j.createElement("div",{className:"lds-ellipsis"},j.createElement("div",null),j.createElement("div",null),j.createElement("div",null),j.createElement("div",null))},Ate=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
- }`;M9(Tte);var YRe=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(_te,null):u,f=t.pullingContent,h=f===void 0?j.createElement(Ate,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,T=t.resistance,_=T===void 0?1:T,R=t.backgroundColor,M=t.className,N=M===void 0?"":M,O=x.useRef(null),k=x.useRef(null),F=x.useRef(null),$=x.useRef(null),D=!1,z=!1,q=!1,Y=0,te=0;x.useEffect(function(){if(!(!n||!k||!k.current)){var V=k.current;return V.addEventListener("touchstart",de,{passive:!0}),V.addEventListener("mousedown",de),V.addEventListener("touchmove",ce,{passive:!1}),V.addEventListener("mousemove",ce),window.addEventListener("scroll",xe),V.addEventListener("touchend",L),V.addEventListener("mouseup",L),document.body.addEventListener("mouseleave",L),function(){V.removeEventListener("touchstart",de),V.removeEventListener("mousedown",de),V.removeEventListener("touchmove",ce),V.removeEventListener("mousemove",ce),window.removeEventListener("scroll",xe),V.removeEventListener("touchend",L),V.removeEventListener("mouseup",L),document.body.removeEventListener("mouseleave",L)}}},[g,n,o,y,w,s,E]),x.useEffect(function(){var V;if(!((V=O)===null||V===void 0)&&V.current){var K=O.current.classList.contains("ptr--fetch-more-treshold-breached");K||s&&H()<E&&a&&(O.current.classList.add("ptr--fetch-more-treshold-breached"),z=!0,a().then(ee).catch(ee))}},[s,g]);var H=function(){if(!k||!k.current)return-1;var V=window.scrollY,K=k.current.scrollHeight;return K-V-window.innerHeight},ee=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"),O.current&&(O.current.classList.remove("ptr--pull-down-treshold-breached"),O.current.classList.remove("ptr--dragging"),O.current.classList.remove("ptr--fetch-more-treshold-breached")),D&&(D=!1),z&&(z=!1)})},de=function(V){q=!1,V instanceof MouseEvent&&(Y=V.pageY),window.TouchEvent&&V instanceof TouchEvent&&(Y=V.touches[0].pageY),te=Y,!(V.type==="touchstart"&&N9(V.target,Rh.UP))&&(k.current.getBoundingClientRect().top<0||(q=!0))},ce=function(V){if(q){if(window.TouchEvent&&V instanceof TouchEvent?te=V.touches[0].pageY:te=V.pageY,O.current.classList.add("ptr--dragging"),te<Y){q=!1;return}V.cancelable&&V.preventDefault();var K=Math.min((te-Y)/_,w);K>=y&&(q=!0,D=!0,O.current.classList.remove("ptr--dragging"),O.current.classList.add("ptr--pull-down-treshold-breached")),!(K>=w)&&(F.current.style.opacity=(K/65).toString(),k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+K+"px)",F.current.style.visibility="visible")}},xe=function(V){z||s&&H()<E&&a&&(z=!0,O.current.classList.add("ptr--fetch-more-treshold-breached"),a().then(ee).catch(ee))},L=function(){if(q=!1,Y=0,te=0,!D){F.current&&(F.current.style.visibility="hidden"),ee();return}k.current&&(k.current.style.overflow="visible",k.current.style.transform="translate(0px, "+y+"px)"),o().then(ee).catch(ee)};return j.createElement("div",{className:"ptr "+N,style:{backgroundColor:R},ref:O},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:$},j.createElement("div",{className:"ptr__loader ptr__fetch-more--loading"},c))))};const Rte={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function s3(t){return Rte[t]}function Ite(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 ZRe(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 XRe(t){return new Date(t).toLocaleDateString(void 0,{dateStyle:"medium"})}function Ote({children:t,show:e,label:n="Update available"}){return I.jsxs("span",{className:"relative inline-flex",children:[t,e&&I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),I.jsx("span",{className:"sr-only",children:n})]})]})}const o3=["preparing","restarting","reconnecting"],Nte='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function P9(t){x.useEffect(()=>{const e=t.current;if(!e)return;const n=()=>Array.from(e.querySelectorAll(Nte));(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 k9="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function Mte({target:t,phase:e,elapsedSeconds:n}){const r=x.useRef(null);P9(r);const s=o3.indexOf(e);return I.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:k9,children:[I.jsxs("div",{className:"max-w-md space-y-2",children:[I.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",t]}),I.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."})]}),I.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:o3.map((o,a)=>{const u=a<s,c=a===s;return I.jsxs("li",{className:dt("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?I.jsx(hQ,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):c?I.jsx(e_,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):I.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),s3(o)]},o)})}),I.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[I.jsx("span",{className:"sr-only",children:`${s3(e)}. `}),Ite(n)]})]})}function Pte({attemptedVersion:t,previousVersion:e,elapsedSeconds:n,logsCommand:r,onRetryConnection:s}){const o=x.useRef(null);P9(o);const a=Math.max(1,Math.round(n/60));return I.jsxs("div",{ref:o,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:k9,children:[I.jsx(aT,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),I.jsxs("div",{className:"max-w-lg space-y-3",children:[I.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),I.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."]}),I.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:"]}),I.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),I.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:I.jsx(as,{size:"sm",onClick:s,children:"Try connecting again"})})]})}const kte=()=>I.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:[I.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((t,e)=>I.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[I.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},e))]}),Dte=()=>I.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((t,e)=>I.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[I.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),I.jsxs("div",{className:"flex-1 space-y-1.5",children:[I.jsxs("div",{className:"flex justify-between gap-2",children:[I.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),I.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),I.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},e))}),pT=()=>I.jsxs("div",{className:"flex h-dvh animate-pulse bg-canvas","aria-hidden":"true",children:[I.jsx(kte,{}),I.jsx(Dte,{})]}),gT="494914fe7deab52363600b91142a5cf2c9021ccd",Lte="2026-07-28T22:43:04.682Z",Ute=gT.slice(0,7),Fte=/^[0-9a-f]{40}$/.test(gT),zte=Fte?`https://github.com/remit-mail/reader/commit/${gT}`:void 0,jte="https://github.com/remit-mail/reader/issues/new";class a_ extends Error{constructor(e,n,r){super(e),this.status=n,this.body=r,this.name="ApiError"}status;body}const au=t=>{if(t instanceof a_)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}},D9=t=>au(t)!==void 0,Hy=t=>{const e=au(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"),Bte=()=>typeof navigator<"u"&&navigator.onLine===!1,L9=t=>$y(t)||D9(t)?!1:t instanceof oT?!0:Bte(),Hte=t=>!D9(t)&&!$y(t)&&!L9(t),U9=t=>Hy(t)||Hte(t),$te=t=>t?.softError===!0,F9=(t,e)=>Hy(t)?!0:$y(t)||L9(t)?!1:U9(t)?!0:!$te(e),qte=t=>Hy(t),l_=new Set;let z9=null,j9=null;const Wte=t=>{j9=t},Vte=t=>t instanceof Error?t:new Error(B9(t)),B9=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.",Gte=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,ql=(t,e)=>{const n={error:t,message:B9(t),correlationId:Gte(),at:Date.now(),recoverable:e?.recoverable??qte(t),stack:t instanceof Error?t.stack:void 0,componentStack:e?.componentStack};z9=n,Jte(`Fatal: ${n.message} [${n.correlationId}]`),j9?.recordError(Vte(t),{fatal:"true",correlationId:n.correlationId});for(const r of l_)r(n);return n},Kte=t=>(l_.add(t),()=>{l_.delete(t)}),Yte=()=>z9,Zte=20,tv=[],Xte=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function Qte(t){return typeof t!="string"?!1:Xte.has(t.replace(/\.\s*$/,""))}function nv(t){tv.push(t),tv.length>Zte&&tv.shift()}function Jte(t){nv(t)}function ene(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 tne(){const t=console.error.bind(console);console.error=(...e)=>{nv(ene(e)),t(...e)},window.addEventListener("error",e=>{Qte(e.message)||(nv(`Uncaught ${e.error instanceof Error?`${e.error.name}: ${e.error.message}`:String(e.message)} (${e.filename}:${e.lineno})`),ql(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}`),ql(n)})}function nne(){return tv.slice()}const rne=8,yc=[];function sne(t){const e=t.split(/[?#]/)[0],n=yc[yc.length-1];n&&n.path===e||(yc.push({path:e,timestamp:new Date().toISOString()}),yc.length>rne&&yc.shift())}function one(){return yc.slice()}const yS=7500,i3=`
149
- … (truncated — the copy action on this screen has the full report)`;function a3(t){return{appShortSha:Ute,appCommitUrl:zte,appBuildTime:Lte,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:nne(),requests:qX(),routes:one(),failingRequest:WX(),errorMessage:t?.errorMessage,stack:t?.stack,componentStack:t?.componentStack,quarantine:t?.quarantine,title:t?.title}}function bS(t){return["```",t,"```"].join(`
150
- `)}function H9(t){const e=/T(\d{2}:\d{2}:\d{2})/.exec(t);return e?e[1]:t}function ine(t){return`- **Version**: ${t.appCommitUrl?`[\`${t.appShortSha}\`](${t.appCommitUrl})`:`\`${t.appShortSha}\``} built ${t.appBuildTime}`}function ane(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 lne(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`| ${H9(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function une(t){return t.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...t.map(n=>`- ${H9(n.timestamp)} \`${n.path}\``),""]}function $9(t,e){const n=t.recentErrors.length>0?t.recentErrors.map(o=>` - ${o}`).join(`
151
- `):" (none)",r=["## Environment",ine(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(...ane(t.failingRequest)),t.quarantine){const o=e?.quarantineStructure??t.quarantine.structure;r.push(t.quarantine.head,"",bS(o),"",t.quarantine.disclaimer,"")}const s=e?.stack??t.stack;return s&&r.push("## Stacktrace",bS(s),""),t.componentStack&&r.push("## Component stack",bS(t.componentStack),""),r.push(...lne(t.requests)),r.push(...une(t.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
152
- `)}function cne(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 Zg(t,e){const n=new URLSearchParams({title:cne(t),body:$9(t,e)});return`${jte}?${n.toString()}`}function dne(t){return $9(t)}function fne(t){const e=Zg(t);if(e.length<=yS)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(Zg(n,s).length<=yS)break;let u=0,c=a.length,f=0;for(;u<=c;){const h=u+c>>1;Zg(n,{...s,[o]:a.slice(0,h)+i3}).length<=yS?(f=h,u=h+1):c=h-1}s={...s,[o]:a.slice(0,f)+i3}}return Zg(n,s)}const hne="/mail",q9=()=>{const[t,e]=x.useState(()=>Yte());return x.useEffect(()=>Kte(e),[]),t?I.jsx(W9,{fatal:t}):null},l3=t=>({errorMessage:t.message,stack:t.stack,componentStack:t.componentStack}),W9=({fatal:t,onRetry:e})=>{const[n,r]=x.useState(!1),s=()=>{window.location.reload()},o=()=>{if(e){e();return}s()},a=()=>{const f=fne(a3(l3(t)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=dne(a3(l3(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 I.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:[I.jsx(aT,{className:"size-16 shrink-0","aria-hidden":"true"}),I.jsxs("div",{className:"max-w-lg space-y-3",children:[I.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),I.jsx("p",{className:"text-base text-red-50",children:c}),I.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:t.message}),I.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",t.correlationId]})]}),I.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[t.recoverable?I.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"}):I.jsx("a",{href:hne,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"}),I.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"}),I.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"})]})]})},pne=({betterAuthEnabled:t,cognitoConfigured:e})=>t?"betterAuth":e?"cognito":"none",V9=t=>pne(t)==="cognito"?Dee:void 0,gne="Fetch Error",mT=(t,e)=>{if(t&&typeof t=="object"&&e in t){const n=t[e];if(typeof n=="string"&&n.trim().length>0)return n}},vT=t=>mT(t,"message"),mne=t=>$y(t)?!1:mT(t,"statusText")===gne?!0:au(t)===void 0,vne=t=>{if(mne(t))return"network";const e=au(t);return e===void 0||e===404||e>=500?"fatal":vT(t)?"validation":"fatal"},yne="Can't reach the server. You may be offline — check your connection and try again.",bne=(t,e)=>e==="network"?yne:vT(t)??"Please check your details and try again.",Sne=t=>{const e=au(t);if(e===void 0)return"no response";const n=mT(t,"statusText");return n?`${e} ${n}`:String(e)},Ene=(t,e)=>{const n=Sne(t),r=au(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=vT(t),o=s?` Server said: ${s}.`:"";return`${e.method} ${e.path} failed: ${n}. ${r}${o}`},Cne=(t,e)=>{ql(new Error(Ene(t,e)),{recoverable:!1})},wne={method:"POST",path:"/api/auth/sign-up/email"},xne={method:"POST",path:"/api/auth/sign-in/email"},_ne=()=>{const[t,e]=x.useState("signIn"),[n,r]=x.useState(""),[s,o]=x.useState(""),[a,u]=x.useState(""),[c,f]=x.useState(null),[h,g]=x.useState(!1),[m,y]=x.useState(!1),S=m?"signIn":t,E=(w,T)=>{if(KX(w)){y(!0),e("signIn");return}const _=vne(w);if(_==="fatal"){Cne(w,T);return}f(bne(w,_))},C=async w=>{if(w.preventDefault(),h)return;f(null),g(!0);const T=S==="signUp"?wne:xne,_=await(S==="signUp"?_h.signUp.email({email:s,password:a,name:n}):_h.signIn.email({email:s,password:a})).then(R=>R.error??null,R=>R);g(!1),_&&E(_,T)};return I.jsxs(I.Fragment,{children:[I.jsx(q9,{}),I.jsxs(T9,{children:[I.jsx(I9,{}),I.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?I.jsx(s_,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):I.jsxs("div",{className:"flex gap-1",children:[I.jsx(as,{size:"sm",variant:S==="signIn"?"secondary":"ghost","aria-pressed":S==="signIn",onClick:()=>e("signIn"),children:"Sign in"}),I.jsx(as,{size:"sm",variant:S==="signUp"?"secondary":"ghost","aria-pressed":S==="signUp",onClick:()=>e("signUp"),children:"Create account"})]}),c&&I.jsx(s_,{tone:"danger",children:c}),S==="signUp"&&I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),I.jsx(Ua,{id:"ba-name",type:"text",autoComplete:"name",value:n,onChange:w=>r(w.target.value),placeholder:"Your name",required:!0})]}),I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),I.jsx(Ua,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:w=>o(w.target.value),placeholder:"you@example.com",required:!0})]}),I.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[I.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),I.jsx(Ete,{id:"ba-password",autoComplete:S==="signUp"?"new-password":"current-password",value:a,onChange:w=>u(w.target.value),placeholder:"Your password",required:!0})]}),I.jsx(as,{type:"submit",children:S==="signUp"?"Create account":"Sign in"})]}),I.jsx(R9,{note:V9({betterAuthEnabled:Uy(),cognitoConfigured:!1})})]})]})},Ane=({children:t})=>{const{data:e,isPending:n}=_h.useSession();return n?I.jsx(pT,{}):e?I.jsx(I.Fragment,{children:t}):I.jsx(_ne,{})},Tne=({children:t,fallback:e=null})=>{const{data:n}=_h.useSession();if(!n)return I.jsx(I.Fragment,{children:e});const r=async()=>{await _h.signOut(),iT()};return I.jsx(I.Fragment,{children:t({email:n.user.email??null,signOut:r})})},Iv={configure:()=>{},getToken:oQ,resetToken:iT,Shell:Ane,Account:Tne};var SS,u3;function Rne(){if(u3)return SS;u3=1;function t(){this.__data__=[],this.size=0}return SS=t,SS}var ES,c3;function lp(){if(c3)return ES;c3=1;function t(e,n){return e===n||e!==e&&n!==n}return ES=t,ES}var CS,d3;function qy(){if(d3)return CS;d3=1;var t=lp();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return CS=e,CS}var wS,f3;function Ine(){if(f3)return wS;f3=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 wS=r,wS}var xS,h3;function One(){if(h3)return xS;h3=1;var t=qy();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return xS=e,xS}var _S,p3;function Nne(){if(p3)return _S;p3=1;var t=qy();function e(n){return t(this.__data__,n)>-1}return _S=e,_S}var AS,g3;function Mne(){if(g3)return AS;g3=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 AS=e,AS}var TS,m3;function Wy(){if(m3)return TS;m3=1;var t=Rne(),e=Ine(),n=One(),r=Nne(),s=Mne();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,TS=o,TS}var RS,v3;function Pne(){if(v3)return RS;v3=1;var t=Wy();function e(){this.__data__=new t,this.size=0}return RS=e,RS}var IS,y3;function kne(){if(y3)return IS;y3=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return IS=t,IS}var OS,b3;function Dne(){if(b3)return OS;b3=1;function t(e){return this.__data__.get(e)}return OS=t,OS}var NS,S3;function Lne(){if(S3)return NS;S3=1;function t(e){return this.__data__.has(e)}return NS=t,NS}var MS,E3;function G9(){if(E3)return MS;E3=1;var t=typeof Fg=="object"&&Fg&&Fg.Object===Object&&Fg;return MS=t,MS}var PS,C3;function Mo(){if(C3)return PS;C3=1;var t=G9(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return PS=n,PS}var kS,w3;function Vy(){if(w3)return kS;w3=1;var t=Mo(),e=t.Symbol;return kS=e,kS}var DS,x3;function Une(){if(x3)return DS;x3=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 DS=o,DS}var LS,_3;function Fne(){if(_3)return LS;_3=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return LS=n,LS}var US,A3;function md(){if(A3)return US;A3=1;var t=Vy(),e=Une(),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 US=a,US}var FS,T3;function Ri(){if(T3)return FS;T3=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return FS=t,FS}var zS,R3;function yT(){if(R3)return zS;R3=1;var t=md(),e=Ri(),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 zS=a,zS}var jS,I3;function zne(){if(I3)return jS;I3=1;var t=Mo(),e=t["__core-js_shared__"];return jS=e,jS}var BS,O3;function jne(){if(O3)return BS;O3=1;var t=zne(),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 BS=n,BS}var HS,N3;function K9(){if(N3)return HS;N3=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 HS=n,HS}var $S,M3;function Bne(){if(M3)return $S;M3=1;var t=yT(),e=jne(),n=Ri(),r=K9(),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 $S=g,$S}var qS,P3;function Hne(){if(P3)return qS;P3=1;function t(e,n){return e?.[n]}return qS=t,qS}var WS,k3;function lu(){if(k3)return WS;k3=1;var t=Bne(),e=Hne();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return WS=n,WS}var VS,D3;function bT(){if(D3)return VS;D3=1;var t=lu(),e=Mo(),n=t(e,"Map");return VS=n,VS}var GS,L3;function Gy(){if(L3)return GS;L3=1;var t=lu(),e=t(Object,"create");return GS=e,GS}var KS,U3;function $ne(){if(U3)return KS;U3=1;var t=Gy();function e(){this.__data__=t?t(null):{},this.size=0}return KS=e,KS}var YS,F3;function qne(){if(F3)return YS;F3=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return YS=t,YS}var ZS,z3;function Wne(){if(z3)return ZS;z3=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 ZS=s,ZS}var XS,j3;function Vne(){if(j3)return XS;j3=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 XS=r,XS}var QS,B3;function Gne(){if(B3)return QS;B3=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 QS=n,QS}var JS,H3;function Kne(){if(H3)return JS;H3=1;var t=$ne(),e=qne(),n=Wne(),r=Vne(),s=Gne();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,JS=o,JS}var eE,$3;function Yne(){if($3)return eE;$3=1;var t=Kne(),e=Wy(),n=bT();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return eE=r,eE}var tE,q3;function Zne(){if(q3)return tE;q3=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return tE=t,tE}var nE,W3;function Ky(){if(W3)return nE;W3=1;var t=Zne();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return nE=e,nE}var rE,V3;function Xne(){if(V3)return rE;V3=1;var t=Ky();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return rE=e,rE}var sE,G3;function Qne(){if(G3)return sE;G3=1;var t=Ky();function e(n){return t(this,n).get(n)}return sE=e,sE}var oE,K3;function Jne(){if(K3)return oE;K3=1;var t=Ky();function e(n){return t(this,n).has(n)}return oE=e,oE}var iE,Y3;function ere(){if(Y3)return iE;Y3=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 iE=e,iE}var aE,Z3;function ST(){if(Z3)return aE;Z3=1;var t=Yne(),e=Xne(),n=Qne(),r=Jne(),s=ere();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,aE=o,aE}var lE,X3;function tre(){if(X3)return lE;X3=1;var t=Wy(),e=bT(),n=ST(),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 lE=s,lE}var uE,Q3;function ET(){if(Q3)return uE;Q3=1;var t=Wy(),e=Pne(),n=kne(),r=Dne(),s=Lne(),o=tre();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,uE=a,uE}var cE,J3;function nre(){if(J3)return cE;J3=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return cE=e,cE}var dE,ek;function rre(){if(ek)return dE;ek=1;function t(e){return this.__data__.has(e)}return dE=t,dE}var fE,tk;function sre(){if(tk)return fE;tk=1;var t=ST(),e=nre(),n=rre();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,fE=r,fE}var hE,nk;function ore(){if(nk)return hE;nk=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 hE=t,hE}var pE,rk;function ire(){if(rk)return pE;rk=1;function t(e,n){return e.has(n)}return pE=t,pE}var gE,sk;function Y9(){if(sk)return gE;sk=1;var t=sre(),e=ore(),n=ire(),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,T=!0,_=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;T=!1;break}if(_){if(!e(u,function(O,k){if(!n(_,k)&&(R===O||h(R,O,c,f,g)))return _.push(k)})){T=!1;break}}else if(!(R===M||h(R,M,c,f,g))){T=!1;break}}return g.delete(a),g.delete(u),T}return gE=o,gE}var mE,ok;function Z9(){if(ok)return mE;ok=1;var t=Mo(),e=t.Uint8Array;return mE=e,mE}var vE,ik;function are(){if(ik)return vE;ik=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return vE=t,vE}var yE,ak;function lre(){if(ak)return yE;ak=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return yE=t,yE}var bE,lk;function ure(){if(lk)return bE;lk=1;var t=Vy(),e=Z9(),n=lp(),r=Y9(),s=are(),o=lre(),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]",T="[object DataView]",_=t?t.prototype:void 0,R=_?_.valueOf:void 0;function M(N,O,k,F,$,D,z){switch(k){case T:if(N.byteLength!=O.byteLength||N.byteOffset!=O.byteOffset)return!1;N=N.buffer,O=O.buffer;case w:return!(N.byteLength!=O.byteLength||!D(new e(N),new e(O)));case c:case f:case m:return n(+N,+O);case h:return N.name==O.name&&N.message==O.message;case y:case E:return N==O+"";case g:var q=s;case S:var Y=F&a;if(q||(q=o),N.size!=O.size&&!Y)return!1;var te=z.get(N);if(te)return te==O;F|=u,z.set(N,O);var H=r(q(N),q(O),F,$,D,z);return z.delete(N),H;case C:if(R)return R.call(N)==R.call(O)}return!1}return bE=M,bE}var SE,uk;function X9(){if(uk)return SE;uk=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 SE=t,SE}var EE,ck;function Ii(){if(ck)return EE;ck=1;var t=Array.isArray;return EE=t,EE}var CE,dk;function Q9(){if(dk)return CE;dk=1;var t=X9(),e=Ii();function n(r,s,o){var a=s(r);return e(r)?a:t(a,o(r))}return CE=n,CE}var wE,fk;function cre(){if(fk)return wE;fk=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 wE=t,wE}var xE,hk;function J9(){if(hk)return xE;hk=1;function t(){return[]}return xE=t,xE}var _E,pk;function eF(){if(pk)return _E;pk=1;var t=cre(),e=J9(),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 _E=o,_E}var AE,gk;function dre(){if(gk)return AE;gk=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return AE=t,AE}var TE,mk;function uu(){if(mk)return TE;mk=1;function t(e){return e!=null&&typeof e=="object"}return TE=t,TE}var RE,vk;function fre(){if(vk)return RE;vk=1;var t=md(),e=uu(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return RE=r,RE}var IE,yk;function CT(){if(yk)return IE;yk=1;var t=fre(),e=uu(),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 IE=o,IE}var Jf={exports:{}},OE,bk;function hre(){if(bk)return OE;bk=1;function t(){return!1}return OE=t,OE}Jf.exports;var Sk;function wT(){return Sk||(Sk=1,(function(t,e){var n=Mo(),r=hre(),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 NE,Ek;function Yy(){if(Ek)return NE;Ek=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 NE=n,NE}var ME,Ck;function xT(){if(Ck)return ME;Ck=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return ME=e,ME}var PE,wk;function pre(){if(wk)return PE;wk=1;var t=md(),e=xT(),n=uu(),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]",T="[object Float32Array]",_="[object Float64Array]",R="[object Int8Array]",M="[object Int16Array]",N="[object Int32Array]",O="[object Uint8Array]",k="[object Uint8ClampedArray]",F="[object Uint16Array]",$="[object Uint32Array]",D={};D[T]=D[_]=D[R]=D[M]=D[N]=D[O]=D[k]=D[F]=D[$]=!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 PE=z,PE}var kE,xk;function gre(){if(xk)return kE;xk=1;function t(e){return function(n){return e(n)}}return kE=t,kE}var eh={exports:{}};eh.exports;var _k;function mre(){return _k||(_k=1,(function(t,e){var n=G9(),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 DE,Ak;function _T(){if(Ak)return DE;Ak=1;var t=pre(),e=gre(),n=mre(),r=n&&n.isTypedArray,s=r?e(r):t;return DE=s,DE}var LE,Tk;function tF(){if(Tk)return LE;Tk=1;var t=dre(),e=CT(),n=Ii(),r=wT(),s=Yy(),o=_T(),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 T in f)(h||u.call(f,T))&&!(E&&(T=="length"||y&&(T=="offset"||T=="parent")||S&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||s(T,w)))&&C.push(T);return C}return LE=c,LE}var UE,Rk;function AT(){if(Rk)return UE;Rk=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return UE=e,UE}var FE,Ik;function nF(){if(Ik)return FE;Ik=1;function t(e,n){return function(r){return e(n(r))}}return FE=t,FE}var zE,Ok;function vre(){if(Ok)return zE;Ok=1;var t=nF(),e=t(Object.keys,Object);return zE=e,zE}var jE,Nk;function yre(){if(Nk)return jE;Nk=1;var t=AT(),e=vre(),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 jE=s,jE}var BE,Mk;function Zy(){if(Mk)return BE;Mk=1;var t=yT(),e=xT();function n(r){return r!=null&&e(r.length)&&!t(r)}return BE=n,BE}var HE,Pk;function rF(){if(Pk)return HE;Pk=1;var t=tF(),e=yre(),n=Zy();function r(s){return n(s)?t(s):e(s)}return HE=r,HE}var $E,kk;function bre(){if(kk)return $E;kk=1;var t=Q9(),e=eF(),n=rF();function r(s){return t(s,n,e)}return $E=r,$E}var qE,Dk;function Sre(){if(Dk)return qE;Dk=1;var t=bre(),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 T=h.get(o),_=h.get(a);if(T&&_)return T==a&&_==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],O=a[w];if(c)var k=g?c(O,N,w,a,o,h):c(N,O,w,o,a,h);if(!(k===void 0?N===O||f(N,O,u,c,h):k)){R=!1;break}M||(M=w=="constructor")}if(R&&!M){var F=o.constructor,$=a.constructor;F!=$&&"constructor"in o&&"constructor"in a&&!(typeof F=="function"&&F instanceof F&&typeof $=="function"&&$ instanceof $)&&(R=!1)}return h.delete(o),h.delete(a),R}return qE=s,qE}var WE,Lk;function Ere(){if(Lk)return WE;Lk=1;var t=lu(),e=Mo(),n=t(e,"DataView");return WE=n,WE}var VE,Uk;function Cre(){if(Uk)return VE;Uk=1;var t=lu(),e=Mo(),n=t(e,"Promise");return VE=n,VE}var GE,Fk;function wre(){if(Fk)return GE;Fk=1;var t=lu(),e=Mo(),n=t(e,"Set");return GE=n,GE}var KE,zk;function xre(){if(zk)return KE;zk=1;var t=lu(),e=Mo(),n=t(e,"WeakMap");return KE=n,KE}var YE,jk;function _re(){if(jk)return YE;jk=1;var t=Ere(),e=bT(),n=Cre(),r=wre(),s=xre(),o=md(),a=K9(),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),T=o;return(t&&T(new t(new ArrayBuffer(1)))!=m||e&&T(new e)!=u||n&&T(n.resolve())!=f||r&&T(new r)!=h||s&&T(new s)!=g)&&(T=function(_){var R=o(_),M=R==c?_.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}),YE=T,YE}var ZE,Bk;function Are(){if(Bk)return ZE;Bk=1;var t=ET(),e=Y9(),n=ure(),r=Sre(),s=_re(),o=Ii(),a=wT(),u=_T(),c=1,f="[object Arguments]",h="[object Array]",g="[object Object]",m=Object.prototype,y=m.hasOwnProperty;function S(E,C,w,T,_,R){var M=o(E),N=o(C),O=M?h:s(E),k=N?h:s(C);O=O==f?g:O,k=k==f?g:k;var F=O==g,$=k==g,D=O==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,T,_,R):n(E,C,O,w,T,_,R);if(!(w&c)){var z=F&&y.call(E,"__wrapped__"),q=$&&y.call(C,"__wrapped__");if(z||q){var Y=z?E.value():E,te=q?C.value():C;return R||(R=new t),_(Y,te,w,T,R)}}return D?(R||(R=new t),r(E,C,w,T,_,R)):!1}return ZE=S,ZE}var XE,Hk;function sF(){if(Hk)return XE;Hk=1;var t=Are(),e=uu();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 XE=n,XE}var QE={exports:{}},JE={};var $k;function Tre(){if($k)return JE;$k=1;var t=ap(),e=lQ();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 JE.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(!T){if(T=!0,_=N,N=m(N),y!==void 0&&E.hasValue){var O=E.value;if(y(O,N))return R=O}return R=N}if(O=R,r(_,N))return O;var k=m(N);return y!==void 0&&y(O,k)?(_=N,O):(_=N,R=k)}var T=!1,_,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},JE}var qk;function Rre(){return qk||(qk=1,QE.exports=Tre()),QE.exports}var TT=Rre();const QRe=Ga(TT);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 RT(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 pt(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 Tt(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 Wl;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(Wl||(Wl={}));var u_=Dt.Start,IT=Dt.Stop,up=Dt.Raise,Xy=Dt.Send,oF=Dt.Cancel,Ire=Dt.NullEvent,OT=Dt.Assign;Dt.After;Dt.DoneState;var iF=Dt.Log,Ore=Dt.Init,c_=Dt.Invoke;Dt.ErrorExecution;var Wk=Dt.ErrorPlatform,Nre=Dt.ErrorCustom,NT=Dt.Update,Mre=Dt.Choose,Pre=Dt.Pure,aF=".",Vk={},d_="xstate.guard",kre="",Xg;function MT(t,e,n){n===void 0&&(n=aF);var r=hh(t,n),s=hh(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?MT(r[o],s[o]):!1})}function lF(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 f_(t,e){try{return vd(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Dre(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function hh(t,e){if(Dre(t))return t.value;if(vd(t))return Ov(t);if(typeof t!="string")return t;var n=f_(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 Gk(t,e,n){var r,s,o={};try{for(var a=pt(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 Lre=function(t){return function(e){var n,r,s=e;try{for(var o=pt(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 Ure(t,e){return function(n){var r,s,o=n;try{for(var a=pt(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=fn(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 fn(t){var e;return(e=[]).concat.apply(e,Jt([],Tt(t),!1))}function uF(t){return vd(t)?t:[t]}function $s(t){return t===void 0?[]:uF(t)}function Nv(t,e,n){var r,s;if(Nt(t))return t(e,n.data);var o={};try{for(var a=pt(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 Kk(t){return!!(t instanceof Promise||t!==null&&(Nt(t)||typeof t=="object")&&Nt(t.then))}function zre(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function jre(t,e){var n,r,s=Tt([[],[]],2),o=s[0],a=s[1];try{for(var u=pt(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 cF(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:cF(n,s)}}})}function Bre(t,e){return{current:e,states:cF(t,e)}}function Yk(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=pt(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 Hre=function(){};function vd(t){return Array.isArray(t)}function Nt(t){return typeof t=="function"}function Ot(t){return typeof t=="string"}function dF(t,e){if(t)return Ot(t)?{type:d_,name:t,predicate:e?e[t]:void 0}:Nt(t)?{type:d_,name:t.name,predicate:t}:t}function $re(t){try{return"subscribe"in t&&Nt(t.subscribe)}catch{return!1}}var xa=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Xg={},Xg[xa]=function(){return this},Xg[Symbol.observable]=function(){return this};function qc(t){return!!t&&"__xstatenode"in t}function qre(t){return!!t&&typeof t.send=="function"}var Wre=(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 rr(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 sc(t,e){var n=uF(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 Vre(t){if(!(t===void 0||t===kre))return $s(t)}function fF(t,e,n,r,s){var o=t.options.guards,a={state:s,cond:e,_event:r};if(e.type===d_)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 hF(t){return typeof t=="string"?{type:t}:t}function ph(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 Qg(t,e){return"".concat(t,":invocation[").concat(e,"]")}function h_(t){return(t.type===up||t.type===Xy&&t.to===Wl.Internal)&&typeof t.delay!="number"}var kl=rr({type:Ore});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 di=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 pF(t,e){return{type:up,event:typeof t=="function"?t:Qy(t),delay:e?e.delay:void 0,id:e?.id}}function gF(t,e,n,r){var s={_event:n},o=rr(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:up,_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:lF(t)}}function mF(t,e,n,r){var s={_event:n},o=rr(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 vF(t,e){return eb(t,me(me({},e),{to:Wl.Parent}))}function yF(){return vF(NT)}var bF=function(t,e,n){return me(me({},t),{value:Ot(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})},SF=function(t){return{type:oF,sendId:t}};function EF(t){var e=Jy(t);return{type:Dt.Start,activity:e,exec:void 0}}function CF(t){var e=Nt(t)?t:Jy(t);return{type:Dt.Stop,activity:e,exec:void 0}}function wF(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 xF=function(t){return{type:OT,assignment:t}};function _F(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 gh(t,e){var n="".concat(Dt.DoneInvoke,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function Ac(t,e){var n="".concat(Dt.ErrorPlatform,".").concat(t),r={type:n,data:e};return r.toString=function(){return n},r}function AF(t,e){return eb(function(n,r){return r},me(me({},e),{to:t}))}function Gre(t){return{type:Dt.Choose,conds:t}}var Kre=function(t){var e,n,r=[];try{for(var s=pt(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===OT){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 Ih(t,e,n,r,s,o,a){a===void 0&&(a=!1);var u=a?[]:Kre(s),c=u.length?Yk(n,r,u,e):n,f=a?[n]:void 0,h=[];function g(S,E){var C;switch(E.type){case up:{var w=gF(E,c,r,t.options.delays);return o&&typeof w.delay=="number"&&o(w,c,r),w}case Xy:var T=mF(E,c,r,t.options.delays);return o&&T.to!==Wl.Internal&&(S==="entry"?h.push(T):o(T,c,r)),T;case iF:{var _=bF(E,c,r);return o?.(_,c,r),_}case Mre:{var R=E,M=(C=R.conds.find(function(H){var ee=dF(H.cond,t.options.guards);return!ee||fF(t,ee,c,r,o?void 0:e)}))===null||C===void 0?void 0:C.actions;if(!M)return[];var N=Tt(Ih(t,e,c,r,[{type:S,actions:di($s(M),t.options.actions)}],o,a),2),O=N[0],k=N[1];return c=k,f?.push(c),O}case Pre:{var M=E.get(c,r.data);if(!M)return[];var F=Tt(Ih(t,e,c,r,[{type:S,actions:di($s(M),t.options.actions)}],o,a),2),$=F[0],D=F[1];return c=D,f?.push(c),$}case IT:{var _=wF(E,c,r);return o?.(_,n,r),_}case OT:{c=Yk(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 Y=f.length-1,te=me(me({},z),{exec:function(H){for(var ee=[],de=1;de<arguments.length;de++)ee[de-1]=arguments[de];q.apply(void 0,Jt([f[Y]],Tt(ee),!1))}});z=te}return z}}function m(S){var E,C,w=[];try{for(var T=pt(S.actions),_=T.next();!_.done;_=T.next()){var R=_.value,M=g(S.type,R);M&&(w=w.concat(M))}}catch(N){E={error:N}}finally{try{_&&!_.done&&(C=T.return)&&C.call(T)}finally{if(E)throw E.error}}return h.forEach(function(N){o(N,c,r)}),h.length=0,w}var y=fn(s.map(m));return[y,c]}const TF=Object.freeze(Object.defineProperty({__proto__:null,after:_F,assign:xF,cancel:SF,choose:Gre,done:nh,doneInvoke:gh,error:Ac,forwardTo:AF,getActionFunction:Mv,initEvent:kl,raise:pF,resolveActions:Ih,resolveLog:bF,resolveRaise:gF,resolveSend:mF,resolveStop:wF,send:eb,sendParent:vF,sendUpdate:yF,start:EF,stop:CF,toActionObject:Wc,toActionObjects:di,toActivityDefinition:Jy},Symbol.toStringTag,{value:"Module"}));var Pv=[],bc=function(t,e){Pv.push(t);var n=e(t);return Pv.pop(),n},Yre=function(t){return t(Pv[Pv.length-1])};function RF(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 Zre(t,e,n,r){var s,o=hF(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?PT(a,t.id,u):RF(t.id);return c.meta=t,c}function PT(t,e,n){var r=RF(e);if(r.deferred=!0,qc(t)){var s=r.state=bc(void 0,function(){return(n?t.withContext(n):t).initialState});r.getSnapshot=function(){return s}}return r}function Xre(t){try{return typeof t.send=="function"}catch{return!1}}function Qre(t){return Xre(t)&&"id"in t}function Jre(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 IF(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Oh(t){return IF(t).filter(function(e){return e.type!=="history"})}function OF(t){var e=[t];return kv(t)?e:e.concat(fn(Oh(t).map(OF)))}function rh(t,e){var n,r,s,o,a,u,c,f,h=new Set(t),g=p_(h),m=new Set(e);try{for(var y=pt(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=p_(m);try{for(var T=pt(m),_=T.next();!_.done;_=T.next()){var E=_.value;if(E.type==="compound"&&(!w.get(E)||!w.get(E).length))g.get(E)?g.get(E).forEach(function($){return m.add($)}):E.initialStateNodes.forEach(function($){return m.add($)});else if(E.type==="parallel")try{for(var R=(a=void 0,pt(Oh(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($){return m.add($)}):N.initialStateNodes.forEach(function($){return m.add($)}))}}catch($){a={error:$}}finally{try{M&&!M.done&&(u=R.return)&&u.call(R)}finally{if(a)throw a.error}}}}catch(F){s={error:F}}finally{try{_&&!_.done&&(o=T.return)&&o.call(T)}finally{if(s)throw s.error}}try{for(var O=pt(m),k=O.next();!k.done;k=O.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=O.return)&&f.call(O)}finally{if(c)throw c.error}}return m}function NF(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]=NF(o,e)}),s}function p_(t){var e,n,r=new Map;try{for(var s=pt(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 ese(t,e){var n=rh([t],e);return NF(t,p_(n))}function sh(t,e){return Array.isArray(t)?t.some(function(n){return n===e}):t instanceof Set?t.has(e):!1}function tse(t){return Jt([],Tt(new Set(fn(Jt([],Tt(t.map(function(e){return e.ownEvents})),!1)))),!1)}function sv(t,e){return e.type==="compound"?Oh(e).some(function(n){return n.type==="final"&&sh(t,n)}):e.type==="parallel"?Oh(e).every(function(n){return sv(t,n)}):!1}function nse(t){return t===void 0&&(t=[]),t.reduce(function(e,n){return n.meta!==void 0&&(e[n.id]=n.meta),e},{})}function Zk(t){return new Set(fn(t.map(function(e){return e.tags})))}function MF(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 MF(t[s],e[s])})}function rse(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function sse(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 qs=(function(){function t(e){var n=this,r;this.actions=[],this.activities=Vk,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||Vk,this.meta=nse(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 tse(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=kl;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=kl;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([],Tt(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=RT(e,["configuration","transitions","tags","machine"]);return me(me({},r),{tags:Array.from(n)})},t.prototype.matches=function(e){return MT(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var n;Hre(!!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})(),ose={deferEvents:!1},Xk=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=me(me({},ose),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})(),eC=new Map,ise=0,Mf={bookId:function(){return"x:".concat(ise++)},register:function(t,e){return eC.set(t,e),t},get:function(t){return eC.get(t)},free:function(t){eC.delete(t)}};function kT(){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 ase(){var t=kT();if(t&&"__xstate__"in t)return t.__xstate__}function lse(t){if(kT()){var e=ase();e&&e.register(t)}}function use(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=Jre({id:e.id,send:function(f){s.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,g){var m=ph(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 g_={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 cse=(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=rr(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===Wl.Parent||r.parent.id===g),S=y?r.parent:Ot(g)?g===Wl.Internal?r:r.children.get(g)||Mf.get(g):qre(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===Nre?"".concat(Ac(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(Y){throw r.parent&&r.parent.send({type:"xstate.error",data:Y}),Y}switch(h.type){case up:{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===kl):r.send(w._event);break;case oF:r.cancel(h.sendId);break;case u_:{if(r.status!==Pn.Running)return;var T=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[T.id||T.type])break;if(T.type===Dt.Invoke){var _=hF(T.src),R=r.machine.options.services?r.machine.options.services[_.type]:void 0,M=T.id,N=T.data,O="autoForward"in T?T.autoForward:!!T.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:_,meta:T.meta}):R;if(!F)return;var $=void 0;qc(F)&&(F=k?F.withContext(k):F,$={autoForward:O}),r.spawn(F,M,$)}else r.spawnActivity(T);break}case IT:{r.stopChild(h.activity.id);break}case iF: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 Xk({deferEvents:this.options.deferEvents}),this.sessionId=Mf.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:bc(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=pt(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===kl)&&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=pt(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=pt(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 T=pt(this.contextListeners),_=T.next();!_.done;_=T.next()){var R=_.value;R(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(F){u={error:F}}finally{try{_&&!_.done&&(c=T.return)&&c.call(T)}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=gh(this.id,N);try{for(var O=pt(this.doneListeners),k=O.next();!k.done;k=O.next()){var E=k.value;E(this._doneEvent)}}catch(F){f={error:F}}finally{try{k&&!k.done&&(h=O.return)&&h.call(O)}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=ph(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:bc(this,function(){return rse(e)?n.machine.resolveState(e):n.machine.resolveState(qs.from(e,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,kl)}),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=pt(this.listeners),m=g.next();!m.done;m=g.next()){var y=m.value;this.listeners.delete(y)}}catch(O){e={error:O}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(e)throw e.error}}try{for(var S=pt(this.stopListeners),E=S.next();!E.done;E=S.next()){var y=E.value;y(),this.stopListeners.delete(y)}}catch(O){r={error:O}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}try{for(var C=pt(this.contextListeners),w=C.next();!w.done;w=C.next()){var y=w.value;this.contextListeners.delete(y)}}catch(O){o={error:O}}finally{try{w&&!w.done&&(a=C.return)&&a.call(C)}finally{if(o)throw o.error}}try{for(var T=pt(this.doneListeners),_=T.next();!_.done;_=T.next()){var y=_.value;this.doneListeners.delete(y)}}catch(O){u={error:O}}finally{try{_&&!_.done&&(c=T.return)&&c.call(T)}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=pt(Object.keys(this.delayedEventsMap)),M=R.next();!M.done;M=R.next()){var N=M.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(O){f={error:O}}finally{try{M&&!M.done&&(h=R.return)&&h.call(R)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new Xk({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=rr({type:"xstate.stop"}),o=bc(e,function(){var a=fn(Jt([],Tt(e.state.configuration),!1).sort(function(g,m){return m.order-g.order}).map(function(g){return di(g.onExit,e.machine.options.actions)})),u=Tt(Ih(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 qs({value:e.state.value,context:f,_event:s,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:c.filter(function(g){return!h_(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=rr(y);n.forward(S),a=bc(n,function(){return n.machine.transition(a,S,void 0,r||void 0)}),c.push.apply(c,Jt([],Tt(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(E){return sse(E,a)})),!1)),u=u||!!a.changed};try{for(var h=pt(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,rr(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=rr(e);if(s.name.indexOf(Wk)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Wk)===0}))throw s.data.data;var o=bc(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=pt(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 PT(e,n);if(Kk(e))return this.spawnPromise(Promise.resolve(e),n);if(Nt(e))return this.spawnCallback(e,n);if(Qre(e))return this.spawnActor(e,n);if($re(e))return this.spawnObservable(e,n);if(qc(e))return this.spawnMachine(e,me(me({},r),{id:n}));if(zre(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({},g_),n);o.sync&&s.onTransition(function(u){r.send(NT,{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(rr(u,{origin:s.id}))}).start(),a},t.prototype.spawnBehavior=function(e,n){var r=use(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(rr(gh(n,c),{origin:n})))},function(c){if(!o){s.removeChild(n);var f=Ac(n,c);try{s.send(rr(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=ph(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(rr(m,{origin:n}))},h;try{h=e(f,function(m){a.add(m)})}catch(m){this.send(Ac(n,m))}if(Kk(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=ph(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(rr(c,{origin:n}))},function(c){s.removeChild(n),s.send(rr(Ac(n,c),{origin:n}))},function(){s.removeChild(n),s.send(rr(gh(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=kT();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)}lse(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=PF,t})(),dse=function(t){return Ot(t)?me(me({},g_),{name:t}):me(me(me({},g_),{name:Wre()}),t)};function Pf(t,e){var n=dse(e);return Yre(function(r){return r?r.spawn(t,n.name,n):PT(t,n.name)})}function PF(t,e){var n=new cse(t,e);return n}function fse(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function Jg(t){return me(me({type:c_},t),{toJSON:function(){t.onDone,t.onError;var e=RT(t,["onDone","onError"]);return me(me({},e),{type:c_,src:fse(t.src)})}})}var em="",m_="#",tC="*",oc={},ic=function(t){return t[0]===m_},hse=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},pse=(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(hse(),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:aF),this.id=this.config.id||Jt([this.machine.key],Tt(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}):oc;var u=0;function c(f){var h,g;f.order=u++;try{for(var m=pt(IF(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===em}):em in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=$s(this.config.entry||this.config.onEntry).map(function(f){return Wc(f)}),this.onExit=$s(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=$s(this.config.invoke).map(function(f,h){var g,m;if(qc(f)){var y=Qg(o.id,h);return o.machine.options.services=me((g={},g[y]=f,g),o.machine.options.services),Jg({src:y,id:y})}else if(Ot(f.src)){var y=f.id||Qg(o.id,h);return Jg(me(me({},f),{id:y,src:f.src}))}else if(qc(f.src)||Nt(f.src)){var y=f.id||Qg(o.id,h);return o.machine.options.services=me((m={},m[y]=f.src,m),o.machine.options.services),Jg(me(me({id:y},f),{src:y}))}else{var S=f.src;return Jg(me(me({id:Qg(o.id,h)},f),{src:S}))}}),this.activities=$s(this.config.activities).concat(this.invoke).map(function(f){return Jy(f)}),this.transition=this.transition.bind(this),this.tags=$s(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||OF(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===em,r=this.transitions.filter(function(s){var o=s.eventType===e;return n?o:o||s.eventType===tC});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=_F(u,e.id);return e.onEntry.push(eb(c,{delay:o})),e.onExit.push(SF(c)),c},s=vd(n)?n.map(function(o,a){var u=r(o.delay,a);return me(me({},o),{event:u})}):fn(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 $s(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 qs?e.value:hh(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([],Tt(fn(a.map(function(c){return r.getStateNode(c).getStateNodes(s[c])}))),!1)),u},t.prototype.handles=function(e){var n=lF(e);return this.events.includes(n)},t.prototype.resolveState=function(e){var n=e instanceof qs?e:qs.create(e),r=Array.from(rh([],this.getStateNodes(n.value)));return new qs(me(me({},n),{value:this.resolve(n.value),configuration:r,done:sv(r,this),tags:Zk(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=pt(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=fn(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=fn(Object.keys(a).map(function(w){return a[w].configuration}));return{transitions:S,exitSet:fn(y.map(function(w){return w.exitSet})),configuration:C,source:n,actions:fn(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,rr(n))},t.prototype.next=function(e,n){var r,s,o=this,a=n.name,u=[],c=[],f;try{for(var h=pt(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)&&ic(S)?e.matches(hh(this.getStateNodeById(S).path,this.delimiter)):MT(hh(S,this.delimiter),Lre(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!y||fF(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([],Tt(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 T=fn(c.map(function(R){return o.getRelativeStateNodes(R,e.historyValue)})),_=!!f.internal;return{transitions:[f],exitSet:_?[]:fn(c.map(function(R){return o.getPotentiallyReenteringNodes(R)})),configuration:T,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=pt(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 T=pt(y),_=T.next();!_.done;_=T.next()){var w=_.value;(!sh(e,w)||sh(r.exitSet,w.parent))&&r.exitSet.push(w)}}catch(D){h={error:D}}finally{try{_&&!_.done&&(g=T.return)&&g.call(T)}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=fn(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 Y=q.parent;return Y.type==="parallel"&&Oh(Y).every(function(te){return sv(r.configuration,te)})&&z.push(nh(Y.id)),z})),O=R.map(function(D){var z=D.onEntry,q=D.activities.map(function(Y){return EF(Y)});return{type:"entry",actions:di(u?Jt(Jt([],Tt(z),!1),Tt(q),!1):Jt(Jt([],Tt(q),!1),Tt(z),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(D){return pF(D)})}),k=Array.from(M).map(function(D){return{type:"exit",actions:di(Jt(Jt([],Tt(D.onExit),!1),Tt(D.activities.map(function(z){return CF(z)})),!1),m.machine.options.actions)}}),F=k.concat({type:"transition",actions:di(r.actions,this.machine.options.actions)}).concat(O);if(n){var $=di(fn(Jt([],Tt(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!h_(D)});return F.concat({type:"stop",actions:$})}return F},t.prototype.transition=function(e,n,r,s){e===void 0&&(e=this.initialState);var o=rr(n),a;if(e instanceof qs)a=r===void 0?e:this.resolveState(qs.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(qs.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([],Tt(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([],Tt(a),!1)),e},t.prototype.resolveTransition=function(e,n,r,s,o){var a,u,c,f,h=this;o===void 0&&(o=kl);var g=e.configuration,m=!n||e.transitions.length>0,y=m?e.configuration:n?n.configuration:[],S=sv(y,this),E=m?ese(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),T=n?me({},n.activities):{};try{for(var _=pt(w),R=_.next();!R.done;R=_.next()){var M=R.value;try{for(var N=(c=void 0,pt(M.actions)),O=N.next();!O.done;O=N.next()){var k=O.value;k.type===u_?T[k.activity.id||k.activity.type]=k:k.type===IT&&(T[k.activity.id||k.activity.type]=!1)}}catch(J){c={error:J}}finally{try{O&&!O.done&&(f=N.return)&&f.call(N)}finally{if(c)throw c.error}}}}catch(J){a={error:J}}finally{try{R&&!R.done&&(u=_.return)&&u.call(_)}finally{if(a)throw a.error}}var F=Tt(Ih(this,n,r,o,w,s,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),$=F[0],D=F[1],z=Tt(jre($,h_),2),q=z[0],Y=z[1],te=$.filter(function(J){var oe;return J.type===u_&&((oe=J.activity)===null||oe===void 0?void 0:oe.type)===c_}),H=te.reduce(function(J,oe){return J[oe.activity.id]=Zre(oe.activity,h.machine,D,o),J},n?me({},n.children):{}),ee=new qs({value:E||n.value,context:D,_event:o,_sessionid:n?n._sessionid:null,historyValue:E?C?Bre(C,E):void 0:n?n.historyValue:void 0,history:!E||e.source?n:void 0,actions:E?Y:[],activities:E?T:n?n.activities:{},events:[],configuration:y,transitions:e.transitions,children:H,done:S,tags:Zk(y),machine:this}),de=r!==D;ee.changed=o.name===NT||de;var ce=ee.history;ce&&delete ce.history;var xe=!S&&(this._transient||g.some(function(J){return J._transient}));if(!m&&(!xe||o.name===em))return ee;var L=ee;if(!S)for(xe&&(L=this.resolveRaisedTransition(L,{type:Ire},o,s));q.length;){var V=q.shift();L=this.resolveRaisedTransition(L,V._event,o,s)}var K=L.changed||(ce?!!L.actions.length||de||typeof ce.value!=typeof L.value||!MF(L.value,ce.value):void 0);return L.changed=K,L.history=ce,L},t.prototype.getStateNode=function(e){if(ic(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=ic(e)?e.slice(m_.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"&&ic(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var n=f_(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||oc;switch(this.type){case"parallel":return th(this.initialStateValue,function(o,a){return o?r.getStateNode(a).resolve(e[a]||o):oc});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):oc}):this.initialStateValue||{};default:return e||oc}},t.prototype.getResolvedPath=function(e){if(ic(e)){var n=this.machine.idMap[e.slice(m_.length)];if(!n)throw new Error("Unable to find state node '".concat(e,"'"));return n.path}return f_(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=Gk(this.states,function(r){return r.initialStateValue||oc},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=ic(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 fn(n.map(function(r){return e.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var n=Tt(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:Gk(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?fn(rv(s).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var o=Ure(r.path,"states")(e).current;return Ot(o)?[r.getStateNode(o)]:fn(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=fn(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=pt(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,pt(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=Vre(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:di($s(e.actions)),cond:dF(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=tC,u=o[a],c=u===void 0?[]:u,f=RT(o,[typeof a=="symbol"?a:a+""]);s=fn(Object.keys(f).map(function(T){var _=sc(T,f[T]);return _}).concat(sc(tC,c)))}var h=this.config.always?sc("",this.config.always):[],g=this.config.onDone?sc(String(nh(this.id)),this.config.onDone):[],m=fn(this.invoke.map(function(T){var _=[];return T.onDone&&_.push.apply(_,Jt([],Tt(sc(String(gh(T.id)),T.onDone)),!1)),T.onError&&_.push.apply(_,Jt([],Tt(sc(String(Ac(T.id)),T.onError)),!1)),_})),y=this.after,S=fn(Jt(Jt(Jt(Jt([],Tt(g),!1),Tt(m),!1),Tt(s),!1),Tt(h),!1).map(function(T){return $s(T).map(function(_){return r.formatTransition(_)})}));try{for(var E=pt(y),C=E.next();!C.done;C=E.next()){var w=C.value;S.push(w)}}catch(T){e={error:T}}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 pse(t,e)}var ri=xF,tb=yF,gse=AF,mse=x.useLayoutEffect;function Qk(t){var e=x.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)},vse=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},yse=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 bse(t,e){var n=Qk(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=vse(e,["context","guards","actions","activities","services","delays","state"]),h=Qk(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 PF(m,f)});return mse(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 Sse(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=yse(e,2),s=r[0],o=s===void 0?{}:s,a=r[1],u=bse(t,o);return x.useEffect(function(){if(a){var c=u.subscribe(ph(a));return function(){c.unsubscribe()}}},[a]),x.useEffect(function(){var c=o.state;return u.start(c?qs.create(c):void 0),function(){u.stop(),u.status=Pn.NotStarted}},[]),u}function Ese(t){return t.status!==0?t.getSnapshot():t.machine.initialState}function Cse(t){return"state"in t&&"machine"in t}function wse(t){return"state"in t}var xse=function(t,e){return t===e},_se=function(t,e){if(Cse(t)){if(t.status===0&&e.current)return e.current;var n=Ese(t);return e.current=t.status===0?n:null,n}return wse(t)?t.state:void 0};function Ase(t,e,n,r){n===void 0&&(n=xse);var s=x.useRef(null),o=x.useCallback(function(c){var f=t.subscribe(c).unsubscribe;return f},[t]),a=x.useCallback(function(){return _se(t,s)},[t,r]),u=TT.useSyncExternalStoreWithSelector(o,a,a,e,n);return u}const Tse=t=>{if(t instanceof Is)return t;if(t instanceof Error){if(t.name==="InvalidStateError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyAlreadyExists];return new Is({name:Bt.PasskeyAlreadyExists,message:e,recoverySuggestion:n,underlyingError:t})}if(t.name==="NotAllowedError"){const{message:e,recoverySuggestion:n}=Hc[Bt.PasskeyRegistrationCanceled];return new Is({name:Bt.PasskeyRegistrationCanceled,message:e,recoverySuggestion:n,underlyingError:t})}}return s8(t)},Rse=async t=>{try{const e=o8();cd(e,Bt.PasskeyNotSupported);const n=PG(t),r=await navigator.credentials.create({publicKey:n});return FG(r),kG(r)}catch(e){throw Tse(e)}},Ise=t=>In(Vn,Wn("StartWebAuthnRegistration"),ar(),{...Gn,...t}),Ose=t=>In(Vn,Wn("CompleteWebAuthnRegistration"),ar(),{...Gn,...t});async function Nse(){const t=$t.getConfig().Auth?.Cognito;lt(t);const{userPoolEndpoint:e,userPoolId:n}=t,{tokens:r}=await Oy();ud(r);const s=Ise({endpointResolver:St({endpointOverride:e})}),{CredentialCreationOptions:o}=await s({region:bt(n),userAgentValue:Mt(Ke.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});UG(o);const a=await Rse(o);await Ose({endpointResolver:St({endpointOverride:e})})({region:bt(n),userAgentValue:Mt(Ke.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const Mse=t=>In(Vn,Wn("ListWebAuthnCredentials"),ar(),{...Gn,...t});async function Pse(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=Mse({endpointResolver:St({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:bt(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 DT(t){return Pse($t,t)}const LT=t=>t.context.actorRef?.getSnapshot(),Nh=t=>LT(t)?.context,kse={category:Os.AI,apis:[ai.CreateConversation,ai.DeleteConversation,ai.ListConversations,ai.UpdateConversation,ai.OnMessage,ai.SendMessage,ai.Generation]},Dse={apis:[Ke.DeleteUser,Ke.UpdatePassword],category:Os.Auth},Lse={apis:[Ke.SignUp,Ke.ConfirmSignUp,Ke.ResendSignUpCode,Ke.SignIn,Ke.ConfirmSignIn,Ke.FetchUserAttributes,Ke.SignOut,Ke.ResetPassword,Ke.ConfirmResetPassword,Ke.SignInWithRedirect],category:Os.Auth},Use={apis:[Ws.UploadData],category:Os.Storage},Fse={apis:[Ux.NotifyMessageInteraction],category:Os.InAppMessaging},zse={category:Os.Geo,apis:[uh.SearchByText,uh.SearchForSuggestions,uh.SearchByPlaceId]},jse={category:Os.Geo,apis:[]},Bse={apis:[Ws.UploadData],category:Os.Storage},Hse={apis:[Ws.UploadData,Ws.Copy,Ws.GetUrl,Ws.List,Ws.Remove,Ws.GetDataAccess,Ws.ListCallerAccessGrants],category:Os.Storage};function us(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function yi(t){return typeof t=="string"||typeof t=="object"&&Object.prototype.toString.call(t)==="[object String]"}function $se(t){return us(t)&&Object.prototype.toString.call(t)==="[object Map]"}function qse(t){return us(t)&&Object.prototype.toString.call(t)==="[object Set]"}function UT(t){if(t==null)return!0;if(us(t)&&($se(t)||qse(t)))return!t.size;if(us(t)&&(yi(t)||Array.isArray(t)))return!t.length;for(const e in t)if(bi(t,e))return!1;return!0}function Wse(t){return Array.isArray(t)&&UT(t)}function Vse(...t){return t.every(Wse)}function kF(t){return us(t)&&UT(t)}function Gse(...t){return t.every(kF)}function bi(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function Si(t){return typeof t=="function"}const Ht=(t,e)=>e?`${t}--${e}`:"",Br=(t,e,n)=>n?`${t}--${e}`:"";function Kse(...t){}function Yse(t,e){const n={},r={};return Object.entries(t).forEach(([s,o])=>{e(s)?n[s]=o:r[s]=o}),[n,r]}const DF=({payload:t},e,n)=>{const{data:r,event:s}=t,{send:o}=e,{onSignIn:a,onSignOut:u}=n??{};switch(s){case"signedIn":{Si(a)&&a(t);break}case"signInWithRedirect":{o("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{Si(u)&&u(),o("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===ka.NetworkError)return;o("SIGN_OUT");break}}},Zse=(t,e=DF)=>{const n=r=>e(r,t);return To.listen("auth",n,"authenticator-hub-handler")},LF=["+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:LF,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}},Xse=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Qse=(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}},Jse=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")}},eoe=t=>{const e=Nh(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),T=LT(t),_=t.hasTag("pending")||T?.hasTag("pending"),R=Qse(t,T),M=(O=>{switch(O){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:_,loginMechanism:E,preferredChallenge:a,route:R,selectedAuthMethod:c,socialProviders:y,totpSecretCode:h,unverifiedUserAttributes:g,user:C,username:m,validationErrors:f}},toe=({send:t,state:e})=>{const n=Jse(t),r=eoe(e);return{...n,...r}};var Tc;(function(t){t.Apple="Apple",t.Amazon="Amazon",t.Facebook="Facebook",t.Google="Google"})(Tc||(Tc={}));var Jk;(function(t){t.Email="email",t.PhoneNumber="phone_number"})(Jk||(Jk={}));const noe=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],roe=["username","email","phone_number"],UF=[...roe,...noe,"confirmation_code","password","confirm_password"],soe=t=>UF.includes(t),FF=t=>UF.includes(t),ooe=t=>Array.isArray(t),ioe=t=>t?ooe(t)?t:[t]:null,aoe=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("")},loe=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("")},uoe=t=>{const e=t.split("@");return`${aoe(e[0])}@${e[1]}`},coe=(t,e)=>t==="Phone Number"?loe(e):uoe(e),doe=t=>Xse.some(e=>t.includes(e)),foe=(t,e,n)=>encodeURI(`otpauth://totp/${t}:${e}?secret=${n}&issuer=${t}`);function hoe(t,...e){return Object.entries(t).reduce((n,[r,s])=>({...n,[r]:e.includes(r)?s:s?.trim()}),{})}const poe={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={...poe},we={...ov};function ye(t){return G6.get(t)}const FT=t=>{const e=t?.context.config?.loginMechanisms,[n]=e??["username"];return n},goe=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},moe=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),voe="+1",Ei=t=>{let e=nb[t];const{type:n}=e;return n==="tel"&&(e={...e,dialCode:voe}),e},rb=t=>{const e=FT(t);return{...Ei(e),autocomplete:"username"}},iv=t=>({confirmation_code:{...Ei("confirmation_code"),label:"Code *",placeholder:"Code"}}),yoe=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={...Ei("password"),autocomplete:"current-password"}),o},boe=t=>{const{loginMechanisms:e,signUpAttributes:n}=t.context.config,r=FT(t),o=t.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=o&&o.length>1,u=Array.from(new Set([...e,"password","confirm_password",...n])),c={};for(const f of u)if(FF(f)){const h=f===r?rb(t):Ei(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},Soe=t=>({confirmation_code:{...Ei("confirmation_code"),placeholder:"Enter your code"}}),Eoe=t=>{const e=FT(t),{label:n}=nb[e];return{username:{...rb(t),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Coe=t=>({...iv(),password:{...Ei("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Ei("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),woe=t=>{const e=LT(t),{missingAttributes:n}=e.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),s={};for(const o of r)FF(o)?s[o]={...Ei(o)}:console.debug(`Authenticator does not have a default implementation for ${o}. Customize ForceNewPassword FormFields to add your own.`);return s},xoe=t=>({email:Ei("email")}),_oe={signIn:yoe,signUp:boe,confirmSignUp:Soe,confirmSignIn:iv,forceNewPassword:woe,forgotPassword:Eoe,confirmResetPassword:Coe,confirmVerifyUser:iv,setupEmail:xoe,setupTotp:iv},Aoe=(t,e)=>{const n=_oe[t];return n(e)},Toe=(t,e)=>{const n=Nh(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(soe(s)){const u={...nb[s],...o};return{...r,[s]:u}}else return{...r,[s]:o}},{})},Roe=(t,e)=>{const n=Aoe(t,e),r=Toe(t,e),s={...n,...r};return delete s.QR,goe(s)},Ioe=t=>t.map(e=>{const n=e[0],r={...e[1],order:void 0};return[n,r]}),Ooe=(t,e)=>{const n=Roe(t,e);return Ioe(moe(n))},Noe=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)}},Moe=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}.`},Poe=t=>{const{DeliveryMedium:e}=t??{},n=e==="EMAIL";return ye(!n&&e==="SMS"?we.WE_SENT_CODE:n?we.WE_EMAILED:we.WE_TEXTED)},koe={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},Doe=(t,e)=>ye(`Sign ${t==="signIn"?"In":"Up"} with ${koe[e]}`),Loe=t=>ye(t==="MFA_SETUP"?we.MFA_SETUP_SELECTION:we.MFA_SELECTION),Uoe=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:Moe,getDeliveryMethodText:Poe,getChallengeText:Noe,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:Doe,getMfaTypeLabelByValue:Foe,getSelectMfaTypeByChallengeName:Loe,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:Uoe,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var nC,eD;function zF(){if(eD)return nC;eD=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 nC=t,nC}var rC,tD;function zoe(){if(tD)return rC;tD=1;var t=ET(),e=sF(),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 rC=s,rC}var sC,nD;function jF(){if(nD)return sC;nD=1;var t=Ri();function e(n){return n===n&&!t(n)}return sC=e,sC}var oC,rD;function joe(){if(rD)return oC;rD=1;var t=jF(),e=rF();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 oC=n,oC}var iC,sD;function BF(){if(sD)return iC;sD=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return iC=t,iC}var aC,oD;function Boe(){if(oD)return aC;oD=1;var t=zoe(),e=joe(),n=BF();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 aC=r,aC}var lC,iD;function zT(){if(iD)return lC;iD=1;var t=md(),e=uu(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return lC=r,lC}var uC,aD;function jT(){if(aD)return uC;aD=1;var t=Ii(),e=zT(),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 uC=s,uC}var cC,lD;function Hoe(){if(lD)return cC;lD=1;var t=ST(),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,cC=n,cC}var dC,uD;function $oe(){if(uD)return dC;uD=1;var t=Hoe(),e=500;function n(r){var s=t(r,function(a){return o.size===e&&o.clear(),a}),o=s.cache;return s}return dC=n,dC}var fC,cD;function qoe(){if(cD)return fC;cD=1;var t=$oe(),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 fC=r,fC}var hC,dD;function Woe(){if(dD)return hC;dD=1;var t=Vy(),e=zF(),n=Ii(),r=zT(),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 hC=a,hC}var pC,fD;function BT(){if(fD)return pC;fD=1;var t=Woe();function e(n){return n==null?"":t(n)}return pC=e,pC}var gC,hD;function sb(){if(hD)return gC;hD=1;var t=Ii(),e=jT(),n=qoe(),r=BT();function s(o,a){return t(o)?o:e(o,a)?[o]:n(r(o))}return gC=s,gC}var mC,pD;function cp(){if(pD)return mC;pD=1;var t=zT();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return mC=e,mC}var vC,gD;function HT(){if(gD)return vC;gD=1;var t=sb(),e=cp();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 vC=n,vC}var yC,mD;function Voe(){if(mD)return yC;mD=1;var t=HT();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return yC=e,yC}var bC,vD;function Goe(){if(vD)return bC;vD=1;function t(e,n){return e!=null&&n in Object(e)}return bC=t,bC}var SC,yD;function Koe(){if(yD)return SC;yD=1;var t=sb(),e=CT(),n=Ii(),r=Yy(),s=xT(),o=cp();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 SC=a,SC}var EC,bD;function Yoe(){if(bD)return EC;bD=1;var t=Goe(),e=Koe();function n(r,s){return r!=null&&e(r,s,t)}return EC=n,EC}var CC,SD;function Zoe(){if(SD)return CC;SD=1;var t=sF(),e=Voe(),n=Yoe(),r=jT(),s=jF(),o=BF(),a=cp(),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 CC=f,CC}var wC,ED;function $T(){if(ED)return wC;ED=1;function t(e){return e}return wC=t,wC}var xC,CD;function Xoe(){if(CD)return xC;CD=1;function t(e){return function(n){return n?.[e]}}return xC=t,xC}var _C,wD;function Qoe(){if(wD)return _C;wD=1;var t=HT();function e(n){return function(r){return t(r,n)}}return _C=e,_C}var AC,xD;function Joe(){if(xD)return AC;xD=1;var t=Xoe(),e=Qoe(),n=jT(),r=cp();function s(o){return n(o)?t(r(o)):e(o)}return AC=s,AC}var TC,_D;function eie(){if(_D)return TC;_D=1;var t=Boe(),e=Zoe(),n=$T(),r=Ii(),s=Joe();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 TC=o,TC}var RC,AD;function HF(){if(AD)return RC;AD=1;var t=lu(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return RC=e,RC}var IC,TD;function qT(){if(TD)return IC;TD=1;var t=HF();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return IC=e,IC}var OC,RD;function $F(){if(RD)return OC;RD=1;var t=qT(),e=lp(),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 OC=s,OC}var NC,ID;function tie(){if(ID)return NC;ID=1;var t=$F(),e=sb(),n=Yy(),r=Ri(),s=cp();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 NC=o,NC}var MC,OD;function nie(){if(OD)return MC;OD=1;var t=HT(),e=tie(),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 MC=r,MC}var PC,ND;function WT(){if(ND)return PC;ND=1;var t=nF(),e=t(Object.getPrototypeOf,Object);return PC=e,PC}var kC,MD;function rie(){if(MD)return kC;MD=1;var t=X9(),e=WT(),n=eF(),r=J9(),s=Object.getOwnPropertySymbols,o=s?function(a){for(var u=[];a;)t(u,n(a)),a=e(a);return u}:r;return kC=o,kC}var DC,PD;function sie(){if(PD)return DC;PD=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return DC=t,DC}var LC,kD;function oie(){if(kD)return LC;kD=1;var t=Ri(),e=AT(),n=sie(),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 LC=o,LC}var UC,DD;function VT(){if(DD)return UC;DD=1;var t=tF(),e=oie(),n=Zy();function r(s){return n(s)?t(s,!0):e(s)}return UC=r,UC}var FC,LD;function iie(){if(LD)return FC;LD=1;var t=Q9(),e=rie(),n=VT();function r(s){return t(s,n,e)}return FC=r,FC}var zC,UD;function aie(){if(UD)return zC;UD=1;var t=zF(),e=eie(),n=nie(),r=iie();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 zC=s,zC}var lie=aie();const uie=Ga(lie),cie=!0,die="",Mh=(t,e)=>`${t}${e}`.replace(/[^A-Z0-9+]/gi,""),fie=(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:")}},hie=t=>{const{phone_number:e,...n}=uie(t,fie);if(yi(e)&&e!==die){const{country_code:r}=t;return{...n,phone_number:Mh(r,e)}}return n},pie=(t,e,n,r)=>{const{password:s,...o}=e,a=hie(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}:cie,userAttributes:{...n==="phone_number"?{...c,phone_number:t}:c}};return{username:t,password:u?void 0:s,options:f}},gie=({formValues:t,loginMechanisms:e})=>{const n=t.__authMethod;if(n==="SMS_OTP"){const{country_code:s,phone_number:o}=t;return Mh(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 Mh(s,o)}return t[r]},mie=(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}=TF,vie=ot({actorDoneData:void 0}),yie=ot({challengeName:void 0}),bie=ot({missingAttributes:void 0}),Sie=ot({remoteError:void 0}),Eie=ot({formValues:t=>({username:t.formValues?.username})}),Cie=ot({touched:{}}),wie=ot({user:void 0}),xie=ot({validationError:{}}),_ie=ot({totpSecretCode:(t,{data:e})=>{const{sharedSecret:n}=e.nextStep?.totpSetupDetails??{};return n}}),Aie=ot({allowedMfaTypes:(t,{data:e})=>e.nextStep?.allowedMFATypes}),Tie=ot({step:"SIGN_IN"}),Rie=ot({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Iie=ot({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Oie=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}}}),Nie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Mh(s,r):r}}),Mie=ot({username:gie}),Pie=ot({username:({formValues:t,loginMechanisms:e})=>{const n=e[0],{username:r,country_code:s}=t;return n==="phone_number"?Mh(s,r):r}}),kie=ot({step:(t,{data:e})=>e.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":e.nextStep.signInStep}),Die=ot({step:(t,{data:e})=>e.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":e.nextStep.signUpStep}),Lie=ot({step:(t,{data:e})=>e.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":e.nextStep.resetPasswordStep}),Uie=ot({missingAttributes:(t,{data:e})=>e.nextStep?.missingAttributes}),Fie=ot({validationError:(t,{data:e})=>e}),zie=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}}),jie=ot({user:(t,{data:e})=>e}),FD=t=>({Destination:t.destination,DeliveryMedium:t.deliveryMedium,AttributeName:t.attributName}),Bie=ot({codeDeliveryDetails:(t,{data:e})=>e?.nextStep?.codeDeliveryDetails?FD(e.nextStep.codeDeliveryDetails):FD(e)}),Hie=ot({formValues:(t,{data:e})=>{const{name:n,value:r}=e;return{...t.formValues,[n]:r}}}),$ie=ot({formValues:(t,{data:e})=>hoe({...t.formValues,...e},"password")}),qie=ot({touched:(t,{data:e})=>({...t.touched,[e.name]:!0})}),Wie=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}}}}),Vie=ot({selectedUserAttribute:void 0}),Gie=ot({selectedUserAttribute:t=>t.formValues?.unverifiedAttr}),Kie=ot({step:"CONFIRM_SIGN_UP"}),Yie=ot({selectedAuthMethod:(t,{data:e})=>e.method}),Zie=ot({selectedAuthMethod:(t,{data:e})=>e?.__authMethod||"PASSWORD"}),Xie=ot({step:"SELECT_AUTH_METHOD"}),Qie=ot({fetchedUserAttributes:(t,e)=>e.data}),Jie=ot({hasExistingPasskeys:(t,e)=>e.data}),eae=ot({hasExistingPasskeys:!1}),dp={clearActorDoneData:vie,clearChallengeName:yie,clearError:Sie,clearFormValues:Eie,clearHasExistingPasskeys:eae,clearMissingAttributes:bie,clearSelectedUserAttribute:Vie,clearTouched:Cie,clearUser:wie,clearValidationError:xie,handleBlur:qie,handleInput:Hie,handleSubmit:$ie,setAllowedMfaTypes:Aie,setChallengeName:Oie,setCodeDeliveryDetails:Bie,setFetchedUserAttributes:Qie,setFieldErrors:Fie,setHasExistingPasskeys:Jie,setMissingAttributes:Uie,setNextResetPasswordStep:Lie,setNextSignInStep:kie,setNextSignUpStep:Die,setRemoteError:zie,setConfirmAttributeCompleteStep:Iie,setConfirmSignUpSignUpStep:Kie,setSelectAuthMethodStep:Xie,setSelectedAuthMethod:Yie,setSelectedAuthMethodFromForm:Zie,setShouldVerifyUserAttributeStep:Rie,setSelectedUserAttribute:Gie,setSignInStep:Tie,setTotpSecretCode:_ie,setUser:jie,setUnverifiedUserAttributes:Wie,setUsernameForgotPassword:Nie,setUsernameSignIn:Pie,setUsernameSignUp:Mie},tae=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],nae=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",rae=(t,{data:e})=>e?.nextStep?.signInStep==="RESET_PASSWORD",sae=(t,{data:e})=>e?.nextStep.signInStep==="CONFIRM_SIGN_UP",oae=(t,{data:e})=>e?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",iae=(t,{data:e})=>e?.nextStep.signUpStep==="DONE"&&t.step==="CONFIRM_SIGN_UP",aae=(t,{data:e})=>e?.nextStep.signInStep==="DONE",lae=(t,{data:e})=>e?.nextStep.signUpStep==="DONE",uae=(t,{data:e})=>e?.nextStep.resetPasswordStep==="DONE",cae=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_COMPLETE",dae=(t,{data:e})=>e?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",fae=(t,{data:e})=>e?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",hae=(t,{data:e})=>e?.step==="RESET_PASSWORD",pae=(t,{data:e})=>e?.step==="CONFIRM_SIGN_UP",gae=({step:t})=>tae.includes(t),mae=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",vae=({step:t})=>t==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",yae=({step:t})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(t),bae=({step:t})=>t==="RESET_PASSWORD",Sae=({step:t})=>t==="CONFIRM_RESET_PASSWORD_WITH_CODE",Eae=({step:t})=>t==="CONFIRM_SIGN_UP",Cae=(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")},wae=(t,{data:e})=>e.message==="User is already confirmed.",xae=({availableAuthMethods:t,preferredChallenge:e,selectedAuthMethod:n})=>t&&t.length>1&&(!e||n===null),_ae=({passwordless:t,hasExistingPasskeys:e})=>{const{passkeyRegistrationPrompts:n}=t||{};return!n||e?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Aae=({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,Rae=({selectedAuthMethod:t,step:e})=>t!=null&&e==="SELECT_AUTH_METHOD",ob={hasCompletedAttributeConfirmation:cae,hasCompletedResetPassword:uae,hasCompletedSignIn:aae,hasCompletedSignUp:lae,hasPasskeyRegistrationPrompts:Tae,isConfirmSignUpStep:pae,isConfirmUserAttributeStep:dae,isResetPasswordStep:hae,isShouldConfirmUserAttributeStep:fae,isUserAlreadyConfirmed:wae,shouldAutoSignIn:oae,shouldManualSignIn:iae,shouldConfirmResetPassword:Sae,shouldConfirmSignIn:gae,shouldConfirmSignInWithNewPassword:nae,shouldConfirmSignUp:Eae,shouldConfirmSignUpFromSignIn:sae,shouldResetPassword:bae,shouldResetPasswordFromSignIn:rae,shouldReturnToSelectMethod:Rae,shouldSelectAuthMethod:xae,shouldSetupTotp:mae,shouldSetupEmail:vae,shouldSelectMfaType:yae,shouldVerifyAttribute:Cae,shouldPromptPasskeyRegistration:_ae,shouldPromptPasskeyRegistrationAfterSignup:Aae};var jC,zD;function qF(){if(zD)return jC;zD=1;var t=qT(),e=lp();function n(r,s,o){(o!==void 0&&!e(r[s],o)||o===void 0&&!(s in r))&&t(r,s,o)}return jC=n,jC}var BC,jD;function Iae(){if(jD)return BC;jD=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 BC=t,BC}var HC,BD;function Oae(){if(BD)return HC;BD=1;var t=Iae(),e=t();return HC=e,HC}var oh={exports:{}};oh.exports;var HD;function Nae(){return HD||(HD=1,(function(t,e){var n=Mo(),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 $C,$D;function Mae(){if($D)return $C;$D=1;var t=Z9();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return $C=e,$C}var qC,qD;function Pae(){if(qD)return qC;qD=1;var t=Mae();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return qC=e,qC}var WC,WD;function kae(){if(WD)return WC;WD=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 WC=t,WC}var VC,VD;function Dae(){if(VD)return VC;VD=1;var t=Ri(),e=Object.create,n=(function(){function r(){}return function(s){if(!t(s))return{};if(e)return e(s);r.prototype=s;var o=new r;return r.prototype=void 0,o}})();return VC=n,VC}var GC,GD;function Lae(){if(GD)return GC;GD=1;var t=Dae(),e=WT(),n=AT();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return GC=r,GC}var KC,KD;function Uae(){if(KD)return KC;KD=1;var t=Zy(),e=uu();function n(r){return e(r)&&t(r)}return KC=n,KC}var YC,YD;function Fae(){if(YD)return YC;YD=1;var t=md(),e=WT(),n=uu(),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 YC=f,YC}var ZC,ZD;function WF(){if(ZD)return ZC;ZD=1;function t(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}return ZC=t,ZC}var XC,XD;function zae(){if(XD)return XC;XD=1;var t=$F(),e=qT();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 XC=n,XC}var QC,QD;function jae(){if(QD)return QC;QD=1;var t=zae(),e=VT();function n(r){return t(r,e(r))}return QC=n,QC}var JC,JD;function Bae(){if(JD)return JC;JD=1;var t=qF(),e=Nae(),n=Pae(),r=kae(),s=Lae(),o=CT(),a=Ii(),u=Uae(),c=wT(),f=yT(),h=Ri(),g=Fae(),m=_T(),y=WF(),S=jae();function E(C,w,T,_,R,M,N){var O=y(C,T),k=y(w,T),F=N.get(k);if(F){t(C,T,F);return}var $=M?M(O,k,T+"",C,w,N):void 0,D=$===void 0;if(D){var z=a(k),q=!z&&c(k),Y=!z&&!q&&m(k);$=k,z||q||Y?a(O)?$=O:u(O)?$=r(O):q?(D=!1,$=e(k,!0)):Y?(D=!1,$=n(k,!0)):$=[]:g(k)||o(k)?($=O,o(O)?$=S(O):(!h(O)||f(O))&&($=s(k))):D=!1}D&&(N.set(k,$),R($,k,_,M,N),N.delete(k)),t(C,T,$)}return JC=E,JC}var ew,eL;function Hae(){if(eL)return ew;eL=1;var t=ET(),e=qF(),n=Oae(),r=Bae(),s=Ri(),o=VT(),a=WF();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 ew=u,ew}var tw,tL;function $ae(){if(tL)return tw;tL=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 tw=t,tw}var nw,nL;function qae(){if(nL)return nw;nL=1;var t=$ae(),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 nw=n,nw}var rw,rL;function Wae(){if(rL)return rw;rL=1;function t(e){return function(){return e}}return rw=t,rw}var sw,sL;function Vae(){if(sL)return sw;sL=1;var t=Wae(),e=HF(),n=$T(),r=e?function(s,o){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(o),writable:!0})}:n;return sw=r,sw}var ow,oL;function Gae(){if(oL)return ow;oL=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 ow=r,ow}var iw,iL;function Kae(){if(iL)return iw;iL=1;var t=Vae(),e=Gae(),n=e(t);return iw=n,iw}var aw,aL;function Yae(){if(aL)return aw;aL=1;var t=$T(),e=qae(),n=Kae();function r(s,o){return n(e(s,o,t),s+"")}return aw=r,aw}var lw,lL;function Zae(){if(lL)return lw;lL=1;var t=lp(),e=Zy(),n=Yy(),r=Ri();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 lw=s,lw}var uw,uL;function Xae(){if(uL)return uw;uL=1;var t=Yae(),e=Zae();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 uw=n,uw}var cw,cL;function Qae(){if(cL)return cw;cL=1;var t=Hae(),e=Xae(),n=e(function(r,s,o){t(r,s,o)});return cw=n,cw}var Jae=Qae();const ele=Ga(Jae),ib=async(t,e,n,r)=>{const s=await Promise.all(r.map(a=>a(t,e,n))),o=ele({},...s);return UT(o)?Promise.resolve():Promise.reject(o)},tle=8,nle=t=>Array.isArray(t),rle=t=>{if(t)return nle(t)?Object.entries(t).map(([e,n])=>Object.keys(n)[0]):Object.keys(t)},Fa={async getAmplifyConfig(){const t=T8.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=rle(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:nT,handleSignUp:yY,handleConfirmSignIn:v8,handleConfirmSignUp:_Y,handleForgotPasswordSubmit:EY,handleForgotPassword:m8,handleResendSignUpCode:wY,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??tle;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&&!doe(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 sle({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:{...dp,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,[Fa.validateFormPassword,Fa.validateConfirmPassword])}}})}const VF=t=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:t},onError:{actions:"setRemoteError",target:t}}}),ole=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"}},tm=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 ile({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:{...VF("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 DT();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:{...tm(["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:{...tm(["clearFormValues","clearError","clearTouched"])},setupEmail:{...tm(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...tm(["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:{...dp,sendUpdate:tb()},guards:ob,services:{async fetchUserAttributes(){return w8()},resetPassword({username:e}){return m8({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=ole(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}),v8({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(e,{data:n}){return C8(n)},async validateFields(e){return ib(e.formValues,e.touched,e.passwordSettings,[Fa.validateFormPassword,Fa.validateConfirmPassword])}}})}const ale={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},lle={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 ule({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",...lle}},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 DT();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:{...VF("signUp")},resetPassword:{invoke:{src:"resetPassword",...ale}},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:{...dp,sendUpdate:tb()},guards:ob,services:{autoSignIn(){return tT()},async fetchUserAttributes(){return w8()},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 C8(n)},handleSignUp(e){const{formValues:n,loginMechanisms:r,username:s,selectedAuthMethod:o,preferredChallenge:a}=e,u=r[0],f=pie(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 cle=()=>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:()=>nZ()}});function dle(){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:{...dp,sendUpdate:tb()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:t}}){return iZ({userAttributeKey:t})},async confirmVerifyUserAttribute({formValues:{confirmation_code:t},selectedUserAttribute:e}){return RY({confirmationCode:t,userAttributeKey:e})},async validateFields(t){return ib(t.formValues,t.touched,t.passwordSettings,[Fa.validateFormPassword,Fa.validateConfirmPassword])}}})}const nm=(t,e)=>{const n=mie(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:fle,stop:hle}=TF,kf=t=>hle(t),ple={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},gle={always:{actions:"configure",target:"getConfig"}};function mle(t){const{useNextWaitConfig:e,...n}=t??{};return yd({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Fa,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?gle:ple,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:{...dp,forwardToActor:fle([{cond:"hasActor",actions:gse(({actorRef:s})=>s)}]),setActorDoneData:ri({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:ri({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:vle(h)??{},initialState:f,loginMechanisms:a,passwordSettings:g,passwordless:m,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:ri({actorRef:(s,o)=>{const{services:a}=s,u=ile({services:a}).withContext(nm(s,"SIGN_IN"));return Pf(u,{name:"signInActor"})}}),spawnSignUpActor:ri({actorRef:(s,o)=>{const{services:a}=s,u=ule({services:a}).withContext(nm(s,"SIGN_UP"));return Pf(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:ri({actorRef:(s,o)=>{const{services:a}=s,u=sle({services:a}).withContext(nm(s,"FORGOT_PASSWORD"));return Pf(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ri({actorRef:s=>{const o=dle().withContext(nm(s));return Pf(o,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ri({actorRef:s=>{const o=cle().withContext({user:s?.user});return Pf(o,{name:"signOutActor"})}}),configure:ri((s,o)=>{const{services:a,...u}=kF(n)?o.data??{}:n;return{services:{...Fa,...a},config:u}}),setHasSetup:ri({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 vle(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 yle={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},ble={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"}},Sle={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}"}}},Ele={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}"}}}},Cle={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}"}}}},wle={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}"}}}},xle={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}"}}},_le={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}"}}},Ale={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}"}}},Rle={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}"}}},Ile={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}"}}}},Ole={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},Nle={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}"}}}}},Mle={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}"}}},Ple={height:{value:"{space.relative.full.value}"}},kle={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}"}},Dle={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}"}}},Lle={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)"}}}},Ule={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}"}}}}},zle={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},jle={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}"}},Ble={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}"}}},Hle={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"}}}},$le={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},qle={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}"}}},Wle={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},Vle={lineHeight:{value:1},height:{value:"1em"}},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={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},Yle={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}"}}},Zle={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}"}}},Xle={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Qle={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}"}}},Jle={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}"}}},eue={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"}}}},tue={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}"}}},nue={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}"}}}},rue={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},sue={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}"}}},oue={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}"}}}},iue={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}"}}},aue={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}"}}},lue={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}"}}}},uue={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}"}}}},cue={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}"}}},due={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"}}}},fue={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}"}}}},hue={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"}}}},pue={_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}"}}}},gue={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}"}}}},mue={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}"}}},vue={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}"}}},yue={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},bue={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}"}}},Sue={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}"}}}}},Eue={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Cue={accordion:Lle,aiConversation:Ele,alert:Sle,authenticator:wle,autocomplete:Cle,avatar:xle,badge:_le,breadcrumbs:Ale,button:Tle,card:Rle,checkbox:Ile,checkboxfield:Ole,collection:Nle,copy:Mle,countrycodeselect:Ple,divider:kle,dropzone:Dle,field:Ule,fieldcontrol:Fle,fieldgroup:zle,fieldmessages:Ble,fieldset:jle,fileuploader:Hle,flex:$le,heading:qle,icon:Vle,highlightmatch:Wle,image:Kle,inappmessaging:Yle,input:Gle,link:Zle,liveness:Xle,loader:Qle,menu:Jle,message:eue,pagination:tue,passwordfield:nue,phonenumberfield:rue,placeholder:sue,radio:oue,radiogroup:iue,rating:aue,searchfield:lue,select:uue,selectfield:cue,sliderfield:due,stepperfield:fue,storagemanager:hue,switchfield:pue,table:gue,tabs:mue,text:vue,textareafield:yue,textfield:bue,togglebutton:Sue,togglebuttongroup:Eue},wue={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`}}},si={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"}},xue={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}},_ue={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},Aue={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"}},Rue={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Iue={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},Oue={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}"}}},oi={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%"}}},Nue={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},Mue={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},Pue={components:Cue,borderWidths:yle,colors:ble,fonts:wue,fontSizes:si,fontWeights:xue,lineHeights:_ue,opacities:Aue,outlineOffsets:Tue,outlineWidths:Rue,radii:Iue,shadows:Oue,space:oi,time:Nue,transforms:Mue};si.xxs,si.xs,si.small,si.medium,si.large,si.xl,si.xxl,si.xxxl,oi.xxxs,oi.xs,oi.small,oi.medium,oi.large,oi.xl,oi.xxl,oi.xxxl;const kue={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},GF={tokens:Pue,breakpoints:kue,name:"default-theme"};var dw,dL;function Due(){if(dL)return dw;dL=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 dw=t,dw}var fw,fL;function Lue(){if(fL)return fw;fL=1;function t(e){return function(n){return e?.[n]}}return fw=t,fw}var hw,hL;function Uue(){if(hL)return hw;hL=1;var t=Lue(),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 hw=n,hw}var pw,pL;function Fue(){if(pL)return pw;pL=1;var t=Uue(),e=BT(),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 pw=f,pw}var gw,gL;function zue(){if(gL)return gw;gL=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return gw=e,gw}var mw,mL;function jue(){if(mL)return mw;mL=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 mw=e,mw}var vw,vL;function Bue(){if(vL)return vw;vL=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+",T="["+o+"]",_="["+a+"]",R="[^"+t+y+w+o+a+g+"]",M="\\ud83c[\\udffb-\\udfff]",N="(?:"+C+"|"+M+")",O="[^"+t+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",$="["+g+"]",D="\\u200d",z="(?:"+_+"|"+R+")",q="(?:"+$+"|"+R+")",Y="(?:"+S+"(?:d|ll|m|re|s|t|ve))?",te="(?:"+S+"(?:D|LL|M|RE|S|T|VE))?",H=N+"?",ee="["+m+"]?",de="(?:"+D+"(?:"+[O,k,F].join("|")+")"+ee+H+")*",ce="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",L=ee+H+de,V="(?:"+[T,k,F].join("|")+")"+L,K=RegExp([$+"?"+_+"+"+Y+"(?="+[E,$,"$"].join("|")+")",q+"+"+te+"(?="+[E,$+z,"$"].join("|")+")",$+"?"+z+"+"+Y,$+"+"+te,xe,ce,w,V].join("|"),"g");function J(oe){return oe.match(K)||[]}return vw=J,vw}var yw,yL;function Hue(){if(yL)return yw;yL=1;var t=zue(),e=jue(),n=BT(),r=Bue();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 yw=s,yw}var bw,bL;function $ue(){if(bL)return bw;bL=1;var t=Due(),e=Fue(),n=Hue(),r="['’]",s=RegExp(r,"g");function o(a){return function(u){return t(n(e(u).replace(s,"")),a,"")}}return bw=o,bw}var Sw,SL;function que(){if(SL)return Sw;SL=1;var t=$ue(),e=t(function(n,r,s){return n+(s?"-":"")+r.toLowerCase()});return Sw=e,Sw}var Wue=que();const KF=Ga(Wue),Vue=/\{([^}]+)\}/g;function YF(t){const e=new RegExp(Vue);if(typeof t=="string")return e.test(t);if(typeof t=="object"){let n=!1;for(const r in t)if(bi(t,r)){const s=t[r];if(YF(s)){n=!0;break}}return n}return!1}const Gue="amplify";function v_(t){return Object.entries(t).map(([e,n])=>{const r=ab(n)?n.toString():ZF({value:n});return`${KF(e)}:${r}; `}).join(" ")}function GT({path:t=[]}){return`${KF([Gue,...t].join(" "))}`}const Kue=["offsetX","offsetY","blurRadius","spreadRadius","color"];function ZF(t){const{value:e}=t;return yi(e)?CL(e):EL(e)?Kue.map(n=>CL(EL(t)?t[n]:e[n])).join(" "):e}function ab(t){return us(t)&&bi(t,"value")}function EL(t){return us(t)&&bi(t,"offsetX")}function CL(t){if(!t)return"";if(YF(t)){const e=t.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${GT({path:e})})`}return t}const wL=({token:t,path:e})=>{const n=`--${GT({path:e})}`,{value:r}=t,s=ZF(t);return{name:n,original:r,path:e,value:s,toString:()=>`var(${n})`}};function y_({tokens:t,path:e=[],setupToken:n}){if(bi(t,"value"))return n({token:t,path:e});const r={};for(const s in t)if(bi(t,s)){const o=t[s],a=us(o)?o:{value:o};r[s]=y_({tokens:a,path:e.concat(s),setupToken:n})}return r}function b_(t,e){e=e||[];for(var n in t)bi(t,n)&&(us(t[n])&&"value"in t[n]?e.push(t[n]):us(t[n])&&b_(t[n],e));return e}function XF(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(bi(u,a)&&a!=="__proto__"&&(r=f[a],o=u[a],f!==o))if(o&&(us(o)||(s=Array.isArray(o)))){s?(s=!1,c=r&&Array.isArray(r)?r:[]):c=r&&us(r)?r:{};var m=n.slice(0);m.push(a),f[a]=XF([c,o],e,m)}else o!==void 0&&(f[a]=o)}return f}function xL(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]=Yse(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(u).forEach(([f,h])=>{const{_modifiers:g={},_element:m={},_vars:y,...S}=h;n+=`${t}${f} { ${v_(S)} }
161
- `,n+=xL(`${t}${f}`,y)}),n+=`${t} { ${v_(c)} }
162
- `}return n+=xL(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 Yue({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=Si(u)?u(r):u;n+=ya(h,g),c&&c.forEach(m=>{const y=Si(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 _L({keys:t,value:e}){return t.reduce((n,r)=>({...n,[r]:{value:`{colors.${e}.${r}.value}`}}),{})}function Zue({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=Si(a)?a(e):a;n+=v_(u),n+=`
175
- }`}),n+=`
176
- }`}),n}function lb(t,e=GF){const n=XF([{},e,{...t,components:{}}]),{primaryColor:r,secondaryColor:s}=n;yi(r)&&(n.tokens.colors.primary=_L({keys:Object.keys(n.tokens.colors[r]),value:r})),yi(s)&&(n.tokens.colors.secondary=_L({keys:Object.keys(n.tokens.colors[s]),value:s}));const o=y_({tokens:n.tokens,setupToken:wL}),{breakpoints:a,name:u}=n;let c=`[data-amplify-theme="${u}"] {
177
- `+b_(o).map(h=>`${h.name}: ${h.value};`).join(`
178
- `)+`
179
- }
180
- `;t?.components&&(c+=Yue({theme:{...n,tokens:o},components:t.components}));let f=[];return n.animations&&(c+=Zue({animations:n.animations,tokens:o})),n.overrides&&(f=n.overrides.map(h=>{const g=y_({tokens:h.tokens,setupToken:wL}),m=b_(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 He=(...t)=>{const e=[];for(const n of t)if(n){if(yi(n)){e.push(n);continue}if(typeof n=="number"){e.push(n.toString());continue}if(Array.isArray(n)){e.push(He(...n));continue}if(us(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){e.push(n.toString());continue}for(const r in n)bi(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"},Xue=({componentName:t,packageName:e,version:n})=>{const r=[`ui-${e}`,n];switch(t){case"AIConversation":{ti({...kse,additionalDetails:[[t],r]});break}case"Authenticator":{ti({...Lse,additionalDetails:[[t],r]});break}case"ChangePassword":case"DeleteUser":{ti({...Dse,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{ti({...Use,additionalDetails:[[t],r]});break}case"InAppMessaging":{ti({...Fse,additionalDetails:[[t],r]});break}case"LocationSearch":{ti({...zse,additionalDetails:[[t],r]});break}case"MapView":{ti({...jse,additionalDetails:[[t],r]});break}case"StorageManager":{ti({...Bse,additionalDetails:[[t],r]});break}case"StorageBrowser":{ti({...Hse,additionalDetails:[[t],r]});break}}return Kse},S_=j.createContext(null),Que=t=>(e,n)=>{DF(e,n,t)};function QF({children:t}){const[e,n]=j.useState("configuring");j.useEffect(()=>{Py().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=x.useContext(S_),s=Sse(mle),o=x.useMemo(()=>r??{authStatus:e,service:s},[e,r,s]),{service:a}=o;return x.useEffect(()=>Zse(a,Que({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),j.createElement(S_.Provider,{value:o},t)}const Jue="`useAuthenticator` must be used inside an `Authenticator.Provider`.",ece=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],tce=t=>ece.some(e=>e===t),nce=()=>!1;function rce(t,e){return t.length!==e.length?!1:t.every((n,r)=>{const s=e[r];return Vse(n,s)||Gse(n,s)?!0:n===s})}const sce=t=>(e,n)=>{const r=t(e),s=t(n);return rce(r,s)},oce=t=>({...Nh(t)?.formFields?.setupTotp?.QR}),ice=t=>t.flatMap(([e,n])=>({name:e,...n})),ace=(t={})=>t&&Object.entries(t).map(([e,n])=>!yi(n)||!e?{}:{name:e,label:n,type:"radio",value:n}),lce=(t=[])=>t.map(e=>({name:"mfa_type",label:Ln.getMfaTypeLabelByValue(e),type:"radio",value:e})),uce=(t,e)=>tce(t)?t==="verifyUser"?ace(Nh(e).unverifiedUserAttributes):t==="selectMfaType"?lce(Nh(e).allowedMfaTypes):ice(Ooe(t,e)):[];function Et(t){const e=j.useContext(S_);if(!e)throw new Error(Jue);const{service:n}=e,{send:r}=n,s=x.useCallback(E=>({...toe({send:r,state:E})}),[r]),o=t?sce(t):nce,{authStatus:a}=e,u=Ase(n,s,o),{route:c,totpSecretCode:f,user:h,...g}=u,m=n.getSnapshot(),y=c==="setupTotp"?oce(m):null,S=uce(c,m);return{...g,authStatus:a,route:c,totpSecretCode:f,user:h,fields:S,QRFields:y}}const cce=({route:t})=>[t];function dce(t){const{route:e,initializeMachine:n}=Et(cce),r=j.useRef(!1);j.useEffect(()=>{!r.current&&e==="setup"&&(n(t),r.current=!0)},[n,e,t])}const fce=({shouldWarn:t,message:e})=>{x.useEffect(()=>{},[t,e])};function hce({componentName:t,packageName:e,version:n}){x.useEffect(()=>Xue({componentName:t,packageName:e,version:n}),[t,e,n])}const JF=x.createContext({theme:lb(),colorMode:void 0}),KT={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"},YT={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},E_={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"},pce=t=>t in E_,e7=t=>typeof t=="string"&&t.length===0,AL=t=>t==null||e7(t),ub=t=>Object.keys(t),ZT=(t,e,n)=>{if(typeof e!="string")return e;if(e.includes(" "))return e.split(" ").map(r=>ZT(t,r,n)).join(" ");if(pce(t)){const r=e.split("."),s=E_[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(--${GT({path:[E_[t],...r]})})`:e}return e},gce=({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},mce=t=>ub(t).reduce((e,n)=>n in GF.breakpoints.values?{...e,[n]:t[n]}:e,{}),vce=({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=mce(n)),gce({breakpoint:t,breakpoints:e,values:r})},yce=({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}})},bce=typeof window>"u"?x.useEffect:x.useLayoutEffect,Sce=({breakpoints:t,defaultBreakpoint:e})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,s=x.useMemo(()=>yce({breakpoints:t}),[t]),[o,a]=x.useState(e),u=x.useCallback((c,f)=>{c&&a(f)},[a]);return bce(()=>{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]),x.useDebugValue(o,c=>c),o},Ece=t=>typeof t>"u"||typeof t.theme>"u"?lb():t.theme,Cce=()=>{const t=x.useContext(JF);return Ece(t)},wce=({value:t,propKey:e,tokens:n})=>ab(t)?t.toString():yi(t)?yi(e)?ZT(e,t,n):t:null,xce=t=>t==="auto"||typeof t=="number"&&!isNaN(t)||typeof t=="string"&&!isNaN(parseFloat(t)),Ew=t=>t==="auto"?"auto":`span ${t}`,TL=t=>xce(t)?Ew(t):Array.isArray(t)?t.map(e=>Ew(e)):typeof t=="object"&&t!=null?Object.entries(t).reduce((e,[n,r])=>({...e,[n]:Ew(r)}),{}):null,_ce=t=>{const{rowSpan:e,columnSpan:n,row:r,column:s,...o}=t,{rowFromSpanValue:a,columnFromSpanValue:u}=x.useMemo(()=>({rowFromSpanValue:TL(e),columnFromSpanValue:TL(n)}),[e,n]);return{row:AL(r)?a:r,column:AL(s)?u:s,...o}},Ace=t=>t in KT,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(Ace(a)){const u=t[a];if(u==null||e7(u))return;const c=KT[a];let f="";ab(u)?f=u.toString():typeof u=="string"?f=ZT(a,u,s):typeof u=="number"?f=u:typeof u=="object"&&(f=wce({propKey:a,tokens:s,value:vce({values:u,breakpoint:n,breakpoints:r})})),e={...e,[c]:f}}else typeof t[a]<"u"&&(o[a]=t[a])}),{propStyles:e,nonStyleProps:o}},Rce=(t,e)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:s}=Cce(),o=Sce({breakpoints:n,defaultBreakpoint:r}),a=_ce(t);return x.useMemo(()=>Tce({props:a,style:e,breakpoint:o,breakpoints:n,tokens:s}),[a,e,n,o,s])},qt=t=>x.forwardRef(t),Ice=({as:t="div",children:e,testId:n,ariaLabel:r,isDisabled:s,style:o,inert:a,...u},c)=>{const{propStyles:f,nonStyleProps:h}=Rce(u,o);return x.createElement(t,{"aria-label":r,"data-testid":n,disabled:s,ref:c,inert:a?"":null,style:f,...h},e)},qe=qt(Ice);qe.displayName="View";const Df={minX:0,minY:0,width:24,height:24},Oce=({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)=>x.createElement("path",{...S,key:E}))),r&&(y=x.createElement("path",{d:r,fill:n})),x.createElement(qe,{as:e,className:He(le.Icon,t),ref:c,viewBox:`${f} ${h} ${g} ${m}`,...u},y)},t7=qt(Oce);t7.displayName="Icon";const Nce=x.createContext({});function cb(t){const e=x.useContext(Nce);if(t&&e)return e[t]}const Mce=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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"})))},Pce=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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"})))},kce=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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"})))},Dce=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},n7=({variation:t,ariaHidden:e,ariaLabel:n,role:r})=>{const s=cb("alert");let o;switch(t){case"info":o=s?.info??x.createElement(kce,{"aria-hidden":e,"aria-label":n,role:r});break;case"error":o=s?.error??x.createElement(Pce,{"aria-hidden":e,"aria-label":n,role:r});break;case"warning":o=s?.warning??x.createElement(Dce,{"aria-hidden":e,"aria-label":n,role:r});break;case"success":o=s?.success??x.createElement(Mce,{"aria-hidden":e,"aria-label":n,role:r});break}return o?x.createElement("span",{className:le.AlertIcon},o):null};n7.displayName="AlertIcon";const Lce=globalThis?.document?x.useLayoutEffect:()=>{},Uce="amplify-id",Fce=D8.useId||(()=>{});let zce=0;const za=t=>{const[e,n]=x.useState(Fce());return Lce(()=>{t||n(r=>r??String(zce++))},[t]),t??(e?`${Uce}-${e}`:"")},r7=x.createContext({isFieldsetDisabled:!1}),fp=t=>{let n=x.useContext(r7).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=t),{isFieldsetDisabled:n}},jce=({className:t,children:e,...n},r)=>x.createElement(qe,{className:He(le.Flex,t),ref:r,...n},e),ze=qt(jce);ze.displayName="Flex";const Bce="linear-empty",Hce="linear-filled",$ce="circular-empty",qce="circular-filled",RL=8,C_=42,rm=2*C_*Math.PI,Wce=({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=He(le.Loader,Ht(le.Loader,r),Ht(le.Loader,s),Br(le.Loader,"determinate",o),t),m=x.createElement("g",null,x.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":Bce}),x.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":Hce}),o?x.createElement("text",{"aria-live":"polite",className:He(le.LoaderLabel,a?le.VisuallyHidden:null),x:`${-1+u}%`,y:"200%"},h):null),y=x.createElement("g",null,x.createElement("circle",{cx:"50%",cy:"50%",r:`${C_}%`,strokeWidth:`${RL}%`,style:{stroke:String(n)},"data-testid":$ce}),x.createElement("circle",{cx:"50%",cy:"50%",r:`${C_}%`,strokeWidth:`${RL}%`,style:{stroke:String(e),strokeDasharray:o?`${rm}% ${rm}%`:void 0,strokeDashoffset:o?`${rm-rm*u/100}%`:void 0},"data-testid":qce}),o?x.createElement("text",{"aria-live":"polite",className:He(le.LoaderLabel,a?le.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return x.createElement(qe,{as:"svg","aria-valuenow":o?u:void 0,className:g,ref:f,role:"progressbar",...c},s==="linear"?m:y)},s7=qt(Wce);s7.displayName="Loader";const Vce=["link","primary",void 0],Gce=({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=Vce.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:y}=fp(s??o??h.disabled),S=He(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 x.createElement(qe,{ref:g,as:"button",className:S,isDisabled:y,type:c,...h},o?x.createElement(ze,{as:"span",className:le.ButtonLoaderWrapper},x.createElement(s7,{size:u}),a||null):e)},en=qt(Gce);en.displayName="Button";const Kce=t=>{const{className:e,size:n,...r}=t;return x.createElement(qe,{as:"span",width:n??"1em",height:n??"1em",className:He(le.Icon,e),...r},x.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},x.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"})))},Yce=({as:t="p",className:e,children:n,isTruncated:r,variation:s,...o},a)=>{const u=He(le.Text,Ht(le.Text,s),Br(le.Text,"truncated",r),e);return x.createElement(qe,{as:t,className:u,ref:a,...o},n)},Rs=qt(Yce);Rs.displayName="Text";const Zce="qa-field-description",db=({descriptiveText:t,labelHidden:e,...n})=>t?x.createElement(Rs,{"data-testid":Zce,className:He(le.FieldDescription,{[le.VisuallyHidden]:e}),...n},t):null;db.displayName="FieldDescription";const fb=({errorMessage:t,hasError:e,...n})=>e&&t?x.createElement(Rs,{className:le.FieldErrorMessage,...n},t):null;fb.displayName="FieldErrorMessage";const Xce=({children:t,className:e,visuallyHidden:n,...r},s)=>x.createElement(qe,{as:"label",className:He(le.Label,e,{[le.VisuallyHidden]:n}),ref:s,...r},t),XT=qt(Xce);XT.displayName="Label";const Qce=({buttonRef:t,children:e,className:n,dismissButtonLabel:r=YT.Alert.dismissButtonLabel,hasIcon:s=!0,heading:o,isDismissible:a=!1,onDismiss:u,variation:c,...f},h)=>{const[g,m]=x.useState(!1),y=cb("alert"),S=x.useCallback(()=>{m(!g),Si(u)&&u()},[m,u,g]);return g?null:x.createElement(ze,{className:He(le.Alert,n,Ht(le.Alert,c)),ref:h,role:"alert",...f},s&&x.createElement(n7,{variation:c,ariaHidden:!0}),x.createElement(qe,{flex:"1"},o&&x.createElement(qe,{className:le.AlertHeading},o),x.createElement(qe,{className:le.AlertBody},e)),a&&x.createElement(en,{ariaLabel:r,variation:"link",className:le.AlertDismiss,onClick:S,ref:t},y?.close??x.createElement(Kce,{"aria-hidden":"true"})))},o7=qt(Qce);o7.displayName="Alert";const Dl=(t,e)=>t&&e?`${t}-${e}`:void 0,Jce=({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=He(le.FieldGroup,m,y,Ht(le.FieldGroup,s),e);return x.createElement(ze,{className:S,ref:f,...c},a&&x.createElement(qe,{className:He(le.FieldGroupOuterStart,Ht(le.FieldGroupOuterStart,u))},a),x.createElement(qe,{className:He(le.FieldGroupFieldWrapper,Ht(le.FieldGroupFieldWrapper,s))},r&&x.createElement(qe,{className:le.FieldGroupInnerStart},r),t,n&&x.createElement(qe,{className:le.FieldGroupInnerEnd},n)),o&&x.createElement(qe,{className:He(le.FieldGroupOuterEnd,Ht(le.FieldGroupOuterEnd,u))},o))},i7=qt(Jce);i7.displayName="FieldGroup";const ede=({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=He(le.Input,le.FieldGroupControl,Ht(le.Input,y),Br(le.Input,"error",g),Ht(le.Input,f),n),{isFieldsetDisabled:w}=fp(a);return x.createElement(qe,{"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})},QT=qt(ede);QT.displayName="Input";const tde=t=>t in KT,a7=t=>{const e={styleProps:{},rest:{}};return Object.keys(t).forEach(n=>{tde(n)?e.styleProps={...e.styleProps,[n]:t[n]}:e.rest={...e.rest,[n]:t[n]}}),e},JT=t=>{const e=t.filter(n=>n!==void 0).join(" ");return e.length>0?e:void 0},eR="error",tR="description",nde=(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,T=za(a),_=za(),R=r?Dl(_,tR):void 0,M=o?Dl(_,eR):void 0,N=JT([M,R]),{styleProps:O,rest:k}=a7(w);return x.createElement(ze,{className:He(le.Field,Ht(le.Field,y),le.TextField,n),testId:S,...O},x.createElement(XT,{htmlFor:T,visuallyHidden:h},f),x.createElement(db,{id:R,labelHidden:h,descriptiveText:r}),x.createElement(i7,{outerStartComponent:m,outerEndComponent:g,innerStartComponent:c,innerEndComponent:u,variation:E},x.createElement(QT,{"aria-describedby":N,hasError:o,id:T,ref:e,size:y,variation:E,...C,...k})),x.createElement(fb,{id:M,hasError:o,errorMessage:s}))},hp=qt(nde);hp.displayName="TextField";const rde=({as:t="span",children:e,className:n,...r},s)=>x.createElement(qe,{as:t,className:He(le.VisuallyHidden,n),ref:s,...r},e),hb=qt(rde);hb.displayName="VisuallyHidden";const sde=({className:t,orientation:e="horizontal",size:n,label:r,...s},o)=>{const a=He(le.Divider,Ht(le.Divider,e),Ht(le.Divider,n),t);return x.createElement(qe,{"aria-orientation":e,as:"hr",className:a,"data-label":r,ref:o,...s})},nR=qt(sde);nR.displayName="Divider";const ode=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},ide=({children:t,className:e,isDisabled:n,legend:r,legendHidden:s,size:o,testId:a,variation:u="plain",...c},f)=>{const{isFieldsetDisabled:h}=fp(n),g=x.useMemo(()=>({isFieldsetDisabled:h}),[h]),m=He(le.Fieldset,Ht(le.Fieldset,u),Ht(le.Fieldset,o),e),y=He(le.FieldsetLegend,Ht(le.FieldsetLegend,o),{[le.VisuallyHidden]:s});return x.createElement(r7.Provider,{value:g},x.createElement(ze,{as:"fieldset",className:m,ref:f,disabled:h,testId:a,...c},x.createElement(hb,{as:"legend"},r),x.createElement(qe,{as:"div","aria-hidden":"true",className:y},r),t))},l7=qt(ide);l7.displayName="Fieldset";const ade={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},lde=({className:t,children:e,isTruncated:n,level:r=6,...s},o)=>x.createElement(qe,{as:ade[r],className:He(le.Heading,Ht(le.Heading,r),Br(le.Heading,"truncated",n),t),ref:o,...s},e),Ar=qt(lde);Ar.displayName="Heading";var ude=x.createContext(void 0),cde=t=>{const{dir:e,children:n}=t;return I.jsx(ude.Provider,{value:e,children:n})};const dde=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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"})))},fde=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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:hde,passwordIsShown:pde,showPassword:gde}=YT.PasswordField,mde=({fieldType:t,passwordIsHiddenLabel:e=hde,passwordIsShownLabel:n=pde,showPasswordButtonLabel:r=gde,size:s,hasError:o,...a},u)=>{const c=cb("passwordField"),f=He(le.FieldShowPassword,Br(le.FieldShowPassword,"error",o)),h=t==="password"?c?.visibility??x.createElement(fde,{"aria-hidden":"true"}):c?.visibilityOff??x.createElement(dde,{"aria-hidden":"true"});return x.createElement(en,{"aria-checked":t!=="password",ariaLabel:r,className:f,colorTheme:o?"error":void 0,ref:u,role:"switch",size:s,...a},x.createElement(hb,{"aria-live":"polite"},t==="password"?e:n),h)},u7=qt(mde);u7.displayName="ShowPasswordButton";const vde=({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]=x.useState("password"),S=x.useCallback(()=>{y(m==="password"?"text":"password")},[y,m]);return x.createElement(hp,{autoComplete:t,outerEndComponent:r?null:x.createElement(u7,{fieldType:m,onClick:S,passwordIsHiddenLabel:s,passwordIsShownLabel:o,ref:u,size:c,showPasswordButtonLabel:a,hasError:f}),size:c,type:m,label:e,className:He(le.PasswordField,n),ref:g,hasError:f,...h})},rR=qt(vde);rR.displayName="PasswordField";const yde=({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 T=s===void 0&&o===void 0&&h,_=y||S>1,R=He(le.Select,le.FieldGroupControl,Ht(le.Select,n),Ht(le.Select,r),Br(le.Select,"error",a),Br(le.Select,"expanded",_),e),M=cb("select"),{isFieldsetDisabled:N}=fp(g);return x.createElement(qe,{className:le.SelectWrapper},x.createElement(qe,{"aria-invalid":a,as:"select",autoComplete:t,value:s,defaultValue:T?"":o,isDisabled:N,multiple:y,size:S,required:m,className:R,ref:C,...E},h&&x.createElement("option",{value:""},h),f),_?null:x.createElement(ze,{className:He(le.SelectIcon,Ht(le.SelectIcon,n)),color:c,"aria-hidden":"true"},u??M?.expand??x.createElement(ode,null)))},c7=qt(yde);c7.displayName="Select";const bde=({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)=>x.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),Sde=(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=za(u),C=za(),w=s?Dl(C,tR):void 0,T=a?Dl(C,eR):void 0,_=JT([T,w]),{styleProps:R,rest:M}=a7(S);return x.createElement(ze,{className:He(le.Field,Ht(le.Field,g),le.SelectField,r),testId:m,...R},x.createElement(XT,{htmlFor:E,visuallyHidden:f},c),x.createElement(db,{id:w,labelHidden:f,descriptiveText:s}),x.createElement(c7,{"aria-describedby":_,hasError:a,id:E,ref:e,size:g,...M,...y},bde({children:n,options:h})),x.createElement(fb,{id:T,hasError:a,errorMessage:o}))},d7=qt(Sde);d7.displayName="SelectField";const Ede=({className:t,dialCodeList:e,isReadOnly:n,...r},s)=>{const o=e??LF,a=x.useMemo(()=>o.map(u=>x.createElement("option",{key:u,value:u,disabled:n},u)),[o,n]);return x.createElement(d7,{"aria-disabled":n,autoComplete:"tel-country-code",className:He(le.CountryCodeSelect,le.DialCodeSelect,t),labelHidden:!0,ref:s,...r},a)},f7=qt(Ede);f7.displayName="DialCodeSelect";const Cde=({autoComplete:t="tel-national",className:e,defaultDialCode:n,dialCodeLabel:r=YT.PhoneNumberField.countryCodeLabel,dialCodeList:s,dialCodeName:o,dialCodeRef:a,hasError:u,isDisabled:c,isReadOnly:f,onDialCodeChange:h,onInput:g,size:m,variation:y,...S},E)=>x.createElement(hp,{outerStartComponent:x.createElement(f7,{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:He(le.PhoneNumberField,e),hasError:u,isDisabled:c,isReadOnly:f,onInput:g,ref:E,size:m,type:"tel",variation:y,...S}),h7=qt(Cde);h7.displayName="PhoneNumberField";const wde={name:"default"},p7=j.createContext(wde),xde=()=>x.useContext(p7),_de=({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:T}=xde(),{isFieldsetDisabled:_}=fp(y||r||E&&h!==o),R=f!==void 0?o===f:void 0,M=h!==void 0?o===h:void 0,N=a??T;return x.createElement(ze,{as:"label",className:He(le.Radio,Br(le.Radio,"disabled",_),N?`amplify-label-${N}`:null,e)},t&&x.createElement(Rs,{as:"span",className:He(le.RadioLabel,Br(le.RadioLabel,"disabled",_))},t),x.createElement(QT,{checked:R,className:He(le.VisuallyHidden,le.RadioInput),defaultChecked:M,hasError:m,id:n,isDisabled:_,isReadOnly:E,isRequired:S,onChange:C,ref:c,type:"radio",name:g,value:o,...u}),x.createElement(ze,{"aria-hidden":"true",as:"span",className:He(le.RadioButton,Ht(le.RadioButton,w)),testId:s}))},sR=qt(_de);sR.displayName="Radio";const Ade=({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:T,..._},R)=>{const M=za(a),N=za(),O=r?Dl(N,tR):void 0,k=o?Dl(N,eR):void 0,F=JT([k,O]),$=Dl(C,le.RadioGroup),D=x.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 x.createElement(l7,{className:He(le.Field,Ht(le.Field,E),le.RadioGroupField,e),isDisabled:u,legend:h,legendHidden:g,ref:R,role:"radiogroup",size:E,testId:C,variation:T,..._},x.createElement(db,{id:O,labelHidden:g,descriptiveText:r}),x.createElement(ze,{"aria-describedby":F,className:le.RadioGroup,id:M,testId:$},x.createElement(p7.Provider,{value:D},t)),x.createElement(fb,{id:k,hasError:o,errorMessage:s}))},oR=qt(Ade);oR.displayName="RadioGroupField";const pb=x.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),g7="-",Tde=({className:t,value:e,children:n,onClick:r,as:s="button",role:o="tab",...a},u)=>{const{activeTab:c,setActiveTab:f,groupId:h}=x.useContext(pb);let g=e;typeof g=="string"&&(g=g.replace(" ",g7));const m=c===e,y=S=>{Si(r)&&r?.(S),f(e)};return x.createElement(qe,{...a,role:o,as:s,id:`${h}-tab-${g}`,"aria-selected":m,"aria-controls":`${h}-panel-${g}`,tabIndex:m?void 0:-1,className:He(le.TabsItem,Br(le.TabsItem,"active",c===e),t),ref:u,onClick:y},n)},iR=qt(Tde);iR.displayName="Tabs.Item";const Rde=t=>x.isValidElement(t),Ide=({className:t,children:e,indicatorPosition:n,spacing:r,role:s="tablist",...o},a)=>{const u=x.useRef(null),{activeTab:c,setActiveTab:f}=x.useContext(pb);x.useImperativeHandle(a,()=>u.current);const h=x.useMemo(()=>x.Children.toArray(e).map(E=>{if(E&&Rde(E))return E.props.value}).filter(E=>!!E),[e]),g=h.indexOf(c),m=x.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 T=C[E];T?.focus(),T?.click()}},[g,f,h]),y=x.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 T=C[E];T?.focus(),T?.click()}},[g,f,h]),S=x.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 x.createElement(qe,{...o,role:s,onKeyDown:S,className:He(le.TabsList,n?Ht(le.TabsList,n):null,r?Ht(le.TabsList,r):null,t),ref:u},e)},aR=qt(Ide);aR.displayName="Tabs.List";const Ode=({className:t,value:e,children:n,role:r="tabpanel",...s},o)=>{const{activeTab:a,isLazy:u,groupId:c}=x.useContext(pb);if(u&&a!==e)return null;let f=e;return typeof f=="string"&&(f=f.replace(" ",g7)),x.createElement(qe,{...s,role:r,id:`${c}-panel-${f}`,"aria-labelledby":`${c}-tab-${f}`,className:He(le.TabsPanel,Br(le.TabsPanel,"active",a===e),t),ref:o},n)},lR=qt(Ode);lR.displayName="Tabs.Panel";const Nde=({children:t,defaultValue:e,className:n,value:r,onValueChange:s,isLazy:o,...a},u)=>{const c=za(),f=r!==void 0,[h,g]=x.useState(()=>f?r:e),m=f?r:h??"",y=x.useCallback(E=>{Si(s)&&s(E),f||g(E)},[s,f]),S=x.useMemo(()=>({activeTab:m,isLazy:o,setActiveTab:y,groupId:c}),[m,y,o,c]);return x.createElement(pb.Provider,{value:S},x.createElement(qe,{...a,ref:u,className:He(n,le.Tabs)},t))},uR=qt(Nde);uR.displayName="Tabs.Container";const Mde=({items:t,indicatorPosition:e,justifyContent:n,spacing:r,...s},o)=>x.createElement(uR,{...s,ref:o},x.createElement(aR,{indicatorPosition:e,justifyContent:n,spacing:r},t?.map(({value:a,label:u,content:c,...f})=>x.createElement(iR,{...f,key:a,value:a},u))),t?.map(({value:a,content:u,isDisabled:c})=>x.createElement(lR,{key:a,value:a,isDisabled:c},u))),wl=Object.assign(qt(Mde),{Item:iR,List:aR,Panel:lR,Container:uR});wl.displayName="Tabs";const Cw=({errors:t,id:e,dataAttr:n})=>{if(!(t?.length>0))return null;const r=n?{[n]:!0}:{};return j.createElement(qe,{...r,id:e},t.map(s=>j.createElement(Rs,{key:s,role:"alert",variation:"error"},ye(s))))},Pde="6.15.4",kde=({message:t,shouldWarn:e})=>{fce({message:t,shouldWarn:e})},m7=x.createContext(null),ds=()=>{const t=x.useContext(m7);if(!t)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return t},Dde=t=>{const e=new FormData(t.target);return Object.fromEntries(e)};function fs(){const{submitForm:t,updateBlur:e,updateForm:n}=Et(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=x.useCallback(({target:{name:a}})=>{e({name:a})},[e]),s=x.useCallback(({target:{checked:a,name:u,type:c,value:f}})=>{n({name:u,value:c==="checkbox"&&!a?void 0:f})},[n]),o=x.useCallback(a=>{a.preventDefault(),t(Dde(a))},[t]);return{handleBlur:r,handleChange:s,handleSubmit:o}}const Vr=()=>{const{error:t}=Et(e=>[e.error]);return j.createElement(j.Fragment,null,t?j.createElement(o7,{variation:"error",isDismissible:!0},ye(t)):null)};function IL({autocomplete:t,dialCode:e,name:n,type:r,...s}){const{validationErrors:o}=Et(({validationErrors:h})=>[h]),a=x.useMemo(()=>ioe(o[n]),[n,o]),u=a?.length>0,c=za(),f=u?c:void 0;return r==="tel"?x.createElement(x.Fragment,null,x.createElement(h7,{...s,name:n,defaultDialCode:e,dialCodeName:"country_code",autoComplete:t,hasError:u,"aria-describedby":f}),x.createElement(Cw,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):r==="password"?x.createElement(x.Fragment,null,x.createElement(rR,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,"aria-describedby":f}),x.createElement(Cw,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):x.createElement(x.Fragment,null,x.createElement(hp,{...s,name:n,autoCapitalize:"off",autoComplete:t,hasError:u,type:r,"aria-describedby":f}),x.createElement(Cw,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c}))}function Po({includePassword:t}={}){const{fields:e}=Et(({route:u})=>[u]),{selectedAuthMethod:n,preferredChallenge:r}=Et(u=>[u.selectedAuthMethod,u.preferredChallenge]),s=n??r,o=t??(!s||s==="PASSWORD"),a=x.useRef(e.map((u,c)=>(u.name==="password"||u.name==="confirm_password")&&!o?x.createElement(IL,{key:c,...u,isRequired:!1}):x.createElement(IL,{key:c,...u})).filter(Boolean)).current;return x.createElement(x.Fragment,null,a)}function qr({children:t,className:e,variation:n="default"}){Et(({route:o})=>[o]);const{components:{Header:r,Footer:s}}=ds();return j.createElement(qe,{className:e,"data-amplify-authenticator":"","data-variation":n},j.createElement(qe,{"data-amplify-container":""},j.createElement(r,null),j.createElement(qe,{"data-amplify-router":"","data-amplify-router-content":void 0},t),j.createElement(s,null)))}const{getDeliveryMessageText:Lde,getDeliveryMethodText:Ude,getConfirmingText:Fde,getConfirmText:zde,getResendCodeText:jde}=Ln;function Vl({className:t,variation:e}){const{isPending:n,resendCode:r,codeDeliveryDetails:s}=Et(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=fs(),{components:{ConfirmSignUp:{Header:u=Vl.Header,Footer:c=Vl.Footer}}}=ds();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(ze,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(ze,{direction:"column"},j.createElement(Rs,{className:"amplify-authenticator__subtitle"},Lde(s)),j.createElement(Po,null),j.createElement(Vr,null),j.createElement(en,{variation:"primary",isDisabled:n,type:"submit",loadingText:Fde(),isLoading:n},zde()),j.createElement(en,{onClick:r,type:"button"},jde())),j.createElement(c,null))))}const Bde=()=>{const{codeDeliveryDetails:t}=Et(e=>[e.codeDeliveryDetails]);return j.createElement(Ar,{level:4},Ude(t))};Vl.Header=Bde;Vl.Footer=function(){return null};const{getChangePasswordText:v7,getChangingText:Hde,getBackToSignInText:$de}=Ln,Xs=({className:t,variation:e})=>{const{isPending:n,toSignIn:r}=Et(h=>[h.isPending,h.toSignIn]),{handleBlur:s,handleChange:o,handleSubmit:a}=fs(),{components:{ForceNewPassword:{FormFields:u=Xs.FormFields,Header:c=Xs.Header,Footer:f=Xs.Footer}}}=ds();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(ze,{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:Hde()},v7()),j.createElement(en,{onClick:r,type:"button",variation:"link",size:"small"},$de()),j.createElement(f,null))))};Xs.FormFields=function(){return j.createElement(Po,null)};Xs.Header=function(){return j.createElement(Ar,{level:4},v7())};Xs.Footer=function(){return null};var ac={},ww,OL;function qde(){return OL||(OL=1,ww=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ww}var xw={},pa={},NL;function cu(){if(NL)return pa;NL=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 _w={},ML;function cR(){return ML||(ML=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}}})(_w)),_w}var Aw,PL;function Wde(){if(PL)return Aw;PL=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++}},Aw=t,Aw}var Tw,kL;function Vde(){if(kL)return Tw;kL=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]},Tw=t,Tw}var Rw={},DL;function Gde(){return DL||(DL=1,(function(t){const e=cu().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}})(Rw)),Rw}var Iw={},LL;function Kde(){if(LL)return Iw;LL=1;const t=cu().getSymbolSize,e=7;return Iw.getPositions=function(r){const s=t(r);return[[0,0],[s-e,0],[0,s-e]]},Iw}var Ow={},UL;function Yde(){return UL||(UL=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}})(Ow)),Ow}var sm={},FL;function y7(){if(FL)return sm;FL=1;const t=cR(),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 sm.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}},sm.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}},sm}var Nw={},Lf={},zL;function Zde(){if(zL)return Lf;zL=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 jL;function Xde(){return jL||(jL=1,(function(t){const e=Zde();t.mul=function(r,s){const o=new Uint8Array(r.length+s.length-1);for(let a=0;a<r.length;a++)for(let u=0;u<s.length;u++)o[a+u]^=e.mul(r[a],s[u]);return o},t.mod=function(r,s){let o=new Uint8Array(r);for(;o.length-s.length>=0;){const a=o[0];for(let c=0;c<s.length;c++)o[c]^=e.mul(s[c],a);let u=0;for(;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let o=0;o<r;o++)s=t.mul(s,new Uint8Array([1,e.exp(o)]));return s}})(Nw)),Nw}var Mw,BL;function Qde(){if(BL)return Mw;BL=1;const t=Xde();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},Mw=e,Mw}var Pw={},kw={},Dw={},HL;function b7(){return HL||(HL=1,Dw.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Dw}var mo={},$L;function S7(){if($L)return mo;$L=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
- ]))+`;mo.KANJI=new RegExp(n,"g"),mo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),mo.BYTE=new RegExp(r,"g"),mo.NUMERIC=new RegExp(t,"g"),mo.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return mo.testKanji=function(c){return s.test(c)},mo.testNumeric=function(c){return o.test(c)},mo.testAlphanumeric=function(c){return a.test(c)},mo}var qL;function du(){return qL||(qL=1,(function(t){const e=b7(),n=S7();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}}})(kw)),kw}var WL;function Jde(){return WL||(WL=1,(function(t){const e=cu(),n=y7(),r=cR(),s=du(),o=b7(),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),T=(C-w)*8;if(E===s.MIXED)return T;const _=T-f(E,y);switch(E){case s.NUMERIC:return Math.floor(_/10*3);case s.ALPHANUMERIC:return Math.floor(_/11*2);case s.KANJI:return Math.floor(_/13);case s.BYTE:default:return Math.floor(_/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}})(Pw)),Pw}var Lw={},VL;function efe(){if(VL)return Lw;VL=1;const t=cu(),e=1335,n=21522,r=t.getBCHDigit(e);return Lw.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},Lw}var Uw={},Fw,GL;function tfe(){if(GL)return Fw;GL=1;const t=du();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))},Fw=e,Fw}var zw,KL;function nfe(){if(KL)return zw;KL=1;const t=du(),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)},zw=n,zw}var jw,YL;function rfe(){return YL||(YL=1,jw=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}),jw}var Bw,ZL;function sfe(){if(ZL)return Bw;ZL=1;const t=rfe(),e=du();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)},Bw=n,Bw}var Hw,XL;function ofe(){if(XL)return Hw;XL=1;const t=du(),e=cu();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)}},Hw=n,Hw}var $w={exports:{}},QL;function ife(){return QL||(QL=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})($w)),$w.exports}var JL;function afe(){return JL||(JL=1,(function(t){const e=du(),n=tfe(),r=nfe(),s=sfe(),o=ofe(),a=S7(),u=cu(),c=ife();function f(w){return unescape(encodeURIComponent(w)).length}function h(w,T,_){const R=[];let M;for(;(M=w.exec(_))!==null;)R.push({data:M[0],index:M.index,mode:T,length:M[0].length});return R}function g(w){const T=h(a.NUMERIC,e.NUMERIC,w),_=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=[]),T.concat(_,R,M).sort(function(O,k){return O.index-k.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function m(w,T){switch(T){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(T,_){const R=T.length-1>=0?T[T.length-1]:null;return R&&R.mode===_.mode?(T[T.length-1].data+=_.data,T):(T.push(_),T)},[])}function S(w){const T=[];for(let _=0;_<w.length;_++){const R=w[_];switch(R.mode){case e.NUMERIC:T.push([R,{data:R.data,mode:e.ALPHANUMERIC,length:R.length},{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.ALPHANUMERIC:T.push([R,{data:R.data,mode:e.BYTE,length:R.length}]);break;case e.KANJI:T.push([R,{data:R.data,mode:e.BYTE,length:f(R.data)}]);break;case e.BYTE:T.push([{data:R.data,mode:e.BYTE,length:f(R.data)}])}}return T}function E(w,T){const _={},R={start:{}};let M=["start"];for(let N=0;N<w.length;N++){const O=w[N],k=[];for(let F=0;F<O.length;F++){const $=O[F],D=""+N+F;k.push(D),_[D]={node:$,lastCount:0},R[D]={};for(let z=0;z<M.length;z++){const q=M[z];_[q]&&_[q].node.mode===$.mode?(R[q][D]=m(_[q].lastCount+$.length,$.mode)-m(_[q].lastCount,$.mode),_[q].lastCount+=$.length):(_[q]&&(_[q].lastCount=$.length),R[q][D]=m($.length,$.mode)+4+e.getCharCountIndicator($.mode,T))}}M=k}for(let N=0;N<M.length;N++)R[M[N]].end=0;return{map:R,table:_}}function C(w,T){let _;const R=e.getBestModeForData(w);if(_=e.from(T,R),_!==e.BYTE&&_.bit<R.bit)throw new Error('"'+w+'" cannot be encoded with mode '+e.toString(_)+`.
212
- Suggested mode is: `+e.toString(R));switch(_===e.KANJI&&!u.isKanjiModeEnabled()&&(_=e.BYTE),_){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(T){return T.reduce(function(_,R){return typeof R=="string"?_.push(C(R,null)):R.data&&_.push(C(R.data,R.mode)),_},[])},t.fromString=function(T,_){const R=g(T,u.isKanjiModeEnabled()),M=S(R),N=E(M,_),O=c.find_path(N.map,"start","end"),k=[];for(let F=1;F<O.length-1;F++)k.push(N.table[O[F]].node);return t.fromArray(y(k))},t.rawSplit=function(T){return t.fromArray(g(T,u.isKanjiModeEnabled()))}})(Uw)),Uw}var e4;function lfe(){if(e4)return xw;e4=1;const t=cu(),e=cR(),n=Wde(),r=Vde(),s=Gde(),o=Kde(),a=Yde(),u=y7(),c=Qde(),f=Jde(),h=efe(),g=du(),m=afe();function y(N,O){const k=N.size,F=o.getPositions(O);for(let $=0;$<F.length;$++){const D=F[$][0],z=F[$][1];for(let q=-1;q<=7;q++)if(!(D+q<=-1||k<=D+q))for(let Y=-1;Y<=7;Y++)z+Y<=-1||k<=z+Y||(q>=0&&q<=6&&(Y===0||Y===6)||Y>=0&&Y<=6&&(q===0||q===6)||q>=2&&q<=4&&Y>=2&&Y<=4?N.set(D+q,z+Y,!0,!0):N.set(D+q,z+Y,!1,!0))}}function S(N){const O=N.size;for(let k=8;k<O-8;k++){const F=k%2===0;N.set(k,6,F,!0),N.set(6,k,F,!0)}}function E(N,O){const k=s.getPositions(O);for(let F=0;F<k.length;F++){const $=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($+z,D+q,!0,!0):N.set($+z,D+q,!1,!0)}}function C(N,O){const k=N.size,F=f.getEncodedBits(O);let $,D,z;for(let q=0;q<18;q++)$=Math.floor(q/3),D=q%3+k-8-3,z=(F>>q&1)===1,N.set($,D,z,!0),N.set(D,$,z,!0)}function w(N,O,k){const F=N.size,$=h.getEncodedBits(O,k);let D,z;for(D=0;D<15;D++)z=($>>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 T(N,O){const k=N.size;let F=-1,$=k-1,D=7,z=0;for(let q=k-1;q>0;q-=2)for(q===6&&q--;;){for(let Y=0;Y<2;Y++)if(!N.isReserved($,q-Y)){let te=!1;z<O.length&&(te=(O[z]>>>D&1)===1),N.set($,q-Y,te),D--,D===-1&&(z++,D=7)}if($+=F,$<0||k<=$){$-=F,F=-F;break}}}function _(N,O,k){const F=new n;k.forEach(function(Y){F.put(Y.mode.bit,4),F.put(Y.getLength(),g.getCharCountIndicator(Y.mode,N)),Y.write(F)});const $=t.getSymbolTotalCodewords(N),D=u.getTotalCodewordsCount(N,O),z=($-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 Y=0;Y<q;Y++)F.put(Y%2?17:236,8);return R(F,N,O)}function R(N,O,k){const F=t.getSymbolTotalCodewords(O),$=u.getTotalCodewordsCount(O,k),D=F-$,z=u.getBlocksCount(O,k),q=F%z,Y=z-q,te=Math.floor(F/z),H=Math.floor(D/z),ee=H+1,de=te-H,ce=new c(de);let xe=0;const L=new Array(z),V=new Array(z);let K=0;const J=new Uint8Array(N.buffer);for(let _e=0;_e<z;_e++){const Xe=_e<Y?H:ee;L[_e]=J.slice(xe,xe+Xe),V[_e]=ce.encode(L[_e]),xe+=Xe,K=Math.max(K,Xe)}const oe=new Uint8Array(F);let he=0,ue,ve;for(ue=0;ue<K;ue++)for(ve=0;ve<z;ve++)ue<L[ve].length&&(oe[he++]=L[ve][ue]);for(ue=0;ue<de;ue++)for(ve=0;ve<z;ve++)oe[he++]=V[ve][ue];return oe}function M(N,O,k,F){let $;if(Array.isArray(N))$=m.fromArray(N);else if(typeof N=="string"){let te=O;if(!te){const H=m.rawSplit(N);te=f.getBestVersionForData(H,k)}$=m.fromString(N,te||40)}else throw new Error("Invalid data");const D=f.getBestVersionForData($,k);if(!D)throw new Error("The amount of data is too big to be stored in a QR Code");if(!O)O=D;else if(O<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=_(O,k,$),q=t.getSymbolSize(O),Y=new r(q);return y(Y,O),S(Y),E(Y,O),w(Y,k,0),O>=7&&C(Y,O),T(Y,z),isNaN(F)&&(F=a.getBestMask(Y,w.bind(null,Y,k))),a.applyMask(F,Y),w(Y,k,F),{modules:Y,version:O,errorCorrectionLevel:k,maskPattern:F,segments:$}}return xw.create=function(O,k){if(typeof O>"u"||O==="")throw new Error("No input text");let F=e.M,$,D;return typeof k<"u"&&(F=e.from(k.errorCorrectionLevel,e.M),$=f.from(k.version),D=a.from(k.maskPattern),k.toSJISFunc&&t.setToSJISFunction(k.toSJISFunc)),M(O,$,F,D)},xw}var qw={},Ww={},t4;function E7(){return t4||(t4=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}}})(Ww)),Ww}var n4;function ufe(){return n4||(n4=1,(function(t){const e=E7();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)}})(qw)),qw}var Vw={},r4;function cfe(){if(r4)return Vw;r4=1;const t=E7();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 Vw.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},Vw}var s4;function dfe(){if(s4)return ac;s4=1;const t=qde(),e=lfe(),n=ufe(),r=cfe();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 ac.create=e.create,ac.toCanvas=s.bind(null,n.render),ac.toDataURL=s.bind(null,n.renderToDataURL),ac.toString=s.bind(null,function(o,a,u){return r.render(o,u)}),ac}var ffe=dfe();const hfe=Ga(ffe),pfe=t=>t==="signIn"||t==="signUp",dR=t=>!!t&&(t==="EMAIL_OTP"||t==="SMS_MFA"),{getConfirmText:gfe,getConfirmingText:mfe,getBackToSignInText:vfe,getResendCodeText:yfe}=Ln,gb=()=>{const{isPending:t,toSignIn:e,challengeName:n,resendCode:r,selectedAuthMethod:s,availableAuthMethods:o}=Et(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!s&&s!=="PASSWORD"||!!o?.some(c=>c!=="PASSWORD"),u=dR(n)&&a&&r;return j.createElement(ze,{direction:"column"},j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:mfe()},gfe()),u&&j.createElement(en,{onClick:r,type:"button"},yfe()),j.createElement(en,{onClick:e,type:"button",variation:"link",size:"small"},vfe()))},bfe=new or("SetupTotp-logger"),{getSetupTotpText:Sfe,getCopiedText:Efe,getLoadingText:Cfe}=Ln,ja=({className:t,variation:e})=>{const{totpSecretCode:n,isPending:r,username:s,QRFields:o}=Et(R=>[R.isPending,R.totpSecretCode,R.username]),{handleChange:a,handleSubmit:u}=fs(),{components:{SetupTotp:{Header:c=ja.Header,Footer:f=ja.Footer}}}=ds(),[h,g]=x.useState(!0),[m,y]=x.useState(),[S,E]=x.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:w=s}=o??{},T=x.useCallback(async()=>{try{const R=foe(C,w,n),M=await hfe.toDataURL(R);y(M)}catch(R){bfe.error(R)}finally{g(!1)}},[C,w,n]);x.useEffect(()=>{m||T()},[T,m]);const _=()=>{navigator.clipboard.writeText(n),E(Efe())};return x.createElement(qr,{className:t,variation:e},x.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},x.createElement(ze,{as:"fieldset",direction:"column",isDisabled:r},x.createElement(c,null),x.createElement(ze,{direction:"column"},h?x.createElement("p",null,Cfe(),"…"):x.createElement("img",{"data-amplify-qrcode":!0,src:m,alt:"qr code",width:"228",height:"228"}),x.createElement(ze,{"data-amplify-copy":!0},x.createElement("div",null,n),x.createElement(ze,{"data-amplify-copy-svg":!0,onClick:_},x.createElement("div",{"data-amplify-copy-tooltip":!0},S),x.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},x.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"})))),x.createElement(Po,null),x.createElement(Vr,null)),x.createElement(gb,null),x.createElement(f,null))))};ja.Header=function(){return x.createElement(Ar,{level:3},Sfe())};ja.Footer=function(){return null};const{getSubmitText:wfe,getSubmittingText:xfe}=Ln,mb=t=>{const{cancelButtonSendType:e,cancelButtonText:n,submitButtonText:r}=t,{isPending:s,resendCode:o,skipVerification:a,toSignIn:u}=Et(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,xfe(),"…"):j.createElement(j.Fragment,null,wfe()),h=r??f;return j.createElement(ze,{direction:"column"},j.createElement(en,{variation:"primary",isDisabled:s,type:"submit"},h),j.createElement(ze,{direction:"column",alignItems:"center"},j.createElement(en,{onClick:c,type:"button",variation:"link",size:"small"},n)))},_fe=()=>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"})),Afe=()=>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(t7,{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"}),Rfe=()=>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"})),om=t=>{const{icon:e,provider:n,text:r}=t,{toFederatedSignIn:s}=Et(),o=u=>{u.preventDefault(),s({provider:n})};let a;return e==="facebook"?a=j.createElement(Tfe,null):e==="google"?a=j.createElement(Afe,null):e==="amazon"?a=j.createElement(Rfe,null):e==="apple"&&(a=j.createElement(_fe,null)),j.createElement(en,{onClick:o,className:"federated-sign-in-button",gap:"1rem"},a,j.createElement(Rs,{as:"span"},r))},{getSignInWithFederationText:im,getOrText:Ife}=Ln;function C7(){const{route:t,socialProviders:e}=Et(({route:n,socialProviders:r})=>[n,r]);return e.length===0?null:j.createElement(ze,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},e.map(n=>{switch(n){case"amazon":return j.createElement(om,{icon:"amazon",key:n,provider:Tc.Amazon,text:im(t,n)});case"apple":return j.createElement(om,{icon:"apple",key:n,provider:Tc.Apple,text:im(t,n)});case"facebook":return j.createElement(om,{icon:"facebook",key:n,provider:Tc.Facebook,text:im(t,n)});case"google":return j.createElement(om,{icon:"google",key:n,provider:Tc.Google,text:im(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(nR,{size:"small",label:Ife()}))}const{getSignInText:am,getSigningInText:Ofe,getForgotPasswordText:Nfe,getSignInWithEmailText:Mfe,getSignInWithSmsText:Pfe,getSignInWithPasskeyText:kfe,getOtherSignInOptionsText:Dfe,getEnterUsernameFirstText:Lfe}=Ln;function Ci(){const{isPending:t,availableAuthMethods:e,preferredChallenge:n,toShowAuthMethods:r}=Et(w=>[w.isPending,w.availableAuthMethods,w.preferredChallenge,w.toShowAuthMethods]),{handleChange:s,handleSubmit:o}=fs(),[a,u]=j.useState(""),{components:{SignIn:{Header:c=Ci.Header,Footer:f=Ci.Footer}}}=ds(),g=e&&e.length>1&&n,m=a.trim().length>0,y=j.useCallback(w=>{const{name:T,value:_}=w.target;T==="username"&&typeof _=="string"&&u(_),s(w)},[s]),S=()=>{if(!n)return am();switch(n){case"EMAIL_OTP":return Mfe();case"SMS_OTP":return Pfe();case"WEB_AUTHN":return kfe();default:return am()}},E=w=>{w.preventDefault(),o(w)},C=w=>{w.preventDefault(),r()};return j.createElement(qe,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(C7,null),j.createElement(ze,{direction:"column"},j.createElement(ze,{as:"fieldset",direction:"column",isDisabled:t},j.createElement(hb,null,j.createElement("legend",null,am())),j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(en,{isDisabled:t,type:"submit",variation:"primary",isLoading:t,loadingText:Ofe()},g?S():am()),g&&j.createElement(en,{onClick:C,size:"small",variation:"link",isDisabled:t||!m,title:m?void 0:Lfe()},Dfe()),j.createElement(f,null))))}const Ufe=()=>{const{toForgotPassword:t}=Et(e=>[e.toForgotPassword]);return j.createElement(qe,{"data-amplify-footer":""},j.createElement(en,{onClick:t,size:"small",variation:"link"},Nfe()))};Ci.Footer=Ufe;Ci.Header=function(){return null};const{getCreateAccountText:o4,getCreatingAccountText:Ffe,getCreateAccountWithEmailText:zfe,getCreateAccountWithPasswordText:jfe,getCreateAccountWithSmsText:Bfe,getOrText:Hfe}=Ln;function Qs(){const{hasValidationErrors:t,isPending:e,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:s}=Et(_=>[_.hasValidationErrors,_.isPending,_.availableAuthMethods,_.preferredChallenge,_.selectedAuthMethod]),{handleChange:o,handleBlur:a,handleSubmit:u}=fs(),{components:{SignUp:{Header:c=Qs.Header,FormFields:f=Qs.FormFields,Footer:h=Qs.Footer}}}=ds(),g=n?.filter(_=>_!=="WEB_AUTHN"),m=g&&g.length>1,y=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=g?.filter(_=>_!==y)??[],C=(s??y)!=="PASSWORD",w=_=>{switch(_){case"EMAIL_OTP":return zfe();case"SMS_OTP":return Bfe();case"PASSWORD":return m?jfe():o4();default:return o4()}},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=_,M.requestSubmit()}};return j.createElement(qe,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(C7,null),j.createElement(ze,{as:"fieldset",direction:"column",isDisabled:e},j.createElement(ze,{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:T(y)},w(y)),m&&S.length>0&&j.createElement(j.Fragment,null,j.createElement(ze,{justifyContent:"center",padding:"medium 0"},Hfe()),S.map(_=>j.createElement(en,{key:_,isDisabled:e,isFullWidth:!0,type:"button",variation:"primary",onClick:T(_)},w(_)))),j.createElement(h,null))))}Qs.Header=function(){return null};Qs.FormFields=function(){return j.createElement(Po,null)};Qs.Footer=function(){return null};const{getSignInTabText:$fe,getSignUpTabText:qfe}=Ln,Wfe=({className:t,hideSignUp:e,variation:n})=>{const{route:r,toSignIn:s,toSignUp:o}=Et(a=>[a.route,a.toSignIn,a.toSignUp]);return j.createElement(qr,{className:t,variation:n},e?j.createElement(qe,{"data-amplify-router-content":""},r==="signIn"&&j.createElement(Ci,null)):j.createElement(wl.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?s():o())}},j.createElement(wl.List,{spacing:"equal",indicatorPosition:"top"},j.createElement(wl.Item,{value:"signIn"},$fe()),j.createElement(wl.Item,{value:"signUp"},qfe())),j.createElement(wl.Panel,{value:"signIn","data-amplify-router-content":""},j.createElement(Ci,null)),j.createElement(wl.Panel,{value:"signUp","data-amplify-router-content":""},j.createElement(Qs,null))))},{getAccountRecoveryInfoText:Vfe,getSkipText:Gfe}=Ln,Gl=({className:t,variation:e})=>{const{isPending:n}=Et(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=fs(),{components:{ConfirmVerifyUser:{Header:o=Gl.Header,Footer:a=Gl.Footer}}}=ds();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(ze,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(ze,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Gfe(),cancelButtonSendType:"SKIP"}),j.createElement(a,null))))};Gl.Header=function(){return j.createElement(Ar,{level:3},Vfe())};Gl.Footer=function(){return null};const{getSkipText:Kfe,getVerifyText:Yfe,getVerifyContactText:Zfe,getAccountRecoveryInfoText:Xfe}=Ln,Qfe=t=>Object.entries(t).map(([e,n],r)=>{const s=nb[e].label;return j.createElement(sR,{name:"unverifiedAttr",value:e,key:e,defaultChecked:r===0},ye(s),":"," ",coe(s,n))}),Kl=({className:t,variation:e})=>{const{components:{VerifyUser:{Header:n=Kl.Header,Footer:r=Kl.Footer}}}=ds(),{isPending:s,unverifiedUserAttributes:o}=Et(({isPending:h,unverifiedUserAttributes:g})=>[h,g]),{handleChange:a,handleSubmit:u}=fs(),c=s?j.createElement(j.Fragment,null,"Verifying…"):j.createElement(j.Fragment,null,Yfe()),f=j.createElement(oR,{legend:Zfe(),name:"verify_context",isDisabled:s,legendHidden:!0},Qfe(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(ze,{as:"fieldset",direction:"column",isDisabled:s},j.createElement(n,null),f,j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:Kfe(),cancelButtonSendType:"SKIP",submitButtonText:c}),j.createElement(r,null))))};Kl.Header=function(){return j.createElement(Ar,{level:3},Xfe())};Kl.Footer=function(){return null};const{getChallengeText:Jfe,getDeliveryMessageText:ehe,getDeliveryMethodText:the}=Ln,Yl=({className:t,variation:e})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:s}=Et(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:o,handleSubmit:a}=fs(),{components:{ConfirmSignIn:{Header:u=Yl.Header,Footer:c=Yl.Footer}}}=ds(),f=dR(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(ze,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(u,null),j.createElement(ze,{direction:"column"},f&&j.createElement(Rs,{className:"amplify-authenticator__subtitle"},ehe(s)),j.createElement(Po,null),j.createElement(Vr,null)),j.createElement(gb,null),j.createElement(c,null))))};function nhe(){const{challengeName:t,codeDeliveryDetails:e}=Et(({challengeName:r,codeDeliveryDetails:s})=>[r,s]),n=dR(t)&&e;return j.createElement(j.Fragment,null,j.createElement(Ar,{level:3},Jfe(t)),n&&j.createElement(Ar,{level:5},the(e)))}Yl.Header=nhe;Yl.Footer=function(){return null};const{getResendCodeText:rhe,getResetYourPasswordText:she}=Ln,Zl=({className:t,variation:e})=>{const{isPending:n}=Et(c=>[c.isPending]),{handleBlur:r,handleChange:s,handleSubmit:o}=fs(),{components:{ConfirmResetPassword:{Header:a=Zl.Header,Footer:u=Zl.Footer}}}=ds();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(ze,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(a,null),j.createElement(ze,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonSendType:"RESEND",cancelButtonText:rhe()}),j.createElement(u,null))))};Zl.Header=function(){const e=she();return j.createElement(Ar,{level:3},e)};Zl.Footer=function(){return null};const{getBackToSignInText:ohe,getSendingText:ihe,getSendCodeText:ahe,getResetYourPasswordText:lhe}=Ln,Ba=({className:t,variation:e})=>{const{isPending:n}=Et(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=fs(),{components:{ForgotPassword:{Header:o=Ba.Header,Footer:a=Ba.Footer}}}=ds();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(ze,{as:"fieldset",direction:"column",isDisabled:n},j.createElement(o,null),j.createElement(ze,{direction:"column"},j.createElement(Po,null)),j.createElement(Vr,null),j.createElement(mb,{cancelButtonText:ohe(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?j.createElement(j.Fragment,null,ihe(),"…"):j.createElement(j.Fragment,null,ahe())}),j.createElement(a,null))))};Ba.Header=function(){return j.createElement(Ar,{level:3},lhe())};Ba.Footer=function(){return null};const{getMfaTypeLabelByValue:uhe,getSelectMfaTypeByChallengeName:che,getSelectMfaTypeText:dhe}=Ln,Ha=({className:t,variation:e})=>{const{isPending:n,allowedMfaTypes:r=[]}=Et(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:s,handleSubmit:o}=fs(),{components:{SelectMfaType:{Header:a=Ha.Header,Footer:u=Ha.Footer}}}=ds();return x.createElement(qr,{className:t,variation:e},x.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:s,onSubmit:o},x.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},x.createElement(a,null),x.createElement(ze,{direction:"column"},x.createElement(oR,{name:"mfa_type",legend:dhe(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>x.createElement(sR,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},uhe(c)))),x.createElement(Vr,null)),x.createElement(gb,null),x.createElement(u,null))))};Ha.Header=function(){const{challengeName:e}=Et(n=>[n.challengeName]);return x.createElement(Ar,{level:3},che(e))};Ha.Footer=function(){return null};const{getSetupEmailText:fhe}=Ln,$a=({className:t,variation:e})=>{const{isPending:n}=Et(u=>[u.isPending]),{handleChange:r,handleSubmit:s}=fs(),{components:{SetupEmail:{Header:o=$a.Header,Footer:a=$a.Footer}}}=ds();return x.createElement(qr,{className:t,variation:e},x.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:s},x.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},x.createElement(o,null),x.createElement(ze,{direction:"column"},x.createElement(Po,null),x.createElement(Vr,null)),x.createElement(gb,null),x.createElement(a,null))))};$a.Header=function(){return x.createElement(Ar,{level:3},fhe())};$a.Footer=function(){return null};const{getSignInWithPasswordText:w_,getSignInWithEmailText:hhe,getSignInWithSmsText:phe,getSignInWithPasskeyText:ghe,getSigningInText:mhe,getBackToSignInText:vhe,getOrText:yhe,getUsernameLabelByLoginMechanism:bhe}=Ln,She=t=>{switch(t){case"EMAIL_OTP":return hhe();case"SMS_OTP":return phe();case"WEB_AUTHN":return ghe();case"PASSWORD":return w_();default:return w_()}},Ehe=({className:t,variation:e})=>{const{isPending:n,username:r,availableAuthMethods:s,toSignIn:o,selectAuthMethod:a,loginMechanism:u}=Et(E=>[E.isPending,E.username,E.availableAuthMethods,E.toSignIn,E.selectAuthMethod,E.loginMechanism]),{handleChange:c,handleSubmit:f}=fs(),h=s??[],g=h.includes("PASSWORD"),m=h.filter(E=>E!=="PASSWORD"),y=E=>{a({method:E})},S=bhe(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(ze,{direction:"column"},j.createElement(hp,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),g&&j.createElement(j.Fragment,null,j.createElement(rR,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),j.createElement(en,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:mhe()},w_())),g&&m.length>0&&j.createElement(nR,{label:yhe()}),m.length>0&&j.createElement(ze,{direction:"column",gap:"0.5rem"},m.map(E=>j.createElement(en,{key:E,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>y(E)},She(E)))),j.createElement(Vr,null),j.createElement(en,{onClick:o,size:"small",variation:"link",isDisabled:n},vhe()))))},Che=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.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"})))},whe=t=>{const{className:e,...n}=t;return x.createElement(qe,{as:"span",width:"1em",height:"1em",className:He(le.Icon,e),...n},x.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),x.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"}),x.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),x.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},x.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"})),x.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)"}),x.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),x.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),x.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),x.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),x.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),x.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"}),x.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"}),x.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),x.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),x.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),x.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:xhe,getPasskeyPromptDescriptionText:_he,getCreatePasskeyText:Ahe,getRegisteringText:The,getContinueWithoutPasskeyText:Rhe,getPasskeyCreatedSuccessText:Ihe,getPasskeyRegisteredText:Ohe,getPasskeyRegistrationFailedText:Nhe,getPasskeyLabelText:Mhe,getExistingPasskeysText:Phe,getSetupAnotherPasskeyText:khe,getContinueText:Dhe}=Ln;function Lhe({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}=Et(w=>[w.submitForm,w.isPending]),m=j.useCallback(async()=>{try{const w=await DT();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 Nse(),r(!0)}catch(w){const T=w,_=T.name??"",R=T.message??"";if(_==="PasskeyRegistrationCanceled"||_==="NotAllowedError"||R.includes("canceled")||R.includes("cancelled")||R.includes("ceremony has been canceled")||R.includes("not allowed")){y();return}o(Nhe())}finally{u(!1)}},[y]);if(n)return j.createElement(qr,{className:t,variation:e},j.createElement(ze,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},j.createElement(ze,{direction:"column",gap:"xs"},j.createElement(Che,{className:"amplify-authenticator__passkey-success-icon"}),j.createElement(Ar,{level:4},Ihe()),j.createElement(Rs,null,Ohe())),c.length>0&&j.createElement(qe,{marginTop:"large"},j.createElement(Ar,{level:5},Phe()),j.createElement(ze,{direction:"column",gap:"xs",marginTop:"xs"},c.map((w,T)=>j.createElement(qe,{key:w.credentialId,className:"amplify-authenticator__passkey-credential-item"},j.createElement(Rs,{fontSize:"small"},w.friendlyCredentialName??`${Mhe()} ${T+1}`))))),j.createElement(ze,{direction:"column",gap:"medium",marginTop:"large"},j.createElement(en,{onClick:()=>{r(!1),E()},variation:"link"},khe()),j.createElement(en,{onClick:()=>S(),variation:"primary",isFullWidth:!0},Dhe()))));const C=g||a;return j.createElement(qr,{className:t,variation:e},j.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},j.createElement(ze,{direction:"column",gap:"medium"},j.createElement(Ar,{level:4},xhe()),j.createElement(Rs,null,_he()),j.createElement(ze,{justifyContent:"center"},j.createElement(whe,{className:"amplify-authenticator__passkey-icon"})),j.createElement(ze,{direction:"column",gap:"medium"},j.createElement(en,{onClick:()=>{E()},variation:"primary",isDisabled:C,isLoading:a,loadingText:The()},Ahe()),j.createElement(en,{onClick:y,variation:"link",isDisabled:C},Rhe()),s&&j.createElement(Rs,{className:"amplify-authenticator__passkey-error"},s),j.createElement(Vr,null)))))}function i4(){return null}const Uhe=t=>{switch(t){case"authenticated":case"idle":case"setup":case"transition":return i4;case"confirmSignUp":return Vl;case"confirmSignIn":return Yl;case"selectMfaType":return Ha;case"setupEmail":return $a;case"setupTotp":return ja;case"signIn":case"signUp":return Wfe;case"signInSelectAuthFactor":return Ehe;case"passkeyPrompt":return Lhe;case"forceNewPassword":return Xs;case"forgotPassword":return Ba;case"confirmResetPassword":return Zl;case"verifyUser":return Kl;case"confirmVerifyUser":return Gl;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${t}`),i4}};function Fhe({className:t,hideSignUp:e,variation:n}){const{route:r}=Et(({route:o})=>[o]),s=x.useMemo(()=>Uhe(r),[r]);return j.createElement(s,{className:t,hideSignUp:pfe(r)?e:void 0,variation:n})}const zhe={Header:()=>null,SignIn:{Header:Ci.Header,Footer:Ci.Footer},SignUp:{Header:Qs.Header,FormFields:Qs.FormFields,Footer:Qs.Footer},ConfirmSignUp:{Header:Vl.Header,Footer:Vl.Footer},SelectMfaType:{Header:Ha.Header,Footer:Ha.Footer},SetupEmail:{Header:$a.Header,Footer:$a.Footer},SetupTotp:{Header:ja.Header,Footer:ja.Footer},ConfirmResetPassword:{Header:Zl.Header,Footer:Zl.Footer},ConfirmSignIn:{Header:Yl.Header,Footer:Yl.Footer},VerifyUser:{Header:Kl.Header,Footer:Kl.Footer},ConfirmVerifyUser:{Header:Gl.Header,Footer:Gl.Footer},ForceNewPassword:{Header:Xs.Header,Footer:Xs.Footer,FormFields:Xs.FormFields},ForgotPassword:{Header:Ba.Header,Footer:Ba.Footer},Footer:()=>null};function jhe({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}){kde({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}=Et(({route:T,signOut:_,user:R})=>[T,_,R]);dce({initialState:o,loginMechanisms:a,passwordSettings:u,passwordless:c,services:h,signUpAttributes:f,socialProviders:g,formFields:r});const C=x.useMemo(()=>({components:{...zhe,...n}}),[n]);return y==="authenticated"||y==="signOut"?t?x.createElement(x.Fragment,null,Si(t)?t({signOut:S,user:E}):t):null:x.createElement(m7.Provider,{value:C},x.createElement(Fhe,{className:e,hideSignUp:s,variation:m}))}function ko(t){return hce({componentName:"Authenticator",packageName:"react",version:Pde}),x.createElement(QF,null,x.createElement(jhe,{...t}))}ko.Provider=QF;ko.ForgotPassword=Ba;ko.SetupTotp=ja;ko.SignIn=Ci;ko.SignUp=Qs;ko.ForceNewPassword=Xs;ko.SelectMfaType=Ha;ko.SetupEmail=$a;const w7=({cssText:t,...e})=>t===void 0||/<\/style/i.test(t)?null:x.createElement("style",{...e,dangerouslySetInnerHTML:{__html:t}});w7.displayName="Style";const x7=({theme:t,...e})=>{if(!t)return null;const{name:n,cssText:r}=t;return x.createElement(w7,{...e,cssText:r,id:`amplify-theme-${n}`})};x7.displayName="ThemeStyle";function Bhe({children:t,colorMode:e,direction:n="ltr",nonce:r,theme:s}){const o=x.useMemo(()=>({theme:lb(s),colorMode:e}),[s,e]);return x.createElement(JF.Provider,{value:o},x.createElement(cde,{dir:n},x.createElement("div",{"data-amplify-theme":o.theme.name,"data-amplify-color-mode":e,dir:n},t),s?x.createElement(x7,{theme:o.theme,nonce:r}):null))}const Hhe=({configured:t,authStatus:e})=>e==="authenticated",$he=t=>t?t.signInDetails?.loginId??t.username??null:null,qhe=({children:t,fallback:e=null})=>{const{authStatus:n,signOut:r,user:s}=Et(o=>[o.authStatus,o.signOut,o.user]);return Hhe({configured:!0,authStatus:n})?I.jsx(I.Fragment,{children:t({email:$he(s),signOut:()=>r()})}):I.jsx(I.Fragment,{children:e})},Whe=({children:t,fallback:e=null})=>Ly()?I.jsx(qhe,{fallback:e,children:t}):I.jsx(I.Fragment,{children:e}),a4='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Oi=t=>`var(${t})`,dn=Oi("--accent"),Vhe=Oi("--accent-hover"),l4=Oi("--accent-soft"),Uf=Oi("--accent-fg"),u4=Oi("--surface"),lc=Oi("--fg"),Ghe=Oi("--surface-sunken"),lm=Oi("--fg-muted"),Ff=Oi("--line"),Khe=lb({name:"remit",tokens:{colors:{brand:{primary:{10:{value:l4},20:{value:l4},40:{value:dn},60:{value:dn},80:{value:dn},90:{value:dn},100:{value:dn}}},background:{primary:{value:u4},secondary:{value:Ghe}},font:{primary:{value:lc},secondary:{value:lm},tertiary:{value:lm},interactive:{value:dn},inverse:{value:Uf},hover:{value:dn},focus:{value:dn},active:{value:dn}},border:{primary:{value:Ff},secondary:{value:Ff},focus:{value:dn}}},fonts:{default:{variable:{value:a4},static:{value:a4}}},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:u4}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:lm}}},button:{color:{value:lc},primary:{backgroundColor:{value:dn},color:{value:Uf},_hover:{backgroundColor:{value:Vhe},color:{value:Uf}},_focus:{backgroundColor:{value:dn},color:{value:Uf}},_active:{backgroundColor:{value:dn},color:{value:Uf}}},link:{color:{value:dn},_hover:{color:{value:dn},backgroundColor:{value:"transparent"}},_focus:{color:{value:dn},backgroundColor:{value:"transparent"}},_active:{color:{value:dn},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:lc},borderColor:{value:Ff},_focus:{borderColor:{value:dn},boxShadow:{value:`0 0 0 2px ${dn}`}}},field:{label:{color:{value:lc}}},tabs:{borderColor:{value:Ff},item:{color:{value:lm},backgroundColor:{value:"transparent"},_active:{color:{value:dn},borderColor:{value:dn},backgroundColor:{value:"transparent"}},_hover:{color:{value:dn}},_focus:{color:{value:dn}}}},heading:{color:{value:lc}},text:{color:{value:lc}}}}}),Yhe={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"}}},Zhe=()=>I.jsx(s_,{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:I.jsxs("span",{className:"flex items-center gap-2",children:[I.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),I.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."}),I.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Xhe=()=>I.jsx(R9,{note:V9({betterAuthEnabled:!1,cognitoConfigured:Ly()})}),Qhe=({children:t})=>{const{authStatus:e}=Et(n=>[n.authStatus]);return e==="authenticated"?I.jsx(I.Fragment,{children:t}):e==="configuring"?I.jsx(pT,{}):I.jsx(Bhe,{theme:Khe,children:I.jsxs(T9,{children:[I.jsx(I9,{}),I.jsx(ko,{hideSignUp:!1,formFields:Yhe,components:{Footer:Xhe}})]})})},Jhe=({children:t})=>Ly()?I.jsx(ko.Provider,{children:I.jsx(Qhe,{children:t})}):I.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[I.jsx(Zhe,{}),t]}),_7=60;let Uc=null;const A7=()=>Math.floor(Date.now()/1e3),epe=t=>t!==null&&t.expiresAt-_7>A7(),tpe=async()=>{const e=(await Oy()).tokens?.idToken;return e?(Uc={value:e.toString(),expiresAt:e.payload.exp??A7()+_7},Uc.value):(Uc=null,null)},npe=async()=>Ly()?epe(Uc)?Uc.value:tpe():null,rpe=()=>{Uc=null},Lv={configure:R8,getToken:npe,resetToken:rpe,Shell:Jhe,Account:Whe},spe=({children:t})=>Uy()?I.jsx(Iv.Shell,{children:t}):I.jsx(Lv.Shell,{children:t}),ope=t=>Uy()?I.jsx(Iv.Account,{...t}):I.jsx(Lv.Account,{...t}),ipe={configure:R8,getToken:()=>Uy()?Iv.getToken():Lv.getToken(),resetToken:()=>{Iv.resetToken(),Lv.resetToken()},Shell:spe,Account:ope};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(){}},ape=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"}},fR=new ape,lpe={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},upe=class{#e=lpe;#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)}},Tl=new upe;function cpe(t){setTimeout(t,0)}var dpe=typeof window>"u"||"Deno"in globalThis;function Er(){}function fpe(t,e){return typeof t=="function"?t(e):t}function x_(t){return typeof t=="number"&&t>=0&&t!==1/0}function T7(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 c4(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==hR(a,e.options))return!1}else if(!Ph(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 d4(t,e){const{exact:n,status:r,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Xl(e.options.mutationKey)!==Xl(o))return!1}else if(!Ph(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function hR(t,e){return(e?.queryKeyHashFn||Xl)(t)}function Xl(t){return JSON.stringify(t,(e,n)=>__(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ph(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ph(t[n],e[n])):!1}var hpe=Object.prototype.hasOwnProperty;function R7(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=f4(t)&&f4(e);if(!r&&!(__(t)&&__(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:hpe.call(t,g))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[g]=y;continue}const S=R7(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 f4(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function __(t){if(!h4(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!h4(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function h4(t){return Object.prototype.toString.call(t)==="[object Object]"}function ppe(t){return new Promise(e=>{Tl.setTimeout(e,t)})}function A_(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?R7(t,e):e}function gpe(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function mpe(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var pR=Symbol();function I7(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===pR?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function gR(t,e){return typeof t=="function"?t(...e):!!t}function vpe(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 kh=(()=>{let t=()=>dpe;return{isServer(){return t()},setIsServer(e){t=e}}})();function T_(){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 ype=cpe;function bpe(){let t=[],e=0,n=u=>{u()},r=u=>{u()},s=ype;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=bpe(),Spe=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 Spe;function Epe(t){return Math.min(1e3*2**t,3e4)}function O7(t){return(t??"online")==="online"?Fv.isOnline():!0}var R_=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function N7(t){let e=!1,n=0,r;const s=T_(),o=()=>s.status!=="pending",a=E=>{if(!o()){const C=new R_(E);m(C),t.onCancel?.(C)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>fR.isFocused()&&(t.networkMode==="always"||Fv.isOnline())&&t.canRun(),h=()=>O7(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 T=t.retry??(kh.isServer()?0:3),_=t.retryDelay??Epe,R=typeof _=="function"?_(n,w):_,M=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,w);if(e||!M){m(w);return}n++,t.onFail?.(n,w),ppe(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 M7=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),x_(this.gcTime)&&(this.#e=Tl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(kh.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Tl.clearTimeout(this.#e),this.#e=void 0)}};function Cpe(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=>{vpe(S,()=>e.signal,()=>h=!0)},m=I7(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 T=(()=>{const N={client:e.client,queryKey:e.queryKey,pageParam:E,direction:C?"backward":"forward",meta:e.options.meta};return g(N),N})(),_=await m(T),{maxPages:R}=e.options,M=C?mpe:gpe;return{pages:M(S.pages,_,R),pageParams:M(S.pageParams,E,R)}};if(s&&o.length){const S=s==="backward",E=S?P7:I_,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:I_(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 I_(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 P7(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}function JRe(t,e){return e?I_(t,e)!=null:!1}function eIe(t,e){return!e||!t.getPreviousPageParam?!1:P7(t,e)!=null}var wpe=class extends M7{#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=g4(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=g4(this.options);e.data!==void 0&&(this.setState(p4(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=A_(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===pR||!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:!T7(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=I7(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"?Cpe(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=N7({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof R_&&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 R_){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,...k7(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...p4(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 k7(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:O7(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function p4(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function g4(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 xpe=class extends bd{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=T_(),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),m4(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return O_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return O_(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&&v4(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 Ape(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(kh.isServer()||this.#r.isStale||!x_(t))return;const n=T7(this.#r.dataUpdatedAt,t)+1;this.#d=Tl.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,!(kh.isServer()||is(this.options.enabled,this.#t)===!1||!x_(this.#u)||this.#u===0)&&(this.#f=Tl.setInterval(()=>{(this.options.refetchIntervalInBackground||fR.isFocused())&&this.#h()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#S(){this.#d!==void 0&&(Tl.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(Tl.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&&m4(t,e),$=k&&v4(t,n,e,r);(F||$)&&(h={...h,...k7(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=A_(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=A_(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",T=E==="pending",_=E==="error",R=T&&w,M=m!==void 0,O={status:E,fetchStatus:h.fetchStatus,isPending:T,isSuccess:E==="success",isError:_,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&&!T,isLoadingError:_&&!M,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:_&&M,isStale:mR(t,e),refetch:this.refetch,promise:this.#a,isEnabled:is(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=O.data!==void 0,F=O.status==="error"&&!k,$=q=>{F?q.reject(O.error):k&&q.resolve(O.data)},D=()=>{const q=this.#a=O.promise=T_();$(q)},z=this.#a;switch(z.status){case"pending":t.queryHash===n.queryHash&&$(z);break;case"fulfilled":(F||O.data!==z.value)&&D();break;case"rejected":(!F||O.error!==z.reason)&&D();break}}return O}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 _pe(t,e){return is(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&is(e.retryOnMount,t)===!1)}function m4(t,e){return _pe(t,e)||t.state.data!==void 0&&O_(t,e,e.refetchOnMount)}function O_(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&&mR(t,e)}return!1}function v4(t,e,n,r){return(t!==e||is(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&mR(t,n)}function mR(t,e){return is(e.enabled,t)!==!1&&t.isStaleByTime(Na(e.staleTime,t))}function Ape(t,e){return!Uv(t.getCurrentResult(),e)}var Tpe=class extends M7{#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||D7(),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=N7({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 D7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var L7=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=um(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=um(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=um(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=um(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=>d4(e,n))}findAll(t={}){return this.getAll().filter(e=>d4(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 um(t){return t.options.scope?.id}var Rpe=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&&Xl(n.mutationKey)!==Xl(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??D7();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)})})}},U7=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??hR(r,e);let o=this.get(s);return o||(o=new wpe({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=>c4(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>c4(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()})})}},Ipe=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new U7,this.#t=t.mutationCache||new L7,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=fR.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=fpe(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(Xl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{Ph(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(Xl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{Ph(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=hR(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===pR&&(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()}},F7=x.createContext(void 0),vb=t=>{const e=x.useContext(F7);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ope=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),I.jsx(F7.Provider,{value:t,children:e})),z7=x.createContext(!1),Npe=()=>x.useContext(z7);z7.Provider;function Mpe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Ppe=x.createContext(Mpe()),kpe=()=>x.useContext(Ppe),Dpe=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?gR(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},Lpe=t=>{x.useEffect(()=>{t.clearReset()},[t])},Upe=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||gR(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))}},zpe=(t,e)=>t.isLoading&&t.isFetching&&!e,jpe=(t,e)=>t?.suspense&&e.isPending,y4=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Bpe(t,e,n){const r=Npe(),s=kpe(),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),Dpe(a,s,u),Lpe(s);const f=!o.getQueryCache().get(a.queryHash),[h]=x.useState(()=>new e(o,a)),g=h.getOptimisticResult(a),m=!r&&c;if(x.useSyncExternalStore(x.useCallback(y=>{const S=m?h.subscribe(Dn.batchCalls(y)):Er;return h.updateResult(),S},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),x.useEffect(()=>{h.setOptions(a)},[a,h]),jpe(a,g))throw y4(a,h,s);if(Upe({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&&!kh.isServer()&&zpe(g,r)&&(f?y4(a,h,s):u?.promise)?.catch(Er).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?g:h.trackResult(g)}function j7(t,e){return Bpe(t,xpe)}function Hpe(t,e){const n=vb(),[r]=x.useState(()=>new Rpe(n,t));x.useEffect(()=>{r.setOptions(t)},[r,t]);const s=x.useSyncExternalStore(x.useCallback(a=>r.subscribe(Dn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=x.useCallback((a,u)=>{r.mutate(a,u).catch(Er)},[r]);if(s.error&&gR(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const $pe="modulepreload",qpe=function(t){return"/"+t},b4={},Un=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=qpe(f),f in b4)return;b4[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":$pe,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 S4=x.use,Rc=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Gw(t){const e=x.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function Wpe(t,e,n={},r={}){x.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 Vpe(t){const e=x.useRef(null);return x.useImperativeHandle(t,()=>e.current,[]),e}const B7=!1;function Dh(t){return t[t.length-1]}function Gpe(t){return typeof t=="function"}function Rl(t,e){return Gpe(t)?t(e):t}const H7=Object.prototype.hasOwnProperty,E4=Object.prototype.propertyIsEnumerable;function $7(t){for(const e in t)if(H7.call(t,e))return!0;return!1}const Kpe=()=>Object.create(null),El=(t,e)=>Il(t,e,Kpe);function Il(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const s=e,o=x4(t)&&x4(s);if(!o&&!(zv(t)&&zv(s)))return s;const a=o?t:C4(t);if(!a)return s;const u=o?s:C4(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:H7.call(t,y))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){h[y]=E;continue}const C=Il(S,E,n,r+1);h[y]=C,C===S&&g++}return c===f&&g===c?t:h}function C4(t){const e=Object.getOwnPropertyNames(t);for(const s of e)if(!E4.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(!E4.call(t,s))return!1;r.push(s)}return r}function zv(t){if(!w4(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!w4(n)||!n.hasOwnProperty("isPrototypeOf"))}function w4(t){return Object.prototype.toString.call(t)==="[object Object]"}function x4(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ll(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(!Ll(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)&&!Ll(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||!Ll(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 Ype(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 Lh(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const Zpe=/[\x00-\x1f\x7f"<>`{}]/g;function Xpe(t){return t.replace(Zpe,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function _4(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 Xpe(e)}const Qpe=["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+=_4(t.slice(n,s.index))+s[0],n=e.lastIndex;r=r+_4(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function Jpe(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function ege(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 mi(){throw new Error("Invariant failed")}function Uh(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,q7=5;function tge(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 W7(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=tge(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=W7(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 T=s.static?.get(w);if(T)S=T;else{s.static??=new Map;const _=Ol(n.fullPath??n.from);_.parent=s,_.depth=o,S=_,s.static.set(w,_)}}else{const T=w.toLowerCase(),_=s.staticInsensitive?.get(T);if(_)S=_;else{s.staticInsensitive??=new Map;const R=Ol(n.fullPath??n.from);R.parent=s,R.depth=o,S=R,s.staticInsensitive.set(T,R)}}break}case 1:{const w=c.substring(E,y[1]),T=c.substring(y[4],C),_=h&&!!(w||T),R=w?_?w:w.toLowerCase():void 0,M=T?_?T:T.toLowerCase():void 0,N=!g&&s.dynamic?.find(O=>!O.parse&&O.caseSensitive===_&&O.prefix===R&&O.suffix===M);if(N)S=N;else{const O=Yw(1,n.fullPath??n.from,_,R,M);S=O,O.depth=o,O.parent=s,s.dynamic??=[],s.dynamic.push(O)}break}case 3:{const w=c.substring(E,y[1]),T=c.substring(y[4],C),_=h&&!!(w||T),R=w?_?w:w.toLowerCase():void 0,M=T?_?T:T.toLowerCase():void 0,N=!g&&s.optional?.find(O=>!O.parse&&O.caseSensitive===_&&O.prefix===R&&O.suffix===M);if(N)S=N;else{const O=Yw(3,n.fullPath??n.from,_,R,M);S=O,O.parent=s,O.depth=o,s.optional??=[],s.optional.push(O)}break}case 2:{const w=c.substring(E,y[1]),T=c.substring(y[4],C),_=h&&!!(w||T),R=w?_?w:w.toLowerCase():void 0,M=T?_?T:T.toLowerCase():void 0,N=Yw(2,n.fullPath??n.from,_,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=Ol(n.fullPath??n.from);y.kind=q7,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=Ol(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 Kw(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(Kw);for(const e of t.dynamic)ba(e)}if(t.optional?.length){t.optional.sort(Kw);for(const e of t.optional)ba(e)}if(t.wildcard?.length){t.wildcard.sort(Kw);for(const e of t.wildcard)ba(e)}}function Ol(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 Yw(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 nge(t,e){const n=Ol("/"),r=new Uint16Array(6);for(const s of t)yb(!1,r,s,1,n,0);ba(n),e.masksTree=n,e.flatCache=Uh(1e3)}function rge(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=vR(t,e.masksTree);return e.flatCache.set(t,r),r}function sge(t,e,n,r,s){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=s.singleCache.get(o);return a||(a=Ol("/"),yb(e,new Uint16Array(6),{from:t},1,a,0),s.singleCache.set(o,a)),vR(r,a,n)}function oge(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=vR(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=G7(o.route)),e.matchCache.set(r,o),o}function ige(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function age(t,e=!1,n){const r=Ol(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&&mi(),o[c.id]=c,u!==0&&c.path){const f=ige(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ba(r),{processedTree:{segmentTree:r,singleCache:Uh(1e3),matchCache:Uh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function vR(t,e,n=!1){const r=t.split("/"),s=uge(t,r,e,n);if(!s)return null;const[o]=V7(t,r,s);return{route:s.node.route,rawParams:o}}function V7(t,e,n){const r=lge(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===q7){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 G7(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function lge(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function uge(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const s=!Dh(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:T,rawParams:_}=h;if(g.kind===2&&g.route&&!dm(f,h))continue;if(g.parse){if(!A4(t,e,h))continue;_=h.rawParams,T=h.extract}r&&g.route&&g.kind!==Ra&&dm(c,h)&&(c=h);const R=m===a;if(R&&(g.route&&(!o||g.kind===Ra||g.kind===2)&&dm(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 O={node:g.index,index:m,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:T,rawParams:_};let k=!0;if(g.index.parse&&(A4(t,e,O)||(k=!1)),k){if(!C&&!w&&!y&&cge(E,a))return O;dm(f,O)&&(f=O)}}if(g.wildcard)for(let O=g.wildcard.length-1;O>=0;O--){const k=g.wildcard[O],{prefix:F,suffix:$}=k;if(!(F&&(R||!(k.caseSensitive?M:N??=M.toLowerCase()).startsWith(F)))){if($){if(R)continue;const D=e.slice(m).join("/").slice(-$.length);if((k.caseSensitive?D:D.toLowerCase())!==$)continue}u.push({node:k,index:a,skipped:y,depth:S+1,statics:E,dynamics:C,optionals:w,extract:T,rawParams:_})}}if(g.optional){const O=y|1<<S,k=S+1;for(let F=g.optional.length-1;F>=0;F--){const $=g.optional[F];u.push({node:$,index:m,skipped:O,depth:k,statics:E,dynamics:C,optionals:w,extract:T,rawParams:_})}if(!R)for(let F=g.optional.length-1;F>=0;F--){const $=g.optional[F],{prefix:D,suffix:z}=$;if(D||z){const q=$.caseSensitive?M:N??=M.toLowerCase();if(D&&!q.startsWith(D)||z&&!q.endsWith(z))continue}u.push({node:$,index:m+1,skipped:y,depth:k,statics:E,dynamics:C,optionals:w+cm(a,m),extract:T,rawParams:_})}}if(!R&&g.dynamic&&M)for(let O=g.dynamic.length-1;O>=0;O--){const k=g.dynamic[O],{prefix:F,suffix:$}=k;if(F||$){const D=k.caseSensitive?M:N??=M.toLowerCase();if(F&&!D.startsWith(F)||$&&!D.endsWith($))continue}u.push({node:k,index:m+1,skipped:y,depth:S+1,statics:E,dynamics:C+cm(a,m),optionals:w,extract:T,rawParams:_})}if(!R&&g.staticInsensitive){const O=g.staticInsensitive.get(N??=M.toLowerCase());O&&u.push({node:O,index:m+1,skipped:y,depth:S+1,statics:E+cm(a,m),dynamics:C,optionals:w,extract:T,rawParams:_})}if(!R&&g.static){const O=g.static.get(M);O&&u.push({node:O,index:m+1,skipped:y,depth:S+1,statics:E+cm(a,m),dynamics:C,optionals:w,extract:T,rawParams:_})}if(g.pathless){const O=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:O,statics:E,dynamics:C,optionals:w,extract:T,rawParams:_})}}}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 cm(t,e){return 2**(t-e-1)}function cge(t,e){return t===2**(e-1)-1}function A4(t,e,n){let r,s;try{[r,s]=V7(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 dm(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 yR(t.filter(e=>e!==void 0).join("/"))}function yR(t){return t.replace(/\/{2,}/g,"/")}function K7(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function pi(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function Y7(t){return pi(K7(t))}function Bv(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function dge(t,e,n){return Bv(t,n)===Bv(e,n)}function fge({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&&Dh(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&&(Dh(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=yR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function hge(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 Zw(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=>R4(s,n)).join("/"):R4(r,n)}function T4({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=W7(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=Zw("_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=Zw(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=Zw(y,e,n)??"";f+="/"+E+w+C;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:s}}function R4(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function hr(t){return t?.isNotFound===!0}function pge(){try{return sessionStorage}catch{return}}const gge="tsr-scroll-restoration-v1_3",Z7=pge();function mge(){try{return JSON.parse(Z7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function vge(){try{Z7?.setItem(gge,JSON.stringify(Sc))}catch{}}const Sc=mge(),I4="data-scroll-restoration-id",yge=t=>t.state.__TSR_key||t.href;function bge(t){const e=t.getAttribute(I4);if(e)return`[${I4}="${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 fm=!1;const uv="window";function N_(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function O4(t){const e=new Set;for(const n of t){if(n===uv)continue;const r=N_(n);r&&e.add(r)}return e}function Sge(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const s=t.options.getScrollRestorationKey||yge,o=new Set,a=u=>{const c=Sc[u]||={};for(const f of o)f===document?c[uv]={scrollX,scrollY}:f.isConnected&&(c[bge(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,fm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{fm||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())),vge()})),!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=Sc[S];if(E){let C=Sc[y];for(const w in E){if(w===uv){if(h)continue}else{const T=N_(w);if(!T||h&&f&&(m??=O4(f),m.has(T)))continue}C||(C=Sc[y]={}),C[w]??=E[w]}}}fm=!0;try{const E=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(h){!E&&f&&(m??=O4(f));const T=E&&C&&g,_=r.restoring?Sc[y]:void 0;if(_)for(const R in _){const{scrollX:M,scrollY:N}=_[R];if(R===uv){if(T)continue;scrollTo({top:N,left:M,behavior:c}),w=!0}else{const O=N_(R);O&&(O.scrollLeft=M,O.scrollTop=N,m?.delete(O))}}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{fm=!1}}))}function Ege(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 Xw(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Cge(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]=Xw(s):Array.isArray(o)?o.push(Xw(s)):n[r]=[o,Xw(s)]}return n}const wge=_ge(JSON.parse),xge=Age(JSON.stringify,JSON.parse);function _ge(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=Cge(e);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=t(s)}catch{}}return n}}function Age(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=Ege(s,r);return o?`?${o}`:""}}const Ul="__root__";function X7(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=M_(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=Q7(t[n],e);return e}}}function Rge(t){const e=Y7(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 M_(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 Q7(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 Ige(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([]),T=n([]),_=n([]),R=r(()=>Qw(a,w.get())),M=r(()=>Qw(u,T.get())),N=r(()=>Qw(c,_.get())),O=r(()=>w.get()[0]),k=r(()=>w.get().some(ee=>a.get(ee)?.get().status==="pending")),F=r(()=>({locationHref:y.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),$=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=Uh(64);function z(ee){let de=D.get(ee);return de||(de=r(()=>{const ce=w.get();for(const xe of ce){const L=a.get(xe);if(L&&L.routeId===ee)return L.get()}}),D.set(ee,de)),de}const q={status:f,loadedAt:h,isLoading:g,isTransitioning:m,location:y,resolvedLocation:S,statusCode:E,redirect:C,matchesId:w,pendingIds:T,cachedIds:_,matches:R,pendingMatches:M,cachedMatches:N,firstId:O,hasPending:k,matchRouteDeps:F,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:$,getRouteMatchStore:z,setMatches:Y,setPending:te,setCached:H};Y(t.matches),o?.(q);function Y(ee){Jw(ee,a,w,n,s)}function te(ee){Jw(ee,u,T,n,s)}function H(ee){Jw(ee,c,_,n,s)}return q}function Qw(t,e){const n=[];for(const r of e){const s=t.get(r);s&&n.push(s.get())}return n}function Jw(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)}ege(n.get(),o)||n.set(o)})}const P_=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Oge=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)),Fl=(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},N4=(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)&&!hr(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":hr(n)?"notFound":r.status==="pending"?"success":r.status,context:Fl(t,e.index),isFetching:!1,error:n})),hr(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},J7=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},M4=(t,e,n)=>{const r=Fl(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)&&!hr(n)&&(t.serialError??=n)},ez=(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||nz(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{P_(t)},s);r._nonReactive.pendingTimeout=o}},Nge=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ez(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()},Mge=(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),ez(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={...Fl(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},T=R=>{if(R===void 0){t.router.batch(()=>{h(),g()});return}(zr(R)||hr(R))&&(h(),jf(t,n,R)),t.router.batch(()=>{h(),t.updateMatch(e,M=>({...M,__beforeLoadContext:R})),g()})};let _;try{if(_=r.options.beforeLoad(w),Lh(_))return h(),_.catch(R=>{jf(t,n,R)}).then(T)}catch(R){h(),jf(t,n,R)}T(_)},Pge=(t,e)=>{const{id:n,routeId:r}=t.matches[e],s=t.router.looseRoutesById[r],o=()=>u(),a=()=>Mge(t,n,e,s),u=()=>{if(J7(t,n))return;const c=Nge(t,n,s);return Lh(c)?c.then(a):a()};return o()},kge=(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}))},tz=(t,e,n,r,s)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),h=Fl(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}},P4=async(t,e,n,r,s)=>{try{const o=t.router.getMatch(n);try{(!(B7??t.router.isServer)||o.ssr===!0)&&Fh(s);const a=s.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(tz(t,e,n,r,s)),f=!!u&&Lh(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:Fl(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:Fl(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,hr(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)&&!hr(u)&&await Fh(s,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Fl(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Ia(t,a,o)}},Dge=async(t,e,n)=>{async function r(y,S,E,C,w){const T=Date.now()-S.updatedAt,_=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(tz(t,e,s,n,w)):R,{status:N,invalid:O}=C,k=T>=_&&(!!t.forceStaleReload||C.cause==="enter"||E!==void 0&&E!==C.id);a=N==="success"&&(O||(M??k)),y&&w.options.preload===!1||(a&&!t.sync&&h?(u=!0,(async()=>{try{await P4(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 P4(t,e,s,n,w):M4(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(J7(t,s)){if(!t.router.getMatch(s))return t.matches[n];M4(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),T=w._nonReactive.error||w.error;T&&Ia(t,w,T),w.status==="pending"&&await r(C,y,E,w,c)}else{const w=C&&!t.router.stores.matchStores.has(s),T=t.router.getMatch(s);T._nonReactive.loaderPromise=Vc(),w!==T.preload&&t.updateMatch(s,_=>({..._,preload:w})),await r(C,y,E,T,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 k4(t){const e=t,n=[];Oge(e.router)&&P_(e);let r;for(let m=0;m<e.matches.length;m++){try{const y=Pge(e,m);Lh(y)&&await y}catch(y){if(zr(y))throw y;if(hr(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?N4(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(Dge(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;hr(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=N4(e,f);m===void 0&&mi();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 Fh(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 Fh(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=kge(e,y,E);if(C){const w=await C;e.updateMatch(y,T=>({...T,...w}))}}catch(C){console.error(`Error executing head for route ${S}:`,C)}}const g=P_(e);if(Lh(g)&&await g,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function D4(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Fh(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=D4(t,cv);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():D4(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function nz(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",L4="popstate",U4="beforeunload";function Lge(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=F4(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=F4(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 F4(t,e){e||(e={});const n=bR();return{...e,key:n,__TSR_key:n,[Ma]:t}}function Uge(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=bR();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 T=()=>{C&&(O._ignoreSubscribers=!0,(C.isPush?e.history.pushState:e.history.replaceState)(C.state,"",C.href),O._ignoreSubscribers=!1,C=void 0,w=void 0,h=void 0)},_=(k,F,$)=>{const D=u(F);w||(h=f),f=Hv(F,$),C={href:D,state:$,isPush:C?.isPush||k==="push"},w||(w=Promise.resolve().then(()=>T()))},R=k=>{f=c(),O.notify({type:k})},M=async()=>{if(m){m=!1;return}const k=c(),F=k.state[Ma]-f.state[Ma],$=F===1,D=F===-1,z=!$&&!D||g;g=!1;const q=z?"GO":D?"BACK":"FORWARD",Y=z?{type:"GO",index:F}:{type:D?"BACK":"FORWARD"};if(y)y=!1;else{const te=o();if(typeof document<"u"&&te.length){for(const H of te)if(await H.blockerFn({currentLocation:f,nextLocation:k,action:q})){m=!0,e.history.go(1),O.notify(Y);return}}}f=c(),O.notify(Y)},N=k=>{if(S){S=!1;return}let F=!1;const $=o();if(typeof document<"u"&&$.length)for(const D of $){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=""},O=Lge({getLocation:E,getLength:()=>e.history.length,pushState:(k,F)=>_("push",k,F),replaceState:(k,F)=>_("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:T,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(U4,N,{capture:!0}),e.removeEventListener(L4,M)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(U4,N,{capture:!0}),e.addEventListener(L4,M),e.history.pushState=function(...k){const F=n.apply(e.history,k);return O._ignoreSubscribers||R("PUSH"),F},e.history.replaceState=function(...k){const F=r.apply(e.history,k);return O._ignoreSubscribers||R("REPLACE"),F},O}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=bR();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 bR(){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 zge=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=hge(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Uge()),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=Uh(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=Ige(Bge(this.latestLocation),h),Sge(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=Y7(c);g&&g!=="/"&&h.push(Rge({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=age(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&nge(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),T=this.options.stringifySearch(w);return{href:c+T+h,publicHref:c+T+h,pathname:zf(c).path,external:!1,searchStr:T,search:El(r?.search,w),hash:zf(h.slice(1)).path,state:Il(r?.state,m)}}const y=new URL(g,this.origin),S=M_(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:El(r?.search,E),hash:zf(S.hash.slice(1)).path,state:Il(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)=>fge({base:n,to:r.includes("//")?yR(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=>Hge({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,Rl(o.params,g)),E=this.routesByPath[pi(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&&$7(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(T4({path:y,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let T=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,...T}))}catch{}}),T=D}T=$ge({search:T,dest:o,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),T=El(h,T);const _=this.options.stringifySearch(T),R=o.hash===!0?a.hash:o.hash?Rl(o.hash,a.hash):void 0,M=R?`#${R}`:"";let N=o.state===!0?a.state:o.state?Rl(o.state,a.state):{};N=Il(a.state,N);const O=`${w}${_}${M}`;let k,F,$=!1;if(this.rewrite){const D=new URL(O,this.origin),z=Q7(this.rewrite,D);k=D.href.replace(D.origin,""),z.origin!==this.origin?(F=z.href,$=!0):F=z.pathname+z.search+z.hash}else k=Jpe(O),F=k;return{publicHref:F,href:k,pathname:w,search:T,searchStr:_,state:N,hash:R??"",external:$,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=rge(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,Rl(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=Ll(s.state,this.latestLocation.state);return f.forEach(g=>{delete s.state[g]}),h},u=pi(this.latestLocation.href)===pi(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=M_(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 k4({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,T=this.stores.matches.get();m=w?T.filter(M=>!this.stores.pendingMatchStores.has(M.id)):null;const _=new Set;for(const M of this.stores.pendingMatchStores.values())M.routeId&&_.add(M.routeId);const R=new Set;for(const M of this.stores.matchStores.values())M.routeId&&R.add(M.routeId);y=w?T.filter(M=>!_.has(M.routeId)):null,S=w?C.filter(M=>!R.has(M.routeId)):null,E=w?C.filter(M=>R.has(M.routeId)):T,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 T of C)this.looseRoutesById[T.routeId].options[w]?.(T)})})}})}catch(h){zr(h)?(s=h,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):hr(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=Fh,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 k4({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});hr(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=sge(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Ll(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ll(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??xge,parseSearch:t.parseSearch??wge,protocolAllowlist:t.protocolAllowlist??Qpe}),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=G7(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["**"]:pi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?Wge(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 Y=dv(g.options.validateSearch,{...z})??void 0;y={...z,...Y},S={...q,...Y},E=void 0}catch(Y){let te=Y;if(Y instanceof $v||(te=new $v(Y.message,{cause:Y})),e?.throwOnError)throw te;y=z,S={},E=te}}const C=g.options.loaderDeps?.({search:y})??"",w=C?JSON.stringify(C):"",{interpolatedPath:T,usedParams:_}=T4({path:g.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),R=g.id+T+w,M=this.getMatch(R),N=f.get(g.id),O=M?._strictParams??_;let k;if(!M)try{z4(g,O)}catch(z){if(hr(z)||zr(z)?k=z:k=new jge(z.message,{cause:z}),e?.throwOnError)throw k}Object.assign(s,O);const F=N?"stay":"enter";let $;if(M)$={...M,cause:F,params:N?.params??s,_strictParams:O,search:El(N?N.search:M.search,y),_strictSearch:S};else{const z=g.options.loader||g.options.beforeLoad||g.lazyFn||nz(g)?"pending":"success";$={id:R,ssr:g.options.ssr,index:h,routeId:g.id,params:N?.params??s,_strictParams:O,pathname:T,updatedAt:Date.now(),search:N?El(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?Il(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||($.globalNotFound=u===g.id),$.searchError=E;const D=this.getParentContext(m);$.context={...D,...$.__routeContext,...$.__beforeLoadContext},c[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?El(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:T=>this.navigate({...T,_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=Dh(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=Dh(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{z4(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{},jge=class extends Error{};function Bge(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 Hge({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),s=pi(t);let o;const a=oge(s,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function $ge({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return qge(n)(t,e,r??!1)}function qge(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=Rl(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 Wge(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 Ul}function z4(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 Vge="Error preloading route! ☝️";var rz=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=Ul:this.parentRoute||mi();let s=r?Ul:n?.path;s&&s!=="/"&&(s=K7(s));const o=n?.id||s;let a=r?Ul: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=pi(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=>X7({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.")}},Gge=class extends rz{constructor(t){super(t)}};function SR(t){const e=t.errorComponent??ER;return I.jsx(Kge,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?x.createElement(e,{error:n,reset:r}):t.children})}var Kge=class extends x.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 ER({error:t}){const[e,n]=x.useState(!1);return I.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[I.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),I.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"})]}),I.jsx("div",{style:{height:".25rem"}}),e?I.jsx("div",{children:I.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?I.jsx("code",{children:t.message}):null})}):null]})}function Yge({children:t,fallback:e=null}){return sz()?I.jsx(j.Fragment,{children:t}):I.jsx(j.Fragment,{children:e})}function sz(){return j.useSyncExternalStore(Zge,()=>!0,()=>!1)}function Zge(){return()=>{}}var oz=x.createContext(null);function hs(t){return x.useContext(oz)}var Sb=x.createContext(void 0),Xge=x.createContext(void 0),on=(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))(on||{});function Qge({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 T=f.nextDep;if(T!==void 0){f=T;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 Jge(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 k_=[];let fv=0;const{link:j4,unlink:eme,propagate:tme,checkDirty:iz,shallowPropagate:B4}=Qge({update(t){return t._update()},notify(t){k_[D_++]=t,t.flags&=~on.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=on.Mutable|on.Dirty,qv(t))}});let hm=0,D_=0,Eo,L_=0;function az(t){try{++L_,t()}finally{--L_||lz()}}function qv(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=eme(n,t)}function lz(){if(!(L_>0)){for(;hm<D_;){const t=k_[hm];k_[hm++]=void 0,t.notify()}hm=0,D_=0}}function H4(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?on.None:on.Mutable,get(){return Eo!==void 0&&j4(s,Eo,fv),s._snapshot},subscribe(o){const a=Jge(o),u={current:!1},c=nme(()=>{s.get(),u.current?a.next?.(s._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Eo,u=e?.compare??Object.is;if(n)Eo=s,++fv,s.depsTail=void 0;else if(o===void 0)return!1;n&&(s.flags=on.Mutable|on.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{Eo=a,n&&(s.flags&=~on.RecursedCheck),qv(s)}}};return n?(s.flags=on.Mutable|on.Dirty,s.get=function(){const o=s.flags;if(o&on.Dirty||o&on.Pending&&iz(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&B4(a)}}else o&on.Pending&&(s.flags=o&~on.Pending);return Eo!==void 0&&j4(s,Eo,fv),s._snapshot}):s.set=function(o){if(s._update(o)){const a=s.subs;a!==void 0&&(tme(a),B4(a),lz())}},s}function nme(t){const e=()=>{const r=Eo;Eo=n,++fv,n.depsTail=void 0,n.flags=on.Watching|on.RecursedCheck;try{return t()}finally{Eo=r,n.flags&=~on.RecursedCheck,qv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:on.Watching|on.RecursedCheck,notify(){const r=this.flags;r&on.Dirty||r&on.Pending&&iz(this.deps,this)?e():this.flags=on.Watching},stop(){this.flags=on.None,this.depsTail=void 0,qv(this)}};return e(),n}function rme(t,e){return t===e}function Wr(t,e,n=rme){const r=x.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),s=x.useCallback(()=>t?.get(),[t]);return TT.useSyncExternalStoreWithSelector(r,s,s,e,n)}var ex={get(){},subscribe(){return{unsubscribe(){}}}};function sme(t,e){const n=x.useRef();return r=>{const s=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=Il(n.current,s):s}}function fu(t){const e=hs(),n=x.useContext(t.from?Xge:Sb),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),s=sme(t,e),o=Wr(r??ex,a=>a?s(a):ex);if(o!==ex)return o;(t.shouldThrow??!0)&&mi()}function uz(t){return fu({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function cz(t){const{select:e,...n}=t;return fu({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function dz(t){return fu({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 fz(t){return fu({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function CR(t){const e=hs();return x.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function nIe(t){const e=hs(),n=CR(),r=x.useRef(null);return Rc(()=>{r.current!==t&&(n(t),r.current=t)},[e,t,n]),null}function hz(t){return fu({...t,select:e=>t.select?t.select(e.context):e.context})}function ome(t,e){const n=hs(),r=Vpe(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:T,style:_,className:R,onClick:M,onBlur:N,onFocus:O,onMouseEnter:k,onMouseLeave:F,onTouchStart:$,ignoreBlocker:D,params:z,search:q,hash:Y,state:te,mask:H,reloadDocument:ee,unsafeRelative:de,from:ce,_fromLocation:xe,...L}=t,V=sz(),K=x.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,mt=>mt,(mt,yn)=>mt.href===yn.href),oe=x.useMemo(()=>{const mt={_fromLocation:J,...K};return n.buildLocation(mt)},[n,J,K]),he=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ue=oe.maskedLocation?oe.maskedLocation.external:oe.external,ve=x.useMemo(()=>dme(he,ue,n.history,T),[T,ue,he,n.history]),_e=x.useMemo(()=>{if(ve?.external)return jv(ve.href,n.protocolAllowlist)?void 0:ve.href;if(!fme(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=x.useMemo(()=>{if(_e)return!1;if(a?.exact){if(!dge(J.pathname,oe.pathname,n.basepath))return!1}else{const mt=Bv(J.pathname,n.basepath),yn=Bv(oe.pathname,n.basepath);if(!(mt.startsWith(yn)&&(mt.length===yn.length||mt[yn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Ll(J.search,oe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&J.hash===oe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,J,_e,V,oe.hash,oe.pathname,oe.search,n.basepath]),Ee=Xe?Rl(s,{})??ime:tx,gt=Xe?tx:Rl(o,{})??tx,Ce=[R,Ee.className,gt.className].filter(Boolean).join(" "),je=(_||Ee.style||gt.style)&&{..._,...Ee.style,...gt.style},[Be,$e]=x.useState(!1),gr=x.useRef(!1),Ct=t.reloadDocument||_e?!1:c??n.options.defaultPreload,Gr=f??n.options.defaultPreloadDelay??0,Yn=x.useCallback(()=>{n.preloadRoute({...K,_builtLocation:oe}).catch(mt=>{console.warn(mt),console.warn(Vge)})},[n,K,oe]);Wpe(r,x.useCallback(mt=>{mt?.isIntersecting&&Yn()},[Yn]),cme,{disabled:!!T||Ct!=="viewport"}),x.useEffect(()=>{gr.current||!T&&Ct==="render"&&(Yn(),gr.current=!0)},[T,Yn,Ct]);const Tr=mt=>{const yn=mt.currentTarget.getAttribute("target"),Ir=w!==void 0?w:yn;if(!T&&!hme(mt)&&!mt.defaultPrevented&&(!Ir||Ir==="_self")&&mt.button===0){mt.preventDefault(),H8.flushSync(()=>{$e(!0)});const ro=n.subscribe("onResolved",()=>{ro(),$e(!1)});n.navigate({...K,replace:m,resetScroll:S,hashScrollIntoView:g,startTransition:y,viewTransition:E,ignoreBlocker:D})}};if(_e)return{...L,ref:r,href:_e,...C&&{children:C},...w&&{target:w},...T&&{disabled:T},..._&&{style:_},...R&&{className:R},...M&&{onClick:M},...N&&{onBlur:N},...O&&{onFocus:O},...k&&{onMouseEnter:k},...F&&{onMouseLeave:F},...$&&{onTouchStart:$}};const no=mt=>{if(T||Ct!=="intent")return;if(!Gr){Yn();return}const yn=mt.currentTarget;if(Bf.has(yn))return;const Ir=setTimeout(()=>{Bf.delete(yn),Yn()},Gr);Bf.set(yn,Ir)},Rr=mt=>{T||Ct!=="intent"||Yn()},Gt=mt=>{if(T||!Ct||!Gr)return;const yn=mt.currentTarget,Ir=Bf.get(yn);Ir&&(clearTimeout(Ir),Bf.delete(yn))};return{...L,...Ee,...gt,href:ve?.href,ref:r,onClick:uc([M,Tr]),onBlur:uc([N,Gt]),onFocus:uc([O,no]),onMouseEnter:uc([k,no]),onMouseLeave:uc([F,Gt]),onTouchStart:uc([$,Rr]),disabled:!!T,target:w,...je&&{style:je},...Ce&&{className:Ce},...T&&ame,...Xe&&lme,...V&&Be&&ume}}var tx={},ime={className:"active"},ame={role:"link","aria-disabled":!0},lme={"data-status":"active","aria-current":"page"},ume={"data-transitioning":"transitioning"},Bf=new WeakMap,cme={rootMargin:"100px"},uc=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function dme(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function fme(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var pz=x.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:s,...o}=ome(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return x.createElement("a",c,a)}return x.createElement(n,o,a)});function hme(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var pme=class extends rz{constructor(e){super(e),this.useMatch=n=>fu({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hz({...n,from:this.id}),this.useSearch=n=>fz({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>dz({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>cz({...n,from:this.id}),this.useLoaderData=n=>uz({...n,from:this.id}),this.useNavigate=()=>CR({from:this.fullPath}),this.Link=j.forwardRef((n,r)=>I.jsx(pz,{ref:r,from:this.fullPath,...n}))}};function gme(t){return new pme(t)}function mme(){return t=>yme(t)}var vme=class extends Gge{constructor(t){super(t),this.useMatch=e=>fu({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>hz({...e,from:this.id}),this.useSearch=e=>fz({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>dz({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>cz({...e,from:this.id}),this.useLoaderData=e=>uz({...e,from:this.id}),this.useNavigate=()=>CR({from:this.fullPath}),this.Link=j.forwardRef((e,n)=>I.jsx(pz,{ref:n,from:this.fullPath,...e}))}};function yme(t){return new vme(t)}function lr(t){return new bme(t,{silent:!0}).createRoute}var bme=class{constructor(t,e){this.path=t,this.createRoute=n=>{const r=gme(n);return r.isRoot=!1,r},this.silent=e?.silent}};function qn(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,Ype(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(S4)S4(a());else throw a();return x.createElement(r,f)};return u.preload=a,u}function Sme(t){const e=hs(),n=`not-found-${Wr(e.stores.location,r=>r.pathname)}-${Wr(e.stores.status,r=>r)}`;return I.jsx(SR,{getResetKey:()=>n,onCatch:(r,s)=>{if(hr(r))t.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(hr(r))return t.fallback?.(r);throw r},children:t.children})}function Eme(){return I.jsx("p",{children:"Not Found"})}function Ec(t){return I.jsx(I.Fragment,{children:t.children})}function gz(t,e,n){return e.options.notFoundComponent?I.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?I.jsx(t.options.defaultNotFoundComponent,{...n}):I.jsx(Eme,{})}function Cme(t){return null}function wme(){return Cme(hs()),null}var xme=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,_me=(t,e)=>t[0]===e[0]&&t[1]===e[1],mz=x.memo(function({matchId:e}){const n=hs(),r=n.stores.matchStores.get(e);r||mi();const s=Wr(n.stores.loadedAt,a=>a),o=Wr(r,a=>a,xme);return I.jsx(Ame,{router:n,matchId:e,resetKey:s,matchState:x.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 Ame({router:t,matchId:e,resetKey:n,matchState:r}){const s=t.routesById[r.routeId],o=s.options.pendingComponent??t.options.defaultPendingComponent,a=o?I.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))?x.Suspense:Ec,m=u?SR:Ec,y=f?Sme:Ec;return I.jsxs(s.isRoot?s.options.shellComponent??Ec:Ec,{children:[I.jsx(Sb.Provider,{value:e,children:I.jsx(g,{fallback:a,children:I.jsx(m,{getResetKey:()=>n,errorComponent:u||ER,onCatch:(S,E)=>{if(hr(S))throw S.routeId??=r.routeId,S;c?.(S,E)},children:I.jsx(y,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!s.isRoot)throw S;return x.createElement(f,S)},children:h||r._displayPending?I.jsx(Yge,{fallback:a,children:I.jsx($4,{matchId:e})}):I.jsx($4,{matchId:e})})})})}),r.parentRouteId===Ul?I.jsxs(I.Fragment,{children:[I.jsx(Tme,{}),t.options.scrollRestoration&&B7?I.jsx(wme,{}):null]}):null]})}function Tme(){const t=hs(),e=x.useRef();return Rc(()=>{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 $4=x.memo(function({matchId:e}){const n=hs(),r=(h,g)=>n.getMatch(h.id)?._nonReactive[g]??h._nonReactive[g],s=n.stores.matchStores.get(e);s||mi();const o=Wr(s,h=>h),a=o.routeId,u=n.routesById[a],c=x.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=x.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?I.jsx(h,{},c):I.jsx(vz,{})},[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 hr(o.error)||mi(),gz(n,u,o.error);if(o.status==="redirected")throw zr(o.error)||mi(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),vz=x.memo(function(){const e=hs(),n=x.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],_me),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?I.jsx(e.options.defaultPendingComponent,{}):null;if(s)return a||mi(),gz(e,a,void 0);if(!o)return null;const c=I.jsx(mz,{matchId:o});return r===Ul?I.jsx(x.Suspense,{fallback:u,children:c}):c});function Rme(){const t=hs(),e=x.useRef({router:t,mounted:!1}),[n,r]=x.useState(!1),s=Wr(t.stores.isLoading,g=>g),o=Wr(t.stores.hasPending,g=>g),a=Gw(s),u=s||n||o,c=Gw(u),f=s||o,h=Gw(f);return t.startTransition=g=>{r(!0),x.startTransition(()=>{g(),r(!1)})},x.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 pi(t.latestLocation.publicHref)!==pi(m.publicHref)&&t.commitLocation({...m,replace:!0}),()=>{g()}},[t,t.history]),Rc(()=>{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]),Rc(()=>{a&&!s&&t.emit({type:"onLoad",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,s]),Rc(()=>{h&&!f&&t.emit({type:"onBeforeRouteMount",...Fc(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,h,t]),Rc(()=>{if(c&&!u){const g=Fc(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...g}),az(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function Ime(){const t=hs(),e=t.routesById[Ul].options.pendingComponent??t.options.defaultPendingComponent,n=e?I.jsx(e,{}):null,r=I.jsxs(typeof document<"u"&&t.ssr?Ec:x.Suspense,{fallback:n,children:[I.jsx(Rme,{}),I.jsx(Ome,{})]});return t.options.InnerWrap?I.jsx(t.options.InnerWrap,{children:r}):r}function Ome(){const t=hs(),e=Wr(t.stores.firstId,s=>s),n=Wr(t.stores.loadedAt,s=>s),r=e?I.jsx(mz,{matchId:e}):null;return I.jsx(Sb.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:I.jsx(SR,{getResetKey:()=>n,errorComponent:ER,onCatch:void 0,children:r})})}var Nme=t=>({createMutableStore:H4,createReadonlyStore:H4,batch:az}),Mme=t=>new Pme(t),Pme=class extends zge{constructor(t){super(t,Nme)}};function kme({router:t,children:e,...n}){$7(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=I.jsx(oz.Provider,{value:t,children:e});return t.options.Wrap?I.jsx(t.options.Wrap,{children:r}):r}function Dme({router:t,...e}){return I.jsx(kme,{router:t,...e,children:I.jsx(Ime,{})})}var nx={exports:{}},Hf={},rx={exports:{}},sx={};var q4;function Lme(){return q4||(q4=1,(function(t){function e(H,ee){var de=H.length;H.push(ee);e:for(;0<de;){var ce=de-1>>>1,xe=H[ce];if(0<s(xe,ee))H[ce]=ee,H[de]=xe,de=ce;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],de=H.pop();if(de!==ee){H[0]=de;e:for(var ce=0,xe=H.length,L=xe>>>1;ce<L;){var V=2*(ce+1)-1,K=H[V],J=V+1,oe=H[J];if(0>s(K,de))J<xe&&0>s(oe,K)?(H[ce]=oe,H[J]=de,ce=J):(H[ce]=K,H[V]=de,ce=V);else if(J<xe&&0>s(oe,de))H[ce]=oe,H[J]=de,ce=J;else break e}}return ee}function s(H,ee){var de=H.sortIndex-ee.sortIndex;return de!==0?de:H.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,g=null,m=3,y=!1,S=!1,E=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function R(H){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=H)r(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(f)}}function M(H){if(E=!1,R(H),!S)if(n(c)!==null)S=!0,N||(N=!0,z());else{var ee=n(f);ee!==null&&te(M,ee.startTime-H)}}var N=!1,O=-1,k=5,F=-1;function $(){return C?!0:!(t.unstable_now()-F<k)}function D(){if(C=!1,N){var H=t.unstable_now();F=H;var ee=!0;try{e:{S=!1,E&&(E=!1,T(O),O=-1),y=!0;var de=m;try{t:{for(R(H),g=n(c);g!==null&&!(g.expirationTime>H&&$());){var ce=g.callback;if(typeof ce=="function"){g.callback=null,m=g.priorityLevel;var xe=ce(g.expirationTime<=H);if(H=t.unstable_now(),typeof xe=="function"){g.callback=xe,R(H),ee=!0;break t}g===n(c)&&r(c),R(H)}else r(c);g=n(c)}if(g!==null)ee=!0;else{var L=n(f);L!==null&&te(M,L.startTime-H),ee=!1}}break e}finally{g=null,m=de,y=!1}ee=void 0}}finally{ee?z():N=!1}}}var z;if(typeof _=="function")z=function(){_(D)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,Y=q.port2;q.port1.onmessage=D,z=function(){Y.postMessage(null)}}else z=function(){w(D,0)};function te(H,ee){O=w(function(){H(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_next=function(H){switch(m){case 1:case 2:case 3:var ee=3;break;default:ee=m}var de=m;m=ee;try{return H()}finally{m=de}},t.unstable_requestPaint=function(){C=!0},t.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var de=m;m=H;try{return ee()}finally{m=de}},t.unstable_scheduleCallback=function(H,ee,de){var ce=t.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?ce+de:ce):de=ce,H){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=de+xe,H={id:h++,callback:ee,priorityLevel:H,startTime:de,expirationTime:xe,sortIndex:-1},de>ce?(H.sortIndex=de,e(f,H),n(c)===null&&H===n(f)&&(E?(T(O),O=-1):E=!0,te(M,de-ce))):(H.sortIndex=xe,e(c,H),S||y||(S=!0,N||(N=!0,z()))),H},t.unstable_shouldYield=$,t.unstable_wrapCallback=function(H){var ee=m;return function(){var de=m;m=ee;try{return H.apply(this,arguments)}finally{m=de}}}})(sx)),sx}var W4;function Ume(){return W4||(W4=1,rx.exports=Lme()),rx.exports}var V4;function Fme(){if(V4)return Hf;V4=1;var t=Ume(),e=ap(),n=B8();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 A=!1,P=v.child;P;){if(P===d){A=!0,d=v,p=b;break}if(P===p){A=!0,p=v,d=b;break}P=P.sibling}if(!A){for(P=b.child;P;){if(P===d){A=!0,d=b,p=v;break}if(P===p){A=!0,p=b,d=v;break}P=P.sibling}if(!A)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"),T=Symbol.for("react.consumer"),_=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),$=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 Y(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 _:return i.displayName||"Context";case T: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 O:return l=i.displayName||null,l!==null?l:Y(i.type)||"Memo";case k:l=i._payload,i=i._init;try{return Y(i(l))}catch{}}return null}var te=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},ce=[],xe=-1;function L(i){return{current:i}}function V(i){0>xe||(i.current=ce[xe],ce[xe]=null,xe--)}function K(i,l){xe++,ce[xe]=i.current,i.current=l}var J=L(null),oe=L(null),he=L(null),ue=L(null);function ve(i,l){switch(K(he,l),K(oe,i),K(J,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?gN(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=gN(l),i=mN(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(J),K(J,i)}function _e(){V(J),V(oe),V(he)}function Xe(i){i.memoizedState!==null&&K(ue,i);var l=J.current,d=mN(l,i.type);l!==d&&(K(oe,i),K(J,d))}function Ee(i){oe.current===i&&(V(J),V(oe)),ue.current===i&&(V(ue),bf._currentValue=de)}var gt,Ce;function je(i){if(gt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);gt=l&&l[1]||"",Ce=-1<d.stack.indexOf(`
217
- at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
218
- `+gt+i+Ce}var Be=!1;function $e(i,l){if(!i||Be)return"";Be=!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(),A=b[0],P=b[1];if(A&&P){var B=A.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{Be=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?je(d):""}function gr(i,l){switch(i.tag){case 26:case 27:case 5:return je(i.type);case 16:return je("Lazy");case 13:return i.child!==l&&l!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return $e(i.type,!1);case 11:return $e(i.type.render,!1);case 1:return $e(i.type,!0);case 31:return je("Activity");default:return""}}function Ct(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,Yn=t.unstable_scheduleCallback,Tr=t.unstable_cancelCallback,no=t.unstable_shouldYield,Rr=t.unstable_requestPaint,Gt=t.unstable_now,mt=t.unstable_getCurrentPriorityLevel,yn=t.unstable_ImmediatePriority,Ir=t.unstable_UserBlockingPriority,ro=t.unstable_NormalPriority,Cd=t.unstable_LowPriority,Lo=t.unstable_IdlePriority,vu=t.log,yu=t.unstable_setDisableYieldValue,Pi=null,ur=null;function ks(i){if(typeof vu=="function"&&yu(i),ur&&typeof ur.setStrictMode=="function")try{ur.setStrictMode(Pi,i)}catch{}}var Zn=Math.clz32?Math.clz32:gs,wd=Math.log,ki=Math.LN2;function gs(i){return i>>>=0,i===0?32:31-(wd(i)/ki|0)|0}var Di=256,Za=262144,Xa=4194304;function Ds(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 Qa(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var v=0,b=i.suspendedLanes,A=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~b,p!==0?v=Ds(p):(A&=P,A!==0?v=Ds(A):d||(d=P&~i,d!==0&&(v=Ds(d))))):(P=p&~b,P!==0?v=Ds(P):A!==0?v=Ds(A):d||(d=p&~i,d!==0&&(v=Ds(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 so(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function bu(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=Xa;return Xa<<=1,(Xa&62914560)===0&&(Xa=4194304),i}function oo(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Uo(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 A=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=A&~d;0<d;){var se=31-Zn(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&&wp(i,p,0),b!==0&&v===0&&i.tag!==0&&(i.suspendedLanes|=b&~(A&~l))}function wp(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-Zn(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-Zn(d),v=1<<p;v&l|i[p]&l&&(i[p]|=l),d&=~v}}function Su(i,l){var d=l&-l;return d=(d&42)!==0?1:Eu(d),(d&(i.suspendedLanes|l))!==0?0:d}function Eu(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 Ja(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function xp(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:zN(i.type))}function Li(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var io=Math.random().toString(36).slice(2),On="__reactFiber$"+io,nt="__reactProps$"+io,Yr="__reactContainer$"+io,Ad="__reactEvents$"+io,_p="__reactListeners$"+io,Td="__reactHandles$"+io,Rd="__reactResources$"+io,Ui="__reactMarker$"+io;function Id(i){delete i[On],delete i[nt],delete i[Ad],delete i[_p],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=wN(i);i!==null;){if(d=i[On])return d;i=wN(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 el(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 un(i){i[Ui]=!0}var ao=new Set,Ap={};function Ls(i,l){ji(i,l),ji(i+"Capture",l)}function ji(i,l){for(Ap[i]=l,i=0;i<l.length;i++)ao.add(l[i])}var Tp=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={},tl={};function Nd(i){return Gr.call(tl,i)?!0:Gr.call(Od,i)?!1:Tp.test(i)?tl[i]=!0:(Od[i]=!0,!1)}function Fo(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 Us(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 cn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Rp(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(A){d=""+A,b.call(this,A)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(A){d=""+A},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Cu(i){if(!i._valueTracker){var l=Rp(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=Rp(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function wu(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 Ip=/[\n"\\]/g;function Or(i){return i.replace(Ip,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Pd(i,l,d,p,v,b,A,P){i.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?i.type=A:i.removeAttribute("type"),l!=null?A==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+cn(l)):i.value!==""+cn(l)&&(i.value=""+cn(l)):A!=="submit"&&A!=="reset"||i.removeAttribute("value"),l!=null?Bi(i,A,cn(l)):d!=null?Bi(i,A,cn(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=""+cn(P):i.removeAttribute("name")}function kd(i,l,d,p,v,b,A,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)){Cu(i);return}d=d!=null?""+cn(d):"",l=l!=null?""+cn(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,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(i.name=A),Cu(i)}function Bi(i,l,d){l==="number"&&wu(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function lo(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=""+cn(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=""+cn(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+cn(d):""}function U(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(te(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=cn(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),Cu(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 fe=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||fe.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function De(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 Fe(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 nn=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"]]),zn=/^[\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 cr(i){return zn.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function rn(){}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 xu=null,_u=null;function pI(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&&lo(i,!!d.multiple,l,!1)}}}var Hb=!1;function gI(i,l,d){if(Hb)return i(l,d);Hb=!0;try{var p=i(l);return p}finally{if(Hb=!1,(xu!==null||_u!==null)&&(mg(),xu&&(l=xu,i=_u,_u=xu=null,pI(l),i)))for(l=0;l<i.length;l++)pI(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 zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$b=!1;if(zo)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,Op=null;function mI(){if(Op)return Op;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 A=d-i;for(p=1;p<=A&&l[d-p]===v[b-p];p++);return Op=v.slice(i,1<p?1-p:void 0)}function Np(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 Mp(){return!0}function vI(){return!1}function Nr(i){function l(d,p,v,b,A){this._reactName=d,this._targetInst=v,this.type=p,this.nativeEvent=b,this.target=A,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)?Mp:vI,this.isPropagationStopped=vI,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=Mp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Mp)},persist:function(){},isPersistent:Mp}),l}var nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pp=Nr(nl),Ud=g({},nl,{view:0,detail:0}),MH=Nr(Ud),Wb,Vb,Fd,kp=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}}),yI=Nr(kp),PH=g({},kp,{dataTransfer:0}),kH=Nr(PH),DH=g({},Ud,{relatedTarget:0}),Gb=Nr(DH),LH=g({},nl,{animationName:0,elapsedTime:0,pseudoElement:0}),UH=Nr(LH),FH=g({},nl,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),zH=Nr(FH),jH=g({},nl,{data:0}),bI=Nr(jH),BH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HH={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"},$H={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qH(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=$H[i])?!!l[i]:!1}function Kb(){return qH}var WH=g({},Ud,{key:function(i){if(i.key){var l=BH[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Np(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?HH[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"?Np(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Np(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),VH=Nr(WH),GH=g({},kp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SI=Nr(GH),KH=g({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kb}),YH=Nr(KH),ZH=g({},nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),XH=Nr(ZH),QH=g({},kp,{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}),JH=Nr(QH),e$=g({},nl,{newState:0,oldState:0}),t$=Nr(e$),n$=[9,13,27,32],Yb=zo&&"CompositionEvent"in window,zd=null;zo&&"documentMode"in document&&(zd=document.documentMode);var r$=zo&&"TextEvent"in window&&!zd,EI=zo&&(!Yb||zd&&8<zd&&11>=zd),CI=" ",wI=!1;function xI(i,l){switch(i){case"keyup":return n$.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _I(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Au=!1;function s$(i,l){switch(i){case"compositionend":return _I(l);case"keypress":return l.which!==32?null:(wI=!0,CI);case"textInput":return i=l.data,i===CI&&wI?null:i;default:return null}}function o$(i,l){if(Au)return i==="compositionend"||!Yb&&xI(i,l)?(i=mI(),Op=qb=Hi=null,Au=!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 EI&&l.locale!=="ko"?null:l.data;default:return null}}var i$={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 AI(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!i$[i.type]:l==="textarea"}function TI(i,l,d,p){xu?_u?_u.push(p):_u=[p]:xu=p,l=wg(l,"onChange"),0<l.length&&(d=new Pp("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var jd=null,Bd=null;function a$(i){uN(i,0)}function Dp(i){var l=el(i);if(Md(l))return i}function RI(i,l){if(i==="change")return l}var II=!1;if(zo){var Zb;if(zo){var Xb="oninput"in document;if(!Xb){var OI=document.createElement("div");OI.setAttribute("oninput","return;"),Xb=typeof OI.oninput=="function"}Zb=Xb}else Zb=!1;II=Zb&&(!document.documentMode||9<document.documentMode)}function NI(){jd&&(jd.detachEvent("onpropertychange",MI),Bd=jd=null)}function MI(i){if(i.propertyName==="value"&&Dp(Bd)){var l=[];TI(l,Bd,i,Nn(i)),gI(a$,l)}}function l$(i,l,d){i==="focusin"?(NI(),jd=l,Bd=d,jd.attachEvent("onpropertychange",MI)):i==="focusout"&&NI()}function u$(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Dp(Bd)}function c$(i,l){if(i==="click")return Dp(l)}function d$(i,l){if(i==="input"||i==="change")return Dp(l)}function f$(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Zr=typeof Object.is=="function"?Object.is:f$;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 PI(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function kI(i,l){var d=PI(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=PI(d)}}function DI(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?DI(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function LI(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=wu(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=wu(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 h$=zo&&"documentMode"in document&&11>=document.documentMode,Tu=null,Jb=null,$d=null,e0=!1;function UI(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;e0||Tu==null||Tu!==wu(p)||(p=Tu,"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=wg(Jb,"onSelect"),0<p.length&&(l=new Pp("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=Tu)))}function rl(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Ru={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},t0={},FI={};zo&&(FI=document.createElement("div").style,"AnimationEvent"in window||(delete Ru.animationend.animation,delete Ru.animationiteration.animation,delete Ru.animationstart.animation),"TransitionEvent"in window||delete Ru.transitionend.transition);function sl(i){if(t0[i])return t0[i];if(!Ru[i])return i;var l=Ru[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in FI)return t0[i]=l[d];return i}var zI=sl("animationend"),jI=sl("animationiteration"),BI=sl("animationstart"),p$=sl("transitionrun"),g$=sl("transitionstart"),m$=sl("transitioncancel"),HI=sl("transitionend"),$I=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 Fs(i,l){$I.set(i,l),Ls(l,[i])}var Lp=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)},ms=[],Iu=0,r0=0;function Up(){for(var i=Iu,l=r0=Iu=0;l<i;){var d=ms[l];ms[l++]=null;var p=ms[l];ms[l++]=null;var v=ms[l];ms[l++]=null;var b=ms[l];if(ms[l++]=null,p!==null&&v!==null){var A=p.pending;A===null?v.next=v:(v.next=A.next,A.next=v),p.pending=v}b!==0&&qI(d,v,b)}}function Fp(i,l,d,p){ms[Iu++]=i,ms[Iu++]=l,ms[Iu++]=d,ms[Iu++]=p,r0|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function s0(i,l,d,p){return Fp(i,l,d,p),zp(i)}function ol(i,l){return Fp(i,null,null,l),zp(i)}function qI(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-Zn(d),i=b.hiddenUpdates,p=i[v],p===null?i[v]=[l]:p.push(l),l.lane=d|536870912),b):null}function zp(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 Ou={};function v$(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 v$(i,l,d,p)}function o0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function jo(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 WI(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 jp(i,l,d,p,v,b){var A=0;if(p=i,typeof i=="function")o0(i)&&(A=1);else if(typeof i=="string")A=Cq(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 il(d.children,v,b,l);case C:A=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 _:A=10;break e;case T:A=9;break e;case R:A=11;break e;case O:A=14;break e;case k:A=16,p=null;break e}A=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=Xr(A,d,l,v),l.elementType=i,l.type=p,l.lanes=b,l}function il(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 VI(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 GI=new WeakMap;function vs(i,l){if(typeof i=="object"&&i!==null){var d=GI.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Ct(l)},GI.set(i,l),l)}return{value:i,source:l,stack:Ct(l)}}var Nu=[],Mu=0,Bp=null,qd=0,ys=[],bs=0,$i=null,uo=1,co="";function Bo(i,l){Nu[Mu++]=qd,Nu[Mu++]=Bp,Bp=i,qd=l}function KI(i,l,d){ys[bs++]=uo,ys[bs++]=co,ys[bs++]=$i,$i=i;var p=uo;i=co;var v=32-Zn(p)-1;p&=~(1<<v),d+=1;var b=32-Zn(l)+v;if(30<b){var A=v-v%5;b=(p&(1<<A)-1).toString(32),p>>=A,v-=A,uo=1<<32-Zn(l)+v|d<<v|p,co=b+i}else uo=1<<b|d<<v|p,co=i}function l0(i){i.return!==null&&(Bo(i,1),KI(i,1,0))}function u0(i){for(;i===Bp;)Bp=Nu[--Mu],Nu[Mu]=null,qd=Nu[--Mu],Nu[Mu]=null;for(;i===$i;)$i=ys[--bs],ys[bs]=null,co=ys[--bs],ys[bs]=null,uo=ys[--bs],ys[bs]=null}function YI(i,l){ys[bs++]=uo,ys[bs++]=co,ys[bs++]=$i,uo=l.id,co=l.overflow,$i=i}var Xn=null,Kt=null,ft=!1,qi=null,Ss=!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(vs(l,i)),c0}function ZI(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||hN(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=rn),l=!0):l=!1,l||Wi(i,!0)}function XI(i){for(Xn=i.return;Xn;)switch(Xn.tag){case 5:case 31:case 13:Ss=!1;return;case 27:case 3:Ss=!0;return;default:Xn=Xn.return}}function Pu(i){if(i!==Xn)return!1;if(!ft)return XI(i),ft=!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),XI(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=CN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Kt=CN(i)}else l===27?(l=Kt,oa(i.type)?(i=P1,P1=null,Kt=i):Kt=l):Kt=Xn?Cs(i.stateNode.nextSibling):null;return!0}function al(){Kt=Xn=null,ft=!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),ll=null,Ho=null;function Vi(i,l,d){K(f0,l._currentValue),l._currentValue=d}function $o(i){i._currentValue=f0.current,V(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 A=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||(A=null);break e}b=P.next}}else if(v.tag===18){if(A=v.return,A===null)throw Error(r(341));A.lanes|=d,b=A.alternate,b!==null&&(b.lanes|=d),h0(A,d,i),A=null}else A=v.child;if(A!==null)A.return=v;else for(A=v;A!==null;){if(A===i){A=null;break}if(v=A.sibling,v!==null){v.return=A.return,A=v;break}A=A.return}v=A}}function ku(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 A=v.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var P=v.type;Zr(v.pendingProps.value,A.value)||(i!==null?i.push(P):i=[P])}}else if(v===ue.current){if(A=v.alternate,A===null)throw Error(r(387));A.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 Hp(i){for(i=i.firstContext;i!==null;){if(!Zr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ul(i){ll=i,Ho=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Qn(i){return QI(ll,i)}function $p(i,l){return ll===null&&ul(i),QI(i,l)}function QI(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Ho===null){if(i===null)throw Error(r(308));Ho=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else Ho=Ho.next=l;return d}var y$=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()})}},b$=t.unstable_scheduleCallback,S$=t.unstable_NormalPriority,En={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function g0(){return{controller:new y$,data:new Map,refCount:0}}function Vd(i){i.refCount--,i.refCount===0&&b$(S$,function(){i.controller.abort()})}var Gd=null,m0=0,Du=0,Lu=null;function E$(i,l){if(Gd===null){var d=Gd=[];m0=0,Du=b1(),Lu={status:"pending",value:void 0,then:function(p){d.push(p)}}}return m0++,l.then(JI,JI),l}function JI(){if(--m0===0&&Gd!==null){Lu!==null&&(Lu.status="fulfilled");var i=Gd;Gd=null,Du=0,Lu=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function C$(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 e2=H.S;H.S=function(i,l){UO=Gt(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&E$(i,l),e2!==null&&e2(i,l)};var cl=L(null);function v0(){var i=cl.current;return i!==null?i:Wt.pooledCache}function qp(i,l){l===null?K(cl,cl.current):K(cl,l.pool)}function t2(){var i=v0();return i===null?null:{parent:En._currentValue,pool:i}}var Uu=Error(r(460)),y0=Error(r(474)),Wp=Error(r(542)),Vp={then:function(){}};function n2(i){return i=i.status,i==="fulfilled"||i==="rejected"}function r2(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(rn,rn),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,o2(i),i;default:if(typeof l.status=="string")l.then(rn,rn);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,o2(i),i}throw fl=l,Uu}}function dl(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(fl=d,Uu):d}}var fl=null;function s2(){if(fl===null)throw Error(r(459));var i=fl;return fl=null,i}function o2(i){if(i===Uu||i===Wp)throw Error(r(483))}var Fu=null,Kd=0;function Gp(i){var l=Kd;return Kd+=1,Fu===null&&(Fu=[]),r2(Fu,i,l)}function Yd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Kp(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 i2(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=jo(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 A(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&&dl(Pe)===W.type)?(W=v(W,X.props),Yd(W,X),W.return=G,W):(W=jp(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=il(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=jp(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=dl(W),ae(G,W,X)}if(te(W)||z(W))return W=il(W,G.mode,X,null),W.return=G,W;if(typeof W.then=="function")return ae(G,Gp(W),X);if(W.$$typeof===_)return ae(G,$p(G,W),X);Kp(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=dl(X),ne(G,W,X,ie)}if(te(X)||z(X))return Pe!==null?null:se(G,W,X,ie,null);if(typeof X.then=="function")return ne(G,W,Gp(X),ie);if(X.$$typeof===_)return ne(G,W,$p(G,X),ie);Kp(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=dl(ie),re(G,W,X,ie,Pe)}if(te(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,Gp(ie),Pe);if(ie.$$typeof===_)return re(G,W,X,$p(W,ie),Pe);Kp(W,ie)}return null}function Re(G,W,X,ie){for(var Pe=null,_t=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 At=ne(G,Ne,X[Je],ie);if(At===null){Ne===null&&(Ne=ct);break}i&&Ne&&At.alternate===null&&l(G,Ne),W=b(At,W,Je),_t===null?Pe=At:_t.sibling=At,_t=At,Ne=ct}if(Je===X.length)return d(G,Ne),ft&&Bo(G,Je),Pe;if(Ne===null){for(;Je<X.length;Je++)Ne=ae(G,X[Je],ie),Ne!==null&&(W=b(Ne,W,Je),_t===null?Pe=Ne:_t.sibling=Ne,_t=Ne);return ft&&Bo(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),_t===null?Pe=ct:_t.sibling=ct,_t=ct);return i&&Ne.forEach(function(ca){return l(G,ca)}),ft&&Bo(G,Je),Pe}function Le(G,W,X,ie){if(X==null)throw Error(r(151));for(var Pe=null,_t=null,Ne=W,Je=W=0,ct=null,At=X.next();Ne!==null&&!At.done;Je++,At=X.next()){Ne.index>Je?(ct=Ne,Ne=null):ct=Ne.sibling;var ca=ne(G,Ne,At.value,ie);if(ca===null){Ne===null&&(Ne=ct);break}i&&Ne&&ca.alternate===null&&l(G,Ne),W=b(ca,W,Je),_t===null?Pe=ca:_t.sibling=ca,_t=ca,Ne=ct}if(At.done)return d(G,Ne),ft&&Bo(G,Je),Pe;if(Ne===null){for(;!At.done;Je++,At=X.next())At=ae(G,At.value,ie),At!==null&&(W=b(At,W,Je),_t===null?Pe=At:_t.sibling=At,_t=At);return ft&&Bo(G,Je),Pe}for(Ne=p(Ne);!At.done;Je++,At=X.next())At=re(Ne,G,Je,At.value,ie),At!==null&&(i&&At.alternate!==null&&Ne.delete(At.key===null?Je:At.key),W=b(At,W,Je),_t===null?Pe=At:_t.sibling=At,_t=At);return i&&Ne.forEach(function(Pq){return l(G,Pq)}),ft&&Bo(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&&dl(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=il(X.props.children,G.mode,ie,X.key),ie.return=G,G=ie):(ie=jp(X.type,X.key,X.props,null,G.mode,ie),Yd(ie,X),ie.return=G,G=ie)}return A(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 A(G);case k:return X=dl(X),jt(G,W,X,ie)}if(te(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),Le(G,W,X,ie)}if(typeof X.then=="function")return jt(G,W,Gp(X),ie);if(X.$$typeof===_)return jt(G,W,$p(G,X),ie);Kp(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),A(G)):d(G,W)}return function(G,W,X,ie){try{Kd=0;var Pe=jt(G,W,X,ie);return Fu=null,Pe}catch(Ne){if(Ne===Uu||Ne===Wp)throw Ne;var _t=Xr(29,Ne,null,G.mode);return _t.lanes=ie,_t.return=G,_t}}}var hl=i2(!0),a2=i2(!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=zp(i),qI(i,null,d),l}return Fp(i,p,l,d),zp(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 A={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?v=b=A:b=b.next=A,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=Lu;if(i!==null)throw i}}function Qd(i,l,d,p){C0=!1;var v=i.updateQueue;Gi=!1;var b=v.firstBaseUpdate,A=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var B=P,Q=B.next;B.next=null,A===null?b=Q:A.next=Q,A=B;var se=i.alternate;se!==null&&(se=se.updateQueue,P=se.lastBaseUpdate,P!==A&&(P===null?se.firstBaseUpdate=Q:P.next=Q,se.lastBaseUpdate=B))}if(b!==null){var ae=v.baseState;A=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===Du&&(C0=!0),se!==null&&(se=se.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Re=i,Le=P;ne=l;var jt=d;switch(Le.tag){case 1:if(Re=Le.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=Le.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,A|=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|=A,i.lanes=A,i.memoizedState=ae}}function l2(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function u2(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)l2(d[i],l)}var zu=L(null),Yp=L(0);function c2(i,l){i=Qo,K(Yp,i),K(zu,l),Qo=i|l.baseLanes}function w0(){K(Yp,Qo),K(zu,zu.current)}function x0(){Qo=Yp.current,V(zu),V(Yp)}var Qr=L(null),Es=null;function Zi(i){var l=i.alternate;K(bn,bn.current&1),K(Qr,i),Es===null&&(l===null||zu.current!==null||l.memoizedState!==null)&&(Es=i)}function _0(i){K(bn,bn.current),K(Qr,i),Es===null&&(Es=i)}function d2(i){i.tag===22?(K(bn,bn.current),K(Qr,i),Es===null&&(Es=i)):Xi()}function Xi(){K(bn,bn.current),K(Qr,Qr.current)}function Jr(i){V(Qr),Es===i&&(Es=null),V(bn)}var bn=L(0);function Zp(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||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 qo=0,Qe=null,Ft=null,Cn=null,Xp=!1,ju=!1,pl=!1,Qp=0,Jd=0,Bu=null,w$=0;function pn(){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 qo=b,Qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,H.H=i===null||i.memoizedState===null?K2:H0,pl=!1,b=d(p,v),pl=!1,ju&&(b=h2(l,d,p,v)),f2(i),b}function f2(i){H.H=nf;var l=Ft!==null&&Ft.next!==null;if(qo=0,Cn=Ft=Qe=null,Xp=!1,Jd=0,Bu=null,l)throw Error(r(300));i===null||wn||(i=i.dependencies,i!==null&&Hp(i)&&(wn=!0))}function h2(i,l,d,p){Qe=i;var v=0;do{if(ju&&(Bu=null),Jd=0,ju=!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.H=Y2,b=l(d,p)}while(ju);return b}function x$(){var i=H.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=Qp!==0;return Qp=0,i}function I0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function O0(i){if(Xp){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Xp=!1}qo=0,Cn=Ft=Qe=null,ju=!1,Jd=Qp=0,Bu=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 Jp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ef(i){var l=Jd;return Jd+=1,Bu===null&&(Bu=[]),i=r2(Bu,i,l),l=Qe,(Cn===null?l.memoizedState:Cn.next)===null&&(l=l.alternate,H.H=l===null||l.memoizedState===null?K2:H0),i}function eg(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ef(i);if(i.$$typeof===_)return Qn(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=Jp(),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]=$;return l.index++,d}function Wo(i,l){return typeof l=="function"?l(i):l}function tg(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 A=v.next;v.next=b.next,b.next=A}l.baseQueue=v=b,p.pending=null}if(b=i.baseState,v===null)i.memoizedState=b;else{l=v.next;var P=A=null,B=null,Q=l,se=!1;do{var ae=Q.lane&-536870913;if(ae!==Q.lane?(ut&ae)===ae:(qo&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===Du&&(se=!0);else if((qo&ne)===ne){Q=Q.next,ne===Du&&(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,A=b):B=B.next=ae,Qe.lanes|=ne,ea|=ne;ae=Q.action,pl&&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,A=b):B=B.next=ne,Qe.lanes|=ae,ea|=ae;Q=Q.next}while(Q!==null&&Q!==l);if(B===null?A=b:B.next=P,!Zr(b,i.memoizedState)&&(wn=!0,se&&(d=Lu,d!==null)))throw d;i.memoizedState=b,i.baseState=A,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 A=v=v.next;do b=i(b,A.action),A=A.next;while(A!==v);Zr(b,l.memoizedState)||(wn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,p]}function p2(i,l,d){var p=Qe,v=Sn(),b=ft;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var A=!Zr((Ft||v).memoizedState,d);if(A&&(v.memoizedState=d,wn=!0),v=v.queue,L0(v2.bind(null,p,v,i),[i]),v.getSnapshot!==l||A||Cn!==null&&Cn.memoizedState.tag&1){if(p.flags|=2048,Hu(9,{destroy:void 0},m2.bind(null,p,v,d,l),null),Wt===null)throw Error(r(349));b||(qo&127)!==0||g2(p,l,d)}return d}function g2(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Qe.updateQueue,l===null?(l=Jp(),Qe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function m2(i,l,d,p){l.value=d,l.getSnapshot=p,y2(l)&&b2(i)}function v2(i,l,d){return d(function(){y2(l)&&b2(i)})}function y2(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Zr(i,d)}catch{return!0}}function b2(i){var l=ol(i,2);l!==null&&Lr(l,i,2)}function k0(i){var l=br();if(typeof i=="function"){var d=i;if(i=d(),pl){ks(!0);try{d()}finally{ks(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:i},l}function S2(i,l,d,p){return i.baseState=d,M0(i,Ft,typeof p=="function"?p:Wo)}function _$(i,l,d,p,v){if(sg(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(A){b.listeners.push(A)}};H.T!==null?d(!0):b.isTransition=!1,p(b),d=l.pending,d===null?(b.next=l.pending=b,E2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function E2(i,l){var d=l.action,p=l.payload,v=i.state;if(l.isTransition){var b=H.T,A={};H.T=A;try{var P=d(v,p),B=H.S;B!==null&&B(A,P),C2(i,l,P)}catch(Q){D0(i,l,Q)}finally{b!==null&&A.types!==null&&(b.types=A.types),H.T=b}}else try{b=d(v,p),C2(i,l,b)}catch(Q){D0(i,l,Q)}}function C2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){w2(i,l,p)},function(p){return D0(i,l,p)}):w2(i,l,d)}function w2(i,l,d){l.status="fulfilled",l.value=d,x2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,E2(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,x2(l),l=l.next;while(l!==p)}i.action=null}function x2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function _2(i,l){return l}function A2(i,l){if(ft){var d=Wt.formState;if(d!==null){e:{var p=Qe;if(ft){if(Kt){t:{for(var v=Kt,b=Ss;v.nodeType!==8;){if(!b){v=null;break t}if(v=Cs(v.nextSibling),v===null){v=null;break t}}b=v.data,v=b==="F!"||b==="F"?v:null}if(v){Kt=Cs(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:_2,lastRenderedState:l},d.queue=p,d=W2.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=_$.bind(null,Qe,v,b,d),v.dispatch=d,p.memoizedState=i,[l,d,!1]}function T2(i){var l=Sn();return R2(l,Ft,i)}function R2(i,l,d){if(l=M0(i,l,_2)[0],i=tg(Wo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ef(l)}catch(A){throw A===Uu?Wp:A}else p=l;l=Sn();var v=l.queue,b=v.dispatch;return d!==l.memoizedState&&(Qe.flags|=2048,Hu(9,{destroy:void 0},A$.bind(null,v,d),null)),[p,b,i]}function A$(i,l){i.action=l}function I2(i){var l=Sn(),d=Ft;if(d!==null)return R2(l,d,i);Sn(),l=l.memoizedState,d=Sn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function Hu(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=Qe.updateQueue,l===null&&(l=Jp(),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 O2(){return Sn().memoizedState}function ng(i,l,d,p){var v=br();Qe.flags|=i,v.memoizedState=Hu(1|l,{destroy:void 0},d,p===void 0?null:p)}function rg(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=Hu(l,b,d,p):(Qe.flags|=i,v.memoizedState=Hu(1|l,b,d,p))}function N2(i,l){ng(8390656,8,i,l)}function L0(i,l){rg(2048,8,i,l)}function T$(i){Qe.flags|=4;var l=Qe.updateQueue;if(l===null)l=Jp(),Qe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function M2(i){var l=Sn().memoizedState;return T$({ref:l,nextImpl:i}),function(){if((It&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function P2(i,l){return rg(4,2,i,l)}function k2(i,l){return rg(4,4,i,l)}function D2(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 L2(i,l,d){d=d!=null?d.concat([i]):null,rg(4,4,D2.bind(null,l,i),d)}function U0(){}function U2(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 F2(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(),pl){ks(!0);try{i()}finally{ks(!1)}}return d.memoizedState=[p,l],p}function F0(i,l,d){return d===void 0||(qo&1073741824)!==0&&(ut&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=zO(),Qe.lanes|=i,ea|=i,d)}function z2(i,l,d,p){return Zr(d,l)?d:zu.current!==null?(i=F0(i,d,p),Zr(i,l)||(wn=!0),i):(qo&42)===0||(qo&1073741824)!==0&&(ut&261930)===0?(wn=!0,i.memoizedState=d):(i=zO(),Qe.lanes|=i,ea|=i,l)}function j2(i,l,d,p,v){var b=ee.p;ee.p=b!==0&&8>b?b:8;var A=H.T,P={};H.T=P,B0(i,!1,l,d);try{var B=v(),Q=H.S;if(Q!==null&&Q(P,B),B!==null&&typeof B=="object"&&typeof B.then=="function"){var se=C$(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{ee.p=b,A!==null&&P.types!==null&&(A.types=P.types),H.T=A}}function R$(){}function z0(i,l,d,p){if(i.tag!==5)throw Error(r(476));var v=B2(i).queue;j2(i,v,l,de,d===null?R$:function(){return H2(i),d(p)})}function B2(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:de},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function H2(i){var l=B2(i);l.next===null&&(l=i.alternate.memoizedState),tf(i,l.next.queue,{},ns())}function j0(){return Qn(bf)}function $2(){return Sn().memoizedState}function q2(){return Sn().memoizedState}function I$(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 O$(i,l,d){var p=ns();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},sg(i)?V2(l,d):(d=s0(i,l,d,p),d!==null&&(Lr(d,i,p),G2(d,l,p)))}function W2(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(sg(i))V2(l,v);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var A=l.lastRenderedState,P=b(A,d);if(v.hasEagerState=!0,v.eagerState=P,Zr(P,A))return Fp(i,l,v,0),Wt===null&&Up(),!1}catch{}if(d=s0(i,l,v,p),d!==null)return Lr(d,i,p),G2(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},sg(i)){if(l)throw Error(r(479))}else l=s0(i,d,p,2),l!==null&&Lr(l,i,2)}function sg(i){var l=i.alternate;return i===Qe||l!==null&&l===Qe}function V2(i,l){ju=Xp=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function G2(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:Qn,use:eg,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn};nf.useEffectEvent=pn;var K2={readContext:Qn,use:eg,useCallback:function(i,l){return br().memoizedState=[i,l===void 0?null:l],i},useContext:Qn,useEffect:N2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,ng(4194308,4,D2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return ng(4194308,4,i,l)},useInsertionEffect:function(i,l){ng(4,2,i,l)},useMemo:function(i,l){var d=br();l=l===void 0?null:l;var p=i();if(pl){ks(!0);try{i()}finally{ks(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=br();if(d!==void 0){var v=d(l);if(pl){ks(!0);try{d(l)}finally{ks(!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=O$.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=W2.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=j2.bind(null,Qe,i.queue,!0,!1),br().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=Qe,v=br();if(ft){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Wt===null)throw Error(r(349));(ut&127)!==0||g2(p,l,d)}v.memoizedState=d;var b={value:d,getSnapshot:l};return v.queue=b,N2(v2.bind(null,p,b,i),[i]),p.flags|=2048,Hu(9,{destroy:void 0},m2.bind(null,p,b,d,l),null),d},useId:function(){var i=br(),l=Wt.identifierPrefix;if(ft){var d=co,p=uo;d=(p&~(1<<32-Zn(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Qp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=w$++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:j0,useFormState:A2,useActionState:A2,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=I$.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:Qn,use:eg,useCallback:U2,useContext:Qn,useEffect:L0,useImperativeHandle:L2,useInsertionEffect:P2,useLayoutEffect:k2,useMemo:F2,useReducer:tg,useRef:O2,useState:function(){return tg(Wo)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return z2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=tg(Wo)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:p2,useId:$2,useHostTransitionStatus:j0,useFormState:T2,useActionState:T2,useOptimistic:function(i,l){var d=Sn();return S2(d,Ft,i,l)},useMemoCache:N0,useCacheRefresh:q2};H0.useEffectEvent=M2;var Y2={readContext:Qn,use:eg,useCallback:U2,useContext:Qn,useEffect:L0,useImperativeHandle:L2,useInsertionEffect:P2,useLayoutEffect:k2,useMemo:F2,useReducer:P0,useRef:O2,useState:function(){return P0(Wo)},useDebugValue:U0,useDeferredValue:function(i,l){var d=Sn();return Ft===null?F0(d,i,l):z2(d,Ft.memoizedState,i,l)},useTransition:function(){var i=P0(Wo)[0],l=Sn().memoizedState;return[typeof i=="boolean"?i:ef(i),l]},useSyncExternalStore:p2,useId:$2,useHostTransitionStatus:j0,useFormState:I2,useActionState:I2,useOptimistic:function(i,l){var d=Sn();return Ft!==null?S2(d,Ft,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:N0,useCacheRefresh:q2};Y2.useEffectEvent=M2;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 Z2(i,l,d,p,v,b,A){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,b,A):l.prototype&&l.prototype.isPureReactComponent?!Hd(d,p)||!Hd(v,b):!0}function X2(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 gl(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 Q2(i){Lp(i)}function J2(i){console.error(i)}function eO(i){Lp(i)}function og(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function tO(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(){og(i,l)},d}function nO(i){return i=Ki(i),i.tag=3,i}function rO(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(){tO(l,d,p)}}var A=d.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(i.callback=function(){tO(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 N$(i,l,d,p,v){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&ku(l,d,v,!0),d=Qr.current,d!==null){switch(d.tag){case 31:case 13:return Es===null?vg():d.alternate===null&&gn===0&&(gn=3),d.flags&=-257,d.flags|=65536,d.lanes=v,p===Vp?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===Vp?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),vg(),!1}if(ft)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(vs(i,d)))):(p!==c0&&(l=Error(r(423),{cause:p}),Wd(vs(l,d))),i=i.current.alternate,i.flags|=65536,v&=-v,i.lanes|=v,p=vs(p,d),v=W0(i.stateNode,p,v),E0(i,v),gn!==4&&(gn=2)),!1;var b=Error(r(520),{cause:p});if(b=vs(b,d),df===null?df=[b]:df.push(b),gn!==4&&(gn=2),l===null)return!0;p=vs(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=nO(v),rO(v,i,d,p),E0(d,v),!1}d=d.return}while(d!==null);return!1}var V0=Error(r(461)),wn=!1;function Jn(i,l,d,p){l.child=i===null?a2(l,null,d,p):hl(l,i.child,d,p)}function sO(i,l,d,p,v){d=d.render;var b=l.ref;if("ref"in p){var A={};for(var P in p)P!=="ref"&&(A[P]=p[P])}else A=p;return ul(l),p=T0(i,l,d,A,b,v),P=R0(),i!==null&&!wn?(I0(i,l,v),Vo(i,l,v)):(ft&&P&&l0(l),l.flags|=1,Jn(i,l,p,v),l.child)}function oO(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,iO(i,l,b,p,v)):(i=jp(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 A=b.memoizedProps;if(d=d.compare,d=d!==null?d:Hd,d(A,p)&&i.ref===l.ref)return Vo(i,l,v)}return l.flags|=1,i=jo(b,p),i.ref=l.ref,i.return=l,l.child=i}function iO(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,Vo(i,l,v)}return G0(i,l,d,p,v)}function aO(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 lO(i,l,b,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&qp(l,b!==null?b.cachePool:null),b!==null?c2(l,b):w0(),d2(l);else return p=l.lanes=536870912,lO(i,l,b!==null?b.baseLanes|d:d,d,p)}else b!==null?(qp(l,b.cachePool),c2(l,b),Xi(),l.memoizedState=null):(i!==null&&qp(l,null),w0(),Xi());return Jn(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 lO(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&&qp(l,null),w0(),d2(l),i!==null&&ku(i,l,p,!0),l.childLanes=v,null}function ig(i,l){return l=lg({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function uO(i,l,d){return hl(l,i.child,null,d),i=ig(l,l.pendingProps),i.flags|=2,Jr(l),l.memoizedState=null,i}function M$(i,l,d){var p=l.pendingProps,v=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(ft){if(p.mode==="hidden")return i=ig(l,p),l.lanes=536870912,rf(null,i);if(_0(l),(i=Kt)?(i=EN(i,Ss),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:uo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},d=VI(i),d.return=l,l.child=d,Xn=l,Kt=null)):i=null,i===null)throw Wi(l);return l.lanes=536870912,null}return ig(l,p)}var b=i.memoizedState;if(b!==null){var A=b.dehydrated;if(_0(l),v)if(l.flags&256)l.flags&=-257,l=uO(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||ku(i,l,d,!1),v=(d&i.childLanes)!==0,wn||v){if(p=Wt,p!==null&&(A=Su(p,d),A!==0&&A!==b.retryLane))throw b.retryLane=A,ol(i,A),Lr(p,i,A),V0;vg(),l=uO(i,l,d)}else i=b.treeContext,Kt=Cs(A.nextSibling),Xn=l,ft=!0,qi=null,Ss=!1,i!==null&&YI(l,i),l=ig(l,p),l.flags|=4096;return l}return i=jo(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function ag(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 ul(l),d=T0(i,l,d,p,void 0,v),p=R0(),i!==null&&!wn?(I0(i,l,v),Vo(i,l,v)):(ft&&p&&l0(l),l.flags|=1,Jn(i,l,d,v),l.child)}function cO(i,l,d,p,v,b){return ul(l),l.updateQueue=null,d=h2(l,p,d,v),f2(i),p=R0(),i!==null&&!wn?(I0(i,l,b),Vo(i,l,b)):(ft&&p&&l0(l),l.flags|=1,Jn(i,l,d,b),l.child)}function dO(i,l,d,p,v){if(ul(l),l.stateNode===null){var b=Ou,A=d.contextType;typeof A=="object"&&A!==null&&(b=Qn(A)),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),A=d.contextType,b.context=typeof A=="object"&&A!==null?Qn(A):Ou,b.state=l.memoizedState,A=d.getDerivedStateFromProps,typeof A=="function"&&($0(l,d,A,p),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(A=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),A!==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=gl(d,P);b.props=B;var Q=b.context,se=d.contextType;A=Ou,typeof se=="object"&&se!==null&&(A=Qn(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!==A)&&X2(l,b,p,A),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||Z2(l,d,B,p,ne,Q,A))?(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=A,p=B):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{b=l.stateNode,S0(i,l),A=l.memoizedProps,se=gl(d,A),b.props=se,ae=l.pendingProps,ne=b.context,Q=d.contextType,B=Ou,typeof Q=="object"&&Q!==null&&(B=Qn(Q)),P=d.getDerivedStateFromProps,(Q=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==ae||ne!==B)&&X2(l,b,p,B),Gi=!1,ne=l.memoizedState,b.state=ne,Qd(l,p,b,v),Xd();var re=l.memoizedState;A!==ae||ne!==re||Gi||i!==null&&i.dependencies!==null&&Hp(i.dependencies)?(typeof P=="function"&&($0(l,d,P,p),re=l.memoizedState),(se=Gi||Z2(l,d,se,p,ne,re,B)||i!==null&&i.dependencies!==null&&Hp(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"||A===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===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"||A===i.memoizedProps&&ne===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&ne===i.memoizedState||(l.flags|=1024),p=!1)}return b=p,ag(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=hl(l,i.child,null,v),l.child=hl(l,null,d,v)):Jn(i,l,d,v),l.memoizedState=b.state,i=l.child):i=Vo(i,l,v),i}function fO(i,l,d,p){return al(),l.flags|=256,Jn(i,l,d,p),l.child}var K0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Y0(i){return{baseLanes:i,cachePool:t2()}}function Z0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=ts),i}function hO(i,l,d){var p=l.pendingProps,v=!1,b=(l.flags&128)!==0,A;if((A=b)||(A=i!==null&&i.memoizedState===null?!1:(bn.current&2)!==0),A&&(v=!0,l.flags&=-129),A=(l.flags&32)!==0,l.flags&=-33,i===null){if(ft){if(v?Zi(l):Xi(),(i=Kt)?(i=EN(i,Ss),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:$i!==null?{id:uo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},d=VI(i),d.return=l,l.child=d,Xn=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=lg({mode:"hidden",children:P},v),p=il(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,A,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=lg({mode:"visible",children:p.children},v),P=il(P,v,d,null),P.flags|=2,p.return=l,P.return=l,p.sibling=P,l.child=p,hl(l,i.child,null,d),p=l.child,p.memoizedState=Y0(d),p.childLanes=Z0(i,A,d),l.memoizedState=K0,l=rf(null,p));else if(Zi(l),M1(P)){if(A=P.nextSibling&&P.nextSibling.dataset,A)var Q=A.dgst;A=Q,p=Error(r(419)),p.stack="",p.digest=A,Wd({value:p,source:null,stack:null}),l=Q0(i,l,d)}else if(wn||ku(i,l,d,!1),A=(d&i.childLanes)!==0,wn||A){if(A=Wt,A!==null&&(p=Su(A,d),p!==0&&p!==B.retryLane))throw B.retryLane=p,ol(i,p),Lr(A,i,p),V0;N1(P)||vg(),l=Q0(i,l,d)}else N1(P)?(l.flags|=192,l.child=i.child,l=null):(i=B.treeContext,Kt=Cs(P.nextSibling),Xn=l,ft=!0,qi=null,Ss=!1,i!==null&&YI(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=jo(B,{mode:"hidden",children:p.children}),p.subtreeFlags=B.subtreeFlags&65011712,Q!==null?P=jo(Q,P):(P=il(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=t2(),P={baseLanes:P.baseLanes|d,cachePool:v}),p.memoizedState=P,p.childLanes=Z0(i,A,d),l.memoizedState=K0,rf(i.child,p)):(Zi(l),d=i.child,i=d.sibling,d=jo(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(A=l.deletions,A===null?(l.deletions=[i],l.flags|=16):A.push(i)),l.child=d,l.memoizedState=null,d)}function X0(i,l){return l=lg({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function lg(i,l){return i=Xr(22,i,null,l),i.lanes=0,i}function Q0(i,l,d){return hl(l,i.child,null,d),i=X0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function pO(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 A=i.memoizedState;A===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:v,treeForkCount:b}:(A.isBackwards=l,A.rendering=null,A.renderingStartTime=0,A.last=p,A.tail=d,A.tailMode=v,A.treeForkCount=b)}function gO(i,l,d){var p=l.pendingProps,v=p.revealOrder,b=p.tail;p=p.children;var A=bn.current,P=(A&2)!==0;if(P?(A=A&1|2,l.flags|=128):A&=1,K(bn,A),Jn(i,l,p,d),p=ft?qd:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&pO(i,d,l);else if(i.tag===19)pO(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(v){case"forwards":for(d=l.child,v=null;d!==null;)i=d.alternate,i!==null&&Zp(i)===null&&(v=d),d=d.sibling;d=v,d===null?(v=l.child,l.child=null):(v=d.sibling,d.sibling=null),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&&Zp(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 Vo(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),ea|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(ku(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=jo(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=jo(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&&Hp(i)))}function P$(i,l,d){switch(l.tag){case 3:ve(l,l.stateNode.containerInfo),Vi(l,En,i.memoizedState.cache),al();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?hO(i,l,d):(Zi(l),i=Vo(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||(ku(i,l,d,!1),p=(d&l.childLanes)!==0),v){if(p)return gO(i,l,d);l.flags|=128}if(v=l.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),K(bn,bn.current),p)break;return null;case 22:return l.lanes=0,aO(i,l,d,l.pendingProps);case 24:Vi(l,En,i.memoizedState.cache)}return Vo(i,l,d)}function mO(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,P$(i,l,d);wn=(i.flags&131072)!==0}else wn=!1,ft&&(l.flags&1048576)!==0&&KI(l,qd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=dl(l.elementType),l.type=i,typeof i=="function")o0(i)?(p=gl(i,p),l.tag=1,l=dO(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=sO(null,l,i,p,d);break e}else if(v===O){l.tag=14,l=oO(null,l,i,p,d);break e}}throw l=Y(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=gl(p,l.pendingProps),dO(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 A=l.memoizedState;if(p=A.cache,Vi(l,En,p),p!==b.cache&&p0(l,[En],d,!0),Xd(),p=A.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:A.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=fO(i,l,p,d);break e}else if(p!==v){v=vs(Error(r(424)),l),Wd(v),l=fO(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=Cs(i.firstChild),Xn=l,ft=!0,qi=null,Ss=!0,d=a2(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(al(),p===v){l=Vo(i,l,d);break e}Jn(i,l,p,d)}l=l.child}return l;case 26:return ag(i,l),i===null?(d=TN(l.type,null,l.pendingProps,null))?l.memoizedState=d:ft||(d=l.type,i=l.pendingProps,p=xg(he.current).createElement(d),p[On]=l,p[nt]=i,er(p,d,i),un(p),l.stateNode=p):l.memoizedState=TN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Xe(l),i===null&&ft&&(p=l.stateNode=xN(l.type,l.pendingProps,he.current),Xn=l,Ss=!0,v=Kt,oa(l.type)?(P1=v,Kt=Cs(p.firstChild)):Kt=v),Jn(i,l,l.pendingProps.children,d),ag(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&ft&&((v=p=Kt)&&(p=uq(p,l.type,l.pendingProps,Ss),p!==null?(l.stateNode=p,Xn=l,Kt=Cs(p.firstChild),Ss=!1,v=!0):v=!1),v||Wi(l)),Xe(l),v=l.type,b=l.pendingProps,A=i!==null?i.memoizedProps:null,p=b.children,R1(v,b)?p=null:A!==null&&R1(v,A)&&(l.flags|=32),l.memoizedState!==null&&(v=T0(i,l,x$,null,null,d),bf._currentValue=v),ag(i,l),Jn(i,l,p,d),l.child;case 6:return i===null&&ft&&((i=d=Kt)&&(d=cq(d,l.pendingProps,Ss),d!==null?(l.stateNode=d,Xn=l,Kt=null,i=!0):i=!1),i||Wi(l)),null;case 13:return hO(i,l,d);case 4:return ve(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=hl(l,null,p,d):Jn(i,l,p,d),l.child;case 11:return sO(i,l,l.type,l.pendingProps,d);case 7:return Jn(i,l,l.pendingProps,d),l.child;case 8:return Jn(i,l,l.pendingProps.children,d),l.child;case 12:return Jn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,Vi(l,l.type,p.value),Jn(i,l,p.children,d),l.child;case 9:return v=l.type._context,p=l.pendingProps.children,ul(l),v=Qn(v),p=p(v),l.flags|=1,Jn(i,l,p,d),l.child;case 14:return oO(i,l,l.type,l.pendingProps,d);case 15:return iO(i,l,l.type,l.pendingProps,d);case 19:return gO(i,l,d);case 31:return M$(i,l,d);case 22:return aO(i,l,d,l.pendingProps);case 24:return ul(l),p=Qn(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))),Jn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Go(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($O())i.flags|=8192;else throw fl=Vp,y0}else i.flags&=-16777217}function vO(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!MN(l))if($O())i.flags|=8192;else throw fl=Vp,y0}function ug(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?Kr():536870912,i.lanes|=l,Vu|=l)}function sf(i,l){if(!ft)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 k$(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),$o(En),_e(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Pu(l)?Go(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?(Go(l),b!==null?(Yt(l),vO(l,b)):(Yt(l),t1(l,v,null,p,d))):b?b!==i.memoizedState?(Go(l),Yt(l),vO(l,b)):(Yt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&Go(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&&Go(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}i=J.current,Pu(l)?ZI(l):(i=xN(v,p,d),l.stateNode=i,Go(l))}return Yt(l),null;case 5:if(Ee(l),v=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&Go(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Yt(l),null}if(b=J.current,Pu(l))ZI(l);else{var A=xg(he.current);switch(b){case 1:b=A.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:b=A.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":b=A.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":b=A.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":b=A.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?A.createElement("select",{is:p.is}):A.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?A.createElement(v,{is:p.is}):A.createElement(v)}}b[On]=l,b[nt]=p;e:for(A=l.child;A!==null;){if(A.tag===5||A.tag===6)b.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===l)break e;for(;A.sibling===null;){if(A.return===null||A.return===l)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}l.stateNode=b;e:switch(er(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&&Go(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&&Go(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=he.current,Pu(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:p=v.memoizedProps}i[On]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||hN(i.nodeValue,d)),i||Wi(l,!0)}else i=xg(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=Pu(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 al(),(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=Pu(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 al(),(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),ug(l,l.updateQueue),Yt(l),null);case 4:return _e(),i===null&&w1(l.stateNode.containerInfo),Yt(l),null;case 10:return $o(l.type),Yt(l),null;case 19:if(V(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(gn!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=Zp(i),b!==null){for(l.flags|=128,sf(p,!1),i=b.updateQueue,l.updateQueue=i,ug(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)WI(d,i),d=d.sibling;return K(bn,bn.current&1|2),ft&&Bo(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Gt()>pg&&(l.flags|=128,v=!0,sf(p,!1),l.lanes=4194304)}else{if(!v)if(i=Zp(b),i!==null){if(l.flags|=128,v=!0,i=i.updateQueue,l.updateQueue=i,ug(l,i),sf(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!ft)return Yt(l),null}else 2*Gt()-p.renderingStartTime>pg&&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,K(bn,v?d&1|2:d&1),ft&&Bo(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&&ug(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&&V(cl),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),$o(En),Yt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function D$(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 $o(En),_e(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return Ee(l),null;case 31:if(l.memoizedState!==null){if(Jr(l),l.alternate===null)throw Error(r(340));al()}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));al()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return V(bn),null;case 4:return _e(),null;case 10:return $o(l.type),null;case 22:case 23:return Jr(l),x0(),i!==null&&V(cl),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return $o(En),null;case 25:return null;default:return null}}function yO(i,l){switch(u0(l),l.tag){case 3:$o(En),_e();break;case 26:case 27:case 5:Ee(l);break;case 4:_e();break;case 31:l.memoizedState!==null&&Jr(l);break;case 13:Jr(l);break;case 19:V(bn);break;case 10:$o(l.type);break;case 22:case 23:Jr(l),x0(),i!==null&&V(cl);break;case 24:$o(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,A=d.inst;p=b(),A.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 A=p.inst,P=A.destroy;if(P!==void 0){A.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 bO(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{u2(l,d)}catch(p){kt(i,i.return,p)}}}function SO(i,l,d){d.props=gl(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 fo(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 EO(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;rq(p,i.type,d,l),p[nt]=l}catch(v){kt(i,i.return,v)}}function CO(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||CO(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=rn));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 cg(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(cg(i,l,d),i=i.sibling;i!==null;)cg(i,l,d),i=i.sibling}function wO(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,v=l.attributes;v.length;)l.removeAttributeNode(v[0]);er(l,p,d),l[On]=i,l[nt]=d}catch(b){kt(i,i.return,b)}}var Ko=!1,xn=!1,o1=!1,xO=typeof WeakSet=="function"?WeakSet:Set,jn=null;function L$(i,l){if(i=i.containerInfo,A1=Ng,i=LI(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 A=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=A+v),ae!==b||p!==0&&ae.nodeType!==3||(B=A+p),ae.nodeType===3&&(A+=ae.nodeValue.length),(re=ae.firstChild)!==null;)ne=ae,ae=re;for(;;){if(ae===i)break t;if(ne===d&&++Q===v&&(P=A),ne===b&&++se===p&&(B=A),(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},Ng=!1,jn=l;jn!==null;)if(l=jn,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,jn=i;else for(;jn!==null;){switch(l=jn,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=gl(d.type,v);i=p.getSnapshotBeforeUpdate(Re,b),p.__reactInternalSnapshotBeforeUpdate=i}catch(Le){kt(d,d.return,Le)}}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,jn=i;break}jn=l.return}}function _O(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:Zo(i,d),p&4&&of(5,d);break;case 1:if(Zo(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(A){kt(d,d.return,A)}else{var v=gl(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(v,l,i.__reactInternalSnapshotBeforeUpdate)}catch(A){kt(d,d.return,A)}}p&64&&bO(d),p&512&&af(d,d.return);break;case 3:if(Zo(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{u2(i,l)}catch(A){kt(d,d.return,A)}}break;case 27:l===null&&p&4&&wO(d);case 26:case 5:Zo(i,d),l===null&&p&4&&EO(d),p&512&&af(d,d.return);break;case 12:Zo(i,d);break;case 31:Zo(i,d),p&4&&RO(i,d);break;case 13:Zo(i,d),p&4&&IO(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=W$.bind(null,d),dq(i,d))));break;case 22:if(p=d.memoizedState!==null||Ko,!p){l=l!==null&&l.memoizedState!==null||xn,v=Ko;var b=xn;Ko=p,(xn=l)&&!b?Xo(i,d,(d.subtreeFlags&8772)!==0):Zo(i,d),Ko=v,xn=b}break;case 30:break;default:Zo(i,d)}}function AO(i){var l=i.alternate;l!==null&&(i.alternate=null,AO(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 sn=null,Mr=!1;function Yo(i,l,d){for(d=d.child;d!==null;)TO(i,l,d),d=d.sibling}function TO(i,l,d){if(ur&&typeof ur.onCommitFiberUnmount=="function")try{ur.onCommitFiberUnmount(Pi,d)}catch{}switch(d.tag){case 26:xn||fo(d,l),Yo(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:xn||fo(d,l);var p=sn,v=Mr;oa(d.type)&&(sn=d.stateNode,Mr=!1),Yo(i,l,d),mf(d.stateNode),sn=p,Mr=v;break;case 5:xn||fo(d,l);case 6:if(p=sn,v=Mr,sn=null,Yo(i,l,d),sn=p,Mr=v,sn!==null)if(Mr)try{(sn.nodeType===9?sn.body:sn.nodeName==="HTML"?sn.ownerDocument.body:sn).removeChild(d.stateNode)}catch(b){kt(d,l,b)}else try{sn.removeChild(d.stateNode)}catch(b){kt(d,l,b)}break;case 18:sn!==null&&(Mr?(i=sn,bN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),ec(i)):bN(sn,d.stateNode));break;case 4:p=sn,v=Mr,sn=d.stateNode.containerInfo,Mr=!0,Yo(i,l,d),sn=p,Mr=v;break;case 0:case 11:case 14:case 15:Qi(2,d,l),xn||Qi(4,d,l),Yo(i,l,d);break;case 1:xn||(fo(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&SO(d,l,p)),Yo(i,l,d);break;case 21:Yo(i,l,d);break;case 22:xn=(p=xn)||d.memoizedState!==null,Yo(i,l,d),xn=p;break;default:Yo(i,l,d)}}function RO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{ec(i)}catch(d){kt(l,l.return,d)}}}function IO(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{ec(i)}catch(d){kt(l,l.return,d)}}function U$(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new xO),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new xO),l;default:throw Error(r(435,i.tag))}}function dg(i,l){var d=U$(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var v=V$.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,A=l,P=A;e:for(;P!==null;){switch(P.tag){case 27:if(oa(P.type)){sn=P.stateNode,Mr=!1;break e}break;case 5:sn=P.stateNode,Mr=!1;break e;case 3:case 4:sn=P.stateNode.containerInfo,Mr=!0;break e}P=P.return}if(sn===null)throw Error(r(160));TO(b,A,v),sn=null,Mr=!1,b=v.alternate,b!==null&&(b.return=null),v.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)OO(l,i),l=l.sibling}var zs=null;function OO(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||fo(d,d.return)),p&64&&Ko&&(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=zs;if(Pr(l,i),kr(i),p&512&&(xn||d===null||fo(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"))),er(b,p,d),b[On]=i,un(b),p=b;break e;case"link":var A=ON("link","href",v).get(p+(d.href||""));if(A){for(var P=0;P<A.length;P++)if(b=A[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)){A.splice(P,1);break t}}b=v.createElement(p),er(b,p,d),v.head.appendChild(b);break;case"meta":if(A=ON("meta","content",v).get(p+(d.content||""))){for(P=0;P<A.length;P++)if(b=A[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)){A.splice(P,1);break t}}b=v.createElement(p),er(b,p,d),v.head.appendChild(b);break;default:throw Error(r(468,p))}b[On]=i,un(b),p=b}i.stateNode=p}else NN(v,i.type,i.stateNode);else i.stateNode=IN(v,p,i.memoizedProps);else b!==p?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,p===null?NN(v,i.type,i.stateNode):IN(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||fo(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||fo(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(Tg=null,v=zs,zs=_g(l.containerInfo),Pr(l,i),zs=v,kr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{ec(l.containerInfo)}catch(Re){kt(i,i.return,Re)}o1&&(o1=!1,NO(i));break;case 4:p=zs,zs=_g(i.stateNode.containerInfo),Pr(l,i),kr(i),zs=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,dg(i,p)));break;case 13:Pr(l,i),kr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(hg=Gt()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dg(i,p)));break;case 22:v=i.memoizedState!==null;var B=d!==null&&d.memoizedState!==null,Q=Ko,se=xn;if(Ko=Q||v,xn=se||B,Pr(l,i),xn=se,Ko=Q,kr(i),p&8192)e:for(l=i.stateNode,l._visibility=v?l._visibility&-2:l._visibility|1,v&&(d===null||B||Ko||xn||ml(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){B=d=l;try{if(b=B.stateNode,v)A=b.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.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?SN(re,!0):SN(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,dg(i,d))));break;case 19:Pr(l,i),kr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dg(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(CO(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);cg(i,b,v);break;case 5:var A=d.stateNode;d.flags&32&&(Z(A,""),d.flags&=-33);var P=r1(i);cg(i,P,A);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 NO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;NO(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function Zo(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)_O(i,l.alternate,l),l=l.sibling}function ml(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),ml(l);break;case 1:fo(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&SO(l,l.return,d),ml(l);break;case 27:mf(l.stateNode);case 26:case 5:fo(l,l.return),ml(l);break;case 22:l.memoizedState===null&&ml(l);break;case 30:ml(l);break;default:ml(l)}i=i.sibling}}function Xo(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,v=i,b=l,A=b.flags;switch(b.tag){case 0:case 11:case 15:Xo(v,b,d),of(4,b);break;case 1:if(Xo(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++)l2(B[v],P)}catch(Q){kt(p,p.return,Q)}}d&&A&64&&bO(b),af(b,b.return);break;case 27:wO(b);case 26:case 5:Xo(v,b,d),d&&p===null&&A&4&&EO(b),af(b,b.return);break;case 12:Xo(v,b,d);break;case 31:Xo(v,b,d),d&&A&4&&RO(v,b);break;case 13:Xo(v,b,d),d&&A&4&&IO(v,b);break;case 22:b.memoizedState===null&&Xo(v,b,d),af(b,b.return);break;case 30:break;default:Xo(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 js(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)MO(i,l,d,p),l=l.sibling}function MO(i,l,d,p){var v=l.flags;switch(l.tag){case 0:case 11:case 15:js(i,l,d,p),v&2048&&of(9,l);break;case 1:js(i,l,d,p);break;case 3:js(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){js(i,l,d,p),i=l.stateNode;try{var b=l.memoizedProps,A=b.id,P=b.onPostCommit;typeof P=="function"&&P(A,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(B){kt(l,l.return,B)}}else js(i,l,d,p);break;case 31:js(i,l,d,p);break;case 13:js(i,l,d,p);break;case 23:break;case 22:b=l.stateNode,A=l.alternate,l.memoizedState!==null?b._visibility&2?js(i,l,d,p):lf(i,l):b._visibility&2?js(i,l,d,p):(b._visibility|=2,$u(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),v&2048&&i1(A,l);break;case 24:js(i,l,d,p),v&2048&&a1(l.alternate,l);break;default:js(i,l,d,p)}}function $u(i,l,d,p,v){for(v=v&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,A=l,P=d,B=p,Q=A.flags;switch(A.tag){case 0:case 11:case 15:$u(b,A,P,B,v),of(8,A);break;case 23:break;case 22:var se=A.stateNode;A.memoizedState!==null?se._visibility&2?$u(b,A,P,B,v):lf(b,A):(se._visibility|=2,$u(b,A,P,B,v)),v&&Q&2048&&i1(A.alternate,A);break;case 24:$u(b,A,P,B,v),v&&Q&2048&&a1(A.alternate,A);break;default:$u(b,A,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 qu(i,l,d){if(i.subtreeFlags&uf)for(i=i.child;i!==null;)PO(i,l,d),i=i.sibling}function PO(i,l,d){switch(i.tag){case 26:qu(i,l,d),i.flags&uf&&i.memoizedState!==null&&wq(d,zs,i.memoizedState,i.memoizedProps);break;case 5:qu(i,l,d);break;case 3:case 4:var p=zs;zs=_g(i.stateNode.containerInfo),qu(i,l,d),zs=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=uf,uf=16777216,qu(i,l,d),uf=p):qu(i,l,d));break;default:qu(i,l,d)}}function kO(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];jn=p,LO(p,i)}kO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)DO(i),i=i.sibling}function DO(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,fg(i)):cf(i);break;default:cf(i)}}function fg(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];jn=p,LO(p,i)}kO(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:Qi(8,l,l.return),fg(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,fg(l));break;default:fg(l)}i=i.sibling}}function LO(i,l){for(;jn!==null;){var d=jn;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,jn=p;else e:for(d=i;jn!==null;){p=jn;var v=p.sibling,b=p.return;if(AO(p),p===d){jn=null;break e}if(v!==null){v.return=b,jn=v;break e}jn=b}}}var F$={getCacheForType:function(i){var l=Qn(En),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Qn(En).controller.signal}},z$=typeof WeakMap=="function"?WeakMap:Map,It=0,Wt=null,it=null,ut=0,Pt=0,es=null,Ji=!1,Wu=!1,l1=!1,Qo=0,gn=0,ea=0,vl=0,u1=0,ts=0,Vu=0,df=null,Dr=null,c1=!1,hg=0,UO=0,pg=1/0,gg=null,ta=null,Mn=0,na=null,Gu=null,Jo=0,d1=0,f1=null,FO=null,ff=0,h1=null;function ns(){return(It&2)!==0&&ut!==0?ut&-ut:H.T!==null?b1():xp()}function zO(){if(ts===0)if((ut&536870912)===0||ft){var i=Za;Za<<=1,(Za&3932160)===0&&(Za=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)&&(Ku(i,0),ra(i,ut,ts,!1)),Uo(i,d),((It&2)===0||i!==Wt)&&(i===Wt&&((It&2)===0&&(vl|=d),gn===4&&ra(i,ut,ts,!1)),ho(i))}function jO(i,l,d){if((It&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||so(i,l),v=p?H$(i,l):g1(i,l,!0),b=p;do{if(v===0){Wu&&!p&&ra(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!j$(d)){v=g1(i,l,!1),b=!1;continue}if(v===2){if(b=l,i.errorRecoveryDisabledLanes&b)var A=0;else A=i.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){l=A;e:{var P=i;v=df;var B=P.current.memoizedState.isDehydrated;if(B&&(Ku(P,A).flags|=256),A=g1(P,A,!1),A!==2){if(l1&&!B){P.errorRecoveryDisabledLanes|=b,vl|=b,v=4;break e}b=Dr,Dr=v,b!==null&&(Dr===null?Dr=b:Dr.push.apply(Dr,b))}v=A}if(b=!1,v!==2)continue}}if(v===1){Ku(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=hg+300-Gt(),10<v)){if(ra(p,l,ts,!Ji),Qa(p,0,!0)!==0)break e;Jo=l,p.timeoutHandle=vN(BO.bind(null,p,d,Dr,gg,c1,l,ts,vl,Vu,Ji,b,"Throttled",-0,0),v);break e}BO(p,d,Dr,gg,c1,l,ts,vl,Vu,Ji,b,null,-0,0)}}break}while(!0);ho(i)}function BO(i,l,d,p,v,b,A,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:rn},PO(l,b,ae);var Re=(b&62914560)===b?hg-Gt():(b&4194048)===b?UO-Gt():0;if(Re=xq(ae,Re),Re!==null){Jo=b,i.cancelPendingCommit=Re(YO.bind(null,i,l,b,d,p,v,A,P,B,se,ae,null,ne,re)),ra(i,b,A,!Q);return}}YO(i,l,b,d,p,v,A,P,B)}function j$(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&=~vl,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var v=l;0<v;){var b=31-Zn(v),A=1<<b;p[b]=-1,v&=~A}d!==0&&wp(i,d,l)}function mg(){return(It&6)===0?(hf(0),!1):!0}function p1(){if(it!==null){if(Pt===0)var i=it.return;else i=it,Ho=ll=null,O0(i),Fu=null,Kd=0,i=it;for(;i!==null;)yO(i.alternate,i),i=i.return;it=null}}function Ku(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,iq(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Jo=0,p1(),Wt=i,it=d=jo(i.current,null),ut=l,Pt=0,es=null,Ji=!1,Wu=so(i,l),l1=!1,Vu=ts=u1=vl=ea=gn=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-Zn(p),b=1<<v;l|=i[v],p&=~b}return Qo=l,Up(),d}function HO(i,l){Qe=null,H.H=nf,l===Uu||l===Wp?(l=s2(),Pt=3):l===y0?(l=s2(),Pt=4):Pt=l===V0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,es=l,it===null&&(gn=1,og(i,vs(l,i.current)))}function $O(){var i=Qr.current;return i===null?!0:(ut&4194048)===ut?Es===null:(ut&62914560)===ut||(ut&536870912)!==0?i===Es:!1}function qO(){var i=H.H;return H.H=nf,i===null?nf:i}function WO(){var i=H.A;return H.A=F$,i}function vg(){gn=4,Ji||(ut&4194048)!==ut&&Qr.current!==null||(Wu=!0),(ea&134217727)===0&&(vl&134217727)===0||Wt===null||ra(Wt,ut,ts,!1)}function g1(i,l,d){var p=It;It|=2;var v=qO(),b=WO();(Wt!==i||ut!==l)&&(gg=null,Ku(i,l)),l=!1;var A=gn;e:do try{if(Pt!==0&&it!==null){var P=it,B=es;switch(Pt){case 8:p1(),A=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(l=!0);var Q=Pt;if(Pt=0,es=null,Yu(i,P,B,Q),d&&Wu){A=0;break e}break;default:Q=Pt,Pt=0,es=null,Yu(i,P,B,Q)}}B$(),A=gn;break}catch(se){HO(i,se)}while(!0);return l&&i.shellSuspendCounter++,Ho=ll=null,It=p,H.H=v,H.A=b,it===null&&(Wt=null,ut=0,Up()),A}function B$(){for(;it!==null;)VO(it)}function H$(i,l){var d=It;It|=2;var p=qO(),v=WO();Wt!==i||ut!==l?(gg=null,pg=Gt()+500,Ku(i,l)):Wu=so(i,l);e:do try{if(Pt!==0&&it!==null){l=it;var b=es;t:switch(Pt){case 1:Pt=0,es=null,Yu(i,l,b,1);break;case 2:case 9:if(n2(b)){Pt=0,es=null,GO(l);break}l=function(){Pt!==2&&Pt!==9||Wt!==i||(Pt=7),ho(i)},b.then(l,l);break e;case 3:Pt=7;break e;case 4:Pt=5;break e;case 7:n2(b)?(Pt=0,es=null,GO(l)):(Pt=0,es=null,Yu(i,l,b,7));break;case 5:var A=null;switch(it.tag){case 26:A=it.memoizedState;case 5:case 27:var P=it;if(A?MN(A):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,yg(Q)):it=null}break t}}Pt=0,es=null,Yu(i,l,b,5);break;case 6:Pt=0,es=null,Yu(i,l,b,6);break;case 8:p1(),gn=6;break e;default:throw Error(r(462))}}$$();break}catch(se){HO(i,se)}while(!0);return Ho=ll=null,H.H=p,H.A=v,It=d,it!==null?0:(Wt=null,ut=0,Up(),gn)}function $$(){for(;it!==null&&!no();)VO(it)}function VO(i){var l=mO(i.alternate,i,Qo);i.memoizedProps=i.pendingProps,l===null?yg(i):it=l}function GO(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=cO(d,l,l.pendingProps,l.type,void 0,ut);break;case 11:l=cO(d,l,l.pendingProps,l.type.render,l.ref,ut);break;case 5:O0(l);default:yO(d,l),l=it=WI(l,Qo),l=mO(d,l,Qo)}i.memoizedProps=i.pendingProps,l===null?yg(i):it=l}function Yu(i,l,d,p){Ho=ll=null,O0(l),Fu=null,Kd=0;var v=l.return;try{if(N$(i,v,l,d,ut)){gn=1,og(i,vs(d,i.current)),it=null;return}}catch(b){if(v!==null)throw it=v,b;gn=1,og(i,vs(d,i.current)),it=null;return}l.flags&32768?(ft||p===1?i=!0:Wu||(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))),KO(l,i)):yg(l)}function yg(i){var l=i;do{if((l.flags&32768)!==0){KO(l,Ji);return}i=l.return;var d=k$(l.alternate,l,Qo);if(d!==null){it=d;return}if(l=l.sibling,l!==null){it=l;return}it=l=i}while(l!==null);gn===0&&(gn=5)}function KO(i,l){do{var d=D$(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);gn=6,it=null}function YO(i,l,d,p,v,b,A,P,B){i.cancelPendingCommit=null;do bg();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,A,P,B),i===Wt&&(it=Wt=null,ut=0),Gu=l,na=i,Jo=d,d1=b,f1=v,FO=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,G$(ro,function(){return eN(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=H.T,H.T=null,v=ee.p,ee.p=2,A=It,It|=4;try{L$(i,l,d)}finally{It=A,ee.p=v,H.T=p}}Mn=1,ZO(),XO(),QO()}}function ZO(){if(Mn===1){Mn=0;var i=na,l=Gu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=H.T,H.T=null;var p=ee.p;ee.p=2;var v=It;It|=4;try{OO(l,i);var b=T1,A=LI(i.containerInfo),P=b.focusedElem,B=b.selectionRange;if(A!==P&&P&&P.ownerDocument&&DI(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,Le=Math.min(B.start,Re),jt=B.end===void 0?Le:Math.min(B.end,Re);!re.extend&&Le>jt&&(A=jt,jt=Le,Le=A);var G=kI(P,Le),W=kI(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(),Le>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}}Ng=!!A1,T1=A1=null}finally{It=v,ee.p=p,H.T=d}}i.current=l,Mn=2}}function XO(){if(Mn===2){Mn=0;var i=na,l=Gu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=H.T,H.T=null;var p=ee.p;ee.p=2;var v=It;It|=4;try{_O(i,l.alternate,l)}finally{It=v,ee.p=p,H.T=d}}Mn=3}}function QO(){if(Mn===4||Mn===3){Mn=0,Rr();var i=na,l=Gu,d=Jo,p=FO;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Mn=5:(Mn=0,Gu=na=null,JO(i,i.pendingLanes));var v=i.pendingLanes;if(v===0&&(ta=null),Ja(d),l=l.stateNode,ur&&typeof ur.onCommitFiberRoot=="function")try{ur.onCommitFiberRoot(Pi,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=H.T,v=ee.p,ee.p=2,H.T=null;try{for(var b=i.onRecoverableError,A=0;A<p.length;A++){var P=p[A];b(P.value,{componentStack:P.stack})}}finally{H.T=l,ee.p=v}}(Jo&3)!==0&&bg(),ho(i),v=i.pendingLanes,(d&261930)!==0&&(v&42)!==0?i===h1?ff++:(ff=0,h1=i):ff=0,hf(0)}}function JO(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,Vd(l)))}function bg(){return ZO(),XO(),QO(),eN()}function eN(){if(Mn!==5)return!1;var i=na,l=d1;d1=0;var d=Ja(Jo),p=H.T,v=ee.p;try{ee.p=32>d?32:d,H.T=null,d=f1,f1=null;var b=na,A=Jo;if(Mn=0,Gu=na=null,Jo=0,(It&6)!==0)throw Error(r(331));var P=It;if(It|=4,DO(b.current),MO(b,b.current,A,d),It=P,hf(0,!1),ur&&typeof ur.onPostCommitFiberRoot=="function")try{ur.onPostCommitFiberRoot(Pi,b)}catch{}return!0}finally{ee.p=v,H.T=p,JO(i,l)}}function tN(i,l,d){l=vs(d,l),l=W0(i.stateNode,l,2),i=Yi(i,l,2),i!==null&&(Uo(i,2),ho(i))}function kt(i,l,d){if(i.tag===3)tN(i,i,d);else for(;l!==null;){if(l.tag===3){tN(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=vs(d,i),d=nO(2),p=Yi(l,d,2),p!==null&&(rO(d,p,l,i),Uo(p,2),ho(p));break}}l=l.return}}function m1(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new z$;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=q$.bind(null,i,l,d),l.then(i,i))}function q$(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&&(gn===4||gn===3&&(ut&62914560)===ut&&300>Gt()-hg?(It&2)===0&&Ku(i,0):u1|=d,Vu===ut&&(Vu=0)),ho(i)}function nN(i,l){l===0&&(l=Kr()),i=ol(i,l),i!==null&&(Uo(i,l),ho(i))}function W$(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),nN(i,d)}function V$(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),nN(i,d)}function G$(i,l){return Yn(i,l)}var Sg=null,Zu=null,v1=!1,Eg=!1,y1=!1,sa=0;function ho(i){i!==Zu&&i.next===null&&(Zu===null?Sg=Zu=i:Zu=Zu.next=i),Eg=!0,v1||(v1=!0,Y$())}function hf(i,l){if(!y1&&Eg){y1=!0;do for(var d=!1,p=Sg;p!==null;){if(i!==0){var v=p.pendingLanes;if(v===0)var b=0;else{var A=p.suspendedLanes,P=p.pingedLanes;b=(1<<31-Zn(42|i)+1)-1,b&=v&~(A&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,iN(p,b))}else b=ut,b=Qa(p,p===Wt?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||so(p,b)||(d=!0,iN(p,b));p=p.next}while(d);y1=!1}}function K$(){rN()}function rN(){Eg=v1=!1;var i=0;sa!==0&&oq()&&(i=sa);for(var l=Gt(),d=null,p=Sg;p!==null;){var v=p.next,b=sN(p,l);b===0?(p.next=null,d===null?Sg=v:d.next=v,v===null&&(Zu=d)):(d=p,(i!==0||(b&3)!==0)&&(Eg=!0)),p=v}Mn!==0&&Mn!==5||hf(i),sa!==0&&(sa=0)}function sN(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,v=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var A=31-Zn(b),P=1<<A,B=v[A];B===-1?((P&d)===0||(P&p)!==0)&&(v[A]=bu(P,l)):B<=l&&(i.expiredLanes|=P),b&=~P}if(l=Wt,d=ut,d=Qa(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||so(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Tr(p),Ja(d)){case 2:case 8:d=Ir;break;case 32:d=ro;break;case 268435456:d=Lo;break;default:d=ro}return p=oN.bind(null,i),d=Yn(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Tr(p),i.callbackPriority=2,i.callbackNode=null,2}function oN(i,l){if(Mn!==0&&Mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(bg()&&i.callbackNode!==d)return null;var p=ut;return p=Qa(i,i===Wt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(jO(i,p,l),sN(i,Gt()),i.callbackNode!=null&&i.callbackNode===d?oN.bind(null,i):null)}function iN(i,l){if(bg())return null;jO(i,l,!0)}function Y$(){aq(function(){(It&6)!==0?Yn(yn,K$):rN()})}function b1(){if(sa===0){var i=Du;i===0&&(i=Di,Di<<=1,(Di&261888)===0&&(Di=256)),sa=i}return sa}function aN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:cr(""+i)}function lN(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 Z$(i,l,d,p,v){if(l==="submit"&&d&&d.stateNode===v){var b=aN((v[nt]||null).action),A=p.submitter;A&&(l=(l=A[nt]||null)?aN(l.formAction):A.getAttribute("formAction"),l!==null&&(b=l,A=null));var P=new Pp("action","action",null,p,v);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(sa!==0){var B=A?lN(v,A):new FormData(v);z0(d,{pending:!0,data:B,method:v.method,action:b},null,B)}}else typeof b=="function"&&(P.preventDefault(),B=A?lN(v,A):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],X$=E1.toLowerCase(),Q$=E1[0].toUpperCase()+E1.slice(1);Fs(X$,"on"+Q$)}Fs(zI,"onAnimationEnd"),Fs(jI,"onAnimationIteration"),Fs(BI,"onAnimationStart"),Fs("dblclick","onDoubleClick"),Fs("focusin","onFocus"),Fs("focusout","onBlur"),Fs(p$,"onTransitionRun"),Fs(g$,"onTransitionStart"),Fs(m$,"onTransitionCancel"),Fs(HI,"onTransitionEnd"),ji("onMouseEnter",["mouseout","mouseover"]),ji("onMouseLeave",["mouseout","mouseover"]),ji("onPointerEnter",["pointerout","pointerover"]),ji("onPointerLeave",["pointerout","pointerover"]),Ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ls("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ls("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(" "),J$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pf));function uN(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 A=p.length-1;0<=A;A--){var P=p[A],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){Lp(se)}v.currentTarget=null,b=B}else for(A=0;A<p.length;A++){if(P=p[A],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){Lp(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)||(cN(l,i,2,!1),d.add(p))}function C1(i,l,d){var p=0;l&&(p|=4),cN(d,i,p,l)}var Cg="_reactListening"+Math.random().toString(36).slice(2);function w1(i){if(!i[Cg]){i[Cg]=!0,ao.forEach(function(d){d!=="selectionchange"&&(J$.has(d)||C1(d,!1,i),C1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Cg]||(l[Cg]=!0,C1("selectionchange",!1,l))}}function cN(i,l,d,p){switch(zN(l)){case 2:var v=Tq;break;case 8:v=Rq;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 A=p.tag;if(A===3||A===4){var P=p.stateNode.containerInfo;if(P===v)break;if(A===4)for(A=p.return;A!==null;){var B=A.tag;if((B===3||B===4)&&A.stateNode.containerInfo===v)return;A=A.return}for(;P!==null;){if(A=Fi(P),A===null)return;if(B=A.tag,B===5||B===6||B===26||B===27){p=b=A;continue e}P=P.parentNode}}p=p.return}gI(function(){var Q=b,se=Nn(d),ae=[];e:{var ne=$I.get(i);if(ne!==void 0){var re=Pp,Re=i;switch(i){case"keypress":if(Np(d)===0)break e;case"keydown":case"keyup":re=VH;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=yI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=kH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=YH;break;case zI:case jI:case BI:re=UH;break;case HI:re=XH;break;case"scroll":case"scrollend":re=MH;break;case"wheel":re=JH;break;case"copy":case"cut":case"paste":re=zH;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=SI;break;case"toggle":case"beforetoggle":re=t$}var Le=(l&4)!==0,jt=!Le&&(i==="scroll"||i==="scrollend"),G=Le?ne!==null?ne+"Capture":null:ne;Le=[];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&&Le.push(gf(W,ie,X))),jt)break;W=W.return}0<Le.length&&(ne=new re(ne,Re,null,d,se),ae.push({event:ne,listeners:Le}))}}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),Le=Re.tag,Re!==jt||Le!==5&&Le!==27&&Le!==6)&&(Re=null)):(re=null,Re=Q),re!==Re)){if(Le=yI,ie="onMouseLeave",G="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(Le=SI,ie="onPointerLeave",G="onPointerEnter",W="pointer"),jt=re==null?ne:el(re),X=Re==null?ne:el(Re),ne=new Le(ie,W+"leave",re,d,se),ne.target=jt,ne.relatedTarget=X,ie=null,Fi(se)===Q&&(Le=new Le(G,W+"enter",Re,d,se),Le.target=X,Le.relatedTarget=jt,ie=Le),jt=ie,re&&Re)t:{for(Le=eq,G=re,W=Re,X=0,ie=G;ie;ie=Le(ie))X++;ie=0;for(var Pe=W;Pe;Pe=Le(Pe))ie++;for(;0<X-ie;)G=Le(G),X--;for(;0<ie-X;)W=Le(W),ie--;for(;X--;){if(G===W||W!==null&&G===W.alternate){Le=G;break t}G=Le(G),W=Le(W)}Le=null}else Le=null;re!==null&&dN(ae,ne,re,Le,!1),Re!==null&&jt!==null&&dN(ae,jt,Re,Le,!0)}}e:{if(ne=Q?el(Q):window,re=ne.nodeName&&ne.nodeName.toLowerCase(),re==="select"||re==="input"&&ne.type==="file")var _t=RI;else if(AI(ne))if(II)_t=d$;else{_t=u$;var Ne=l$}else re=ne.nodeName,!re||re.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?Q&&Fe(Q.elementType)&&(_t=RI):_t=c$;if(_t&&(_t=_t(i,Q))){TI(ae,_t,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?el(Q):window,i){case"focusin":(AI(Ne)||Ne.contentEditable==="true")&&(Tu=Ne,Jb=Q,$d=null);break;case"focusout":$d=Jb=Tu=null;break;case"mousedown":e0=!0;break;case"contextmenu":case"mouseup":case"dragend":e0=!1,UI(ae,d,se);break;case"selectionchange":if(h$)break;case"keydown":case"keyup":UI(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 Au?xI(i,d)&&(ct="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(ct="onCompositionStart");ct&&(EI&&d.locale!=="ko"&&(Au||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&Au&&(Je=mI()):(Hi=se,qb="value"in Hi?Hi.value:Hi.textContent,Au=!0)),Ne=wg(Q,ct),0<Ne.length&&(ct=new bI(ct,i,null,d,se),ae.push({event:ct,listeners:Ne}),Je?ct.data=Je:(Je=_I(d),Je!==null&&(ct.data=Je)))),(Je=r$?s$(i,d):o$(i,d))&&(ct=wg(Q,"onBeforeInput"),0<ct.length&&(Ne=new bI("onBeforeInput","beforeinput",null,d,se),ae.push({event:Ne,listeners:ct}),Ne.data=Je)),Z$(ae,i,Q,d,se)}uN(ae,l)})}function gf(i,l,d){return{instance:i,listener:l,currentTarget:d}}function wg(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 eq(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function dN(i,l,d,p,v){for(var b=l._reactName,A=[];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&&A.unshift(gf(d,Q,B))):v||(Q=Dd(d,b),Q!=null&&A.push(gf(d,Q,B)))),d=d.return}A.length!==0&&i.push({event:l,listeners:A})}var tq=/\r\n?/g,nq=/\u0000|\uFFFD/g;function fN(i){return(typeof i=="string"?i:""+i).replace(tq,`
224
- `).replace(nq,"")}function hN(i,l){return l=fN(l),fN(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":Us(i,"class",p);break;case"tabIndex":Us(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Us(i,d,p);break;case"style":De(i,p,b);break;case"data":if(l!=="object"){Us(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=cr(""+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=cr(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=rn);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=cr(""+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),Fo(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":Fo(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=nn.get(d)||d,Fo(i,d,p))}}function _1(i,l,d,p,v,b){switch(d){case"style":De(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=rn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ap.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,""):Fo(i,d,p)}}}function er(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 A=d[b];if(A!=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,A,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=A=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":A=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,A,v,!1);return;case"select":at("invalid",i),p=A=b=null;for(v in d)if(d.hasOwnProperty(v)&&(P=d[v],P!=null))switch(v){case"value":b=P;break;case"defaultValue":A=P;break;case"multiple":p=P;default:zt(i,l,v,P,d,null)}l=b,d=A,i.multiple=!!p,l!=null?lo(i,!!p,l,!1):d!=null&&lo(i,!!p,d,!0);return;case"textarea":at("invalid",i),b=v=p=null;for(A in d)if(d.hasOwnProperty(A)&&(P=d[A],P!=null))switch(A){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,A,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(Fe(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 rq(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,A=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":A=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,A,P,B,Q,se,b,v);return;case"select":re=A=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":A=b;default:b!==B&&zt(i,l,v,b,p,B)}l=P,d=A,p=re,ne!=null?lo(i,!!d,ne,!1):!!p!=!!d&&(l!=null?lo(i,!!d,l,!0):lo(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(A in p)if(v=p[A],b=d[A],p.hasOwnProperty(A)&&(v!=null||b!=null))switch(A){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,A,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 Le in d)ne=d[Le],d.hasOwnProperty(Le)&&ne!=null&&!p.hasOwnProperty(Le)&&zt(i,l,Le,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(Fe(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 pN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sq(){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,A=v.initiatorType,P=v.duration;if(b&&P&&pN(A)){for(A=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&&pN(ae)&&(B=B.responseEnd,A+=se*(B<P?1:(P-Q)/(B-Q)))}if(--p,l+=8*(b+A)/(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 xg(i){return i.nodeType===9?i:i.ownerDocument}function gN(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 mN(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 oq(){var i=window.event;return i&&i.type==="popstate"?i===I1?!1:(I1=i,!0):(I1=null,!1)}var vN=typeof setTimeout=="function"?setTimeout:void 0,iq=typeof clearTimeout=="function"?clearTimeout:void 0,yN=typeof Promise=="function"?Promise:void 0,aq=typeof queueMicrotask=="function"?queueMicrotask:typeof yN<"u"?function(i){return yN.resolve(null).then(i).catch(lq)}:vN;function lq(i){setTimeout(function(){throw i})}function oa(i){return i==="head"}function bN(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),ec(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 A=b.nextSibling,P=b.nodeName;b[Ui]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=A}}else d==="body"&&mf(i.ownerDocument.body);d=v}while(d);ec(l)}function SN(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 uq(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=Cs(i.nextSibling),i===null)break}return null}function cq(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Cs(i.nextSibling),i===null))return null;return i}function EN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Cs(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 dq(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 Cs(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 CN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Cs(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function wN(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 xN(i,l,d){switch(l=xg(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 ws=new Map,_N=new Set;function _g(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ei=ee.d;ee.d={f:fq,r:hq,D:pq,C:gq,L:mq,m:vq,X:bq,S:yq,M:Sq};function fq(){var i=ei.f(),l=mg();return i||l}function hq(i){var l=zi(i);l!==null&&l.tag===5&&l.type==="form"?H2(l):ei.r(i)}var Xu=typeof document>"u"?null:document;function AN(i,l,d){var p=Xu;if(p&&typeof l=="string"&&l){var v=Or(l);v='link[rel="'+i+'"][href="'+v+'"]',typeof d=="string"&&(v+='[crossorigin="'+d+'"]'),_N.has(v)||(_N.add(v),i={rel:i,crossOrigin:d,href:l},p.querySelector(v)===null&&(l=p.createElement("link"),er(l,"link",i),un(l),p.head.appendChild(l)))}}function pq(i){ei.D(i),AN("dns-prefetch",i,null)}function gq(i,l){ei.C(i,l),AN("preconnect",i,l)}function mq(i,l,d){ei.L(i,l,d);var p=Xu;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=Qu(i);break;case"script":b=Ju(i)}ws.has(b)||(i=g({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),ws.set(b,i),p.querySelector(v)!==null||l==="style"&&p.querySelector(vf(b))||l==="script"&&p.querySelector(yf(b))||(l=p.createElement("link"),er(l,"link",i),un(l),p.head.appendChild(l)))}}function vq(i,l){ei.m(i,l);var d=Xu;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=Ju(i)}if(!ws.has(b)&&(i=g({rel:"modulepreload",href:i},l),ws.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"),er(p,"link",i),un(p),d.head.appendChild(p)}}}function yq(i,l,d){ei.S(i,l,d);var p=Xu;if(p&&i){var v=mr(p).hoistableStyles,b=Qu(i);l=l||"default";var A=v.get(b);if(!A){var P={loading:0,preload:null};if(A=p.querySelector(vf(b)))P.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":l},d),(d=ws.get(b))&&k1(i,d);var B=A=p.createElement("link");un(B),er(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,Ag(A,l,p)}A={type:"stylesheet",instance:A,count:1,state:P},v.set(b,A)}}}function bq(i,l){ei.X(i,l);var d=Xu;if(d&&i){var p=mr(d).hoistableScripts,v=Ju(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0},l),(l=ws.get(v))&&D1(i,l),b=d.createElement("script"),un(b),er(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function Sq(i,l){ei.M(i,l);var d=Xu;if(d&&i){var p=mr(d).hoistableScripts,v=Ju(i),b=p.get(v);b||(b=d.querySelector(yf(v)),b||(i=g({src:i,async:!0,type:"module"},l),(l=ws.get(v))&&D1(i,l),b=d.createElement("script"),un(b),er(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(v,b))}}function TN(i,l,d,p){var v=(v=he.current)?_g(v):null;if(!v)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Qu(d.href),d=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=Qu(d.href);var b=mr(v).hoistableStyles,A=b.get(i);if(A||(v=v.ownerDocument||v,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,A),(b=v.querySelector(vf(i)))&&!b._p&&(A.instance=b,A.state.loading=5),ws.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},ws.set(i,d),b||Eq(v,i,d,A.state))),l&&p===null)throw Error(r(528,""));return A}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=Ju(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 Qu(i){return'href="'+Or(i)+'"'}function vf(i){return'link[rel="stylesheet"]['+i+"]"}function RN(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function Eq(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}),er(l,"link",d),un(l),i.head.appendChild(l))}function Ju(i){return'[src="'+Or(i)+'"]'}function yf(i){return"script[async]"+i}function IN(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,un(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"),un(p),er(p,"style",v),Ag(p,d.precedence,i),l.instance=p;case"stylesheet":v=Qu(d.href);var b=i.querySelector(vf(v));if(b)return l.state.loading|=4,l.instance=b,un(b),b;p=RN(d),(v=ws.get(v))&&k1(p,v),b=(i.ownerDocument||i).createElement("link"),un(b);var A=b;return A._p=new Promise(function(P,B){A.onload=P,A.onerror=B}),er(b,"link",p),l.state.loading|=4,Ag(b,d.precedence,i),l.instance=b;case"script":return b=Ju(d.src),(v=i.querySelector(yf(b)))?(l.instance=v,un(v),v):(p=d,(v=ws.get(b))&&(p=g({},d),D1(p,v)),i=i.ownerDocument||i,v=i.createElement("script"),un(v),er(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,Ag(p,d.precedence,i));return l.instance}function Ag(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,A=0;A<p.length;A++){var P=p[A];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 Tg=null;function ON(i,l,d){if(Tg===null){var p=new Map,v=Tg=new Map;v.set(d,p)}else v=Tg,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 A=b.getAttribute(l)||"";A=i+A;var P=p.get(A);P?P.push(b):p.set(A,[b])}}return p}function NN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function Cq(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 MN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function wq(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=Qu(p.href),b=l.querySelector(vf(v));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Rg.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,un(b);return}b=l.ownerDocument||l,p=RN(p),(v=ws.get(v))&&k1(p,v),b=b.createElement("link"),un(b);var A=b;A._p=new Promise(function(P,B){A.onload=P,A.onerror=B}),er(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=Rg.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var L1=0;function xq(i,l){return i.stylesheets&&i.count===0&&Og(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&Og(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&L1===0&&(L1=62500*sq());var v=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Og(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 Rg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Og(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ig=null;function Og(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ig=new Map,l.forEach(_q,i),Ig=null,Rg.call(i))}function _q(i,l){if(!(l.state.loading&4)){var d=Ig.get(i);if(d)var p=d.get(null);else{d=new Map,Ig.set(i,d);for(var v=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<v.length;b++){var A=v[b];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(d.set(A.dataset.precedence,A),p=A)}p&&d.set(null,p)}v=l.instance,A=v.getAttribute("data-precedence"),b=d.get(A)||p,b===p&&d.set(null,v),d.set(A,v),this.count++,p=Rg.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:_,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function Aq(i,l,d,p,v,b,A,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=oo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oo(0),this.hiddenUpdates=oo(null),this.identifierPrefix=p,this.onUncaughtError=v,this.onCaughtError=b,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function PN(i,l,d,p,v,b,A,P,B,Q,se,ae){return i=new Aq(i,l,d,A,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 kN(i){return i?(i=Ou,i):Ou}function DN(i,l,d,p,v,b){v=kN(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 LN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function U1(i,l){LN(i,l),(i=i.alternate)&&LN(i,l)}function UN(i){if(i.tag===13||i.tag===31){var l=ol(i,67108864);l!==null&&Lr(l,i,67108864),U1(i,67108864)}}function FN(i){if(i.tag===13||i.tag===31){var l=ns();l=Eu(l);var d=ol(i,l);d!==null&&Lr(d,i,l),U1(i,l)}}var Ng=!0;function Tq(i,l,d,p){var v=H.T;H.T=null;var b=ee.p;try{ee.p=2,F1(i,l,d,p)}finally{ee.p=b,H.T=v}}function Rq(i,l,d,p){var v=H.T;H.T=null;var b=ee.p;try{ee.p=8,F1(i,l,d,p)}finally{ee.p=b,H.T=v}}function F1(i,l,d,p){if(Ng){var v=z1(p);if(v===null)x1(i,l,p,Mg,d),jN(i,p);else if(Oq(v,i,l,d,p))p.stopPropagation();else if(jN(i,p),l&4&&-1<Iq.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 A=Ds(b.pendingLanes);if(A!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;A;){var B=1<<31-Zn(A);P.entanglements[1]|=B,A&=~B}ho(b),(It&6)===0&&(pg=Gt()+500,hf(0))}}break;case 31:case 13:P=ol(b,2),P!==null&&Lr(P,b,2),mg(),U1(b,2)}if(b=z1(p),b===null&&x1(i,l,p,Mg,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 Mg=null;function j1(i){if(Mg=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 Mg=i,null}function zN(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(mt()){case yn:return 2;case Ir:return 8;case ro:case Cd:return 32;case Lo:return 268435456;default:return 32}default:return 32}}var B1=!1,ia=null,aa=null,la=null,Sf=new Map,Ef=new Map,ua=[],Iq="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 jN(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&&UN(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,v!==null&&l.indexOf(v)===-1&&l.push(v),i)}function Oq(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 BN(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(){FN(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,Li(i.priority,function(){FN(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 Pg(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&&UN(l),i.blockedOn=d,!1;l.shift()}return!0}function HN(i,l,d){Pg(i)&&d.delete(l)}function Nq(){B1=!1,ia!==null&&Pg(ia)&&(ia=null),aa!==null&&Pg(aa)&&(aa=null),la!==null&&Pg(la)&&(la=null),Sf.forEach(HN),Ef.forEach(HN)}function kg(i,l){i.blockedOn===l&&(i.blockedOn=null,B1||(B1=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Nq)))}var Dg=null;function $N(i){Dg!==i&&(Dg=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Dg===i&&(Dg=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 ec(i){function l(B){return kg(B,i)}ia!==null&&kg(ia,i),aa!==null&&kg(aa,i),la!==null&&kg(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);)BN(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],A=v[nt]||null;if(typeof b=="function")A||$N(d);else if(A){var P=null;if(b&&b.hasAttribute("formAction")){if(v=b,A=b[nt]||null)P=A.formAction;else if(j1(v)!==null)continue}else P=A.action;typeof P=="function"?d[p+1]=P:(d.splice(p,3),p-=3),$N(d)}}}function qN(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(A){return v=A})},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}Lg.prototype.render=H1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=ns();DN(d,p,i,l,null,null)},Lg.prototype.unmount=H1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;DN(i.current,2,null,i,null,null),mg(),l[Yr]=null}};function Lg(i){this._internalRoot=i}Lg.prototype.unstable_scheduleHydration=function(i){if(i){var l=xp();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&&BN(i)}};var WN=e.version;if(WN!=="19.2.7")throw Error(r(527,WN,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var Mq={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ug=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ug.isDisabled&&Ug.supportsFiber)try{Pi=Ug.inject(Mq),ur=Ug}catch{}}return Hf.createRoot=function(i,l){if(!s(i))throw Error(r(299));var d=!1,p="",v=Q2,b=J2,A=eO;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&&(A=l.onRecoverableError)),l=PN(i,1,!1,null,null,d,p,null,v,b,A,qN),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=Q2,A=J2,P=eO,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&&(A=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError),d.formState!==void 0&&(B=d.formState)),l=PN(i,1,!0,l,d??null,p,v,B,b,A,P,qN),l.context=kN(null),d=l.current,p=ns(),p=Eu(p),v=Ki(p),v.callback=null,Yi(d,v,p),d=p,l.current.lanes=d,Uo(l,d),ho(l),i[Yr]=l.current,w1(i),new Lg(l)},Hf.version="19.2.7",Hf}var G4;function zme(){if(G4)return nx.exports;G4=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(),nx.exports=Fme(),nx.exports}var jme=zme();const Bme={bodySerializer:t=>JSON.stringify(t,(e,n)=>typeof n=="bigint"?n.toString():n)},Hme=({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 T=h.headers instanceof Headers?h.headers:new Headers(h.headers);g!==void 0&&T.set("Last-Event-ID",g);try{const _={redirect:"follow",...h,body:h.serializedBody,headers:T,signal:w};let R=new Request(f,_);t&&(R=await t(f,_));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 O=N.body.pipeThrough(new TextDecoderStream).getReader();let k="";const F=()=>{try{O.cancel()}catch{}};w.addEventListener("abort",F);try{for(;;){const{done:$,value:D}=await O.read();if($)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 Y=q.split(`
229
- `),te=[];let H;for(const ce of Y)if(ce.startsWith("data:"))te.push(ce.replace(/^data:\s*/,""));else if(ce.startsWith("event:"))H=ce.replace(/^event:\s*/,"");else if(ce.startsWith("id:"))g=ce.replace(/^id:\s*/,"");else if(ce.startsWith("retry:")){const xe=Number.parseInt(ce.replace(/^retry:\s*/,""),10);Number.isNaN(xe)||(E=xe)}let ee,de=!1;if(te.length){const ce=te.join(`
230
- `);try{ee=JSON.parse(ce),de=!0}catch{ee=ce}}de&&(s&&await s(ee),r&&(ee=await r(ee))),n?.({data:ee,event:H,id:g,retry:E}),te.length&&(yield ee)}}}finally{w.removeEventListener("abort",F),O.releaseLock()}break}catch(_){if(e?.(_),a!==void 0&&C>=a)break;const R=Math.min(E*2**(C-1),u??3e4);await m(R)}}}()}},$me=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},qme=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Wme=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},yz=({allowReserved:t,explode:e,name:n,style:r,value:s})=>{if(!e){const u=(t?s:s.map(c=>encodeURIComponent(c))).join(qme(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const o=$me(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)}`},bz=({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=Wme(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},Vme=/\{[^{}]+\}/g,Gme=({path:t,url:e})=>{let n=e;const r=e.match(Vme);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,yz({explode:o,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(s,bz({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},Kme=({baseUrl:t,path:e,query:n,querySerializer:r,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let a=(t??"")+o;e&&(a=Gme({path:e,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function K4(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 Yme=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},Sz=({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=yz({allowReserved:u.allowReserved,explode:!0,name:o,style:"form",value:a,...u.array});c&&s.push(c)}else if(typeof a=="object"){const c=bz({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("&")},Zme=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"}},Xme=(t,e)=>e?!!(t.headers.has(e)||t.query?.[e]||t.headers.get("Cookie")?.includes(`${e}=`)):!1,Qme=async({security:t,...e})=>{for(const n of t){if(Xme(e,n.name))continue;const r=await Yme(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}}},Y4=t=>Kme({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:Sz(t.querySerializer),url:t.url}),Z4=(t,e)=>{const n={...t,...e};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Ez(t.headers,e.headers),n},Jme=t=>{const e=[];return t.forEach((n,r)=>{e.push([r,n])}),e},Ez=(...t)=>{const e=new Headers;for(const n of t){if(!n)continue;const r=n instanceof Headers?Jme(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 ox{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 eve=()=>({error:new ox,request:new ox,response:new ox}),tve=Sz({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),nve={"Content-Type":"application/json"},Cz=(t={})=>({...Bme,headers:nve,parseAs:"auto",querySerializer:tve,...t}),rve=(t={})=>{let e=Z4(Cz(),t);const n=()=>({...e}),r=f=>(e=Z4(e,f),n()),s=eve(),o=async f=>{const h={...e,...f,fetch:f.fetch??e.fetch??globalThis.fetch,headers:Ez(e.headers,f.headers),serializedBody:void 0};h.security&&await Qme({...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=Y4(h);return{opts:h,url:g}},a=async f=>{const{opts:h,url:g}=await o(f),m={redirect:"follow",...h,body:K4(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 O of s.error.fns)O&&(N=await O(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"?Zme(E.headers.get("Content-Type")):h.parseAs)??"json";if(E.status===204||E.headers.get("Content-Length")==="0"){let O;switch(M){case"arrayBuffer":case"blob":case"text":O=await E[M]();break;case"formData":O=new FormData;break;case"stream":O=E.body;break;default:O={};break}return h.responseStyle==="data"?O:{data:O,...C}}let N;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":N=await E[M]();break;case"json":{const O=await E.text();N=O?JSON.parse(O):{};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 T;try{T=JSON.parse(w)}catch{}const _=T??w;let R=_;for(const M of s.error.fns)M&&(R=await M(_,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 Hme({...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:K4(g),url:m})};return{buildUrl:Y4,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")}},ke=rve(Cz({baseUrl:"https://api.remit.example.com"}));let X4=!1;const sve=t=>{X4||(ke.interceptors.request.use(async e=>{const n=await t.getToken();return n&&e.headers.set("Authorization",`Bearer ${n}`),e}),X4=!0)},ove=({children:t})=>I.jsx(I.Fragment,{children:t}),ive={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:ove,Account:({fallback:t=null})=>I.jsx(I.Fragment,{children:t})},wz=x.createContext(ive),ave=wz.Provider,sIe=()=>x.useContext(wz),lve=(t,e)=>{F9(t,e.meta)&&ql(t)},uve=(t,e,n,r)=>{F9(t,r.meta)&&ql(t)},U_=t=>new TextEncoder().encode(t),xz={},F_={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),xz[t]=e,F_[e]=t}function cve(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 F_)e[n/2]=F_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return e}function zl(t){let e="";for(let n=0;n<t.byteLength;n++)e+=xz[t[n]];return e}const zh=t=>t instanceof Uint8Array?t:typeof t=="string"?U_(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),dve=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";class wi{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 wi({...e,headers:{...e.headers}});return n.query&&(n.query=fve(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 wi.clone(this)}}function fve(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}},{})}class jh{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 Q4=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},jl=t=>encodeURIComponent(t).replace(/[!'()*]/g,hve),hve=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`;function wR(t){const e=[];for(let n of Object.keys(t).sort()){const r=t[n];if(n=jl(n),Array.isArray(r))for(let s=0,o=r.length;s<o;s++)e.push(`${n}=${jl(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${jl(r)}`),e.push(s)}}return e.join("&")}const pm="[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 pm;const s=r.split(`
231
- `);if(s.length<4)return pm;const o=s[3];if(!o)return pm;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 pm}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 J4=2048,eU=.2,pve=()=>typeof CompressionStream<"u",gve=async t=>{const e=new Blob([t]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())},mve=async t=>{const e=t.length;if(be.debug(`compressIfBeneficial called, payload size: ${e}B`),!pve())return be.debug("CompressionStream not supported, skipping compression"),{body:t,compressed:!1};if(e<J4)return be.debug(`Payload size ${e}B below threshold ${J4}B, skipping compression`),{body:t,compressed:!1};const n=await gve(t),r=1-n.length/e;return r>=eU?(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 ${eU*100}%, skipping`),{body:t,compressed:!1})},vve="POST",yve="application/json",bve="text/plain;charset=UTF-8",Sve=64e3;class Eve{constructor(e,n){this.sendFetch=async r=>{var s,o;const a=JSON.stringify(tU(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 mve(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,c,yve,f);let g=new wi(h);return this.signing&&(g=await this.signing.sign(g)),this.config.fetchRequestHandler.handle(g)},this.sendBeacon=async r=>{const s=JSON.stringify(tU(r));if(s.length>Sve)throw new Error("Payload too large for sendBeacon");const o=await this.getHttpRequestOptions(r,s,bve,!1);let a=new wi(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:vve,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 tU=t=>{const e=[];t.RumEvents.forEach(r=>e.push(Cve(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},Cve=t=>({id:t.id,timestamp:Math.round(t.timestamp.getTime()/1e3),type:t.type,metadata:t.metadata,details:t.details});class wve{handle(e){const n=this.sendBeacon(e);return new Promise((r,s)=>{n?r({response:new jh({statusCode:200})}):s()})}updateHttpClientConfig(e,n){}httpHandlerConfigs(){return{}}sendBeacon(e){let n=e.path;if(e.query){const o=wR(e.query);o&&(n+=`?${o}`)}const{port:r}=e,s=`${e.protocol}//${e.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(s,e.body)}}const xve=(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 _ve=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=wR(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 jh({headers:S,statusCode:m.status,body:m.body})}:m.blob().then(C=>({response:new jh({headers:S,statusCode:m.status,body:C})}))}),xve(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{}}},gm;const Ave=new Uint8Array(16);function Tve(){if(!gm&&(gm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gm(Ave)}const nr=[];for(let t=0;t<256;++t)nr.push((t+256).toString(16).slice(1));function Rve(t,e=0){return nr[t[e+0]]+nr[t[e+1]]+nr[t[e+2]]+nr[t[e+3]]+"-"+nr[t[e+4]]+nr[t[e+5]]+"-"+nr[t[e+6]]+nr[t[e+7]]+"-"+nr[t[e+8]]+nr[t[e+9]]+"-"+nr[t[e+10]]+nr[t[e+11]]+nr[t[e+12]]+nr[t[e+13]]+nr[t[e+14]]+nr[t[e+15]]}const Ive=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),nU={randomUUID:Ive};function mh(t,e,n){if(nU.randomUUID&&!t)return nU.randomUUID();t=t||{};const r=t.random||(t.rng||Tve)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Rve(r)}const xR=t=>{if(crypto)return crypto.getRandomValues(t);if(msCrypto)return msCrypto.getRandomValues(t);throw new Error("No crypto library found.")},_z=[];for(let t=0;t<256;t++)_z[t]=(t+256).toString(16).substr(1);const Cb="X-Amzn-Trace-Id",wb="traceparent",Ove=2,Nve=32,Mve=16,Pve=4,Az=(t,e)=>Array.isArray(e)?e.some(n=>n.test(t)):e,Tz={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},kve=t=>200<=t&&t<300,Rz=t=>Math.floor(t/100)===4,_R=t=>Math.floor(t/100)===5,AR=t=>t===429,Iz=(t,e)=>{const n=e.urlsToInclude.some(s=>s.test(t)),r=e.urlsToExclude.some(s=>s.test(t));return n&&!r},Ic=()=>Date.now()/1e3,Dve=(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},Oz=(t,e,n,r)=>({version:"1.0.0",name:t,origin:"AWS::RUM::AppMonitor",id:Pz(),start_time:e,trace_id:n?Bve():jve(),end_time:void 0,subsegments:[],in_progress:!1}),Nz=(t,e,n)=>{const r={id:Pz(),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},Mz=t=>{try{return t.hostname?t.hostname:t.url?new URL(t.url).hostname:new URL(t.toString()).hostname}catch{return window.location.hostname}},Lve=(t,e,n,r)=>{t.headers||(t.headers={}),r?t.headers[wb]=RR(e,n):t.headers[Cb]=TR(e,n)},Uve=(t,e,n,r)=>{r?t.set(wb,RR(e,n)):t.set(Cb,TR(e,n))},TR=(t,e)=>"Root="+t+";Parent="+e+";Sampled=1",RR=(t,e)=>"00-"+t+"-"+e+"-01",Fve=t=>t?.length===Pve&&t[0].length===Ove&&t[1].length===Nve&&t[2].length===Mve&&(t[3]==="00"||t[3]==="01"),zve=(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(),jve=()=>`1-${Hve()}-${$ve()}`,Bve=()=>{const t=new Uint8Array(16);return xR(t),`${IR(t)}`},Pz=()=>{const t=new Uint8Array(8);return xR(t),IR(t)},Hve=()=>Math.floor(Date.now()/1e3).toString(16),$ve=()=>{const t=new Uint8Array(12);return xR(t),IR(t)},IR=t=>{let e="";for(let n=0;n<t.length;n++)e+=_z[t[n]];return e};class qve{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(kve(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!AR(r)&&!_R(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",Wve=3e4,Vve="arw-module",rU="CWR: Cannot dispatch; no AWS credentials.";class Gve{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 Eve({fetchRequestHandler:new qve(new _ve({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new wve,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(rU)),sendBeacon:()=>Promise.reject(new Error(rU))}: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:mh(),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 kz={};for(let t=0;t<256;t++){let e=t.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),kz[t]=e}function Kve(t){let e="";for(let n=0;n<t.byteLength;n++)e+=kz[t[n]];return e}class Yve{format(e){const n=[];for(const o of Object.keys(e)){const a=U_(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?_s.boolTrue:_s.boolFalse]);case"byte":return Uint8Array.from([_s.byte,e.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,_s.short),n.setInt16(1,e.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,_s.integer),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=_s.long,s.set(e.value.bytes,1),s;case"binary":const o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,_s.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=U_(e.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,_s.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]=_s.timestamp,h.set(OR.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!Zve.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const g=new Uint8Array(17);return g[0]=_s.uuid,g.set(cve(e.value.replace(/-/g,"")),1),g}}}var _s;(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"})(_s||(_s={}));const Zve=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class OR{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&&sU(n),new OR(n)}valueOf(){const e=this.bytes.slice(0),n=e[0]&128;return n&&sU(e),parseInt(zl(e),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function sU(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Xve="X-Amz-Algorithm",Qve="X-Amz-Credential",Dz="X-Amz-Date",Jve="X-Amz-SignedHeaders",eye="X-Amz-Expires",Lz="X-Amz-Signature",Uz="X-Amz-Security-Token",Fz="authorization",zz=Dz.toLowerCase(),tye="date",nye=[Fz,zz,tye],rye=Lz.toLowerCase(),z_="x-amz-content-sha256",sye=Uz.toLowerCase(),oye={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},iye=/^proxy-/,aye=/^sec-/,ix="AWS4-HMAC-SHA256",lye="AWS4-HMAC-SHA256-PAYLOAD",uye="UNSIGNED-PAYLOAD",cye=50,jz="aws4_request",dye=3600*24*7,fye=({query:t={}})=>{const e=[],n={};for(const r of Object.keys(t)){if(r.toLowerCase()===rye)continue;const s=jl(r);e.push(s);const o=t[r];typeof o=="string"?n[s]=`${s}=${jl(o)}`:Array.isArray(o)&&(n[s]=o.slice(0).reduce((a,u)=>a.concat([`${s}=${jl(u)}`]),[]).sort().join("&"))}return e.sort().map(r=>n[r]).filter(r=>r).join("&")},hye=t=>pye(t).toISOString().replace(/\.\d{3}Z$/,"Z"),pye=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class gye{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=Q4(r),this.credentialProvider=Q4(n)}createCanonicalRequest(e,n,r){const s=Object.keys(n).sort();return`${e.method}
232
- ${this.getCanonicalPath(e)}
233
- ${fye(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(zh(r));const a=await o.digest();return`${s}
239
- ${e}
240
- ${n}
241
- ${zl(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 jl(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=hye(e).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}const mm={},ax=[],lx=(t,e,n)=>`${t}/${e}/${n}/${jz}`,mye=async(t,e,n,r,s)=>{const o=await oU(t,e.secretAccessKey,e.accessKeyId),a=`${n}:${r}:${s}:${zl(o)}:${e.sessionToken}`;if(a in mm)return mm[a];for(ax.push(a);ax.length>cye;)delete mm[ax.shift()];let u=`AWS4${e.secretAccessKey}`;for(const c of[n,r,s,jz])u=await oU(t,u,c);return mm[a]=u},oU=(t,e,n)=>{const r=new t(e);return r.update(zh(n)),r.digest()},iU=({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 oye||e?.has(o)||iye.test(o)||aye.test(o))&&(!n||n&&!n.has(o))||(r[o]=t[s].trim().replace(/\s+/g," "))}return r},ux=async({headers:t,body:e},n)=>{for(const r of Object.keys(t))if(r.toLowerCase()===z_)return t[r];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||dve(e)){const r=new n;return r.update(zh(e)),zl(await r.digest())}return uye},vye=(t,e)=>{t=t.toLowerCase();for(const n of Object.keys(e))if(t===n.toLowerCase())return!0;return!1},yye=(t,e={})=>{const{headers:n,query:r={}}=wi.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}},aU=t=>{t=wi.clone(t);for(const e of Object.keys(t.headers))nye.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t};class bye extends gye{headerFormatter=new Yve;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>dye)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const E=lx(S,m,h??this.service),C=yye(aU(e),{unhoistableHeaders:a,hoistableHeaders:c});g.sessionToken&&(C.query[Uz]=g.sessionToken),C.query[Xve]=ix,C.query[Qve]=`${g.accessKeyId}/${E}`,C.query[Dz]=y,C.query[eye]=s.toString(10);const w=iU(C,o,u);return C.query[Jve]=this.getCanonicalHeaderList(w),C.query[Lz]=await this.getSignature(y,E,this.getSigningKey(g,m,S,h),this.createCanonicalRequest(C,w,await ux(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=lx(f,c,a??this.service),m=await ux({headers:{},body:n},this.sha256),y=new this.sha256;y.update(e);const S=zl(await y.digest()),E=[lye,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(zh(e)),zl(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=aU(e),{longDate:h,shortDate:g}=this.formatDate(n),m=lx(g,c,a??this.service);f.headers[zz]=h,u.sessionToken&&(f.headers[sye]=u.sessionToken);const y=await ux(f,this.sha256);!vye(z_,f.headers)&&this.applyChecksum&&(f.headers[z_]=y);const S=iU(f,s,r),E=await this.getSignature(h,m,this.getSigningKey(u,c,g,a),this.createCanonicalRequest(f,S,y));return f.headers[Fz]=`${ix} 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,ix),a=new this.sha256(await r);return a.update(zh(o)),zl(await a.digest())}getSigningKey(e,n,r,s){return mye(this.sha256,e,r,n,s||this.service)}}const Sye="rum",Eye={expiresIn:60},Cye=(t,e)=>{const n=new bye({applyChecksum:!0,credentials:t,region:e,service:Sye,uriEscapePath:!0,sha256:Hl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Eye),hashAndEncode:async r=>{const s=new Hl;return s.update(r),Kve(await s.digest()).toLowerCase()}}};function lU(t,e){return new Request(t,e)}function wye(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 cx={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)),cx.supported===void 0&&(cx.supported=typeof Request<"u"&&"keepalive"in lU("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 T=uU(n);return Promise.reject(T)}let u=e.path;const c=wR(e.query||{});c&&(u+=`?${c}`),e.fragment&&(u+=`#${e.fragment}`);let f="";if(e.username!=null||e.password!=null){const T=e.username??"",_=e.password??"";f=`${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),cx.supported&&(S.keepalive=o),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(e));let E=()=>{};const C=lU(m,S),w=[fetch(C).then(T=>{const _=T.headers,R={};for(const N of _.entries())R[N[0]]=N[1];return T.body!=null?{response:new jh({headers:R,reason:T.statusText,statusCode:T.status,body:T.body})}:T.blob().then(N=>({response:new jh({headers:R,reason:T.statusText,statusCode:T.status,body:N})}))}),wye(s)];return n&&w.push(new Promise((T,_)=>{const R=()=>{const M=uU(n);_(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 uU(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 dx=async t=>{const{value:e}=await t.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,e))},xye=async t=>{const{value:e}=await t.body.getReader().read();return String.fromCharCode.apply(null,e)},_ye="POST",Aye="application/x-www-form-urlencoded",Tye="https:",Rye="AssumeRoleWithWebIdentity",Iye="2011-06-15";class Oye{constructor(e){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Rye,Version:Iye}),s=new URLSearchParams(Object.entries(r)).toString(),o=new wi({method:_ye,headers:{"content-type":Aye,host:this.hostname},protocol:Tye,hostname:this.hostname,body:s}),{response:a}=await this.fetchRequestHandler.handle(o),u=await xye(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 Nye="POST",Mye="application/x-amz-json-1.1",Pye="https:",kye="AWSCognitoIdentityService.GetId",Dye="AWSCognitoIdentityService.GetOpenIdToken",Lye="AWSCognitoIdentityService.GetCredentialsForIdentity";class Uye{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(kye,a),c=await dx((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(Dye,s),{response:a}=await this.fetchRequestHandler.handle(o);return this.validateOpenIdTokenResponse(await dx(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(Lye,s),{response:a}=await this.fetchRequestHandler.handle(o),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await dx(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 wi({method:Nye,headers:{"content-type":Mye,"x-amz-target":r},protocol:Pye,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 Bz{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 Uye({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()-Wve);return new Date>e}}class Fye extends Bz{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 Oye({fetchRequestHandler:new xb,region:r})}}class zye extends Bz{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 ps="com.amazon.rum",jye="com.amazonaws.rum",Kv=`${ps}.http_event`,Hz=`${ps}.xray_trace_event`,Bye=`${ps}.largest_contentful_paint_event`,Hye=`${ps}.first_input_delay_event`,$ye=`${ps}.cumulative_layout_shift_event`,qye=`${ps}.interaction_to_next_paint_event`,j_=`${ps}.performance_navigation_event`,$z=`${ps}.performance_resource_event`,Wye=`${ps}.dom_event`,Vye=`${ps}.js_error_event`,Gye=`${ps}.page_view_event`,B_=`${ps}.session_start_event`,cU=`${ps}.rrweb_event`;class Ms{constructor(e){this.enabled=!0,this.pluginId=Ms.generatePluginId(e)}static generatePluginId(e){return`${Ms.idPrefix}.${e}`}load(e){var n;this.context=e,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}Ms.idPrefix=jye;class Kye{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(Ms.generatePluginId(e))}}const dU=(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},Yye=(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},fU=t=>{const e=document.cookie.split("; ");for(const n of e){const r=n.split("=");if(r[0]===t)return r[1]}return""};var vh;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(vh||(vh={}));const Zye=()=>{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"}},vm="00000000-0000-0000-0000-000000000000",Xye="desktop",Qye="web";class Jye{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:vm,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===vm?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(B_,{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:vm}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||mh(),this.createOrRenewUserCookie(e,this.userExpiry)):this.userId=mh()}createOrRenewSessionCookie(e,n){btoa&&dU(this.sessionCookieName,btoa(JSON.stringify(e)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(e,n){dU(Gv,e,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return fU(Gv)}getSessionFromCookie(){if(this.useCookies()){const e=fU(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:mh(),record:this.session.sessionId===vm?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(B_,{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=Zye();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:Xye,platformType:Qye,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 ebe{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(Gye,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 Bh;(function(t){t.EVENT="event"})(Bh||(Bh={}));class qz{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 tbe="3.1.0",nbe=new Set(["pageId","parentPageId","interaction","pageTags","title"]),fx=(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")&&nbe.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 rbe{constructor(e,n,r=new qz){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!==B_&&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(Bh.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=fx(a,"event");let h={};if(this.eventMetadataHook)try{const y=Object.freeze(Object.assign({},c)),S=this.eventMetadataHook(s,o,y);S&&(h=fx(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:mh(),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 ebe(n,this.recordEvent),this.sessionManager=new Jye(e,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(fx(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":tbe})}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 ui;(function(t){t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.FRAME="frame",t.SCRIPT="script",t.CSS="css"})(ui||(ui={}));const hU=t=>[t.startTime,t.duration].join("#"),sbe=[{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"]}],pU=(t,e)=>{let n=Tn.OTHER;if(t){const r=t.substring(t.lastIndexOf("/")+1),s=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];sbe.forEach(o=>{o.list.indexOf(s)>-1&&(n=o.name)})}if(e&&n===Tn.OTHER)switch(e){case ui.IMAGE:case ui.IMG:case ui.INPUT:n=Tn.IMAGE;break;case ui.IFRAME:case ui.FRAME:n=Tn.DOCUMENT;break;case ui.SCRIPT:n=Tn.SCRIPT;break;case ui.CSS:n=Tn.STYLESHEET;break}return n},obe=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),ibe=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,abe=(t,e)=>{try{return new URL(t).hostname===e&&ibe.test(t)}catch{return!1}},Wz="dom-event",lbe={interactionId:()=>"",enableMutationObserver:!1,events:[]};class NR extends Ms{constructor(e){super(Wz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},lbe),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=NR.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(Wye,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 ube=t=>{const e=typeof t;return(e==="object"||e==="function")&&!!t},cbe=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},dbe=(t,e)=>{t.type!=="unhandledrejection"&&(t.type=e.toString()),t.message=e.toString()},fbe=(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)},Vz=t=>t!==Object(t)&&t!==void 0&&t!==null,MR=(t,e)=>{const n=cbe(t),r=t.error;return ube(r)?fbe(n,r,e):Vz(r)&&dbe(n,r),n},Gz="js-error",hbe={stackTraceLength:1e3,ignore:()=>!1};class pbe extends Ms{constructor(e){super(Gz),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({},hbe),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(Vye,MR(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 gbe=t=>t.entryType==="resource"&&(!/^https?:/.test(t.name)||/^(fetch|xmlhttprequest)$/.test(t.initiatorType)),PR={eventLimit:10,ignore:gbe,recordAllTypes:[Tn.DOCUMENT,Tn.SCRIPT,Tn.STYLESHEET,Tn.FONT],sampleTypes:[Tn.IMAGE,Tn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},mbe="navigation",cc="navigation",hx="load";class vbe extends Ms{constructor(e){super(mbe),this.eventListener=()=>{performance.getEntriesByType(cc).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(s=>s.entryType===cc).filter(s=>!this.config.ignore(s)).forEach(s=>{this.performanceNavigationEventHandlerTimingLevel2(s)})}).observe({entryTypes:[cc]})},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(j_,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(j_,s)},this.config=Object.assign(Object.assign({},PR),e)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(hx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(hx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(cc).length?!!window.performance.getEntriesByType(cc)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(cc).filter(e=>!this.config.ignore(e)).forEach(e=>this.performanceNavigationEventHandlerTimingLevel2(e)):window.addEventListener(hx,this.eventListener))}}var px,gU;function ybe(){if(gU)return px;gU=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,px=r,px}var Yv=ybe();const bbe=Ga(Yv),mU=C6({__proto__:null,default:bbe},[Yv]);class kR extends Ms{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(mU);for(const n of this.patches)e(n.nodule,n.name,n.wrapper())}unpatchAll(){const e=Yv.unwrap.bind(mU);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 Sbe="page-view";class Ebe extends kR{constructor(){super(Sbe),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 vh.PathAndHash:return e&&n?e+n:e||n||"";case vh.Hash:return n||"";case vh.Path:default:return e||""}}}const Cbe="resource",gx="resource";class wbe extends Ms{constructor(e){super(Cbe),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==gx||this.config.ignore(r))return;const{name:s,initiatorType:o}=r,a=pU(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(!abe(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:pU(n,s),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record($z,c)}},this.config=Object.assign(Object.assign({},PR),e),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:gx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:gx,buffered:!0})}}var H_,vU,_b=function(){var t=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(t&&t.responseStart>0&&t.responseStart<performance.now())return t},DR=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"},xbe=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:xbe(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},Kz=-1,_be=function(){return Kz},Sd=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Kz=e.timeStamp,t(e))}),!0)},LR=function(){var t=_b();return t&&t.activationStart||0},Oo=function(t,e){var n=_b(),r="navigate";return _be()>=0?r="back-forward-cache":n&&(document.prerendering||LR()>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}},hu=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{}},No=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))}},UR=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},pp=function(t){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&t()}))},Tb=function(t){var e=!1;return function(){e||(t(),e=!0)}},Oc=-1,yU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Zv=function(t){document.visibilityState==="hidden"&&Oc>-1&&(Oc=t.type==="visibilitychange"?t.timeStamp:0,Abe())},bU=function(){addEventListener("visibilitychange",Zv,!0),addEventListener("prerenderingchange",Zv,!0)},Abe=function(){removeEventListener("visibilitychange",Zv,!0),removeEventListener("prerenderingchange",Zv,!0)},FR=function(){return Oc<0&&(Oc=yU(),bU(),Sd((function(){setTimeout((function(){Oc=yU(),bU()}),0)}))),{get firstHiddenTime(){return Oc}}},Rb=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},SU=[1800,3e3],Tbe=function(t,e){e=e||{},Rb((function(){var n,r=FR(),s=Oo("FCP"),o=hu("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(s.value=Math.max(u.startTime-LR(),0),s.entries.push(u),n(!0)))}))}));o&&(n=No(t,s,SU,e.reportAllChanges),Sd((function(a){s=Oo("FCP"),n=No(t,s,SU,e.reportAllChanges),UR((function(){s.value=performance.now()-a.timeStamp,n(!0)}))})))}))},EU=[.1,.25],Rbe=function(t,e){(function(n,r){r=r||{},Tbe(Tb((function(){var s,o=Oo("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=hu("layout-shift",c);f&&(s=No(n,o,EU,r.reportAllChanges),pp((function(){c(f.takeRecords()),s(!0)})),Sd((function(){a=0,o=Oo("CLS",0),s=No(n,o,EU,r.reportAllChanges),UR((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:DR(u.startTime)})}}return Object.assign(s,{attribution:a})})(n);t(r)}),e)},Yz=0,mx=1/0,ym=0,Ibe=function(t){t.forEach((function(e){e.interactionId&&(mx=Math.min(mx,e.interactionId),ym=Math.max(ym,e.interactionId),Yz=ym?(ym-mx)/7+1:0)}))},Zz=function(){return H_?Yz:performance.interactionCount||0},Obe=function(){"interactionCount"in performance||H_||(H_=hu("event",Ibe,{type:"event",buffered:!0,durationThreshold:0}))},Gs=[],yh=new Map,Xz=0,Nbe=function(){var t=Math.min(Gs.length-1,Math.floor((Zz()-Xz)/50));return Gs[t]},Qz=[],Mbe=function(t){if(Qz.forEach((function(s){return s(t)})),t.interactionId||t.entryType==="first-input"){var e=Gs[Gs.length-1],n=yh.get(t.interactionId);if(n||Gs.length<10||t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0].startTime&&n.entries.push(t);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};yh.set(r.id,r),Gs.push(r)}Gs.sort((function(s,o){return o.latency-s.latency})),Gs.length>10&&Gs.splice(10).forEach((function(s){return yh.delete(s.id)}))}}},zR=function(t){var e=self.requestIdleCallback||self.setTimeout,n=-1;return t=Tb(t),document.visibilityState==="hidden"?t():(n=e(t),pp(t)),n},CU=[200,500],Pbe=function(t,e){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(e=e||{},Rb((function(){var n;Obe();var r,s=Oo("INP"),o=function(u){zR((function(){u.forEach(Mbe);var c=Nbe();c&&c.latency!==s.value&&(s.value=c.latency,s.entries=c.entries,r())}))},a=hu("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=No(t,s,CU,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),pp((function(){o(a.takeRecords()),r(!0)})),Sd((function(){Xz=Zz(),Gs.length=0,yh.clear(),s=Oo("INP"),r=No(t,s,CU,e.reportAllChanges)})))})))},zc=[],_a=[],$_=0,jR=new WeakMap,jc=new Map,q_=-1,kbe=function(t){zc=zc.concat(t),Jz()},Jz=function(){q_<0&&(q_=zR(Dbe))},Dbe=function(){jc.size>10&&jc.forEach((function(a,u){yh.has(u)||jc.delete(u)}));var t=Gs.map((function(a){return jR.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];tj(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>$_&&u>o||n.has(a)})),q_=-1};Qz.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;$_=Math.max($_,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")&&jR.set(t,e),Jz()}));var Aa,bh,ej,Xv,tj=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},Lbe=function(t,e){vU||(vU=hu("long-animation-frame",kbe)),Pbe((function(n){var r=(function(s){var o=s.entries[0],a=jR.get(o),u=o.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,w){return C.processingStart-w.processingStart})),h=tj(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:DR(o.startTime)};return Object.assign(s,{attribution:E})})(n);t(r)}),e)},wU=[2500,4e3],vx={},Ube=function(t,e){(function(n,r){r=r||{},Rb((function(){var s,o=FR(),a=Oo("LCP"),u=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(g){g.startTime<o.firstHiddenTime&&(a.value=Math.max(g.startTime-LR(),0),a.entries=[g],s())}))},c=hu("largest-contentful-paint",u);if(c){s=No(n,a,wU,r.reportAllChanges);var f=Tb((function(){vx[a.id]||(u(c.takeRecords()),c.disconnect(),vx[a.id]=!0,s(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return zR(f)}),{once:!0,capture:!0})})),pp(f),Sd((function(h){a=Oo("LCP"),s=No(n,a,wU,r.reportAllChanges),UR((function(){a.value=performance.now()-h.timeStamp,vx[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,xU=function(t,e){Aa||(Aa=e,bh=t,ej=new Date,rj(removeEventListener),nj())},nj=function(){if(bh>=0&&bh<ej-Fbe){var t={entryType:"first-input",name:Aa.type,target:Aa.target,cancelable:Aa.cancelable,startTime:Aa.timeStamp,processingStart:Aa.timeStamp+bh};Xv.forEach((function(e){e(t)})),Xv=[]}},zbe=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(){xU(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):xU(e,t)}},rj=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,zbe,ih)}))},_U=[100,300],jbe=function(t,e){e=e||{},Rb((function(){var n,r=FR(),s=Oo("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=hu("first-input",a);n=No(t,s,_U,e.reportAllChanges),u&&(pp(Tb((function(){a(u.takeRecords()),u.disconnect()}))),Sd((function(){var c;s=Oo("FID"),n=No(t,s,_U,e.reportAllChanges),Xv=[],bh=-1,Aa=null,rj(addEventListener),c=o,Xv.push(c),nj()})))}))},Bbe=function(t,e){jbe((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:DR(o.startTime)};return Object.assign(s,{attribution:a})})(n);t(r)}),e)};const Hbe="web-vitals";class $be extends Ms{constructor(e){super(Hbe),this.resourceEventIds=new Map,this.cacheLCPCandidates=obe(),this.handleEvent=n=>{switch(n.type){case $z:const r=n.details;this.cacheLCPCandidates&&r.fileType===Tn.IMAGE&&this.resourceEventIds.set(hU(n.details),n.id);break;case j_:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},PR),e)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Bh.EVENT,this.handleEvent),Ube(e=>this.handleLCP(e),{reportAllChanges:this.config.reportAllLCP}),Bbe(e=>this.handleFID(e)),Rbe(e=>this.handleCLS(e),{reportAllChanges:!0}),Lbe(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=hU(s?.lcpResourceEntry);o.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(o.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(Bye,{version:"1.0.0",value:e.value,attribution:o}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Bh.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)($ye,{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(Hye,{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)(qye,{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 qbe="fetch";class Wbe extends kR{constructor(e){super(qbe),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=Ic(),a=Dve(n,r,!0),u=Oz(this.config.logicalServiceName,o,this.context.config.enableW3CTraceId),c=Nz(Mz(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 Uve(n.headers,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(s,r)),Lve(r,o.trace_id,o.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,s)=>{if(n){const o=Ic();if(n.subsegments[0].end_time=o,n.end_time=o,r){n.subsegments[0].http.response={status:r.status},AR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):Rz(r.status)?(n.subsegments[0].error=!0,n.error=!0):_R(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):Vz(s)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],s.toString())),this.context.record(Hz,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=MR({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(!Iz(hv(o),this.config))return n.apply(r,s);const f=zve(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({},Tz),e)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(e){const n=hv(e);return Az(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 Vbe extends Error{constructor(e){super(e),this.name="XMLHttpRequest error"}}const Gbe="xhr";class Kbe extends kR{constructor(e){super(Gbe),this.addXRayTraceIdHeader=n=>Az(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=Ic();s.trace.end_time=o,s.trace.subsegments[0].end_time=o,s.trace.subsegments[0].http.response={status:r.status},AR(r.status)?(s.trace.subsegments[0].throttle=!0,s.trace.throttle=!0):Rz(r.status)?(s.trace.subsegments[0].error=!0,s.trace.error=!0):_R(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=Ic();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 Vbe(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=Ic();n.trace=Oz(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(Nz(Mz(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,RR(s.trace.trace_id,s.trace.subsegments[0].id)):this.setRequestHeader(Cb,TR(s.trace.trace_id,s.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(s,o,a){return Iz(o,n.config)&&n.xhrMap.set(this,{url:o,method:s,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},Tz),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=Ic();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:MR({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(Hz,e)}}var Qv={},Ybe=Object.defineProperty,Zbe=(t,e,n)=>e in t?Ybe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e,n)=>Zbe(t,typeof e!="symbol"?e+"":e,n),AU,Xbe=Object.defineProperty,Qbe=(t,e,n)=>e in t?Xbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TU=(t,e,n)=>Qbe(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 RU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},IU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bm={},Jbe=()=>!!globalThis.Zone;function BR(t){if(bm[t])return bm[t];const e=globalThis[t],n=e.prototype,r=t in RU?RU[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 IU?IU[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&&!Jbe())return bm[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?bm[t]=f:n}catch{return n}}const yx={};function Ni(t,e,n){var r;const s=`${t}.${String(n)}`;if(yx[s])return yx[s].call(e);const o=BR(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(yx[s]=a,a.call(e)):e[n]}const bx={};function sj(t,e,n){const r=`${t}.${String(n)}`;if(bx[r])return bx[r].bind(e);const o=BR(t)[n];return typeof o!="function"?e[n]:(bx[r]=o,o.bind(e))}function e0e(t){return Ni("Node",t,"ownerDocument")}function t0e(t){return Ni("Node",t,"childNodes")}function n0e(t){return Ni("Node",t,"parentNode")}function r0e(t){return Ni("Node",t,"parentElement")}function s0e(t){return Ni("Node",t,"textContent")}function o0e(t,e){return sj("Node",t,"contains")(e)}function i0e(t){return sj("Node",t,"getRootNode")()}function a0e(t){return!t||!("host"in t)?null:Ni("ShadowRoot",t,"host")}function l0e(t){return t.styleSheets}function u0e(t){return!t||!("shadowRoot"in t)?null:Ni("Element",t,"shadowRoot")}function c0e(t,e){return Ni("Element",t,"querySelector")(e)}function d0e(t,e){return Ni("Element",t,"querySelectorAll")(e)}function f0e(){return BR("MutationObserver").constructor}function h0e(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 fr={ownerDocument:e0e,childNodes:t0e,parentNode:n0e,parentElement:r0e,textContent:s0e,contains:o0e,getRootNode:i0e,host:a0e,styleSheets:l0e,shadowRoot:u0e,querySelector:c0e,querySelectorAll:d0e,mutationObserver:f0e,patch:h0e};function oj(t){return t.nodeType===t.ELEMENT_NODE}function Sh(t){const e=t&&"host"in t&&"mode"in t&&fr.host(t)||null;return!!(e&&"shadowRoot"in e&&fr.shadowRoot(e)===t)}function Eh(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function p0e(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 g0e(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 W_(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=>ij(s,n)).join("");return p0e(r)}catch{return null}}function ij(t,e){if(v0e(t)){let n;try{n=W_(t.styleSheet)||g0e(t)}catch{n=t.cssText}return t.styleSheet.href?ty(n,t.styleSheet.href):n}else{let n=t.cssText;return y0e(t)&&t.selectorText.includes(":")&&(n=m0e(n)),e?ty(n,e):n}}function m0e(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function v0e(t){return"styleSheet"in t}function y0e(t){return"selectorText"in t}class aj{constructor(){TU(this,"idNodeMap",new Map),TU(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 b0e(){return new aj}function Jv({element:t,maskInputOptions:e,tagName:n,type:r,value:s,maskInputFn:o}){let a=s||"";const u=r&&Ql(r);return(e[n.toLowerCase()]||u&&e[u])&&(o?a=o(a,t):a="*".repeat(a.length)),a}function Ql(t){return t.toLowerCase()}const OU="__rrweb_original__";function S0e(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=OU in o?o[OU]: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?Ql(e):null}function lj(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 E0e(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const C0e=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w0e=/^(?:[a-z+]+:)?\/\//i,x0e=/^www\..*/i,_0e=/^(data:)([^,]*),(.*)/i;function ty(t,e){return(t||"").replace(C0e,(n,r,s,o,a,u)=>{const c=s||a||u,f=r||o||"";if(!c)return n;if(w0e.test(c)||x0e.test(c))return`url(${f}${c}${f})`;if(_0e.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${E0e(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 Sm(t,e=!1){return e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function A0e(t,e,n=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&t&&typeof t=="string"){let a=Sm(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=Sm(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=Sm(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=Sm(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 A0e(t,e).join("/* rr_split */")}let R0e=1;const I0e=new RegExp("[^a-z0-9-_:]"),Hh=-2;function uj(){return R0e++}function O0e(t){if(t instanceof HTMLFormElement)return"form";const e=Ql(t.tagName);return I0e.test(e)?"div":e}let dc,NU;const N0e=/^[^ \t\n\r\u000c]+/,M0e=/^[, \t\n\r\u000c]+/;function P0e(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(M0e),!(n>=e.length);){let o=r(N0e);if(o.slice(-1)===",")o=Nc(t,o.substring(0,o.length-1)),s.push(o);else{let a="";o=Nc(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 MU=new WeakMap;function Nc(t,e){return!e||e.trim()===""?e:HR(t,e)}function k0e(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function HR(t,e){let n=MU.get(t);if(n||(n=t.createElement("a"),MU.set(t,n)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return n.setAttribute("href",e),n.href}function cj(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)?Nc(t,r):n==="srcset"?P0e(t,r):n==="style"?ty(r,HR(t)):e==="object"&&n==="data"?Nc(t,r):r)}function dj(t,e,n){return["video","audio"].includes(t)&&e==="autoplay"}function D0e(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(fr.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(fr.parentNode(t),e,n):!1}function fj(t,e,n,r){let s;if(oj(t)){if(s=t,!fr.childNodes(s).length)return!1}else{if(fr.parentElement(t)===null)return!1;s=fr.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 L0e(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 U0e(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=z0e(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 B0e(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 j0e(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:fr.textContent(t)||"",rootId:w};default:return!1}}function z0e(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return n===1?void 0:n}function j0e(t,e){const{needsMask:n,maskTextFn:r,rootId:s,cssCaptured:o}=e,a=fr.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=fr.textContent(t),f&&c&&(c=ty(c,HR(e.doc)))),!f&&!h&&c&&n&&(c=r?r(c,fr.parentElement(t)):c.replace(/[\S]/g,"*")),{type:kn.Text,textContent:c||"",rootId:s}}function B0e(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=D0e(t,r,s),E=O0e(t);let C={};const w=t.attributes.length;for(let _=0;_<w;_++){const R=t.attributes[_];dj(E,R.name,R.value)||(C[R.name]=cj(n,E,Ql(R.name),R.value))}if(E==="link"&&o){const _=Array.from(n.styleSheets).find(M=>M.href===t.href);let R=null;_&&(R=W_(_)),R&&(delete C.rel,delete C.href,C._cssText=R)}if(E==="style"&&t.sheet){let _=W_(t.sheet);_&&(t.childNodes.length>1&&(_=T0e(_,t)),C._cssText=_)}if(["input","textarea","select"].includes(E)){const _=t.value,R=t.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&_?C.value=Jv({element:t,type:ey(t),tagName:E,value:_,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")S0e(t)||(C.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const _=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);_!==M&&(C.rr_dataURL=_)}}if(E==="img"&&f){dc||(dc=n.createElement("canvas"),NU=dc.getContext("2d"));const _=t,R=_.currentSrc||_.getAttribute("src")||"<unknown-src>",M=_.crossOrigin,N=()=>{_.removeEventListener("load",N);try{dc.width=_.naturalWidth,dc.height=_.naturalHeight,NU.drawImage(_,0,0),C.rr_dataURL=dc.toDataURL(c.type,c.quality)}catch(O){if(_.crossOrigin!=="anonymous"){_.crossOrigin="anonymous",_.complete&&_.naturalWidth!==0?N():_.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${R}! Error: ${O}`)}_.crossOrigin==="anonymous"&&(M?C.crossOrigin=M:_.removeAttribute("crossorigin"))};_.complete&&_.naturalWidth!==0?N():_.addEventListener("load",N)}if(["audio","video"].includes(E)){const _=C;_.rr_mediaState=t.paused?"paused":"played",_.rr_mediaCurrentTime=t.currentTime,_.rr_mediaPlaybackRate=t.playbackRate,_.rr_mediaMuted=t.muted,_.rr_mediaLoop=t.loop,_.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop)),S){const{width:_,height:R}=t.getBoundingClientRect();C={class:C.class,rr_width:`${_}px`,rr_height:`${R}px`}}E==="iframe"&&!g(C.src)&&(t.contentDocument||(C.rr_src=C.src),delete C.src);let T;try{customElements.get(E)&&(T=!0)}catch{}return{type:kn.Element,tagName:E,attributes:C,childNodes:[],isSVG:k0e(t)||void 0,needBlock:S,rootId:y,isCustom:T}}function Vt(t){return t==null?"":t.toLowerCase()}function hj(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 H0e(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"&&lj(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 Mc(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:T,iframeLoadTimeout:_=5e3,onStylesheetLoad:R,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:O=!1,cssCaptured:k=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:$=!0}=e;F||(F=fj(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:O,cssCaptured:k});if(!D)return console.warn(t,"not serialized"),null;let z;r.hasNode(t)?z=r.getId(t):H0e(D,y)||!$&&D.type===kn.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?z=Hh:z=uj();const q=Object.assign(D,{id:z});if(r.add(t,q),z===Hh)return null;w&&w(t);let Y=!c;if(q.type===kn.Element){Y=Y&&!q.needBlock,delete q.needBlock;const H=fr.shadowRoot(t);H&&Eh(H)&&(q.isShadowHost=!0)}if((q.type===kn.Document||q.type===kn.Element)&&Y){y.headWhitespace&&q.type===kn.Element&&q.tagName==="head"&&($=!1);const H={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:$,onSerialize:w,onIframeLoad:T,iframeLoadTimeout:_,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"&&(H.cssCaptured=!0);for(const de of Array.from(fr.childNodes(t))){const ce=Mc(de,H);ce&&q.childNodes.push(ce)}}let ee=null;if(oj(t)&&(ee=fr.shadowRoot(t)))for(const de of Array.from(fr.childNodes(ee))){const ce=Mc(de,H);ce&&(Eh(ee)&&(ce.isShadow=!0),q.childNodes.push(ce))}}const te=fr.parentNode(t);return te&&Sh(te)&&Eh(te)&&(q.isShadow=!0),q.type===kn.Element&&q.tagName==="iframe"&&L0e(t,()=>{const H=t.contentDocument;if(H&&T){const ee=Mc(H,{doc:H,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:$,onSerialize:w,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});ee&&T(t,ee)}},_),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"&&lj(q.attributes.href)==="css")&&U0e(t,()=>{if(R){const H=Mc(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:$,onSerialize:w,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:N});H&&R(t,H)}},M),q}function $0e(t,e){const{mirror:n=new aj,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:T,onStylesheetLoad:_,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,O=hj(y);return Mc(t,{doc:t,mirror:n,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:N,maskTextFn:g,maskInputFn:m,slimDOMOptions:O,dataURLOptions:S,inlineImages:c,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:T,onStylesheetLoad:_,stylesheetLoadTimeout:R,keepIframeSrcFn:M,newlyAddedElement:!1})}function q0e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function W0e(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 $R={exports:{}},Xt=String,pj=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}};$R.exports=pj();$R.exports.createColors=pj;var V0e=$R.exports;const G0e={},K0e=Object.freeze(Object.defineProperty({__proto__:null,default:G0e},Symbol.toStringTag,{value:"Module"})),eo=W0e(K0e);let PU=V0e,kU=eo,V_=class gj 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,gj)}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=PU.isColorSupported),kU&&e&&(n=kU(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}=PU.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 qR=V_;V_.default=V_;var gp={};gp.isClean=Symbol("isClean");gp.my=Symbol("my");const DU={after:`
248
- `,beforeClose:`
249
- `,beforeComment:`
250
- `,beforeDecl:`
251
- `,beforeOpen:" ",beforeRule:`
252
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Y0e(t){return t[0].toUpperCase()+t.slice(1)}let G_=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 DU[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"+Y0e(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=DU[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 mj=G_;G_.default=G_;let Z0e=mj;function K_(t,e){new Z0e(e).stringify(t)}var Ib=K_;K_.default=K_;let{isClean:Em,my:X0e}=gp,Q0e=qR,J0e=mj,e1e=Ib;function Y_(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=>Y_(a,n)):(o==="object"&&s!==null&&(s=Y_(s)),n[r]=s)}return n}let Z_=class{constructor(e={}){this.raws={},this[Em]=!1,this[X0e]=!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=Y_(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 Q0e(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[Em]){this[Em]=!1;let e=this;for(;e=e.parent;)e[Em]=!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 J0e().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=e1e){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=Z_;Z_.default=Z_;let t1e=Ob,X_=class extends t1e{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=X_;X_.default=X_;let n1e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",r1e=(t=21)=>{let e="",n=t;for(;n--;)e+=n1e[Math.random()*64|0];return e};var s1e={nanoid:r1e};let{SourceMapConsumer:LU,SourceMapGenerator:UU}=eo,{existsSync:o1e,readFileSync:i1e}=eo,{dirname:Sx,join:a1e}=eo;function l1e(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Q_=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=Sx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new LU(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 l1e(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=Sx(e),o1e(e))return this.mapFile=e,i1e(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 LU)return UU.fromSourceMap(n).toString();if(n instanceof UU)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=a1e(Sx(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 vj=Q_;Q_.default=Q_;let{SourceMapConsumer:u1e,SourceMapGenerator:c1e}=eo,{fileURLToPath:FU,pathToFileURL:Cm}=eo,{isAbsolute:J_,resolve:eA}=eo,{nanoid:d1e}=s1e,Ex=eo,zU=qR,f1e=vj,Cx=Symbol("fromOffsetCache"),h1e=!!(u1e&&c1e),jU=!!(eA&&J_),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&&(!jU||/^\w+:\/\//.test(n.from)||J_(n.from)?this.file=n.from:this.file=eA(n.from)),jU&&h1e){let r=new f1e(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 "+d1e(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 zU(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 zU(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&&(Cm&&(o.input.url=Cm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[Cx])r=this[Cx];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[Cx]=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:eA(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;J_(a.source)?c=Cm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Cm(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(FU)f.file=FU(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;Ex&&Ex.registerInput&&Ex.registerInput(ry);let{SourceMapConsumer:yj,SourceMapGenerator:pv}=eo,{dirname:gv,relative:bj,resolve:Sj,sep:Ej}=eo,{pathToFileURL:BU}=eo,p1e=Mb,g1e=!!(yj&&pv),m1e=!!(gv&&Sj&&bj&&Ej),v1e=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 yj(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(),m1e&&g1e&&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(Sj(r,this.mapOpts.annotation)));let s=bj(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 p1e(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(BU){let r=BU(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;Ej==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Cj=v1e;let y1e=Ob,tA=class extends y1e{constructor(e){super(e),this.type="comment"}};var Pb=tA;tA.default=tA;let{isClean:wj,my:xj}=gp,_j=Nb,Aj=Pb,b1e=Ob,Tj,WR,VR,Rj;function Ij(t){return t.map(e=>(e.nodes&&(e.nodes=Ij(e.nodes)),delete e.source,e))}function Oj(t){if(t[wj]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)Oj(e)}let xi=class Nj extends b1e{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=Ij(Tj(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 _j(e)]}else if(e.selector)e=[new WR(e)];else if(e.name)e=[new VR(e)];else if(e.text)e=[new Aj(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[xj]||Nj.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[wj]&&Oj(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=>{Tj=t};xi.registerRule=t=>{WR=t};xi.registerAtRule=t=>{VR=t};xi.registerRoot=t=>{Rj=t};var pu=xi;xi.default=xi;xi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,VR.prototype):t.type==="rule"?Object.setPrototypeOf(t,WR.prototype):t.type==="decl"?Object.setPrototypeOf(t,_j.prototype):t.type==="comment"?Object.setPrototypeOf(t,Aj.prototype):t.type==="root"&&Object.setPrototypeOf(t,Rj.prototype),t[xj]=!0,t.nodes&&t.nodes.forEach(e=>{xi.rebuild(e)})};let S1e=pu,Mj,Pj,$h=class extends S1e{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Mj(new Pj,this,e).stringify()}};$h.registerLazyResult=t=>{Mj=t};$h.registerProcessor=t=>{Pj=t};var GR=$h;$h.default=$h;let nA=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 kj=nA;nA.default=nA;let E1e=kj,rA=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 E1e(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var KR=rA;rA.default=rA;const wx=39,HU=34,wm=92,$U=47,xm=10,$f=32,_m=12,Am=9,Tm=13,C1e=91,w1e=93,x1e=40,_1e=41,A1e=123,T1e=125,R1e=59,I1e=42,O1e=58,N1e=64,Rm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Im=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,M1e=/.[\r\n"'(/\\]/,qU=/[\da-f]/i;var P1e=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=[],T=[];function _(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return T.length===0&&C>=E}function N(k){if(T.length)return T.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case xm:case $f:case Am:case Tm:case _m:{a=C;do a+=1,o=r.charCodeAt(a);while(o===$f||o===xm||o===Am||o===Tm||o===_m);S=["space",r.slice(C,a)],C=a-1;break}case C1e:case w1e:case A1e:case T1e:case O1e:case R1e:case _1e:{let $=String.fromCharCode(o);S=[$,$,C];break}case x1e:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==wx&&y!==HU&&y!==$f&&y!==xm&&y!==Am&&y!==_m&&y!==Tm){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)===wm;)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||M1e.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case wx:case HU:{u=o===wx?"'":'"',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)===wm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case N1e:{Rm.lastIndex=C+1,Rm.test(r),Rm.lastIndex===0?a=r.length-1:a=Rm.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case wm:{for(a=C,f=!0;r.charCodeAt(a+1)===wm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==$U&&o!==$f&&o!==xm&&o!==Am&&o!==Tm&&o!==_m&&(a+=1,qU.test(r.charAt(a)))){for(;qU.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===$U&&r.charCodeAt(C+1)===I1e?(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):(Im.lastIndex=C+1,Im.test(r),Im.lastIndex===0?a=r.length-1:a=Im.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function O(k){T.push(k)}return{back:O,endOfFile:M,nextToken:N,position:_}};let Dj=pu,sy=class extends Dj{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 YR=sy;sy.default=sy;Dj.registerAtRule(sy);let Lj=pu,Uj,Fj,Kc=class extends Lj{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 Uj(new Fj,this,e).stringify()}};Kc.registerLazyResult=t=>{Uj=t};Kc.registerProcessor=t=>{Fj=t};var mp=Kc;Kc.default=Kc;Lj.registerRoot(Kc);let qh={comma(t){return qh.split(t,[","],!0)},space(t){let e=[" ",`
265
- `," "];return qh.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 zj=qh;qh.default=qh;let jj=pu,k1e=zj,oy=class extends jj{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return k1e.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 ZR=oy;oy.default=oy;jj.registerRule(oy);let D1e=Nb,L1e=P1e,U1e=Pb,F1e=YR,z1e=mp,WU=ZR;const VU={empty:!0,space:!0};function j1e(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let B1e=class{constructor(e){this.input=e,this.root=new z1e,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 U1e;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=L1e(this.input)}decl(e,n){let r=new D1e;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]||j1e(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 WU;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",!VU[g]&&!VU[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 WU;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 H1e=B1e;let $1e=pu,q1e=H1e,W1e=Mb;function iy(t,e){let n=new W1e(t,e),r=new q1e(n);try{r.parse()}catch(s){throw s}return r.root}var XR=iy;iy.default=iy;$1e.registerParse(iy);let{isClean:yo,my:V1e}=gp,G1e=Cj,K1e=Ib,Y1e=pu,Z1e=GR,GU=KR,X1e=XR,Q1e=mp;const J1e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},eSe={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},tSe={Once:!0,postcssPlugin:!0,prepare:!0},Yc=0;function qf(t){return typeof t=="object"&&typeof t.then=="function"}function Bj(t){let e=!1,n=J1e[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 KU(t){let e;return t.type==="document"?e=["Document",Yc,"DocumentExit"]:t.type==="root"?e=["Root",Yc,"RootExit"]:e=Bj(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function sA(t){return t[yo]=!1,t.nodes&&t.nodes.forEach(e=>sA(e)),t}let oA={},Zc=class Hj{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=sA(n);else if(n instanceof Hj||n instanceof GU)s=sA(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=X1e;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[V1e]&&Y1e.rebuild(s)}this.result=new GU(e,s,r),this.helpers={...oA,postcss:oA,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(!eSe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tSe[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[yo];){e[yo]=!0;let n=[KU(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=K1e;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new G1e(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[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(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[yo]){u[yo]=!0,e.push(KU(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[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=Bj(e);for(let r of n)if(r===Yc)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"}};Zc.registerPostcss=t=>{oA=t};var $j=Zc;Zc.default=Zc;Q1e.registerLazyResult(Zc);Z1e.registerLazyResult(Zc);let nSe=Cj,rSe=Ib,sSe=XR;const oSe=KR;let iA=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=rSe;this.result=new oSe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new nSe(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=sSe;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 iSe=iA;iA.default=iA;let aSe=iSe,lSe=$j,uSe=GR,cSe=mp,Wh=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 aSe(this,e,n):new lSe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var dSe=Wh;Wh.default=Wh;cSe.registerProcessor(Wh);uSe.registerProcessor(Wh);let fSe=Nb,hSe=vj,pSe=Pb,gSe=YR,mSe=Mb,vSe=mp,ySe=ZR;function Vh(t,e){if(Array.isArray(t))return t.map(s=>Vh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:mSe.prototype};o.map&&(o.map={...o.map,__proto__:hSe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Vh(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 vSe(r);if(r.type==="decl")return new fSe(r);if(r.type==="rule")return new ySe(r);if(r.type==="comment")return new pSe(r);if(r.type==="atrule")return new gSe(r);throw new Error("Unknown node type: "+t.type)}var bSe=Vh;Vh.default=Vh;let SSe=qR,qj=Nb,ESe=$j,CSe=pu,QR=dSe,wSe=Ib,xSe=bSe,Wj=GR,_Se=kj,Vj=Pb,Gj=YR,ASe=KR,TSe=Mb,RSe=XR,ISe=zj,Kj=ZR,Yj=mp,OSe=Ob;function Lt(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new QR(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 QR().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=wSe;Lt.parse=RSe;Lt.fromJSON=xSe;Lt.list=ISe;Lt.comment=t=>new Vj(t);Lt.atRule=t=>new Gj(t);Lt.decl=t=>new qj(t);Lt.rule=t=>new Kj(t);Lt.root=t=>new Yj(t);Lt.document=t=>new Wj(t);Lt.CssSyntaxError=SSe;Lt.Declaration=qj;Lt.Container=CSe;Lt.Processor=QR;Lt.Document=Wj;Lt.Comment=Vj;Lt.Warning=_Se;Lt.AtRule=Gj;Lt.Result=ASe;Lt.Input=TSe;Lt.Rule=Kj;Lt.Root=Yj;Lt.Node=OSe;ESe.registerPostcss(Lt);var NSe=Lt;Lt.default=Lt;const an=q0e(NSe);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;var MSe=Object.defineProperty,PSe=(t,e,n)=>e in t?MSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xs=(t,e,n)=>PSe(t,typeof e!="symbol"?e+"":e,n);function kSe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function DSe(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:{}},Qt=String,Zj=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}};JR.exports=Zj();JR.exports.createColors=Zj;var LSe=JR.exports;const USe={},FSe=Object.freeze(Object.defineProperty({__proto__:null,default:USe},Symbol.toStringTag,{value:"Module"})),to=DSe(FSe);let YU=LSe,ZU=to,aA=class Xj 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,Xj)}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=YU.isColorSupported),ZU&&e&&(n=ZU(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}=YU.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 eI=aA;aA.default=aA;var vp={};vp.isClean=Symbol("isClean");vp.my=Symbol("my");const XU={after:`
273
- `,beforeClose:`
274
- `,beforeComment:`
275
- `,beforeDecl:`
276
- `,beforeOpen:" ",beforeRule:`
277
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function zSe(t){return t[0].toUpperCase()+t.slice(1)}let lA=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 XU[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"+zSe(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=XU[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 Qj=lA;lA.default=lA;let jSe=Qj;function uA(t,e){new jSe(e).stringify(t)}var kb=uA;uA.default=uA;let{isClean:Om,my:BSe}=vp,HSe=eI,$Se=Qj,qSe=kb;function cA(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=>cA(a,n)):(o==="object"&&s!==null&&(s=cA(s)),n[r]=s)}return n}let dA=class{constructor(e={}){this.raws={},this[Om]=!1,this[BSe]=!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=cA(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 HSe(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[Om]){this[Om]=!1;let e=this;for(;e=e.parent;)e[Om]=!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 $Se().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=qSe){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=dA;dA.default=dA;let WSe=Db,fA=class extends WSe{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=fA;fA.default=fA;let VSe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",GSe=(t=21)=>{let e="",n=t;for(;n--;)e+=VSe[Math.random()*64|0];return e};var KSe={nanoid:GSe};let{SourceMapConsumer:QU,SourceMapGenerator:JU}=to,{existsSync:YSe,readFileSync:ZSe}=to,{dirname:xx,join:XSe}=to;function QSe(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let hA=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=xx(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new QU(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 QSe(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=xx(e),YSe(e))return this.mapFile=e,ZSe(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 QU)return JU.fromSourceMap(n).toString();if(n instanceof JU)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=XSe(xx(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 Jj=hA;hA.default=hA;let{SourceMapConsumer:JSe,SourceMapGenerator:eEe}=to,{fileURLToPath:e5,pathToFileURL:Nm}=to,{isAbsolute:pA,resolve:gA}=to,{nanoid:tEe}=KSe,_x=to,t5=eI,nEe=Jj,Ax=Symbol("fromOffsetCache"),rEe=!!(JSe&&eEe),n5=!!(gA&&pA),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&&(!n5||/^\w+:\/\//.test(n.from)||pA(n.from)?this.file=n.from:this.file=gA(n.from)),n5&&rEe){let r=new nEe(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 "+tEe(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 t5(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 t5(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&&(Nm&&(o.input.url=Nm(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let n,r;if(this[Ax])r=this[Ax];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[Ax]=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:gA(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;pA(a.source)?c=Nm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Nm(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(e5)f.file=e5(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;_x&&_x.registerInput&&_x.registerInput(ay);let{SourceMapConsumer:eB,SourceMapGenerator:mv}=to,{dirname:vv,relative:tB,resolve:nB,sep:rB}=to,{pathToFileURL:r5}=to,sEe=Ub,oEe=!!(eB&&mv),iEe=!!(vv&&nB&&tB&&rB),aEe=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 eB(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(),iEe&&oEe&&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(nB(r,this.mapOpts.annotation)));let s=tB(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 sEe(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(r5){let r=r5(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;rB==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var sB=aEe;let lEe=Db,mA=class extends lEe{constructor(e){super(e),this.type="comment"}};var Fb=mA;mA.default=mA;let{isClean:oB,my:iB}=vp,aB=Lb,lB=Fb,uEe=Db,uB,tI,nI,cB;function dB(t){return t.map(e=>(e.nodes&&(e.nodes=dB(e.nodes)),delete e.source,e))}function fB(t){if(t[oB]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)fB(e)}let _i=class hB extends uEe{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=dB(uB(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 aB(e)]}else if(e.selector)e=[new tI(e)];else if(e.name)e=[new nI(e)];else if(e.text)e=[new lB(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[iB]||hB.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[oB]&&fB(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]}};_i.registerParse=t=>{uB=t};_i.registerRule=t=>{tI=t};_i.registerAtRule=t=>{nI=t};_i.registerRoot=t=>{cB=t};var gu=_i;_i.default=_i;_i.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,nI.prototype):t.type==="rule"?Object.setPrototypeOf(t,tI.prototype):t.type==="decl"?Object.setPrototypeOf(t,aB.prototype):t.type==="comment"?Object.setPrototypeOf(t,lB.prototype):t.type==="root"&&Object.setPrototypeOf(t,cB.prototype),t[iB]=!0,t.nodes&&t.nodes.forEach(e=>{_i.rebuild(e)})};let cEe=gu,pB,gB,Gh=class extends cEe{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new pB(new gB,this,e).stringify()}};Gh.registerLazyResult=t=>{pB=t};Gh.registerProcessor=t=>{gB=t};var rI=Gh;Gh.default=Gh;let vA=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 mB=vA;vA.default=vA;let dEe=mB,yA=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 dEe(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var sI=yA;yA.default=yA;const Tx=39,s5=34,Mm=92,o5=47,Pm=10,Wf=32,km=12,Dm=9,Lm=13,fEe=91,hEe=93,pEe=40,gEe=41,mEe=123,vEe=125,yEe=59,bEe=42,SEe=58,EEe=64,Um=/[\t\n\f\r "#'()/;[\\\]{}]/g,Fm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,CEe=/.[\r\n"'(/\\]/,i5=/[\da-f]/i;var wEe=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=[],T=[];function _(){return C}function R(k){throw e.error("Unclosed "+k,C)}function M(){return T.length===0&&C>=E}function N(k){if(T.length)return T.pop();if(C>=E)return;let F=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(C),o){case Pm:case Wf:case Dm:case Lm:case km:{a=C;do a+=1,o=r.charCodeAt(a);while(o===Wf||o===Pm||o===Dm||o===Lm||o===km);S=["space",r.slice(C,a)],C=a-1;break}case fEe:case hEe:case mEe:case vEe:case SEe:case yEe:case gEe:{let $=String.fromCharCode(o);S=[$,$,C];break}case pEe:{if(m=w.length?w.pop()[1]:"",y=r.charCodeAt(C+1),m==="url"&&y!==Tx&&y!==s5&&y!==Wf&&y!==Pm&&y!==Dm&&y!==km&&y!==Lm){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)===Mm;)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||CEe.test(c)?S=["(","(",C]:(S=["brackets",c,C,a],C=a);break}case Tx:case s5:{u=o===Tx?"'":'"',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)===Mm;)g-=1,h=!h}while(h);S=["string",r.slice(C,a+1),C,a],C=a;break}case EEe:{Um.lastIndex=C+1,Um.test(r),Um.lastIndex===0?a=r.length-1:a=Um.lastIndex-2,S=["at-word",r.slice(C,a+1),C,a],C=a;break}case Mm:{for(a=C,f=!0;r.charCodeAt(a+1)===Mm;)a+=1,f=!f;if(o=r.charCodeAt(a+1),f&&o!==o5&&o!==Wf&&o!==Pm&&o!==Dm&&o!==Lm&&o!==km&&(a+=1,i5.test(r.charAt(a)))){for(;i5.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===o5&&r.charCodeAt(C+1)===bEe?(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):(Fm.lastIndex=C+1,Fm.test(r),Fm.lastIndex===0?a=r.length-1:a=Fm.lastIndex-2,S=["word",r.slice(C,a+1),C,a],w.push(S),C=a);break}}return C++,S}function O(k){T.push(k)}return{back:O,endOfFile:M,nextToken:N,position:_}};let vB=gu,ly=class extends vB{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 oI=ly;ly.default=ly;vB.registerAtRule(ly);let yB=gu,bB,SB,Xc=class extends yB{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 bB(new SB,this,e).stringify()}};Xc.registerLazyResult=t=>{bB=t};Xc.registerProcessor=t=>{SB=t};var yp=Xc;Xc.default=Xc;yB.registerRoot(Xc);let Kh={comma(t){return Kh.split(t,[","],!0)},space(t){let e=[" ",`
290
- `," "];return Kh.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 EB=Kh;Kh.default=Kh;let CB=gu,xEe=EB,uy=class extends CB{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return xEe.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 iI=uy;uy.default=uy;CB.registerRule(uy);let _Ee=Lb,AEe=wEe,TEe=Fb,REe=oI,IEe=yp,a5=iI;const l5={empty:!0,space:!0};function OEe(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}let NEe=class{constructor(e){this.input=e,this.root=new IEe,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 REe;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=AEe(this.input)}decl(e,n){let r=new _Ee;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]||OEe(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 a5;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",!l5[g]&&!l5[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 a5;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 MEe=NEe;let PEe=gu,kEe=MEe,DEe=Ub;function cy(t,e){let n=new DEe(t,e),r=new kEe(n);try{r.parse()}catch(s){throw s}return r.root}var aI=cy;cy.default=cy;PEe.registerParse(cy);let{isClean:bo,my:LEe}=vp,UEe=sB,FEe=kb,zEe=gu,jEe=rI,u5=sI,BEe=aI,HEe=yp;const $Ee={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},qEe={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},WEe={Once:!0,postcssPlugin:!0,prepare:!0},Qc=0;function Vf(t){return typeof t=="object"&&typeof t.then=="function"}function wB(t){let e=!1,n=$Ee[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 c5(t){let e;return t.type==="document"?e=["Document",Qc,"DocumentExit"]:t.type==="root"?e=["Root",Qc,"RootExit"]:e=wB(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function bA(t){return t[bo]=!1,t.nodes&&t.nodes.forEach(e=>bA(e)),t}let SA={},Jc=class xB{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=bA(n);else if(n instanceof xB||n instanceof u5)s=bA(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=BEe;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[LEe]&&zEe.rebuild(s)}this.result=new u5(e,s,r),this.helpers={...SA,postcss:SA,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(!qEe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!WEe[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[bo];){e[bo]=!0;let n=[c5(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 UEe(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[bo];)e[bo]=!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[bo]){u[bo]=!0,e.push(c5(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[bo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[bo]=!0;let n=wB(e);for(let r of n)if(r===Qc)e.nodes&&e.each(s=>{s[bo]||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=>{SA=t};var _B=Jc;Jc.default=Jc;HEe.registerLazyResult(Jc);jEe.registerLazyResult(Jc);let VEe=sB,GEe=kb,KEe=aI;const YEe=sI;let EA=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=GEe;this.result=new YEe(this._processor,s,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new VEe(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=KEe;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 ZEe=EA;EA.default=EA;let XEe=ZEe,QEe=_B,JEe=rI,eCe=yp,Yh=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 XEe(this,e,n):new QEe(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var tCe=Yh;Yh.default=Yh;eCe.registerProcessor(Yh);JEe.registerProcessor(Yh);let nCe=Lb,rCe=Jj,sCe=Fb,oCe=oI,iCe=Ub,aCe=yp,lCe=iI;function Zh(t,e){if(Array.isArray(t))return t.map(s=>Zh(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let o={...s,__proto__:iCe.prototype};o.map&&(o.map={...o.map,__proto__:rCe.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>Zh(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 aCe(r);if(r.type==="decl")return new nCe(r);if(r.type==="rule")return new lCe(r);if(r.type==="comment")return new sCe(r);if(r.type==="atrule")return new oCe(r);throw new Error("Unknown node type: "+t.type)}var uCe=Zh;Zh.default=Zh;let cCe=eI,AB=Lb,dCe=_B,fCe=gu,lI=tCe,hCe=kb,pCe=uCe,TB=rI,gCe=mB,RB=Fb,IB=oI,mCe=sI,vCe=Ub,yCe=aI,bCe=EB,OB=iI,NB=yp,SCe=Db;function Ut(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new lI(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 lI().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=hCe;Ut.parse=yCe;Ut.fromJSON=pCe;Ut.list=bCe;Ut.comment=t=>new RB(t);Ut.atRule=t=>new IB(t);Ut.decl=t=>new AB(t);Ut.rule=t=>new OB(t);Ut.root=t=>new NB(t);Ut.document=t=>new TB(t);Ut.CssSyntaxError=cCe;Ut.Declaration=AB;Ut.Container=fCe;Ut.Processor=lI;Ut.Document=TB;Ut.Comment=RB;Ut.Warning=gCe;Ut.AtRule=IB;Ut.Result=mCe;Ut.Input=vCe;Ut.Rule=OB;Ut.Root=NB;Ut.Node=SCe;dCe.registerPostcss(Ut);var ECe=Ut;Ut.default=Ut;const ln=kSe(ECe);ln.stringify;ln.fromJSON;ln.plugin;ln.parse;ln.list;ln.document;ln.comment;ln.atRule;ln.rule;ln.decl;ln.root;ln.CssSyntaxError;ln.Declaration;ln.Container;ln.Processor;ln.Document;ln.Comment;ln.Warning;ln.AtRule;ln.Result;ln.Input;ln.Rule;ln.Root;ln.Node;class uI{constructor(...e){xs(this,"parentElement",null),xs(this,"parentNode",null),xs(this,"ownerDocument"),xs(this,"firstChild",null),xs(this,"lastChild",null),xs(this,"previousSibling",null),xs(this,"nextSibling",null),xs(this,"ELEMENT_NODE",1),xs(this,"TEXT_NODE",3),xs(this,"nodeType"),xs(this,"nodeName"),xs(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 uI){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 d5={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},f5={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zm={},CCe=()=>!!globalThis.Zone;function cI(t){if(zm[t])return zm[t];const e=globalThis[t],n=e.prototype,r=t in d5?d5[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 f5?f5[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&&!CCe())return zm[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?zm[t]=f:n}catch{return n}}const Rx={};function Mi(t,e,n){var r;const s=`${t}.${String(n)}`;if(Rx[s])return Rx[s].call(e);const o=cI(t),a=(r=Object.getOwnPropertyDescriptor(o,n))==null?void 0:r.get;return a?(Rx[s]=a,a.call(e)):e[n]}const Ix={};function MB(t,e,n){const r=`${t}.${String(n)}`;if(Ix[r])return Ix[r].bind(e);const o=cI(t)[n];return typeof o!="function"?e[n]:(Ix[r]=o,o.bind(e))}function wCe(t){return Mi("Node",t,"ownerDocument")}function xCe(t){return Mi("Node",t,"childNodes")}function _Ce(t){return Mi("Node",t,"parentNode")}function ACe(t){return Mi("Node",t,"parentElement")}function TCe(t){return Mi("Node",t,"textContent")}function RCe(t,e){return MB("Node",t,"contains")(e)}function ICe(t){return MB("Node",t,"getRootNode")()}function OCe(t){return!t||!("host"in t)?null:Mi("ShadowRoot",t,"host")}function NCe(t){return t.styleSheets}function MCe(t){return!t||!("shadowRoot"in t)?null:Mi("Element",t,"shadowRoot")}function PCe(t,e){return Mi("Element",t,"querySelector")(e)}function kCe(t,e){return Mi("Element",t,"querySelectorAll")(e)}function PB(){return cI("MutationObserver").constructor}function mu(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:wCe,childNodes:xCe,parentNode:_Ce,parentElement:ACe,textContent:TCe,contains:RCe,getRootNode:ICe,host:OCe,styleSheets:NCe,shadowRoot:MCe,querySelector:PCe,querySelectorAll:kCe,mutationObserver:PB,patch:mu};function Cr(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const Cc=`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 h5={map:{},getId(){return console.error(Cc),-1},getNode(){return console.error(Cc),null},removeNodeFromMap(){console.error(Cc)},has(){return console.error(Cc),!1},reset(){console.error(Cc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(h5=new Proxy(h5,{get(t,e,n){return e==="map"&&console.error(Cc),Reflect.get(t,e,n)}}));function Xh(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 kB(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 DB(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function LB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function UB(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=UB(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 DCe(t,e){return e.getId(t)!==-1}function Ox(t,e,n){return t.tagName==="TITLE"&&n.headTitleMutations?!0:e.getId(t)===Hh}function FB(t,e){if(Sh(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?FB(r,e):!0}function CA(t){return!!t.changedTouches}function LCe(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 zB(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function jB(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function wA(t){return t?t instanceof uI&&"shadowRoot"in t?!!t.shadowRoot:!!rt.shadowRoot(t):!1}class UCe{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 BB(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=BB(e);)e=n;return e}function zCe(t){const e=rt.ownerDocument(t);if(!e)return!1;const n=FCe(t);return rt.contains(e,n)}function HB(t){const e=rt.ownerDocument(t);return e?rt.contains(e,t)||zCe(t):!1}var wt=(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))(wt||{}),ht=(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))(ht||{}),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||{}),ii=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(ii||{}),ed=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ed||{}),wc=(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))(wc||{}),$B=(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))($B||{});function p5(t){return"__ln"in t}class jCe{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&&p5(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&&p5(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 g5=(t,e)=>`${t}@${e}`;class BCe{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 jCe,s=c=>{let f=c,h=Hh;for(;h===Hh;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},o=c=>{const f=rt.parentNode(c);if(!f||!HB(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=Sh(f)?this.mirror.getId(BB(c)):this.mirror.getId(f),m=s(c);if(g===-1||m===-1)return r.addNode(c);const y=Mc(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=>{zB(S,this.mirror)&&this.iframeManager.addIframe(S),jB(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),wA(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)m5(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(rt.parentNode(c))||o(c);for(const c of this.addedSet)!v5(this.droppedSet,c)&&!m5(this.removesSubTreeCache,c,this.mirror)||v5(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(!Ox(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:fj(e.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,UB(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"),!dj(n.tagName,r))if(o.attributes[r]=cj(this.doc,Ql(n.tagName),Ql(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=Sh(e.target)?this.mirror.getId(rt.host(e.target)):this.mirror.getId(e.target);wr(e.target,this.blockClass,this.blockSelector,!1)||Ox(n,this.mirror,this.slimDOMOptions)||!DCe(n,this.mirror)||(this.addedSet.has(n)?(xA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||FB(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[g5(r,s)]?xA(this.movedSet,n):(this.removes.push({parentId:s,id:r,isShadow:Sh(e.target)&&Eh(e.target)?!0:void 0}),HCe(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(Ox(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[g5(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)),wA(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 xA(t,e){t.delete(e),rt.childNodes(e).forEach(n=>xA(t,n))}function HCe(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 m5(t,e,n){return t.size===0?!1:$Ce(t,e)}function $Ce(t,e,n){const r=rt.parentNode(e);return r?t.has(r):!1}function v5(t,e){return t.size===0?!1:qB(t,e)}function qB(t,e){const n=rt.parentNode(e);return n?t.has(n)?!0:qB(t,n):!1}let Ch;function qCe(t){Ch=t}function WCe(){Ch=void 0}const yt=t=>Ch?(...n)=>{try{return t(...n)}catch(r){if(Ch&&Ch(r)===!0)return;throw r}}:t,Nl=[];function bp(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 WB(t,e){const n=new BCe;Nl.push(n),n.init(t);const r=new(PB())(yt(n.processMutations.bind(n)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function VCe({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=Xh(yt(g=>{const m=Date.now()-u;t(a.map(y=>(y.timeOffset-=m,y)),g),a=[],u=null}),o),f=yt(Xh(yt(g=>{const m=bp(g),{clientX:y,clientY:S}=CA(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?ht.Drag:g instanceof MouseEvent?ht.MouseMove:ht.TouchMove)}),s,{trailing:!1})),h=[Cr("mousemove",f,n),Cr("touchmove",f,n),Cr("drag",f,n)];return yt(()=>{h.forEach(g=>g())})}function GCe({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=bp(g);if(wr(m,r,s,!0))return;let y=null,S=h;if("pointerType"in g){switch(g.pointerType){case"mouse":y=ii.Mouse;break;case"touch":y=ii.Touch;break;case"pen":y=ii.Pen;break}y===ii.Touch?Ur[h]===Ur.MouseDown?S="TouchStart":Ur[h]===Ur.MouseUp&&(S="TouchEnd"):ii.Pen}else CA(g)&&(y=ii.Touch);y!==null?(c=y,(S.startsWith("Touch")&&y===ii.Touch||S.startsWith("Mouse")&&y===ii.Mouse)&&(y=null)):Ur[h]===Ur.Click&&(y=c,c=null);const E=CA(g)?g.changedTouches[0]:g;if(!E)return;const C=n.getId(m),{clientX:w,clientY:T}=E;yt(t)({type:Ur[S],id:C,x:w,y:T,...y!==null&&{pointerType:y}})};return Object.keys(Ur).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let g=Ql(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))}),yt(()=>{u.forEach(h=>h())})}function VB({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,sampling:o}){const a=yt(Xh(yt(u=>{const c=bp(u);if(!c||wr(c,r,s,!0))return;const f=n.getId(c);if(c===e&&e.defaultView){const h=kB(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 KCe({viewportResizeCb:t},{win:e}){let n=-1,r=-1;const s=yt(Xh(yt(()=>{const o=DB(),a=LB();(n!==o||r!==a)&&(t({width:Number(a),height:Number(o)}),n=o,r=a)}),200));return Cr("resize",s,e)}const YCe=["INPUT","TEXTAREA","SELECT"],y5=new WeakMap;function ZCe({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:h}){function g(T){let _=bp(T);const R=T.isTrusted,M=_&&_.tagName;if(_&&M==="OPTION"&&(_=rt.parentElement(_)),!_||!M||YCe.indexOf(M)<0||wr(_,r,s,!0)||_.classList.contains(o)||a&&_.matches(a))return;let N=_.value,O=!1;const k=ey(_)||"";k==="radio"||k==="checkbox"?O=_.checked:(u[M.toLowerCase()]||u[k])&&(N=Jv({element:_,maskInputOptions:u,tagName:M,type:k,value:N,maskInputFn:c})),m(_,h?{text:N,isChecked:O,userTriggered:R}:{text:N,isChecked:O});const F=_.name;k==="radio"&&F&&O&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach($=>{if($!==_){const D=$.value;m($,h?{text:D,isChecked:!O,userTriggered:!1}:{text:D,isChecked:!O})}})}function m(T,_){const R=y5.get(T);if(!R||R.text!==_.text||R.isChecked!==_.isChecked){y5.set(T,_);const M=n.getId(T);yt(t)({..._,id:M})}}const S=(f.input==="last"?["change"]:["input","change"]).map(T=>Cr(T,yt(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(T=>T())};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(T=>zb(T[0],T[1],{set(){yt(g)({target:this,isTrusted:!1})}},!1,E))),yt(()=>{S.forEach(T=>T())})}function fy(t){const e=[];function n(r,s){if(jm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||jm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||jm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||jm("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 XCe({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:yt((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:yt((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:yt((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:yt((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={};Bm("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Bm("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Bm("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Bm("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:yt((m,y,S)=>{const[E,C]=S,{id:w,styleId:T}=Sa(y.parentStyleSheet,e,n.styleMirror);return(w&&w!==-1||T&&T!==-1)&&t({id:w,styleId:T,adds:[{rule:E,index:[...fy(y),C||0]}]}),m.apply(y,S)})}),g.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:yt((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)})})}),yt(()=>{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 GB({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}}),yt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function QCe({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:yt((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:yt((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)})}),yt(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function JCe({mediaInteractionCb:t,blockClass:e,blockSelector:n,mirror:r,sampling:s,doc:o}){const a=yt(c=>Xh(yt(f=>{const h=bp(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(wc.Play),o),Cr("pause",a(wc.Pause),o),Cr("seeked",a(wc.Seeked),o),Cr("volumechange",a(wc.VolumeChange),o),Cr("ratechange",a(wc.RateChange),o)];return yt(()=>{u.forEach(c=>c())})}function ewe({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=mu(e.fonts,"add",function(u){return function(c){return setTimeout(yt(()=>{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),yt(()=>{r.forEach(u=>u())})}function twe(t){const{doc:e,mirror:n,blockClass:r,blockSelector:s,selectionCb:o}=t;let a=!0;const u=yt(()=>{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 nwe({doc:t,customElementCb:e}){const n=t.defaultView;return!n||!n.customElements?()=>{}:mu(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 rwe(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 swe(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};rwe(t,e);let r;t.recordDOM&&(r=WB(t,t.doc));const s=VCe(t),o=GCe(t),a=VB(t),u=KCe(t,{win:n}),c=ZCe(t),f=JCe(t);let h=()=>{},g=()=>{},m=()=>{},y=()=>{};t.recordDOM&&(h=XCe(t,{win:n}),g=GB(t,t.doc),m=QCe(t,{win:n}),t.collectFonts&&(y=ewe(t)));const S=twe(t),E=nwe(t),C=[];for(const w of t.plugins)C.push(w.observer(w.callback,n,w.options));return yt(()=>{Nl.forEach(w=>w.reset()),r?.disconnect(),s(),o(),a(),u(),c(),f(),h(),g(),m(),y(),S(),E(),C.forEach(w=>w())})}function jm(t){return typeof window[t]<"u"}function Bm(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class b5{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 owe{constructor(e){Se(this,"iframes",new WeakMap),Se(this,"crossOriginIframeMap",new WeakMap),Se(this,"crossOriginIframeMirror",new b5(uj)),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 b5(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 wt.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:wt.IncrementalSnapshot,data:{source:ht.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case wt.Meta:case wt.Load:case wt.DomContentLoaded:return!1;case wt.Plugin:return n;case wt.Custom:return this.replaceIds(n.data.payload,e,["id","parentId","previousId","nextId"]),n;case wt.IncrementalSnapshot:switch(n.data.source){case ht.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 ht.Drag:case ht.TouchMove:case ht.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),n;case ht.ViewportResize:return!1;case ht.MediaInteraction:case ht.MouseInteraction:case ht.Scroll:case ht.CanvasMutation:case ht.Input:return this.replaceIds(n.data,e,["id"]),n;case ht.StyleSheetRule:case ht.StyleDeclaration:return this.replaceIds(n.data,e,["id"]),this.replaceStyleIds(n.data,e,["styleId"]),n;case ht.Font:return n;case ht.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),n;case ht.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!==$B.Document&&!e.rootId&&(e.rootId=n),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class iwe{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(!Eh(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=WB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(VB({...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(GB({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(mu(e.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o),u=rt.shadowRoot(this);return u&&HB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Pc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",awe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Hm=0;Hm<Pc.length;Hm++)awe[Pc.charCodeAt(Hm)]=Hm;var lwe=function(t){var e=new Uint8Array(t),n,r=e.length,s="";for(n=0;n<r;n+=3)s+=Pc[e[n]>>2],s+=Pc[(e[n]&3)<<4|e[n+1]>>4],s+=Pc[(e[n+1]&15)<<2|e[n+2]>>6],s+=Pc[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 S5=new Map;function uwe(t,e){let n=S5.get(t);return n||(n=new Map,S5.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const KB=(t,e,n)=>{if(!t||!(ZB(t,e)||typeof t=="object"))return;const r=t.constructor.name,s=uwe(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=lwe(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(ZB(t,e)||typeof t=="object"){const r=t.constructor.name,s=KB(t,e,n);return{rr_type:r,index:s}}}}return t}const YB=(t,e,n)=>t.map(r=>yv(r,e,n)),ZB=(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 cwe(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=mu(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return wr(this.canvas,n,r,!0)||setTimeout(()=>{const h=YB(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 dwe(t){return t==="experimental-webgl"?"webgl":t}function E5(t,e,n,r){const s=[];try{const o=mu(t.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!wr(this,e,n,!0)){const f=dwe(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 C5(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=mu(t,c,function(h){return function(...g){const m=h.apply(this,g);if(KB(m,o,this),"tagName"in this.canvas&&!wr(this.canvas,r,s,!0)){const y=YB(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 fwe(t,e,n,r){const s=[];return s.push(...C5(e.WebGLRenderingContext.prototype,ed.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&s.push(...C5(e.WebGL2RenderingContext.prototype,ed.WebGL2,t,n,r,e)),()=>{s.forEach(o=>o())}}const XB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hwe=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0)),w5=typeof window<"u"&&window.Blob&&new Blob([hwe(XB)],{type:"text/javascript;charset=utf-8"});function pwe(t){let e;try{if(e=w5&&(window.URL||window.webkitURL).createObjectURL(w5),!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,"+XB,{name:t?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class gwe{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=E5(n,r,s,!0),u=new Map,c=new pwe;c.onmessage=S=>{const{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;const{base64:C,type:w,width:T,height:_}=S.data;this.mutationCb({id:E,type:ed["2D"],commands:[{property:"clearRect",args:[0,0,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 _=E.getContext(E.__context);((C=_?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&_.clear(_.COLOR_BUFFER_BIT)}const T=await createImageBitmap(E);c.postMessage({id:w,bitmap:T,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[T])}),g=requestAnimationFrame(y)};g=requestAnimationFrame(y),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=E5(e,n,r,!1),o=cwe(this.processMutation.bind(this),e,n,r),a=fwe(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 mwe{constructor(e){Se(this,"trackedLinkElements",new WeakSet),Se(this,"mutationCb"),Se(this,"adoptedStyleSheetCb"),Se(this,"styleMirror",new UCe),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:ij(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 vwe{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 mn,bv,Nx,hy=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((AU=t.contentWindow)==null?void 0:AU.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const Hs=b0e();function Sp(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:T={},dataURLOptions:_={},mousemoveWait:R,recordDOM:M=!0,recordCanvas:N=!1,recordCrossOriginIframes:O=!1,recordAfter:k=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:$=!1,inlineImages:D=!1,plugins:z,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:te}=t;qCe(te);const H=O?window.parent===window:!0;let ee=!1;if(!H)try{window.parent.document&&(ee=!1)}catch{ee=!0}if(H&&!e)throw new Error("emit function is required");if(!H&&!ee)return()=>{};R!==void 0&&T.mousemove===void 0&&(T.mousemove=R),Hs.reset();const de=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},ce=hj(y);LCe();let xe,L=0;const V=Ee=>{for(const gt of z||[])gt.eventProcessor&&(Ee=gt.eventProcessor(Ee));return w&&!ee&&(Ee=w(Ee)),Ee};mn=(Ee,gt)=>{var Ce;const je=Ee;if(je.timestamp=dy(),(Ce=Nl[0])!=null&&Ce.isFrozen()&&je.type!==wt.FullSnapshot&&!(je.type===wt.IncrementalSnapshot&&je.data.source===ht.Mutation)&&Nl.forEach(Be=>Be.unfreeze()),H)e?.(V(je),gt);else if(ee){const Be={type:"rrweb",event:V(je),origin:window.location.origin,isCheckout:gt};window.parent.postMessage(Be,"*")}if(je.type===wt.FullSnapshot)xe=je,L=0;else if(je.type===wt.IncrementalSnapshot){if(je.data.source===ht.Mutation&&je.data.isAttachIframe)return;L++;const Be=r&&L>=r,$e=n&&je.timestamp-xe.timestamp>n;(Be||$e)&&bv(!0)}};const K=Ee=>{mn({type:wt.IncrementalSnapshot,data:{source:ht.Mutation,...Ee}})},J=Ee=>mn({type:wt.IncrementalSnapshot,data:{source:ht.Scroll,...Ee}}),oe=Ee=>mn({type:wt.IncrementalSnapshot,data:{source:ht.CanvasMutation,...Ee}}),he=Ee=>mn({type:wt.IncrementalSnapshot,data:{source:ht.AdoptedStyleSheet,...Ee}}),ue=new mwe({mutationCb:K,adoptedStyleSheetCb:he}),ve=new owe({mirror:Hs,mutationCb:K,stylesheetManager:ue,recordCrossOriginIframes:O,wrappedEmit:mn});for(const Ee of z||[])Ee.getMirror&&Ee.getMirror({nodeMirror:Hs,crossOriginIframeMirror:ve.crossOriginIframeMirror,crossOriginIframeStyleMirror:ve.crossOriginIframeStyleMirror});const _e=new vwe;Nx=new gwe({recordCanvas:N,mutationCb:oe,win:window,blockClass:s,blockSelector:o,mirror:Hs,sampling:T.canvas,dataURLOptions:_});const Xe=new iwe({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:de,dataURLOptions:_,maskTextFn:E,maskInputFn:S,recordCanvas:N,inlineImages:D,sampling:T,slimDOMOptions:ce,iframeManager:ve,stylesheetManager:ue,canvasManager:Nx,keepIframeSrcFn:q,processedNodeManager:_e},mirror:Hs});bv=(Ee=!1)=>{if(!M)return;mn({type:wt.Meta,data:{href:window.location.href,width:LB(),height:DB()}},Ee),ue.reset(),Xe.init(),Nl.forEach(Ce=>Ce.lock());const gt=$0e(document,{mirror:Hs,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:de,maskTextFn:E,maskInputFn:S,slimDOM:ce,dataURLOptions:_,recordCanvas:N,inlineImages:D,onSerialize:Ce=>{zB(Ce,Hs)&&ve.addIframe(Ce),jB(Ce,Hs)&&ue.trackLinkElement(Ce),wA(Ce)&&Xe.addShadowRoot(rt.shadowRoot(Ce),document)},onIframeLoad:(Ce,je)=>{ve.attachIframe(Ce,je),Xe.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,je)=>{ue.attachLinkElement(Ce,je)},keepIframeSrcFn:q});if(!gt)return console.warn("Failed to snapshot the document");mn({type:wt.FullSnapshot,data:{node:gt,initialOffset:kB(window)}},Ee),Nl.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,Hs.getId(document))};try{const Ee=[],gt=je=>{var Be;return yt(swe)({mutationCb:K,mousemoveCb:($e,gr)=>mn({type:wt.IncrementalSnapshot,data:{source:gr,positions:$e}}),mouseInteractionCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.MouseInteraction,...$e}}),scrollCb:J,viewportResizeCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.ViewportResize,...$e}}),inputCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.Input,...$e}}),mediaInteractionCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.MediaInteraction,...$e}}),styleSheetRuleCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.StyleSheetRule,...$e}}),styleDeclarationCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.StyleDeclaration,...$e}}),canvasMutationCb:oe,fontCb:$e=>mn({type:wt.IncrementalSnapshot,data:{source:ht.Font,...$e}}),selectionCb:$e=>{mn({type:wt.IncrementalSnapshot,data:{source:ht.Selection,...$e}})},customElementCb:$e=>{mn({type:wt.IncrementalSnapshot,data:{source:ht.CustomElement,...$e}})},blockClass:s,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:de,inlineStylesheet:h,sampling:T,recordDOM:M,recordCanvas:N,inlineImages:D,userTriggeredOnInput:F,collectFonts:$,doc:je,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:q,blockSelector:o,slimDOMOptions:ce,dataURLOptions:_,mirror:Hs,iframeManager:ve,stylesheetManager:ue,shadowDomManager:Xe,processedNodeManager:_e,canvasManager:Nx,ignoreCSSAttributes:Y,plugins:((Be=z?.filter($e=>$e.observer))==null?void 0:Be.map($e=>({observer:$e.observer,options:$e.options,callback:gr=>mn({type:wt.Plugin,data:{plugin:$e.name,payload:gr}})})))||[]},C)};ve.addLoadListener(je=>{try{Ee.push(gt(je.contentDocument))}catch(Be){console.warn(Be)}});const Ce=()=>{bv(),Ee.push(gt(document)),hy=!0};return["interactive","complete"].includes(document.readyState)?Ce():(Ee.push(Cr("DOMContentLoaded",()=>{mn({type:wt.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&Ce()})),Ee.push(Cr("load",()=>{mn({type:wt.Load,data:{}}),k==="load"&&Ce()},window))),()=>{Ee.forEach(je=>{try{je()}catch(Be){String(Be).toLowerCase().includes("cross-origin")||console.warn(Be)}}),_e.destroy(),hy=!1,WCe()}}catch(Ee){console.warn(Ee)}}Sp.addCustomEvent=(t,e)=>{if(!hy)throw new Error("please add custom event after start recording");mn({type:wt.Custom,data:{tag:t,payload:e}})};Sp.freezePage=()=>{Nl.forEach(t=>t.freeze())};Sp.takeFullSnapshot=t=>{if(!hy)throw new Error("please take full snapshot after start recording");bv(t)};Sp.mirror=Hs;var x5;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(x5||(x5={}));const ywe="rrweb",bwe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},Swe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},_5=Swe;class Ewe extends Ms{constructor(e){super(ywe),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({},_5.recordOptions),e?.recordOptions),bwe);this.config=Object.assign(Object.assign(Object.assign({},_5),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=Sp(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(cU,n),be.info("RRWebPlugin events sent to RUM",{eventType:cU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var Cwe=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},_A;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(_A||(_A={}));const QB="us-west-2",AA=`https://dataplane.rum.${QB}.amazonaws.com`,JB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),eH=t=>({allowCookies:!1,batchLimit:100,client:Vve,compressionStrategy:{enabled:!0},cookieAttributes:t,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:AA,endpointUrl:new URL(AA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:_A.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 wwe=class{constructor(e,n,r,s={}){var{cookieAttributes:o}=s,a=Cwe(s,["cookieAttributes"]);this.eventBus=new qz,typeof r>"u"&&(r="us-west-2"),this.applicationId=e;const u=Object.assign(Object.assign({},JB()),o);this.config=Object.assign(Object.assign({fetchFunction:fetch},eH(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:AA.replace(QB,r),this.config.endpointUrl=new URL(this.config.endpoint),be.configure(this.config.debug),be.info("Initialized RUM Slim"),this.eventCache=new rbe({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=>Yye(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 Gve(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 Kye(r);return this.config.disableAutoPageView||s.addPlugin(new Ebe),this.config.eventPluginsToLoad.forEach(o=>{s.addPlugin(o)}),s}};var Ys;(function(t){t.Errors="errors",t.Performance="performance",t.Interaction="interaction",t.Http="http",t.Replay="replay"})(Ys||(Ys={}));var A5;(function(t){t.Path="PATH",t.Hash="HASH",t.PathAndHash="PATH_AND_HASH"})(A5||(A5={}));const xwe=t=>Object.assign(Object.assign({},eH(t)),{signing:!0,telemetries:[Ys.Errors,Ys.Performance,Ys.Http,Ys.Replay]});class _we extends wwe{constructor(e,n,r,s={}){super(e,n,r,Object.assign(Object.assign({},xwe(JB())),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(Cye),r.setCognitoCredentialProviderFactory((s,o,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:s.cookieAttributes};return a&&u?new Fye(c,o).ChainAnonymousCredentialsProvider:new zye(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(Gz,e)}registerDomEvents(e){this.pluginManager.updatePlugin(Wz,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{[Ys.Errors]:e=>[new pbe(e)],[Ys.Performance]:e=>[new vbe(e),new wbe(e),new $be(e)],[Ys.Interaction]:e=>[new NR(e)],[Ys.Http]:e=>[new Kbe(e),new Wbe(e)],[Ys.Replay]:e=>[new Ewe(e)]}}}const tH={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},Awe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi;function nH(t){return t.replace(Awe,"[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 nH(t.slice(0,r))}function Rwe(t){const e=nH(t.message);if(e===t.message)return t;const n=new Error(e);return n.name=t.name,n.stack=t.stack,n}function Iwe(t){return{recordPageView(e){t.recordPageView(Twe(e))},recordError(e,n){t.recordError(Rwe(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 T5(t){return t instanceof Error?t:new Error(String(t))}function Owe(t){window.addEventListener("error",e=>{t.recordError(T5(e.error??e.message))}),window.addEventListener("unhandledrejection",e=>{t.recordError(T5(e.reason))})}function Nwe(){const{appMonitorId:t,identityPoolId:e,region:n}=Dy().rum;if(!t)return tH;const r=new _we(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=Iwe(r);return Owe(s),s}const rH=x.createContext(tH);function zIe(){return x.useContext(rH)}const TA="remit.theme",Mwe="dark";function R5(){return typeof localStorage>"u"?"system":localStorage.getItem(TA)??"system"}function RA(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(Mwe,e)}function jIe(t){typeof localStorage<"u"&&(t==="system"?localStorage.removeItem(TA):localStorage.setItem(TA,t)),RA(t)}const Pwe=()=>{if(typeof window>"u"||(RA(R5()),typeof window.matchMedia!="function"))return;const t=window.matchMedia("(prefers-color-scheme: dark)"),e=()=>{RA(R5())};typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)},kwe=(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);Bl(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...s):console?.warn&&console.warn(...s)},I5={},IA=(t,e,n,r)=>{Bl(n)&&I5[n]||(Bl(n)&&(I5[n]=new Date),kwe(t,e,n,r))},sH=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},OA=(t,e,n)=>{t.loadNamespaces(e,sH(t,n))},O5=(t,e,n,r)=>{if(Bl(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return OA(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,sH(t,r))},Dwe=(t,e,n={})=>!e.languages||!e.languages.length?(IA(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}}),Bl=t=>typeof t=="string",Lwe=t=>typeof t=="object"&&t!==null,Uwe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Fwe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},zwe=t=>Fwe[t],jwe=t=>t.replace(Uwe,zwe);let NA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jwe};const Bwe=(t={})=>{NA={...NA,...t}},Hwe=()=>NA;let oH;const $we=t=>{oH=t},qwe=()=>oH,Wwe={type:"3rdParty",init(t){Bwe(t.options.react),$we(t)}},Vwe=x.createContext();class Gwe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Kwe=(t,e)=>{const n=x.useRef();return x.useEffect(()=>{n.current=t},[t,e]),n.current},iH=(t,e,n,r)=>t.getFixedT(e,n,r),Ywe=(t,e,n,r)=>x.useCallback(iH(t,e,n,r),[t,e,n,r]),Zwe=(t,e={})=>{const{i18n:n}=e,{i18n:r,defaultNS:s}=x.useContext(Vwe)||{},o=n||r||qwe();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Gwe),!o){IA(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const R=(N,O)=>Bl(O)?O:Lwe(O)&&Bl(O.defaultValue)?O.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&&IA(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Hwe(),...o.options.react,...e},{useSuspense:u,keyPrefix:c}=a;let f=t||s||o.options?.defaultNS;f=Bl(f)?[f]:f||["translation"],o.reportNamespaces.addUsedNamespaces?.(f);const h=(o.isInitialized||o.initializedStoreOnce)&&f.every(R=>Dwe(R,o,a)),g=Ywe(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),m=()=>g,y=()=>iH(o,e.lng||null,a.nsMode==="fallback"?f:f[0],c),[S,E]=x.useState(m);let C=f.join();e.lng&&(C=`${e.lng}${C}`);const w=Kwe(C),T=x.useRef(!0);x.useEffect(()=>{const{bindI18n:R,bindI18nStore:M}=a;T.current=!0,!h&&!u&&(e.lng?O5(o,e.lng,f,()=>{T.current&&E(y)}):OA(o,f,()=>{T.current&&E(y)})),h&&w&&w!==C&&T.current&&E(y);const N=()=>{T.current&&E(y)};return R&&o?.on(R,N),M&&o?.store.on(M,N),()=>{T.current=!1,o&&R&&R?.split(" ").forEach(O=>o.off(O,N)),M&&o&&M.split(" ").forEach(O=>o.store.off(O,N))}},[o,C]),x.useEffect(()=>{T.current&&h&&E(m)},[o,c,h]);const _=[S,o,h];if(_.t=S,_.i18n=o,_.ready=h,h||!h&&!u)return _;throw new Promise(R=>{e.lng?O5(o,e.lng,f,()=>R()):OA(o,f,()=>R())})},Xwe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...t,headers:{"Content-Type":"application/json",...t.headers}}),Qwe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...t,headers:{"Content-Type":"application/json",...t.headers}}),Jwe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...t,headers:{"Content-Type":"application/json",...t.headers}}),exe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t}),txe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),nxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t}),rxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...t,headers:{"Content-Type":"application/json",...t.headers}}),sxe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t}),oxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),ixe=t=>(t.client??ke).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...t,headers:{"Content-Type":"application/json",...t.headers}}),axe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...t}),lxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...t,headers:{"Content-Type":"application/json",...t.headers}}),uxe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...t}),cxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),dxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t}),fxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...t,headers:{"Content-Type":"application/json",...t.headers}}),BIe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t}),hxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),pxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...t,headers:{"Content-Type":"application/json",...t.headers}}),gxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...t,headers:{"Content-Type":"application/json",...t.headers}}),mxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...t}),vxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...t}),yxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...t}),bxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...t}),Sxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Exe=t=>(t?.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...t}),HIe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...t}),Cxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...t}),wxe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...t,headers:{"Content-Type":"application/json",...t.headers}}),xxe=t=>(t?.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...t}),_xe=t=>(t?.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...t}),Axe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...t,headers:{"Content-Type":"application/json",...t.headers}}),Txe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),Rxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/labels",...t,headers:{"Content-Type":"application/json",...t.headers}}),Ixe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...t,headers:{"Content-Type":"application/json",...t.headers}}),Oxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...t}),Nxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...t,headers:{"Content-Type":"application/json",...t.headers}}),Mxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...t}),Pxe=t=>(t?.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t}),kxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...t,headers:{"Content-Type":"application/json",...t.headers}}),Dxe=t=>(t.client??ke).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),Lxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t}),Uxe=t=>(t.client??ke).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...t,headers:{"Content-Type":"application/json",...t.headers}}),Fxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...t}),zxe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/search/semantic",...t}),jxe=t=>(t?.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t}),Bxe=t=>(t.client??ke).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...t,headers:{"Content-Type":"application/json",...t.headers}}),Hxe=t=>(t?.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...t}),$xe=t=>(t.client??ke).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...t}),$Ie=t=>({mutationFn:async n=>{const{data:r}=await Xwe({...t,...n,throwOnError:!0});return r}}),Fn=(t,e,n,r)=>{const s={_id:t,baseUrl:e?.baseUrl||(e?.client??ke).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]},qIe=t=>({mutationFn:async n=>{const{data:r}=await Qwe({...t,...n,throwOnError:!0});return r}}),WIe=t=>({mutationFn:async n=>{const{data:r}=await Jwe({...t,...n,throwOnError:!0});return r}}),VIe=t=>({mutationFn:async n=>{const{data:r}=await exe({...t,...n,throwOnError:!0});return r}}),GIe=t=>({mutationFn:async n=>{const{data:r}=await txe({...t,...n,throwOnError:!0});return r}}),qxe=t=>Fn("filterOperationsListFilters",t),KIe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await nxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:qxe(t)}),YIe=t=>({mutationFn:async n=>{const{data:r}=await rxe({...t,...n,throwOnError:!0});return r}}),ZIe=t=>({mutationFn:async n=>{const{data:r}=await sxe({...t,...n,throwOnError:!0});return r}}),XIe=t=>Fn("filterDetailOperationsGetFilter",t),QIe=t=>({mutationFn:async n=>{const{data:r}=await oxe({...t,...n,throwOnError:!0});return r}}),JIe=t=>({mutationFn:async n=>{const{data:r}=await ixe({...t,...n,throwOnError:!0});return r}}),Wxe=t=>Fn("labelOperationsListLabels",t),e2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await axe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Wxe(t)}),t2e=t=>({mutationFn:async n=>{const{data:r}=await lxe({...t,...n,throwOnError:!0});return r}}),n2e=t=>({mutationFn:async n=>{const{data:r}=await uxe({...t,...n,throwOnError:!0});return r}}),r2e=t=>({mutationFn:async n=>{const{data:r}=await cxe({...t,...n,throwOnError:!0});return r}}),Vxe=t=>Fn("mailboxOperationsListMailboxes",t),s2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await dxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Vxe(t)}),o2e=t=>({mutationFn:async n=>{const{data:r}=await fxe({...t,...n,throwOnError:!0});return r}}),i2e=t=>({mutationFn:async n=>{const{data:r}=await hxe({...t,...n,throwOnError:!0});return r}}),a2e=t=>({mutationFn:async n=>{const{data:r}=await pxe({...t,...n,throwOnError:!0});return r}}),l2e=t=>({mutationFn:async n=>{const{data:r}=await gxe({...t,...n,throwOnError:!0});return r}}),Gxe=t=>Fn("organizeJobDetailOperationsGetOrganizeJob",t),u2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await mxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Gxe(t)}),c2e=t=>({mutationFn:async n=>{const{data:r}=await vxe({...t,...n,throwOnError:!0});return r}}),Kxe=t=>Fn("syncOperationsGetSyncStatus",t),d2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await yxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Kxe(t)}),Yxe=t=>Fn("addressOperationsSearchAddresses",t),f2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await bxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Yxe(t)}),h2e=t=>({mutationFn:async n=>{const{data:r}=await Sxe({...t,...n,throwOnError:!0});return r}}),Zxe=t=>Fn("configOperationsGetConfig",t),Xxe=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Exe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Zxe(t)}),p2e=t=>Fn("threadOperationsListThreads",t),Qxe=t=>Fn("threadOperationsSearchThreads",t),g2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Cxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Qxe(t)}),m2e=t=>({mutationFn:async n=>{const{data:r}=await wxe({...t,...n,throwOnError:!0});return r}}),v2e=t=>({mutationFn:async n=>{const{data:r}=await xxe({...t,...n,throwOnError:!0});return r}}),Jxe=t=>Fn("meOperationsListVipSuggestions",t),y2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await _xe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:Jxe(t)}),b2e=t=>({mutationFn:async n=>{const{data:r}=await Axe({...t,...n,throwOnError:!0});return r}}),S2e=t=>({mutationFn:async n=>{const{data:r}=await Txe({...t,...n,throwOnError:!0});return r}}),E2e=t=>({mutationFn:async n=>{const{data:r}=await Rxe({...t,...n,throwOnError:!0});return r}}),C2e=t=>({mutationFn:async n=>{const{data:r}=await Ixe({...t,...n,throwOnError:!0});return r}}),e_e=t=>Fn("messageOperationsDescribeMessage",t),w2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Oxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:e_e(t)}),x2e=t=>({mutationFn:async n=>{const{data:r}=await Nxe({...t,...n,throwOnError:!0});return r}}),t_e=t=>Fn("messageOperationsGetRawMessage",t),_2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Mxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:t_e(t)}),aH=t=>Fn("outboxOperationsListOutboxMessages",t),A2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Pxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:aH(t)}),T2e=t=>({mutationFn:async n=>{const{data:r}=await kxe({...t,...n,throwOnError:!0});return r}}),R2e=t=>({mutationFn:async n=>{const{data:r}=await Dxe({...t,...n,throwOnError:!0});return r}}),n_e=t=>Fn("outboxDetailOperationsGetOutboxMessage",t),r_e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Lxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:n_e(t)}),I2e=t=>({mutationFn:async n=>{const{data:r}=await Uxe({...t,...n,throwOnError:!0});return r}}),O2e=t=>({mutationFn:async n=>{const{data:r}=await Fxe({...t,...n,throwOnError:!0});return r}}),s_e=t=>Fn("semanticSearchOperationsSemanticSearch",t),N2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await zxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:s_e(t)}),lH=t=>Fn("systemOperationsGetSystemUpdate",t),o_e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await jxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:lH(t)}),i_e=t=>({mutationFn:async n=>{const{data:r}=await Bxe({...t,...n,throwOnError:!0});return r}}),a_e=t=>Fn("unifiedThreadOperationsListAllThreads",t),l_e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await Hxe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:a_e(t)}),u_e=t=>Fn("threadDetailOperationsListThreadMessages",t),M2e=t=>({queryFn:async({queryKey:e,signal:n})=>{const{data:r}=await $xe({...t,...e[0],signal:n,throwOnError:!0});return r},queryKey:u_e(t)}),uH=x.createContext(void 0),N5={isOpen:!1,mode:"new"},c_e=2e3,d_e=6e4,f_e=({children:t})=>{const[e,n]=x.useState(N5),[r,s]=x.useState(),o=x.useRef(0),a=vb(),{data:u}=j7({...r_e({path:{outboxMessageId:r??""}}),enabled:!!r,refetchInterval:y=>{const S=y.state.data?.status;return S==="sent"||S==="failed"||S==="blocked"||Date.now()-o.current>d_e?!1:c_e}});x.useEffect(()=>{if(!u||!r)return;(u.status==="sent"||u.status==="failed"||u.status==="blocked")&&(s(void 0),a.invalidateQueries({queryKey:aH()}))},[u,r,a]);const c=x.useCallback(y=>{n({...y,isOpen:!0})},[]),f=x.useCallback(()=>{n(N5)},[]),h=x.useCallback(y=>{n(S=>({...S,outboxMessageId:y}))},[]),g=x.useCallback(y=>{o.current=Date.now(),s(y)},[]),m=x.useMemo(()=>({state:e,openCompose:c,closeCompose:f,setOutboxMessageId:h,startSendPolling:g}),[e,c,f,h,g]);return I.jsx(uH.Provider,{value:m,children:t})},P2e=()=>{const t=x.useContext(uH);if(!t)throw new Error("useCompose must be used within a ComposeProvider");return t},dI="remit.self-update.run",h_e=600,p_e=300,M5="remit logs",g_e="https://github.com/remit-mail/reader/releases/tag/",m_e={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function MA(t){return m_e[t]??"reconnecting"}function cH(t){const e=au(t);return e===404||e===403||e===401}function dH(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??hH(n.latestVersion),summary:n.summary??""}}function v_e(t){const e=t?.check.schemaVersion,n=t?.currentSchemaVersion;return e===void 0||n===void 0?!1:e>n}function y_e(){try{const t=localStorage.getItem(dI);if(!t)return null;const e=JSON.parse(t);return S_e(e)?e:null}catch{return null}}function b_e(t){try{localStorage.setItem(dI,JSON.stringify(t))}catch{}}function P5(){try{localStorage.removeItem(dI)}catch{}}function S_e(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 k5(){return h_e+p_e}function fH(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 hH(t){return`${g_e}${t}`}function ah(t,e,n,r,s){return{status:"applying",runId:t,version:e,target:n,phase:r,elapsedSeconds:s}}function E_e(t,e,n){switch(n){case"succeeded":return{status:"succeeded",runId:e.runId,version:e.targetVersion,previousVersion:e.fromVersion,releaseNotesUrl:t.check.releaseNotesUrl??hH(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 C_e(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=dH(t,n);return s?{status:"available",version:t.currentVersion,release:s}:{status:"upToDate",version:t.currentVersion,checkedAt:py(r.lastCheckedAt)??n}}function $m(t,e,n,r){return{surface:{status:"ready",section:t,overlay:e},clearStoredRun:n,releaseHeld:r}}function w_e(t,e,n,r,s){const o=fH(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=MA(n.phase);return $m(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>k5()?{surface:{status:"ready",section:f,overlay:{kind:"neverCameBack",attemptedVersion:t.attemptedVersion,previousVersion:t.previousVersion,elapsedSeconds:o,logsCommand:M5}},clearStoredRun:!0,releaseHeld:!1}:$m(f,{kind:"applying",target:t.attemptedVersion,phase:"reconnecting",elapsedSeconds:o},!1,!1)}if(e===void 0)return $m(ah(t.runId,a,t.attemptedVersion,"preparing",o),{kind:"applying",target:t.attemptedVersion,phase:"preparing",elapsedSeconds:o},!1,!1);if(o>k5())return{surface:{status:"ready",section:{status:"unreachable",runId:t.runId,previousVersion:t.previousVersion,attemptedVersion:t.attemptedVersion,elapsedSeconds:o,logsCommand:n?.logCommand??M5},overlay:{kind:"none"}},clearStoredRun:!0,releaseHeld:!0};const c=n!==null&&n.outcome===null?MA(n.phase):"preparing";return $m(ah(t.runId,a,t.attemptedVersion,c,o),{kind:"applying",target:t.attemptedVersion,phase:c,elapsedSeconds:o},!1,!1)}function D5(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:E_e(e,u,u.outcome),overlay:{kind:"none"}},clearStoredRun:!0};if(u!==null&&!c&&u.outcome===null){const f=fH(py(u.startedAt)??a,a),h=MA(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:C_e(e,o&&r,a),overlay:{kind:"none"}},clearStoredRun:!1}}function x_e(t){const{data:e,isError:n,error:r,held:s,now:o}=t,a=e?.run??null;if(cH(r)&&!s)return{surface:{status:"absent"},clearStoredRun:!0,releaseHeld:!0};if(s){const c=w_e(s,e,a,n,o);return c||{surface:D5(t).surface,clearStoredRun:!0,releaseHeld:!0}}const u=D5(t);return{surface:u.surface,clearStoredRun:u.clearStoredRun,releaseHeld:!1}}const __e=3e4,A_e=5e3;function T_e(t,e,n){if(cH(t)&&!n)return!1;const r=e!==null&&e.outcome===null;return n||r?A_e:__e}function R_e(){const t=vb(),[e,n]=x.useState(()=>y_e()),[r,s]=x.useState(null),[o,a]=x.useState(!1),u=x.useRef(e);u.current=e;const c=j7({...o_e(),retry:!1,meta:{softError:!0},refetchInterval:R=>T_e(R.state.error,R.state.data?.run??null,u.current!==null)}),f=x_e({data:c.data,isError:c.isError,error:c.error,isFetching:c.isFetching,held:e,dismissedRunId:r,checkRequested:o,now:Date.now()}),h=x.useRef(null);h.current=f.surface.status==="ready"&&"runId"in f.surface.section?f.surface.section.runId:null;const{clearStoredRun:g,releaseHeld:m}=f;x.useEffect(()=>{g&&P5()},[g]),x.useEffect(()=>{m&&n(R=>R===null?R:null)},[m]),x.useEffect(()=>{o&&!c.isFetching&&a(!1)},[o,c.isFetching]);const{refetch:y}=c,S=x.useCallback(()=>{a(!0),y()},[y]),E=x.useCallback(()=>{y()},[y]),C=Hpe({...i_e(),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()};b_e(N),n(N),s(null)}t.setQueryData(lH(),R)},onError:()=>{y()}}),{mutate:w}=C,T=x.useCallback(R=>{w({body:{targetVersion:R}})},[w]),_=x.useCallback(()=>{h.current!==null&&s(h.current),P5(),n(null)},[]);return{surface:f.surface,appliesSchemaMigration:v_e(c.data),currentVersion:c.data?.currentVersion,release:dH(c.data,Date.now()),onCheck:S,install:T,onDismissResult:_,onRetryConnection:E}}const fI=x.createContext(null);function I_e({children:t}){const e=R_e();return x.createElement(fI.Provider,{value:e},t)}function O_e(){const t=x.useContext(fI);if(t===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return t}function N_e(){return x.useContext(fI)}function M_e(){const{surface:t,onRetryConnection:e}=O_e();if(t.status!=="ready")return null;const{overlay:n}=t;return n.kind==="applying"?I.jsx(Mte,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?I.jsx(Pte,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:e}):null}const Mx=(...t)=>X8(j8(t)),P_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"}},k_e={error:pQ,warning:W8,info:SQ},D_e={error:"Error",warning:"Warning",info:"Information"},L_e=({id:t,severity:e,title:n,detail:r,onDismiss:s})=>{const o=P_e[e],a=k_e[e];return I.jsxs("div",{role:e==="error"?"alert":"status","aria-live":e==="error"?"assertive":"polite",className:Mx("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",o.container),children:[I.jsx(a,{className:Mx("size-5 shrink-0 mt-0.5",o.icon),"aria-hidden":"true"}),I.jsxs("div",{className:"flex-1 min-w-0",children:[I.jsx("p",{className:Mx("text-sm font-medium",o.title),children:n}),r&&I.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r})]}),I.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 ${D_e[e].toLowerCase()}`,children:I.jsx(La,{className:"size-4","aria-hidden":"true"})})]})},U_e=({errors:t,onDismiss:e})=>t.length===0?null:I.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:I.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:t.map(n=>I.jsx(L_e,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,onDismiss:e},n.id))})}),L5=5,k2e=(t,e,n)=>({title:t,detail:pH(n)??e,error:n}),pH=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}},D2e=t=>{const e=pH(t);return e?e.startsWith("Message not found"):!1},F_e=(t,e,n)=>t.severity===n&&t.title===e.title&&t.detail===e.detail,z_e=(t,e)=>{const r=[...t.filter(s=>!F_e(s,{title:e.title,detail:e.detail,severity:e.severity},e.severity)),e];return r.length<=L5?r:r.slice(r.length-L5)},j_e=(t,e)=>t.filter(n=>n.id!==e),B_e=(t,e,n)=>({id:e,severity:t.severity??"error",title:t.title,detail:t.detail,createdAt:n}),gH=x.createContext(void 0),H_e=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,$_e=({children:t})=>{const[e,n]=x.useState([]),r=x.useCallback(u=>{if(u.error!=null&&U9(u.error))return ql(u.error).correlationId;const c=B_e(u,H_e(),Date.now());return n(f=>z_e(f,c)),c.id},[]),s=x.useCallback(u=>{n(c=>j_e(c,u))},[]),o=x.useCallback(()=>{n([])},[]),a=x.useMemo(()=>({errors:e,pushError:r,dismissError:s,clearAll:o}),[e,r,s,o]);return I.jsxs(gH.Provider,{value:a,children:[t,I.jsx(U_e,{errors:e,onDismiss:s})]})},L2e=()=>{const t=x.useContext(gH);if(!t)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return t},q_e=({error:t,reset:e,info:n})=>{const r=Hy(t),s=ql(t,{recoverable:r,componentStack:n?.componentStack});return I.jsx(W9,{fatal:s,onRetry:r?e:void 0})},Ep=mme()({component:V_e,errorComponent:q_e}),W_e=()=>{const{t}=Zwe("common",{useSuspense:!1});return I.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 V_e(){return I.jsxs($_e,{children:[I.jsxs(I_e,{children:[I.jsxs(f_e,{children:[I.jsx(W_e,{}),I.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:I.jsx(x.Suspense,{fallback:I.jsx(pT,{}),children:I.jsx(vz,{})})})]}),I.jsx(M_e,{})]}),I.jsx(q9,{})]})}const G_e=lr("/")({beforeLoad:()=>{throw X7({to:"/mail"})}});var Rt;(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})(Rt||(Rt={}));var U5;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(U5||(U5={}));const Oe=Rt.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=Rt.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 Ai 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 Ai))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Rt.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()}}Ai.create=t=>new Ai(t);const PA=(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,Rt.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Rt.joinValues(t.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Rt.joinValues(t.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Rt.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}"`:Rt.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,Rt.assertNever(t)}return{message:n}};let K_e=PA;function Y_e(){return K_e}const Z_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 Ae(t,e){const n=Y_e(),r=Z_e({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===PA?void 0:PA].filter(s=>!!s)});t.common.issues.push(r)}class cs{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 cs.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}),Ps=t=>({status:"valid",value:t}),F5=t=>t.status==="aborted",z5=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 qa{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 j5=(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 Ai(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 xt{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 cs,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 j5(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 j5(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 _o.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 DA({...st(this._def),innerType:this,defaultValue:n,typeName:Ze.ZodDefault})}brand(){return new bAe({typeName:Ze.ZodBranded,type:this,...st(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new LA({...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 hI.create(this,e)}readonly(){return UA.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const X_e=/^c[^\s-]{8,}$/i,Q_e=/^[0-9a-z]+$/,J_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,eAe=/^[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,tAe=/^[a-z0-9_-]{21}$/i,nAe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,rAe=/^[-+]?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)?)??$/,sAe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oAe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Px;const iAe=/^(?:(?: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])$/,aAe=/^(?:(?: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])$/,lAe=/^(([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]))$/,uAe=/^(([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])$/,cAe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dAe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,mH="((\\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])))",fAe=new RegExp(`^${mH}$`);function vH(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 hAe(t){return new RegExp(`^${vH(t)}$`)}function pAe(t){let e=`${mH}T${vH(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 gAe(t,e){return!!((e==="v4"||!e)&&iAe.test(t)||(e==="v6"||!e)&&lAe.test(t))}function mAe(t,e){if(!nAe.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 vAe(t,e){return!!((e==="v4"||!e)&&aAe.test(t)||(e==="v6"||!e)&&uAe.test(t))}class gi extends xt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Oe.string){const o=this._getOrReturnCtx(e);return Ae(o,{code:ge.invalid_type,expected:Oe.string,received:o.parsedType}),Ye}const r=new cs;let s;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(s=this._getOrReturnCtx(e,s),Ae(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),Ae(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?Ae(s,{code:ge.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Ae(s,{code:ge.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")sAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"email",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Px||(Px=new RegExp(oAe,"u")),Px.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"emoji",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")eAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"uuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")tAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"nanoid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")X_e.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"cuid",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Q_e.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"cuid2",code:ge.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")J_e.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(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),Ae(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),Ae(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),Ae(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),Ae(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),Ae(s,{code:ge.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?pAe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{code:ge.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?fAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{code:ge.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?hAe(o).test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{code:ge.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?rAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"duration",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?gAe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"ip",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?mAe(e.data,o.alg)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"jwt",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?vAe(e.data,o.version)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"cidr",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?cAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"base64",code:ge.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?dAe.test(e.data)||(s=this._getOrReturnCtx(e,s),Ae(s,{validation:"base64url",code:ge.invalid_string,message:o.message}),r.dirty()):Rt.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 gi({...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 gi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new gi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new gi({...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}}gi.create=t=>new gi({checks:[],typeName:Ze.ZodString,coerce:t?.coerce??!1,...st(t)});function yAe(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 Jl extends xt{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 Ae(o,{code:ge.invalid_type,expected:Oe.number,received:o.parsedType}),Ye}let r;const s=new cs;for(const o of this._def.checks)o.kind==="int"?Rt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),Ae(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),Ae(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),Ae(r,{code:ge.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?yAe(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),Ae(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),Ae(r,{code:ge.not_finite,message:o.message}),s.dirty()):Rt.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 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]})}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"&&Rt.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)}}Jl.create=t=>new Jl({checks:[],typeName:Ze.ZodNumber,coerce:t?.coerce||!1,...st(t)});class eu extends xt{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 cs;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),Ae(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),Ae(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),Ae(r,{code:ge.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Rt.assertNever(o);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return Ae(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 eu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:Me.toString(s)}]})}_addCheck(e){return new eu({...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}}eu.create=t=>new eu({checks:[],typeName:Ze.ZodBigInt,coerce:t?.coerce??!1,...st(t)});class my extends xt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Oe.boolean){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.boolean,received:r.parsedType}),Ye}return Ps(e.data)}}my.create=t=>new my({typeName:Ze.ZodBoolean,coerce:t?.coerce||!1,...st(t)});class nd extends xt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Oe.date){const o=this._getOrReturnCtx(e);return Ae(o,{code:ge.invalid_type,expected:Oe.date,received:o.parsedType}),Ye}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return Ae(o,{code:ge.invalid_date}),Ye}const r=new cs;let s;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(s=this._getOrReturnCtx(e,s),Ae(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),Ae(s,{code:ge.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Rt.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 B5 extends xt{_parse(e){if(this._getType(e)!==Oe.symbol){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.symbol,received:r.parsedType}),Ye}return Ps(e.data)}}B5.create=t=>new B5({typeName:Ze.ZodSymbol,...st(t)});class H5 extends xt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.undefined,received:r.parsedType}),Ye}return Ps(e.data)}}H5.create=t=>new H5({typeName:Ze.ZodUndefined,...st(t)});class $5 extends xt{_parse(e){if(this._getType(e)!==Oe.null){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.null,received:r.parsedType}),Ye}return Ps(e.data)}}$5.create=t=>new $5({typeName:Ze.ZodNull,...st(t)});class q5 extends xt{constructor(){super(...arguments),this._any=!0}_parse(e){return Ps(e.data)}}q5.create=t=>new q5({typeName:Ze.ZodAny,...st(t)});class W5 extends xt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ps(e.data)}}W5.create=t=>new W5({typeName:Ze.ZodUnknown,...st(t)});class Wa extends xt{_parse(e){const n=this._getOrReturnCtx(e);return Ae(n,{code:ge.invalid_type,expected:Oe.never,received:n.parsedType}),Ye}}Wa.create=t=>new Wa({typeName:Ze.ZodNever,...st(t)});class V5 extends xt{_parse(e){if(this._getType(e)!==Oe.undefined){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.void,received:r.parsedType}),Ye}return Ps(e.data)}}V5.create=t=>new V5({typeName:Ze.ZodVoid,...st(t)});class _o extends xt{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==Oe.array)return Ae(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)&&(Ae(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&&(Ae(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&&(Ae(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 qa(n,a,n.path,u)))).then(a=>cs.mergeArray(r,a));const o=[...n.data].map((a,u)=>s.type._parseSync(new qa(n,a,n.path,u)));return cs.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new _o({...this._def,minLength:{value:e,message:Me.toString(n)}})}max(e,n){return new _o({...this._def,maxLength:{value:e,message:Me.toString(n)}})}length(e,n){return new _o({...this._def,exactLength:{value:e,message:Me.toString(n)}})}nonempty(e){return this.min(1,e)}}_o.create=(t,e)=>new _o({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...st(e)});function xc(t){if(t instanceof An){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Pa.create(xc(r))}return new An({...t._def,shape:()=>e})}else return t instanceof _o?new _o({...t._def,type:xc(t.element)}):t instanceof Pa?Pa.create(xc(t.unwrap())):t instanceof od?od.create(xc(t.unwrap())):t instanceof tu?tu.create(t.items.map(e=>xc(e))):t}class An extends xt{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=Rt.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 Ae(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 Wa&&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 qa(s,g,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Wa){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&&(Ae(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 qa(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=>cs.mergeObjectSync(r,f)):cs.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 Rt.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 Rt.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new An({...this._def,shape:()=>n})}deepPartial(){return xc(this)}partial(e){const n={};for(const r of Rt.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 Rt.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 yH(Rt.objectKeys(this.shape))}}An.create=(t,e)=>new An({shape:()=>t,unknownKeys:"strip",catchall:Wa.create(),typeName:Ze.ZodObject,...st(e)});An.strictCreate=(t,e)=>new An({shape:()=>t,unknownKeys:"strict",catchall:Wa.create(),typeName:Ze.ZodObject,...st(e)});An.lazycreate=(t,e)=>new An({shape:t,unknownKeys:"strip",catchall:Wa.create(),typeName:Ze.ZodObject,...st(e)});class vy extends xt{_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 Ai(u.ctx.common.issues));return Ae(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 Ai(c));return Ae(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 kA(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=Rt.objectKeys(e),o=Rt.objectKeys(t).filter(u=>s.indexOf(u)!==-1),a={...t,...e};for(const u of o){const c=kA(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=kA(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 xt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(o,a)=>{if(F5(o)||F5(a))return Ye;const u=kA(o.value,a.value);return u.valid?((z5(o)||z5(a))&&n.dirty(),{status:n.value,value:u.data}):(Ae(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 tu extends xt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.array)return Ae(r,{code:ge.invalid_type,expected:Oe.array,received:r.parsedType}),Ye;if(r.data.length<this._def.items.length)return Ae(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&&(Ae(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 qa(r,a,r.path,u)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>cs.mergeArray(n,a)):cs.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new tu({...this._def,rest:e})}}tu.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tu({items:t,typeName:Ze.ZodTuple,rest:null,...st(e)})};class G5 extends xt{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 Ae(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 qa(r,u,r.path,[f,"key"])),value:o._parse(new qa(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}}}}G5.create=(t,e,n)=>new G5({valueType:e,keyType:t,typeName:Ze.ZodMap,...st(n)});class Qh extends xt{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Oe.set)return Ae(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&&(Ae(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&&(Ae(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 qa(r,c,r.path,f)));return r.common.async?Promise.all(u).then(c=>a(c)):a(u)}min(e,n){return new Qh({...this._def,minSize:{value:e,message:Me.toString(n)}})}max(e,n){return new Qh({...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)}}Qh.create=(t,e)=>new Qh({valueType:t,minSize:null,maxSize:null,typeName:Ze.ZodSet,...st(e)});class K5 extends xt{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})}}K5.create=(t,e)=>new K5({getter:t,typeName:Ze.ZodLazy,...st(e)});class Y5 extends xt{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return Ae(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}}Y5.create=(t,e)=>new Y5({value:t,typeName:Ze.ZodLiteral,...st(e)});function yH(t,e){return new rd({values:t,typeName:Ze.ZodEnum,...st(e)})}class rd extends xt{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return Ae(n,{expected:Rt.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 Ae(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ye}return Ps(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=yH;class Z5 extends xt{_parse(e){const n=Rt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Oe.string&&r.parsedType!==Oe.number){const s=Rt.objectValues(n);return Ae(r,{expected:Rt.joinValues(s),received:r.parsedType,code:ge.invalid_type}),Ye}if(this._cache||(this._cache=new Set(Rt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Rt.objectValues(n);return Ae(r,{received:r.data,code:ge.invalid_enum_value,options:s}),Ye}return Ps(e.data)}get enum(){return this._def.values}}Z5.create=(t,e)=>new Z5({values:t,typeName:Ze.ZodNativeEnum,...st(e)});class by extends xt{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Oe.promise&&n.common.async===!1)return Ae(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 Ps(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 xt{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=>{Ae(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);Rt.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 xt{_parse(e){return this._getType(e)===Oe.undefined?Ps(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 xt{_parse(e){return this._getType(e)===Oe.null?Ps(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 DA extends xt{_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}}DA.create=(t,e)=>new DA({innerType:t,typeName:Ze.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...st(e)});class LA extends xt{_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 Ai(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ai(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}LA.create=(t,e)=>new LA({innerType:t,typeName:Ze.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...st(e)});class X5 extends xt{_parse(e){if(this._getType(e)!==Oe.nan){const r=this._getOrReturnCtx(e);return Ae(r,{code:ge.invalid_type,expected:Oe.nan,received:r.parsedType}),Ye}return{status:"valid",value:e.data}}}X5.create=t=>new X5({typeName:Ze.ZodNaN,...st(t)});class bAe extends xt{_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 hI extends xt{_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 hI({in:e,out:n,typeName:Ze.ZodPipeline})}}class UA extends xt{_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}}UA.create=(t,e)=>new UA({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=gi.create;Jl.create;eu.create;const SAe=my.create;nd.create;Wa.create;_o.create;const Ed=An.create;vy.create;yy.create;tu.create;rd.create;by.create;Pa.create;od.create;const U2e={string:(t=>gi.create({...t,coerce:!0})),number:(t=>Jl.create({...t,coerce:!0})),boolean:(t=>my.create({...t,coerce:!0})),bigint:(t=>eu.create({...t,coerce:!0})),date:(t=>nd.create({...t,coerce:!0}))},EAe=Dy().apiUrl;ke.setConfig({baseUrl:EAe,fetch:L8});ke.interceptors.error.use((t,e)=>{if(t instanceof a_||!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 a_(r,e.status,n)});const kx={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},F2e={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},Q5=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function CAe(t){const e=new Map,n=[...t].sort((r,s)=>Q5.indexOf(kx[r.role])-Q5.indexOf(kx[s.role]));for(const r of n){if(!r.mailboxId||e.has(r.mailboxId))continue;const s=kx[r.role];s&&e.set(r.mailboxId,s)}return e}const wAe=t=>{const e=t.split("/");return e[e.length-1]||t};function z2e(t,e,n){const r=t.displayNameOverride?.trim();if(r)return r;const s=wAe(t.fullPath);return!e||!n?s:n(`sidebar.${e}`,s)}const xAe=new Set(["sent","drafts","trash"]),j2e=t=>t===void 0||!xAe.has(t),_Ae=new Map;function B2e(t){const e=new Map;for(const n of t){const r=CAe(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 H2e(t,e){const n=e[0];if(!t)return n?{mailboxId:n}:{};for(const s of e){const o=t.get(s);if(o&&yte(o)!==void 0)return{mailboxId:s,folder:o}}if(!n)return{};const r=t.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const AAe=x.createContext(null),$2e=()=>x.useContext(AAe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:_Ae,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onSetIntelligenceOpen:()=>{}},TAe=()=>Un(()=>import("./mail-DFpibu0-.js").then(t=>t.m),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])),RAe=Ed({q:xr().optional()}),IAe=lr("/mail")({loader:({context:{queryClient:t}})=>{t.prefetchQuery(Xxe()),t.prefetchQuery({...l_e(),staleTime:6e4})},component:qn(TAe,"component"),validateSearch:RAe}),OAe=()=>Un(()=>import("./onboarding-BNGNPdEA.js"),__vite__mapDeps([16,17,3,5])),NAe=lr("/onboarding")({component:qn(OAe,"component")});function MAe(){const t=N_e(),e=t?.surface.status==="ready"&&t.surface.section.status==="available";return I.jsx(Ote,{show:e,children:I.jsx(IQ,{className:"size-4"})})}const PAe=()=>Un(()=>import("./settings-DNL4mY8Z.js"),[]),q2e=[{id:"accounts",label:"Accounts",icon:I.jsx(q8,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:I.jsx(RQ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:I.jsx(bQ,{className:"size-4"})},{id:"filters",label:"Filters",icon:I.jsx(yQ,{className:"size-4"})},{id:"labels",label:"Labels",icon:I.jsx(AQ,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:I.jsx(CQ,{className:"size-4"})},{id:"advanced",label:"Advanced",icon:I.jsx(MAe,{})}],W2e={accounts:"/settings/accounts",senders:"/settings/senders",folders:"/settings/folders",filters:"/settings/filters",labels:"/settings/labels",appearance:"/settings/appearance",advanced:"/settings/advanced"},kAe=lr("/settings")({component:qn(PAe,"component")}),DAe=()=>Un(()=>import("./index-B_o2k4vi.js"),__vite__mapDeps([18,9])),LAe=()=>Un(()=>import("./index-DtqBFgK5.js"),[]),UAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),selectedMailboxId:xr().optional(),q:xr().optional()}),FAe=lr("/mail/")({component:qn(LAe,"component"),validateSearch:UAe,errorComponent:qn(DAe,"errorComponent")}),zAe=()=>Un(()=>import("./_mailboxId-DtqBFgK5.js"),[]),jAe=Ed({selectedMessageId:xr().optional(),selectedThreadId:xr().optional(),q:xr().optional()}),BAe=lr("/mail/$mailboxId")({component:qn(zAe,"component"),validateSearch:jAe}),HAe=()=>Un(()=>import("./flagged-BjEnVwwW.js"),__vite__mapDeps([19,9])),$Ae=()=>Un(()=>import("./flagged-DtqBFgK5.js"),[]),qAe=Ed({selectedMessageId:xr().optional(),q:xr().optional()}),WAe=lr("/mail/flagged")({component:qn($Ae,"component"),validateSearch:qAe,errorComponent:qn(HAe,"errorComponent")}),VAe=()=>Un(()=>import("./outbox-DtqBFgK5.js"),[]),GAe=Ed({selectedOutboxMessageId:xr().optional(),q:xr().optional()}),KAe=lr("/mail/outbox")({component:qn(VAe,"component"),validateSearch:GAe}),YAe=()=>Un(()=>import("./index-CCN_kElr.js"),[]),ZAe=lr("/settings/")({component:qn(YAe,"component")}),XAe=()=>Un(()=>import("./accounts-acXs4eC4.js"),__vite__mapDeps([20,6,21,2,17,3,5,22,9,10])),QAe=Ed({editAccountId:xr().optional(),focusSmtp:SAe().optional(),connected:xr().optional(),oauthError:xr().optional()}),JAe=lr("/settings/accounts")({component:qn(XAe,"component"),validateSearch:QAe}),eTe=()=>Un(()=>import("./advanced-B7NoXsKD.js"),__vite__mapDeps([23,21,2,22,4,13])),tTe=lr("/settings/advanced")({component:qn(eTe,"component")}),nTe=()=>Un(()=>import("./appearance-Dhv_uAhj.js"),__vite__mapDeps([24,21,2])),rTe=lr("/settings/appearance")({component:qn(nTe,"component")}),sTe=()=>Un(()=>import("./filters-CQIcTi4-.js"),__vite__mapDeps([25,21,2,8,11,15,13,9])),oTe=lr("/settings/filters")({component:qn(sTe,"component")}),iTe=()=>Un(()=>import("./folders-CDkO7bp3.js"),__vite__mapDeps([26,12,1,21,2,11,9])),aTe=lr("/settings/folders")({component:qn(iTe,"component")}),lTe=()=>Un(()=>import("./labels-CG1STcSC.js"),__vite__mapDeps([27,21,2,14,9,15])),uTe=lr("/settings/labels")({component:qn(lTe,"component")}),cTe=()=>Un(()=>import("./senders-be4RszaY.js"),__vite__mapDeps([28,3,21,2,9,7,10,1])),dTe=lr("/settings/senders")({component:qn(cTe,"component")}),fTe=()=>Un(()=>import("./suggested-vips-BGKAB2ch.js"),[]),hTe=lr("/settings/suggested-vips")({component:qn(fTe,"component")}),pTe=G_e.update({id:"/",path:"/",getParentRoute:()=>Ep}),Cp=IAe.update({id:"/mail",path:"/mail",getParentRoute:()=>Ep}),gTe=NAe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Ep}),Do=kAe.update({id:"/settings",path:"/settings",getParentRoute:()=>Ep}),mTe=FAe.update({id:"/",path:"/",getParentRoute:()=>Cp}),vTe=BAe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>Cp}),yTe=WAe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>Cp}),bTe=KAe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>Cp}),STe=ZAe.update({id:"/",path:"/",getParentRoute:()=>Do}),ETe=JAe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Do}),CTe=tTe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Do}),wTe=rTe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Do}),xTe=oTe.update({id:"/filters",path:"/filters",getParentRoute:()=>Do}),_Te=aTe.update({id:"/folders",path:"/folders",getParentRoute:()=>Do}),ATe=uTe.update({id:"/labels",path:"/labels",getParentRoute:()=>Do}),TTe=dTe.update({id:"/senders",path:"/senders",getParentRoute:()=>Do}),RTe=hTe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Do}),ITe={MailMailboxIdRoute:vTe,MailFlaggedRoute:yTe,MailOutboxRoute:bTe,MailIndexRoute:mTe},OTe=Cp._addFileChildren(ITe),NTe={SettingsAccountsRoute:ETe,SettingsAdvancedRoute:CTe,SettingsAppearanceRoute:wTe,SettingsFiltersRoute:xTe,SettingsFoldersRoute:_Te,SettingsLabelsRoute:ATe,SettingsSendersRoute:TTe,SettingsSuggestedVipsRoute:RTe,SettingsIndexRoute:STe},MTe=Do._addFileChildren(NTe),PTe={IndexRoute:pTe,MailRoute:OTe,OnboardingRoute:gTe,SettingsRoute:MTe},kTe=Ep._addFileChildren(PTe)._addFileTypes(),DTe=(t,e)=>{const n=Mme({routeTree:kTe,context:{queryClient:t},defaultPreload:"intent"});return n.subscribe("onResolved",r=>{e.recordPageView(r.toLocation.pathname),sne(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},J5=t=>t==null?"":""+t,LTe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},UTe=/###/g,e6=t=>t&&t.indexOf("###")>-1?t.replace(UTe,"."):t,t6=t=>!t||We(t),wh=(t,e,n)=>{const r=We(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(t6(t))return{};const o=e6(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return t6(t)?{}:{obj:t,k:e6(r[s])}},n6=(t,e,n)=>{const{obj:r,k:s}=wh(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=wh(t,a,Object);for(;u.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),u=wh(t,a,Object),u?.obj&&typeof u.obj[`${u.k}.${o}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${o}`]=n},FTe=(t,e,n,r)=>{const{obj:s,k:o}=wh(t,e,Object);s[o]=s[o]||[],s[o].push(n)},Sy=(t,e)=>{const{obj:n,k:r}=wh(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},zTe=(t,e,n)=>{const r=Sy(t,n);return r!==void 0?r:Sy(e,n)},bH=(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]):bH(t[r],e[r],n):t[r]=e[r]);return t},fc=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var jTe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const BTe=t=>We(t)?t.replace(/[&<>"'\/]/g,e=>jTe[e]):t;class HTe{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 $Te=[" ",",","?","!",";"],qTe=new HTe(20),WTe=(t,e,n)=>{e=e||"",n=n||"";const r=$Te.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=qTe.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},FA=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("_","-"),VTe={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||VTe,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 xo=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 r6 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:FA(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),n6(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?bH(c,r,o):c={...c,...r},n6(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 SH={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 s6={},o6=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(),LTe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=xo.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&&!WTe(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,T=n.count!==void 0&&!We(n.count),_=wy.hasDefaultValue(n),R=T?this.pluralResolver.getSuffix(f,n.count,n):"",M=n.ordinal&&T?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",N=T&&!n.ordinal&&n.count===0,O=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${M}`]||n.defaultValue;let k=m;w&&!m&&_&&(k=O);const F=o6(k),$=Object.prototype.toString.apply(k);if(w&&k&&F&&E.indexOf($)<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 Y in k)if(Object.prototype.hasOwnProperty.call(k,Y)){const te=`${q}${o}${Y}`;_&&!m?z[Y]=this.translate(te,{...n,defaultValue:o6(O)?O[Y]:void 0,joinArrays:!1,ns:u}):z[Y]=this.translate(te,{...n,joinArrays:!1,ns:u}),z[Y]===te&&(z[Y]=k[Y])}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)&&_&&(D=!0,m=O),this.isValidLookup(m)||(z=!0,m=a);const Y=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:m,te=_&&O!==m&&this.options.updateMissing;if(z||D||te){if(this.logger.log(te?"updateKey":"missingKey",f,c,a,te?O:m),o){const ce=this.resolve(a,{...n,keySeparator:!1});ce&&ce.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 H=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let ce=0;ce<ee.length;ce++)H.push(ee[ce]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(n.lng||this.language):H.push(n.lng||this.language);const de=(ce,xe,L)=>{const V=_&&L!==m?L:Y;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,c,xe,V,te,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ce,c,xe,V,te,n),this.emit("missingKey",ce,c,xe,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&T?H.forEach(ce=>{const xe=this.pluralResolver.getSuffixes(ce,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&xe.indexOf(`${this.options.pluralSeparator}zero`)<0&&xe.push(`${this.options.pluralSeparator}zero`),xe.forEach(L=>{de([ce],a+L,n[`defaultValue${L}`]||O)})}):de(H,a,O))}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=SH.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,!s6[`${E[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(s6[`${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 T=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(T,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&&(T.push(h+R),n.ordinal&&R.indexOf(N)===0&&T.push(h+R.replace(N,this.options.pluralSeparator)),y&&T.push(h+M)),S){const O=`${h}${this.options.contextSeparator}${n.context}`;T.push(O),m&&(T.push(O+R),n.ordinal&&R.indexOf(N)===0&&T.push(O+R.replace(N,this.options.pluralSeparator)),y&&T.push(O+M))}}let _;for(;_=T.pop();)this.isValidLookup(r)||(o=_,r=this.getResource(w,C,_,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 i6{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xo.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 a6={zero:0,one:1,two:2,few:3,many:4,other:5},l6={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class GTe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=xo.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!"),l6;if(!e.match(/-|_/))return l6;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)=>a6[s]-a6[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 u6=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=zTe(t,e,n);return!o&&s&&We(n)&&(o=FA(t,n,r),o===void 0&&(o=FA(e,n,r))),o},Dx=t=>t.replace(/\$/g,"$$$$");class KTe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xo.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:T}=e.interpolation;this.escape=n!==void 0?n:BTe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?fc(o):a||"{{",this.suffix=u?fc(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=m?fc(m):y||fc("$t("),this.nestingSuffix=S?fc(S):E||fc(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=w||1e3,this.alwaysFormat=T!==void 0?T:!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=u6(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(u6(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=>Dx(y)},{regex:this.regexp,safeValue:y=>this.escapeValue?Dx(this.escape(y)):Dx(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=J5(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=J5(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 YTe=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}},hc=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 ZTe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=xo.create("formatter"),this.options=e,this.formats={number:hc((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:hc((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:hc((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:hc((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:hc((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()]=hc(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}=YTe(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 XTe=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class QTe 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=xo.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=>{FTe(c.loaded,[o],a),XTe(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 c6=()=>({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}}),d6=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),qm=()=>{},JTe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class Jh 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=d6(e),this.services={},this.logger=xo,this.modules={external:[]},JTe(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=c6();this.options={...s,...this.options,...d6(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?xo.init(o(this.modules.logger),this.options):xo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=ZTe;const g=new i6(this.options);this.store=new r6(this.options.resources,this.options);const m=this.services;m.logger=xo,m.resourceStore=this.store,m.languageUtils=g,m.pluralResolver=new GTe(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 KTe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new QTe(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=qm),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]:qm;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=qm),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"&&SH.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 i6(c6());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Jh(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qm;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Jh(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(u=>{o[u]=this[u]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((h,g)=>(h[g]={...c[f][g]},h),{})),{});o.store=new r6(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=Jh.createInstance();pr.createInstance=Jh.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:eRe,forEach:tRe}=[];function nRe(t){return tRe.call(eRe.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function rRe(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 f6=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,sRe=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(!f6.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!f6.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},h6={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=sRe(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 oRe={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return h6.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=e;n&&typeof document<"u"&&h6.create(n,t,r,s,o)}},iRe={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}},aRe={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 pc=null;const p6=()=>{if(pc!==null)return pc;try{if(pc=typeof window<"u"&&window.localStorage!==null,!pc)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{pc=!1}return pc};var lRe={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&p6())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&p6()&&window.localStorage.setItem(n,t)}};let gc=null;const g6=()=>{if(gc!==null)return gc;try{if(gc=typeof window<"u"&&window.sessionStorage!==null,!gc)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{gc=!1}return gc};var uRe={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&g6())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&g6()&&window.sessionStorage.setItem(n,t)}},cRe={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}},dRe={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}},fRe={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}},hRe={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 EH=!1;try{document.cookie,EH=!0}catch{}const CH=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];EH||CH.splice(1,1);const pRe=()=>({order:CH,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class wH{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=nRe(n,this.options||{},pRe()),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(oRe),this.addDetector(iRe),this.addDetector(lRe),this.addDetector(uRe),this.addDetector(cRe),this.addDetector(dRe),this.addDetector(fRe),this.addDetector(hRe),this.addDetector(aRe)}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&&!rRe(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)}))}}wH.type="languageDetector";function gRe(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=mRe(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 mRe(t,e){if(t){if(typeof t=="string")return m6(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)?m6(t,e):void 0}}function m6(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 zA(t){"@babel/helpers - typeof";return zA=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},zA(t)}var xH=["__proto__","constructor","prototype"];function _H(t){return!(typeof t!="string"||t.length===0||t.length>128||xH.indexOf(t)>-1||t.indexOf("..")>-1||t.indexOf("\\")>-1||/[?#%\s@]/.test(t)||/[\x00-\x1F\x7F]/.test(t))}function AH(t){return!(!_H(t)||t.indexOf("/")>-1)}function vRe(t){return _H(t)}var yRe={lng:AH,ns:vRe};function Wm(t){return typeof t!="string"?t:t.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function bRe(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 TH(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":zA(XMLHttpRequest))==="object"}function SRe(t){return!!t&&typeof t.then=="function"}function ERe(t){return SRe(t)?t:Promise.resolve(t)}var CRe=/\{\{(.+?)\}\}/g;function v6(t,e){var n=!1,r=t.replace(CRe,function(s,o){var a=o.trim();if(xH.indexOf(a)>-1)return s;var u=e[a];if(u==null)return s;var c=yRe[a]||AH,f=String(u).split("+"),h=gRe(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 y6(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 b6(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?y6(Object(n),!0).forEach(function(r){wRe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wRe(t,e,n){return(e=xRe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xRe(t){var e=_Re(t,"string");return nu(e)=="symbol"?e:e+""}function _Re(t,e){if(nu(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nu(t){"@babel/helpers - typeof";return nu=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},nu(t)}var Va=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Va=global.fetch:typeof window<"u"&&window.fetch&&(Va=window.fetch);var ep;TH()&&(typeof global<"u"&&global.XMLHttpRequest?ep=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ep=window.XMLHttpRequest));var xy;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?xy=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(xy=window.ActiveXObject));typeof Va!="function"&&(Va=void 0);if(!Va&&!ep&&!xy)try{Un(()=>import("./browser-ponyfill-BVkCMLYU.js").then(t=>t.b),[]).then(function(t){Va=t.default}).catch(function(){})}catch{}var RH=["__proto__","constructor","prototype"],jA=function(e,n){if(n&&nu(n)==="object"){for(var r="",s=0,o=Object.keys(n);s<o.length;s++){var a=o[s];RH.indexOf(a)>-1||(r+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},S6=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):Va(e,n).then(o).catch(r)},ARe=function(e,n,r,s){e.queryStringParams&&(n=jA(n,e.queryStringParams));var o=b6({},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=b6({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{S6(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]}),S6(n,u,s,c),e._omitFetchOptions=!0}catch(h){s(h)}}},TRe=function(e,n,r,s){r&&nu(r)==="object"&&(r=jA("",r).slice(1)),e.queryStringParams&&(n=jA(n,e.queryStringParams));try{var o=ep?new ep: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];RH.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)}},RRe=function(e,n,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Va&&n.indexOf("file:")!==0)return ARe(e,n,r,s);if(TH()||typeof ActiveXObject=="function")return TRe(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 E6(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 Lx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?E6(Object(n),!0).forEach(function(r){IH(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E6(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function IRe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ORe(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,OH(r.key),r)}}function NRe(t,e,n){return e&&ORe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function IH(t,e,n){return(e=OH(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function OH(t){var e=MRe(t,"string");return id(e)=="symbol"?e:e+""}function MRe(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 PRe=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 IH({},r,s||"")},parseLoadPayload:function(n,r){},request:RRe,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},NH=(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]:{};IRe(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return NRe(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=Lx(Lx(Lx({},PRe()),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=ERe(c),c.then(function(f){if(!f)return a(null,{});var h=v6(f,{lng:n.join("+"),ns:s.join("+")});if(h==null){var g=n.map(Wm).join(", "),m=s.map(Wm).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=Wm(bRe(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+": "+Wm(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=v6(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)})})})}}}])})();NH.type="backend";pr.use(NH).use(wH).use(Wwe).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 kRe=({authProvider:t,rootElementId:e="root"})=>{tne(),Pwe(),t.configure(),sve(t);const n=Nwe();Wte(n);const r=new Ipe({queryCache:new U7({onError:lve}),mutationCache:new L7({onError:uve}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}}),s=DTe(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;jme.createRoot(o).render(I.jsx(x.StrictMode,{children:I.jsx(rH.Provider,{value:n,children:I.jsxs(Ope,{client:r,children:[I.jsx(ave,{value:t,children:I.jsx(a,{children:I.jsx(Dme,{router:s})})}),!1]})})}))};kRe({authProvider:ipe});export{vb as $,fQ as A,as as B,Jx as C,hJ as D,XJ as E,vQ as F,D8 as G,H8 as H,SQ as I,DRe as J,LRe as K,e_ as L,EQ as M,eIe as N,aT as O,YRe as P,xpe as Q,j as R,_Q as S,TQ as T,JRe as U,bd as V,Dn as W,La as X,Uv as Y,R7 as Z,QN as _,tn as a,l2e as a$,Npe as a0,kpe as a1,Fpe as a2,Dpe as a3,Lpe as a4,Er as a5,jpe as a6,y4 as a7,Upe as a8,Bpe as a9,Xxe as aA,L2e as aB,r_e as aC,pH as aD,O2e as aE,k2e as aF,R2e as aG,Un as aH,p2e as aI,Qxe as aJ,a_e as aK,Vxe as aL,S2e as aM,u_e as aN,x2e as aO,C2e as aP,wAe as aQ,b2e as aR,h2e as aS,fz as aT,_2e as aU,w2e as aV,D2e as aW,M2e as aX,d2e as aY,N2e as aZ,H2e as a_,hs as aa,Wr as ab,sme as ac,P2e as ad,CR as ae,s2e as af,CAe as ag,Mx as ah,sIe as ai,a3 as aj,fne as ak,dz as al,Zwe as am,z2e as an,$2e as ao,zIe as ap,j7 as aq,e_e as ar,L8 as as,Hpe as at,T2e as au,I2e as av,A2e as aw,f2e as ax,Fee as ay,tte as az,dt as b,Xee as b$,VRe as b0,zRe as b1,E2e as b2,r_ as b3,QJ as b4,AQ as b5,pz as b6,Ua as b7,l_e as b8,Hy as b9,GIe as bA,hT as bB,Ete as bC,Ed as bD,SAe as bE,xr as bF,U2e as bG,m2e as bH,v2e as bI,JAe as bJ,qIe as bK,VIe as bL,q2e as bM,wQ as bN,W2e as bO,XRe as bP,BRe as bQ,ZRe as bR,O_e as bS,zte as bT,Ute as bU,Lte as bV,R5 as bW,vS as bX,jIe as bY,XIe as bZ,QIe as b_,VJ as ba,Yxe as bb,ql as bc,Hxe as bd,aH as be,Cxe as bf,Ixe as bg,Txe as bh,Axe as bi,c2e as bj,g2e as bk,HIe as bl,j2e as bm,B2e as bn,Ga as bo,vxe as bp,F9 as bq,Dy as br,AAe as bs,jRe as bt,pT as bu,vz as bv,Zxe as bw,nIe as bx,WIe as by,$Ie as bz,j8 as c,iie as c$,rte as c0,KIe as c1,ZIe as c2,qxe as c3,YIe as c4,a2e as c5,u2e as c6,pte as c7,GRe as c8,hte as c9,Zy as cA,zF as cB,eie as cC,Hae as cD,Xae as cE,nie as cF,Yoe as cG,Vy as cH,CT as cI,X9 as cJ,Kae as cK,qae as cL,aie as cM,zae as cN,VT as cO,eF as cP,rie as cQ,Mae as cR,Pae as cS,_re as cT,uu as cU,mre as cV,gre as cW,ET as cX,$F as cY,Nae as cZ,bre as c_,BIe as ca,dxe as cb,JIe as cc,i2e as cd,kx as ce,F2e as cf,ite as cg,o2e as ch,Q5 as ci,qRe as cj,e2e as ck,t2e as cl,Wxe as cm,r2e as cn,n2e as co,y2e as cp,Jxe as cq,Fg as cr,sF as cs,Mo as ct,zT as cu,Ri as cv,Fae as cw,Ii as cx,Oae as cy,rF as cz,OP as d,Lae as d0,wT as d1,kae as d2,ele as d3,KF as d4,FRe as d5,ap as d6,QRe as d7,HT as d8,sb as d9,cp as da,Yae as db,lp as dc,Zae as dd,$ae as de,yP as e,pQ as f,HRe as g,fJ as h,JJ as i,I as j,hQ as k,s_ as l,$J as m,$Re as n,q8 as o,WRe as p,GJ as q,x as r,xQ as s,Ste as t,WJ as u,yte as v,yQ as w,KRe as x,YJ as y,W8 as z};