PageSourceSearch

https://lnkrs.app/assets/AddAccountModal-uOBqLiG8.js

js lnkrs.app collected 2026-10-02 01:14:17 UTC 87,569 bytes, 6 lines download raw bytes

vendor: 7,055 bytes, lines 1-6
1import{c as Pt,j as c,u as H,R as Dt,x as Ft,db as zt,r as j,dc as Ut,s as D,cR as Bt,dd as qt,D as Wt,k as Ht,o as vt,q as Fe}from"./index-bYGaXa-6.js";import{I as Jt,a as Yt,b as Gt}from"./input-otp-CwZyCOFt.js";import{A as Kt}from"./ArrowDownIcon-BLLpwIca.js";import{A as Qt}from"./ArrowLeftIcon-DescZlEC.js";import{M as Xt}from"./MailIcon-DSq-C-Ts.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const bt=Pt("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var T;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(T||(T={}));var rt;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(rt||(rt={}));const _=T.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Q=s=>{switch(typeof s){case"undefined":return _.undefined;case"string":return _.string;case"number":return Number.isNaN(s)?_.nan:_.number;case"boolean":return _.boolean;case"function":return _.function;case"bigint":return _.bigint;case"symbol":return _.symbol;case"object":return Array.isArray(s)?_.array:s===null?_.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?_.promise:typeof Map<"u"&&s instanceof Map?_.map:typeof Set<"u"&&s instanceof Set?_.set:typeof Date<"u"&&s instanceof Date?_.date:_.object;default:return _.unknown}},d=T.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class G extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,m=0;for(;m<i.path.length;){const p=i.path[m];m===i.path.length-1?(o[p]=o[p]||{_errors:[]},o[p]._errors.push(t(i))):o[p]=o[p]||{_errors:[]},o=o[p],m++}}};return n(this),r}static assert(e){if(!(e instanceof G))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,T.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}G.create=s=>new G(s);const Ue=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===_.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,T.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${T.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${T.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${T.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:T.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,T.assertNever(s)}return{message:t}};let es=Ue;function ts(){return es}const ss=s=>
vendor: 7,179 bytes, line 6
6{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const m=r.filter(p=>!!p).slice().reverse();for(const p of m)o=p(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function h(s,e){const t=ts(),r=ss({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===Ue?void 0:Ue].filter(n=>!!n)});s.common.issues.push(r)}class U{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return U.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return v;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const v=Object.freeze({status:"aborted"}),he=s=>({status:"dirty",value:s}),B=s=>({status:"valid",value:s}),nt=s=>s.status==="aborted",at=s=>s.status==="dirty",oe=s=>s.status==="valid",Ce=s=>typeof Promise<"u"&&s instanceof Promise;var g;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));class te{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const it=(s,e)=>{if(oe(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new G(s.common.issues);return this._error=t,this._error}}};function k(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:m}=s;return i.code==="invalid_enum_value"?{message:m??o.defaultError}:typeof o.data>"u"?{message:m??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:m??t??o.defaultError}},description:n}}class S{get description(){return this._def.description}_getType(e){return Q(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new U,ctx:{common:e.parent.common,data:e.data,parsedType:Q(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Ce(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},n=this._parseSync({data:e,path:r.path,parent:r});return it(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return oe(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>oe(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Q(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Ce(n)?n:Promise.resolve(n));return it(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(m=>m?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new de({schema:this,typeName:b.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ee.create(this,this._def)}nullable(){return le.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return J.create(this)}promise(){return Te.create(this,this._def)}or(e){return Ne.create([this,e],this._def)}and(e){return Se.create(this,e,this._def)}transform(e){return new de({...k(this._def),schema:this,typeName:b.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new qe({...k(this._def),innerType:this,defaultValue:t,typeName:b.ZodDefault})}brand(){return new js({typeName:b.ZodBranded,type:this,...k(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new We({...k(this._def),innerType:this,catchValue:t,typeName:b.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Je.create(this,e)}readonly(){return He.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const rs=/^c[^\s-]{8,}
vendor: 4,492 bytes, line 6
6$/i,ns=/^[0-9a-z]+$/,as=/^[0-9A-HJKMNP-TV-Z]{26}$/i,is=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,os=/^[a-z0-9_-]{21}$/i,cs=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ds=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ls=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,us="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ze;const fs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,hs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ms=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ps=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_s=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gs=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ys=new RegExp(`^${wt}$`);function kt(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function xs(s){return new RegExp(`^${kt(s)}$`)}function vs(s){let e=`${wt}T${kt(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function bs(s,e){return!!((e==="v4"||!e)&&fs.test(s)||(e==="v6"||!e)&&ms.test(s))}function ws(s,e){if(!cs.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function ks(s,e){return!!((e==="v4"||!e)&&hs.test(s)||(e==="v6"||!e)&&ps.test(s))}class X extends S{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==_.string){const a=this._getOrReturnCtx(e);return h(a,{code:d.invalid_type,expected:_.string,received:a.parsedType}),v}const r=new U;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(n=this._getOrReturnCtx(e,n),i?h(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&h(n,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}
vendor: 17,300 bytes, line 6
6else if(a.kind==="email")ls.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"email",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")ze||(ze=new RegExp(us,"u")),ze.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"emoji",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")is.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"uuid",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")os.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"nanoid",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")rs.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cuid",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")ns.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cuid2",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")as.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"ulid",code:d.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),h(n,{validation:"url",code:d.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"regex",code:d.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?vs(a).test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?ys.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?xs(a).test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:d.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?ds.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"duration",code:d.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?bs(e.data,a.version)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"ip",code:d.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?ws(e.data,a.alg)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"jwt",code:d.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?ks(e.data,a.version)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cidr",code:d.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?_s.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"base64",code:d.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?gs.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"base64url",code:d.invalid_string,message:a.message}),r.dirty()):T.assertNever(a);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...g.errToObj(r)})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...g.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...g.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...g.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new X({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new X({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new X({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}X.create=s=>new X({checks:[],typeName:b.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...k(s)});function Cs(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class pe extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==_.number){const a=this._getOrReturnCtx(e);return h(a,{code:d.invalid_type,expected:_.number,received:a.parsedType}),v}let r;const n=new U;for(const a of this._def.checks)a.kind==="int"?T.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Cs(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:d.not_finite,message:a.message}),n.dirty()):T.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,r,n){return new pe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:g.toString(n)}]})}_addCheck(e){return new pe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&T.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}pe.create=s=>new pe({checks:[],typeName:b.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class _e extends S{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==_.bigint)return this._getInvalidInput(e);let r;const n=new U;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),h(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):T.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return h(t,{code:d.invalid_type,expected:_.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,r,n){return new _e({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:g.toString(n)}]})}_addCheck(e){return new _e({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}_e.create=s=>new _e({checks:[],typeName:b.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...k(s)});class ot extends S{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==_.boolean){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.boolean,received:r.parsedType}),v}return B(e.data)}}ot.create=s=>new ot({typeName:b.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...k(s)});class je extends S{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==_.date){const a=this._getOrReturnCtx(e);return h(a,{code:d.invalid_type,expected:_.date,received:a.parsedType}),v}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return h(a,{code:d.invalid_date}),v}const r=new U;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):T.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new je({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}je.create=s=>new je({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:b.ZodDate,...k(s)});class ct extends S{_parse(e){if(this._getType(e)!==_.symbol){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.symbol,received:r.parsedType}),v}return B(e.data)}}ct.create=s=>new ct({typeName:b.ZodSymbol,...k(s)});class dt extends S{_parse(e){if(this._getType(e)!==_.undefined){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.undefined,received:r.parsedType}),v}return B(e.data)}}dt.create=s=>new dt({typeName:b.ZodUndefined,...k(s)});class lt extends S{_parse(e){if(this._getType(e)!==_.null){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.null,received:r.parsedType}),v}return B(e.data)}}lt.create=s=>new lt({typeName:b.ZodNull,...k(s)});class ut extends S{constructor(){super(...arguments),this._any=!0}_parse(e){return B(e.data)}}ut.create=s=>new ut({typeName:b.ZodAny,...k(s)});class ft extends S{constructor(){super(...arguments),this._unknown=!0}_parse(e){return B(e.data)}}ft.create=s=>new ft({typeName:b.ZodUnknown,...k(s)});class se extends S{_parse(e){const t=this._getOrReturnCtx(e);return h(t,{code:d.invalid_type,expected:_.never,received:t.parsedType}),v}}se.create=s=>new se({typeName:b.ZodNever,...k(s)});class ht extends S{_parse(e){if(this._getType(e)!==_.undefined){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.void,received:r.parsedType}),v}return B(e.data)}}ht.create=s=>new ht({typeName:b.ZodVoid,...k(s)});class J extends S{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==_.array)return h(t,{code:d.invalid_type,expected:_.array,received:t.parsedType}),v;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(i||o)&&(h(t,{code:i?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:i?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(h(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(h(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new te(t,i,t.path,o)))).then(i=>U.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new te(t,i,t.path,o)));return U.mergeArray(r,a)}
vendor: 5,397 bytes, line 6
6get element(){return this._def.type}min(e,t){return new J({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new J({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new J({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}}J.create=(s,e)=>new J({type:s,minLength:null,maxLength:null,exactLength:null,typeName:b.ZodArray,...k(e)});function ie(s){if(s instanceof R){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=ee.create(ie(r))}return new R({...s._def,shape:()=>e})}else return s instanceof J?new J({...s._def,type:ie(s.element)}):s instanceof ee?ee.create(ie(s.unwrap())):s instanceof le?le.create(ie(s.unwrap())):s instanceof ne?ne.create(s.items.map(e=>ie(e))):s}class R extends S{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=T.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==_.object){const p=this._getOrReturnCtx(e);return h(p,{code:d.invalid_type,expected:_.object,received:p.parsedType}),v}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof se&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const m=[];for(const p of i){const f=a[p],Z=n.data[p];m.push({key:{status:"valid",value:p},value:f._parse(new te(n,Z,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof se){const p=this._def.unknownKeys;if(p==="passthrough")for(const f of o)m.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(p==="strict")o.length>0&&(h(n,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const f of o){const Z=n.data[f];m.push({key:{status:"valid",value:f},value:p._parse(new te(n,Z,n.path,f)),alwaysSet:f in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const f of m){const Z=await f.key,V=await f.value;p.push({key:Z,value:V,alwaysSet:f.alwaysSet})}return p}).then(p=>U.mergeObjectSync(r,p)):U.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new R({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:g.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new R({...this._def,unknownKeys:"strip"})}passthrough(){return new R({...this._def,unknownKeys:"passthrough"})}extend(e){return new R({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new R({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:b.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new R({...this._def,catchall:e})}pick(e){const t={};for(const r of T.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new R({...this._def,shape:()=>t})}omit(e){const t={};for(const r of T.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new R({...this._def,shape:()=>t})}deepPartial(){return ie(this)}partial(e){const t={};for(const r of T.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new R({...this._def,shape:()=>t})}required(e){const t={};for(const r of T.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof ee;)a=a._def.innerType;t[r]=a}return new R({...this._def,shape:()=>t})}keyof(){return Ct(T.objectKeys(this.shape))}}R.create=(s,e)=>new R({shape:()=>s,unknownKeys:"strip",catchall:se.create(),typeName:b.ZodObject,...k(e)});R.strictCreate=(s,e)=>new R({shape:()=>s,unknownKeys:"strict",catchall:se.create(),typeName:b.ZodObject,...k(e)});R.lazycreate=(s,e)=>new R({shape:s,unknownKeys:"strip",catchall:se.create(),typeName:b.ZodObject,...k(e)});class Ne extends S{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new G(o.ctx.common.issues));return h(t,{code:d.invalid_union,unionErrors:i}),v}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const m of r){const p={...t,common:{...t.common,issues:[]},parent:null},f=m._parseSync({data:t.data,path:t.path,parent:p});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(m=>new G(m));return h(t,{code:d.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}Ne.create=(s,e)=>new Ne({options:s,typeName:b.ZodUnion,...k(e)});function Be(s,e){const t=Q(s),r=Q(e);if(s===e)return{valid:!0,data:s};if(t===_.object&&r===_.object){const n=T.objectKeys(e),a=T.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};
vendor: 4,604 bytes, line 6
6for(const o of a){const m=Be(s[o],e[o]);if(!m.valid)return{valid:!1};i[o]=m.data}return{valid:!0,data:i}}else if(t===_.array&&r===_.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a<s.length;a++){const i=s[a],o=e[a],m=Be(i,o);if(!m.valid)return{valid:!1};n.push(m.data)}return{valid:!0,data:n}}else return t===_.date&&r===_.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class Se extends S{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(a,i)=>{if(nt(a)||nt(i))return v;const o=Be(a.value,i.value);return o.valid?((at(a)||at(i))&&t.dirty(),{status:t.value,value:o.data}):(h(r,{code:d.invalid_intersection_types}),v)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Se.create=(s,e,t)=>new Se({left:s,right:e,typeName:b.ZodIntersection,...k(t)});class ne extends S{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==_.array)return h(r,{code:d.invalid_type,expected:_.array,received:r.parsedType}),v;if(r.data.length<this._def.items.length)return h(r,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&r.data.length>this._def.items.length&&(h(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const m=this._def.items[o]||this._def.rest;return m?m._parse(new te(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>U.mergeArray(t,i)):U.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new ne({...this._def,rest:e})}}ne.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ne({items:s,typeName:b.ZodTuple,rest:null,...k(e)})};class mt extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==_.map)return h(r,{code:d.invalid_type,expected:_.map,received:r.parsedType}),v;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,m],p)=>({key:n._parse(new te(r,o,r.path,[p,"key"])),value:a._parse(new te(r,m,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const m of i){const p=await m.key,f=await m.value;if(p.status==="aborted"||f.status==="aborted")return v;(p.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(p.value,f.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const m of i){const p=m.key,f=m.value;if(p.status==="aborted"||f.status==="aborted")return v;(p.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(p.value,f.value)}return{status:t.value,value:o}}}}mt.create=(s,e,t)=>new mt({valueType:e,keyType:s,typeName:b.ZodMap,...k(t)});class ge extends S{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==_.set)return h(r,{code:d.invalid_type,expected:_.set,received:r.parsedType}),v;const n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(h(r,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(h(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(m){const p=new Set;for(const f of m){if(f.status==="aborted")return v;f.status==="dirty"&&t.dirty(),p.add(f.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((m,p)=>a._parse(new te(r,m,r.path,p)));return r.common.async?Promise.all(o).then(m=>i(m)):i(o)}min(e,t){return new ge({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new ge({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ge.create=(s,e)=>new ge({valueType:s,minSize:null,maxSize:null,typeName:b.ZodSet,...k(e)});class pt extends S{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}pt.create=(s,e)=>new pt({getter:s,typeName:b.ZodLazy,...k(e)});class _t extends S{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),v}
vendor: 5,314 bytes, line 6
6return{status:"valid",value:e.data}}get value(){return this._def.value}}_t.create=(s,e)=>new _t({value:s,typeName:b.ZodLiteral,...k(e)});function Ct(s,e){return new ce({values:s,typeName:b.ZodEnum,...k(e)})}class ce extends S{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:T.joinValues(r),received:t.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{received:t.data,code:d.invalid_enum_value,options:r}),v}return B(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ce.create(e,{...this._def,...t})}exclude(e,t=this._def){return ce.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}ce.create=Ct;class gt extends S{_parse(e){const t=T.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==_.string&&r.parsedType!==_.number){const n=T.objectValues(t);return h(r,{expected:T.joinValues(n),received:r.parsedType,code:d.invalid_type}),v}if(this._cache||(this._cache=new Set(T.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=T.objectValues(t);return h(r,{received:r.data,code:d.invalid_enum_value,options:n}),v}return B(e.data)}get enum(){return this._def.values}}gt.create=(s,e)=>new gt({values:s,typeName:b.ZodNativeEnum,...k(e)});class Te extends S{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==_.promise&&t.common.async===!1)return h(t,{code:d.invalid_type,expected:_.promise,received:t.parsedType}),v;const r=t.parsedType===_.promise?t.data:Promise.resolve(t.data);return B(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Te.create=(s,e)=>new Te({type:s,typeName:b.ZodPromise,...k(e)});class de extends S{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===b.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{h(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return v;const m=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return m.status==="aborted"?v:m.status==="dirty"||t.value==="dirty"?he(m.value):m});{if(t.value==="aborted")return v;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?v:o.status==="dirty"||t.value==="dirty"?he(o.value):o}}if(n.type==="refinement"){const i=o=>{const m=n.refinement(o,a);if(r.common.async)return Promise.resolve(m);if(m instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!oe(i))return v;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>oe(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):v);T.assertNever(n)}}de.create=(s,e,t)=>new de({schema:s,typeName:b.ZodEffects,effect:e,...k(t)});de.createWithPreprocess=(s,e,t)=>new de({schema:e,effect:{type:"preprocess",transform:s},typeName:b.ZodEffects,...k(t)});class ee extends S{_parse(e){return this._getType(e)===_.undefined?B(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ee.create=(s,e)=>new ee({innerType:s,typeName:b.ZodOptional,...k(e)});class le extends S{_parse(e){return this._getType(e)===_.null?B(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}le.create=(s,e)=>new le({innerType:s,typeName:b.ZodNullable,...k(e)});class qe extends S{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===_.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}qe.create=(s,e)=>new qe({innerType:s,typeName:b.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...k(e)});class We extends S{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ce(n)?n.then(a=>
vendor: 4,321 bytes, line 6
6({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new G(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new G(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}We.create=(s,e)=>new We({innerType:s,typeName:b.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...k(e)});class yt extends S{_parse(e){if(this._getType(e)!==_.nan){const r=this._getOrReturnCtx(e);return h(r,{code:d.invalid_type,expected:_.nan,received:r.parsedType}),v}return{status:"valid",value:e.data}}}yt.create=s=>new yt({typeName:b.ZodNaN,...k(s)});class js extends S{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Je extends S{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?v:a.status==="dirty"?(t.dirty(),he(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new Je({in:e,out:t,typeName:b.ZodPipeline})}}class He extends S{_parse(e){const t=this._def.innerType._parse(e),r=n=>(oe(n)&&(n.value=Object.freeze(n.value)),n);return Ce(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}He.create=(s,e)=>new He({innerType:s,typeName:b.ZodReadonly,...k(e)});R.lazycreate;var b;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(b||(b={}));const Ns=X.create;se.create;J.create;R.create;R.strictCreate;Ne.create;Se.create;ne.create;ce.create;Te.create;ee.create;le.create;function jt({className:s="w-[20px] h-[20px]"}){return c.jsx("svg",{className:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M9.66602 19.4648C9.666 21.1953 8.26271 22.5986 6.53223 22.5986V20.5986C7.15814 20.5986 7.666 20.0908 7.66602 19.4648V15.1982H9.66602V19.4648ZM13.9326 19.4648C13.9326 19.7446 14.0351 20.0005 14.2031 20.1982V20.3984H14.4248C14.607 20.524 14.8275 20.5984 15.0654 20.5986V22.5986C13.3354 22.5982 11.9326 21.195 11.9326 19.4648V15.1982H13.9326V19.4648ZM10.7988 1.39844C13.4943 1.39844 15.8748 2.74406 17.3086 4.79883H14.626C13.5928 3.92578 12.2573 3.39844 10.7988 3.39844C7.52241 3.39889 4.86636 6.05554 4.86621 9.33203V16.7988C4.86599 18.8237 3.22412 20.4648 1.19922 20.4648V18.4648C2.11955 18.4648 2.86599 17.7191 2.86621 16.7988V9.33203C2.86636 4.95097 6.41784 1.39889 10.7988 1.39844ZM20.3994 20.4648C20.1621 20.4648 19.9299 20.4415 19.7051 20.3984H20.3994V20.4648ZM19.9922 11.4521H23.1924V13.4521H19.9922V16.6523H17.9922V13.4521H14.792V11.4521H17.9922V8.25195H19.9922V11.4521Z",fill:"currentColor"})})}function Nt({className:s="w-[20px] h-[20px]"}){return c.jsx("svg",{className:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{d:"M9.66602 19.4648C9.666 21.1953 8.26271 22.5986 6.53223 22.5986V20.5986C7.15814 20.5986 7.666 20.0908 7.66602 19.4648V15.1982H9.66602V19.4648ZM13.9326 19.4648C13.9326 19.7446 14.0351 20.0005 14.2031 20.1982V20.3984H14.4248C14.607 20.524 14.8275 20.5984 15.0654 20.5986V22.598
66C13.3354 22.5982 11.9326 21.195 11.9326 19.4648V15.1982H13.9326V19.4648ZM10.7988 1.39844C13.4943 1.39844 15.8748 2.74406 17.3086 4.79883H14.626C13.5928 3.92578 12.2573 3.39844 10.7988 3.39844C7.52241 3.39889 4.86636 6.05554 4.86621 9.33203V16.7988C4.86599 18.8237 3.22412 20.4648 1.19922 20.4648V18.4648C2.11955 18.4648 2.86599 17.7191 2.86621 16.7988V9.33203C2.86636 4.95097 6.41784 1.39889 10.7988 1.39844ZM20.3994 20.4648C20.1621 20.4648 19.9299 20.4415 19.7051 20.3984H20.3994V20.4648ZM19.0098 9.45117C19.0098 10.1124 18.7258 10.6881 18.4209 11.125C18.3425 11.2373 18.2581 11.3463 18.1709 11.4512H23.5918V13.4512H18.1709C18.258 13.556 18.3425 13.6651 18.4209 13.7773C18.7258 14.2142 19.0096 14.79 19.0098 15.4512V16.4512H17.0098V15.4512C17.0096 15.3625 16.9658 15.1876 16.7803 14.9219C16.6006 14.6648 16.3409 14.3985 16.0488 14.1475C15.761 13.9001 15.4683 13.6892 15.2451 13.54C15.1349 13.4664 15.0434 13.4092 14.9814 13.3711C14.9506 13.3522 14.9259 13.3379 14.9111 13.3291C14.9042 13.325 14.8993 13.321 14.8965 13.3193L14.8955 13.3184L14.8945 13.3193C14.5837 13.1411 14.3916 12.8095 14.3916 12.4512C14.3918 12.0929 14.5836 11.7611 14.8945 11.583H14.8965C14.8994 11.5813 14.904 11.5775 14.9111 11.5732C14.926 11.5644 14.9505 11.5502 14.9814 11.5312C15.0435 11.4932 15.1348 11.436 15.2451 11.3623C15.4683 11.2131 15.7609 11.0023 16.0488 10.7549C16.341 10.5037 16.6006 10.2377 16.7803 9.98047C16.966 9.71441 17.0098 9.5397 17.0098 9.45117V8.45117H19.0098V9.45117Z",fill:"currentColor"})})}const Ss=Ns().trim().toLowerCase().email().max(255),Ts=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","msn.com","yahoo.com","yahoo.es","yahoo.co.uk","yahoo.fr","yahoo.it","ymail.com","icloud.com","me.com","mac.com","proton.me","protonmail.com","pm.me","aol.com","gmx.com","gmx.net","gmx.es","mail.com","zoho.com","yandex.com","yandex.ru","tutanota.com","fastmail.com","hey.com"]),me="#5D4AFF",Ae="inline-flex h-9 items-center justify-center rounded-[6px] bg-primary text-primary-foreground px-4 text-sm font-semibold leading-none disabled:opacity-50 shadow-[inset_0_-1px_0_0_var(--ring-soft)]",As="inline-flex h-9 items-center justify-center rounded-[6px] bg-card px-4 text-sm font-semibold leading-none text-foreground disabled:opacity-50",Os={boxShadow:"0 0 0 1px rgba(0,0,0,0.12)"},Es="px-3 py-1.5 text-sm text-muted-foreground hover:text-foreground disabled:opacity-50";async function fe(s){try{const e=s==null?void 0:s.context;if(!e)return null;if(typeof e.json=="function")return await e.clone().json();if(typeof e.text=="function"){const t=await e.clone().text();try{return JSON.parse(t)}catch{return{error:t}}}return typeof e=="object"?e:null}catch{return null}}const ye="lnkrs.add_account.state.v4",Is=30*60*1e3;function Rs(){try{const s=localStorage.getItem(ye);if(!s)return null;const e=JSON.parse(s);return e!=null&&e.open?typeof e.savedAt=="number"&&Date.now()-e.savedAt>Is?(localStorage.removeItem(ye),null):e.step==="merging"||e.step==="merge_done"||e.step==="done"||e.step==="choose"?null:e:null}catch{return null}}function re(){try{localStorage.removeItem(ye)}catch{}}function Ys(){const{t:s}=H(),e=Dt(),{recheck:t}=Ft(),{hubIdentities:r,hubId:n,refresh:a}=zt(),[i,o]=j.useState(!0),m=j.useMemo(()=>!i&&!r.some(l=>l.is_personal_primary),[i,r]),p=j.useRef(Rs()),f=p.current,[Z,V]=j.useState((f==null?void 0:f.open)??!1),[N,E]=j.useState((f==null?void 0:f.step)??"choose"),[q,Oe]=j.useState((f==null?void 0:f.intent)??"create"),[$,Ee]=j.useState((f==null?void 0:f.email)??""),[Ye,P]=j.useState(""),[ae,Ie]=j.useState((f==null?void 0:f.mergeCode)??""),xe=j.useRef((f==null?void 0:f.mergeCode)??""),[K,F]=j.useState(!1),[Re,C]=j.useState(null),[Ge,ve]=j.useState(0),W=j.useRef(null),[Ze,ue]=j.useState((f==null?void 0:f.matches)??[]),[St,Me]=j.useState(null),[be,Ke]=j.useState((f==null?void 0:f.planInfo)??null),[Qe,Ve]=j.useState((f==null?void 0:f.domainBlocked)??!1);j.useEffect(()=>Ut(l=>{Xe(),V(!0),(l==="create"||l==="join"||l==="create_personal")&&(Oe(l),E("email"))}),[]),j.useEffect(()=>{if(!Z)return;let l=!1;return(async()=>{const{data:{session:u}}=await D.auth.getSession();if(!(u!=null&&u.user))return;const{data:y}=await D.from("profiles").select("id").eq("user_id",u.user.id).eq("profile_type","personal").limit(1);l||o(((y==null?void 0:y.length)??0)>0)})(),()=>{l=!0}},[Z]);const Xe=j.useCallback(()=>{E("choose"),Ee(""),P(""),xe.current="",Ie(""),C(null),F(!1),ve(0),ue([]),Me(null),Ke(null),Ve(!1),W.current&&(window.clearInterval(W.current),W.current=null),we.current=0,re()},[]),$e=j.useCallback(l=>{ve(l),W.current&&window.clearInterval(W.current),W.current=window.setInterval(()=>{ve(u=>u<=1?(W.current&&window.clearInterval(W.current),W.current=null,0):u-1)},1e3)},[]),we=j.useRef((f==null?void 0:f.resendUntil)??0),Tt=j.useCallback(l=>{we.current=l;const u=Math.max(0,Math.ceil((l-Date.now())/1e3));if(u<=0){ve(0);return}$e(u)},[$e]);j.useEffect(()=>()=>{W.current&&window.clearInterval(W.current)},[]),j.useEffect(()=>{const l=p.current,u=(l==null?void 0:l.resendUntil)??0;p.current=null,(async()=>{var y;try{const{data:x}=await D.auth.getSession(),w=(((y=x.session)==null?void 0:y.user.email)||"").toLowerCase().trim(),L=((l==null?void 0:l.email)||"").toLowerCase().trim();if(x.session&&(!L||L===w)){ke.current=!0,re(),V(!1);return}if(window.location.pathname.startsWith("/onboarding")){ke.current=!0,re(),V(!1);return}}catch{}u>Date.now()&&(we.current=u,$e(Math.ceil((u-Date.now())/1e3)))})()},[]);const ke=j.useRef(!1);j.useEffect(()=>{if(ke.current){re();return}if(!Z){re();return}if(N==="merging"||N==="merge_done"||N==="done"||N==="choose"){re();return}try{const l={open:Z,step:N,intent:q,email:$,mergeCode:ae,matches:Ze,planInfo:be,domainBlocked:Qe,resendUntil:we.current,savedAt:Date.now()};localStorage.setItem(ye,JSON.stringify(l))}catch{}},[Z,N,q,$,ae,Ze,be,Qe,Ge]);const et=l=>{!l&&N==="merging"||(V(l),l||(re(),window.setTimeout(Xe,200)))},At=l=>{Oe(l),C(null),E("email")},Le=j.useCallback(async(l,u,y,x)=>{const w=await Bt(),L=(w==null?void 0:w.email)||"",z=(w==null?void 0:w.user_id
6)||"",{data:A,error:O}=await D.functions.invoke("create-hub-identity",{body:{email:l,code:u,kind:y,force_new_org:(x==null?void 0:x.force_new_org)===!0,org_name:x==null?void 0:x.org_name}});if(O){const M=await fe(O),I=(M==null?void 0:M.error)||O.message||"edge_invoke_failed",Y=new Error(I);throw Y.payload=M,Y}if(A!=null&&A.error){const M=new Error(A.error);throw M.payload=A,M}if(!(A!=null&&A.action_link)||!(A!=null&&A.hub_id))throw new Error("invalid_response");qt({hub_id:A.hub_id,source_user_id:z,source_email:L,target_email:l,target_org_ids:Array.isArray(A.target_org_ids)?A.target_org_ids.filter(Boolean):void 0,created_at:new Date().toISOString(),already_linked:!0}),ke.current=!0;try{localStorage.removeItem(ye)}catch{}window.location.href=A.action_link},[]),Pe=j.useCallback(l=>{const u=l.trim();/^\d{6}$/.test(u)&&(xe.current=u,Ie(u))},[]),Ot=j.useCallback(async l=>{const u=l.toLowerCase().trim();if(!u)return null;const{data:y,error:x}=await D.rpc("find_claimable_user_by_verified_email",{_email:u});if(x)return console.error("find_claimable_user_by_verified_email failed",x),null;const w=Array.isArray(y)?y[0]:y;return w!=null&&w.user_id?w:null},[]),tt=j.useCallback(async l=>{var O;const u=l.toLowerCase().trim();if(!u)return null;const y=new Map;for(const M of r){const I=(M.email||"").toLowerCase().trim();I&&y.set(I,M.is_personal_primary?"personal":"workspace")}const{data:x}=await D.auth.getSession(),w=(((O=x.session)==null?void 0:O.user.email)||"").toLowerCase().trim();if(w&&!y.has(w)){const M=r.find(I=>{var Y;return I.user_id===((Y=x.session)==null?void 0:Y.user.id)});y.set(w,M!=null&&M.is_personal_primary||i?"personal":"workspace")}const L=y.get(u);if(L)return L;const{data:z}=await D.rpc("is_email_in_my_hub",{_email:u}),A=Array.isArray(z)?z[0]:z;return A!=null&&A.in_hub?A.is_primary?"personal":"workspace":null},[i,r]),De=async(l=!1)=>{C(null);const u=Ss.safeParse($);if(!u.success){C(s("add_account.invalid_email","Please enter a valid email"));return}if(q==="create"||q==="join"){const y=u.data;try{const x=await tt(y);if(x){E("email"),P(""),C(x==="personal"?s("add_account.email_is_personal","This email is already used for your personal account. Use a different email for the workspace."):s("add_account.email_already_in_hub","This email is already linked to one of your accounts. Switch to it from the account menu."));return}}catch{}if(q==="join"){const x=y.split("@")[1]||"";if(Ts.has(x)){C(s("add_account.personal_domain_blocked","Personal email domains can't be used to find a workspace. Ask your team for an invitation, or use your work email."));return}}}F(!0);try{const{data:y,error:x}=await D.functions.invoke("email-verification-request",{body:{email:u.data,resend:l}});if(x){const w=await fe(x);throw new Error((w==null?void 0:w.error)||x.message||"send_failed")}if(y!=null&&y.error)throw new Error(y.error);Ee(u.data),E("otp"),P(""),Tt(Date.now()+6e4)}catch(y){const x=(y==null?void 0:y.message)||"";/email_is_personal/i.test(x)?(E("email"),P(""),C(s("add_account.email_is_personal","This email is already used for your personal account. Use a different email for the workspace."))):/email_reused_in_hub|email_already_in_hub/i.test(x)?(E("email"),P(""),C(s("add_account.email_already_in_hub","This email is already linked to one of your accounts. Switch to it from the account menu."))):/rate.?limit|too many/i.test(x)?C(s("add_account.rate_limited","Too many requests. Please wait a moment.")):C(s("add_account.send_failed","Could not send the code. Please try again."))}finally{F(!1)}},Et=async l=>{var w;const u=((w=l.split("@")[1])==null?void 0:w.toLowerCase())??"";if(!u)return[];const{data:y,error:x}=await D.rpc("find_orgs_by_domain",{_domain:u,_for_email:l});return x?(console.error("find_orgs_by_domain failed",x),[]):y??[]},st=l=>{const u=l==null?void 0:l.payload,y=(u==null?void 0:u.error)||(l==null?void 0:l.message)||"";return y==="domain_has_orgs"?(ue((u==null?void 0:u.matches)??[]),Ve(!0),E("matches"),!0):y==="plan_limit_reached"?(Ke({plan:(u==null?void 0:u.plan)??"free",current:(u==null?void 0:u.current)??0,limit:(u==null?void 0:u.limit)??1}),E("limit"),!0):!1},It=async l=>{var u;C(null),F(!0);
6try{if(q==="create_personal"){try{await Le($,l,"personal")}catch(O){if(/email_in_use/i.test((O==null?void 0:O.message)||"")){Pe(l),E("merge_offer"),P(""),F(!1);return}throw O}return}if(q==="create"){try{await Le($,l,"business")}catch(O){if(Pe(l),st(O))return;if(/email_in_use/i.test((O==null?void 0:O.message)||"")){E("merge_offer"),P(""),F(!1);return}throw O}return}const y=await Et($),{data:x,error:w}=await D.functions.invoke("email-verification-confirm",{body:{email:$,code:l}});if(w){const O=await fe(w);throw new Error((O==null?void 0:O.error)||w.message||"code_invalid")}if(x!=null&&x.error)throw new Error(x.error);const{data:L}=await D.auth.getSession(),z=await Ot($);if(!!(z!=null&&z.user_id)&&z.user_id!==((u=L.session)==null?void 0:u.user.id)){Pe(l),ue(y),E("merge_offer"),P(""),F(!1);return}ue(y),Ve(!1),E("matches")}catch(y){const x=(y==null?void 0:y.message)||"";/expired/i.test(x)||/code_expired/i.test(x)?C(s("add_account.code_expired","Code expired. Please request a new one.")):/attempt/i.test(x)||/too_many/i.test(x)?C(s("add_account.too_many_attempts","Too many attempts. Request a new code.")):/email_reused_in_hub|email_already_in_hub/i.test(x)?(E("email"),C(s("add_account.email_already_in_hub","This email is already linked to one of your accounts. Switch to it from the account menu."))):/personal_already_exists/i.test(x)?C(s("add_account.personal_already_exists","Your hub already has a personal account.")):C(s("add_account.code_invalid","Invalid code. Please try again.")),P("")}finally{F(!1)}},Rt=async()=>{if(!ae||ae.length!==6){C(s("add_account.merge_failed","Could not link the account. Please try again."));return}await Zt(ae)},Zt=async l=>{C(null),F(!0),E("merging");try{const{data:u,error:y}=await D.functions.invoke("merge-account-confirm",{body:{email:$,code:l}});if(y){const L=await fe(y);throw new Error((L==null?void 0:L.error)||y.message||"merge_failed")}if(u!=null&&u.error)throw new Error(u.error);try{await a()}catch{}const x=(u==null?void 0:u.result)??{},w=Array.isArray(x.linked_org_ids)?x.linked_org_ids.filter(Boolean):[];w[0]&&(localStorage.setItem("active_org_id",w[0]),localStorage.setItem("active_account_kind","org"),localStorage.removeItem("active_profile_id")),await t(),et(!1),window.location.assign("/")}catch(u){const y=(u==null?void 0:u.message)||"";/expired/i.test(y)?C(s("add_account.code_expired","Code expired. Please request a new one.")):/too_many/i.test(y)?C(s("add_account.too_many_attempts","Too many attempts. Request a new code.")):/source_not_found/i.test(y)?C(s("add_account.merge_source_not_found","We couldn't find that account anymore.")):/otp_required/i.test(y)?C(s("add_account.code_invalid","Invalid code. Please try again.")):/source_account_not_transferable/i.test(y)?C(s("add_account.merge_not_transferable","This account can't be moved automatically. Please contact support.")):/merge_blocked_by_security_guard|user_id cannot be changed|created_by cannot be changed/i.test(y)?C(s("add_account.merge_blocked_by_security_guard","We couldn't link the account because a security rule blocked the ownership change. Please try again.")):C(s("add_account.merge_failed","Could not link the account. Please try again.")),E("merge_offer"),P("")}finally{F(!1)}},Mt=async()=>{F(!0),C(null);const l=xe.current||ae||Ye;if(!/^\d{6}$/.test(l)){E("otp"),P(""),C(s("add_account.code_invalid","Invalid code. Please try again.")),F(!1);return}try{await Le($,l,"business",{force_new_org:!0})}catch(u){if(st(u))return;if(/email_reused_in_hub|email_already_in_hub/i.test((u==null?void 0:u.message)||"")){E("email"),C(s("add_account.email_already_in_hub","This email is already linked to one of your accounts. Switch to it from the account menu.")),P("");return}C(s("add_account.code_invalid","Invalid code. Please try again.")),F(!1)}},Vt=async l=>{var u,y,x;Me(l.id),C(null);try{const w=await tt($);if(w){E("email"),P(""),C(w==="personal"?s("add_account.email_is_personal","This email is already used for your personal account. Use a different email for the workspace."):s("add_account.email_already_in_hub","This email is already linked to one of your accounts. Switch to it from the account menu."));return}const{data:{session:L}}=await D.auth.getSession();let z=!1;if(L){const{data:I}=await D.from("profiles").select("name, surname, headline").eq("user_id",L.user.id).eq("profile_type","personal").maybeSingle();z=!!((u=I==null?void 0:I.name)!=null&&u.trim())&&!!((y=I==null?void 0:I.surname)!=null&&y.trim())&&!!((x=I==null?void 0:I.headline)!=null&&x.trim())}if(!z&&l.slug){V(!1),e(`/join/${l.slug}/complete-profile`);return}const{data:A,error:O}=await D.functions.invoke("request-org-access",{body:{org_id:l.id,email:$}});if(O){const I=await fe(O);throw new Error((I==null?void 0:I.error)||O.message||"request_failed")}if(A!=null&&A.error)throw new Error(A.error);const M=(A==null?void 0:A.status)??"pending";if(M==="joined"||M==="already_member")Fe.success(s("add_account.joined_toast","Joined {{name}}",{name:l.name})),V(!1),window.setTimeout(()=>{window.location.href="/"},300);else{if(M==="email_already_member")throw new Error("email_already_member");ue(I=>I.map(Y=>Y.id===l.id?{...Y,pending_request:!0}:Y)),Fe.success(s("add_account.request_sent_toast","Request sent to {{name}} admins",{name:l.name}))}
6M==="pending"&&l.slug&&(V(!1),e(`/join/${l.slug}/pending?email=${encodeURIComponent($)}`))}catch(w){console.error(w);const L=(w==null?void 0:w.message)||"";Fe.error(/email_already_member/i.test(L)?s("add_account.email_already_member","That email is already a member of this workspace. Sign in with that account or link it first."):s("add_account.request_failed","Could not send request. Try again."))}finally{Me(null)}},$t=()=>{Oe("create"),Mt()},Lt=l=>{P(l),C(null),l.length===6&&!K&&It(l)};return c.jsx(Wt,{open:Z,onOpenChange:et,children:c.jsx(Ht,{hideCloseButton:N==="choose",className:"w-[calc(100vw-32px)] sm:max-w-[460px] max-h-[calc(100dvh-32px)] p-0 overflow-hidden focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0",children:c.jsxs("div",{className:`max-h-[calc(100dvh-32px)] overflow-y-auto overscroll-contain px-[28px] pb-[28px] ${N==="email"||N==="otp"?"pt-[40px]":"pt-[28px]"}`,children:[N==="choose"&&c.jsx(Zs,{onPick:At,canCreatePersonal:m}),N==="email"&&c.jsx(Vs,{intent:q==="create_personal"?"create_personal":q,email:$,setEmail:Ee,error:Re,loading:K,onSubmit:()=>void De(!1)}),N==="otp"&&c.jsx($s,{email:$,code:Ye,onChange:Lt,error:Re,loading:K,resendIn:Ge,onResend:()=>void De(!0)}),N==="matches"&&c.jsx(Ds,{email:$,matches:Ze,actingOrgId:St,onAction:Vt,onCreateNew:$t}),N==="limit"&&be&&c.jsx(Ps,{planInfo:be,onUpgrade:()=>{V(!1),window.setTimeout(()=>e("/settings?section=plans"),200)},onClose:()=>V(!1)}),N==="merge_offer"&&c.jsx(Fs,{email:$,error:Re}),N==="merging"&&c.jsx(zs,{}),N==="merge_done"&&c.jsx(Us,{onContinue:()=>{V(!1),window.location.reload()}}),N==="done"&&c.jsx(Ls,{intent:q==="create_personal"?"create":q}),(N==="email"||N==="otp"||N==="merge_offer")&&c.jsxs("div",{className:"mt-6 flex items-center justify-between gap-2",children:[c.jsx("button",{type:"button","aria-label":s("common.back","Back"),onClick:()=>{N==="otp"?(E("email"),P(""),C(null)):N==="email"?(E("choose"),C(null)):N==="merge_offer"&&(E("email"),xe.current="",Ie(""),C(null))},disabled:K,className:"btn-keep-disabled-style inline-flex h-9 w-9 items-center justify-center rounded-[6px] bg-card text-foreground transition-shadow hover:shadow-[0_0_0_1px_rgba(0,0,0,0.12)] disabled:bg-card disabled:text-foreground/30 disabled:hover:shadow-none",style:{cursor:K?"not-allowed":"pointer"},children:c.jsx(Qt,{className:"w-5 h-5"})}),N!=="otp"&&c.jsx("button",{type:"button",onClick:()=>{N==="email"?De(!1):N==="merge_offer"&&Rt()},disabled:K||N==="email"&&$.trim().length===0,className:Ae,style:{cursor:K?"wait":"pointer",minWidth:96},children:K?c.jsx(vt,{className:"w-4 h-4 animate-spin"}):N==="merge_offer"?s("add_account.merge_confirm_cta","Move to this account"):s("common.next","Next")})]})]})})})}function Zs({onPick:s,canCreatePersonal:e}){const{t}=H();return c.jsx("div",{children:c.jsxs("div",{className:"flex flex-col gap-[16px]",children:[e&&c.jsx(Ms,{title:t("add_account.create_personal_title","Create a personal account"),description:t("add_account.create_personal_desc","Use a separate email for your personal space. You can switch between it and your workspaces anytime."),icon:c.jsx(bt,{size:20,strokeWidth:1.75}),onClick:()=>s("create_personal")}),c.jsxs("div",{className:"grid grid-cols-2 gap-[12px]",children:[c.jsx(xt,{label:t("add_account.choose_new_short","New workspace"),icon:c.jsx(jt,{className:"w-[24px] h-[24px]"}),onClick:()=>s("create")}),c.jsx(xt,{label:t("add_account.choose_join_short","Join workspace"),icon:c.jsx(Nt,{className:"w-[24px] h-[24px]"}),onClick:()=>s("join")})]})]})})}function xt({label:s,icon:e,onClick:t}){return c.jsxs("button",{type:"button",onClick:t,className:"group relative flex flex-col items-center justify-center gap-[14px] rounded-[14px] bg-card px-4 py-[28px] transition-colors hover:bg-muted/60 cursor-pointer text-foreground hover:text-[#5D4AFF]",children:[c.jsx("span",{className:"inline-flex items-center justify-center text-foreground group-hover:text-[#5D4AFF] transition-colors",children:e}),c.jsx("span",{className:"text-[15px] font-semibold leading-none transition-colors",children:s})]})}function Ms({title:s,description:e,icon:t,onClick:r,comingSoon:n}){const{t:a}=H(),i=!!n;return c.jsxs("button",{type:"button",onClick:r,disabled:i,className:"group w-full min-w-0 text-left rounded-[14px] bg-card p-[14px] flex items-center gap-3 transition-all disabled:opacity-60 disabled:cursor-not-allowed",style:{boxShadow:"0 0 0 1px rgba(0,0,0,0.12)",cursor:i?"not-allowed":"pointer"},onMouseEnter:o=>{i||(o.currentTarget.style.boxShadow="0 0 0 1px rgba(0,0,0,0.32)")},onMouseLeave:o=>{o.currentTarget.style.boxShadow="0 0 0 1px rgba(0,0,0,0.12)"},children:[c.jsx("div",{className:"shrink-0 flex items-center justify-center",style:{width:40,height:34,borderRadius:12,backgroundColor:"#FFF4AE",color:"#0E1011"},children:t}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[c.jsx("p",{className:"min-w-0 text-[14px] font-semibold leading-tight text-foreground break-words",children:s}),n&&c.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide px-1.5 py-[2px] rounded-[6px]",style:{backgroundColor:"#F2F2F2",color:"#5D4AFF"},children:a("add_account.coming_soon","Soon")})]}),c.jsx("p",{className:"mt-[4px] text-[12px] leading-snug text-muted-foreground break-words",children:e})]}),!i&&c.jsx("span",{className:"shrink-0 inline-flex text-muted-foreground
6/50 -rotate-90",children:c.jsx(Kt,{className:"w-[20px] h-[20px]"})})]})}function Vs({intent:s,email:e,setEmail:t,error:r,loading:n,onSubmit:a}){const{t:i}=H(),o=s==="create"?i("add_account.create_email_title","What's your work email?"):s==="create_personal"?i("add_account.create_personal_email_title","What's your personal email?"):i("add_account.join_email_title","Enter your work email"),m=s==="create_personal"?i("add_account.create_personal_email_subtitle","Use a different email from your workspaces. We'll send a 6-digit code to confirm it's yours."):i("add_account.email_subtitle","We'll send a 6-digit code to confirm it's yours."),p=s==="create"?jt:s==="join"?Nt:bt;return c.jsxs("form",{onSubmit:f=>{f.preventDefault(),a()},children:[c.jsxs("div",{className:"flex flex-col items-center text-center",children:[c.jsx("div",{className:"flex items-center justify-center w-[64px] h-[64px] rounded-full mb-5",style:{backgroundColor:"#EFEAFF",color:me},children:c.jsx(p,{className:"w-7 h-7"})}),c.jsx("h2",{className:"text-[24px] font-semibold text-foreground leading-tight",children:o}),c.jsx("p",{className:"text-muted-foreground mt-2 text-[14px] max-w-[360px]",children:m})]}),c.jsxs("div",{className:"mt-6",children:[c.jsx("input",{type:"email",autoFocus:!0,autoComplete:"email",inputMode:"email",value:e,onChange:f=>t(f.target.value),placeholder:"[email protected]",className:"w-full h-9 px-3 rounded-[6px] bg-background text-[14px] text-foreground outline-none transition-all",style:{boxShadow:"0 0 0 1px rgba(0,0,0,0.12)"},onFocus:f=>f.currentTarget.style.boxShadow=`0 0 0 2px ${me}`,onBlur:f=>f.currentTarget.style.boxShadow="0 0 0 1px rgba(0,0,0,0.12)",maxLength:255}),r&&c.jsx("p",{className:"mt-2 text-[12px] text-center",style:{color:"#C0392B"},children:r})]}),c.jsx("button",{type:"submit",className:"hidden",tabIndex:-1,"aria-hidden":"true"})]})}function $s({email:s,code:e,onChange:t,error:r,loading:n,resendIn:a,onResend:i}){const{t:o}=H();return c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-col items-center text-center",children:[c.jsx("div",{className:"flex items-center justify-center w-[64px] h-[64px] rounded-full mb-5",style:{backgroundColor:"#EFEAFF",color:me},children:n?c.jsx(vt,{className:"w-7 h-7 animate-spin"}):c.jsx(Xt,{className:"w-7 h-7"})}),c.jsx("h2",{className:"text-[24px] font-semibold text-foreground leading-tight",children:o("add_account.otp_title","Check your email")}),c.jsx("p",{className:"text-muted-foreground mt-2 text-[14px]",children:o("add_account.otp_subtitle_to","We sent a 6 digit code to:")}),c.jsx("span",{className:"mt-2 inline-flex items-center rounded-full px-2.5 py-0.5 text-[12px] font-medium",style:{backgroundColor:"#EFEAFF",color:me},children:s})]}),c.jsx("div",{className:"mt-6 flex justify-center",children:c.jsx(Jt,{maxLength:6,value:e,onChange:m=>t(m.replace(/\D/g,"")),disabled:n,autoFocus:!0,containerClassName:"gap-0",inputMode:"numeric",pattern:"[0-9]*",children:c.jsx(Yt,{className:"gap-0",children:Array.from({length:6}).map((m,p)=>c.jsx(Gt,{index:p,className:"!h-[64px] !w-[64px] bg-card !rounded-none !border-0 first:!border-l-0 -ml-px first:ml-0 first:!rounded-l-[14px] last:!rounded-r-[14px] text-[18px] font-semibold !ring-0 !ring-offset-0 !transition-none shadow-[inset_0_0_0_1px_rgba(14,16,17,0.12)] [&.z-10]:shadow-[inset_0_0_0_2px_#5D4AFF] [&.z-10]:!ring-0 [&.z-10]:bg-card"},p))})})}),r&&c.jsx("p",{className:"mt-3 text-[12px] text-center",style:{color:"#C0392B"},children:r}),c.jsxs("div",{className:"mt-5 text-center text-[13px] text-muted-foreground",children:[a>0?c.jsxs("span",{children:[o("add_account.resend_in","You can resend the code in")," ",a,"s"]}):c.jsx("button",{type:"button",onClick:i,className:"font-semibold hover:underline cursor-pointer",style:{color:me},disabled:n,children:o("add_account.resend","Resend code")}),c.jsx("p",{className:"mt-2 text-[12px] text-muted-foreground/70",children:o("add_account.code_valid_short","Code valid for 10 min.")})]})]})}function Ls({intent:s}){const{t:e}=H();return c.jsxs("div",{className:"py-2",children:[c.jsx("h2",{className:"text-[20px] font-bold text-foreground leading-tight",children:e("add_account.verified_title","Email verified")}),c.jsx("p",{className:"text-muted-foreground mt-1 text-sm pt-[8px]",children:s==="create"?e("add_account.verified_create","Taking you to set up your new workspace…"):e("add_account.verified_join","All set. One moment…")})]})}function Ps({planInfo:s,onUpgrade:e,onClose:t}){const{t:r}=H();return c.jsxs("div",{className:"py-2",children:[c.jsx("h2",{className:"text-[20px] font-bold text-foreground leading-tight",children:r("add_account.plan_limit_title","You've reached your plan limit")}),c.jsx("p",{className:"text-muted-foreground mt-1 text-sm pt-[8px]",children:r("add_account.plan_limit_desc",{defaultValue:"Your current plan allows up to {{limit}} {{limit, plural, one {workspace} other {workspaces}}}. Upgrade to Pro for unlimited workspaces.",limit:s.limit,count:s.limit})}),c.jsxs("div",{className:"mt-5 flex gap-2",children:[c.jsx("button",{type:"button",onClick:t,className:`flex-1 ${Es}`,style:{cursor:"pointer"},children:r("common.cancel","Cancel")}),c.jsx("button",{type:"button",onClick:e,className:`flex-1 ${Ae}`,style:{cursor:"pointer"},children:r("add_account.upgrade_cta","Upgrade to Pro")})]})]})}function Ds({email:s,matches:e,actingOrgId:t,onAction:r,onCreateNew:n}){const{t:a}=H(),i=s.split("@")[1]??"";return e.length===0?c.jsxs("div",{className:"py-2",children:[c.jsx("h2",{className:"text-[20px] font-bold text-foreground leading-tight",children:a("add_account.no_matches_title","No workspaces found")}),c.jsx("p",{className:"text-muted-foreground mt-1 text-sm pt-[8px]",children:a("add_account.no_matches_desc","We couldn't find a workspace using {{domain}}. Want to create one?",{domain:i})}),c.jsx("button",{type:"button",onClick:n,className:`mt-5 w-full ${Ae}`,style:{cursor:"pointer"},children:a("add_account.create_new_workspace","Create a new workspace")})]}):c.jsxs("div",{children:[c.jsx("h2",{className:"text-[20px] font-bold text-foreground leading-tight",children:a("add_account.matches_title","Workspaces for {{domain}}",{domain:i})}),c.jsx("p",{className:"text-muted-foreground mt-1 text-sm pt-[8px]",children:a("add_account.matches_desc","Pick a workspace to join or request access.")}),c.jsx("div",{className:"mt-5 flex flex-col gap-[16px] px-[2px] py-[2px] -mx-[2px]",children:e.map(o=>{var N;const m=t===o.id,p=o.join_policy==="auto",f=o.join_policy==="closed";
6let Z,V=m;return o.already_member?(Z=a("add_account.already_member","Joined"),V=!0):o.pending_request?(Z=a("add_account.pending","Pending"),V=!0):f?(Z=a("add_account.not_accepting_requests","Not accepting requests"),V=!0):p?Z=m?a("add_account.joining","Joining…"):a("add_account.join","Join"):Z=m?a("add_account.requesting","Requesting…"):a("add_account.request_access","Request access"),c.jsxs("div",{className:"w-full text-left rounded-[14px] bg-card p-[12px] flex items-center gap-3",style:{boxShadow:"0 0 0 1px rgba(0,0,0,0.12)"},children:[c.jsxs("div",{className:"relative shrink-0 flex items-center justify-center text-[12px] font-bold text-foreground overflow-hidden rounded-full",style:{width:40,height:30,borderRadius:9999,backgroundColor:o.brand_color||"#FFF4AE"},children:[o.avatar_url?c.jsx("img",{src:o.avatar_url,alt:"",className:"w-full h-full object-cover"}):(N=o.name)!=null&&N[0]?o.name[0].toUpperCase():null,c.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{borderRadius:9999,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.12)"}})]}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-[14px] font-semibold text-foreground truncate",children:o.name}),c.jsx("p",{className:"text-[12px] text-muted-foreground truncate",children:a("add_account.member_count",{defaultValue:"{{count}} members",count:Number(o.member_count)||0})})]}),c.jsx("button",{type:"button",onClick:()=>r(o),disabled:V,className:`h-8 px-3 rounded-[6px] text-[12px] font-semibold transition-opacity disabled:opacity-60 ${o.already_member||o.pending_request?"text-foreground":"bg-primary text-primary-foreground shadow-[inset_0_-1px_0_0_var(--ring-soft)]"}`,style:{backgroundColor:o.already_member||o.pending_request?"#F2F2F2":void 0,cursor:V?"not-allowed":"pointer"},children:Z})]},o.id)})}),c.jsx("button",{type:"button",onClick:n,className:`mt-4 w-full ${As}`,style:{...Os,cursor:"pointer"},children:a("add_account.create_instead","Create a new workspace instead")})]})}function Fs({email:s,error:e}){const{t}=H();return c.jsxs("div",{children:[c.jsx("h2",{className:"text-[20px] font-semibold text-foreground leading-tight",children:t("add_account.merge_offer_title","This account is already in use")}),c.jsx("p",{className:"text-muted-foreground mt-2 text-sm pt-[6px]",children:t("add_account.merge_offer_desc","You verified {{email}} with OTP. You can move that workspace identity into your current personal account.",{email:s})}),c.jsx("div",{className:"mt-4 p-3 rounded-[10px] text-[12px] text-foreground",style:{backgroundColor:"#FFF4AE"},children:t("add_account.merge_warning","After moving it, the workspace owned by this email will be accessible from your current account.")}),e&&c.jsx("p",{className:"mt-3 text-[12px]",style:{color:"#C0392B"},children:e})]})}function zs(){const{t:s}=H(),e=[s("add_account.merge_step_boards","Transferring boards…"),s("add_account.merge_step_links","Transferring links…"),s("add_account.merge_step_orgs","Linking organizations…"),s("add_account.merge_step_finalizing","Finalizing…")],[t,r]=j.useState(0);return j.useEffect(()=>{const n=window.setInterval(()=>{r(a=>a+1<e.length?a+1:a)},900);return()=>window.clearInterval(n)},[]),c.jsxs("div",{className:"py-6 flex flex-col items-center text-center",children:[c.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-foreground
6/15 border-t-foreground animate-spin","aria-hidden":"true"}),c.jsx("h2",{className:"text-[18px] font-bold text-foreground leading-tight mt-5",children:s("add_account.merging_title","Linking account")}),c.jsx("p",{className:"text-muted-foreground mt-2 text-sm pt-[6px] min-h-[18px]",children:e[t]}),c.jsx("p",{className:"text-[11px] text-muted-foreground/70 mt-3",children:s("add_account.merging_hint","This usually takes a few seconds. Please don't close this window.")})]})}function Us({onContinue:s}){const{t:e}=H();return c.jsxs("div",{className:"py-2",children:[c.jsx("h2",{className:"text-[20px] font-bold text-foreground leading-tight",children:e("add_account.merge_done_title","Account linked")}),c.jsx("p",{className:"text-muted-foreground mt-2 text-sm pt-[6px]",children:e("add_account.merge_done_desc","The email and its workspaces are now linked to your current account.")}),c.jsx("button",{type:"button",onClick:s,className:`mt-5 w-full ${Ae}`,style:{cursor:"pointer"},children:e("add_account.merge_done_cta","Go to my linked workspace")})]})}export{Ys as default};

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.