PageSourceSearch

https://miportalb2b.com/chunk-MPEZZQPC.js

js miportalb2b.com collected 2026-10-02 01:40:09 UTC 3,284 bytes, 1 lines download raw bytes

1import{a as O}from"./chunk-MRR2TXXT.js";import{a as o}from"./chunk-3NGNHTEJ.js";import{a as b,ka as y}from"./chunk-A7CCHMQF.js";import{p as S}from"./chunk-KLYOBZOA.js";import{O as u,ga as m,ja as h,qa as l,u as f,v as p,va as d}from"./chunk-3XAJQCT5.js";import{a as c,b as g}from"./chunk-7UXVQ3GW.js";var v=(()=>{let r=class r{constructor(){this.storageKey="onboarding-storage-payload-v1",this.updatedAtKey="onboarding-updated-at"}saveOnboardingData(t){o.set(this.storageKey,t),o.set(this.updatedAtKey,new Date().toISOString())}getOnboardingData(){return this.getStoragePayload()?.onboardings.map(t=>this.mapToOnboardingModule(t))??[]}removeOnboardingData(t,e){let a=this.getStoragePayload();if(!a)return!1;let n=a.onboardings.findIndex(s=>e==null?s.moduleName===t:s.moduleName===t&&s.onboardingId===e);return n===-1?!1:(o.set(this.storageKey,g(c({},a),{onboardings:a.onboardings.filter((s,I)=>I!==n)})),!0)}getLastOnboardingView(){return this.getStoragePayload()?.lastOnboardingView??null}updateLastOnboardingView(t=new Date().toISOString()){let e=this.getStoragePayload();e&&o.set(this.storageKey,g(c({},e),{lastOnboardingView:t}))}getOnboardingUpdatedAt(){let t=o.get(this.updatedAtKey);if(!t)return null;try{let e=JSON.parse(t);return typeof e=="string"?e:null}catch{return t}}clearOnboardingData(){o.remove(this.storageKey),o.remove(this.updatedAtKey)}getStoragePayload(){let t=o.get(this.storageKey);if(!t)return null;try{let e=JSON.parse(t);return this.isValidStoragePayload(e)?e:null}catch{return null}}isValidStoragePayload(t){if(!t||typeof t!="object")return!1;let e=t;return(e.lastOnboardingView==null||typeof e.lastOnboardingView=="string")&&Array.isArray(e.onboardings)}mapToOnboardingModule(t){return{onboardingId:t.onboardingId,moduleName:t.moduleName,steps:[...t.templateDetails].sort((e,a)=>e.order-a.order).map(e=>this.mapToOnboardingStep(e))}}mapToOnboardingStep(t){return{element:`#${t.elementId}`,title:t.title,description:t.description,side:t.cardLocation,align:t.textAlign}}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();var U=(()=>{let r=class r{constructor(){this.apiService=d(y),this.isMobileService=d(O),this.onboardingStorageService=d(v),this.store=d(S)}postOnboardingStatus(t,e,a){return p([this.store.select("client"),this.store.select("user")]).pipe(u(1),m(([n,s])=>this.apiService.post(`clients/${n.clientId}/onboarding/${t}`,b.POST_ONBOARDING_STATUS,{email:s.email??"",status:e,stepNumber:a},{targetApi:"serverUrlPublic",ngxSpinner:!1,showError:!1})))}syncOnboardingData(){return p([this.store.select("client"),this.store.select("user")]).pipe(u(1),m(([t,e])=>this.apiService.get(this.buildOnboardingEndpoint(t.clientId,e.email),b.GET_ONBOARDING,{targetApi:"serverUrlPublic",showError:!1})),f(t=>t.data),h(t=>{console.log("[OnboardingSourceService] GET /onboarding response",t),this.onboardingStorageService.saveOnboardingData(t)}))}buildOnboardingEndpoint(t,e){let a=this.isMobileService.isMobile?"B2B-MOBILE":"B2B-WEB",n=new URLSearchParams({platform:a,email:e??""});return`clients/${t}/onboarding?${n.toString()}`}};r.\u0275fac=function(e){return new(e||r)},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();export{v as a,U as b};

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.