1"use strict";(self.webpackChunkharmoni=self.webpackChunkharmoni||[]).push([[1985],{31985:(Pt,E,d)=>{d.r(E),d.d(E,{TroskifteV3Component:()=>Nt});var c=d(10467),t=d(41360),v=d(32881),b=d(89417),_=d(69465),j=d(39741),T=d(73955),a=d(9967),g=d(72784),y=d(66335),w=d(7673);let I=(()=>{class n{firestore=(0,t.WQX)(a._7);auth=(0,t.WQX)(y.Nj);rootCollection="troskifte_beliefs";get uid(){return this.auth.currentUser?.uid??null}getBeliefs(e=["active","verifying","changed"]){const o=this.uid;if(!o)return(0,w.of)([]);const i=(0,a.rJ)(this.firestore,this.rootCollection),r=(0,a.P)(i,(0,a._M)("userId","==",o),(0,a._M)("status","in",e),(0,a.My)("updatedAt","desc"));return(0,a.xs)(r,{idField:"id"})}getBelief(e){const o=(0,a.H9)(this.firestore,this.rootCollection,e);return(0,a.Bg)(o,{idField:"id"})}addBelief(e){var o=this;return(0,c.A)(function*(){const i=o.uid;if(!i)throw new Error("BeliefService: Ingen innlogget bruker");const r=g.Dc.now(),l=e.counterExperiences.filter(m=>!!m.text?.trim()).slice(0,10).map((m,p)=>({id:`${r.toMillis()}_${p}`,text:m.text.trim(),audioPath:null,createdAt:r})),f={userId:i,text:e.text.trim(),feltTruth:o.clampToInt(e.feltTruth,0,100),logicalTruth:o.clampToInt(e.logicalTruth,0,100),emotion:e.emotion,bodyLocation:e.bodyLocation,counterExperiences:l,status:"active",createdAt:r,updatedAt:r,lastIntensityBefore:null,lastIntensityAfter:null,sessionCount:0},h=(0,a.rJ)(o.firestore,o.rootCollection);return(yield(0,a.gS)(h,f)).id})()}updateBelief(e,o){var i=this;return(0,c.A)(function*(){const r=(0,a.H9)(i.firestore,i.rootCollection,e);yield(0,a.mZ)(r,{...o,updatedAt:g.Dc.now()})})()}addCounterExperience(e,o,i){var r=this;return(0,c.A)(function*(){const l=i.trim();if(!l)return;const f=o.counterExperiences||[];if(f.length>=10)return;const h={id:`${Date.now()}`,text:l,audioPath:null,createdAt:g.Dc.now()};yield r.updateBelief(e,{counterExperiences:[...f,h]})})()}archiveBelief(e){var o=this;return(0,c.A)(function*(){yield o.updateBelief(e,{status:"archived"})})()}deleteBelief(e){var o=this;return(0,c.A)(function*(){const i=(0,a.rJ)(o.firestore,o.rootCollection,e,"sessions"),r=(0,a.rJ)(o.firestore,o.rootCollection,e,"checkins"),[l,f]=yield Promise.all([(0,a.GG)(i),(0,a.GG)(r)]),h=[...l.docs,...f.docs];for(let m=0;m<h.length;m+=450){const p=(0,a.wP)(o.firestore);h.slice(m,m+450).forEach(k=>p.delete(k.ref)),yield p.commit()}const u=(0,a.H9)(o.firestore,o.rootCollection,e);yield(0,a.kd)(u)})()}markAsChanged(e){var o=this;return(0,c.A)(function*(){yield o.updateBelief(e,{status:"changed"})})()}addSession(e,o){var i=this;return(0,c.A)(function*(){const r=i.uid;if(!r)throw new Error("BeliefService: Ingen innlogget bruker");const l=i.clampToInt(o.intensityBefore,0,10),f=i.clampToInt(o.intensityAfter,0,10),h=(0,a.rJ)(i.firestore,i.rootCollection,e,"sessions"),u=yield(0,a.gS)(h,{...o,intensityBefore:l,intensityAfter:f,userId:r,createdAt:g.Dc.now()}),m=(0,a.H9)(i.firestore,i.rootCollection,e),p=yield(0,a.GG)((0,a.rJ)(i.firestore,i.rootCollection,e,"sessions")),k=yield i.getBeliefOnce(e);return yield(0,a.mZ)(m,{lastIntensityBefore:l,lastIntensityAfter:f,sessionCount:p.size,status:"active"===k?.status?"verifying":k?.status||"verifying",updatedAt:g.Dc.now()}),u.id})()}listSessions(e){const o=(0,a.rJ)(this.firestore,this.rootCollection,e,"sessions"),i=(0,a.P)(o,(0,a.My)("createdAt","asc"));return(0,a.xs)(i,{idField:"id"})}addCheckin(e,o){var i=this;return(0,c.A)(function*(){const r=i.uid;if(!r)throw new Error("BeliefService: Ingen innlogget bruker");const l=null!==o.reactionStrength?i.clampToInt(o.reactionStrength,0,10):null,f=(0,a.rJ)(i.firestore,i.rootCollection,e,"checkins");if(yield(0,a.gS)(f,{...o,reactionStrength:l,userId:r,createdAt:g.Dc.now()}),!(o.triggered&&null!==l&&l>=6))return{relapse:!1};const u=yield i.getBeliefOnce(e);return!u||"verifying"!==u.status&&"changed"!==u.status?{relapse:!1}:(yield i.updateBelief(e,{status:"active"}),{relapse:!0})})()}listCheckins(e){const o=(0,a.rJ)(this.firestore,this.rootCollection,e,"checkins"),i=(0,a.P)(o,(0,a.My)("createdAt","desc"));return(0,a.xs)(i,{idField:"id"})}canMarkAsChanged(e){var o=this;return(0,c.A)(function*(){const i=yield o.getBeliefOnce(e);if(!i||"verifying"!==i.status)return!1;const r=g.Dc.fromMillis(Date.now()-12096e5),l=(0,a.rJ)(o.firestore,o.rootCollection,e,"checkins"),f=(0,a.P)(l,(0,a._M)("createdAt",">=",r));return!(yield(0,a.GG)(f)).docs.some(m=>{const p=m.data();return p.triggered&&(p.reactionStrength??0)>=6})})()}clampToInt(e,o,i){return Math.max(o,Math.min(i,Math.round(e)))}getBeliefOnce(e){var o=this;return(0,c.A)(function*(){const i=(0,a.H9)(o.firestore,o.rootCollection,e),r=yield(0,a.x7)(i);return r.exists()?{id:r.id,...r.data()}:null})()}static \u0275fac=function(o){return new(o||n)};static \u0275prov=t.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var S=d(42244),O=d(20032);const R=()=>[0,1,2,3,4,5,6,7,8,9,10],P=(n,s)=>({round:n,max:s});
1function A(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.cancelAndCalmDown())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"V3.TROSKIFTE.SESSION_CALM_DOWN")," "))}function z(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG(3);return t.Njj(r.selectIntensityBefore(i))}),t.EFF(1),t.k0s()}if(2&n){const e=s.$implicit,o=t.XpG(3);t.AVh("selected",o.intensityBefore===e),t.R7$(),t.SpI(" ",e," ")}}function G(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",9)(1,"div",10)(2,"span",11),t.EFF(3,"\u{1f9e0}"),t.k0s(),t.j41(4,"h2"),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",12)(8,"p",13),t.EFF(9),t.k0s(),t.j41(10,"p",14),t.EFF(11),t.nI1(12,"translate"),t.k0s(),t.j41(13,"h3",15),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"div",16),t.DNE(17,z,2,3,"button",17),t.k0s()(),t.j41(18,"button",18),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.goToRegulation())}),t.EFF(19),t.nI1(20,"translate"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(5),t.JRh(t.bMT(6,7,"V3.TROSKIFTE.SESSION_ACTIVATE_TITLE")),t.R7$(4),t.SpI('"',e.belief.text,'"'),t.R7$(2),t.JRh(t.bMT(12,9,"V3.TROSKIFTE.SESSION_ACTIVATE_INSTRUCTION")),t.R7$(3),t.JRh(t.bMT(15,11,"V3.TROSKIFTE.SESSION_RATE_BEFORE")),t.R7$(3),t.Y8G("ngForOf",t.lJ4(15,R)),t.R7$(),t.Y8G("disabled",null===e.intensityBefore),t.R7$(),t.SpI(" ",t.bMT(20,13,"V3.COMMON.NEXT")," \u2192 ")}}
1function $(n,s){1&n&&(t.j41(0,"div",20),t.nrm(1,"ion-spinner",21),t.j41(2,"p"),t.EFF(3),t.nI1(4,"translate"),t.k0s()()),2&n&&(t.R7$(3),t.JRh(t.bMT(4,1,"V3.TROSKIFTE.SESSION_REGULATING")))}function B(n,s){if(1&n&&(t.j41(0,"p",29),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.JRh(e.currentCounterExperience.text)}}function D(n,s){if(1&n&&(t.j41(0,"div",30),t.EFF(1),t.k0s()),2&n){const e=t.XpG(3);t.R7$(),t.SpI("",e.countdownSeconds,"s")}}function L(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",31),t.bIt("click",function(){t.eBV(e);const i=t.XpG(3);return t.Njj(i.skipCountdown())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"V3.TROSKIFTE.SESSION_SKIP_COUNTDOWN")," "))}function X(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",32)(1,"button",33),t.bIt("click",function(){t.eBV(e);const i=t.XpG(3);return t.Njj(i.continueRound())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()}2&n&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"V3.TROSKIFTE.SESSION_CONTINUE_ROUND")," \u2192 "))}function K(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",36),t.bIt("click",function(){t.eBV(e);const i=t.XpG(4);return t.Njj(i.continueRound())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"V3.TROSKIFTE.SESSION_ONE_MORE")," "))}function Y(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",32),t.DNE(1,K,3,3,"button",34),t.j41(2,"button",35),t.bIt("click",function(){t.eBV(e);const i=t.XpG(3);return t.Njj(i.finishJuxtaposition())}),t.EFF(3),t.nI1(4,"translate"),t.k0s()()}if(2&n){const e=t.XpG(3);t.R7$(),t.Y8G("ngIf",e.canDoAnotherRound),t.R7$(2),t.SpI(" ",t.bMT(4,2,"V3.TROSKIFTE.SESSION_DONE")," ")}}function J(n,s){if(1&n&&(t.j41(0,"div",9)(1,"div",10)(2,"span",11),t.EFF(3,"\u2696\ufe0f"),t.k0s(),t.j41(4,"h2"),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"p",22),t.EFF(8),t.nI1(9,"translate"),t.k0s()(),t.j41(10,"div",12)(11,"p",23),t.EFF(12),t.k0s(),t.j41(13,"div",24),t.EFF(14,"\u2195"),t.k0s(),t.DNE(15,B,2,1,"p",25),t.j41(16,"p",14),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.DNE(19,D,2,1,"div",26)(20,L,3,3,"button",27),t.k0s(),t.DNE(21,X,4,3,"div",28)(22,Y,5,4,"div",28),t.k0s()),2&n){const e=t.XpG(2);t.R7$(5),t.JRh(t.bMT(6,9,"V3.TROSKIFTE.SESSION_JUXTAPOSE_TITLE")),t.R7$(3),t.JRh(t.i5U(9,11,"V3.TROSKIFTE.SESSION_ROUND",t.l_i(16,P,e.currentRound,e.maxRounds))),t.R7$(4),t.SpI('"',e.belief.text,'"'),t.R7$(3),t.Y8G("ngIf",e.currentCounterExperience),t.R7$(2),t.JRh(t.bMT(18,14,"V3.TROSKIFTE.SESSION_JUXTAPOSE_INSTRUCTION")),t.R7$(2),t.Y8G("ngIf",e.countdownActive),t.R7$(),t.Y8G("ngIf",e.countdownActive),t.R7$(),t.Y8G("ngIf",e.countdownDone&&e.mustContinue),t.R7$(),t.Y8G("ngIf",e.countdownDone&&e.canStopAfterThisRound)}}function U(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",19),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG
1(3);return t.Njj(r.selectIntensityAfter(i))}),t.EFF(1),t.k0s()}if(2&n){const e=s.$implicit,o=t.XpG(3);t.AVh("selected",o.intensityAfter===e),t.R7$(),t.SpI(" ",e," ")}}function H(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",9)(1,"div",10)(2,"span",11),t.EFF(3,"\u2728"),t.k0s(),t.j41(4,"h2"),t.EFF(5),t.nI1(6,"translate"),t.k0s()(),t.j41(7,"div",12)(8,"h3",15),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"div",16),t.DNE(12,U,2,3,"button",17),t.k0s()(),t.j41(13,"button",18),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.saveSession())}),t.EFF(14),t.nI1(15,"translate"),t.nI1(16,"translate"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(5),t.JRh(t.bMT(6,5,"V3.TROSKIFTE.SESSION_AFTER_TITLE")),t.R7$(4),t.JRh(t.bMT(10,7,"V3.TROSKIFTE.SESSION_RATE_AFTER")),t.R7$(3),t.Y8G("ngForOf",t.lJ4(13,R)),t.R7$(),t.Y8G("disabled",null===e.intensityAfter||e.isSaving),t.R7$(),t.SpI(" ",e.isSaving?t.bMT(15,9,"V3.COMMON.SAVE")+"...":t.bMT(16,11,"V3.TROSKIFTE.SESSION_SAVE")," ")}}function W(n,s){1&n&&(t.j41(0,"div",20),t.nrm(1,"ion-s
1pinner",21),t.k0s())}function Q(n,s){if(1&n&&(t.j41(0,"div",6),t.DNE(1,G,21,16,"div",7)(2,$,5,3,"div",8)(3,J,23,19,"div",7)(4,H,17,14,"div",7)(5,W,2,0,"div",8),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf","activate"===e.step),t.R7$(),t.Y8G("ngIf","regulate"===e.step),t.R7$(),t.Y8G("ngIf","juxtapose"===e.step),t.R7$(),t.Y8G("ngIf","after"===e.step),t.R7$(),t.Y8G("ngIf","cancelled"===e.step)}}let q=(()=>{class n{modalController;beliefService;v3Analytics;belief;step="activate";intensityBefore=null;intensityAfter=null;regulatedIntensity=null;currentRound=1;maxRounds=3;currentCounterExperience=null;countdownSeconds=45;countdownActive=!1;countdownDone=!1;countdownInterval=null;sessionStartTime=null;isSaving=!1;constructor(e,o,i){this.modalController=e,this.beliefService=o,this.v3Analytics=i}ngOnInit(){this.sessionStartTime=new Date}ngOnDestroy(){this.clearCountdown()}get counterExperiences(){return this.belief?.counterExperiences||[]}selectIntensityBefore(e){this.intensityBefore=e}selectIntensityAfter(e){this.intensityAfter=e}goToRegulation(){var e=this;return(0,c.A)(function*(){null!==e.intensityBefore&&(e.v3Analytics.logTroskifteSessionStarted(e.belief.id,e.intensityBefore),e.step="regulate",yield e.openRegulationModal())})()}openRegulationModal(){var e=this;return(0,c.A)(function*(){const o=yield e.modalController.create({component:O.F,componentProps:{beliefMode:!0,initialIntensity:e.intensityBefore,initialEmotionValue:e.belief.emotion},cssClass:"sos-modal-v3"});yield o.present();const{data:i}=yield o.onWillDismiss();e.regulatedIntensity="number"==typeof i?.intensityAfter?i.intensityAfter:null,e.startJuxtaposition()})()}startJuxtaposition(){this.currentRound=1,this.pickCounterExperience(),this.step="juxtapose",this.startCountdown()}pickCounterExperience(){const e=this.counterExperiences;
1this.currentCounterExperience=0!==e.length?e[(this.currentRound-1)%e.length]:null}startCountdown(){this.clearCountdown(),this.countdownSeconds=45,this.countdownActive=!0,this.countdownDone=!1,this.countdownInterval=setInterval(()=>{this.countdownSeconds--,this.countdownSeconds<=0&&(this.clearCountdown(),this.countdownActive=!1,this.countdownDone=!0)},1e3)}clearCountdown(){this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null)}skipCountdown(){this.clearCountdown(),this.countdownActive=!1,this.countdownDone=!0}get mustContinue(){return this.currentRound<2}get canStopAfterThisRound(){return this.currentRound>=2}get canDoAnotherRound(){return this.currentRound<3}continueRound(){this.currentRound++,this.pickCounterExperience(),this.startCountdown()}finishJuxtaposition(){this.step="after"}saveSession(){var e=this;return(0,c.A)(function*(){if(null!==e.intensityBefore&&null!==e.intensityAfter&&!e.isSaving){e.isSaving=!0;try{const o=e.sessionStartTime?(Date.now()-e.sessionStartTime.getTime())/1e3:0;yield e.beliefService.addSession(e.belief.id,{intensityBefore:e.intensityBefore,intensityAfter:e.intensityAfter,juxtapositionCount:e.currentRound,counterExperienceId:e.currentCounterExperience?.id??null}),e.v3Analytics.logTroskifteSessionCompleted(e.belief.id,e.intensityBefore,e.intensityAfter,e.currentRound,o),yield e.modalController.dismiss({saved:!0})}catch(o){console.error("TroskifteSession: Error saving session",o),e.isSaving=!1}}})()}cancelAndCalmDown(){var e=this;return(0,c.A)(function*(){e.clearCountdown(),e.v3Analytics.logTroskifteSessionCancelled(e.belief.id,e.step),e.step="cancelled";const o=yield e.modalController.create({component:O.F,componentProps:{quickStart:!0,quickStartEntry:"praksis"},cssClass:"sos-modal-v3"});yield o.present(),yield o.onWillDismiss(),yield e.modalController.dismiss({saved:!1,cancelled:!0})})()}close(){var e=this;return(0,c.A)(function*(){yield e.cancelAndCalmDown()})()}static \u0275fac=function(o){return new(o||n)(t.rXU(_.W3),t.rXU(I),t.rXU(S.J))};static \u0275cmp=t.VBU({type:n,selectors:[["app-troskifte-session"]],inputs:{belief:"belief"},decls:5,vars:2,consts:[[1,"ts-session-content"],[1,"hm-close-btn","fixed-close",3,"click"],["name","close-outline"],["class","calm-down-link",3,"click",4,"ngIf"],["class","ts-step-container",4,"ngIf"],[1,"calm-down-link",3,"click"],[1,"ts-step-container"],["class","ts-step",4,"ngIf"],["class","ts-step ts-step-loading",4,"ngIf"],[1,"ts-step"],[1,"ts-hero"],[1,"ts-hero-icon"],[1,"hm-glass-card"],[1,"ts-belief-quote"],[1,"ts-instruction"],[1,"hm-section-title","center"],[1,"intensity-grid"],["class","intensity-btn-round",3,"selected","click",4,"ngFor","ngForOf"],[1,"hm-btn","hm-btn--full","margin-top",3,"click","disabled"],[1,"intensity-btn-round",3,"click"],[1,"ts-step","ts-step-loading"],["name","crescent"],[1,"ts-round-label"],[1,"ts-belief-quote","small"],[1,"ts-vs"],["class","ts-counter-experience",4,"ngIf"],["class","ts-countdown",4,"ngIf"],["class","ts-skip-countdown",3,"click",4,"ngIf"],["class","button-row margin-top",4,"ngIf"],[1,"ts-counter-experience"],[1,"ts-countdown"],[1,"ts-skip-countdown",3,"click"],[1,"button-row","margin-top"],[1,"hm-btn","hm-btn--full",3,"click"],["class","hm-btn hm-btn--outline",3,"click",4,"ngIf"],[1,"hm-btn",3,"click"],[1,"hm-btn","hm-btn--outline",3,"click"]],template:function(o,i){1&o&&(t.j41(0,"div",0)(1,"button",1),t.bIt("click",function(){return i.close()}),t.nrm(2,"ion-icon",2),t.k0s(),t.DNE(3,A,3,3,"button",3)(4,Q,6,5,"div",4),t.k0s()),2&o&&(t.R
17$(3),t.Y8G("ngIf","cancelled"!==i.step),t.R7$(),t.Y8G("ngIf",i.belief))},dependencies:[v.MD,v.Sq,v.bT,_.bv,_.iq,_.w2,b.YN,T.h,T.D9],styles:[".ts-session-content[_ngcontent-%COMP%]{min-height:100%;padding:var(--hm-space-lg) var(--hm-space-md);background:var(--hm-gradient-brand-alt, var(--hm-primary));box-sizing:border-box;position:relative}.fixed-close[_ngcontent-%COMP%]{position:absolute;top:var(--hm-space-md);right:var(--hm-space-md);z-index:10}.calm-down-link[_ngcontent-%COMP%]{display:block;margin:0 auto var(--hm-space-lg) auto;padding:var(--hm-space-sm) var(--hm-space-md);background:#0003;border:1px solid rgba(255,255,255,.25);border-radius:var(--hm-radius-pill);color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-sm);cursor:pointer;width:fit-content;text-align:center}.ts-step-container[_ngcontent-%COMP%]{padding-top:var(--hm-space-xl)}.ts-step-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--hm-space-md);padding:var(--hm-space-xxl) 0;color:var(--hm-text-light, #fff)}.ts-hero[_ngcontent-%COMP%]{text-align:center;margin-bottom:var(--hm-space-md)}.ts-hero[_ngcontent-%COMP%] .ts-hero-icon[_ngcontent-%COMP%]{font-size:2.2rem;display:block;margin-bottom:var(--hm-space-xs)}.ts-hero[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-xl)}.ts-round-label[_ngcontent-%COMP%]{margin:var(--hm-space-xs) 0 0 0;font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .8))}.ts-belief-quote[_ngcontent-%COMP%]{text-align:center;font-style:italic;font-size:var(--hm-font-size-lg);color:var(--hm-text-light, #fff);margin:0 0 var(--hm-space-md) 0}.ts-belief-quote.small[_ngcontent-%COMP%]{font-size:var(--hm-font-size-base);margin-bottom:var(--hm-space-sm)}.ts-instruction[_ngcontent-%COMP%]{text-align:center;font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .85));line-height:1.5;margin:var(--hm-space-md) 0}.ts-vs[_ngcontent-%COMP%]{text-align:center;font-size:1.4rem;color:var(--hm-text-light-muted, rgba(255, 255, 255, .6));margin:var(--hm-space-xs) 0}.ts-counter-experience[_ngcontent-%COMP%]{text-align:center;font-size:var(--hm-font-size-base);color:var(--hm-text-light, #fff);background:#ffffff1a;border-radius:var(--hm-radius-md);padding:var(--hm-space-md);margin:0}.ts-countdown[_ngcontent-%COMP%]{text-align:center;font-size:2.4rem;font-weight:var(--hm-font-weight-bold);color:var(--hm-text-light, #fff);margin-top:var(--hm-space-md)}.ts-skip-countdown[_ngcontent-%COMP%]{display:block;margin:var(--hm-space-sm) auto 0 auto;background:transparent;border:none;color:var(--hm-text-light-muted, rgba(255, 255, 255, .7));text-decoration:underline;font-size:var(--hm-font-size-xs);cursor:pointer}.button-row[_ngcontent-%COMP%]{display:flex;gap:var(--hm-space-sm)}.button-row[_ngcontent-%COMP%] .hm-btn[_ngcontent-%COMP%]{flex:1}.intensity-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.intensity-btn-round[_ngcontent-%COMP%]{aspect-ratio:1;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:#ffffff14;color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-sm);cursor:pointer}.intensity-btn-round.selected[_ngcontent-%COMP%]{background:#fff;color:var(--hm-primary);border-color:#fff}.margin-top[_ngcontent-%COMP%]{margin-top:var(--hm-space-md)}"]})}return n})();const Z=n=>({gap:n}),tt=()=>[0,1,2,3,4,5,6,7,8,9,10];function et(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",10)(1,"div",11)(2,"div",12),t.EFF(3,"\u{1f9e0}"),t.k0s(),t.j41(4,"h2",13),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"p",14),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"div",15)(11,"div",16),t.EFF(12,"\u26a0\ufe0f"),t.k0s(),t.j41(13,"div")(14,"h4"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"p"),t.EFF(18),t.nI1(19,"translate"),t.k0s()()(),t.j41(20,"p",17),t.EFF(21),t.nI1(22,"translate"),t.j41(23,"a",18),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.goToHelp())}),t.EFF(24),t.nI1(25,"translate"),t.k0s()()(),t.j41(26,"button",19),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.acceptOnboarding())}),t.EFF(27),t.nI1(28,"translate"),t.k0s()()}2&n&&(t.R7$(5),t.JRh(t.bMT(6,7,"V3.TROSKIFTE.ONBOARDING_TITLE")),t.R7$(3),t.JRh(t.bMT(9,9,"V3.TROSKIFTE.ONBOARDING_TEXT")),t.R7$(7),t.JRh(t.bMT(16,11,"V3.TROSKIFTE.ONBOARDING_SCOPE_TITLE")),t.R7$(3),t.JRh(t.bMT(19,13,"V3.TROSKIFTE.ONBOARDING_SCOPE_TEXT")),t.R7$(3),t.SpI(" ",t.bMT(22,15,"V3.TROSKIFTE.ONBOARDING_HELP_TEXT")," "),t.R7$(3),t.JRh(t.bMT(25,17,"V3.TROSKIFTE.ONBOARDING_HELP_LINK")),t.R7$(3),t.SpI(" ",t.bMT(28,19,"V3.TROSKIFTE.ONBOARDING_CTA")," "))}
1function nt(n,s){1&n&&(t.j41(0,"div",25),t.nrm(1,"ion-spinner",26),t.k0s())}function it(n,s){1&n&&(t.j41(0,"div",27)(1,"div",28),t.EFF(2,"\u{1f9e0}"),t.k0s(),t.j41(3,"p"),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n&&(t.R7$(4),t.JRh(t.bMT(5,1,"V3.TROSKIFTE.EMPTY_STATE")))}function ot(n,s){if(1&n&&(t.j41(0,"span",34),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.Lme(" ",t.bMT(2,2,"V3.TROSKIFTE.LAST_INTENSITY"),": ",e.lastIntensityAfter,"/10 ")}}function st(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",29),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG(2);return t.Njj(r.openDetail(i.id))}),t.j41(1,"div",30)(2,"span",31),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,ot,3,4,"span",32),t.k0s(),t.j41(6,"p",33),t.EFF(7),t.k0s()()}if(2&n){const e=s.$implicit,o=t.XpG(2);t.R7$(2),t.HbH("status-"+e.status),t.R7$(),t.SpI(" ",t.bMT(4,5,o.statusLabelKey(e.status))," "),t.R7$(2),t.Y8G("ngIf",null!=e.lastIntensityAfter),t.R7$(2),t.SpI('"',e.text,'"')}}function rt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",10)(1,"div",11)(2,"h2",13),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p",14),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"button",20),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.startWizard())}),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"h3",21),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.DNE(14,nt,2,0,"div",22)(15,it,6,3,"div",23)(16,st,8,7,"div",24),t.k0s()}if(2&n){const e=t.XpG();t.R7$(3),t.SpI("\u{1f9e0} ",t.bMT(4,7,"V3.TROSKIFTE.TITLE"),""),t.R7$(3),t.JRh(t.bMT(7,9,"V3.TROSKIFTE.LIST_INTRO")),t.R7$(3),t.SpI(" + ",t.bMT(10,11,"V3.TROSKIFTE.NEW_BELIEF_CTA")," "),t.R7$(3),t.JRh(t.bMT(13,13,"V3.TROSKIFTE.YOUR_BELIEFS")),t.R7$(2),t.Y8G("ngIf",e.beliefsLoading),t.R7$(),t.Y8G("ngIf",!e.beliefsLoading&&0===e.beliefs.length),t.R7$(),t.Y8G("ngForOf",e.beliefs)}}function at(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",37)(1,"div",38),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",39)(5,"h3",40),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"p",41),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"textarea",42),t.nI1(12,"translate"),t.mxI("ngModelChange",function(i){t.eBV(e);const r=t.XpG(2);return t.DH7(r.wizardText,i)||(r.wizardText=i),t.Njj(i)}),t.k0s()(),t.j41(13,"button",43),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardNextFromText())}),t.EFF(14),t.nI1(15,"translate"),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,7,"V3.TROSKIFTE.STEP_TEXT_LABEL")),t.R7$(4),t.JRh(t.bMT(7,9,"V3.TROSKIFTE.STEP_TEXT_QUESTION")),t.R7$(3),t.JRh(t.bMT(10,11,"V3.TROSKIFTE.STEP_TEXT_HINT")),t.R7$(2),t.R50("ngModel",e.wizardText),t.Y8G("placeholder",t.bMT(12,13,"V3.TROSKIFTE.STEP_TEXT_PLACEHOLDER")),t.R7$(2),t.Y8G("disabled",!e.wizardText.trim()),t.R7$(),t.SpI(" ",t.bMT(15,15,"V3.COMMON.NEXT")," \u2192 ")}}function ct(n,s){if(1&n&&(t.j41(0,"div",52)(1,"div",53),t.nrm(2,"div",54),t.k0s(),t.j41(3,"p",55),t.EFF(4),t.nI1(5,"translate"),t.k0s()()),2&n){const e=t.XpG(3);t.R7$(2),t.xc7("width",e.truthGap,"%"),t.R7$(2),t.JRh(t.i5U(5,3,"V3.TROSKIFTE.GAP_INSIGHT",t.eq3(6,Z,e.truthGap)))}}function lt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",37)(1,"div",38),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",39)(5,"p",44),t.EFF(6),t.k0s(),t.j41(7,"h4",45),t.EFF(8),t.nI1(9,"translate"),t.k0s(),t.j41(10,"input",46),t.mxI("ngModelChange",function(i){t.eBV(e);const r=t.XpG(2);return t.DH7(r.wizardFeltTruth,i)||(r.wizardFeltTruth=i),t.Njj(i)}),t.k0s(),t.j41(11,"div",47),t.EFF(12),t.k0s(),t.j41(13,"h4",45),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.j41(16,"input",46),t.mxI("ngModelChange",function(i){t.eBV(e);const r=t.XpG(2);return t.DH7(r.wizardLogicalTruth,i)||(r.wizardLogicalTruth=i),t.Njj(i)}),t.k0s(),t.j41(17,"div",47),t.EFF(18),t.k0s(),t.DNE(19,ct,6,8,"div",48),t.k0s(),t.j41(20,"div",49)(21,"button",50),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardBackTo("text"))}),t.EFF(22),t.nI1(23,"translate"),t.k0s(),t.j41(24,"button",51),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardNextFromScales())}),t.EFF(25),t.nI1(26,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,11,"V3.TROSKIFTE.STEP_SCALES_LABEL")),t.R7$(4),t.SpI('"',e.wizardText,'"'),t.R7$(2),t.JRh(t.bMT(9,13,"V3.TROSKIFTE.SCALE_FELT_TITLE")),t.R7$(2),t.R50("ngModel",e.wizardFeltTruth),t.R7$(2),t.SpI("",e.wizardFeltTruth,"%"),t.R7$(2),t.JRh(t.bMT(15,15,"V3.TROSKIFTE.SCALE_LOGICAL_TITLE")),t.R7$(2),t.R50("ngModel",e.wizardLogicalTruth),t.R7$(2),t.SpI("",e.wizardLogicalTruth,"%"),t.R7$(),t.Y8G("ngIf",e.truthGap>15),t.R7$(3),t.SpI("\u2190 ",t.bMT(23,17,"V3.COMMON.BACK"),""),t.R7$(3),t.SpI("",t.bMT(26,19,"V3.COMMON.NEXT")," \u2192")}}
1function dt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",64),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG(3);return t.Njj(r.selectBodyLocation(i))}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=s.$implicit,o=t.XpG(3);t.AVh("selected",o.wizardBodyLocation===e),t.R7$(),t.SpI(" ",t.bMT(2,3,"V3.TROSKIFTE.BODY_LOCATION_"+e.toUpperCase())," ")}}function _t(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",37)(1,"div",38),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",39)(5,"h3",40),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"button",56),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.showEmotionPicker=!0)}),t.j41(9,"span",57),t.EFF(10),t.k0s(),t.j41(11,"div",58)(12,"span",59),t.EFF(13),t.nI1(14,"translate"),t.k0s()(),t.j41(15,"span",60),t.EFF(16,"\u2192"),t.k0s()(),t.j41(17,"h4",45),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"div",61),t.DNE(21,dt,3,5,"button",62),t.k0s()(),t.j41(22,"div",49)(23,"button",50),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardBackTo("scales"))}),t.EFF(24),t.nI1(25,"translate"),t.k0s(),t.j41(26,"button",63),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardNextFromEmotion())}),t.EFF(27),t.nI1(28,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,9,"V3.TROSKIFTE.STEP_EMOTION_LABEL")),t.R7$(4),t.JRh(t.bMT(7,11,"V3.TROSKIFTE.STEP_EMOTION_QUESTION")),t.R7$(4),t.JRh((null==e.wizardEmotion?null:e.wizardEmotion.emoji)||"\u{1f914}"),t.R7$(3),t.JRh((null==e.wizardEmotion?null:e.wizardEmotion.label)||t.bMT(14,13,"V3.SOS.TAP_TO_SELECT")),t.R7$(5),t.JRh(t.bMT(19,15,"V3.TROSKIFTE.STEP_BODY_QUESTION")),t.R7$(3),t.Y8G("ngForOf",e.bodyLocationKeys),t.R7$(3),t.SpI("\u2190 ",t.bMT(25,17,"V3.COMMON.BACK"),""),t.R7$(2),t.Y8G("disabled",!e.wizardEmotion),t.R7$(),t.SpI("",t.bMT(28,19,"V3.COMMON.NEXT")," \u2192")}}function ft(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",71),t.bIt("click",function(){t.eBV(e);const i=t.XpG().index,r=t.XpG(3);return t.Njj(r.removeCounterExperienceField(i))}),t.EFF(1,"\u2715"),t.k0s()}}function mt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",68)(1,"textarea",69),t.nI1(2,"translate"),t.mxI("ngModelChange",function(i){const r=t.eBV(e).index,l=t.XpG(3);return t.DH7(l.wizardCounterExperiences[r],i)||(l.wizardCounterExperiences[r]=i),t.Njj(i)}),t.k0s(),t.DNE(3,ft,2,0,"button",70),t.k0s()}if(2&n){const e=s.index,o=t.XpG(3);t.R7$(),t.R50("ngModel",o.wizardCounterExperiences[e]),t.Y8G("placeholder",t.bMT(2,3,"V3.TROSKIFTE.STEP_COUNTER_PLACEHOLDER")),t.R7$(2),t.Y8G("ngIf",o.wizardCounterExperiences.length>1)}}function ht(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",72),t.bIt("click",function(){t.eBV(e);const i=t.XpG(3);return t.Njj(i.addCounterExperienceField())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" + ",t.bMT(2,1,"V3.TROSKIFTE.ADD_COUNTER_EXPERIENCE")," "))}function ut(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",37)(1,"div",38),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",39)(5,"h3",40),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"p",41),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"p",41),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.DNE(14,mt,4,5,"div",65)(15,ht,3,3,"button",66),t.k0s(),t.j41(16,"div",49)(17,"button",67),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.wizardBackTo("emotion"))}),t.EFF(18),t.nI1(19,"translate"),t.k0s(),t.j41(20,"button",63),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.saveBeliefFromWizard())}),t.EFF(21),t.nI1(22,"translate"),t.nI1(23,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,10,"V3.TROSKIFTE.STEP_COUNTER_LABEL")),t.R7$(4),t.JRh(t.bMT(7,12,"V3.TROSKIFTE.STEP_COUNTER_QUESTION")),t.R7$(3),t.JRh(t.bMT(10,14,"V3.TROSKIFTE.STEP_COUNTER_HELPER_1")),t.R7$(3),t.JRh(t.bMT(13,16,"V3.TROSKIFTE.STEP_COUNTER_HELPER_2")),t.R7$(2),t.Y8G("ngForOf",e.wizardCounterExperiences),t.R7$(),t.Y8G("ngIf",e.wizardCounterExperiences.length<3),t.R7$(2),t.Y8G("disabled",e.isSavingBelief),t.R7$(),t.SpI("\u2190 ",t.bMT(19,18,"V3.COMMON.BACK"),""),t.R7$(2),t.Y8G("disabled",!e.hasAtLeastOneCounterExperience||e.isSavingBelief),t.R7$(),t.SpI(" ",e.isSavingBelief?t.bMT(22,20,"V3.COMMON.SAVE")+"...":t.bMT(23,22,"V3.TROSKIFTE.SAVE_BELIEF")," ")}}
1function pt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",80),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG(3);return t.Njj(r.selectWizardEmotion(i))}),t.j41(1,"span",81),t.EFF(2),t.k0s(),t.j41(3,"span",82),t.EFF(4),t.k0s()()}if(2&n){const e=s.$implicit;t.R7$(2),t.JRh(e.emoji),t.R7$(2),t.JRh(e.label)}}function gt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",73),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.showEmotionPicker=!1)}),t.j41(1,"div",74),t.bIt("click",function(i){return t.eBV(e),t.Njj(i.stopPropagation())}),t.j41(2,"div",75)(3,"button",76),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.showEmotionPicker=!1)}),t.nrm(4,"ion-icon",77),t.k0s(),t.j41(5,"h3"),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"div",78),t.DNE(9,pt,5,2,"button",79),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(6),t.JRh(t.bMT(7,2,"V3.SOS.WHAT_DO_YOU_FEEL")),t.R7$(3),t.Y8G("ngForOf",e.filteredEmotions)}}function vt(n,s){if(1&n&&(t.j41(0,"div",10),t.DNE(1,at,16,17,"div",35)(2,lt,27,21,"div",35)(3,_t,29,21,"div",35)(4,ut,24,24,"div",35)(5,gt,10,4,"div",36),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngIf","text"===e.wizardStep),t.R7$(),t.Y8G("ngIf","scales"===e.wizardStep),t.R7$(),t.Y8G("ngIf","emotion"===e.wizardStep),t.R7$(),t.Y8G("ngIf","counter"===e.wizardStep),t.R7$(),t.Y8G("ngIf",e.showEmotionPicker)}}function bt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",93)(1,"p"),t.EFF(2),t.k0s(),t.j41(3,"button",76),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.dismissRelapseMessage())}),t.nrm(4,"ion-icon",77),t.k0s()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(e.relapseMessage)}}function Tt(n,s){1&n&&(t.j41(0,"h3",87),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"V3.TROSKIFTE.INTENSITY_OVER_TIME")))}
1function kt(n,s){if(1&n&&(t.j41(0,"div",99)(1,"span",100),t.EFF(2),t.k0s(),t.j41(3,"div",101)(4,"div",102)(5,"span"),t.EFF(6),t.k0s()(),t.j41(7,"div",103)(8,"span"),t.EFF(9),t.k0s()()()()),2&n){const e=s.$implicit,o=s.index,i=t.XpG(3);t.R7$(2),t.SpI("#",o+1,""),t.R7$(2),t.xc7("width",e.intensityBefore/i.maxSessionIntensity*100,"%"),t.R7$(2),t.JRh(e.intensityBefore),t.R7$(),t.xc7("width",e.intensityAfter/i.maxSessionIntensity*100,"%"),t.R7$(2),t.JRh(e.intensityAfter)}}function Et(n,s){if(1&n&&(t.j41(0,"div",94),t.DNE(1,kt,10,7,"div",95),t.j41(2,"div",96)(3,"span"),t.nrm(4,"i",97),t.EFF(5),t.nI1(6,"translate"),t.k0s(),t.j41(7,"span"),t.nrm(8,"i",98),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()),2&n){const e=t.XpG(2);t.R7$(),t.Y8G("ngForOf",e.sessions),t.R7$(4),t.SpI(" ",t.bMT(6,3,"V3.TROSKIFTE.CHART_BEFORE"),""),t.R7$(4),t.SpI(" ",t.bMT(10,5,"V3.TROSKIFTE.CHART_AFTER"),"")}}function Ct(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",104),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.toggleCheckinForm())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&n&&(t.R7$(),t.SpI(" + ",t.bMT(2,1,"V3.TROSKIFTE.ADD_CHECKIN")," "))}function It(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",112),t.bIt("click",function(){const i=t.eBV(e).$implicit,r=t.XpG
1(4);return t.Njj(r.checkinReactionStrength=i)}),t.EFF(1),t.k0s()}if(2&n){const e=s.$implicit,o=t.XpG(4);t.AVh("selected",o.checkinReactionStrength===e),t.R7$(),t.SpI(" ",e," ")}}function St(n,s){1&n&&(t.j41(0,"div",109)(1,"h4"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",110),t.DNE(5,It,2,3,"button",111),t.k0s()()),2&n&&(t.R7$(2),t.JRh(t.bMT(3,2,"V3.TROSKIFTE.CHECKIN_REACTION_QUESTION")),t.R7$(3),t.Y8G("ngForOf",t.lJ4(4,tt)))}function Ot(n,s){if(1&n){const e=t.RV6();t.j41(0,"textarea",69),t.nI1(1,"translate"),t.mxI("ngModelChange",function(i){t.eBV(e);const r=t.XpG(3);return t.DH7(r.checkinNote,i)||(r.checkinNote=i),t.Njj(i)}),t.k0s()}if(2&n){const e=t.XpG(3);t.R50("ngModel",e.checkinNote),t.Y8G("placeholder",t.bMT(1,2,"V3.TROSKIFTE.CHECKIN_NOTE_PLACEHOLDER"))}}function Rt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",105)(1,"h4"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",106)(5,"button",51),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.setCheckinTriggered(!0))}),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"button",51),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.setCheckinTriggered(!1))}),t.EFF(9),t.nI1(10,"translate"),t.k0s()(),t.DNE(11,St,6,5,"div",107)(12,Ot,2,4,"textarea",108),t.j41(13,"div",49)(14,"button",50),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.toggleCheckinForm())}),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"button",63),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.saveCheckin())}),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()}if(2&n){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,12,"V3.TROSKIFTE.CHECKIN_QUESTION")),t.R7$(3),t.AVh("hm-btn--outline",!0!==e.checkinTriggered),t.R7$(),t.SpI(" ",t.bMT(7,14,"V3.COMMON.YES")," "),t.R7$(2),t.AVh("hm-btn--outline",!1!==e.checkinTriggered),t.R7$(),t.SpI(" ",t.bMT(10,16,"V3.COMMON.NO")," "),t.R7$(2),t.Y8G("ngIf",!0===e.checkinTriggered),t.R7$(),t.Y8G("ngIf",null!==e.checkinTriggered),t.R7$(3),t.JRh(t.bMT(16,18,"V3.COMMON.CANCEL")),t.R7$(2),t.Y8G("disabled",null===e.checkinTriggered||e.isSavingCheckin),t.R7$(),t.SpI(" ",t.bMT(19,20,"V3.COMMON.SAVE")," ")}}function xt(n,s){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.SpI("",e.reactionStrength,"/10")}}function Ft(n,s){if(1&n&&(t.j41(0,"p",117),t.EFF(1),t.k0s()),2&n){const e=t.XpG().$implicit;t.R7$(),t.JRh(e.note)}}function Mt(n,s){if(1&n&&(t.j41(0,"div",113)(1,"div",114)(2,"span"),t.EFF(3),t.nI1(4,"translate"),t.nI1(5,"translate"),t.k0s(),t.DNE(6,xt,2,1,"span",115),t.k0s(),t.DNE(7,Ft,2,1,"p",116),t.k0s()),2&n){const e=s.$implicit;t.R7$(3),t.JRh(e.triggered?t.bMT(4,3,"V3.TROSKIFTE.CHECKIN_WAS_TRIGGERED"):t.bMT(5,5,"V3.TROSKIFTE.CHECKIN_NOT_TRIGGERED")),t.R7$(3),t.Y8G("ngIf",e.triggered),t.R7$(),t.Y8G("ngIf",e.note)}}function Vt(n,s){if(1&n){const e=t.RV6();t.j41(0,"button",118),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.markAsChanged())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("disabled",!e.canMarkChanged),t.R7$(),t.SpI(" \u2713 ",t.bMT(2,2,"V3.TROSKIFTE.MARK_AS_CHANGED")," ")}}function jt(n,s){1&n&&(t.j41(0,"p",119),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"V3.TROSKIFTE.MARK_AS_CHANGED_HINT")," "))}function yt(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",10)(1,"div",11)(2,"span",31),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"p",44),t.EFF(6),t.k0s(),t.j41(7,"div",83)(8,"span"),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"span"),t.EFF(12),t.nI1(13,"translate"),t.k0s()()(),t.DNE(14,bt,5,1,"div",84),t.j41(15,"button",19),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.startSession())}),t.EFF(16),t.nI1(17,"translate"),t.k0s(),t.DNE(18,Tt,3,3,"h3",85)(19,Et,11,7,"div",86),t.j41(20,"h3",87),t.EFF(21),t.nI1(22,"translate"),t.k0s(),t.DNE(23,Ct,3,3,"button",88)(24,Rt,20,22,"div",89)(25,Mt,8,7,"div",90)(26,Vt,3,4,"button",91)(27,jt,3,3,"p",92),t.k0s()}if(2&n){const e=t.XpG();t.R7$(2),t.HbH("status-"+e.selectedBelief.status),t.R7$(),t.SpI(" ",t.bMT(4,18,e.statusLabelKey(e.selectedBelief.status))," "),t.R7$(3),t.SpI('"',e.selectedBelief.text,'"'),t.R7$(3),t.Lme("",t.bMT(10,20,"V3.TROSKIFTE.SCALE_FELT_TITLE"),": ",e.selectedBelief.feltTruth,"%"),t.R7$(3),t.Lme("",t.bMT(13,22,"V3.TROSKIFTE.SCALE_LOGICAL_TITLE"),": ",e.selectedBelief.logicalTruth,"%"),t.R7$(2),t.Y8G("ngIf",e.relapseMessage),t.R7$(2),t.SpI(" \u{1f3af} ",t.bMT(17,24,"V3.TROSKIFTE.START_SESSION")," "),t.R7$(2),t.Y8G("ngIf",e.sessions.length>0),t.R7$(),t.Y8G("ngIf",e.sessions.length>0),t.R7$(2),t.JRh(t.bMT(22,26,"V3.TROSKIFTE.CHECKINS_TITLE")),t.R7$(2),t.Y8G("ngIf",!e.showCheckinForm),t.R7$(),t.Y8G("ngIf",e.showCheckinForm),t.R7$(),t.Y8G("ngForOf",e.checkins),t.R7$(),t.Y8G("ngIf","verifying"===e.selectedBelief.status),t.R7$(),t.Y8G("ngIf","verifying"===e.selectedBelief.status&&!e.canMarkChanged)}}const V="harmoni.troskifte.introSeen",wt=["head","chest","throat","stomach","shoulders"];let Nt=(()=>{class n{translate=(0,t.WQX)(T.c$);beliefService=(0,t.WQX)(I);v3Analytics=(0,t.WQX)(S.J);modalController=(0,t.WQX)(_.W3);router=(0,t.WQX)(j.Ix);view="list";bodyLocationKeys=wt;beliefs=[];beliefsLoading=!0;beliefsSub;wizardStep="text";wizardText="";wizardFeltTruth=70;wizardLogicalTruth=30;wizardEmotion=null;wizardBodyLocation=null;wizardCounterExperiences=[""];isSavingBelief=!1;emotions=[];showEmotionPicker=!1;emotionSearch="";selectedBelief=null;selectedBeliefSub;sessions=[];sessionsSub;checkins=[];checkinsSub;canMarkChanged=!1;showCheckinForm=!1;checkinTriggered=null;checkinReactionStrength=null;checkinNote="";isSavingCheckin=!1;relapseMessage=null;langChangeSub;ngOnInit(){this.initializeEmotions(),this.langChangeSub=this.translate.onLangChange.subscribe(()=>this.initializeEmotions());const e=this.readIntroSeen();this.view=e?"list":"onboarding",this.loadBeliefs()}ngOnDestroy(){this.beliefsSub?.unsubscribe(),this.selectedBeliefSub?.unsubscribe(),this.sessionsSub?.unsubscribe(),this.checkinsSub?.unsubscribe(),this.langChangeSub?.unsubscribe()}initializeEmotions(){this.emotions=[{value:"redd",label:this.translate.instant("V3.SOS.EMOTION_SCARED"),emoji:"\u{1f628}"},{value:"sint",label:this.translate.instant("V3.SOS.EMOTION_ANGRY"),emoji:"\u{1f620}"},{value:"skam",label:this.translate.instant("V3.SOS.EMOTION_SHAME"),emoji:"\u{1f633}"},{value:"skyld",label:this.translate.instant("V3.SOS.EMOTION_GUILT"),emoji:"\u{1f614}"},{value:"ikke bra nok",label:this.translate.instant("V3.SOS.EMOTION_NOT_GOOD_ENOUGH"),emoji:"\u{1f614}"},{value:"strekker ikke til",label:this.translate.instant("V3.SOS.EMOTION_INADEQUATE"),emoji:"\u{1f613}"},{value:"haaploes",label:this.translate.instant("V3.SOS.EMOTION_HOPELESS"),emoji:"\u{1f61e}"},{value:"makteslos",label:this.translate.instant("V3.SOS.EMOTION_POWERLESS"),emoji:"\u{1f616}"},{value:"ensom",label:this.translate.instant("V3.SOS.EMOTION_LONELY"),emoji:"\u{1f622}"},{value:"urolig",label:this.translate.instant("V3.SOS.EMOTION_WORRIED"),emoji:"\u{1f61f}"},{value:"utrygg",label:this.translate.instant("V3.SOS.EMOTION_INSECURE"),emoji:"\u{1f630}"},{value:"sur",label:this.translate.instant("V3.SOS.EMOTION_GRUMPY"),emoji:"\u{1f616}"},{value:"verdilos",label:this.translate.instant("V3.SOS.EMOTION_WORTHLESS"),emoji:"\u{1f614}"},{value:"skuffet",label:this.translate.instant("V3.SOS.EMOTION_DISAPPOINTED"),emoji:"\u{1f61e}"},{value:"ulykkelig",label:this.translate.instant("V3.SOS.EMOTION_UNHAPPY"),emoji:"\u{1f61e}"},{value:"sjalu",label:this.translate.instant("V3.SOS.EMOTION_JEALOUS"),emoji:"\u{1f620}"},{value:"mistillit",label:this.translate.instant("V3.SOS.EMOTION_DISTRUST"),emoji:"\u{1f928}"},{value:"oversett",label:this.translate.instant("V3.SOS.EMOTION_OVERLOOKED"),emoji:"\u{1f636}"},{value:"ydmyket",label:this.translate.instant("V3.SOS.EMOTION_HUMILIATED"),emoji:"\u{1f633}"},{value:"utstott",label:this.translate.instant("V3.SOS.EMOTION_REJECTED"),emoji:"\u{1f622}"}]}get filteredEmotions(){return this.emotionSearch?this.emotions.filter(e=>e.label.toLowerCase().includes(this.emotionSearch.toLowerCase())):this.emotions}readIntroSeen(){try{return"1"===localStorage.getItem(V)}catch{return!1}}rememberIntroSeen(){try{localStorage.setItem(V,"1")}catch{}}acceptOnboarding(){this.rememberIntroSeen(),this.view="list"}goToHelp(){this.router.navigate(["/v3/hjelp"])}goBack(){"wizard"===this.view?(this.view="list",this.resetWizard()):"detail"===this.view?this.closeDetail():this.router.navigate(["/v3/praksis"])}loadBeliefs(){this.beliefsLoading=!0,this.beliefsSub=this.beliefService.getBeliefs().subscribe({next:e=>{this.beliefs=e,this.beliefsLoading=!1},error:e=>{console.error("TroskifteV3: Error loading beliefs",e),this.beliefsLoading=!1}})}statusLabelKey(e){switch(e){case"active":return"V3.TROSKIFTE.STATUS_ACTIVE";
1case"verifying":return"V3.TROSKIFTE.STATUS_VERIFYING";case"changed":return"V3.TROSKIFTE.STATUS_CHANGED";default:return"V3.TROSKIFTE.STATUS_ARCHIVED"}}startWizard(){this.resetWizard(),this.view="wizard"}resetWizard(){this.wizardStep="text",this.wizardText="",this.wizardFeltTruth=70,this.wizardLogicalTruth=30,this.wizardEmotion=null,this.wizardBodyLocation=null,this.wizardCounterExperiences=[""]}get truthGap(){return Math.abs(this.wizardFeltTruth-this.wizardLogicalTruth)}wizardNextFromText(){this.wizardText.trim()&&(this.wizardStep="scales")}wizardNextFromScales(){this.wizardStep="emotion"}selectWizardEmotion(e){this.wizardEmotion=e,this.showEmotionPicker=!1}selectBodyLocation(e){this.wizardBodyLocation=this.wizardBodyLocation===e?null:e}wizardNextFromEmotion(){this.wizardEmotion&&(this.wizardStep="counter")}wizardBackTo(e){this.wizardStep=e}addCounterExperienceField(){this.wizardCounterExperiences.length>=3||this.wizardCounterExperiences.push("")}removeCounterExperienceField(e){this.wizardCounterExperiences.splice(e,1),0===this.wizardCounterExperiences.length&&(this.wizardCounterExperiences=[""])}get hasAtLeastOneCounterExperience(){return this.wizardCounterExperiences.some(e=>e.trim().length>0)}saveBeliefFromWizard(){var e=this;return(0,c.A)(function*(){if(e.wizardEmotion&&e.hasAtLeastOneCounterExperience&&!e.isSavingBelief){e.isSavingBelief=!0;try{const o=e.wizardCounterExperiences.filter(r=>r.trim()).map(r=>({text:r})),i=yield e.beliefService.addBelief({text:e.wizardText,feltTruth:e.wizardFeltTruth,logicalTruth:e.wizardLogicalTruth,emotion:e.wizardEmotion.value,bodyLocation:e.wizardBodyLocation,counterExperiences:o});e.v3Analytics.logTroskifteBeliefCreated(i,o.length),e.view="list",e.resetWizard(),e.openDetail(i)}catch(o){console.error("TroskifteV3: Error saving belief",o)}finally{e.isSavingBelief=!1}}})()}openDetail(e){this.view="detail",this.relapseMessage=null,this.showCheckinForm=!1,this.resetCheckinForm(),this.selectedBeliefSub?.unsubscribe(),this.selectedBeliefSub=this.beliefService.getBelief(e).subscribe(o=>{this.selectedBelief=o??null}),this.sessionsSub?.unsubscribe(),this.sessionsSub=this.beliefService.listSessions(e).subscribe(o=>{this.sessions=o}),this.checkinsSub?.unsubscribe(),this.checkinsSub=this.beliefService.listCheckins(e).subscribe(o=>{this.checkins=o}),this.refreshCanMarkChanged(e)}refreshCanMarkChanged(e){var o=this;return(0,c.A)(function*(){o.canMarkChanged=yield o.beliefService.canMarkAsChanged(e)})()}closeDetail(){this.view="list",this.selectedBelief=null,this.selectedBeliefSub?.unsubscribe(),this.sessionsSub?.unsubscribe(),this.checkinsSub?.unsubscribe()}get maxSessionIntensity(){return 10}startSession(){var e=this;return(0,c.A)(function*(){if(!e.selectedBelief?.id)return;const o=yield e.modalController.create({component:q,componentProps:{belief:e.selectedBelief},cssClass:"sos-modal-v3"});yield o.present();const{data:i}=yield o.onWillDismiss();i?.saved&&e.selectedBelief?.id&&e.refreshCanMarkChanged(e.selectedBelief.id)})()}toggleCheckinForm(){this.showCheckinForm=!this.showCheckinForm,this.showCheckinForm||this.resetCheckinForm()}resetCheckinForm(){this.checkinTriggered=null,this.checkinReactionStrength=null,this.checkinNote=""}setCheckinTriggered(e){this.checkinTriggered=e,e||(this.checkinReactionStrength=null)}saveCheckin(){var e=this;return(0,c.A)(function*(){if(e.selectedBelief?.id&&null!==e.checkinTriggered&&!e.isSavingCheckin){e.isSavingCheckin=!0;try{const o=e.selectedBelief.id,{relapse:i}=yield e.beliefService.addCheckin(o,{triggered:e.checkinTriggered,reactionStrength:e.checkinTriggered?e.checkinReactionStrength:null,note:e.checkinNote.trim()||null});e.v3Analytics.logTroskifteCheckin(o,e.checkinTriggered,e.checkinReactionStrength),i&&(e.v3Analytics.logTroskifteBeliefRelapsed(o),e.relapseMessage=e.translate.instant("V3.TROSKIFTE.RELAPSE_MESSAGE")),e.showCheckinForm=!1,e.resetCheckinForm(),yield e.refreshCanMarkChanged(o)}catch(o){console.error("TroskifteV3: Error saving checkin",o)}finally{e.isSavingCheckin=!1}}})()}markAsChanged(){var e=this;return(0,c.A)(function*(){if(!e.selectedBelief?.id||!e.canMarkChanged)return;const o=e.selectedBelief.id;yield e.beliefService.markAsChanged(o),e.v3Analytics.logTroskifteBeliefMarkedChanged(o,e.selectedBelief.sessionCount||0)})()}dismissRelapseMessage(){this.relapseMessage=null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["app-troskifte-v3"]],decls:15,vars:8,consts:[[1,"ion-no-border","v3-header"],[1,"v3-toolbar"],[1,"header-content"],["slot","start"],[1,"hm-icon-btn",3,"click"],["name","arrow-back-outline"],[1,"hm-header-title"],[1,"v3-content",3,"fullscreen"],[1,"v3-app-container","content-padding"],["class","screen",4,"ngIf"],[1,"screen"],[1,"hm-glass-card","intro-card","hm-fade-in"],[1,"intro-icon"],[1,"intro-title"],[1,"intro-text"],[1,"hm-glass-card","scope-warning"],[1,"scope-warning-icon"],[1,"intro-text","intro-help-text"],[3,"click"],[1,"hm-btn","hm-btn--full","margin-top",3,"click"],[1,"hm-btn","hm-btn--full","margin-top","hm-fade-in",3,"click"],[1,"hm-section-title","hm-fade-in"],["class","loading-state",4,"ngIf"],["class","hm-glass-card empty-state",4,"ngIf"],["class","hm-glass-card belief-card hm-fade-in",3,"click",4,"ngFor","ngForOf"],[1,"loading-state"],["name","crescent"],[1,"hm-glass-card","empty-state"],[1,"empty-icon"],[1,"hm-glass-card","belief-card","hm-fade-in",3,"click"],[1,"belief-card-header"],[1,"belief-status-badge"],["class","belief-last-intensity",4,"ngIf"],[1,"belief-text"],[1,"belief-last-intensity"],["class","hm-fade-in",4,"ngIf"],["class","emotion-picker-overlay",3,"click",4,"ngIf"],[1,"hm-fade-in"],[1,"measurement-step-label"],[1,"hm-glass-card","step-card"],[1,"hm-section-title","center"],[1,"step-hint"],["rows","3",1,"ts-textarea",3,"ngModelChange","ngModel","placeholder"],[1,"hm-btn","hm-btn--full","margin-top",3,"click","disabled"],[1,"belief-quote"],[1,"scale-title"],["type","range","min","0","max","100",1,"ts-range",3,"ngModelChange","ngModel"],[1,"scale-value"],["class","gap-visualization",4,"ngIf"],[1,"button-row","margin-top"],[1,"hm-btn","hm-btn--outline",3,"click"],[1,"hm-btn",3,"click"],[1,"gap-visualization"],[1,"gap-bar"],[1,"gap-bar-fill"],[1,"gap-text"],[1,"emotion-selector-btn",3,"click"],[1,"emotion-emoji"],[1,"emotion-text"],[1,"value"],[1,"arrow-icon"],[1,"body-location-grid"],["class","body-location-chip",3,"selected","click",4,"ngFor","ngForOf"],[1,"hm-btn",3,"click","disabled"],[1,"body-location-chip",3,"click"],["class","counter-experience-field",4,"ngFor","ngForOf"],["class","add-ce-btn",3,"click",4,"ngIf"],[1,"hm-btn","hm-btn--outline",3,"click","disabled"],[1,"counter-experience-field"],["rows","2",1,"ts-textarea",3,"ngModelChange","ngModel","placeholder"],["class","ce-remove-btn",3,"click",4,"ngIf"],[1,"ce-remove-btn",3,"click"],[1,"add-ce-btn",3,"click"],[1,"emotion-picker-overlay",3,"click"],[1,"emotion-picker-modal",3,"click"],[1,"picker-header"],[1,"hm-close-btn","small",3,"click"],["name","close-outline"],[1,"picker-grid"],["class","picker-item",3,"click",4,"ngFor","ngForOf"],[1,"picker-item",3,"click"],[1,"emo-emoji"],[1,"emo-label"],[1,"belief-meta-row"],["class","hm-glass-card relapse-banner",4,"ngIf"],["class","hm-section-title",4,"ngIf"],["class","hm-glass-card intensity-chart",4,"ngIf"],[1,"hm-section-title"],["class","hm-btn hm-btn--outline hm-btn--full",3,"click",4,"ngIf"],["class","hm-glass-card checkin-form",4,"ngIf"],["class","hm-glass-card checkin-item",4,"ngFor","ngForOf"],["class","hm-btn hm-btn--full margin-top mark-changed-btn",3,"disabled","click",4,"ngIf"],["class","mark-changed-hint",4,"ngIf"],[1,"hm-glass-card","relapse-banner"],[1,"hm-glass-card","intensity-chart"],["class","chart-row",4,"ngFor","ngForOf"],[1,"chart-legend"],[1,"legend-dot","before"],[1,"legend-dot","after"],[1,"chart-row"],[1,"chart-row-label"],[1,"chart-bars"],[1,"chart-bar","before"],[1,"chart-bar","after"],[1,"hm-btn","hm-btn--outline","hm-btn--full",3,"click"],[1,"hm-glass-card","checkin-form"],[1,"button-row"],["class","checkin-reaction",4,"ngIf"],["class","ts-textarea","rows","2",3,"ngModel","placeholder","ngModelChange",4,"ngIf"],[1,"checkin-reaction"],[1,"intensity-grid"],["class","intensity-btn-round",3,"selected","click",4,"ngFor","ngForOf"],[1,"intensity-btn-round",3,"click"],[1,"hm-glass-card","checkin-item"],[1,"checkin-item-header"],[4,"ngIf"],["class","checkin-note",4,"ngIf"],[1,"checkin-note"],[1,"hm-btn","hm-btn--full","margin-top","mark-changed-btn",3,"click","disabled"],[1,"mark-changed-hint"]],template:function(o,i){1&o&&(t.j41(0,"ion-header",0)(1,"ion-toolbar",1)(2,"div",2)(3,"ion-buttons",3)(4,"button",4),t.bIt("click",function(){return i.goBack()}),t.nrm(5,"ion-icon",5),t.k0s()(),t.j41(6,"ion-title",6),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()(),t.j41(9,"ion-content",7)(10,"div",8),t.DNE(11,et,29,21,"div",9)(12,rt,17,15,"div",9)(13,vt,6,5,"div",9)(14,yt,28,28,"div",9),t.k0s()()),2&o&&(t.R
17$(7),t.JRh(t.bMT(8,6,"V3.TROSKIFTE.TITLE")),t.R7$(2),t.Y8G("fullscreen",!0),t.R7$(2),t.Y8G("ngIf","onboarding"===i.view),t.R7$(),t.Y8G("ngIf","list"===i.view),t.R7$(),t.Y8G("ngIf","wizard"===i.view),t.R7$(),t.Y8G("ngIf","detail"===i.view&&i.selectedBelief))},dependencies:[v.MD,v.Sq,v.bT,_.bv,_.QW,_.W9,_.eU,_.iq,_.w2,_.BC,_.ai,b.YN,b.me,b.MR,b.BC,b.vS,T.h,T.D9],styles:['@charset "UTF-8";.screen[_ngcontent-%COMP%]{padding-bottom:var(--hm-space-xl)}.margin-top[_ngcontent-%COMP%]{margin-top:var(--hm-space-md)}.intro-card[_ngcontent-%COMP%]{text-align:center}.intro-icon[_ngcontent-%COMP%]{font-size:2.5rem;margin-bottom:var(--hm-space-sm)}.intro-title[_ngcontent-%COMP%]{font-size:var(--hm-font-size-xl);font-weight:var(--hm-font-weight-bold);color:var(--hm-text-light, #fff);margin:0 0 var(--hm-space-sm) 0}.intro-text[_ngcontent-%COMP%]{font-size:var(--hm-font-size-base);color:var(--hm-text-light-muted, rgba(255, 255, 255, .8));line-height:1.5;margin:0 0 var(--hm-space-md) 0;text-align:left}.intro-help-text[_ngcontent-%COMP%]{text-align:center;margin-top:var(--hm-space-md)}.intro-help-text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--hm-text-light, #fff);text-decoration:underline;cursor:pointer;font-weight:var(--hm-font-weight-semibold)}.scope-warning[_ngcontent-%COMP%]{display:flex;gap:var(--hm-space-sm);align-items:flex-start;text-align:left;background:#ebba3e26;border:1px solid rgba(235,186,62,.4);margin:var(--hm-space-md) 0}.scope-warning[_ngcontent-%COMP%] .scope-warning-icon[_ngcontent-%COMP%]{font-size:1.4rem}.scope-warning[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 4px;font-size:var(--hm-font-size-sm);color:var(--hm-text-light, #fff)}.scope-warning[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .85));line-height:1.4}.loading-state[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:var(--hm-space-xl)}.empty-state[_ngcontent-%COMP%]{text-align:center;padding:var(--hm-space-xl)}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:2rem;margin-bottom:var(--hm-space-sm)}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--hm-text-light-muted, rgba(255, 255, 255, .8));margin:0}.belief-card[_ngcontent-%COMP%]{cursor:pointer;margin-bottom:var(--hm-space-sm)}.belief-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--hm-space-sm);gap:var(--hm-space-sm);flex-wrap:wrap}.belief-last-intensity[_ngcontent-%COMP%]{font-size:var(--hm-font-size-xs);color:var(--hm-text-light-muted, rgba(255, 255, 255, .75))}.belief-text[_ngcontent-%COMP%]{margin:0;color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-base);font-style:italic}.belief-status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 10px;border-radius:var(--hm-radius-pill);font-size:var(--hm-font-size-xs);font-weight:var(--hm-font-weight-semibold);text-transform:uppercase;letter-spacing:.5px}.belief-status-badge.status-active[_ngcontent-%COMP%]{background:#d0021b33;color:#ff8f9c}.belief-status-badge.status-verifying[_ngcontent-%COMP%]{background:#ebba3e33;color:#ebba3e}.belief-status-badge.status-changed[_ngcontent-%COMP%]{background:#74b39140;color:#a8d9bd}.belief-status-badge.status-archived[_ngcontent-%COMP%]{background:#ffffff1a;color:var(--hm-text-light-muted, rgba(255, 255, 255, .6))}.measurement-step-label[_ngcontent-%COMP%]{text-align:center;font-size:var(--hm-font-size-xs);text-transform:uppercase;letter-spacing:1px;color:var(--hm-text-light-muted, rgba(255, 255, 255, .7));margin-bottom:var(--hm-space-sm)}.step-card[_ngcontent-%COMP%]{text-align:center}.step-hint[_ngcontent-%COMP%]{font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .8));margin:0 0 var(--hm-space-sm) 0}.belief-quote[_ngcontent-%COMP%]{font-style:italic;font-size:var(--hm-font-size-lg);color:var(--hm-text-light, #fff);margin:0 0 var(--hm-space-md) 0}.ts-textarea[_ngcontent-%COMP%]{width:100%;background:#00000026;border:1px solid rgba(255,255,255,.2);border-radius:var(--hm-radius-md);padding:var(--hm-space-sm) var(--hm-space-md);color:var(--hm-text-light, #fff);font-family:var(--hm-font-family);font-size:var(--hm-font-size-base);resize:vertical;box-sizing:border-box}.ts-textarea[_ngcontent-%COMP%]::placeholder{color:var(--hm-text-light-muted, rgba(255, 255, 255, .5))}.scale-title[_ngcontent-%COMP%]{text-align:left;font-size:var(--hm-font-size-sm);color:var(--hm-text-light, #fff);margin:var(--hm-space-md) 0 var(--hm-space-xs) 0}.ts-range[_ngcontent-%COMP%]{width:100%;accent-color:var(--hm-primary)}.scale-value[_ngcontent-%COMP%]{text-align:right;font-size:var(--hm-font-size-sm);
1font-weight:var(--hm-font-weight-semibold);color:var(--hm-text-light, #fff)}.gap-visualization[_ngcontent-%COMP%]{margin-top:var(--hm-space-md);text-align:left}.gap-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;background:#ffffff26;overflow:hidden;margin-bottom:var(--hm-space-xs)}.gap-bar-fill[_ngcontent-%COMP%]{height:100%;background:var(--hm-gradient-brand, var(--hm-primary));border-radius:4px}.gap-text[_ngcontent-%COMP%]{font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .85));margin:0}.body-location-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--hm-space-sm);justify-content:center;margin-top:var(--hm-space-sm)}.body-location-chip[_ngcontent-%COMP%]{padding:8px 14px;border-radius:var(--hm-radius-pill);background:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-sm);cursor:pointer}.body-location-chip.selected[_ngcontent-%COMP%]{background:var(--hm-primary);border-color:var(--hm-primary)}.counter-experience-field[_ngcontent-%COMP%]{position:relative;margin-bottom:var(--hm-space-sm)}.counter-experience-field[_ngcontent-%COMP%] .ce-remove-btn[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;background:#0000004d;border:none;color:var(--hm-text-light, #fff);border-radius:50%;width:24px;height:24px;cursor:pointer}.add-ce-btn[_ngcontent-%COMP%]{width:100%;padding:var(--hm-space-sm);background:transparent;border:1px dashed rgba(255,255,255,.3);border-radius:var(--hm-radius-md);color:var(--hm-text-light-muted, rgba(255, 255, 255, .85));cursor:pointer}.button-row[_ngcontent-%COMP%]{display:flex;gap:var(--hm-space-sm)}.button-row[_ngcontent-%COMP%] .hm-btn[_ngcontent-%COMP%]{flex:1}.emotion-selector-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--hm-space-sm);width:100%;padding:var(--hm-space-md);background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:var(--hm-radius-md);color:var(--hm-text-light, #fff);cursor:pointer;margin-bottom:var(--hm-space-sm)}.emotion-selector-btn[_ngcontent-%COMP%] .emotion-emoji[_ngcontent-%COMP%]{font-size:1.6rem}.emotion-selector-btn[_ngcontent-%COMP%] .emotion-text[_ngcontent-%COMP%]{flex:1;text-align:left}.emotion-picker-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0009;z-index:1000;display:flex;align-items:flex-end}.emotion-picker-modal[_ngcontent-%COMP%]{background:#2a1a2f;width:100%;max-height:70vh;overflow-y:auto;border-radius:var(--hm-radius-xl) var(--hm-radius-xl) 0 0;padding:var(--hm-space-md)}.picker-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--hm-space-sm);margin-bottom:var(--hm-space-md)}.picker-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--hm-text-light, #fff)}.picker-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--hm-space-sm)}.picker-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:var(--hm-space-sm);background:#ffffff14;border:none;border-radius:var(--hm-radius-md);color:var(--hm-text-light, #fff);cursor:pointer}.picker-item[_ngcontent-%COMP%] .emo-emoji[_ngcontent-%COMP%]{font-size:1.5rem}.picker-item[_ngcontent-%COMP%] .emo-label[_ngcontent-%COMP%]{font-size:var(--hm-font-size-xs);text-align:center}.belief-meta-row[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:var(--hm-space-md);font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .8))}.relapse-banner[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--hm-space-sm);background:#ebba3e26;border:1px solid rgba(235,186,62,.4);margin-top:var(--hm-space-md)}.relapse-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:var(--hm-font-size-sm);color:var(--hm-text-light, #fff);line-height:1.4}.intensity-chart[_ngcontent-%COMP%] .chart-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--hm-space-sm);margin-bottom:var(--hm-space-sm)}.intensity-chart[_ngcontent-%COMP%] .chart-row-label[_ngcontent-%COMP%]{width:28px;font-size:var(--hm-font-size-xs);color:var(--hm-text-light-muted, rgba(255, 255, 255, .7))}
1.intensity-chart[_ngcontent-%COMP%] .chart-bars[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:3px}.intensity-chart[_ngcontent-%COMP%] .chart-bar[_ngcontent-%COMP%]{min-width:24px;height:14px;border-radius:4px;display:flex;align-items:center;justify-content:flex-end;padding-right:6px;box-sizing:border-box}.intensity-chart[_ngcontent-%COMP%] .chart-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:10px;font-weight:var(--hm-font-weight-semibold);color:#fff}.intensity-chart[_ngcontent-%COMP%] .chart-bar.before[_ngcontent-%COMP%]{background:var(--hm-danger)}.intensity-chart[_ngcontent-%COMP%] .chart-bar.after[_ngcontent-%COMP%]{background:var(--hm-success)}.intensity-chart[_ngcontent-%COMP%] .chart-legend[_ngcontent-%COMP%]{display:flex;gap:var(--hm-space-md);margin-top:var(--hm-space-sm);font-size:var(--hm-font-size-xs);color:var(--hm-text-light-muted, rgba(255, 255, 255, .75))}.intensity-chart[_ngcontent-%COMP%] .chart-legend[_ngcontent-%COMP%] .legend-dot[_ngcontent-%COMP%]{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px}.intensity-chart[_ngcontent-%COMP%] .chart-legend[_ngcontent-%COMP%] .legend-dot.before[_ngcontent-%COMP%]{background:var(--hm-danger)}.intensity-chart[_ngcontent-%COMP%] .chart-legend[_ngcontent-%COMP%] .legend-dot.after[_ngcontent-%COMP%]{background:var(--hm-success)}.checkin-form[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 var(--hm-space-sm) 0;color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-sm)}.checkin-reaction[_ngcontent-%COMP%]{margin:var(--hm-space-md) 0}.intensity-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-bottom:var(--hm-space-md)}.intensity-btn-round[_ngcontent-%COMP%]{aspect-ratio:1;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:#ffffff14;color:var(--hm-text-light, #fff);font-size:var(--hm-font-size-sm);cursor:pointer}.intensity-btn-round.selected[_ngcontent-%COMP%]{background:var(--hm-primary);border-color:var(--hm-primary)}.checkin-item[_ngcontent-%COMP%]{margin-bottom:var(--hm-space-sm)}.checkin-item-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:var(--hm-font-size-sm);color:var(--hm-text-light, #fff);font-weight:var(--hm-font-weight-semibold)}.checkin-note[_ngcontent-%COMP%]{margin:var(--hm-space-xs) 0 0 0;font-size:var(--hm-font-size-sm);color:var(--hm-text-light-muted, rgba(255, 255, 255, .8))}.mark-changed-btn[_ngcontent-%COMP%]{background:var(--hm-success)}.mark-changed-hint[_ngcontent-%COMP%]{text-align:center;font-size:var(--hm-font-size-xs);color:var(--hm-text-light-muted, rgba(255, 255, 255, .7));margin-top:var(--hm-space-sm)}']})}return n})()}}]);
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.