@authowl/core 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import {p,o,i,z as z$1,s,q as q$1,y,r,w as w$1,B,E as E$1,x,t,A,v as v$1,u}from'./chunk-V3MSLXXB.js';import {a}from'./chunk-T5SH3ZZP.js';function qi(e){let t=e?.enabledMethods??["password"],n=t.includes("password"),i=t.includes("passkey"),o=e?.authentication,a=e?.mfa;return {emailSignUp:o?.email.signUp??t.some(p=>p==="password"||p==="magic_link"||p==="email_otp"),passwordSignUp:o?.password.signUp??n,phoneSignUp:o?.phone.signUp??t.includes("phone_otp"),passwordSignIn:o?.email.signIn.includes("password")??n,passwordMinLength:o?.password.minLength??8,passwordMaxLength:o?.password.maxLength??128,magicLinkSignIn:o?.email.signIn.includes("magic_link")??t.includes("magic_link"),emailOtpSignIn:o?.email.signIn.includes("email_otp")??t.includes("email_otp"),phoneSignIn:o?.phone.signIn??t.includes("phone_otp"),usernameSignIn:o?.username.signIn??false,collectUsername:o?.username.collectOnSignUp??false,passkeySignIn:o?.passkey.signIn??i,passkeyAdd:o?.passkey.add??i,firstLastName:e?.userModel?.firstLastName??false,emailChange:e===null?false:e.userModel?.emailChange??true,accountDeletion:e?.userModel?.accountDeletion??e?.accountDeletion??false,emailVerificationRequired:e?.emailVerification?.required??e?.requireEmailVerification??false,emailVerificationMethod:e?.emailVerification?.method??"link",totp:a?.totp??e?.twoFactor??false,mfaRequired:a?.required??e?.mfaRequired??false,backupCodes:a?.backupCodes??e?.twoFactor??false,legacyNameField:e?.authentication===void 0}}var de=class extends Error{status;requestId;constructor(t,n,i){super(`${t} request failed with status ${n.status}.`),this.name="AuthOwlHttpError",this.status=n.status,this.requestId=i;}};function te(e,t,n={}){let i=new Headers(n.init?.headers);return i.set("x-publishable-key",e.publishableKey),p({fetchImpl:e.fetch,url:t,init:{...n.init,headers:i},allowHttpLoopback:e.decoded.env==="test",...n.timeoutMs===void 0?{}:{timeoutMs:n.timeoutMs},...n.maxResponseBytes===void 0?{}:{maxResponseBytes:n.maxResponseBytes},...n.decode===void 0?{}:{decode:n.decode}})}function Le(e,t){if(!e.response.ok)throw new de(t,e.response,e.requestId);return e.data}var L=new Map,yn=/^[a-z]{2}$/;function Bi(e,t){if(typeof window>"u")return ()=>{};if(t===null)return L.delete(e),()=>{};let n=t.trim().toLowerCase();if(!yn.test(n))return ()=>{};let i=Symbol(e),o=L.get(e)??[];return o.push({token:i,locale:n}),L.set(e,o),()=>{let a=L.get(e);if(!a)return;let p=a.filter(m=>m.token!==i);p.length===0?L.delete(e):L.set(e,p);}}function Fe(e){return typeof window>"u"?null:L.get(e)?.at(-1)?.locale??null}var On="x-authowl-turnstile-token",bn="x-authowl-locale",wn=1e4,kn=32,Rn=2e4;function F(e,t){return {post:(n,i,o,a)=>e.request(n,{method:"POST",body:i,fetchOptions:o,decode:a}),mutation:async(n,i)=>{let o=await n;return o.error===null&&(i===void 0||o.data!==null&&i(o.data))&&t(),o}}}function fe(e,t=e.projectBaseURL){return {async request(n,i$1={}){let o$1=Tn(t,n,i$1.query),a=i$1.method??(i$1.body===void 0?"GET":"POST"),p=new Headers(i$1.fetchOptions?.headers);i$1.fetchOptions?.authChallengeToken&&p.set(On,i$1.fetchOptions.authChallengeToken);let m=Fe(e.decoded.projectId);m&&p.set(bn,m),i$1.body!==void 0&&p.set("content-type","application/json");let d={method:a,headers:p,credentials:i$1.credentials??"include",...i$1.body===void 0?{}:{body:JSON.stringify(i$1.body)}},h=Object.freeze({method:a,path:n});await i$1.fetchOptions?.onRequest?.(h);let r=In(a,i$1.fetchOptions),s;try{s=await Sn(e,o$1,{...d,signal:i$1.fetchOptions?.signal},r);}catch(b){let P=He(b);return await i$1.fetchOptions?.onError?.(le(h,P,zn(b))),{data:null,error:P}}let{response:g,requestId:y}=s,u=Dn(n,s.data),l=u;if(g.ok)try{l=ge(u),i$1.decode&&(l=i$1.decode(l));}catch{let b=He(new o("invalid_response",y));return await i$1.fetchOptions?.onError?.(le(h,b,"invalid_response")),{data:null,error:b}}let A=Object.freeze({...h,status:g.status,...y===void 0?{}:{requestId:y}});if(await i$1.fetchOptions?.onResponse?.(A),!g.ok){let b=vn(g,u,y);return b.code===i&&e.session.tokens.dropChallenge(),await i$1.fetchOptions?.onError?.(le(h,b,"api")),{data:null,error:b}}return await i$1.fetchOptions?.onSuccess?.(A),{data:l,error:null}}}}async function Sn(e,t,n,i){let o$1=Date.now()+wn;for(let a=0;a<i;a+=1){let p=o$1-Date.now();if(p<=0)throw new o("timeout");try{let m=await te(e,t,{init:n,timeoutMs:Math.max(1,Math.ceil(p))});if(m.response.status<500||a===i-1)return m}catch(m){if(a===i-1||!(m instanceof o)||m.kind!=="network")throw m}await Cn(50*2**a,n.signal,o$1);}throw new o("network")}function In(e,t){if(e!=="GET"||t?.authChallengeToken)return 1;let n=t?.retry;return typeof n!="number"||!Number.isFinite(n)?1:Math.min(Math.max(Math.trunc(n),0),3)+1}function Tn(e,t,n){let i=new URL(`${e}${t.startsWith("/")?t:`/${t}`}`);for(let[o,a]of Object.entries(n??{}))a!==void 0&&i.searchParams.set(o,String(a));return i.toString()}function vn(e,t,n){let i=j(t)?t:{},o=Pn(i,e.headers);return {status:e.status,statusText:e.statusText,code:typeof i.code=="string"?i.code:void 0,...n===void 0?{}:{requestId:n},...typeof i.current_version=="number"?{currentVersion:i.current_version}:{},...o!==void 0?{retryAfterSeconds:o}:{},message:typeof i.message=="string"?i.message:typeof i.error=="string"?i.error:typeof i.detail=="string"?i.detail:e.statusText||"Request failed"}}function Pn(e,t){let n=(typeof e.retryAfterSeconds=="number"&&Number.isFinite(e.retryAfterSeconds)?e.retryAfterSeconds:void 0)??qe(t.get("retry-after"))??qe(t.get("x-retry-after"));if(n!==void 0)return Math.min(Math.max(Math.trunc(n),1),86400)}function qe(e){if(!e)return;let t=e.trim();if(!/^\d+$/.test(t))return;let n=Number(t);return Number.isFinite(n)?n:void 0}function He(e){let t=e instanceof o?e.kind:"network";return {status:0,...{aborted:{statusText:"ABORTED",code:"REQUEST_ABORTED",message:"The request was cancelled."},timeout:{statusText:"TIMEOUT",code:"REQUEST_TIMEOUT",message:"The request timed out."},response_too_large:{statusText:"INVALID_RESPONSE",code:"RESPONSE_TOO_LARGE",message:"The service response was too large."},invalid_response:{statusText:"INVALID_RESPONSE",code:"INVALID_RESPONSE",message:"The service returned an invalid response."},network:{statusText:"FETCH_ERROR",code:"FETCH_ERROR",message:"Network request failed."}}[t],...e instanceof o&&e.requestId?{requestId:e.requestId}:{}}}function le(e,t,n){return Object.freeze({...e,status:t.status??0,...t.requestId===void 0?{}:{requestId:t.requestId},failure:n})}function zn(e){return e instanceof o?e.kind:"network"}function Cn(e,t,n){return new Promise((i,o$1)=>{if(t?.aborted){o$1(new o("aborted"));return}let a=n-Date.now();if(a<=0){o$1(new o("timeout"));return}let p=Math.min(e,a),m=()=>{clearTimeout(d),o$1(new o("aborted"));},d=setTimeout(()=>{t?.removeEventListener("abort",m),Date.now()>=n?o$1(new o("timeout")):i();},p);t?.addEventListener("abort",m,{once:true}),t?.aborted&&m();})}function ge(e,t="",n=0,i={nodes:0}){if(i.nodes+=1,n>kn||i.nodes>Rn)throw new Error("response traversal limit exceeded");if(typeof e=="string"&&/^(?:createdAt|updatedAt|expiresAt)$/.test(t)){let o=new Date(e);return Number.isNaN(o.getTime())?e:o}return Array.isArray(e)?e.map(o=>ge(o,"",n+1,i)):j(e)?Object.fromEntries(Object.entries(e).map(([o,a])=>[o,xn(o)?a:ge(a,o,n+1,i)])):e}function xn(e){return e==="metadata"||e==="public_metadata"||e==="unsafe_metadata"||e==="private_metadata"||e==="publicMetadata"||e==="unsafeMetadata"||e==="privateMetadata"}function Dn(e,t){if(e==="/list-sessions"&&Array.isArray(t))return t.map(o=>j(o)?pe(o):o);if(!j(t))return t;let i=e==="/change-password"||e==="/passkey/verify-authentication"||e==="/phone-otp/verify"||e==="/sign-up/email"||e.startsWith("/sign-in/")||e.startsWith("/two-factor/verify-")?pe(t):t;return e==="/sign-up/email"&&!("sessionCreated"in i)&&(i={...i,sessionCreated:typeof t.token=="string"&&t.token.length>0}),(e==="/get-session"||e==="/passkey/verify-authentication")&&j(i.session)&&(i={...i,session:pe(i.session)}),i}function pe(e){if(!Object.hasOwn(e,"token"))return e;let t={...e};return delete t.token,t}function j(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Ve(){let e=globalThis.crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function Ke({http:e,probe:t,tokens:n,channelName:i}){let o=new Set,a=null,p=null,m=null,d=null,h=null,r=null,s,g=O=>{l(O);};s={data:null,isPending:true,isRefetching:false,error:null,refetch:g};function y(O){s=O;for(let S of o)S();}async function u(O){return e.request("/get-session",{query:O?.query,decode:me})}function l(O){if(O?.query?.disableCookieCache===true)return b(O);if(d)return d;if(h)return h;let S=b(O).finally(()=>{h===S&&(h=null);});return h=S,S}function A(){if(d)return d;let O=b({query:{disableCookieCache:true}}).finally(()=>{d===O&&(d=null);});return d=O,O}async function b(O){m?.abort();let S=new AbortController;m=S,y({...s,isPending:s.data===null&&s.error===null,isRefetching:s.data!==null});let B=n.beginRead(),Q=await e.request("/get-session",{query:O?.query,fetchOptions:{signal:S.signal},decode:me});if(m===S&&(m=null,y({data:Q.data,error:Q.error,isPending:false,isRefetching:false,refetch:g}),Q.error===null)){if(Q.data===null){B.endIfDead();return}await P(B);}}async function P(O){if(n.needsProbe()){if(!O.carriedToken){O.recordCookieVerdict(true);return}return r||xe(O)}}function xe(O){let S=t.request("/get-session",{query:{disableCookieCache:true},decode:me}).then(B=>{r===S&&B.error===null&&O.recordCookieVerdict(B.data!==null);}).finally(()=>{r===S&&(r=null);});return r=S,S}function De(){a?.postMessage({type:"session-changed"});}function hn(){if(typeof window>"u"||p)return;let O=()=>{l();},S=()=>{document.visibilityState==="visible"&&l();};window.addEventListener("focus",O),document.addEventListener("visibilitychange",S),typeof BroadcastChannel<"u"&&(a=new BroadcastChannel(i),a.addEventListener("message",O)),p=()=>{window.removeEventListener("focus",O),document.removeEventListener("visibilitychange",S),a?.close(),a=null,p=null;};}function An(O){return o.add(O),o.size===1&&(hn(),l()),()=>{if(o.delete(O),o.size===0){let S=m;m=null,h=null,d=null,S?.abort(),p?.();}}}return n.measureWith(()=>{n.needsProbe()&&xe(n.beginRead());}),{store:{subscribe:An,getSnapshot:()=>s,refresh:A},getSession:u,notifyMutation(){De(),r&&r.catch(()=>{}).then(()=>{!n.needsProbe()&&n.hasToken()&&De();}),o.size>0&&l({query:{disableCookieCache:true}});}}}function me(e){if(e===null)return null;let t=q$1(e);return (t.session===void 0||t.user===void 0)&&y(),{session:x(t.session),user:w$1(t.user)}}async function Be(e,t){return e.request("/user/metadata",{fetchOptions:t,decode:Ge})}async function je(e,t,n){return e.request("/user/metadata",{method:"PATCH",body:{expected_version:t.expectedVersion,unsafe_metadata:t.unsafeMetadata},fetchOptions:n,decode:Ge})}function Ge(e){let t=q$1(e),n=z$1(t.public_metadata),i=z$1(t.unsafe_metadata);if(!Number.isSafeInteger(t.metadata_version)||t.metadata_version<0)throw new TypeError("Invalid AuthOwl metadata response");return {publicMetadata:n,unsafeMetadata:i,metadataVersion:t.metadata_version}}function We(e,t){let{post:n,mutation:i}=F(e,t);return {getMetadata:o=>Be(e,o),updateUnsafeMetadata:(o,a)=>je(e,o,a),updateProfile:(o,a)=>i(n("/update-user",o,a,G)),changeEmail:(o,a)=>i(n("/change-email",o,a,G)),changePassword:(o,a)=>i(n("/change-password",o,a,En)),listSessions:o=>e.request("/list-sessions",{fetchOptions:o,decode:Nn}),revokeSession:({sessionId:o},a)=>i(n("/revoke-session",{sessionId:o},a,G)),revokeOtherSessions:o=>i(n("/revoke-other-sessions",{},o,G)),listSocialAccounts:async o=>{let a=await e.request("/list-accounts",{fetchOptions:o,decode:Un});if(!a.data)return {data:null,error:a.error};let p=a.data.length>1;return {...a,data:a.data.filter(m=>m.providerId!=="credential").map(m=>({...m,canUnlink:p}))}},linkSocial:(o,a)=>n("/link-social",o,a,Mn),unlinkSocial:(o,a)=>i(n("/unlink-account",o,a,G)),delete:(o={},a)=>i(n("/delete-user",o,a,_n))}}function G(e){let t=q$1(e);return {status:s(t.status)}}function En(e){let t=q$1(e);return {user:w$1(t.user)}}function Nn(e){return Array.isArray(e)||y(),e.map(t$1=>{let n=q$1(t$1);return {id:r(n.id),userId:r(n.userId),createdAt:t(n.createdAt),updatedAt:t(n.updatedAt),expiresAt:t(n.expiresAt),...Je("ipAddress",v$1(n,"ipAddress")),...Je("userAgent",v$1(n,"userAgent"))}})}function Un(e){return Array.isArray(e)||y(),e.map(t$1=>{let n=q$1(t$1);return {id:r(n.id),userId:r(n.userId),providerId:r(n.providerId),accountId:r(n.accountId),scopes:u(n.scopes),createdAt:t(n.createdAt),updatedAt:t(n.updatedAt)}})}function Mn(e){let t=q$1(e);return {url:r(t.url),redirect:s(t.redirect)}}function _n(e){let t=q$1(e);return {success:s(t.success),message:r(t.message)}}function Je(e,t){return t===void 0?{}:{[e]:t}}var Ln=new Set(["pending","accepted","rejected","canceled"]),he=1e4;function Xe(e){let t=q$1(e);return t.recipientHint!==null&&t.recipientHint!=="new_user"&&y(),{recipientHint:t.recipientHint}}function q(e,t$1,n){let i=q$1(e),o={id:w(i.id),name:w(i.name),slug:w(i.slug),createdAt:t(i.createdAt),...J("logo",v$1(i,"logo")),...J("metadata",i.metadata===void 0?void 0:A(i.metadata))};return E(o.id,t$1),E(o.slug,n),o}function $e(e){return U(e,q)}function Ae(e,t,n){return e===null?null:(t===null&&y(),q(e,t,n))}function Ye(e,t,n){if(e===null)return null;let i=q$1(e),o=q(i,t,n);return {...o,members:U(i.members,a=>ct(a,o.id)),invitations:U(i.invitations,a=>M(a,void 0,o.id))}}function ye(e,t,n=false){let i=U(e,o=>W(o));return n||$(i.map(o=>o.organizationId),t),i}function Qe(e,t){let n=U(e,i=>Oe(i));return $(n.map(i=>i.teamId),t),n}function Oe(e,t$1,n){let i=q$1(e),o={id:w(i.id),teamId:w(i.teamId),userId:w(i.userId),createdAt:t(i.createdAt)};return E(o.teamId,t$1),E(o.userId,n),o}function Ze(e,t,n){return e===null?null:(t===null&&y(),W(e,t,n))}function et(e,t){let n=q$1(e);return (!Number.isSafeInteger(n.total)||n.total<0)&&y(),{members:Fn(n.members,t),total:n.total}}function M(e,t$1,n){let i=q$1(e),o=w(i.status);Ln.has(o)||y();let a={id:w(i.id),organizationId:w(i.organizationId),email:X(i.email),role:w(i.role),status:o,inviterId:w(i.inviterId),expiresAt:t(i.expiresAt),createdAt:t(i.createdAt)};return E(a.id,t$1),E(a.organizationId,n),a}function tt(e,t){let n=U(e,i=>M(i));return $(n.map(i=>i.organizationId),t),n}function nt(e){return U(e,t=>{let n=q$1(t);return {...M(n),organizationName:X(n.organizationName)}})}function it(e,t){let n=q$1(e);return {...M(n,t),organizationName:w(n.organizationName),organizationSlug:w(n.organizationSlug),inviterEmail:dt(n.inviterEmail)}}function ot(e,t){let n=q$1(e),i=M(n.invitation,t);return {invitation:i,member:H(n.member,void 0,i.organizationId)}}function rt(e,t){let n=q$1(e);return n.member!==null&&y(),{invitation:n.invitation===null?null:M(n.invitation,t),member:null}}function at(e,t){return e===null?null:M(e,t)}function st(e,t,n){let i=q$1(e);return {member:H(i.member,n,t)}}function H(e,t$1,n){let i=q$1(e),o={id:w(i.id),organizationId:w(i.organizationId),userId:w(i.userId),role:w(i.role),createdAt:t(i.createdAt),...i.user===void 0?{}:{user:lt(i.user)}};return E(o.id,t$1),E(o.organizationId,n),o}function ut(e,t){let n=U(e,i=>{let o=q$1(i);return {organizationId:w(o.organizationId),data:{role:w(o.role),...J("permission",o.permission===void 0?void 0:qn(o.permission)),...J("customPermissionKeys",o.customPermissionKeys===void 0?void 0:u(o.customPermissionKeys))}}});return $(n.map(i=>i.organizationId),t),n.map(i=>i.data)}function W(e,t$1,n){let i=q$1(e),o=i.updatedAt,a={id:w(i.id),name:X(i.name),organizationId:w(i.organizationId),createdAt:t(i.createdAt),...o===void 0?{}:{updatedAt:t(o)}};return E(a.id,t$1),E(a.organizationId,n),a}function be(e){let t=q$1(e);return {message:X(t.message)}}function ct(e,t){let n=q$1(e);return {...H(n,void 0,t),user:lt(n.user)}}function Fn(e,t){let n=U(e,i=>ct(i));return $(n.map(i=>i.organizationId),t),n}function qn(e){let t=q$1(e),n={};for(let[i,o]of Object.entries(t))(i==="__proto__"||i==="constructor"||i==="prototype"||i.length===0||i.length>he||!Array.isArray(o))&&y(),n[i]=o.map(a=>w(a));return n}function w(e){let t=r(e);return (t.length===0||t.length>he)&&y(),t}function X(e){if(e==null)return "";let t=r(e);return t.length>he&&y(),t}function dt(e){return e===null?null:w(e)}function E(e,t){t!==void 0&&e!==t&&y();}function $(e,t){let n=t??e[0];n!==void 0&&e.some(i=>i!==n)&&y();}function lt(e){let t=q$1(e);return {id:w(t.id),name:X(t.name),email:dt(t.email),...J("image",v$1(t,"image"))}}function U(e,t){return Array.isArray(e)||y(),e.map(n=>t(n))}function J(e,t){return t===void 0?{}:{[e]:t}}function pt(e,t,n=()=>null){let{post:i,mutation:o}=F(e,t),a=new Set,p=()=>{for(let r of a)try{r();}catch{}},m=new Map,d=(r,s,g,y)=>{if(g)return e.request(r,{query:s,fetchOptions:g,decode:y});let u=`${r}\0${JSON.stringify(s??null)}`,l=m.get(u);if(l)return l;let A=e.request(r,{query:s,decode:y}).finally(()=>{m.delete(u);});return m.set(u,A),A},h=async r=>{let s=await o(r).finally(()=>m.clear());return s.error===null&&p(),s};return {subscribe(r){return a.add(r),()=>a.delete(r)},create:(r,s)=>h(i("/organization/create",r,s,q)),list:r=>d("/organization/list",void 0,r,$e),get:(r={},s)=>d("/organization/get-full-organization",{organizationId:r.organizationId,organizationSlug:r.organizationSlug,membersLimit:r.membersLimit},s,g=>Ye(g,r.organizationId,r.organizationSlug)),setActive:(r,s)=>h(i("/organization/set-active",r,s,g=>Ae(g,r.organizationId,r.organizationSlug))),createTeam:(r,s)=>h(i("/organization/create-team",r,s,g=>W(g,void 0,r.organizationId))),listTeams:(r={},s)=>d("/organization/list-teams",{organizationId:r.organizationId},s,g=>ye(g,r.organizationId)),updateTeam:(r,s)=>h(i("/organization/update-team",r,s,g=>W(g,r.teamId,r.data.organizationId))),removeTeam:(r,s)=>h(i("/organization/remove-team",r,s,be)),listUserTeams:r=>d("/organization/list-user-teams",void 0,r,s=>ye(s,void 0,true)),listTeamMembers:(r={},s)=>d("/organization/list-team-members",{teamId:r.teamId},s,g=>Qe(g,r.teamId)),addTeamMember:(r,s)=>h(i("/organization/add-team-member",r,s,g=>Oe(g,r.teamId,r.userId))),removeTeamMember:(r,s)=>h(i("/organization/remove-team-member",r,s,be)),setActiveTeam:(r,s)=>h(i("/organization/set-active-team",r,s,g=>Ze(g,r.teamId))),update:(r,s)=>h(i("/organization/update",r,s,g=>Ae(g,r.organizationId))),delete:(r,s)=>h(i("/organization/delete",r,s,g=>q(g,r.organizationId))),listMembers:(r={},s)=>d("/organization/list-members",{organizationId:r.organizationId,organizationSlug:r.organizationSlug,limit:r.limit,offset:r.offset,sortBy:r.sortBy,sortDirection:r.sortDirection,filterField:r.filterField,filterValue:r.filterValue,filterOperator:r.filterOperator},s,g=>et(g,r.organizationId)),inviteMember:(r,s)=>h(i("/organization/invite-member",r,s,g=>M(g,void 0,r.organizationId))),listInvitations:(r={},s)=>d("/organization/list-invitations",{organizationId:r.organizationId},s,g=>tt(g,r.organizationId)),listUserInvitations:r=>d("/organization/list-user-invitations",void 0,r,nt),getInvitation:(r,s)=>d("/organization/get-invitation",{id:r.id},s,g=>it(g,r.id)),getInvitationRecipientHint:(r,s)=>d("/organization/invitation-recipient-hint",{invitationId:r.invitationId},s,Xe),acceptInvitation:(r,s)=>h(i("/organization/accept-invitation",r,s,g=>ot(g,r.invitationId))),rejectInvitation:(r,s)=>h(i("/organization/reject-invitation",r,s,g=>rt(g,r.invitationId))),cancelInvitation:(r,s)=>h(i("/organization/cancel-invitation",r,s,g=>at(g,r.invitationId))),removeMember:(r,s)=>h(i("/organization/remove-member",r,s,g=>st(g,r.organizationId,r.memberIdOrEmail.includes("@")?void 0:r.memberIdOrEmail))),updateMemberRole:(r,s)=>h(i("/organization/update-member-role",r,s,g=>H(g,r.memberId,r.organizationId))),leave:(r,s)=>h(i("/organization/leave",r,s,g=>H(g,void 0,r.organizationId))),listRoles:(r={},s)=>d("/organization/list-roles",{organizationId:r.organizationId},s,g=>ut(g,r.organizationId)),has:r=>E$1(n(),r),hasPermission:r=>B(n(),r.permission)}}var gt=4096,Hn=4096,Vn=100,Kn=256,Bn=16,jn=64,Gn=12;function ke(e){let t=q$1(e);return t.twoFactorRedirect===true?((t.user!==void 0||t.redirect!==void 0||t.url!==void 0)&&y(),{twoFactorRedirect:true,...t.twoFactorMethods===void 0?{}:{twoFactorMethods:xt(t.twoFactorMethods,Bn,jn)}}):(t.twoFactorRedirect!==void 0&&y(),{redirect:s(t.redirect),...Yn(t,"url"),user:w$1(t.user)})}function ft(e){let t=q$1(e);return {user:w$1(t.user)}}function mt(e){let t=q$1(e);return {sessionCreated:s(t.sessionCreated),user:w$1(t.user)}}function ht(e,t){let n=q$1(e),i=s(n.redirect);n.user===null&&y();let o=n.user!==void 0&&n.user!==null,a=n.url!==void 0&&n.url!==null;return i?((o||!a)&&y(),{redirect:true,url:we(n.url,t)}):(o===a&&y(),o?{redirect:false,user:w$1(n.user)}:{redirect:false,url:we(n.url,t)})}function At(e,t){let n=q$1(e);return (n.redirect!==true||n.user!==void 0)&&y(),{redirect:true,url:we(n.url,t)}}function yt(e){return {status:s(q$1(e).status)}}function Ot(e){return {success:s(q$1(e).success)}}function bt(e){return q$1(e).status!=="pending"&&y(),{status:"pending"}}function wt(e){let t=q$1(e);if(t.kind==="authowl_turnstile")return {kind:"authowl_turnstile"};t.kind!=="akedly_shield_v1_2"&&y();let n=q$1(t.turnstile),i=n.siteKey===null?null:r(n.siteKey);return {kind:"akedly_shield_v1_2",connectionId:r(t.connectionId),challenge:r(t.challenge),difficulty:Jn(t.difficulty),challengeToken:r(t.challengeToken),challengeRequired:s(t.challengeRequired),turnstile:{required:s(n.required),siteKey:i}}}function Jn(e){return (!Number.isSafeInteger(e)||Number(e)<0||Number(e)>Gn)&&y(),Number(e)}function kt(e){let t=q$1(e);return (t.status!==true||t.sessionCreated!==true)&&y(),{status:true,sessionCreated:true,user:Wn(t.user)}}function Re(e){return {status:s(q$1(e).status)}}function Rt(e){return {status:s(q$1(e).status)}}function St(e){let t=q$1(e);return {status:s(t.status),user:w$1(t.user)}}function It(e){return {success:s(q$1(e).success)}}function Tt(e){let t=q$1(e);return {totpURI:$n(t.totpURI),backupCodes:Ct(t.backupCodes)}}function vt(e){return {status:s(q$1(e).status)}}function ne(e){return q$1(e).status!==true&&y(),{status:true}}function Pt(e){return {status:s(q$1(e).status)}}function zt(e){let t=q$1(e);return t.status!==void 0&&t.status!==true&&y(),{backupCodes:Ct(t.backupCodes)}}function Wn(e){let t$1=q$1(e);return {id:V(t$1.id,512),...Qn(t$1,"name",1024),phoneNumber:V(t$1.phoneNumber,64),phoneNumberVerified:s(t$1.phoneNumberVerified),...t$1.createdAt===void 0?{}:{createdAt:t(t$1.createdAt)},...t$1.updatedAt===void 0?{}:{updatedAt:t(t$1.updatedAt)}}}function we(e,t){let n=V(e,gt);/[\u0000-\u0020\u007f]/u.test(n)&&y();let i;try{i=new URL(n);}catch{return y()}return (i.username||i.password)&&y(),i.protocol==="https:"||t&&i.protocol==="http:"&&Xn(i.hostname)?i.href:y()}function Xn(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"}function $n(e){let t=V(e,Hn),n;try{n=new URL(t);}catch{return y()}let i=n.searchParams.get("secret");return (n.protocol!=="otpauth:"||n.hostname.toLowerCase()!=="totp"||n.username||n.password||n.hash||i===null||i.length===0||i.length>512||/\s/u.test(i))&&y(),t}function Ct(e){return xt(e,Vn,Kn)}function xt(e,t,n){(!Array.isArray(e)||e.length===0||e.length>t)&&y();let i=e.map(o=>V(o,n));return i.some(o=>o.trim().length===0)&&y(),new Set(i).size!==i.length&&y(),i}function V(e,t){let n=r(e);return (n.length===0||n.length>t)&&y(),n}function Yn(e,t){let n=e[t];return n==null?{}:{[t]:V(n,gt)}}function Qn(e,t,n){let i=v$1(e,t);return i===void 0?{}:(i!==null&&i.length>n&&y(),{[t]:i})}var Dt=new Set([1564,8206,8207,8234,8235,8236,8237,8238,8294,8295,8296,8297]),ie=new Set([9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279]);function oe(e){if(e===void 0)return {valid:true,value:void 0};for(let n of e){let i=n.codePointAt(0);if(i===void 0||Nt(n,i)||Et(i)||Dt.has(i))return {valid:false}}let t=Zn(e);return Se(t)?{valid:true,value:t}:{valid:false}}function Se(e){let t=0,n,i;for(let o of e){if(t+=1,t>256)return false;let a=o.codePointAt(0);if(a===void 0||Nt(o,a)||Et(a)||Dt.has(a))return false;n??=a,i=a;}return t>0&&n!==void 0&&i!==void 0&&!ie.has(n)&&!ie.has(i)}function re(){return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:"INVALID_PASSKEY_NAME",message:"Passkey names must contain 1 to 256 safe Unicode characters."}}}function Zn(e){let t=0,n=e.length;for(;t<n;){let i=e.codePointAt(t);if(i===void 0||!ie.has(i))break;t+=i>65535?2:1;}for(;n>t;){let i=e.codePointAt(n-1);if(i===void 0)break;let a=i>=56320&&i<=57343?n-2:n-1,p=e.codePointAt(a);if(p===void 0||!ie.has(p))break;n=a;}return e.slice(t,n)}function Et(e){return e>=0&&e<=31||e>=127&&e<=159}function Nt(e,t){return e.length===1&&t>=55296&&t<=57343}var _t=12,Lt=5e3,ei=8,ti=1e3,ni=16,Ut=512,Ft=100,qt=8192,ii=32768,Ie=1024,Mt=256,ve=64,oi=6e5,ri=/^[A-Za-z0-9_-]+$/u,ai=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u,si=/[\u0000-\u001f\u007f-\u009f\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u,ui=/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$/u,ci=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu,Ht=new Set(["discouraged","preferred","required"]),di=new Set(["singleDevice","multiDevice"]),Vt=new Set(["ble","cable","hybrid","internal","nfc","smart-card","usb"]),Kt=new Set(["hybrid","security-key","client-device"]),li=new Set(["none","indirect","direct","enterprise"]),pi=new Set(["fido-u2f","packed","android-safetynet","android-key","tpm","apple","none"]),gi=new Set(["platform","cross-platform"]),fi=new Set(["discouraged","preferred","required"]),mi=new Set([-8,-7,-257]);function Bt(e){let t=z$1(e,_t,Lt);return {challenge:en(t.challenge),...T("timeout",Qt(t.timeout)),...T("rpId",tn(t.rpId)),...T("allowCredentials",Yt(t.allowCredentials)),...T("userVerification",Y(t.userVerification,Ht)),...T("hints",ae(t.hints,Kt)),...T("extensions",Zt(t.extensions))}}function jt(e){let t=z$1(e,_t,Lt);return {challenge:en(t.challenge),rp:hi(t.rp),user:Ai(t.user),pubKeyCredParams:yi(t.pubKeyCredParams),...T("timeout",Qt(t.timeout)),...T("excludeCredentials",Yt(t.excludeCredentials)),...T("authenticatorSelection",Oi(t.authenticatorSelection)),...T("attestation",Y(t.attestation,li)),...T("attestationFormats",ae(t.attestationFormats,pi)),...T("hints",ae(t.hints,Kt)),...T("extensions",Zt(t.extensions))}}function Gt(e){let t=q$1(e),n=x(t.session),i=w$1(t.user);return n.userId!==i.id&&y(),{session:n,user:i}}function Pe(e){let t$1=q$1(e),n=t$1.counter;(!Number.isSafeInteger(n)||n<0)&&y();let i=ze(t$1.deviceType,di),o=s(t$1.backedUp);return o&&i!=="multiDevice"&&y(),{id:K(t$1.id,Mt),...ki(t$1),publicKey:bi(t$1.publicKey,ii),userId:K(t$1.userId,Mt),credentialID:ue(t$1.credentialID,qt),counter:n,deviceType:i,backedUp:o,...Ri(t$1),createdAt:t(t$1.createdAt),...Si(t$1)}}function Jt(e,t,n){let i=Pe(e);return (i.credentialID!==t||(n===void 0?i.name!==void 0&&i.name!==null:i.name!==n))&&y(),i}function Wt(e){(!Array.isArray(e)||e.length>Ft)&&y();let t=e.map(Pe);return se(t.map(n=>n.id)),se(t.map(n=>n.credentialID)),t.length>1&&t.some(n=>n.userId!==t[0]?.userId)&&y(),t}function Xt(e,t,n){let i=q$1(e),o=Pe(i.passkey);return (o.id!==t||o.name!==n)&&y(),{passkey:o}}function $t(e){return q$1(e).status!==true&&y(),{status:true}}function hi(e){let t=q$1(e);return {name:Te(t.name,Ie),...T("id",tn(t.id))}}function Ai(e){let t=q$1(e);return {id:ue(t.id,128,1,64),name:Te(t.name,Ie),displayName:Te(t.displayName,Ie)}}function yi(e){(!Array.isArray(e)||e.length===0||e.length>ve)&&y();let t=e.map(n=>{let i=q$1(n);return (i.type!=="public-key"||!Number.isSafeInteger(i.alg)||!mi.has(i.alg))&&y(),{type:"public-key",alg:i.alg}});return Ii(t.map(n=>n.alg)),t}function Yt(e){if(e===void 0)return;(!Array.isArray(e)||e.length>Ft)&&y();let t=e.map(n=>{let i=q$1(n);return i.type!=="public-key"&&y(),{type:"public-key",id:ue(i.id,qt),...T("transports",ae(i.transports,Vt))}});return se(t.map(n=>n.id)),t}function Oi(e){if(e===void 0)return;let t=q$1(e);t.requireResidentKey!==void 0&&typeof t.requireResidentKey!="boolean"&&y();let n=Y(t.residentKey,fi);return t.requireResidentKey!==void 0&&n!==void 0&&t.requireResidentKey!==(n==="required")&&y(),{...T("authenticatorAttachment",Y(t.authenticatorAttachment,gi)),...T("residentKey",n),...T("requireResidentKey",t.requireResidentKey),...T("userVerification",Y(t.userVerification,Ht))}}function Qt(e){return e!==void 0&&(typeof e!="number"||!Number.isFinite(e)||e<0||e>oi)&&y(),e}function Zt(e){return e===void 0?void 0:z$1(e,ei,ti)}function ae(e,t){if(e===void 0)return;(!Array.isArray(e)||e.length>ve)&&y();let n=e.map(i=>ze(i,t));return se(n),n}function Y(e,t){if(e!==void 0)return ze(e,t)}function en(e){return ue(e,Math.ceil(Ut*4/3),ni,Ut)}function ue(e,t,n=1,i=Number.POSITIVE_INFINITY){let o=K(e,t),a=o.length%4,p=wi(o.at(-1)??""),m=Math.floor(o.length*3/4);return (!ri.test(o)||a===1||a===2&&(p&15)!==0||a===3&&(p&3)!==0||m<n||m>i)&&y(),o}function K(e,t){let n=r(e);return (n.length===0||n.length>t)&&y(),n}function Te(e,t){let n=K(e,t);return si.test(n)&&y(),n}function tn(e){if(e===void 0)return;let t=K(e,253);return t!=="localhost"&&(t.endsWith(".")||!t.includes(".")||t.split(".").some(n=>!ui.test(n)))&&y(),t}function bi(e,t){let n=K(e,t),i=n.endsWith("=="),o=!i&&n.endsWith("="),a=n.at(i?-3:o?-2:-1)??"",p=nn(a);return (n.length%4!==0||!ai.test(n)||i&&(p&15)!==0||o&&(p&3)!==0)&&y(),n}function wi(e){return nn(e,true)}function nn(e,t=false){return (t?"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").indexOf(e)}function ki(e){let t=v$1(e,"name");return t===void 0?{}:(t!==null&&!Se(t)&&y(),{name:t})}function Ri(e){let t=v$1(e,"transports");if(t==null||t==="")return t===void 0?{}:{transports:t};let n=t.split(",");return (n.length>ve||n.some(i=>!Vt.has(i))||new Set(n).size!==n.length)&&y(),{transports:t}}function Si(e){let t=v$1(e,"aaguid");return t==null?t===void 0?{}:{aaguid:null}:(ci.test(t)||y(),{aaguid:t})}function ze(e,t){let n=r(e);return t.has(n)||y(),n}function T(e,t){return t===void 0?{}:{[e]:t}}function se(e){new Set(e).size!==e.length&&y();}function Ii(e){new Set(e).size!==e.length&&y();}function Ti(e,t){if(!t)return e;let n=t.catch(()=>{});return n.then(()=>{n=null;}),{async request(i,o){return n&&await n,e.request(i,o)}}}var on=new Map;function vi(e,t,n){let i=on.get(n);if(!i){let o=new URLSearchParams(window.location.hash.slice(1)).get("authowl_code");if(!o)return;i=import('./session-handoff-6FBH3GFJ.js').then(a=>a.completeCrossSiteSignIn(e,t,o)),on.set(n,i);}return i}function rn(e){return !a()||e.idToken||e.disableRedirect?"legacy":"first-party"}function Pi(e,t=()=>{},n=xi){let i=fe(e),o=e.session.tokens,a$1=a()?vi(i,o,e.decoded.projectId):void 0,p=Ti(i,a$1),m=Ke({http:p,probe:fe({...e,fetch:e.session.probe}),tokens:o,channelName:`authowl:${e.decoded.projectId}`}),d=n(p,m.notifyMutation),h=()=>{m.notifyMutation(),t();},{post:r,mutation:s}=F(p,h),g=e.decoded.env==="test",y=u=>{o.beginSession({remember:u?.rememberMe!==false});};return {sessionStore:m.store,getSession:m.getSession,account:We(p,h),organization:pt(p,h,()=>m.store.getSnapshot().data?.session.membership??null),signIn:{email:(u,l)=>(y(u),s(r("/sign-in/email",u,l,ke),A=>!("twoFactorRedirect"in A))),username:(u,l)=>(y(u),s(r("/sign-in/username",u,l,ke),A=>!("twoFactorRedirect"in A))),social:async(u,l)=>{if(y(),rn(u)==="first-party"){let{beginCrossSiteSignIn:b}=await import('./session-handoff-6FBH3GFJ.js'),P=await b(e,{kind:"social",provider:u.provider,callbackURL:u.callbackURL,errorCallbackURL:u.errorCallbackURL,newUserCallbackURL:u.newUserCallbackURL,scopes:u.scopes,loginHint:u.loginHint,requestSignUp:u.requestSignUp});if(P)return window.location.assign(P),{data:{redirect:true,url:P},error:null}}let A=await s(r("/sign-in/social",u,l,b=>ht(b,g)),b=>"user"in b);return A.error!==null||A.data===null||"url"in A.data&&A.data.redirect&&!u.disableRedirect&&typeof window<"u"&&window.location.assign(A.data.url),A},sso:async(u,l)=>{if(rn(u)==="first-party"){let{beginCrossSiteSignIn:b}=await import('./session-handoff-6FBH3GFJ.js'),P=await b(e,{kind:"sso",email:u.email,providerId:u.providerId,domain:u.domain,organizationSlug:u.organizationSlug,callbackURL:u.callbackURL,errorCallbackURL:u.errorCallbackURL,newUserCallbackURL:u.newUserCallbackURL});if(P)return window.location.assign(P),{data:{url:P,redirect:true},error:null}}let A=await r("/sign-in/sso",u,l,b=>At(b,g));return A.error!==null||A.data===null||typeof window<"u"&&window.location.assign(A.data.url),A},magicLink:(u,l)=>r("/sign-in/magic-link",u,l,yt),emailOtp:(u,l)=>(y(),s(r("/sign-in/email-otp",u,l,ft))),passkey:(u,l)=>(y(),d.signIn(u,l))},signUp:{email:(u,l)=>(y(),s(r("/sign-up/email",u,l,mt),A=>A.sessionCreated))},emailOtp:{sendVerificationOtp:(u,l)=>r("/email-otp/send-verification-otp",u,l,Ot),verifyEmail:(u,l)=>(y(),s(r("/email-otp/verify-email",u,l,St)))},phoneOtp:{prepare:u=>r("/phone-otp/challenge",{},u,wt),start:(u,l)=>r("/phone-otp/start",{...u,idempotencyKey:u.idempotencyKey??Ve()},l,bt),verify:(u,l)=>(y(),s(r("/phone-otp/verify",u,l,kt)))},requestPasswordReset:(u,l)=>r("/request-password-reset",u,l,Re),resetPassword:(u,l)=>r("/reset-password",u,l,Re),sendVerificationEmail:(u,l)=>r("/send-verification-email",u,l,Rt),passkey:{addPasskey:(u,l)=>d.add(u,l),listUserPasskeys:()=>p.request("/passkey/list-user-passkeys",{decode:Wt}),updatePasskey:async(u,l)=>{let A=oe(u.name);if(!A.valid||A.value===void 0)return re();let b=A.value;return r("/passkey/update-passkey",{...u,name:b},l,P=>Xt(P,u.id,b))},deletePasskey:(u,l)=>r("/passkey/delete-passkey",u,l,$t)},twoFactor:{enable:(u,l)=>r("/two-factor/enable",u,l,Tt),disable:(u,l)=>s(r("/two-factor/disable",u,l,vt),A=>A.status),verifyTotp:(u,l)=>s(r("/two-factor/verify-totp",u,l,ne)),verifyBackupCode:(u,l)=>s(r("/two-factor/verify-backup-code",u,l,ne)),sendOtp:(u={},l)=>r("/two-factor/send-otp",u,l,Pt),verifyOtp:(u,l)=>s(r("/two-factor/verify-otp",u,l,ne)),generateBackupCodes:(u,l)=>r("/two-factor/generate-backup-codes",u,l,zt)},signOut:u=>s(p.request("/sign-out",{method:"POST",body:{},fetchOptions:u,decode:It}).then(l=>(o.endSession(),l)),l=>l.success)}}function Po(e,t=()=>{},n){let i=Pi(e,t,n);return n?{...i,signIn:{email:i.signIn.email,username:i.signIn.username,social:an(i),magicLink:i.signIn.magicLink,emailOtp:i.signIn.emailOtp,passkey:i.signIn.passkey},passkey:{listUserPasskeys:i.passkey.listUserPasskeys,updatePasskey:i.passkey.updatePasskey,deletePasskey:i.passkey.deletePasskey,addPasskey:i.passkey.addPasskey}}:{...i,signIn:{email:i.signIn.email,username:i.signIn.username,social:an(i),magicLink:i.signIn.magicLink,emailOtp:i.signIn.emailOtp},passkey:{listUserPasskeys:i.passkey.listUserPasskeys,updatePasskey:i.passkey.updatePasskey,deletePasskey:i.passkey.deletePasskey}}}function an(e){return async(t,n)=>{if(!t?.idToken||typeof t.idToken.token!="string"||t.idToken.token==="")return zi();let i=await e.signIn.social({...t,disableRedirect:true},n);return i.data!==null&&"url"in i.data?Ci():i}}function zi(){return Promise.resolve({data:null,error:{status:400,statusText:"BAD_REQUEST",code:"NATIVE_SOCIAL_ID_TOKEN_REQUIRED",message:"Native social sign-in requires a provider ID token."}})}function Ci(){return Promise.resolve({data:null,error:{status:502,statusText:"BAD_GATEWAY",code:"INVALID_NATIVE_SOCIAL_RESPONSE",message:"The server returned a redirect for native ID-token sign-in."}})}function xi(){return {signIn:()=>sn(),add:()=>sn()}}function sn(){return Promise.resolve({data:null,error:{status:400,statusText:"BAD_REQUEST",code:"PASSKEY_BROWSER_REQUIRED",message:"This passkey ceremony requires a browser with WebAuthn."}})}function Do(e,t,n){let i=new Map;return {async signIn(o={},a){let p=await e.request("/passkey/generate-authenticate-options");if(!p.data)return dn(p.error);let m;try{m=Bt(p.data);}catch{return un()}let d;try{d=await n.authenticate({optionsJSON:m,useBrowserAutofill:o.autoFill});}catch(y){return ln(n,y,"AUTH_CANCELLED","Passkey authentication was cancelled.")}if(!Di(d))return cn();let{clientExtensionResults:h,...r}=d,s=i.get(d.id);if(s)return s;let g=(async()=>{let y=await e.request("/passkey/verify-authentication",{method:"POST",body:{response:r},fetchOptions:a,decode:Gt});return y.data&&t(),y})();i.set(d.id,g);try{return await g}finally{i.get(d.id)===g&&i.delete(d.id);}},async add(o={},a){let p=oe(o.name);if(!p.valid)return re();let m=await e.request("/passkey/generate-register-options",{query:{name:p.value,authenticatorAttachment:o.authenticatorAttachment}});if(!m.data)return dn(m.error);let d;try{d=jt(m.data);}catch{return un()}let h;try{h=await n.register({optionsJSON:d});}catch(y){return ln(n,y,"REGISTRATION_CANCELLED","Passkey registration was cancelled.")}if(!Ei(h))return cn();let{clientExtensionResults:r,...s}=h,g=await e.request("/passkey/verify-registration",{method:"POST",body:{response:s,name:p.value},fetchOptions:a,decode:y=>Jt(y,h.id,p.value)});return g.data&&t(),g}}}function un(){return {data:null,error:{status:502,statusText:"BAD_GATEWAY",code:"INVALID_WEBAUTHN_OPTIONS",message:"The server returned invalid WebAuthn options."}}}function cn(){return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:"INVALID_WEBAUTHN_RESPONSE",message:"The platform returned an invalid passkey response."}}}function gn(e){if(!e||typeof e!="object")return false;let t=e;return typeof t.id=="string"&&t.id.length>0&&typeof t.rawId=="string"&&t.rawId.length>0&&t.type==="public-key"&&!!t.response&&typeof t.response=="object"}function Di(e){if(!gn(e))return false;let t=e.response;return typeof t.clientDataJSON=="string"&&typeof t.authenticatorData=="string"&&typeof t.signature=="string"&&(t.userHandle===void 0||typeof t.userHandle=="string")}function Ei(e){if(!gn(e))return false;let t=e.response;return typeof t.clientDataJSON=="string"&&typeof t.attestationObject=="string"}function dn(e){return {data:null,error:e??{status:502,statusText:"BAD_GATEWAY",code:"INVALID_WEBAUTHN_OPTIONS",message:"The server returned no WebAuthn options."}}}function ln(e,t,n,i){let o=Ui(t,"page does not have focus"),a=e.errorCode?.(t),p=a!==void 0?a==="ERROR_CEREMONY_ABORTED":pn(t)==="AbortError",m=n!=="AUTH_CANCELLED",d=Ni(a,pn(t),m);return {data:null,error:{status:400,statusText:"BAD_REQUEST",code:o?"PASSKEY_PAGE_NOT_FOCUSED":p?n:a??"PASSKEY_BROWSER_ERROR",message:o?"Keep this page focused while completing the passkey prompt.":p?i:d}}}function Ni(e,t,n){switch(e){case "ERROR_INVALID_DOMAIN":case "ERROR_INVALID_RP_ID":return "Passkeys are not set up for this site\u2019s domain.";case "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED":return "This device already has a passkey for this account.";case "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEY_ALGS":case "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT":case "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT":return "This device cannot create a passkey for this site.";}return t==="NotAllowedError"?n?"No passkey was created. The prompt was dismissed or timed out.":"No passkey was used. This device may not have one saved for this site yet, or the prompt was dismissed.":t==="SecurityError"?"Passkeys are not set up for this site\u2019s domain.":n?"Passkey registration did not complete.":"Passkey sign-in did not complete."}function pn(e){return e&&typeof e=="object"&&"name"in e&&typeof e.name=="string"?e.name:void 0}function Ui(e,t){let n=t.toLowerCase(),i=new Set,o=e;for(;o&&typeof o=="object"&&!i.has(o);){if(i.add(o),"message"in o&&typeof o.message=="string"&&o.message.toLowerCase().includes(n))return true;o="cause"in o?o.cause:void 0;}return false}async function Mo(e){let n=`${new URL(e.apiUrl).origin}/api/projects/${e.decoded.projectId}/public-config`;return Le(await te(e,n,{init:{method:"GET",credentials:"omit"},maxResponseBytes:256*1024,decode:i=>Mi(i,e)}),"public-config")}function Mi(e,t){let n=z$1(e),i=n.environmentId,o=n.environmentType,a=`${new URL(t.apiUrl).origin}/api/projects/${t.decoded.projectId}/auth`;if(typeof n.applicationId!="string"||!_i(n.applicationId)||i!==t.decoded.projectId||o!=="development"&&o!=="production"||n.authBaseUrl!==a)throw z();let p=v(n.branding),m=v(n.legal);if(!Ce(n.enabledMethods,64)||!Ce(n.socialProviders,64)||!mn(p,["appName","logoUrl","primaryColor"])||p.showAppName!==void 0&&typeof p.showAppName!="boolean"||p.alignment!==void 0&&p.alignment!=="left"&&p.alignment!=="center"&&p.alignment!=="right"||p.theme!==void 0&&p.theme!=="light"&&p.theme!=="dark"&&p.theme!=="system"||!mn(m,["termsUrl","privacyUrl"])||!Number.isSafeInteger(m.version)||m.version<0||typeof m.required!="boolean")throw z();if(n.socialProviderClientIds!==void 0){let d=v(n.socialProviderClientIds);if(Object.keys(d).length>64||Object.values(d).some(h=>typeof h!="string"||h.length>2048))throw z()}if(!_(n,["requireEmailVerification","twoFactor","mfaRequired","accountDeletion","organizations","sso","badge"])||!fn(n.turnstileSiteKey)||!fn(n.authTurnstileSiteKey)||typeof n.locale!="string"||n.locale.length===0||n.locale.length>64||!Number.isSafeInteger(n.configVersion)||n.configVersion<0)throw z();if(n.jwtIssuer!==null){let d=v(n.jwtIssuer);if(d.issuer!==a||d.jwksUrl!==`${a}/jwks`||d.aud!==t.decoded.projectId)throw z()}if(n.signUp!==void 0){let d=v(n.signUp).mode;if(typeof d!="string"||!["open","restricted","allowlist","waitlist"].includes(d))throw z()}if(n.authentication!==void 0&&Li(n.authentication),n.emailVerification!==void 0){let d=v(n.emailVerification);if(!_(d,["required"])||d.method!=="link"&&d.method!=="code")throw z()}if(n.userModel!==void 0&&!_(v(n.userModel),["requireEmail","firstLastName","emailChange","accountDeletion"]))throw z();if(n.mfa!==void 0){let d=v(n.mfa);if(!_(d,["totp","required","backupCodes"])||(d.required===true||d.backupCodes===true)&&d.totp!==true)throw z()}if(n.captcha===void 0||n.captcha===null)n.captcha=typeof n.authTurnstileSiteKey=="string"&&n.authTurnstileSiteKey.length>0?{provider:"turnstile",siteKey:n.authTurnstileSiteKey}:null;else {let d=v(n.captcha);if(typeof d.provider!="string"||d.provider.length===0||d.provider.length>64||typeof d.siteKey!="string"||d.siteKey.length===0||d.siteKey.length>512)throw z();n.captcha={provider:d.provider,siteKey:d.siteKey};}return n}function _i(e){return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function z(){return new TypeError("public-config returned an invalid response")}function v(e){if(!e||typeof e!="object"||Array.isArray(e))throw z();return e}function fn(e){return e===null||typeof e=="string"&&e.length<=4096}function Li(e){let t=v(e),n=v(t.email),i=v(t.password),o=i.minLength!==void 0||i.maxLength!==void 0;if(!_(n,["signUp"])||!Ce(n.signIn,3)||n.signIn.some(a=>a!=="password"&&a!=="magic_link"&&a!=="email_otp")||!_(v(t.phone),["signUp","signIn"])||!_(i,["signUp","add"])||o&&(!Number.isSafeInteger(i.minLength)||!Number.isSafeInteger(i.maxLength)||i.minLength<1||i.maxLength>4096||i.minLength>i.maxLength)||!_(v(t.passkey),["signIn","add"])||!Fi(v(t.passkey).relyingPartyId)||!_(v(t.username),["collectOnSignUp","signIn"]))throw z()}function Fi(e){return e==null||typeof e=="string"}function _(e,t){return t.every(n=>typeof e[n]=="boolean")}function mn(e,t){return t.every(n=>e[n]===void 0||typeof e[n]=="string"&&e[n].length<=4096)}function Ce(e,t){return Array.isArray(e)&&e.length<=t&&e.every(n=>typeof n=="string"&&n.length<=128)&&new Set(e).size===e.length}export{qi as a,de as b,te as c,Le as d,Bi as e,Fe as f,On as g,bn as h,fe as i,Ve as j,Pi as k,Po as l,Do as m,Mo as n};
@@ -332,6 +332,13 @@ type TokenClient = {
332
332
  declare function createTokenClient(config: ResolvedAuthConfig): TokenClient;
333
333
 
334
334
  declare const AUTH_CHALLENGE_HEADER = "x-authowl-turnstile-token";
335
+ /**
336
+ * The language this request is being conducted in.
337
+ *
338
+ * Advisory: a server that does not know it ignores it, and one that does
339
+ * falls back to the project default for anything it has no catalogue for.
340
+ */
341
+ declare const AUTH_LOCALE_HEADER = "x-authowl-locale";
335
342
  type ResponseDecoder<T> = (value: unknown) => T;
336
343
  type AuthHttpRequest<T = unknown> = {
337
344
  method?: 'GET' | 'POST' | 'PATCH';
@@ -1514,4 +1521,4 @@ interface AuthOwlClient {
1514
1521
  */
1515
1522
  declare function createAuthOwlClient(config: ResolvedAuthConfig): AuthOwlClient;
1516
1523
 
1517
- export { type JsonPrimitive as $, type AkedlyShieldStartProof as A, type DeletePasskeyData as B, type ChangeEmailOptions as C, type DeleteAccountData as D, type DeletePasskeyOptions as E, type DisableTwoFactorOptions as F, type EmailAuthData as G, type EmailOtpAuthData as H, type EmailOtpSignInOptions as I, type EmailOtpType as J, type EmailSignInOptions as K, type EmailSignUpData as L, type EmailSignUpOptions as M, type EnableTwoFactorOptions as N, type EnvironmentType as O, type PhoneOtpChallengeData as P, type GenerateBackupCodesOptions as Q, type GetOrganizationInvitationOptions as R, type GetOrganizationOptions as S, type GetToken as T, type GetTokenOptions as U, INVITATION_CLAIM_MAX_AGE_MS as V, INVITATION_QUERY_PARAM as W, type InvitationClaim as X, type InvitationRecipientHint as Y, type InviteOrganizationMemberOptions as Z, type JsonObject as _, AUTH_CHALLENGE_HEADER as a, type TwoFactorEnableData as a$, type JsonValue as a0, type LeaveOrganizationOptions as a1, type LinkSocialData as a2, type LinkSocialOptions as a3, type ListOrganizationInvitationsOptions as a4, type ListOrganizationMembersOptions as a5, type ListOrganizationRolesOptions as a6, type ListOrganizationTeamMembersOptions as a7, type ListOrganizationTeamsOptions as a8, type MagicLinkData as a9, type ProjectCapabilities as aA, type PublicConfig as aB, type RejectOrganizationInvitationData as aC, type RemoveOrganizationMemberData as aD, type RemoveOrganizationMemberOptions as aE, type RemoveOrganizationTeamData as aF, type RemoveOrganizationTeamMemberData as aG, type RemoveOrganizationTeamMemberOptions as aH, type RemoveOrganizationTeamOptions as aI, type RequestPasswordResetOptions as aJ, type ResetPasswordOptions as aK, type RevokeSessionOptions as aL, type SendOtpData as aM, type SendTwoFactorOtpData as aN, type SendTwoFactorOtpOptions as aO, type SendVerificationOtpOptions as aP, type SessionState as aQ, type SessionStore as aR, type SetActiveOrganizationOptions as aS, type SetActiveTeamOptions as aT, type SignOutData as aU, type SocialAccount as aV, type SocialAuthData as aW, type SocialIdTokenOptions as aX, type SocialSignInOptions as aY, type TokenClient as aZ, type TwoFactorBackupCodesData as a_, type MagicLinkSignInOptions as aa, type Organization as ab, type OrganizationClient as ac, type OrganizationDetails as ad, type OrganizationFilterOperator as ae, type OrganizationInvitation as af, type OrganizationInvitationActionOptions as ag, type OrganizationInvitationDetails as ah, type OrganizationInvitationStatus as ai, type OrganizationMember as aj, type OrganizationMemberUser as ak, type OrganizationMemberWithUser as al, type OrganizationMembersData as am, type OrganizationRoleSummary as an, type OrganizationSelector as ao, type OrganizationTeam as ap, type OrganizationTeamMember as aq, type OrganizationUserInvitation as ar, type PasskeyAuthData as as, type PasskeySignInOptions as at, type PasswordResetData as au, type PhoneAuthUser as av, type PhoneOtpStartData as aw, type PhoneOtpStartOptions as ax, type PhoneOtpVerifyData as ay, type PhoneOtpVerifyOptions as az, type AcceptOrganizationInvitationData as b, type TwoFactorRedirectData as b0, type TwoFactorStatusData as b1, type TwoFactorVerifyData as b2, type UnlinkSocialOptions as b3, type UpdateOrganizationMemberRoleOptions as b4, type UpdateOrganizationOptions as b5, type UpdateOrganizationTeamOptions as b6, type UpdatePasskeyData as b7, type UpdatePasskeyOptions as b8, type UpdateProfileOptions as b9, type UpdateUnsafeMetadataOptions as ba, type UserMetadata as bb, type UsernameSignInOptions as bc, type VerifyBackupCodeOptions as bd, type VerifyEmailOtpData as be, type VerifyEmailOtpOptions as bf, type VerifyTotpOptions as bg, type VerifyTwoFactorOtpOptions as bh, type WaitlistJoinData as bi, type WaitlistJoinOptions as bj, acceptConsent as bk, captureInvitationClaim as bl, clearInvitationClaim as bm, createAuthOwlClient as bn, createTokenClient as bo, getConsentStatus as bp, getPublicConfig as bq, readInvitationClaim as br, resolveProjectCapabilities as bs, createAuthHttpClient as bt, type AuthHttpClient as bu, type AccountClient as c, type AccountSession as d, type AccountStatusData as e, type ActionFetchOptions as f, type AddOrganizationTeamMemberOptions as g, type AddPasskeyOptions as h, type AuthActionResult as i, type AuthClientError as j, type AuthErrorContext as k, type AuthOwlClient as l, type AuthOwlErrorCode as m, type AuthPasskey as n, type AuthRequestContext as o, type AuthResponseContext as p, type AuthSession as q, type AuthUser as r, type ChangePasswordData as s, type ChangePasswordOptions as t, type ConsentAcceptResult as u, type ConsentStatus as v, type CreateOrganizationOptions as w, type CreateOrganizationTeamOptions as x, type DeleteAccountOptions as y, type DeleteOrganizationOptions as z };
1524
+ export { type JsonObject as $, type AkedlyShieldStartProof as A, type DeleteOrganizationOptions as B, type ChangeEmailOptions as C, type DeleteAccountData as D, type DeletePasskeyData as E, type DeletePasskeyOptions as F, type DisableTwoFactorOptions as G, type EmailAuthData as H, type EmailOtpAuthData as I, type EmailOtpSignInOptions as J, type EmailOtpType as K, type EmailSignInOptions as L, type EmailSignUpData as M, type EmailSignUpOptions as N, type EnableTwoFactorOptions as O, type PhoneOtpChallengeData as P, type EnvironmentType as Q, type GenerateBackupCodesOptions as R, type GetOrganizationInvitationOptions as S, type GetOrganizationOptions as T, type GetToken as U, type GetTokenOptions as V, INVITATION_CLAIM_MAX_AGE_MS as W, INVITATION_QUERY_PARAM as X, type InvitationClaim as Y, type InvitationRecipientHint as Z, type InviteOrganizationMemberOptions as _, AUTH_CHALLENGE_HEADER as a, type TwoFactorBackupCodesData as a$, type JsonPrimitive as a0, type JsonValue as a1, type LeaveOrganizationOptions as a2, type LinkSocialData as a3, type LinkSocialOptions as a4, type ListOrganizationInvitationsOptions as a5, type ListOrganizationMembersOptions as a6, type ListOrganizationRolesOptions as a7, type ListOrganizationTeamMembersOptions as a8, type ListOrganizationTeamsOptions as a9, type PhoneOtpVerifyOptions as aA, type ProjectCapabilities as aB, type PublicConfig as aC, type RejectOrganizationInvitationData as aD, type RemoveOrganizationMemberData as aE, type RemoveOrganizationMemberOptions as aF, type RemoveOrganizationTeamData as aG, type RemoveOrganizationTeamMemberData as aH, type RemoveOrganizationTeamMemberOptions as aI, type RemoveOrganizationTeamOptions as aJ, type RequestPasswordResetOptions as aK, type ResetPasswordOptions as aL, type RevokeSessionOptions as aM, type SendOtpData as aN, type SendTwoFactorOtpData as aO, type SendTwoFactorOtpOptions as aP, type SendVerificationOtpOptions as aQ, type SessionState as aR, type SessionStore as aS, type SetActiveOrganizationOptions as aT, type SetActiveTeamOptions as aU, type SignOutData as aV, type SocialAccount as aW, type SocialAuthData as aX, type SocialIdTokenOptions as aY, type SocialSignInOptions as aZ, type TokenClient as a_, type MagicLinkData as aa, type MagicLinkSignInOptions as ab, type Organization as ac, type OrganizationClient as ad, type OrganizationDetails as ae, type OrganizationFilterOperator as af, type OrganizationInvitation as ag, type OrganizationInvitationActionOptions as ah, type OrganizationInvitationDetails as ai, type OrganizationInvitationStatus as aj, type OrganizationMember as ak, type OrganizationMemberUser as al, type OrganizationMemberWithUser as am, type OrganizationMembersData as an, type OrganizationRoleSummary as ao, type OrganizationSelector as ap, type OrganizationTeam as aq, type OrganizationTeamMember as ar, type OrganizationUserInvitation as as, type PasskeyAuthData as at, type PasskeySignInOptions as au, type PasswordResetData as av, type PhoneAuthUser as aw, type PhoneOtpStartData as ax, type PhoneOtpStartOptions as ay, type PhoneOtpVerifyData as az, AUTH_LOCALE_HEADER as b, type TwoFactorEnableData as b0, type TwoFactorRedirectData as b1, type TwoFactorStatusData as b2, type TwoFactorVerifyData as b3, type UnlinkSocialOptions as b4, type UpdateOrganizationMemberRoleOptions as b5, type UpdateOrganizationOptions as b6, type UpdateOrganizationTeamOptions as b7, type UpdatePasskeyData as b8, type UpdatePasskeyOptions as b9, type UpdateProfileOptions as ba, type UpdateUnsafeMetadataOptions as bb, type UserMetadata as bc, type UsernameSignInOptions as bd, type VerifyBackupCodeOptions as be, type VerifyEmailOtpData as bf, type VerifyEmailOtpOptions as bg, type VerifyTotpOptions as bh, type VerifyTwoFactorOtpOptions as bi, type WaitlistJoinData as bj, type WaitlistJoinOptions as bk, acceptConsent as bl, captureInvitationClaim as bm, clearInvitationClaim as bn, createAuthOwlClient as bo, createTokenClient as bp, getConsentStatus as bq, getPublicConfig as br, readInvitationClaim as bs, resolveProjectCapabilities as bt, createAuthHttpClient as bu, type AuthHttpClient as bv, type AcceptOrganizationInvitationData as c, type AccountClient as d, type AccountSession as e, type AccountStatusData as f, type ActionFetchOptions as g, type AddOrganizationTeamMemberOptions as h, type AddPasskeyOptions as i, type AuthActionResult as j, type AuthClientError as k, type AuthErrorContext as l, type AuthOwlClient as m, type AuthOwlErrorCode as n, type AuthPasskey as o, type AuthRequestContext as p, type AuthResponseContext as q, type AuthSession as r, type AuthUser as s, type ChangePasswordData as t, type ChangePasswordOptions as u, type ConsentAcceptResult as v, type ConsentStatus as w, type CreateOrganizationOptions as x, type CreateOrganizationTeamOptions as y, type DeleteAccountOptions as z };
@@ -332,6 +332,13 @@ type TokenClient = {
332
332
  declare function createTokenClient(config: ResolvedAuthConfig): TokenClient;
333
333
 
334
334
  declare const AUTH_CHALLENGE_HEADER = "x-authowl-turnstile-token";
335
+ /**
336
+ * The language this request is being conducted in.
337
+ *
338
+ * Advisory: a server that does not know it ignores it, and one that does
339
+ * falls back to the project default for anything it has no catalogue for.
340
+ */
341
+ declare const AUTH_LOCALE_HEADER = "x-authowl-locale";
335
342
  type ResponseDecoder<T> = (value: unknown) => T;
336
343
  type AuthHttpRequest<T = unknown> = {
337
344
  method?: 'GET' | 'POST' | 'PATCH';
@@ -1514,4 +1521,4 @@ interface AuthOwlClient {
1514
1521
  */
1515
1522
  declare function createAuthOwlClient(config: ResolvedAuthConfig): AuthOwlClient;
1516
1523
 
1517
- export { type JsonPrimitive as $, type AkedlyShieldStartProof as A, type DeletePasskeyData as B, type ChangeEmailOptions as C, type DeleteAccountData as D, type DeletePasskeyOptions as E, type DisableTwoFactorOptions as F, type EmailAuthData as G, type EmailOtpAuthData as H, type EmailOtpSignInOptions as I, type EmailOtpType as J, type EmailSignInOptions as K, type EmailSignUpData as L, type EmailSignUpOptions as M, type EnableTwoFactorOptions as N, type EnvironmentType as O, type PhoneOtpChallengeData as P, type GenerateBackupCodesOptions as Q, type GetOrganizationInvitationOptions as R, type GetOrganizationOptions as S, type GetToken as T, type GetTokenOptions as U, INVITATION_CLAIM_MAX_AGE_MS as V, INVITATION_QUERY_PARAM as W, type InvitationClaim as X, type InvitationRecipientHint as Y, type InviteOrganizationMemberOptions as Z, type JsonObject as _, AUTH_CHALLENGE_HEADER as a, type TwoFactorEnableData as a$, type JsonValue as a0, type LeaveOrganizationOptions as a1, type LinkSocialData as a2, type LinkSocialOptions as a3, type ListOrganizationInvitationsOptions as a4, type ListOrganizationMembersOptions as a5, type ListOrganizationRolesOptions as a6, type ListOrganizationTeamMembersOptions as a7, type ListOrganizationTeamsOptions as a8, type MagicLinkData as a9, type ProjectCapabilities as aA, type PublicConfig as aB, type RejectOrganizationInvitationData as aC, type RemoveOrganizationMemberData as aD, type RemoveOrganizationMemberOptions as aE, type RemoveOrganizationTeamData as aF, type RemoveOrganizationTeamMemberData as aG, type RemoveOrganizationTeamMemberOptions as aH, type RemoveOrganizationTeamOptions as aI, type RequestPasswordResetOptions as aJ, type ResetPasswordOptions as aK, type RevokeSessionOptions as aL, type SendOtpData as aM, type SendTwoFactorOtpData as aN, type SendTwoFactorOtpOptions as aO, type SendVerificationOtpOptions as aP, type SessionState as aQ, type SessionStore as aR, type SetActiveOrganizationOptions as aS, type SetActiveTeamOptions as aT, type SignOutData as aU, type SocialAccount as aV, type SocialAuthData as aW, type SocialIdTokenOptions as aX, type SocialSignInOptions as aY, type TokenClient as aZ, type TwoFactorBackupCodesData as a_, type MagicLinkSignInOptions as aa, type Organization as ab, type OrganizationClient as ac, type OrganizationDetails as ad, type OrganizationFilterOperator as ae, type OrganizationInvitation as af, type OrganizationInvitationActionOptions as ag, type OrganizationInvitationDetails as ah, type OrganizationInvitationStatus as ai, type OrganizationMember as aj, type OrganizationMemberUser as ak, type OrganizationMemberWithUser as al, type OrganizationMembersData as am, type OrganizationRoleSummary as an, type OrganizationSelector as ao, type OrganizationTeam as ap, type OrganizationTeamMember as aq, type OrganizationUserInvitation as ar, type PasskeyAuthData as as, type PasskeySignInOptions as at, type PasswordResetData as au, type PhoneAuthUser as av, type PhoneOtpStartData as aw, type PhoneOtpStartOptions as ax, type PhoneOtpVerifyData as ay, type PhoneOtpVerifyOptions as az, type AcceptOrganizationInvitationData as b, type TwoFactorRedirectData as b0, type TwoFactorStatusData as b1, type TwoFactorVerifyData as b2, type UnlinkSocialOptions as b3, type UpdateOrganizationMemberRoleOptions as b4, type UpdateOrganizationOptions as b5, type UpdateOrganizationTeamOptions as b6, type UpdatePasskeyData as b7, type UpdatePasskeyOptions as b8, type UpdateProfileOptions as b9, type UpdateUnsafeMetadataOptions as ba, type UserMetadata as bb, type UsernameSignInOptions as bc, type VerifyBackupCodeOptions as bd, type VerifyEmailOtpData as be, type VerifyEmailOtpOptions as bf, type VerifyTotpOptions as bg, type VerifyTwoFactorOtpOptions as bh, type WaitlistJoinData as bi, type WaitlistJoinOptions as bj, acceptConsent as bk, captureInvitationClaim as bl, clearInvitationClaim as bm, createAuthOwlClient as bn, createTokenClient as bo, getConsentStatus as bp, getPublicConfig as bq, readInvitationClaim as br, resolveProjectCapabilities as bs, createAuthHttpClient as bt, type AuthHttpClient as bu, type AccountClient as c, type AccountSession as d, type AccountStatusData as e, type ActionFetchOptions as f, type AddOrganizationTeamMemberOptions as g, type AddPasskeyOptions as h, type AuthActionResult as i, type AuthClientError as j, type AuthErrorContext as k, type AuthOwlClient as l, type AuthOwlErrorCode as m, type AuthPasskey as n, type AuthRequestContext as o, type AuthResponseContext as p, type AuthSession as q, type AuthUser as r, type ChangePasswordData as s, type ChangePasswordOptions as t, type ConsentAcceptResult as u, type ConsentStatus as v, type CreateOrganizationOptions as w, type CreateOrganizationTeamOptions as x, type DeleteAccountOptions as y, type DeleteOrganizationOptions as z };
1524
+ export { type JsonObject as $, type AkedlyShieldStartProof as A, type DeleteOrganizationOptions as B, type ChangeEmailOptions as C, type DeleteAccountData as D, type DeletePasskeyData as E, type DeletePasskeyOptions as F, type DisableTwoFactorOptions as G, type EmailAuthData as H, type EmailOtpAuthData as I, type EmailOtpSignInOptions as J, type EmailOtpType as K, type EmailSignInOptions as L, type EmailSignUpData as M, type EmailSignUpOptions as N, type EnableTwoFactorOptions as O, type PhoneOtpChallengeData as P, type EnvironmentType as Q, type GenerateBackupCodesOptions as R, type GetOrganizationInvitationOptions as S, type GetOrganizationOptions as T, type GetToken as U, type GetTokenOptions as V, INVITATION_CLAIM_MAX_AGE_MS as W, INVITATION_QUERY_PARAM as X, type InvitationClaim as Y, type InvitationRecipientHint as Z, type InviteOrganizationMemberOptions as _, AUTH_CHALLENGE_HEADER as a, type TwoFactorBackupCodesData as a$, type JsonPrimitive as a0, type JsonValue as a1, type LeaveOrganizationOptions as a2, type LinkSocialData as a3, type LinkSocialOptions as a4, type ListOrganizationInvitationsOptions as a5, type ListOrganizationMembersOptions as a6, type ListOrganizationRolesOptions as a7, type ListOrganizationTeamMembersOptions as a8, type ListOrganizationTeamsOptions as a9, type PhoneOtpVerifyOptions as aA, type ProjectCapabilities as aB, type PublicConfig as aC, type RejectOrganizationInvitationData as aD, type RemoveOrganizationMemberData as aE, type RemoveOrganizationMemberOptions as aF, type RemoveOrganizationTeamData as aG, type RemoveOrganizationTeamMemberData as aH, type RemoveOrganizationTeamMemberOptions as aI, type RemoveOrganizationTeamOptions as aJ, type RequestPasswordResetOptions as aK, type ResetPasswordOptions as aL, type RevokeSessionOptions as aM, type SendOtpData as aN, type SendTwoFactorOtpData as aO, type SendTwoFactorOtpOptions as aP, type SendVerificationOtpOptions as aQ, type SessionState as aR, type SessionStore as aS, type SetActiveOrganizationOptions as aT, type SetActiveTeamOptions as aU, type SignOutData as aV, type SocialAccount as aW, type SocialAuthData as aX, type SocialIdTokenOptions as aY, type SocialSignInOptions as aZ, type TokenClient as a_, type MagicLinkData as aa, type MagicLinkSignInOptions as ab, type Organization as ac, type OrganizationClient as ad, type OrganizationDetails as ae, type OrganizationFilterOperator as af, type OrganizationInvitation as ag, type OrganizationInvitationActionOptions as ah, type OrganizationInvitationDetails as ai, type OrganizationInvitationStatus as aj, type OrganizationMember as ak, type OrganizationMemberUser as al, type OrganizationMemberWithUser as am, type OrganizationMembersData as an, type OrganizationRoleSummary as ao, type OrganizationSelector as ap, type OrganizationTeam as aq, type OrganizationTeamMember as ar, type OrganizationUserInvitation as as, type PasskeyAuthData as at, type PasskeySignInOptions as au, type PasswordResetData as av, type PhoneAuthUser as aw, type PhoneOtpStartData as ax, type PhoneOtpStartOptions as ay, type PhoneOtpVerifyData as az, AUTH_LOCALE_HEADER as b, type TwoFactorEnableData as b0, type TwoFactorRedirectData as b1, type TwoFactorStatusData as b2, type TwoFactorVerifyData as b3, type UnlinkSocialOptions as b4, type UpdateOrganizationMemberRoleOptions as b5, type UpdateOrganizationOptions as b6, type UpdateOrganizationTeamOptions as b7, type UpdatePasskeyData as b8, type UpdatePasskeyOptions as b9, type UpdateProfileOptions as ba, type UpdateUnsafeMetadataOptions as bb, type UserMetadata as bc, type UsernameSignInOptions as bd, type VerifyBackupCodeOptions as be, type VerifyEmailOtpData as bf, type VerifyEmailOtpOptions as bg, type VerifyTotpOptions as bh, type VerifyTwoFactorOtpOptions as bi, type WaitlistJoinData as bj, type WaitlistJoinOptions as bk, acceptConsent as bl, captureInvitationClaim as bm, clearInvitationClaim as bn, createAuthOwlClient as bo, createTokenClient as bp, getConsentStatus as bq, getPublicConfig as br, readInvitationClaim as bs, resolveProjectCapabilities as bt, createAuthHttpClient as bu, type AuthHttpClient as bv, type AcceptOrganizationInvitationData as c, type AccountClient as d, type AccountSession as e, type AccountStatusData as f, type ActionFetchOptions as g, type AddOrganizationTeamMemberOptions as h, type AddPasskeyOptions as i, type AuthActionResult as j, type AuthClientError as k, type AuthErrorContext as l, type AuthOwlClient as m, type AuthOwlErrorCode as n, type AuthPasskey as o, type AuthRequestContext as p, type AuthResponseContext as q, type AuthSession as r, type AuthUser as s, type ChangePasswordData as t, type ChangePasswordOptions as u, type ConsentAcceptResult as v, type ConsentStatus as w, type CreateOrganizationOptions as x, type CreateOrganizationTeamOptions as y, type DeleteAccountOptions as z };