1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3122,5699],{471:(e,n,s)=>{e.exports=s(2602)},2083:(e,n,s)=>{"use strict";s.d(n,{A:()=>a});var t=s(17767);class a extends t.A{constructor(e,n){super("therapist_client_profile",e),void 0!==n&&this.setProperty(n)}}},3238:(e,n,s)=>{"use strict";s.d(n,{A:()=>S});var t=s(33164),a=s(44896),i=s(68794),r=s.n(i),l=s(3984),o=s(33132),c=s(37643);let d=JSON.parse('{"label":"Geplante Wartung","header":"Vor\xfcbergehende geplante Wartung am ${date}","content":"W\xe4hrend dieser Zeit wirst du nicht auf dein Konto zugreifen k\xf6nnen, also plane bitte entsprechend."}');var u=s.t(d,2);let h=JSON.parse('{"label":"Scheduled maintenance","header":"Temporary scheduled maintenance on ${date}","content":"During this time, you will not be able to access your account so please plan accordingly."}');var m=s.t(h,2);let p=JSON.parse('{"label":"Mantenimiento programado","header":"Mantenimiento programado temporal el ${date}","content":"Durante este tiempo, no podr\xe1s acceder a tu cuenta, as\xed que planif\xedcate con antelaci\xf3n."}');var g=s.t(p,2);let v=JSON.parse('{"label":"Maintenance programm\xe9e","header":"Maintenance temporaire programm\xe9e le ${date}","content":"Pendant cette interruption, vous ne pourrez pas acc\xe9der \xe0 votre compte\xa0; merci de prendre vos dispositions en cons\xe9quence."}');var f=s.t(v,2);let b=JSON.parse('{"label":"Gepland onderhoud","header":"Tijdelijk gepland onderhoud op ${date}","content":"Gedurende deze tijd heb je geen toegang tot je account, dus houd hier rekening mee."}'),y={de:u,en:m,es:g,fr:f,nl:s.t(b,2)};function S(e){let{banner:n,className:s,cookieName:i="saw_scheduler_banner"}=e,d=(0,o.B)(y),[u,h]=(0,a.useState)(!0);return n?(0,t.jsx)(l.Ay,{"data-testid":"scheduled-maintenance",className:s,variant:"feedback.warning",isOpen:u,onOpenChange:e=>{e||r().set(i,n.noticeStage,{expires:new Date(n.cookieExpirationDate)}),h(e)},isDismissable:!0,ContentComponent:N,extraContentProps:{date:n.date},children:(0,c.t)(d.label)}):null}let N=e=>{let{iconProps:n,date:s}=e,a=(0,o.B)(y);return(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("i",{...n}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("h6",{className:"body-sm-bold",children:(0,c.t)(a.header,{date:s})}),(0,t.jsx)("span",{className:"body-sm",children:(0,c.t)(a.content)})]})]})}},3270:(e,n,s)=>{"use strict";s.d(n,{m:()=>m});var t=s(70523),a=s(23991),i=s(23418),r=s(29808),l=s(20857),o=s(35502),c=s(65071),d=s(92865),u=s(44249),h=s(37794);function m(e,n){let{name:s,form:m,isReadOnly:p,isRequired:g,isDisabled:v,orientation:f="vertical",validationBehavior:b="aria"}=e,{direction:y}=(0,h.Y)(),{isInvalid:S,validationErrors:N,validationDetails:k}=n.displayValidation,{labelProps:x,fieldProps:w,descriptionProps:j,errorMessageProps:C}=(0,c.M)({...e,labelElementType:"span",isInvalid:n.isInvalid,errorMessage:e.errorMessage||N}),D=(0,t.$)(e,{labelable:!0}),{focusWithinProps:A}=(0,d.R)({onBlurWithin(s){e.onBlur?.(s),n.selectedValue||n.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),_=(0,u.Bi)(s);return o.V.set(n,{name:_,form:m,descriptionId:j.id,errorMessageId:C.id,validationBehavior:b}),{radioGroupProps:(0,l.v)(D,{role:"radiogroup",onKeyDown:e=>{let s,t;switch(e.key){case"ArrowRight":s="rtl"===y&&"vertical"!==f?"prev":"next";break;case"ArrowLeft":s="rtl"===y&&"vertical"!==f?"next":"prev";break;case"ArrowDown":s="next";break;case"ArrowUp":s="prev";break;default:return}e.preventDefault();let l=(0,i.N$)(e.currentTarget,{from:(0,a.wt)(e),accept:e=>e instanceof(0,r.mD)(e).HTMLInputElement&&"radio"===e.type});"next"===s?(t=l.nextNode())||(l.currentNode=e.currentTarget,t=l.firstChild()):(t=l.previousNode())||(l.currentNode=e.currentTarget,t=l.lastChild()),t&&(t.focus(),n.setSelectedValue(t.value))},"aria-invalid":n.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":p||void 0,"aria-required":g||void 0,"aria-disabled":v||void 0,"aria-orientation":f,...w,...A}),labelProps:x,descriptionProps:j,errorMessageProps:C,isInvalid:S,validationErrors:N,validationDetail
1s:k}}},5277:(e,n,s)=>{"use strict";s.d(n,{Z:()=>o});var t=s(99955),a=s(69575),i=s(44896);let r=Math.round(1e10*Math.random()),l=0;function o(e){let n=(0,i.useMemo)(()=>e.name||`radio-group-${r}-${++l}`,[e.name]),[s,o]=(0,a.P)(e.value,e.defaultValue??null,e.onChange),[c]=(0,i.useState)(s),[d,u]=(0,i.useState)(null),h=(0,t.KZ)({...e,value:s}),m=h.displayValidation.isInvalid;return{...h,name:n,selectedValue:s,defaultSelectedValue:void 0!==e.value?c:e.defaultValue??null,setSelectedValue:n=>{e.isReadOnly||e.isDisabled||(o(n),h.commitValidation())},lastFocusedValue:d,setLastFocusedValue:u,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(m?"invalid":null),isInvalid:m}}},5715:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});var t=s(53503),a=s(69649);function i(e){(0,a.A)(1,arguments);var n=(0,t.A)(e);return n.setHours(0,0,0,0),n}},18609:(e,n,s)=>{"use strict";s.r(n),s.d(n,{__N_SSP:()=>ng,default:()=>nv});var t=s(33164),a=s(44896),i=s(92430),r=s.n(i),l=s(59668),o=s(23418),c=s(12960),d=s(14707),u=s(22575),h=s(17994),m=s(2083),p=s(74415),g=s(42885),v=s(97393),f=s(88854),b=s(6108),y=s(30213),S=s(69649),N=s(88621),k=s(28371),x=s(9974),w=s(97604),j=s(43554),C=s(33132),D=s(51760),A=s(37643);let _=JSON.parse('{"goToTherapyRoom":"Zum Therapieraum gehen","cancel":"Abbrechen","startingSoon":"Beginnt bald","firstSession":"Erste Sitzung","holiday":"Feiertag","nearHoliday":"Kurz vor einem Feiertag","duration":{"video":"${minutes}-min\xfctige Videositzung","livechat":"${minutes}-min\xfctige Chat-Sitzung","phone":"${minutes}-min\xfctige Telefonsitzung"},"messageClient":"Nachricht ${nickName}"}');var T=s.t(_,2);let z=JSON.parse('{"goToTherapyRoom":"Go to therapy room","cancel":"Cancel","startingSoon":"Starting soon","firstSession":"First session","holiday":"Holiday","nearHoliday":"Near holiday","duration":{"video":"${minutes}-minute video session","livechat":"${minutes}-minute chat session","phone":"${minutes}-minute phone session"},"messageClient":"Message ${nickName}"}');var P=s.t(z,2);let B=JSON.parse('{"goToTherapyRoom":"Ir a la sala de terapia","cancel":"Cancelar","startingSoon":"Empieza pronto","firstSession":"Primera sesi\xf3n","holiday":"Vacaciones","nearHoliday":"Cerca de un d\xeda festivo","duration":{"video":"Sesi\xf3n de v\xeddeo de ${minutes} minutos","livechat":"Sesi\xf3n de chat de ${minutes} minutos","phone":"Sesi\xf3n telef\xf3nica de ${minutes} minutos"},"messageClient":"Mensaje ${nickName}"}');var M=s.t(B,2);let $=JSON.parse('{"goToTherapyRoom":"Acc\xe9der \xe0 la salle de th\xe9rapie","cancel":"Annuler","startingSoon":"D\xe9marre bient\xf4t","firstSession":"Premi\xe8re s\xe9ance","holiday":"Vacances","nearHoliday":"\xc0 lâapproche dâun jour f\xe9ri\xe9","duration":{"video":"S\xe9ance vid\xe9o de ${minutes}\xa0minutes","livechat":"S\xe9ance de chat de ${minutes}\xa0minutes","phone":"S\xe9ance t\xe9l\xe9phonique de ${minutes}\xa0minutes"},"messageClient":"Message ${nickName}"}');var q=s.t($,2);let R=JSON.parse('{"goToTherapyRoom":"Ga naar therapiekamer","cancel":"Annuleren","startingSoon":"Begint binnenkort","firstSession":"Eerste sessie","holiday":"Vakantie","nearHoliday":"Dichtbij een vakantie","duration":{"video":"Videosessie van ${minutes} minuten","livechat":"Chatsessie van ${minutes} minuten","phone":"Telefoonsessie van ${minutes} minuten"},"messageClient":"Bericht ${nickName}"}'),O={de:T,en:P,es:M,fr:q,nl:s.t(R,2)};var F=s(27746);function I(e){var n;let{session:s,onCancel:i,nickName:r}=e,{clientId:l,startsAt:o,durationSeconds:c,type:d,isFirstSession:u,holidayStatus:h}=s,{session:{locale:m,user:{timezone:p}}}=(0,N.SF)(),{isStartingSoon:g,showTherapyRoomButton:w}=function(e){let n=(0,f.A)(e),s=function(e,n){(0,S.A)(2,arguments);var s=(0,b.A)(n);return(0,F.A)(e,-s)}(n,15),[t,i]=(0,a.useState)(()=>new Date);return(0,a.useEffect)(()=>{let e=[s,n].find(e=>e>t);if(!e)return;let a=setTimeout(()=>{i(new Date)},e.getTime()-t.getTime());return()=>clearTimeout(a)},[t,n,s]),{isStartingSoon:t>=s&&t<n,showTherapyRoomButton:t>=s}}(o),{formattedDate:_,formattedTimeRange:T}=((e,n,s,t)=>{let a=(0,f.A)(e),i=function(e,n){(0,S.A)(2,arguments);var s=(0,b.A)(n);return(0,y.A)(e,1e3*s)}(a,n);return{formattedDate:(0,D.r6)(a,{dateStyle:"full",timeZone:t},s),formattedTimeRange:(0,D.mi)(a,i,{hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:t},s)}})(o,c,m,p),z=(0,C.B)(O);return(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row gap-4 justify-between border border-border-strong rounded-2xl p-4 items-center",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full lg:w-auto",children:[(0,t.jsx)(L,{isStartingSoon:g,isFirstSession:u,holidayStatus:h}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"body-md block",children:_}),(0,t.jsx)("p",{className:"body-md block",children:T}),(0,t.jsxs)("p",{className:"caption",children:[(0,t.jsx)("i",{className:(0,v.A)("fa-solid mr-1",k.x[d]),"aria-hidden":"true"}),(n=Math.trunc(c/60),"livechat"===d?(0,A.t)(z.duration.livechat,{minutes:n}):"phone"===d?(0,A.t)(z.duration.phone,{minutes:n}):(0,A.t)(z.duration.video,{minutes:n}))]})]})]}),(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[w&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.A,{variant:"link",href:"/?key=".concat(l,"&focus_messenger=1"),className:"!font-medium",target:"_blank",children:(0,A.t)(z.messageClient,{nickName:r})}),(0,t.jsx)(j.A,{variant:"secondary",href:"/?key=".concat(l),target:"_blank",children:(0,A.t)(z.goToTherapyRoom)})]}),!w&&(0,t.jsx)(x.A,{variant:"tertiary",onClick:()=>i(s),children:(0,A.t)(z.cancel)})]})]})}let L=e=>{let{isStartingSoon:n=!1,isFirstSession:s=!1,holidayStatus:a="none"}=e,i=(0,C.B)(O);return n||s||"none"!==a?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[n&&(0,t.jsxs)(w.Ay,{variant:"warning",children:[(0,t.jsx)("i",{className:"fa-timer fa-solid text-xs/3","aria-hidden":"true"}),(0,A.t)(i.startingSoon)]}),s&&(0,t.jsxs)(w.Ay,{variant:"success",children:[(0,t.jsx)("i",{className:"fa-party-horn fa-solid text-xs/3","aria-hidden":"true"}),(0,A.t)(i.firstSession)]}),"none"!==a&&(0,t.jsx)(w.Ay,{variant:"warning",children:"holiday"===a?(0,A.t)(i.holiday):(0,A.t)(i.nearHoliday)})]}):null};var E=s(35895),V=s(3238),J=s(83864);let W=JSON.parse('{"heading":"\xdcberblick \xfcber die Terminplanung von ${nickName}","scheduleSession":"Sitzung vereinbaren","upcomingSessions":"Kommende Sitzungen","de
1scription":"Starte deine therapeutische Beziehung, indem du eine Sitzung mit deiner neuen Klient:in vereinbarst. Derzeit sind keine Termine geplant.","descriptionEstablished":"Keine bevorstehenden Sitzungen. Du kannst bis zu 3 weitere Sitzungen buchen, indem du jeweils eine hinzuf\xfcgst.","openSchedule":"\xd6ffne deinen Terminplan in einem neuen Tab"}');var H=s.t(W,2);let K=JSON.parse('{"heading":"${nickName}\'s scheduling overview","scheduleSession":"Schedule session","upcomingSessions":"Upcoming sessions","description":"Jumpstart your therapeutic relationship by scheduling a session with your new client. No upcoming sessions currently scheduled.","descriptionEstablished":"No upcoming sessions. You\'ll be able to book up to 3 more sessions by adding them one at a time.","openSchedule":"Open your schedule in a new tab"}');var U=s.t(K,2);let Z=JSON.parse('{"heading":"Resumen de la programaci\xf3n de ${nickName}","scheduleSession":"Agendar sesi\xf3n","upcomingSessions":"Pr\xf3ximas sesiones","description":"Inicia tu relaci\xf3n terap\xe9utica programando una sesi\xf3n con tu nuevo cliente. No hay sesiones programadas por ahora.","descriptionEstablished":"No hay pr\xf3ximas sesiones. Podr\xe1s reservar hasta 3 sesiones m\xe1s a\xf1adi\xe9ndolas una a una.","openSchedule":"Abrir tu agenda en una pesta\xf1a nueva"}');var G=s.t(Z,2);let Y=JSON.parse('{"heading":"Aper\xe7u de la planification de ${nickName}","scheduleSession":"Planifier une s\xe9ance","upcomingSessions":"Sessions \xe0 venir","description":"Commencez votre relation th\xe9rapeutique en planifiant une s\xe9ance avec votre nouveau client. Aucune s\xe9ance n\'est pr\xe9vue pour le moment.","descriptionEstablished":"Aucune s\xe9ance \xe0 venir. Vous pourrez planifier jusqu\'\xe0 trois s\xe9ances suppl\xe9mentaires en les ajoutant une par une.","openSchedule":"Ouvrez votre planning dans un nouvel onglet"}');var Q=s.t(Y,2);let X=JSON.parse('{"heading":"Overzicht van de planning van ${nickName}","scheduleSession":"Sessie plannen","upcomingSessions":"Aankomende sessies","description":"Start je therapeutische relatie door een sessie te plannen met je nieuwe cli\xebnt. Er staan momenteel geen aankomende sessies gepland.","descriptionEstablished":"Geen aankomende sessies. Je kunt tot 3 extra sessies boeken door ze \xe9\xe9n voor \xe9\xe9n toe te voegen.","openSchedule":"Open je planning in een nieuw tabblad"}'),ee={de:H,en:U,es:G,fr:Q,nl:s.t(X,2)};function en(e){let{isEstablished:n,nickName:s,onScheduleSessionClick:a,scheduledMaintenanceBanner:i}=e,{conf:{assets_app_version:r,cdn_host_assets:l}}=(0,N.SF)(),o=(0,C.B)(ee);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex flex-col md:flex-row items-center md:justify-between gap-6",children:(0,t.jsx)("span",{className:"heading-md",children:(0,A.t)(o.heading,{nickName:s})})}),(0,t.jsx)(V.A,{banner:i,className:"mt-6"}),(0,t.jsx)(E.A,{src:(0,J.MZ)("https://".concat(l,"/betterhelp_two/icons/careers-work-world-is-changing.png"),r),alt:"",height:120,width:120,className:"mx-auto mt-6","aria-hidden":!0}),(0,t.jsx)("h1",{className:"heading-sm block mt-2.5 text-center","data-global-typography":!1,children:(0,A.t)(o.upcomingSessions)}),(0,t.jsx)("p",{className:"body-md text-center mt-4",children:(0,A.t)(n?o.descriptionEstablished:o.description)}),(0,t.jsxs)(x.A,{variant:"primary",size:"md",className:"!flex mx-auto mt-6",onClick:a,children:[(0,A.t)(o.scheduleSession),(0,t.jsx)("i",{className:"fa-plus fa-solid text-base/4","aria-hidden":"true"})]}),(0,t.jsx)(j.A,{href:"/#scheduling",variant:"link",target:"_blank",size:"sm",className:"mt-6 block w-fit mx-auto",children:(0,A.t)(o.openSchedule)})]})}var es=s(16110),et=s(91113),ea=s(45049),ei=s(3984),er=s(90784);let el=JSON.parse('{"formAriaLabel":"Ablauf zur Absage der Live-Sitzung","titles":{"initial":"Live-Sitzung absagen","reasonClient":"${clientName} hat gebeten, die Live-Sitzung abzusagen","reasonTherapist":"Ich muss die Live-Sitzung absagen","rescheduleQuestion":"M\xf6chtest du einen neuen Termin vereinbaren?","reschedule":"Live-Sitzung verschieben","cancel":"Live-Sitzung absagen","successResc
1heduled":"Live-Sitzung erfolgreich verlegt","successCancelled":"Live-Sitzung erfolgreich abgesagt"},"buttons":{"close":"Schlie\xdfen","next":"Weiter","back":"Zur\xfcck","reschedule":"Verschieben","cancel":"Sitzung absagen"},"binaryOptions":{"yes":"Ja","no":"Nein"},"requestSource":{"question":"Stornierst du auf Wunsch von ${clientName}?"},"reason":{"clientPrompt":"Welchen Grund hat ${clientName} f\xfcr diese Absage angegeben?","therapistPrompt":"Warum sagst du diese Sitzung ab?","otherPlaceholder":"Bitte mache weitere Angaben","clientNote":"Hinweis: Der Klient erh\xe4lt eine Benachrichtigung, wenn du eine Live-Sitzung in seinem Namen absagst.","options":{"schedulingConflict":"Terminkonflikt","personalEmergency":"Pers\xf6nlicher/medizinischer Notfall","cancelSwitch":"Klient:in wechselt Berater:in oder k\xfcndigt BetterHelp-Mitgliedschaft","vacation":"Urlaub","other":"Andere"}},"availability":{"note":"Das Sitzungszeitfenster wird standardm\xe4\xdfig deinen anderen Klient:innen zur Verf\xfcgung gestellt. Um Zeitfenster zu entfernen, die nicht mehr verf\xfcgbar sind, besuche bitte deinen ${link}.","noteLink":"Terminplanungs-Tab","noteLabel":"Hinweis zur Verf\xfcgbarkeit bei der Terminplanung"},"reschedule":{"confirmBanner":"Du bist dabei, die Live-Sitzung von ${clientName} von ${currentDateTime} auf ${nextDateTime} zu verschieben.","confirmBannerLabel":"Zusammenfassung der Sitzungsverschiebung","confirmPrompt":"Bitte teile unten mit, warum du den Termin verschiebst","confirmPlaceholder":"Ich habe unsere bevorstehende Sitzung verschoben, weil ...","confirmNote":"Dies wird als Nachricht an deine Klient:in angezeigt."},"cancel":{"prompt":"Bitte teile mit, warum du absagst","promptNote":"Dies wird als Nachricht an deine Klient:in angezeigt.","placeholder":"Ich habe unsere n\xe4chste Sitzung abgesagt, weil ..."},"success":{"descriptionRescheduled":"Wir haben ${clientName} benachrichtigt, dass du die Live-Sitzung verlegt hast.","descriptionCancelled":"Wir haben ${clientName} benachrichtigt, dass du die Live-Sitzung abgesagt hast."},"errors":{"loadRescheduleOptions":"Wir konnten die verf\xfcgbaren Zeiten gerade nicht laden. Bitte versuche es erneut.","submitCancellation":"Wir konnten diese Sitzung gerade nicht absagen. Bitte versuche es erneut.","submitReschedule":"Wir konnten diese Sitzung momentan nicht neu planen. Bitte versuche es erneut."}}');var eo=s.t(el,2);let ec=JSON.parse('{"formAriaLabel":"Cancel live session flow","titles":{"initial":"Cancel live session","reasonClient":"${clientName} has requested to cancel the live session","reasonTherapist":"I need to cancel the live session","rescheduleQuestion":"Would you like to reschedule?","reschedule":"Reschedule live session","cancel":"Cancel live session","successRescheduled":"Live session successfully rescheduled","successCancelled":"Live session successfully cancelled"},"buttons":{"close":"Close","next":"Next","back":"Back","reschedule":"Reschedule","cancel":"Cancel session"},"binaryOptions":{"yes":"Yes","no":"No"},"requestSource":{"question":"Are you cancelling at the request of ${clientName}?"},"reason":{"clientPrompt":"What reason did ${clientName} provide for this cancellation?","therapistPrompt":"Why are you cancelling this session?","otherPlaceholder":"Please share a little more information","clientNote":"Note: Client will receive a notification when you cancel a live session on their behalf.","options":{"schedulingConflict":"Scheduling conflict","personalEmergency":"Personal/Medical emergency","cancelSwitch":"Client switching therapists or cancelling BetterHelp membership","vacation":"Vacation","other":"Other"}},"availability":{"note":"The session time slot will be made available to your other clients by default. To remove any slots that are no longer available, please visit your ${link}.","noteLink":"Scheduling Tab","noteLabel":"Scheduling availability note"},"reschedule":{"confirmBanner":"You are about to reschedule ${clientName}\'s live session from ${currentDateTime} to ${nextDateTime}.","confirmBannerLabel":"Reschedule session summary","confirmPrompt":"Please share why you are rescheduling","confirmPlaceholder":"I\'ve rescheduled our upcoming session because...","confirmNote":"This will be displayed as a message to your client."},"cancel":{"prompt":"Please share why you are cancelling","promptNote":"This will be displayed as a message to your client.","placeholder":"I\'ve cancelled our upcoming session because..."},"success":{"descriptionRescheduled":"We have notified ${clientName} that you have rescheduled the live session.","descriptionCancelled":"We have notified ${clientName} that you have cancelled the live session."},"errors":{"loadRescheduleOptions":"We couldn\'t load available times right now. Please try again.","submitCancellation":"We couldn\'t cancel this session right now. Please try again.","submitReschedule":"We couldn\'t reschedule this session right now. Please try again."}}');var ed=s.t(ec,2);let eu=JSON.parse('{"formAriaLabel":"Flujo de cancelaci\xf3n de sesi\xf3n en directo","titles":{"initial":"Cancelar sesi\xf3n en directo","reasonCl
1ient":"${clientName} ha solicitado cancelar la sesi\xf3n en directo","reasonTherapist":"Necesito cancelar la sesi\xf3n en directo","rescheduleQuestion":"\xbfTe gustar\xeda reagendar?","reschedule":"Reagenda la sesi\xf3n en directo","cancel":"Cancelar sesi\xf3n en directo","successRescheduled":"Sesi\xf3n en directo reprogramada correctamente","successCancelled":"Sesi\xf3n en directo cancelada correctamente"},"buttons":{"close":"Cerrar","next":"Siguiente","back":"Volver","reschedule":"Reagendar ","cancel":"Cancelar sesi\xf3n"},"binaryOptions":{"yes":"S\xed","no":"No"},"requestSource":{"question":"\xbfVas a cancelar a petici\xf3n de ${clientName}?"},"reason":{"clientPrompt":"\xbfQu\xe9 raz\xf3n proporcion\xf3 ${clientName} para esta cancelaci\xf3n?","therapistPrompt":"\xbfPor qu\xe9 cancelas esta sesi\xf3n?","otherPlaceholder":"Por favor, comparte un poco m\xe1s de informaci\xf3n","clientNote":"Nota: El cliente recibir\xe1 una notificaci\xf3n cuando canceles una sesi\xf3n en directo en su nombre.","options":{"schedulingConflict":"Conflicto de agenda","personalEmergency":"Emergencia personal/m\xe9dica","cancelSwitch":"Cliente que cambia de psic\xf3logo o cancela la suscripci\xf3n a BetterHelp","vacation":"Vacaciones","other":"Otros"}},"availability":{"note":"La franja horaria de la sesi\xf3n estar\xe1 disponible para tus otros clientes por defecto. Para eliminar cualquier franja horaria que ya no est\xe9 disponible, visita tu ${link}.","noteLink":"Pesta\xf1a de agenda","noteLabel":"Nota sobre la programaci\xf3n de disponibilidad"},"reschedule":{"confirmBanner":"Est\xe1s a punto de reagendar la sesi\xf3n en directo de ${clientName} de ${currentDateTime} a ${nextDateTime}.","confirmBannerLabel":"Resumen de la sesi\xf3n reagendada","confirmPrompt":"Cu\xe9ntanos por qu\xe9 est\xe1s reagendando","confirmPlaceholder":"He reagendado nuestra pr\xf3xima sesi\xf3n porqueâ¦","confirmNote":"Esto se mostrar\xe1 como un mensaje para tu cliente."},"cancel":{"prompt":"Cu\xe9ntanos por qu\xe9 vas a cancelar","promptNote":"Esto se mostrar\xe1 como un mensaje para tu cliente.","placeholder":"He cancelado nuestra pr\xf3xima sesi\xf3n porqueâ¦"},"success":{"descriptionRescheduled":"Hemos notificado a ${clientName} que has reagendado la sesi\xf3n en directo.","descriptionCancelled":"Hemos notificado a ${clientName} que has cancelado la sesi\xf3n en directo."},"errors":{"loadRescheduleOptions":"No hemos podido cargar las horas disponibles en este momento. Int\xe9ntalo de nuevo.","submitCancellation":"No hemos podido cancelar esta sesi\xf3n en este momento. Int\xe9ntalo de nuevo.","submitReschedule":"No hemos podido reagendar esta sesi\xf3n en este momento. Int\xe9ntalo de nuevo."}}');var eh=s.t(eu,2);let em=JSON.parse('{"formAriaLabel":"Flux d\'annulation de s\xe9ance en direct","titles":{"initial":"Annuler la s\xe9ance en direct","reasonClient":"${clientName} a demand\xe9 l\'annulation de la s\xe9ance en direct","reasonTherapist":"Je dois annuler la s\xe9ance en direct","rescheduleQuestion":"Souhaitez-vous reporter la date ?","reschedule":"Reporter la s\xe9ance en direct","cancel":"Annuler la s\xe9ance en direct","successRescheduled":"S\xe9ance en direct reprogramm\xe9e avec succ\xe8s","successCancelled":"S\xe9ance en direct annul\xe9e avec succ\xe8s"},"buttons":{"close":"Fermer","next":"Suivant","back":"Retour","reschedule":"Reprogrammer","cancel":"Annuler la s\xe9ance"},"binaryOptions":{"yes":"Oui","no":"Non"},"requestSource":{"question":"Annulez-vous \xe0 la demande de ${clientName}?"},"reason":{"clientPrompt":"Quelle raison ${clientName} a-t-il invoqu\xe9e pour justifier cette annulation ?","therapistPrompt":"Pourquoi annulez-vous cette s\xe9ance\xa0?","otherPlaceholder":"Merci de donner un peu plus d\'informations","clientNote":"Remarque : le client recevra une notification lorsque vous annulez une s\xe9ance en direct en son nom.","options":{"schedulingConflict":"Conflit d\'planification","personalEmergency":"Urgence personnelle/m\xe9dicale","cancelSwitch":"Le client change de th\xe9rapeute ou annule son abonnement \xe0 BetterHelp","vacation":"Vacances","other":"Autre"}},"availability":{"note":"Le cr\xe9neau horaire de la s\xe9ance deviendra par d\xe9faut disponible pour vos autres clients. Pour supprimer les cr\xe9neaux qui ne sont plus disponibles, veuillez vous rendre sur votre ${link}.","noteLink":"Onglet Planification","noteLabel":"Note sur la planification des disponibilit\xe9s"},"reschedule":{"confirmBanner":"Vous \xeates sur le point de reprogrammer la s\xe9ance en direct de ${clientName} du ${currentDateTime} au ${nextDateTime}.","confirmBannerLabel":"R\xe9sum\xe9 de la reprogrammation de s\xe9ance","confirmPrompt":"Veuillez indiquer la raison pour laquelle vous reprogrammez","confirmPlaceholder":"J\'ai reprogramm\xe9 notre prochaine s\xe9ance parce que...","confirmNote":"Ceci sera envoy\xe9 par message \xe0 votre client."},"cancel":{"prompt":"Veuillez indiquer la raison pour laquelle vous annulez","promptNote":"Ceci sera envoy\xe9 par message \xe0 votre client.","placeholder":"J\'ai annul\xe9 notre prochaine s\xe9ance parce que..."},"success":{"descriptionRescheduled":"Nous avons inform\xe9 ${clientName} que vous avez reprogramm\xe9 la s\xe9ance en direct.","descriptionCancelled":"Nous avons inform\xe9 ${clientName} que vous avez annul\xe9 la s\xe9ance en direct."},"errors":{"loadRescheduleOptions":"Nous nâavons pas pu charger les cr\xe9neaux disponibles pour le moment. Veuillez r\xe9essayer.","submitCancellation":"Nous n\'avons pas pu annuler cette s\xe9ance pour le moment. Veuillez r\xe9essayer.","submitReschedule":"Nous nâavons pas pu reprogrammer cette s\xe9ance pour le moment. Veuillez r\xe9essayer."}}');var ep=s.t(em,2);let eg=JSON.parse('{"formAriaLabel":"Flow voor het annuleren van een live sessie","titles":{"initial":"Live sessie afzeggen","reasonCl
1ient":"${clientName} heeft verzocht de live sessie te annuleren","reasonTherapist":"Ik moet de live sessie afzeggen","rescheduleQuestion":"Wil je een nieuwe afspraak maken?","reschedule":"Live sessie verzetten","cancel":"Live sessie afzeggen","successRescheduled":"Live sessie verzet","successCancelled":"Live sessie geannuleerd"},"buttons":{"close":"Sluiten","next":"Volgende","back":"Terug","reschedule":"Verzetten","cancel":"Sessie annuleren"},"binaryOptions":{"yes":"Ja","no":"Nee"},"requestSource":{"question":"Annuleer je op verzoek van ${clientName}?"},"reason":{"clientPrompt":"Welke reden heeft ${clientName} opgegeven voor deze annulering?","therapistPrompt":"Waarom zeg je deze sessie af?","otherPlaceholder":"Deel wat meer informatie","clientNote":"Opmerking: cli\xebnt ontvangt een melding wanneer je een live sessie namens hen afzegt.","options":{"schedulingConflict":"Planningsconflict","personalEmergency":"Persoonlijk/medisch noodgeval","cancelSwitch":"Cli\xebnt wisselt van therapeut of zegt lidmaatschap BetterHelp op","vacation":"Vakantie","other":"Overig"}},"availability":{"note":"Dit tijdstip wordt standaard beschikbaar gesteld aan je andere cli\xebnten. Ga naar je ${link} om plekken te verwijderen die niet meer beschikbaar zijn.","noteLink":"Planningtabblad","noteLabel":"Opmerking over planningsbeschikbaarheid"},"reschedule":{"confirmBanner":"Je staat op het punt om de live sessie van ${clientName} te verzetten van ${currentDateTime} naar ${nextDateTime}.","confirmBannerLabel":"Samenvatting sessie verzetten","confirmPrompt":"Geef hieronder aan waarom je de sessie verzet","confirmPlaceholder":"Ik heb onze komende sessie verzet, want â¦","confirmNote":"Dit wordt weergegeven als een bericht aan je cli\xebnt."},"cancel":{"prompt":"Geef aan waarom je annuleert","promptNote":"Dit wordt weergegeven als een bericht aan je cli\xebnt.","placeholder":"Ik heb onze aankomende sessie geannuleerd, want â¦"},"success":{"descriptionRescheduled":"We hebben ${clientName} laten weten dat je de live sessie hebt verzet.","descriptionCancelled":"We hebben aan ${clientName} gemeld dat je de live sessie hebt geannuleerd."},"errors":{"loadRescheduleOptions":"We konden de beschikbare tijden nu niet laden. Probeer het opnieuw.","submitCancellation":"We konden deze sessie op dit moment niet annuleren. Probeer het opnieuw.","submitReschedule":"We konden deze sessie op dit moment niet verzetten. Probeer het opnieuw."}}'),ev={de:eo,en:ed,es:eh,fr:ep,nl:s.t(eg,2)},ef=()=>{let e=(0,C.B)(ev);return(0,t.jsx)(ei.Ay,{variant:"nudge.announcement",isOpen:!0,isDismissable:!1,ContentComponent:eb,children:(0,A.t)(e.availability.noteLabel)})},eb=()=>{let e=(0,C.B)(ev);return(0,t.jsx)("div",{className:"body-sm",children:(0,A.r)(e.availability.note,{link:(0,t.jsx)(j.A,{href:"/#scheduling",target:"_blank",variant:"link",size:"sm",children:(0,A.t)(e.availability.noteLink)})})})},ey={requestedByClient:null,selectedReason:null,otherReasonDetails:"",wantsReschedule:null,selectedReschedule:null,cancellationMessage:""},eS={reason:"request-source","reschedule-question":"reason",reschedule:"reschedule-question","reschedule-confirm":"reschedule","cancel-confirm":"reschedule-question"},eN=e=>"other"===e||"client_other"===e,ek=(e,n,s)=>(0,D.r6)(e,{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:s},n);var ex=s(71748);let ew=e=>{let{children:n,name:s,onChange:a,options:i,value:r}=e,l=i.find(e=>e.key===r);return(0,t.jsx)(ex.A,{name:s,selection:l,onChange:e=>{e&&a(String(e.key))},options:i.map(e=>({key:e.key,translated:(0,t.jsx)("span",{className:"body-md",children:e.translated})})),children:n})},ej=e=>{let{children:n,name:s,onChange:a,value:i}=e,r=(0,C.B)(ev),l=[{key:"yes",translated:(0,t.jsx)("span",{children:(0,A.t)(r.binaryOptions.yes)})},{key:"no",translated:(0,t.jsx)("span",{children:(0,A.t)(r.binaryOptions.no)})}],o=l.find(e=>e.key===(null===i?void 0:i?"yes":"no"));return(0,t.jsx)(ex.A,{name:s,selection:o,onChange:e=>{e&&a("yes"===e.key)},options:l,children:n})},eC=e=>{let{clientName:n,formattedCurrentSessionTime:s,formattedNextSessionTime:a}=e,i=(0,C.B)(ev);return(0,t.jsx)(ei.Ay,{variant:"nudge.announcement",isOpen:!0,isDismissable:!1,ContentComponent:eD,extraContentProps:{clientName:n,formattedCurrentSessionTime:s,formattedNextSessionTime:a},children:(0,A.t)(i.reschedule.confirmBannerLabel)})},eD=e=>{let{clientName:n,formattedCurrentSessionTime:s,formattedNextSessionTime:a}=e,i=(0,C.B)(ev);return(0,t.jsx)("div",{className:"body-sm",children:(0,A.t)(i.reschedule.confirmBanner,{clientName:n,currentDateTime:s,nextDateTime:a})})};var eA=s(16749);let e_=()=>{let e=new Date().getHours();return e<8?{start_hour:0,end_hour:8}:e<12?{start_hour:8,end_hour:12}:e<18?{start_hour:12,end_hour:18}:{start_hour:18,end_hour:24}};var eT=s(32879),ez=s(85034),eP=s(14468),eB=s(69450),eM=s(38108),e$=s(7248),eq=s(94407);let eR=[1800,2700,3600],eO=e=>{let{initialInfo:n,initialAvailableDateTimes:s,initialSelectedStartTime:i,currentSessionDurationSeconds:r,currentSessionType:l,onSelectedRescheduleChange:o}=e,c=(0,eM.P)({initialInfo:n}),d=c.info.user_timezone,u=(0,a.useMemo)(()=>
1null===i?void 0:(0,es.gw)((0,es.Yd)(1e3*i,d)),[i,d]),m=(0,a.useMemo)(()=>eR.includes(r)?r:n.insurance.has_60_min_sessions?3600:2700,[r,n.insurance.has_60_min_sessions]),p=(0,eT.O)({initialAvailableDateTimes:s,initialDateFilter:u,initialTimeWindowFilter:e_(),initialDurationFilter:m,infoState:c}),g=(0,ez.Dh)({initialKey:null}),v=(0,eB.N)({initialAvailableDateTime:p.groupedByCalendarDate.getGrouped(i),initialType:l}),[f,b]=(0,a.useState)("pick-datetime"),y=(0,e$.r)({step:f,onStepChange:b,availableDateTimesState:p,infoState:c,errorState:g,formDataState:v}),{setShouldReloadInfoOnScheduleChanged:S}=c;(0,a.useEffect)(()=>{S(!1)},[S]);let k=v.formData.availableDateTime,x=v.formData.overlaps;(0,a.useEffect)(()=>{o(k?{startTime:k.startTime,endTime:k.endTime,overlaps:x}:null)},[k,x,o]);let{snowplow:w}=(0,N.SF)();return(0,eq.A)({callback:w.isConnected&&(()=>{new h.A("scheduler_modal_opened").setLabel("entry_point").setProperty("reschedule flow").send()})}),(0,t.jsx)(eP.BQ,{availableDateTimesState:p,errorState:g,formDataState:v,infoState:c,stepState:y})},eF=e=>{var n;let{cancellationMessage:s,clientName:a,completedAction:i,currentSessionDurationSeconds:r,currentSessionType:l,errorMessage:o,formattedCurrentSessionTime:c,formattedNextSessionTime:d,isLoadingRescheduleScheduler:u,otherReasonDetails:h,reasonOptions:m,requestedByClient:p,rescheduleSchedulerData:g,selectedReason:v,selectedReschedule:f,setCancellationMessage:b,setOtherReasonDetails:y,setRequestedByClient:S,setSelectedReason:N,setSelectedReschedule:k,setWantsReschedule:x,step:w,wantsReschedule:j}=e,D=(0,C.B)(ev);return(0,t.jsxs)("form",{className:"flex flex-col gap-4 text-text-default","aria-label":(0,A.t)(D.formAriaLabel),children:[o&&(0,t.jsx)(ei.Ay,{variant:"feedback.danger",isOpen:!0,isDismissable:!1,ContentComponent:(0,t.jsx)("span",{className:"body-sm",children:o}),children:o}),"request-source"===w&&(0,t.jsx)(ej,{name:"requested-by-client",onChange:S,value:p,children:(0,t.jsx)("span",{className:"body-md",children:(0,A.t)(D.requestSource.question,{clientName:a})})}),"reason"===w&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ew,{name:"cancellation-reason",options:m,value:v,onChange:N,children:(0,t.jsx)("span",{className:"body-md",children:p?(0,A.t)(D.reason.clientPrompt,{clientName:a}):(0,A.t)(D.reason.therapistPrompt)})}),v&&eN(v)&&(0,t.jsx)(er.A,{variant:"textarea",value:h,onChange:y,controlProps:{rows:4},children:(0,A.t)(D.reason.otherPlaceholder)}),p&&(0,t.jsx)("div",{className:"body-md",children:(0,A.t)(D.reason.clientNote)}),(0,t.jsx)(ef,{})]}),"reschedule-question"===w&&(0,t.jsx)(ej,{name:"would-like-to-reschedule",onChange:x,value:j,children:(0,t.jsx)("span",{className:"body-md",children:(0,A.t)(D.titles.rescheduleQuestion)})}),"reschedule"===w&&(u||!g?(0,t.jsx)("div",{className:"relative h-32",children:(0,t.jsx)(ea.default,{show:!0,position:"absolute",rootClassName:"!bg-transparent"})}):(0,t.jsx)(eO,{initialInfo:g.info,initialAvailableDateTimes:g.availableDateTimes,initialSelectedStartTime:null!=(n=null==f?void 0:f.startTime)?n:null,currentSessionDurationSeconds:r,currentSessionType:l,onSelectedRescheduleChange:k})),"reschedule-confirm"===w&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eC,{clientName:a,formattedCurrentSessionTime:c,formattedNextSessionTime:d}),(0,t.jsx)(er.A,{variant:"textarea-top-aligned-label",value:s,onChange:b,controlProps:{rows:4},className:"[&_textarea]:h-auto",description:(0,A.t)(D.reschedule.confirmNote),placeholder:(0,A.t)(D.reschedule.confirmPlaceholder),children:(0,A.t)(D.reschedule.confirmPrompt)})]}),"cancel-confirm"===w&&(0,t.jsx)(er.A,{variant:"textarea-top-aligned-label",value:s,onChange:b,controlProps:{rows:4},className:"[&_textarea]:h-auto",description:(0,A.t)(D.cancel.promptNote),placeholder:(0,A.t)(D.cancel.placeholder),children:(0,A.t)(D.cancel.prompt)}),"success"===w&&(0,t.jsx)("p",{className:"body-md",children:(0,A.t)("rescheduled"===i?D.success.descriptionRescheduled:D.success.descriptionCancelled,{clientName:a})})]})},eI=e=>{let{canContinueFromConfirmMessage:n,canContinueFromReason:s,canContinueFromReschedule:a,close:i,handleBack:r,handleFinishCancellation:l,handleFinishReschedule:o,handleNext:c,requestedByClient:d,step:u,wantsReschedule:h}=e,m=(0,C.B)(ev);return(0,t.jsxs)("div",{className:et.jt,children:["request-source"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:i,className:"min-w-28",children:(0,A.t)(m.buttons.close)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:c,isDisabled:null===d,className:"min-w-28",children:(0,A.t)(m.buttons.next)})]}),"reason"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:r,className:"min-w-28",children:(0,A.t)(m.buttons.back)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:c,isDisabled:!s,className:"min-w-28",children:(0,A.t)(m.buttons.next)})]}),"reschedule-question"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:r,className:"min-w-28",children:(0,A.t)(m.buttons.back)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:c,isDisabled:null===h,className:"min-w-28",children:(0,A.t)(m.buttons.next)})]}),"reschedule"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:r,className:"min-w-28",children:(0,A.t)(m.buttons.back)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:c,isDisabled:!a,className:"min-w-28",children:(0,A.t)(m.buttons.next)})]}),"reschedule-confirm"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:r,className:"min-w-28",children:(0,A.t)(m.buttons.back)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:o,isDisabled:!n,className:"min-w-28",children:(0,A.t)(m.buttons.reschedule)})]}),"cancel-confirm"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.A,{variant:"secondary",size:"lg",onClick:r,className:"min-w-28",children:(0,A.t)(m.buttons.back)}),(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:l,isDisabled:!n,className:"min-w-28",children:(0,A.t)(m.buttons.cancel)})]}),"success"===u&&(0,t.jsx)(x.A,{variant:"primary",size:"lg",onClick:i,className:"min-w-28",children:(0,A.t)(m.buttons.close)})]})};var eL=s(19814);let eE=(e,n)=>e.post("/api/scheduling/",n);function eV(e){let{clientName:n,isOpen:s,session:i,redirectTo:r="none",onClose:l,onComplete:o}=e,{isRenderable:u,contentProps:h,footerProps:m,title:p}=(e=>{var n,s,t;let{clientName:i,isOpen:r,onComplete:l,redirectTo:o,session:u}=e,h=(0,C.B)(ev),{session:{locale:m}}=(0,N.SF)(),[p,g]=(0,a.useState)("request-source"),v=(0,eL.mN)({defaultValues:ey}),f=(0,eL.FH)({control:v.control,name:"requestedByClient"}),b=(0,eL.FH)({control:v.control,name:"selectedReason"}
1),y=(0,eL.FH)({control:v.control,name:"otherReasonDetails"}),S=(0,eL.FH)({control:v.control,name:"wantsReschedule"}),k=(0,eL.FH)({control:v.control,name:"selectedReschedule"}),x=(0,eL.FH)({control:v.control,name:"cancellationMessage"}),[w,j]=(0,a.useState)(null),[D,_]=(0,a.useState)(null),[T,z]=(0,a.useState)(!1),P=(0,a.useMemo)(()=>new c.A,[]),{hasRescheduleSchedulerError:B,isLoadingRescheduleScheduler:M,rescheduleSchedulerData:$}=(e=>{let{fetch:n,isEnabled:s,clientId:t,sessionId:i}=e,[r,l]=(0,a.useState)(null),[o,c]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(!s||null===t||null===i){l(null),h(!1),c(!1);return}let e=!0;return(async()=>{c(!0),h(!1);try{let[s,a]=await Promise.all([(0,eM.p)({fetch:n,user_type:"counselor",client_id:t,rescheduling_individual_session_id:i}),(0,eT.G)({fetch:n,user_type:"counselor",client_id:t})]);if(!e)return;l({info:s,availableDateTimes:a})}catch(n){d.v.error("Error loading cancellation reschedule scheduler data: ".concat(n)),e&&(l(null),h(!0))}finally{e&&c(!1)}})(),()=>{e=!1}},[t,n,s,i]),{hasRescheduleSchedulerError:u,isLoadingRescheduleScheduler:o,rescheduleSchedulerData:r}})({fetch:P,isEnabled:r&&null!==u&&("reschedule"===p||"reschedule-confirm"===p),clientId:null!=(n=null==u?void 0:u.clientId)?n:null,sessionId:null!=(s=null==u?void 0:u.sessionId)?s:null});(0,a.useEffect)(()=>{r&&u||(g("request-source"),v.reset(ey),j(null),_(null),z(!1))},[v,r,u]);let q=(0,a.useMemo)(()=>{let e;return e=h,f?[{key:"client_scheduling_conflict",translated:(0,A.t)(e.reason.options.schedulingConflict)},{key:"client_personal_emergency",translated:(0,A.t)(e.reason.options.personalEmergency)},{key:"client_cancel_switch",translated:(0,A.t)(e.reason.options.cancelSwitch)},{key:"client_other",translated:(0,A.t)(e.reason.options.other)}]:[{key:"scheduling_conflict",translated:(0,A.t)(e.reason.options.schedulingConflict)},{key:"personal_emergency",translated:(0,A.t)(e.reason.options.personalEmergency)},{key:"cancel_switch",translated:(0,A.t)(e.reason.options.cancelSwitch)},{key:"vacation",translated:(0,A.t)(e.reason.options.vacation)},{key:"other",translated:(0,A.t)(e.reason.options.other)}]},[f,h]);(0,a.useEffect)(()=>{if(B&&"reschedule"===p)return void _((0,A.t)(h.errors.loadRescheduleOptions));_(null)},[B,p,h.errors.loadRescheduleOptions]);let R=(0,a.useMemo)(()=>(e=>{let n,s,{cancellationMessage:t,otherReasonDetails:a,requestedByClient:i,selectedReason:r,selectedReschedule:l,session:o,step:c}=e,d=t.trim();if(!o||null===i||!r||0===d.length)return null;let u={live_session_schedule_id:o.sessionId,client_id:o.clientId,session_type:o.type,client_requested_cancellation:i?"yes":"no",reason_selected:(n=r,s=a,eN(n)?"".concat(n,": ").concat(s.trim()):n),cancel_method:"updated_ls_cancellation_modal"};return"reschedule-confirm"===c?l?{...u,action:"reschedule",start_time:l.startTime,endtimestamp:l.endTime,reschedule_reason:d}:null:{...u,action:"cancel",cancel_reason:d,available_to_others:1}})({cancellationMessage:null!=x?x:"",otherReasonDetails:null!=y?y:"",requestedByClient:f,selectedReason:b,selectedReschedule:k,session:u,step:p}),[x,y,f,b,k,u,p]),O=(0,a.useCallback)(e=>v.setValue("selectedReschedule",e,{shouldDirty:!0}),[v]),F=k?new Date(1e3*k.startTime).toISOString():null,I=null==$?void 0:$.info.user_timezone,L=!!b&&(!eN(b)||(null!=y?y:"").trim().length>0),E=!!k&&!M,V=(null!=x?x:"").trim().length>0&&!T,J=async()=>{if(u&&R&&!T)try{z(!0),_(null),await eE(P,R),j("cancelled"),await l({action:"cancelled",sessionId:u.sessionId,payload:R,redirectTo:o}),g("success")}catch(e){d.v.error("Error canceling live session from cancellation flow: ".concat(e)),_((0,A.t)(h.errors.submitCancellation))}finally{z(!1)}},W=async()=>{if(u&&k&&R&&!T)try{let e;z(!0),_(null),k.overlaps.length>0&&await (e=k.overlaps,Promise.all(e.map(e=>{let{start_time:n,end_time:s}=e;return P.post("/api/scheduling/",{action:"set_unavailable",timestamp:n,endtimestamp:s})}))),await eE(P,R),j("rescheduled"),await l({action:"rescheduled",sessionId:u.sessionId,startsAt:null!=F?F:void 0,payload:R,redirectTo:o}),g("success")}catch(e){d.v.error("Error rescheduling live session from cancellation flow: ".concat(e)),_((0,A.t)(h.errors.submitReschedule))}finally{z(!1)}};return{contentProps:{cancellationMessage:x,clientName:i,completedAction:w,currentSessionDurationSeconds:null!=(t=null==u?void 0:u.durationSeconds)?t:0,currentSessionType:null==u?void 0:u.type,errorMessage:D,formattedCurrentSessionTime:u?ek(u.startsAt,m,I):"",formattedNextSessionTime:F?ek(F,m,I):"",isLoadingRescheduleScheduler:M,otherReasonDetail
1s:y,reasonOptions:q,requestedByClient:f,rescheduleSchedulerData:$,selectedReason:b,selectedReschedule:k,setCancellationMessage:e=>v.setValue("cancellationMessage",e,{shouldDirty:!0}),setOtherReasonDetails:e=>v.setValue("otherReasonDetails",e,{shouldDirty:!0}),setRequestedByClient:e=>{v.setValue("requestedByClient",e,{shouldDirty:!0}),v.setValue("selectedReason",null,{shouldDirty:!0}),v.setValue("otherReasonDetails","",{shouldDirty:!0}),v.setValue("wantsReschedule",null,{shouldDirty:!0}),v.setValue("selectedReschedule",null,{shouldDirty:!0}),v.setValue("cancellationMessage","",{shouldDirty:!0})},setSelectedReason:e=>{v.setValue("selectedReason",e,{shouldDirty:!0}),eN(e)||v.setValue("otherReasonDetails","",{shouldDirty:!0})},setSelectedReschedule:O,setWantsReschedule:e=>{v.setValue("wantsReschedule",e,{shouldDirty:!0}),v.setValue("selectedReschedule",null,{shouldDirty:!0}),v.setValue("cancellationMessage","",{shouldDirty:!0})},step:p,wantsReschedule:S},footerProps:{canContinueFromConfirmMessage:V,canContinueFromReason:L,canContinueFromReschedule:E,handleBack:()=>{_(null);let e=eS[p];e&&g(e)},handleFinishCancellation:J,handleFinishReschedule:W,handleNext:()=>(_(null),"request-source"===p&&null!==f)?void g("reason"):"reason"===p&&L?void g("reschedule-question"):"reschedule-question"===p&&null!==S?S?void g("reschedule"):void g("cancel-confirm"):void("reschedule"===p&&k&&g("reschedule-confirm")),requestedByClient:f,step:p,wantsReschedule:S},isRenderable:null!==u,title:(e=>{let{step:n,requestedByClient:s,completedAction:t,clientName:a,translations:i}=e;return"reason"===n?s?(0,A.t)(i.titles.reasonClient,{clientName:a}):(0,A.t)(i.titles.reasonTherapist):"reschedule-question"===n?(0,A.t)(i.titles.rescheduleQuestion):"reschedule"===n||"reschedule-confirm"===n?(0,A.t)(i.titles.reschedule):"cancel-confirm"===n?(0,A.t)(i.titles.cancel):"success"===n?"rescheduled"===t?(0,A.t)(i.titles.successRescheduled):(0,A.t)(i.titles.successCancelled):(0,A.t)(i.titles.initial)})({step:p,requestedByClient:f,completedAction:w,clientName:i,translations:h})}})({clientName:n,isOpen:s,onComplete:o,redirectTo:r,session:i});return u?(0,t.jsx)(et.Ay,{isOpen:s,onOpenChange:l,isDismissable:!0,ContentComponent:eF,extraContentProps:h,FooterComponent:eI,extraFooterProps:m,variant:"tall",children:p}):null}var eJ=s(34375),eW=s(93437);let eH=JSON.parse('{"schedulerModal":{"backButton":"Zur\xfcck","continueButton":"Fortfahren","scheduleSessionButton":"Sitzung vereinbaren","modalTitle":{"schedule":"Sitzung vereinbaren","confirm":"Best\xe4tige deine Sitzung"},"toast":{"success":"Deine Sitzung wurde ${action}.","action":{"scheduled":"geplant","rescheduled":"verschoben"}}}}');var eK=s.t(eH,2);let eU=JSON.parse('{"schedulerModal":{"backButton":"Back","continueButton":"Continue","scheduleSessionButton":"Schedule session","modalTitle":{"schedule":"Schedule a session","confirm":"Confirm your session"},"toast":{"success":"Your session has been ${action}.","action":{"scheduled":"scheduled","rescheduled":"rescheduled"}}}}');var eZ=s.t(eU,2);let eG=JSON.parse('{"schedulerModal":{"backButton":"Volver","continueButton":"Continuar","scheduleSessionButton":"Agendar sesi\xf3n","modalTitle":{"schedule":"Agenda una sesi\xf3n","confirm":"Confirma tu sesi\xf3n"},"toast":{"success":"Tu sesi\xf3n ha sido ${action}.","action":{"scheduled":"agendada","rescheduled":"reagendado"}}}}');var eY=s.t(eG,2);let eQ=JSON.parse('{"schedulerModal":{"backButton":"Retour","continueButton":"Continuer","scheduleSessionButton":"Planifier une s\xe9ance","modalTitle":{"schedule":"Planifier une s\xe9ance","confirm":"Confirmez votre s\xe9ance"},"toast":{"success":"Votre s\xe9ance a \xe9t\xe9 ${action}.","action":{"scheduled":"programm\xe9e","rescheduled":"report\xe9"}}}}');var eX=s.t(eQ,2);let e0=JSON.parse('{"schedulerModal":{"backButton":"Terug","continueButton":"Doorgaan","scheduleSessionButton":"Sessie plannen","modalTitle":{"schedule":"Plan een sessie","confirm":"Bevestig je sessie"},"toast":{"success":"Je sessie is ${action}.","action":{"scheduled":"gepland","rescheduled":"verzet"}}}}'),e1={de:eK,en:eZ,es:eY,fr:eX,nl:s.t(e0,2)},e2=["schedulerModal","cancelLiveSessionFlowModal"],e3=new eW.jR,e4=e=>{var n,s;let{modalData:i}=e,{currentModal:r,add:o,close:c,disallowKeys:d}=(0,eW.Qv)(e3),u=(0,l.useRouter)();return(0,a.useEffect)(()=>{var e,n;d(e2.filter(e=>!(e in i))),(null==(e=i.schedulerModal)?void 0:e.showModal)&&o("schedulerModal"),(null==(n=i.cancelLiveSessionFlowModal)?void 0:n.showModal)&&o("cancelLiveSessionFlowModal")},[o,d,i,null==(n=i.schedulerModal)?void 0:n.showModal,null==(s=i.cancelLiveSessionFlowModal)?void 0:s.showModal]),(0,t.jsxs)(t.Fragment,{children:[i.schedulerModal&&(0,t.jsx)(e7,{props:i.schedulerModal.props,isOpen:(null==r?void 0:r.key)==="schedulerModal",setIsOpen:e=>{if(e){i.schedulerModal.setShowModal(!0),o("schedulerModal");return}u.query.showScheduler&&(window.location.href="/?key=".concat(u.query["client-id"])),i.schedulerModal.setShowModal(!1),c()}}),i.cancelLiveSessionFlowModal&&(0,t.jsx)(eV,{clientName:i.cancelLiveSessionFlowModal.clientName,isOpen:(null==r?void 0:r.key)==="cancelLiveSessionFlowModal",session:i.cancelLiveSessionFlowModal.session,redirectTo:i.cancelLiveSessionFlowModal.redirectTo,onClose:()=>{"cancel"===u.query.action&&(window.location.href="/?key=".concat(u.query["client-id"])),i.cancelLiveSessionFlowModal.setShowModal(!1),c()},onComplete:i.cancelLiveSessionFlowModal.onComplete})]})},e6=e=>{let{className:n,onClick:s,disabled:a}=e,i=(0,C.B)(e1);return(0,t.jsx)(x.A,{variant:"secondary",onClick:s,size:"lg",className:(0,v.$)("w-full lg:w-auto",n),isDisabled:a,children:(0,A.t)(i.schedulerModal.backButton)})},e8=e=>{let{className:n,onClick:s,disabled:a}=e,i=(0,C.B)(e1);return(0,t.jsx)(x.A,{onClick:s,size:"lg",className:(0,v.$)("w-full lg:w-auto",n),isDisabled:a,children:(0,A.t)(i.schedulerModal.continueButton)})},e9=e=>{let{className:n,onClick:s,disabled:a}=e,i=(0,C.B)(e1);return(0,t.jsx)(x.A,{onClick:s,size:"lg",className:(0,v.$)("w-full lg:w-auto",n),isDisabled:a,children:(0,A.t)(i.schedulerModal.scheduleSessionButton)})},e5=e=>{let{onBack:n,onContinue:s,onScheduleSession:a,backDisabled:i,continueDisabled:r,scheduleSessionDisabled:l,backHidden:o,continueHidden:c,scheduleSessionHidden:d}=e;return(0,t.jsxs)("div",{className:"flex lg:justify-end gap-4 flex-col-reverse lg:flex-row",children:[!c&&(0,t.jsx)(e8,{onClick:s,disabled:r}),!o&&(0,t.jsx)(e6,{onClick:n,disabled:i}),!d&&(0,t.jsx)(e9,{onClick:a,disabled:l})]})}
1,e7=e=>{let{props:n,isOpen:s,setIsOpen:i}=e,{initialStep:r,initialType:o,initialErrorKey:c,initialAvailableDateTimes:d,initialStartTime:u,initialInfo:m,client_id:p,initialDurationFilter:g}=n,v=(0,eM.P)({initialInfo:m}),{start_hour:f,end_hour:b}=e_(),y=(0,eT.O)({initialAvailableDateTimes:d,...null===u?{}:{initialDateFilter:(0,es.gw)((0,es.Yd)(1e3*u,"UTC"))},initialTimeWindowFilter:{start_hour:f,end_hour:b},initialDurationFilter:g,infoState:v}),S=(0,ez.Dh)({initialKey:c}),k=(0,eB.N)({initialAvailableDateTime:y.groupedByCalendarDate.getGrouped(u),initialType:o}),[x,w]=(0,a.useState)(r),j=(0,e$.r)({step:x,onStepChange:w,availableDateTimesState:y,infoState:v,errorState:S,formDataState:k}),D=(0,C.B)(e1),[_,T]=(0,a.useState)((0,A.t)(D.schedulerModal.modalTitle.schedule));(0,a.useEffect)(()=>{switch(j.step){case"pick-datetime":T((0,A.t)(D.schedulerModal.modalTitle.schedule));break;case"pick-type-and-schedule-session":T((0,A.t)(D.schedulerModal.modalTitle.confirm))}},[j.step,D]);let{snowplow:z}=(0,N.SF)(),[P,B]=(0,a.useState)(!1),M=(0,l.useRouter)(),$=()=>{var e;j.setStep(r),k.setSelectedTime(null),k.setType(o),k.setStatus("ready"),y.setDateFilter(null==(e=y.groupedByCalendarDate.grouped[0])?void 0:e.calendarDate),y.setTimeWindowFilter(e_()),y.setDurationFilter(m.insurance.has_60_min_sessions?3600:2700)},q=(0,eP.Vt)({infoState:v,formDataState:k,stepState:j,errorState:S,queueSuccessToast:e=>{(0,eJ.hw)({key:"session-".concat(e),variant:"basicIcon",body:(0,A.t)(D.schedulerModal.toast.success,{action:(0,A.t)(D.schedulerModal.toast.action[e])})})},client_id:p,onSuccess:()=>{k.setStatus("ready"),$(),i(!1),M.query.showScheduler&&(window.location.href="/?key=".concat(p,"&session_scheduled=1"))},onSessionUnavailable:()=>B(!0)});return(0,t.jsx)(et.Ay,{ContentComponent:(0,t.jsx)(eP.BQ,{availableDateTimesState:y,stepState:j,formDataState:k,errorState:S,infoState:v}),isOpen:s,onOpenChange:e=>{$(),i(e)},variant:"tall",dialogProps:{titleClassName:"heading-lg bh:!font-[Overpass] bh:!font-light"},FooterComponent:(0,t.jsx)(e5,{onBack:()=>{j.setStep("pick-datetime"),B(!1),S.setKey(null)},onContinue:()=>{j.setStep("pick-type-and-schedule-session"),z.isConnected&&new h.A("scheduler_confirmation_modal_displayed").send(),B(!1)},onScheduleSession:q,backHidden:P||"pick-type-and-schedule-session"!==j.step,continueDisabled:null===k.formData.selectedTime,continueHidden:"pick-datetime"!==j.step,scheduleSessionHidden:P||"pick-type-and-schedule-session"!==j.step,scheduleSessionDisabled:null===k.formData.selectedTime||null===k.formData.type||"ready"!==k.status}),children:_})};var ne=s(30741),nn=s(35105);let ns=JSON.parse('{"pageTitle":"Terminplanung","heading":"\xdcberblick \xfcber die Terminplanung von ${nickName}","upcomingSessions":"Kommende Sitzungen","scheduleSession":"Sitzung vereinbaren","openSchedule":"\xd6ffne deinen Terminplan in einem neuen Tab","bookMoreText":{"oneSessionBooked":"Buche bis zu 2 weitere Sitzungen mit ${nickName}","twoSessionsBooked":"Buche 1 weitere Sitzung mit ${nickName}","threeSessionsBooked":"Du kannst bis zu 3 Sitzungen gleichzeitig buchen. Du kannst weitere Sitzungen hinzuf\xfcgen, nachdem du deine n\xe4chste abgeschlossen hast."}}');var nt=s.t(ns,2);let na=JSON.parse('{"pageTitle":"Scheduling","heading":"${nickName}\'s scheduling overview","upcomingSessions":"Upcoming sessions","scheduleSession":"Schedule session","openSchedule":"Open your schedule in a new tab","bookMoreText":{"oneSessionBooked":"Book up to 2 more sessions with ${nickName}","twoSessionsBooked":"Book 1 more session with ${nickName}","threeSessionsBooked":"You can have up to 3 sessions booked at a time. You\'ll be able to add more sessions after completing your next one."}}');var ni=s.t(na,2);let nr=JSON.parse('{"pageTitle":"Agenda","heading":"Resumen de la programaci\xf3n de ${nickName}","upcomingSessions":"Pr\xf3ximas sesiones","scheduleSession":"Agendar sesi\xf3n","openSchedule":"Abrir tu agenda en una pesta\xf1a nueva","bookMoreText":{"oneSessionBooked":"Reserva hasta 2 sesiones m\xe1s con ${nickName}","twoSessionsBooked":"Reserva 1 sesi\xf3n m\xe1s con ${nickName}","threeSessionsBooked":"Puedes tener hasta 3 sesiones reservadas simult\xe1neamente. Podr\xe1s a\xf1adir m\xe1s sesiones despu\xe9s de completar la pr\xf3xima."}}');var nl=s.t(nr,2);let no=JSON.parse('{"pageTitle":"Planification","heading":"Aper\xe7u de la planification de ${nickName}","upcomingSessions":"Sessions \xe0 venir","scheduleSession":"Planifier une s\xe9ance","openSchedule":"Ouvrez votre planning dans un nouvel onglet","bookMoreText":{"oneSessionBooked":"R\xe9servez jusqu\'\xe0 deux s\xe9ances suppl\xe9mentaires avec ${nickName}","twoSessionsBooked":"R\xe9servez une s\xe9ance suppl\xe9mentaire avec ${nickName}","threeSessionsBooked":"Vous pouvez r\xe9server jusqu\'\xe0 trois s\xe9ances \xe0 la fois. Vous pourrez ajouter d\'autres s\xe9ances apr\xe8s avoir termin\xe9 la prochaine s\xe9ance."}}');var nc=s.t(no,2);let nd=JSON.parse('{"pageTitle":"Planning","heading":"Overzicht van de planning van ${nickName}","upcomingSessions":"Aankomende sessies","scheduleSession":"Sessie plannen","openSchedule":"Open je planning in een nieuw tabblad","bookMoreText":{"oneSessionBooked":"Boek tot 2 extra sessies met ${nickName}","twoSessionsBooked":"Boek 1 extra sessie met ${nickName}","threeSessionsBooked":"Je kunt maximaal 3 sessies tegelijk boeken. Je kunt meer sessies toevoegen nadat je de volgende hebt afgerond."}}'),nu={de:nt,en:ni,es:nl,fr:nc,nl:s.t(nd,2)},nh=r()(()=>Promise.all([s.e(3741),s.e(4837),s.e(1142),s.e(7304),s.e(5859),s.e(8559),s.e(8912),s.e(1623),s.e(1361)]).then(s.bind(s,88912)),{loadableGenerated:{webpack:()=>[88912]},ssr:!1}),nm=e=>{let{clientSummary:n,hasPerpetualSession:s,canBookMultipleSessions:i,counselorScheduler:r,initialSessions:c,scheduledMaintenanceBanner:d,handleCancelFlowComplete:u}=e,g=(0,l.useRouter)(),[v,f]=(0,a.useState)(!1),{snowplow:b}=(0,N.SF)(),y=(0,a.useCallback)(()=>{f(!0),b.isConnected&&new h.A("scheduler_modal_opened").setLabel("entry_point").setProperty("client info page").send()},[b.isConnected]),[S,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{"true"===g.query.showScheduler&&f(!0)},[g.query.showScheduler]),(0,eq.A)({callback:"true"===g.query.showScheduler&&b.isConnected&&(()=>{new h.A("scheduler_modal_opened").setLabel("entry_point").setProperty("scheduler tab").send()})});let x=n.firstName||n.nickName,w=null!==S,j=(0,o.H8)(),C=(0,a.useRef)(!1),D=(0,a.useCallback)(e=>{k(e)},[]),A=(0,a.useCallback)(async e=>{C.current=!0,await u(e)},[u]);(0,a.useEffect)(()=>{!w&&C.current&&(C.current=!1,null==j||j.focusFirst({tabbable:!0}))},[j,w]);let _=(0,a.useMemo)(()=>"cancel"===g.query.action?"sessions":"none",[g.query.action]),T=(0,a.useMemo)(()=>({schedulerModal:{showModal:v,props:r,setShowModal:e=>f(e)},cancelLiveSessionFlowModal:{showModal:w,clientName:x,session:S,redirectTo:_,setShowModal:e=>{e||k(null)},onComplete:A}}),[v,r,_,w,x,S,A]);
1return(0,eq.A)({callback:b.isConnected&&(()=>{new m.A("scheduling_viewed").send()})}),(0,t.jsxs)(p.A,{className:"w-full px-4 py-6 sm:px-6 lg:py-10 grow bg-white overflow-hidden shadow-card text-gray-900",children:[0===c.length?(0,t.jsx)(en,{isEstablished:n.hasCompletedSession,nickName:x,onScheduleSessionClick:y,scheduledMaintenanceBanner:d}):(0,t.jsx)(np,{sessions:c,nickName:x,hasPerpetualSession:s,canBookMultipleSessions:i,onScheduleSessionClick:y,onCancelSessionClick:D,scheduledMaintenanceBanner:d}),(0,t.jsx)(e4,{modalData:T})]})},np=e=>{let{sessions:n,nickName:s,hasPerpetualSession:i,canBookMultipleSessions:r,onScheduleSessionClick:o,onCancelSessionClick:c,scheduledMaintenanceBanner:d}=e,u=(0,C.B)(nu),h=(0,l.useRouter)();(0,eq.A)({callback:(0,a.useCallback)(()=>{if("cancel"===h.query.action&&h.query.sessionId){let e=Number(h.query.sessionId),s=n.find(n=>n.sessionId===e);s&&c(s)}},[h.query.action,h.query.sessionId,n,c])});let m=(0,a.useMemo)(()=>n.filter(e=>!e.isPerpetual).length,[n]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row items-center lg:justify-between gap-6 antialiased",children:[(0,t.jsx)("span",{className:"heading-md",children:(0,A.t)(u.heading,{nickName:s})}),m<3&&(0,t.jsxs)(x.A,{variant:"primary",size:"md",onClick:o,className:"w-full lg:w-auto",children:[(0,A.t)(u.scheduleSession),(0,t.jsx)("i",{className:"fa-plus fa-solid text-base/4","aria-hidden":"true"})]})]}),(0,t.jsx)(V.A,{banner:d,className:"mt-6"}),(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("span",{className:"block heading-sm",children:(0,A.t)(u.upcomingSessions)}),(0,t.jsx)("div",{className:"flex flex-col gap-4 mt-4",children:n.map(e=>(0,t.jsx)(I,{nickName:s,session:e,onCancel:c},e.sessionId))}),!i&&r&&(0,t.jsx)("p",{className:"body-md mt-6",children:(0,A.t)(((e,n)=>1===n?e.bookMoreText.oneSessionBooked:2===n?e.bookMoreText.twoSessionsBooked:e.bookMoreText.threeSessionsBooked)(u,m),{nickName:s})}),(0,t.jsx)(j.A,{href:"/#scheduling",variant:"link",target:"_blank",size:"sm",className:"inline-block mt-4",children:(0,A.t)(u.openSchedule)})]})]})};var ng=!0;function nv(e){let{clientSummary:n,initialSessions:s,hasPerpetualSession:i,canBookMultipleSessions:r,counselorScheduler:h,scheduledMaintenanceBanner:m}=e,p=(0,C.B)(nu),[v,f]=(0,a.useState)(n),b=(0,l.useRouter)(),y=(0,a.useMemo)(()=>new c.A,[]),S=(0,a.useCallback)(()=>{window.location.href="/?key=".concat(v.id)},[v.id]),{handleCancelFlowComplete:k,sessions:x,reloadSessions:w}=(e=>{let{clientSummary:n,fetch:s,initialSessions:t,onRedirectToSessions:i}=e,[r,l]=(0,a.useState)(t),o=(0,a.useCallback)(async()=>{var e;l(((e,n)=>{var s,t;let a=Math.floor(Date.now()/1e3),i=e.map(e=>{let n;return{...e,endtimestamp:Number(e.endtimestamp),live_session_schedule_id:Number(e.live_session_schedule_id),session_type:"livechat"===(n=e.session_type)?"livechat":"phone"===n?"phone":"video"===n?"video":null,start_time:Number(e.start_time)}}).filter(e=>Number.isFinite(e.endtimestamp)&&Number.isFinite(e.live_session_schedule_id)&&Number.isFinite(e.start_time)&&null!==e.session_type&&e.endtimestamp>e.start_time&&e.endtimestamp>a).sort((e,n)=>e.start_time-n.start_time),r=n.hasCompletedSession?null:null!=(t=null==(s=i[0])?void 0:s.live_session_schedule_id)?t:null;return i.map(e=>({clientId:n.id,sessionId:e.live_session_schedule_id,startsAt:new Date(1e3*e.start_time).toISOString(),durationSeconds:e.endtimestamp-e.start_time,type:e.session_type,isFirstSession:e.live_session_schedule_id===r,holidayStatus:(0,eA.f)(e.is_or_near_holiday),isPerpetual:e.is_perpetual}))})(null!=(e=(await s.get("/api/counselor/scheduling/scheduled_status",{client_id:n.id})).scheduled_sessions)?e:[],n))},[n,s]),c=(0,a.useCallback)(async e=>{if("cancelled"===e.action&&l(n=>n.filter(n=>n.sessionId!==e.sessionId)),"rescheduled"===e.action)try{await o()}catch(e){d.v.error("Error reloading scheduled sessions after reschedule: ".concat(e))}"sessions"===e.redirectTo&&i()},[i,o]);return{reloadSessions:o,handleCancelFlowComplete:c,sessions:r}})({clientSummary:v,fetch:y,initialSessions:s,onRedirectToSessions:S}),j=(0,nn.A)("encrypted","schedule_changed"),D=b.query["client-id"];(0,a.useEffect)(()=>{j&&(async()=>{try{let e=(0,g.Iv)(await y.get("/api/counselor/client-info/".concat(D,"/summary/")));f(e)}catch(e){(!(e instanceof u.A)||["critical","error"].includes(e.metadata.severity)
1)&&d.v.error("Error reloading client summary after counselor schedule changed: ".concat(e))}})()},[j,y,D]),(0,a.useEffect)(()=>{j&&(async()=>{try{await w()}catch(e){(!(e instanceof u.A)||["critical","error"].includes(e.metadata.severity))&&d.v.error("Error reloading scheduled sessions after counselor schedule changed: ".concat(e))}})()},[j,w]);let{session:_}=(0,N.SF)(),T=_.is_mobile;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ne.default,{title:(0,A.t)(p.pageTitle)}),(0,t.jsx)(nh,{clientSummary:v,scheduledMaintenanceBanner:T?null:m,children:(0,t.jsx)(o.n1,{children:(0,t.jsx)(nm,{clientSummary:v,initialSessions:x,hasPerpetualSession:i,canBookMultipleSessions:r,counselorScheduler:h,scheduledMaintenanceBanner:T?m:null,handleCancelFlowComplete:k})})})]})}nv.pageTitle="Scheduling",nv.displayName="ClientInfoSchedulingPage",nv.shortTitle="Scheduling"},20196:(e,n,s)=>{"use strict";s.d(n,{A:()=>r});var t=s(6108),a=s(53503),i=s(69649);function r(e,n){(0,i.A)(2,arguments);var s=(0,a.A)(e),r=(0,t.A)(n);return isNaN(r)?new Date(NaN):(r&&s.setDate(s.getDate()+r),s)}},20557:(e,n,s)=>{"use strict";s.d(n,{A:()=>r});var t=s(20196),a=s(82840),i=s(69649);function r(e){return(0,i.A)(1,arguments),(0,a.A)(e,(0,t.A)(Date.now(),1))}},27746:(e,n,s)=>{"use strict";s.d(n,{A:()=>r});var t=s(6108),a=s(30213),i=s(69649);function r(e,n){(0,i.A)(2,arguments);var s=(0,t.A)(n);return(0,a.A)(e,6e4*s)}},30741:(e,n,s)=>{"use strict";s.r(n),s.d(n,{default:()=>S});var t=s(33164),a=s(471),i=s.n(a),r=s(88621),l=s(33132),o=s(83864),c=s(37643);let d=JSON.parse('{"description":"${productName} bietet erschwingliche, bequeme psychologische Online-Beratung von qualifizierten, professionellen Berater:innen, wann immer du sie brauchst. Hol dir Hilfe, du hast es verdient, gl\xfccklich zu sein!","keywords":"Psychologische Online-Beratung, psychologische Beratung, Online-Berater:in, Online-Berater:innen, Beratung online, psychische Gesundheit"}');var u=s.t(d,2);let h=JSON.parse('{"description":"${productName} offers affordable, convenient online therapy when you need it from licensed, professional therapists. Get help, you deserve to be happy!","keywords":"online therapy, therapy, online therapist, online therapists, therapy online, mental health"}');var m=s.t(h,2);let p=JSON.parse('{"description":"${productName} propose une th\xe9rapie en ligne abordable et pratique lorsque vous en avez besoin, aupr\xe8s de th\xe9rapeutes professionnels qualifi\xe9.e.s. Obtenez de l\'aide, vous m\xe9ritez d\'\xeatre heureux!","keywords":"th\xe9rapie en ligne, th\xe9rapie, th\xe9rapeute en ligne, th\xe9rapeutes en ligne, th\xe9rapie en ligne, sant\xe9 mentale"}');var g=s.t(p,2);let v=JSON.parse('{"description":"${productName} biedt betaalbare, geschikte online therapie wanneer je het nodig hebt van gediplomeerde, professionele therapeuten. Verkrijg hulp, je verdient het om gelukkig te zijn!","keywords":"online therapie, therapie, online therapeut, online therapeuten, therapie online, geestelijke gezondheid"}');var f=s.t(v,2);let b=JSON.parse('{"description":"${productName} ofrece terapia en l\xednea asequible y \xfatil cuando la necesites de psic\xf3logos cualificados. \xa1Obt\xe9n ayuda, mereces ser feliz!","keywords":"terapia en l\xednea, terapia, terapeuta en l\xednea, terapeutas en l\xednea, terapia en l\xednea, salud mental"}'),y={de:u,en:m,fr:g,nl:f,es:s.t(b,2)};function S(e){let{title:n="",description:s="",keywords:a=""}=e,{conf:d}=(0,r.SF)(),u=(0,l.B)(y),h=null;return h=2===d.default_language_id?(0,t.jsx)("meta",{translate:"no",name:"description",content:""!==s&&s?s:"".concat(d.product_name," ofrece terapia private y asequible online cuando la necesitas, de terapeutas con licencia. Recibe ayuda, mereces ser feliz!")}):62===d.default_language_id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("meta",{translate:"no",name:"description",content:"×§×× ××פ×× ×קצ××¢× ×× ×××ת, ×פר×××ת ×××××ר ×שת××"}),(0,t.jsx)("meta",{property:"og:image",content:(0,o.MZ)("https://".concat(d.cdn_host_assets,"/brand/betterhelp/betterhelp-fb.png"),d.assets_app_version)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("meta",{name:"description",content:""!==s&&s?s:(0,c.t)(u.description,{productName:d.product_name})}),(0,t.jsx)("meta",{name:"keywords",content:""!==a&&a?a:(0,c.t)(u.ke
1ywords,{productName:d.product_name})})]}),(0,t.jsxs)(i(),{children:[(0,t.jsx)("meta",{charSet:"utf-8"}),(0,t.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,t.jsx)("title",{children:n||d.product_name}),h,(0,t.jsx)("link",{rel:"shortcut icon",href:"//".concat(d.cdn_host_assets,"/brand/").concat(d.product_code_name,"/favicon-2024.ico"),type:"image/x-icon"}),(0,t.jsx)("link",{rel:"icon",href:"//".concat(d.cdn_host_assets,"/brand/").concat(d.product_code_name,"/favicon-2024.ico"),type:"image/x-icon"})]})}},35502:(e,n,s)=>{"use strict";s.d(n,{V:()=>t});let t=new WeakMap},39098:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});var t=s(53503),a=s(69649);function i(e){return(0,a.A)(1,arguments),(0,t.A)(e).getTime()<Date.now()}},41996:(e,n,s)=>{"use strict";s.d(n,{A:()=>h});let t=JSON.parse('{"contentIsLoading":"Inhalt wird geladen"}');var a=s.t(t,2);let i=JSON.parse('{"contentIsLoading":"Content is loading"}');var r=s.t(i,2);let l=JSON.parse('{"contentIsLoading":"El contenido se est\xe1 cargando"}');var o=s.t(l,2);let c=JSON.parse('{"contentIsLoading":"Le contenu est en cours de t\xe9l\xe9chargement"}');var d=s.t(c,2);let u=JSON.parse('{"contentIsLoading":"De inhoud wordt geladen"}'),h={de:a,en:r,es:o,fr:d,nl:s.t(u,2)}},42885:(e,n,s)=>{"use strict";s.d(n,{AR:()=>m,FS:()=>g,Iv:()=>o,XE:()=>u,gF:()=>p,hY:()=>d,jP:()=>h,sH:()=>c});var t=s(39098),a=s(84805),i=s(20557),r=s(67842),l=s(51760);let o=e=>{var n;return e?{id:e.id,firstName:e.firstName||"",lastName:e.lastName||"",fullName:e.fullName||"",nickName:e.nickName||"",pronouns:e.pronouns||"",dateOfBirth:e.dateOfBirth||"",age:null!=(n=e.age)?n:0,nextAppointment:e.nextAppointment||null,emergencyInfo:e.emergencyInfo||!1,avatarUrl:e.avatarUrl||"",isInsuranceClient:e.isInsuranceClient||!1,dueDates:e.dueDates||{intakeAssessments:[],treatmentPlans:[],dischargeSummaries:[],progressNotes:[],insSessions:[]},isCurrentTherapist:e.isCurrentTherapist||!1,isFormerInsuranceClient:e.isFormerInsuranceClient||!1,isPreInsuranceEligibleClient:e.isPreInsuranceEligibleClient||!1,hasCompletedSession:e.hasCompletedSession||!1,siteName:e.siteName||"",isPsychiatryEligible:e.isPsychiatryEligible||!1,recommendedTreatmentPath:e.recommendedTreatmentPath||null,showReflectTab:e.showReflectTab||!1,reflectAccessEnabledForClient:e.reflectAccessEnabledForClient||!1}:null},c=(e,n,s)=>new Intl.DateTimeFormat(s,{...l.jZ}).formatRange(new Date(e),new Date(n)),d=(e,n)=>{if(!e||Number.isNaN(Date.parse(e))||0===Date.parse(e))return"";let s=new Date(e);return(0,t.A)(s)?"Past due":(0,a.A)(s)?"Due by ".concat((0,l.r6)(s,{...l.jZ},n)):(0,i.A)(s)?"Due tomorrow":"Due ".concat((0,l.r6)(s,{...l.Bb},n))},u=(e,n)=>{let s=[null==e?void 0:e.signedAt,null==e?void 0:e.assignedAt].filter(Boolean).map(e=>new Date(e));return s.length?(0,r.A)(s):n},h=e=>!e||Number.isNaN(Date.parse(e))||0===Date.parse(e)?"Not ISO Date":e.slice(0,10),m=e=>{if(!e||3!==e.split("-").length)return"Not a date";let n=e.split("-");return"".concat(n[1],"/").concat(n[2],"/").concat(n[0].slice(2))},p=e=>{let n=e.split("-"),s=Number(n[0]);return{year:s,month:Number(n[1])-1,date:Number(n[2])}},g=e=>{let{staticOptions:n,selected:s,currentFieldIndex:t}=e;return n.filter(e=>!s.filter((e,n)=>n!==t).includes(e.value))}},45049:(e,n,s)=>{"use strict";s.r(n),s.d(n,{default:()=>u});var t=s(33164);s(44896);var a=s(97393),i=s(33132),r=s(17283),l=s(37643),o=s(41996),c=s(83832),d=s.n(c);let u=e=>{let{show:n,hasBackdrop:s=!0,position:c="fixed",rootClassName:u="",circleClassName:h=""}=e,m=(0,i.B)(o.A);return n?(0,t.jsx)("div",{className:(0,a.A)(s&&d().backdrop,c,u),children:(0,t.jsx)("svg",{className:(0,a.A)(d().loading_animation,s&&d().center),viewBox:"0 0 42 42",role:"alert","aria-live":"assertive","aria-label":(0,l.t)(m.contentIsLoading),"data-testid":(0,r.A)("loading-animation"),children:(0,t.jsx)("circle",{className:(0,a.A)("stroke-site-brandPrimary regain:stroke-site-primaryBgButton teencounseling:stroke-site-primaryBgButton",h),cx:"21",cy:"21",r:"18.5"})})}):null}},48e3:(e,n,s)=>{"use strict";s.d(n,{A:()=>a});var t=s(44896);function a(e,n){let s=(0,t.useRef)(0),a=(0,t.useRef)(0);(0,t.useEffect)(()=>!1===(null!=n&&n)?()=>{}:(s.current=window.setInterval(()=>{a.current+=1,e(a.current)},n),()=>{window.clearInterval(s.current)}),[e,n])}},48961:(e,n,s)=>{"use strict";s.d(n,{Cg:()=>t,s0:()=>a});var t=6e4,a=36e5},53503:(e,n,s)=>{"use strict";s.d(n,{A:()=>a});var t=s(69649);function a(e){(0,t.A)(1,arguments);var n=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===n?new Date(e.getTime()):"number"==typeof e||"[object Number]"===n?new Date(e):(("string"==typeof e||"[object String]"===n)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.
11 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(Error().stack)),new Date(NaN))}},55214:(e,n,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/client-info/[client-id]/scheduling",function(){return s(18609)}])},67842:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});var t=s(53503),a=s(69649);function i(e){var n,s;if((0,a.A)(1,arguments),e&&"function"==typeof e.forEach)n=e;else{if("object"!=typeof e||null===e)return new Date(NaN);n=Array.prototype.slice.call(e)}return n.forEach(function(e){var n=(0,t.A)(e);(void 0===s||s<n||isNaN(Number(n)))&&(s=n)}),s||new Date(NaN)}},67859:(e,n,s)=>{"use strict";s.d(n,{z:()=>u});var t=s(70523),a=s(20857),i=s(35502),r=s(45196),l=s(23091),o=s(65272),c=s(58505),d=s(44896);function u(e,n,s){let{value:u,children:h,"aria-label":m,"aria-labelledby":p,onPressStart:g,onPressEnd:v,onPressChange:f,onPress:b,onPressUp:y,onClick:S}=e,N=e.isDisabled||n.isDisabled,k=n.selectedValue===u,{pressProps:x,isPressed:w}=(0,c.d)({onPressStart:g,onPressEnd:v,onPressChange:f,onPress:b,onPressUp:y,onClick:S,isDisabled:N}),{pressProps:j,isPressed:C}=(0,c.d)({onPressStart:g,onPressEnd:v,onPressChange:f,onPressUp:y,onClick:S,isDisabled:N,onPress(e){b?.(e),n.setSelectedValue(u),s.current?.focus()}}),{focusableProps:D}=(0,r.Wc)((0,a.v)(e,{onFocus:()=>n.setLastFocusedValue(u)}),s),A=(0,a.v)(x,D),_=(0,t.$)(e,{labelable:!0}),T=-1;null!=n.selectedValue?n.selectedValue===u&&(T=0):(n.lastFocusedValue===u||null==n.lastFocusedValue)&&(T=0),N&&(T=void 0);let{name:z,form:P,descriptionId:B,errorMessageId:M,validationBehavior:$}=i.V.get(n);return(0,l.F)(s,n.defaultSelectedValue,n.setSelectedValue),(0,o.X)({validationBehavior:$},n,s),{labelProps:(0,a.v)(j,(0,d.useMemo)(()=>({onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault()}),[])),inputProps:(0,a.v)(_,{...A,type:"radio",name:z,form:P,tabIndex:T,disabled:N,required:n.isRequired&&"native"===$,checked:k,value:u,onChange:e=>{e.stopPropagation(),n.setSelectedValue(u)},"aria-describedby":[e["aria-describedby"],n.isInvalid?M:null,B].filter(Boolean).join(" ")||void 0}),isDisabled:N,isSelected:k,isPressed:w||C}}},69649:(e,n,s)=>{"use strict";function t(e,n){if(n.length<e)throw TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+n.length+" present")}s.d(n,{A:()=>t})},71748:(e,n,s)=>{"use strict";s.d(n,{A:()=>v});var t=s(33164),a=s(44896),i=s(97393),r=s(22699),l=s(67859),o=s(20857),c=s(3270),d=s(5277),u=s(9974),h=s(84373);let m=(0,a.createContext)(null);function p(e){let{isSelected:n,isDisabled:s,isFocusVisible:a,isInvalid:r,children:l}=e,o=n&&s,c=n&&!r&&!s;return(0,t.jsxs)("span",{className:(0,i.A)("flex items-start gap-3 select-none",s?"text-gray-400 cursor-not-allowed":"text-text cursor-pointer tap-highlight-transparent"),children:[(0,t.jsx)("span",{"aria-hidden":"true",className:(0,i.A)("h-6 min-h-6 w-6 min-w-6 rounded-full border flex items-center justify-center transition-all duration-60 hover:border-2 hover:border-gray-700",{"border-system-danger-600 hover:border-system-danger-600":r&&!s,"border-gray-300":!r,"ring-2 ring-offset-2 ring-site-royal-600":a,"bg-gray-100 hover:border hover:border-gray-300":s,"hover:bg-gray-100":o,"bg-primary-300 hover:bg-primary-400":c}),children:(0,t.jsx)("span",{className:(0,i.A)("rounded-full transition-all duration-60",n?"h-2.5 w-2.5":"h-0 w-0",r?"":"bg-site-gray-mediumdark")})}),(0,t.jsx)("span",{className:"block body-md",children:l})]})}function g(e){var n;let{option:s}=e,{state:i,disabledKeys:c,isGroupDisabled:d,OptionComponent:u,getOptionId:h,rowDataTestId:p}=(()=>{let e=(0,a.useContext)(m);if(!e)throw Error("RadioGroup must be used within <RadioGroup> please and thank you.");return e})(),g=(0,a.useRef)(null),{isFocusVisible:v,focusProps:f}=(0,r.o)(),b=null!=(n=null==c?void 0:c.has(s.key))&&n,{inputProps:y,isSelected:S,isDisabled:N}=(0,l.z)({value:String(s.key),isDisabled:d||b,id:null==h?void 0:h(s),children:s.translated},i,g);return(0,t.jsxs)("label",{className:"block",htmlFor:y.id,"data-testid":p,children:[(0,t.jsx)("input",{...(0,o.v)(y,f),ref:g,className:"sr-only"}),(0,t.jsx)(u,{isSelected:S,isDisabled:N,isFocusVisible:v,isInvalid:i.isInvalid,value:String(s.key),children:s.translated})]})}function v(e){var n;let{disabledKeys:s,limit:r,selection:l,onChange:o,children:v,options:f,optionGroups:b,className:y,OptionComponent:S,optionListClassName:N,getOptionId:k,rowDataTestId:x,...w}=e,[j,C]=(0,a.useState)(!1),D=(0,a.useMemo)(()=>f||(null!=b?b:[]).flatMap(e=>e.options),[f,b]),A=(null==l?void 0:l.key)!=null?String(l.key):void 0,_=(0,a.useCallback)(e=>{o(D.find(n=>String(n.key)===e))},[D,o]),T=(0,a.useMemo)(()=>s?s instanceof Set?s:new Set(s):new Set,[s]),z=(0,d.Z)({...w,value:A,onChange:_}),{radioGroupProps:P,labelProps:B,descriptionProps:M,errorMessageProps:$}
1=(0,c.m)({...w,label:v,onChange:_},z),{description:q,errorMessage:R,isDisabled:O}=w,F="number"==typeof r&&r>0&&!j,I=f?F?f.slice(0,r):f:void 0,L=f&&F?Math.max(0,f.length-(null!=(n=null==I?void 0:I.length)?n:0)):0,E=(0,a.useMemo)(()=>({state:z,disabledKeys:T,isGroupDisabled:!!w.isDisabled,OptionComponent:null!=S?S:p,getOptionId:k,rowDataTestId:x}),[z,T,w.isDisabled,S,k,x]),V=null!=v||q||R||z.isInvalid;return(0,t.jsxs)("div",{className:(0,i.A)("flex flex-col gap-1",y),"data-core-radio-group":!0,children:[V&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("div",{...B,className:"text-base leading-7 text-text-default",children:v}),(0,t.jsx)(h.G,{description:q,errorMessage:R,descriptionProps:M,errorMessageProps:$,isDisabled:O,isInvalid:z.isInvalid})]}),(0,t.jsx)("div",{...P,className:(0,i.A)("flex flex-col",null!=N?N:"gap-2 mt-3"),children:(0,t.jsxs)(m.Provider,{value:E,children:[f&&(0,t.jsxs)(t.Fragment,{children:[(null!=I?I:[]).map(e=>(0,t.jsx)(g,{option:e},e.key)),L>0&&(0,t.jsxs)(u.A,{variant:"link",onPress:()=>C(!0),className:"self-start",children:["See more (",L,")"]})]}),b&&b.length>0&&(0,t.jsx)(t.Fragment,{children:b.map(e=>{let n="radio-group-".concat(String(e.key),"-label");return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{id:n,className:"text-base text-text-default",children:e.translated}),(0,t.jsx)("div",{role:"group","aria-labelledby":n,className:"flex flex-col gap-2",children:e.options.map(e=>(0,t.jsx)(g,{option:e},String(e.key)))})]},String(e.key))})})]})})]})}},74415:(e,n,s)=>{"use strict";s.d(n,{A:()=>r});var t=s(33164),a=s(97393),i=s(17283);function r(e){let{children:n,className:s="",dataTestId:r}=e;return(0,t.jsx)("div",{"data-testid":(0,i.A)("".concat(r,"-rounded-shadow-box")),className:(0,a.A)("rounded shadow-card bg-white",s),children:n})}},82840:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});var t=s(5715),a=s(69649);function i(e,n){(0,a.A)(2,arguments);var s=(0,t.A)(e),i=(0,t.A)(n);return s.getTime()===i.getTime()}},83832:e=>{e.exports={backdrop:"LoadingAnimation_backdrop__FAw9r",loading_animation:"LoadingAnimation_loading_animation__AFK_O",center:"LoadingAnimation_center__jomW0",spinner:"LoadingAnimation_spinner__2J30y"}},84805:(e,n,s)=>{"use strict";s.d(n,{A:()=>i});var t=s(82840),a=s(69649);function i(e){return(0,a.A)(1,arguments),(0,t.A)(e,Date.now())}},88854:(e,n,s)=>{"use strict";s.d(n,{A:()=>r});var t=s(48961),a=s(69649),i=s(6108);function r(e,n){(0,a.A)(1,arguments);var s,r,g=n||{},v=null==g.additionalDigits?2:(0,i.A)(g.additionalDigits);if(2!==v&&1!==v&&0!==v)throw RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var f=function(e){var n,s={},t=e.split(l.dateTimeDelimiter);if(t.length>2)return s;if(/:/.test(t[0])?n=t[0]:(s.date=t[0],n=t[1],l.timeZoneDelimiter.test(s.date)&&(s.date=e.split(l.timeZoneDelimiter)[0],n=e.substr(s.date.length,e.length))),n){var a=l.timezone.exec(n);a?(s.time=n.replace(a[1],""),s.timezone=a[1]):s.time=n}return s}(e);if(f.date){var b=function(e,n){var s=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),t=e.match(s);if(!t)return{year:NaN,restDateString:""};var a=t[1]?parseInt(t[1]):null,i=t[2]?parseInt(t[2]):null;return{year:null===i?a:100*i,restDateString:e.slice((t[1]||t[2]).length)}}(f.date,v);s=function(e,n){if(null===n)return new Date(NaN);var s,t,a,i,r,l,c,d,h,g,v,f,b=e.match(o);if(!b)return new Date(NaN);var y=!!b[4],S=u(b[1]),N=u(b[2])-1,k=u(b[3]),x=u(b[4]),w=u(b[5])-1;if(y){return(s=x,t=w,s>=1&&s<=53&&t>=0&&t<=6)?(a=n,i=x,r=w,(l=new Date(0)).setUTCFullYear(a,0,4),c=l.getUTCDay()||7,l.setUTCDate(l.getUTCDate()+((i-1)*7+r+1-c)),l):new Date(NaN)}var j=new Date(0);return(d=n,h=N,g=k,h>=0&&h<=11&&g>=1&&g<=(m[h]||(p(d)?29:28))&&(v=n,(f=S)>=1&&f<=(p(v)?366:365)))?(j.setUTCFullYear(n,N,Math.max(S,k)),j):new Date(NaN)}(b.restDateString,b.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);var y=s.getTime(),S=0;if(f.time&&isNaN(S=function(e){var n,s,a,i=e.match(c);if(!i)return NaN;var r=h(i[1]),l=h(i[2]),o=h(i[3]);return(n=r,s=l,a=o,24===n?0===s&&0===a:a>=0&&a<60&&s>=0&&s<60&&n>=0&&n<25)?r*t.s0+l*t.Cg+1e3*o:NaN}(f.time)))return new Date(NaN);if(f.timezone){if(isNaN(r=function(e){if("Z"===e)return 0;var n,s=e.match(d);if(!s)return 0;var a="+"===s[1]?-1:1,i=parseInt(s[2]),r=s[3]&&parseInt(s[3])||0;return(n=r)>=0&&n<=59?a*(i*t.s0+r*t.Cg):NaN}(f.timezone)))return new Date(NaN)}
1else{var N=new Date(y+S),k=new Date(0);return k.setFullYear(N.getUTCFullYear(),N.getUTCMonth(),N.getUTCDate()),k.setHours(N.getUTCHours(),N.getUTCMinutes(),N.getUTCSeconds(),N.getUTCMilliseconds()),k}return new Date(y+S+r)}var l={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},o=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,c=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,d=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e){return e?parseInt(e):1}function h(e){return e&&parseFloat(e.replace(",","."))||0}var m=[31,null,31,30,31,30,31,31,30,31,30,31];function p(e){return e%400==0||e%4==0&&e%100!=0}},93437:(e,n,s)=>{"use strict";s.d(n,{Qv:()=>i,jR:()=>r});var t=s(44896),a=s(40589);let i=e=>{let n=(0,t.useCallback)(n=>e.subscribe(n),[e]),s=(0,t.useCallback)(()=>e.currentModal,[e]),i=(0,a.useSyncExternalStore)(n,s,s),r=(0,t.useCallback)((n,s)=>e.add(n,s),[e]),l=(0,t.useCallback)(()=>e.close(),[e]),o=(0,t.useCallback)(n=>e.remove(n),[e]);return{currentModal:i,add:r,close:l,remove:o,clear:(0,t.useCallback)(()=>e.clear(),[e]),disallowKeys:(0,t.useCallback)(n=>e.disallowKeys(n),[e])}};class r{subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.disallowedKeys.has(e))return;let s=this.queue.findIndex(n=>n.key===e);if(s>=0){if(0===s)return;this.queue.splice(s,1)}let t={...n,key:e};!0===n.showNext&&this.queue.length>0?this.queue.splice(1,0,t):this.queue.push(t),this.updateCurrentModal()}close(){var e,n;0!==this.queue.length&&(null==(e=(n=this.queue[0]).onClose)||e.call(n),this.queue.shift(),this.updateCurrentModal())}remove(e){let n=this.queue.findIndex(n=>n.key===e);n<=0||this.queue.splice(n,1)}clear(){this.queue.length<=1||(this.queue=this.queue.slice(0,1))}disallowKeys(e){e.forEach(e=>this.disallowedKeys.add(e)),this.queue=this.queue.filter(e=>{let{key:n}=e;return!this.disallowedKeys.has(n)}),this.updateCurrentModal()}updateCurrentModal(){var e;this.currentModal=null!=(e=this.queue[0])?e:null,this.subscriptions.forEach(e=>e())}constructor(){this.queue=[],this.subscriptions=new Set,this.disallowedKeys=new Set,this.currentModal=null}}}},e=>{e.O(0,[4241,1321,5032,648,1919,7713,8291,636,6593,8792],()=>e(e.s=55214)),_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.