PageSourceSearch

https://app.trysecretsauce.ai/_next/static/immutable/chunks/2349_deystrjr.js

js trysecretsauce.ai collected 2026-09-29 04:14:24 UTC 484,836 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0d2a8-0e45-0000-b267-e5c8b3a2c465";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="1bbc2546-f8ae-59b4-b034-dddf063672da")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,786836,224934,465456,e=>{"use strict";var t,n,r,i,o,a,s,c,u,l,d,f,p,m,h,g,v,y,_,b,w,k,S,C,E,O,x,P=e.i(720525);function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function F(e,t,n,r){return new(n||(n=Promise))(function(t,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof n?r:new n(function(e){e(r)})).then(o,a)}s((r=r.apply(e,[])).next())})}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=j(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==j(t)?t:t+""}(r.key),r)}}function z(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function L(e,t,n){return t=H(t),function(e,t){if(t&&("object"==j(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e,N()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function M(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function B(e){var t="function"==typeof Map?new Map:void 0;return(B=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(N())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&U(i,n.prototype),i}(e,arguments,H(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),U(n,e)})(e)}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function U(e,t){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e.s(["StytchB2BProvider",()=>P.S],786836),"function"==typeof SuppressedError&&SuppressedError,(t=p||(p={})).emailMagicLinks="emailMagicLinks",t.oauth="oauth",t.otp="otp",t.crypto="crypto",t.passwords="passwords",t.passkeys="passkeys",(n=m||(m={})).Google="google",n.Microsoft="microsoft",n.Apple="apple",n.Github="github",n.GitLab="gitlab",n.Facebook="facebook",n.Discord="discord",
1n.Salesforce="salesforce",n.Slack="slack",n.Amazon="amazon",n.Bitbucket="bitbucket",n.LinkedIn="linkedin",n.Coinbase="coinbase",n.Twitch="twitch",n.Twitter="twitter",n.TikTok="tiktok",n.Snapchat="snapchat",n.Figma="figma",n.Yahoo="yahoo",(r=h||(h={})).Vessel="Vessel",r.Phantom="Phantom",r.Metamask="Metamask",r.Coinbase="Coinbase",r.Binance="Binance",r.GenericEthereumWallet="Other Ethereum Wallet",r.GenericSolanaWallet="Other Solana Wallet",(i=g||(g={})).embedded="embedded",i.floating="floating",i.embeddedOnly="embeddedOnly",i.floatingOrEmbedded="floatingOrEmbedded",i.forceLegacyEmbedded="forceLegacyEmbedded",(o=v||(v={})).SMS="sms",o.WhatsApp="whatsapp",o.Email="email",(a=y||(y={})).MagicLinkLoginOrCreateEvent="MAGIC_LINK_LOGIN_OR_CREATE",a.OTPsLoginOrCreateEvent="OTP_LOGIN_OR_CREATE",a.OTPsAuthenticate="OTP_AUTHENTICATE",a.CryptoWalletAuthenticateStart="CRYPTO_WALLET_AUTHENTICATE_START",a.CryptoWalletAuthenticate="CRYPTO_WALLET_AUTHENTICATE",a.PasswordCreate="PASSWORD_CREATE",a.PasswordAuthenticate="PASSWORD_AUTHENTICATE",a.PasswordResetByEmailStart="PASSWORD_RESET_BY_EMAIL_START",a.PasswordResetByEmail="PASSWORD_RESET_BY_EMAIL",a.PasskeyRegister="PASSKEY_REGISTER",a.PasskeyAuthenticate="PASSKEY_AUTHENTICATE",a.PasskeySkip="PASSKEY_SKIP",a.PasskeyDone="PASSKEY_DONE",a.AuthenticateFlowComplete="AUTHENTICATE_FLOW_COMPLETE",a.OAuthAuthorizeFlowStart="OAUTH_AUTHORIZE_FLOW_START",a.OAuthAuthorizeFlowComplete="OAUTH_AUTHORIZE_FLOW_COMPLETE",a.OAuthAuthorizeFlowConsentDenied="OAUTH_AUTHORIZE_FLOW_CONSENT_DENIED",a.B2BMagicLinkEmailLoginOrSignup="B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP",a.B2BMagicLinkAuthenticate="B2B_MAGIC_LINK_AUTHENTICATE",a.B2BMagicLinkEmailDiscoverySend="B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND",a.B2BMagicLinkDiscoveryAuthenticate="B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE",a.B2BSSOStart="B2B_SSO_START",a.B2BSSOAuthenticate="B2B_SSO_AUTHENTICATE",a.B2BSSODiscoverConnections="B2B_SSO_DISCOVER_CONNECTIONS",a.B2BOAuthAuthenticate="B2B_OAUTH_AUTHENTICATE",a.B2BOAuthDiscoveryAuthenticate="B2B_OAUTH_DISCOVERY_AUTHENTICATE",a.B2BDiscoveryOrganizationsCreate="B2B_DISCOVERY_ORGANIZATIONS_CREATE",a.B2BDiscoveryIntermediateSessionExchange="B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE",a.B2BPasswordAuthenticate="B2B_PASSWORD_AUTHENTICATE",a.B2BPasswordDiscoveryAuthenticate="B2B_PASSWORD_DISCOVERY_AUTHENTICATE",a.B2BPasswordResetByEmailStart="B2B_PASSWORD_RESET_BY_EMAIL_START",a.B2BPasswordResetByEmail="B2B_PASSWORD_RESET_BY_EMAIL",a.B2BPasswordResetBySession="B2B_PASSWORD_RESET_BY_SESSION",a.B2BSMSOTPSend="B2B_SMS_OTP_SEND",a.B2BSMSOTPAuthenticate="B2B_SMS_OTP_AUTHENTICATE",a.B2BTOTPCreate="B2B_TOTP_CREATE",a.B2BTOTPAuthenticate="B2B_TOTP_AUTHENTICATE",a.B2BRecoveryCodesRecover="B2B_RECOVERY_CODES_RECOVER",a.B2BPasswordDiscoveryResetStart="B2B_PASSWORD_DISCOVERY_RESET_BY_EMAIL_START",a.B2BDiscoveryPasswordReset="B2B_PASSWORD_DISCOVERY_RESET_BY_EMAIL",a.B2BImpersonationAuthenticate="B2B_IMPERSONATION_AUTHENTICATE",a.B2BOTPsEmailAuthenticate="B2B_OTPS_EMAIL_AUTHENTICATE",a.B2BOTPsEmailDiscoveryAuthenticate="B2B_OTPS_EMAIL_DISCOVERY_AUTHENTICATE",a.B2BOTPsEmailDiscoverySend="B2B_OTPS_EMAIL_DISCOVERY_SEND",a.B2BOTPsEmailLoginOrSignup="B2B_OTPS_EMAIL_LOGIN_OR_SIGNUP",a.B2BOrganizationsGetBySlug="B2B_ORGANIZATIONS_GET_BY_SLUG",(s=_||(_={}))[s.emailMagicLinks=0]="emailMagicLinks",s[s.oauth=1]="oauth",s[s.otp=2]="otp",s[s.passwords=3]="passwords";var K=function(e){function t(e,n){var r;return I(this,t),(r=L(this,t,[e+"\n"+n])).message=e+"\n"+n,r.name="SDKAPIUnreachableError",r.details=n,Object.setPrototypeOf(r,t.prototype),r}return M(t,e),z(t)}(B(Error)),G=function(e){function t(e,n){var r;return I(this,t),(r=L(this,t)).name="StytchSDKUsageError",r.message="Invalid call to ".concat(e,"\n")+n,r}return M(t,e),z(t)}(B(Error)),W=function(e){function t(e){I(this,t),(n=L(this,t)).name="StytchSDKSchemaError";var n,r,i=null==(r=e.body)?void 0:r.map(function(e){return"".concat(e.dataPath,": ").concat(e.message)}).join("\n");return n.message="[400] Request does not match expected schema\n".concat(i),n}return M(t,e),z(t)}(B(Error)),q=function(e){function t(e){I(this,t),(n=L(this,t)).name="StytchSDKAPIError";var n,r=e.status_code,i=e.error_type,o=e.error_message,a=e.error_url,s=e.request_id,c=e.error_details;return n.error_type=i,n.error_message=o,n.error_url=a,n.request_id=s,n.status_code=r,n.error_details=c,n.message="[".concat(r,"] ").concat(i,"\n")+"".concat(o,"\n")+"See ".concat(a," for more information.\n")+(s?"request_id: ".concat(s,"\n"):"")+(n.error_details?"Details: \n"+JSON.stringify(n.error_details)+"\n":""),n}return M(t,e),z(t)}(B(Error)),V=["unauthorized_credentials","user_unauthenticated","invali
1d_secret_authentication","session_not_found"],$=function(e){function t(e,n){var r;return I(this,t),(r=L(this,t,[n])).name=e,r}return M(t,e),z(t)}(B(Error)),Z=function(e){function t(e){var n;return I(this,t),Object.setPrototypeOf(n=L(this,t,["StytchAPIUnreachableError",e]),t.prototype),n}return M(t,e),z(t)}($),Y=function(e){function t(e){I(this,t);var n,r=null==(n=e.body)?void 0:n.map(function(e){return"".concat(e.dataPath,": ").concat(e.message)}).join("\n");return L(this,t,["StytchAPISchemaError","Request does not match expected schema\n".concat(r)])}return M(t,e),z(t)}($),J=function(e){function t(e){I(this,t);var n,r=e.status_code,i=e.error_type,o=e.error_message,a=e.error_url,s=e.request_id,c=e.error_details;return(n=L(this,t,["StytchAPIError","[".concat(r,"] ").concat(i,"\n")+"".concat(o,"\n")+"See ".concat(a," for more information.\n")+(s?"request_id: ".concat(s,"\n"):"")+(c?"Details: \n"+JSON.stringify(c)+"\n":"")])).error_type=i,n.error_message=o,n.error_url=a,n.request_id=s,n.status_code=r,n.error_details=c,n}return M(t,e),z(t,null,[{key:"from",value:function(e){return e instanceof t?e:e&&"object"===j(e)&&"number"==typeof e.status_code&&"string"==typeof e.error_type&&"string"==typeof e.error_message&&"string"==typeof e.error_url?new t({status_code:e.status_code,error_type:e.error_type,error_message:e.error_message,error_url:e.error_url,request_id:"string"==typeof e.request_id?e.request_id:void 0,error_details:"object"===j(e.error_details)?e.error_details:void 0}):new t({status_code:400,error_type:"unknown_error",error_message:e instanceof Error?e.message:"Unknown error: "+String(e),error_url:"",request_id:void 0,error_details:void 0})}}])}($),Q=function(e){function t(e,n,r){var i;return I(this,t),(i=L(this,t,[e,n])).options=r,i}return M(t,e),z(t)}($),X=function(e){function t(){return I(this,t),L(this,t,["NoCurrentSessionError","There is no session currently available. Make sure the user is authenticated with a valid session."])}return M(t,e),z(t)}(Q),ee=function(e){function t(e){return I(this,t),L(this,t,["IDPOAuthFlowMissingParamError",e])}return M(t,e),z(t)}(Q);function et(e){return(et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e){return function(e){if(Array.isArray(e))return ei(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||er(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(e,t){if(e){if("string"==typeof e)return ei(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ei(e,t):void 0}}function ei(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eo(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=Object.create((r&&r.prototype instanceof s?r:s).prototype);return ea(c,"_invoke",function(n,r,i){var o,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,c=e,f.n=n,a}};function p(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,o=l[t],p=f.p,m=o[2];n>3?(i=m===r)&&(c=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,m),s=l,c=m;(t=s<2?e:c)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,c)):f.n=c:f.v=c);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==a)break}catch(t){o=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][r]?t(t([][r]())):(ea(t={},r,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ea(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,ea(l,"constructor",u),ea(u,"constructor",c),c.displayName="GeneratorFunction",ea(u,i,"GeneratorFunction"),ea(l),ea(l,i,"Generator"),ea(l,r,function(){return this}),ea(l,"toString",function(){return"[object Generator]"}),(eo=function(){return{w:o,m:d}})()}function ea(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(ea=function(e,t,n,r){function o(t,n){ea(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function es(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=et(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=et(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==et(t)?t:t+""}(r.key),r)}}
1function ec(e,t,n){return t&&es(e.prototype,t),n&&es(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function eu(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function el(e){var t="function"==typeof Map?new Map:void 0;return(el=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(ed())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&ef(i,n.prototype),i}(e,arguments,ep(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ef(n,e)})(e)}function ed(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ed=function(){return!!e})()}function ef(e,t){return(ef=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ep(e){return(ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}(c=b||(b={})).emailMagicLinks="emailMagicLinks",c.emailOtp="emailOtp",c.sso="sso",c.passwords="passwords",c.oauth="oauth",(u=w||(w={})).Discovery="Discovery",u.Organization="Organization",u.PasswordReset="PasswordReset",(k||(k={})).ResetPassword="reset_password",(l=S||(S={})).smsOtp="smsOtp",l.totp="totp",(d=C||(C={})).Google="google",d.Microsoft="microsoft",d.HubSpot="hubspot",d.Slack="slack",d.GitHub="github";var em="https://js.stytch.com/clientside-services/index.html",eh="https://accounts.google.com/gsi",eg="".concat(eh,"/client"),ev="It looks like you're creating multiple copies of the Stytch client. This behavior is unsupported, and unintended side effects may occur. Make sure you are creating the Stytch client at the global level, and not inside a component's render function.";(E||(E={})).RequiredCaptcha="CAPTCHA required";var ey=function(e){function t(e){var n,r,i;return eu(this,t),r=t,i=[e],r=ep(r),(n=function(e,t){if(t&&("object"==et(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(this,ed()?Reflect.construct(r,i||[],ep(this).constructor):r.apply(this,i))).type=e,n}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ef(t,e),ec(t)}(el(Error));function e_(e){var t=e.method,n=e.finalURL,r=e.basicAuthHeader,i=e.xSDKClientHeader,o=e.xSDKParentHostHeader,a=e.body,s=e.retryCallback;return F(this,void 0,void 0,eo().m(function e(){var c,u;return eo().w(function(e){for(;;)switch(e.p=e.n){case 0:return c={method:t,finalURL:n,basicAuthHeader:r,xSDKClientHeader:i,xSDKParentHostHeader:o,body:a},e.p=1,e.n=2,eb(c);case 2:case 5:return e.a(2,e.v);case 3:if(e.p=3,!((u=e.v)instanceof ey)){e.n=6;break}return e.n=4,s(u,c);case 4:return c=e.v,e.n=5,eb(c);case 6:throw u;case 7:return e.a(2)}},e,null,[[1,3]])}))}function eb(e){var t,n=e.method,r=e.finalURL,i=e.basicAuthHeader,o=e.xSDKClientHeader,a=e.xSDKParentHostHeader,s=e.body;return F(this,void 0,void 0,eo().m(function e(){var c,u,l,d,f,p,m;return eo().w(function(e){for(;;)switch(e.p=e.n){case 0:return c={Authorization:i,"Content-Type":"application/json","X-SDK-Client":o},a&&(c["X-SDK-Parent-Host"]=a),u={method:n,headers:c,body:s&&JSON.stringify(s),credentials:"include"},e.p=1,e.n=2,fetch(r,u);case 2:l=e.v,e.n=5;break;case 3:if(e.p=3,"Failed to fetch"!==(m=e.v).message){e.n=4;break}throw new Z("Unable to contact our servers.");case 4:throw m;case 5:if(!(l.status<=299)){e.n=9;break}return e.p=6,e.n=7,l.json();case 7:return d=e.v,e.a(2,d.data);case 8:throw e.p=8,e.v,new Z("Invalid JSON response from our servers.");case 9:if(!(200!==l.status&&(null==(t=l.headers.get("content-type"))?void 0:t.includes("application/json")))){e.n=15;break}return e.p=10,e.n=11,l.json();case 11:f=e.v,e.n=13;break;case 12:throw e.p=12,e.v,new Z("Invalid or no response from server");case 13:if(!("body"in f||"params"in f||"query"in f)){e.n=14;break}throw new Y(f);case 14:throw new J(f);case 15:return e.p=15,e.n=16,l.text();case 16:p=e.v,e.n=18;break;case 17:throw e.p=17,e.v,new Z("Invalid response from our servers.");case 18:if(!p.includes("Captcha required")){e.n=19;break}throw new ey(E.RequiredCaptcha);case 19:throw new Z("Invalid response from our servers.");case 20:return e.a(2)}},e,null,[[15,17],[10,12],[6,8],[1,3]])}
1))}function ew(e){var t=e.method,n=e.finalURL,r=e.basicAuthHeader,i=e.xSDKClientHeader,o=e.xSDKParentHostHeader,a=e.body;return F(this,void 0,void 0,eo().m(function e(){var s,c,u;return eo().w(function(e){for(;;)switch(e.n){case 0:s=Object.assign(Object.assign({},a||{}),{__Authorization:r,"__X-SDK-Client":i}),o&&(s["__X-SDK-Parent-Host"]=o),c=Object.entries(s).map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(e)||er(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],i=document.createElement("input");return i.type="hidden",i.name=n,i.value=r,i}),(u=document.createElement("form")).method=t,u.action=n,u.append.apply(u,en(c)),document.body.appendChild(u),u.submit();case 1:return e.a(2)}},e)}))}for(var ek=new Uint8Array(16),eS=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,eC=[],eE=0;eE<256;++eE)eC.push((eE+256).toString(16).substr(1));function eO(e,t,n){var r=(e=e||{}).random||(e.rng||function(){if(!O&&!(O="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"u">typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return O(ek)})();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(eC[e[t+0]]+eC[e[t+1]]+eC[e[t+2]]+eC[e[t+3]]+"-"+eC[e[t+4]]+eC[e[t+5]]+"-"+eC[e[t+6]]+eC[e[t+7]]+"-"+eC[e[t+8]]+eC[e[t+9]]+"-"+eC[e[t+10]]+eC[e[t+11]]+eC[e[t+12]]+eC[e[t+13]]+eC[e[t+14]]+eC[e[t+15]]).toLowerCase();if(!("string"==typeof n&&eS.test(n)))throw TypeError("Stringified UUID is invalid");return n}(r)}var ex={};function eP(e,t){return F(this,void 0,void 0,eo().m(function n(){return eo().w(function(n){for(;;)switch(n.n){case 0:if(void 0===ex[e]){n.n=1;break}return n.a(2,ex[e]);case 1:return ex[e]=function(e,t){return new Promise(function(n,r){var i=function(e){var t=document.querySelectorAll('script[src="'.concat(e,'"]'));if(t[0])return t[0]}(e);if(i&&"true"===i.dataset.loaded)try{n(t())}catch(t){return r(Error("".concat(e," already loaded, but module was not found in global scope: ").concat(t)))}var o=function(e){var t=document.createElement("script");return t.setAttribute("src",e),t.setAttribute("async","true"),t.setAttribute("defer","true"),document.head.appendChild(t),t}(e);o.addEventListener("load",function(){o.dataset.loaded="true";try{n(t())}catch(t){r(Error("".concat(e," was loaded, but module was not found in global scope: ").concat(t)))}}),o.addEventListener("error",function(t){r(Error("".concat(e," could not be loaded: ").concat(t)))})})}(e,t),n.a(2,ex[e])}},n)}))}var eA=function(e){try{var t=new URL(e);return"https://".concat(t.hostname)}catch(e){}try{var n=new URL("https://".concat(e));return"https://".concat(n.hostname)}catch(e){}},eT=["[Stytch]"],eD={debug:function(){return!1},log:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=console).log.apply(e,eT.concat(n))},warn:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=console).warn.apply(e,eT.concat(n))},error:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=console).error.apply(e,eT.concat(n))}},eF=function(e){var t,n,r,i,o=null!=(t=null==e?void 0:e.customBaseUrl)?t:null==(n=null==e?void 0:e.endpointOptions)?void 0:n.apiDomain;if(o){var a=eA(o);if(a)return a;var s=(null==e?void 0:e.customBaseUrl)?"customBaseUrl":"apiDomain";eD.warn("Unable to use custom API domain `".concat(o,"`. ").concat(s," should be a valid domain."))}return null!=(i=null==(r=null==e?void 0:e.endpoints)?void 0:r.liveAPIURL)?i:"https://api.stytch.com"},ej=function(e){var t,n,r,i,o=null!=(t=null==e?void 0:e.customBaseUrl)?t:null==(n=null==e?void 0:e.endpointOptions)?void 0:n.testApiDomain;if(o){var a=eA(o);if(a)return a;var s=(null==e?void 0:e.customBaseUrl)?"customBaseUrl":"testApiDomain";eD.warn("Unable to use custom API domain `".concat(o,"`. ").concat(s," should be a valid domain."))}return null!=(i=null==(r=null==e?void 0:e.endpoints)?void 0:r.testAPIURL)?i:"https://test.stytch.com"},eR="\nYou can find your public token at https://stytch.com/dashboard/api-keys.",ez=function(e){"string"!=typeof e?eD.warn("Public token is malformed. E
1xpected a string, got ".concat(et(e),".").concat(eR)):""===e?eD.warn('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(eR)):e.startsWith("public-token-")||eD.warn('Public token is malformed. Expected "public-token-...", got '.concat(e,".").concat(eR))},eI=function(e){if("u"<typeof window)throw Error("`new ".concat(e,"()` is not supported in server environments. If using @stytch/react or @stytch/nextjs, use `").concat("StytchB2BUIClient"===e?"createStytchB2BUIClient":"createStytchB2BHeadlessClient","()` instead."))},eL=function(e){var t,n,r,i,o=null!=(t=null==e?void 0:e.dfppaUrl)?t:null==(n=null==e?void 0:e.endpointOptions)?void 0:n.dfppaDomain;if(o){var a=eA(o);if(a)return a;var s=(null==e?void 0:e.dfppaUrl)?"dfppaUrl":"dfppaDomain";eD.warn("Unable to use custom DFPPA domain `".concat(o,"`. ").concat(s," should be a valid domain."))}return null!=(i=null==(r=null==e?void 0:e.endpoints)?void 0:r.dfpBackendURL)?i:"https://telemetry.stytch.com"},eM=function(e){var t,n,r=null!=(t=null==e?void 0:e.dfpCdnUrl)?t:null==(n=null==e?void 0:e.endpointOptions)?void 0:n.dfpCdnDomain;if(r){var i=eA(r);if(i)return i;var o=(null==e?void 0:e.dfpCdnUrl)?"dfpCdnUrl":"dfpCdnDomain";eD.warn("Unable to use custom DFP CDN domain `".concat(r,"`. ").concat(o," should be a valid domain."))}return"https://elements.stytch.com"},eB=function(e){return e.includes("public-token-test")},eN=function(){return"event-id-".concat(eO())},eU=function(){return"app-session-id-".concat(eO())},eH=function(){return"persistent-id-".concat(eO())},eK=function(e){var t={isObject:function(n,r){if(!("object"===et(r)&&!Array.isArray(r)&&null!==r))throw new G(e,n+" must be an object.");return t},isOptionalObject:function(e,n){return void 0===n?t:t.isObject(e,n)},isString:function(n,r){if("string"!=typeof r)throw new G(e,n+" must be a string.");return t},isOptionalString:function(e,n){return void 0===n?t:t.isString(e,n)},isStringArray:function(n,r){if(!Array.isArray(r))throw new G(e,n+" must be an array of strings.");var i,o=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=er(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;if("string"!=typeof a)throw new G(e,n+" must be an array of strings.")}}catch(e){o.e(e)}finally{o.f()}return t},isOptionalStringArray:function(e,n){return void 0===n?t:t.isStringArray(e,n)},isNumber:function(n,r){if("number"!=typeof r)throw new G(e,n+" must be a number.");return t},isOptionalNumber:function(e,n){return void 0===n?t:t.isNumber(e,n)},isBoolean:function(n,r){if("boolean"!=typeof r)throw new G(e,n+" must be a boolean.");return t},isOptionalBoolean:function(e,n){return void 0===n?t:t.isBoolean(e,n)}};return t},eG=ec(function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return Promise.resolve(void 0)};eu(this,e),this.bootstrapPromise=i,this.isEnabled=function(){return F(o,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,this.state.then(function(e){return e.enabled}))},e,this)}))},this.getTelemetryID=function(){return F(o,void 0,void 0,eo().m(function e(){var t,n,r,i;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.state;case 1:if(n=(t=e.v).publicToken,r=t.enabled,i=t.dfpBackendURL,r){e.n=2;break}return e.a(2,void 0);case 2:return e.n=3,window.GetTelemetryID(n,"".concat(i,"/submit"));case 3:return e.a(2,e.v)}},e,this)}))},this.getDFPTelemetryIDAndCaptcha=function(){return F(o,void 0,void 0,eo().m(function e(){var t,n,r,i,o,a;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.state;case 1:if(n=(t=e.v).enabled,r=t.executeRecaptcha,i=t.mode,o=void 0,a=void 0,n){e.n=3;break}return e.n=2,r();case 2:a=e.v;case 3:if("DECISIONING"!==i){e.n=5;break}return e.n=4,this.getTelemetryID();case 4:o=e.v,e.n=8;break;case 5:if("OBSERVATION"!==i){e.n=8;break}return e.n=6,this.getTelemetryID();case 6:return o=e.v,e.n=7,r();case 7:a=e.v;case 8:return e.a(2,{dfp_telemetry_id:o,captcha_token:a})}},e,this)}))},this.retryWithCaptchaAndDFP=function(e,t){return F(o,void 0,void 0,eo().m(function n(){var r,i,o;return eo().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.state;case 1:if(i=(r=n.v).enabled,o=r.executeRecaptcha,!(e.type===E.RequiredCaptcha&&i)){n.n=5;break}if(!t.body){n.n=4;break}return n.n=2,this.getTelemetryID();case 2:return t.body.dfp_telemetry_id=n.v,n.n=3,o();case 3:t.body.captcha_token=n.v;case 4:return n.a(2,t);case 5:throw Error("Unable to query captcha and/or dfp telemetry ID");case 6:return n.a(2)}},n,this)}))},this.state=i.then(function(e){return F(o,void 0,void 0,eo().m(function i(){return eo().w(function(i){for(;;)switch(i.n){case 0:if(e.runDFPProtectedAuth){i.n=1;break}
1return i.a(2,{publicToken:t,dfpBackendURL:n,enabled:!1,loaded:!1,executeRecaptcha:a});case 1:return i.n=2,eP("".concat(r,"/telemetry.js"),function(){return window.GetTelemetryID});case 2:return i.a(2,{publicToken:t,dfpBackendURL:n,enabled:!0,mode:e.dfpProtectedAuthMode||"OBSERVATION",loaded:!0,executeRecaptcha:a})}},i)}))})}),eW=function(){return{isEnabled:function(){return F(void 0,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,!1)},e)}))},getTelemetryID:function(){return F(void 0,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,void 0)},e)}))},getDFPTelemetryIDAndCaptcha:function(){return F(void 0,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,{dfp_telemetry_id:void 0,captcha_token:void 0})},e)}))},retryWithCaptchaAndDFP:function(){return F(void 0,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)switch(e.n){case 0:throw Error("DFP protected auth is disabled");case 1:return e.a(2)}},e)}))}}},eq=function(){function e(){eu(this,e)}return ec(e,null,[{key:"inflate",value:function(e,t){var n=new e(t);return Object.assign(n,t),Object.setPrototypeOf(n,e.prototype),n}},{key:"unmarshall",value:function(t){if("name"in t)switch(t.name){case"SDKAPIUnreachableError":return e.inflate(K,t);case"StytchSDKSchemaError":return e.inflate(W,t);case"StytchAPIUnreachableError":return e.inflate(Z,t);case"StytchAPISchemaError":return e.inflate(Y,t);case"StytchSDKAPIError":return e.inflate(q,t);case"StytchAPIError":return e.inflate(J,t);case"TypeError":return e.inflate(TypeError,t);case"SyntaxError":return e.inflate(SyntaxError,t);case"ReferenceError":return e.inflate(ReferenceError,t);case"RangeError":return e.inflate(RangeError,t);case"EvalError":return e.inflate(EvalError,t);case"URIError":return e.inflate(URIError,t)}return e.inflate(Error,t)}}])}(),eV=ec(function e(t){eu(this,e),this.maxBatchSize=t.maxBatchSize,this.logEventURL=t.logEventURL,setInterval(this.flush.bind(this),t.intervalDurationMs),this.batch=[]},[{key:"logEvent",value:function(e,t){this.batch.push({telemetry:e,event:t}),this.batch.length>=this.maxBatchSize&&this.flush()}},{key:"flush",value:function(){return F(this,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.p=e.n){case 0:if(this.batch.length){e.n=1;break}return e.a(2);case 1:return t=this.batch,this.batch=[],e.p=2,e.n=3,fetch(this.logEventURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});case 3:e.n=5;break;case 4:e.p=4,e.v;case 5:return e.a(2)}},e,this,[[2,4]])}))}}]);(f=x||(x={})).LoginOrCreateEML="login_or_create_eml",f.LoginOrCreateOTP="login_or_create_otp",f.ResetPassword="reset_password",Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),Promise.resolve({siweRequiredForCryptoWallets:!1}),Promise.resolve({pkceRequiredForPasswordResets:!1});var e$=function(){function e(t,n){var r=this;eu(this,e),this.roles=t,this.resources=n,this.rolesByID={},t.forEach(function(e){return r.rolesByID[e.role_id]=e})}return ec(e,[{key:"mergeWithCustomRoles",value:function(t){return new e([].concat(en(this.roles),en(t)),this.resources)}},{key:"callerIsAuthorized",value:function(e,t,n){var r=this;return!!e.map(function(e){return r.rolesByID[e]}).filter(function(e){return e}).flatMap(function(e){return e.permissions}).filter(function(e){return e.resource_id===t}).find(function(e){return e.actions.includes(n)||e.actions.includes("*")})}},{key:"allPermissionsForCaller",value:function(e){var t=this,n=Object.create(null);return this.resources.forEach(function(r){n[r.resource_id]={},r.actions.forEach(function(i){n[r.resource_id][i]=t.callerIsAuthorized(e,r.resource_id,i)})}),n}}],[{key:"fromJSON",value:function(t){return new e(t.roles,t.resources)}}])}(),eZ=Promise.resolve({pkceRequiredForEmailMagicLinks:!1}),eY=ec(function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:eZ,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:eW();eu(this,e),this._networkClient=t,this._subscriptionService=n,this._pkceManager=r,this._passwordResetPKCEManager=i,this._config=a,this.dfpProtectedAuth=s,this.email={invite:function(e){return F(o,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.magicLinks.email.invite").isString("email_address",e.email_address).isOptionalString("invite_redirect_url",e.invite_redirect_url).isOptionalString("invite_template_id",e.invite_template_id).isOptionalString("name",e.name).isOptionalString("locale",e.locale).isOptionalStringArray("roles",e.roles).isOptionalNumber("invite_expiration_minutes",e.invite_expiration_minutes),t.a(2,this._networkClient.fetchSDK({url:"/b2b/magic_links/email/invite",body:e,method:"POST"}))},t,this)}))},loginOrSignup:function(e){return F(o,void 0,void 0,eo().m(function t(){var n,r;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.magicLinks.email.loginOrSignup").isString("email_address",e.email_address).isString("organization_id",e.organization_id).isOptionalString("login_redirect_url",e.login_redirect_url).isOptionalString("login_template_id",e.login_template_id).isOptionalString("signup_redirect_url",e.signup_redirect_url).isOptionalString("signup_template_id",e.
1signup_template_id).isOptionalString("locale",e.locale).isOptionalNumber("login_expiration_minutes",e.login_expiration_minutes).isOptionalNumber("signup_expiration_minutes",e.signup_expiration_minutes),t.n=1,this.getCodeChallenge();case 1:return n=t.v,r=Object.assign(Object.assign({},e),{pkce_code_challenge:n}),t.a(2,this._networkClient.fetchSDK({url:"/b2b/magic_links/email/login_or_signup",body:r,method:"POST"}))}},t,this)}))},discovery:{send:function(e){return F(o,void 0,void 0,eo().m(function t(){var n,r,i,o,a;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.magicLinks.email.discovery.send").isString("email_address",e.email_address).isOptionalString("discovery_redirect_url",e.discovery_redirect_url).isOptionalString("login_template_id",e.login_template_id).isOptionalString("locale",e.locale).isOptionalNumber("discovery_expiration_minutes",e.discovery_expiration_minutes),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.n=2,this.getCodeChallenge();case 2:return o=t.v,a=Object.assign(Object.assign({},e),{pkce_code_challenge:o,dfp_telemetry_id:r,captcha_token:i}),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/magic_links/email/discovery/send",body:a,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))}}},this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(o,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.p=t.n){case 0:return eK("stytch.magicLinks.authenticate").isString("magic_links_token",e.magic_links_token).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this._passwordResetPKCEManager.getPKPair();case 1:if(n=t.v,r=null,!(null==n?void 0:n.code_verifier)){t.n=6;break}return t.p=2,t.n=3,this.handlePKCEForAuthenticate(this._passwordResetPKCEManager,e);case 3:r=t.v,t.n=6;break;case 4:if(t.p=4,!(i=t.v).message.includes("pkce")){t.n=5;break}console.log("Authenticate with passwords pkce namespace failed. Falling back to authenticate with magic_links namespace."),t.n=6;break;case 5:throw i;case 6:if(r){t.n=8;break}return t.n=7,this.handlePKCEForAuthenticate(this._pkceManager,e);case 7:r=t.v;case 8:return t.a(2,r)}},t,this,[[2,4]])}))}),this.discovery={authenticate:this._subscriptionService.withUpdateSession(function(e){return F(o,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.magicLinks.discovery.authenticate").isString("discovery_magic_links_token",e.discovery_magic_links_token),t.n=1,this._pkceManager.getPKPair();case 1:return n=t.v,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,a=Object.assign({pkce_code_verifier:null==n?void 0:n.code_verifier,dfp_telemetry_id:i,captcha_token:o},e),t.n=3,this._networkClient.retriableFetchSDK({url:"/b2b/magic_links/discovery/authenticate",body:a,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 3:return s=t.v,this._pkceManager.clearPKPair(),t.a(2,s)}},t,this)}))})}},[{key:"getCodeChallenge",value:function(){return F(this,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._config;case 1:if(e.v.pkceRequiredForEmailMagicLinks){e.n=2;break}return e.a(2,void 0);case 2:return e.n=3,this._pkceManager.getPKPair();case 3:if(!(t=e.v)){e.n=4;break}return e.a(2,t.code_challenge);case 4:return e.n=5,this._pkceManager.startPKCETransaction();case 5:return t=e.v,e.a(2,t.code_challenge)}},e,this)}))}},{key:"handlePKCEForAuthenticate",value:function(e,t){return F(this,void 0,void 0,eo().m(function n(){var r,i,o,a,s,c,u,l,d,f,p,m;return eo().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,e.getPKPair();case 1:return r=n.v,n.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return o=(i=n.v).dfp_telemetry_id,a=i.captcha_token,u=Object,l=null==r?void 0:r.code_verifier,d=o,f=a,n.n=3,this._subscriptionService.getIntermediateSessionToken();case 3:if(p=n.v){n.n=4;break}p=void 0;case 4:return m=p,s=u.assign.call(u,{pkce_code_verifier:l,dfp_telemetry_id:d,c
1aptcha_token:f,intermediate_session_token:m},t),n.n=5,this._networkClient.retriableFetchSDK({url:"/b2b/magic_links/authenticate",body:s,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 5:return c=n.v,e.clearPKPair(),n.a(2,c)}},n,this)}))}}]),eJ=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._apiNetworkClient=n,this._subscriptionService=r,this.get=function(){return F(i,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/me",method:"GET"});case 1:return t=e.v,this._subscriptionService.updateMember(t.member),e.a(2,t.member)}},e,this)}))},this.getSync=function(){return i._subscriptionService.getMember()},this.getInfo=function(){return{member:i.getSync(),fromCache:i._subscriptionService.getFromCache()}},this.onChange=function(e){return i._subscriptionService.subscribeToState(function(t){var n;return e(null!=(n=null==t?void 0:t.member)?n:null)})},this.update=function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.self.update").isOptionalString("name",e.name).isOptionalObject("untrusted_metadata",e.untrusted_metadata).isOptionalBoolean("mfa_enrolled",e.mfa_enrolled).isOptionalString("mfa_phone_number",e.mfa_phone_number).isOptionalString("default_mfa_method",e.default_mfa_method),t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/update",body:e,method:"PUT"});case 1:return n=t.v,this._subscriptionService.updateMember(n.member),t.a(2,n)}},t,this)}))},this.deleteMFAPhoneNumber=function(){return F(i,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/deletePhoneNumber",method:"DELETE"});case 1:return t=e.v,this._subscriptionService.updateMember(t.member),e.a(2,t)}},e,this)}))},this.deleteMFATOTP=function(){return F(i,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/deleteTOTP",method:"DELETE"});case 1:return t=e.v,this._subscriptionService.updateMember(t.member),e.a(2,t)}},e,this)}))},this.deletePassword=function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/passwords/".concat(e),method:"DELETE"});case 1:return n=t.v,this._subscriptionService.updateMember(n.member),t.a(2,n)}},t,this)}))},this.unlinkRetiredEmail=function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._apiNetworkClient.fetchSDK({url:"/b2b/organizations/members/unlink_retired_email",method:"POST",body:e});case 1:return n=t.v,this._subscriptionService.updateMember(n.member),t.a(2,n)}},t,this)}))},this.startEmailUpdate=function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._apiNetworkClient.fetchSDK({url:"/b2b/organizations/members/start_email_update",method:"POST",body:e});case 1:return n=t.v,this._subscriptionService.updateMember(n.member),t.a(2,n)}},t,this)}))},this.getConnectedApps=function(){return F(i,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/members/connected_apps",method:"GET"}))},e,this)}))},this.revokeConnectedApp=function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/members/connected_apps/".concat(e.connected_app_id,"/revoke"),method:"POST"}))},t,this)}))}}),eQ=ec(function e(t,n,r,i,o,a){var s=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this._pkceManager=r,this._dynamicConfig=i,this._config=o,this.dfpProtectedAuth=a,this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(s,void 0,void 0,eo().m(function t(){var n,r,i,o,a;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.sso.authenticate").isString("sso_token",e.sso_token).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this._pkceManager.getPKPair();case 1:return(n=t.v)||eD.warn("No code verifier found in local storage for SSO flow.\nConsider using stytch.sso.start() to add PKCE to your SSO flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."),t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,t.n=3,this._networkClient.retriableFetchSDK({url:"/b2b/sso/authenticate",method:"POST",body:Object.assign(Object.assign({pkce_code_verifier:null==n?void 0:n.code_verifier},e),{dfp_telemetry_id:i,captcha_token:o,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 3:return a=t.v,this._pkceManager.clearPKPair(),t.a(2,a)}},t,this)}))}),this.saml={createConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/saml",method:"POST",body:e});case 1:return t.a(2,t.v)}},t,this)}))},updateConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/saml/".concat(e.connection_id),method:"PUT",body:e});case 1:return t.a(2,t.v)}},t,this)}))},updateConnectionByURL:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/saml/".concat(e.connection_id,"/url"),method:"PUT",body:e});case 1:return t.a(2,t.v)}},t,this)}))},deleteVerificationCertificate:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/saml/".concat(e.connection_id,"/verification_certificates/").concat(e.certificate_id),method:"DELETE"});case 1:return t.a(2,t.v)}},t,this)}))},deleteEncryptionPrivateKey:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/saml/".concat(e.connection_id,"/encryption_private_key/").concat(e.private_key_id),method:"DELETE"});case 1:return t.a(2,t.v)}},t,this)}))}},this.oidc={createConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/oidc",method:"POST",body:e});case 1:return t.a(2,t.v)}},t,this)}))},updateConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/oidc/".concat(e.connection_id),method:"PUT",body:e});case 1:return t.a(2,t.v)}},t,this)}))}},this.external={createConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/external",method:"POST",body:e});case 1:return t.a(2,t.v)}},t,this)}))},updateConnection:function(e){return F(s,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/external/".concat(e.connection_id),method:"PUT",body:e});case 1:return t.a(2,t.v)}},t,this)}))}}},[{key:"getBaseApiUrl",value:function(){return F(this,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)switch(e.n){case 0:if(!eB(this._config.publicToken)){e.n=1;break}return e.a(2,this._config.testAPIURL);case 1:return e.a(2,this._config.liveAPIURL)}},e,this)}))}},{key:"start",value:function(e){var t=e.connection_id,n=e.login_redirect_url,r=e.signup_redirect_url;return F(this,void 0,void 0,eo().m(function e(){var i,o,a,s;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._dynamicConfig;case 1:return i=e.v.pkceRequiredForSso,e.n=2,this.getBaseApiUrl();case 2:if(o=e.v,(a=new URL("".concat(o,"/v1/public/sso/start"))).searchParams.set("public_token",this._config.publicToken),a.searchParams.set("connection_id",t),!i){e.n=4;break}return e.n=3,this._pkceManager.startPKCETransaction();case 3:s=e.v,a.searchParams.set("pkce_code_challenge",s.code_challenge),e.n=5;break;case 4:this._pkceManager.clearPKPair();case 5:n&&a.searchParams.set("login_redirect_url",n),r&&a.searchParams.set("signup_redirect_url",r),window.location.href=a.toString();case 6:return e.a(2)}},e,this)}))}},{key:"getConnections",value:function(){return F(this,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/sso",method:"GET"});case 1:return e.a(2,e.v)}},e,this)}))}},{key:"discoverConnections",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/sso/discovery/connections?email_address=".concat(encodeURIComponent(e)),method:"GET"});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"deleteConnection",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/sso/".concat(e),method:"DELETE"}))},t,this)}))}}]),eX=ec(function e(t,n){eu(this,e),this._networkClient=t,this._subscriptionService=n},[{key:"createConnection",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.createConnection").isOptionalString("display_name",e.display_name).isOptionalString("identity_provider",e.identity_provider),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim",method:"POST",body:e});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"updateConnection",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.updateConnection").isString("connection_id",e.connection_id).isOptionalString("display_name",e.display_name).isOptionalString("identity_provider",e.identity_provider),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/".concat(e.connection_id),method:"PUT",body:e});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"deleteConnection",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.deleteConnection").isString("connection_id",e),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/".concat(e),method:"DELETE"});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"getConnection",value:function(){return F(this,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/scim",method:"GET"});case 1:return e.a(2,e.v)}},e,this)}))}},{key:"getConnectionGroups",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.getConnectionGroups").isOptionalNumber("limit",e.limit).isOptionalString("cursor",e.cursor),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/groups",method:"POST",body:e});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"rotateStart",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.rotateStart").isString("connectionId",e),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/rotate/start",method:"POST",body:{connection_id:e}});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"rotateComplete",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.rotateComplete").isString("connectionId",e),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/rotate/complete",method:"POST",body:{connection_id:e}});case 1:return t.a(2,t.v)}},t,this)}))}},{key:"rotateCancel",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.scim.rotateCancel").isString("connectionId",e),t.n=1,this._networkClient.fetchSDK({url:"/b2b/scim/rotate/cancel",method:"POST",body:{connection_id:e}});case 1:return t.a(2,t.v)}},t,this)}))}}]),e0=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._apiNetworkClient=n,this._subscriptionService=r,this.get=function(){return F(i,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/me",method:"GET"});case 1:return t=e.v,this._subscriptionService.updateOrganization(t.organization),e.a(2,t.organization)}},e,this)}))}
1,this.getSync=function(){return i._subscriptionService.getOrganization()},this.getInfo=function(){return{organization:i.getSync(),fromCache:i._subscriptionService.getFromCache()}},this.onChange=function(e){return i._subscriptionService.subscribeToState(function(t){var n;return e(null!=(n=null==t?void 0:t.organization)?n:null)})},this.update=function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/me",method:"PUT",body:e});case 1:return n=t.v,this._subscriptionService.updateOrganization(n.organization),t.a(2,n)}},t,this)}))},this.delete=function(){return F(i,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/me",method:"DELETE"});case 1:return t=e.v,this._subscriptionService.destroyState(),e.a(2,t)}},e,this)}))},this.getBySlug=function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.organization.getBySlug").isString("organization_slug",e.organization_slug),t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/search",method:"POST",body:e}))},t,this)}))},this.getConnectedApps=function(){return F(i,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/connected_apps",method:"GET"}))},e,this)}))},this.getConnectedApp=function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/connected_apps/".concat(e.connected_app_id),method:"GET"}))},t,this)}))},this.members={create:function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/members",method:"POST",body:e}))},t,this)}))},search:function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/me/members/search",method:"POST",body:e}))},t,this)}))},update:function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/".concat(e.member_id),method:"PUT",body:e});case 1:return n=t.v,this.updateMemberIfSelf(n),t.a(2,n)}},t,this)}))},deletePassword:function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/passwords/".concat(e),method:"DELETE"});case 1:return n=t.v,this.updateMemberIfSelf(n),t.a(2,n)}},t,this)}))},deleteMFAPhoneNumber:function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/mfa_phone_numbers/".concat(e),method:"DELETE"});case 1:return n=t.v,this.updateMemberIfSelf(n),t.a(2,n)}},t,this)}))},deleteMFATOTP:function(e){return F(i,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/totp/".concat(e),method:"DELETE"});case 1:return n=t.v,this.updateMemberIfSelf(n),t.a(2,n)}},t,this)}))},delete:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._networkClient.fetchSDK({url:"/b2b/organizations/members/".concat(e),method:"DELETE"});case 1:return r=t.v,e===(null==(n=this._subscriptionService.getMember())?void 0:n.member_id)&&this._subscriptionService.destroyState(),t.a(2,r)}},t,this)}))},reactivate:function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/members/".concat(e,"/reactivate"),method:"PUT"}))},t,this)}))},unlinkRetiredEmail:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return n=e.member_id,r=D(e,["member_id"]),t.n=1,this._apiNetworkClient.fetchSDK({url:"/b2b/organizations/members/".concat(n,"/unlink_retired_email"),method:"POST",body:r});case 1:return i=t.v,this.updateMemberIfSelf(i),t.a(2,i)}},t,this)}))},startEmailUpdate:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return n=e.member_id,r=D(e,["member_id"]),t.n=1,this._apiNetworkClient.fetchSDK({url:"/b2b/organizations/members/".concat(n,"/start_email_update"),method:"POST",body:r});case 1:return i=t.v,this.updateMemberIfSelf(i),t.a(2,i)}},t,this)}))},getConnectedApps:function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"b2b/organizations/members/".concat(e.member_id,"/connected_apps"),method:"GET"}))},t,this)}))},revokeConnectedApp:function(e){return F(i,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/organizations/members/".concat(e.member_id,"/connected_apps/").concat(e.connected_app_id,"/revoke"),method:"POST"}))},t,this)}))}},this.updateMemberIfSelf=function(e){var t;e.member_id===(null==(t=i._subscriptionService.getMember())?void 0:t.member_id)&&i._subscriptionService.updateMember(e.member)}}),e1=ec(function e(t,n,r,i,o,a){var s=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this._pkceManager=r,this._dynamicConfig=i,this._config=o,this.dfpProtectedAuth=a,this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(s,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s,c,u,l,d,f,p,m,h;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.oauth.authenticate").isString("oauth_token",e.oauth_token).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this._pkceManager.getPKPair();case 1:return(n=t.v)||eD.warn("No code verifier found in local storage for OAuth flow.\nConsider using stytch.oauth.$provider.start() to add PKCE to your OAuth flows for added security.\nSee https://stytch.com/docs/oauth#guides_pkce for more information."),t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,s=this._networkClient,c=Object,u=null==n?void 0:n.code_verifier,l=i,d=o,t.n=3,this._subscriptionService.getIntermediateSessionToken();case 3:if(f=t.v){t.n=4;break}f=void 0;case 4:return p=f,m=c.assign.call(c,{pkce_code_verifier:u,dfp_telemetry_id:l,captcha_token:d,intermediate_session_token:p},e),h=this.dfpProtectedAuth.retryWithCaptchaAndDFP,t.n=5,s.retri
1ableFetchSDK.call(s,{url:"/b2b/oauth/authenticate",method:"POST",body:m,retryCallback:h});case 5:return a=t.v,this._pkceManager.clearPKPair(),t.a(2,a)}},t,this)}))}),this.discovery={authenticate:this._subscriptionService.withUpdateSession(function(e){return F(s,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.oauth.discovery.authenticate").isString("discovery_oauth_token",e.discovery_oauth_token),t.n=1,this._pkceManager.getPKPair();case 1:return n=t.v,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,a=Object.assign({pkce_code_verifier:null==n?void 0:n.code_verifier,dfp_telemetry_id:i,captcha_token:o},e),t.n=3,this._networkClient.retriableFetchSDK({url:"/b2b/oauth/discovery/authenticate",body:a,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 3:return s=t.v,this._pkceManager.clearPKPair(),t.a(2,s)}},t,this)}))})},this.google={start:this.startOAuthFlow(C.Google),discovery:{start:this.startDiscoveryOAuthFlow(C.Google)}},this.microsoft={start:this.startOAuthFlow(C.Microsoft),discovery:{start:this.startDiscoveryOAuthFlow(C.Microsoft)}},this.hubspot={start:this.startOAuthFlow(C.HubSpot),discovery:{start:this.startDiscoveryOAuthFlow(C.HubSpot)}},this.slack={start:this.startOAuthFlow(C.Slack),discovery:{start:this.startDiscoveryOAuthFlow(C.Slack)}},this.github={start:this.startOAuthFlow(C.GitHub),discovery:{start:this.startDiscoveryOAuthFlow(C.GitHub)}}},[{key:"getBaseApiUrl",value:function(){return F(this,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._dynamicConfig;case 1:if(!(t=e.v.cnameDomain)){e.n=2;break}return e.a(2,"https://".concat(t));case 2:if(!eB(this._config.publicToken)){e.n=3;break}return e.a(2,this._config.testAPIURL);case 3:return e.a(2,this._config.liveAPIURL)}},e,this)}))}},{key:"startOAuthFlow",value:function(e){var t=this;return function(n){var r=n.organization_id,i=n.organization_slug,o=n.login_redirect_url,a=n.signup_redirect_url,s=n.custom_scopes,c=n.provider_params;return F(t,void 0,void 0,eo().m(function t(){var n,u,l,d,f;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._dynamicConfig;case 1:return n=t.v.pkceRequiredForOAuth,t.n=2,this.getBaseApiUrl();case 2:if(u=t.v,(l=new URL("".concat(u,"/v1/b2b/public/oauth/").concat(e,"/start"))).searchParams.set("public_token",this._config.publicToken),r&&""!=r&&l.searchParams.set("organization_id",r),i&&""!=i&&l.searchParams.set("slug",i),s&&(eK("startOAuthFlow").isStringArray("custom_scopes",s),l.searchParams.set("custom_scopes",s.join(" "))),c)for(d in eK("startOAuthFlow").isOptionalObject("provider_params",c),c)l.searchParams.set("provider_"+d,c[d]);if(!n){t.n=4;break}return t.n=3,this._pkceManager.startPKCETransaction();case 3:f=t.v,l.searchParams.set("pkce_code_challenge",f.code_challenge),t.n=5;break;case 4:this._pkceManager.clearPKPair();case 5:o&&l.searchParams.set("login_redirect_url",o),a&&l.searchParams.set("signup_redirect_url",a),window.location.href=l.toString();case 6:return t.a(2)}},t,this)}))}}},{key:"startDiscoveryOAuthFlow",value:function(e){var t=this;return function(n){var r=n.discovery_redirect_url,i=n.custom_scopes,o=n.provider_params;return F(t,void 0,void 0,eo().m(function t(){var n,a,s,c,u;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._dynamicConfig;case 1:return n=t.v.pkceRequiredForOAuth,t.n=2,this.getBaseApiUrl();case 2:if(a=t.v,(s=new URL("".concat(a,"/v1/b2b/public/oauth/").concat(e,"/discovery/start"))).searchParams.set("public_token",this._config.publicToken),i&&(eK("startOAuthFlow").isStringArray("custom_scopes",i),s.searchParams.set("custom_scopes",i.join(" "))),o)for(c in eK("startOAuthFlow").isOptionalObject("provider_params",o),o)s.searchParams.set("provider_"+c,o[c]);if(!n){t.n=4;break}return t.n=3,this._pkceManager.startPKCETransaction();case 3:u=t.v,s.searchParams.set("pkce_code_challenge",u.code_challenge),t.n=5;break;case 4:this._pkceManager.clearPKPair();case 5:r&&s.searchParams.set("discovery_redirect_url",r),window.location.href=s.toString();case 6:return t.a(2)}},t,this)}))}}}]),e2=ec(function e(t,n){var r=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.get
1Sync=function(){return r._subscriptionService.getSession()},this.getInfo=function(){return{session:r.getSync(),fromCache:r._subscriptionService.getFromCache()}},this.onChange=function(e){return r._subscriptionService.subscribeToState(function(t){var n;return e(null!=(n=null==t?void 0:t.session)?n:null)})},this.revoke=function(e){return F(r,void 0,void 0,eo().m(function t(){var n,r;return eo().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,this._networkClient.fetchSDK({url:"/b2b/sessions/revoke",method:"POST"});case 1:return n=t.v,this._subscriptionService.destroyState(),t.a(2,n);case 2:throw t.p=2,r=t.v,(null==e?void 0:e.forceClear)?this._subscriptionService.destroyState():V.includes(r.error_type)&&this._subscriptionService.destroyState(),r;case 3:return t.a(2)}},t,this,[[0,2]])}))},this.revokeForMember=function(e){return F(r,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.session.revokeForMember").isString("member_id",e.member_id),t.n=1,this._networkClient.fetchSDK({url:"/b2b/sessions/revoke/".concat(e.member_id),method:"POST"});case 1:return t.a(2,t.v)}},t,this)}))},this._authenticate=function(e){return F(r,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s=this;return eo().w(function(t){for(;;)switch(t.p=t.n){case 0:return n=this._subscriptionService.getSession(),r=function(){var e;return(null==n?void 0:n.member_session_id)!==(null==(e=s._subscriptionService.getSession())?void 0:e.member_session_id)},t.p=1,i={session_duration_minutes:null==e?void 0:e.session_duration_minutes},t.n=2,this._networkClient.fetchSDK({url:"/b2b/sessions/authenticate",body:i,method:"POST"});case 2:if(o=t.v,!r()){t.n=3;break}return t.a(2,this._authenticate(e));case 3:return t.a(2,o);case 4:if(t.p=4,a=t.v,!r()){t.n=5;break}return t.a(2,this._authenticate(e));case 5:throw V.includes(a.error_type)&&this._subscriptionService.destroySession(),a;case 6:return t.a(2)}},t,this,[[1,4]])}))},this.authenticate=this._subscriptionService.withUpdateSession(this._authenticate),this.exchange=this._subscriptionService.withUpdateSession(function(e){return F(r,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.session.exchange").isString("organization_id",e.organization_id).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.a(2,this._networkClient.fetchSDK({url:"/b2b/sessions/exchange",body:e,method:"POST"}))},t,this)}))}),this.exchangeAccessToken=this._subscriptionService.withUpdateSession(function(e){return F(r,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.session.exchange").isString("organization_id",e.access_token).isNumber("session_duration_minutes",e.session_duration_minutes),t.a(2,this._networkClient.fetchSDK({url:"/b2b/sessions/exchange_access_token",body:e,method:"POST"}))},t,this)}))}),this.attest=this._subscriptionService.withUpdateSession(function(e){return F(r,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.session.attest").isOptionalString("organization_id",e.organization_id).isString("profile_id",e.profile_id).isString("token",e.token).isOptionalNumber("session_duration_minutes",e.session_duration_minutes),t.a(2,this._networkClient.fetchSDK({url:"/b2b/sessions/attest",body:e,method:"POST"}))},t,this)}))})},[{key:"getTokens",value:function(){return this._subscriptionService.getTokens()}},{key:"updateSession",value:function(e){var t;eK("stytch.session.updateSession").isString("session_token",e.session_token).isOptionalString("session_jwt",null!=(t=e.session_jwt)?t:void 0),this._subscriptionService.updateTokens(e)}}]),e5=ec(function e(t,n){var r=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.organizations={list:function(){return F(r,void 0,void 0,eo().m(function e(){var t,n,r;return eo().w(function(e){for(;;)switch(e.n){case 0:return t=this._networkClient,e.n=1,this._subscriptionService.getIntermediateSessionToken();case 1:if(n=e.v){e.n=2;break}n=void 0;case 2:return r={intermediate_session_token:n},e.a(2,t.fetchSDK.call(t,{url:"/b2b/discovery/organizations",body:r,method:"POST"}))}},e,this)}))},create:this._subscriptionService.withUpdateSession(function(e){return F(r,void 0,void 0,eo().m(function t(){var n,r,i,o,a;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.discovery.organizations.create").isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("organization_name",e.organization_name).isOptionalString("organization_slug",e.organization_slug).isOptionalString("organization_logo_url",e.organization_logo_url).isOptionalString("sso_jit_provisioning",e.sso_jit_provisioning).isOptionalStringArray("email_allowed_domains",e.email_allowed_domains).isOptionalString("email_invites",e.email_invites).isOptionalString("auth_methods",e.auth_methods).isOptionalStringArray("allowed_auth_methods",e.allowed_auth_methods).isOptionalString("mfa_policy",e.mfa_policy),r=Object,i=Object.assign({},e),t.n=1,this._subscriptionService.getIntermediateSessionToken();case 1:if(o=t.v){t.n=2;break}o=void 0;case 2:return a=o,n=r.assign.call(r,i,{intermediate_session_token:a}),t.a(2,this._networkClient.fetchSDK({url:"/b2b/discovery/organizations/create",body:n,method:"POST"}))}},t,this)}))})},this.intermediateSessions={exchange:this._subscriptionService.withUpdateSession(function(e){return F(r,void 0,void 0,eo().m(function t(){var n;return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.discovery.intermediateSessions.exchange").isString("organization_id",e.organization_id).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),n=Object.assign(Object.assign({},e),{intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),t.a(2,this._networkClient.fetchSDK({url:"/b2b/discovery/intermediate_sessions/exchange",body:n,method:"POST"}))},t,this)}))})}}),e3=Promise.resolve({pkceRequiredForPasswordResets:!1}),e4=ec(function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e3,a=arguments.length>4?arguments[4]:void 0;eu(this,e),this._networkClient=t,this._subscriptionService=n,this._pkceManager=r,this._config=o,this.dfpProtectedAuth=a,this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o,a;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.authenticate").isString("org_id",e.organization_id).isString("password",e.password).isString("email_address",e.email_address).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this._pkceManager.getPKPair();case 1:return r=null==(n=t.v)?void 0:n.code_verifier,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return o=(i=t.v).dfp_telemetry_id,a=i.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/authenticate",method:"POST",body:{organization_id:e.organization_id,email_address:e.email_address,password:e.password,session_duration_minutes:e.session_duration_minutes,locale:e.locale,captcha_token:a,dfp_telemetry_id:o,code_verifier:r,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))}),this.discovery={resetByEmailStart:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.discovery.resetByEmailStart").isString("email",e.email_address).isOptionalString("login_redirect_url",e.discovery_redirect_url).isOptionalString("reset_password_redirect_url",e.reset_password_redirect_url).isOptionalString("reset_password_template_id",e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes",e.reset_password_expiration_minutes).isOptionalString("verify_email_template_id",e.verify_email_template_id).isOptionalString("locale",e.locale),t.n=1,this.getCodeChallenge(
1);case 1:return n=t.v,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/discovery/reset/start",method:"POST",body:{email_address:e.email_address,discovery_redirect_url:e.discovery_redirect_url,reset_password_redirect_url:e.reset_password_redirect_url,reset_password_expiration_minutes:e.reset_password_expiration_minutes,reset_password_template_id:e.reset_password_template_id,verify_email_template_id:e.verify_email_template_id,locale:e.locale,pkce_code_challenge:n,captcha_token:o,dfp_telemetry_id:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))},resetByEmail:this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s,c,u,l,d,f,p,m,h,g;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.discovery.resetByEmail").isString("password_reset_token",e.password_reset_token).isString("password",e.password),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.n=2,this._pkceManager.getPKPair();case 2:return a=null==(o=t.v)?void 0:o.code_verifier,c=this._networkClient,u=e.password_reset_token,l=e.password,d=i,f=r,p=a,t.n=3,this._subscriptionService.getIntermediateSessionToken();case 3:if(m=t.v){t.n=4;break}m=void 0;case 4:return h={password_reset_token:u,password:l,captcha_token:d,dfp_telemetry_id:f,pkce_code_verifier:p,intermediate_session_token:m},g=this.dfpProtectedAuth.retryWithCaptchaAndDFP,t.n=5,c.retriableFetchSDK.call(c,{url:"/b2b/passwords/discovery/reset",method:"POST",body:h,retryCallback:g});case 5:return s=t.v,this._pkceManager.clearPKPair(),t.a(2,s)}},t,this)}))}),authenticate:this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o,a;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.discovery.authenticate").isString("password",e.password).isString("email_address",e.email_address),t.n=1,this._pkceManager.getPKPair();case 1:return r=null==(n=t.v)?void 0:n.code_verifier,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return o=(i=t.v).dfp_telemetry_id,a=i.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/discovery/authenticate",method:"POST",body:{email_address:e.email_address,password:e.password,captcha_token:a,dfp_telemetry_id:o,code_verifier:r},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})},this.resetByEmail=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o,a,s;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.resetByEmail").isString("password_reset_token",e.password_reset_token).isString("password",e.password).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.n=2,this._pkceManager.getPKPair();case 2:return a=null==(o=t.v)?void 0:o.code_verifier,t.n=3,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/email/reset",method:"POST",body:{password_reset_token:e.password_reset_token,password:e.password,session_duration_minutes:e.session_duration_minutes,locale:e.locale,captcha_token:i,dfp_telemetry_id:r,code_verifier:a,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP});case 3:return s=t.v,this._pkceManager.clearPKPair(),t.a(2,s)}},t,this)}))}),this.resetByExistingPassword=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.resetByExistingPassword").isString("email",e.email_address).isString("existing_password",e.existing_password).isString("new_password",e.new_password).isOptionalString("locale",e.locale).isNumber("session_duration_minutes",e.session_duration_minutes),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/existing_password/reset",method:"POST",body:{organization_id:e.organization_id,email_address:e.email_address,existing_password:e.existing_password,new_password:e.new_password,locale:e.locale,session_duration_minutes:e.session_duration_minutes,c
1aptcha_token:i,dfp_telemetry_id:r},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))}),this.resetBySession=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.resetBySession").isString("password",e.password),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/session/reset",method:"POST",body:{password:e.password,captcha_token:i,dfp_telemetry_id:r},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})},[{key:"getCodeChallenge",value:function(){return F(this,void 0,void 0,eo().m(function e(){var t;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._config;case 1:if(e.v.pkceRequiredForPasswordResets){e.n=2;break}return e.a(2,void 0);case 2:return e.n=3,this._pkceManager.getPKPair();case 3:if(!(t=e.v)){e.n=4;break}return e.a(2,t.code_challenge);case 4:return e.n=5,this._pkceManager.startPKCETransaction();case 5:return t=e.v,e.a(2,t.code_challenge)}},e,this)}))}},{key:"resetByEmailStart",value:function(e){return F(this,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.passwords.resetByEmailStart").isString("email",e.email_address).isOptionalString("login_redirect_url",e.login_redirect_url).isOptionalString("reset_password_redirect_url",e.reset_password_redirect_url).isOptionalString("reset_password_template_id",e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes",e.reset_password_expiration_minutes).isOptionalString("verify_email_template_id",e.verify_email_template_id).isOptionalString("locale",e.locale),t.n=1,this.getCodeChallenge();case 1:return n=t.v,t.n=2,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 2:return i=(r=t.v).dfp_telemetry_id,o=r.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/passwords/email/reset/start",method:"POST",body:{organization_id:e.organization_id,email_address:e.email_address,login_redirect_url:e.login_redirect_url,reset_password_redirect_url:e.reset_password_redirect_url,reset_password_expiration_minutes:e.reset_password_expiration_minutes,reset_password_template_id:e.reset_password_template_id,verify_email_template_id:e.verify_email_template_id,locale:e.locale,code_challenge:n,captcha_token:o,dfp_telemetry_id:i},retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))}},{key:"strengthCheck",value:function(e){return F(this,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return eK("stytch.passwords.strengthCheck").isOptionalString("email",e.email_address).isString("password",e.password),t.a(2,this._networkClient.fetchSDK({url:"/b2b/passwords/strength_check",method:"POST",body:{email_address:e.email_address,password:e.password}}))},t,this)}))}}]),e6=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.dfpProtectedAuth=r,this.sms={send:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.sms.send").isString("organization_id",e.organization_id).isString("member_id",e.member_id).isOptionalString("mfa_phone_number",e.mfa_phone_number).isOptionalString("locale",e.locale),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/sms/send",body:Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))},authenticate:this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.sms.authenticate").isNumber("session_duration_minutes",e.session_duration_minutes).isString("organization_id",e.organization_id).isString("member_id",e.member_id).isString("code",e.code).isOptionalString("set_mfa_enrollment",e.set_mfa_enrollment),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,o=Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/sms/authenticate",body:o,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})},this.email={loginOrSignup:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.email.loginOrSignup").isString("organization_id",e.organization_id).isString("email_address",e.email_address).isOptionalString("login_template_id",e.login_template_id).isOptionalString("signup_template_id",e.
1signup_template_id).isOptionalString("locale",e.locale).isOptionalNumber("login_expiration_minutes",e.login_expiration_minutes).isOptionalNumber("signup_expiration_minutes",e.signup_expiration_minutes),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/email/login_or_signup",body:Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i}),method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))},authenticate:this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.email.authenticate").isString("code",e.code).isString("email_address",e.email_address).isString("organization_id",e.organization_id).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("locale",e.locale),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/email/authenticate",body:Object.assign(Object.assign({},e),{intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0,dfp_telemetry_id:r,captcha_token:i}),method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))}),discovery:{send:function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.email.discovery.send").isString("email_address",e.email_address).isOptionalString("login_template_id",e.login_template_id).isOptionalString("locale",e.locale).isOptionalNumber("discovery_expiration_minutes",e.discovery_expiration_minutes),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,o=Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i}),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/email/discovery/send",body:o,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))},authenticate:this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.otps.email.discovery.authenticate").isString("code",e.code).isString("email_address",e.email_address),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=Object.assign({dfp_telemetry_id:(n=t.v).dfp_telemetry_id,captcha_token:n.captcha_token},e),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/otps/email/discovery/authenticate",body:r,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})}}}),e8=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.dfpProtectedAuth=r,this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.totp.authenticate").isString("organization_id",e.organization_id).isString("member_id",e.member_id).isString("code",e.code).isNumber("session_duration_minutes",e.session_duration_minutes).isOptionalString("set_mfa_enrollment",e.set_mfa_enrollment).isOptionalBoolean("set_default_mfa",e.set_default_mfa),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,o=Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/totp/authenticate",body:o,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})},[{key:"create",value:function(e){var t;return F(this,void 0,void 0,eo().m(function n(){var r,i,o,a,s,c,u,l,d,f,p,m,h;return eo().w(function(n){for(;;)switch(n.n){case 0:return eK("stytch.totp.create").isString("organization_id",e.organization_id).isString("member_id",e.member_id).isOptionalNumber("expiration_minutes",e.expiration_minutes),n.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return i=(r=n.v).dfp_telemetry_id,o=r.captcha_token,s=this._networkClient,c=Object,u=Object.assign({},e),l=i,d=o,n.n=2,this._subscriptionService.getIntermediateSessionToken();case 2:if(f=n.v){n.n=3;break}f=void 0;case 3:return p=f,m=c.assign.call(c,u,{dfp_telemetry_id:l,captcha_token:d,intermediate_session_token:p}),h=this.dfpProtectedAuth.retryWithCaptchaAndDFP,n.n=4,s.retriableFetchSDK.call(s,{url:"/b2b/totp",body:m,method:"POST",retryCallback:h});case 4:return(a=n.v).member_id===(null==(t=this._subscriptionService.getMember())?void 0:t.member_id)&&this._subscriptionService.updateMember(a.member),n.a(2,a)}},n,this)}))}}]),e7=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.dfpProtectedAuth=r,this.recover=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i,o;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.recoveryCodes.recover").isString("organization_id",e.organization_id).isString("member_id",e.member_id).isString("recovery_code",e.recovery_code).isNumber("session_duration_minutes",e.session_duration_minutes),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,o=Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i,intermediate_session_token:this._subscriptionService.getIntermediateSessionToken()||void 0}),t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/recovery_codes/recover",body:o,method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})},[{key:"rotate",value:function(){return F(this,void 0,void 0,eo().m(function e(){var t,n,r;return eo().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return n=(t=e.v).dfp_telemetry_id,r=t.captcha_token,e.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/recovery_codes/rotate",body:{dfp_telemetry_id:n,captcha_token:r},method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},e,this)}))}},{key:"get",value:function(){return F(this,void 0,void 0,eo().m(function e(){return eo().w(function(e){for(;;)if(0===e.n)return e.a(2,this._networkClient.fetchSDK({url:"/b2b/recovery_codes",method:"GET"}))},e,this)}))}}]),e9=ec(function e(t,n,r){var i=this;eu(this,e),this._subscriptionService=r,this.isAuthorizedSync=function(e,t){var n=i.getEffectivePolicySync();return!!(null==n?void 0:n.callerIsAuthorized(i.roleIds(),e,t))},this.isAuthorized=function(e,t){return i.getEffectivePolicy().then(function(n){return n.callerIsAuthorized(i.roleIds(),e,t)})},this.cachedPolicy=t.rbacPolicy?e$.fromJSON(t.rbacPolicy):null,this.policyProm
1ise=n.then(function(e){return e.rbacPolicy?(i.cachedPolicy=e$.fromJSON(e.rbacPolicy),i.cachedPolicy):(eD.error("Unable to retrieve RBAC policy from servers. Assuming caller has no permissions."),new e$([],[]))})},[{key:"getEffectivePolicy",value:function(){var e;return F(this,void 0,void 0,eo().m(function t(){var n,r;return eo().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.policyPromise;case 1:if(n=t.v,null==(e=null==(r=this._subscriptionService.getOrganization())?void 0:r.custom_roles)?void 0:e.length){t.n=2;break}return t.a(2,n);case 2:return t.a(2,n.mergeWithCustomRoles(r.custom_roles))}},t,this)}))}},{key:"getEffectivePolicySync",value:function(){if(!this.cachedPolicy)return null;var e,t=this._subscriptionService.getOrganization();return(null==(e=null==t?void 0:t.custom_roles)?void 0:e.length)?this.cachedPolicy.mergeWithCustomRoles(t.custom_roles):this.cachedPolicy}},{key:"allPermissions",value:function(){var e=this;return this.getEffectivePolicy().then(function(t){return t.allPermissionsForCaller(e.roleIds())})}},{key:"roleIds",value:function(){var e,t=this._subscriptionService.getSession();return t&&null!=(e=t.roles)?e:[]}}]),te=ec(function e(t,n,r){var i=this;eu(this,e),this._networkClient=t,this._subscriptionService=n,this.dfpProtectedAuth=r,this.authenticate=this._subscriptionService.withUpdateSession(function(e){return F(i,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.n){case 0:return eK("stytch.impersonation.authenticate").isString("impersonation_token",e.impersonation_token),t.n=1,this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();case 1:return r=(n=t.v).dfp_telemetry_id,i=n.captcha_token,t.a(2,this._networkClient.retriableFetchSDK({url:"/b2b/impersonation/authenticate",body:Object.assign(Object.assign({},e),{dfp_telemetry_id:r,captcha_token:i}),method:"POST",retryCallback:this.dfpProtectedAuth.retryWithCaptchaAndDFP}))}},t,this)}))})}),tt=ec(function e(t){var n=this;eu(this,e),this._networkClient=t,this.oauthAuthorizeStart=function(e){return F(n,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/idp/b2b/oauth/authorize/start",method:"POST",body:e}))},t,this)}))},this.oauthAuthorizeSubmit=function(e){return F(n,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/idp/b2b/oauth/authorize/submit",method:"POST",body:e}))},t,this)}))},this.oauthLogoutStart=function(e){return F(n,void 0,void 0,eo().m(function t(){return eo().w(function(t){for(;;)if(0===t.n)return t.a(2,this._networkClient.fetchSDK({url:"/b2b/oauth/logout/start",method:"POST",body:e}))},t,this)}))}}),tn=ec(function e(t){eu(this,e),this.iframeURL=t,this.createIframe()},[{key:"createIframe",value:function(){var e=document.querySelector('[src~="'.concat(this.iframeURL,'"]'));if(e?eD.warn(ev):((e=document.createElement("iframe")).src=this.iframeURL,e.style.position="absolute",e.style.width="0",e.style.height="0",e.style.border="0",document.body.appendChild(e)),"true"===e.dataset.loaded){this.frame=Promise.resolve(e);return}this.frame=new Promise(function(t){e.addEventListener("load",function(){e.dataset.loaded="true",t(e)},{once:!0})})}},{key:"call",value:function(e,t){return F(this,void 0,void 0,eo().m(function n(){var r,i,o=this;return eo().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,this.frame;case 1:return r=n.v,i=new MessageChannel,n.a(2,new Promise(function(n,a){i.port1.onmessage=function(e){var t=e.data;i.port1.close(),t.success?n(t.payload):a(eq.unmarshall(t.error))};var s,c={method:e,args:t};null==(s=r.contentWindow)||s.postMessage(c,o.iframeURL,[i.port2])}))}},n,this)}))}}]),tr=ec(function e(t,n){eu(this,e),this._networkClient=t,this.dfpProtectedAuth=n},[{key:"searchUser",value:function(e){var t=this;return this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha().then(function(n){var r=n.dfp_telemetry_id,i=n.captcha_token;return t._networkClient.fetchSDK({url:"/users/search",method:"POST",body:{email:e,dfp_telemetry_id:r,captcha_token:i}})})}},{key:"searchMember",value:function(e,t){return this._networkClient.fetchSDK({url:"/b2b/organizations/members/search",method:"POST",body:{email_address:e,organization_id:t}})}}]),ti=ec(function e(){eu(this,e),this.hasWarned=!1,this.registry=new Map},[{key:"register",value:function(e,t){var n=this.registry.get(e);n&&n!==t&&(this.hasWarned||(eD.warn(ev),this.hasWarned=!0),n.cancelBackgroun
1dRefresh()),this.registry.set(e,t)}},{key:"unregister",value:function(e,t){var n=this.registry.get(e);n&&n===t&&this.registry.delete(e)}}]),to=function(){function e(t,n,r,i){var o=this;eu(this,e),this._subscriptionService=t,this._headlessSessionClient=n,this._publicToken=r,this._options=i,this.timeout=null,this._onDataChange=function(e){(null!=e&&e.sessionDurationMinutes&&(o.lastAuthenticationSessionDuration=e.sessionDurationMinutes),null==e?void 0:e.session)?o.scheduleBackgroundRefresh():o.cancelBackgroundRefresh()},this._reauthenticateWithBackoff=function(){return F(o,void 0,void 0,eo().m(function t(){var n,r,i;return eo().w(function(t){for(;;)switch(t.p=t.n){case 0:n=0;case 1:return t.p=2,r={session_duration_minutes:this._options.keepSessionAlive?this.lastAuthenticationSessionDuration:void 0},t.n=3,this._headlessSessionClient.authenticate(r);case 3:return t.a(2,t.v);case 4:if(t.p=4,i=t.v,!e.isUnrecoverableError(i)){t.n=5;break}return t.a(2,Promise.reject(i));case 5:return n++,t.n=6,new Promise(function(t){return setTimeout(t,e.timeoutForAttempt(n))});case 6:t.n=1;break;case 7:return t.a(2)}},t,this,[[2,4]])}))},this._subscriptionService.subscribeToState(this._onDataChange)}return ec(e,[{key:"register",value:function(){e.registry.register(this._publicToken,this)}},{key:"unregister",value:function(){e.registry.unregister(this._publicToken,this)}},{key:"performBackgroundRefresh",value:function(){var e=this;this._reauthenticateWithBackoff().then(function(){e.scheduleBackgroun
1dRefresh()}).catch(function(t){eD.warn("Session background refresh failed. Signalling to app that user is logged out.",{error:t}),e._subscriptionService.destroySession()})}},{key:"scheduleBackgroundRefresh",value:function(){var t=this;this.cancelBackgroundRefresh(),this.register(),this.timeout=setTimeout(function(){t.performBackgroundRefresh()},e.REFRESH_INTERVAL_MS)}},{key:"cancelBackgroundRefresh",value:function(){null!==this.timeout&&(this.unregister(),clearTimeout(this.timeout),this.timeout=null)}}],[{key:"timeoutForAttempt",value:function(e){return Math.floor(350*Math.random())-175+2e3*Math.pow(2,e=Math.min(e,7))}},{key:"isUnrecoverableError",value:function(e){return V.includes(e.error_type)}}])}();to.REFRESH_INTERVAL_MS=18e4,to.registry=new ti;var ta=ec(function e(t,n){var r=this;eu(this,e),this._subscriptionService=t,this.emptyState=n,this.onStateChange=function(e){return r._subscriptionService.subscribeToState(function(t){e(null!=t?t:r.emptyState)})}}),ts="CONSUMER";function tc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function tu(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var tl=function(){return!!("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},td=function(e){return(document.cookie?document.cookie.split("; "):[]).filter(function(t){var n;return e===(function(e){if(Array.isArray(e))return e}(n=t.split("="))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(n=i.call(t)).done)&&(a.push(n.value),1!==a.length);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return T(e,1);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?T(e,1):void 0}}(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]}).length>1},tf=function(e,t){return"".concat("stytch_sdk_state_").concat(e).concat(t?"::".concat(t):"")};function tp(e){return null==e?{getItem:function(){return null},removeItem:function(){},setItem:function(){}}:{getItem:function(t,n){var r=tf(t,n);try{return e.getItem(r)}catch(e){return null}},setItem:function(t,n,r){var i=tf(t,n);try{r&&e.setItem(i,r)}catch(e){}},removeItem:function(t,n){var r=tf(t,n);try{e.removeItem(r)}catch(e){}}}}var tm=tp(globalThis.localStorage),th=tp(globalThis.sessionStorage);function tg(e,t){return{getItem:function(n){return e.getItem(t,n)},setItem:function(n,r){e.setItem(t,n,r)},removeItem:function(n){e.removeItem(t,n)}}}var tv=Symbol.for("stytch__internal_b2b"),ty=function(e,t){var n,r,i;Object.assign(e,(n={},(i=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=A(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r=tv,"string"),(r="symbol"==A(i)?i:i+"")in n)?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n))};function t_(e,t,n){return t=tw(t),function(e,t){if(t&&("object"==tT(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e,tb()?Reflect.construct(t,n||[],tw(e).constructor):t.apply(e,n))}function tb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tb=function(){return!!e})()}
1function tw(e){return(tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tk(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tS(e,t)}function tS(e,t){return(tS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||tO(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tE(e){return function(e){if(Array.isArray(e))return tx(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tO(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tO(e,t){if(e){if("string"==typeof e)return tx(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tx(e,t):void 0}}function tx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tP(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=Object.create((r&&r.prototype instanceof s?r:s).prototype);return tA(c,"_invoke",function(n,r,i){var o,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,c=e,f.n=n,a}};function p(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,o=l[t],p=f.p,m=o[2];n>3?(i=m===r)&&(c=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,m),s=l,c=m;(t=s<2?e:c)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,c)):f.n=c:f.v=c);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==a)break}catch(t){o=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][r]?t(t([][r]())):(tA(t={},r,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,tA(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,tA(l,"constructor",u),tA(u,"constructor",c),c.displayName="GeneratorFunction",tA(u,i,"GeneratorFunction"),tA(l),tA(l,i,"Generator"),tA(l,r,function(){return this}),tA(l,"toString",function(){return"[object Generator]"}),(tP=function(){return{w:o,m:d}})()}function tA(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(tA=function(e,t,n,r){function o(t,n){tA(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function tT(e){return(tT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tD(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function tF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e,t){if("object"!=tT(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tT(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tT(t)?t:t+""}(r.key),r)}}function tj(e,t,n){return t&&tF(e.prototype,t),n&&tF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}e.s(["A",0,w,"B",0,S,"C",0,{US:"1",AX:"358",AS:"1684",AG:"1268",AI:"1264",AR:"54",AT:"43",AU:"61",BE:"32",BJ:"229",BO:"591",BR:"55",IO:"246",BN:"673",BG:"359",BF:"226",CM:"237",CA:"1",BQ:"599",CF:"236",CL:"56",CX:"61",CC:"61",CO:"57",CD:"243",CK:"682",CR:"506",HR:"385",CZ:"420",DK:"45",DO:"1829",EC:"593",SV:"503",EE:"372",SZ:"268",FK:"500",FI:"358",FR:"33",GF:"594",DE:"49",GH:"233",GR:"30",GD:"1473",GT:"502",GG:"44",GW
1:"245",GY:"592",HU:"36",IS:"354",IN:"91",IE:"353",IM:"44",IT:"39",JM:"1876",JP:"81",KZ:"7",KE:"254",KI:"686",KR:"82",LV:"371",LT:"370",LU:"352",MO:"853",MT:"356",MH:"692",MR:"222",MU:"230",YT:"262",MX:"52",MC:"377",ME:"382",NR:"674",NL:"31",NZ:"64",NI:"505",NF:"672",NO:"47",PA:"507",PY:"595",PE:"51",PN:"870",PL:"48",PT:"351",PR:"1",RO:"40",BL:"590",SH:"290",KN:"1869",LC:"1758",MF:"590",PM:"508",SM:"378",ST:"239",SC:"248",SX:"599",SK:"421",SI:"386",ZA:"27",SS:"211",ES:"34",SR:"597",SJ:"47",SE:"46",CH:"41",TW:"886",TZ:"255",TK:"690",TO:"676",TT:"1868",TR:"90",UA:"380",GB:"44",UM:"1",UY:"598",VA:"379",EH:"212"},"D",0,30,"E",0,/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,"I",0,ee,"N",0,X,"O",0,m,"P",0,p,"R",0,k,"S",0,y,"W",0,h,"_",0,tc,"a",0,b,"a$",0,to,"aA",0,e1,"aB",0,eW,"aC",0,eh,"aD",0,eg,"aE",0,ej,"aF",0,eF,"aG",0,eL,"aH",0,eM,"aI",0,em,"aJ",0,eK,"aK",0,ez,"aL",0,ta,"aM",0,eG,"aN",0,e0,"aO",0,eJ,"aP",0,e2,"aQ",0,eY,"aR",0,eQ,"aS",0,e5,"aT",0,e4,"aU",0,e6,"aV",0,e8,"aW",0,e7,"aX",0,e9,"aY",0,eX,"aZ",0,te,"a_",0,tt,"ae",0,G,"ak",0,eP,"al",0,tn,"am",0,eV,"an",0,15,"ao",0,800,"ap",0,eN,"aq",0,eU,"ar",0,eH,"as",0,eb,"at",0,ew,"au",0,e_,"av",0,tf,"aw",0,tg,"ax",0,td,"ay",0,tl,"az",0,th,"b",0,v,"b0",0,tr,"b1",0,ts,"b2",0,ty,"c",0,C,"d",0,tu,"e",0,g,"f",0,{moveToFront:function(e,t){if(e.length<=1)return[e,!1];var n=e.findIndex(t);if(-1===n)return[e,!1];var r=en(e);return r.unshift.apply(r,en(r.splice(n,1))),[r,!0]}},"g",0,function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(function(){return e.apply(void 0,i)},n)}},"h",0,Q,"i",0,eB,"j",0,J,"k",0,eI,"l",0,eD,"r",0,function(e){if(!e[tv])throw Error("Internals not found!");return e[tv]},"s",0,tm],224934);var tR="bootstrap",tz=function(){return{displayWatermark:!1,projectName:null,cnameDomain:null,emailDomains:["stytch.com"],captchaSettings:{enabled:!1},pkceRequiredForEmailMagicLinks:!1,pkceRequiredForPasswordResets:!1,pkceRequiredForOAuth:!1,pkceRequiredForSso:!1,slugPattern:null,createOrganizationEnabled:!1,passwordConfig:null,runDFPProtectedAuth:!1,rbacPolicy:null,siweRequiredForCryptoWallets:!1,vertical:null}},tI=function(){function e(t,n,r){var i=this;tD(this,e),this._publicToken=t,this._networkClient=n,this._dataLayer=r,this._bootstrapDataPromise=this._networkClient.fetchSDK({url:"/projects/bootstrap/".concat(this._publicToken),method:"GET"}).then(e.mapBootstrapData).then(function(e){return i._dataLayer.setItem(tR,JSON.stringify(e)),e}).catch(function(e){return eD.error(e),tz()})}return tj(e,[{key:"getSync",value:function(){var e=this._dataLayer.getItem(tR);if(null===e)return tz();try{return JSON.parse(e)}catch(e){return tz()}}},{key:"getAsync",value:function(){return this._bootstrapDataPromise}}],[{key:"mapBootstrapData",value:function(e){var t,n,r=null!==e.password_config?{ludsComplexity:e.password_config.luds_complexity,ludsMinimumCount:e.password_config.luds_minimum_count}:null;return{projectName:e.project_name,displayWatermark:!e.disable_sdk_watermark,captchaSettings:e.captcha_settings,cnameDomain:e.cname_domain,emailDomains:e.email_domains,pkceRequiredForEmailMagicLinks:e.pkce_required_for_email_magic_links,pkceRequiredForPasswordResets:e.pkce_required_for_password_resets,pkceRequiredForOAuth:e.pkce_required_for_oauth,pkceRequiredForSso:e.pkce_required_for_sso,slugPattern:e.slug_pattern,createOrganizationEnabled:e.create_organization_enabled,passwordConfig:r,runDFPProtectedAuth:null!=(t=e.dfp_protected_auth_enabled)&&t,dfpProtectedAuthMode:e.dfp_protected_auth_mode,rbacPolicy:null!=(n=e.rbac_policy)?n:null,siweRequiredForCryptoWallets:e.siwe_required_for_crypto_wallets,vertical:e.vertical}}}])}(),tL=tj(function e(t){var n=this;tD(this,e),this.bootstrapPromise=t,this.executeRecaptcha=function(){return tu(n,void 0,void 0,tP().m(function e(){var t,n,r,i;return tP().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.state;case 1:if(n=(t=e.v).captchaClient,r=t.configured,i=t.siteKey,r){e.n=2;break}return e.a(2,void 0);case 2:return e.n=3,new Promise(function(e){return n.ready(e)});case 3:return e.a(2,n.execute(i,{action:"LOGIN"}))}},e,this)}))},this.state=t.then(function(e){return tu(n,void 0,void 0,tP().m(function t(){var n,r;return tP().w(function(t){for(;;)switch(t.n){case 0:if(e.captchaSettings.enabled){t.n=1;break}return t.a(2,{configured:!1});case 1:var i;return t.n=2,i=e.captchaSettings.siteKey,eP("https://www.google.com/recaptcha/enterprise.js?render=".concat(i),function(){return window.grecaptcha.enterprise});case 2:return n=t.v,r=e.captchaSettings.siteKey,t.a(2,{configured:!0,captchaClient:n,siteKey:r})}},t)}))})}),tM=tj(function e(t){var n=this;tD(this,e),this.iframeURL=t,this.oneTapStart=function(e){return n.call("oneTapStart",e)},this.oneTapSubmit=function(e){return n.call("oneTapSubmit",e)},this.parsedPhoneNumber=function(e){return n.call("parsedPhoneNumber",e)}},[{key:"frameClient",get:function(){var e;return this._frameClient=null!=(e=this._frameClient)?e:new tn(this.iframeURL),this._frameClient}},{key:"call",value:function(e,t){return this.frameClient.call(e,[t])}}]),tB=tj(function e(t,n,r,i,o){tD(this,e),this._publicToken=t,this._subscriptionDataLayer=n,this.additionalTelemetryDataFn=o,this.updateSessionToken=function(){return null},this.baseURL=r,eB(t)&&(this.baseURL=i),this.eventLogger=new eV({maxBatchSize:15,intervalDurationMs:800,logEventURL:this.buildSDKUrl("/events")})},[{key:"logEvent",value:function(e){var t=e.name,n=e.details,r=e.error,i=void 0===r?{}:r;this.eventLogger.logEvent(this.createTelemetryBlob(),{public_token:this._publicToken,event_name:t,details:n,error_code:i.error_code,error_description:i.error_description,http_status_code:i.http_status_code})}},{key:"createTelemetryBlob",value:function(){return Object.assign(Object.assign({event_id:eN(),app_session_id:eU(),persistent_id:eH(),client_sent_at:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},this.additionalTelemetryDataFn()),{app:{identifier:window.location.hostname},sdk:{identifier:"Stytch.js Javascript SDK",version:"5.45.0"}})}},{key:"fetchSDK",value:function(e){var t=e.url,n=e.body,r=e.method;return tu(this,void 0,void 0,tP().m(function e(){var i,o,a,s;return tP().w(function(e){for(;;)if(0===e.n)return i=this._subscriptionDataLayer.readSessionCookie().session_token,o="Basic "+window.btoa(this._publicToken+":"+(i||this._publicToken)),a=window.btoa(JSON.stringify(this.createTelemetryBlob())),s=window.location.origin,e.a(2,eb({basicAuthHeader:o,body:n,finalURL:this.buildSDKUrl(t),method:r,xSDKClientHeader:a,xSDKParentHostHeader:s}))},e,this)}))}},{key:"submitFormSDK",value:function(e){var t=e.url,n=e.body,r=e.method;return tu(this,void 0,void 0,tP().m(function e(){var i,o,a,s;return tP().w(function(e){for(;;)if(0===e.n)return i=this._subscriptionDataLayer.readSessionCookie().session_token,o="Basic "+window.btoa(this._publicToken+":"+(i||this._publicToken)),a=window.btoa(JSON.stringify(this.createTelemetryBlob())),s=window.location.origin,e.a(2,ew({basicAuthHeader:o,body:n,finalURL:this.buildSDKUrl(t),method:r,xSDKClientHeader:a,xSDKParentHostHeader:s}))},e,this)}))}}
1,{key:"retriableFetchSDK",value:function(e){var t=e.url,n=e.body,r=e.method,i=e.retryCallback;return tu(this,void 0,void 0,tP().m(function e(){var o,a,s,c;return tP().w(function(e){for(;;)if(0===e.n)return o=this._subscriptionDataLayer.readSessionCookie().session_token,a="Basic "+window.btoa(this._publicToken+":"+(o||this._publicToken)),s=window.btoa(JSON.stringify(this.createTelemetryBlob())),c=window.location.origin,e.a(2,e_({basicAuthHeader:a,body:n,finalURL:this.buildSDKUrl(t),method:r,xSDKClientHeader:s,xSDKParentHostHeader:c,retryCallback:i}))},e,this)}))}},{key:"buildSDKUrl",value:function(e){return"".concat(this.baseURL,"/sdk/v1").concat(e)}}]);function tN(e){var t=e.toString(16);return 1===t.length&&(t="0"+t),t}var tU=function(){function e(t,n){tD(this,e),this._dataLayer=t,this.namespace=n}return tj(e,[{key:"key",value:function(){return"".concat("PKCE_VERIFIER",":").concat(this.namespace)}},{key:"startPKCETransaction",value:function(){return tu(this,void 0,void 0,tP().m(function t(){var n;return tP().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.createProofkeyPair();case 1:return n=t.v,this._dataLayer.setItem(this.key(),JSON.stringify(n)),t.a(2,n)}},t,this)}))}},{key:"getPKPair",value:function(){var e=this._dataLayer.getItem(this.key());if(null!==e)try{return JSON.parse(e)}catch(e){eD.warn("Found malformed Proof Key pair in localstorage.");return}}},{key:"clearPKPair",value:function(){return this._dataLayer.removeItem(this.key())}}],[{key:"createProofkeyPair",value:function(){return tu(this,void 0,void 0,tP().m(function e(){var t,n,r;return tP().w(function(e){for(;;)switch(e.n){case 0:return t=new Uint32Array(16),window.crypto.getRandomValues(t),n=Array.from(t).map(tN).join(""),e.n=1,window.crypto.subtle.digest("SHA-256",new TextEncoder().encode(n));case 1:return r=e.v,e.a(2,{code_challenge:function(e){var t;return btoa((t=String.fromCharCode).call.apply(t,[null].concat(tE(new Uint8Array(e))))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(r),code_verifier:n})}},e)}))}}])}();function tH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var tK=function e(t,n){function r(e,r,i){if("u">typeof document){"number"==typeof(i=tH({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=t.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",tH({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,tH({},this.attributes,t))},withConverter:function(t){return e(tH({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),tG="seen_domains",tW=function(e){function t(){return tD(this,t),t_(this,t,arguments)}return tk(t,e),tj(t)}(function(){function e(t,n){tD(this,e),this._opaqueTokenCookieName=null,this._jwtCookieName=null,this._cookiePath=null,this._domain=null,this._cookieAvailableToSubdomains=!1,this._istCookieName=null,this.publicToken=t,this.state=null,this.stateKeysUpdated=new Set,this.subscriptions={},this._localStorage=tg(tm,t),this.browserSessionStorage=tg(th,t),(null==n?void 0:n.cookieOptions)&&(this._opaqueTokenCookieName=n.cookieOptions.opaqueTokenCookieName||null,this._jwtCookieName=n.cookieOptions.jwtCookieName||null,this._cookiePath=n.cookieOptions.path||null,this._domain=n.cookieOptions.domain||null,this._cookieAvailableToSubdomains=n.cookieOptions.availableToSubdomains||!1,this._istCookieName=n.cookieOptions.istCookieName||null);var r,i=this._localStorage.getItem("");
1if(i){try{r=JSON.parse(i)}catch(e){this.syncToLocalStorage();return}this.state=r}}return tj(e,[{key:"opaqueTokenCookieName",get:function(){var e;return null!=(e=this._opaqueTokenCookieName)?e:"stytch_session"}},{key:"jwtCookieName",get:function(){var e;return null!=(e=this._jwtCookieName)?e:"stytch_session_jwt"}},{key:"istCookieName",get:function(){var e;return null!=(e=this._istCookieName)?e:"stytch_intermediate_session_token"}},{key:"readSessionCookie",value:function(){return{session_token:tK.get(this.opaqueTokenCookieName),session_jwt:tK.get(this.jwtCookieName)}}},{key:"readIntermediateSessionTokenCookie",value:function(){return tK.get(this.istCookieName)}},{key:"writeSessionCookie",value:function(t){var n,r,i,o,a=t.state,s=t.session_token,c=t.session_jwt,u=e.generateCookieOpts({expiresAt:null!=(r=null==(n=null==a?void 0:a.session)?void 0:n.expires_at)?r:"",availableToSubdomains:this._cookieAvailableToSubdomains,path:this._cookiePath,domain:this._domain});u.domain&&this.addSeenDomain(u.domain),tK.set(this.opaqueTokenCookieName,s,u),tK.set(this.jwtCookieName,c,u);var l=e.generateCookieOpts({expiresAt:null!=(o=null==(i=null==a?void 0:a.session)?void 0:i.expires_at)?o:"",availableToSubdomains:!this._cookieAvailableToSubdomains,path:this._cookiePath,domain:this._domain});l.domain&&this.addSeenDomain(l.domain),td(this.jwtCookieName)&&tK.remove(this.jwtCookieName,l),td(this.opaqueTokenCookieName)&&tK.remove(this.opaqueTokenCookieName,l),td(this.jwtCookieName)&&eD.warn("Could not remove extraneous JWT cookie. This might happen if the cookie has been set using multiple `path` settings, and may produce unwanted behavior."),td(this.opaqueTokenCookieName)&&eD.warn("Could not remove extraneous opaque token cookie.")}},{key:"writeIntermediateSessionTokenCookie",value:function(t){var n=new Date(Date.now()+6e5),r=e.generateCookieOpts({expiresAt:n.toString(),availableToSubdomains:this._cookieAvailableToSubdomains,path:this._cookiePath,domain:this._domain});tK.set(this.istCookieName,t,r)}},{key:"removeSessionCookie",value:function(){this.removeCookies([this.opaqueTokenCookieName,this.jwtCookieName])}},{key:"removeISTCookie",value:function(){this.removeCookies([this.istCookieName])}},{key:"removeCookies",value:function(t){var n=this,r=this.getSeenDomains(),i=[this._domain,null].concat(tE(r)),o=tE(new Set(i));[!0,!1].forEach(function(r){[n._cookiePath,null].forEach(function(n){o.forEach(function(i){var o=e.generateCookieOpts({expiresAt:new Date(0).toString(),availableToSubdomains:r,path:n,domain:i});t.forEach(function(e){tK.remove(e,o)})})})})}},{key:"syncToLocalStorage",value:function(){this._localStorage.setItem("",JSON.stringify(this.state))}},{key:"getItem",value:function(e){return this._localStorage.getItem(e)}},{key:"setItem",value:function(e,t){this._localStorage.setItem(e,t)}},{key:"removeItem",value:function(e){this._localStorage.removeItem(e)}},{key:"getSeenDomains",value:function(){var e=this.getItem(tG);if(!e)return[];try{var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}}},{key:"addSeenDomain",value:function(e){if(e){var t=this.getSeenDomains();t.includes(e)||(t.push(e),this.setItem(tG,JSON.stringify(t)))}}}],[{key:"generateCookieOpts",value:function(e){var t=e.path,n=e.domain,r=e.availableToSubdomains,i={expires:new Date(e.expiresAt),sameSite:"lax"};return t&&(i.path=t),tl()?i.secure=!1:(r&&(i.domain=n||window.location.host),i.secure=!0),i}}])}()),tq=Symbol.for("__stytch_b2b_DataLayer"),tV=function(){var e=window;return e[tq]||(e[tq]={}),e[tq]},t$=function(e,t){var n=tV();return n[e]||(n[e]=new tW(e,t)),n[e]},tZ=function(e,t){var n=Math.random().toString(36).slice(-10);return e[n]=t,function(){return delete e[n]}},tY=function(e,t){Object.values(e).forEach(function(e){return e(t)})},tJ=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.KEYS_TO_EXCLUDE,n=void 0===t?[]:t,r=function(e,t){return tT(e)===tT(t)&&(null===e||null===t?e===t:"object"===tT(e)?!(Object.keys(e).length!==Object.keys(t).length||Object.keys(e).some(function(e){return!(e in t)}))&&Object.entries(e).filter(function(e){var t=tC(e,1)[0];return!n.includes(t)}).every(function(e){var n=tC(e,2),i=n[0];return r(n[1],t[i])}):e===t)};return r}({KEYS_TO_EXCLUDE:["last_accessed_at"]}),tQ=function(e){function t(){var e;return tD(this,t),e=t_(this,t,arguments),e.updateMember=function(t){return e.updateState({member:t})},e.getMember=function(){var t,n;return null!=(n=null==(t=e.getState())?void 0:t.member)?n:null},e.updateOrganization=function(t){return e.updateState({organization:t})},e.getOrganization=function(){var t,n;return null!=(n=null==(t=e.getState())?void 0:t.organization)?n:null},e.getSession=function(){var t,n;return null!=(n=null==(t=e.getState())?void 0:t.session)?n:null},e.updateSession=function(t,n){if("member_session"in t&&t.member_session){var r=t.session_token&&t.session_jwt?{session_token:t.session_token,session_jwt:t.session_jwt}:{session_token:!0,session_jwt:!0};e.updateStateAndTokens(Object.assign(Object.assign({state:{session:t.member_session,member:t.member,organization:t.organization}},r),{intermediate_session_token:null}),{fromCache:!1,sessionDurationMinutes:null==n?void 0:n.sessionDurationMinutes})}
1else e.updateStateAndTokens({state:null,session_token:null,session_jwt:null,intermediate_session_token:t.intermediate_session_token||!0},{fromCache:!1,sessionDurationMinutes:null==n?void 0:n.sessionDurationMinutes})},e.withUpdateSession=function(t){return function(n){return tu(e,void 0,void 0,tP().m(function e(){var r;return tP().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t(n);case 1:return r=e.v,this.updateSession(r,{sessionDurationMinutes:null==n?void 0:n.session_duration_minutes}),e.a(2,r)}},e,this)}))}},e}return tk(t,e),tj(t)}(tj(function e(t,n,r){var i=this,o=r.usingCustomApiEndpoint;if(tD(this,e),this._publicToken=t,this._datalayer=n,this.fromCache=!0,this._listen=function(e){if(e.key===tf(i._publicToken,"")){var t=null===e.newValue||"null"===e.newValue?null:JSON.parse(e.newValue);i.updateState(t,!0)}},window.addEventListener("storage",this._listen),!o&&!this._datalayer.readSessionCookie().session_token)return void this.destroySession()},[{key:"getTokens",value:function(){var e=this._datalayer.readSessionCookie(),t=e.session_token,n=e.session_jwt;return"string"!=typeof t||"string"!=typeof n?null:{session_token:t,session_jwt:n}}},{key:"getIntermediateSessionToken",value:function(){return this._datalayer.readIntermediateSessionTokenCookie()||null}},{key:"destroyState",value:function(){this.updateStateAndTokens({state:null,session_token:null,session_jwt:null,intermediate_session_token:null})}},{key:"destroySession",value:function(){this._datalayer.removeSessionCookie(),this.updateState(null)}},{key:"_updateStateAndTokensInternal",value:function(e,t){var n,r=this._datalayer.state,i=null===e.state?null:Object.assign(Object.assign({},this._datalayer.state),e.state);this._datalayer.state=i;var o=this.getFromCache();this.setCacheRefreshed(),(o||!tJ(r,i))&&(n=null==i||t.fromCache?i:Object.assign(Object.assign({},i),{sessionDurationMinutes:t.sessionDurationMinutes}),tY(this._datalayer.subscriptions,n))}},{key:"updateStateAndTokens",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromCache:!1};e.state?("string"==typeof e.session_token?this._datalayer.writeSessionCookie(e):this._datalayer.removeSessionCookie(),this._datalayer.removeISTCookie()):e.intermediate_session_token?("string"==typeof e.intermediate_session_token?this._datalayer.writeIntermediateSessionTokenCookie(e.intermediate_session_token):this._datalayer.removeISTCookie(),this._datalayer.removeSessionCookie()):(this._datalayer.removeSessionCookie(),this._datalayer.removeISTCookie()),this._updateStateAndTokensInternal(e,t),this._datalayer.syncToLocalStorage()}},{key:"updateState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._datalayer.state,r=null===e?null:Object.assign(Object.assign({},this._datalayer.state),e);this._datalayer.state=r;var i=this.getFromCache();this.setCacheRefreshed();var o=!tJ(n,r);(i||o)&&(tY(this._datalayer.subscriptions,r),o&&!t&&this._datalayer.syncToLocalStorage())}},{key:"updateTokens",value:function(e){var t=e.session_token,n=e.session_jwt,r=Object.assign(Object.assign({},this._datalayer.readSessionCookie()),{session_token:t,session_jwt:n});"string"==typeof t||"string"==typeof n?(this._datalayer.writeSessionCookie(r),this._datalayer.removeISTCookie()):this._datalayer.removeSessionCookie()}},{key:"subscribeToState",value:function(e){return tZ(this._datalayer.subscriptions,e)}},{key:"getState",value:function(){return this._datalayer.state}},{key:"destroy",value:function(){window.removeEventListener("storage",this._listen)}},{key:"syncFromDeviceStorage",value:function(){return null}},{key:"getFromCache",value:function(){return this.fromCache}},{key:"setCacheRefreshed",value:function(){this.fromCache=!1}}])),tX=function(e){function t(e,n,r,i,o){var a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:eW(),c=arguments.length>6?arguments[6]:void 0;return tD(this,t),(a=t_(this,t,[e,n,r,i,o,s]))._oneTap=c,a.startOneTapDiscovery=function(e){return tu(a,void 0,void 0,tP().m(function t(){var n,r,i;return tP().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this._oneTap.createOneTapClient();case 1:if((n=t.v).success){t.n=2;break}throw Error("One Tap could not load: ".concat(n.reason));case 2:return r=n.client,i=this._oneTap.createOnDiscoverySuccessHandler({discoveryRedirectUrl:e.discovery_redirect_url,onSuccess:this._oneTap.redirectOnSuccess}),t.a(2,r.render({style:{position:g.floating},callback:i,cancelOnTapOutside:e.cancel_on_tap_outside}))}},t,this)}))},a.startOneTap=function(e){return tu(a,void 0,void 0,tP().m(function t(){var n,r,i;return tP().w(function(t){for(;;)switch(t.n){case 0:if(e.organization_id){t.n=1;break}throw new G("stytch.oauth.googleOneTap.start","organization_id is a required argument");case 1:return t.n=2,this._oneTap.createOneTapClient();case 2:if((n=t.v).success){t.n=3;break}throw Error("One Tap could not load: ".concat(n.reason));case 3:return r=n.client,i=this._oneTap.createOnSuccessHandler({organizationId:e.organization_id,signupRedirectUrl:e.signup_redirect_url,loginRedirectUrl:e.login_redirect_url,onSuccess:this._oneTap.redirectOnSuccess}),t.a(2,r.render({style:{position:g.floating},callback:i,cancelOnTapOutside:e.cancel_on_tap_outside}))}},t,this)}))},a.googleOneTap={discovery:{start:a.startOneTapDiscovery},start:a.startOneTap},a}return tk(t,e),tj(t)}(e1),t0="u">typeof window&&"IdentityCredential"in window,t1=function(e){return e===g.forceLegacyEmbedded?"force":e===g.embeddedOnly||e===g.embedded||e===g.floatingOrEmbedded},t2=function(e){var t=t1(e);return"force"===t||t&&!t0},t5=tj(function e(t,n){tD(this,e),this._googleClient=t,this._clientId=n},[{key:"cancel",value:function(){this._googleClient.cancel()}},{key:"render",value:function(e){var t=e.callback,n=e.onOneTapCancelled,r=e.style,i=e.cancelOnTapOutside,o=void 0===i||i;return tu(this,void 0,void 0,tP().m(function e(){var i,a,s,c=this;return tP().w(function(e){for(;;)if(0===e.n)return i=t1(r.position),a=t2(r.position),s={client_id:this._clientId,callback:t,auto_select:!1,context:"use",itp_supp
1ort:!0,use_fedcm_for_prompt:"force"!==i,cancel_on_tap_outside:o},a&&(s.prompt_parent_id="google-parent-prompt",s.cancel_on_tap_outside=!1),this._googleClient.initialize(s),e.a(2,new Promise(function(e){c._googleClient.prompt(function(t){var r,i,o,s,u;if(t.isSkippedMoment()){var l=null!=(i=null==(r=t.getSkippedReason)?void 0:r.call(t))?i:"unknown_reason";return"user_cancel"===l&&(null==n||n()),e({success:!1,reason:l})}return!t.isNotDisplayed&&a||(null==(o=t.isNotDisplayed)?void 0:o.call(t))?e({success:!1,reason:null!=(u=null==(s=t.getNotDisplayedReason)?void 0:s.call(t))?u:"unknown_reason"}):t.isDismissedMoment()?void 0:(c.styleFrame(a),e({success:!0}))})}))},e,this)}))}},{key:"styleFrame",value:function(e){e&&Array.from(document.getElementsByTagName("iframe")).forEach(function(e){e.src.includes(eh)&&(e.style.width="100%")})}}]),t3=Promise.resolve({pkceRequiredForOAuth:!1}),t4=tj(function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t3;tD(this,e),this._networkClient=t,this._pkceManager=n,this._config=i,this.createOnDiscoverySuccessHandler=function(e){var t=e.discoveryRedirectUrl,n=e.onSuccess,i=e.onError;return function(e){return tu(r,void 0,void 0,tP().m(function r(){var o,a;return tP().w(function(r){for(;;)switch(r.n){case 0:return o=e.credential,a=this.submitGoogleOneTapTokenDiscovery({credential:o,discoveryRedirectUrl:t}).then(function(e){return n(e.redirect_url)}),i&&(a=a.catch(function(e){return i(e)})),r.n=1,a;case 1:return r.a(2)}},r,this)}))}},this.createOnSuccessHandler=function(e){var t=e.organizationId,n=e.signupRedirectUrl,i=e.loginRedirectUrl,o=e.onSuccess,a=e.onError;return function(e){return tu(r,void 0,void 0,tP().m(function r(){var s,c;return tP().w(function(r){for(;;)switch(r.n){case 0:return s=e.credential,c=this.submitGoogleOneTapToken({credential:s,organizationId:t,signupRedirectUrl:n,loginRedirectUrl:i}).then(function(e){return o(e.redirect_url)}),a&&(c=c.catch(function(e){return a(e)})),r.n=1,c;case 1:return r.a(2)}},r,this)}))}},this.redirectOnSuccess=function(e){window.location.href=e}},[{key:"fetchGoogleStart",value:function(){return tu(this,void 0,void 0,tP().m(function e(){var t;return tP().w(function(e){for(;;)switch(e.n){case 0:if(!this.googleClientID){e.n=1;break}return e.a(2,this.googleClientID);case 1:return e.n=2,this._networkClient.fetchSDK({url:"/b2b/oauth/google/onetap/start",method:"GET"});case 2:return t=e.v,this.googleClientID=t.google_client_id,e.a(2,this.googleClientID)}},e,this)}))}},{key:"submitGoogleOneTapTokenDiscovery",value:function(e){var t=e.credential,n=e.discoveryRedirectUrl;return tu(this,void 0,void 0,tP().m(function e(){var r;return tP().w(function(e){for(;;)switch(e.n){case 0:return r=void 0,e.n=1,this._config;case 1:if(!e.v.pkceRequiredForOAuth){e.n=3;break}return e.n=2,this._pkceManager.startPKCETransaction();case 2:r=e.v.code_challenge,e.n=4;break;case 3:this._pkceManager.clearPKPair();case 4:return e.n=5,this._networkClient.fetchSDK({url:"/b2b/oauth/google/onetap/discovery/submit",method:"POST",body:{id_token:t,discovery_redirect_url:n,pkce_code_challenge:r}});case 5:return e.a(2,e.v)}},e,this)}))}},{key:"submitGoogleOneTapToken",value:function(e){var t=e.credential,n=e.organizationId,r=e.signupRedirectUrl,i=e.loginRedirectUrl;return tu(this,void 0,void 0,tP().m(function e(){var o;return tP().w(function(e){for(;;)switch(e.n){case 0:return o=void 0,e.n=1,this._config;case 1:if(!e.v.pkceRequiredForOAuth){e.n=3;break}return e.n=2,this._pkceManager.startPKCETransaction();case 2:o=e.v.code_challenge,e.n=4;break;case 3:this._pkceManager.clearPKPair();case 4:return e.n=5,this._networkClient.fetchSDK({url:"/b2b/oauth/google/onetap/submit",method:"POST",body:{id_token:t,organization_id:n,signup_redirect_url:r,login_redirect_url:i,pkce_code_challenge:o}});case 5:return e.a(2,e.v)}},e,this)}))}},{key:"createOneTapClient",value:function(){return tu(this,void 0,void 0,tP().m(function e(){var t,n,r,i,o,a;return tP().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this.fetchGoogleStart();case 1:t=e.v,e.n=3;break;case 2:return e.p=2,i=e.v,n=J.from(i),e.a(2,{success:!1,reason:n.error_type});case 3:if(""!==t){e.n=4;break}return e.a(2,{success:!1,reason:"oauth_config_not_found"});case 4:return o=t5,e.n=5,eP(eg,function(){return window.google.accounts.id});case 5:return a=e.v,r=new o(a,t),e.a(2,{success:!0,client:r})}},e,this,[[0,2]])}))}}]),t6=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.cookieOptions,o=r.keepSessionAlive,a=eK(e);return a.isOptionalBoolean("keepSessionAlive",o),i&&a.isOptionalString("cookieOptions.opaqueTokenCookieName",i.opaqueTokenCookieName).isOptionalString("cookieOptions.jwtCookieName",i.jwtCookieName).isOptionalString("cookieOptions.istCookieName",i.istCookieName).isOptionalString("cookieOptions.path",i.path).isOptionalString("cookieOptions.domain",i.domain),{cookieOptions:i,keepSessionAlive:o,endpoints:{testAPIURL:ej(r),liveAPIURL:eF(r),dfpBacken
1dURL:eL(r),dfpCdnURL:eM(r),clientsideServicesIframeURL:null!=(n=null==(t=null==r?void 0:r.endpoints)?void 0:t.clientsideServicesIframeURL)?n:em}}},t8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customBaseUrl,r=t.endpointOptions;return eB(e)?!!(n||(null==r?void 0:r.testApiDomain)):!!(n||(null==r?void 0:r.apiDomain))},t7=function(){var e,t,n=((t=(e=new URL(window.location.toString())).searchParams).delete("token"),t.delete("stytch_token_type"),e);window.history.replaceState(null,document.title,n)},t9=function(e){var t=Object.keys(e),n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,n=new URL(e),r=n.searchParams.get("stytch_token_type"),i=n.searchParams.get("token");return i&&r?t.includes(r)?{handled:!0,token:i,tokenType:r}:{handled:!1,token:i,tokenType:r}:null};return{authenticateByUrl:function(t,r){return tu(void 0,void 0,void 0,tP().m(function i(){var o,a,s,c,u,l,d,f;return tP().w(function(i){for(;;)switch(i.p=i.n){case 0:if(o=t.clearParams,a=tc(t,["clearParams"]),void 0===r&&(r=window.location.href),s=null!=o?o:r===window.location.href,null!=(c=n(r))){i.n=1;break}return i.a(2,null);case 1:if(c.handled){i.n=2;break}return i.a(2,c);case 2:return u=c.token,d=e[l=c.tokenType],i.p=3,i.n=4,d(u,a);case 4:return f=i.v,i.a(2,{handled:!0,tokenType:l,data:f});case 5:return i.p=5,s&&t7(),i.f(5);case 6:return i.a(2)}},i,null,[[3,,5,6]])}))},parseAuthenticateUrl:n}},ne=tj(function e(t,n){var r=this;tD(this,e),eI("StytchB2BHeadlessClient"),ez(t);var i=null!=t?t:"",o=t6(this.constructor.name,n),a=t8(i,n);this._dataLayer=t$(i,o),this._subscriptionService=new tQ(i,this._dataLayer,{usingCustomApiEndpoint:a}),this._stateChangeClient=new ta(this._subscriptionService,{}),this.onStateChange=function(){var e;return(e=r._stateChangeClient).onStateChange.apply(e,arguments)};var s=new tU(this._dataLayer,"passwords"),c=new tB(i,this._dataLayer,o.endpoints.liveAPIURL,o.endpoints.testAPIURL,function(){var e,t,n,i;return{stytch_member_id:null==(t=null==(e=r._dataLayer.state)?void 0:e.member)?void 0:t.member_id,stytch_member_session_id:null==(i=null==(n=r._dataLayer.state)?void 0:n.session)?void 0:i.member_session_id}});this._networkClient=c;var u=new tI(i,c,this._dataLayer),l=new tL(u.getAsync()),d=new eG(i,o.endpoints.dfpBacken
1dURL,o.endpoints.dfpCdnURL,u.getAsync(),l.executeRecaptcha),f=new tM(o.endpoints.clientsideServicesIframeURL),p=new tU(this._dataLayer,"oauth"),m=new t4(c,p,u.getAsync());this.organization=new e0(c,c,this._subscriptionService),this.member=new eJ(c,c,this._subscriptionService),this.self=new eJ(c,c,this._subscriptionService),this.session=new e2(c,this._subscriptionService),this.magicLinks=new eY(c,this._subscriptionService,new tU(this._dataLayer,"magic_links"),s,u.getAsync(),d),this.oauth=new tX(c,this._subscriptionService,p,u.getAsync(),{publicToken:i,testAPIURL:o.endpoints.testAPIURL,liveAPIURL:o.endpoints.liveAPIURL},d,m),this.sso=new eQ(c,this._subscriptionService,new tU(this._dataLayer,"sso"),u.getAsync(),{publicToken:i,testAPIURL:o.endpoints.testAPIURL,liveAPIURL:o.endpoints.liveAPIURL},d),this.discovery=new e5(c,this._subscriptionService),this.passwords=new e4(c,this._subscriptionService,s,u.getAsync(),d),this.otps=new e6(c,this._subscriptionService,d),this.totp=new e8(c,this._subscriptionService,d),this.recoveryCodes=new e7(c,this._subscriptionService,d),this.rbac=new e9(u.getSync(),u.getAsync(),this._subscriptionService),this.scim=new eX(this._networkClient,this._subscriptionService),this.impersonation=new te(this._networkClient,this._subscriptionService,d),this.idp=new tt(c),this._sessionManager=new to(this._subscriptionService,this.session,i,{keepSessionAlive:o.keepSessionAlive});var h=new tr(c,d);(a||this._dataLayer.readSessionCookie().session_token)&&this._sessionManager.performBackgroundRefresh();var g=t9({discovery:function(e){return r.magicLinks.discovery.authenticate({discovery_magic_links_token:e})},discovery_oauth:function(e){return r.oauth.discovery.authenticate({discovery_oauth_token:e})},oauth:function(e,t){return r.oauth.authenticate(Object.assign({oauth_token:e},t))},sso:function(e,t){return r.sso.authenticate(Object.assign({sso_token:e},t))},multi_tenant_magic_links:function(e,t){return r.magicLinks.authenticate(Object.assign({magic_links_token:e},t))},multi_tenant_impersonation:function(e){return r.impersonation.authenticate({impersonation_token:e})}}),v=g.authenticateByUrl,y=g.parseAuthenticateUrl;this.authenticateByUrl=v,this.parseAuthenticateUrl=y,c.logEvent({name:"b2b_sdk_instance_instantiated",details:{event_callback_registered:!1,error_callback_registered:!1,success_callback_registered:!1}}),u.getAsync().then(function(e){e.vertical===ts&&eD.error("This application is using a Stytch client for B2B projects, but the public token is for a Stytch Consumer project. Use a Consumer Stytch client instead, or verify that the public token is correct.")}),ty(this,{bootstrap:u,clientsideServices:f,publicToken:i,searchManager:h,dataLayer:this._dataLayer,networkClient:c,oneTap:m})});e.s(["S",0,ne,"c",0,t7],465456)},892927,e=>{"use strict";var t,n,r,i,o,a,s,c,u,l,d,f,p,m,h,g,v,y,_,b,w,k,S,C,E,O,x,P,A,T,D,F,j,R,z,I,L,M,B,N,U,H,K,G,W,q,V,$,Z,Y,J,Q,X,ee,et,en,er,ei,eo,ea,es,ec,eu,el,ed,ef,ep,em,eh,eg,ev,ey,e_,eb,ew,ek,eS,eC,eE,eO,ex,eP,eA,eT,eD,eF,ej,eR,ez,eI,eL,eM,eB,eN,eU,eH,eK,eG,eW,eq,eV,e$,eZ,eY,eJ,eQ,eX,e0,e1,e2,e5,e3,e4,e6,e8=e.i(456793),e7=e.i(376277),e9=e.i(674736),te=e.i(370082),tt=e.i(990015),tn=e.i(786836),tr=e.i(465456),ti=e.i(224934),to=["offset"];function ta(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=Object.create((r&&r.prototype instanceof s?r:s).prototype);return ts(c,"_invoke",function(n,r,i){var o,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,c=e,f.n=n,a}};function p(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,o=l[t],p=f.p,m=o[2];n>3?(i=m===r)&&(c=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,m),s=l,c=m;(t=s<2?e:c)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,c)):f.n=c:f.v=c);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");
1if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==a)break}catch(t){o=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][r]?t(t([][r]())):(ts(t={},r,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,ts(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,ts(l,"constructor",u),ts(u,"constructor",c),c.displayName="GeneratorFunction",ts(u,i,"GeneratorFunction"),ts(l),ts(l,i,"Generator"),ts(l,r,function(){return this}),ts(l,"toString",function(){return"[object Generator]"}),(ta=function(){return{w:o,m:d}})()}function ts(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(ts=function(e,t,n,r){function o(t,n){ts(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function tc(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function tu(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){tc(o,r,i,a,s,"next",e)}function s(e){tc(o,r,i,a,s,"throw",e)}a(void 0)})}}function tl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||tC(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?td(Object(n),!0).forEach(function(t){var r,i,o;r=e,i=t,o=n[t],(i=th(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,th(r.key),r)}}function tm(e,t,n){return t&&tp(e.prototype,t),n&&tp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function th(e){var t=function(e,t){if("object"!=tO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tO(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tO(t)?t:t+""}function tg(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function tv(e,t,n){return t=tk(t),function(e,t){if(t&&("object"==tO(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e,tb()?Reflect.construct(t,n||[],tk(e).constructor):t.apply(e,n))}function ty(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tw(e,t)}function t_(e){var t="function"==typeof Map?new Map:void 0;return(t_=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(tb())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&tw(i,n.prototype),i}(e,arguments,tk(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),tw(n,e)})(e)}function tb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tb=function(){return!!e})()}
1function tw(e,t){return(tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tk(e){return(tk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tS(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=tC(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function tC(e,t){if(e){if("string"==typeof e)return tE(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tE(e,t):void 0}}function tE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tO(e){return(tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tx,tP,tA,tT,tD,tF,tj,tR,tz={},tI=[],tL=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,tM=Array.isArray;function tB(e,t){for(var n in t)e[n]=t[n];return e}function tN(e){var t=e.parentNode;t&&t.removeChild(e)}function tU(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?tx.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return tH(e,a,r,i,null)}function tH(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==i?++tA:i,__i:-1,__u:0};return null==i&&null!=tP.vnode&&tP.vnode(o),o}function tK(){return{current:null}}function tG(e){return e.children}function tW(e,t){this.props=e,this.context=t}function tq(e,t){if(null==t)return e.__?tq(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?tq(e):null}function tV(e){(!e.__d&&(e.__d=!0)&&tT.push(e)&&!t$.__r++||tD!==tP.debounceRendering)&&((tD=tP.debounceRendering)||tF)(t$)}function t$(){var e,t,n,r,i,o,a,s,c;for(tT.sort(tj);e=tT.shift();)e.__d&&(t=tT.length,r=void 0,o=(i=(n=e).__v).__e,s=[],c=[],(a=n.__P)&&((r=tB({},i)).__v=i.__v+1,tP.vnode&&tP.vnode(r),t1(a,r,i,n.__n,void 0!==a.ownerSVGElement,32&i.__u?[o]:null,s,null==o?tq(i):o,!!(32&i.__u),c),r.__.__k[r.__i]=r,t2(s,r,c),r.__e!=o&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r)),tT.length>t&&tT.sort(tj));t$.__r=0}function tZ(e,t,n,r,i,o,a,s,c,u,l){var d,f,p,m,h,g=r&&r.__k||tI,v=t.length;for(n.__d=c,function(e,t,n){var r,i,o,a,s,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r<c;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?tH(null,i,null,null,i):tM(i)?tH(tG,{children:i},null,null,null):i.__b>0?tH(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=function(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,c=t[n];if(null===c||c&&i==c.key&&o===c.type)return n;if(r>+(null!=c&&0==(131072&c.__u)))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return a;a--}if(s<t.length){if((c=t[s])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return s;s++}}return -1}(i,n,a=r+d,l),i.__i=s,o=null,-1!==s&&(l--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?d++:s>a?l>
vendor: 17,103 bytes, line 1
1c-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=tq(o)),t3(o,o,!1),n[r]=null,l--);if(l)for(r=0;r<u;r++)null!=(o=n[r])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=tq(o)),t3(o,o))}(n,t,g),c=n.__d,d=0;d<v;d++)null!=(p=n.__k[d])&&"boolean"!=typeof p&&"function"!=typeof p&&(f=-1===p.__i?tz:g[p.__i]||tz,p.__i=d,t1(e,p,f,i,o,a,s,c,u,l),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&t5(f.ref,null,p),l.push(p.ref,p.__c||m,p)),null==h&&null!=m&&(h=m),65536&p.__u||f.__k===p.__k?c=function e(t,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,n=e(i[o],n,r));return n}return t.__e!=n&&(r.insertBefore(t.__e,n||null),n=t.__e),n&&n.nextSibling}(p,c,e):"function"==typeof p.type&&void 0!==p.__d?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function tY(e,t){return t=t||[],null==e||"boolean"==typeof e||(tM(e)?e.some(function(e){tY(e,t)}):t.push(e)),t}function tJ(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||tL.test(t)?n:n+"px"}function tQ(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||tJ(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||tJ(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?t0:tX,o)):e.removeEventListener(t,o?t0:tX,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function tX(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(tP.event?tP.event(e):e)}function t0(e){return this.l[e.type+!0](tP.event?tP.event(e):e)}function t1(e,t,n,r,i,o,a,s,c,u){var l,d,f,p,m,h,g,v,y,_,b,w,k,S,C,E=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(l=tP.__b)&&l(t);e:if("function"==typeof E)try{if(v=t.props,y=(l=E.contextType)&&r[l.__c],_=l?y?y.props.value:l.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(v,_):(t.__c=d=new tW(v,_),d.constructor=E,d.render=t4),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=_,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=tB({},d.__s)),tB(d.__s,E.getDerivedStateFromProps(v,d.__s))),p=d.props,m=d.state,d.__v=t,f)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&v!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,_),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,_)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,_),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=_,d.props=v,d.__P=e,d.__e=!1,w=tP.__r,k=0,"prototype"in E&&E.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),l=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do d.__d=!1,w&&w(t),l=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25)d.state=d.__s,null!=d.getChildContext&&(r=tB(tB({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(h=d.getSnapshotBeforeUpdate(p,m)),tZ(e,tM(C=null!=l&&l.type===tG&&null==l.key?l.props.children:l)?C:[C],t,n,r,i,o,a,s,c,u),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||null!=o?(t.__e=s,t.__u|=c?160:32,o[o.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),tP.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,a,s,c){var u,l,d,f,p,m,h,g=n.props,v=t.props,y=t.type;if("svg"===y&&(i=!0),null!=o){for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!y&&(y?p.localName===y:3===p.nodeType)){e=p,o[u]=null;break}}if(null==e){if(null===y)return document.createTextNode(v);e=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,v.is&&v),o=null,s=!1}if(null===y)g===v||s&&e.data===v||(e.data=v);else{if(o=o&&tx.call(e.childNodes),g=n.props||tz,!s&&null!=o)for(g={},u=0;u<e.attributes.length;u++)g[(p=e.attributes[u]).name]=p.value;for(u in g)p=g[u],"children"==u||("dangerouslySetInnerHTML"==u?d=p:"key"===u||u in v||tQ(e,u,null,p,i));for(u in v)p=v[u],"children"==u?f=p:"dangerouslySetInnerHTML"==u?l=p:"value"==u?m=p:"checked"==u?h=p:"key"===u||s&&"function"!=typeof p||g[u]===p||tQ(e,u,p,g[u],i);if(l)s||d&&(l.__html===d.__html||l.__html===e.innerHTML)||(e.innerHTML=l.__html),t.__k=[];else if(d&&(e.innerHTML=""),tZ(e,tM(f)?f:[f],t,n,r,i&&"foreignObject"!==y,o,a,o?o[0]:n.__k&&tq(n,0),s,c),null!=o)for(u=o.length;u--;)null!=o[u]&&tN(o[u]);s||(u="value",void 0===m||m===e[u]&&("progress"!==y||m)&&("option"!==y||m===g[u])||tQ(e,u,m,g[u],!1),u="checked",void 0!==h&&h!==e[u]&&tQ(e,u,h,g[u],!1))}return e}(n.__e,t,n,r,i,o,a,c,u);(l=tP.diffed)&&l(t)}function t2(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)t5(n[r],n[++r],n[++r]);tP.__c&&tP.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){tP.__e(e,t.__v)}})}function t5(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){tP.__e(e,n)}}function t3(e,t,n){var r,i;if(tP.unmount&&tP.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||t5(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){tP.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&t3(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||tN(e.__e),e.__=e.__e=e.__d=void 0}function t4(e,t,n){return this.constructor(e,n)}function t6(e,t,n){var r,i,o,a;tP.__&&tP.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],a=[],t1(t,e=(!r&&n||t).__k=tU(tG,null,[e]),i||tz,tz,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?tx.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),t2(o,e,a)}function t8(e,t,n){var r,i,o,a,s=tB({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=void 0===t[o]&&void 0!==a?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?tx.call(arguments,2):n),tH(e.type,s,r||e.key,i||e.ref,null)}function t7(e,t){var n={__c:t="__cC"+tR++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,tV(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}tx=tI.slice,tP={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},tA=0,tW.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=tB({},this.state),"function"==typeof e&&(e=e(tB({},n),this.props)),e&&tB(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),tV(this))},tW.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tV(this))},tW.prototype.render=tG,tT=[],tF="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tj=function(e,t){return e.__v.__b-t.__v.__b},t$.__r=0,tR=0;var t9,ne,nt,nn,nr=0,ni=[],no=[],na=tP.__b,ns=tP.__r,nc=tP.diffed,nu=tP.__c,nl=tP.unmount;function nd(e,t){tP.__h&&tP.__h(ne,e,nr||t),nr=0;var n=ne.__H||(ne.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:no}),n.__[e]}function nf(e){return nr=1,np(nP,e)}function np(e,t,n){var r=nd(t9++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):nP(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ne,!ne.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var a=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),!(!a&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};ne.u=!0;var o=ne.shouldComponentUpdate,a=ne.componentWillUpdate;ne.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}a&&a.call(this,e,t,n)},ne.shouldComponentUpdate=i}return r.__N||r.__}function nm(e,t){var n=nd(t9++,3);!tP.__s&&nx(n.__H,t)&&(n.__=e,n.i=t,ne.__H.__h.push(n))}function nh(e,t){var n=nd(t9++,4);!tP.__s&&nx(n.__H,t)&&(n.__=e,n.i=t,ne.__h.push(n))}function ng(e){return nr=5,ny(function(){return{current:e}},[])}function nv(e,t,n){nr=6,nh(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==n?n:n.concat(e))}function ny(e,t){var n=nd(t9++,7);return nx(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function n_(e,t){return nr=8,ny(function(){return e},t)}function nb(e){var t=ne.context[e.__c],n=nd(t9++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(ne)),t.props.value):e.__}function nw(e,t){tP.useDebugValue&&tP.useDebugValue(t?t(e):e)}function nk(){var e=nd(t9++,11);if(!e.__){for(var t=ne.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function nS(){for(var e;e=ni.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(nE),e.__H.__h.forEach(nO),e.__H.__h=[]}catch(t){e.__H.__h=[],tP.__e(t,e.__v)}}tP.__b=function(e){ne=null,na&&na(e)},tP.__r=function(e){ns&&ns(e),t9=0;var t=(ne=e.__c).__H;t&&(nt===ne?(t.__h=[],ne.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=no,e.__N=e.i=void 0})):(t.__h.forEach(nE),t.__h.forEach(nO),t.__h=[],t9=0)),nt=ne},tP.diffed=function(e){nc&&nc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ni.push(t)&&nn===tP.requestAnimationFrame||((nn=tP.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),nC&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);nC&&(t=requestAnimationFrame(n))})(nS)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==no&&(e.__=e.__V),e.i=void 0,e.__V=no})),nt=ne=null},tP.__c=function(e,t){t.some(function(e){try{e.__h.forEach(nE),e.__h=e.__h.filter(function(e){return!e.__||nO(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],tP.__e(n,e.__v)}}),nu&&nu(e,t)},tP.unmount=function(e){nl&&nl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{nE(e)}catch(e){t=e}}),n.__H=void 0,t&&tP.__e(t,n.__v))};var nC="function"==typeof requestAnimationFrame;function nE(e){var t=ne,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ne=t}function nO(e){var t=ne;e.__c=e.__(),ne=t}function nx(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function nP(e,t){return"function"==typeof t?t(e):t}function nA(e,t){for(var n in t)e[n]=t[n];return e}function nT(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function nD(e){this.props=e}function nF(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:nT(this.props,e)}function r(t){return this.shouldComponentUpdate=n,tU(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(nD.prototype=new tW).isPureReactComponent=!0,nD.prototype.shouldComponentUpdate=function(e,t){return nT(this.props,e)||nT(this.state,t)};var nj=tP.__b;tP.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),nj&&nj(e)};var nR="u">typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function nz(e){function t(t){var n=nA({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=nR,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var nI=function(e,t){return null==e?null:tY(tY(e).map(t))},nL={map:nI,forEach:nI,count:function(e){return e?tY(e).length:0},only:function(e){var t=tY(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:tY},nM=tP.__e;tP.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}nM(e,t,n,r)};var nB=tP.unmount;function nN(){this.__u=0,this.t=null,this.__b=null}function nU(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function nH(e){var t,n,r;function i(i){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return tU(n,i)}return i.displayName="Lazy",i.__f=!0,i}function nK(){this.u=null,this.o=null}tP.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),nB&&nB(e)},(nN.prototype=new tW).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=nU(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var e,t=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&r&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)}),t.__c&&t.__c.__P===n&&(t.__e&&r.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=r)),t}(t,t.__c.__P,t.__c.__O)}for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},nN.prototype.componentWillUnmount=function(){this.t=[]},nN.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=nA({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)})),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&tU(tG,null,e.fallback);return i&&(i.__u&=-33),[tU(tG,null,t.__a?null:e.children),i]};var nG=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function nW(e){return this.getChildContext=function(){return e.context},e.children}function nq(e){var t=this,n=e.i;t.componentWillUnmount=function(){t6(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),t6(tU(nW,{context:t.context},e.__v),t.l)}function nV(e,t){var n=tU(nq,{__v:e,i:t});return n.containerInfo=t,n}(nK.prototype=new tW).__a=function(e){var t=this,n=nU(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),nG(t,e,r)):i()};n?n(o):o()}},nK.prototype.render=function(e){this.u=null,this.o=new Map;var t=tY(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},nK.prototype.componentDidUpdate=nK.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){nG(e,n,t)})};var n$="u">typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,nZ=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,nY=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,nJ=/[A-Z0-9]/g,nQ="u">typeof document;function nX(e,t,n){return null==t.__k&&(t.textContent=""),t6(e,t),"function"==typeof n&&n(),e?e.__c:null}function n0(e,t,n){return function e(t,n){t6(t,n,e)}(e,t),"function"==typeof n&&n(),e?e.__c:null}tW.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(tW.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var n1=tP.event;function n2(){}function n5(){return this.cancelBubble}function n3(){return this.defaultPrevented}tP.event=function(e){return n1&&(e=n1(e)),e.persist=n2,e.isPropagationStopped=n5,e.isDefaultPrevented=n3,e.nativeEvent=e};
vendor: 4,111 bytes, line 1
1var n4,n6={enumerable:!1,configurable:!0,get:function(){return this.class}},n8=tP.vnode;tP.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||nQ&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var a,s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||(a=t.type,("u">typeof Symbol&&"symbol"==tO(Symbol())?/fil|che|rad/:/fil|che|ra/).test(a))?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":nY.test(i)?i=s:-1===n.indexOf("-")&&nZ.test(i)?i=i.replace(nJ,"-$&").toLowerCase():null===o&&(o=void 0):s=i="oninput","oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=tY(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=tY(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",n6)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=n$,n8&&n8(e)};var n7=tP.__r;tP.__r=function(e){n7&&n7(e),n4=e.__c};var n9=tP.diffed;tP.diffed=function(e){n9&&n9(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),n4=null};var re={ReactCurrentDispatcher:{current:{readContext:function(e){return n4.__n[e.__c].props.value}}}};function rt(e){return tU.bind(null,e)}function rn(e){return!!e&&e.$$typeof===n$}function rr(e){return rn(e)&&e.type===tG}function ri(e){return rn(e)?t8.apply(null,arguments):e}function ro(e){return!!e.__k&&(t6(null,e),!0)}function ra(e){return e&&(e.base||1===e.nodeType&&e)||null}var rs=function(e,t){return e(t)},rc=function(e,t){return e(t)};function ru(e){e()}function rl(e){return e}function rd(){return[!1,ru]}function rf(e,t){var n=t(),r=nf({h:{__:n,v:t}}),i=r[0].h,o=r[1];return nh(function(){i.__=n,i.v=t,rp(i)&&o({h:i})},[e,n,t]),nm(function(){return rp(i)&&o({h:i}),e(function(){rp(i)&&o({h:i})})},[e]),n}function rp(e){var t=e.v,n=e.__;try{var r=t();return(n!==r||0===n&&1/n!=1/r)&&(n==n||r==r)}catch(e){return!0}}var rm={useState:nf,useId:nk,useReducer:np,useEffect:nm,useLayoutEffect:nh,useInsertionEffect:nh,useTransition:rd,useDeferredValue:rl,useSyncExternalStore:rf,startTransition:ru,useRef:ng,useImperativeHandle:nv,useMemo:ny,useCallback:n_,useContext:nb,useDebugValue:nw,version:"17.0.2",Children:nL,render:nX,hydrate:n0,unmountComponentAtNode:ro,createPortal:nV,createElement:tU,createContext:t7,createFactory:rt,cloneElement:ri,createRef:tK,Fragment:tG,isValidElement:rn,isElement:rn,isFragment:rr,findDOMNode:ra,Component:tW,PureComponent:nD,memo:nF,forwardRef:nz,flushSync:rc,unstable_batchedUpdates:rs,StrictMode:tG,Suspense:nN,SuspenseList:nK,lazy:nH,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:re},rh=Object.freeze({__proto__:null,Children:nL,Component:tW,Fragment:tG,PureComponent:nD,StrictMode:tG,Suspense:nN,SuspenseList:nK,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:re,cloneElement:ri,createContext:t7,createElement:tU,createFactory:rt,createPortal:nV,createRef:tK,default:rm,findDOMNode:ra,flushSync:rc,forwardRef:nz,hydrate:n0,isElement:rn,isFragment:rr,isValidElement:rn,lazy:nH,memo:nF,render:nX,startTransition:ru,unmountComponentAtNode:ro,unstable_batchedUpdates:rs,useCallback:n_,useContext:nb,useDebugValue:nw,useDeferredValue:rl,useEffect:nm,useErrorBoundary:function(e){var t=nd(t9++,10),n=nf();return t.__=e,ne.componentDidCatch||(ne.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:nk,useImperativeHandle:nv,useInsertionEffect:nh,useLayoutEffect:nh,useMemo:ny,useReducer:np,useRef:ng,useState:nf,useSyncExternalStore:rf,useTransition:rd,version:"17.0.2"}),rg="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;
1function rv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ry,r_={exports:{}},rb={},rw=Symbol.for("react.element"),rk=Symbol.for("react.portal"),rS=Symbol.for("react.fragment"),rC=Symbol.for("react.strict_mode"),rE=Symbol.for("react.profiler"),rO=Symbol.for("react.provider"),rx=Symbol.for("react.context"),rP=Symbol.for("react.server_context"),rA=Symbol.for("react.forward_ref"),rT=Symbol.for("react.suspense"),rD=Symbol.for("react.suspense_list"),rF=Symbol.for("react.memo"),rj=Symbol.for("react.lazy"),rR=Symbol.for("react.offscreen");function rz(e){if("object"===tO(e)&&null!==e){var t=e.$$typeof;switch(t){case rw:switch(e=e.type){case rS:case rE:case rC:case rT:case rD:return e;default:switch(e=e&&e.$$typeof){case rP:case rx:case rA:case rj:case rF:case rO:return e;default:return t}}case rk:return t}}}ry=Symbol.for("react.module.reference"),rb.ContextConsumer=rx,rb.ContextProvider=rO,rb.Element=rw,rb.ForwardRef=rA,rb.Fragment=rS,rb.Lazy=rj,rb.Memo=rF,rb.Portal=rk,rb.Profiler=rE,rb.StrictMode=rC,rb.Suspense=rT,rb.SuspenseList=rD,rb.isAsyncMode=function(){return!1},rb.isConcurrentMode=function(){return!1},rb.isContextConsumer=function(e){return rz(e)===rx},rb.isContextProvider=function(e){return rz(e)===rO},rb.isElement=function(e){return"object"===tO(e)&&null!==e&&e.$$typeof===rw},rb.isForwardRef=function(e){return rz(e)===rA},rb.isFragment=function(e){return rz(e)===rS},rb.isLazy=function(e){return rz(e)===rj},rb.isMemo=function(e){return rz(e)===rF},rb.isPortal=function(e){return rz(e)===rk},rb.isProfiler=function(e){return rz(e)===rE},rb.isStrictMode=function(e){return rz(e)===rC},rb.isSuspense=function(e){return rz(e)===rT},rb.isSuspenseList=function(e){return rz(e)===rD},rb.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===rS||e===rE||e===rC||e===rT||e===rD||e===rR||"object"===tO(e)&&null!==e&&(e.$$typeof===rj||e.$$typeof===rF||e.$$typeof===rO||e.$$typeof===rx||e.$$typeof===rA||e.$$typeof===ry||void 0!==e.getModuleId)||!1},rb.typeOf=rz,r_.exports=rb;var rI=r_.exports,rL=rv(function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==tO(e)||!e||"object"!==tO(t)||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<o.length;c++){var u=o[c];if(!s(u))return!1;var l=e[u],d=t[u];if(!1===(i=n?n.call(r,l,d,u):void 0)||void 0===i&&l!==d)return!1}return!0});function rM(e){function t(e,t,r){var i=t.trim().split(m);t=i;var o=i.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=n(e,t[s],r).trim();break;default:var c=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[c++]=n(e[u]+" ",i[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(h,"$1"+e.trim());case 58:return e.trim()+t.replace(h,"$1"+e.trim());default:if(0<+n&&0<t.indexOf("\f"))return t.replace(h,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,o){var a=e+";",s=2*t+3*n+4*o;if(944===s){e=a.indexOf(":",9)+1;var c=a.substring(e,a.length-1).trim();return c=a.substring(0,e).trim()+c+";",1===A||2===A&&i(c,1)?"-webkit-"+c+c:c}if(0===A||2===A&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(E,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;
vendor: 4,197 bytes, line 1
1case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(c=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+c+a;case 1005:return f.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(c=a.substring(13).trim()).indexOf("-")+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=a.replace(_,"tb");break;case 232:c=a.replace(_,"tb-rl");break;case 220:c=a.replace(_,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+c+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(c=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|c.charCodeAt(7))){case 203:if(111>c.charCodeAt(8))break;case 115:a=a.replace(c,"-webkit-"+c)+";"+a;break;case 207:case 102:a=a.replace(c,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(c,"-webkit-"+c)+";"+a.replace(c,"-ms-"+c+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return c=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+c+"-ms-flex-"+c+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(k,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(k,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(c=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):a.replace(c,"-webkit-"+c)+a.replace(c,"-moz-"+c.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),j(2!==t?r:r.replace(S,"$1"),n,t)}function o(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,i,o,a,s,u,l){for(var d,f=0,p=t;f<F;++f)switch(d=D[f].call(c,e,p,n,r,i,o,a,s,u,l)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(j=null,e?"function"!=typeof e?A=1:(A=2,j=e):A=0),s}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<F){var c=a(-1,n,s,s,x,O,0,0,0,0);void 0!==c&&"string"==typeof c&&(n=c)}var d=function e(n,s,c,d,f){for(var p,m,h,_,w,k=0,S=0,C=0,E=0,D=0,j=0,z=h=p=0,I=0,L=0,M=0,B=0,N=c.length,U=N-1,H="",K="",G="",W="";I<N;){if(m=c.charCodeAt(I),I===U&&0!==S+E+C+k&&(0!==S&&(m=47===S?10:47),E=C=k=0,N++,U++),0===S+E+C+k){if(I===U&&(0<L&&(H=H.replace(l,"")),0<H.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:H+=c.charAt(I)}m=59}switch(m){case 123:for(p=(H=H.trim()).charCodeAt(0),h=1,B=++I;I<N;){switch(m=c.charCodeAt(I)){case 123:h++;break;case 125:h--;break;case 47:switch(m=c.charCodeAt(I+1)){case 42:case 47:t:{for(z=I+1;z<U;++z)switch(c.charCodeAt(z)){case 47:if(42===m&&42===c.charCodeAt(z-1)&&I+2!==z){I=z+1;break t}break;case 10:if(47===m){I=z+1;break t}}I=z}}break;case 91:m++;case 40:m++;case 34:case 39:for(;I++<U&&c.charCodeAt(I)!==m;);}if(0===h)break;I++}if(h=c.substring(B,I),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),64===p){switch(0<L&&(H=H.replace(l,"")),m=H.charCodeAt(1)){case 100:case 109:case 115:case 45:L=s;break;default:L=T}if(B=(h=e(s,L,h,m,f+1)).length,0<F&&(w=a(3,h,L=t(T,H,M),s,x,O,B,m,f,d),H=L.join(""),void 0!==w&&0===(B=(h=w.trim()).length)&&(m=0,h="")),0<B)switch(m){case 115:H=H.replace(b,o);case 100:case 109:case 45:h=H+"{"+h+"}";break;case 107:h=(H=H.replace(g,"$1 $2"))+"{"+h+"}",h=1===A||2===A&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=H+h,112===d&&(K+=h,h="")}else h=""}else h=e(s,t(s,H,M),h,d,f+1);G+=h,h=M=L=z=p=0,H="",m=c.charCodeAt(++I);break;case 125:case 59:if(1<(B=(H=(0<L?H.replace(l,""):H).trim()).length))switch(0===z&&(45===(p=H.charCodeAt(0))||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<F&&void 0!==(w=a(1,H,s,n,x,O,K.length,d,f,d))&&0===(B=(H=w.trim()).length)&&(H="\0\0"),p=H.charCo
vendor: 4,862 bytes, line 1
1deAt(0),m=H.charCodeAt(1),p){case 0:break;case 64:if(105===m||99===m){W+=H+c.charAt(I);break}default:58!==H.charCodeAt(B-1)&&(K+=r(H,p,m,H.charCodeAt(2)))}M=L=z=p=0,H="",m=c.charCodeAt(++I)}}switch(m){case 13:case 10:47===S?S=0:0===1+p&&107!==d&&0<H.length&&(L=1,H+="\0"),0<F*R&&a(0,H,s,n,x,O,K.length,d,f,d),O=1,x++;break;case 59:case 125:if(0===S+E+C+k){O++;break}default:switch(O++,_=c.charAt(I),m){case 9:case 32:if(0===E+k+S)switch(D){case 44:case 58:case 9:case 32:_="";break;default:32!==m&&(_=" ")}break;case 0:_="\\0";break;case 12:_="\\f";break;case 11:_="\\v";break;case 38:0===E+S+k&&(L=M=1,_="\f"+_);break;case 108:if(0===E+S+k+P&&0<z)switch(I-z){case 2:112===D&&58===c.charCodeAt(I-3)&&(P=D);case 8:111===j&&(P=j)}break;case 58:0===E+S+k&&(z=I);break;case 44:0===S+C+E+k&&(L=1,_+="\r");break;case 34:case 39:0===S&&(E=E===m?0:0===E?m:E);break;case 91:0===E+S+C&&k++;break;case 93:0===E+S+C&&k--;break;case 41:0===E+S+k&&C--;break;case 40:0===E+S+k&&(0===p&&(2*D+3*j==533||(p=1)),C++);break;case 64:0===S+C+E+k+z+h&&(h=1);break;case 42:case 47:if(!(0<E+k+C))switch(S){case 0:switch(2*m+3*c.charCodeAt(I+1)){case 235:S=47;break;case 220:B=I,S=42}break;case 42:47===m&&42===D&&B+2!==I&&(33===c.charCodeAt(B+2)&&(K+=c.substring(B,I+1)),_="",S=0)}}0===S&&(H+=_)}j=D,D=m,I++}if(0<(B=K.length)){if(L=s,0<F&&void 0!==(w=a(2,K,L,n,x,O,B,d,f,d))&&0===(K=w).length)return W+K+G;if(K=L.join(",")+"{"+K+"}",0!=A*P){switch(2!==A||i(K,2)||(P=0),P){case 111:K=K.replace(y,":-moz-$1")+K;break;case 112:K=K.replace(v,"::-webkit-input-$1")+K.replace(v,"::-moz-$1")+K.replace(v,":-ms-input-$1")+K}P=0}}return W+K+G}(T,s,n,0,0);return 0<F&&void 0!==(c=a(-2,d,s,s,x,O,d.length,0,0,0))&&(d=c),P=0,O=x=1,d}var u=/^\0+/g,l=/[\0\r\f]/g,d=/: */g,f=/zoo|gra/,p=/([,: ])(transform)/g,m=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,b=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,k=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,E=/([^-])(image-set\()/,O=1,x=1,P=0,A=1,T=[],D=[],F=0,j=null,R=0;return c.use=function e(t){switch(t){case void 0:case null:F=D.length=0;break;default:if("function"==typeof t)D[F++]=t;else if("object"===tO(t))for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}var rB={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},rN=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRen
1dering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,rU=(t=function(e){return rN.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&91>e.charCodeAt(2)},n=Object.create(null),function(e){return void 0===n[e]&&(n[e]=t(e)),n[e]}),rH={exports:{}},rK={},rG="function"==typeof Symbol&&Symbol.for,rW=rG?Symbol.for("react.element"):60103,rq=rG?Symbol.for("react.portal"):60106,rV=rG?Symbol.for("react.fragment"):60107,r$=rG?Symbol.for("react.strict_mode"):60108,rZ=rG?Symbol.for("react.profiler"):60114,rY=rG?Symbol.for("react.provider"):60109,rJ=rG?Symbol.for("react.context"):60110,rQ=rG?Symbol.for("react.async_mode"):60111,rX=rG?Symbol.for("react.concurrent_mode"):60111,r0=rG?Symbol.for("react.forward_ref"):60112,r1=rG?Symbol.for("react.suspense"):60113,r2=rG?Symbol.for("react.suspense_list"):60120,r5=rG?Symbol.for("react.memo"):60115,r3=rG?Symbol.for("react.lazy"):60116,r4=rG?Symbol.for("react.block"):60121,r6=rG?Symbol.for("react.fundamental"):60117,r8=rG?Symbol.for("react.responder"):60118,r7=rG?Symbol.for("react.scope"):60119;function r9(e){if("object"===tO(e)&&null!==e){var t=e.$$typeof;switch(t){case rW:switch(e=e.type){case rQ:case rX:case rV:case rZ:case r$:case r1:return e;default:switch(e=e&&e.$$typeof){case rJ:case r0:case r3:case r5:case rY:return e;default:return t}}case rq:return t}}}function ie(e){return r9(e)===rX}rK.AsyncMode=rQ,rK.ConcurrentMode=rX,rK.ContextConsumer=rJ,rK.ContextProvider=rY,rK.Element=rW,rK.ForwardRef=r0,rK.Fragment=rV,rK.Lazy=r3,rK.Memo=r5,rK.Portal=rq,rK.Profiler=rZ,rK.StrictMode=r$,rK.Suspense=r1,rK.isAsyncMode=function(e){return ie(e)||r9(e)===rQ},rK.isConcurrentMode=ie,rK.isContextConsumer=function(e){return r9(e)===rJ},rK.isContextProvider=function(e){return r9(e)===rY},rK.isElement=function(e){return"object"===tO(e)&&null!==e&&e.$$typeof===rW},rK.isForwardRef=function(e){return r9(e)===r0},rK.isFragment=function(e){return r9(e)===rV},rK.isLazy=function(e){return r9(e)===r3},rK.isMemo=function(e){return r9(e)===r5},rK.isPortal=function(e){return r9(e)===rq},rK.isProfiler=function(e){return r9(e)===rZ},rK.isStrictMode=function(e){return r9(e)===r$},rK.isSuspense=function(e){return r9(e)===r1},rK.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===rV||e===rX||e===rZ||e===r$||e===r1||e===r2||"object"===tO(e)&&null!==e&&(e.$$typeof===r3||e.$$typeof===r5||e.$$typeof===rY||e.$$typeof===rJ||e.$$typeof===r0||e.$$typeof===r6||e.$$typeof===r8||e.$$typeof===r7||e.$$typeof===r4)},rK.typeOf=r9,rH.exports=rK;var it=rH.exports,ir={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ii={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},io={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ia={};function is(e){return it.isMemo(e)?io:ia[e.$$typeof]||ir}ia[it.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ia[it.Memo]=io;var ic=Object.defineProperty,iu=Object.getOwnPropertyNames,il=Object.getOwnPropertySymbols,id=Object.getOwnPropertyDescriptor,ip=Object.getPrototypeOf,im=Object.prototype,ih=rv(function e(t,n,r){if("string"!=typeof n){if(im){var i=ip(n);i&&i!==im&&e(t,i,r)}var o=iu(n);il&&(o=o.concat(il(n)));for(var a=is(t),s=is(n),c=0;c<o.length;++c){var u=o[c];if(!ii[u]&&!(r&&r[u])&&!(s&&s[u])&&!(a&&a[u])){var l=id(n,u);try{ic(t,u,l)}catch(e){}}}}return t});function ig(){return(ig=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var iv=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},iy=function(e){return null!==e&&"object"==tO(e)&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!rI.typeOf(e)},i_=Object.freeze([]),ib=Object.freeze({});function iw(e){return"function"==typeof e}function ik(e){return e.displayName||e.name||"Component"}function iS(e){return e&&"string"==typeof e.styledComponentId}var iC=void 0!==e8.default&&(e8.default.env.REACT_APP_SC_ATTR||e8.default.env.SC_ATTR)||"data-styled",iE="u">typeof window&&"HTMLElement"in window,iO=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:void 0!==e8.default&&void 0!==e8.default.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==e8.default.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==e8.default.env.REACT_APP_SC_DISABLE_SPEEDY&&e8.default.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==e8.default&&void 0!==e8.default.env.SC_DISABLE_SPEEDY&&""!==e8.default.env.SC_DISABLE_SPEEDY&&"false"!==e8.default.env.SC_DISABLE_SPEEDY&&e8.default.env.SC_DISABLE_SPEEDY);function ix(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var iP=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&ix(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o<i;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),iA=new Map,iT=new Map,iD=1,iF=function(e){if(iA.has(e))return iA.get(e);for(;iT.has(iD);)iD++;var t=iD++;return iA.set(e,t),iT.set(t,e),t},ij=function(e,t){t>=iD&&(iD=t+1),iA.set(e,t),iT.set(t,e)},iR="style["+iC+'][data-styled-version="5.3.5"]',iz=RegExp("^"+iC+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),iI=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&e.registerName(t,r)},iL=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var a=n[i].trim();if(a){var s=a.match(iz);if(s){var c=0|parseInt(s[1],10),u=s[2];0!==c&&(ij(u,c),iI(e,u,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(a)}}},iM=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(iC))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(iC,"active"),r.setAttribute("data-styled-version","5.3.5");var a="u">typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null;return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},iB=function(){function e(e){var t=this.element=iM(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}ix(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),iN=function(){function e(e){var t=this.element=iM(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),iU=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),iH=iE,iK={isServer:!iE,useCSSOMInjection:!iO},iG=function(){function e(e,t,n){void 0===e&&(e=ib),void 0===t&&(t={}),this.options=ig({},iK,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&iE&&iH&&(iH=!1,function(e){for(var t=document.querySelectorAll(iR),n=0,r=t.length;n<r;n++){var i=t[n];i&&"active"!==i.getAttribute(iC)&&(iL(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return iF(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(ig({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){var e,t,n,r;return this.tag||(this.tag=(t=(e=this.options).isServer,n=e.useCSSOMInjection,r=e.target,new iP(t?new iU(r):n?new iB(r):new iN(r))))},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(iF(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(iF(e),n)}
1,t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(iF(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",i=0;i<n;i++){var o,a=(o=i,iT.get(o));if(void 0!==a){var s=e.names.get(a),c=t.getGroup(i);if(s&&c&&s.size){var u=iC+".g"+i+'[id="'+a+'"]',l="";void 0!==s&&s.forEach(function(e){e.length>0&&(l+=e+",")}),r+=""+c+u+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),iW=/(a)(d)/gi,iq=function(e){return String.fromCharCode(e+(e>25?39:97))};function iV(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=iq(t%52)+n;return(iq(t%52)+n).replace(iW,"$1-$2")}var i$=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},iZ=function(e){return i$(5381,e)},iY=iZ("5.3.5"),iJ=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(iw(n)&&!iS(n))return!1}return!0}(e),this.componentId=t,this.baseHash=i$(iY,t),this.baseStyle=n,iG.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=or(this.rules,e,t,n).join(""),a=iV(i$(this.baseHash,o)>>>0);if(!t.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);t.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var c=this.rules.length,u=i$(this.baseHash,n.hash),l="",d=0;d<c;d++){var f=this.rules[d];if("string"==typeof f)l+=f;else if(f){var p=or(f,e,t,n),m=Array.isArray(p)?p.join(""):p;u=i$(u,m+d),l+=m}}if(l){var h=iV(u>>>0);if(!t.hasNameForId(r,h)){var g=n(l,"."+h,void 0,r);t.insertRules(r,h,g)}i.push(h)}}return i.join(" ")},e}(),iQ=/^\s*\/\/.*$/gm,iX=[":","[",".","#"];function i0(e){var t,n,r,i,o=void 0===e?ib:e,a=o.options,s=void 0===a?ib:a,c=o.plugins,u=void 0===c?i_:c,l=new rM(s),d=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(i[0]+r),"";default:return r+(0===d?"/*|*/":"")}case -2:r.split("/*|*/}").forEach(t)}}}(function(e){d.push(e)}),p=function(e,r,o){return 0===r&&-1!==iX.indexOf(o[n.length])||o.match(i)?e:"."+t};function m(e,o,a,s){void 0===s&&(s="&");var c=e.replace(iQ,""),u=o&&a?a+" "+o+" { "+c+" }":c;return t=s,r=RegExp("\\"+(n=o)+"\\b","g"),i=RegExp("(\\"+n+"\\b){2,}"),l(a||!o?"":o,u)}return l.use([].concat(u,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce(function(e,t){return t.name||ix(15),i$(e,t.name)},5381).toString():"",m}var i1=rm.createContext();i1.Consumer;var i2=rm.createContext(),i5=(i2.Consumer,new iG),i3=i0();function i4(e){var t=nf(e.stylisPlugins),n=t[0],r=t[1],i=nb(i1)||i5,o=ny(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target]),a=ny(function(){return i0({options:{prefix:!e.disableVendorPrefixes},plugins:n})},[e.disableVendorPrefixes,n]);return nm(function(){rL(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]),rm.createElement(i1.Provider,{value:o},rm.createElement(i2.Provider,{value:a},e.children))}var i6=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=i3);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return ix(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=i3),this.name+e.hash},e}(),i8=/([A-Z])/,i7=/([A-Z])/g,i9=/^ms-/,oe=function(e){return"-"+e.toLowerCase()};function ot(e){return i8.test(e)?e.replace(i7,oe).replace(i9,"-ms-"):e}var on=function(e){return null==e||!1===e||""===e};function or(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a<s;a+=1)""!==(i=or(e[a],t,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return on(e)?"":iS(e)?"."+e.styledComponentId:iw(e)?"function"!=typeof e||e.prototype&&e.prototype.isReactComponent||!t?e:or(e(t),t,n,r):e instanceof i6?n?(e.inject(n,r),e.getName(r)):e:iy(e)?function e(t,n){var r,i=[];
1for(var o in t)t.hasOwnProperty(o)&&!on(t[o])&&(Array.isArray(t[o])&&t[o].isCss||iw(t[o])?i.push(ot(o)+":",t[o],";"):iy(t[o])?i.push.apply(i,e(t[o],o)):i.push(ot(o)+": "+(null==(r=t[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in rB?String(r).trim():r+"px")+";"));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString()}var oi=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function oo(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return iw(e)||iy(e)?oi(or(iv(i_,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:oi(or(iv(e,n)))}var oa=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,os=/(^-|-$)/g;function oc(e){return e.replace(oa,"-").replace(os,"")}var ou=function(e){return iV(iZ(e)>>>0)};function ol(e){return"string"==typeof e}var od=function(e){return"function"==typeof e||"object"==tO(e)&&null!==e&&!Array.isArray(e)},of=rm.createContext();function op(e){var t=nb(of),n=ny(function(){var n;return n=e.theme,n?iw(n)?n(t):Array.isArray(n)||"object"!=tO(n)?ix(8):t?ig({},t,{},n):n:ix(14)},[e.theme,t]);return e.children?rm.createElement(of.Provider,{value:n},e.children):null}of.Consumer;var om={},oh=function(e){return function e(t,n,r){if(void 0===r&&(r=ib),!rI.isValidElementType(n))return ix(1,String(n));var i=function(){return t(n,r,oo.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,ig({},r,{},i))},i.attrs=function(i){return e(t,n,ig({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(function e(t,n,r){var i=iS(t),o=!ol(t),a=n.attrs,s=void 0===a?i_:a,c=n.componentId,u=void 0===c?(h=n.displayName,g=n.parentComponentId,om[v="string"!=typeof h?"sc":oc(h)]=(om[v]||0)+1,y=v+"-"+ou("5.3.5"+v+om[v]),g?g+"-"+y:y):c,l=n.displayName,d=void 0===l?ol(t)?"styled."+t:"Styled("+ik(t)+")":l,f=n.displayName&&n.componentId?oc(n.displayName)+"-"+n.componentId:n.componentId||u,p=i&&t.attrs?Array.prototype.concat(t.attrs,s).filter(Boolean):s,m=n.shouldForwardProp;i&&t.shouldForwardProp&&(m=n.shouldForwardProp?function(e,r,i){return t.shouldForwardProp(e,r,i
1)&&n.shouldForwardProp(e,r,i)}:t.shouldForwardProp);var h,g,v,y,_,b=new iJ(r,f,i?t.componentStyle:void 0),w=b.isStatic&&0===s.length,k=function(e,t){return function(e,t,n,r){var i,o,a,s,c,u,l,d=e.attrs,f=e.componentStyle,p=e.defaultProps,m=e.foldedComponentIds,h=e.shouldForwardProp,g=e.styledComponentId,v=e.target,y=(i=nb(of),void 0===(o=p)&&(o=ib),a=t.theme!==o.theme&&t.theme||i||o.theme||ib,void 0===a&&(a=ib),s=ig({},t,{theme:a}),c={},d.forEach(function(e){var t,n,r,i=e;for(t in iw(i)&&(i=i(s)),i)s[t]=c[t]="className"===t?(n=c[t],r=i[t],n&&r?n+" "+r:n||r):i[t]}),[s,c]),_=y[0],b=y[1],w=(u=nb(i1)||i5,l=nb(i2)||i3,r?f.generateAndInjectStyles(ib,u,l):f.generateAndInjectStyles(_,u,l)),k=b.$as||t.$as||b.as||t.as||v,S=ol(k),C=b!==t?ig({},t,{},b):t,E={};for(var O in C)"$"!==O[0]&&"as"!==O&&("forwardedAs"===O?E.as=C[O]:(h?h(O,rU,k):!S||rU(O))&&(E[O]=C[O]));return t.style&&b.style!==t.style&&(E.style=ig({},t.style,{},b.style)),E.className=Array.prototype.concat(m,g,w!==g?w:null,t.className,b.className).filter(Boolean).join(" "),E.ref=n,tU(k,E)}(_,e,t,w)};return k.displayName=d,(_=rm.forwardRef(k)).attrs=p,_.componentStyle=b,_.displayName=d,_.shouldForwardProp=m,_.foldedComponentIds=i?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):i_,_.styledComponentId=f,_.target=i?t.target:t,_.withComponent=function(t){var i=n.componentId,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}(n,["componentId"]),a=i&&i+"-"+(ol(t)?t:oc(ik(t)));return e(t,ig({},o,{attrs:p,componentId:a}),r)},Object.defineProperty(_,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function e(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0;o<r.length;o++){var a=r[o];if(od(a))for(var s in a)"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&function(t,n,r){var i=t[r];od(n)&&od(i)?e(i,n):t[r]=n}(t,a[s],s)}return t}({},t.defaultProps,e):e}}),_.toString=function(){return"."+_.styledComponentId},o&&ih(_,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),_},e)};function og(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=oo.apply(void 0,[e].concat(n)).join("");return new i6(ou(i),i)}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){oh[e]=oh(e)});var ov=function(){return nb(of)},oy={},o_={},ob={exports:{}};r=function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n="boolean"==typeof RegExp().sticky;function r(e){return e&&"[object RegExp]"===t.call(e)}function i(e){return e&&"object"===tO(e)&&!r(e)&&!Array.isArray(e)}function o(e){return e.length?"(?:"+e.map(function(e){return"(?:"+e+")"}).join("|")+")":"(?!)"}function a(e){if("string"==typeof e)return"(?:"+e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+")";if(r(e)){if(e.ignoreCase)throw Error("RegExp /i flag not allowed");if(e.global)throw Error("RegExp /g flag is implied");if(e.sticky)throw Error("RegExp /y flag is implied");
vendor: 8,903 bytes, line 1
1if(e.multiline)throw Error("RegExp /m flag is implied");return e.source}throw Error("Not a pattern: "+e)}function s(e,t){return e.length>t?e:Array(t-e.length+1).join(" ")+e}function c(t,n){if(i(n)||(n={match:n}),n.include)throw Error("Matching rules cannot also include states");var o={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var a in n)e.call(n,a)&&(o[a]=n[a]);if("string"==typeof o.type&&t!==o.type)throw Error("Type transform cannot be a string (type '"+o.type+"' for token '"+t+"')");var s=o.match;return o.match=Array.isArray(s)?s:s?[s]:[],o.match.sort(function(e,t){return r(e)&&r(t)?0:r(t)?-1:r(e)?1:t.length-e.length}),o}function u(e){return Array.isArray(e)?function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.include){for(var i=[].concat(r.include),o=0;o<i.length;o++)t.push({include:i[o]});continue}if(!r.type)throw Error("Rule has no type: "+JSON.stringify(r));t.push(c(r.type,r))}return t}(e):function(e){for(var t=Object.getOwnPropertyNames(e),n=[],r=0;r<t.length;r++){var o=t[r],a=[].concat(e[o]);if("include"===o){for(var s=0;s<a.length;s++)n.push({include:a[s]});continue}var u=[];a.forEach(function(e){i(e)?(u.length&&n.push(c(o,u)),n.push(c(o,e)),u=[]):u.push(e)}),u.length&&n.push(c(o,u))}return n}(e)}var l=c("error",{lineBreaks:!0,shouldThrow:!0});function d(e,t){for(var i=null,s=Object.create(null),c=!0,u=null,d=[],f=[],p=0;p<e.length;p++)e[p].fallback&&(c=!1);for(var p=0;p<e.length;p++){var m=e[p];if(m.include)throw Error("Inheritance is not allowed in stateless lexers");if(m.error||m.fallback){if(i)if(!m.fallback==!i.fallback)throw Error("Multiple "+(m.fallback?"fallback":"error")+" rules not allowed (for token '"+m.defaultType+"')");else throw Error("fallback and error are mutually exclusive (for token '"+m.defaultType+"')");i=m}var h=m.match.slice();if(c)for(;h.length&&"string"==typeof h[0]&&1===h[0].length;)s[h.shift().charCodeAt(0)]=m;if(m.pop||m.push||m.next){if(!t)throw Error("State-switching options are not allowed in stateless lexers (for token '"+m.defaultType+"')");if(m.fallback)throw Error("State-switching options are not allowed on fallback tokens (for token '"+m.defaultType+"')")}if(0!==h.length){c=!1,d.push(m);for(var g=0;g<h.length;g++){var v=h[g];if(r(v)){if(null===u)u=v.unicode;else if(u!==v.unicode&&!1===m.fallback)throw Error("If one rule is /u then all must be")}}var y=o(h.map(a)),_=new RegExp(y);if(_.test(""))throw Error("RegExp matches empty string: "+_);if(RegExp("|"+y).exec("").length-1>0)throw Error("RegExp has capture groups: "+_+"\nUse (?: … ) instead");if(!m.lineBreaks&&_.test("\n"))throw Error("Rule should declare lineBreaks: "+_);f.push("("+y+")")}}var b=i&&i.fallback,w=n&&!b?"ym":"gm";return!0===u&&(w+="u"),{regexp:new RegExp(o(f)+(n||b?"":"|"),w),groups:d,fast:s,error:i||l}}function f(e,t,n){var r=e&&(e.push||e.next);if(r&&!n[r])throw Error("Missing state '"+r+"' (in token '"+e.defaultType+"' of state '"+t+"')");if(e&&e.pop&&1!=+e.pop)throw Error("pop must be 1 (in token '"+e.defaultType+"' of state '"+t+"')")}var p=function(e,t){this.startState=t,this.states=e,this.buffer="",this.stack=[],this.reset()};p.prototype.reset=function(e,t){return this.buffer=e||"",this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:"",this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},p.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},p.prototype.setState=function(e){if(e&&this.state!==e){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},p.prototype.popState=function(){this.setState(this.stack.pop())},p.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var m=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return 0===n[0].length?null:n};function h(){return this.value}if(p.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n<t;n++)if(void 0!==e[n+1])return this.groups[n];throw Error("Cannot find token type for matched text")},p.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText="",t}var n=this.buffer;if(e!==n.length){var r=this.fast[n.charCodeAt(e)];if(r)return this._token(r,n.charAt(e),e);var i=this.re;i.lastIndex=e;var o=m(i,n),a=this.error;if(null==o)return this._token(a,n.slice(e,n.length),e);var r=this._getGroup(o),s=o[0];return a.fallback&&o.index!==e?(this.queuedGroup=r,this.queuedText=s,this._token(a,n.slice(e,o.index),e)):this._token(r,s,e)}},p.prototype._token=function(e,t,n){var r=0;if(e.lineBreaks){var i=/\n/g,o=1;if("\n"===t)r=1;else for(;i.exec(t);)r++,o=i.lastIndex}var a={type:"function"==typeof e.type&&e.type(t)||e.defaultType,value:"function"==typeof e.value?e.value(t):t,text:t,toString:h,offset:n,lineBreaks:r,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=r,0!==r?this.col=s-o+1:this.col+=s,e.shouldThrow)throw Error(this.formatError(a,"invalid syntax"));return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),a},"u">typeof Symbol&&Symbol.iterator){var g=function(e){this.lexer=e};g.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},g.prototype[Symbol.iterator]=function(){return this},p.prototype[Symbol.iterator]=function(){return new g(this)}}return p.prototype.formatError=function(e,t){if(null==e)var n=this.buffer.slice(this.index),e={text:n,offset:this.index,lineBreaks:+(-1!==n.indexOf("\n")),line:this.line,col:this.col};var r=Math.max(e.line-2,1),i=String(e.line+2).length,o=(function(e,t){for(var n=e.length,r=0;;){var i=e.lastIndexOf("\n",n-1);if(-1===i)break;if(r++,n=i,r===t||0===n)break}var o=r<t?0:n+1;return e.substring(o).split("\n")})(this.buffer,this.line-e.line+2+1).slice(0,5),a=[];a.push(t+" at line "+e.line+" col "+e.col+":"),a.push("");for(var c=0;c<o.length;c++){var u=o[c],l=r+c;a.push(s(String(l),i)+"  "+u),l===e.line&&a.push(s("",i+e.col+1)+"^")}return a.join("\n")},p.prototype.clone=function(){return new p(this.states,this.state)},p.prototype.has=function(e){return!0},{compile:function(e){return new p({start:d(u(e))},"start")},states:function(e,t){var n=e.$all?u(e.$all):[];delete e.$all;var r=Object.getOwnPropertyNames(e);t||(t=r[0]);for(var i=Object.create(null),o=0;o<r.length;o++){var a=r[o];i[a]=u(e[a]).concat(n)}for(var o=0;o<r.length;o++)for(var a=r[o],s=i[a],c=Object.create(null),l=0;l<s.length;l++){var m=s[l];if(m.include){var h=[l,1];if(m.include!==a&&!c[m.include]){c[m.include]=!0;var g=i[m.include];if(!g)throw Error("Cannot include nonexistent state '"+m.include+"' (in state '"+a+"')");for(var v=0;v<g.length;v++){var y=g[v];-1===s.indexOf(y)&&h.push(y)}}s.splice.apply(s,h),l--}}for(var _=Object.create(null),o=0;o<r.length;o++){var a=r[o];_[a]=d(i[a],!0)}for(var o=0;o<r.length;o++){for(var b=r[o],w=_[b],k=w.groups,l=0;l<k.length;l++)f(k[l],b,_);for(var S=Object.getOwnPropertyNames(w.fast),l=0;l<S.length;l++)f(w.fast[S[l]],b,_)}return new p(_,t)},error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:function(e){for(var t="u">typeof Map,n=t?new Map:Object.create(null),r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var o=r[i],a=e[o];(Array.isArray(a)?a:[a]).forEach(function(e){if("string"!=typeof e)throw Error("keyword must be string (in keyword '"+o+"')");t?n.set(e,o):n[e]=o})}return function(e){return t?n.get(e):n[e]}}}},ob.exports?ob.exports=r():rg.moo=r();var ow=ob.exports;i=rg&&rg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(o_,"__esModule",{value:!0}),o_.lexer=o_.states=void 0,o=i(ow),o_.states={body:{doubleapos:{match:"''",value:function(){return"'"}},quoted:{lineBreaks:!0,match:/'[#\{\}](?:(?:[\0-&\(-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|'')*'(?!')/,value:function(e){return e.slice(1,-1).replace(/''/g,"'")}},argument:{lineBreaks:!0,match:/\{[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[\0-\x08\x0E-\x1F0-9A-Z_a-z\x7F-\x84\x86-\xA0\xA8\xAA\xAD\xAF\xB2-\xB5\xB7-\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u200D\u202A-\u202F\u203F\u2040\u2054\u205F-\u218F\u2460-\u24FF\u2776-\u2793\u2C00-\u2DFF\u2E80-\u3000\u3004-\u3007\u3021-\u302F\u3031-\uD7FF\uE000-\uFD3D\uFD40-\uFE44\uFE47-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*/,push:"arg",value:function(e){return e.substring(1).trim()}}
1,octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/(?:[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])(?:[\0-"\$-&\(-z\|~-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*/}},arg:{select:{lineBreaks:!0,match:/,[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:plural|select|selectordinal)[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*/,next:"select",value:function(e){return e.split(",")[1].trim()}},"func-args":{lineBreaks:!0,match:/,[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[\0-\x08\x0E-\x1F0-9A-Z_a-z\x7F-\x84\x86-\xA0\xA8\xAA\xAD\xAF\xB2-\xB5\xB7-\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u200D\u202A-\u202F\u203F\u2040\u2054\u205F-\u218F\u2460-\u24FF\u2776-\u2793\u2C00-\u2DFF\u2E80-\u3000\u3004-\u3007\u3021-\u302F\u3031-\uD7FF\uE000-\uFD3D\uFD40-\uFE44\uFE47-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,/,next:"body",value:function(e){return e.split(",")[1].trim()}},"func-simple":{lineBreaks:!0,match:/,[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[\0-\x08\x0E-\x1F0-9A-Z_a-z\x7F-\x84\x86-\xA0\xA8\xAA\xAD\xAF\xB2-\xB5\xB7-\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u200D\u202A-\u202F\u203F\u2040\u2054\u205F-\u218F\u2460-\u24FF\u2776-\u2793\u2C00-\u2DFF\u2E80-\u3000\u3004-\u3007\u3021-\u302F\u3031-\uD7FF\uE000-\uFD3D\uFD40-\uFE44\uFE47-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*/,value:function(e){return e.substring(1).trim()}},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*offset[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*[0-9]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*/,value:function(e){return e.split(":")[1].trim()}},case:{lineBreaks:!0,match:/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:=[0-9]+|(?:[\0-\x08\x0E-\x1F0-9A-Z_a-z\x7F-\x84\x86-\xA0\xA8\xAA\xAD\xAF\xB2-\xB5\xB7-\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u200D\u202A-\u202F\u203F\u2040\u2054\u205F-\u218F\u2460-\u24FF\u2776-\u2793\u2C00-\u2DFF\u2E80-\u3000\u3004-\u3007\u3021-\u302F\u3031-\uD7FF\uE000-\uFD3D\uFD40-\uFE44\uFE47-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\{/,push:"body",value:function(e){return e.substring(0,e.indexOf("{")).trim()}},end:{match:/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\}/,pop:1}}},o_.lexer=o.default.states(o_.states),Object.defineProperty(oy,"__esModule",{value:!0}),oy.ParseError=void 0;var ok=oy.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new oP(e,t).parse()},oS=function(e){return{offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}},oC=function(e){return"plural"===e||"select"===e||"selectordinal"===e},oE=["number","date","time","spellout","ordinal","duration"],oO=["zero","one","two","few","many","other"],ox=function(e){function t(e,n){return tg(this,t),tv(this,t,[o_.lexer.formatError(e,n)])}return ty(t,e),tm(t)}(t_(Error));oy.ParseError=ox;var oP=tm(function e(t,n){var r,i,o,a;tg(this,e),this.lexer=o_.lexer.reset(t),this.cardinalKeys=null!=(r=null==n?void 0:n.cardinal)?r:oO,this.ordinalKeys=null!=(i=null==n?void 0:n.ordinal)?i:oO,this.strict=null!=(o=null==n?void 0:n.strict)&&o,this.strictPluralKeys=null==(a=null==n?void 0:n.strictPluralKeys)||a},[{key:"parse",value:function(){return this.parseBody(!1,!0)}},{key:"checkSelectKey",value:function(e,t,n){if("="===n[0]){if("select"===t)throw new ox(e,"The case ".concat(n," is not val
1id with select"))}else if("select"!==t){var r="plural"===t?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&r.length>0&&!r.includes(n))throw new ox(e,"The ".concat(t," case ").concat(n," is not valid in this locale"))}}},{key:"parseSelect",value:function(e,t,n,r){var i={type:r,arg:e.value,cases:[],ctx:n};"plural"===r||"selectordinal"===r?t=!0:this.strict&&(t=!1);var o,a=tS(this.lexer);try{for(a.s();!(o=a.n()).done;){var s=o.value;switch(s.type){case"offset":if("select"===r)throw new ox(s,"Unexpected plural offset for select");if(i.cases.length>0)throw new ox(s,"Plural offset must be set before cases");i.pluralOffset=Number(s.value),n.text+=s.text,n.lineBreaks+=s.lineBreaks;break;case"case":this.checkSelectKey(s,r,s.value),i.cases.push({key:s.value,tokens:this.parseBody(t),ctx:oS(s)});break;case"end":return i;default:throw new ox(s,"Unexpected lexer token: ".concat(s.type))}}}catch(e){a.e(e)}finally{a.f()}throw new ox(null,"Unexpected message end")}},{key:"parseArgToken",value:function(e,t){var n=oS(e),r=this.lexer.next();if(!r)throw new ox(null,"Unexpected message end");if(n.text+=r.text,n.lineBreaks+=r.lineBreaks,this.strict&&("func-simple"===r.type||"func-args"===r.type)&&!oE.includes(r.value))throw new ox(e,"Invalid strict mode function arg type: ".concat(r.value));switch(r.type){case"end":return{type:"argument",arg:e.value,ctx:n};case"func-simple":var i=this.lexer.next();if(!i)throw new ox(null,"Unexpected message end");if("end"!==i.type)throw new ox(i,"Unexpected lexer token: ".concat(i.type));if(n.text+=i.text,oC(r.value.toLowerCase()))throw new ox(r,"Invalid type identifier: ".concat(r.value));return{type:"function",arg:e.value,key:r.value,ctx:n};case"func-args":if(oC(r.value.toLowerCase())){var o="Invalid type identifier: ".concat(r.value);throw new ox(r,o)}var a=this.parseBody(!this.strict&&t);return this.strict&&a.length>0&&(a=function(e,t){var n,r="",i="",o=tS(t);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.ctx.text;switch(i+=s,a.type){case"content":r+=a.value;break;case"argument":case"function":case"octothorpe":r+=s;break;default:throw new ox(e,"Unsupported part in strict mode function arg style: ".concat(s))}}}catch(e){o.e(e)}finally{o.f()}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:i})}]}(e,a)),{type:"function",arg:e.value,key:r.value,param:a,ctx:n};case"select":if(oC(r.value))return this.parseSelect(e,t,n,r.value);throw new ox(r,"Unexpected select type ".concat(r.value));default:throw new ox(r,"Unexpected lexer token: ".concat(r.type))}}},{key:"parseBody",value:function(e,t){var n,r=[],i=null,o=tS(this.lexer);try{for(o.s();!(n=o.n()).done;){var a=n.value;if("argument"===a.type)i&&(i=null),r.push(this.parseArgToken(a,e));else if("octothorpe"===a.type&&e)i&&(i=null),r.push({type:"octothorpe",ctx:oS(a)});else{if("end"===a.type&&!t)return r;var s=a.value;if(!e&&"quoted"===a.type&&"#"===s[0]){if(s.includes("{")){var c="Unsupported escape pattern: ".concat(s);throw new ox(a,c)}s=a.text}i?(i.value+=s,i.ctx.text+=a.text,i.ctx.lineBreaks+=a.lineBreaks):(i={type:"content",value:s,ctx:oS(a)},r.push(i))}}}catch(e){o.e(e)}finally{o.f()}if(t)return r;throw new ox(null,"Unexpected message end")}}]),oA=function(e){function t(e,n,r){var i;return tg(this,t),(i=tv(this,t,[e])).token=n,i.type=r||"error",i}return ty(t,e),tm(t)}(t_(Error)),oT=function(e){return e<4?"short":4===e?"long":"narrow"},oD=function(e){return e%2==0?"2-digit":"numeric"},oF={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},oj=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"};function oR(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};try{return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return function e(t,n){return t.filter(function(e){return"content"!==e.type}).length?t.map(function(t){if("content"===t.type)return n(t.value);if("octothorpe"===t.type)return"#";if("argument"===t.type)return[t.arg];if("function"===t.type){var r,i=null==t||null==(r=t.param)?void 0:r[0];if("date"===t.key&&i){var o,a,s=(o=i.value.trim(),a=function(e){throw Error("Unable to compile date expression: ".concat(e.message))},/^::/.test(o)?function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){throw e},i={timeZone:t},o=[],a=tS(e);try{for(a.s();!(n=a.n()).done;)!function(){var e=n.value,t=e.error,a=e.field,s=e.str;if(t){var c=new oA(t.message,e);c.stack=t.stack,r(c)}s&&r(new oA("Ignoring string part: ".concat(s),e,oA.WARNING)),a&&(-1===o.indexOf(a)?o.push(a):r(new oA("Duplicate ".concat(a," token"),e)));var u=function(e,t){switch(e.field){case"era":return{era:oT(e.width)};case"year":switch(e.char){case"y":return{year:oD(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t("".concat(e.desc," is not supported; falling back to year:numeric"),oA.WARNING),{year:"numeric"}}case"month":return{month:function(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:t("".concat(e.desc," is not supported with width ").concat(e.width));return}}(e,t)};case"day":return{day:(n=e.char,r=e.desc,i=e.width,"d"===n?oD(i):void t("".concat(r," is not supported")))};
1case"weekday":return{weekday:(o=e.char,a=e.desc,s=e.width,("c"===o||"e"===o)&&s<3&&t("Numeric value is not supported for ".concat(a,"; falling back to weekday:short"),oA.WARNING),oT(s))};case"period":break;case"hour":var n,r,i,o,a,s,c,u=oD(e.width);switch(e.char){case"h":c="h12";break;case"H":c="h23";break;case"k":c="h24";break;case"K":c="h11"}return c?{hour:u,hourCycle:c}:{hour:u};case"min":return{minute:oD(e.width)};case"sec":return{second:oD(e.width)};case"tz":return{timeZoneName:function(e,t){var n=e.char,r=e.desc,i=e.width;switch(n){case"v":case"z":return 4===i?"long":"short";case"V":if(4===i)return"long";t("".concat(r," is not supported with width ").concat(i));return;case"X":t("".concat(r," is not supported"));return}return"short"}(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t("".concat(e.desc," is not supported"))}}(e,function(t,n){return r(new oA(t,e,n))});u&&Object.assign(i,u)}()}catch(e){a.e(e)}finally{a.f()}return i}(function(e){for(var t=[],n=0;;){var r=function(e,t){var n=e[t];if(!n)return null;if(oj(n)){for(var r=t,i=e[r],o=1;e[++r]===i;)++o;var a=oF[i];return a?{char:i,field:a.field,desc:a.desc,width:o}:{char:i,error:Error("The letter ".concat(i," is not a valid field identifier")),width:o}}if("'"===n){var s=t,c=e[++s],u=2;if("'"===c)return{char:"'",str:c,width:u};for(;;){var l=e[++s];if(++u,void 0===l)return{char:"'",error:Error("Unterminated quoted literal in pattern: ".concat(c||e)),str:c,width:u};if("'"===l)if("'"!==e[++s])return{char:"'",str:c,width:u};else++u;c+=l}return}for(var d=n,f=1;;){var p=e[++t];if(!p||oj(p)||"'"===p)return{char:n,str:d,width:f};d+=p,f+=1}}(e,n);if(!r)return t;
1t.push(r),n+=r.width}}(o.substring(2)),void 0,a):o);return[t.arg,t.key,s]}return i?[t.arg,t.key,i.value.trim()]:[t.arg,t.key]}var c=t.pluralOffset,u={};return t.cases.forEach(function(t){var r=t.key,i=t.tokens;u["="===r[0]?r.slice(1):r]=e(i,n)}),[t.arg,t.type,tf({offset:c},u)]}):t.map(function(e){return n(e.value)})}(ok(e),t)}(e,t)}catch(t){return console.error("".concat(t.message," \n\nMessage: ").concat(e)),[e]}}var oz=function(e){return"string"==typeof e},oI=new Map;function oL(e){var t;return[].concat(function(e){if(Array.isArray(e))return tE(e)}(t=Array.isArray(e)?e:[e])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||tC(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),["en"])}function oM(e,t,n){var r,i=oL(e);if(n||(n="default"),"string"==typeof n)switch(r={day:"numeric",month:"short",year:"numeric"},n){case"full":r.weekday="long";case"long":r.month="long";break;case"short":r.month="numeric"}else r=n;return oU(function(){return oH("date",i,n)},function(){return new Intl.DateTimeFormat(i,r)}).format(oz(t)?new Date(t):t)}function oB(e,t,n){var r=oL(e);return oU(function(){return oH("number",r,n)},function(){return new Intl.NumberFormat(r,n)}).format(t)}function oN(e,t,n,r){var i,o,a=r.offset,s=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,to),c=oL(e),u=t?oU(function(){return oH("plural-ordinal",c)},function(){return new Intl.PluralRules(c,{type:"ordinal"})}):oU(function(){return oH("plural-cardinal",c)},function(){return new Intl.PluralRules(c,{type:"cardinal"})});return null!=(i=null!=(o=s[n])?o:s[u.select(n-(void 0===a?0:a))])?i:s.other}function oU(e,t){var n=e(),r=oI.get(n);return r||(r=t(),oI.set(n,r)),r}function oH(e,t,n){var r=t.join("-");return"".concat(e,"-").concat(r,"-").concat(JSON.stringify(n))}var oK=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,oG=function(e){return e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,function(e,t,n){return t?String.fromCharCode(parseInt(t,16)):String.fromCharCode(parseInt(n,16))})},oW="%__lingui_octothorpe__%",oq=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t||e,i=function(e){return"object"===tO(e)?e:n[e]},o=function(e,t){var o=oB(r,e,Object.keys(n).length?i("number"):void 0);return t.replace(RegExp(oW,"g"),o)};return{plural:function(e,t){var n=t.offset,i=oN(r,!1,e,t);return o(e-(void 0===n?0:n),i)},selectordinal:function(e,t){var n=t.offset,i=oN(r,!0,e,t);return o(e-(void 0===n?0:n),i)},select:oV,number:function(e,t){return oB(r,e,i(t)||{style:t})},date:function(e,t){return oM(r,e,i(t)||t)},time:function(e,t){var n,o=i(t)||t;if(o||(o="default"),"string"==typeof o)switch(n={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":n.timeZoneName="short";break;case"short":delete n.second}else n=o;return oM(r,e,n)}}},oV=function(e,t){var n;return null!=(n=t[e])?n:t.other},o$=Object.defineProperty,oZ=function(e,t,n){var r;return(r=t+"")in e?o$(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n},oY=tm(function e(){tg(this,e),oZ(this,"_events",{})},[{key:"on",value:function(e,t){var n,r=this;return null!=(n=this._events)[e]||(n[e]=[]),this._events[e].push(t),function(){return r.removeListener(e,t)}}},{key:"removeListener",value:function(e,t){var n=this._getListeners(e);if(n){var r=n.indexOf(t);~r&&n.splice(r,1)}}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=this._getListeners(e);o&&o.map(function(e){return e.apply(t,r)})}},{key:"_getListeners",value:function(e){var t=this._events[e];return!!Array.isArray(t)&&t}}]),oJ=Object.defineProperty,oQ=function(e,t,n){var r;return r="symbol"!==tO(t)?t+"":t,r in e?oJ(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n},oX=function(e){function t(e){var n,r;return tg(this,t),oQ(n=tv(this,t),"_locale",""),oQ(n,"_locales"),oQ(n,"_localeData",{}),oQ(n,"_messages",{}),oQ(n,"_missing"),oQ(n,"_messageCompiler"),oQ(n,"t",n._.bind(n)),null!=e.missing&&(n._missing=e.missing),null!=e.messages&&n.load(e.messages),null!=e.localeData&&n.loadLocaleData(e.localeData),("string"==typeof e.locale||e.locales)&&n.activate(null!=(r=e.locale)?r:"en",e.locales),n}return ty(t,e),tm(t,[{key:"locale",get:function(){return this._locale}},{key:"locales",get:function(){return this._locales}},{key:"messages",get:function(){var e;return null!=(e=this._messages[this._locale])?e:{}}},{key:"localeData",get:function(){var e;return null!=(e=this._localeData[this._locale])?e:{}}},{key:"_loadLocaleData",value:function(e,t){var n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}},{key:"setMessagesCompiler",value:function(e){return this._messageCompiler=e,this}},{key:"loadLocaleData",value:function(e,t){var n=this;"string"==typeof e?this._loadLocaleData(e,t):Object.keys(e).forEach(function(t){return n._loadLocaleData(t,e[t])}
1),this.emit("change")}},{key:"_load",value:function(e,t){var n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}},{key:"load",value:function(e,t){var n=this;"string"==typeof e&&"object"===tO(t)?this._load(e,t):Object.entries(e).forEach(function(e){var t=tl(e,2),r=t[0],i=t[1];return n._load(r,i)}),this.emit("change")}},{key:"loadAndActivate",value:function(e){var t=e.locale,n=e.locales,r=e.messages;this._locale=t,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}},{key:"activate",value:function(e,t){this._locale=e,this._locales=t,this.emit("change")}},{key:"_",value:function(e,t,n){if(!this.locale)throw Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");var r,i,o,a=null==n?void 0:n.message;e||(e=""),oz(e)||(t=e.values||t,a=e.message,e=e.id);var s=this.messages[e],c=void 0===s,u=this._missing;if(u&&c)return"function"==typeof u?u(this._locale,e):u;c&&this.emit("missing",{id:e,locale:this._locale});var l=s||a||e;return(oz(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn("Uncompiled message detected! Message:\n\n> ".concat(l,"\n\nThat means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.\nICU features such as interpolation and plurals will not work properly for that message. \n\nPlease compile your catalog first. \n"))),oz(l)&&oK.test(l))?oG(l):oz(l)?l:(r=l,i=this._locale,o=this._locales,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=oq(i,o,t),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(t)?t.reduce(function(t,i){if("#"===i&&r)return t+oW;if(oz(i))return t+i;var o,s=tl(i,3),c=s[0],u=s[1],l=s[2],d={};return("plural"===u||"selectordinal"===u||"select"===u?Object.entries(l).forEach(function(e){var t=tl(e,2),n=t[0],r=t[1];d[n]=a(r,"plural"===u||"selectordinal"===u)}):d=l,null==(o=u?(0,n[u])(e[c],d):e[c]))?t:t+o},""):t},s=a(r);return oz(s)&&oK.test(s)?oG(s):oz(s)?s:s?String(s):""})(t,null==n?void 0:n.formats)}},{key:"date",value:function(e,t){return oM(this._locales||this._locale,e,t)}},{key:"number",value:function(e,t){return oB(this._locales||this._locale,e,t)}}])}(oY);function o0(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new oX(e)}o0();var o1=/<([a-zA-Z0-9]+)>([\s\S]*?)<\/\1>|<([a-zA-Z0-9]+)\/>/,o2={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},o5=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(){return"".concat(t,"_").concat(e++)}};function o3(e){var t=e.render,n=e.component,r=e.id,i=e.message,o=e.formats,a=e.lingui,s=a.i18n,c=a.defaultComponent,u=tf({},e.values),l=tf({},e.components);Object.keys(u).forEach(function(e){var t=Object.keys(l).length;"string"!=typeof u[e]&&"number"!=typeof u[e]&&(l[t]=rm.createElement(rm.Fragment,null,u[e]),u[e]="<".concat(t,"/>"))});var d=s&&"function"==typeof s._?s._(r,u,{message:i,formats:o}):r,f=d?function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o5(0,"$lingui$"),i=t.split(o1);if(1===i.length)return t;var o=[],a=i.shift();a&&o.push(a);var s,c=tS(function e(t){if(!t.length)return[];var n=tl(t.slice(0,4),4),r=n[0],i=n[1],o=n[2];return[[r||o,i||"",n[3]]].concat(e(t.slice(4,t.length)))}(i));try{for(c.s();!(s=c.n()).done;){var u=tl(s.value,3),l=u[0],d=u[1],f=u[2],p=void 0!==l?n[l]:void 0;(!p||o2[p.type]&&d)&&(p?console.error("".concat(p.type," is a void element tag therefore it must have no children")):console.error("Can't use element at index '".concat(l,"' as it is not declared in the original translation")),p=rm.createElement(rm.Fragment)),Array.isArray(p)&&(p=rm.createElement(rm.Fragment,{},p)),o.push(rm.cloneElement(p,{key:r()},d?e(d,n):p.props.children)),f&&o.push(f)}}catch(e){c.e(e)}finally{c.f()}return 1===o.length?o[0]:o}(d,l):null;if(null===t||null===n)return f;var p=c||o4,m={id:r,message:i,translation:f,children:f};if(t&&n)console.error("You can't use both `component` and `render` prop at the same time. `component` is ignored.");else if(t&&"function"!=typeof t)console.error("Invalid value supplied to prop `render`. It must be a function, provided ".concat(t));else if(n&&"function"!=typeof n)return console.error("Invalid value supplied to prop `component`. It must be a React component, provided ".concat(n)),rm.createElement(p,m,f);if("function"==typeof t)return t(m);var h=n||p;return rm.createElement(h,m,f)}var o4=function(e){var t=e.children;return rm.createElement(rm.Fragment,null,t)},o6=rm.createContext(null),o8=function(e){return rm.useContext(o6)};function o7(){return o8()}function o9(e){var t=e.i18n,n=e.defaultComponent,r=e.children,i=rm.useRef(t.locale),o=rm.useCallback(function(){return{i18n:t,defaultComponent:n,_:t.t.bind(t)}},[t,n]),a=tl(rm.useState(o()),2),s=a[0],c=a[1];return(rm.useEffect(function(){var e=function(){i.current=t.locale,c(o())},n=t.on("change",e);return i.current!==t.locale&&e(),n},[t,o]),i.current)?rm.createElement(o6.Provider,{value:s},r):null}function ae(e){var t=o8();return rm.createElement(o3,tf(tf({},e),{},{lingui:t}))}var at=function(e){var t=e.children,n=e.messages,r=e.overrides,i=ny(function(){return Object.assign(Object.assign({},n),r)},[n,r]),o=tl(nf(function(){var e=o0({locale:"en",messages:{en:i}});return e.setMessagesCompiler(oR),e}),1)[0];return nm(function(){o.load({en:i})},[o,i]),rm.createElement(o9,{i18n:o},t)},an="<div data-prompt_parent_id='g_id_onload' id='google-parent-prompt' style=''></div>";function ar(e,t){return"u"<typeof window?function(){return null}:function(n){var r;return(null==(r=n.config)?void 0:r.enableShadowDOM)?new(function(e,t){var n=customElements.get(t);if(n)return n;var r=function(t){function n(e){var t;return tg(this,n),(t=tv(this,n)).props=e,t.rootRef=t.attachShadow({mode:"open"}),t}
1return ty(n,t),tm(n,[{key:"connectedCallback",value:function(){this.styleSlot=document.createElement("section"),this.rootRef.appendChild(this.styleSlot),this.mountPoint=document.createElement("span"),this.styleSlot.appendChild(this.mountPoint),this.render(this.props)}},{key:"disconnectedCallback",value:function(){this.mountPoint&&rm.unmountComponentAtNode(this.mountPoint)}},{key:"renderOneTap",value:function(e){var t,n,r,i=null==(r=null==(n=null==(t=null==e?void 0:e.config)?void 0:t.oauthOptions)?void 0:n.providers)?void 0:r.find(function(e){return e.type===ti.O.Google&&e.one_tap}),o=this.innerHTML.includes(an);i?o||(this.innerHTML=an):this.innerHTML=""}},{key:"render",value:function(t){if(!this.mountPoint)throw Error("Cannot render - no mount point defined");if(!this.styleSlot)throw Error("Cannot render - no style slot defined");this.renderOneTap(t),rm.render(rm.createElement(i4,{target:this.styleSlot},rm.createElement(e,Object.assign({},t))),this.mountPoint)}}])}(t_(HTMLElement));return customElements.define(t,r),r}(e,t))(n):new(function(e,t){var n=customElements.get(t);if(n)return n;var r=function(t){function n(e){var t;return tg(this,n),(t=tv(this,n)).props=e,t.rootRef=document.createElement("div"),t.append(t.rootRef),t}return ty(n,t),tm(n,[{key:"connectedCallback",value:function(){this.styleSlot=document.createElement("section"),this.rootRef.appendChild(this.styleSlot),this.mountPoint=document.createElement("span"),this.styleSlot.appendChild(this.mountPoint),this.render(this.props)}},{key:"disconnectedCallback",value:function(){this.mountPoint&&rm.unmountComponentAtNode(this.mountPoint)}},{key:"render",value:function(t){if(!this.mountPoint)throw Error("Cannot render - no mount point defined");if(!this.styleSlot)throw Error("Cannot render - no style slot defined");rm.render(rm.createElement(i4,{target:this.styleSlot},rm.createElement(e,Object.assign({},t))),this.mountPoint)}}])}(t_(HTMLElement));return customElements.define(t,r),r}(e,t))(n)}}var ai=function(e){return!!e},ao={exports:{}};ao.exports,function(e,t){var n,r,i,o,a,s,c,u,l,d,f,p="__lodash_hash_undefined__",m="[object Arguments]",h="[object Function]",g="[object Object]",v=/^\[object .+?Constructor\]$/,y=/^(?:0|[1-9]\d*)$/,_={};_["[object Float32Array]"]=_["[object Float64Array]"]=_["[object Int8Array]"]=_["[object Int16Array]"]=_["[object Int32Array]"]=_["[object Uint8Array]"]=_["[object Uint8ClampedArray]"]=_["[object Uint16Array]"]=_["[object Uint32Array]"]=!0,_[m]=_["[object Array]"]=_["[object ArrayBuffer]"]=_["[object Boolean]"]=_["[object DataView]"]=_["[object Date]"]=_["[object Error]"]=_[h]=_["[object Map]"]=_["[object Number]"]=_[g]=_["[object RegExp]"]=_["[object Set]"]=_["[object String]"]=_["[object WeakMap]"]=!1;var b="object"==tO(rg)&&rg&&rg.Object===Object&&rg,w=("u"<typeof self?"undefined":tO(self))=="object"&&self&&self.Object===Object&&self,k=b||w||Function("return this")(),S=t&&!t.nodeType&&t,C=S&&e&&!e.nodeType&&e,E=C&&C.exports===S,O=E&&b.process,x=function(){try{var e=C&&C.require&&C.require("util").types;if(e)return e;return O&&O.binding&&O.binding("util")}catch(e){}}(),P=x&&x.isTypedArray,A=Array.prototype,T=Function.prototype,D=Object.prototype,F=k["__core-js_shared__"],j=T.toString,R=D.hasOwnProperty,z=(c=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",I=D.toString,L=j.call(Object),M=RegExp("^"+j.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=E?k.Buffer:void 0,N=k.Symbol,U=k.Uint8Array;B&&B.allocUnsafe;var H=(u=Object.getPrototypeOf,l=Object,function(e){return u(l(e))}),K=Object.create,G=D.propertyIsEnumerable,W=A.splice,q=N?N.toStringTag:void 0,V=function(){try{var e=ed(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),$=B?B.isBuffer:void 0,Z=Math.max,Y=Date.now,J=ed(k,"Map"),Q=ed(Object,"create"),X=function(){function e(){}return function(t){if(!eS(t))return{};if(K)return K(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function en(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function er(e){var t=this.__data__=new et(e);this.size=t.size}
vendor: 6,633 bytes, line 1
1function ei(e,t,n){(void 0===n||eg(e[t],n))&&(void 0!==n||t in e)||ea(e,t,n)}function eo(e,t){for(var n=e.length;n--;)if(eg(e[n][0],t))return n;return -1}function ea(e,t,n){"__proto__"==t&&V?V(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===p?void 0:n}return R.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:R.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Q&&void 0===t?p:t,this},et.prototype.clear=function(){this.__data__=[],this.size=0},et.prototype.delete=function(e){var t=this.__data__,n=eo(t,e);return!(n<0)&&(n==t.length-1?t.pop():W.call(t,n,1),--this.size,!0)},et.prototype.get=function(e){var t=this.__data__,n=eo(t,e);return n<0?void 0:t[n][1]},et.prototype.has=function(e){return eo(this.__data__,e)>-1},et.prototype.set=function(e,t){var n=this.__data__,r=eo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},en.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(J||et),string:new ee}},en.prototype.delete=function(e){var t=el(this,e).delete(e);return this.size-=!!t,t},en.prototype.get=function(e){return el(this,e).get(e)},en.prototype.has=function(e){return el(this,e).has(e)},en.prototype.set=function(e,t){var n=el(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},er.prototype.clear=function(){this.__data__=new et,this.size=0},er.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},er.prototype.get=function(e){return this.__data__.get(e)},er.prototype.has=function(e){return this.__data__.has(e)},er.prototype.set=function(e,t){var n=this.__data__;if(n instanceof et){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new en(r)}return n.set(e,t),this.size=n.size,this};var es=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};function ec(e){var t;return null==e?void 0===e?"[object Undefined]":"[object Null]":q&&q in Object(e)?function(e){var t=R.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var i=I.call(e);return r&&(t?e[q]=n:delete e[q]),i}(e):(t=e,I.call(t))}function eu(e){return eC(e)&&ec(e)==m}function el(e,t){var n,r,i=e.__data__;return("string"==(r=tO(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ed(e,t){var n,r=null==e?void 0:e[t];return!(!eS(r)||(n=r,z&&z in n))&&(ew(r)?M:v).test(function(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(r))?r:void 0}function ef(e,t){var n=tO(e);return!!(t=null==t?0x1fffffffffffff:t)&&("number"==n||"symbol"!=n&&y.test(e))&&e>-1&&e%1==0&&e<t}function ep(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||D)}function em(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var eh=(n=V?function(e,t){var n;return V(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0})}:ex,r=0,i=0,function(){var e=Y(),t=16-(e-i);if(i=e,t>0){if(++r>=800)return arguments[0]}else r=0;return n.apply(void 0,arguments)});function eg(e,t){return e===t||e!=e&&t!=t}var ev=eu(function(){return arguments}())?eu:function(e){return eC(e)&&R.call(e,"callee")&&!G.call(e,"callee")},ey=Array.isArray;function e_(e){return null!=e&&ek(e.length)&&!ew(e)}var eb=$||function(){return!1};function ew(e){if(!eS(e))return!1;var t=ec(e);return t==h||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ek(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eS(e){var t=tO(e);return null!=e&&("object"==t||"function"==t)}function eC(e){return null!=e&&"object"==tO(e)}var eE=P?function(e){return P(e)}:function(e){return eC(e)&&ek(e.length)&&!!_[ec(e)]};function eO(e){return e_(e)?function(e){var t=ey(e),n=!t&&ev(e),r=!t&&!n&&eb(e),i=!t&&!n&&!r&&eE(e),o=t||n||r||i,a=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=a.length;for(var c in e)o&&("length"==c||r&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ef(c,s))||a.push(c);return a}(e):function(e){if(!eS(e)){var t=e,n=[];if(null!=t)for(var r in Object(t))n.push(r);return n}var i=ep(e),o=[];for(var a in e)"constructor"==a&&(i||!R.call(e,a))||o.push(a);return o}(e)}function ex(e){return e}e.exports=(d=function(e,t,n){!function e(t,n,r,i,o){t!==n&&es(n,function(a,s){if(o||(o=new er),eS(a))!function(e,t,n,r,i,o,a){var s=em(e,n),c=em(t,n),u=a.get(c);if(u)return ei(e,n,u);var l=o?o(s,c,n+"",e,t,a):void 0,d=void 0===l;if(d){var f,p,m,h,v,y,_,b=ey(c),w=!b&&eb(c),k=!b&&!w&&eE(c);l=c,b||w||k?ey(s)?l=s:eC(f=s)&&e_(f)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):w?(d=!1,l=c.slice()):k?(d=!1,v=(new U(h=new(m=(p=c).buffer).constructor(m.byteLength)).set(new U(m)),h),l=new p.constructor(v,p.byteOffset,p.length)):l=[]:function(e){if(!eC(e)||ec(e)!=g)return!1;var t=H(e);if(null===t)return!0;var n=R.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&j.call(n)==L}(c)||ev(c)?(l=s,ev(s)?l=function(e,t,n){var r=!n;n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],s=void 0;void 0===s&&(s=e[a]),r?ea(n,a,s):function(e,t,n){var r=e[t];R.call(e,t)&&eg(r,n)&&(void 0!==n||t in e)||ea(e,t,n)}(n,a,s)}return n}(y=s,eO(y)):(!eS(s)||ew(s))&&(l="function"!=typeof(_=c).constructor||ep(_)?{}:X(H(_)))):d=!1}d&&(a.set(c,l),i(l,c,r,o,a),a.delete(c)),ei(e,n,l)}(t,n,s,r,e,i,o);else{var c=i?i(em(t,s),a,s+"",t,n,o):void 0;void 0===c&&(c=a),ei(t,s,c)}},eO)}(e,t,n)},eh((o=f=function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=d.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!eS(n))return!1;var r=tO(t);return("number"==r?!!(e_(n)&&ef(t,n.length)):"string"==r&&t in n)&&eg(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&d(e,a,n)}return e},a=void 0,s=ex,a=Z(void 0===a?o.length-1:a,0),function(){for(var e=arguments,t=-1,n=Z(e.length-a,0),r=Array(n);++t<n;)r[t]=e[a+t];t=-1;for(var i=Array(a+1);++t<a;)i[t]=e[t];i[a]=s(r);switch(i.length){case 0:return o.call(this);case 1:return o.call(this,i[0]);case 2:return o.call(this,i[0],i[1]);case 3:return o.call(this,i[0],i[1],i[2])}return o.apply(this,i)}),f+""))}
1(ao,ao.exports);var aa=rv(ao.exports),as={exports:{}},ac={},au=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(rh),al="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},ad=au.useState,af=au.useEffect,ap=au.useLayoutEffect,am=au.useDebugValue;function ah(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!al(e,n)}catch(e){return!0}}var ag="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=ad({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return ap(function(){i.value=n,i.getSnapshot=t,ah(i)&&o({inst:i})},[e,n,t]),af(function(){return ah(i)&&o({inst:i}),e(function(){ah(i)&&o({inst:i})})},[e]),am(n),n};ac.useSyncExternalStore=void 0!==au.useSyncExternalStore?au.useSyncExternalStore:ag,as.exports=ac;var av=as.exports,ay=new WeakMap,a_={},ab={},aw=function(){},ak=aw(),aS=Object,aC=function(e){return e===ak},aE=function(e){return"function"==typeof e},aO=function(e,t){return tf(tf({},e),t)},ax="undefined",aP=("u"<typeof window?"undefined":tO(window))!=ax,aA=("u"<typeof document?"undefined":tO(document))!=ax,aT=function(e,t){var n=ay.get(e);return[function(){return e.get(t)||a_},function(r){if(!aC(t)){var i=e.get(t);t in ab||(ab[t]=i),n[5](t,aO(i,r),i||a_)}},n[6],function(){return!aC(t)&&t in ab?ab[t]:e.get(t)||a_}]},aD=new WeakMap,aF=0,aj=function(e){var t,n,r=tO(e),i=e&&e.constructor,o=i==Date;if(aS(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=aD.get(e))return t;if(t=++aF+"~",aD.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=aj(e[n])+",";aD.set(e,t)}if(i==aS){t="#";for(var a=aS.keys(e).sort();!aC(n=a.pop());)aC(e[n])||(t+=n+":"+aj(e[n])+",");aD.set(e,t)}}return t},aR=!0,az=tl(aP&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[aw,aw],2),aI=az[0],aL=az[1],aM={initFocus:function(e){return aA&&document.addEventListener("visibilitychange",e),aI("focus",e),function(){aA&&document.removeEventListener("visibilitychange",e),aL("focus",e)}},initReconnect:function(e){var t=function(){aR=!0,e()},n=function(){aR=!1};
1return aI("online",t),aI("offline",n),function(){aL("online",t),aL("offline",n)}}},aB=!rm.useId,aN=!aP||"Deno"in window,aU=aN?nm:nh,aH="u">typeof navigator&&navigator.connection,aK=!aN&&aH&&(["slow-2g","2g"].includes(aH.effectiveType)||aH.saveData),aG=function(e){if(aE(e))try{e=e()}catch(t){e=""}var t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?aj(e):"",t]},aW=0,aq=function(){return++aW};function aV(){return a$.apply(this,arguments)}function a$(){return(a$=tu(ta().m(function e(){var t,n,r,i,o,a,s,c,u,l,d,f,p,m,h,g,v,y,_,b,w,k=arguments;return ta().w(function(e){for(;;)switch(e.n){case 0:for(w=function(){return(w=tu(ta().m(function e(t){var r,o,s,c,l,h,g,v,y,_,b,w,k,S,C,E,O,x,P;return ta().w(function(e){for(;;)switch(e.n){case 0:if(r=tl(aG(t),1)[0]){e.n=1;break}return e.a(2);case 1:if(s=(o=tl(aT(i,r),2))[0],c=o[1],h=(l=tl(ay.get(i),3))[0],g=l[1],v=l[2],y=h[r],_=function(){return f&&(delete v[r],y&&y[0])?y[0](2).then(function(){return s().data}):s().data},!(n.length<3)){e.n=2;break}return e.a(2,_());case 2:if(b=a,k=aq(),g[r]=[k,0],S=!aC(d),E=(C=s()).data,x=aC(O=C._c)?E:O,S&&(d=aE(d)?d(x):d,c({data:d,_c:x})),aE(b))try{b=b(x)}catch(e){w=e}if(!(b&&aE(b.then))){e.n=6;break}return e.n=3,b.catch(function(e){w=e});case 3:if(b=e.v,k===g[r][0]){e.n=5;break}if(!w){e.n=4;break}throw w;case 4:return e.a(2,b);case 5:w&&S&&p(w)&&(u=!0,c({data:b=x,_c:ak}));case 6:return u&&!w&&(aE(u)&&(b=u(b,x)),c({data:b,_c:ak})),g[r][1]=aq(),e.n=7,_();case 7:if(P=e.v,c({_c:ak}),!w){e.n=9;break}if(!m){e.n=8;break}throw w;case 8:return e.a(2);case 9:return e.a(2,u?P:b)}},e)}))).apply(this,arguments)},b=function(e){return w.apply(this,arguments)},n=Array(t=k.length),r=0;r<t;r++)n[r]=k[r];if(i=n[0],o=n[1],a=n[2],u=(c=aO({populateCache:!0,throwOnError:!0},"boolean"==typeof(s=n[3])?{revalidate:s}:s||{})).populateCache,l=c.rollbackOnError,d=c.optimisticData,f=!1!==c.revalidate,p=function(e){return"function"==typeof l?l(e):!1!==l},m=c.throwOnError,!aE(o)){e.n=1;break}for(h=o,g=[],y=(v=i.keys()).next();!y.done;y=v.next())_=y.value,!/^\$(inf|sub)\$/.test(_)&&h(i.get(_)._k)&&g.push(_);return e.a(2,Promise.all(g.map(b)));case 1:return e.a(2,b(o))}},e)}))).apply(this,arguments)}var aZ=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},aY=tl(function(e){if(!ay.has(e)){var t=aO(aM,void 0),n={},r=aV.bind(ak,e),i=aw,o={},a=function(e,t){var n=o[e]||[];return o[e]=n,n.push(t),function(){return n.splice(n.indexOf(t),1)}},s=function(t,n,r){e.set(t,n);var i=o[t];if(i){var a,s=tS(i);try{for(s.s();!(a=s.n()).done;)(0,a.value)(n,r)}catch(e){s.e(e)}finally{s.f()}}},c=function(){if(!ay.has(e)&&(ay.set(e,[n,{},{},{},r,s,a]),!aN)){var o=t.initFocus(setTimeout.bind(ak,aZ.bind(ak,n,0))),c=t.initReconnect(setTimeout.bind(ak,aZ.bind(ak,n,1)));i=function(){o&&o(),c&&c(),ay.delete(e)}}};return c(),[e,r,c,i]}return[e,ay.get(e)[4]]}(new Map),2),aJ=aY[0],aQ=aO({onLoadingSlow:aw,onSuccess:aw,onError:aw,onErrorRetry:function(e,t,n,r,i){var o=n.errorRetryCount,a=i.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(aC(o)||!(a>o))&&setTimeout(r,s,i)},onDiscarded:aw,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:aK?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:aK?5e3:3e3,compare:function(e,t){return aj(e)==aj(t)},isPaused:function(){return!1},cache:aJ,mutate:aY[1],fallback:{}},{isOnline:function(){return aR},isVisible:function(){var e=aA&&document.visibilityState;return aC(e)||"hidden"!==e}}),aX=function(e,t){var n=aO(e,t);if(t){var r=e.use,i=e.fallback,o=t.use,a=t.fallback;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=aO(i,a))}return n},a0=t7({}),a1=aP&&window.__SWR_DEVTOOLS_USE__,a2=a1?window.__SWR_DEVTOOLS_USE__:[],a5=function(e){return aE(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},a3=function(){return aO(aQ,nb(a0))},a4=a2.concat(function(e){return function(t,n,r){var i=n&&function(){var e=aG(t)[0],r=tl(ay.get(aJ),4)[3],i=r[e];return i?(delete r[e],i):n.apply(void 0,arguments)};return e(t,i,r)}}),a6=function(e){var t=nf({})[1],n=ng(!1),r=ng(e),i=ng({data:!1,error:!1,isValidating:!1}),o=n_(function(e){var o=!1,a=r.current;for(var s in e)a[s]!==e[s]&&(a[s]=e[s],i.current[s]&&(o=!0));o&&!n.current&&(aB?t({}):rm.startTransition(function(){return t({})}))},[]);return aU(function(){return n.current=!1,function(){n.current=!0}}),[r,i.current,o]},a8=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};a1&&(window.__SWR_DEVTOOLS_REACT__=rm);var a7={dedupe:!0},a9=(a=function(e,t,n){var r,i=n.cache,o=n.compare,a=n.suspense,s=n.fallbackData,c=n.revalidateOnMount,u=n.revalidateIfStale,l=n.refreshInterval,d=n.refreshWhenHidden,f=n.refreshWhenOffline,p=n.keepPreviousData,m=tl(ay.get(i),3),h=m[0],g=m[1],v=m[2],y=tl(aG(e),2),_=y[0],b=y[1],w=ng(!1),k=ng(!1),S=ng(_),C=ng(t),E=ng(n),O
1=function(){return E.current},x=function(){return O().isVisible()&&O().isOnline()},P=tl(aT(i,_),4),A=P[0],T=P[1],D=P[2],F=P[3],j=ng({}).current,R=aC(s)?n.fallback[_]:s,z=function(e,t){var n=!0;for(var r in j)"data"===r?!o(t[r],e[r])&&(aC(e[r])&&o(t[r],G)||(n=!1)):t[r]!==e[r]&&(n=!1);return n},I=ny(function(){var e=!!_&&!!t&&(aC(c)?!O().isPaused()&&!a&&(!!aC(u)||u):c),n=function(t){var n=aO(t);return(delete n._k,e)?tf({isValidating:!0,isLoading:!0},n):n},r=A(),i=F(),o=n(r),s=r===i?o:n(i),l=o;return[function(){var e=n(A());return z(e,l)?l:l=e},function(){return s}]},[i,_]),L=av.useSyncExternalStore(n_(function(e){return D(_,function(t,n){z(n,t)||e()})},[i,_]),I[0],I[1]),M=!w.current,B=h[_]&&h[_].length>0,N=L.data,U=aC(N)?R:N,H=L.error,K=ng(U),G=p?aC(N)?K.current:N:U,W=(!B||!!aC(H))&&(M&&!aC(c)?c:!O().isPaused()&&(a?!aC(U)&&u:aC(U)||u)),q=!!(_&&t&&M&&W),V=aC(L.isValidating)?q:L.isValidating,$=aC(L.isLoading)?q:L.isLoading,Z=n_((r=tu(ta().m(function e(t){var r,i,a,s,c,u,l,d,f,p,m,y,E,P,D,F,j;return ta().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=C.current,!(!_||!r||k.current||O().isPaused())){e.n=1;break}return e.a(2,!1);case 1:return s=!0,c=t||{},u=!v[_]||!c.dedupe,l=function(){return aB?!k.current&&_===S.current&&w.current:_===S.current},d={isValidating:!1,isLoading:!1},f=function(){T(d)},p=function(){var e=v[_];e&&e[1]===a&&delete v[_]},m={isValidating:!0},aC(A().data)&&(m.isLoading=!0),e.p=2,u&&(T(m),n.loadingTimeout&&aC(A().data)&&setTimeout(function(){s&&l()&&O().onLoadingSlow(_,n)},n.loadingTimeout),v[_]=[r(b),aq()]),i=(y=tl(v[_],2))[0],a=y[1],e.n=3,i;case 3:if(i=e.v,u&&setTimeout(p,n.dedupingInterval),!(!v[_]||v[_][1]!==a)){e.n=4;break}return u&&l()&&O().onDiscarded(_),e.a(2,!1);case 4:if(d.error=ak,!(!aC(E=g[_])&&(a<=E[0]||a<=E[1]||0===E[1]))){e.n=5;break}return f(),u&&l()&&O().onDiscarded(_),e.a(2,!1);case 5:P=A().data,d.data=o(P,i)?P:i,u&&l()&&O().onSuccess(i,_,n),e.n=7;break;case 6:e.p=6,j=e.v,p(),F=(D=O()).shouldRetryOnError,!D.isPaused()&&(d.error=j,u&&l()&&(D.onError(j,_,D),(!0===F||aE(F)&&F(j))&&x()&&D.onErrorRetry(j,_,D,function(e){var t=h[_];t&&t[0]&&t[0](3,e)},{retryCount:(c.retryCount||0)+1,dedupe:!0})));case 7:return s=!1,f(),e.a(2,!0)}},e,null,[[2,6]])})),function(e){return r.apply(this,arguments)}),[_,i]),Y=n_(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return aV.apply(void 0,[i,S.current].concat(t))},[]);if(aU(function(){C.current=t,E.current=n,aC(N)||(K.current=N)}),aU(function(){if(_){var e=Z.bind(ak,a7),t=0,n=a8(_,h,function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0==n){var i=Date.now();O().revalidateOnFocus&&i>t&&x()&&(t=i+O().focusThrottleInterval,e())}else if(1==n)O().revalidateOnReconnect&&x()&&e();else if(2==n)return Z();else if(3==n)return Z(r)});return k.current=!1,S.current=_,w.current=!0,T({_k:b}),W&&(aC(U)||aN?e():aP&&tO(window.requestAnimationFrame)!=ax?window.requestAnimationFrame(e):setTimeout(e,1)),function(){k.current=!0,n()}}},[_]),aU(function(){var e;function t(){var t=aE(l)?l(U):l;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!A().error&&(d||O().isVisible())&&(f||O().isOnline())?Z(a7).then(t):t()}return t(),function(){e&&(clearTimeout(e),e=-1)}},[l,d,f,_]),nw(G),a&&aC(U)&&_){if(!aB&&aN)throw Error("Fallback data is required when using suspense in SSR.");throw C.current=t,E.current=n,k.current=!1,aC(H)?Z(a7):H}return{mutate:Y,get data(){return j.data=!0,G},get error(){return j.error=!0,H},get isValidating(){return j.isValidating=!0,V},get isLoading(){return j.isLoading=!0,$}}},function(){for(var e=a3(),t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var i=tl(a5(n),3),o=i[0],s=i[1],c=aX(e,i[2]),u=a,l=(c.use||[]).concat(a4),d=l.length;d--;)u=l[d](u);return u(o,s||c.fetcher||null,c)}),se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(function(e,t){return(t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e},"")},st=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"s";return e+ng(se()).current},sn={"data-1p-ignore":!0},sr=function(e,t){if(e&&"object"===tO(e)){if("error_message"in e&&"string"==typeof e.error_message)return e.error_message;if(t)return t;if("message"in e&&"string"==typeof e.message)return e.message}};function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s_(r.key),r)}}function so(e,t,n){return t&&si(e.prototype,t),n&&si(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sa(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ss(e,t,n){return t=su(t),function(e,t){if(t&&("object"==sm(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e,sc()?Reflect.construct(t,n||[],su(e).constructor):t.apply(e,n))}function sc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sc=function(){return!!e})()}function su(e){return(su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sl(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sd(e,t)}
1function sd(e,t){return(sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(t){sy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sm(e){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sh(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var c=Object.create((r&&r.prototype instanceof s?r:s).prototype);return sg(c,"_invoke",function(n,r,i){var o,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,c=e,f.n=n,a}};function p(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,o=l[t],p=f.p,m=o[2];n>3?(i=m===r)&&(c=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,m){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,m),s=l,c=m;(t=s<2?e:c)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,c)):f.n=c:f.v=c);try{if(u=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==a)break}catch(t){o=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=u.prototype=s.prototype=Object.create([][r]?t(t([][r]())):(sg(t={},r,function(){return this}),t));function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,sg(e,i,"GeneratorFunction")),e.prototype=Object.create(l),e}return c.prototype=u,sg(l,"constructor",u),sg(u,"constructor",c),c.displayName="GeneratorFunction",sg(u,i,"GeneratorFunction"),sg(l),sg(l,i,"Generator"),sg(l,r,function(){return this}),sg(l,"toString",function(){return"[object Generator]"}),(sh=function(){return{w:o,m:d}})()}function sg(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(sg=function(e,t,n,r){function o(t,n){sg(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))})(e,t,n,r)}function sv(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function sy(e,t,n){return(t=s_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s_(e){var t=function(e,t){if("object"!=sm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=sm(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==sm(t)?t:t+""}function sb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||sS(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function sk(e){return function(e){if(Array.isArray(e))return sC(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||sS(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sS(e,t){if(e){if("string"==typeof e)return sC(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sC(e,t):void 0}}function sC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sE={"button.back.ariaLabel":["Back"],"button.continue":["Continue"],"button.continueWithEmail":["Continue with email"],"button.createAnOrganization":["Create an organization"],"button.emailCode":["Email me a code"],"button.emailLink":["Email me a link"],"button.hidePassword":["Hide password"],"button.retry":["Try again"],"button.showPassword":["Show password"],"button.totpQrManual":["Having trouble scanning?"],"button.totpQrRetry":["Try to scan the QR code again"],"button.tryDifferentEmailAddress":["Try a different email address"],"button.usePassword":["Use a password instead"],"emailConfirmation.content":["An email was sent to <bold>",["email"],"</bold>."],"emailConfirmation.title":["Check your email"],"emailMethodSelection.code":["Email me a log in code"],"emailMethodSelection.link":["Email me a log in link"],"emailMethodSelection.title":["Select how you’d like to continue."],"emailVerification.content":["Confirm your email address with one of the following:"],"emailVerification.title":["Verify your email"],"error.adBlockerDetected":["The request was blocked by an Ad Blocker. Please disable your ad blocker, refresh the page, and try again."],"error.authPolicyNoOrg"
1:["Unable to join due to the organization's authentication policy. Please contact your admin for more information."],"error.authPolicyWithOrg":["Unable to join due to ",["organizationName"],"'s authentication policy. Please contact your admin for more information."],"error.breachedPassword":["Password appears in the list of breached passwords and must be reset."],"error.claimedDomain":["Your email domain is associated with a particular organization, so you are unable to join or create other organizations. Please contact your admin for more information."],"error.default":["Something went wrong. Try again later or contact your admin for help."],"error.duplicatePhoneNumber":["A member with the specified phone number already exists for this organization."],"error.emailNoAccessToOrg":[["email"]," does not have access to ",["organizationName"],". If you think this is a mistake, contact your admin."],"error.emailNotFound":["Email not found."],"error.eml":["Something went wrong. Your login link may have expired, been revoked, or been used more than once. Request a new login link to try again, or contact your admin for help."],"error.inactiveEmail":["The email address is marked as inactive. Please try another email address, or contact your admin if you think this is a mistake."],"error.invalidCode":["Code format is invalid, please try again."],"error.invalidEmail":["Email format is invalid."],"error.invalidEmailAddress":["Invalid email address"],"error.invalidPhoneNumber":["Phone number format is invalid. Ensure the phone number is in the E.164 format."],"error.invalidPhoneNumberCountryCode":["The phone number's country code is invalid, unsupported, or disabled."],"error.invalidSessionToken":["Invalid session token."],"error.jitIneligible":[["email"]," does not have access to ",["organizationName"],". If you think this is a mistake, contact your admin"],"error.memberPasswordNotFound":["Member password not found."],"error.noUserPassword":["Password not found for this user. Please try again."],"error.oauthFlowCallbackError":["An error was encountered in the callback of the OAuth flow. Please try again."],"error.oauthTokenNotFound":["OAuth Token could not be found."],"error.organization":["The organization you are looking for could not be found. If you think this is a mistake, contact your admin."],"error.otpCodeNotFound":["Invalid passcode, please try again."],"error.passcodeInvalid":["Invalid passcode, please try again."],"error.resetPassword":["Password must be reset."],"error.sessionNotFound":["Session not found."],"error.title":["Looks like there was an error!"],"error.unableToAuthMagicLink":["The magic link could not be authenticated because it was either already used or expired. Please try again."],"error.unauthorizedAction":["Unauthorized action."],"error.unauthorizedCredentials":["Unauthorized credentials."],"error.unsubscribedPhoneNumber":["Phone number is unsubscribed. User has unsubscribed. Resubscribe by texting 'START' before messages can be sent."],"error.userLockLimitReached":["Too many failed authentication attempts. Please try again later."],"error.userUnauthenticated":["Must have an active session to call this method. Have you logged in yet?"],"formField.backupCode.ariaLabel":["Backup code"],"formField.backupCode.placeholder":["Enter backup code"],"formField.countryCode.label":["Country code"],"formField.email.label":["Email"],"formField.email.placeholder":["[email protected]"],"formField.orgSlug.placeholder":["Enter org slug"],"formField.otp.ariaLabel":["One-time passcode"],"formField.passcode.status.verifying":["Verifying passcode..."],"formField.password.label":["Password"],"formField.phone.label":["Phone number"],"idpConsent.allowClientTo":["Allow ",["clientName"]," to:"],"idpConsent.button.allow":["Allow"],"idpConsent.button.deny":["Deny"],"idpConsent.cannotGrantRequest":["You cannot grant ",["clientName"],"'s request to:"],"idpConsent.customScopes.title":[["clientName"]," wants to access your ",["projectName"]," account"],"idpConsent.defaultClientName":["The App"],"idpConsent.denied":["Access to the application was denied."],"idpConsent.noActiveSession":["No active session detected. Please log in to continue."],"idpConsent.noPermissionsToGrant":["You do not have permissions to grant ",["clientName"]," access to some of the requested scopes."],"idpConsent.signIn.title":["Sign in to ",["clientName"]," with ",["projectName"]],"idpLogout.confirmMessage":["Are you sure you want to log out of your ",["projectName"]," account?"],"idpLogout.no":["No"],"idpLogout.notLoggedOut":["You have not been logged out. You may close this page."],"idpLogout.title":["Log out?"],"idpLogout.yes":["Yes"],"link.openInGmail":["Open in Gmail"],"link.openInOutlook":["Open in Outlook"],"link.openInYahoo":["Open in Yahoo"],"link.signupResetPassword":["Sign up or reset password"],"login.loading":["Logging in..."],"login.success.content":["You have successfully logged in."],"login.title":["Sign up or log in"],"methodDivider.text":["or"],"mfa.enrollment.content":["Your organization requires an additional form of verification to make your account more secure."],"mfa.enrollment.option.sms":["Text me a code"],"mfa.enrollment.option.totp":["
1Use an authenticator app"],"mfa.enrollment.title":["Set up Multi-Factor Authentication"],"mfa.methods.authenticatorApp":["Use an authenticator app"],"mfa.smsEnrollment.content":["Your organization requires an additional form of verification to make your account more secure."],"mfa.smsEnrollment.title":["Enter your phone number to set up Multi-Factor Authentication"],"mfa.totpEnrollment.content":["Click to copy the code below. Enter into your authenticator app to link your account."],"mfa.totpEnrollment.copyCode.ariaLabel":["Copy code"],"mfa.totpEnrollment.title":["Having trouble scanning the QR code?"],"mfa.totpEnrollment.toast.codeCopied":["Code copied"],"mfa.totpEnrollment.toast.copyFailed":["Couldn't copy code to clipboard"],"mfa.totpEntry.getNewCode":["If the verification code doesn’t work, go back to your authenticator app to get a new code."],"mfa.totpEntry.switchToSms":["Text me a code instead"],"mfa.totpEntry.useBackupCode":["Can’t access your authenticator app? <backupCodeLink>Use a backup code</backupCodeLink>"],"mfaTotpEnrollment.qrAltText":["QR code for TOTP enrollment"],"oauth.continueWithGitHub":["Continue with GitHub"],"oauth.continueWithGoogle":["Continue with Google"],"oauth.continueWithHubSpot":["Continue with HubSpot"],"oauth.continueWithMicrosoft":["Continue with Microsoft"],"oauth.continueWithSlack":["Continue with Slack"],"organizationDiscovery.acceptInvite":["Accept Invite"],"organizationDiscovery.join":["Join"],"organizationDiscovery.noOrgs.content":["Make sure your email address is correct. Otherwise, you might need to be invited by your admin."],"organizationDiscovery.noOrgs.create.content":[["email"]," does not have an account. Think this is a mistake? Try a different email address, or contact your admin."],"organizationDiscovery.noOrgs.create.title":["Create an organization to get started"],"organizationDiscovery.noOrgs.title":[["email"]," does not belong to any organizations."],"organizationDiscovery.title":["Select an organization to continue"],"organizationLogin.title":["Continue to ",["organizationName"]],"organizationLogin.titleUnknown":["Continue to ..."],"passcode.codeSent":["Code sent"],"passcode.didntGetIt":["Didn't get it?"],"passcode.expirationCountdown":["Your code expires in ",["timeRemaining"],"."],"passcode.expired":["Your code has expired."],"passcode.resendCode":["Resend code"],"passcode.sentConfirmation":["A 6-digit passcode was sent to you at <bold>",["destination"],"</bold>."],"passcode.title":["Enter passcode"],"password.forgot.content.discovery":["We'll email you a verification link to sign up for an account or reset your password if you have one."],"password.forgot.content.organization":["We'll email you a login link to sign in to your account directly or reset your password if you have one."],"password.forgot.title":["Check your email for help signing in!"],"password.login.title":["Log in with email and password"],"password.reset.emailSent.content":["A login link was sent to you at <bold>",["email"],"</bold>."],"password.reset.emailSent.resendText":["Didn't get it? <resendButton>Resend email</resendButton>"],"password.reset.emailSent.title":["Check your email!"],"password.reset.toast.emailResent":["Email resent"],"password.setNew.title":["Set a new password"],"password.strengthError.breached":["This password may have been used on a different site that experienced a security issue. Please choose another password."],"password.strengthError.complexity":[["complexity","plural",{one:["Must contain ","#"," of the following: uppercase letter, lowercase letter, number, symbol"],other:["Must contain ","#"," of the following: uppercase letter, lowercase letter, number, symbol"]}]],"password.strengthError.minimumLength":[["characterLength","plural",{one:["Must be at least ","#"," character long"],other:["Must be at least ","#"," characters long"]}]],"password.verification.content":["A login link was sent to you at <bold>",["email"],"</bold>."],"password.verification.resendEmail":["Didn't get it? <resendButton>Resend email</resendButton>"],"password.verification.title":["Verify your email first."],"password.zxcvbn.suggestion.addWords":["Add another word or two. Uncommon words are better."],"password.zxcvbn.suggestion.allUppercase":["All-uppercase is almost as easy to guess as all-lowercase."],"password.zxcvbn.suggestion.avoidDatesAndYearsAssociatedWithYou":["Avoid dates and years that are associated with you."],"password.zxcvbn.suggestion.avoidRecentYears":["Avoid recent years."],"password.zxcvbn.suggestion.avoidRepeats":["Avoid repeated words and characters."],"password.zxcvbn.suggestion.avoidSequences":["Avoid sequences."],"password.zxcvbn.suggestion.avoidYearsAssociatedWithYou":["Avoid years that are associated with you."],"password.zxcvbn.suggestion.capitalization":["Capitalization doesn't help very much."],"password.zxcvbn.suggestion.longerKeyboardPattern":["Use a longer keyboard pattern with more turns."],"password.zxcvbn.suggestion.noSymbolsDigitsUppercase":["No need for symbols, digits, or uppercase letters."],"password.zxcvbn.suggestion.predictableSubstitutions":["Predictable substitutions like '@' instead of 'a' don't help very much."],"password.zxcvbn.suggestion.reversed":["Reversed words aren't much harder to guess."],"password.zxcvbn.suggestion.useAFewWords":["Use a few words, avoid common phrases."],"password.zxcvbn.warning.commonNames":["Common names and surnames are easy to guess."],"password.zxcvbn.warning.dates":["Dates are often easy to guess."],"password.zxcvbn.warning.longerRepeats":['Repeats like "abcabcabc" are only slightly harder to guess than "abc".'],"password.zxcvbn.warning.names":["Names and surnames by themselves are easy to guess."],"password.zxcvbn.warning.recentYears":["Recent years are easy to guess."],"password.zxcvbn.warning.repeats":['Repeats like "aaa" are easy to guess.'],"password.zxcvbn.warning.sequences":['
1Sequences like "abc" or "6543" are easy to guess.'],"password.zxcvbn.warning.shortKeyboardPatterns":["Short keyboard patterns are easy to guess."],"password.zxcvbn.warning.similarToCommonPassword":["This is similar to a commonly used password."],"password.zxcvbn.warning.straightRows":["Straight rows of keys are easy to guess."],"password.zxcvbn.warning.top100CommonPassword":["This is a top-100 common password."],"password.zxcvbn.warning.top10CommonPassword":["This is a top-10 common password."],"password.zxcvbn.warning.veryCommonPassword":["This is a very common password."],"password.zxcvbn.warning.wordByItself":["A word by itself is easy to guess."],"provider.continueWith":["Continue with ",["displayName"]],"provider.continueWithSSO":["Continue with SSO"],"provider.lastUsed":["Last used"],"recoveryCodes.entry.content":["Enter one of the backup codes you saved when setting up your authenticator app."],"recoveryCodes.entry.error.invalidCode":["Invalid backup code, please try again."],"recoveryCodes.entry.title":["Enter backup code"],"recoveryCodes.save.button.copyAll":["Copy all"],"recoveryCodes.save.button.done":["Done"],"recoveryCodes.save.button.download":["Download file"],"recoveryCodes.save.content":["This is the only time you will be able to access and save your backup codes."],"recoveryCodes.save.title":["Save your backup codes!"],"recoveryCodes.save.toast.copied":["Copied"],"recoveryCodes.save.toast.copyFailed":["Couldn't copy codes to clipboard"],"ssoDiscovery.email.error.unknown":["Something went wrong. Try again later or contact your admin for help."],"ssoDiscovery.email.title":["Enter your email to continue"],"ssoDiscovery.fallback.button.reset":["Try another log in method"],"ssoDiscovery.fallback.content":["Please input the Organization's unique slug to continue. If you don't know the unique slug, log in through another method to view all of your available Organizations."],"ssoDiscovery.fallback.error.orgNotFound":["Organization not found. Please try again."],"ssoDiscovery.fallback.error.unknown":["An error occurred. Please try again."],"ssoDiscovery.fallback.title":["Sorry, we couldn't find any connections."],"ssoDiscovery.title":["Select a connection to continue"],"success.title":["Success!"],"totp.content":["Enter the 6-digit code from your authenticator app."],"totp.setupQr.content":["Your organization requires an additional form of verification to make your account more secure. If you don’t have an authenticator app, you’ll need to install one first."],"totp.setupQr.title":["Scan the QR code to link your authenticator app"],"totp.title":["Enter verification code"],"watermark.altText":["Powered by Stytch"]},sO="u">typeof window?nh:nm,sx=function(e){var t=ng(e);return sO(function(){t.current=e},[e]),n_(function(){return t.current.apply(void 0,arguments)},[])},sP={primaryInfo:null,isEnrolling:!1,smsOtp:{isSending:!1,sendError:null,codeExpiration:null,formattedDestination:null,enrolledNumber:null},totp:{isCreating:!1,createError:null,enrollment:null}};(s=eX||(eX={}))[s.Default=0]="Default",s[s.EmailMagicLink=1]="EmailMagicLink",s[s.Organization=2]="Organization",s[s.CannotJoinOrgDueToAuthPolicy=3]="CannotJoinOrgDueToAuthPolicy",s[s.AdBlockerDetected=4]="AdBlockerDetected",s[s.OrganizationDiscoveryClaimedDomain=5]="OrganizationDiscoveryClaimedDomain",(c=e0||(e0={})).Main="Main",c.EmailConfirmation="Email Confirmation",c.LoggedIn="Logged In",c.Discovery="Discovery",c.Error="Error",c.PasswordEmailForm="Password Email",c.PasswordAuthenticate="Password Authenticate",c.PasswordResetForm="Password Reset Form",c.PasswordResetVerifyConfirmation="Password Reset Verify Confirmation",c.PasswordForgotForm="Password Forgot Form",c.PasswordSetNewConfirmation="Password Set New Confirmation",c.MFAEnrollmentSelection="MFA Enrollment Selection",c.RecoveryCodeEntry="Recovery Code Entry",c.RecoveryCodeSave="Recovery Code Save",c.SMSOTPEnrollment="SMS OTP Enrollment",c.SMSOTPEntry="SMS OTP Entry",c.TOTPEnrollmentManual="TOTP Enrollment Manual",c.TOTPEnrollmentQRCode="TOTP Enrollment QR Code",c.TOTPEntry="TOTP Entry",c.EmailMethodSelection="Email Method Selection",c.EmailOTPEntry="Email OTP Entry",c.SSODiscoveryEmail
1="SSO Discovery Email",c.SSODiscoveryFallback="SSO Discovery Fallback",c.SSODiscoveryMenu="SSO Discovery Menu",c.IDPConsent="IDP Consent";var sA=function(e){var t=e.allMethods,n=e.orgSupportedMethods,r=e.uiIncludedMethods;return new Set((null==n?void 0:n.length)?n:(null==r?void 0:r.length)?r:t)};function sT(e,t){return Object.assign(Object.assign({},t),{screen:e,screenHistory:[].concat(sk(t.screenHistory),[t.screen])})}function sD(e,t){return Object.assign(Object.assign({},t),{screen:e,screenHistory:[]})}function sF(e){switch(e){case"totp":return ti.B.totp;case"sms_otp":return ti.B.smsOtp;default:return}}var sj=function(){return new Date(Date.now()+12e4)},sR=[ti.B.totp,ti.B.smsOtp],sz=function(e,t){var n,r,i,o,a,s,c,u,l,d,f,p,m,h,g,v;switch(t.type){case"primary_authenticate_success":var y=!!t.response.member_session,_="multi_tenant_magic_links"===t.resetTokenType?e0.PasswordResetForm:e0.LoggedIn;if(y)return sD(_,Object.assign(Object.assign({},e),{mfa:sP,primary:{}}));if(t.response.primary_required){var b=t.response.primary_required.allowed_auth_methods,w=t.response.member,k=w.email_address,S=w.email_address_verified,C=Object.assign(Object.assign({},e),{flowState:{type:ti.A.Organization,organization:t.response.organization},formState:Object.assign(Object.assign({},e.formState),{passwordState:{email:k}}),primary:{primaryAuthMethods:b,email:k,emailVerified:S}});if((null==b?void 0:b.length)===0)return sD(e0.Error,Object.assign(Object.assign({},C),{error:{type:eX.CannotJoinOrgDueToAuthPolicy,canGoBack:!1}}));return sD(e0.Main,C)}var E=t.response.member.mfa_phone_number_verified,O={enrolledMfaMethods:[!!t.response.member.totp_registration_id&&ti.B.totp,E&&ti.B.smsOtp].filter(ai),memberId:t.response.member_id,memberPhoneNumber:t.response.member.mfa_phone_number,organizationId:t.response.organization.organization_id,organizationMfaOptionsSupported:"RESTRICTED"===t.response.organization.mfa_methods&&null!=(r=null==(n=t.response.organization.allowed_mfa_methods)?void 0:n.map(sF).filter(ai))?r:[],postAuthScreen:_},x=function(e){return 0===O.organizationMfaOptionsSupported.length||O.organizationMfaOptionsSupported.includes(e)},P=(null==(i=t.response.mfa_required)?void 0:i.secondary_auth_initiated)==="sms_otp",A=P?ti.B.smsOtp:null!=(o=function(){var e=sF(t.response.member.default_mfa_method);if(e&&x(e)&&O.enrolledMfaMethods.includes(e))return e}())?o:O.enrolledMfaMethods.find(x);if(A){var T=Object.assign(Object.assign({},sP),{primaryInfo:O});switch(A){case ti.B.totp:return sD(e0.TOTPEntry,Object.assign(Object.assign({},e),{mfa:T,primary:{}}));case ti.B.smsOtp:var D=Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},T),{smsOtp:Object.assign(Object.assign({},T.smsOtp),{codeExpiration:P?sj():null})}),primary:{}});if(E)return sD(e0.SMSOTPEntry,D);return Object.assign(Object.assign({},D),{screen:e0.SMSOTPEntry,screenHistory:[e0.SMSOTPEnrollment]})}}return sD(function(e){if(1===e.size){if(e.has(ti.B.totp))return e0.TOTPEnrollmentQRCode;if(e.has(ti.B.smsOtp))return e0.SMSOTPEnrollment}return e0.MFAEnrollmentSelection}(sA({allMethods:sR,orgSupportedMethods:O.organizationMfaOptionsSupported,uiIncludedMethods:t.includedMfaMethods})),Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},sP),{primaryInfo:O,isEnrolling:!0}),primary:{}}));case"sms_otp/send":return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{smsOtp:Object.assign(Object.assign({},e.mfa.smsOtp),{isSending:!0,sendError:null})})});case"sms_otp/send_success":return sT(e0.SMSOTPEntry,Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{smsOtp:Object.assign(Object.assign({},e.mfa.smsOtp),{isSending:!1,sendError:null,codeExpiration:sj(),formattedDestination:null!=(a=t.formattedPhoneNumber)?a:e.mfa.smsOtp.formattedDestination,enrolledNumber:t.phoneNumber?{phoneNumber:t.phoneNumber,countryCode:t.countryCode}:null})})}));case"sms_otp/send_error":return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{smsOtp:Object.assign(Object.assign({},e.mfa.smsOtp),{isSending:!1,sendError:t.error,codeExpiration:null!=(s=e.mfa.smsOtp.codeExpiration)?s:new Date(Date.now()-1e3)})})});case"sms_otp/format_destination":return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{smsOtp:Object.assign(Object.assign({},e.mfa.smsOtp),{formattedDestination:t.formattedPhoneNumber})})});case"sms_otp/authenticate_success":case"recovery_code/authenticate_success":case"recovery_code/save_acknowledge":return sD(null!=(u=null==(c=e.mfa.primaryInfo)?void 0:c.postAuthScreen)?u:e0.LoggedIn,Object.assign(Object.assign({},e),{mfa:sP}));case"totp/authenticate_success":return sD(e.mfa.isEnrolling?e0.RecoveryCodeSave:null!=(d=null==(l=e.mfa.primaryInfo)?void 0:l.postAuthScreen)?d:e0.LoggedIn,Object.assign(Object.assign({},e),{mfa:e.mfa.isEnrolling?e.mfa:sP}));case"totp/create":if(e.mfa.totp.isCreating)return e;return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{totp:Object.assign(Object.assign({},e.mfa.totp),{isCreating:!0,createError:null})})});case"totp/create_success":if(!e.mfa.isEnrolling||(null==(f=e.mfa.primaryInfo)?void 0:f.memberId)!==t.memberId||(null==(p=e.mfa.primaryInfo)?void 0:p.organizationId)!==t.organizationId)return e;return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{totp:Object.assign(Object.assign({},e.mfa.totp),{createError:null,isCreating:!1,enrollment:{secret:t.response.secret,qrCode:t.response.qr_code,recoveryCodes:t.response.recovery_codes,method:null!=(h=null==(m=e.mfa.totp.enrollment)?void 0:m.method)?h:"qr"}})})});case"totp/create_error":return Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{totp:Object.assign(Object.assign({},e.mfa.totp),{isCreating:!1,createError:t.error})})});case"totp/show_code":if(!e.mfa.isEnrolling||!e.mfa.totp.enrollment)return e;var F=null!=(v=null!=(g=t.method)?g:e.mfa.totp.enrollment.method)?v:"qr";return sT("manual"===F?e0.TOTPEnrollmentManual:e0.TOTPEnrollmentQRCode,Object.assign(Object.assign({},e),{mfa:Object.assign(Object.assign({},e.mfa),{totp:Object.assign(Object.assign({},e.mfa.totp),{enrollment:Object.assign(Object.assign({},e.mfa.totp.enrollment),{method:F})})})}));default:return e}},sI=function(e,t){var n,r,i;switch(t.type){case"transition":return"push"===t.history?sT(t.screen,e):sD(t.screen,e);case"navigate_back":var o=e.screenHistory.at(-1);if(!o)return e;var a=e.screenHistory.slice(0,-1);return Object.assign(Object.assign({},e),{screen:o,screenHistory:a});case"set_error_message_and_transition":return Object.assign(Object.assign({},e),{screen:e0.Error,error:{type:t.errorType,canGoBack:t.canGoBack}});case"set_user_supplied_email":return Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{emailState:{userSuppliedEmail:t.email},passwordState:{email:t.email}})});case"set_organization":return Object.assign(Object.assign({},e),{flowState:{type:ti.A.Organization,organization:t.organization}});case"set_discovery_state":var s=t.discoveredOrganizations;return Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{discoveryState:{email:t.email,discoveredOrganizations:s}}),screen:e0.Discovery});case"select_discovered_organization":var c=t.discoveredOrganization,u=c.membership,l=c.organization,d=c.primary_required,f=null!=(r=null==(n=u.member)?void 0:n.email_address)?r:e.formState.discoveryState.email,p=d?d.allowed_auth_methods:void 0,m=Object.assign(Object.assign({},e),{flowState:{type:ti.A.Organization,organization:l},formState:Object.assign(Object.assign({},e.formState),{passwordState:{email:f}}),primary:{primaryAuthMethods:p,email:f,emailVerified:null==(i=u.member)?void 0:i.email_address_verified},screen:e0.Main});if((null==p?void 0:p.length)===0)return Object.assign(Object.assign({},m),{screen:e0.Error,error:{type:eX.CannotJoinOrgDueToAuthPolicy,canGoBack:!0}});return m;case"set_password_state":return Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{passwordState:{email:t.email}})});case"send_email_otp":return sT(e0.EmailOTPEntry,Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{otpState:{codeExpiration:t.codeExpiration}})}));case"set_sso_discovery_state":if(!t.connections.length)return sT(e0.SSODiscoveryFallback,e);return sT(e0.SSODiscoveryMenu,Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{ssoDiscoveryState:{connections:t.connections}})}));case"use_password_auth":return sT(e0.PasswordAuthenticate,Object.assign(Object.assign({},e),{formState:Object.assign(Object.assign({},e.formState),{passwordState:{email:t.email}})}
1));default:return sz(e,t)}},sL={screen:e0.Main,screenHistory:[],formState:{emailState:{userSuppliedEmail:""},otpState:{codeExpiration:null},discoveryState:{email:"",discoveredOrganizations:[]},passwordState:{email:""},ssoDiscoveryState:{connections:[]}},flowState:{type:ti.A.Organization,organization:null},mfa:sP,primary:{},error:{type:eX.Default,canGoBack:!1}},sM={products:[ti.a.emailMagicLinks],authFlowType:ti.A.Organization,sessionOptions:{sessionDurationMinutes:60}},sB=rm.createContext({client:{},config:sM,state:[sL,function(){return null}]}),sN=function(e){var t=e.children,n=e.client,r=e.config,i=e.callbacks,o=e.initialState,a=rm.useReducer(sI,null!=o?o:sL);return rm.createElement(sB.Provider,{value:{client:n,state:a,config:r,callbacks:i}},t)},sU=function(){},sH=function(){return nb(sB)},sK=function(){return sH().client},sG=function(){return sH().state},sW=function(){return sH().config},sq=function(){var e,t;return sx(null!=(t=null==(e=sH().callbacks)?void 0:e.onError)?t:sU)},sV=function(){var e,t;return sx(null!=(t=null==(e=sH().callbacks)?void 0:e.onEvent)?t:sU)};(u=e1||(e1={})).Main="Main",u.PasskeyRegistrationStart="Register New Passkey",u.PasskeyRegistrationSuccess="Passkey Registration Success",u.PasskeyConfirmation="Passkey Confirmation",u.PasswordCreateOrLogin="Password",u.PasswordResetForm="Password Reset Form",u.PasswordForgot="Password Forgot",u.PasswordBreached="Password Breached",u.PasswordSetNew="Password Set New",u.PasswordDedupe="Password Dedupe",u.PasswordConfirmation="Password Confirmation",u.EmailConfirmation="Email Confirmation",u.OTPAuthenticate="OTP Authenticate",u.OTPConfirmation="OTP Confirmation",u.CryptoConnect="Crypto Connect",u.CryptoSignMessage="Crypto Sign Message",u.CryptoOtherScreen="Crypto Other Screen",u.CryptoSetupWallet="Crypto Setup Wallet",u.CryptoError="Crypto Error",u.CryptoConfirmation="Crypto Confirmation",u.IDPConsent="IDP Consent",e1.Main,ti.b.Email,ti.W.Metamask,ti.P.emailMagicLinks;var s$={container:{backgroundColor:"#FFFFFF",borderColor:"#ADBCC5",borderRadius:"8px",width:"400px"},colors:{primary:"#19303D",secondary:"#5C727D",success:"#0C5A56",warning:"#FFD94A",error:"#8B1214",accent:"#ECFAFF"},buttons:{primary:{backgroundColor:"#19303D",textColor:"#FFFFFF",borderColor:"#19303D",borderRadius:"4px"},secondary:{backgroundColor:"#FFFFFF",textColor:"#19303D",borderColor:"#19303D",borderRadius:"4px"},disabled:{backgroundColor:"#F3F5F6",textColor:"#8296A1",borderColor:"#F3F5F6",borderRadius:"4px"}},fontFamily:"Arial, Helvetica, sans-serif",hideHeaderText:!1,logo:{logoImageUrl:""}},sZ="#8296A1",sY=function(e){var t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=aa({},s$,e),c=s.fontFamily,u=s.colors,l=s.container,d=s.buttons,f=s.inputs;return{typography:{fontFamily:c,header:{fontFamily:c,fontSize:24,fontWeight:600,lineHeight:"30px"},body:{fontFamily:c,fontSize:16,fontWeight:"normal",lineHeight:"21px"},helper:{fontFamily:c,fontSize:14,fontWeight:"400",lineHeight:"20px",whiteSpace:"pre-wrap"}},colors:{primary:u.primary,secondary:u.secondary,success:u.success,warning:u.warning,error:u.error,accent:u.accent,disabled:"#F3F5F6",disabledText:sZ},container:{width:l.width,border:"1px solid ".concat(l.borderColor),borderRadius:l.borderRadius,backgroundColor:l.backgroundColor},buttons:{primary:{backgroundColor:d.primary.backgroundColor,textColor:d.primary.textColor,border:"1px solid ".concat(d.primary.borderColor),borderRadius:d.primary.borderRadius},secondary:{backgroundColor:d.secondary.backgroundColor,textColor:d.secondary.textColor,border:"1px solid ".concat(d.secondary.borderColor),borderRadius:d.secondary.borderRadius},disabled:{textColor:d.disabled.textColor,backgroundColor:d.disabled.backgroundColor,border:"1px solid ".concat(d.disabled.borderColor),borderRadius:d.disabled.borderRadius}},inputs:{backgroundColor:null!=(t=null==f?void 0:f.backgroundColor)?t:"transparent",textColor:null!=(n=null==f?void 0:f.textColor)?n:u.primary,borderColor:null!=(r=null==f?void 0:f.borderColor)?r:u.primary,borderRadius:null!=(i=null==f?void 0:f.borderRadius)?i:"4px",placeholderColor:null!=(o=null==f?void 0:f.placeholderColor)?o:sZ},displayHeader:!s.hideHeaderText,displayWatermark:a,logo:{logoImageUrl:s.logo.logoImageUrl}}},sJ=function(e){var t=e.styles,n=e.displayWatermark;return ny(function(){return sY(t,n)},[t,n])},sQ=function(e){return null!=e?e:void 0},sX=function(e){return e?"".concat(e,"px"):void 0},s0=oh.div(h||(h=sw(["\n  display: ",";\n\n  flex-direction: ",";\n  justify-content: ",";\n  align-items: ",";\n  flex-grow: ",";\n  flex-shrink: ",";\n  order: ",";\n  align-self: ",";\n  flex-flow: ",";\n  flex-wrap: ",";\n\n  width: ",";\n  height: ",";\n  max-width: ",";\n  max-height: ",";\n  min-width: ",";\n  min-height: ",";\n  padding: ",";\n  margin: ",";\n  margin-top: ",";\n  margin-right: ",";\n  margin-bottom: ",";\n  margin-left: ",";\n  padding-top: ",";\n  padding-right: ",";\n  padding-bottom: ",";\n  padding-left: ",";\n\n  gap: ",";\n"])),function(e){return e.inline?"inline-flex":"flex"},function(e){return sQ(e.direction)},function(e){var t=e.justifyContent;return e.center?"center":sQ(t)},function(e){var t=e.alignItems;return e.center?"center":sQ(t)},function(e){return sQ(e.grow)},function(e){return sQ(e.shrink)},function(e){return sQ(e.order)},function(e){return sQ(e.alignSelf)},function(e){return sQ(e.flow)},function(e){return sQ(e.wrap)},function(e){var t=e.width;return"string"==typeof t?t:sX(t)},function(e){var t=e.height;return"string"==typeof t?t:sX(t)},function(e){var t=e.maxWidth;return"string"==typeof t?t:sX(t)},function(e){var t=e.maxHeight;return"string"==typeof t?t:sX(t)},function(e){var t=e.minWidth;return"string"==typeof t?t:sX(t)},function(e){var t=e.minHeight;return"string"==typeof t?t:sX(t)},function(e){return sX(e.padding)},function(e){return sX(e.margin)},function(e){return sX(e.marginTop)},function(e){return sX(e.marginRight)},function(e){return sX(e.marginBottom)},function(e){return sX(e.marginLeft)},function(e){return sX(e.paddingTop)},function(e){return sX(e.paddingRight)},function(e){return sX(e.paddingBottom)},function(e){return sX(e.paddingLeft)},function(e){return sX(e.gap)}),s1=oh.div(g||(g=sw(["\n  color: ",";\n  text-align: ",";\n  ",";\n"])),function(e){return e.color&&e.theme.colors[e.color]},function(e){return e.align},function(e){return e.size&&e.theme.typography[e.size]});function s2(e){var t=st();return e?{error:{id:t},input:{"aria-errormessage":t,"aria-invalid":!0}}:{error:{id:t},input:{}}}s1.defaultProps={size:"body",color:"primary",align:"left"};var s5=oo(v||(v=sw(["\n  outline: 2px auto -webkit-focus-ring-color;\n  outline: 2px auto Highlight;\n  outline-offset: 2px;\n"]))),s3=oh.button(y||(y=sw(["\n  all: unset;\n\n  cursor: pointer;\n  font-family: ",";\n\n  &:focus-visible {\n    ","\n  }
1\n\n  &:disabled {\n    cursor: not-allowed;\n  }\n"])),function(e){return e.theme.typography.fontFamily},s5),s4=oh(s3)(_||(_=sw(["\n  &:focus-visible {\n    // Move the focus ring to the inner SVG\n    outline: none;\n\n    svg {\n      ","\n    }\n  }\n"])),s5),s6=function(e){var t=e.color;return rm.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:t}))},s8=function(e){var t=e.onClick,n=ov(),r=o7()._;return rm.createElement(s4,{type:"button",onClick:t,"aria-label":r({id:"button.back.ariaLabel",message:"Back"})},rm.createElement(s6,{color:n.colors.primary}))},s7=function(){return rm.createElement("svg",{width:"200",height:"200",viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("g",{opacity:"0.1"},rm.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.9999 0C155.229 0 200 44.7715 200 99.9999C200 155.229 155.229 200 99.9999 200C44.7715 200 0 155.229 0 99.9999C0 44.7715 44.7715 0 99.9999 0Z",fill:"url(#paint0_linear_4408_12810)"})),rm.createElement("g",{opacity:"0.3"},rm.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.9993 17.5723C145.523 17.5723 182.427 54.4762 182.427 99.9993C182.427 145.523 145.523 182.427 99.9993 182.427C54.4762 182.427 17.5723 145.523 17.5723 99.9993C17.5723 54.4762 54.4762 17.5723 99.9993 17.5723Z",fill:"url(#paint1_linear_4408_12810)"})),rm.createElement("g",{opacity:"0.7"},rm.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M99.9987 32.2305C137.487 32.2305 167.877 62.6203 167.877 100.108C167.877 137.596 137.487 167.986 99.9987 167.986C62.5109 167.986 32.1211 137.596 32.1211 100.108C32.1211 62.6203 62.5109 32.2305 99.9987 32.2305Z",fill:"url(#paint2_linear_4408_12810)"})),rm.createElement("path",{d:"M100 45.8334C70.1 45.8334 45.8333 70.1 45.8333 100C45.8333 129.9 70.1 154.167 100 154.167C129.9 154.167 154.167 129.9 154.167 100C154.167 70.1 129.9 45.8334 100 45.8334ZM105.417 127.083H94.5833V116.25H105.417V127.083ZM105.417 105.417H94.5833V72.9167H105.417V105.417Z",fill:"#8B1214"}),rm.createElement("defs",null,rm.createElement("linearGradient",{id:"paint0_linear_4408_12810",x1:"-87.1375",y1:"160.384",x2:"169.669",y2:"338.297",gradientUnits:"userSpaceOnUse"},rm.createElement("stop",{stopColor:"white"}),rm.createElement("stop",{offset:"1",stopColor:"#8B1214"})),rm.createElement("linearGradient",{id:"paint1_linear_4408_12810",x1:"-87.138",y1:"160.384",x2:"169.668",y2:"338.297",gradientUnits:"userSpaceOnUse"},rm.createElement("stop",{stopColor:"#F7F0F0"}),rm.createElement("stop",{offset:"1",stopColor:"#8B1214"})),rm.createElement("linearGradient",{id:"paint2_linear_4408_12810",x1:"-87.1386",y1:"160.493",x2:"169.668",y2:"338.405",gradientUnits:"userSpaceOnUse"},rm.createElement("stop",{stopColor:"#8B1214",stopOpacity:"0.01"}),rm.createElement("stop",{offset:"1",stopColor:"#E4C7C7"}))))},s9=oh(s1)(b||(b=sw(["\n  text-align: center;
1\n"]))),ce=function(e){var t=e.text,n=e.onGoBack,r=o7()._;return rm.createElement(s0,{direction:"column",gap:24},n&&rm.createElement(s8,{onClick:n}),rm.createElement(s0,{direction:"column",gap:24,alignItems:"center"},rm.createElement(s9,{size:"header"},r({id:"error.title",message:"Looks like there was an error!"})),rm.createElement(s7,null),rm.createElement(s1,null,t)))},ct=function(){var e,t=sb(sG(),2),n=t[0],r=t[1],i=o7()._,o=n.error,a=o.type,s=o.canGoBack,c=null==(e=n.flowState.organization)?void 0:e.organization_name,u=sy(sy(sy(sy(sy(sy({},eX.Default,i({id:"error.default",message:"Something went wrong. Try again later or contact your admin for help."})),eX.EmailMagicLink,i({id:"error.eml",message:"Something went wrong. Your login link may have expired, been revoked, or been used more than once. Request a new login link to try again, or contact your admin for help."})),eX.Organization,i({id:"error.organization",message:"The organization you are looking for could not be found. If you think this is a mistake, contact your admin."})),eX.CannotJoinOrgDueToAuthPolicy,i(c?{id:"error.authPolicyWithOrg",message:"Unable to join due to {organizationName}'s authentication policy. Please contact your admin for more information.",values:{organizationName:c}}:{id:"error.authPolicyNoOrg",message:"Unable to join due to the organization's authentication policy. Please contact your admin for more information."})),eX.AdBlockerDetected,i({id:"error.adBlockerDetected",message:"The request was blocked by an Ad Blocker. Please disable your ad blocker, refresh the page, and try again."})),eX.OrganizationDiscoveryClaimedDomain,i({id:"error.claimedDomain",message:"Your email domain is associated with a particular organization, so you are unable to join or create other organizations. Please contact your admin for more information."})),l=ny(function(){if(s)return function(){return r({type:"transition",screen:e0.Main})}},[s,r]);return rm.createElement(ce,{text:u[a],onGoBack:l})},cn=oh.input(w||(w=sw(["\n  background-color: ",";\n  height: 47px;\n  padding: 0 8px;\n  box-sizing: border-box;\n  border: 1px solid ",";\n  border-radius: ",";\n  color: ",";\n  font-family: ",";\n  font-size: 18px;\n\n  &::placeholder {\n    color: ",";\n  }\n\n  &:disabled {\n    border: 1px solid ",";\n    color: ",";\n    background-color: ",";\n  }\n"])),function(e){return e.theme.inputs.backgroundColor},function(e){return e.theme.inputs.borderColor},function(e){return e.theme.inputs.borderRadius},function(e){return e.theme.inputs.textColor},function(e){return e.theme.typography.fontFamily},function(e){return e.theme.inputs.placeholderColor},function(e){return e.theme.colors.disabledText},function(e){return e.theme.colors.disabledText},function(e){return e.theme.colors.disabled}),cr=function(e){var t=e.email,n=e.setEmail,r=e.disableInput,i=e.hasPasskeys,o=void 0!==i&&i,a=(0,ti._)(e,["email","setEmail","disableInput","hasPasskeys"]),s=o7()._;return rm.createElement(cn,Object.assign({placeholder:s({id:"formField.email.placeholder",message:"[email protected]"}),name:"email",type:"email",autoComplete:o?"username webauthn":"email",disabled:void 0!==r&&r,id:"email-input",value:t,onChange:function(e){return n(e.target.value)},required:!0},o?sn:{},a))},ci=/https:\/\/stytch\.com\/[#a-zA-Z0-9/-]+/g,co=function(e){for(var t=e.split(ci),n=Array.from(e.matchAll(ci)).map(function(e){return e[0]}),r=[];t.length||n.length;)if(t.length&&r.push(t.shift()),n.length){var i=n.shift();r.push(rm.createElement("a",{key:i+"__"+String(n.length),href:i,target:"_blank",rel:"noreferrer"},i))}return r},ca=function(e){var t=e.errorMessage,n=e.id,r=ny(function(){return co(t)},[t]);return rm.createElement(s1,{size:"helper",color:"error",id:n},r)},cs=oh(s3)(k||(k=sw(["\n  width: 100%;\n  height: 45px;\n  font-size: 18px;\n  text-transform: none;\n  box-shadow: none;\n  text-align: center;\n\n  ","\n\n  &:disabled {\n    background-color: ",";\n    color: ",";\n    border: ",";\n    border-radius: ",";\n  }\n"])),function(e){switch(e.variant){case"primary":return"\n          border: ".concat(e.theme.buttons.primary.border,";\n          border-radius: ").concat(e.theme.buttons.primary.borderRadius,";\n          color: ").concat(e.theme.buttons.primary.textColor,";\n          background-color: ").concat(e.theme.buttons.primary.backgroundColor,";\n        ");case"outlined":return"\n          border: ".concat(e.theme.buttons.secondary.border,";\n          border-radius: ").concat(e.theme.buttons.secondary.borderRadius,";\n          color: ").concat(e.theme.buttons.secondary.textColor,";\n          background-color: ").concat(e.theme.buttons.secondary.backgroundColor,";\n        ");case"text":return"\n          color: ".concat(e.theme.colors.primary,";\n          background-color: transparent;\n          font-weight: 600;\n        ")}},function(e){return e.theme.buttons.disabled.backgroundColor},function(e){return e.theme.buttons.disabled.textColor},function(e){return e.theme.buttons.disabled.border},function(e){return e.theme.buttons.disabled.borderRadius});cs.defaultProps={variant:"primary"};var cc=og(S||(S=sw(["\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n"]))),cu=og(C||(C=sw(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"]))),cl=oh.circle(E||(E=sw(["\n  stroke-dasharray: 80px, 200px;\n  stroke-dashoffset: 0;\n  animation: "," 1.4s ease-in-out infinite;\n  stroke: ",";\n  fill: none;\n"])),cu,function(e){return e.theme.colors.primary}),cd=oh.div(O||(O=sw(["\n  width: ","px;\n  height: ","px;\n  animation: "," 1.4s ease-in-out infinite;\n"])),function(e){return e.size},function(e){return e.size},cc),cf=oh.svg(x||(x=sw(["\n  display: block;\n"]))),cp=function(e){var t=e.size,n=e.thickness;return rm.createElement(cd,{size:t}
1,rm.createElement(cf,{viewBox:"".concat(t/2," ").concat(t/2," ").concat(t," ").concat(t)},rm.createElement(cl,{cx:t,cy:t,r:(t-n)/2,fill:"none",strokeWidth:n})))},cm=function(e){var t=e.children,n=e.isLoading,r=(0,ti._)(e,["children","isLoading"]);return rm.createElement(cs,Object.assign({},r),n?rm.createElement(s0,{justifyContent:"center"},rm.createElement(cp,{size:18,thickness:1,"data-testid":"loading-icon"})):t)},ch=function(e){var t=e.isSubmitting,n=e.disabled,r=e.text,i=e.variant,o=t||n;return rm.createElement(cm,{isLoading:t,type:"submit",disabled:o,variant:i},r)},cg=function(e){var t="",n=!1,r=[],i={},o=void 0;return"string"==typeof e?t=e:(t=e.type,e.type===ti.c.Google&&"one_tap"in e&&(n=e.one_tap,o=e.cancel_on_tap_outside),r=e.customScopes||[],i=e.providerParams||{}),{type:t,one_tap:n,customScopes:r,providerParams:i,cancel_on_tap_outside:o}},cv=sy(sy(sy(sy(sy({},ti.a.oauth,void 0),ti.a.sso,"sso"),ti.a.emailMagicLinks,"magic_link"),ti.a.emailOtp,"email_otp"),ti.a.passwords,"password"),cy=sy(sy(sy(sy(sy({},ti.c.Google,"google_oauth"),ti.c.Microsoft,"microsoft_oauth"),ti.c.HubSpot,"hubspot_oauth"),ti.c.Slack,"slack_oauth"),ti.c.GitHub,"github_oauth"),c_=Object.fromEntries(Object.entries(cv).map(function(e){var t=sb(e,2),n=t[0];return[t[1],n]})),cb=Object.fromEntries(Object.entries(cy).map(function(e){var t=sb(e,2),n=t[0];return[t[1],n]})),cw=function(e){return e in cb?ti.a.oauth:c_[e]},ck=Object.keys(cv),cS=Object.values(ti.c),cC=function(e,t){return e.flatMap(function(e){if(e===ti.a.oauth)return t.map(function(e){var t=cy["string"==typeof e?e:e.type];if(t)return t});var n=cv[e];if(n)return n}).filter(ai)},cE=function(){var e,t=sW();return ny(function(){var e;return(null==(e=t.oauthOptions)?void 0:e.providers)?t.oauthOptions.providers.map(cg):[]},[null==(e=t.oauthOptions)?void 0:e.providers])},cO=function(){var e,t,n=sb(sG(),1)[0],r=n.primary.primaryAuthMethods;return{restrictedAuthMethods:ny(function(){var e,t,r;return n.primary.primaryAuthMethods?new Set(n.primary.primaryAuthMethods):(null==(e=n.flowState.organization)?void 0:e.auth_methods)==="RESTRICTED"?new Set(null!=(r=null==(t=n.flowState.organization)?void 0:t.allowed_auth_methods)?r:[]):void 0},[null==(e=n.flowState.organization)?void 0:e.allowed_auth_methods,null==(t=n.flowState.organization)?void 0:t.auth_methods,n.primary.primaryAuthMethods]),hasPrimaryAuthMethods:!!r}},cx=function(){var e,t=sb(sG(),1)[0],n=sW(),r=cO(),i=r.restrictedAuthMethods,o=r.hasPrimaryAuthMethods,a=cE(),s=ny(function(){return cC(n.products,a)},[n.products,a]),c=ny(function(){if(!i)return s;var e,n=s.filter(function(e){return i.has(e)});return n.length>0||!o?n:(null==(e=t.flowState.organization)?void 0:e.auth_methods)==="RESTRICTED"?cC(ck,cS).filter(function(e){return i.has(e)}):["magic_link"]},[s,o,i,null==(e=t.flowState.organization)?void 0:e.auth_methods]);return{products:ny(function(){return sk(new Set(c.map(cw).filter(ai)))},[c]),oauthProviderSettings:ny(function(){return c.map(function(e){var t,n=cb[e];if(n)return null!=(t=a.find(function(e){return e.type===n}))?t:cg(n)}).filter(ai)},[c,a])}},cP=function(){return new Date(Date.now()+6e5)},cA=(l=function(){return function(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=a3().mutate,a=ng(e),s=ng(t),c=ng(i),u=ng(0),l=sb(a6({data:ak,error:ak,isMutating:!1}),3),d=l[0],f=l[1],p=l[2],m=d.current,h=n_((n=sh().m(function e(t,n){var r,i,l,d,f,m,h;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:if(i=(r=sb(aG(a.current),2))[0],l=r[1],s.current){e.n=1;break}throw Error("Can’t trigger the mutation: missing fetcher.");case 1:if(i){e.n=2;break}throw Error("Can’t trigger the mutation: missing key.");case 2:return d=aO(aO({populateCache:!1,throwOnError:!0},c.current),n),u.current=f=aq(),p({isMutating:!0}),e.p=3,e.n=4,o(i,s.current(l,{arg:t}),aO(d,{throwOnError:!0}));case 4:return m=e.v,u.current<=f&&(p({data:m,isMutating:!1,error:void 0}),null==d.onSuccess||d.onSuccess(m,i,d)),e.a(2,m);case 5:if(e.p=5,h=e.v,!(u.current<=f)||(p({error:h,isMutating:!1}),null==d.onError||d.onError(h,i,d),!d.throwOnError)){e.n=6;break}throw h;case 6:return e.a(2)}},e,null,[[3,5]])}),r=function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(e){sv(o,r,i,a,s,"next",e)}function s(e){sv(o,r,i,a,s,"throw",e)}a(void 0)})},function(e,t){return r.apply(this,arguments)}),[]),g=n_(function(){u.current=aq(),p({data:ak,error:ak,isMutating:!1})},[]);return aU(function(){a.current=e,s.current=t,c.current=i}),{trigger:h,reset:g,get data(){return f.data=!0,m.data},get error(){return f.error=!0,m.error},get isMutating(){return f.isMutating=!0,m.isMutating}}}},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=tl(a5(t),3),i=r[0],o=r[1],a=r[2],s=(a.use||[]).concat(l);return a9(i,o,tf(tf({},a),{},{use:s}))}),cT={"stytch.magicLinks.authenticate":ti.S.B2BMagicLinkAuthenticate,"stytch.sso.authenticate":ti.S.B2BSSOAuthenticate,"stytch.sso.discoverConnections":ti.S.B2BSSODiscoverConnections,"stytch.magicLinks.discovery.authenticate":ti.S.B2BMagicLinkDiscoveryAuthenticate,"stytch.discovery.organizations.create":ti.S.B2BDiscoveryOrganizationsCreate,"stytch.discovery.intermediateSessions.exchange":ti.S.B2BDiscoveryIntermediateSessionExchange,"stytch.magicLinks.email.loginOrSignup":ti.S.B2BMagicLinkEmailLoginOrSignup,"stytch.magicLinks.email.discovery.send":ti.S.B2BMagicLinkEmailDiscoverySend,"stytch.oauth.authenticate":ti.S.B2BOAuthAuthenticate,"stytch.oauth.discovery.authenticate":ti.S.B2BOAuthDiscoveryAuthenticate,"stytch.otps.sms.send":ti.S.B2BSMSOTPSend,"stytch.otps.sms.authenticate":ti.S.B2BSMSOTPAuthenticate,"stytch.totp.create":ti.S.B2BTOTPCreate,"stytch.totp.authenticate":ti.S.B2BTOTPAuthenticate,"stytch.recoveryCodes.recover":ti.S.B2BRecoveryCodesRecover,"stytch.impersonation.authenticate":ti.S.B2BImpersonationAuthenticate,"stytch.otps.email.authenticate":ti.S.B2BOTPsEmailAuthenticate,"stytch.otps.email.discovery.authenticate":ti.S.B2BOTPsEmailDiscoveryAuthenticate,"stytch.otps.email.discovery.send":ti.S.B2BOTPsEmailDiscoverySend,"stytch.otps.email.loginOrSignup":ti.S.B2BOTPsEmailLoginOrSignup,"stytch.organization.getBySlug":ti.S.B2BOrganizationsGetBySlug},cD=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=sV(),i=sq();return cA(e,t,Object.assign(Object.assign({throwOnError:!1},n),{onSuccess:function(e,t,i){var o,a=cT[t];a&&r({type:a,data:e}),null==(o=n.onSuccess)||o.call(n,e,t,i)},onError:function(e,t,r){var o;i(e),null==(o=n.onError)||o.call(n,e,t,r)}}))},cF=function(){var e,t=sb(sG(),2),n=t[0],r=t[1],i=sb(nf(),2),o=i[0],a=i[1],s=sW(),c=sK(),u=null!=(e=s.organizationSlug)?e:cI(o||null,window.location.href),l=cD("stytch.organization.getBySlug",function(e,t){var n=t.arg.slug;return c.organization.getBySlug({organization_slug:n})},{onSuccess:function(e){var t=e.organization;null===t?r({type:"set_error_message_and_transition",errorType:eX.Organization,canGoBack:!1}):r({type:"set_organization",organization:Object.assign({},t)})}}),d=l.trigger,f=l.isMutating;return nm(function(){(0,ti.r)(c).bootstrap.getAsync().then(function(e){a(e.slugPattern)})},[c]),nm(function(){null!==u&&null===n.flowState.organization&&n.screen===e0.Main&&n.flowState.type==ti.A.Organization&&d({slug:u})},[u,n.flowState,n.screen]),{slug:u,resultPending:void 0===o||f}},cj=function(){var e=sK(),t=sb(nf((0,ti.r)(e).bootstrap.getSync()),2),n=t[0],r=t[1];return nm(function(){(0,ti.r)(e).bootstrap.getAsync().then(function(e){r(e)})},[e]),n},cR=function(e,t,n){t({type:"primary_authenticate_success",response:e,includedMfaMethods:n.mfaProductInclude})},cz=function(e,t){t({type:"set_discovery_state",email:e.email_address,discoveredOrganizations:e.discovered_organizations})},cI=function(e,t){if(null===e)return null;var n=new URL(t);n.search="";var r=n.toString().trim(),i=new RegExp(e.replace(/\./g,"\\.").replace(/\*/g,"(?:[^.]+)").replace("{{slug}}","(.+)")),o=r.match(i);return o&&o[1]?o[1]:null},cL=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.throwOnError,n=sb(sG(),2)[1],r=sK(),i=sW();return cD("stytch.otps.email.discovery.send",function(e,t){var n,o,a=t.arg.email;return r.otps.email.discovery.send({email_address:a,login_template_id:null==(n=i.emailOtpOptions)?void 0:n.loginTemplateId,locale:null==(o=i.emailOtpOptions)?void 0:o.locale})},{onSuccess:function(){n({type:"send_email_otp",codeExpiration:cP()})},throwOnError:t})},cM=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.throwOnError,n=sb(sG(),2)[1],r=sK(),i=sW();return cD("stytch.otps.email.loginOrSignup",function(e,t){var n,o,a,s=t.arg,c=s.email,u=s.organization_id;return r.otps.email.loginOrSignup({email_address:c,organization_id:u,login_template_id:null==(n=i.emailOtpOptions)?void 0:n.loginTemplateId,signup_template_id:null==(o=i.emailOtpOptions)?void 0:o.signupTemplateId,locale:null==(a=i.emailOtpOptions)?void 0:a.locale})},{onSuccess:function(){n({type:"send_email_otp",codeExpiration:cP()})},throwOnError:t})},cB=function(){var e=sb(sG(),2)[1],t=sK(),n=sW();return cD("stytch.magicLinks.email.discovery.send",function(e,r){var i,o,a,s=r.arg.email;return t.magicLinks.email.discovery.send({email_address:s,discovery_redirect_url:null==(i=n.emailMagicLinksOptions)?void 0:i.discoveryRedirectURL,login_template_id:null==(o=n.emailMagicLinksOptions)?void 0:o.loginTemplateId,locale:null==(a=n.emailMagicLinksOptions)?void 0:a.locale})},{onSuccess:function(){e({type:"transition",screen:e0.EmailConfirmation})}})},cN=function(){var e=sb(sG(),2)[1],t=sK(),n=sW();return cD("stytch.magicLinks.email.loginOrSignup",function(e,r){var i,o,a,s,c,u=r.arg,l=u.email,d=u.organization_id;return t.magicLinks.email.loginOrSignup({email_address:l,organization_id:d,login_redirect_url:null==(i=n.emailMagicLinksOptions)?void 0:i.loginRedirectURL,signup_redirect_url:null==(o=n.emailMagicLinksOptions)?void 0:o.signupRedirectURL,login_template_id:null==(a=n.emailMagicLinksOptions)?void 0:a.loginTemplateId,signup_template_id:null==(s=n.emailMagicLinksOptions)?void 0:s.signupTemplateId,locale:null==(c=n.emailMagicLinksOptions)?void 0:c.locale})},{onSuccess:function(){e({type:"transition",screen:e0.EmailConfirmation})},onError:function(e){ti.l.error(e)}})},cU=oh(cs).attrs({variant:"text",type:"button"})(P||(P=sw(["\n  ",";\n  color: ",";\n  font-weight: bold;\n  height: auto;\n"])),function(e){return e.theme.typography.body},function(e){var t=e.theme,n=e.themeColor;return t.colors[void 0===n?"secondary":n]}),cH=function(e){var t=e.email,n=sb(sG(),2)[1],r=o7()._;return rm.createElement(cU,{themeColor:"primary",onClick:function(){n({type:"use_password_auth",email:t})}},r({id:"button.usePassword",message:"Use a password instead"}))},cK=function(e){if(e&&"object"===sm(e)&&"error_type"in e&&"string"==typeof e.error_type)return e.error_type}
1,cG={invalid_email:{id:"error.invalidEmail",message:"Email format is invalid."},invalid_phone_number:{id:"error.invalidPhoneNumber",message:"Phone number format is invalid. Ensure the phone number is in the E.164 format."},unsubscribed_phone_number:{id:"error.unsubscribedPhoneNumber",message:"Phone number is unsubscribed. User has unsubscribed. Resubscribe by texting 'START' before messages can be sent."},inactive_email:{id:"error.inactiveEmail",message:"The email address is marked as inactive. Please try another email address, or contact your admin if you think this is a mistake."},unauthorized_credentials:{id:"error.unauthorizedCredentials",message:"Unauthorized credentials."},user_unauthenticated:{id:"error.userUnauthenticated",message:"Must have an active session to call this method. Have you logged in yet?"},email_not_found:{id:"error.emailNotFound",message:"Email not found."},unable_to_auth_magic_link:{id:"error.unableToAuthMagicLink",message:"The magic link could not be authenticated because it was either already used or expired. Please try again."},no_user_password:{id:"error.noUserPassword",message:"Password not found for this user. Please try again."},breached_password:{id:"error.breachedPassword",message:"Password appears in the list of breached passwords and must be reset."},reset_password:{id:"error.resetPassword",message:"Password must be reset."},oauth_token_not_found:{id:"error.oauthTokenNotFound",message:"OAuth Token could not be found."},invalid_code:{id:"error.invalidCode",message:"Code format is invalid, please try again."},member_password_not_found:{id:"error.memberPasswordNotFound",message:"Member password not found."},oauth_flow_callback_error:{id:"error.oauthFlowCallbackError",message:"An error was encountered in the callback of the OAuth flow. Please try again."},unauthorized_action:{id:"error.unauthorizedAction",message:"Unauthorized action."},user_lock_limit_reached:{id:"error.userLockLimitReached",message:"Too many failed authentication attempts. Please try again later."},invalid_session_token:{id:"error.invalidSessionToken",message:"Invalid session token."},session_not_found:{id:"error.sessionNotFound",message:"Session not found."},invalid_phone_number_country_code:{id:"error.invalidPhoneNumberCountryCode",message:"The phone number's country code is invalid, unsupported, or disabled."},otp_code_not_found:{id:"error.otpCodeNotFound",message:"Invalid passcode, please try again."},duplicate_member_phone_number:{id:"error.duplicatePhoneNumber",message:"A member with the specified phone number already exists for this organization."}},cW=function(e,t){var n=cG[cK(e)];return n?t(n):e.error_message},cq=["email_jit_provisioning_not_allowed","invalid_email_for_jit_provisioning"],cV=function(){var e=o7()._;return function(t,n){var r=n.email,i=n.org;return cq.includes(t.error_type)?e({id:"error.jitIneligible",message:"{email} does not have access to {organizationName}. If you think this is a mistake, contact your admin",values:{email:r,organizationName:i}}):cW(t,e)}},c$=function(e){var t=e.showPasswordButton,n=sb(sG(),2),r=n[0],i=n[1],o=sb(nf(r.formState.passwordState.email),2),a=o[0],s=o[1],c=cV(),u=o7()._,l=cx().products,d=l.includes(ti.a.emailMagicLinks),f=l.includes(ti.a.emailOtp),p=r.primary.email,m=p||a,h=cN(),g=h.trigger,v=h.error,y=h.isMutating,_=cM(),b=_.trigger,w=_.error,k=_.isMutating,S=y||k,C=v||w,E=s2(C),O=u({id:"formField.email.label",message:"Email"}),x=r.flowState.organization;return x?p?rm.createElement(s0,{direction:"column",gap:12},rm.createElement(s0,{direction:"column",gap:8},l.filter(function(e){return e===ti.a.emailMagicLinks||e===ti.a.emailOtp}).map(function(e){switch(e){case ti.a.emailMagicLinks:return rm.createElement(cm,{key:e,type:"button",onClick:function(){i({type:"set_user_supplied_email",email:m}),g({email:m,organization_id:x.organization_id})},isLoading:y,disabled:S,variant:"text"},u({id:"button.emailLink",message:"Email me a link"}));case ti.a.emailOtp:return rm.createElement(cm,{key:e,type:"button",onClick:function(){i({type:"set_user_supplied_email",email:m}),b({email:m,organization_id:x.organization_id})},isLoading:k,disabled:S,variant:"text"},u({id:"button.emailCode",message:"Email me a code"}))}})),t&&rm.createElement(cH,{email:m})):rm.createElement("form",{onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){return sh().w(function(t){for(;;)switch(t.n){case 0:e.preventDefault(),i({type:"set_user_supplied_email",email:m}),d&&f?i({type:"transition",screen:e0.EmailMethodSelection,history:"push"}):d?g({email:m,organization_id:x.organization_id}):f&&b({email:m,organization_id:x.organization_id});case 1:return t.a(2)}},t)}))}},rm.createElement(s0,{direction:"column",gap:12},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",minHeight:52},rm.createElement(cr,Object.assign({email:m,setEmail:s,"aria-label":O},E.input)),C&&rm.createElement(ca,Object.assign({errorMessage:c(C,{email:m,org:x.organization_name})},E.error))),rm.createElement(ch,{isSubmitting:S,text:u({id:"button.continueWithEmail",message:"Continue with email"})})),t&&rm.createElement(cH,{email:m}))):rm.createElement(rm.Fragment,null)},cZ=function(e){var t=e.showPasswordButton,n=sb(sG(),2),r=n[0],i=n[1],o=sb(nf(r.formState.passwordState.email),2),a=o[0],s=o[1],c=o7()._,u=cx().products,l=u.includes(ti.a.emailMagicLinks),d=u.includes(ti.a.emailOtp),f=cB(),p=f.trigger,m=f.error,h=f.isMutating,g=cL(),v=g.trigger,y=g.error,_=g.isMutating,b=m||y,w=s2(b),k=c({id:"formField.email.label",message:"Email"});return rm.createElement("form",{onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){return sh().w(function(t){for(;;)switch(t.n){case 0:e.preventDefault(),i({type:"set_user_supplied_email",email:a}),l&&d?i({type:"transition",screen:e0.EmailMethodSelection,history:"push"}):l?p({email:a}):d&&v({email:a});case 1:return t.a(2)}},t)}))}},rm.createElement(s0,{direction:"column",gap:12},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",minHeight:52},rm.createElement(cr,Object.assign({email:a,setEmail:s,"aria-label":k},w.input)),b&&rm.createElement(ca,Object.assign({errorMessage:cW(b,c)},w.error))),rm.createElement(ch,{isSubmitting:h||_,text:c({id:"button.continueWithEmail",message:"Continue with email"})})),t&&rm.createElement(cH,{email:a})))},cY=oh(s0)(A||(A=sw(["\n  color: ",";\n"])),function(e){return e.theme.colors.secondary}),cJ=oh.div(T||(T=sw(["\n  ","\n  ","\n  border-bottom: 1px solid ",";\n  flex-grow: 1;\n"])),function(e){return"left"===e.$placement&&"margin-right: 6px;"},function(e){return"right"===e.$placement&&"margin-left: 6px;"},function(e){return e.theme.colors.secondary}),cQ=oh(s1)(D||(D=sw(["\n  color: ",";\n"])),function(e){return e.theme.colors.secondary}),cX=function(){var e=o7()._;return rm.createElement(cY,{alignItems:"center"},rm.createElement(cJ,{$placement:"left"}),rm.createElement(cQ,null,e({id:"methodDivider.text",message:"or"})),rm.createElement(cJ,{$placement:"right"}))},c0=function(){return tU(s0,{direction:"column",gap:36,alignItems:"center"},tU(s1,{size:"header"},(0,o7()._)({id:"login.loading",message:"Logging in..."})),tU(cp,{size:100,thickness:8}))},c1=function(){return tU(s0,{direction:"column",gap:36,alignItems:"center"},tU(cp,{size:100,thickness:8}))},c2=function(){return rm.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M12 6.5c3.79 0 7.17 2.13 8.82 5.5-1.65 3.37-5.02 5.5-8.82 5.5S4.83 15.37 3.18 12C4.83 8.63 8.21 6.5 12 6.5m0-2C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5m0 5c1.38 0 2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5-2.5-1.12-2.5-2.5 1.12-2.5 2.5-2.5m0-2c-2.48 0-4.5 2.02-4.5 4.5s2.02 4.5 4.5 4.5 4.5-2.02 4.5-4.5-2.02-4.5-4.5-4.5",fill:"currentColor"}))},c5=function(){return rm.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6m-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14M2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45zm7.5 7.5 2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13m-3.4-3.4 1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.7
17-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53",fill:"currentColor"}))},c3=oh.input(F||(F=sw(["\n  border: 0;\n  padding: 0;\n  width: 100%;\n\n  background-color: transparent;\n  height: 45px;\n  color: ",";\n  font-family: ",";\n  font-size: 18px;\n\n  &::placeholder {\n    color: ",";\n  }\n\n  &:disabled {\n    color: ",";\n    background-color: ",";\n  }\n\n  &:focus {\n    outline: none;\n  }\n"])),function(e){return e.theme.inputs.textColor},function(e){return e.theme.typography.fontFamily},function(e){return e.theme.inputs.placeholderColor},function(e){return e.theme.colors.disabledText},function(e){return e.theme.colors.disabled}),c4=oh(s0)(j||(j=sw(["\n  background-color: ",";\n  height: 45px;\n  padding-left: 8px;\n  padding-right: 8px;\n  border: 1px solid ",";\n  border-radius: ",";\n  color: ",";\n  font-family: ",";\n  font-size: 18px;\n  width: calc(100% - 18px);\n\n  &:focus-within {\n    outline: 1px auto;\n  }\n"])),function(e){return e.theme.inputs.backgroundColor},function(e){return e.theme.inputs.borderColor},function(e){return e.theme.inputs.borderRadius},function(e){return e.theme.inputs.textColor},function(e){return e.theme.typography.fontFamily}),c6=oh(s3)(R||(R=sw(["\n  height: 20px;\n  color: ",";\n\n  &:disabled {\n    cursor: default;\n  }\n"])),function(e){return e.passwordEntered?e.theme.inputs.textColor:e.theme.colors.disabledText}),c8=function(e){var t=e.onClick,n=e.passwordEntered,r=e.visible,i=o7()._;return rm.createElement(c6,{onClick:t,type:"button",passwordEntered:n,"aria-label":i(r?{id:"button.hidePassword",message:"Hide password"}:{id:"button.showPassword",message:"Show password"})},r?rm.createElement(c5,null):rm.createElement(c2,null))},c7=function(e){var t=e.password,n=e.setPassword,r=e.type,i=(0,ti._)(e,["password","setPassword","type"]),o=sb(nf(!1),2),a=o[0],s=o[1];return rm.createElement(c4,{gap:2,alignItems:"center"},rm.createElement(c3,Object.assign({name:"password",id:"".concat(r,"-password"),autoComplete:"".concat(r,"-password"),type:a?"text":"password",value:t,onChange:function(e){return n(e.target.value)},required:!0},i)),rm.createElement(c8,{onClick:function(){return s(function(e){return!e})},passwordEntered:!!t,visible:a}))},c9=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=sW(),i=sK(),o=o7()._,a=sV(),s=sq(),c=sb(nf(t.formState.passwordState.email),2),u=c[0],l=c[1],d=sb(nf(""),2),f=d[0],p=d[1],m=sb(nf(""),2),h=m[0],g=m[1],v=sb(nf(!1),2),y=v[0],_=v[1],b=t.flowState.organization,w=function(e,t){var n=e.email_jit_provisioning,r=e.email_allowed_domains;switch(n){case"ALL_ALLOWED":return!0;case"NOT_ALLOWED":return!1;case"RESTRICTED":var i=t.split("@").pop();return null!=i&&r.includes(i)}};return{stytch:i,onError:s,email:u,setEmail:l,password:f,setPassword:p,organization:b,errorMessage:h,setErrorMessage:g,isSubmitting:y,setIsSubmitting:_,submitPassword:function(e){var t,c,l;g(""),_(!0),i.passwords.authenticate({email_address:u,organization_id:e,password:f,session_duration_minutes:null!=(c=null==(t=r.sessionOptions)?void 0:t.sessionDurationMinutes)?c:ti.D,locale:null==(l=r.passwordOptions)?void 0:l.locale}).then(function(e){_(!1),a({type:ti.S.B2BPasswordAuthenticate,data:e}),cR(e,n,r)}).catch(function(e){_(!1),s(e),g(cW(e,o))})},submitDiscoveryPassword:function(){g(""),_(!0),i.passwords.discovery.authenticate({email_address:u,password:f}).then(function(e){_(!1),a({type:ti.S.B2BPasswordDiscoveryAuthenticate,data:e}),n({type:"transition",screen:e0.Discovery}),n({type:"set_discovery_state",email:e.email_address,discoveredOrganizations:e.discovered_organizations})}).catch(function(e){_(!1),s(e),g(cW(e,o))})},handleNonMemberReset:function(){if(b){if(!w(b,u)){var e,t,a,c,l;_(!1),g(o({id:"error.emailNoAccessToOrg",message:"{email} does not have access to {organizationName}. If you think this is a mistake, contact your admin.",values:{email:u,organizationName:b.organization_name}}));return}(0,ti.r)(i).dataLayer.setItem("reset-email-value",u),i.magicLinks.email.loginOrSignup({email_address:u,organization_id:b.organization_id,login_redirect_url:null==(e=r.passwordOptions)?void 0:e.resetPasswordRedirectURL,signup_redirect_url:null==(t=r.passwordOptions)?void 0:t.resetPasswordRedirectURL,login_template_id:null==(a=r.emailMagicLinksOptions)?void 0:a.loginTemplateId,signup_template_id:null==(c=r.emailMagicLinksOptions)?void 0:c.signupTemplateId,locale:null==(l=r.emailMagicLinksOptions)?void 0:l.locale}).then(function(){_(!1),n({type:"set_password_state",email:u}),n({type:"transition",screen:e0.PasswordResetVerifyConfirmation})}).catch(function(e){s(e),g(cW(e,o)),_(!1)})}}}},ue=oh.label(z||(z=sw(["\n  all: unset;\n  display: block;\n  cursor: default;\n  width: fit-content;\n\n  color: ",";\n  ",";\n"])),function(e){return e.theme.colors.secondary},function(e){return e.theme.typography.helper}
1),ut=function(){var e=sb(sG(),2)[1],t=o7()._,n=c9(),r=n.stytch,i=n.email,o=n.setEmail,a=n.password,s=n.setPassword,c=n.organization,u=n.errorMessage,l=n.setErrorMessage,d=n.isSubmitting,f=n.setIsSubmitting,p=n.submitPassword,m=n.submitDiscoveryPassword,h=n.handleNonMemberReset,g=sb(nf(!!c&&!i),2),v=g[0],y=g[1],_=s2(u),b=s2(u);return rm.createElement(s0,{direction:"column",gap:36},rm.createElement("form",{onSubmit:function(n){return(0,ti.d)(void 0,void 0,void 0,sh().m(function o(){var a;return sh().w(function(o){for(;;)switch(o.n){case 0:if(n.preventDefault(),!c){o.n=3;break}if(a=c.organization_id,v){o.n=1;break}return p(a),o.a(2);case 1:if(i.match(ti.E)){o.n=2;break}return l(t({id:"error.invalidEmailAddress",message:"Invalid email address"})),o.a(2);case 2:l(""),f(!0),(0,ti.r)(r).searchManager.searchMember(i,c.organization_id).then(function(t){if(t.member){y(!1),f(!1),e({type:"set_password_state",email:i});return}h()}).catch(function(e){f(!1),l(cW(e,t))}),o.n=4;break;case 3:m();case 4:return o.a(2)}},o)}))}},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"email-input"},t({id:"formField.email.label",message:"Email"})),rm.createElement(cr,Object.assign({email:i,setEmail:o},_.input))),!v&&rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"current-password"},t({id:"formField.password.label",message:"Password"})),rm.createElement(c7,Object.assign({password:a,setPassword:s,type:"current"},b.input))),rm.createElement(ca,Object.assign({errorMessage:u},b.error)),rm.createElement(ch,{isSubmitting:d,text:t({id:"button.continue",message:"Continue"})}),!v&&rm.createElement(cU,{onClick:function(){e({type:"set_password_state",email:i}),e({type:"transition",screen:e0.PasswordForgotForm})}},t({id:"link.signupResetPassword",message:"Sign up or reset password"})))))},un=function(){var e=sW();return ny(function(){var t,n,r=e.oauthOptions?cg(null==(t=e.oauthOptions)?void 0:t.providers[0]):void 0,i=(null==r?void 0:r.type)===ti.c.Google&&(null==r?void 0:r.one_tap)===!0;return 1===e.products.length&&e.products.includes(ti.a.oauth)&&(null==(n=e.oauthOptions)?void 0:n.providers.length)===1&&i},[e])},ur=function(){var e=ng(!1);return nm(function(){return function(){e.current=!0}},[]),e},ui=oh(s0)(I||(I=sw(["\n  margin: 8px;\n"]))),uo=oh(cs)(L||(L=sw(["\n  height: auto;\n  min-height: 45px;\n"]))),ua=function(e){var t=e.children,n=e.icon,r=(0,ti._)(e,["children","icon"]);return rm.createElement(uo,Object.assign({type:"button",variant:"outlined"},r),rm.createElement(ui,{justifyContent:"center",alignItems:"center",gap:4},n,rm.createElement("span",{style:{verticalAlign:"middle"}},t)))},us=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{wrapped:!0};return function(){var n=rm.createElement(e,null);return t.wrapped?rm.createElement(s0,{height:24,width:24},n):n}},uc=us(function(){return rm.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},rm.createElement("path",{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}),rm.createElement("path",{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}),rm.createElement("path",{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"}),rm.createElement("path",{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"}))}),uu=us(function(){return rm.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M9.52382 0.952381H0.952393V9.52381H9.52382V0.952381Z",fill:"#F25022"}),rm.createElement("path",{d:"M9.52382 10.4762H0.952393V19.0476H9.52382V10.4762Z",fill:"#00A4EF"}),rm.createElement("path",{d:"M19.0475 0.952381H10.4761V9.52381H19.0475V0.952381Z",fill:"#7FBA00"}),rm.createElement("path",{d:"M19.0475 10.4762H10.4761V19.0476H19.0475V10.4762Z",fill:"#FFB900"}))}),ul=us(function(){return rm.createElement("svg",{viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.0762 13.9514C11.6819 13.9514 10.5516 12.8329 10.5516 11.4533C10.5516 10.0735 11.6819 8.95502 13.0762 8.95502C14.4704 8.95502 15.6007 10.0735 15.6007 11.4533C15.6007 12.8329 14.4704 13.9514 13.0762 13.9514ZM13.8319 6.64368V4.42127C14.4181 4.14728 14.8287 3.56045 14.8287 2.87942V2.82812C14.8287 1.8882 14.0516 1.11919 13.1018 1.11919H13.0502C12.1004 1.11919 11.3234 1.8882 11.3234 2.82812V2.87942C11.3234 3.56045 11.7339 4.14752 12.3201 4.42151V6.64368C11.4474 6.7772 10.65 7.13342 9.9923 7.65767L3.82629 2.91106C3.86699 2.75645 3.89557 2.59727 3.89581 2.42995C3.89678 1.36561 3.0262 0.50144 1.95021 0.500001C0.8747 0.498803 0.00121242 1.36058 1.2622e-06 2.42516C-0.0012099 3.48974 0.869371 4.35391 1.94536 4.35511C2.29587 4.35559 2.62046 4.25707 2.90484 4.09694L8.97009 8.76636C8.45437 9.53681 8.15207 10.4597 8.15207 11.4533C8.15207 12.4935 8.48417 13.4557 9.04518 14.247L7.20082 16.0724C7.055 16.029 6.90385 15.9988 6.74349 15.9988
1C5.85959 15.9988 5.14282 16.7079 5.14282 17.5826C5.14282 18.4576 5.85959 19.1667 6.74349 19.1667C7.62764 19.1667 8.34416 18.4576 8.34416 17.5826C8.34416 17.4244 8.31364 17.2746 8.26979 17.1303L10.0943 15.3247C10.9225 15.9502 11.9539 16.326 13.0762 16.326C15.7957 16.326 18 14.1444 18 11.4533C18 9.0171 16.1915 7.00445 13.8319 6.64368Z",fill:"#FF7A59"}))}),ud=us(function(){return rm.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M6.78176 14.3746C6.78176 15.4153 5.9316 16.2655 4.89088 16.2655C3.85016 16.2655 3 15.4153 3 14.3746C3 13.3339 3.85016 12.4837 4.89088 12.4837H6.78176V14.3746Z",fill:"#E01E5A"}),rm.createElement("path",{d:"M7.73462 14.3746C7.73462 13.3339 8.58478 12.4837 9.6255 12.4837C10.6662 12.4837 11.5164 13.3339 11.5164 14.3746V19.1091C11.5164 20.1498 10.6662 21 9.6255 21C8.58478 21 7.73462 20.1498 7.73462 19.1091V14.3746Z",fill:"#E01E5A"}),rm.createElement("path",{d:"M9.6255 6.78176C8.58478 6.78176 7.73462 5.9316 7.73462 4.89088C7.73462 3.85016 8.58478 3 9.6255 3C10.6662 3 11.5164 3.85016 11.5164 4.89088V6.78176H9.6255Z",fill:"#36C5F0"}),rm.createElement("path",{d:"M9.62541 7.73453C10.6661 7.73453 11.5163 8.58469 11.5163 9.62541C11.5163 10.6661 10.6661 11.5163 9.62541 11.5163H4.89088C3.85016 11.5163 3 10.6661 3 9.62541C3 8.58469 3.85016 7.73453 4.89088 7.73453H9.62541Z",fill:"#36C5F0"}),rm.createElement("path",{d:"M17.2183 9.62541C17.2183 8.58469 18.0684 7.73453 19.1091 7.73453C20.1499 7.73453 21 8.58469 21 9.62541C21 10.6661 20.1499 11.5163 19.1091 11.5163H17.2183V9.62541Z",fill:"#2EB67D"}),rm.createElement("path",{d:"M16.2654 9.62541C16.2654 10.6661 15.4152 11.5163 14.3745 11.5163C13.3338 11.5163 12.4836 10.6661 12.4836 9.62541V4.89088C12.4836 3.85016 13.3338 3 14.3745 3C15.4152 3 16.2654 3.85016 16.2654 4.89088V9.62541Z",fill:"#2EB67D"}),rm.createElement("path",{d:"M14.3745 17.2182C15.4152 17.2182 16.2654 18.0684 16.2654 19.1091C16.2654 20.1498 15.4152 21 14.3745 21C13.3338 21 12.4836 20.1498 12.4836 19.1091V17.2182H14.3745Z",fill:"#ECB22E"}),rm.createElement("path",{d:"M14.3745 16.2655C13.3338 16.2655 12.4836 15.4153 12.4836 14.3746C12.4836 13.3339 13.3338 12.4837 14.3745 12.4837H19.109C20.1498 12.4837 20.9999 13.3339 20.9999 14.3746C20.9999 15.4153 20.1498 16.2655 19.109 16.2655H14.3745Z",fill:"#ECB22E"}))}),uf=us(function(){return rm.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("rect",{width:"24",height:"24",rx:"12",fill:"white"}),rm.createElement("path",{d:"M12.0001 3.875C7.39828 3.875 3.66669 7.6059 3.66669 12.2084C3.66669 15.8903 6.05446 19.014 9.36558 20.1159C9.78205 20.1931 9.93495 19.9352 9.93495 19.7151C9.93495 19.5163 9.92723 18.8599 9.92364 18.1636C7.60528 18.6677 7.11608 17.1803 7.11608 17.1803C6.737 16.2171 6.1908 15.961 6.1908 15.961C5.43471 15.4438 6.2478 15.4544 6.2478 15.4544C7.08461 15.5132 7.52524 16.3131 7.52524 16.3131C8.2685 17.5871 9.47473 17.2188 9.95027 17.0059C10.0251 16.4673 10.241 16.0997 10.4794 15.8916C8.62839 15.6808 6.68263 14.9663 6.68263 11.7732C6.68263 10.8633 7.00816 10.1199 7.54125 9.53635C7.45472 9.32646 7.16948 8.47888 7.62198 7.33101C7.62198 7.33101 8.32176 7.10704 9.91426 8.18522C10.579 8.00058 11.2919 7.90798 12.0001 7.90481C12.7083 7.90798 13.4217 8.00058 14.0877 8.18522C15.6783 7.10704 16.3771 7.33101 16.3771 7.33101C16.8307 8.47888 16.5453 9.32646 16.4588 9.53635C16.9931 10.1199 17.3165 10.8633 17.3165 11.7732C17.3165 14.9739 15.367 15.6786 13.5113 15.8849C13.8102 16.1435 14.0765 16.6507 14.0765 17.4282C14.0765 18.5432 14.0669 19.4406 14.0669 19.7151C14.0669 19.9368 14.2169 20.1967 14.6393 20.1148C17.9486 19.0117 20.3334 15.8891 20.3334 12.2084C20.3334 7.6059 16.6023 3.875 12.0001 3.875ZM6.78782 15.7461C6.76946 15.7875 6.70433 15.7999 6.64499 15.7715C6.58455 15.7443 6.5506 15.6879 6.5702 15.6463C6.58813 15.6037 6.65341 15.5918 6.71371 15.6204C6.77429 15.6476 6.80879 15.7046 6.78782 15.7461ZM7.19773 16.1119C7.15798 16.1487 7.08029 16.1316 7.02758 16.0734C6.97307 16.0153 6.96286 15.9376 7.00315 15.9002C7.04414 15.8633 7.11948 15.8806 7.17413 15.9387C7.22864 15.9975 7.23927 16.0746 7.19773 16.1119ZM7.47894 16.5798C7.42788 16.6153 7.34439 16.582 7.29278 16.5079C7.24172 16.4338 7.24172 16.345 7.29389 16.3094C7.34564 16.2738 7.42788 16.3058 7.48018 16.3793C7.53111 16.4547 7.53111 16.5435 7.47894 16.5798ZM7.95454 17.1218C7.90886 17.1722 7.81157 17.1587 7.74036 17.0899C7.6675 17.0227 7.64722 16.9274 7.69303 16.877C7.73926 16.8265 7.8371 16.8407 7.90886 16.9089C7.98117 16.976 8.00325 17.072 7.95454 17.1218ZM8.56919 17.3048C8.54905 17.3701 8.45535 17.3997 8.36096 17.372
1C8.2667 17.3434 8.20502 17.267 8.22406 17.201C8.24366 17.1353 8.33777 17.1044 8.43285 17.1341C8.52697 17.1625 8.58879 17.2384 8.56919 17.3048ZM9.2687 17.3824C9.27105 17.4511 9.19101 17.5081 9.09193 17.5094C8.99229 17.5116 8.9117 17.4559 8.9106 17.3883C8.9106 17.3189 8.98884 17.2625 9.08848 17.2608C9.18756 17.2589 9.2687 17.3141 9.2687 17.3824ZM9.95589 17.3561C9.96776 17.4231 9.8989 17.492 9.8005 17.5103C9.70377 17.528 9.61421 17.4866 9.60193 17.4201C9.58992 17.3514 9.66002 17.2825 9.75662 17.2647C9.85515 17.2476 9.94333 17.2879 9.95589 17.3561Z",fill:"#161614"}))}),up=sy(sy(sy(sy(sy({},ti.c.Google,{messageDescriptor:{id:"oauth.continueWithGoogle",message:"Continue with Google"},icon:rm.createElement(uc,null)}),ti.c.Microsoft,{messageDescriptor:{id:"oauth.continueWithMicrosoft",message:"Continue with Microsoft"},icon:rm.createElement(uu,null)}),ti.c.HubSpot,{messageDescriptor:{id:"oauth.continueWithHubSpot",message:"Continue with HubSpot"},icon:rm.createElement(ul,null)}),ti.c.Slack,{messageDescriptor:{id:"oauth.continueWithSlack",message:"Continue with Slack"},icon:rm.createElement(ud,null)}),ti.c.GitHub,{messageDescriptor:{id:"oauth.continueWithGitHub",message:"Continue with GitHub"},icon:rm.createElement(uf,null)}),um={messageDescriptor:null,icon:rm.createElement(rm.Fragment,null)},uh=function(e){var t,n=e.providerType,r=e.loginRedirectUrl,i=e.signupRedirectUrl,o=e.discoveryRedirectUrl,a=e.customScopes,s=e.providerParams,c=e.onSuccess,u=o7()._,l=sK(),d=sb(sG(),1)[0],f=null!=(t=up[n])?t:um,p=f.messageDescriptor,m=f.icon;return rm.createElement(ua,{id:"oauth-".concat(n),onClick:function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t;return sh().w(function(e){for(;;)switch(e.n){case 0:if(t=l.oauth[n],!d.flowState.organization){e.n=2;break}return e.n=1,t.start({login_redirect_url:r,signup_redirect_url:i,custom_scopes:a,organization_id:d.flowState.organization.organization_id,provider_params:s});case 1:e.n=3;break;case 2:return e.n=3,t.discovery.start({discovery_redirect_url:o,custom_scopes:a,provider_params:s});case 3:null==c||c();case 4:return e.a(2)}},e)}))},icon:m},p?u(p):null)},ug=function(e){var t=e.children;return rm.createElement("div",{key:"oauth-error-message"},rm.createElement(s1,{color:"error"},t))},uv=function(e){var t=e.niceName,n=e.variableName;return rm.createElement(ug,null,"One Tap cannot render because there are no ",t," set for this project so we are unable to verify the"," ",rm.createElement("code",null,n),"  provided in the configuration. To set ",t," for this project please visit ",rm.createElement("a",{href:"https://stytch.com/dashboard/redirect-urls"},"the Stytch dashboard."),"  For more information on why this validation is necessary please visit ",rm.createElement("a",{href:"https://stytch.com/docs/api/url-validation"},"https://stytch.com/docs/api/url-validation."))};(d=e2||(e2={})).None="none",d.OriginNotAllowedForClient="origin_not_allowed_for_client",d.InvalidOAuthClient="invalid_client",d.NoConfiguredOAuthClient="oauth_config_not_found",d.NoConfiguredLoginRedirectUrls="no_login_redirect_urls_set",d.NoConfiguredSignupRedirectUrls="no_signup_redirect_urls_set",d.DefaultProviderNotAllowed="default_provider_not_allowed";var uy=sy(sy(sy(sy(sy(sy(sy({},e2.None,rm.createElement(rm.Fragment,null)),e2.OriginNotAllowedForClient,rm.createElement(function(){return rm.createElement(ug,null,"One Tap cannot render because the current host ",rm.createElement("code",null,'"'.concat(window.location.host,'"'))," is not allowed for this project. Make sure to put your project's host into the Google API console. When using localhost for development, you must add both ",rm.createElement("code",null,"http://localhost")," and ",rm.createElement("code",null,"http://localhost:<port_number>"),"  to the Authorized JavaScript origins box. You can learn more ",rm.createElement("a",{href:"https://stytch.com/docs/sdks"},"here."))},null)),e2.InvalidOAuthClient,rm.createElement(function(){return rm.createElement(ug,null,"One Tap cannot render because the client ID configured for your project is not recognized by Google.   Please check that the client ID saved in ",rm.createElement("a",{href:"https://stytch.com/dashboard/oauth/google"},"the Stytch Dashboard"),"  matches the client ID in your Google Cloud Console.")},null)),e2.NoConfiguredOAuthClient,rm.createElement(function(){return rm.createElement(ug,null,"One Tap cannot render because no Google OAuth client configuration could be found for this project. Please make sure a client is configured in the ",rm.createElement("a",{href:"https://stytch.com/dashboard/oauth"},"dashboard."))},null)),e2.NoConfiguredLoginRedirectUrls,rm.createElement(function(){return rm.createElement(uv,{niceName:"login redirect URLs",variableName:"oauthOptions.loginRedirectURL"})},null)),e2.NoConfiguredSignupRedirectUrls,rm.createElement(function(){return rm.createElement(uv,{niceName:"signup redirect URLs",variableName:"oauthOptions.signupRedirectURL"})},null)),e2.DefaultProviderNotAllowed,rm.createElement(function(){return rm.createElement(ug,null,"One Tap cannot render because the Stytch Default OAuth Provider is not compatible with One Tap. Please configure your own Google client in the ",rm.createElement("a",{href:"https://stytch.com/dashboard/oauth"},"dashboard."))},null));
1function u_(){var e=sK(),t=(0,ti.r)(e).publicToken;return[ny(function(){return ti.s.getItem(t,"b2b_last_used_method")},[t]),function(e){ti.s.setItem(t,"b2b_last_used_method",e)}]}oh.div(M||(M=sw(["\n  height: ",";\n  display: ",";\n  transition: all 0.5s ease-out;\n  justify-content: center;\n  align-items: center;\n"])),function(e){return"".concat(e.$height,"px")},function(e){return e.pending?"flex":"block"});var ub=function(e){var t,n,r,i,o,a,s=e.customScopes,c=e.providerParams,u=e.cancelOnTapOutside,l=o7()._,d=sK(),f=sW(),p=un(),m=sb(nf(e2.None),2),h=m[0],g=m[1],v=ur(),y=sb(sG(),2),_=y[0],b=y[1],w=sb(u_(),2),k=w[0],S=w[1],C=n_(function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t,n,r,i,o,a,s,c;return sh().w(function(e){for(;;)switch(e.n){case 0:return i=(0,ti.r)(d).oneTap,e.n=1,i.createOneTapClient();case 1:if((o=e.v).success){e.n=2;break}return"oauth_config_not_found"===o.reason?g(e2.NoConfiguredOAuthClient):"default_provider_not_allowed"===o.reason?g(e2.DefaultProviderNotAllowed):ti.l.error("Unable to load One Tap settings for project",o),e.a(2);case 2:if(a=o.client,!v.current){e.n=3;break}return e.a(2);case 3:return s=_.flowState.organization?i.createOnSuccessHandler({organizationId:_.flowState.organization.organization_id,signupRedirectUrl:null==(t=f.oauthOptions)?void 0:t.signupRedirectURL,loginRedirectUrl:null==(n=f.oauthOptions)?void 0:n.loginRedirectURL,onSuccess:i.redirectOnSuccess,onError:function(){return b({type:"transition",screen:e0.Error})}}):i.createOnDiscoverySuccessHandler({discoveryRedirectUrl:null==(r=f.oauthOptions)?void 0:r.discoveryRedirectURL,onSuccess:i.redirectOnSuccess,onError:function(){return b({type:"transition",screen:e0.Error})}}),e.n=4,a.render({callback:s,style:{position:ti.e.floating},cancelOnTapOutside:u});case 4:if(c=e.v,!v.current){e.n=5;break}return a.cancel(),e.a(2);case 5:return c.success||("unregistered_origin"===c.reason&&g(e2.OriginNotAllowedForClient),"invalid_client"===c.reason&&g(e2.InvalidOAuthClient),ti.l.error("Unable to render One Tap prompt",c)),e.a(2,a)}},e)}))},[d,v,_.flowState.organization,null==(t=f.oauthOptions)?void 0:t.signupRedirectURL,null==(n=f.oauthOptions)?void 0:n.loginRedirectURL,null==(r=f.oauthOptions)?void 0:r.discoveryRedirectURL,b,u]);if(nm(function(){var e;return C().then(function(t){return e=t}).catch(function(e){ti.l.error("Unable to render One Tap prompt",e)}),function(){return null==e?void 0:e.cancel()}},[C]),p)return null;var E=rm.createElement(uh,{providerType:ti.c.Google,loginRedirectUrl:null==(i=f.oauthOptions)?void 0:i.loginRedirectURL,signupRedirectUrl:null==(o=f.oauthOptions)?void 0:o.signupRedirectURL,discoveryRedirectUrl:null==(a=f.oauthOptions)?void 0:a.discoveryRedirectURL,customScopes:s,providerParams:c,onSuccess:function(){return S(ti.c.Google)}}),O=k===ti.c.Google?rm.createElement("div",null,rm.createElement(s1,{size:"helper",color:"secondary",align:"right"},l({id:"provider.lastUsed",message:"Last used"})),E):E,x=(0,ti.r)(d).publicToken;return h!==e2.None?rm.createElement(rm.Fragment,null,(0,ti.i)(x)?uy[h]:null,O):O},uw=us(function(){return rm.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("rect",{width:"24",height:"24",rx:"12",fill:"white"}),rm.createElement("g",{clipPath:"url(#clip0_239_1214)"},rm.createElement("path",{d:"M12.9031 3.125L12.5329 7.685C12.3577 7.665 12.1826 7.655 12.0025 7.655C11.7773 7.655 11.5572 7.67 11.3421 7.705L11.1319 5.495C11.1269 5.425 11.1819 5.365 11.252 5.365H11.6272L11.4471 3.13C11.4421 3.06 11.4972 3 11.5622 3H12.788C12.8581 3 12.9131 3.06 12.9031 3.13V3.125ZM9.81101 3.35C9.791 3.285 9.72095 3.245 9.65591 3.27L8.50513 3.69C8.44008 3.715 8.41006 3.79 8.44008 3.85L9.37572 5.89L9.02048 6.02C8.95543 6.045 8.92541 6.12 8.95543 6.18L9.91108 8.185C10.2563 7.995 10.6316 7.85 11.0268 7.76L9.81602 3.35H9.81101ZM6.9891 4.62L9.63589 8.35C9.30067 8.57 8.99546 8.83 8.73528 9.13L7.14921 7.57C7.09917 7.52 7.10417 7.44 7.15421 7.395L7.44441 7.155L5.86834 5.56C5.8183 5.51 5.8233 5.43 5.87834 5.385L6.81398 4.6C6.86901 4.555 6.94407 4.565 6.98409 4.62H6.9891ZM4.76759 6.78C4.71255 6.74 4.6325 6.76 4.59747 6.82L3.98706 7.88C3.95203 7.94 3.97705 8.015 4.03709 8.045L6.06847 9.005L5.87834 9.33C5.84332 9.39 5.86834 9.47 5.93338 9.495L7.95475 10.42C8.09985 10.045 8.29498 9.695 8.53515 9.38L4.76759 6.78ZM3.27157 9.66C3.28158 9.59 3.35163 9.55 3.41667 9.565L7.84468 10.72C7.7296 11.095 7.66456 11.49 7.65455 11.9L5.43804 11.72C5.368 11.715 5.31796 11.65 5.33297 11.58L5.39802 11.21L3.1615 11C3.09145 10.995 3.04642 10.93 3.05643 10.86L3.26657 9.655L3.27157 9.66ZM3.10646 12.65C3.03641 12.655 2.99138 12.72 3.00139 12.79L3.21653 
113.995C3.22654 14.065 3.29659 14.105 3.36163 14.09L5.53311 13.525L5.59815 13.895C5.60816 13.965 5.67821 14.005 5.74325 13.99L7.88471 13.4C7.75962 13.03 7.67957 12.635 7.65955 12.23L3.10146 12.65H3.10646ZM3.81694 15.82C3.78192 15.76 3.80694 15.685 3.86698 15.655L7.99978 13.695C8.15489 14.065 8.36503 14.41 8.6152 14.72L6.80397 16.01C6.74893 16.05 6.66888 16.035 6.63386 15.975L6.44373 15.645L4.59747 16.92C4.54243 16.96 4.46238 16.94 4.42736 16.88L3.81194 15.82H3.81694ZM8.82534 14.96L5.60816 18.215C5.55812 18.265 5.56313 18.345 5.61817 18.39L6.5588 19.175C6.61384 19.22 6.68889 19.21 6.72892 19.155L8.0298 17.325L8.32 17.57C8.37504 17.615 8.45509 17.605 8.49512 17.545L9.75598 15.715C9.41574 15.505 9.10053 15.25 8.83035 14.96H8.82534ZM8.18991 20.185C8.12487 20.16 8.09485 20.085 8.12487 20.025L10.0312 15.865C10.3814 16.045 10.7617 16.18 11.1569 16.255L10.5965 18.405C10.5815 18.47 10.5065 18.51 10.4414 18.485L10.0862 18.355L9.4908 20.52C9.47078 20.585 9.40073 20.625 9.33569 20.6L8.18491 20.18L8.18991 20.185ZM11.4721 16.31L11.1019 20.87C11.0969 20.94 11.1519 21 11.217 21H12.4428C12.5128 21 12.5679 20.94 12.5579 20.87L12.3778 18.635H12.753C12.8231 18.635 12.8781 18.575 12.8731 18.505L12.6629 16.295C12.4478 16.33 12.2277 16.345 12.0025 16.345C11.8224 16.345 11.6473 16.335 11.4721 16.31ZM15.8851 3.965C15.9152 3.9 15.8851 3.83 15.8201 3.805L14.6693 3.385C14.6043 3.36 14.5342 3.4 14.5142 3.465L13.9188 5.63L13.5636 5.5C13.4985 5.475 13.4285 5.515 13.4085 5.58L12.8481 7.73C13.2483 7.81 13.6236 7.945 13.9738 8.12L15.8851 3.965ZM18.3968 5.78L15.1797 9.035C14.9095 8.745 14.5993 8.49 14.254 8.28L15.5149 6.45C15.5549 6.395 15.635 6.38 15.69 6.425L15.9802 6.67L17.2811 4.84C17.3211 4.785 17.4012 4.775 17.4512 4.82L18.3918 5.605C18.4469 5.65 18.4469 5.73 18.4018 5.78H18.3968ZM20.138 8.34C20.2031 8.31 20.2231 8.235 20.1881 8.175L19.5726 7.115C19.5376 7.055 19.4576 7.04 19.4025 7.075L17.5563 8.35L17.3661 8.025C17.3311 7.965 17.2511 7.945 17.196 7.99L15.3848 9.28C15.635 9.59 15.8401 9.935 16.0002 10.305L20.133 8.345L20.138 8.34ZM20.7885 10L20.9986 11.205C21.0086 11.275 20.9636 11.335 20.8935 11.345L16.3354 11.77C16.3154 11.36 16.2354 10.97 16.
11103 10.6L18.2517 10.01C18.3168 9.99 18.3868 10.035 18.3968 10.105L18.4619 10.475L20.6334 9.91C20.6984 9.895 20.7685 9.935 20.7785 10.005L20.7885 10ZM20.5833 14.425C20.6484 14.44 20.7184 14.4 20.7284 14.33L20.9386 13.125C20.9486 13.055 20.9035 12.995 20.8335 12.985L18.597 12.775L18.662 12.405C18.672 12.335 18.627 12.275 18.557 12.265L16.3404 12.085C16.3304 12.495 16.2654 12.89 16.1503 13.265L20.5783 14.42L20.5833 14.425ZM19.4025 17.175C19.3675 17.235 19.2875 17.25 19.2324 17.215L15.4649 14.615C15.705 14.3 15.9001 13.95 16.0452 13.575L18.0666 14.5C18.1317 14.53 18.1567 14.605 18.1217 14.665L17.9315 14.99L19.9629 15.95C20.0229 15.98 20.048 16.055 20.0129 16.115L19.4025 17.175ZM14.3641 15.64L17.0109 19.37C17.0509 19.425 17.131 19.435 17.181 19.39L18.1167 18.605C18.1717 18.56 18.1717 18.48 18.1267 18.43L16.5506 16.835L16.8408 16.595C16.8958 16.55 16.8958 16.47 16.8458 16.42L15.2597 14.86C14.9945 15.16 14.6943 15.425 14.3591 15.64H14.3641ZM14.3391 20.72C14.274 20.745 14.204 20.705 14.184 20.64L12.9732 16.23C13.3684 16.14 13.7437 15.995 14.0889 15.805L15.0446 17.81C15.0746 17.875 15.0446 17.95 14.9795 17.97L14.6243 18.1L15.5599 20.14C15.5899 20.205 15.5599 20.275 15.4949 20.3L14.3441 20.72H14.3391Z",fill:"black"})),rm.createElement("defs",null,rm.createElement("clipPath",{id:"clip0_239_1214"},rm.createElement("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3)"}))))}),uk=us(function(){return rm.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("rect",{width:"24",height:"24",rx:"12",fill:"white"}),rm.createElement("g",{clipPath:"url(#clip0_221_1596)"},rm.createElement("rect",{width:"18",height:"18",transform:"translate(3 3)",fill:"white"}),rm.createElement("path",{d:"M17.5125 10.53C17.0025 7.9425 14.73 6 12 6C9.8325 6 7.95 7.23 7.0125 9.03C4.755 9.27 3 11.1825 3 13.5C3 15.9825 5.0175 18 7.5 18H17.25C19.32 18 21 16.32 21 14.25C21 12.27 19.4625 10.665 17.5125 10.53Z",fill:"black"})),rm.createElement("g",{clipPath:"url(#clip1_221_1596)"},rm.createElement("path",{d:"M15.9684 13.1139L14.9987 14.0933L14.5152 13.6098L14.2501 13.3446L13.9849 13.6098L13.5001 14.0946L13.0152 13.6098L12.9054 13.4999H12.7501H12.6188H12.3532L12.2651 13.7504C12.0087 14.4788 11.3147 14.9999 10.5001 14.9999C9.46592 14.9999 8.62506 14.1591 8.62506 13.1249C8.62506 12.0908 9.46592 11.2499 10.5001 11.2499C11.3147 11.2499 12.0087 11.7711 12.2651 12.4994L12.3532 12.7499H12.6188H15.5969L15.9684 13.1139ZM9.00006 13.1249C9.00006 13.9508 9.6742 14.6249 10.5001 14.6249C11.3259 14.6249 12.0001 13.9508 12.0001 13.1249C12.0001 12.2991 11.3259 11.6249 10.5001 11.6249C9.6742 11.6249 9.00006 12.2991 9.00006 13.1249Z",fill:"white",stroke:"white",strokeWidth:"0.75"})),rm.createElement("defs",null,rm.createElement("clipPath",{id:"clip0_221_1596"},rm.createElement("rect",{width:"18",height:"18",fill:"white",transform:"translate(3 3)"})),rm.createElement("clipPath",{id:"clip1_221_1596"},rm.createElement("rect",{width:"8.25",height:"6",fill:"white",transform:"translate(8.25006 10.1251)"}))))}),uS={"google-workspace":uc,"microsoft-entra":uu,okta:uw},uC=function(e){var t,n=null!=(t=uS[e.identityProvider])?t:uk;return rm.createElement(n,null)},uE=function(e){var t=o7()._,n=sK(),r=sW(),i=e.connection.display_name,o=rm.createElement(uC,{identityProvider:e.connection.identity_provider});return rm.createElement(ua,{id:"sso-".concat(i),onClick:function(){var t,i;return n.sso.start({connection_id:e.connection.connection_id,signup_redirect_url:null==(t=r.ssoOptions)?void 0:t.signupRedirectURL,login_redirect_url:null==(i=r.ssoOptions)?void 0:i.loginRedirectURL}).then(function(){var t;null==(t=e.onStart)||t.call(e,e.connection)})},icon:o},t({id:"provider.continueWith",message:"Continue with {displayName}",values:{displayName:i}}))};(f=e5||(e5={})).EmailForm="EmailForm",f.EmailDiscoveryForm="EmailDiscoveryForm",f.OAuthButtons="OAuthButtons",f.SSOButtons="SSOButtons",f.PasswordsEmailForm="PasswordsEmailForm",f.PasswordEmailCombined="PasswordEmailCombined",f.PasswordEmailCombinedDiscovery="PasswordEmailCombinedDiscovery",f.Divider="Divider";var uO=function(e){return e===e5.OAuthButtons||e===e5.SSOButtons},ux=function(e,t){var n=t.type,r=new Set(e),i=(r.has(ti.a.emailMagicLinks)||r.has(ti.a.emailOtp))&&r.has(ti.a.passwords),o=n===ti.A.Organization?e5.PasswordEmailCombined:e5.PasswordEmailCombinedDiscovery;return Array.from(e.reduce(function(e,r){var a,s,c;switch(r){case ti.a.emailMagicLinks:case ti.a.emailOtp:i?e.add(o):e.add(n===ti.A.Organization?e5.EmailForm:e5.EmailDiscoveryForm);break;case ti.a.oauth:e.add(e5.OAuthButtons);break;case ti.a.sso:(n===ti.A.Discovery||n===ti.A.Organization&&(null!=(c=null==(s=null==(a=t.organization)?void 0:a.sso_active_connections)?void 0:s.length)?c:0)>0)&&e.add(e5.SSOButtons);break;case ti.a.passwords:e.add(i?o:e5.PasswordsEmailForm)}return e},new Set)).reduce(function(e,t,n,r){var i=n>0?r[n-1]:void 0;if(i&&uO(t)&&uO(i))e[e.length-1].push(t);else{var o=e.length>0?e[e.length-1]:void 0;o&&uO(o[0])!==uO(t)&&e.push([e5.Divider]),e.push([t])}return e},[])},uP=function(){throw Error("Assertion failure")};function uA(e){return"sso:".concat(e.connection_id)}function uT(e){return"oauth"===e.type?e.provider.type:"sso"===e.type?uA(e.connection):"sso-discovery"}var uD=function(e,t){var n=e.customScopes;return 0==Object.keys(n).length&&(n=t),n},uF=function(e,t,n){var r=e.providerParams;return 0==Object.keys(r).length&&(r=null!=t?t:{}),!n||e.type!==ti.c.Google&&e.type!==ti.c.Microsoft||"login_hint"in r||(r=Object.assign(Object.assign({},r),{login_hint:n})),r},uj=function(e){var t,n=e.buttons,r=o7()._,i=sb(sG(),2),o=i[0],a=i[1],s=cx().oauthProviderSettings,c=void 0===s?[]:s,u=sb(u_(),2),l=u[0],d=u[1],f=null!=(t=sW().oauthOptions)?t:{},p=f.loginRedirectURL,m=f.signupRedirectURL,h=f.discoveryRedirectURL,g=f.customScopes,v=f.providerParams,y=o.flowState.type===ti.A.Discovery,_=n.flatMap(function(e){var t,n,r;return e===e5.OAuthButtons?c.map(function(e){return{type:"oauth",provider:e}}
1):e===e5.SSOButtons?y?{type:"sso-discovery"}:null!=(r=null==(n=null==(t=o.flowState.organization)?void 0:t.sso_active_connections)?void 0:n.map(function(e){return{type:"sso",connection:e}}))?r:[]:void uP()});if(0===_.length)return null;var b=sb(ti.f.moveToFront(_,function(e){return uT(e)===l}),2),w=b[0],k=b[1],S=function(e){var t={customScopes:uD(e,g),providerParams:uF(e,v,o.primary.email)};return e.one_tap?rm.createElement(ub,Object.assign({key:e.type},t,{cancelOnTapOutside:e.cancel_on_tap_outside})):rm.createElement(uh,Object.assign({key:e.type,providerType:e.type,loginRedirectUrl:p,signupRedirectUrl:m,discoveryRedirectUrl:h,onSuccess:function(){return d(e.type)}},t))};return rm.createElement(rm.Fragment,null,w.map(function(e,t){var n=function(){switch(e.type){case"oauth":return S(e.provider);case"sso":return rm.createElement(uE,{key:e.connection.display_name,connection:e.connection,onStart:function(){return d(uA(e.connection))}});case"sso-discovery":return rm.createElement(ua,{key:"sso-discovery",icon:rm.createElement(uk,null),onClick:function(){a({type:"transition",screen:e0.SSODiscoveryEmail,history:"push"})},id:"sso-discovery"},r({id:"provider.continueWithSSO",message:"Continue with SSO"}));default:uP()}}();return k&&0===t?rm.createElement("div",{key:uT(e)},rm.createElement(s1,{size:"helper",color:"secondary",align:"right"},r({id:"provider.lastUsed",message:"Last used"})),n):n}))},uR=oh.img(B||(B=sw(["\n  max-height: 50px;\n  max-width: 100px;\n"]))),uz=oh(s1)(N||(N=sw(["\n  text-align: center;
1\n"]))),uI=function(e){var t=e.orgLogo,n=e.appLogo;return t||n?rm.createElement(s0,{justifyContent:"center",gap:8},!!t&&rm.createElement(uR,{src:t}),!!n&&rm.createElement(uR,{src:n})):rm.createElement(rm.Fragment,null)},uL=function(e){var t=e.components.map(function(e){return rm.createElement(s0,{key:e.join("-"),direction:"column",gap:8},e.every(uO)?rm.createElement(uj,{buttons:e}):e.map(function(e){switch(e){case e5.EmailForm:return rm.createElement(c$,{key:e,showPasswordButton:!1});case e5.EmailDiscoveryForm:return rm.createElement(cZ,{key:e,showPasswordButton:!1});case e5.PasswordsEmailForm:return rm.createElement(ut,{key:e});case e5.PasswordEmailCombined:return rm.createElement(c$,{key:e,showPasswordButton:!0});case e5.PasswordEmailCombinedDiscovery:return rm.createElement(cZ,{key:e,showPasswordButton:!0});case e5.Divider:return rm.createElement(cX,{key:"divider"})}}))});return rm.createElement(rm.Fragment,null,t)},uM=function(){var e,t,n,r,i=ov(),o=i.displayHeader,a=i.logo,s=sb(sG(),1)[0],c=o7()._,u=s.primary,l=u.primaryAuthMethods,d=u.email,f=u.emailVerified,p=cx().products,m=s.flowState.type===ti.A.Organization&&!s.flowState.organization,h=ux(p,s.flowState),g=null==(e=s.flowState.organization)?void 0:e.organization_name;switch(s.flowState.type){case ti.A.Discovery:r=c({id:"login.title",message:"Sign up or log in"});break;case ti.A.PasswordReset:r="";break;default:r=c(g?{id:"organizationLogin.title",message:"Continue to {organizationName}",values:{organizationName:g}}:{id:"organizationLogin.titleUnknown",message:"Continue to ...",comment:"Used instead of organizationLogin.title when the organization name is not available"})}return m?rm.createElement(c1,null):rm.createElement(s0,{gap:24,direction:"column"},rm.createElement(uI,{appLogo:a.logoImageUrl,orgLogo:null!=(n=null==(t=s.flowState.organization)?void 0:t.organization_logo_url)?n:""}
1),o&&(d&&!1===f&&l?rm.createElement(s0,{justifyContent:"center",direction:"column",gap:24},rm.createElement(s1,{size:"header"},c({id:"emailVerification.title",message:"Verify your email"})),rm.createElement(s1,null,c({id:"emailVerification.content",message:"Confirm your email address with one of the following:"}))):r&&rm.createElement(s0,{justifyContent:"center"},rm.createElement(uz,{size:"header"},r))),rm.createElement(uL,{components:h}))},uB=us(function(){return rm.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},rm.createElement("path",{fill:"#4caf50",d:"M45,16.2l-5,2.75l-5,4.75L35,40h7c1.657,0,3-1.343,3-3V16.2z"}),rm.createElement("path",{fill:"#1e88e5",d:"M3,16.2l3.614,1.71L13,23.7V40H6c-1.657,0-3-1.343-3-3V16.2z"}),rm.createElement("polygon",{fill:"#e53935",points:"35,11.2 24,19.45 13,11.2 12,17 13,23.7 24,31.95 35,23.7 36,17"}),rm.createElement("path",{fill:"#c62828",d:"M3,12.298V16.2l10,7.5V11.2L9.876,8.859C9.132,8.301,8.228,8,7.298,8h0C4.924,8,3,9.924,3,12.298z"}),rm.createElement("path",{fill:"#fbc02d",d:"M45,12.298V16.2l-10,7.5V11.2l3.124-2.341C38.868,8.301,39.772,8,40.702,8h0 C43.076,8,45,9.924,45,12.298z"}))}),uN=us(function(){return rm.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Layer_1",viewBox:"0 0 103.17322 104.31332",xmlSpace:"preserve"},rm.createElement("defs",{id:"defs43"}),rm.createElement("path",{d:"m 64.566509,22.116383 v 20.404273 l 7.130526,4.489881 c 0.188058,0.05485 0.595516,0.05877 0.783574,0 L 103.16929,26.320259 c 0,-2.44867 -2.28412,-4.203876 -3.573094,-4.203876 H 64.566509 z",id:"path3",style:{fill:"#0072c6"}}),rm.createElement("path",{d:"m 64.566509,50.13308 6.507584,4.470291 c 0.916782,0.673874 2.021622,0 2.021622,0 -1.100922,0.673874 30.077495,-20.035993 30.077495,-20.035993 v 37.501863 c 0,4.082422 -2.61322,5.794531 -5.551621,5.794531 H 64.562591 V 50.13308 z",id:"path5",style:{fill:"#0072c6"}}),rm.createElement("g",{id:"g23",transform:"matrix(3.9178712,0,0,3.9178712,-13.481403,-41.384473)"},rm.createElement("path",{d:"m 11.321,20.958 c -0.566,0 -1.017,0.266 -1.35,0.797 -0.333,0.531 -0.5,1.234 -0.5,2.109 0,0.888 0.167,1.59 0.5,2.106 0.333,0.517 0.77,0.774 1.31,0.774 0.557,0 0.999,-0.251 1.325,-0.753 0.326,-0.502 0.49,-1.199 0.49,-2.09 0,-0.929 -0.158,-1.652 -0.475,-2.169 -0.317,-0.516 -0.75,-0.774 -1.3,-0.774 z",id:"path25",style:{fill:"#0072c6"}}),rm.createElement("path",{d:"m 3.441,13.563 v 20.375 l 15.5,3.25 V 10.563 l -15.5,3 z m 10.372,13.632 c -0.655,0.862 -1.509,1.294 -2.563,1.294 -1.027,0 -1.863,-0.418 -2.51,-1.253 C 8.094,26.4 7.77,25.312 7.77,23.97 c 0,-1.417 0.328,-2.563 0.985,-3.438 0.657,-0.875 1.527,-1.313 2.61,-1.313 1.023,0 1.851,0.418 2.482,1.256 0.632,0.838 0.948,1.942 0.948,3.313 10e-4,1.409 -0.327,2.545 -0.982,3.407 z",id:"path27",style:{fill:"#0072c6"}})))}),uU=us(function(){return rm.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("rect",{x:"2",y:"2",width:"20",height:"20",rx:"1",fill:"#671BDF"}),rm.createElement("path",{d:"M5 8.7284H7.71407L9.29444 12.7716L10.8953 8.7284H13.5379L9.55876 18.3H6.89942L7.98865 15.7637L5 8.7284Z",fill:"white"}),rm.createElement("path",{d:"M14.2 16.2028C15.108 16.2028 15.8441 15.4667 15.8441 14.5587C15.8441 13.6507 15.108 12.9146 14.2 12.9146C13.292 12.9146 12.5559 13.6507 12.5559 14.5587C12.5559 15.4667 13.292 16.2028 14.2 16.2028Z",fill:"white"}),rm.createElement("path",{d:"M16.3842 12.3106H13.4243L16.0512 6H19L16.3842 12.3106Z",fill:"white"}))}),uH={gmail:{messageDescriptor:{id:"link.openInGmail",message:"Open in Gmail"},icon:rm.createElement(uB,null),getUrl:function(e){var t=encodeURIComponent(e?"from:@".concat(e," in:anywhere"):"in:anywhere");return"https://mail.google.com/mail/u/0/#search/".concat(t)}},yahoo:{messageDescriptor:{id:"link.openInYahoo",message:"Open in Yahoo"},icon:rm.createElement(uU,null),getUrl:function(e){return e?"https://mail.yahoo.com/d/search/keyword=".concat(e):"https://mail.yahoo.com/d/search/referrer=unread"}},outlook:{messageDescriptor:{id:"link.openInOutlook",message:"Open in Outlook"},icon:rm.createElement(uN,null),getUrl:function(){return"https://outlook.office.com/mail/0/inbox"}}},uK=oh.a(U||(U=sw(["\n  all: unset;\n\n  cursor: pointer;\n\n  &:hover,\n  &:focus-visible {\n    text-decoration: underline;\n    text-decoration-color: ",";\n  }\n"])),function(e){return e.theme.colors.primary}),uG=function(e){var t=e.providerInfo,n=t.icon,r=t.messageDescriptor,i=t.getUrl,o=e.emailDomain,a=o7()._,s=i(o);return rm.createElement(s0,{gap:4},n,rm.createElement(uK,{href:s,target:"_blank",rel:"noopener noreferrer"},rm.createElement(s1,null,a(r))))},uW=function(e){var t=e.emailDomain,n=e.reset,r=e.email,i=o7()._;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s1,{size:"header"},i({id:"emailConfirmation.title",message:"Check your email"})),rm.createElement(s0,{direction:"column",gap:12},rm.createElement(s1,null,rm.createElement(ae,{id:"emailConfirmation.content",message:"An email was sent to <bold>{email}</bold>.",components:{bold:rm.createElement("b",null)},values:{email:r}})),rm.createElement(s0,{direction:"column",gap:8},rm.createElement(uG,{emailDomain:t,providerInfo:uH.gmail}
1),rm.createElement(uG,{emailDomain:t,providerInfo:uH.yahoo}),rm.createElement(uG,{emailDomain:t,providerInfo:uH.outlook}))),rm.createElement(cs,{type:"button",onClick:n},i({id:"button.retry",message:"Try again"})))},uq=function(){var e,t,n=sK(),r=sW(),i=sb(nf(function(){return(0,ti.r)(n).bootstrap.getSync().emailDomains}),2),o=i[0],a=i[1];return(nm(function(){(0,ti.r)(n).bootstrap.getAsync().then(function(e){a(e.emailDomains)})},[n]),null==(e=r.emailMagicLinksOptions)?void 0:e.domainHint)?null==(t=r.emailMagicLinksOptions)?void 0:t.domainHint:1===o.length?o[0]:null},uV=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=uq();return rm.createElement(uW,{emailDomain:r,reset:function(){n({type:"set_user_supplied_email",email:""}),n({type:"transition",screen:e0.Main})},email:t.formState.emailState.userSuppliedEmail})},u$=function(e){return"eligible_to_join_by_email_domain"===e||"eligible_to_join_by_oauth_tenant"===e},uZ=oh(s0)(H||(H=sw(["\n  cursor: pointer;\n  gap: 8px;\n  border: ",";\n  border-radius: ",";\n  background-color: ",";\n  color: ",";\n"])),function(e){return e.theme.buttons.secondary.border},function(e){return e.theme.buttons.secondary.borderRadius},function(e){return e.theme.buttons.secondary.backgroundColor},function(e){return e.theme.buttons.secondary.textColor}),uY=oh.img(K||(K=sw(["\n  height: 40px;\n  width: 40px;\n  flex-shrink: 0;\n  border-radius: 4px;\n"]))),uJ=oh(s0)(G||(G=sw(["\n  height: 40px;\n  width: 40px;\n  flex-shrink: 0;\n  background-color: ",";\n  color: ",";\n  border-radius: 4px;\n\n  font-style: normal;\n  font-weight: 400;\n  font-size: 18px;\n  line-height: 25px;\n"])),function(e){return e.theme.buttons.secondary.textColor},function(e){return e.theme.buttons.secondary.backgroundColor}),uQ=oh.div(W||(W=sw(["\n  overflow-wrap: break-word;\n  word-break: break-word;\n  hyphens: auto;\n"]))),uX=oh.div(q||(q=sw(["\n  ",";\n  text-align: right;\n"])),function(e){return e.theme.typography.body}),u0=oh.svg(V||(V=sw(["\n  flex-shrink: 0;\n"]))),u1=function(){return tU(u0,{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M7 0.333313L5.825 1.50831L10.475 6.16665H0.333334V7.83331H10.475L5.825 12.4916L7 13.6666L13.6667 6.99998L7 0.333313Z",fill:"currentColor"}))},u2=function(e){var t=e.name,n=e.logo;return""!==n?tU(uY,{src:n}):tU(uJ,{alignItems:"center",justifyContent:"center"},t[0])},u5=function(e){var t=e.type,n=o7()._;return u$(t)||"pending_member"===t?tU(uX,null,n({id:"organizationDiscovery.join",message:"Join"})):"invited_member"===t?tU(uX,null,n({id:"organizationDiscovery.acceptInvite",message:"Accept Invite"})):tU(tG,null)},u3=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=sK(),i=sW(),o=cj().createOrganizationEnabled,a=o7()._,s=function(){return n({type:"transition",screen:e0.Main})},c=cD("stytch.discovery.organizations.create",function(){return r.discovery.organizations.create({session_duration_minutes:i.sessionOptions.sessionDurationMinutes})},{onSuccess:function(e){cR(e,n,i)},onError:function(e){n({type:"set_error_message_and_transition",errorType:"action_not_allowed_email_domain_is_claimed"===e.error_type?eX.OrganizationDiscoveryClaimedDomain:eX.Default,canGoBack:!0})}}),u=c.trigger,l=c.isMutating,d=o&&i.directCreateOrganizationForNoMembership;if(nm(function(){d&&u()},[d,u]),d||l)return tU(c1,null);var f=t.formState.discoveryState.email;return o&&!i.disableCreateOrganization?tU(s0,{direction:"column",gap:24},tU(s8,{onClick:s}),tU(s1,{size:"header"},a({id:"organizationDiscovery.noOrgs.create.title",message:"Create an organization to get started"})),tU(cs,{type:"button",onClick:function(){return u()}},a({id:"button.createAnOrganization",message:"Create an organization"})),tU(s1,null,a({id:"organizationDiscovery.noOrgs.create.content",message:"{email} does not have an account. Think this is a mistake? Try a different email address, or contact your admin.",values:{email:f}}))):tU(s0,{direction:"column",gap:24},tU(s8,{onClick:s}),tU(s1,{size:"header"},a({id:"organizationDiscovery.noOrgs.title",message:"{email} does not belong to any organizations.",values:{email:f}})),tU(s1,null,a({id:"organizationDiscovery.noOrgs.content",message:"Make sure your email address is correct. Otherwise, you might need to be invited by your admin."})),tU(cs,{type:"button",variant:"outlined",onClick:s},a({id:"button.tryDifferentEmailAddress",message:"Try a different email address"})))},u4=function(e,t){if(!(null==t?void 0:t.status))return null;var n=e.filter(function(e){return"active_member"===e.membership.type}),r=e.some(function(e){return("pending_member"===e.membership.type||"invited_member"===e.membership.type)&&!t.ignoreInvites||u$(e.membership.type)&&!t.ignoreJitProvisioning});return 1!==n.length||r?null:n[0]},u6=function(){var e,t=sb(sG(),2),n=t[0],r=t[1],i=sK(),o=sW(),a=o7()._,s=!!(null==(e=o.directLoginForSingleMembership)?void 0:e.status),c=cj().createOrganizationEnabled;nm(function(){if(!p){var e=u4(n.formState.discoveryState.discoveredOrganizations,o.directLoginForSingleMembership);s&&null!==e&&u(e)}},[s,n.formState.discoveryState.discoveredOrganizations,o.directLoginForSingleMembership]);var u=function(e){var t=e.organization;if(e.primary_required){var n=e.primary_required.allowed_auth_methods;n&&1===n.length&&"sso"===n[0]&&t.sso_default_connection_id?l(t.sso_default_connection_id):r({type:"select_discovered_organization",discoveredOrganization:e})}else f({organizationId:t.organization_id})},l=n_(function(e){var t,n;i.sso.start({connection_id:e,login_redirect_url:null==(t=o.ssoOptions)?void 0:t.loginRedirectURL,signup_redirect_url:null==(n=o.ssoOptions)?void 0:n.signupRedirectURL})},[i,o.ssoOptions]),d=cD("stytch.discovery.intermediateSessions.exchange",function(e,t){var n=t.arg.organizationId;return i.discovery.intermediateSessions.exchange({organization_id:n,session_duration_minutes:o.sessionOptions.sessionDurationMinutes})},{onSuccess:function(e){cR(e,r,o)},onError:function(e){r({type:"set_error_message_and_transition",errorType:"action_not_allowed_email_domain_is_claimed"===e.error_type?eX.OrganizationDiscoveryClaimedDomain:eX.Default,canGoBack:!0})}}),f=d.trigger,p=d.isMutating,m=cD("stytch.discovery.organizations.create",function(){return i.discovery.organizations.create({session_duration_minutes:o.sessionOptions.sessionDurationMinutes})},{onSuccess:function(e){cR(e,r,o)},onError:function(e){r({type:"set_error_message_and_transition",errorType:"action_not_allowed_email_domain_is_claimed"===e.error_type?eX.OrganizationDiscoveryClaimedDomain:eX.Default,canGoBack:!0})}}),h=m.trigger,g=m.isMutating;if(p)return tU(c0,null);if(g)return tU(c1,null);if(0===n.formState.discoveryState.discoveredOrganizations.length)return tU(u3,null);var v=c&&!o.disableCreateOrganization;return tU(s0,{direction:"column",gap:24},tU(s8,{onClick:function(){return r({type:"transition",screen:e0.Main})}}),tU(s1,{size:"header"},a({id:"organizationDiscovery.title",message:"Select an organization to continue"})),tU(s0,{direction:"column",gap:8},n.formState.discoveryState.discoveredOrganizations.map(function(e){var t=e.organization,n=e.membership;return tU(uZ,{padding:8,justifyContent:"space-between",key:t.organization_id,alignItems:"center",onClick:function(){return u(e)}},tU(s0,{gap:8,alignItems:"center"},tU(u2,{name:t.organization_name,logo:t.organization_logo_url}),tU(uQ,null,t.organization_name)),tU(s0,{gap:8,alignItems:"center"},tU(u5,{type:n.type}),tU(u1,null)))})),v&&tU(s0,{direction:"column",gap:8},tU(cX,null),tU(cs,{type:"button",variant:"outlined",onClick:function(){return h()}},a({id:"button.createAnOrganization",message:"Create an organization"}))))},u8=function(){return tU("svg",{width:"201",height:"200",viewBox:"0 0 201 200",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("g",{opacity:"0.1"},tU("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.5 0C155.729 0 200.5 44.7715 200.5 99.9999C200.5 155.229 155.729 200 100.5 200C45.2715 200 0.5 155.229 0.5 99.9999C0.5 44.7715 45.2715 0 100.5 0Z",fill:"url(#paint0_linear_1356_5135)"})),tU("g",{opacity:"0.3"},tU("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.5 17.5728C146.023 17.5728 182.927 54.4767 182.927 99.9998C182.927 145.523 146.023 182.427 100.5 182.427C54.9768 182.427 18.0729 145.523 18.0729 99.9998C18.0729 54.4767 54.9768 17.5728 100.5 17.5728Z",fill:"url(#paint1_linear_1356_5135)"})),tU("g",{opacity:"0.7"},tU("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.5 32.231C137.988 32.231 168.378 62.6208 168.378 100.109C168.378 137.597 137.988 167.987 100.5 167.987C63.012 167.987 32.6222 137.597 32.6222 100.109C32.6222 62.6208 63.012 32.231 100.5 32.231Z",fill:"url(#paint2_linear_1356_5135)"})),tU("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.605 48.7734C128.955 48.7734 151.937 71.7553 151.937 100.105C151.937 128.455 128.955 151.437 100.
1605 151.437C72.255 151.437 49.2731 128.455 49.2731 100.105C49.2731 71.7553 72.255 48.7734 100.605 48.7734Z",fill:"#00AC26",fillOpacity:"0.12"}),tU("mask",{id:"mask0_1356_5135",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"49",y:"48",width:"103",height:"104"},tU("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M100.605 48.7734C128.955 48.7734 151.937 71.7553 151.937 100.105C151.937 128.455 128.955 151.437 100.605 151.437C72.255 151.437 49.2731 128.455 49.2731 100.105C49.2731 71.7553 72.255 48.7734 100.605 48.7734Z",fill:"white"})),tU("g",{mask:"url(#mask0_1356_5135)"}),tU("path",{d:"M88 117.5L70.5 100L64.6667 105.833L88 129.167L138 79.1666L132.167 73.3333L88 117.5Z",fill:"white"}),tU("defs",null,tU("linearGradient",{id:"paint0_linear_1356_5135",x1:"-86.6375",y1:"160.384",x2:"170.169",y2:"338.297",gradientUnits:"userSpaceOnUse"},tU("stop",{stopColor:"white"}),tU("stop",{offset:"1",stopColor:"#09F33D"})),tU("linearGradient",{id:"paint1_linear_1356_5135",x1:"-86.6374",y1:"160.384",x2:"170.169",y2:"338.297",gradientUnits:"userSpaceOnUse"},tU("stop",{stopColor:"#00AC26",stopOpacity:"0.4"}),tU("stop",{offset:"1",stopColor:"#BDFFBC",stopOpacity:"0.58"})),tU("linearGradient",{id:"paint2_linear_1356_5135",x1:"-86.6375",y1:"160.493",x2:"170.169",y2:"338.406",gradientUnits:"userSpaceOnUse"},tU("stop",{stopColor:"#F8FFF5"}),tU("stop",{offset:"1",stopColor:"#00AC26",stopOpacity:"0.26"}))))},u7=function(e){var t=e.header,n=e.text,r=o7()._,i=r({id:"success.title",message:"Success!"}),o=r({id:"login.success.content",message:"You have successfully logged in."});return tU(s0,{direction:"column",gap:24,alignItems:"center"},tU(s1,{size:"header"},null!=t?t:i),tU(s1,null,null!=n?n:o),tU(u8,null))},u9=function(e){var t=ng(e);nm(function(){return t.current()},[])},le=function(){var e=sV();return u9(function(){e({type:ti.S.AuthenticateFlowComplete,data:{}})}),tU(u7,null)},lt=us(function(){return rm.createElement("svg",{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M9.09 7.91L13.67 12.5L9.09 17.09L10.5 18.5L16.5 12.5L10.5 6.5L9.09 7.91Z",fill:"currentColor"}))}),ln=oh(s3)($||($=sw(["\n  color: ",";\n  padding: 20px 0;\n  border-bottom: 1px solid #e5e8eb;\n  font-weight: 500;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n"])),function(e){return e.theme.colors.primary}),lr=oh.div(Z||(Z=sw(["\n  flex: 1 1 auto;\n"]))),li=oh.span(Y||(Y=sw(["\n  flex: 0 0 auto;\n"]))),lo=function(e){var t=e.children,n=e.disabled,r=e.onClick;return rm.createElement(ln,{type:"button",onClick:r,disabled:n},rm.createElement(lr,null,t),rm.createElement(li,{"aria-hidden":!0},rm.createElement(lt,null)))},la=sy(sy({},ti.a.emailMagicLinks,{messageDescriptor:{id:"emailMethodSelection.link",message:"Email me a log in link"}}),ti.a.emailOtp,{messageDescriptor:{id:"emailMethodSelection.code",message:"Email me a log in code"}}),ls=function(){var e=cx().products,t=o7()._,n=sb(sG(),2),r=n[0],i=n[1],o=cB(),a=o.trigger,s=o.isMutating,c=o.error,u=o.reset,l=cL(),d=l.trigger,f=l.isMutating,p=l.error,m=l.reset,h=cN(),g=h.trigger,v=h.isMutating,y=h.error,_=h.reset,b=cM(),w=b.trigger,k=b.isMutating,S=b.error,C=b.reset,E=s||f||v||k,O=c||p||y||S,x=function(e){switch(u(),m(),_(),C(),e){case ti.a.emailMagicLinks:r.flowState.type===ti.A.Discovery?a({email:r.formState.emailState.userSuppliedEmail}):r.flowState.type===ti.A.Organization&&r.flowState.organization&&g({email:r.formState.emailState.userSuppliedEmail,organization_id:r.flowState.organization.organization_id});break;case ti.a.emailOtp:r.flowState.type===ti.A.Discovery?d({email:r.formState.emailState.userSuppliedEmail}):r.flowState.type===ti.A.Organization&&r.flowState.organization&&w({email:r.formState.emailState.userSuppliedEmail,organization_id:r.flowState.organization.organization_id})}},P=ny(function(){return e.filter(function(e){return e in la}).map(function(e){var t=la[e];return{option:e,messageDescriptor:t.messageDescriptor}})},[e]);return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){i({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},t({id:"emailMethodSelection.title",message:"Select how you’d like to continue."})),rm.createElement(s0,{direction:"column"},P.map(function(e){var n=e.option,r=e.messageDescriptor;return rm.createElement(lo,{key:n,disabled:E,onClick:function(){x(n)}},t(r))})),O&&rm.createElement(ca,{errorMessage:cW(O,t)}))},lc=oh(s3)(J||(J=sw(["\n  font-weight: bold;\n\n  &:focus-visible,\n  &:hover {\n    outline: none;\n    text-decoration: underline;\n    text-decoration-color: ",";\n  }\n\n  &:disabled {\n    pointer-events: none;\n  }\n"])),function(e){return e.theme.colors.primary}),lu=function(e){var t=e.onClick,n=e.children,r=e.disabled,i=e.className;return rm.createElement(lc,{onClick:t,disabled:r,className:i},n)},ll=oh.div(Q||(Q=sw(["\n  display: grid;\n  grid-template-rows: ",";\n  transition: grid-template-rows 0.15s ease-out;\n"])),function(e){return e.isOpen?"1fr":"0fr"}),ld=oh.div(X||(X=sw(["\n  overflow: hidden;\n"]))),lf=function(e){var t=e.isOpen,n=e.children;return rm.createElement(ll,{isOpen:t},rm.createElement(ld,null,n))},lp=oh.div(ee||(ee=sw(["\n  height: 4px;\n  background-color: ",";\n  border-radius: 3px;\n  overflow: hidden;\n"])),function(e){return e.theme.colors.disabled}),lm=og(et||(et=sw(["\n  0% {\n    transform: translateX(-100%);\n  }\n  100% {\n    transform: translateX(-1%);\n  }\n"]))),lh=oh.div(en||(en=sw(["\n  height: 100%;\n  width: 100%;\n  background-color: ",";\n  animation: "," 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])),function(e){return e.theme.colors.primary},lm),lg=function(e){var t=e.isLoading;return rm.createElement(lp,null,t&&rm.createElement(lh,null))},lv="46px",ly="46px",l_=oh.div(er||(er=sw(["\n  border: 1px solid ",";\n  border-radius: 4px;\n  align-items: center;\n  display: flex;\n  font-size: 18px;\n  justify-content: center;\n  height: ",";\n  width: ",";\n  background: ",";\n  color: ",";\n"])),function(e){var t=e.disabled,n=e.theme;return t?n.colors.disabled:"#ADBCC5"},ly,lv,function(e){var t=e.disabled,n=e.theme;return t?n.colors.disabled:n.inputs.backgroundColor},function(e){var t=e.disabled,n=e.theme;return t?n.colors.disabledText:n.inputs.textColor}),lb={display:"flex",justifyContent:"space-between",gap:"8px",position:"relative",zIndex:-1},lw={overflow:"hidden",position:"relative",textAlign:"initial",zIndex:1},lk={background:"transparent",border:"none",color:"transparent",height:ly,margin:0,outline:"none",position:"absolute",width:"calc(100% - (0.5 * ".concat(lv,"))"),caretColor:"#ADBCC5",letterSpacing:"calc(".concat(lv," - 1ch + ").concat("8px",")"),paddingLeft:"calc(0.5 * ".concat(lv,")"),zIndex:10},lS=function(e){var t=e.index,n=e.disabled,r=e.otp,i=r?r[t]:"";return rm.createElement(l_,{disabled:n,"data-testid":"otp-".concat(t)},i)},lC=function(e){var t=e.otp,n=e.setOtp,r=e.disabled,i=o7()._,o=ng(null);return nm(function(){var e;r||null==(e=o.current)||e.focus()},[r,o]),rm.createElement("div",{style:lw},rm.createElement("input",Object.assign({ref:o,"aria-label":i({id:"formField.otp.ariaLabel",message:"One-time passcode"}),autoComplete:"one-time-code",autoFocus:!0,disabled:r,style:lk,onInput:function(e){var r=e.target,i=r.value.replace(/\D/g,"").slice(0,6);r.value=i,i!==t&&n(i)},type:"text",inputMode:"numeric",value:t},sn)),rm.createElement("div",{style:lb},sk(Array(6).keys()).map(function(e){return rm.createElement(lS,{key:"digit-".concat(e),index:e,otp:t,disabled:!!r})})))},lE=function(e){var t=e.isSubmitting,n=e.onSubmit,r=e.errorMessage,i=o7()._,o=sb(nf(""),2),a=o[0],s=o[1];return rm.createElement(s0,{direction:"column",maxWidth:316},rm.createElement(lC,{otp:a,setOtp:function(e){s(e),6===e.length&&n(e)},disabled:t}),rm.createElement(lf,{isOpen:t},rm.createElement(s0,{direction:"column",gap:8,marginTop:8},rm.createElement(s1,{color:"secondary",size:"helper"},i({id:"formField.passcode.status.verifying",message:"Verifying passcode..."})),rm.createElement(lg,{isLoading:t}))),!t&&rm.createElement(ca,{errorMessage:null!=r?r:""}))},lO=function(e){var t=e.header,n=e.helperContent,r=e.instruction,i=e.isSubmitting,o=e.onSubmit,a=e.errorMessage;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s1,{size:"header"},t),rm.createElement(s1,null,r),rm.createElement(lE,{isSubmitting:i,onSubmit:o,errorMessage:a}),rm.createElement(s1,{size:"helper",color:"secondary"},n))},lx=function(e){var t=new Date;return Math.ceil((e.getTime()-t.getTime())/1e3)}
1,lP=og(ei||(ei=sw(["\n  from {\n    transform: translateY(0%);\n  }\n  to {\n    transform: translateY(-50%);\n  }\n"]))),lA=og(eo||(eo=sw(["\n  from {\n    transform: translateY(-50%);\n  }\n  to {\n    transform: translateY(0%);\n  }\n"]))),lT=oh.div(ea||(ea=sw(['\n  position: relative;\n  overflow: hidden;\n  /* Set an explicit height to create the "window" the animation will be displayed in.  We match to the line height to ensure it looks inline with the text */\n  height: ',";\n"])),function(e){return e.theme.typography.helper.lineHeight}),lD=oh.div(es||(es=sw(["\n  display: flex;\n  flex-direction: column;\n  animation: ","\n    0.3s ease-out;\n  transform: ",";\n"])),function(e){var t=e.displayCodeSent;return e.shouldAnimate?t?lP:lA:"none"},function(e){return e.displayCodeSent?"translateY(-50%)":"translateY(0%)"}),lF=oh(lu)(ec||(ec=sw(["\n  color: ",";\n"])),function(e){var t=e.theme;return e.isCodeSending?t.colors.success:"inherit"}),lj=function(e){var t=e.expiration,n=e.resendOTP,r=e.errorMessage,i=o7()._,o=sb(nf(function(){return lx(t)}),2),a=o[0],s=o[1],c=sb(nf("initial"),2),u=c[0],l=c[1],d=a<=0;nm(function(){if(!d){var e=function(){return s(lx(t))},n=setInterval(e,1e3);return e(),function(){return clearInterval(n)}}},[d,t]);var f=function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,l("sending"),e.n=1,n();case 1:l("sent"),setTimeout(function(){l("waiting")},2e3),e.n=3;break;case 2:e.p=2,e.v,l("initial");case 3:return e.a(2)}},e,null,[[0,2]])}))},p=Math.floor(Number(a/60)),m=a-60*p,h="".concat(p,":").concat(m<10?"0".concat(m):m),g=i(a>0?{id:"passcode.expirationCountdown",message:"Your code expires in {timeRemaining}.",values:{timeRemaining:h}}:{id:"passcode.expired",message:"Your code has expired."});return rm.createElement(rm.Fragment,null,g,rm.createElement(s0,{direction:"row",gap:8,alignItems:"center"},i({id:"passcode.didntGetIt",message:"Didn't get it?"}),rm.createElement(lT,null,rm.createElement(lD,{displayCodeSent:"sent"===u,shouldAnimate:"sent"===u||"waiting"===u},rm.createElement(lF,{onClick:f,isCodeSending:!1,disabled:"sending"===u||"sent"===u},i({id:"passcode.resendCode",message:"Resend code"})),rm.createElement(lF,{onClick:f,isCodeSending:!0,disabled:!0},i({id:"passcode.codeSent",message:"Code sent"}))))),rm.createElement(ca,{errorMessage:null!=r?r:""}))},lR=function(e){var t=e.expiration,n=e.formattedDestination,r=e.isSubmitting,i=e.onSubmit,o=e.errorMessage,a=e.resendOTP,s=e.resendErrorMessage,c=o7()._,u=rm.createElement(lj,{expiration:t,resendOTP:a,errorMessage:s});return rm.createElement(lO,{header:c({id:"passcode.title",message:"Enter passcode"}),helperContent:u,instruction:rm.createElement(ae,{id:"passcode.sentConfirmation",message:"A 6-digit passcode was sent to you at <bold>{destination}</bold>.",components:{bold:rm.createElement("b",null)},values:{destination:n}}),isSubmitting:r,onSubmit:i,errorMessage:o})},lz=function(){var e=sK(),t=sW(),n=o7()._,r=sb(sG(),2),i=r[0],o=r[1],a=i.formState.otpState.codeExpiration,s=i.formState.emailState.userSuppliedEmail,c=cM({throwOnError:!0}),u=c.trigger,l=c.isMutating,d=c.error,f=cL({throwOnError:!0}),p=f.trigger,m=f.isMutating,h=f.error,g=f.reset,v=m||l,y=cD("stytch.otps.email.discovery.authenticate",function(t,n){var r=n.arg,i=r.otp,o=r.email;return e.otps.email.discovery.authenticate({code:i,email_address:o})},{onSuccess:function(e){cz(e,o)}}),_=y.trigger,b=y.isMutating,w=y.error,k=y.reset,S=cD("stytch.otps.email.authenticate",function(t,n){var r=n.arg,i=r.otp,o=r.emailAddress,a=r.organizationId,s=r.sessionDurationMinutes;return e.otps.email.authenticate({code:i,email_address:o,organization_id:a,session_duration_minutes:s})},{onSuccess:function(e){cR(e,o,t)}}),C=S.trigger,E=S.isMutating,O=S.error,x=S.reset,P=w||O||h||d,A=P?cW(P,n):void 0,T=function(){k(),x(),g()};return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){o({type:"navigate_back"})}}),null!==a?rm.createElement(lR,{isSubmitting:b||E,onSubmit:function(e){T(),i.flowState.type===ti.A.Discovery?_({otp:e,email:s}):i.flowState.type===ti.A.Organization&&i.flowState.organization&&i.formState.emailState.userSuppliedEmail&&C({otp:e,emailAddress:i.formState.emailState.userSuppliedEmail,organizationId:i.flowState.organization.organization_id,sessionDurationMinutes:t.sessionOptions.sessionDurationMinutes})},errorMessage:A,expiration:a,formattedDestination:s,resendOTP:function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)switch(e.n){case 0:if(T(),v){e.n=3;break}if(i.flowState.type!==ti.A.Discovery){e.n=2;break}return e.n=1,p({email:s});case 1:e.n=3;break;case 2:if(!(i.flowState.type===ti.A.Organization&&i.flowState.organization)){e.
1n=3;break}return e.n=3,u({email:s,organization_id:i.flowState.organization.organization_id});case 3:return e.a(2)}},e)}))}}):rm.createElement(c1,null))},lI=sy(sy({},ti.B.totp,{messageDescriptor:{id:"mfa.enrollment.option.totp",message:"Use an authenticator app"},screen:e0.TOTPEnrollmentQRCode}),ti.B.smsOtp,{messageDescriptor:{id:"mfa.enrollment.option.sms",message:"Text me a code"},screen:e0.SMSOTPEnrollment}),lL=function(){var e=o7()._,t=sW(),n=t.mfaProductInclude,r=t.mfaProductOrder,i=sb(sG(),2),o=i[0],a=i[1],s=o.mfa.primaryInfo.organizationMfaOptionsSupported,c=function(e){a({type:"transition",screen:lI[e].screen,history:"push"})},u=ny(function(){var e=sA({allMethods:sR,orgSupportedMethods:s,uiIncludedMethods:n}),t=(null!=r?r:sR).reduce(function(t,n){return e.has(n)&&(t.push({option:n,messageDescriptor:lI[n].messageDescriptor}),e.delete(n)),t},[]);return e.forEach(function(e){t.push({option:e,messageDescriptor:lI[e].messageDescriptor})}),t},[n,r,s]);return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s1,{size:"header"},e({id:"mfa.enrollment.title",message:"Set up Multi-Factor Authentication"})),rm.createElement(s1,null,e({id:"mfa.enrollment.content",message:"Your organization requires an additional form of verification to make your account more secure."})),rm.createElement(s0,{direction:"column"},u.map(function(t){var n=t.option,r=t.messageDescriptor;return rm.createElement(lo,{key:n,onClick:function(){c(n)}},e(r))})))},lM=function(e){var t=e.emailDomain,n=e.reset,r=e.email,i=o7()._,o=sb(sG(),2)[1];return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){return o({type:"transition",screen:e0.Main})}}),rm.createElement(s1,{size:"header"},i({id:"password.verification.title",message:"Verify your email first."})),rm.createElement(s0,{direction:"column",gap:12},rm.createElement(s1,null,rm.createElement(ae,{id:"password.verification.content",message:"A login link was sent to you at <bold>{email}</bold>.",components:{bold:rm.createElement("b",null)},values:{email:r}})),rm.createElement(s0,{direction:"column",gap:8},rm.createElement(uG,{emailDomain:t,providerInfo:uH.gmail}),rm.createElement(uG,{emailDomain:t,providerInfo:uH.outlook}))),rm.createElement(s0,{direction:"row"},rm.createElement(s1,{color:"secondary"},rm.createElement(ae,{id:"password.verification.resendEmail",message:"Didn't get it? <resendButton>Resend email</resendButton>",components:{resendButton:rm.createElement(cU,{onClick:n})}}))))},lB=function(){var e,t,n=sK(),r=sW(),i=sb(nf(function(){return(0,ti.r)(n).bootstrap.getSync().emailDomains}),2),o=i[0],a=i[1];return(nm(function(){(0,ti.r)(n).bootstrap.getAsync().then(function(e){a(e.emailDomains)})},[n]),null==(e=r.emailMagicLinksOptions)?void 0:e.domainHint)?null==(t=r.emailMagicLinksOptions)?void 0:t.domainHint:1===o.length?o[0]:null},lN=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=lB();return rm.createElement(lM,{emailDomain:r,reset:function(){n({type:"set_user_supplied_email",email:""}),n({type:"transition",screen:e0.Main})},email:t.formState.passwordState.email})},lU=oh.div(eu||(eu=sw(["\n  height: 4px;\n  width: 25%;\n  background-color: ",";\n"])),function(e){return e.$bgColor}),lH=function(e){var t=e.score,n=[];switch(t){case 0:case 1:n=["#8B1214","#ADBCC5","#ADBCC5","#ADBCC5"];break;case 2:n=["#8B1214","#8B1214","#ADBCC5","#ADBCC5"];break;case 3:n=["#0C5A56","#0C5A56","#0C5A56","#ADBCC5"];break;case 4:n=["#0C5A56","#0C5A56","#0C5A56","#0C5A56"];break;default:n=["#ADBCC5","#ADBCC5","#ADBCC5","#ADBCC5"]}return rm.createElement(s0,{gap:2},n.map(function(e,t){return rm.createElement(lU,{key:"".concat(e,"-").concat(t),$bgColor:e})}))},lK=function(){return tU(s0,{height:16,width:16},tU("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M5.86332 10.5833L3.08332 7.80333L2.13666 8.74333L5.86332 12.47L13.8633 4.47L12.9233 3.53L5.86332 10.5833Z",fill:"#0C5A56"})))},lG=function(){return tU(s0,{height:16,width:16},tU("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M12.6667 4.27334L11.7267 3.33334L8.00001 7.06001L4.27334 3.33334L3.33334 4.27334L7.06001 8.00001L3.33334 11.7267L4.27334 12.6667L8.00001 8.94001L11.7267 12.6667L12.6667 11.7267L8.94001 8.00001L12.6667 4.27334Z",fill:"#8B1214"})))},lW={"Short keyboard patterns are easy to guess.":{id:"password.zxcvbn.warning.shortKeyboardPatterns",message:"Short keyboard patterns are easy to guess."},"Straight rows of keys are easy to guess.":{id:"password.zxcvbn.warning.straightRows",message:"Straight rows of keys are easy to guess."},'Repeats like "aaa" are easy to guess.':{id:"password.zxcvbn.warning.repeats",message:'Repeats like "aaa" are easy to guess.'},'Repeats like "abcabcabc" are only slightly harder to guess than "abc".':{id:"password.zxcvbn.warning.longerRepeats",message:'Repeats like "abcabcabc" are only slightly harder to guess than "abc".'},'Sequences like "abc" or "6543" are easy to guess.':{id:"password.zxcvbn.warning.sequences",message:'Sequences like "abc" or "6543" are easy to guess.'},"Recent years are easy to guess.":{id:"password.zxcvbn.warning.recentYears",message:"Recent years are easy to guess."},"Dates are often easy to guess.":{id:"password.zxcvbn.warning.dates",message:"Dates are often easy to guess."},"This is a top-10 common password.":{id:"password.zxcvbn.warning.top10CommonPassword",message:"This is a top-10 common password."},"This is a top-100 common password.":{id:"password.zxcvbn.warning.top100CommonPassword",message:"This is a top-100 common password."},"This is a very common password.":{id:"password.zxcvbn.warning.veryCommonPassword",message:"This is a very common password."},"This is similar to a commonly used password.":{id:"password.zxcvbn.warning.similarToCommonPassword",message:"This is similar to a commonly used password."},"A word by itself is easy to guess.":{id:"password.zxcvbn.warning.wordByItself",message:"A word by itself is easy to guess."},"Names and surnames by themselves are easy to guess.":{id:"password.zxcvbn.warning.names",message:"Names and surnames by themselves are easy to guess."},"Common names and surnames are easy to guess.":{id:"password.zxcvbn.warning.commonNames",message:"Common names and surnames are easy to guess."}},lq={"Use a few words, avoid common phrases.":{id:"password.zxcvbn.suggestion.useAFewWords",message:"Use a few words, avoid common phrases."},"No need for symbols, digits, or uppercase letters.":{id:"password.zxcvbn.suggestion.noSymbolsDigitsUppercase",message:"No need for symbols, digits, or uppercase letters."},"Add another word or two. Uncommon words are better.":{id:"password.zxcvbn.suggestion.addWords",message:"Add another word or two. Uncommon words are better."},"Use a longer keyboard pattern with more turns.":{id:"password.zxcvbn.suggestion.longerKeyboardPattern",message:"Use a longer keyboard pattern with more turns."},"Avoid repeated words and characters.":{id:"password.zxcvbn.suggestion.avoidRepeats",message:"Avoid repeated words and characters."},"Avoid sequences.":{id:"password.zxcvbn.suggestion.avoidSequences",message:"Avoid sequences."},"Avoid recent years.":{id:"password.zxcvbn.suggestion.avoidRecentYears",message:"Avoid recent years."},"Avoid years that are associated with you.":{id:"password.zxcvbn.suggestion.avoidYearsAssociatedWithYou",message:"Avoid years that are associated with you."},"Avoid dates and years that are associated with you.":{id:"password.zxcvbn.suggestion.avoidDatesAndYearsAssociatedWithYou",message:"Avoid dates and years that are associated with you."},"Capitalization doesn't help very much.":{id:"password.zxcvbn.suggestion.capitalization",message:"Capitalization doesn't help very much."},"All-uppercase is almost as easy to guess as all-lowercase.":{id:"password.zxcvbn.suggestion.allUppercase",message:"All-uppercase is almost as easy to guess as all-lowercase."},"Reversed words aren't much harder to guess.":{id:"password.zxcvbn.suggestion.reversed",message:"Reversed words aren't much harder to guess."},"Predictable substitutions like '@' instead of 'a' don't help very much.":{id:"password.zxcvbn.suggestion.predictableSubstitutions",message:"Predictable substitutions like '@' instead of 'a' don't help very much."}},lV=oh.div(el||(el=sw(["\n  display: flex;\n  justify-content: center;\n  width: 16px;\n  flex-shrink: 0;\n\n  &::before {\n    content: '•';\n    font-size: ",";\n    line-height: ",";\n    color: ",";\n  }\n"])),function(e){return e.theme.typography.helper.fontSize},function(e){return e.theme.typography.helper.lineHeight},function(e){return e.theme.colors.secondary}),l$=oh.div(ed||(ed=sw(["\n  flex-shrink: 0;\n  padding-top: 2px;\n"]))),lZ=function(e){var t,n,r,i,o,a=e.bootstrap,s=(0,ti._)(e,["bootstrap"]),c=o7()._,u=null!=(n=null==(t=a.passwordConfig)?void 0:t.ludsComplexity)?n:0,l=null!=(i=null==(r=a.passwordConfig)?void 0:r.ludsMinimumCount)?i:0;if("none"===s.passwordPolicy)return null;var d=s.isPasswordBreached&&rm.createElement(s0,{gap:4},rm.createElement(lG,null),rm.createElement(s1,{size:"helper",color:"error"},c({id:"password.strengthError.breached",message:"This password may have been used on a different site that experienced a security issue. Please choose another password."})));if("zxcvbn"===s.passwordPolicy){var f=s.passwordWarning?null!=(o=lW[s.passwordWarning])?o:s.passwordWarning:null,p=sk(new Set(s.passwordSuggestions)).map(function(e){var t;return null!=(t=lq[e])?t:e});return rm.createElement(rm.Fragment,null,rm.createElement(lH,{score:s.passwordScore}),s.errorMessage&&rm.createElement(ca,{errorMessage:s.errorMessage}),f&&rm.createElement(s0,{gap:1,alignItems:"flex-start"},rm.createElement(l$,null,rm.createElement(lG,null)),rm.createElement(s1,{size:"helper",color:"error"},c(f))),p.map(function(e,t){return rm.createElement(s0,{key:t,gap:1,alignItems:"flex-start"},rm.createElement(lV,null)," ",rm.createElement(s1,{size:"helper",color:"secondary"},c(e)))}),d)}return rm.createElement(s0,{direction:"column",gap:4},rm.createElement(s0,{gap:4},0===s.missingCharacters?rm.createElement(lK,null):rm.createElement(lG,null),rm.createElement(s1,{size:"helper",color:0===s.missingCharacters?"success":"error"},c({id:"password.strengthError.minimumLength",message:"{characterLength, plural, one {Must be at least # character long} other {Must be at least # characters long}}",values:{characterLength:l}}))),rm.createElement(s0,{gap:4},0===s.missingComplexity?rm.createElement(lK,null):rm.createElement(lG,null),rm.createElement(s1,{size:"helper",color:0===s.missingComplexity?"success":"error"},c({id:"password.strengthError.complexity",message:"{complexity, plural, one {Must contain # of the following: uppercase letter, lowercase letter, number, symbol} other {Must contain # of the following: uppercase letter, lowercase letter, number, symbol}}",values:{complexity:u}}))),d)},lY=function(e){var t=cj();return rm.createElement(lZ,Object.assign({},e,{bootstrap:t}))},lJ=oh.form(ef||(ef=sw(["\n  width: 100%;\n"]))),lQ=function(){var e=sK(),t=sW(),n=sb(sG(),2)[1],r=o7()._,i=sV(),o=sq(),a=sb(ny(function(){var t=e.parseAuthenticateUrl();return t?[t.token,t.tokenType]:["",""]},[e]),2),s=a[0],c=a[1],u=(0,ti.r)(e).dataLayer.getItem("reset-email-value"),l=sb(nf(""),2),d=l[0],f=l[1],p=sb(nf(""),2),m=p[0],h=p[1],g=sb(nf(0),2),v=g[0],y=g[1],_=sb(nf(""),2),b=_[0],w=_[1],k=sb(nf([]),2),S=k[0],C=k[1],E=sb(nf(!0),2),O=E[0],x=E[1],P=sb(nf(!1),2),A=P[0],T=P[1],D=sb(nf("none"),2),F=D[0],j=D[1],R=sb(nf(0),2),z=R[0],I=R[1],L=sb(nf(0),2),M=L[0],B=L[1],N=sb(nf(!1),2),U=N[0],H=N[1],K=s2(m),G=ny(function(){return(0,ti.g)(function(t){return e.passwords.strengthCheck({password:t}).then(function(e){var t=e.score,n=e.valid_password,r=e.zxcvbn_feedback,i=e.luds_feedback,o=e.strength_policy,a=e.breached_password;j(o),x(!n),"zxcvbn"===o?(y(t),w(r.warning),C(r.suggestions),H(a)):"luds"===o&&(I(i.missing_characters),B(i.missing_complexity),H(a))})})},[e.passwords]);return nm(function(){var i,a,u;if("multi_tenant_magic_links"===c)return void e.magicLinks.authenticate({magic_links_token:s,session_duration_minutes:null!=(a=null==(i=t.sessionOptions)?void 0:i.sessionDurationMinutes)?a:ti.D,locale:null==(u=t.emailMagicLinksOptions)?void 0:u.locale}).then(function(e){(0,tr.c)(),n({type:"primary_authenticate_success",response:e,includedMfaMethods:t.mfaProductInclude,resetTokenType:c})}).catch(function(e){h(cW(e,r)),o(e)})},[c]),rm.createElement(s0,{direction:"column",gap:36,className:"resetPasswordContainer"},rm.createElement(s1,{size:"header"},r({id:"password.setNew.title",message:"Set a new password"})),rm.createElement(lJ,{onSubmit:function(a){var u,l,f;a.preventDefault(),h(""),T(!0),"multi_tenant_passwords"==c?e.passwords.resetByEmail({password_reset_token:s,password:d,session_duration_minutes:null!=(l=null==(u=t.sessionOptions)?void 0:u.sessionDurationMinutes)?l:ti.D,locale:null==(f=t.passwordOptions)?void 0:f.locale}).then(function(e){T(!1),i({type:ti.S.B2BPasswordResetByEmail,data:e}),cR(e,n,t)}).catch(function(e){o(e),h(cW(e,r)),T(!1)}):"discovery"==c?e.passwords.discovery.resetByEmail({password_reset_token:s,password:d}).then(function(e){T(!1),i({type:ti.S.B2BDiscoveryPasswordReset,data:e}),n({type:"transition",screen:e0.Discovery}),n({type:"set_discovery_state",email:e.email_address,discoveredOrganizations:e.discovered_organizations})}).catch(function(e){o(e),h(cW(e,r)),T(!1)}):e.passwords.resetBySession({password:d}).then(function(e){T(!1),i({type:ti.S.B2BPasswordResetBySession,data:e}),n({type:"transition",screen:e0.LoggedIn})}).catch(function(e){o(e),h(cW(e,r)),T(!1)})}},rm.createElement(s0,{direction:"column",gap:8},u?rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"email-input"},r({id:"formField.email.label",message:"Email"})),rm.createElement(cn,{disabled:!0,name:"email",id:"email-input",value:u})):rm.createElement(rm.Fragment,null),rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"new-password"},r({id:"formField.password.label",message:"Password"})),rm.createElement(c7,Object.assign({password:d,setPassword:function(e){f(e),G(e)},type:"new"},K.input)),rm.createElement("div",Object.assign({},K.error),rm.createElement(lY,{passwordPolicy:F,passwordScore:v,errorMessage:m,passwordWarning:b,passwordSuggestions:S,missingCharacters:z,missingComplexity:M,isPasswordBreached:U}))),rm.createElement(ch,{isSubmitting:A,text:r({id:"button.continue",message:"Continue"}),disabled:O}))))}
1,lX=function(){var e=sb(sG(),2)[1],t=o7()._,n=c9(),r=n.email,i=n.setEmail,o=n.password,a=n.setPassword,s=n.organization,c=n.errorMessage,u=n.setErrorMessage,l=n.isSubmitting,d=n.submitPassword,f=n.submitDiscoveryPassword,p=s2(c);return rm.createElement(s0,{direction:"column",gap:28},rm.createElement(s8,{onClick:function(){return e({type:"transition",screen:e0.Main})}}),rm.createElement(s1,{size:"header"},t({id:"password.login.title",message:"Log in with email and password"})),rm.createElement("form",{onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function n(){return sh().w(function(n){for(;;)switch(n.n){case 0:e.preventDefault(),r.match(ti.E)?s?d(s.organization_id):f():u(t({id:"error.invalidEmailAddress",message:"Invalid email address"}));case 1:return n.a(2)}},n)}))}},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"email-input"},t({id:"formField.email.label",message:"Email"})),rm.createElement(cr,{email:r,setEmail:i})),rm.createElement(s0,{direction:"column",gap:2},rm.createElement(ue,{htmlFor:"current-password"},t({id:"formField.password.label",message:"Password"})),rm.createElement(c7,Object.assign({password:o,setPassword:a,type:"current"},p.input)),rm.createElement(ca,Object.assign({errorMessage:c},p.error))),rm.createElement(ch,{isSubmitting:l,text:t({id:"button.continue",message:"Continue"})}),rm.createElement(cU,{onClick:function(){e({type:"set_password_state",email:r}),e({type:"transition",screen:e0.PasswordForgotForm})}},t({id:"link.signupResetPassword",message:"Sign up or reset password"})))))},l0={data:""},l1=function(e){if("object"==("u"<typeof window?"undefined":sm(window))){var t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||l0},l2=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l5=/\/\*[^]*?\*\/|  +/g,l3=/\n+/g,l4=function(e,t){var n="",r="",i="",o=function(o){var a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?l4(a,o):o+"{"+l4(a,"k"==o[1]?"":t)+"}":"object"==sm(a)?r+=l4(a,t?t.replace(/([^,])+/g,function(e){return o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,function(t){return/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t})}):o):null!=a&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=l4.p?l4.p(o,a):o+":"+a+";")};for(var a in e)o(a);return n+(t&&i?t+"{"+i+"}":i)+r},l6={},l8=function(e){if("object"==sm(e)){var t="";for(var n in e)t+=n+l8(e[n]);return t}return e},l7=function(e,t,n,r,i){var o,a=l8(e),s=l6[a]||(l6[a]=function(e){for(var t=0,n=11;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n}(a));if(!l6[s]){var c=a!==e?e:function(e){for(var t,n,r=[{}];t=l2.exec(e.replace(l5,""));)t[4]?r.shift():t[3]?(n=t[3].replace(l3," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(l3," ").trim();return r[0]}(e);l6[s]=l4(i?sy({},"@keyframes "+s,c):c,n?"":"."+s)}var u=n&&l6.g?l6.g:null;return n&&(l6.g=l6[s]),o=l6[s],u?t.data=t.data.replace(u,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s};function l9(e){var t,n,r=this||{},i=e.call?e(r.p):e;return l7(i.unshift?i.raw?(t=[].slice.call(arguments,1),n=r.p,i.reduce(function(e,r,i){var o=t[i];if(o&&o.call){var a=o(n),s=a&&a.props&&a.props.className||/^go/.test(a)&&a;o=s?"."+s:a&&"object"==sm(a)?a.props?"":l4(a,""):!1===a?"":a}return e+r+(null==o?"":o)},"")):i.reduce(function(e,t){return Object.assign(e,t&&t.call?t(r.p):t)},{}):i,l1(r.target),r.g,r.o,r.k)}l9.bind({g:1});var de=l9.bind({k:1});function dt(e,t){var n=this||{};return function(){var t=arguments;return function r(i,o){var a=Object.assign({},i),s=a.className||r.className;n.p=Object.assign({theme:e4&&e4()},a),n.o=/ *go\d+/.test(s),a.className=l9.apply(n,t)+(s?" "+s:"");var c=e;return e[0]&&(c=a.as||e,delete a.as),e6&&c[0]&&e6(a),e3(c,a)}}}var dn=function(e,t){return"function"==typeof e?e(t):e},dr=(p=0,function(){return(++p).toString()}),di=function(){if(void 0===m&&("u"<typeof window?"undefined":sm(window))<"u"){var e=matchMedia("(prefers-reduced-motion: reduce)");m=!e||e.matches}return m},da=new Map,ds=function(e){if(!da.has(e)){var t=setTimeout(function(){da.delete(e),df({type:4,toastId:e})},1e3);da.set(e,t)}},dc=function(e){var t=da.get(e);t&&clearTimeout(t)},du=function(e,t){switch(t.type){case 0:return sp(sp({},e),{},{toasts:[t.toast].concat(sk(e.toasts)).slice(0,20)});case 1:return t.toast.id&&dc(t.toast.id),sp(sp({},e),{},{toasts:e.toasts.map(function(e){return e.id===t.toast.id?sp(sp({},e),t.toast):e})});case 2:var n=t.toast;return e.toasts.find(function(e){return e.id===n.id})?du(e,{type:1,toast:n}):du(e,{type:0,toast:n});case 3:var r=t.toastId;
1return r?ds(r):e.toasts.forEach(function(e){ds(e.id)}),sp(sp({},e),{},{toasts:e.toasts.map(function(e){return e.id===r||void 0===r?sp(sp({},e),{},{visible:!1}):e})});case 4:return void 0===t.toastId?sp(sp({},e),{},{toasts:[]}):sp(sp({},e),{},{toasts:e.toasts.filter(function(e){return e.id!==t.toastId})});case 5:return sp(sp({},e),{},{pausedAt:t.time});case 6:var i=t.time-(e.pausedAt||0);return sp(sp({},e),{},{pausedAt:void 0,toasts:e.toasts.map(function(e){return sp(sp({},e),{},{pauseDuration:e.pauseDuration+i})})})}},dl=[],dd={toasts:[],pausedAt:void 0},df=function(e){dd=du(dd,e),dl.forEach(function(e){e(dd)})},dp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},dm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=sb(nf(dd),2),n=t[0],r=t[1];nm(function(){return dl.push(r),function(){var e=dl.indexOf(r);e>-1&&dl.splice(e,1)}},[n]);var i=n.toasts.map(function(t){var n,r;return sp(sp(sp(sp({},e),e[t.type]),t),{},{duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||dp[t.type],style:sp(sp(sp({},e.style),null==(r=e[t.type])?void 0:r.style),t.style)})});return sp(sp({},n),{},{toasts:i})},dh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"blank",n=arguments.length>2?arguments[2]:void 0;return sp(sp({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0},n),{},{id:(null==n?void 0:n.id)||dr()})},dg=function(e){return function(t,n){var r=dh(t,e,n);return df({type:2,toast:r}),r.id}},dv=function(e,t){return dg("blank")(e,t)};dv.error=dg("error"),dv.success=dg("success"),dv.loading=dg("loading"),dv.custom=dg("custom"),dv.dismiss=function(e){df({type:3,toastId:e})},dv.remove=function(e){return df({type:4,toastId:e})},dv.promise=function(e,t,n){var r=dv.loading(t.loading,sp(sp({},n),null==n?void 0:n.loading));return e.then(function(e){return dv.success(dn(t.success,e),sp(sp({id:r},n),null==n?void 0:n.success)),e}).catch(function(e){dv.error(dn(t.error,e),sp(sp({id:r},n),null==n?void 0:n.error))}),e};var dy=function(e,t){df({type:1,toast:{id:e,height:t}})},d_=function(){df({type:5,time:Date.now()})},db=function(e){var t=dm(e),n=t.toasts,r=t.pausedAt;nm(function(){if(!r){var e=Date.now(),t=n.map(function(t){if(t.duration!==1/0){var n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(n<0){t.visible&&dv.dismiss(t.id);return}return setTimeout(function(){return dv.dismiss(t.id)},n)}});return function(){t.forEach(function(e){return e&&clearTimeout(e)})}}},[n,r]);var i=n_(function(){r&&df({type:6,time:Date.now()})},[r]),o=n_(function(e,t){var r,i=t||{},o=i.reverseOrder,a=i.gutter,s=void 0===a?8:a,c=i.defaultPosition,u=n.filter(function(t){return(t.position||c)===(e.position||c)&&t.height}),l=u.findIndex(function(t){return t.id===e.id}),d=u.filter(function(e,t){return t<l&&e.visible}).length;return(r=u.filter(function(e){return e.visible})).slice.apply(r,sk(void 0!==o&&o?[d+1]:[0,d])).reduce(function(e,t){return e+(t.height||0)+s},0)},[n]);return{toasts:n,handlers:{updateHeight:dy,startPause:d_,endPause:i,calculateOffset:o}}},dw=de(ep||(ep=sw(["\nfrom {\n  transform: scale(0) rotate(45deg);\n	opacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n  opacity: 1;\n}"]))),dk=de(em||(em=sw(["\nfrom {\n  transform: scale(0);\n  opacity: 0;\n}\nto {\n  transform: scale(1);\n  opacity: 1;\n}"]))),dS=de(eh||(eh=sw(["\nfrom {\n  transform: scale(0) rotate(90deg);\n	opacity: 0;\n}\nto {\n  transform: scale(1) rotate(90deg);\n	opacity: 1;\n}"]))),dC=dt("div")(eg||(eg=sw(["\n  width: 20px;\n  opacity: 0;\n  height: 20px;\n  border-radius: 10px;\n  background: ",";\n  position: relative;\n  transform: rotate(45deg);\n\n  animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n  animation-delay: 100ms;\n\n  &:after,\n  &:before {\n    content: '';\n    animation: "," 0.15s ease-out forwards;\n    animation-delay: 150ms;\n    position: absolute;\n    border-radius: 3px;\n    opacity: 0;\n    background: ",";\n    bottom: 9px;\n    left: 4px;\n    height: 2px;\n    width: 12px;\n  }\n\n  &:before {\n    animation: "," 0.15s ease-out forwards;\n    animation-delay: 180ms;\n    transform: rotate(90deg);\n  }\n"])),function(e){return e.primary||"#ff4b4b"},dw,dk,function(e){return e.secondary||"#fff"},dS),dE=de(ev||(ev=sw(["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"]))),dO=dt("div")(ey||(ey=sw(["\n  width: 12px;\n  height: 12px;\n  box-sizing: border-box;\n  border: 2px solid;\n  border-radius: 100%;\n  border-color: ",";\n  border-right-color: ",";\n  animation: "," 1s linear infinite;\n"])),function(e){return e.secondary||"#e0e0e0"},function(e){return e.primary||"#616161"},dE),dx=de(e_||(e_=sw(["\nfrom {\n  transform: scale(0) rotate(45deg);\n	opacity: 0;\n}\nto {\n  transform: scale(1) rotate(45deg);\n	opacity: 1;\n}"]))),dP=de(eb||(eb=sw(["\n0% {\n	height: 0;\n	width: 0;\n	opacity: 0;\n}\n40% {\n  height: 0;\n	width: 6px;\n	opacity: 1;\n}\n100% {\n  opacity: 1;\n  height: 10px;\n}
1"]))),dA=dt("div")(ew||(ew=sw(["\n  width: 20px;\n  opacity: 0;\n  height: 20px;\n  border-radius: 10px;\n  background: ",";\n  position: relative;\n  transform: rotate(45deg);\n\n  animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n  animation-delay: 100ms;\n  &:after {\n    content: '';\n    box-sizing: border-box;\n    animation: "," 0.2s ease-out forwards;\n    opacity: 0;\n    animation-delay: 200ms;\n    position: absolute;\n    border-right: 2px solid;\n    border-bottom: 2px solid;\n    border-color: ",";\n    bottom: 6px;\n    left: 6px;\n    height: 10px;\n    width: 6px;\n  }\n"])),function(e){return e.primary||"#61d345"},dx,dP,function(e){return e.secondary||"#fff"}),dT=dt("div")(ek||(ek=sw(["\n  position: absolute;\n"]))),dD=dt("div")(eS||(eS=sw(["\n  position: relative;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-width: 20px;\n  min-height: 20px;\n"]))),dF=de(eC||(eC=sw(["\nfrom {\n  transform: scale(0.6);\n  opacity: 0.4;\n}\nto {\n  transform: scale(1);\n  opacity: 1;\n}"]))),dj=dt("div")(eE||(eE=sw(["\n  position: relative;\n  transform: scale(0.6);\n  opacity: 0.4;\n  min-width: 20px;\n  animation: "," 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n"])),dF),dR=function(e){var t=e.toast,n=t.icon,r=t.type,i=t.iconTheme;return void 0!==n?"string"==typeof n?tU(dj,null,n):n:"blank"===r?null:tU(dD,null,tU(dO,sp({},i)),"loading"!==r&&tU(dT,null,"error"===r?tU(dC,sp({},i)):tU(dA,sp({},i))))},dz=dt("div")(eO||(eO=sw(["\n  display: flex;\n  align-items: center;\n  background: #fff;\n  color: #363636;\n  line-height: 1.3;\n  will-change: transform;\n  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n  max-width: 350px;\n  pointer-events: auto;\n  padding: 8px 10px;\n  border-radius: 8px;\n"]))),dI=dt("div")(ex||(ex=sw(["\n  display: flex;\n  justify-content: center;\n  margin: 4px 10px;\n  color: inherit;\n  flex: 1 1 auto;\n  white-space: pre-line;\n"]))),dL=function(e,t){var n=e.includes("top")?1:-1,r=sb(di()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:["\n0% {transform: translate3d(0,".concat(-200*n,"%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n"),"\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,".concat(-150*n,"%,-1px) scale(.6); opacity:0;}\n")],2),i=r[0],o=r[1];return{animation:t?"".concat(de(i)," 0.35s cubic-bezier(.21,1.02,.73,1) forwards"):"".concat(de(o)," 0.4s forwards cubic-bezier(.06,.71,.55,1)")}},dM=nF(function(e){var t=e.toast,n=e.position,r=e.style,i=e.children,o=t.height?dL(t.position||n||"top-center",t.visible):{opacity:0},a=tU(dR,{toast:t}),s=tU(dI,sp({},t.ariaProps),dn(t.message,t));return tU(dz,{className:t.className,style:sp(sp(sp({},o),r),t.style)},"function"==typeof i?i({icon:a,message:s}):tU(tG,null,a,s))});l4.p=void 0,e3=tU,e4=void 0,e6=void 0;var dB=function(e){var t=e.id,n=e.className,r=e.style,i=e.onHeightUpdate,o=e.children;return tU("div",{ref:n_(function(e){if(e){var n=function(){i(t,e.getBoundingClientRect().height)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,i]),className:n,style:r},o)},dN=function(e,t){var n=e.includes("top"),r=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return sp(sp({left:0,right:0,display:"flex",position:"absolute",transition:di()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY(".concat(t*(n?1:-1),"px)")},n?{top:0}:{bottom:0}),r)}
1,dU=l9(eP||(eP=sw(["\n  z-index: 9999;\n  > * {\n    pointer-events: auto;\n  }\n"]))),dH=function(e){var t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,o=e.gutter,a=e.children,s=e.containerStyle,c=e.containerClassName,u=db(i),l=u.toasts,d=u.handlers;return tU("div",{style:sp({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},s),className:c,onMouseEnter:d.startPause,onMouseLeave:d.endPause},l.map(function(e){var n=e.position||r,i=dN(n,d.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:r}));return tU(dB,{id:e.id,key:e.id,onHeightUpdate:d.updateHeight,className:e.visible?dU:"",style:i},"custom"===e.type?dn(e.message,e):a?a(e):tU(dM,{toast:e,position:n}))}))},dK=function(e){var t=e.onClick,n=e.children;return rm.createElement("button",{onClick:t,style:{all:"unset"}},rm.createElement("b",{style:{cursor:"pointer"}},n))},dG=function(){var e=sb(sG(),2)[1],t=sV(),n=sW(),r=o7()._,i=c9(),o=i.stytch,a=i.onError,s=i.email,c=i.organization,u=i.setIsSubmitting;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){return e({type:"transition",screen:e0.Main})}}),rm.createElement(s1,{size:"header"},r({id:"password.reset.emailSent.title",message:"Check your email!"})),rm.createElement(s1,null,rm.createElement(ae,{id:"password.reset.emailSent.content",message:"A login link was sent to you at <bold>{email}</bold>.",components:{bold:rm.createElement("b",null)},values:{email:s}})),rm.createElement(s1,null,rm.createElement(ae,{id:"password.reset.emailSent.resendText",message:"Didn't get it? <resendButton>Resend email</resendButton>",components:{resendButton:rm.createElement(dK,{onClick:function(){var e,i,l,d,f,p,m,h,g,v,y,_;c?o.passwords.resetByEmailStart({email_address:s,organization_id:c.organization_id,login_redirect_url:null==(m=n.passwordOptions)?void 0:m.loginRedirectURL,reset_password_redirect_url:null==(h=n.passwordOptions)?void 0:h.resetPasswordRedirectURL,reset_password_expiration_minutes:null==(g=n.passwordOptions)?void 0:g.resetPasswordExpirationMinutes,reset_password_template_id:null==(v=n.passwordOptions)?void 0:v.resetPasswordTemplateId,verify_email_template_id:null==(y=n.passwordOptions)?void 0:y.verifyEmailTemplateId,locale:null==(_=n.passwordOptions)?void 0:_.locale}).then(function(e){dv.success(r({id:"password.reset.toast.emailResent",message:"Email resent"})),u(!1),t({type:ti.S.B2BPasswordResetByEmailStart,data:e})}).catch(function(e){a(e)}):o.passwords.discovery.resetByEmailStart({email_address:s,discovery_redirect_url:null==(e=n.passwordOptions)?void 0:e.discoveryRedirectURL,reset_password_redirect_url:null==(i=n.passwordOptions)?void 0:i.resetPasswordRedirectURL,reset_password_expiration_minutes:null==(l=n.passwordOptions)?void 0:l.resetPasswordExpirationMinutes,reset_password_template_id:null==(d=n.passwordOptions)?void 0:d.resetPasswordTemplateId,verify_email_template_id:null==(f=n.passwordOptions)?void 0:f.verifyEmailTemplateId,locale:null==(p=n.passwordOptions)?void 0:p.locale}).then(function(e){dv.success(r({id:"password.reset.toast.emailResent",message:"Email resent"})),u(!1),t({type:ti.S.B2BPasswordDiscoveryResetStart,data:e})})}})}})))},dW=function(){var e=sb(sG(),2)[1],t=sW(),n=sV(),r=o7()._,i=c9(),o=i.stytch,a=i.email,s=i.setEmail,c=i.organization,u=i.errorMessage,l=i.setErrorMessage,d=i.isSubmitting,f=i.setIsSubmitting,p=i.handleNonMemberReset,m=s2(u);return rm.createElement("form",{onSubmit:function(i){return(0,ti.d)(void 0,void 0,void 0,sh().m(function s(){var u,d,m,h,g,v;return sh().w(function(s){for(;;)switch(s.n){case 0:if(i.preventDefault(),a.match(ti.E)){s.n=1;break}return l(r({id:"error.invalidEmailAddress",message:"Invalid email address"})),s.a(2);case 1:l(""),f(!0),c?(0,ti.r)(o).searchManager.searchMember(a,c.organization_id).then(function(i){var s,u,d,m,h,g;i.member?o.passwords.resetByEmailStart({email_address:a,organization_id:c.organization_id,login_redirect_url:null==(s=t.emailMagicLinksOptions)?void 0:s.loginRedirectURL,reset_password_redirect_url:null==(u=t.passwordOptions)?void 0:u.resetPasswordRedirectURL,reset_password_expiration_minutes:null==(d=t.passwordOptions)?void 0:d.resetPasswordExpirationMinutes,reset_password_template_id:null==(m=t.passwordOptions)?void 0:m.resetPasswordTemplateId,verify_email_template_id:null==(h=t.passwordOptions)?void 0:h.verifyEmailTemplateId,locale:null==(g=t.passwordOptions)?void 0:g.locale}).then(function(t){f(!1),n({type:ti.S.B2BPasswordResetByEmailStart,data:t}),e({type:"set_password_state",email:a}),e({type:"transition",screen:e0.PasswordSetNewConfirmation})}).catch(function(e){f(!1),l(cW(e,r))}):p()}).catch(function(e){f(!1),l(cW(e,r))}):o.passwords.discovery.resetByEmailStart({email_address:a,discovery_redirect_url:null==(u=t.passwordOptions)?void 0:u.discoveryRedirectURL,reset_password_redirect_url:null==(d=t.passwordOptions)?void 0:d.resetPasswordRedirectURL,reset_password_expiration_minutes:null==(m=t.passwordOptions)?void 0:m.resetPasswordExpirationMinutes,reset_password_template_id:null==(h=t.passwordOptions)?void 0:h.resetPasswordTemplateId,verify_email_template_id:null==(g=t.passwordOptions)?void 0:g.verifyEmailTemplateId,locale:null==(v=t.passwordOptions)?void 0:v.locale}).then(function(){f(!1),e({type:"set_password_state",email:a}),e({type:"transition",screen:e0.PasswordSetNewConfirmation})}).catch(function(e){f(!1),l(cW(e,r))});case 2:return s.a(2)}},s)}))}},rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){return e({type:"transition",screen:e0.Main})}}),rm.createElement(s1,{size:"header"},r({id:"password.forgot.title",message:"Check your email for help signing in!"})),rm.createElement(s1,null,c?r({id:"password.forgot.content.organization",message:"We'll email you a login link to sign in to your account directly or reset your password if you have one."}):r({id:"password.forgot.content.discovery",message:"We'll email you a verification link to sign up for an account or reset your password if you have one."})),rm.createElement(s0,{direction:"column",gap:4},rm.createElement(ue,{htmlFor:"email-input"},r({id:"formField.email.label",message:"Email"})),rm.createElement(cr,Object.assign({email:a,setEmail:s},m.input)),rm.createElement(ca,Object.assign({errorMessage:u},m.error)),rm.createElement(ch,{isSubmitting:d,text:r({id:"button.continue",message:"Continue"})}))))},dq=function(){var e=sK(),t=sW().sessionOptions.sessionDurationMinutes,n=o7()._,r=sb(sG(),2),i=r[0],o=r[1],a=i.mfa.primaryInfo,s=a.memberId,c=a.organizationId,u=cD("stytch.recoveryCodes.recover",function(t,n){var r=n.arg,i=r.re
1coveryCode,o=r.memberId,a=r.organizationId,s=r.sessionDurationMinutes;return e.recoveryCodes.recover({recovery_code:i,member_id:o,organization_id:a,session_duration_minutes:s})},{onSuccess:function(){o({type:"recovery_code/authenticate_success"})}}),l=u.trigger,d=u.isMutating,f=u.error,p=sb(nf(""),2),m=p[0],h=p[1],g=s2(f),v=f?n({id:"recoveryCodes.entry.error.invalidCode",message:"Invalid backup code, please try again."}):void 0;return rm.createElement("form",{onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function n(){return sh().w(function(n){for(;;)switch(n.n){case 0:e.preventDefault(),l({recoveryCode:m,memberId:s,organizationId:c,sessionDurationMinutes:t});case 1:return n.a(2)}},n)}))}},rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){return o({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},n({id:"recoveryCodes.entry.title",message:"Enter backup code"})),rm.createElement(s1,null,n({id:"recoveryCodes.entry.content",message:"Enter one of the backup codes you saved when setting up your authenticator app."})),rm.createElement(s0,{direction:"column"},rm.createElement(cn,Object.assign({value:m,onChange:function(e){h(e.target.value)},placeholder:n({id:"formField.backupCode.placeholder",message:"Enter backup code"}),"aria-label":n({id:"formField.backupCode.ariaLabel",message:"Backup code"}),required:!0,autoComplete:"off"},g.input)),v&&rm.createElement(ca,Object.assign({errorMessage:v},g.error))),rm.createElement(ch,{text:n({id:"button.continue",message:"Continue"}),disabled:!m,isSubmitting:d})))},dV=oh.div(eA||(eA=sw(["\n  background-color: #f3f5f6;\n  color: #000;\n  font-size: 16px;\n  line-height: 28px;\n  display: flex;\n  align-items: flex-start;\n  justify-content: center;\n  gap: 8px;\n  padding: 16px 8px;\n"]))),d$=oh.ul(eT||(eT=sw(["\n  list-style: none;\n  padding: 0;\n  margin: 0;\n"]))),dZ=function(e,t){var n=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,i.click(),URL.revokeObjectURL(r)},dY=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=o7()._,i=t.mfa.totp.enrollment.recoveryCodes;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s1,{size:"header"},r({id:"recoveryCodes.save.title",message:"Save your backup codes!"})),rm.createElement(s1,null,r({id:"recoveryCodes.save.content",message:"This is the only time you will be able to access and save your backup codes."})),rm.createElement(dV,null,rm.createElement(d$,null,i.map(function(e,t){return rm.createElement("li",{key:t},rm.createElement("code",null,e))}))),rm.createElement(s0,{gap:24},rm.createElement(cs,{type:"button",onClick:function(){var e,n=null==(e=t.flowState.organization)?void 0:e.organization_name;dZ(i.join("\n"),"".concat(n?n+"-":"","backup-codes.txt"))}},r({id:"recoveryCodes.save.button.download",message:"Download file"})),rm.createElement(cs,{type:"button",onClick:function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,navigator.clipboard.writeText(i.join("\n"));case 1:dv.success(r({id:"recoveryCodes.save.toast.copied",message:"Copied"})),e.n=3;break;case 2:e.p=2,e.v,dv.error(r({id:"recoveryCodes.save.toast.copyFailed",message:"Couldn't copy codes to clipboard"}));case 3:return e.a(2)}},e,null,[[0,2]])}))}},r({id:"recoveryCodes.save.button.copyAll",message:"Copy all"}))),rm.createElement(cs,{type:"button",variant:"text",onClick:function(){n({type:"recovery_code/save_acknowledge"})}},r({id:"recoveryCodes.save.button.done",message:"Done"})))},dJ=oh.select(eD||(eD=sw(["\n  background-color: ",";\n  border: 1px solid ",";\n  border-radius: ",";\n  height: 47px;\n  box-sizing: border-box;\n  padding: 0 8px;\n  color: ",";\n  font-family: ",";\n  width: 80px;\n  font-size: 18px;\n"])),function(e){return e.theme.inputs.backgroundColor},function(e){return e.theme.inputs.borderColor},function(e){return e.theme.inputs.borderRadius},function(e){return e.theme.inputs.textColor},function(e){return e.theme.typography.fontFamily}
1),dQ=function(e){var t=e.country,n=e.setCountry,r=o7()._,i=new Intl.DisplayNames(["en"],{type:"region"});return rm.createElement(dJ,{"data-testid":"select-test-id",name:"country-select","aria-label":r({id:"formField.countryCode.label",message:"Country code"}),value:t,onChange:function(e){n(e.target.value)}},Object.entries(ti.C).map(function(e){var n=sb(e,2),r=n[0],o=n[1];return rm.createElement("option",{key:r,value:r},r!==t?"+".concat(o," ").concat(i.of(r)):"+".concat(o))}))},dX=function(e){var t=e.parsePhoneNumber,n=e.phoneNumber,r=e.country;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var i;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Promise.race([t(n,r),new Promise(function(e){return setTimeout(function(){return e(void 0)},1e4)})]);case 1:if(i=e.v){e.n=2;break}return e.a(2,n);case 2:return e.a(2,i.national);case 3:return e.p=3,e.v,e.a(2,n)}},e,null,[[0,3]])}))},d0=function(e){var t=e.parsePhoneNumber,n=e.phoneNumber,r=e.country;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var i,o,a;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return i=ti.C[r],o={isValid:!0,number:"+".concat(i).concat(n)},e.p=1,e.n=2,Promise.race([t(n,r),new Promise(function(e){return setTimeout(function(){return e(void 0)},2e3)})]);case 2:if(a=e.v){e.n=3;break}return e.a(2,o);case 3:return e.a(2,a);case 4:return e.p=4,e.v,e.a(2,o)}},e,null,[[1,4]])}))},d1=oh(cn)(eF||(eF=sw(["\n  flex-grow: 1;\n  min-width: 100px;\n"]))),d2=function(e){var t=e.phone,n=e.setPhone,r=e.country,i=e.setCountry,o=e.parsePhoneNumber,a=e.hasPasskeys,s=(0,ti._)(e,["phone","setPhone","country","setCountry","parsePhoneNumber","hasPasskeys"]);return rm.createElement(s0,{direction:"row",wrap:"nowrap",justifyContent:"flex-start",alignContent:"stretch",alignItems:"center",gap:8},rm.createElement(dQ,{country:r,setCountry:i}),rm.createElement(d1,Object.assign({name:"phoneNumber",placeholder:"(123) 456-7890",id:"phone-input",autoComplete:a?"username webauthn":void 0,value:t,type:"text",onChange:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){var i,a;return sh().w(function(t){for(;;)switch(t.n){case 0:return i=e.target.value,t.n=1,dX({parsePhoneNumber:o,phoneNumber:i,country:r});case 1:if(a=t.v,i===e.target.value){t.n=2;break}return t.a(2);case 2:n(a);case 3:return t.a(2)}},t)}))},required:!0},a?sn:{},s)))},d5=function(e){function t(){return sa(this,t),ss(this,t,["InvalidPhoneNumberError","Invalid phone number"])}return sl(t,e),so(t)}(ti.h),d3=function(){var e,t,n=sK(),r=sb(sG(),2),i=r[0],o=r[1],a=o7()._,s=sW().smsOtpOptions,c=i.mfa.smsOtp,u=c.isSending,l=c.sendError,d=c.enrolledNumber,f=i.mfa.primaryInfo,p=f.memberId,m=f.organizationId,h=sb(rm.useState(null!=(e=null==d?void 0:d.countryCode)?e:"US"),2),g=h[0],v=h[1],y=sb(rm.useState(null!=(t=null==d?void 0:d.phoneNumber)?t:""),2),_=y[0],b=y[1],w=rm.useMemo(function(){if(l)return l instanceof d5?a({id:"error.invalidPhoneNumber",message:"Phone number format is invalid. Ensure the phone number is in the E.164 format."}):cW(l,a)},[l,a]),k=s2(w),S=a({id:"formField.phone.label",message:"Phone number"}),C=function(e,t){return(0,ti.r)(n).clientsideServices.parsedPhoneNumber({phoneNumber:e,regionCode:t})},E=cD("stytch.otps.sms.send",function(e,t){var r=t.arg,i=r.parsedNumber,o=r.locale;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)if(0===e.n)return e.a(2,n.otps.sms.send({mfa_phone_number:i,member_id:p,organization_id:m,locale:o}))},e)}))},{onSuccess:function(e){o({type:"sms_otp/send_success",response:e,countryCode:g,phoneNumber:_,formattedPhoneNumber:"+".concat(ti.C[g]," ").concat(_)})},onError:function(e){o({type:"sms_otp/send_error",error:e})}}).trigger;return rm.createElement("form",{onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){var n;return sh().w(function(t){for(;;)switch(t.p=t.n){case 0:return e.preventDefault(),o({type:"sms_otp/send"}),t.p=1,t.n=2,d0({parsePhoneNumber:C,phoneNumber:_,country:g});case 2:if((n=t.v).isValid){t.n=3;break}throw new d5;case 3:return t.n=4,E({parsedNumber:n.number,locale:null==s?void 0:s.locale});case 4:t.n=6;break;case 5:t.p=5,o({type:"sms_otp/send_error",error:t.v});case 6:return t.a(2)}},t,null,[[1,5]])}))}},rm.createElement(s0,{direction:"column",gap:24},i.screenHistory.length>0&&rm.createElement(s8,{onClick:function(){return o({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},a({id:"mfa.smsEnrollment.title",message:"Enter your phone number to set up Multi-Factor Authentication"})),rm.createElement(s1,null,a({id:"mfa.smsEnrollment.content",message:"Your organization requires an additional form of verification to make your account more secure."})),rm.createElement(s0,{direction:"column"},rm.createElement(d2,Object.assign({country:g,setCountry:v,phone:_,setPhone:b,parsePhoneNumber:C,"aria-label":S},k.input)),w&&rm.createElement(ca,Object.assign({errorMessage:w},k.error))),rm.createElement(ch,{text:a({id:"button.continue",message:"Continue"}),isSubmitting:u,disabled:!_})))},d4=function(){var e,t=sK(),n=sW(),r=n.sessionOptions.sessionDurationMinutes,i=n.smsOtpOptions,o=o7()._,a=sb(sG(),2),s=a[0],c=a[1],u=s.mfa,l=u.isEnrolling,d=u.smsOtp,f=u.primaryInfo,p=d.codeExpiration,m=d.formattedDestination,h=f.enrolledMfaMethods,g=f.memberId,v=f.memberPhoneNumber,y=f.organizationId,_=f.organizationMfaOptionsSupported,b=cD("stytch.otps.sms.send",function(e,n){var r=n.arg,i=r.memberId,o=r.organizationId,a=r.locale;return c({type:"sms_otp/send"}),t.otps.sms.send({member_id:i,organization_id:o,locale:a})},{onSuccess:function(e){c({type:"sms_otp/send_success",response:e})},onError:function(e){var t=cW(e,o);t&&dv.error(t),c({type:"sms_otp/send_error",error:t})},throwOnError:!0}),w=b.trigger,k=b.isMutating,S=b.error,C=cD("stytch.otps.sms.authenticate",function(e,n){var r=n.arg,i=r.otp,o=r.memberId,a=r.organizationId,s=r.sessionDurationMinutes;return t.otps.sms.authenticate({code:i,member_id:o,organization_id:a,session_duration_minutes:s}
1)},{onSuccess:function(){c({type:"sms_otp/authenticate_success"})}}),E=C.trigger,O=C.isMutating,x=C.error,P=null===p&&!k&&!S;nm(function(){P&&w({memberId:g,organizationId:y,locale:null==i?void 0:i.locale})},[g,y,w,P,null==i?void 0:i.locale]),nm(function(){!m&&v&&(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var n;return sh().w(function(e){for(;;)switch(e.n){case 0:return n=function(e){return(0,ti.r)(t).clientsideServices.parsedPhoneNumber({phoneNumber:e})},e.n=1,dX({parsePhoneNumber:n,phoneNumber:v});case 1:c({type:"sms_otp/format_destination",formattedPhoneNumber:e.v});case 2:return e.a(2)}},e)}))},[c,m,t,v]);var A=ny(function(){return!l&&h.includes(ti.B.totp)&&(0===_.length||_.includes(ti.B.totp))},[h,l,_]),T=x?o({id:"error.passcodeInvalid",message:"Invalid passcode, please try again."}):void 0,D=ny(function(){return l||0===h.length||_.length>0&&!h.some(function(e){return _.includes(e)})},[h,l,_]);return rm.createElement(s0,{direction:"column",gap:24},D&&rm.createElement(s8,{onClick:function(){c({type:"navigate_back"})}}),null!==p?rm.createElement(lR,{isSubmitting:O,onSubmit:function(e){E({otp:e,memberId:g,organizationId:y,sessionDurationMinutes:r})},errorMessage:T,expiration:p,formattedDestination:null!=(e=null!=m?m:v)?e:"",resendOTP:function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,w({memberId:g,organizationId:y,locale:null==i?void 0:i.locale});case 1:return e.a(2)}},e)}))}}):rm.createElement(c1,null),A&&rm.createElement(rm.Fragment,null,rm.createElement(cX,null),rm.createElement(cs,{type:"button",variant:"text",onClick:function(){c({type:"transition",history:"push",screen:e0.TOTPEntry})}},o({id:"mfa.methods.authenticatorApp",message:"Use an authenticator app"}))))},d6=function(){var e=sK();return cD("stytch.sso.discoverConnections",function(t,n){var r=n.arg.emailAddress;return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){return sh().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.sso.discoverConnections(r);case 1:return t.a(2,t.v)}},t)}))},{throwOnError:!0})},d8=function(){var e=sb(sG(),2)[1],t=sb(nf(""),2),n=t[0],r=t[1],i=o7()._,o=sb(nf(null),2),a=o[0],s=o[1],c=sb(nf(!1),2),u=c[0],l=c[1],d=d6().trigger,f=s2(a),p=i({id:"formField.email.label",message:"Email"}),m=sK(),h=sW().ssoOptions;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){e({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},i({id:"ssoDiscovery.email.title",message:"Enter your email to continue"})),rm.createElement("form",{onSubmit:function(t){return(0,ti.d)(void 0,void 0,void 0,sh().m(function r(){var o,a,c;return sh().w(function(r){for(;;)switch(r.p=r.n){case 0:return t.preventDefault(),s(null),r.p=1,l(!0),r.n=2,(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t,r;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,d({emailAddress:n});case 1:if(r=e.v){e.n=2;break}return e.a(2,[]);case 2:return e.a(2,r.connections);case 3:e.p=3,s(null!=(t=sr(e.v,i({id:"ssoDiscovery.email.error.unknown",message:"Something went wrong. Try again later or contact your admin for help."})))?t:null);case 4:return e.a(2)}},e,null,[[0,3]])}));case 2:if((null==(o=r.v)?void 0:o.length)!==1){r.n=4;break}return a=sb(o,1)[0],r.n=3,m.sso.start({connection_id:a.connection_id,login_redirect_url:null==h?void 0:h.loginRedirectURL,signup_redirect_url:null==h?void 0:h.signupRedirectURL});case 3:case 6:return r.a(2);case 4:l(!1),o&&e({type:"set_sso_discovery_state",connections:o}),r.n=6;break;case 5:throw r.p=5,c=r.v,l(!1),c}},r,null,[[1,5]])}))}},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",minHeight:52},rm.createElement(cr,Object.assign({email:n,setEmail:r,"aria-label":p},f.input)),a&&rm.createElement(ca,Object.assign({errorMessage:a},f.error))),rm.createElement(ch,{isSubmitting:u,text:i({id:"button.continue",message:"Continue"})}))))},d7=function(e){var t=e.availableConnections,n=o7()._,r=sb(u_(),2),i=r[0],o=r[1],a=(null==i?void 0:i.startsWith("sso:"))?i.slice(4):void 0,s=sb(ti.f.moveToFront(t,function(e){return e.connection_id===a}),2),c=s[0],u=s[1];return tU(s0,{direction:"column",gap:8,className:"oauth-buttons"},c.map(function(e,t){var r=tU(uE,{key:e.display_name,connection:e,onStart:function(e){return o(uA(e))}});return u&&0===t?tU("div",{key:e.display_name},tU(s1,{size:"helper",color:"secondary",align:"right"},n({id:"provider.lastUsed",message:"Last used"})),r):r}))},d9=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=o7()._;return tU(s0,{direction:"column",gap:24},tU(s8,{onClick:function(){n({type:"navigate_back"})}}),tU(s1,{size:"header"},r({id:"ssoDiscovery.title",message:"Select a connection to continue"})),tU(d7,{availableConnections:t.formState.ssoDiscoveryState.connections}))},fe=function(){var e=sb(sG(),2)[1],t=sb(nf(""),2),n=t[0],r=t[1],i=sb(nf(null),2),o=i[0],a=i[1],s=sb(nf(!1),2),c=s[0],u=s[1],l=sK(),d=sW().ssoOptions,f=o7()._,p=cD("stytch.organization.getBySlug",function(e,t){var n=t.arg.slug;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)if(0===e.n)return e.a(2,l.organization.getBySlug({organization_slug:n}))},e)}))},{onError:function(){a(f({id:"ssoDiscovery.fallback.error.unknown",message:"An error occurred. Please try again."})),u(!1)}}).trigger,m=s2(o);return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){e({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},f({id:"ssoDiscovery.fallback.title",message:"Sorry, we couldn't find any connections."})),rm.createElement(s1,null,f({id:"ssoDiscovery.fallback.content",message:"Please input the Organization's unique slug to continue. If you don't know the unique slug, log in through another method to view all of your available Organizations."})),rm.createElement("form",{onSubmit:function(t){return(0,ti.d)(void 0,void 0,void 0,sh().m(function r(){var i,o,s;return sh().w(function(r){for(;;)switch(r.n){case 0:return t.preventDefault(),a(null),u(!0),r.n=1,p({slug:n});case 1:if(!(i=r.v)){r.n=5;break}if(null!==(o=i.organization)){r.n=2;break}a(f({id:"ssoDiscovery.fallback.error.orgNotFound",message:"Organization not found. Please try again."})),u(!1),r.n=5;break;case 2:if(1!==o.sso_active_connections.length){r.n=4;break}return s=sb(o.sso_active_connections,1)[0],r.n=3,l.sso.start({connection_id:s.connection_id,login_redirect_url:null==d?void 0:d.loginRedirectURL,signup_redirect_url:null==d?void 0:d.signupRedirectURL});case 3:r.n=5;break;case 4:e({type:"set_organization",organization:o}),e({type:"transition",screen:e0.Main});case 5:return r.a(2)}},r)}))}},rm.createElement(s0,{direction:"column",gap:8},rm.createElement(s0,{direction:"column",minHeight:52},rm.createElement(cn,Object.assign({value:n,onChange:function(e){return r(e.target.value)}
1,placeholder:f({id:"formField.orgSlug.placeholder",message:"Enter org slug"})},m.input)),o&&rm.createElement(ca,Object.assign({errorMessage:o},m.error))),rm.createElement(ch,{text:f({id:"button.continue",message:"Continue"}),disabled:!n,isSubmitting:c}))),rm.createElement(cs,{type:"button",variant:"text",onClick:function(){e({type:"transition",screen:e0.Main})}},f({id:"ssoDiscovery.fallback.button.reset",message:"Try another log in method"})))},ft=us(function(){return tU("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M17 1H5C3.9 1 3 1.9 3 3V17H5V3H17V1ZM20 5H9C7.9 5 7 5.9 7 7V21C7 22.1 7.9 23 9 23H20C21.1 23 22 22.1 22 21V7C22 5.9 21.1 5 20 5ZM20 21H9V7H20V21Z",fill:"currentColor"}))}),fn=oh(s3)(ej||(ej=sw(["\n  flex: 0 0 24px;\n  height: 28px;\n  opacity: 0;\n\n  :focus {\n    opacity: 1;\n  }\n"]))),fr=oh(dV)(eR||(eR=sw(["\n  cursor: pointer;\n  :hover "," {\n    opacity: 1;\n  }\n"])),fn),fi=oh.div(ez||(ez=sw(["\n  flex: 0 1 24px;\n"]))),fo=oh.code(eI||(eI=sw(["\n  white-space: pre-wrap;\n  align-self: center;\n  text-align: center;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-wrap: wrap;\n  gap: 1ch;\n"]))),fa=function(){var e=sb(sG(),2),t=e[0],n=e[1],r=o7()._,i=t.mfa.totp.enrollment.secret.toLowerCase(),o=i.split(/(.{4})/g).filter(Boolean),a=function(){return n({type:"navigate_back"})},s=function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){return sh().w(function(t){for(;;)switch(t.p=t.n){case 0:return e.stopPropagation(),t.p=1,t.n=2,navigator.clipboard.writeText(i);case 2:dv.success(r({id:"mfa.totpEnrollment.toast.codeCopied",message:"Code copied"})),t.n=4;break;case 3:t.p=3,t.v,dv.error(r({id:"mfa.totpEnrollment.toast.copyFailed",message:"Couldn't copy code to clipboard"}));case 4:return t.a(2)}},t,null,[[1,3]])}))};return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:a}),rm.createElement(s1,{size:"header"},r({id:"mfa.totpEnrollment.title",message:"Having trouble scanning the QR code?"})),rm.createElement(s1,null,r({id:"mfa.totpEnrollment.content",message:"Click to copy the code below. Enter into your authenticator app to link your account."})),rm.createElement(fr,{onClick:s},rm.createElement(fi,null),rm.createElement(fo,null,o.map(function(e,t){return rm.createElement("span",{key:t},e)})),rm.createElement(fn,{type:"button",onClick:s,"aria-label":r({id:"mfa.totpEnrollment.copyCode.ariaLabel",message:"Copy code"})},rm.createElement(ft,null))),rm.createElement(cs,{type:"button",onClick:function(){n({type:"transition",history:"push",screen:e0.TOTPEntry})}},r({id:"button.continue",message:"Continue"})),rm.createElement(cs,{type:"button",variant:"text",onClick:a},r({id:"button.totpQrRetry",message:"Try to scan the QR code again"})))},fs=oh.img(eL||(eL=sw(["\n  margin: 0 auto;\n"]))),fc=function(){var e=sK(),t=sb(sG(),2),n=t[0],r=t[1],i=o7()._,o=n.mfa.totp,a=o.createError,s=o.enrollment,c=o.isCreating,u=n.mfa.primaryInfo,l=u.memberId,d=u.organizationId,f=cD("stytch.totp.create",function(t,n){var i=n.arg,o=i.memberId,a=i.organizationId;return r({type:"totp/create"}),e.totp.create({member_id:o,organization_id:a})},{onSuccess:function(e){r({type:"totp/create_success",response:e,memberId:l,organizationId:d})},onError:function(e){var t=cW(e,i);t&&dv.error(t),r({type:"totp/create_error",error:e})}}).trigger,p=!s&&!c&&!a;return nm(function(){p&&f({memberId:l,organizationId:d})},[f,l,d,p]),rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s8,{onClick:function(){return r({type:"navigate_back"})}}),rm.createElement(s1,{size:"header"},i({id:"totp.setupQr.title",message:"Scan the QR code to link your authenticator app"})),rm.createElement(s1,null,i({id:"totp.setupQr.content",message:"Your organization requires an additional form of verification to make your account more secure. If you don’t have an authenticator app, you’ll need to install one first."})),s?rm.createElement(rm.Fragment,null,rm.createElement(fs,{alt:i({id:"mfaTotpEnrollment.qrAltText",message:"QR code for TOTP enrollment"}),src:s.qrCode}),rm.createElement(cs,{type:"button",variant:"text",onClick:function(){r({type:"totp/show_code",method:"manual"})}},i({id:"button.totpQrManual",message:"Having trouble scanning?"})),rm.createElement(cs,{type:"button",onClick:function(){r({type:"transition",history:"push",screen:e0.TOTPEntry})}},i({id:"button.continue",message:"Continue"}))):rm.createElement(c1,null))},fu=function(e){var t=e.helperContent,n=e.isSubmitting,r=e.onSubmit,i=e.errorMessage,o=o7()._;return rm.createElement(lO,{header:o({id:"totp.title",message:"Enter verification code"}),instruction:o({id:"totp.content",message:"Enter the 6-digit code from your authenticator app."}),helperContent:t,isSubmitting:n,onSubmit:r,errorMessage:i})},fl=function(){var e=sK(),t=sW().sessionOptions.sessionDurationMinutes,n=o7()._,r=sb(sG(),2),i=r[0],o=r[1],a=i.mfa.isEnrolling,s=i.mfa.primaryInfo,c=s.enrolledMfaMethods,u=s.memberId,l=s.organizationId,d=s.organizationMfaOptionsSupported,f=cD("stytch.totp.authenticate",function(t,n){var r=n.arg,i=r.memberId,o=r.organizationId,a=r.otp,s=r.sessionDurationMinutes;return e.totp.authenticate({code:a,member_id:i,organization_id:o,session_duration_minutes:s}
1)},{onSuccess:function(){o({type:"totp/authenticate_success"})}}),p=f.trigger,m=f.isMutating,h=f.error,g=ny(function(){return!a&&c.includes(ti.B.smsOtp)&&(0===d.length||d.includes(ti.B.smsOtp))},[c,a,d]),v=h?n({id:"error.passcodeInvalid",message:"Invalid passcode, please try again."}):void 0,y=a?n({id:"mfa.totpEntry.getNewCode",message:"If the verification code doesn’t work, go back to your authenticator app to get a new code."}):rm.createElement(ae,{id:"mfa.totpEntry.useBackupCode",message:"Can’t access your authenticator app? <backupCodeLink>Use a backup code</backupCodeLink>",components:{backupCodeLink:rm.createElement(lu,{onClick:function(){o({type:"transition",history:"push",screen:e0.RecoveryCodeEntry})}})}});return rm.createElement(s0,{direction:"column",gap:24},a&&rm.createElement(s8,{onClick:function(){return o({type:"navigate_back"})}}),rm.createElement(fu,{helperContent:y,isSubmitting:m,onSubmit:function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function n(){return sh().w(function(n){for(;;)switch(n.n){case 0:p({memberId:u,organizationId:l,otp:e,sessionDurationMinutes:t});case 1:return n.a(2)}},n)}))},errorMessage:v}),g&&rm.createElement(rm.Fragment,null,rm.createElement(cX,null),rm.createElement(cs,{type:"button",variant:"text",onClick:function(){o({type:"transition",history:"push",screen:e0.SMSOTPEntry})}},n({id:"mfa.totpEntry.switchToSms",message:"Text me a code instead"}))))},fd=function(){return tU("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM8 15L3 10L4.41 8.59L8 12.17L15.59 4.58L17 6L8 15Z",fill:"#0F4447"}))},ff=function(){return tU("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tU("path",{d:"M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V13H11V15ZM11 11H9V5H11V11Z",fill:"#590607"}))},fp={display:"flex",gap:"8px",padding:"8px",fontSize:"14px",borderRadius:"4px"},fm=Object.assign(Object.assign({},fp),{background:"#ECFFF5",boxShadow:"0px 5px 10px rgba(15, 68, 71, 0.18)",color:"#0F4447"}),fh=Object.assign(Object.assign({},fp),{background:"#FFEEEC",boxShadow:"0px 5px 10px rgba(89, 6, 7, 0.2)",color:"#590607"}),fg=function(){return rm.createElement(dH,{containerStyle:{position:"sticky",marginTop:"4px",marginBottom:"24px"},toastOptions:{success:{style:fm,icon:rm.createElement(fd,null)},error:{style:fh,icon:rm.createElement(ff,null)}}})},fv=oh.div(eM||(eM=sw(["\n  width: ",";\n  font-family: ",";\n  box-sizing: border-box;\n  * {\n    box-sizing: content-box;\n  }\n  background-color: ",";\n  border: ",";\n  border-radius: ",";\n  border-bottom-left-radius: ",";\n  border-bottom-right-radius: ",";\n  border-bottom: ",";\n"])),function(e){return e.theme.container.width},function(e){return e.theme.typography.fontFamily},function(e){return e.theme.container.backgroundColor},function(e){return e.theme.container.border},function(e){return e.theme.container.borderRadius},function(e){var t=e.theme;return e.displayWatermark?"0":t.container.borderRadius},function(e){var t=e.theme;return e.displayWatermark?"0":t.container.borderRadius},function(e){var t=e.theme;return e.displayWatermark?"none":t.container.border}),fy=oh.div(eB||(eB=sw(["\n  padding: 24px 32px;\n"]))),f_=oh.div(eN||(eN=sw(["\n  box-sizing: border-box;\n  width: ",";\n  background-color: ",";\n  border: ",";\n  border-top: none;\n  border-bottom-left-radius: ",";\n  border-bottom-right-radius: ",";\n  overflow: hidden;\n"])),function(e){return e.theme.container.width},function(e){return e.theme.container.backgroundColor},function(e){return e.theme.container.border},function(e){return e.theme.container.borderRadius},function(e){return e.theme.container.borderRadius}),fb=oh.div(eU||(eU=sw(["\n  background-color: #fff;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  opacity: 0.5;\n"]))),fw=oh.img(eH||(eH=sw(["\n  width: 150px;\n"]))),fk=function(e){var t=e.children;return rm.createElement(fv,{displayWatermark:!1},rm.createElement(fy,null,t))}
1,fS=function(e){var t=e.children,n=e.displayWatermark,r=o7()._;return rm.createElement(rm.Fragment,null,rm.createElement(fv,{displayWatermark:n},rm.createElement(fy,null,t,rm.createElement(fg,null))),n&&rm.createElement(f_,null,rm.createElement(fb,null,rm.createElement("a",{style:{height:32,display:"flex",alignItems:"center",padding:"8px 0px",boxSizing:"border-box"},href:"https://stytch.com/",target:"_blank",rel:"noreferrer"},rm.createElement(fw,{alt:r({id:"watermark.altText",message:"Powered by Stytch"}),src:"https://public-assets.stytch.com/powered_by_stytch_logo_dark.svg"})))))},fC=function(){var e=sK();return rf(e.onStateChange,function(){return e.self.getSync()})},fE={text:"Verify your identity",details:["View information stored within your account"]},fO={text:"Maintain access to your data even when you're not actively using the app",details:["Access your data even when you are offline.","Synchronize data and process background tasks on your behalf."]},fx="openid",fP="profile",fA="email",fT="phone",fD="offline_access",fF=new Set([fx,fP,fA,fT,"full_access",fD]),fj=[fx,fA,fP],fR=function(e){var t=[];return e.includes(fx)&&t.push(fE),(e.includes(fA)||e.includes(fP)||e.includes(fT))&&t.push(fz({containsEmail:e.includes(fA),containsPhoneNumber:e.includes(fT),containsProfile:e.includes(fP)})),e.includes(fD)&&t.push(fO),t},fz=function(e){var t=e.containsProfile,n=e.containsEmail,r=e.containsPhoneNumber,i=[];return t&&i.push("Your name, profile picture, and language preferences"),n&&i.push("Your email address"),r&&i.push("Your phone number"),{text:"View your personal profile information",details:i}},fI=function(e,t){if(!t)return[];var n,r=[],i=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=sS(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;)if(function(){var e=n.value;if(fF.has(e))return 1;var i=t.scopes.find(function(t){return t.scope===e});i&&i.description?r.push(i.description):r.push("Use the ".concat(e," scope"))}())continue}catch(e){i.e(e)}finally{i.f()}return r},fL=function(e){var t=e.scopes,n=e.clientName,r=e.rbacPolicy;return[{header:"".concat(n," is requesting to:"),items:fR(t).concat(fI(t,r))}]},fM=function(e){for(var t={client_id:"",redirect_uri:"",response_type:"code",scopes:[].concat(fj)},n=0,r=["client_id","redirect_uri"];n<r.length;n++){var i=r[n],o=e.get(i);if(!o)return{error:"Required parameter is missing: ".concat(i,". Please reach out to the application developer."),result:t};t[i]=o}for(var a=0,s=["response_type","scope","code_challenge","state","nonce","prompt"];a<s.length;a++){var c=s[a],u=e.get(c);u&&("scope"===c?t.scopes=u.split(" ").filter(Boolean):t[c]=u)}return e.has("resource")&&(t.resources=e.getAll("resource")),{error:null,result:t}},fB=function(e){for(var t={client_id:"",post_logout_redirect_uri:""},n=0,r=["client_id","post_logout_redirect_uri"];n<r.length;n++){var i=r[n],o=e.get(i);if(!o)return{error:"Required parameter is missing: ".concat(i,". Please reach out to the application developer."),result:t};t[i]=o}return t.id_token_hint=e.get("id_token_hint")||void 0,t.state=e.get("state")||void 0,{error:null,result:t}},fN=function(e){var t=new URLSearchParams(e);if(t.has("post_logout_redirect_uri")){var n=fB(t);return{error:n.error,flow:{type:"Logout",params:n.result}}}var r=fM(t);return{error:r.error,flow:{type:"Authorize",params:r.result}}},fU=oh.ul(eK||(eK=sw(["\n  padding: 0;\n"]))),fH=oh.li(eG||(eG=sw(["\n  padding: 4px;\n  box-sizing: border-box;\n  position: relative;\n  list-style: none;\n\n  &:not(:last-child) {\n    border-bottom: 1px solid ",";\n  }\n"])),function(e){return e.theme.colors.secondary}),fK=oh.summary(eW||(eW=sw(["\n  list-style: none;\n  display: flex;\n  justify-content: space-between;\n  cursor: ",";\n"])),function(e){return e.expandable?"pointer":"default"}),fG=oh.svg(eq||(eq=sw(["\n  width: 32px;\n  height: 32px;\n  margin-left: 10px;\n  margin-top: -5px;\n  vertical-align: top;\n  flex-shrink: 0;\n  transition: transform 0.3s ease;\n  details[open] & {\n    transform: rotate(90deg);\n  }\n"]))),fW=oh.ul(eV||(eV=sw(["\n  padding: 4px 24px;\n  list-style: none;
1\n"]))),fq=function(){return rm.createElement(fG,{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rm.createElement("path",{d:"M14.5875 11L13.4125 12.175L17.2291 16L13.4125 19.825L14.5875 21L19.5875 16L14.5875 11Z",fill:"currentColor"}))},fV=function(e){var t,n,r,i,o=e.item;return"string"==typeof o&&(o={text:o}),rm.createElement(fH,null,rm.createElement("details",null,rm.createElement(fK,{expandable:!!(null==(t=o.details)?void 0:t.length)},rm.createElement(s1,{size:"helper"},"• ",o.text),(null==(n=o.details)?void 0:n.length)&&rm.createElement(fq,null)),(null==(r=o.details)?void 0:r.length)&&rm.createElement(fW,null,null==(i=o.details)?void 0:i.map(function(e){return rm.createElement("li",{key:e},rm.createElement(s1,{size:"helper",color:"secondary"},"• ",e))}))))},f$=oh(s1)(e$||(e$=sw(["\n  font-weight: 600;\n"]))),fZ=function(e){var t=e.section;return rm.createElement("div",null,rm.createElement(f$,{size:"body"},t.header),rm.createElement(fU,null,t.items.map(function(e,t){return rm.createElement(fV,{key:t,item:e})})))},fY=function(e){var t=e.manifest,n=e.clientName,r=o7()._;return"object"===sm(t[0])&&"header"in t[0]?rm.createElement("div",null,t.map(function(e,t){return rm.createElement(fZ,{key:t,section:e})})):rm.createElement(fZ,{section:{header:r({id:"idpConsent.allowClientTo",message:"Allow {clientName} to:",values:{clientName:n}}),items:t}})},fJ=oh.details(eZ||(eZ=sw(["\n  border: ",";\n  border-radius: ",";\n  padding: 16px;\n  margin-bottom: 36px;\n"])),function(e){return e.theme.container.border},function(e){return e.theme.container.borderRadius}),fQ=oh.summary(eY||(eY=sw(["\n  list-style: none;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  cursor: pointer;\n\n  details[open] > & {\n    padding-bottom: 8px;\n    margin-bottom: 8px;\n    border-bottom: 1px solid ",";\n  }\n"])),function(e){return e.theme.colors.secondary}),fX=oh.ul(eJ||(eJ=sw(["\n  padding: 4px;\n  margin: 0;\n  list-style: none;\n"]))),f0=function(e){var t=e.clientName,n=e.ungrantableScopeDescriptions,r=o7()._;return n.length?rm.createElement(fJ,null,rm.createElement(fQ,null,rm.createElement(s1,{size:"helper"},r({id:"idpConsent.noPermissionsToGrant",message:"You do not have permissions to grant {clientName} access to some of the requested scopes.",values:{clientName:t}})),rm.createElement(fq,null)),rm.createElement(s1,{size:"helper",color:"secondary"}
1,r({id:"idpConsent.cannotGrantRequest",message:"You cannot grant {clientName}'s request to:",values:{clientName:t}})),rm.createElement(fX,null,n.map(function(e,t){return rm.createElement("li",{key:t},rm.createElement(s1,{size:"helper",color:"secondary"},"• ",e))}))):null},f1=t7(void 0),f2=t7(void 0),f5=function(e){var t=e.children,n=e.consentManifestGenerator,r=e.authTokenParams;return rm.createElement(f1.Provider,{value:n},rm.createElement(f2.Provider,{value:r},t))},f3=oh.img(eQ||(eQ=sw(["\n  max-height: 50px;\n  max-width: 100px;\n"]))),f4=function(e,t){switch(t.type){case"START_SUBMIT":return Object.assign(Object.assign({},e),{loading:!0});case"COMPLETE_SUBMIT":return Object.assign(Object.assign({},e),{loading:!1,success:!0});case"START_PREFLIGHT":return Object.assign(Object.assign({},e),{preflight:!0,loading:!0});case"PREFLIGHT_ERROR":return Object.assign(Object.assign({},e),{preflight:!0,loading:!1,error:t.error});case"COMPLETE_PREFLIGHT":return Object.assign(Object.assign({},e),{loading:!1,client:t.client,consent_required:t.consent_required,grantable_scope:t.grantable_scope,ungrantable_scope:t.ungrantable_scope});case"CONSENT_DENIED":return Object.assign(Object.assign({},e),{denied:!0});default:return e}},f6=function(e){var t=e.initialError,n=e.initialParams,r=e.oauthAuthorizeStart,i=e.oauthAuthorizeSubmit,o=e.onError,a=e.onEvent,s=sb(np(f4,{loading:!t,preflight:!!t,error:t,success:!1,denied:!1,consent_required:!1,client:null,grantable_scope:"",ungrantable_scope:"",redirect_uri:n.redirect_uri}),2),c=s[0],u=s[1];nm(function(){t&&o(new ti.I(t))},[t,o]);var l=n_(function(e){var t=e.consent_required,r=e.consent_granted;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var o;return sh().w(function(e){for(;;)switch(e.n){case 0:return u({type:"START_SUBMIT"}),e.n=1,i(Object.assign(Object.assign({},n),{consent_granted:r}));case 1:(o=e.v).authorization_code&&u({type:"COMPLETE_SUBMIT"}),window.location.href=o.redirect_uri,t&&!r?(u({type:"CONSENT_DENIED"}),a({type:ti.S.OAuthAuthorizeFlowConsentDenied,data:{}})):a({type:ti.S.OAuthAuthorizeFlowComplete,data:{}});case 2:return e.a(2)}},e)}))},[i,n,a]),d=n_(function(e){return l({consent_granted:e.consent_granted,consent_required:!0})},[l]),f=n_(function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t,i,s,c,d;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return u({type:"START_PREFLIGHT"}),a({type:ti.S.OAuthAuthorizeFlowStart,data:{client_id:n.client_id,redirect_uri:n.redirect_uri,scope:n.scopes.join(" ")}}),e.p=1,e.n=2,r(n);case 2:t=e.v,e.n=4;break;case 3:return e.p=3,d=e.v,u({type:"PREFLIGHT_ERROR",error:(i=ti.j.from(d)).error_message}),o(i),e.a(2);case 4:if(!t.consent_required){e.n=5;break}return s=t.scope_results.filter(function(e){return e.is_grantable}).map(function(e){return e.scope}).join(" "),c=t.scope_results.filter(function(e){return!e.is_grantable}).map(function(e){return e.scope}).join(" "),u({type:"COMPLETE_PREFLIGHT",consent_required:t.consent_required,client:t.client,grantable_scope:s,ungrantable_scope:c}),e.a(2);case 5:return e.n=6,l({consent_required:!1,consent_granted:!1});case 6:return e.a(2)}},e,null,[[1,3]])}))},[a,n,r,o,l]);return nm(function(){c.preflight||f()},[f,c.preflight]),{state:c,submit:d}},f8=function(e){var t,n=e.bootstrap,r=e.bootstrapNotLoaded,i=e.state,o=e.submit,a=o7()._,s=i.loading,c=i.error,u=i.denied,l=i.success,d=i.client,f=nb(f1),p=ny(function(){var e,t,n=null!=(t=null==(e=i.client)?void 0:e.client_name)?t:"";if(!n)try{n=new URL(i.redirect_uri).hostname}catch(e){ti.l.warn("Unable to parse host from redirect URI.",e),n=a({id:"idpConsent.defaultClientName",message:"The App"})}return n},[null==(t=i.client)?void 0:t.client_name,i.redirect_uri,a]),m=ny(function(){if(f)try{return f({scopes:i.grantable_scope.split(" "),clientName:p})}catch(e){ti.l.error("Error rendering custom consent screen. Falling back to default consent screen.",e)}return fL({scopes:i.grantable_scope.split(" "),rbacPolicy:n.rbacPolicy,clientName:p})},[f,i.grantable_scope,p,n.rbacPolicy]),h=ny(function(){return""===i.ungrantable_scope?[]:fI(i.ungrantable_scope.split(" "),n.rbacPolicy)},[i.ungrantable_scope,n.rbacPolicy]);return s||r?rm.createElement(c1,null):c?rm.createElement(ce,{text:c}):u?rm.createElement(ce,{text:a({id:"idpConsent.denied",message:"Access to the application was denied."})}):l?rm.createElement(u7,null):rm.createElement(f7,{client:d,submit:o,grantableScope:i.grantable_scope,projectName:n.projectName},rm.createElement(f0,{ungrantableScopeDescriptions:h,clientName:p}),rm.createElement(fY,{manifest:m,clientName:p}))},f7=function(e){var t=e.client,n=e.submit,r=e.grantableScope,i=e.projectName,o=e.children,a=o7()._,s=ov().logo,c=t.client_name,u=a(r.split(" ").some(function(e){return!fF.has(e)})?{id:"idpConsent.customScopes.title",message:"{clientName} wants to access your {projectName} account",values:{clientName:c,projectName:i}}:{id:"idpConsent.signIn.title",message:"Sign in to {clientName} with {projectName}",values:{clientName:c,projectName:i}});return rm.createElement(s0,{direction:"column",gap:24},s.logoImageUrl&&rm.createElement(s0,{justifyContent:"center"},rm.createElement(f3,{src:s.logoImageUrl})),rm.createElement(s1,{size:"header",align:"center"},u),rm.createElement("div",null,o),rm.createElement("div",null,rm.createElement(cs,{type:"button",onClick:function(){return n({consent_granted:!0})}},a({id:"idpConsent.button.allow",message:"Allow"})),rm.createElement(cs,{type:"button",onClick:function(){return n({consent_granted:!1})},variant:"text"},a({id:"idpConsent.button.deny",message:"Deny"}))))},f9=function(e,t){switch(t.type){case"START_PREFLIGHT":return Object.assign(Object.assign({},e),{preflight:!0,loading:!0});case"PREFLIGHT_ERROR":return Object.assign(Object.assign({},e),{preflight:!0,loading:!1,error:t.error});case"COMPLETE_PREFLIGHT":return Object.assign(Object.assign({},e),{loading:!1,consent_required:t.consent_required,redirect_uri:t.redirect_uri});case"CONSENT_DENIED":return Object.assign(Object.assign({},e),{denied:!0});default:return e}},pe=function(e){var t=e.initialError,n=e.initialParams,r=e.oauthLogoutStart,i=e.revokeSession,o=e.onError,a=sb(np(f9,{loading:!t,preflight:!!t,error:t,denied:!1,consent_required:!1,redirect_uri:""}),2),s=a[0],c=a[1];nm(function(){t&&o(new ti.I(t))},[t,o]);var u=n_(function(e){return(0,ti.d)(void 0,void 0,void 0,sh().m(function t(){return sh().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,i();case 1:t.n=3;break;case 2:t.p=2,t.v;case 3:window.location.href=e;case 4:return t.a(2)}},t,null,[[0,2]])}))},[i]),l=n_(function(){return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t,i,a;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:return c({type:"START_PREFLIGHT"}),e.p=1,e.n=2,r(n);case 2:t=e.v,e.n=4;break;case 3:return e.p=3,a=e.v,c({type:"PREFLIGHT_ERROR",error:(i=ti.j.from(a)).error_message}),o(i),e.a(2);case 4:if(!t.consent_required){e.n=5;break}return c({type:"COMPLETE_PREFLIGHT",consent_required:t.consent_required,redirect_uri:t.redirect_uri}),e.a(2);case 5:u(t.redirect_uri);case 6:return e.a(2)}},e,null,[[1,3]])}
1))},[n,r,o,u]);nm(function(){s.preflight||l()},[l,s.preflight]);var d=n_(function(e){var t=e.consent_granted;return(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){return sh().w(function(e){for(;;)switch(e.n){case 0:if(!t){e.n=1;break}return e.a(2,u(s.redirect_uri));case 1:c({type:"CONSENT_DENIED"});case 2:return e.a(2)}},e)}))},[u,s]);return{state:s,submit:d}},pt=function(e){var t=e.state,n=e.submit,r=e.bootstrap,i=e.bootstrapNotLoaded,o=o7()._,a=t.loading,s=t.error,c=t.denied;if(a||i)return rm.createElement(c1,null);if(s)return rm.createElement(ce,{text:s});if(c)return rm.createElement(u7,{text:o({id:"idpLogout.notLoggedOut",message:"You have not been logged out. You may close this page."})});var u=r.projectName;return rm.createElement(s0,{direction:"column",gap:24},rm.createElement(s1,{size:"header",align:"center"},o({id:"idpLogout.title",message:"Log out?"})),rm.createElement("div",null,o({id:"idpLogout.confirmMessage",message:"Are you sure you want to log out of your {projectName} account?",values:{projectName:u}})),rm.createElement("div",null,rm.createElement(cs,{type:"button",onClick:function(){return n({consent_granted:!0})}},o({id:"idpLogout.yes",message:"Yes"})),rm.createElement(cs,{type:"button",onClick:function(){return n({consent_granted:!1})},variant:"text"},o({id:"idpLogout.no",message:"No"}))))},pn=function(e){var t=e.initialError,n=e.initialParams,r=sK(),i=sq(),o=sV(),a=r.idp,s=a.oauthAuthorizeStart,c=a.oauthAuthorizeSubmit,u=cj(),l=f6({initialError:t,initialParams:n,oauthAuthorizeStart:s,oauthAuthorizeSubmit:c,onError:i,onEvent:o});return rm.createElement(f8,Object.assign({bootstrap:u,bootstrapNotLoaded:!1},l))},pr=function(e){var t=e.initialError,n=e.initialParams,r=sK(),i=sq(),o=r.idp.oauthLogoutStart,a=cj(),s=pe({initialError:t,initialParams:n,oauthLogoutStart:o,revokeSession:function(){return r.session.revoke({forceClear:!0})},onError:i});return rm.createElement(pt,Object.assign({},s,{bootstrap:a,bootstrapNotLoaded:!1}))},pi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.searchParams,n=sb(nf(fN(void 0===t?window.location.search:t)),1)[0],r=n.flow,i=n.error;switch(r.type){case"Authorize":return rm.createElement(po,null,rm.createElement(pn,{initialError:i,initialParams:r.params}));case"Logout":return rm.createElement(pr,{initialError:i,initialParams:r.params})}},po=function(e){var t=e.children,n=o7()._,r=fC(),i=sq(),o=ng(i);nm(function(){o.current=i},[i]);var a=sK(),s=nb(f2),c=sb(nf(!1),2),u=c[0],l=c[1],d=sb(nf(!1),2),f=d[0],p=d[1];return(nm(function(){!u&&!f&&(0,ti.d)(void 0,void 0,void 0,sh().m(function e(){var t,n,r,i;return sh().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!((null==s?void 0:s.trustedAuthToken)&&(null==s?void 0:s.tokenProfileID))){e.n=5;break}if(l(!0),t=s.trustedAuthToken,n=s.tokenProfileID,!(r=a.self.getSync())){e.n=1;break}return e.n=1,a.session.revoke();case 1:return e.p=1,e.n=2,a.session.attest({token:t,profile_id:n,organization_id:null==r?void 0:r.organization_id,session_duration_minutes:60});case 2:e.n=4;break;case 3:e.p=3,i=e.v,o.current(i);case 4:return e.p=4,l(!1),p(!0),e.f(4);case 5:p(!0);case 6:return e.a(2)}},e,null,[[1,3,4,5]])}))},[s,u,f,a]),nm(function(){r||o.current(new ti.N)},[r]),u)?rm.createElement(c1,null):r?t:rm.createElement(ce,{text:n({id:"idpConsent.noActiveSession",message:"No active session detected. Please log in to continue."})})},pa={discovery:{mutationKey:"stytch.magicLinks.discovery.authenticate",onSuccess:cz,defaultError:eX.EmailMagicLink},discovery_oauth:{mutationKey:"stytch.oauth.discovery.authenticate",onSuccess:cz},oauth:{mutationKey:"stytch.oauth.authenticate",onSuccess:cR},sso:{mutationKey:"stytch.sso.authenticate",onSuccess:cR},multi_tenant_magic_links:{mutationKey:"stytch.magicLinks.authenticate",onSuccess:cR,defaultError:eX.EmailMagicLink},multi_tenant_impersonation:{mutationKey:"stytch.impersonation.authenticate",onSuccess:cR}},ps={ad_blocker_detected:eX.AdBlockerDetected},pc=function(){var e,t=sb(sG(),2),n=t[0],r=t[1],i=sK(),o=sq(),a=sV(),s=sW(),c=ov().displayWatermark,u=un(),l=n.screen,d=(sy(sy(sy(sy(sy(sy(sy(sy(sy(sy(e={},e0.Main,rm.createElement(uM,null)),e0.EmailConfirmation,rm.createElement(uV,null)),e0.LoggedIn,rm.createElement(le,null)),e0.Discovery,rm.createElement(u6,null)),e0.Error,rm.createElement(ct,null)),e0.PasswordEmailForm,rm.createElement(ut,null)),e0.PasswordAuthenticate,rm.createElement(lX,null)),e0.PasswordResetForm,rm.createElement(lQ,null)),e0.PasswordResetVerifyConfirmation,rm.createElement(lN,null)),e0.PasswordForgotForm,rm.createElement(dW,null)),sy(sy(sy(sy(sy(sy(sy(sy(sy(sy(e,e0.PasswordSetNewConfirmation,rm.createElement(dG,null)),e0.MFAEnrollmentSelection,rm.createElement(lL,null)),e0.SMSOTPEnrollment,rm.createElement(d3,null)),e0.SMSOTPEntry,rm.createElement(d4,null)),e0.RecoveryCodeEntry,rm.createElement(dq,null)),e0.RecoveryCodeSave,rm.createElement(dY,null)),e0.TOTPEnrollmentQRCode,rm.createElement(fc,null)),e0.TOTPEnrollmentManual,rm.createElement(fa,null)),e0.TOTPEntry,rm.createElement(fl,null)),e0.EmailMethodSelection,rm.createElement(ls,null)),sy(sy(sy(sy(sy(e,e0.EmailOTPEntry,rm.createElement(lz,null)),e0.SSODiscoveryEmail,rm.createElement(d8,null)),e0.SSODiscoveryFallback,rm.createElement(fe,null)),e0.SSODiscoveryMenu,rm.createElement(d9,null)),e0.IDPConsent,rm.createElement(pi,null))),f=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eX.Default;r({type:"set_error_message_and_transition",errorType:null!=(t=ps[cK(e)])?t:n,canGoBack:!1})},p=sb(nf(!1),2),m=p[0],h=p[1],g=a3().mutate,v=cF(),y=v.slug,_=v.resultPending;return(nm(function(){if(!u&&n.screen!==e0.IDPConsent&&n.flowState.type!=ti.A.PasswordReset){var e=i.parseAuthenticateUrl();if(null==e?void 0:e.handled){var t=pa[e.tokenType],c=t.mutationKey,l=t.defaultError,d=t.onSuccess;h(!0),g(c,i.authenticateByUrl({session_duration_minutes:s.sessionOptions.sessionDurationMinutes})).then(function(e){if(null==e?void 0:e.handled){var t=e.data,n=cT[c];n&&a({type:n,data:t}),d(t,r,s)}},function(e){o(e),f(e,l)}
1).finally(function(){return h(!1)})}}},[]),nm(function(){if(!u&&!m){var e=i.parseAuthenticateUrl();(null==e||!e.handled)&&(y||_||null!==n.flowState.organization||n.screen!==e0.Main||n.flowState.type!=ti.A.Organization||r({type:"set_error_message_and_transition",errorType:eX.Organization,canGoBack:!1}))}},[r,u,m,_,y,n.flowState.organization,n.flowState.type,n.screen,i,o]),u)?rm.createElement(ub,null):m?rm.createElement(fk,null,rm.createElement(c0,null)):rm.createElement(fS,{displayWatermark:c},d[l])},pu="stytch-b2b-ui",pl=ar(function(e){var t=e.client,n=e.styles,r=e.callbacks,i=e.config,o=e.strings,a=sb(nf(function(){return(0,ti.r)(t).bootstrap.getSync().displayWatermark}),2),s=a[0],c=a[1];nm(function(){(0,ti.r)(t).bootstrap.getAsync().then(function(e){(0,ti.r)(t).networkClient.logEvent({name:"render_b2b_login_screen",details:{options:i,bootstrap:e}}),c(e.displayWatermark)})},[t]);var u=new URL(window.location.href).searchParams.get("stytch_redirect_type")===ti.R.ResetPassword?ti.A.PasswordReset:i.authFlowType,l=Object.assign(Object.assign({},sL),{screen:u===ti.A.PasswordReset?e0.PasswordResetForm:e0.Main,flowState:Object.assign(Object.assign({},sL.flowState),{type:u})}),d=ny(function(){var e;return Object.assign(Object.assign({},i),{sessionOptions:null!=(e=i.sessionOptions)?e:{}})},[i]),f=sJ({styles:n,displayWatermark:s});return rm.createElement(sN,{client:t,callbacks:r,config:d,initialState:l},rm.createElement(op,{theme:f},rm.createElement(at,{messages:sE,overrides:o},rm.createElement(pc,null))))},pu),pd="stytch-b2b-identity-provider",pf=ar(function(e){var t=e.client,n=e.styles,r=e.callbacks,i=e.strings,o=e.getIDPConsentManifest,a=e.trustedAuthTokenParams,s=Object.assign(Object.assign({},sL),{screen:e0.IDPConsent}),c=sJ({styles:n,displayWatermark:!1});return nm(function(){(0,ti.r)(t).bootstrap.getAsync().then(function(e){(0,ti.r)(t).networkClient.logEvent({name:"render_b2b_idp_screen",details:{bootstrap:e}})})},[t]),rm.createElement(sN,{client:t,config:sM,callbacks:r,initialState:s},rm.createElement(f5,{consentManifestGenerator:o,authTokenParams:a},rm.createElement(op,{theme:c},rm.createElement(at,{messages:sE,overrides:i},rm.createElement(pc,null)))))},pd),pp=function(e){function t(){sa(this,t),(0,ti.k)("StytchB2BUIClient");for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return ss(this,t,[].concat(n))}return sl(t,e),so(t,[{key:"mount",value:function(e){var t,n=e.elementId,r=e.styles,i=e.callbacks,o=e.config,a=e.strings,s=document.querySelector(n);if(!s)throw Error("The selector you specified (".concat(n,") applies to no DOM elements that are currently on the page. Make sure the element exists on the page before calling mountLogin()."));if((null==(t=s.firstChild)?void 0:t.nodeName.toLowerCase())===pu.toLowerCase())return void s.firstChild.render({client:this,config:o,callbacks:i,styles:r,strings:a});var c=pl({client:this,config:o,callbacks:i,styles:r,strings:a});s.appendChild(c)}},{key:"mountIdentityProvider",value:function(e){var t,n=e.elementId,r=e.styles,i=e.callbacks,o=e.strings,a=e.getIDPConsentManifest,s=e.trustedAuthTokenParams,c=document.querySelector(n);if(!c)throw Error("The selector you specified (".concat(n,") applies to no DOM elements that are currently on the page. Make sure the element exists on the page before calling mountIdentityProvider()."));if((null==(t=c.firstChild)?void 0:t.nodeName.toLowerCase())===pd.toLowerCase())return void c.firstChild.render({client:this,callbacks:i,styles:r,strings:o,getIDPConsentManifest:a,trustedAuthTokenParams:s});var u=pf({client:this,callbacks:i,styles:r,strings:o,getIDPConsentManifest:a,trustedAuthTokenParams:s});c.appendChild(u)}}])}(tr.S),pm=e.i(871214);let ph=((...e)=>"u"<typeof window?(0,pm.c)():new pp(...e))("public-token-live-1d406744-0cd7-4f2d-b7b5-00090b275de6",{customBaseUrl:"https://login.trysecretsauce.ai",cookieOptions:{opaqueTokenCookieName:"stytch_consent_session",jwtCookieName:"stytch_consent_session_jwt"}});async function pg(e){await ph.session.revoke({forceClear:!0}
1).catch(()=>{});let t={token:e.trustedAuthToken,profile_id:e.tokenProfileID,token_type:"trusted_auth_token",session_duration_minutes:60};await ph.session.attest(t)}e.s(["StytchConsent",0,function({trustedAuthTokenParams:e}){let[t,n]=(0,e9.useState)(e?"pending":"ready"),[r]=(0,e9.useState)(()=>{let e,t;return"u"<typeof document?void 0:(e=getComputedStyle(document.documentElement),{container:{backgroundColor:"transparent",borderColor:"transparent",width:"100%"},colors:{primary:(t=t=>{let n=e.getPropertyValue(t).trim();return n?`hsl(${n})`:void 0})("--foreground"),secondary:t("--muted-foreground")},buttons:{primary:{backgroundColor:t("--primary"),textColor:t("--primary-foreground"),borderColor:t("--primary"),borderRadius:"9999px"},secondary:{backgroundColor:t("--background"),textColor:t("--foreground"),borderColor:t("--border"),borderRadius:"9999px"}},fontFamily:getComputedStyle(document.body).fontFamily||void 0})});return((0,e9.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{await pg(e),t||n("ready")}catch(e){console.error("[consent] trusted auth token attest failed",e),t||n("error")}})(),()=>{t=!0}},[e]),"pending"===t)?(0,e7.jsxs)("div",{className:"flex items-center justify-center gap-2 py-8 text-muted-foreground",role:"status",children:[(0,e7.jsx)(te.Loader2Icon,{className:"size-4 animate-spin"}),(0,e7.jsx)("span",{className:"text-sm",children:"Preparing authorization…"})]}):"error"===t?(0,e7.jsx)("div",{className:"rounded-md bg-destructive/10 p-4 text-sm text-destructive",role:"alert",children:"We couldn't prepare this authorization. Please start the connection again from the application you are connecting."}):(0,e7.jsx)(tn.StytchB2BProvider,{stytch:ph,children:(0,e7.jsx)(tt.B2BIdentityProvider,{styles:r})})}],892927)},354082,e=>{"use strict";var t=e.i(376277),n=e.i(674736),r=e.i(911770),i=e.i(235973),o=e.i(519455),a=e.i(793479),s=e.i(572149),c=e.i(275346),u=e.i(404795),l=e.i(781068);function d(){let e=(0,i.useTranslations)("auth");return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1.5",children:[(0,t.jsx)(l.ShieldCheck,{className:"size-4 text-emerald-500"}),(0,t.jsx)("p",{className:"text-xs text-emerald-500",children:e("encryptedPrivate")})]})}function f(){let e=(0,i.useTranslations)("auth");return(0,t.jsx)("h1",{className:"text-center text-[28px] font-semibold leading-[34px] tracking-[-1px] text-foreground sm:text-[32px] sm:leading-[38px] sm:tracking-[-1.2px]",children:e.rich("signInHeading",{em:e=>(0,t.jsx)("em",{className:"font-serif italic font-medium",children:e})})})}var p=e.i(292025);e.s(["StytchLogin",0,function({errorCode:e,initialEmail:l,returnTo:m}){let h=(0,i.useTranslations)("auth"),g=(0,i.useTranslations)("common"),[v,y]=(0,n.useState)(()=>l?.trim()??""),{sending:_,sent:b,error:w,sendMagicLink:k,startGoogle:S,reset:C}=(0,s.useDiscoveryAuth)({returnTo:m}),E="whitelist"===e,O="disposable_domain_blocked"===e,x="email_plus_modifier_blocked"===e,P=E||O||x,A=async e=>{e.preventDefault(),await k(v)},T=(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)(r.default,{src:"/labicon.png",alt:"",width:40,height:40}),(0,t.jsx)(r.default,{src:"/secretsauce-title.svg",alt:"SecretSauce",width:160,height:26,className:"dark:invert"})]});return b?(0,t.jsx)("main",{className:"flex min-h-screen items-center justify-center bg-background p-3.5",children:(0,t.jsxs)("div",{className:"flex w-full max-w-[1512px] gap-3.5",style:{height:"min(900px, calc(100vh - 1.75rem))"},children:[(0,t.jsx)(u.LoginHeroCarousel,{}),(0,t.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center px-6 py-8 sm:py-16 lg:px-12",children:(0,t.jsxs)("div",{className:"w-full max-w-[372px] space-y-6",children:[T,(0,t.jsxs)("div",{className:"space-y-2 pt-6 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:h("checkEmail")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:h.rich("magicLinkSent",{email:e=>(0,t.jsx)("strong",{children:e}),emailValue:v})})]}),(0,t.jsx)(o.Button,{variant:"outline",className:"w-full rounded-full",onClick:()=>{C(),y("")},children:h("useDifferentEmail")})]})})]})}):(0,t.jsx)("main",{className:"flex min-h-screen items-center justify-center bg-background p-3.5",children:(0,t.jsxs)("div",{className:"flex w-full max-w-[1512px] gap-3.5",
1style:{height:"min(900px, calc(100vh - 1.75rem))"},children:[(0,t.jsx)(u.LoginHeroCarousel,{}),(0,t.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center px-6 py-8 sm:py-16 lg:px-12",children:(0,t.jsxs)("div",{className:"w-full max-w-[372px] space-y-6",children:[T,(0,t.jsxs)("div",{className:"space-y-4 pt-6",children:[(0,t.jsx)(f,{}),(0,t.jsx)("p",{className:"text-center text-sm tracking-[-0.28px] text-muted-foreground",children:h("signInDescription")})]}),P&&(0,t.jsxs)("div",{role:"alert",className:"rounded-lg border border-destructive/50 bg-destructive/10 p-3 text-center text-sm text-destructive",children:[E&&h.rich("whitelistError",{waitlistLink:e=>(0,t.jsx)("a",{href:"https://trysecretsauce.ai/waitlist?type=builder",target:"_blank",rel:"noopener noreferrer",className:"underline hover:opacity-80",children:e})}),O&&h.rich("disposableDomainBlockedError",{supportLink:e=>(0,t.jsx)("a",{href:"https://trysecretsauce.ai/contact",target:"_blank",rel:"noopener noreferrer",className:"underline hover:opacity-80",children:e})}),x&&h("emailPlusModifierBlockedError")]}),(0,t.jsxs)(o.Button,{type:"button",className:"w-full rounded-full bg-foreground text-background hover:bg-foreground
1/90",onClick:()=>void S(),disabled:_,children:[(0,t.jsx)(p.GoogleIcon,{className:"mr-2 size-5"}),h("continueWithGoogle")]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:g("or")}),(0,t.jsx)("div",{className:"h-px flex-1 bg-border"})]}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:A,children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{htmlFor:"login-email",className:"text-sm font-medium tracking-[-0.28px]",children:h("emailLabel")}),(0,t.jsx)(a.Input,{id:"login-email",type:"email",placeholder:h("emailPlaceholder"),value:v,onChange:e=>y(e.target.value),disabled:_,required:!0,className:"border-0 bg-black/[0.06] dark:bg-white/[0.06]"})]}),(0,t.jsx)("p",{className:"text-center text-xs leading-[18px] text-muted-foreground",children:h.rich("magicLinkDisclaimer",{termsLink:e=>(0,t.jsx)("a",{href:"https://trysecretsauce.ai/terms",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline underline-offset-2 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:e})})}),(0,t.jsxs)(o.Button,{type:"submit",className:"w-full rounded-full",disabled:_||!v.trim(),children:[h(_?"sending":"sendMagicLink"),(0,t.jsx)(c.ChevronRight,{className:"ml-1 size-5"})]})]}),w&&(0,t.jsx)("p",{className:"text-center text-sm text-destructive",children:w}),(0,t.jsx)(d,{})]})})]})})}],354082)},896336,e=>{"use strict";var t=e.i(376277);e.i(990015);var n=e.i(786836),r=e.i(465456);e.i(224934);var i=e.i(871214);let o=((...e)=>"u"<typeof window?(0,i.c)():new r.S(...e))("public-token-live-1d406744-0cd7-4f2d-b7b5-00090b275de6",{customBaseUrl:"https://login.trysecretsauce.ai"});e.s(["StytchProvider",0,function({children:e}){return(0,t.jsx)(n.StytchB2BProvider,{stytch:o,children:e})}],896336)}]);
2
3//# chunkId=1bbc2546-f8ae-59b4-b034-dddf063672da

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.