1import{j as e,o as t,s as n}from"./axiosClient-DnVO32-R.js";import{t as r}from"./backend-CC2lXJt_.js";import{K as i}from"./vendor-data-D4IPhVFk.js";import{t as a}from"./base-DLGBKAFy.js";var o=`base44_affiliate_click`,s=2592e6,c=/^af_\d{1,12}$/,l=/^[A-Za-z0-9_.:-]{1,128}$/;function u(e=window.location.search,t=Date.now()){let n=new URLSearchParams(e),r=n.get(`utm_campaign`);if(!r||!c.test(r))return;let i=n.get(`impact_click_id`),a={partnerId:r,clickedAt:t,...i&&l.test(i)?{clickId:i}:{}};try{localStorage.setItem(o,JSON.stringify(a))}catch{}}function d(e=Date.now()){try{let t=JSON.parse(localStorage.getItem(o)??`null`);return!t||!c.test(t.partnerId)||e-t.clickedAt>s?null:{affiliate_partner_id:t.partnerId,...t.clickId&&l.test(t.clickId)?{affiliate_click_id:t.clickId}:{}}}catch{return null}}function f(){let e=d();return e?`&${new URLSearchParams(e).toString()}`:``}var p=1e4,m=null,h=new class extends a{getBaseURL(){return`/auth`}getCurrentUser({fresh:r=!1}={}){let i=`${e(!1)??``}|${t()??``}|${n()??``}`;if(!r&&m&&m.key===i&&Date.now()-m.at<p)return m.promise;let a=this.axios.get(`/me`);return m={key:i,promise:a,at:Date.now()},a.catch(()=>{m?.promise===a&&(m=null)}),a}regenerateApiKey(){return this.axios.post(`/regenerate_api_key`)}getApiKey(){return this.axios.get(`/api_key`)}regenerateBackofficeApiKey(){return this.axios.post(`/regenerate_backoffice_api_key`)}updateUser(e,t){return this.axios.post(`/${e}/update-user`,{...t})}listUsers(e){return this.axios.get(`/list-users`,{params:e})}searchUsers(e,t=100){return this.axios.get(`/search-users`,{params:{search:e,limit:t}})}getUser(e){return this.axios.get(`/${encodeURIComponent(e)}`)}async checkDomainSSO(e){return(await i.get(`${r()}/workspace/public/sso/check-email-or-domain`,{params:{email_or_domain:e}})).data}login(e,t,n=null){let r={email:e,password:t};return n&&(r.turnstile_token=n),this.axios.post(`/login`,r)}register(e,t,n=null,r=null,i=null,a=null,o=null){let s={email:e,password:t};return n&&(s.turnstile_token=n),r&&(s.referral_code=r),i&&(s.marketing_client_id=i),a&&(s.marketing_page_category=a),o&&(s.from_url=o),Object.assign(s,d()),this.axios.post(`/register`,s)}verifyOtp(e,t){return this.axios.post(`/verify-otp`,{email:e,otp_code:t})}resendOtp(e){return this.axios.post(`/resend-otp`,{email:e})}resetPasswordRequest(e,t=null,n=null){let r={email:e};return t&&(r.turnstile_token=t),n&&(r.return_to=n),this.axios.post(`/reset-password-request`,r)}resetPassword(e,t,n=null){let r={reset_token:e,new_password:t};return n&&(r.turnstile_token=n),this.axios.post(`/reset-password`,r)}changePassword(e,t,n){return this.axios.post(`/change-password`,{user_id:e,current_password:t,new_password:n})}logout(){return this.axios.post(`/logout`,void 0,{timeout:5e3})}getUserFeatureFlags(e){return this.axios.get(`/${e}/feature-flags`)}};export{d as i,f as n,u as r,h as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.