1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`738f9327306d258a296bbb03cea86d386e5f7c98`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e0c40fc8-b8ce-4f14-82c9-a81c68dd7119`,e._sentryDebugIdIdentifier=`sentry-dbid-e0c40fc8-b8ce-4f14-82c9-a81c68dd7119`)}catch{}})();import{t as e}from"./rolldown-runtime-91I_V7PK.js";import{t}from"./react-C9pA0G0A.js";import{t as n}from"./jsx-runtime-BYG1zCFg.js";import{A as r,C as i,D as a,F as o,L as s,M as c,N as l,R as u,S as d,_ as f,d as p,f as m,g as h,h as g,j as _,m as v,p as y,r as b,u as x,v as S,w as C,x as w,y as T,z as E}from"./session-DB1cGW3O.js";var D=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.normaliseUserInput=void 0;var n=C();function r(e){var r=t({functions:function(e){return e}},e.override);return t(t({},(0,n.normaliseAuthRecipe)(e)),{override:r})}e.normaliseUserInput=r})),O=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},r=e&&e.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
10&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.getRecipeImplementation=void 0;var a=i(),o=w(),s=_();function c(e){var i=new a.default(e.recipeId,e.appInfo);return{submitNewPassword:function(o){var s=o.formFields,c=o.options,l=o.userContext;return n(this,void 0,void 0,function(){var n,o,u,d,f;return r(this,function(r){switch(r.label){case 0:return n=this.getTenantIdFromURL({userContext:l}),o=this.getResetPasswordTokenFromURL({userContext:l}),[4,i.post({path:`/<tenantId>/user/password/reset`,pathParams:{tenantId:n||`public`}},{body:{formFields:s,token:o,method:`token`}},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:`SUBMIT_NEW_PASSWORD`,options:c,userContext:l}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:`SUBMIT_NEW_PASSWORD`,userContext:l}))];case 1:return u=r.sent(),d=u.jsonBody,f=u.fetchResponse,d.status===`FIELD_ERROR`?[2,{status:`FIELD_ERROR`,formFields:d.formFields,fetchResponse:f}]:d.status===`RESET_PASSWORD_INVALID_TOKEN_ERROR`?[2,{status:d.status,fetchResponse:f}]:[2,t(t({},d),{fetchResponse:f})]}})})},sendPasswordResetEmail:function(t){var s=t.formFields,c=t.options,l=t.userContext;return n(this,void 0,void 0,function(){var t,n,u,d,f,p,m;return r(this,function(r){switch(r.label){case 0:return f=(d=i).post,p={path:`/<tenantId>/user/password/reset/token`},m={},[4,o.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:l})];case 1:return[4,f.apply(d,[(p.pathParams=(m.tenantId=r.sent()||`public`,m),p),{body:{formFields:s}},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:`SEND_RESET_PASSWORD_EMAIL`,options:c,userContext:l}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:`SEND_RESET_PASSWORD_EMAIL`,userContext:l})])];case 2:return t=r.sent(),n=t.jsonBody,u=t.fetchResponse,n.status===`FIELD_ERROR`?[2,{status:`FIELD_ERROR`,formFields:n.formFields,fetchResponse:u}]:n.status===`PASSWORD_RESET_NOT_ALLOWED`?[2,{status:n.status,reason:n.reason,fetchResponse:u}]:[2,{status:n.status,fetchResponse:u}]}})})},signUp:function(t){var c=t.formFields,l=t.shouldTryLinkingWithSessionUser,u=t.options,d=t.userContext;return n(this,void 0,void 0,function(){var t,n,f,p,m,h,g;return r(this,function(r){switch(r.label){case 0:return m=(p=i).post,h={path:`/<tenantId>/signup`},g={},[4,o.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:d})];case 1:return[4,m.apply(p,[(h.pathParams=(g.tenantId=r.sent()||`public`,g),h),{body:{formFields:c,shouldTryLinkingWithSessionUser:l}},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:`EMAIL_PASSWORD_SIGN_UP`,options:u,userContext:d}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:`EMAIL_PASSWORD_SIGN_UP`,userContext:d})])];case 2:return t=r.sent(),n=t.jsonBody,f=t.fetchResponse,n.status===`FIELD_ERROR`?[2,{status:`FIELD_ERROR`,formFields:n.formFields,fetchResponse:f}]:n.status===`SIGN_UP_NOT_ALLOWED`?[2,{status:`SIGN_UP_NOT_ALLOWED`,reason:n.reason,fetchResponse:f}]:[2,{status:n.status,user:(0,s.normaliseUser)(`emailpassword`,n.user),fetchResponse:f}]}})})},signIn:function(t){var c=t.formFields,l=t.shouldTryLinkingWithSessionUser,u=t.options,d=t.userContext;return n(this,void 0,void 0,function(){var t,n,f,p,m,h,g;return r(this,function(r){switch(r.label){case 0:return m=(p=i).post,h={path:`/<tenantId>/signin`},g={},[4,o.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:d})];case 1:return[4,m.apply(p,[(h.pathParams=(g.tenantId=r.sent()||`public`,g),h),{body:{formFields:c,shouldTryLinkingWithSessionUser:l}},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:`EMAIL_PASSWORD_SIGN_IN`,options:u,userContext:d}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:`EMAIL_PASSWORD_SIGN_IN`,userContext:d})])];case 2:return t=r.sent(),n=t.jsonBody,f=t.fetchResponse,n.status===`FIELD_ERROR`?[2,{status:`FIELD_ERROR`,formFields:n.formFields,fetchResponse:f}]:n.status===`WRONG_CREDENTIALS_ERROR`?[2,{status:`WRONG_CREDENTIALS_ERROR`,fetchResponse:f}]:n.status===`SIGN_IN_NOT_ALLOWED`?[2,{status:`SIGN_IN_NOT_ALLOWED`,reason:n.reason,fetchResponse:f}]:[2,{status:`OK`,user:(0,s.normaliseUser)(`emailpassword`,n.user),fetchResponse:f}]}})})},doesEmailExist:function(t){var s=t.email,c=t.options,l=t.userContext;return n(this,void 0,void 0,function(){var t,n,u,d,f,p,m;return r(this,function(r){switch(r.label){case 0:return f=(d=i).get,p={path:`/<tenantId>/emailpassword/email/exists`},m={},[4,o.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:l})];case 1:return[4,f.apply(d,[(p.pathParams=(m.tenantId=r.sent()||`public`,m),p.queryParams={email:s},p),{},a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:`EMAIL_EXISTS`,options:c,userContext:l}),a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:`EMAIL_EXISTS`,userContext:l})])];case 2:return t=r.sent(),n=t.jsonBody,u=t.fetchResponse,[2,{status:n.status,doesExist:n.exists,fetchResponse:u}]}})})},getResetPasswordTokenFromURL:function(){var e=(0,s.getQueryParams)(`token`);return e===void 0?``:e},getTenantIdFromURL:function(){return(0,s.getQueryParams)(`tenantId`)}}}e.default=c,e.getRecipeImplementation=c})),k=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}
1t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Recipe=void 0;var i=D(),a=O(),o=r(),s=_(),c=(function(e){t(r,e);function r(t){var n=e.call(this,(0,i.normaliseUserInput)(t))||this;return n.recipeImplementation=new o.default((0,a.default)({recipeId:n.config.recipeId,appInfo:n.config.appInfo,clientType:n.config.clientType,preAPIHook:n.config.preAPIHook,postAPIHook:n.config.postAPIHook})).override(n.config.override.functions).build(),n}return r.init=function(e){return function(t,i,a,o){return r.instance=new r(n(n({},(0,s.applyPlugins)(r.RECIPE_ID,e,o??[])),{recipeId:r.RECIPE_ID,clientType:i,appInfo:t})),r.instance}},r.getInstanceOrThrow=function(){if(r.instance===void 0){var e=`No instance of EmailPassword found. Ensure that the 'EmailPassword.init' method is called within the 'SuperTokens.init' recipeList.`;throw e=(0,s.checkForSSRErrorAndAppendIfNeeded)(e),Error(e)}return r.instance},r.reset=function(){(0,s.isTest)()&&(r.instance=void 0)},r.RECIPE_ID=`emailpassword`,r})(d().default);e.Recipe=c,e.default=c})),A=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.signOut=e.getTenantIdFromURL=e.getResetPasswordTokenFromURL=e.doesEmailExist=e.signIn=e.signUp=e.sendPasswordResetEmail=e.submitNewPassword=e.init=void 0;var n=k(),r=_(),i=(function(){function e(){}return e.init=function(e){return n.default.init(e)},e.signOut=function(e){return n.default.getInstanceOrThrow().signOut({userContext:(0,r.getNormalisedUserContext)(e?.userContext)})},e.submitNewPassword=function(e){return n.default.getInstanceOrThrow().recipeImplementation.submitNewPassword(t(t({},e),{userContext:(0,r.getNormalisedUserContext)(e.userContext)}))},e.sendPasswordResetEmail=function(e){return n.default.getInstanceOrThrow().recipeImplementation.sendPasswordResetEmail(t(t({},e),{userContext:(0,r.getNormalisedUserContext)(e.userContext)}))},e.signUp=function(e){return n.default.getInstanceOrThrow().recipeImplementation.signUp(t(t({},e),{shouldTryLinkingWithSessionUser:e?.shouldTryLinkingWithSessionUser,userContext:(0,r.getNormalisedUserContext)(e.userContext)}))},e.signIn=function(e){return n.default.getInstanceOrThrow().recipeImplementation.signIn(t(t({},e),{shouldTryLinkingWithSessionUser:e?.shouldTryLinkingWithSessionUser,userContext:(0,r.getNormalisedUserContext)(e.userContext)}))},e.doesEmailExist=function(e){return n.default.getInstanceOrThrow().recipeImplementation.doesEmailExist(t(t({},e),{userContext:(0,r.getNormalisedUserContext)(e.userContext)}))},e.getResetPasswordTokenFromURL=function(e){return n.default.getInstanceOrThrow().recipeImplementation.getResetPasswordTokenFromURL(t(t({},e),{userContext:(0,r.getNormalisedUserContext)(e?.userContext)}))},e.getTenantIdFromURL=function(e){return n.default.getInstanceOrThrow().recipeImplementation.getTenantIdFromURL(t(t({},e),{userContext:(0,r.getNormalisedUserContext)(e?.userContext)}))},e})();e.default=i,e.init=i.init,e.submitNewPassword=i.submitNewPassword,e.sendPasswordResetEmail=i.sendPasswordResetEmail,e.signUp=i.signUp,e.signIn=i.signIn,e.doesEmailExist=i.doesEmailExist,e.signOut=i.signOut,e.getResetPasswordTokenFromURL=i.getResetPasswordTokenFromURL,e.getTenantIdFromURL=i.getTenantIdFromURL})),j=e((e=>{function t(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}e.__esModule=!0,t(A())})),M=e((e=>{var t=c(),n=m(),r=x();e.AuthRecipe=(function(e){t.__extends(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.getAuthRecipeDefaultRedirectionURL=function(e){return t.__awaiter(n,void 0,void 0,function(){return t.__generator(this,function(e){throw Error(`Should never come here`)})})},n.signOut=function(e){return t.__awaiter(n,void 0,void 0,function(){return t.__generator(this,function(n){switch(n.label){case 0:return[4,r.Session.getInstanceOrThrow().signOut({userContext:t.getNormalisedUserContext(e?.userContext)})];case 1:return[2,n.sent()]}})})},n.doesSessionExist=function(e){return t.__awaiter(n,void 0,void 0,function(){return t.__generator(this,function(n){switch(n.label){case 0:return[4,r.Session.getInstanceOrThrow().doesSessionExist({userContext:t.getNormalisedUserContext(e?.userContext)})];case 1:return[2,n.sent()]}})})},n}return n})(n.RecipeModule)})),N=e((e=>{e.DEFAULT_RESET_PASSWORD_PATH=`/reset-password`,e.MANDATORY_FORM_FIELDS_ID_ARRAY=[`email`,`password`]})),P=e((e=>{var t=c();function n(e){return t.__awaiter(this,void 0,void 0,function(){var n;return t.__generator(this,function(t){return typeof e==`string`?(e=e.trim(),n=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,e.match(n)===null?[2,`ERROR_EMAIL_INVALID`]:[2,void 0]):[2,`ERROR_EMAIL_NON_STRING`]})})}function r(e){return t.__awaiter(this,void 0,void 0,function(){return t.__generator(this,function(t){return typeof e==`string`?e.length<8?[2,`ERROR_PASSWORD_TOO_SHORT`]:e.length>=100?[2,`ERROR_PASSWORD_TOO_LONG`]:e.match(/^.*[A-Za-z]+.*$/)===null?[2,`ERROR_PASSWORD_NO_ALPHA`]:e.match(/^.*[0-9]+.*$/)===null?[2,`ERROR_PASSWORD_NO_NUM`]:[2,void 0]:[2,`ERROR_PASSWORD_NON_STRING`]})})}function i(e){return t.__awaiter(this,void 0,void 0,function(){return t.__generator(this,function(t){return typeof e==`string`?[2,void 0]:[2,`ERROR_PASSWORD_NON_STRING`]})})}function a(e){return t.__awaiter(this,void 0,void 0,function(){return t.__generator(this,function(e){return[2,void 0]})})}e.defaultEmailValidator=n,e.defaultLoginPasswordValidator=i,e.defaultPasswordValidator=r,e.defaultValidate=a})),F=e((e=>{var t=c(),n=j(),r=M(),i=x(),a=N(),o=b(),s=P();
1function l(e){return e&&e.__esModule?e:{default:e}}var u=l(n),d=function(e){return function(n){return t.__assign(t.__assign({},n),{submitNewPassword:function(r){return t.__awaiter(this,void 0,void 0,function(){var i;return t.__generator(this,function(a){switch(a.label){case 0:return[4,n.submitNewPassword(t.__assign(t.__assign({},r),{formFields:[r.formFields[0]]}))];case 1:return i=a.sent(),i.status===`OK`&&e({action:`PASSWORD_RESET_SUCCESSFUL`,userContext:r.userContext}),[2,i]}})})},sendPasswordResetEmail:function(r){return t.__awaiter(this,void 0,void 0,function(){var i;return t.__generator(this,function(t){switch(t.label){case 0:return[4,n.sendPasswordResetEmail(r)];case 1:return i=t.sent(),i.status===`OK`&&e({action:`RESET_PASSWORD_EMAIL_SENT`,email:r.formFields.find(function(e){return e.id===`email`}).value,userContext:r.userContext}),[2,i]}})})},signUp:function(r){return t.__awaiter(this,void 0,void 0,function(){var a,o,s;return t.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:r.userContext})];case 1:return a=t.sent(),[3,3];case 2:return t.sent(),a=void 0,[3,3];case 3:return[4,n.signUp(r)];case 4:if(o=t.sent(),o.status!==`OK`)return[3,9];s=void 0,t.label=5;case 5:return t.trys.push([5,7,,8]),[4,i.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:r.userContext})];case 6:return s=t.sent(),[3,8];case 7:return t.sent(),s=void 0,[3,8];case 8:e({action:`SUCCESS`,isNewRecipeUser:!0,createdNewSession:s!==void 0&&(a===void 0||a.sessionHandle!==s.sessionHandle),user:o.user,userContext:r.userContext}),t.label=9;case 9:return[2,o]}})})},signIn:function(r){return t.__awaiter(this,void 0,void 0,function(){var a,o,s;return t.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,i.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:r.userContext})];case 1:return a=t.sent(),[3,3];case 2:return t.sent(),a=void 0,[3,3];case 3:return[4,n.signIn(r)];case 4:if(o=t.sent(),o.status!==`OK`)return[3,9];s=void 0,t.label=5;case 5:return t.trys.push([5,7,,8]),[4,i.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:r.userContext})];case 6:return s=t.sent(),[3,8];case 7:return t.sent(),s=void 0,[3,8];case 8:e({action:`SUCCESS`,isNewRecipeUser:!1,createdNewSession:s!==void 0&&(a===void 0||a.sessionHandle!==s.sessionHandle),user:o.user,userContext:r.userContext}),t.label=9;case 9:return[2,o]}})})}})}};function f(e){e===void 0&&(e={});var n=p(e.signInAndUpFeature),r=n.signUpForm.formFields.find(function(e){return e.id===`password`}),i=n.signUpForm.formFields.find(function(e){return e.id===`email`}),a=y(r.validate,i,e.resetPasswordUsingTokenFeature),s=t.__assign({functions:function(e){return e}},e.override);return t.__assign(t.__assign({},o.normaliseAuthRecipe(e)),{signInAndUpFeature:n,resetPasswordUsingTokenFeature:a,override:s})}function p(e){e===void 0&&(e={});var n=m(e.signUpForm);return{signUpForm:n,signInForm:h(n.formFields.reduce(function(e,n){return n.id===`email`?t.__spreadArray(t.__spreadArray([],e,!0),[n],!1):n.id===`password`?t.__spreadArray(t.__spreadArray([],e,!0),[t.__assign(t.__assign({},n),{autoComplete:`current-password`,validate:s.defaultLoginPasswordValidator})],!1):e},[]),e.signInForm)}}function m(e){e===void 0&&(e={});var t=g(),n=[];e.formFields!==void 0&&(n=e.formFields);var r=S(t,n);return{style:e.style===void 0?``:e.style,formFields:r}}
1function h(e,n){n===void 0&&(n={});var r=[];n.formFields!==void 0&&(r=n.formFields.filter(function(e){return a.MANDATORY_FORM_FIELDS_ID_ARRAY.includes(e.id)}).map(function(e){return t.__assign(t.__assign({},e),{optional:!1})}));var i=S(e,r);return{style:n.style===void 0?``:n.style,formFields:i}}function g(){return[_(),v()]}function _(){return{id:`email`,label:`EMAIL_PASSWORD_EMAIL_LABEL`,placeholder:`EMAIL_PASSWORD_EMAIL_PLACEHOLDER`,validate:s.defaultEmailValidator,optional:!1,autoComplete:`email`}}function v(){return{id:`password`,label:`EMAIL_PASSWORD_PASSWORD_LABEL`,placeholder:`EMAIL_PASSWORD_PASSWORD_PLACEHOLDER`,validate:s.defaultPasswordValidator,optional:!1,autoComplete:`new-password`}}function y(e,n,r){return r===void 0&&(r={}),{disableDefaultUI:r.disableDefaultUI===!0,submitNewPasswordForm:{style:r.submitNewPasswordForm!==void 0&&r.submitNewPasswordForm.style!==void 0?r.submitNewPasswordForm.style:``,formFields:[{id:`password`,label:`EMAIL_PASSWORD_NEW_PASSWORD_LABEL`,placeholder:`EMAIL_PASSWORD_NEW_PASSWORD_PLACEHOLDER`,validate:e,optional:!1,autoComplete:`new-password`},{id:`confirm-password`,label:`EMAIL_PASSWORD_CONFIRM_PASSWORD_LABEL`,placeholder:`EMAIL_PASSWORD_CONFIRM_PASSWORD_PLACEHOLDER`,validate:e,optional:!1,autoComplete:`new-password`}]},enterEmailForm:{style:r.enterEmailForm!==void 0&&r.enterEmailForm.style!==void 0?r.enterEmailForm.style:``,formFields:[t.__assign(t.__assign({},_()),{validate:n.validate,placeholder:``,autofocus:!0})]}}}function S(e,n){for(var r=e,i=0;i<n.length;i++){for(var o=n[i],c=!0,l=0;l<r.length;l++){var u=r[l];if(o.id===u.id){var d=u.optional;o.optional!==void 0&&(d=o.optional),a.MANDATORY_FORM_FIELDS_ID_ARRAY.includes(o.id)&&(d=!1),r[l]=t.__assign(t.__assign(t.__assign({},r[l]),o),{optional:d}),c=!1;break}}c&&r.push(t.__assign({optional:!1,placeholder:o.label,validate:s.defaultValidate},o))}return r.map(function(e){return C(e)})}function C(e){var n=this;if(e.optional===!1&&e.nonOptionalErrorMsg===``)throw Error(`nonOptionalErrorMsg for field ${e.id} cannot be an empty string`);return t.__assign(t.__assign({},e),{validate:function(r){return t.__awaiter(n,void 0,void 0,function(){return t.__generator(this,function(t){switch(t.label){case 0:return r===``&&e.optional===!1?e.nonOptionalErrorMsg===void 0?[2,`ERROR_NON_OPTIONAL`]:[2,e.nonOptionalErrorMsg]:[4,e.validate(r)];case 1:return[2,t.sent()]}})})}})}e.EmailPassword=(function(e){t.__extends(n,e);function n(r,o){o===void 0&&(o=u.default);var s=e.call(this,r)||this;return s.webJSRecipe=o,s.recipeID=n.RECIPE_ID,s.firstFactorIds=[i.FactorIds.EMAILPASSWORD],s.getDefaultRedirectionURL=function(e){return t.__awaiter(s,void 0,void 0,function(){return t.__generator(this,function(n){return e.action===`RESET_PASSWORD`?[2,t.getDefaultRedirectionURLForPath(this.config,a.DEFAULT_RESET_PASSWORD_PATH,e)]:[2,this.getAuthRecipeDefaultRedirectionURL(e)]})})},s}return n.prototype.getFirstFactorsForAuthPage=function(){return this.firstFactorIds},n.init=function(e){var r=f(e);return{recipeID:n.RECIPE_ID,authReact:function(e){return n.instance=new n(t.__assign(t.__assign({},r),{appInfo:e,recipeId:n.RECIPE_ID})),n.instance},webJS:u.default.init(t.__assign(t.__assign({},r),{override:{functions:function(e,t){var n=d(r.onHandleEvent);return t.override(n),t.override(r.override.functions),e}}}))}},n.getInstanceOrThrow=function(){if(n.instance===void 0){var e=`No instance of EmailPassword found. Make sure to call the EmailPassword.init method.See https://supertokens.io/docs/emailpassword/quick-setup/frontend`;throw typeof window>`u`&&(e+=t.SSR_ERROR),Error(e)}return n.instance},n.reset=function(){t.isTest()&&(n.instance=void 0)},n.RECIPE_ID=`emailpassword`,n})(r.AuthRecipe)})),I=e((e=>{var t=v(),n=F(),r=t.createGenericComponentsOverrideContext(void 0,n.EmailPassword.RECIPE_ID),i=r[0];e.Provider=r[1],e.useContext=i})),L=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});var r=c(),i=I(),d=F();t(),E(),u(),s(),o(),l(),v(),n(),g(),T(),S(),f(),h(),j(),M(),m(),x(),a(),p(),y(),N(),b(),P();var _=(function(){function e(){}return e.init=function(e){return d.EmailPassword.init(e)},e.signOut=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().signOut({userContext:r.getNormalisedUserContext(e?.userContext)})]})})},e.submitNewPassword=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().webJSRecipe.submitNewPassword(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e.userContext)}))]})})},e.sendPasswordResetEmail=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().webJSRecipe.sendPasswordResetEmail(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e.userContext)}))]})})},e.signUp=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().webJSRecipe.signUp(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e.userContext)}))]})})},e.signIn=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().webJSRecipe.signIn(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e.userContext)}))]})})},e.doesEmailExist=function(e){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return[2,d.EmailPassword.getInstanceOrThrow().webJSRecipe.doesEmailExist(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e.userContext)}))]})})},e.getResetPasswordTokenFromURL=function(e){return d.EmailPassword.getInstanceOrThrow().webJSRecipe.getResetPasswordTokenFromURL(r.__assign(r.__assign({},e),{userContext:r.getNormalisedUserContext(e?.userContext)}))},e.ComponentsOverrideProvider=i.Provider,e})(),C=_.init,w=_.signOut,D=_.submitNewPassword,O=_.sendPasswordResetEmail,k=_.signUp,A=_.signIn,L=_.doesEmailExist,R=_.getResetPasswordTokenFromURL;e.EmailPasswordComponentsOverrideProvider=_.ComponentsOverrideProvider,e.default=_,e.doesEmailExist=L,e.getResetPasswordTokenFromURL=R,e.init=C,e.sendPasswordResetEmail=O,e.signIn=A,e.signOut=w,e.signUp=k,e.submitNewPassword=D})),R=e((e=>{function t(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}e.__esModule=!0,t(L())}));export{M as n,R as t};
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.