PageSourceSearch

https://app.dapta.ai/chunk-BWQKLL73.js

js dapta.ai collected 2026-09-29 00:03:27 UTC 27,603 bytes, 1 lines download raw bytes

1import{a as J}from"./chunk-5YSAYTAR.js";import{a as Ke,b as qe}from"./chunk-6E47ZVO3.js";import{a as de}from"./chunk-EFA7JNQ3.js";import{a as je,g as _e}from"./chunk-Q3TLY3RL.js";import{a as me}from"./chunk-GVHGWNWH.js";import{Ba as Ge,Na as Ne,Oa as Fe,Ua as re}from"./chunk-KMATS7MR.js";import{a as Ve}from"./chunk-JZVF4UFD.js";import{a as Ue}from"./chunk-IXYALPCC.js";import{a as ze}from"./chunk-YLMGPHJT.js";import{a as z,b as L}from"./chunk-TW5YOGRO.js";import{a as We}from"./chunk-AV4I7H6P.js";import{d as ie,f as He,g as De}from"./chunk-MIJHCTDG.js";import{R as Le,U as B,e as pe,l as Re}from"./chunk-PZHDZNOO.js";import{a as ne}from"./chunk-GGODJQRR.js";import{Db as k,Ec as Be,Fa as A,Fb as C,Hb as _,Ic as Ee,La as c,Md as P,Na as we,Oc as Me,Pb as Ce,Qb as Pe,Vc as Ae,Wa as X,Wb as v,Xb as R,Xc as ee,Yb as Ie,a as ue,ab as I,e as ve,ea as a,jc as ke,la as x,ma as w,md as te,qc as Oe,r as K,ra as ye,rb as s,s as $,sb as p,tb as m,ua as Se,ub as D,vc as g,wc as h,yb as q,za as xe,zb as Y,zc as Te}from"./chunk-NMIDHYRA.js";import{a as ce,b as le,k as T}from"./chunk-ZOCHBAGS.js";var lt=["bannerTop"],ut=(t,r,e,n,i)=>({"banner--warning":t,"banner--hidden":r,"banner--announcement":e,"banner--promo":n,"banner--danger":i});function pt(t,r){t&1&&(p(0,"span")(1,"span",6),v(2),g(3,"translate"),m(),v(4,"\xA0"),p(5,"span",7),v(6),g(7,"translate"),m()()),t&2&&(c(2),R(h(3,2,"something-went-wrong-with-your-payment")),c(4),R(h(7,4,"please-verify-your-information-or-update-your-payment-method-to-continue")))}function dt(t,r){t&1&&(p(0,"span")(1,"span",6),v(2),g(3,"translate"),m(),v(4,"\xA0"),p(5,"span",7),v(6),g(7,"translate"),m()()),t&2&&(c(2),R(h(3,2,"you-are-about-to-run-out-of-credits")),c(4),R(h(7,4,"its-time-to-take-your-experience-to-the-next-level-upgrade-your-plan-and-keep-making-the-most-of-dapta")))}function mt(t,r){t&1&&(p(0,"span")(1,"span",6),v(2),g(3,"translate"),m(),v(4,"\xA0"),p(5,"span",7),v(6),g(7,"translate"),m()()),t&2&&(c(2),R(h(3,2,"you-are-about-to-run-out-of-credits")),c(4),R(h(7,4,"its-time-to-take-your-experience-to-the-next-level-upgrade-your-plan-and-keep-making-the-most-of-dapta")))}function _t(t,r){if(t&1&&(p(0,"span")(1,"span",6),v(2),g(3,"translate"),m(),v(4,"\xA0"),p(5,"span",7),v(6),g(7,"translate"),m()()),t&2){let e=_(4);c(2),R(e.cancelled?"You have cancelled your plan":h(3,2,"you-are-out-of-credits")),c(4),Ie(" ",h(7,4,"its-time-to-take-your-experience-to-the-next-level-upgrade-your-plan-and-keep-making-the-most-of-dapta-0")," ")}}function gt(t,r){if(t&1&&(q(0),D(1,"span",5),I(2,pt,8,6,"span",1)(3,dt,8,6,"span",1)(4,mt,8,6,"span",1)(5,_t,8,6,"span",1),Y()),t&2){let e=_(3);c(2),s("ngIf",e.past_due),c(),s("ngIf",e.warning&&!e.past_due&&!e.danger),c(),s("ngIf",e.creditsCritical&&!e.past_due&&!e.cancelled),c(),s("ngIf",(e.creditsExhausted||e.cancelled)&&!e.past_due)}}function ft(t,r){if(t&1&&(q(0),D(1,"span",8),Y()),t&2){let e=_(3);c(),s("innerHTML",e.announcement==null?null:e.announcement.message,A)}}function ht(t,r){if(t&1){let e=k();p(0,"dui-button",11),g(1,"translate"),C("onClick",function(){x(e);let i=_(4);return w(i.redirectoSubscriptionPage())}),m()}t&2&&s("compact",!0)("label",h(1,2,"update-payment-method"))}function bt(t,r){if(t&1){let e=k();p(0,"dui-button",11),g(1,"translate"),C("onClick",function(){x(e);let i=_(4);return w(i.renewSubscription())}),m()}t&2&&s("compact",!0)("label",h(1,2,"get-more-credits"))}function vt(t,r){if(t&1){let e=k();p(0,"dui-button",11),g(1,"translate"),C("onClick",function(){x(e);let i=_(4);return w(i.renewSubscription())}),m()}t&2&&s("compact",!0)("label",h(1,2,"get-more-credits"))}function yt(t,r){if(t&1){let e=k();p(0,"dui-button",11),g(1,"translate"),C("onClick",function(){x(e);let i=_(4);return w(i.renewSubscription())}),m()}t&2&&s("compact",!0)("label",h(1,2,"upgrade-plan"))}function St(t,r){if(t&1){let e=k();p(0,"dui-button",11),g(1,"translate"),C("onClick",function(){x(e);let i=_(4);return w(i.renewSubscription())}),m()}t&2&&s("compact",!0)("label",h(1,2,"upgrade-now"))}function xt(t,r){if(t&1){let e=k();p(0,"div",12),C("click",function(){x(e);let i=_(4);return w(i.close())}),m()}}function wt(t,r){if(t&1&&(q(0),I(1,ht,2,4,"dui-button",9)(2,bt,2,4,"dui-button",9)(3,vt,2,4,"dui-button",9)(4,yt,2,4,"dui-button",9)(5,St,2,4,"dui-button",9)(6,xt,1,0,"div",10),Y()),t&2){let e=_(3);c(),s("ngIf",e.past_due),c(),s("ngIf",e.warning&&!e.past_due&&!e.cancelled),c(),s("ngIf",e.creditsCritical&&!e.past_due&&!e.cancelled),c(),s("ngIf",e.creditsExhausted&&!e.past_due&&!e.cancelled),c(),s("ngIf",e.cancelled&&!e.past_due&&!e.warning),c(),s("ngIf",e.warning)}}function Ct(t,r){if(t&1){let e=k();q(0),p(1,"dui-button",13),C("onClick",function(){x(e);let i=_(3);return w(i.announcementAction())}),m(),p(2,"div",12),C("click",function(){x(e);let i=_(3);return w(i.close())}),m(),Y()}if(t&2){let e=_(3);c(),s("compact",!0)("styleClass",e.isPromo?"dapta-button--promo":"")("label",e.announcement.text_button)}}function Pt(t,r){if(t&1&&(p(0,"div",3,0)(2,"div",4),I(3,gt,6,4,"ng-container",1)(4,ft,2,1,"ng-container",1),m(),I(5,wt,7,6,"ng-container",1)(6,Ct,3,3,"ng-container",1),m()),t&2){let e=_(2);s("ngClass",Oe(5,ut,e.warning,e.closed,e.showAnnouncement,e.isPromo,e.past_due||e.danger)),c(3),s("ngIf",!e.showAnnouncement),c(),s("ngIf",e.showAnnouncement),c(),s("ngIf",!e.showAnnouncement),c(),s("ngIf",e.showAnnouncement&&e.announcement&&e.announcement.text_button)}}function It(t,r){if(t&1&&(p(0,"div"),I(1,Pt,7,11,"div",2),m()),t&2){let e=_();c(),s("ngIf",e.past_due||e.warning||e.danger||e.showAnnouncement)}}var kt=800,Ot=50,Tt=1e3,$t=(()=>
1{let r=class r{constructor(){this.bannerTop=Ee("bannerTop"),this.layoutService=a(re),this.billingService=a(Fe),this.daptaAlertController=a(ze),this.daptaToastController=a(Ve),this.router=a(P),this.authService=a(L),this.bannerPayService=a(Ge),this.translateService=a(ie),this.iamAuthService=a(B),this.ngZone=a(we),this.destroyRef=a(ye),this.cdr=a(Me),this.isMobile=Se(this.computeIsMobile()),this.pendingTimeouts=new Set,this.onWindowResize=()=>{let n=this.computeIsMobile();n!==this.isMobile()&&this.isMobile.set(n),this.publishBannerHeight()},this.closed=!1,this.showAnnouncement=!1,this.isPromo=!1,this.announcement=null,this.planSub=new ue,this.promoTimeSub=new ue,Be(()=>{let n=this.bannerTop();this.attachResizeObserver(n?.nativeElement)}),window.addEventListener("resize",this.onWindowResize,{passive:!0}),this.destroyRef.onDestroy(()=>{window.removeEventListener("resize",this.onWindowResize)})}ngOnDestroy(){this.planSub.unsubscribe(),this.promoTimeSub.unsubscribe(),this.clearPendingTimeouts(),this.detachResizeObserver()}get isBillingPage(){return this.router.url.includes("billing")}get past_due(){return this.billingService.past_due}get extensionsLoaded(){return!this.billingService.extensionsLoaded.length}get isOnboardingPage(){return this.router.url.includes("profile-use-case")}get paymentStatus(){return this.iamAuthService.ngxsAuthState?.accountDetailsWorkspace?.status?.name||""}get plan(){return this.billingService.currentPlan}get progress(){return this.billingService.progress}get warning(){return this.billingService.warning}get danger(){return this.billingService.danger}get creditsCritical(){return!this.plan?.capacity?.unlimited_credits&&this.progress>=99&&this.progress<100}get creditsExhausted(){return!this.plan?.capacity?.unlimited_credits&&this.progress>=100}get cancelled(){return this.billingService.cancelled}get isTrialing(){return this.iamAuthService.ngxsAuthState?.accountDetailsWorkspace?.status?.name===Le.TRIALING}ngOnInit(){this.authService.isWhiteBrand||this.cancelled||(this.planSub=this.billingService.planSubject.subscribe(()=>{this.handlePromoLogic(),this.scheduleVisibilitySync()}),this.billingService.billingPlans?.length>0&&(this.handlePromoLogic(),this.scheduleVisibilitySync()))}handlePromoLogic(){if(this.isTrialing)return;this.billingService.billingPlans.forEach(i=>{this.billingService.promo_time_subjects[i.value]||(this.billingService.promo_time_subjects[i.value]=new ve)});let n=this.billingService.billingPlans.find(i=>i.promo_data?.main_promo===!0||i.promo_data?.main_promo_free===!0);n&&(n.promo_data&&n.promo_data.is_promo_active||this.paymentStatus==="FREE")&&(this.billingService.startCountdown(n.promo_data,n.value),this.promoTimeSub.unsubscribe(),this.promoTimeSub=this.billingService.promo_time_subjects[n.value].subscribe(i=>{let o=n.promo_data?.promo_title||this.translateService.instant("promo-text-free");this.isPromo=!0,this.showAnnouncement=!0,this.announcement={message:o.replace("{{time_left}}",i.time_left),text_button:this.translateService.instant("GET_OFFER_NOW"),action:"redirect",url_redirect:"/billing/plans"},i.percentage_left===0&&(this.showAnnouncement=!1,this.isPromo=!1,this.announcement=null,this.promoTimeSub.unsubscribe()),this.cdr.markForCheck(),this.scheduleVisibilitySync()}))}scheduleVisibilitySync(){this.trackTimeout(setTimeout(()=>{let n=this.bannerTop()?.nativeElement,i=!!n&&n.offsetHeight>0;(this.past_due||this.warning||this.danger||this.showAnnouncement||i)&&n?.innerText?this.bannerPayService.changeBannerPayVisibility({show:!0,bannerTop:this.bannerTop()}):this.bannerPayService.changeBannerPayVisibility({show:!1})},Tt))}redirectoSubscriptionPage(){return T(this,null,function*(){try{this.daptaAlertController.startLoading();let n=yield this.billingService.getBillingSubscriptionPage();window.location.href=n}catch{this.daptaToastController.handleError({message:"Error getting subscription page, please contact support."})}finally{this.daptaAlertController.stopLoading()}})}renewSubscription(){this.billingService.openRefillPopUp("banner")}close(){if(this.showAnnouncement&&(this.showAnnouncement=!1,this.warning||this.danger||this.past_due)){this.cdr.markForCheck();return}this.closed=!0;let n=this.bannerTop()?.nativeElement;(!n||n.offsetHeight===0)&&this.bannerPayService.changeBannerPayVisibility({show:!1}),this.cdr.markForCheck()}announcementAction(){this.announcement&&this.announcement.action==="redirect"&&(this.announcement.url_redirect.includes("http")?window.open(this.announcement.url_redirect,"_blank"):this.router.navigateByUrl(this.announcement.url_redirect))}computeIsMobile(){return window.innerWidth<=kt}measureHeight(n,i){let o=i?.borderBoxSize?.[0]?.blockSize,u=typeof o=="number"?o:n.offsetHeight;return this.isMobile()?u+Ot:u}
1publishBannerHeight(n){let i=this.observedElement,o=i?this.measureHeight(i,n):0;this.layoutService.bannerHeight!==o&&(this.layoutService.bannerHeight=o)}attachResizeObserver(n){if(n!==this.observedElement){if(this.detachResizeObserver(),!n||this.authService.isWhiteBrand){this.layoutService.bannerHeight!==0&&(this.layoutService.bannerHeight=0);return}this.observedElement=n,this.ngZone.runOutsideAngular(()=>{this.resizeObserver=new ResizeObserver(i=>{let o=i[0];if(!o||!this.observedElement)return;let u=this.measureHeight(this.observedElement,o);this.layoutService.bannerHeight!==u&&this.ngZone.run(()=>{this.layoutService.bannerHeight=u})}),this.resizeObserver.observe(n)}),this.publishBannerHeight()}}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.observedElement=void 0}trackTimeout(n){this.pendingTimeouts.add(n)}clearPendingTimeouts(){for(let n of this.pendingTimeouts)clearTimeout(n);this.pendingTimeouts.clear()}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=X({type:r,selectors:[["app-banner-pay"]],viewQuery:function(i,o){i&1&&Ce(o.bannerTop,lt,5),i&2&&Pe()},decls:1,vars:1,consts:[["bannerTop",""],[4,"ngIf"],["class","banner",3,"ngClass",4,"ngIf"],[1,"banner",3,"ngClass"],[1,"flex","align-items--center","gap--4"],[1,"bx","bx-error","common-icon"],[1,"banner__text--bold"],[1,"banner__text","pointer"],[3,"innerHTML"],["buttonColor","white",3,"compact","label","onClick",4,"ngIf"],["class","bx bx-x close-button pointer",3,"click",4,"ngIf"],["buttonColor","white",3,"onClick","compact","label"],[1,"bx","bx-x","close-button","pointer",3,"click"],["buttonColor","white",3,"onClick","compact","styleClass","label"]],template:function(i,o){i&1&&I(0,It,2,1,"div",1),i&2&&s("ngIf",o.extensionsLoaded&&!o.isOnboardingPage&&!o.layoutService.sidebarHidden())},dependencies:[te,Ae,ee,De,ne,He],styles:[".banner[_ngcontent-%COMP%]{min-height:34px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:4px;text-align:center;position:relative;z-index:10000000000;color:#fff}.banner--warning[_ngcontent-%COMP%]{background-color:var(--warning-250)}.banner--announcement[_ngcontent-%COMP%]{background-color:var(--secondary-400)}.banner--announcement[_ngcontent-%COMP%]{background-color:#4c5723}.banner--danger[_ngcontent-%COMP%]{background-color:var(--danger-550)}.banner--promo[_ngcontent-%COMP%]{background-color:var(--primary-500);color:var(--primary-contrast)}.banner--hidden[_ngcontent-%COMP%]{display:none}.banner__text--underline[_ngcontent-%COMP%]{text-decoration:underline}.banner__text--bold[_ngcontent-%COMP%]{font-weight:var(--font-weight-semibold)}.dapta-button--white[_ngcontent-%COMP%]{font-size:var(--font-size-body);padding:4px 16px;border-radius:8px}[_nghost-%COMP%]     .banner:not(.banner--promo) .p-button-contrast{background:transparent;border-color:#fafafa;color:#fafafa}[_nghost-%COMP%]     .banner:not(.banner--promo) .p-button-contrast .p-button-label{color:#fafafa}[_nghost-%COMP%]     .banner:not(.banner--promo) .p-button-contrast:enabled:hover, [_nghost-%COMP%]     .banner:not(.banner--promo) .p-button-contrast:enabled:focus, [_nghost-%COMP%]     .banner:not(.banner--promo) .p-button-contrast:enabled:active{background:#ffffff26;border-color:#fafafa;color:#fafafa}[_nghost-%COMP%]     .dapta-button--promo.p-button{background:#000;border-color:#000;color:#fff;font-weight:var(--font-weight-semibold);margin-left:16px}[_nghost-%COMP%]     .dapta-button--promo.p-button .p-button-label{color:#fff;font-weight:var(--font-weight-semibold)}[_nghost-%COMP%]     .dapta-button--promo.p-button:hover, [_nghost-%COMP%]     .dapta-button--promo.p-button:focus{background:#1a1a1a;border-color:#1a1a1a;color:#fff}.close-button[_ngcontent-%COMP%]{position:absolute;right:4px;font-size:24px}.banner--promo[_ngcontent-%COMP%]   .close-button[_ngcontent-%COMP%]{color:#000}"],changeDetection:0});let t=r;return t})();var bn=(t,r)=>T(null,null,function*(){let e=a(B),n=a(L),i=a(P),o=a(pe),u=a(re),f=a(We),l=a(ie),H=a(Ue),V=a(je),E=a(J);if(n.isWhiteBrand&&!localStorage.getItem("iam_access_token"))return i.navigate(["/client-login"]),!1;if(localStorage.getItem("workos_logout_in_progress")||sessionStorage.getItem("logout_in_progress")||localStorage.getItem("logout_timestamp"))return localStorage.removeItem("workos_logout_in_progress"),sessionStorage.removeItem("logout_in_progress"),localStorage.removeItem("logout_timestamp"),e.initiateLogin(),!1;let Q=new URLSearchParams(window.location.search),$e=Q.has("session"),Xe=Q.has("error"),oe=$e||Xe;oe&&e.beginHandoff();try{if(oe&&!(yield e.processCallback(Q)))return e.initiateLogin(),!1;if(localStorage.getItem("iam_access_token")){if(!e.validToken()&&!(yield e.refreshToken()))return!1;try{let y=null,U=localStorage.getItem("iam_access_token");U&&(y=e.decodeJWT(U)?.account_id);let ae=localStorage.getItem(z.WORKSPACE_ID),W=Q.get("orbit_redirect"),ge="";(W||ae)&&(ge=W||ae||"");let G=yield $(e.getAccountAuthDetail(y,ge)),d=G?.account||{},N=G?.workspace||{},S=null,O=null;d?.owner?.id&&(S={id:d.owner.id,email:d.owner.email,name:d.owner.name,type:d.owner.type,country:d.owner.country,phone_number:d.owner.phone_number,last_name:d.owner?.last_name||"",language:d.owner?.language||"",created_at:d.owner?.created_at||""},f.identify(S?.email||""));let F={subscription_type:d.subscription_type,status:d.status,stripe_customer_id:d.stripe_customer_id||"",created_at:d.created_at||"",subscription_type_id:d.subscription_type_id||"",account_status_id:d.account_status_id||"",feature_flags:d?.feature_flags||{},name:d?.name||"",user_owner_id:d?.user_id||"",annual_plan:d?.annual_plan||!1},fe=F.feature_flags?.last_workspace,et={email:S?.email||"",name:S?.name||"",dapta_user_country:S?.country||"",dapta_account_created_at:d.created_at||"",dapta_user_created_at:S?.created_at||"",dapta_subscription_type:d.subscription_type?.name||"",dapta_account_status:d.status?.name||""};f.setPersonProperties(et);let j={};if(W&&N?.id&&localStorage.setItem(z.WORKSPACE_ID,W),!localStorage.getItem(z.WORKSPACE_ID))V.updateUserData({last_ip:V.getIpAddress(),last_browser:V.getBrowserName(),last_device:V.getDeviceType()}
1,S?.id),fe?O=fe:N?.id&&(O=N?.id||"",e.updateMyAccount(y,{feature_flags:le(ce({},F.feature_flags),{last_workspace:O})}).subscribe()),localStorage.setItem(z.WORKSPACE_ID,O),j=N;else if(O=localStorage.getItem(z.WORKSPACE_ID),O)j=N,F.feature_flags?.last_workspace!==O&&e.updateMyAccount(y,{feature_flags:le(ce({},F.feature_flags),{last_workspace:O})}).subscribe();else return console.error("\u274C [IAMAuthGuard] Invalid workspace response, redirecting to login"),yield e.logout(),!1;let he=j?.account_id;if(!he)return!1;let tt=j?.users||[],se=[];try{se=G?.related_workspaces||[]}catch(M){console.error("Error loading related workspaces:",M),se=[]}e.setMembersIam(tt),e.setRelatedWorkspaceIam(se);let b=G?.workspace_account||{},nt=G?.permissions||null;if(o.dispatch(new Re({user:S,workspaceId:O,accountId:y,accountDetails:F,workspaceAccountId:he,workspaceName:j?.name||"",stripeCustomerId:b?.stripe_customer_id||"",accountDetailsWorkspace:{subscription_type:b?.subscription_type,status:b?.status,stripe_customer_id:b?.stripe_customer_id||"",created_at:b?.created_at||"",subscription_type_id:b?.subscription_type_id||"",account_status_id:b?.account_status_id||"",feature_flags:b?.feature_flags||{},name:b?.name||"",user_owner_id:b?.user_id||"",whiteBrandData:b?.white_label||null,email:b?.owner?.email||null,annual_plan:b?.annual_plan||!1},userPermissions:nt||null})),S?.language&&["en","es"].includes(S.language))l.use(S.language);else{let M=l.getBrowserLang(),at=M&&M.match(/en|es/)?M:"en";l.use(at)}if(n.isWhiteBrand){let M=yield $(e.getWhiteLabelData(location.host));o.dispatch(new me(M))}let Z=r.url.split("?")[0]||"",it=Z.startsWith("/agents-studio/inbox"),rt=Z==="/home"||Z==="/",ot=Z.startsWith("/onboarding");if(de(S?.email)&&!it&&!rt&&!ot)return i.navigate(["/home"]),!1;let be=localStorage.getItem(J.REDIRECT_KEY);return be?(localStorage.removeItem(J.REDIRECT_KEY),i.navigate([be]),!1):!0}catch(y){return console.error("\u274C [IAMAuthGuard] Error during guard execution, redirecting to login:",y),yield e.logout(),!1}}else{let y=t.data?.publicRedirect;if(y)return i.navigate([y],{queryParams:t.queryParams}),!1;let U=t.queryParams.call_dapta_id;if(U&&r.url.includes("calls-history"))return i.navigate(["/public/voice-agent-call"],{queryParams:{call_id:U}}),!1;(r.url.split("?")[0]||"").startsWith("/billing/plans")&&(E.captureFromUrl(),localStorage.setItem(J.REDIRECT_KEY,"/billing/plans"));let W=e.captureUTMParams();return e.initiateLogin(void 0,void 0,W),!1}}finally{oe&&e.endHandoff()}});var vn=(t,r)=>{let e=a(B),n=a(P),i=e.ngxsAuthState?.user?.email;if(!de(i))return!0;let o=r.url.split("?")[0]||"",u=o.startsWith("/agents-studio/inbox"),f=o==="/home"||o==="/",l=o.startsWith("/onboarding");return u||f||l?!0:(n.navigate(["/home"]),!1)},yn=(t,r)=>T(null,null,function*(){let e=a(B),n=a(pe),i=a(L),o=a(P);if(!i.isWhiteBrand||localStorage.getItem("iam_access_token"))return o.navigate(["/home"]),!1;let u=yield $(e.getWhiteLabelData(location.host));return n.dispatch(new me(u)),!0});var Je=t=>t.ngxsAuthState?.user?.id||"",Qe=t=>{let r=t.ngxsAuthState?.accountDetails?.user_owner_id||"",e=t.ngxsAuthState?.accountDetailsWorkspace?.user_owner_id||"";return r!==e&&!!r&&!!e},Bt=t=>`invited_user_onboarding_completed_${t.ngxsAuthState?.user?.id||""}`,Et=t=>{let r=Bt(t);if(!r||r==="invited_user_onboarding_completed_")return!1;try{let e=localStorage.getItem(r);if(e)return JSON.parse(e).completed===!0}catch(e){console.warn("[OnboardingGuard] Failed to parse invited user cache:",e)}return!1},Ye=t=>{let r=t.ngxsAuthState?.user,e=!!r?.phone_number&&r.phone_number.trim().length>0,n=!!r?.name&&r.name.trim().length>0,i=!!r?.last_name&&r.last_name.trim().length>0,o=!!r?.language&&r.language.trim().length>0;return e&&n&&i&&o},Ze=(t,r,e)=>T(null,null,function*(){if(Et(t))return!0;let n=r.getCurrentStatus();return n!==null?n.has_completed_onboarding||n.is_migrated_user||!1?(console.log("[OnboardingGuard] Invited user - Onboarding completed (from BehaviorSubject)"),!0):Ye(t)?(console.log("[OnboardingGuard] Invited user - Has required fields (fallback from cache)"),!0):!1:(yield K(r.checkOnboardingStatus(e)))?(console.log("[OnboardingGuard] Invited user - Onboarding completed (from backend)"),!0):Ye(t)?(console.log("[OnboardingGuard] Invited user - Has required fields (fallback)"),!0):!1}),Tn=()=>T(null,null,function*(){let t=a(B),r=a(_e),e=a(L),n=a(P);if(e.isWhiteBrand)return n.navigateByUrl("/home"),!1;let i=Je(t);if(!i)return n.navigateByUrl("/home"),!1;r.loadQuestions();try{if(Qe(t))return(yield Ze(t,r,i))?(n.navigateByUrl("/home"),!1):!0;let o=localStorage.getItem(`onboarding_completed_${i}`);if(o)try{let l=JSON.parse(o);if(l.completed||l.is_migrated_user)return console.log("[OnboardingGuard] Onboarding completed (from localStorage), redirecting to home"),n.navigateByUrl("/home"),!1}catch(l){console.warn("[OnboardingGuard] Failed to parse cache:",l)}let u=r.getCurrentStatus();return u&&(u.has_completed_onboarding||u.is_migrated_user||!1)?(console.log("[OnboardingGuard] Onboarding completed (from BehaviorSubject), redirecting to home"),n.navigateByUrl("/home"),!1):(console.log("[OnboardingGuard] 
1No cache found, checking backend with userId:",i),(yield K(r.checkOnboardingStatus(i)))?(n.navigateByUrl("/home"),!1):!0)}catch(o){return console.error("[OnboardingGuard] Error checking onboarding status:",o),n.navigateByUrl("/home"),!1}}),Bn=()=>T(null,null,function*(){let t=a(B),r=a(_e),e=a(L),n=a(P),i=new URLSearchParams(window.location.search),o=i.get("prompt_token");if(o)try{let l=yield K(t.getLandingPrompt(o));l?.text&&localStorage.setItem("landing_prompt",l.text)}catch{}let u=()=>o?n.parseUrl("/dapti"):!0;if(i.get("chat-landing")==="true"&&t.captureAndStoreUtmParams(),e.isWhiteBrand)return!0;let f=Je(t);if(!f)return!0;try{if(Qe(t))return(yield Ze(t,r,f))?u():(n.navigateByUrl("/onboarding?step=1"),!1);let l=localStorage.getItem(`onboarding_completed_${f}`);if(l)try{let E=JSON.parse(l);if(E.completed||E.is_migrated_user)return console.log("[OnboardingRedirectGuard] Onboarding completed (from localStorage)"),u()}catch(E){console.warn("[OnboardingRedirectGuard] Failed to parse cache:",E)}let H=r.getCurrentStatus();return H?H.has_completed_onboarding||H.is_migrated_user||!1?(console.log("[OnboardingRedirectGuard] Onboarding completed (from BehaviorSubject)"),u()):(console.log("[OnboardingRedirectGuard] Onboarding NOT completed, redirecting"),n.navigateByUrl("/onboarding?step=1"),!1):(yield K(r.checkOnboardingStatus(f)))?u():(n.navigateByUrl("/onboarding?step=1"),!1)}catch(l){return console.error("[OnboardingRedirectGuard] Error checking onboarding status:",l),!0}});function Mt(t,r){if(t&1){let e=k();p(0,"dui-button",12),C("onClick",function(){x(e);let i=_(2);return w(i.reload())}),m()}if(t&2){let e=_(2);s("label",e.message.button_text)}}function At(t,r){if(t&1&&(p(0,"div",1),D(1,"img",2),p(2,"div",3),D(3,"img",4),p(4,"div",5),D(5,"h1",6)(6,"p",7)(7,"p",8)(8,"p",9)(9,"p",10),I(10,Mt,1,1,"dui-button",11),m()()()),t&2){let e=_();c(5),s("innerHTML",e.message.title,A),c(),s("innerHTML",e.message.description,A),c(),s("innerHTML",e.message.activity,A),c(),s("innerHTML",e.message.time,A),c(),s("innerHTML",e.message.contact,A),c(),s("ngIf",e.message.show_button)}}var Un=(()=>{let r=class r{constructor(){this.errorInterceptor=a(Ne),this.elementRef=a(xe),this.router=a(P)}get url(){return this.router.url}get message(){return this.errorInterceptor.message}get urls(){return this.message.urls}ngOnInit(){this.setIntercom(),this.elementRef.nativeElement.parentElement&&(this.elementRef.nativeElement.parentElement.style.position="relative")}setIntercom(){try{(function(){var n=window,i=n.Intercom;if(typeof i=="function")i("reattach_activator"),i("update",n.intercomSettings);else{var o=document,u=function(){u.c(arguments)};u.q=[],u.c=function(l){u.q.push(l)},n.Intercom=u;var f=function(){var l=o.createElement("script");l.type="text/javascript",l.async=!0,l.src="https://widget.intercom.io/widget/nyuci7zv";var H=o.getElementsByTagName("script")[0];H.parentNode.insertBefore(l,H)};document.readyState==="complete"?f():n.attachEvent?n.attachEvent("onload",f):n.addEventListener("load",f,!1)}})(),window.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:"nyuci7zv"}}catch(n){console.error("Error setting intercom",n)}}reload(){window.location.reload()}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=X({type:r,selectors:[["app-platform-message"]],features:[ke([Ke])],decls:2,vars:6,consts:[["class","platform-message",4,"ngIf"],[1,"platform-message"],["src","/assets/dapta-gpt/images/logo.png","alt","logo",1,"platform-message__logo"],[1,"platform-message__container"],["src","/assets/home/503_service.svg","alt","",1,"platform-message__image"],[1,"platform-message__text"],[1,"platform-message__title",3,"innerHTML"],[1,"platform-message__description",3,"innerHTML"],[1,"platform-message__activity",3,"innerHTML"],[1,"platform-message__time",3,"innerHTML"],[1,"platform-message__contact",3,"innerHTML"],["styleClass","margin-top--16",3,"label","onClick",4,"ngIf"],["styleClass","margin-top--16",3,"onClick","label"]],template:function(i,o){i&1&&(I(0,At,11,6,"div",0),g(1,"some")),i&2&&s("ngIf",!(o.urls!=null&&o.urls.length)||Te(1,1,(o.urls==null?null:o.urls.length)&&o.urls,"","includes",o.url))},dependencies:[te,ee,ne,qe],styles:[".platform-message[_ngcontent-%COMP%]{height:100%;width:100%;background-color:var(--space-500);position:absolute;top:0;left:0;z-index:1000}.platform-message__logo[_ngcontent-%COMP%]{width:119px;height:39px;position:absolute;top:20px;left:20px}.platform-message__container[_ngcontent-%COMP%]{display:grid;grid-template-columns:50% 50%;height:100%;width:100%;align-items:center}@media screen and (max-width:1000px){.platform-message__container[_ngcontent-%COMP%]{grid-template-columns:100%}}.platform-message__image[_ngcontent-%COMP%]{max-width:598px}@media screen and (max-width:1000px){.platform-message__image[_ngcontent-%COMP%]{display:none}}.platform-message__text[_ngcontent-%COMP%]{max-width:598px;width:100%;font-size:20px;padding:20px;gap:20px}@media screen and (max-width:1000px){.platform-message__text[_ngcontent-%COMP%]{font-size:16px}}.platform-message__title[_ngcontent-%COMP%]{color:var(--primary-400);font-family:var(--input-font-family);font-weight:700;font-size:30px;line-height:32px;letter-spacing:0%;vertical-align:middle}@media screen and (max-width:1000px){.platform-message__title[_ngcontent-%COMP%]{font-size:30px}}.platform-message__description[_ngcontent-%COMP%]{margin-top:16px;font-family:var(--input-font-family);font-weight:300;font-size:20px;line-height:32px;letter-spacing:0%;vertical-align:middle}.platform-message__activity[_ngcontent-%COMP%]{margin-top:24px;font-family:var(--input-font-family);font-weight:300;font-size:20px;line-height:32px;letter-spacing:0%;vertical-align:middle}.platform-message__time[_ngcontent-%COMP%]{margin-top:24px;color:var(--primary-400)}.platform-message__contact[_ngcontent-%COMP%]{margin-top:32px}.dapta-button[_ngcontent-%COMP%]{border-radius:20px;margin-top:24px}"]});let t=r;return t})();export{bn as a,vn as b,yn as c,Tn as d,Bn as e,Un as f,$t as g};

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.