1"use strict";(self.webpackChunk_amzn_sidewalk_amazon_website_assets=self.webpackChunk_amzn_sidewalk_amazon_website_assets||[]).push([[8509],{335:(e,t,n)=>{if(n.d(t,{a:()=>i}),2539==n.j)var o=n(38569);const i=(e,t,n)=>[o.EK,e,t,n].join("\n")},767:(e,t,n)=>{if(n.d(t,{b:()=>r}),2539==n.j)var o=n(89641);if(2539==n.j)var i=n(45777);function r(e){const t=(0,o.Cq)(e).payload.iss,n={};if(!t)throw new i.l({name:"InvalidIdTokenException",message:"Invalid Idtoken."});return n[t.replace(/(^\w+:|^)\/\//,"")]=e,n}},1364:(e,t,n)=>{if(n.d(t,{z:()=>a}),2539==n.j)var o=n(35746);if(2539==n.j)var i=n(58707);if(2539==n.j)var r=n(38569);if(2539==n.j)var s=n(50814);const a=(e,t)=>{const n=(0,i.y)(t),{accessKeyId:a,credentialScope:c,longDate:d,sessionToken:u}=n,l={...e.headers};l[r.zX]=e.url.host,l[r.ot]=d,u&&(l[r.wE]=u);const h={...e,headers:l},g=(0,s.d)(h,n),f=`Credential=${a}/${c}`,p=`SignedHeaders=${(0,o.Z)(l)}`,y=`Signature=${g}`;return l[r.H1]=`${r.EK} ${f}, ${p}, ${y}`,h}},1478:(e,t,n)=>{n.d(t,{g:()=>i,o:()=>o});const o=URL,i=2539==n.j?URLSearchParams:null},1611:(e,t,n)=>{n.d(t,{m:()=>i});var o=n(16736);const i={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),(()=>{if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob;if("function"==typeof atob)return atob;throw new o.x({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})})()(n)}}},1848:(e,t,n)=>{if(n.d(t,{G:()=>i}),2539==n.j)var o=n(58741);const i=2539==n.j?o.A:null},1964:(e,t,n)=>{if(n.d(t,{D:()=>r}),2539==n.j)var o=n(87525);if(2539==n.j)var i=n(49423);const r=e=>async(t,n)=>{const o=n??await e(t)??void 0,r=o?.code||o?.name,s=t?.statusCode;return{retryable:d(n)||c(s,r)||(0,i.h)(r)||u(s,r)}},s=2539==n.j?["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"]:null,a=2539==n.j?["TimeoutError","RequestTimeout","RequestTimeoutException"]:null,c=(e,t)=>429===e||!!t&&s.includes(t),d=e=>[o.m.NetworkError,"ERR_NETWORK"].includes(e?.name),u=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&a.includes(t)},8404:(e,t,n)=>{n.d(t,{K7:()=>o,Q8:()=>r,jy:()=>i,mU:()=>s});const o=3,i="amz-sdk-invocation-id",r="amz-sdk-request",s=2539==n.j?3e5:null},10208:(e,t,n)=>{n.d(t,{_:()=>o});const o=e=>(t,n)=>{const o=i(e),s=JSON.stringify(t);return r(n,o,s)},i=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),r=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"})},10742:(e,t,n)=>{n.d(t,{c:()=>o});const o="CognitoIdentityServiceProvider"},11686:(e,t,n)=>{if(n.d(t,{X:()=>r}),2539==n.j)var o=n(38569);if(2539==n.j)var i=n(36715);const r=(e,t,n,r)=>{const s=`${o.nt}${e}`,a=(0,i.I)(s,t),c=(0,i.I)(a,n),d=(0,i.I)(c,r);return(0,i.I)(d,o.VQ)}},15907:(e,t,n)=>{n.d(t,{s:()=>p});var o=n(89641),i=n(33658),r=n(98599),s=n(45777),a=n(1478),c=n(58416);const d=({endpointOverride:e})=>t=>e?{url:new a.o(e)}:(0,c.o)(t);var u=n(87592),l=n(10208),h=n(77809),g=n(68135),f=n(60840);const p=(e=>{let t;return async(...n)=>t||(t=new Promise((o,i)=>{e(...n).then(e=>{o(e)}).catch(e=>{i(e)}).finally(()=>{t=void 0})}),t)})(async({tokens:e,authConfig:t,username:n,clientMetadata:a})=>{(0,o.$y)(t?.Cognito);const{userPoolId:c,userPoolClientId:p,userPoolEndpoint:y}=t.Cognito,m=(0,i.J)(c);(0,r.X4)(e);const I=(w={endpointResolver:d({endpointOverride:y})},(0,u.A)(g.e,(0,l._)("GetTokensFromRefreshToken"),(0,h.T)(),{...f.C,...w}));var w;const{AuthenticationResult:v}=await I({region:m},{ClientId:p,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:a}),S=(0,o.Cq)(v?.AccessToken??""),A=v?.IdToken?(0,o.Cq)(v.IdToken):void 0,{iat:C}=S.payload;if(!C)throw new s.l({name:"iatNotFoundException",message:"iat not found in access token"});return{accessToken:S,idToken:A,clockDrift:1e3*C-(new Date).getTime(),refreshToken:v?.RefreshToken??e.refreshToken,username:n}})}
1,16064:(e,t,n)=>{n.d(t,{m:()=>o});const o=({headers:e},t)=>!e.authorization&&!!t},16736:(e,t,n)=>{n.d(t,{x:()=>o});class o extends Error{constructor({message:e,name:t,recoverySuggestion:n,underlyingError:i,metadata:r}){if(super(e),this.name=t,this.underlyingError=i,this.recoverySuggestion=n,r){const{extendedRequestId:e,httpStatusCode:t,requestId:n}=r;this.metadata={extendedRequestId:e,httpStatusCode:t,requestId:n}}this.constructor=o,Object.setPrototypeOf(this,o.prototype)}}},18018:(e,t,n)=>{if(n.d(t,{R:()=>i}),2539==n.j)var o=n(93609);const i=e=>{const{partitions:t}=o.k;for(const{regions:n,outputs:o,regionRegex:i}of t){const t=new RegExp(i);if(n.includes(e)||t.test(e))return o.dnsSuffix}return o.q.outputs.dnsSuffix}},18180:(e,t,n)=>{n.d(t,{I:()=>i});const o=2539==n.j?[]:null,i=e=>{o.push(e)}},18413:(e,t,n)=>{if(n.d(t,{t:()=>s}),2539==n.j)var o=n(18018);if(2539==n.j)var i=n(1478);if(n(38763),n(68004),2539==n.j)var r=n(79434);const s=({region:e})=>({url:new i.o(`https://${r.v}.${e}.${(0,o.R)(e)}`)})},18594:(e,t,n)=>{if(n.d(t,{p:()=>i}),2539==n.j)var o=n(16736);const i=(e,t=o.x)=>(n,o,i)=>{const{message:r,recoverySuggestion:s}=e[o];if(!n)throw new t({name:o,message:i?`${r} ${i}`:r,recoverySuggestion:s})}},19897:(e,t,n)=>{function o(e){const{version:t}=e;return!!t&&t.startsWith("1")}function i(e){const t={};if(e.storage&&(t.Storage=function(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:o}=e;return{S3:{bucket:t,region:n,buckets:o&&d(o)}}}(e.storage)),e.auth&&(t.Auth=function(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:o,password_policy:i,mfa_configuration:r,mfa_methods:s,unauthenticated_identities_enabled:a,oauth:d,username_attributes:u,standard_required_attributes:l,groups:h}=e,g={Cognito:{userPoolId:t,userPoolClientId:n,groups:h}};return o&&(g.Cognito={...g.Cognito,identityPoolId:o}),i&&(g.Cognito.passwordFormat={requireLowercase:i.require_lowercase,requireNumbers:i.require_numbers,requireUppercase:i.require_uppercase,requireSpecialCharacters:i.require_symbols,minLength:i.min_length??6}),r&&(g.Cognito.mfa={status:(f=r,"OPTIONAL"===f?"optional":"REQUIRED"===f?"on":"off"),smsEnabled:s?.includes("SMS"),totpEnabled:s?.includes("TOTP")}),a&&(g.Cognito.allowGuestAccess=a),d&&(g.Cognito.loginWith={oauth:{domain:d.domain,redirectSignIn:d.redirect_sign_in_uri,redirectSignOut:d.redirect_sign_out_uri,responseType:"token"===d.response_type?"token":"code",scopes:d.scopes,providers:c(d.identity_providers)}}),u&&(g.Cognito.loginWith={...g.Cognito.loginWith,email:u.includes("email"),phone:u.includes("phone_number"),username:u.includes("username")}),l&&(g.Cognito.userAttributes=l.reduce((e,t)=>({...e,[t]:{required:!0}}),{})),g;var f}(e.auth)),e.analytics&&(t.Analytics=function(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}(e.analytics)),e.geo&&(t.Geo=function(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:o,search_indices:i}=e;return{LocationService:{region:t,searchIndices:i,geofenceCollections:n,maps:o}}}(e.geo)),e.data&&(t.API=function(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:o,api_key:i,model_introspection:r}=e;return{GraphQL:{endpoint:o,defaultAuthMode:s(n),region:t,apiKey:i,modelIntrospection:r}}}(e.data)),e.custom){const n=function(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:o,default_authorization_type:i}=e.events;return{Events:{endpoint:t,defaultAuthMode:s(i),region:n,apiKey:o}}}(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=function(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:o}=e,i=n.includes("IN_APP_MESSAGING"),r=n.includes("APNS")||n.includes("FCM");if(!i&&!r)return;const s={};return i&&(s.InAppMessaging={Pinpoint:{appId:o,region:t}}),r&&(s.PushNotification={Pinpoint:{appId:o,region:t}}),s}(e.notifications)),t}n.d(t,{F$:()=>o,sm:()=>i});const r={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function s(e){return r[e]}const a={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function c(e=[]){return e.reduce((e,t)=>
1(void 0!==a[t]&&e.push(a[t]),e),[])}function d(e){const t={};return e.forEach(({name:e,bucket_name:n,aws_region:o,paths:i})=>{if(e in t)throw new Error(`Duplicate friendly name found: ${e}. Name must be unique.`);const r=i?Object.entries(i).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}):void 0;t[e]={bucketName:n,region:o,paths:r}}),t}},19985:(e,t,n)=>{n.d(t,{F:()=>d});var o=n(82313),i=n(1848),r=(n(38763),n(68004),n(8404)),s=n(70547),a=n(98306),c=n(62463);const d=(0,a.q)(c.Q,[s.L,()=>e=>async function(t){return t.headers[r.jy]||(t.headers[r.jy]=(0,i.G)()),e(t)},o.b,({maxAttempts:e=r.K7})=>(t,n)=>async function(o){const i=n.attemptsCount??0;return o.headers[r.Q8]=`attempt=${i+1}; max=${e}`,t(o)}])},20032:(e,t,n)=>{if(n.d(t,{R:()=>i}),2539==n.j)var o=n(84885);const i=(e,t)=>{const{service:n=o.nW,region:i=o.J}=t?.amplify.getConfig()?.API?.REST?.[t?.apiName]??{},{hostname:r}=e,[,s,a]=o.JU.exec(r)??[];return s===o.nW?{service:s,region:a??i}:"appsync-api"===s?{service:"appsync",region:a??i}:{service:n,region:i}}},20126:(e,t,n)=>{n.d(t,{H:()=>u});var o=n(26886);const i=e=>{const t=Reflect.ownKeys(e);for(const n of t){const t=e[n];(t&&"object"==typeof t||"function"==typeof t)&&i(t)}return Object.freeze(e)},r=Symbol("oauth-listener");var s=n(30281);n(38763),n(68004);const a=new(n(84210).C)("Auth");class c{configure(e,t){this.authConfig=e,this.authOptions=t,e&&e.Cognito?.userPoolEndpoint&&a.warn(d("Amazon Cognito User Pool")),e&&e.Cognito?.identityPoolEndpoint&&a.warn(d("Amazon Cognito Identity Pool"))}async fetchAuthSession(e={}){let t,n;const o=await this.getTokens(e);return o?(n=o.accessToken?.payload?.sub,t=await(this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:o,authenticated:!0,forceRefresh:e.forceRefresh}))):t=await(this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:e.forceRefresh})),{tokens:o,credentials:t?.credentials,identityId:t?.identityId,userSub:n}}async clearCredentials(){await(this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId())}async getTokens(e){return await(this.authOptions?.tokenProvider?.getTokens(e))??void 0}}const d=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`,u=new class{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new c}configure(e,t){const n=(0,s.M)(e);this.resourcesConfig=n,t&&(this.libraryOptions=t),this.resourcesConfig=i(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),o.YZ.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",o.U9),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}[r](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)}}},22055:(e,t,n)=>{n.d(t,{u:()=>o});const o=e=>{const t=e.toISOString().replace(/[:-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}}},23e3:(e,t,n)=>{if(n.d(t,{y:()=>r}),2539==n.j)var o=n(29316);if(2539==n.j)var i=n(8404);const r=e=>{const t=(0,o.y)(i.mU)(e);return!1===t?i.mU:t}},24423:(e,t,n)=>{n.d(t,{n:()=>o});const o=e=>{let t;return()=>(t||(t=e()),t)}},25110:(e,t,n)=>{let o;n.d(t,{A:()=>r});const i=new Uint8Array(16);function r(){if(!o){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");o=crypto.getRandomValues.bind(crypto)}return o(i)}},26886:(e,t,n)=>{n.d(t,{U9:()=>s,YZ:()=>d});var o=n(84210),i=n(84597),r=n(16736);const s="undefined"!=typeof Symbol?Symbol("amplify_default"):"@@amplify_default",a=new o.C("Hub");class c{constructor(e){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=e}_remove(e,t){const n=this.listeners.get(e);n?this.listeners.set(e,[...n.filter(({callback:e})=>e!==t)]):a.warn(`No listeners for ${e}`)}
1dispatch(e,t,n,o){"string"==typeof e&&this.protectedChannels.indexOf(e)>-1&&(o===s||a.warn(`WARNING: ${e} is protected and dispatching on it can have unintended consequences`));const i={channel:e,payload:{...t},source:n,patternInfo:[]};try{this._toListeners(i)}catch(e){a.error(e)}}listen(e,t,n="noname"){let o;if("function"!=typeof t)throw new r.x({name:i.d1,message:"No callback supplied to Hub"});o=t;let s=this.listeners.get(e);return s||(s=[],this.listeners.set(e,s)),s.push({name:n,callback:o}),()=>{this._remove(e,o)}}_toListeners(e){const{channel:t,payload:n}=e,o=this.listeners.get(t);o&&o.forEach(o=>{a.debug(`Dispatching to ${t} with `,n);try{o.callback(e)}catch(e){a.error(e)}})}}const d=new c("__default__");new c("internal-hub")},29316:(e,t,n)=>{if(n.d(t,{y:()=>i}),2539==n.j)var o=n(55e3);function i(e=o.M){return t=>{const n=2**t*100+100*Math.random();return!(n>e)&&n}}},30043:(e,t,n)=>{n.d(t,{_:()=>o});class o{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,t){this.storage.set(e,t)}getItem(e){return this.storage.get(e)??null}removeItem(e){this.storage.delete(e)}clear(){this.storage.clear()}}},30281:(e,t,n)=>{if(n.d(t,{M:()=>r}),2539==n.j)var o=n(84307);if(2539==n.j)var i=n(19897);const r=e=>Object.keys(e).some(e=>e.startsWith("aws_"))?(0,o.s)(e):(0,i.F$)(e)?(0,i.sm)(e):e},31317:(e,t,n)=>{var o,i,r,s,a,c,d,u,l,h,g,f,p,y;n.d(t,{dT:()=>o}),function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"}(o||(o={})),function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"}(i||(i={})),function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"}(r||(r={})),function(e){e.Record="1",e.IdentifyUser="2"}(s||(s={})),function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"}(a||(a={})),function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"}(c||(c={})),function(e){e.Subscribe="1",e.GraphQl="2"}(d||(d={})),function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"}(u||(u={})),function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"}(l||(l={})),function(e){e.None="0"}(h||(h={})),function(e){e.Convert="1",e.Identify="2",e.Interpret="3"}(g||(g={})),function(e){e.Subscribe="1"}(f||(f={})),function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"}(p||(p={})),function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"}(y||(y={}))},31786:(e,t,n)=>{n.d(t,{fE:()=>f});var o=n(31317);const i="6.15.8";var r=n(61309);let s;const a=[];let c=!1;const d=()=>{if(!s){if(s=(0,r.o)(),c)for(;a.length;)a.pop()?.();else a.forEach(e=>{e()});u(o.dT.ServerSideUnknown,10),u(o.dT.WebUnknown,10)}return s};function u(e,t){s!==e||c||setTimeout(()=>{s=void 0,c=!0,setTimeout(d,1e3)},t)}var l=n(69613);const h="aws-amplify",g=e=>e.replace(/\+.*/,"");new class{constructor(){this.userAgent=`${h}/${g(i)}`}get framework(){return d()}get isReactNative(){return this.framework===o.dT.ReactNative||this.framework===o.dT.Expo}observeFrameworkChanges(e){(e=>{c||a.push(e)})(e)}};const f=e=>(({category:e,action:t}={})=>{const n=[[h,g(i)]];if(e&&n.push([e,t]),n.push(["framework",d()]),e&&t){const o=(0,l.e)(e,t);
1o&&o.forEach(e=>{n.push(e)})}return n})(e).map(([e,t])=>e&&t?`${e}/${t}`:e).join(" ")},31859:(e,t,n)=>{n.d(t,{j:()=>o});const o={identityId:"identityId"}},33416:(e,t,n)=>{n.d(t,{D:()=>o});const o=(e,t)=>{const n={};for(const t in e)n[t.toLowerCase()]=e[t];if(t){const e=n["content-type"];e&&(e.startsWith("application/json")||e.startsWith("application/")&&e.includes("+json"))||(n["content-type"]="application/json; charset=UTF-8"),t instanceof FormData&&delete n["content-type"]}return n}},33658:(e,t,n)=>{if(n.d(t,{C:()=>r,J:()=>i}),2539==n.j)var o=n(45777);function i(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||"string"!=typeof t)throw new o.l({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function r(e){if(!e||!e.includes(":"))throw new o.l({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}},34624:(e,t,n)=>{n.d(t,{A:()=>o});const o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)}},35066:(e,t,n)=>{if(n.d(t,{A:()=>l}),2539==n.j)var o=n(26886);if(2539==n.j)var i=n(48104);if(2539==n.j)var r=n(71142);if(2539==n.j)var s=n(89641);if(2539==n.j)var a=n(68478);if(2539==n.j)var c=n(45777);if(2539==n.j)var d=n(55518);if(2539==n.j)var u=n(18180);class l{constructor(){this.waitForInflightOAuth=(0,i.B)()?async()=>{if(await d.f.loadOAuthInFlight())return this.inflightPromise||(this.inflightPromise=new Promise((e,t)=>{(0,u.I)(e)})),this.inflightPromise}:async()=>{}}setAuthConfig(e){d.f.setAuthConfig(e.Cognito),this.authConfig=e}setTokenRefresher(e){this.tokenRefresher=e}setAuthTokenStore(e){this.tokenStore=e}getTokenStore(){if(!this.tokenStore)throw new c.l({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new c.l({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(e){this.clientMetadataProvider=e}async getTokens(e){let t;try{(0,s.$y)(this.authConfig?.Cognito)}catch(e){return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,t=await this.getTokenStore().loadTokens();const n=await this.getTokenStore().getLastAuthUser();if(null===t)return null;const o=!!t?.idToken&&(0,r.H)({expiresAt:1e3*(t.idToken?.payload?.exp??0),clockDrift:t.clockDrift??0}),i=(0,r.H)({expiresAt:1e3*(t.accessToken?.payload?.exp??0),clockDrift:t.clockDrift??0});return(e?.forceRefresh||o||i)&&(t=await this.refreshTokens({tokens:t,username:n,clientMetadata:e?.clientMetadata??await(this.clientMetadataProvider?.())}),null===t)?null:{accessToken:t?.accessToken,idToken:t?.idToken,signInDetails:t?.signInDetails}}async refreshTokens({tokens:e,username:t,clientMetadata:n}){try{const{signInDetails:i}=e,r=await this.getTokenRefresher()({tokens:e,authConfig:this.authConfig,username:t,clientMetadata:n});return r.signInDetails=i,await this.setTokens({tokens:r}),o.YZ.dispatch("auth",{event:"tokenRefresh"},"Auth",o.U9),r}catch(e){return this.handleErrors(e)}}handleErrors(e){if((0,a.e)(e),this.isAuthenticationError(e)&&this.clearTokens(),o.YZ.dispatch("auth",{event:"tokenRefresh_failure",data:{error:e}},"Auth",o.U9),e.name.startsWith("NotAuthorizedException"))return null;throw e}isAuthenticationError(e){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(t=>e?.name?.startsWith?.(t))}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()}}},35746:(e,t,n)=>{n.d(t,{Z:()=>o});const o=e=>Object.keys(e).map(e=>e.toLowerCase()).sort().join(";")},36715:(e,t,n)=>{n.d(t,{I:()=>r,h:()=>s});var o=n(38763),i=n(68004);const r=(e,t)=>{const n=new o.I(e??void 0);return n.update(t),n.digestSync()},s=(e,t)=>{const n=r(e,t);return(0,i.n)(n)}},38569:(e,t,n)=>{n.d(t,{EK:()=>c,H1:()=>o,VQ:()=>a,fM:()=>u,nt:()=>d,ot:()=>r,wE:()=>s,z8:()=>l,zX:()=>i});const o="authorization",i="host",r="X-Amz-Date".toLowerCase(),s="X-Amz
1-Security-Token".toLowerCase(),a="aws4_request",c="AWS4-HMAC-SHA256",d="AWS4",u="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",l="UNSIGNED-PAYLOAD"},41185:(e,t,n)=>{n.d(t,{C:()=>o});const o=e=>new Date(Date.now()+e)},45054:(e,t,n)=>{n.d(t,{h:()=>r});var o=n(87525),i=n(16736);class r extends i.x{constructor(){super({name:o.m.PlatformNotSupported,message:"Function not supported on current platform"})}}},45668:(e,t,n)=>{n.d(t,{bE:()=>x});var o=n(16736);class i extends o.x{get response(){return this._response?r(this._response):void 0}constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype),e.response&&(this._response=e.response)}}const r=e=>({...e,headers:{...e.headers}});class s extends i{constructor(e){super(e),this.constructor=s,Object.setPrototypeOf(this,s.prototype)}}class a extends s{constructor(e={}){super({name:"CanceledError",message:"Request is canceled by user",...e}),this.constructor=a,Object.setPrototypeOf(this,a.prototype)}}var c,d=n(20126);!function(e){e.InvalidApiName="InvalidApiName"}(c||(c={}));const u={[c.InvalidApiName]:{message:"API name is invalid.",recoverySuggestion:"Check if the API name matches the one in your configuration or `aws-exports.js`"}};var l=n(53553);const h=async e=>{if(!e)return;const t=await(0,l.F)(g(e));if(t){const n=await(e.body?.text());return f(t,{statusCode:e.statusCode,headers:e.headers,body:n})}},g=e=>{let t;const n=new Proxy(e.body,{get:(e,n,o)=>"json"===n?async()=>{t||(t=e.text());try{return JSON.parse(await t)}catch(e){return{}}}:"text"===n?async()=>(t||(t=e.text()),t):Reflect.get(e,n,o)});return new Proxy(e,{get:(e,t,o)=>"body"===t?n:Reflect.get(e,t,o)})},f=(e,t)=>{const n=new s({name:e?.name,message:e.message,underlyingError:e,response:t});return Object.assign(n,{$metadata:e.$metadata})},p=new(n(84210).C)("RestApis");var y=n(20032),m=n(1478);var I=n(16064),w=n(23e3),v=n(1964),S=n(33416),A=n(62463),C=n(70547),_=n(82313),k=n(1364),E=(n(38763),n(68004),n(41185)),b=n(92932);var T=n(98306);const P=(0,T.q)(A.Q,[C.L,_.b,({credentials:e,region:t,service:n,uriEscapePath:o=!0})=>{let i;return(r,s)=>async function(a){i=i??0;const c={credentials:"function"==typeof e?await e({forceRefresh:!!s?.isCredentialsExpired}):e,signingDate:(0,E.C)(i),signingRegion:t,signingService:n,uriEscapePath:o},d=await(0,k.z)(a,c),u=await r(d),l=(({headers:e}={})=>e?.date??e?.Date??e?.["x-amz-date"])(u);return l&&(i=(0,b.m)(Date.parse(l),i)),u}}]),O=(0,T.q)(A.Q,[C.L,_.b]),R=e=>{const t=e?.strategy;return"no-retry"===t?()=>Promise.resolve({retryable:!1}):(0,v.D)(h)},j=(e,t,n)=>{const{apiName:o,options:i={},path:r}=t,d=e.libraryOptions?.API?.REST?.timeout?.({apiName:o,method:n}),l=i?.timeout||d||void 0,g=new AbortController,f=g.signal;return function(e,t,n,o){const i=t.signal;let r;if(null!=o){if(o<0)throw new Error("Timeout must be a non-negative number");setTimeout(()=>{r="TimeoutError",t.abort(r)},o)}const s=async()=>{try{const t=await e();if(t.statusCode>=300)throw await h(t);return t}catch(e){if("AbortError"===e.name||!0===i?.aborted){if(r&&"TimeoutError"===r){const e=new Error(`Request timeout after ${o}ms`);throw e.name="TimeoutError",p.debug(e),e}{const t=r??i.reason,n=new a({...t&&{message:t},underlyingError:e,recoverySuggestion:"The API request was explicitly canceled. If this is not intended, validate if you called the `cancel()` function on the API request erroneously."});throw p.debug(n),n}}throw p.debug(e),e}};{const e=e=>{!0!==i.aborted&&(t.abort(e),e&&i.reason!==e&&(r=e))};return{response:s(),cancel:e}}}(async()=>{const t=((e,t,n,o)=>{const i=e.getConfig()?.API?.REST?.[t]?.endpoint;!function(e,t){const{message:n,recoverySuggestion:o}=u[t];if(!e)throw new s({name:t,message:n,recoverySuggestion:o})}(!!i,c.InvalidApiName);try{let e;if(e=m.o.canParse(i+n)?new m.o(i+n):new m.o(i+n,location?.origin),o){const t=new m.g(e.searchParams);Object.entries(o).forEach(([e,n])=>{t.set(e,n)}),e.search=new m.g(t).toString()}return e}catch(e){throw new s({name:c.InvalidApiName,...u[c.InvalidApiName],recoverySuggestion:`Please make sure the REST endpoint URL is a valid URL string. Got ${i}`})}})(e,o,r,i?.queryParams),a=await(e.libraryOptions?.API?.REST?.headers?.({apiName:o})),{headers:d={}}=i,l={...a,...d},h=(0,y.R)(t,{amplify:e,apiName:o});return p.debug(n,t,l,`IAM signing options: ${JSON.stringify(h)}`),(async(e,t,n,o)=>
1{const{url:i,method:r,headers:s,body:a,withCredentials:c,abortSignal:d,retryStrategy:u}=t,l=a?a instanceof FormData?a:JSON.stringify(a??""):void 0,h={url:i,headers:(0,S.D)(s,a),method:r,body:l},g={retryDecider:R(u??e?.libraryOptions?.API?.REST?.retryStrategy),computeDelay:w.y,withCrossDomainCredentials:c,abortSignal:d},f=n(h,o);let m;const I=await(async e=>{try{const{credentials:t}=await e.Auth.fetchAuthSession();if(t)return t}catch(e){p.debug("No credentials available, the request will be unsigned.")}return null})(e);if(f&&I){const e=(0,y.R)(i),t=o?.service??e.service,n=o?.region??e.region;m=await P(h,{...g,credentials:I,region:n,service:t})}else m=await O(h,{...g});return{statusCode:m.statusCode,headers:m.headers,body:m.body}})(e,{...i,url:t,method:n,headers:l,abortSignal:f},I.m,h)},g,0,l)},x=e=>((e,t)=>j(e,t,"POST"))(d.H,e)},45777:(e,t,n)=>{n.d(t,{l:()=>i});var o=n(16736);class i extends o.x{constructor(e){super(e),this.constructor=i,Object.setPrototypeOf(this,i.prototype)}}},48104:(e,t,n)=>{n.d(t,{B:()=>o});const o=()=>"undefined"!=typeof window&&void 0!==window.document}
1,49423:(e,t,n)=>{n.d(t,{h:()=>i});const o=2539==n.j?["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"]:null,i=e=>!!e&&o.includes(e)},49602:(e,t,n)=>{n.d(t,{k:()=>i});const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function i(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}},50814:(e,t,n)=>{if(n.d(t,{d:()=>a}),2539==n.j)var o=n(36715);if(2539==n.j)var i=n(92529);if(2539==n.j)var r=n(11686);if(2539==n.j)var s=n(335);const a=(e,{credentialScope:t,longDate:n,secretAccessKey:a,shortDate:c,signingRegion:d,signingService:u,uriEscapePath:l})=>{const h=(0,i.i)(e,l),g=(0,o.h)(null,h),f=(0,s.a)(n,t,g);return(0,o.h)((0,r.X)(a,c,d,u),f)}},53553:(e,t,n)=>{if(n.d(t,{F:()=>i,Y:()=>r}),2539==n.j)var o=n(65430);const i=async e=>{if(!e||e.statusCode<300)return;const t=await r(e),n=(e=>{const[t]=e.toString().split(/[,:]+/);return t.includes("#")?t.split("#")[1]:t})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),i=t.message??t.Message??"Unknown error",s=new Error(i);return Object.assign(s,{name:n,$metadata:(0,o.j)(e)})},r=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:(0,o.j)(e)})}},55e3:(e,t,n)=>{n.d(t,{M:()=>o});const o=2539==n.j?3e5:null},55229:(e,t,n)=>{if(n.d(t,{O:()=>r}),2539==n.j)var o=n(41185);const i=2539==n.j?3e5:null,r=(e,t)=>Math.abs((0,o.C)(t).getTime()-e)>=i},55518:(e,t,n)=>{n.d(t,{f:()=>u});var o=n(83406),i=n(89641),r=n(98433),s=n(98599);const a="amplify-signin-with-hostedUI",c="CognitoIdentityServiceProvider",d=(e,t)=>(0,r.Qm)(s.f3)(e,t),u=new class{constructor(e){this.keyValueStorage=e}async clearOAuthInflightData(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(e.inflightOAuth),this.keyValueStorage.removeItem(e.oauthPKCE),this.keyValueStorage.removeItem(e.oauthState)])}async clearOAuthData(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(a),this.keyValueStorage.removeItem(e.oauthSignIn)}loadOAuthState(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthState)}storeOAuthState(e){(0,i.$y)(this.cognitoConfig);const t=d(c,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthState,e)}loadPKCE(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(e.oauthPKCE)}storePKCE(e){(0,i.$y)(this.cognitoConfig);const t=d(c,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(t.oauthPKCE,e)}setAuthConfig(e){this.cognitoConfig=e}async loadOAuthInFlight(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId);return"true"===await this.keyValueStorage.getItem(e.inflightOAuth)}async storeOAuthInFlight(e){(0,i.$y)(this.cognitoConfig);const t=d(c,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(t.inflightOAuth,`${e}`)}async loadOAuthSignIn(){(0,i.$y)(this.cognitoConfig);const e=d(c,this.cognitoConfig.userPoolClientId),t=await this.keyValueStorage.getItem(a),[n,o]=(await this.keyValueStorage.getItem(e.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:"true"===n||"true"===t,preferPrivateSession:"true"===o}}async storeOAuthSignIn(e,t=!1){(0,i.$y)(this.cognitoConfig);const n=d(c,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.oauthSignIn,`${e},${t}`)}}(o.ZL)},58416:(e,t,n)=>{if(n.d(t,{o:()=>s}),2539==n.j)var o=n(18018);if(2539==n.j)var i=n(1478);if(2539==n.j)var r=n(94584);const s=({region:e})=>({url:new i.o(`https://${r.M}.${e}.${(0,o.R)(e)}`)})},58707:(e,t,n)=>{if(n.d(t,{y:()=>r}),2539==n.j)var o=n(90849);if(2539==n.j)var i=n(22055);const r=({credentials:e,signingDate:t=new Date,signingRegion:n,signingService:r,uriEscapePath:s=!0})=>{const{accessKeyId:a,secretAccessKey:c,sessionToken:d}=e,{longDate:u,shortDate:l}=(0,i.u)(t);return{accessKeyId:a,credentialScope:(0,o.C)(l,n,r),longDate:u,secretAccessKey:c,sessionToken:d,shortDate:l,signingRegion:n,signingService:r,uriEscapePath:s}}},58741:(e,t,n)=>{if(n.d(t,{A:()=>s}),2539==n.j)var o=n(34624);if(2539==n.j)var i=n(25110);if(2539==n.j)var r=n(49602);const s=2539==n.j?function(e,t,n){if(o.A.randomUUID&&!t&&!e)return o.A.randomUUID();const s=(e=e||{}).random??e.rng?.()??(0,i.A)();if(s.length<16)throw new Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,r.k)(s)}:null},59796:(e,t,n)=>{n.d(t,{H:()=>o});const o=e=>Object.entries(e).map(([e,t])=>({key:e.toLowerCase(),value:t?.trim().replace(/\s+/g," ")??""})).sort((e,t)=>
1e.key<t.key?-1:1).map(e=>`${e.key}:${e.value}\n`).join("")},59830:(e,t,n)=>{n.d(t,{G:()=>o,v:()=>s});var o,i=n(18594);!function(e){e.InvalidAuthTokens="InvalidAuthTokens"}(o||(o={}));const r={[o.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},s=(0,i.p)(r)},60840:(e,t,n)=>{n.d(t,{C:()=>a});var o=n(23e3),i=n(1964),r=n(53553),s=n(31786);const a={service:n(94584).M,retryDecider:(0,i.D)(r.F),computeDelay:o.y,get userAgentValue(){return(0,s.fE)()},cache:"no-store"}},61309:(e,t,n)=>{n.d(t,{o:()=>s});var o=n(31317),i=n(78929);const r=[{platform:o.dT.Expo,detectionMethod:function(){return(0,i.Ii)()&&void 0!==n.g.expo}},{platform:o.dT.ReactNative,detectionMethod:function(){return"undefined"!=typeof navigator&&void 0!==navigator.product&&"ReactNative"===navigator.product}},{platform:o.dT.NextJs,detectionMethod:function(){return(0,i.V4)()&&window.next&&"object"==typeof window.next}},{platform:o.dT.Nuxt,detectionMethod:function(){return(0,i.V4)()&&(void 0!==window.__NUXT__||void 0!==window.$nuxt)}},{platform:o.dT.Angular,detectionMethod:function(){const e=Boolean((0,i.K0)()&&document.querySelector("[ng-version]")),t=Boolean((0,i.V4)()&&void 0!==window.ng);return e||t}},{platform:o.dT.React,detectionMethod:function(){const e=e=>e.startsWith("_react")||e.startsWith("__react");return(0,i.K0)()&&Array.from(document.querySelectorAll("[id]")).some(t=>Object.keys(t).find(e))}},{platform:o.dT.VueJs,detectionMethod:function(){return(0,i.V4)()&&(0,i.$r)(window,"__VUE")}},{platform:o.dT.Svelte,detectionMethod:function(){return(0,i.V4)()&&(0,i.$r)(window,"__SVELTE")}},{platform:o.dT.WebUnknown,detectionMethod:function(){return(0,i.V4)()}},{platform:o.dT.NextJsSSR,detectionMethod:function(){return(0,i.Ii)()&&((0,i.$r)(n.g,"__next")||(0,i.$r)(n.g,"__NEXT"))}},{platform:o.dT.NuxtSSR,detectionMethod:function(){return(0,i.Ii)()&&void 0!==n.g.__NUXT_PATHS__}},{platform:o.dT.ReactSSR,detectionMethod:function(){return(0,i._Z)()&&void 0!==process.env&&!!Object.keys(process.env).find(e=>e.includes("react"))}},{platform:o.dT.VueJsSSR,detectionMethod:function(){return(0,i.Ii)()&&(0,i.$r)(n.g,"__VUE")}},{platform:o.dT.AngularSSR,detectionMethod:function(){return(0,i._Z)()&&"object"==typeof process.env&&process.env.npm_lifecycle_script?.startsWith("ng ")||!1}},{platform:o.dT.SvelteSSR,detectionMethod:function(){return(0,i._Z)()&&void 0!==process.env&&!!Object.keys(process.env).find(e=>e.includes("svelte"))}}];function s(){return r.find(e=>e.detectionMethod())?.platform||o.dT.ServerSideUnknown}},62463:(e,t,n)=>{if(n.d(t,{Q:()=>a}),2539==n.j)var o=n(16736);if(2539==n.j)var i=n(87525);if(2539==n.j)var r=n(24423);const s=e=>!["HEAD","GET"].includes(e.toUpperCase()),a=async({url:e,method:t,headers:n,body:a},{abortSignal:c,cache:d,withCrossDomainCredentials:u})=>{let l;try{l=await fetch(e,{method:t,headers:n,body:s(t)?a:void 0,signal:c,cache:d,credentials:u?"include":"same-origin"})}catch(e){if(e instanceof TypeError)throw new o.x({name:i.m.NetworkError,message:"A network error has occurred.",underlyingError:e});throw e}const h={};return l.headers?.forEach((e,t)=>{h[t.toLowerCase()]=e}),{statusCode:l.status,headers:h,body:null,body:Object.assign(l.body??{},{text:(0,r.n)(()=>l.text()),blob:(0,r.n)(()=>l.blob()),json:(0,r.n)(()=>l.json())})}}},65430:(e,t,n)=>{n.d(t,{j:()=>o});const o=e=>{const{headers:t,statusCode:n}=e;return{...i(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},i=e=>"object"==typeof e?.$metadata},68135:(e,t,n)=>{n.d(t,{e:()=>r});var o=n(98306),i=n(19985);const r=(0,o.q)(i.F,[()=>(e,t)=>async function(t){return t.headers["cache-control"]="no-store",e(t)}])},68478:(e,t,n)=>{if(n.d(t,{e:()=>r}),2539==n.j)var o=n(87525);if(2539==n.j)var i=n(45777);function r(e){if(!e||"Error"===e.name||e instanceof TypeError)throw new i.l({name:o.m.Unknown,message:"An unknown error has occurred.",underlyingError:e})}},69613:(e,t,n)=>{n.d(t,{e:()=>i});const o={},i=(e,t)=>o[e]?.[t]?.additionalDetails},70547:(e,t,n)=>{n.d(t,{L:()=>o});const o=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>
1async function(o){if(0===t.trim().length)return await n(o);{const i=e.toLowerCase();return o.headers[i]=o.headers[i]?`${o.headers[i]} ${t}`:t,await n(o)}}},71142:(e,t,n)=>{function o({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}n.d(t,{H:()=>o})},75607:(e,t,n)=>{if(n.d(t,{T:()=>r}),2539==n.j)var o=n(18413);if(2539==n.j)var i=n(1478);const r=({endpointOverride:e})=>t=>e?{url:new i.o(e)}:(0,o.t)(t)},77809:(e,t,n)=>{if(n.d(t,{T:()=>s}),2539==n.j)var o=n(53553);if(2539==n.j)var i=n(68478);if(2539==n.j)var r=n(45777);const s=()=>async e=>{if(e.statusCode>=300){const t=await(0,o.F)(e);throw(0,i.e)(t),new r.l({name:t.name,message:t.message,metadata:t.$metadata})}return(0,o.Y)(e)}},78318:(e,t,n)=>{n.d(t,{O:()=>o,v:()=>s});var o,i=n(18594);!function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"}(o||(o={}));const r={[o.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[o.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[o.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[o.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[o.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},s=(0,i.p)(r)},78929:(e,t,n)=>{n.d(t,{$r:()=>a,Ii:()=>o,K0:()=>r,V4:()=>i,_Z:()=>s});const o=()=>void 0!==n.g,i=()=>"undefined"!=typeof window,r=()=>"undefined"!=typeof document,s=()=>"undefined"!=typeof process,a=(e,t)=>!!Object.keys(e).find(e=>e.startsWith(t))},79434:(e,t,n)=>{n.d(t,{C:()=>a,v:()=>s});var o=n(23e3),i=n(1964),r=(n(38763),n(68004),n(53553));const s="cognito-identity",a={service:s,retryDecider:(0,i.D)(r.F),computeDelay:o.y,cache:"no-store"}},79609:(e,t,n)=>{n.d(t,{t:()=>i});var o=n(19985);n(38763),n(68004);const i=(0,n(98306).q)(o.F,[()=>e=>async function(t){return t.headers["cache-control"]="no-store",e(t)}])},81116:(e,t,n)=>{n.d(t,{T:()=>o});const o=(e,t=!0)=>e?t?encodeURIComponent(e).replace(/%2F/g,"/"):e:"/"},81217:(e,t,n)=>{n.d(t,{E:()=>R});var o=n(18987);class i{constructor(e={}){const{path:t,domain:n,expires:o,sameSite:i,secure:r}=e;if(this.domain=n,this.path=t||"/",this.expires=Object.prototype.hasOwnProperty.call(e,"expires")?o:365,this.secure=!Object.prototype.hasOwnProperty.call(e,"secure")||r,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!i||!["strict","lax","none"].includes(i))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===i&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=i}}async setItem(e,t){o.A.set(e,t,this.getData())}async getItem(e){return o.A.get(e)??null}async removeItem(e){o.A.remove(e,this.getData())}async clear(){const e=o.A.get(),t=Object.keys(e).map(e=>this.removeItem(e));await Promise.all(t)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}var r=n(83406),s=n(20126),a=n(30281),c=n(84210),d=n(99705),u=n(89641),l=n(45777),h=n(68478),g=n(33658),f=n(98599),p=n(75607),y=n(83366),m=n(767);const I=new c.C("CognitoCredentialsProvider"),w=3e6;class v{constructor(e){this._nextCredentialsRefresh=0,this._identityIdStore=e}async clearCredentialsAndIdentityId(){I.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){I.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(e){const t=e.authenticated,{tokens:n}=e,{authConfig:o}=e;try{(0,u.Eh)(o?.Cognito)}catch{return}if(!t&&!o.Cognito.allowGuestAccess)return;const{forceRefresh:i}=e,r=this.hasTokenChanged(n),s=await(0,y.G)({tokens:n,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return(i||r)&&this.clearCredentials(),t?((0,f.OW)(n),this.credsForOIDCTokens(o.Cognito,n,s)):this.getGuestCredentials(s,o.Cognito)}async getGuestCredentials(e,t){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!1===this._credentialsAndIdentityId.isAuthenticatedCreds)return I.info("returning stored credentials as they neither past TTL n
1or expired."),this._credentialsAndIdentityId;this.clearCredentials();const n=(0,g.C)(t.identityPoolId),o=(0,d.j)({endpointResolver:(0,p.T)({endpointOverride:t.identityPoolEndpoint})});let i;try{i=await o({region:n},{IdentityId:e})}catch(e){throw(0,h.e)(e),new l.l(e)}if(i?.Credentials?.AccessKeyId&&i?.Credentials?.SecretKey){this._nextCredentialsRefresh=(new Date).getTime()+w;const t={credentials:{accessKeyId:i.Credentials.AccessKeyId,secretAccessKey:i.Credentials.SecretKey,sessionToken:i.Credentials.SessionToken,expiration:i.Credentials.Expiration},identityId:e};return i.IdentityId&&(t.identityId=i.IdentityId,this._identityIdStore.storeIdentityId({id:i.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...t,isAuthenticatedCreds:!1},t}throw new l.l({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(e,t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&!0===this._credentialsAndIdentityId.isAuthenticatedCreds)return I.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const o=t.idToken?(0,m.b)(t.idToken.toString()):{},i=(0,g.C)(e.identityPoolId),r=(0,d.j)({endpointResolver:(0,p.T)({endpointOverride:e.identityPoolEndpoint})});let s;try{s=await r({region:i},{IdentityId:n,Logins:o})}catch(e){throw(0,h.e)(e),new l.l(e)}if(s?.Credentials?.AccessKeyId&&s?.Credentials?.SecretKey){this._nextCredentialsRefresh=(new Date).getTime()+w;const e={credentials:{accessKeyId:s.Credentials.AccessKeyId,secretAccessKey:s.Credentials.SecretKey,sessionToken:s.Credentials.SessionToken,expiration:s.Credentials.Expiration},identityId:n};return s.IdentityId&&(e.identityId=s.IdentityId,this._identityIdStore.storeIdentityId({id:s.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...e,isAuthenticatedCreds:!0,associatedIdToken:t.idToken?.toString()},e}throw new l.l({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return void 0===this._nextCredentialsRefresh||this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(e){return!!e&&!!this._credentialsAndIdentityId?.associatedIdToken&&e.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}var S=n(98433),A=n(31859);const C=new c.C("DefaultIdentityIdStore");class _{setAuthConfig(e){(0,u.Eh)(e.Cognito),this.authConfig=e,this._authKeys=k("Cognito",e.Cognito.identityPoolId)}constructor(e){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=e}async loadIdentityId(){(0,u.Eh)(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 C.log("Error getting stored IdentityId.",e),null}}async storeIdentityId(e){(0,u.Eh)(this.authConfig?.Cognito),"guest"===e.type?(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 k=(e,t)=>(0,S.Qm)(A.j)(`com.amplify.${e}`,t),E=new v(new _(r.ZL));var b=n(15907),T=n(35066);const P=new class{constructor(){this.authTokenStore=new S.Uv,this.authTokenStore.setKeyValueStorage(r.ZL),this.tokenOrchestrator=new T.A,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(b.s)}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)}},{tokenOrchestrator:O}=P,R={configure(e,t){const n=(0,a.M)(e),o=new i({sameSite:"lax"}),c=t?.ssr?o:r.ZL,d=t?.ssr?new v(new _(o)):E;
1if(n.Auth)if(t?.Auth)s.H.configure(n,t);else{if(!s.H.libraryOptions.Auth)return P.setAuthConfig(n.Auth),P.setKeyValueStorage(c),void s.H.configure(n,{...t,Auth:{tokenProvider:P,credentialsProvider:d}});if(t){const e=s.H.libraryOptions.Auth;return void 0!==t.ssr&&(P.setKeyValueStorage(c),e.credentialsProvider=d),void s.H.configure(n,{Auth:e,...t})}s.H.configure(n)}else s.H.configure(n,t)},getConfig:()=>s.H.getConfig()}},82313:(e,t,n)=>{if(n.d(t,{b:()=>i}),2539==n.j)var o=n(8404);const i=({maxAttempts:e=o.K7,retryDecider:t,computeDelay:n,abortSignal:i})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(o,a)=>async function(c){let d,u,l=a.attemptsCount??0;const h=()=>{if(u)return s(u,l),u;throw s(d,l),d};for(;!i?.aborted&&l<e;){try{u=await o(c),d=void 0}catch(e){d=e,u=void 0}l=(a.attemptsCount??0)>l?a.attemptsCount??0:l+1,a.attemptsCount=l;const{isCredentialsExpiredError:s,retryable:g}=await t(u,d,a);if(!g)return h();if(a.isCredentialsExpired=!!s,!i?.aborted&&l<e){const e=n(l);await r(e,i)}}if(i?.aborted)throw new Error("Request aborted.");return h()}},r=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,o;const i=new Promise(t=>{o=t,n=setTimeout(t,e)});return t?.addEventListener("abort",function e(i){clearTimeout(n),t?.removeEventListener("abort",e),o()}),i},s=(e,t)=>{"[object Object]"===Object.prototype.toString.call(e)&&(e.$metadata={...e.$metadata??{},attempts:t})}},82437:(e,t,n)=>{n.d(t,{M:()=>o});const o=e=>Array.from(e).sort(([e,t],[n,o])=>e===n?t<o?-1:1:e<n?-1:1).map(([e,t])=>`${i(e)}=${i(t)}`).join("&"),i=e=>encodeURIComponent(e).replace(/[!'()*]/g,r),r=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`},83259:(e,t,n)=>{if(n.d(t,{L:()=>u}),n(38763),n(68004),2539==n.j)var o=n(31786);if(2539==n.j)var i=n(65430);if(2539==n.j)var r=n(53553);if(2539==n.j)var s=n(87592);if(2539==n.j)var a=n(79434);if(2539==n.j)var c=n(79609);if(2539==n.j)var d=n(89436);const u=e=>(0,s.A)(c.t,(0,d.s)("GetId"),l,{...a.C,...e,userAgentValue:(0,o.fE)()}),l=async e=>{if(e.statusCode>=300)throw await(0,r.F)(e);return{IdentityId:(await(0,r.Y)(e)).IdentityId,$metadata:(0,i.j)(e)}}},83366:(e,t,n)=>{if(n.d(t,{G:()=>d}),2539==n.j)var o=n(83259);if(2539==n.j)var i=n(45777);if(2539==n.j)var r=n(68478);if(2539==n.j)var s=n(33658);if(2539==n.j)var a=n(75607);if(2539==n.j)var c=n(767);async function d({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});const d=await n.loadIdentityId();if(d)return d.id;const u=e?.idToken?(0,c.b)(e.idToken.toString()):{},l=await async function(e,t){const n=t?.identityPoolId,c=(0,s.C)(n),d=(0,o.L)({endpointResolver:(0,a.T)({endpointOverride:t.identityPoolEndpoint})});let u;try{u=(await d({region:c},{IdentityPoolId:n,Logins:e})).IdentityId}catch(e){throw(0,r.e)(e),new i.l(e)}if(!u)throw new i.l({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return u}(u,t);return n.storeIdentityId({id:l,type:e?"primary":"guest"}),l}},83406:(e,t,n)=>{n.d(t,{ZL:()=>u});var o=n(45054);class i{constructor(e){this.storage=e}async setItem(e,t){if(!this.storage)throw new o.h;this.storage.setItem(e,t)}async getItem(e){if(!this.storage)throw new o.h;return this.storage.getItem(e)}async removeItem(e){if(!this.storage)throw new o.h;this.storage.removeItem(e)}async clear(){if(!this.storage)throw new o.h;this.storage.clear()}}var r=n(84210),s=n(30043);const a=new r.C("CoreStorageUtils"),c=()=>{try{if("undefined"!=typeof window&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch(e){return a.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new s._}};class d{constructor(e){this._storage=e}get storage(){if(!this._storage)throw new o.h;return this._storage}setItem(e,t){this.storage.setItem(e,t)}getItem(e){return this.storage.getItem(e)}removeItem(e){this.storage.removeItem(e)}clear(){this.storage.clear()}}const u=new class extends i{constructor(){super((()=>{try{if("undefined"!=typeof window&&window.localStorage)return window.localStorage}catch(e){a.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new s._})())}};new class extends i{constructor(){super(c())}},new class extends d{constructor(){super(c())}},new i(new s._)},83867:(e,t,n)=>{if(n.d(t,{M:()=>r}),2539==n.j)var o=n(38569);if(2539==n.j)var i=n(36715);const r=e=>null==e?o.fM:s(e)?(0,i.h)(null,e):o.z8,s=e=>"string"==typeof e||ArrayBuffer.isView(e)||a(e),a=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)},84210:(e,t,n)=>{n.d(t,{C:()=>s});var o,i=n(84597);!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"}(o||(o={}));const r={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class s{constructor(e,t=o.WARN){this.name=e,this.level=t,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,...t){let n=this.level;if(s.LOG_LEVEL&&(n=s.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(n=window.LOG_LEVEL),!(r[e]>=r[n]))return;let i=console.log.bind(console);e===o.ERROR&&console.error&&(i=console.error.bind(console)),e===o.WARN&&console.warn&&(i=console.warn.bind(console)),s.BIND_ALL_LOG_LEVELS&&(e===o.INFO&&console.info&&(i=console.info.bind(console)),e===o.DEBUG&&console.debug&&(i=console.debug.bind(console)));const a=`[${e}] ${this._ts()} ${this.name}`;let c="";if(1===t.length&&"string"==typeof t[0])c=`${a} - ${t[0]}`,i(c);else if(1===t.length)c=`${a} ${t[0]}`,i(a,t[0]);else if("string"==typeof t[0]){let e=t.slice(1);1===e.length&&(e=e[0]),c=`${a} - ${t[0]} ${e}`,i(`${a} - ${t[0]}`,e)}else c=`${a} ${t}`,i(a,t);for(const e of this._pluggables){const t={message:c,timestamp:Date.now()};e.pushLogs([t])}}log(...e){this._log(o.INFO,...e)}info(...e){this._log(o.INFO,...e)}warn(...e){this._log(o.WARN,...e)}error(...e){this._log(o.ERROR,...e)}debug(...e){this._log(o.DEBUG,...e)}verbose(...e){this._log(o.VERBOSE,...e)}addPluggable(e){e&&e.getCategoryName()===i.OU&&(this._pluggables.push(e),e.configure(this._config))}listPluggables(){return this._pluggables}}s.LOG_LEVEL=null,s.BIND_ALL_LOG_LEVELS=!1},84307:(e,t,n)=>{n.d(t,{s:()=>a});var o=n(84210);if(2539==n.j)var i=n(16736);const r=new o.C("parseAWSExports"),s={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},a=(e={})=>
1{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new i.x({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:o,aws_appsync_region:a,aws_bots_config:c,aws_cognito_identity_pool_id:l,aws_cognito_sign_up_verification_method:h,aws_cognito_mfa_configuration:g,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:y,aws_cognito_signup_attributes:m,aws_cognito_social_providers:I,aws_cognito_username_attributes:w,aws_mandatory_sign_in:v,aws_mobile_analytics_app_id:S,aws_mobile_analytics_app_region:A,aws_user_files_s3_bucket:C,aws_user_files_s3_bucket_region:_,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:k,aws_user_pools_id:E,aws_user_pools_web_client_id:b,geo:T,oauth:P,predictions:O,aws_cloud_logic_custom:R,Notifications:j,modelIntrospection:x}=e,K={};S&&(K.Analytics={Pinpoint:{appId:S,region:A}});const{InAppMessaging:N,Push:D}=j??{};if(N?.AWSPinpoint||D?.AWSPinpoint){if(N?.AWSPinpoint){const{appId:e,region:t}=N.AWSPinpoint;K.Notifications={InAppMessaging:{Pinpoint:{appId:e,region:t}}}}if(D?.AWSPinpoint){const{appId:e,region:t}=D.AWSPinpoint;K.Notifications={...K.Notifications,PushNotification:{Pinpoint:{appId:e,region:t}}}}}if(Array.isArray(c)&&(K.Interactions={LexV1:Object.fromEntries(c.map(e=>[e.name,e]))}),o){const e=s[n];e||r.debug(`Invalid authentication type ${n}. Falling back to IAM.`),K.API={GraphQL:{endpoint:o,apiKey:t,region:a,defaultAuthMode:e??"iam"}},x&&(K.API.GraphQL.modelIntrospection=x)}const M=g?{status:g&&g.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,U=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,L=Array.from(new Set([...y??[],...m??[]])).reduce((e,t)=>({...e,[t.toLowerCase()]:{required:!0}}),{}),$=w?.includes("EMAIL")??!1,V=w?.includes("PHONE_NUMBER")??!1;(l||E)&&(K.Auth={Cognito:{identityPoolId:l,allowGuestAccess:"enable"!==v,signUpVerificationMethod:h,userAttributes:L,userPoolClientId:b,userPoolId:E,mfa:M,passwordFormat:U,loginWith:{username:!($||V),email:$,phone:V}}});const G=!!P&&Object.keys(P).length>0,q=!!I&&I.length>0;if(K.Auth&&G&&(K.Auth.Cognito.loginWith={...K.Auth.Cognito.loginWith,oauth:{...d(P),...q&&{providers:u(I)}}}),C&&(K.Storage={S3:{bucket:C,region:_,dangerouslyConnectToHttpEndpointForTesting:k}}),T){const{amazon_location_service:e}=T;K.Geo={LocationService:{maps:e.maps,geofenceCollections:e.geofenceCollections,searchIndices:e.search_indices,region:e.region}}}if(R&&(K.API={...K.API,REST:R.reduce((e,t)=>{const{name:n,endpoint:o,region:i,service:r}=t;return{...e,[n]:{endpoint:o,...r?{service:r}:void 0,...i?{region:i}:void 0}}},{})}),O){const{VoiceId:e}=O?.convert?.speechGenerator?.defaults??{};K.Predictions=e?{...O,convert:{...O.convert,speechGenerator:{...O.convert.speechGenerator,defaults:{voiceId:e}}}}:O}return K},c=e=>e?.split(",")??[],d=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:o,responseType:i})=>({domain:e,scopes:t,redirectSignIn:c(n),redirectSignOut:c(o),responseType:i}),u=e=>e.map(e=>{const t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)})},84597:(e,t,n)=>{n.d(t,{OU:()=>o,d1:()=>i});const o="Logging",i="NoHubcallbackProvidedException"},84885:(e,t,n)=>{n.d(t,{J:()=>i,JU:()=>r,nW:()=>o});const o="execute-api",i="us-east-1",r=/^.+\.([a-z0-9-]+)\.([a-z0-9-]+)\.amazonaws\.com/},87525:(e,t,n)=>{var o;n.d(t,{m:()=>o}),function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"}(o||(o={}))},87592:(e,t,n)=>{n.d(t,{A:()=>o});const o=(e,t,n,o)=>async(i,r)=>{const s={...o,...i},a=await s.endpointResolver(s,r),c=await t(r,a),d=await e(c,{...s});return n(d)}},89436:(e,t,n)=>{n.d(t,{s:()=>o});const o=e=>(t,n)=>{const o=i(e),s=JSON.stringify(t);return r(n,o,s)},i=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),r=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"})},89641:(e,t,n)=>{if(n.d(t,{$y:()=>r,Cq:()=>a,Eh:()=>s}),2539==n.j)var o=n(1611);if(2539==n.j)var i=n(78318);function r(e){let t=!0;t=!!e&&!!e.userPoolId&&!!e.userPoolClientId,(0,i.v)(t,i.O.AuthUserPoolException)}function s(e){const t=!!e?.identityPoolId;(0,i.v)(t,i.O.InvalidIdentityPoolIdException)}function a(e){const t=e.split(".");if(3!==t.length)throw new Error("Invalid token");try{const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(o.m.convert(n).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return{toString:()=>e,payload:JSON.parse(i)}}catch(e){throw new Error("Invalid token payload")}}},89858:(e,t,n)=>{n.d(t,{t:()=>o});const o={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetail
1s:"signInDetails",oauthMetadata:"oauthMetadata"}},90849:(e,t,n)=>{if(n.d(t,{C:()=>i}),2539==n.j)var o=n(38569);const i=(e,t,n)=>`${e}/${t}/${n}/${o.VQ}`},92529:(e,t,n)=>{if(n.d(t,{i:()=>c}),2539==n.j)var o=n(59796);if(2539==n.j)var i=n(82437);if(2539==n.j)var r=n(81116);if(2539==n.j)var s=n(83867);if(2539==n.j)var a=n(35746);const c=({body:e,headers:t,method:n,url:c},d=!0)=>[n,(0,r.T)(c.pathname,d),(0,i.M)(c.searchParams),(0,o.H)(t),(0,a.Z)(t),(0,s.M)(e)].join("\n")},92932:(e,t,n)=>{if(n.d(t,{m:()=>i}),2539==n.j)var o=n(55229);const i=(e,t)=>(0,o.O)(e,t)?e-Date.now():t},93609:(e,t,n)=>{n.d(t,{k:()=>i,q:()=>o});const o={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},i={partitions:[o,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]}},94584:(e,t,n)=>{n.d(t,{M:()=>o});const o="cognito-idp"},98306:(e,t,n)=>{n.d(t,{q:()=>o});const o=(e,t)=>(n,o)=>{const i={};let r=t=>e(t,o);for(let e=t.length-1;e>=0;e--)r=(0,t[e])(o)(r,i);return r(n)}},98433:(e,t,n)=>{if(n.d(t,{Qm:()=>u,Uv:()=>c}),2539==n.j)var o=n(89641);if(2539==n.j)var i=n(45777);if(2539==n.j)var r=n(89858);if(2539==n.j)var s=n(59830);if(2539==n.j)var a=n(10742);class c{getKeyValueStorage(){if(!this.keyValueStorage)throw new i.l({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(),t=await this.getKeyValueStorage().getItem(e.accessToken);if(!t)throw new i.l({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const n=(0,o.Cq)(t),r=await this.getKeyValueStorage().getItem(e.idToken),s=r?(0,o.Cq)(r):void 0,a=await this.getKeyValueStorage().getItem(e.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(e.clockDrift)??"0",d=Number.parseInt(c),u=await this.getKeyValueStorage().getItem(e.signInDetails),l={accessToken:n,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:d,username:await this.getLastAuthUser()};return u&&(l.signInDetails=JSON.parse(u)),l}catch(e){return null}}async storeTokens(e){(0,s.v)(void 0!==e,s.G.InvalidAuthTokens);const t=e.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),t);const n=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n.accessToken,e.accessToken.toString()),e.idToken?await this.getKeyValueStorage().setItem(n.idToken,e.idToken.toString()):await this.getKeyValueStorage().removeItem(n.idToken),e.refreshToken?await this.getKeyValueStorage().setItem(n.refreshToken,e.refreshToken):await this.getKeyValueStorage().removeItem(n.refreshToken),e.deviceMetadata&&(e.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(n.deviceKey,e.deviceMetadata.deviceKey),e.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(n.deviceGroupKey,e.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(n.randomPasswordKey,e.deviceMetadata.randomPassword)),e.signInDetails?await this.getKeyValueStorage().setItem(n.signInDetails,JSON.stringify(e.signInDetails)):await this.getKeyValueStorage().removeItem(n.signInDetails),await this.getKeyValueStorage().setItem(n.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 t=await this.getAuthKeys(e),n=await this.getKeyValueStorage().getItem(t.deviceKey),o=await this.getKeyValueStorage().getItem(t.deviceGroupKey),i=await this.getKeyValueStorage().getItem(t.randomPasswordKey);return i&&o&&n?{deviceKey:n,deviceGroupKey:o,randomPassword:i}:null}async clearDeviceMetadata(e){const t=await this.getAuthKeys(e);await Promise.all([this.getKeyValueStorage().removeItem(t.deviceKey),this.getKeyValueStorage().removeItem(t.deviceGroupKey),this.getKeyValueStorage().removeItem(t.randomPasswordKey)])}async getAuthKeys(e){(0,o.$y)(this.authConfig?.Cognito);const t=e??await this.getLastAuthUser();return d(a.c,`${this.authConfig.Cognito.userPoolClientId}.${t}`)}getLastAuthUserKey(){(0,o.$y)(this.authConfig?.Cognito);const e=this.authConfig.Cognito.userPoolClientId;return`${a.c}.${e}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(e){const{oauthMetadata:t}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(t,JSON.stringify(e))}async getOAuthMetadata(){const{oauthMetadata:e}=await this.getAuthKeys(),t=await this.getKeyValueStorage().getItem(e);return t&&JSON.parse(t)}}const d=(e,t)=>u(r.t)(`${e}`,t);function u(e){const t=Object.values({...e});return(e,n)=>t.reduce((t,o)=>({...t,[o]:`${e}.${n}.${o}`}),{})}}
1,98599:(e,t,n)=>{n.d(t,{f3:()=>d,X4:()=>c,OW:()=>r});var o=n(45777);const i="UserUnAuthenticatedException";function r(e){if(!e||!e.idToken)throw new o.l({name:i,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}new o.l({name:"InvalidRedirectException",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 o.l({name:"InvalidAppSchemeException",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 o.l({name:"InvalidPreferredRedirectUrlException",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."}),new o.l({name:"InvalidOriginException",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."});const s=new o.l({name:"TokenRefreshException",message:"Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.",recoverySuggestion:"Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }"}),a=new o.l({name:i,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function c(e){if(function(e){return u(e)&&!e?.refreshToken}(e))throw s;if(!function(e){return u(e)&&e?.refreshToken}(e))throw a}const d={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function u(e){return e?.accessToken||e?.idToken}},99705:(e,t,n)=>{if(n.d(t,{j:()=>u}),n(38763),n(68004),2539==n.j)var o=n(31786);if(2539==n.j)var i=n(65430);if(2539==n.j)var r=n(53553);if(2539==n.j)var s=n(87592);if(2539==n.j)var a=n(79434);if(2539==n.j)var c=n(79609);if(2539==n.j)var d=n(89436);const u=e=>(0,s.A)(c.t,(0,d.s)("GetCredentialsForIdentity"),l,{...a.C,...e,userAgentValue:(0,o.fE)()}),l=async e=>{if(e.statusCode>=300)throw await(0,r.F)(e);const t=await(0,r.Y)(e);return{IdentityId:t.IdentityId,Credentials:h(t.Credentials),$metadata:(0,i.j)(e)}},h=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(1e3*e)})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.