1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25193],{9785:(e,t,r)=>{"use strict";r.d(t,{C_:()=>o,XP:()=>a,vw:()=>i});let n="ga_utm_data";function a(){if(localStorage.getItem(n))return;let e=new URLSearchParams(window.location.search),t={};for(let r of["utm_source","utm_medium","utm_campaign","utm_term","utm_content"]){let n=e.get(r);n&&(t[r]=n.toLowerCase())}let r=e.get("fbclid")||void 0,a=e.get("gclid")||void 0,o=e.get("msclkid")||void 0,i=document.cookie.match(/(?:^|;\s*)_fbp=([^;]+)/),s=i?decodeURIComponent(i[1]):void 0,l=document.referrer||null,c=Object.keys(t).length>0,u=l&&!l.includes(window.location.hostname);if(!c&&!u&&!(r||a||o))return;!t.utm_source&&r&&(t.utm_source="meta",t.utm_medium=t.utm_medium||"paid"),!t.utm_source&&a&&(t.utm_source="google",t.utm_medium=t.utm_medium||"paid"),!t.utm_source&&o&&(t.utm_source="bing",t.utm_medium=t.utm_medium||"paid");let d={utm:t,referrer:u?l:null,landingPage:window.location.pathname+window.location.search,capturedAt:new Date().toISOString(),...r?{fbclid:r}:{},...a?{gclid:a}:{},...o?{msclkid:o}:{},...s?{fbp:s}:{}};try{localStorage.setItem(n,JSON.stringify(d))}catch{}try{let e=window.location.hostname,t="";(e.endsWith(".coachful.co")||"coachful.co"===e)&&(t="; domain=.coachful.co");let r=encodeURIComponent(JSON.stringify(d)),a="https:"===window.location.protocol?"; Secure":"";document.cookie=`${n}=${r}; path=/; max-age=7776000${t}${a}; SameSite=Lax`}catch{}}function o(){try{let e=localStorage.getItem(n);if(e)return JSON.parse(e)}catch{}try{let e=document.cookie.match(RegExp("(?:^|;\\s*)"+n+"=([^;]+)"));if(e){let t=JSON.parse(decodeURIComponent(e[1]));try{localStorage.setItem(n,JSON.stringify(t))}catch{}return t}}catch{}return null}function i(){try{localStorage.removeItem(n)}catch{}try{let e=window.location.hostname,t=e.endsWith(".coachful.co")||"coachful.co"===e?"; domain=.coachful.co":"";document.cookie=`${n}=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT${t}`}catch{}}},46260:(e,t,r)=>{"use strict";r.d(t,{TC:()=>s,ZL:()=>c,i7:()=>l});var n=r(695155),a=r(212115),o=r(447650);let i=(0,a.createContext)({target:null});function s({target:e,onHasSlotsChange:t,children:r}){let o=(0,a.useRef)(0),l=(0,a.useCallback)(()=>(o.current+=1,t?.(o.current>0),()=>{o.current-=1,t?.(o.current>0)}),[t]),c=(0,a.useMemo)(()=>({target:e,register:l}),[e,l]);return(0,n.jsx)(i.Provider,{value:c,children:r})}function l({children:e,inlineClassName:t}){let{target:r,register:s}=(0,a.useContext)(i),[c,u]=(0,a.useState)(!1);(0,a.useLayoutEffect)(()=>u(!0),[]);let d=c&&!!r;return((0,a.useLayoutEffect)(()=>{if(d&&s)return s()},[d,s]),d&&r)?(0,o.createPortal)(e,r):t?(0,n.jsx)("div",{className:t,children:e}):(0,n.jsx)(n.Fragment,{children:e})}function c({setNode:e}){return(0,n.jsx)("div",{className:"w-full",ref:e})}},80343:(e,t,r)=>{"use strict";r.d(t,{C3:()=>m,FI:()=>w,Pl:()=>f,X7:()=>h,Zk:()=>p,_s:()=>g,lH:()=>b});var n=r(816583),a=r(33702),o=r(603168),i=r(395702),s=r(984359);let l=s.A.default??s.A,c=null;function u(){if(c)return c;let e=null;try{e=new Intl.DisplayNames(["en"],{type:"region"})}catch{e=null}return c=(0,n.A)(l).map(t=>({code:t,name:e?.of(t)||t,callingCode:(0,a.Ko)(t,l),flag:/^[A-Z]{2}$/.test(t)?String.fromCodePoint(...t.split("").map(e=>127462+e.charCodeAt(0)-65)):"ð³ï¸"})).sort((e,t)=>e.name.localeCompare(t.name))}let d=null;function m(e){return e?(d||(d=new Map(u().map(e=>[e.code,e]))),d.get(e)||null):null}function h(e){let t=e.trim().toLowerCase().replace(/^\+/,""),r=u();return t?r.map(e=>{let r=e.name.toLowerCase(),n=-1;return r.startsWith(t)?n=0:e.code.toLowerCase()===t?n=1:e.callingCode===t?n=2:r.includes(t)?n=3:e.callingCode.startsWith(t)&&(n=4),{option:e,score:n}}).filter(e=>e.score>=0).sort((e,t)=>e.score-t.score||e.option.name.localeCompare(t.option.name)).map(e=>e.option):r}function f(e,t){return e?e.trim().startsWith("+")?new o.A(void 0,l).input(e):new o.A(t,l).input(e):""}function p(e,t){let r=(e||"").trim(),n=r.replace(/\D/g,"").length>=6;if(!r)return{e164:null,isValid:!1,isJudgeable:!1,resolvedCountry:null};let a=r.startsWith("+")?(0,i.A)(r,{},l):(0,i.A)(r,{defaultCountry:t},l),o=!!a?.isValid();return{e164:o?a.number:null,isValid:o,isJudgeable:n,resolvedCountry:a?.country||null}}function g(e="US"){try{let e=(new Intl.Locale(navigator.language).region||"").toUpperCase();if(/^[A-Z]{2}$/.test(e)&&m(e))return e}catch{}return e}function b(e){if(!e)return{country:null,national:""};let t=(0,i.A)(e.trim(),{},l);return t?.isValid()?{country:t.country||null,national:t.nationalNumber?String(t.nationalNumber):""}:{country:null,national:e.trim()}}function w(e){let t=(e||"").trim();if(!t)return"";let r=(0,i.A)(t,{},l);return r?.isValid()?r.formatInternational():t}},142692:(e,t,r)=>{"use strict";r.d(t,{Hw:()=>c,OrganizationProvider:()=>s,Z5:()=>l});var n=r(695155),a=r(212115),o=r(792939);let i=(0,a.createContext)(null);function s({children:e,initialOrganizationId:t,initialOrgRole:r}){let{isLoaded:l,isSignedIn:c,userId:u}=(0,o.useAppAuth)(),{firebaseUser:d}=(0,o.useFirebaseAuthUser)(),m=d?.uid||null,h=l&&c&&u?`${u}:${t||"no-org"}`:"signed-out",f=t&&r?{id:"ssr-pending",organizationId:t,orgRole:r,tier:"free",track:null,squadId:null,premiumSquadId:null,isActive:!0,joinedAt:"",permissionOverrides:void 0}:null,p=t&&r?[{id:t,name:"",isPrimary:!1,membership:{id:"ssr-pending",orgRole:r,tier:"free",track:null,joinedAt:"",permissionOverrides:void 0}}]:[],[g,b]=(0,a.useState)(f),[w,x]=(0,a.useState)(p),[v,y]=(0,a.useState)(t||null),k=(0,a.useRef)(t&&r&&u?`${u}:${t}`:null),C=(0,a.useRef)(h),[_,N]=(0,a.useState)(k.current||("signed-out"===h?"signed-out":null)),[S,j]=(0,a.useState)("signed-out"!==h&&k.current!==h),[A,O]=(0,a.useState)(null),$=(0,a.useRef)(d),P=!!f,z=P?S:S||"signed-out"!==h&&_!==h,I=!!t||!!r;(0,a.useEffect)(()=>{C.current=h},[h]),(0,a.useEffect)(()=>{$.current=d},[d]);let R=(0,a.useCallback)(async()=>{let e=C.current,r=()=>C.current!==e;if(l){if(!c||!u){b(null),x([]),y(null),N("signed-out"),j(!1);return}if(!I){let e=()=>document.cookie.split(";").some(e=>e.trim().startsWith("__session_hint="));if(!e()&&!m&&!$.current){let t=0;for(;t<5e3&&!e()&&!m&&!$.current;)if(await new Promise(e=>setTimeout(e,200)),t+=200,r())return}}try{P||j(!0),O(null);let e={},n=$.current;if(n)try{let t=await n.getIdToken();e.Authorization=`Bearer ${t}`}catch{}let a=await fetch("/api/user/organizations",{headers:e});if(!a.ok)throw Error("Failed to fetch organizations");
1if(r())return;let o=await a.json();if(r())return;let i=o.hiddenOrganizationIds||[];if(t&&i.includes(t)&&1){let e=o.organizations.find(e=>e.isPrimary&&e.tenantUrl);if(e?.tenantUrl)return void window.location.replace(`${e.tenantUrl}${window.location.pathname}${window.location.search}${window.location.hash}`)}let s=o.disabledOrganizations||[];if(t&&s.some(e=>e.id===t)&&!window.location.pathname.startsWith("/access-denied"))return void window.location.replace("/access-denied");x(o.organizations.map(e=>({id:e.id,name:e.name,isPrimary:e.isPrimary,platformAccessMode:e.platformAccessMode,membership:e.membership?{id:e.membership.id,orgRole:e.membership.orgRole,tier:e.membership.tier,track:e.membership.track,joinedAt:e.membership.joinedAt,permissionOverrides:e.membership.permissionOverrides}:void 0})));let l=t?o.organizations.find(e=>e.id===t):o.organizations.find(e=>e.isPrimary);if(l&&l.membership){if(r())return;y(l.id),b({id:l.membership.id,organizationId:l.id,orgRole:l.membership.orgRole,tier:l.membership.tier,track:l.membership.track,squadId:null,premiumSquadId:null,isActive:!0,joinedAt:l.membership.joinedAt,permissionOverrides:l.membership.permissionOverrides})}else{if(r())return;y(t||null),b(null)}}catch(e){if(r())return;console.error("[ORG_CONTEXT] Error fetching membership:",e),O(e instanceof Error?e.message:"Failed to load organization data")}finally{if(r())return;N(e),j(!1)}}},[I,P,l,c,u,t,m]);(0,a.useEffect)(()=>{R()},[R]);let E=(0,a.useCallback)(async()=>{await R()},[R]),W=(0,a.useCallback)(async e=>{try{let t={"Content-Type":"application/json"};if($.current)try{t.Authorization=`Bearer ${await $.current.getIdToken()}`}catch{}if(!(await fetch("/api/user/organizations/switch",{method:"POST",headers:t,body:JSON.stringify({organizationId:e})})).ok)throw Error("Failed to switch organization");return await R(),!0}catch(e){return console.error("[ORG_CONTEXT] Error switching org:",e),!1}},[R]),L=g?.orgRole==="super_coach",T=g?.orgRole==="coach"||g?.orgRole==="super_coach",F=g?.orgRole==="virtual_assistant",M=(0,a.useCallback)(()=>L,[L]),U=(0,a.useCallback)(()=>T,[T]),D=(0,a.useCallback)(()=>F,[F]),J=(0,a.useCallback)(e=>{if(!g)return!1;if(!e)return!0;let t=["free","standard","premium"];return t.indexOf(g.tier)>=t.indexOf(e)},[g]),Z=(0,a.useMemo)(()=>({currentMembership:g,organizations:w,organizationId:v,isLoading:z,error:A,refreshMembership:E,switchOrganization:W,isSuperCoach:M,isCoach:U,isVirtualAssistant:D,hasAccess:J}),[g,w,v,z,A,E,W,M,U,D,J]);return(0,n.jsx)(i.Provider,{value:Z,children:e})}function l(){let e=(0,a.useContext)(i);if(!e)throw Error("useOrganization must be used within an OrganizationProvider");return e}function c(){return(0,a.useContext)(i)}},255393:(e,t,r)=>{"use strict";r.d(t,{cD:()=>n,n2:()=>a,oo:()=>o});let n="https://www.coachful.co/terms",a="https://www.coachful.co/privacy",o="Msg frequency varies. Msg & data rates may apply. Reply STOP to opt out or HELP for help. Consent is not required to purchase."},309192:(e,t,r)=>{"use strict";r.d(t,{Q:()=>i,S:()=>s});var n=r(695155),a=r(682482),o=r(94514);function i({checked:e,onChange:t,id:r,disabled:s,className:l="",ariaLabel:c,indeterminate:u,as:d="button"}){let m=e||u,h=`w-5 h-5 rounded-md border-2 flex items-center justify-center flex-shrink-0 2 transition-all duration-200 3 ${m?"border-brand-accent bg-brand-accent":"border-[#d1cdc8] dark:border-[#3a4150] bg-white dark:bg-[#171b22] hover:border-brand-accent dark:hover:border-brand-accent/50"} 4 ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"} 5 ${l} 6 `,f=u?(0,n.jsx)(a.A,{className:"w-3.5 h-3.5 text-brand-accent-foreground",strokeWidth:3}):e?(0,n.jsx)(o.A,{className:"w-3.5 h-3.5 text-brand-accent-foreground",strokeWidth:3}):null;return"span"===d?(0,n.jsx)("span",{id:r,"aria-hidden":"true",className:h,children:f}):(0,n.jsx)("button",{type:"button",id:r,role:"checkbox","aria-checked":u?"mixed":e,"aria-label":c,disabled:s,onClick:()=>!s&&t?.(!e),onKeyDown:r=>{(" "===r.key||"Enter"===r.key)&&!r.repeat&&(r.preventDefault(),s||t?.(!e))},className:h,children:f})}function s({checked:e,onChange:t,name:r,id:a,disabled:o,className:i=""}){return(0,n.jsx)("button",{type:"button",id:a,role:"radio","aria-checked":e,disabled:o,onClick:()=>!o&&t(!0),className:`w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0 7 transition-all duration-200 8 ${e?"border-brand-accent bg-brand-accent":"border-[#d1cdc8] dar
8k:border-[#3a4150] bg-white dark:bg-[#171b22] hover:border-brand-accent dark:hover:border-brand-accent/50"} 9 ${o?"opacity-50 cursor-not-allowed":"cursor-pointer"} 10 ${i} 11 `,children:e&&(0,n.jsx)("div",{className:"w-2 h-2 rounded-full bg-white"})})}},317414:(e,t,r)=>{"use strict";r.d(t,{AM:()=>l,Wv:()=>c,dT:()=>u,hl:()=>d});var n=r(695155),a=r(212115),o=r(189270),i=r(167198),s=r(140980);let l=i.bL,c=i.l9,u=i.Mz,d=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,portalContainer:a,...l},c)=>{let u=(0,o.useAppearanceScope)();return(0,n.jsx)(i.ZL,{container:a??void 0,children:(0,n.jsx)(i.UC,{"data-funnel-theme":u,ref:c,align:t,sideOffset:r,className:(0,s.cn)("z-[10001] max-h-[var(--radix-popover-content-available-height)] w-72 overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",u,e),...l})})});d.displayName=i.UC.displayName},523646:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,598500,23)),Promise.resolve().then(r.bind(r,780539)),Promise.resolve().then(r.bind(r,59116)),Promise.resolve().then(r.bind(r,166852)),Promise.resolve().then(r.bind(r,340174)),Promise.resolve().then(r.bind(r,386261)),Promise.resolve().then(r.bind(r,978191))},580086:(e,t,r)=>{"use strict";r.d(t,{M:()=>s});var n=r(695155),a=r(212115);let o=["","bg-red-400","bg-orange-400","bg-yellow-400","bg-green-500"],i=["","text-red-500","text-orange-500","text-yellow-600","text-green-600"];function s({password:e}){let{score:t,label:r}=(0,a.useMemo)(()=>(function(e){if(!e)return{score:0,label:""};let t=0;return(e.length>=8&&t++,e.length>=12&&t++,/[a-z]/.test(e)&&/[A-Z]/.test(e)&&t++,/\d/.test(e)&&t++,/[^a-zA-Z0-9]/.test(e)&&t++,t<=1)?{score:1,label:"Weak"}:t<=2?{score:2,label:"Fair"}:t<=3?{score:3,label:"Good"}:{score:4,label:"Strong"}})(e),[e]);return e?(0,n.jsxs)("div",{className:"-mt-2 mb-1",children:[(0,n.jsx)("div",{className:"flex gap-1",children:[1,2,3,4].map(e=>(0,n.jsx)("div",{className:`h-1 flex-1 rounded-full transition-colors duration-200 ${e<=t?o[t]:"bg-[#e1ddd8] dark:bg-[#262b35]"}`},e))}),(0,n.jsx)("p",{className:`font-albert text-[11px] mt-1 ${i[t]}`,children:r})]}):null}},645051:(e,t,r)=>{"use strict";r.d(t,{k:()=>c,o:()=>u});var n=r(695155),a=r(212115),o=r(450910),i=r(309192),s=r(255393),l=r(756983);function c(e,t){let r=(0,o.c)("phoneChannelConsent"),n=(0,l.SO)(e),a=t?.trim()||"",i=a&&"coachful"!==a.toLowerCase()?r("businessOnBehalfOf",{organizationName:a}):r("businessDefault");return n?`${r(`${n}.intro`,{businessName:i})} ${r(`${n}.disclosure`)}`:""}function u({channels:e,checked:t,onChange:r,organizationName:d,consentText:m,disabled:h=!1,className:f="",dark:p=!1}){let g=(0,o.c)("phoneChannelConsent"),b=(0,a.useId)(),w=c(e,d);if(0===e.length)return null;let x=p?"text-white/80 underline underline-offset-2 hover:text-white":"text-gray-700 underline underline-offset-2 hover:text-gray-950 dark:text-white/80 dark:hover:text-white website-dark:text-white/80 website-dark:hover:text-white";return(0,n.jsxs)("div",{className:`space-y-2 ${f}`,"data-consent-version":(0,l.DG)(e),children:[(0,n.jsxs)("label",{htmlFor:b,className:"flex cursor-pointer select-none items-start gap-3",children:[(0,n.jsx)("div",{className:"shrink-0 pt-0.5",children:(0,n.jsx)(i.Q,{id:b,checked:t,onChange:r,disabled:h})}),(0,n.jsx)("span",{className:`font-albert text-[13px] leading-relaxed ${p?"text-white/80":"text-gray-700 dark:text-white/80 website-dark:text-white/80"}`,children:m||w})]}),(0,n.jsxs)("p",{className:`pl-7 text-xs leading-relaxed ${p?"text-white/60":"text-gray-500 dark:text-white/60 website-dark:text-white/60"}`,children:[(0,n.jsx)("a",{href:s.cD,target:"_blank",rel:"noopener noreferrer",className:x,children:g("terms")})," · ",(0,n.jsx)("a",{href:s.n2,target:"_blank",rel:"noopener noreferrer",className:x,children:g("privacyPolicy")})]})]})}},756983:(e,t,r)=>{"use strict";function n(e){if(!e)return[];let t=[];
11return!0===e.collectPhoneForSms&&t.push("sms"),!0===e.collectPhoneForWhatsApp&&t.push("whatsapp"),!0===e.collectPhoneForCalls&&t.push("call"),t}function a(e){let t=e.includes("sms"),r=e.includes("whatsapp"),n=e.includes("call");return t&&r&&n?"smsWhatsappCall":t&&r?"smsWhatsapp":t&&n?"smsCall":r&&n?"whatsappCall":t?"sms":r?"whatsapp":n?"call":null}r.d(t,{DG:()=>i,OF:()=>s,RC:()=>n,SO:()=>a});let o={sms:"coachful-transactional-sms-2026-07-26",whatsapp:"coachful-transactional-whatsapp-2026-08-18",call:"coachful-calls-2026-08-19",smsWhatsapp:"coachful-transactional-sms-whatsapp-2026-08-18",smsCall:"coachful-transactional-sms-calls-2026-08-19",whatsappCall:"coachful-transactional-whatsapp-calls-2026-08-19",smsWhatsappCall:"coachful-transactional-sms-whatsapp-calls-2026-08-19"};function i(e){let t=a(e);return t?o[t]:""}let s=!1}},e=>{e.O(0,[28960,67984,33418,38437,45399,18409,49304,77805,97873,49389,9683,7188,68484,16304,67839,9721,59982,33216,92939,24516,87130,86261,40174,67207,28441,26890,77358],()=>e(e.s=523646)),_N_E=e.O()}]);
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.