1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9f5fd859-4adb-4464-a86d-48a5baf0b580",e._sentryDebugIdIdentifier="sentry-dbid-9f5fd859-4adb-4464-a86d-48a5baf0b580")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[13271],{106864:(e,t,i)=>{"use strict";i.d(t,{A:()=>n.A});var n=i(591456)},375699:(e,t,i)=>{"use strict";i.d(t,{AZ:()=>o,GD:()=>a,d1:()=>r,gu:()=>n});let n="budgets-first-time-use-hidden",r="budgetsFilters",o="businessLimitBannerDismissed",a=[{id:"1",nombre:"Presupuestos",videoUrl:"https://player.vimeo.com/video/1134280737",articuloUrl:"https://ayuda.clientify.com/es/articles/13180774-new-presupuestos"}]},591456:(e,t,i)=>{"use strict";i.d(t,{A:()=>ee});var n=i(873699),r=i(695155);i(212115);var o=i(248116),a=i(725635);function s(){let e=(0,n._)(["\n font-style: normal;\n"]);return s=function(){return e},e}let l={display:"-webkit-box",WebkitLineClamp:"var(--line-clamp, 1)",WebkitBoxOrient:"vertical",overflow:"hidden"},u={display:"inline-block",position:"relative",overflow:"hidden",whiteSpace:"nowrap",wordWrap:"break-word",textOverflow:"ellipsis"},h=(0,o.default)(a.A)(s()),c=(0,o.default)(h)(()=>({color:"var(--texto-gris-90, #262626)",fontWeight:600,fontSize:"var(--h-2-rem, 2rem)",lineHeight:"var(--h-12012-em, 2.4rem)"})),d=(0,o.default)(h)(()=>({color:"var(--texto-gris-90, #262626)",fontWeight:600,fontSize:"var(--d-1125-rem, 18px)",lineHeight:"var(--d-13013-em, 23.4px)"})),g=(0,o.default)(h)(()=>({color:"var(--texto-gris-50, #8D8D8D)",fontWeight:400,fontSize:"var(--c-1-rem, 16px)",lineHeight:"var(--c-15015-em, 24px)"})),f=(0,o.default)(h)(()=>({color:"var(--texto-gris-90, #262626)",fontStyle:"normal",fontWeight:600,fontSize:"var(--c-1-rem, 16px)",lineHeight:"var(--c-15015-em, 24px)"})),m=(0,o.default)(h)(()=>({color:"var(--texto-gris-80, #393939)",fontStyle:"normal",fontWeight:400,fontSize:"var(--b-0875-rem, 14px)",lineHeight:"var(--b-1501312-em, 21px)"})),S=(0,o.default)(h)(()=>({color:"var(--texto-gris-90, #262626)",fontWeight:600,fontSize:"var(--g-175-rem, 1.75rem)",lineHeight:"var(--g-12012-em, 2.1rem)"})),p=(0,o.default)(h)(()=>({color:"var(--texto-gris-80, #393939)",fontStyle:"normal",fontWeight:600,fontSize:"var(--b-0875-rem, 14px)",lineHeight:"var(--b-1501312-em, 21px)"})),w=(0,o.default)(h)(()=>({color:"var(--texto-gris-50, #8D8D8D)",fontStyle:"normal",fontWeight:400,fontSize:"var(--a-075-rem, 12px)",lineHeight:"var(--a-140105-em, 16.8px)"})),y=(0,o.default)(h)(()=>({color:"var(--Text-Default, #525252)",fontWeight:400,fontSize:"var(--b-0875-rem, 0.875rem)",lineHeight:"var(--b-1501312-em, 1.3125rem)"})),v=(0,o.default)(h)(()=>({color:"var(--texto-gris-50, #8d8d8d)",fontWeight:500,fontSize:"var(--b-0875-rem, 0.875rem)",lineHeight:"var(--b-1501312-em, 1.3125rem)"})),b=(0,o.default)(h)(()=>({color:"var(--texto-gris-80, #393939)",textAlign:"right",fontWeight:500,fontSize:"var(--b-0875-rem, 0.875rem)",lineHeight:"var(--b-1501312-em, 1.3125rem)"})),z=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.regular,fontSize:t.fontSizes.subHeader,lineHeight:"1.375rem"}}),_=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.subHeader,lineHeight:"1.375rem"}}),I=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.subHeader,lineHeight:"1.375rem"}}),H=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.regular,fontSize:t.fontSizes.body,lineHeight:"1.063rem"}}),k=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.body,lineHeight:"1.063rem"}}),A=(0,o.default)(h)(()=>({color:"var(--texto-gris-80, #393939)",fontWeight:400,fontSize:"var(--c-1-rem, 16px)",lineHeight:"var(--c-15015-em, 24px)"})),W=(0,o.default)(h)(()=>({color:"var(--texto-gris-80, #393939)",fontStyle:"normal",fontWeight:500,fontSize:"var(--c-1-rem, 16px)",lineHeight:"var(--c-15015-em, 24px)"})),E=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.bold,fontSize:t.fontSizes.body,lineHeight:"1.063rem"}}),T=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:"2rem",lineHeight:"2.75rem"}}),x=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.title,lineHeight:"1.188rem"}}),C=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.header,lineHeight:"1.563rem"}}),O=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.bold,fontSize:t.fontSizes.header,lineHeight:"1.563rem"}}),D=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.header,lineHeight:"1.563rem"}}),R=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.bold,fontSize:t.fontSizes.caption,lineHeight:"0.875rem"}}),P=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.caption,lineHeight:"0.875rem"}}),U=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.caption,lineHeight:"0.875rem"}}),B=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.regular,fontSize:t.fontSizes.title,lineHeight:"1.188rem"}}),M=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.title,lineHeight:"1.188rem"}}),L=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.bold,fontSize:t.fontSizes.number,lineHeight:"3.438rem"}}),N=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.regular,fontSize:t.fontSizes.number,lineHeight:"3.438rem"}}),G=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.number,lineHeight:"3.438rem"}}),F=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:"1.5rem",lineHeight:"2.063rem"}}),J=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.header,lineHeight:"1.563rem"}}),Z=(0,o.default)(h)(()=>({fontWeight:"400",fontSize:"0.875rem",lineHeight:"1.187rem"})),j=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.title,lineHeight:"1.1875rem"}}),V=(0,o.default)(h)(()=>({color:"var(--texto-gris-50, #8D8D8D)",fontStyle:"normal",fontWeight:400,fontSize:"14px",lineHeight:"19px"})),X=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.title,lineHeight:"1.1875rem"}}),Y=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:t.fontSizes.title,lineHeight:"1.1875rem"}}),q=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontSize:t.fontSizes.caption,fontWeight:t.weights.regular,lineHeight:"0.875rem"}}),K=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.medium,fontSize:"1.5rem",lineHeight:"2.063rem"}}),Q=(0,o.default)(h)(e=>{let{theme:t}=e;return{fontWeight:t.weights.semibold,fontSize:t.fontSizes.body,lineHeight:"1.125rem"}}),$=(0,o.default)(h)(()=>({fontWeight:"500",fontSize:"0.875rem",lineHeight:"1.187rem"})),ee=function(e){let{type:t=null,children:i,isEllipsis:n,isEllipsisInl
1ine:o,...a}=e,s=h;return"SubHeaderRegular"===t?s=z:"HeadingDisplaySemibold"===t?s=c:"HeadingMediumSemibold"===t?s=d:"HeadingSmallRegular"===t?s=g:"HeadingSmallSemibold"===t?s=f:"HeadingXSmallRegular"===t?s=m:"HeadingXXLargeSemibold"===t?s=S:"HeadingXSmallSemibold"===t?s=p:"BodyHelpTextRegular"===t?s=w:"BodyLabelRegular"===t?s=y:"BodyLabelMedium"===t?s=v:"BodyLabelMediumRight"===t?s=b:"SubHeaderMedium"===t?s=_:"SubHeaderSemiBold"===t?s=I:"BodyRegular"===t?s=H:"H2SemiBold"===t?s=T:"TitleMedium"===t?s=x:"HeaderMedium"===t?s=C:"HeaderBold"===t?s=O:"HeaderSemiBold"===t?s=D:"CaptionBold"===t?s=R:"CaptionSemibold"===t?s=P:"CaptionMedium"===t?s=U:"TitleRegular"===t?s=B:"BodyMedium"===t?s=k:"BodyParagraphRegular"===t?s=A:"BodyParagraphMedium"===t?s=W:"TitleSemibold"===t?s=M:"H1Bold"===t?s=L:"H1Regular"===t?s=N:"H1SemiBold"===t?s=G:"BodySemiBold"===t?s=E:"H3SemiBold"===t?s=F:"TextTitle"===t?s=J:"TextSubtitle"===t?s=Z:"SMSemiBold"===t?s=j:"SMRegular"===t?s=V:"SMMedium"===t?s=X:"CaptionRegular"===t?s=q:"H3Regular"===t?s=K:"QtyOfChannels"===t?s=Y:"TemplateTitle"===t?s=Q:"TextSubtitleSemibold"===t&&(s=$),(0,r.jsx)(s,{style:{...n?l:{},...o?u:{}},...a,children:i})}},724727:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(427122),r=i(881611),o=i(311900),a=i(51358),s=i(540618),l=i.n(s),u=i(138),h=i.n(u),c=i(474879),d=i(375699);let g=["/signature/validation/authenticity/","/signature/validation/","/pdf/budgets/preview/","/pdf/invoices/preview/"];l().config();let f={client:null,cachedToken:null,isInitialized:!1,initPromise:null,fetchPromise:null,_internalAuthSubscription:null,intentionalSignOut:!1,lastRefreshAt:null,tabId:null,baseUrl:"https://new.clientify.com",loginUrl:"https://new.clientify.com/accounts/signin",changePasswordUrl:"https://new.clientify.com/accounts/forgotPassword",loginRedirect:"https://new.clientify.com/accounts/signin",onboardingUrl:"https://new.clientify.com/accounts/onBoarding",supabaseUrl:"https://afhrsztodfpcqbdmcjfg.supabase.co",supabaseAnonKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImFmaHJzenRvZGZwY3FiZG1jamZnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDA0MTU2NDksImV4cCI6MjA1NTk5MTY0OX0.B-tZYR7HlyzhpEDBjyffQGCq9YRbbSS1XZGJuwCHVGQ",djangoSessionInitBaseUrl:"https://plus.clientify.com/api/api-auth/login/",init(){if(this.isInitialized||this.client)return;try{localStorage.setItem("__storage_test__","test"),localStorage.removeItem("__storage_test__")}catch(e){console.error("[Auth] localStorage not available:",e)}let e=async(e,t)=>{let i=await fetch(e,t);try{var r,o,a,s,l,u;let t="string"==typeof e?e:e instanceof URL?e.toString():null!=(r=null==e?void 0:e.url)?r:"";if(t.includes("/auth/v1/token")&&!i.ok){let e=t.match(/grant_type=([^&]+)/),r=e?e[1]:"unknown";if("refresh_token"===r){let e=await i.clone().text().catch(()=>null),t=null;try{t=e?JSON.parse(e):null}catch(e){t=null}let h=((null==t?void 0:t.error_code)||(null==t?void 0:t.error_description)||(null==t?void 0:t.msg)||(null==t?void 0:t.message)||(null==t?void 0:t.error)||e||"").toString().toLowerCase(),c="rt_unknown";h.includes("already used")?c="rt_already_used":h.includes("not found")?c="rt_not_found":h.includes("expired")?c="rt_expired":h.includes("revoked")?c="rt_revoked":h.includes("invalid")&&(c="rt_invalid"),n.wd("Supabase token endpoint error",{level:"warning",tags:{component:"supabaseClient",error_type:"token_endpoint_error",status:String(i.status),grant_type:r,refresh_error_class:c,supabase_error:(null==t?void 0:t.error_code)||(null==t?void 0:t.error)||"unknown"},extra:{status:i.status,refreshErrorClass:c,errorBody:"string"==typeof e?e.slice(0,300):null,errorCode:null!=(o=null==t?void 0:t.error_code)?o:null,error:null!=(a=null==t?void 0:t.error)?a:null,errorDescription:null!=(u=null!=(l=null!=(s=null==t?void 0:t.error_description)?s:null==t?void 0:t.msg)?l:null==t?void 0:t.message)?u:null,currentPath:window.location.pathname,timestamp:new Date().toISOString(),...this.getSessionDiagnostics()}})}}}catch(e){}return i},t="undefined"!=typeof navigator&&!!navigator.locks;this.client=(0,o.UU)(this.supabaseUrl,this.supabaseAnonKey,{auth:{autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,storage:window.localStorage,storageKey:"clientify-auth",...t?{lock:a.JS,lockAcquireTimeout:5e3}:{}},global:{fetch:e}}),this.tabId=(0,c.A)(),this.initPromise=this.initializeSession()},async initializeSession(){try{var e;let{data:t}=await this.client.auth.getSession();(null==(e=t.session)?void 0:e.access_token)&&(this.cachedToken=t.session.access_token),this._internalAuthSubscription&&this._internalAuthSubscription.unsubscribe();let{data:{subscription:i}}=this.client.auth.onAuthStateChange((e,t)=>{r.Z({category:"auth",message:"onAuthStateChange: ".concat(e),level:"SIGNED_OUT"===e?"warning":"info",data:{hasSession:!!t,...this.get
1SessionDiagnostics()}}),"INITIAL_SESSION"===e||"TOKEN_REFRESHED"===e||"SIGNED_IN"===e||"MFA_CHALLENGE_VERIFIED"===e?(this.cachedToken=(null==t?void 0:t.access_token)||null,this.lastRefreshAt=Date.now(),this.intentionalSignOut=!1):"SIGNED_OUT"===e&&(n.wd("Auth event: SIGNED_OUT",{level:"warning",tags:{component:"supabaseClient",error_type:"signed_out_event",intentional:String(this.intentionalSignOut)},extra:{currentPath:window.location.pathname,timestamp:new Date().toISOString(),...this.getSessionDiagnostics()}}),this.cachedToken=null)});this._internalAuthSubscription=i,this.isInitialized=!0}catch(e){console.error("[Auth] Error initializing session:",e),this.isInitialized=!0}},async signUpWithEmail(e,t,i,n){t||(t=(0,c.A)());let{data:r,error:o}=await this.client.auth.signUp({email:e,password:t,options:{data:{name:i,last_name:n}}});if(o)throw o;return r},async signInWithOTPEmail(e){try{let{error:t,data:i}=await this.client.auth.signInWithOtp({email:e});if(t)return console.error("Error al enviar OTP:",t.message),{success:!1,error:t};return{success:!0,data:i}}catch(e){return{success:!1,data:null}}},async verifyOtpEmail(e,t){try{let{data:i,error:n}=await this.client.auth.verifyOtp({email:e,token:t,type:"signup"});if(n instanceof a.RC)return console.error("Error en la verificaci\xf3n de OTP:",n.message),{success:!1,error:n};return{success:!0,data:i}}catch(e){return console.error("Error inesperado durante la verificaci\xf3n:",e),{success:!1,error:e}}},async signInWithEmail(e){try{let{data:t,error:i}=await this.client.auth.signInWithOtp({email:e,options:{shouldCreateUser:!1,emailRedirectTo:this.loginRedirect}});if(i)throw i;return t}catch(e){return console.error("error ",e),e}},async resetPassword(e){let{data:t,error:i}=await this.client.auth.resetPasswordForEmail(e,{redirectTo:this.changePasswordUrl});if(i)throw i;return t},async updateInfoUser(e,t){try{let{data:i,error:n}=await this.client.auth.updateUser({password:e,data:{fullName:t}});if(n)return{success:!1,error:n};return{success:!0,data:i}}catch(e){return{success:!1,error:e}}},async updatePassword(e){let{data:t,error:i}=await this.client.auth.updateUser({password:e});if(i)throw i;return t},async signInWithEmailAndPassword(e,t){try{let{data:e}=await this.client.auth.getSession();e.session&&(this.intentionalSignOut=!0,await this.client.auth.signOut())}catch(e){console.error("[Auth] No se pudo limpiar la sesi\xf3n previa antes del login:",e)}let{data:i,error:n}=await this.client.auth.signInWithPassword({email:e,password:t});if(n)throw n;return i},async handleSignInWithGoogleAuth(e,t){try{let{data:i,error:n}=await this.client.auth.signInWithIdToken({provider:"google",token:e.credential,nonce:t});if(n)return console.error("Error signing in:",n),{error:n};return{data:i}}catch(e){return console.error("Error signing in:",e),{error:{message:e.message}}}},async signUpWithGoogle(){let{data:e,error:t}=await this.client.auth.signInWithOAuth({provider:"google",options:{redirectTo:this.loginRedirect}});if(t)throw t;return e},async signInWithGoogle(){let{data:e,error:t}=await this.client.auth.signInWithOAuth({provider:"google",options:{redirectTo:this.baseUrl}});if(t)throw t;return e},async signOutUser(){if(!this.client)return void console.warn("[Auth] Client not initialized");this.intentionalSignOut=!0;let{error:e}=await this.client.auth.signOut();if(e)throw console.error("[Auth] Error signing out:",e),e;this.cachedToken=null,localStorage.removeItem(d.d1),localStorage.removeItem("recovery_password_updated"),Object.keys(localStorage).forEach(e=>{(e.startsWith("sb-")||e.startsWith("clientify-auth"))&&localStorage.removeItem(e)});let t=sessionStorage.getItem("intentional_logout");sessionStorage.clear(),t&&sessionStorage.setItem("intentional_logout",t)},async clearLocalSession(){if(!this.client)return void console.warn("[Auth] Client not initialized");this.intentionalSignOut=!0;try{await this.client.auth.stopAutoRefresh()}catch(e){console.error("[Auth] Error deteniendo autoRefresh:",e)}this.cachedToken=null,localStorage.removeItem("recovery_password_updated"),Object.keys(localStorage).forEach(e
1=>{(e.startsWith("sb-")||e.startsWith("clientify-auth"))&&localStorage.removeItem(e)})},async userIsLoggedIn(){this.initPromise&&await this.initPromise;let{data:e}=await this.client.auth.getSession();return!!e.session&&!!e.session.user},async user(){let{data:e}=await this.client.auth.getSession();return e.session?e.session.user:null},async getSession(){if(!this.client)return console.warn("[Auth] Client not initialized"),{data:{session:null},error:Error("Client not initialized")};let{data:e,error:t}=await this.client.auth.getSession();return t&&console.error("[Auth] Error getting session:",t),{data:e,error:t}},async displayName(){if(!this.userIsLoggedIn())return null;let e=await this.user();if(e){var t;return(null==(t=e.user_metadata)?void 0:t.name)||null}return null},async onboardingInfo(){let e=await this.user();if(!e)return null;let{data:t,error:i}=await this.client.from("onboarding_info").select("*").eq("auth_user_id",e.id).single();return i||!t?null:t},async upsertOnboardingData(e){let t=await this.user();if(!t)throw Error("User not logged in");let i={...e,auth_user_id:t.id},{data:n,error:r}=await this.client.from("onboarding_info").upsert(i,{onConflict:"auth_user_id"});if(r)throw r;return n},async verifyUserWithToken(e){try{return h().decode(e)}catch(e){return console.error("Error verifying user with token:",e),null}},async onboardingComplete(){let e=await this.onboardingInfo();return!!e&&!!e.name&&""!==e.name.trim()},async getJWT(){var e;return null==(e=(await this.client.auth.getSession()).data.session)?void 0:e.access_token},async initDjangoSession(){let e=await this.getJWT();return null!=e&&this.djangoSessionInitBaseUrl+e},async refreshToken(){return this.getValidToken()},async syncSession(){return this.client?(this.cachedToken=null,this.getValidToken()):(console.warn("[Auth] Client not initialized"),null)},async getValidToken(){return g.some(e=>window.location.pathname.includes(e))?null:this.client?(this.initPromise&&await this.initPromise,this.cachedToken&&!this.isTokenExpired(this.cachedToken))?this.cachedToken:(this.fetchPromise||(this.fetchPromise=this.fetchSessionWithRetry().finally(()=>{this.fetchPromise=null})),this.fetchPromise):(console.warn("[Auth] Client not initialized"),null)},async fetchSessionWithRetry(){var e,t,i;try{r.Z({category:"auth",message:"fetchSessionWithRetry called",level:"info",data:{currentPath:window.location.pathname}});let{data:i,error:n}=await this.client.auth.getSession();if(n)return this.handleSessionError(n,"getSession error: ".concat(null!=(t=n.code)?t:n.message));if(null==(e=i.session)?void 0:e.access_token)return this.cachedToken=i.session.access_token,this.cachedToken;return null}catch(e){if("AbortError"===e.name||(null==(i=e.message)?void 0:i.includes("aborted")))return null;return this.handleSessionError(e,"Unexpected error getting session")}},isTokenExpired(e){try{let t=JSON.parse(atob(e.split(".")[1])),i=1e3*t.exp,n=Date.now();return i-n<6e4}catch(e){return!0}},hasPersistedSession(){try{return"undefined"!=typeof localStorage&&!!localStorage.getItem("clientify-auth")}catch(e){return!1}},getSessionDiagnostics(){let e={tabId:this.tabId,intentionalSignOut:this.intentionalSignOut,online:"undefined"!=typeof navigator?navigator.onLine:null,visibility:"undefined"!=typeof document?document.visibilityState:null,msSinceLastRefresh:this.lastRefreshAt?Date.now()-this.lastRefreshAt:null,hasCachedToken:!!this.cachedToken};try{if(this.cachedToken){let t=h().decode(this.cachedToken);(null==t?void 0:t.exp)&&(e.tokenExpiresAt=new Date(1e3*t.exp).toISOString(),e.tokenExpiredSecondsAgo=Math.round(Date.now()/1e3-t.exp),e.tokenWasStillValid=1e3*t.exp>Date.now())}}catch(t){e.tokenDecodeError=!0}try{e.storageHasSession=!!("undefined"!=typeof localStorage?localStorage.getItem("clientify-auth"):null)}catch(t){e.storageReadError=!0}return e},handleSessionError(e,t){if((null==e?void 0:e.name)==="AbortError")return null;let i=t.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"_").substring(0,50);return n.Cp(e||Error(t),{tags:{component:"supabaseClient",error_type:"session_error",reason:i},extra:{currentPath:window.location.pathname,reason:t,errorMessage:e instanceof Error?e.message:"No error details",timestamp:new Date().toISOString()},level:"warning"}),null},async setSession(e,t){return await this.client.auth.setSession(e,t)},async getUser(e){return await this.client.auth.getUser(e)}
1,async getOAuthAuthorizationDetails(e){return this.client?this.client.auth.oauth.getAuthorizationDetails(e):{data:null,error:Error("Client not initialized")}},async approveOAuthAuthorization(e){return this.client?this.client.auth.oauth.approveAuthorization(e,{skipBrowserRedirect:!0}):{data:null,error:Error("Client not initialized")}},async denyOAuthAuthorization(e){return this.client?this.client.auth.oauth.denyAuthorization(e,{skipBrowserRedirect:!0}):{data:null,error:Error("Client not initialized")}},async listOAuthGrants(){return this.client?this.client.auth.oauth.listGrants():{data:null,error:Error("Client not initialized")}},async revokeOAuthGrant(e){return this.client?this.client.auth.oauth.revokeGrant({clientId:e}):{data:null,error:Error("Client not initialized")}},setupAuthListener(e){if(!this.client)return console.warn("[Auth] Client not initialized"),null;let{data:{subscription:t}}=this.client.auth.onAuthStateChange((t,i)=>{e(t,i)});return t},async enrollTOTP(e){if(!this.client)throw Error("Client not initialized");let{data:t,error:i}=await this.client.auth.mfa.enroll({factorType:"totp",friendlyName:e});if(i)throw i;return t},async verifyTOTPEnrollment(e,t){if(!this.client)throw Error("Client not initialized");let{data:i,error:n}=await this.client.auth.mfa.challengeAndVerify({factorId:e,code:t});if(n)throw n;return i},async challengeMFA(e){if(!this.client)throw Error("Client not initialized");let{data:t,error:i}=await this.client.auth.mfa.challenge({factorId:e});if(i)throw i;return t},async verifyMFA(e,t,i){if(!this.client)throw Error("Client not initialized");let{data:n,error:r}=await this.client.auth.mfa.verify({factorId:e,challengeId:t,code:i});if(r)throw r;return n},async unenrollMFA(e){if(!this.client)throw Error("Client not initialized");let{data:t,error:i}=await this.client.auth.mfa.unenroll({factorId:e});if(i)throw i;return t},async listMFAFactors(){if(!this.client)throw Error("Client not initialized");this.initPromise&&await this.initPromise;let{data:e,error:t}=await this.client.auth.mfa.listFactors();if(t)throw t;return e},async getMFALevel(){if(!this.client)throw Error("Client not initialized");this.initPromise&&await this.initPromise;let{data:e,error:t}=await this.client.auth.mfa.getAuthenticatorAssuranceLevel();if(t)throw t;return e},async getCurrentSessionId(){var e,t;if(!this.client)throw Error("Client not initialized");this.initPromise&&await this.initPromise;let{data:i}=await this.client.auth.getSession(),n=null==(e=i.session)?void 0:e.access_token;if(!n)return null;let r=h().decode(n);return null!=(t=null==r?void 0:r.session_id)?t:null}};f.init();let m=f},872016:()=>{}}]);
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.