@everfur/sdk 0.18.1 → 0.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +7 -5
- package/dist/{Chat.d-C2ddC2u7.d.cts → Chat.d-BEbRI8FZ.d.cts} +1 -1
- package/dist/{Chat.d-Bz4iJ7d2.d.ts → Chat.d-CKKuXVw5.d.ts} +1 -1
- package/dist/{DepthViews.d-Chjs8H9V.d.cts → DepthViews.d-BiePRa3Z.d.cts} +1 -1
- package/dist/{DepthViews.d-pFL_ZBZT.d.cts → DepthViews.d-Chn2xwZu.d.cts} +1 -1
- package/dist/{DepthViews.d-qXt9OMgz.d.ts → DepthViews.d-CiU4f98J.d.ts} +1 -1
- package/dist/{DepthViews.d-C6-Kzs6H.d.ts → DepthViews.d-_WMIpymE.d.ts} +1 -1
- package/dist/{IntakeMedia.d-4a89XrP7.d.ts → IntakeMedia.d-B_ZVDxh3.d.ts} +1 -1
- package/dist/{IntakeMedia.d-JJCUvQu7.d.cts → IntakeMedia.d-CnGzpllr.d.cts} +1 -1
- package/dist/{IntakeMedia.d-DGxrhgIW.d.ts → IntakeMedia.d-DNUAks9E.d.ts} +1 -1
- package/dist/{IntakeMedia.d-DUPR4lVM.d.cts → IntakeMedia.d-Dqc5V_YH.d.cts} +1 -1
- package/dist/{RecordsPage.d-sNRolVdy.d.ts → RecordsPage.d-CRRJM35Q.d.ts} +1 -1
- package/dist/{RecordsPage.d-Cmny6Q7g.d.cts → RecordsPage.d-CtNzoxre.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{appStateLifecycle.d-Bt70TQog.d.cts → appStateLifecycle.d-BQcy4J5O.d.cts} +3 -3
- package/dist/{appStateLifecycle.d-Jdg9_PFt.d.ts → appStateLifecycle.d-JuPhh7Oy.d.ts} +3 -3
- package/dist/{attachments.d-CF4_n-DZ.d.cts → attachments.d-BLEOCUU7.d.cts} +2 -2
- package/dist/{attachments.d-BVp3r6Ms.d.cts → attachments.d-CeXw6R7_.d.cts} +5 -5
- package/dist/{attachments.d-DsUZpMad.d.ts → attachments.d-DRkqNR-o.d.ts} +2 -2
- package/dist/{attachments.d-DnSCMjH0.d.ts → attachments.d-d1rWAw9K.d.ts} +5 -5
- package/dist/{bookingCopy.d-BHqE9Ozq.d.cts → bookingCopy.d-CoiNXrY8.d.cts} +10 -3
- package/dist/{bookingCopy.d-Ca4AQGZ7.d.ts → bookingCopy.d-CrUufdoE.d.ts} +10 -3
- package/dist/{casesRepository.d-VzxEyq2N.d.ts → casesRepository.d-DhI69yuj.d.ts} +1 -1
- package/dist/{casesRepository.d-DFwD2kiS.d.cts → casesRepository.d-OyZOSNNv.d.cts} +1 -1
- package/dist/chat/index.d.cts +10 -10
- package/dist/chat/index.d.ts +10 -10
- package/dist/chat/lite/index.d.cts +10 -10
- package/dist/chat/lite/index.d.ts +10 -10
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +2 -2
- package/dist/{clinicBatch.d-DXDIL1lC.d.ts → clinicBatch.d-CcqnQ7-d.d.ts} +2 -2
- package/dist/{clinicBatch.d-CLqaih2C.d.cts → clinicBatch.d-DVahpaN3.d.cts} +2 -2
- package/dist/{config.d-cqyvpzDb.d.ts → config.d-KX-EkQ9j.d.ts} +1 -1
- package/dist/{config.d-7bCXvOGn.d.cts → config.d-Z_fyOZke.d.cts} +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-BeRanUXQ.d.cts → context.d-DV5E_2Fs.d.cts} +5 -5
- package/dist/{context.d-DAnmDYGr.d.ts → context.d-DY6d4qXG.d.ts} +5 -5
- package/dist/{copy.d-CxFzeuvo.d.ts → copy.d-BPzpKGGc.d.ts} +2 -2
- package/dist/{copy.d-BPqs8swm.d.cts → copy.d-CMY9OoCC.d.cts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +13 -13
- package/dist/core/index.d.ts +13 -13
- package/dist/core/index.js +1 -1
- package/dist/{depth.d-C6XbnFig.d.ts → depth.d-B_qNSgXr.d.ts} +2 -2
- package/dist/{depth.d-qHdXHDd-.d.cts → depth.d-qVYPByPb.d.cts} +2 -2
- package/dist/{entitlementRepository.d-D_cc7g4l.d.ts → entitlementRepository.d-BXDWPyP8.d.ts} +2 -2
- package/dist/{entitlementRepository.d-C6uTDswj.d.cts → entitlementRepository.d-CwTVi7he.d.cts} +2 -2
- package/dist/{focus.d-DiWvQR2j.d.ts → focus.d-BPofD7ow.d.ts} +2 -2
- package/dist/{focus.d-HSkMHd-i.d.cts → focus.d-DJD4lWFB.d.cts} +2 -2
- package/dist/health-plan/index.d.cts +9 -9
- package/dist/health-plan/index.d.ts +9 -9
- package/dist/{idempotency.d-CF5AvlYp.d.ts → idempotency.d-BVO0mU2R.d.ts} +1 -1
- package/dist/{idempotency.d-DrO2zEZO.d.cts → idempotency.d-BmYuCb-n.d.cts} +1 -1
- package/dist/{identity.d-84x0dV7-.d.cts → identity.d-3ROlHbnP.d.cts} +1 -1
- package/dist/{identity.d-BXztMVYM.d.ts → identity.d-CRVNfZzQ.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/{introEvents.d-Cwv72ER-.d.cts → introEvents.d-DGQDEPJi.d.cts} +1 -1
- package/dist/{introEvents.d-DYU3znJs.d.ts → introEvents.d-cvMxJfYd.d.ts} +1 -1
- package/dist/notifications/index.d.cts +4 -4
- package/dist/notifications/index.d.ts +4 -4
- package/dist/{optInView.d-4Hl4HbQh.d.cts → optInView.d-CU1U_K-B.d.cts} +2 -2
- package/dist/{optInView.d-pq8tUTf6.d.ts → optInView.d-DIGu47Lz.d.ts} +2 -2
- package/dist/{parse.d-D0v06qxx.d.cts → parse.d-GzZJYu__.d.cts} +1 -1
- package/dist/{parse.d-BJhhYfkv.d.ts → parse.d-icynBIS-.d.ts} +1 -1
- package/dist/{pets.d-C4n-MDC4.d.cts → pets.d-5SMtOAwB.d.cts} +1 -1
- package/dist/{pets.d-1_CHpfgB.d.ts → pets.d-BRsbR8QU.d.ts} +1 -1
- package/dist/{petsRepository.d-Dd95xh-M.d.cts → petsRepository.d-DEnoZn92.d.cts} +1 -1
- package/dist/{petsRepository.d-BuomdFjZ.d.ts → petsRepository.d-DWsChqAS.d.ts} +1 -1
- package/dist/{ports.d-Bf3tp7Pn.d.cts → ports.d--OjPUqPb.d.cts} +4 -4
- package/dist/{ports.d-ChZHFd-q.d.ts → ports.d-CIfa_XF6.d.ts} +4 -4
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/index.cjs +1 -1
- package/dist/records/index.d.cts +10 -10
- package/dist/records/index.d.ts +10 -10
- package/dist/records/index.js +1 -1
- package/dist/{requestFunnel.d-CWI2pD3V.d.cts → requestFunnel.d-CQX_Z1Hi.d.cts} +2 -2
- package/dist/{requestFunnel.d-DcQIAs45.d.ts → requestFunnel.d-DSvCGf4J.d.ts} +2 -2
- package/dist/{runtimeTypes.d-rbuONrIv.d.ts → runtimeTypes.d-Be_vhOER.d.ts} +4 -4
- package/dist/{runtimeTypes.d-CIOVzjEK.d.cts → runtimeTypes.d-sXpNYnJp.d.cts} +4 -4
- package/dist/{screenProps.d-CFZe27oI.d.cts → screenProps.d-BW6PZh5k.d.cts} +1 -1
- package/dist/{screenProps.d-yUA4k6yK.d.ts → screenProps.d-DpMK2_gi.d.ts} +1 -1
- package/dist/server/events/index.cjs +2 -2
- package/dist/server/events/index.d.cts +36 -5
- package/dist/server/events/index.d.ts +36 -5
- package/dist/server/events/index.js +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/tabs/index.d.cts +6 -6
- package/dist/tabs/index.d.ts +6 -6
- package/dist/televet/booking/index.cjs +11 -10
- package/dist/televet/booking/index.d.cts +13 -11
- package/dist/televet/booking/index.d.ts +13 -11
- package/dist/televet/booking/index.js +11 -10
- package/dist/televet/index.d.cts +3 -3
- package/dist/televet/index.d.ts +3 -3
- package/dist/{televetGlobal.d-CC-DrqkQ.d.ts → televetGlobal.d-B0_jbCtC.d.ts} +7 -0
- package/dist/{televetGlobal.d-CKwDCbmN.d.cts → televetGlobal.d-BWYJR391.d.cts} +7 -0
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/rn/index.d.cts +7 -7
- package/dist/testing/rn/index.d.ts +7 -7
- package/dist/testing/web/index.d.cts +7 -7
- package/dist/testing/web/index.d.ts +7 -7
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/{threadOptions.d-CRbFXnlq.d.cts → threadOptions.d-Csmb-XgL.d.cts} +2 -2
- package/dist/{threadOptions.d-aK8FkszA.d.ts → threadOptions.d-DMOn3mmj.d.ts} +2 -2
- package/dist/{timelineRows.d-BbCLvjy1.d.ts → timelineRows.d-B0XZevKx.d.ts} +1 -1
- package/dist/{timelineRows.d-BvA_BoOe.d.cts → timelineRows.d-Kllr7Mcu.d.cts} +1 -1
- package/dist/{useHealthPlanSubscription.d-BN40CVK6.d.cts → useHealthPlanSubscription.d-C-c_mQ4u.d.cts} +2 -2
- package/dist/{useHealthPlanSubscription.d-BYehTI7R.d.ts → useHealthPlanSubscription.d-bNRntgWe.d.ts} +2 -2
- package/dist/{usePresentation.d-C39kKhoO.d.cts → usePresentation.d-BHKhBKQn.d.cts} +1 -1
- package/dist/{usePresentation.d-BfcyAEFt.d.ts → usePresentation.d-CmQgbrZr.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-B2ewVbRm.d.ts → useRecordsDepth.d-BilHZaR4.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-CKXAAHXI.d.cts → useRecordsDepth.d-WW_2cWwU.d.cts} +1 -1
- package/dist/{view.d-DTNPjiZ1.d.cts → view.d-BTnjZu2S.d.cts} +3 -3
- package/dist/{view.d-BnUDSQXz.d.ts → view.d-BtN_L_UF.d.ts} +3 -3
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.d.cts +11 -11
- package/dist/web/health-plan/index.d.ts +11 -11
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.d.cts +23 -23
- package/dist/web/index.d.ts +23 -23
- package/dist/web/index.js +1 -1
- package/dist/web/intro/index.d.cts +6 -6
- package/dist/web/intro/index.d.ts +6 -6
- package/dist/web/notifications/index.d.cts +3 -3
- package/dist/web/notifications/index.d.ts +3 -3
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/televet/booking/index.cjs +9 -9
- package/dist/web/televet/booking/index.d.cts +18 -11
- package/dist/web/televet/booking/index.d.ts +18 -11
- package/dist/web/televet/booking/index.js +9 -9
- package/dist/web/televet/index.d.cts +3 -3
- package/dist/web/televet/index.d.ts +3 -3
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import{createContext,useMemo,useState,useRef,useEffect,useCallback,useId,useReducer,useContext,useSyncExternalStore,createElement,Component}from"react";import{z}from"zod";import{jsxs,jsx,Fragment}from"react/jsx-runtime";function assertNever(x){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(x)}`)}function errorFrame(fields){/* @__PURE__ */
|
|
4
4
|
return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fields.retryable,wireMessage:fields.wireMessage,synthesized:fields.synthesized,lastEventId:fields.lastEventId,serverRequestId:null})}var CONSULT_STATUSES=["scheduled","in_progress","awaiting_summary","completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"],TERMINAL_CONSULT_STATUSES=/* @__PURE__ */new Set(["completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"]),LIVE_CONSULT_STATUSES=/* @__PURE__ */new Set(["scheduled","in_progress","awaiting_summary"]);function isLiveConsult(consult){return LIVE_CONSULT_STATUSES.has(consult.status)}var CONSULT_KINDS=["wellness","prescription"],SLOT_MINUTES_MAX=60;function televetSlotMinutes(slot){let starts=Date.parse(slot.startsAt),ends=Date.parse(slot.endsAt);if(Number.isNaN(starts)||Number.isNaN(ends))return null;let minutes=Math.round((ends-starts)/6e4);return minutes>0?Math.min(minutes,SLOT_MINUTES_MAX):null}var CANCELLATION_POLICY_VERSION_MAX=64,REASON_TEXT_MAX=2e3,MEDIA_REFS_MAX=10;function isWellFormedStateCode(state){return typeof state=="string"&&/^[A-Za-z]{2}$/.test(state.trim())}function row(value){return typeof value=="object"&&value!==null?value:null}function str(value){return typeof value=="string"&&value.length>0?value:null}function trimmedOrNull(value){return typeof value=="string"&&value.trim().length>0?value.trim():null}function bool(value,fallback){return typeof value=="boolean"?value:fallback}function num(value){return typeof value=="number"&&Number.isFinite(value)?value:null}function closed(set,value){return typeof value=="string"&&set.includes(value)?value:"unknown"}function parseList(wire,parseRow){if(!Array.isArray(wire))/* @__PURE__ */return Object.freeze([]);let out=[];for(let item of wire){let parsed=parseRow(item);parsed!==null&&out.push(parsed)}/* @__PURE__ */
|
|
5
|
-
return Object.freeze(out)}function parseStatePolicy(wire,askedFor){let r=row(wire);return r===null?null:/* @__PURE__ */Object.freeze({state:str(r.state)??askedFor,wellnessAvailable:bool(r.wellness_available,false),prescriptionsAvailable:bool(r.prescriptions_available,false),cancellationPolicyText:trimmedOrNull(r.cancellation_policy_text)})}function parseCancellationPolicy(wire){let r=row(wire);if(r===null)return null;let summary=trimmedOrNull(r.summary),version=trimmedOrNull(r.version);return summary===null||version===null?null:/* @__PURE__ */Object.freeze({summary:summary,version:version})}function parseClinician(wire){let r=row(wire);if(r===null)return null;let clinicianId=str(r.clinician_id),displayName=str(r.display_name);return clinicianId===null||displayName===null?null:/* @__PURE__ */Object.freeze({clinicianId:clinicianId,displayName:displayName,credentials:trimmedOrNull(r.credentials_text),rating:num(r.rating),ratingCount:num(r.rating_count),bio:trimmedOrNull(r.bio),photoRef:str(r.photo_ref),licensedStates:parseList(r.licensed_states,item=>{let l=row(item),state=l===null?null:str(l.state);return state===null?null:/* @__PURE__ */Object.freeze({state:state,canPrescribe:bool(l?.can_prescribe,false)})})})}function parseSlot(wire){let r=row(wire);if(r===null)return null;let slotId=str(r.slot_id),startsAt=str(r.starts_at);return slotId===null||startsAt===null?null:/* @__PURE__ */Object.freeze({slotId:slotId,startsAt:startsAt,endsAt:str(r.ends_at)??startsAt})}function parseTriageVerdict(wire){let r=row(wire);if(r===null)return null;let isEmergency=r.is_emergency===true,fallback=r.fallback===true;return isEmergency||fallback?/* @__PURE__ */Object.freeze({isEmergency:isEmergency,fallback:fallback}):r.is_emergency===false&&r.fallback===false?/* @__PURE__ */Object.freeze({isEmergency:false,fallback:false}):null}function parseSlotHold(wire){let r=row(wire);if(r===null)return null;let slotId=str(r.slot_id),expiresAt=str(r.hold_expires_at);return slotId===null||expiresAt===null?null:/* @__PURE__ */Object.freeze({slotId:slotId,expiresAt:expiresAt})}function parseConsult(wire){let r=row(wire);if(r===null)return null;let consultId=str(r.consult_id),scheduledAt=str(r.scheduled_at);return consultId===null||scheduledAt===null?null:/* @__PURE__ */Object.freeze({consultId:consultId,petId:str(r.pet_id)??"",clinicianId:str(r.clinician_id)??"",clinicianName:trimmedOrNull(r.display_name),reasonText:trimmedOrNull(r.reason_text),mediaRefs:parseList(r.media_refs,item=>str(item)),status:closed(CONSULT_STATUSES,r.status),kind:closed(CONSULT_KINDS,r.kind),scheduledAt:scheduledAt,emergencyFlagged:bool(r.emergency_flagged,false),hasRoom:str(r.meeting_url)!==null})}function parseBookingEntitlement(wire){let r=row(wire);/* @__PURE__ */
|
|
6
|
-
return Object.freeze({active:bool(r?.active,false)})}var CANCEL_REASON_MAX=240;function parseCancelReceipt(wire){let r=row(wire);if(r===null)return null;let feeCents=num(r.fee_cents);return feeCents===null||feeCents<0?null:/* @__PURE__ */Object.freeze({feeCents:feeCents,currency:str(r.currency)??"usd",feeRecorded:bool(r.fee_recorded,feeCents>0),summary:trimmedOrNull(r.summary)})}var TELEVET_JOIN_OPENS_MINUTES_BEFORE=15,TELEVET_JOIN_CLOSES_MINUTES_AFTER=250,JOINABLE=/* @__PURE__ */new Set(["scheduled","in_progress"]);function startsAtMs(consult){let parsed=Date.parse(consult.scheduledAt);return Number.isNaN(parsed)?null:parsed}function televetJoinOpensAtMs(consult){let start=startsAtMs(consult);return start===null?null:start-TELEVET_JOIN_OPENS_MINUTES_BEFORE*6e4}function televetJoinDecision(consult,nowMs){if(!JOINABLE.has(consult.status))return{joinable:false,reason:`status_${consult.status}`};if(!consult.hasRoom)return{joinable:false,reason:"room_not_ready"};let start=startsAtMs(consult);return start===null||nowMs<start-TELEVET_JOIN_OPENS_MINUTES_BEFORE*6e4?{joinable:false,reason:"too_early"}:nowMs>start+TELEVET_JOIN_CLOSES_MINUTES_AFTER*6e4?{joinable:false,reason:"too_late"}:{joinable:true}}function splitTelevetVisits(consults,nowMs){let upcoming=[],past=[];for(let consult of consults){let start=startsAtMs(consult);(JOINABLE.has(consult.status)&&start!==null&&start+TELEVET_JOIN_CLOSES_MINUTES_AFTER*6e4>nowMs?upcoming:past).push(consult)}return upcoming.sort((a,b)=>(startsAtMs(a)??0)-(startsAtMs(b)??0)),past.sort((a,b)=>(startsAtMs(b)??0)-(startsAtMs(a)??0)),/* @__PURE__ */Object.freeze({upcoming:/* @__PURE__ */Object.freeze(upcoming),past:/* @__PURE__ */Object.freeze(past)})}function canManageTelevetVisit(status){return status==="scheduled"}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}function callHostAsync(fn,...args){let started;try{started=fn(...args)}catch(error){return reportHostFailure(error),Promise.resolve({ok:false,error:error})}return Promise.resolve(started).then(value=>({ok:true,value:value}),error=>({ok:false,error:error}))}var EMERGENCY_ER_LINE="Go to the nearest emergency vet now.";var DRAFT=s=>s,PLACEHOLDER_MARKERS=["[PLACEHOLDER","[PLAN NAME]","[LINK]","[Last]","TODO","TBD"];function isPlaceholderCopy(value){return PLACEHOLDER_MARKERS.some(m=>value.toUpperCase().includes(m.toUpperCase()))}function fill(template,slots){let out=template;for(let[key,value]of Object.entries(slots))out=out.split(`{${key}}`).join(value);return out}var TELEVET_BOOKING_COPY=/* @__PURE__ */Object.freeze({stateBlockedTitle:DRAFT("Not available in this state yet"),noCliniciansTitle:DRAFT("No vets available right now"),noCliniciansBody:DRAFT("Nobody is free in your area at the moment. This changes through the day."),noCliniciansRetryCta:DRAFT("Check again"),noCliniciansRegionBody:DRAFT("Video visits have to be with a vet licensed in your state, and we don’t have one there yet."),yourVetTitle:DRAFT("Your vet"),licensedPillTemplate:DRAFT("Licensed in {state}"),reviewsLabel:DRAFT("reviews"),rescheduleFromTemplate:DRAFT("Moving your visit on {when}"),rescheduleFailed:DRAFT("That did not move. Your original time is unchanged."),rescheduleStepLabel:DRAFT("Reschedule"),rescheduleTitleTemplate:DRAFT("Pick a new time for {pet}"),rescheduleNowLabel:DRAFT("Now"),rescheduleMoveTemplate:DRAFT("Move to {when}"),rescheduleMoving:DRAFT("Moving…"),rescheduleKeepLabel:DRAFT("Keep the visit as it is"),keepExistingCta:DRAFT("Keep my current time"),bookingPausedTitle:DRAFT("Booking is not available right now."),slotsErrorTitle:DRAFT("Could not load times"),noSlotsTitle:DRAFT("No times available"),nextOpeningTemplate:DRAFT("Next opening across our vets: {when}"),seeOtherVetsCta:DRAFT("See other vets"),retryCta:DRAFT("Try again"),holdExpired:DRAFT("That time is no longer held. Pick another."),slotTaken:DRAFT("That time was just taken. Pick another."),reasonPlaceholder:DRAFT("What is going on with your pet?"),reasonTooLong:DRAFT("That is too long. Please shorten it."),shareRecordsOff:DRAFT("Share health records with this vet"),confirmNotEntitled:DRAFT("A Pro membership is needed to book a video visit."),confirmFailed:DRAFT("That did not book. Try again."),checkAvailabilityCta:DRAFT("Check availability"),stateInterest:/* @__PURE__ */Object.freeze({cta:DRAFT("Add me to the list"),submitting:DRAFT("Adding you to the list…"),joinedTitle:DRAFT("You are on the list"),joinedBody:DRAFT("We will let you know when this changes."),failed:DRAFT("That did not save. Try again.")}),media:/* @__PURE__ */Object.freeze({droppedTemplate:DRAFT("{n} attachment did not upload."),droppedPluralTemplate:DRAFT("{n} attachments did not upload."),refusedSizeTemplate:DRAFT("{n} attachment was too large to send."),refusedSizePluralTemplate:DRAFT("{n} attachments were too large to send."),refusedTypeTemplate:DRAFT("{n} attachment is a file type that cannot be sent."),refusedTypePluralTemplate:DRAFT("{n} attachments are file types that cannot be sent."),refusedUnreadableTemplate:DRAFT("{n} attachment could not be read."),refusedUnreadablePluralTemplate:DRAFT("{n} attachments could not be read.")}),navTitle:DRAFT("Book a visit"),petFallback:"your pet",whereTitleTemplate:DRAFT("Where will {pet} be during the visit?"),whereLeadTemplate:DRAFT("Pick where {pronoun} be for the call, not where you live. It decides what the vet can do."),wherePronounFallback:"they’ll",whereFormLabelTemplate:DRAFT("Where {pet} will be"),whereLegend:DRAFT("State"),wherePrescribeMetaTemplate:DRAFT("Video visit, and prescriptions if {pet} needs them"),whereWellnessMeta:DRAFT("Wellness visit: advice and a care plan, no prescriptions yet"),whereAnotherState:DRAFT("Another state"),whereWhichState:DRAFT("Which state?"),whereLicensedTemplate:DRAFT("{vet} is licensed in {state}, so a prescription can be part of {pet}’s plan."),whereAskEveryTime:DRAFT("We ask every time: state rules require it."),issuesTitleTemplate:DRAFT("What’s going on with {pet}?"),issuesHint:DRAFT("Pick as many as you like."),issuesFormLabel:DRAFT("What’s going on"),issuesLegend:DRAFT("Main issues"),issuesPickOne:DRAFT("Pick at least one. Not sure? Choose Something else."),otherIssue:DRAFT("Something else"),describeHeadingTemplate:DRAFT("Tell {vet} what you’re seeing"),describeFieldLabel:DRAFT("What you’re seeing"),emergencyCheck:/* @__PURE__ */Object.freeze({titleTemplate:DRAFT("Is {pet} doing any of these right now?"),lead:DRAFT("A scheduled video visit isn’t the right place for an emergency."),signs:/* @__PURE__ */Object.freeze([DRAFT("Trouble breathing, or blue, grey or very pale gums"),DRAFT("Collapsed, or can’t stand up"),DRAFT("A seizure"),DRAFT("Ate something toxic, like grapes, chocolate, xylitol or medicine"),DRAFT("A swollen, hard belly, or retching with nothing coming up"),DRAFT("Bleeding that won’t stop"),DRAFT("Straining to pee with nothing coming out")]),formLabel:DRAFT("Emergency check"),legend:DRAFT("Any of these now?"),noneCta:DRAFT("No, none of these"),someCta:DRAFT("Yes, at least one")}),timeHeading:DRAFT("Pick a time"),timeMorning:DRAFT("Morning"),timeAfternoon:DRAFT("Afternoon"),timeEvening:DRAFT("Evening"),timeLegendTemplate:DRAFT("Time on {day}"),dayLegend:DRAFT("Day"),reviewHeading:DRAFT("Does this look right?"),summaryWhere:DRAFT("Where"),changeCta:DRAFT("Change"),whereAttestTemplate:DRAFT("{pet} and I will be in {state} during the visit."),attestBoth:DRAFT("Check both boxes to book the visit."),bookedStepLabel:DRAFT("Booked"),bookedTitleTemplate:DRAFT("You’re booked with {vet}"),bookedLeadTemplate:DRAFT("{when}, for {pet}."),footnote:DRAFT("Video visits are with a licensed veterinarian. Prescriptions where allowed, starting with California. In an emergency, go to the nearest emergency animal hospital."),rescheduleNavTitle:DRAFT("Change your visit"),close:DRAFT("Close"),continueCta:DRAFT("Continue"),petSelectTitle:DRAFT("Who is this visit for?"),addPetCta:DRAFT("Add a pet"),addAnotherPetCta:DRAFT("Add another pet"),locationUnknownTitle:DRAFT("We need your location to find a vet"),locationUnknownBody:DRAFT("Turn on location for Everfur, then try again."),locationUnknownCta:DRAFT("Allow location"),locationBlockedTitle:DRAFT("Location is turned off"),locationBlockedBody:DRAFT("Everfur needs your location to match you with a vet in your area."),locationBlockedCta:DRAFT("Open Settings"),locationUnavailableTitle:DRAFT("We could not read your location"),locationUnavailableBody:DRAFT("Try again in a moment."),stateAttestTemplate:DRAFT("I confirm my pet and I are in {state} right now."),describeHeading:DRAFT("Tell the vet what you are seeing"),describeHelpLong:DRAFT("When it started, what’s changed, what you’ve tried. Anything helps."),addPhotoCta:DRAFT("Add photos or videos"),addPhotoMeta:DRAFT("Optional. A close-up in good light helps."),removePhotoLabel:DRAFT("Remove photo"),summaryPet:DRAFT("Pet"),summaryVet:DRAFT("Vet"),summaryWhen:DRAFT("When"),summaryLength:DRAFT("Length"),summaryReason:DRAFT("About"),summaryLengthTemplate:DRAFT("{n} minutes"),confirmCta:DRAFT("Book the visit"),confirmBusy:DRAFT("Booking…"),bookedTitle:DRAFT("You are booked."),addToCalendarCta:DRAFT("Add to calendar"),doneCta:DRAFT("Done"),booked:/* @__PURE__ */Object.freeze({remindPromise:DRAFT("We will notify you 30 minutes before."),summaryPromise:DRAFT("{pet}'s summary goes to the vet ahead of the call."),recordsPromiseTemplate:DRAFT("{pet}’s records and your notes go to {vet} ahead of the call."),recordsPhotoPromiseTemplate:DRAFT("{pet}’s records, your notes and the photo go to {vet} ahead of the call."),stepsLabel:DRAFT("What happens next"),joinPromise:DRAFT("Join right here in the app. No links to hunt for."),backToPet:DRAFT("Back to {pet}"),calendarAdded:DRAFT("Added to your calendar"),calendarFailedBody:DRAFT("That did not save to your calendar.")}),chrome:/* @__PURE__ */Object.freeze({closeHint:DRAFT("Closes without saving"),discardTitle:DRAFT("Leave without booking?"),discardBody:DRAFT("Your answers will not be saved."),discardConfirmCta:DRAFT("Leave"),discardKeepCta:DRAFT("Keep going"),noPetsTitle:DRAFT("No pets on this account"),loadFailedTitle:DRAFT("Could not load"),retryCta:DRAFT("Try again")}),emergency:/* @__PURE__ */Object.freeze({bannerTitle:DRAFT("This can’t wait for a scheduled visit."),keepBookingCta:DRAFT("I’ve handled this, continue booking"),lede:DRAFT("What you’re describing is the kind of thing vets want to see in person, now. Call one of these first."),ledeWithoutExits:DRAFT("What you’re describing is the kind of thing vets want to see in person, now."),exitPrimaryVetTitle:DRAFT("Call {petName}’s regular vet"),exitFindErTitle:DRAFT("Find an emergency vet near you"),exitGoToErTitle:EMERGENCY_ER_LINE,startCallHint:DRAFT("Starts a phone call"),poisonControl:DRAFT("ASPCA Animal Poison Control"),poisonControlDetail:DRAFT("(888) 426-4435 · a fee may apply"),poisonControlTel:"tel:+18884264435"}),visit:/* @__PURE__ */Object.freeze({title:DRAFT("Your visit")}),loading:/* @__PURE__ */Object.freeze({pets:"Loading pets. Nothing to read yet.",clinicians:"Loading vets. Nothing to read yet.",slots:"Loading times. Nothing to read yet.",consult:"Loading your visit. Nothing to read yet.",progressTemplate:"Step {step} of {total}"})});function televetBookingCopyValues(node=TELEVET_BOOKING_COPY){return typeof node=="string"?[node]:typeof node!="object"||node===null?[]:Object.values(node).flatMap(v=>televetBookingCopyValues(v))}function isTelevetBookingCopyReady(){return televetBookingCopyValues().every(value=>value.trim().length>0&&!isPlaceholderCopy(value))}var TELEVET_EMERGENCY_EXITS_WEB=/* @__PURE__ */Object.freeze({goToEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitGoToErTitle,findEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitFindErTitle,poisonControl:TELEVET_BOOKING_COPY.emergency.poisonControl,poisonControlDetail:TELEVET_BOOKING_COPY.emergency.poisonControlDetail,poisonControlTel:TELEVET_BOOKING_COPY.emergency.poisonControlTel}),TELEVET_BOOKING_COPY_WEB=/* @__PURE__ */Object.freeze({...TELEVET_BOOKING_COPY,close:"Close booking",reasonPlaceholder:"She's been scratching her left ear a lot this week...",backLabel:"Back"});var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
|
|
5
|
+
return Object.freeze(out)}function parseStatePolicy(wire,askedFor){let r=row(wire);return r===null?null:/* @__PURE__ */Object.freeze({state:str(r.state)??askedFor,wellnessAvailable:bool(r.wellness_available,false),prescriptionsAvailable:bool(r.prescriptions_available,false),cancellationPolicyText:trimmedOrNull(r.cancellation_policy_text)})}function parseCancellationPolicy(wire){let r=row(wire);if(r===null)return null;let summary=trimmedOrNull(r.summary),version=trimmedOrNull(r.version);return summary===null||version===null?null:/* @__PURE__ */Object.freeze({summary:summary,version:version})}function parseClinician(wire){let r=row(wire);if(r===null)return null;let clinicianId=str(r.clinician_id),displayName=str(r.display_name);return clinicianId===null||displayName===null?null:/* @__PURE__ */Object.freeze({clinicianId:clinicianId,displayName:displayName,credentials:trimmedOrNull(r.credentials_text),rating:num(r.rating),ratingCount:num(r.rating_count),bio:trimmedOrNull(r.bio),photoRef:str(r.photo_ref),licensedStates:parseList(r.licensed_states,item=>{let l=row(item),state=l===null?null:str(l.state);return state===null?null:/* @__PURE__ */Object.freeze({state:state,canPrescribe:bool(l?.can_prescribe,false)})}),role:parseClinicianRole(r.clinician_role)})}function parseClinicianRole(wire){let value=str(wire)?.trim().toLowerCase();return value==="vet"||value==="vet_tech"?value:null}function parseSlot(wire){let r=row(wire);if(r===null)return null;let slotId=str(r.slot_id),startsAt=str(r.starts_at);return slotId===null||startsAt===null?null:/* @__PURE__ */Object.freeze({slotId:slotId,startsAt:startsAt,endsAt:str(r.ends_at)??startsAt})}function parseTriageVerdict(wire){let r=row(wire);if(r===null)return null;let isEmergency=r.is_emergency===true,fallback=r.fallback===true;return isEmergency||fallback?/* @__PURE__ */Object.freeze({isEmergency:isEmergency,fallback:fallback}):r.is_emergency===false&&r.fallback===false?/* @__PURE__ */Object.freeze({isEmergency:false,fallback:false}):null}function parseSlotHold(wire){let r=row(wire);if(r===null)return null;let slotId=str(r.slot_id),expiresAt=str(r.hold_expires_at);return slotId===null||expiresAt===null?null:/* @__PURE__ */Object.freeze({slotId:slotId,expiresAt:expiresAt})}function parseConsult(wire){let r=row(wire);if(r===null)return null;let consultId=str(r.consult_id),scheduledAt=str(r.scheduled_at);return consultId===null||scheduledAt===null?null:/* @__PURE__ */Object.freeze({consultId:consultId,petId:str(r.pet_id)??"",clinicianId:str(r.clinician_id)??"",clinicianName:trimmedOrNull(r.display_name),reasonText:trimmedOrNull(r.reason_text),mediaRefs:parseList(r.media_refs,item=>str(item)),status:closed(CONSULT_STATUSES,r.status),kind:closed(CONSULT_KINDS,r.kind),scheduledAt:scheduledAt,emergencyFlagged:bool(r.emergency_flagged,false),hasRoom:str(r.meeting_url)!==null})}function parseBookingEntitlement(wire){let r=row(wire);/* @__PURE__ */
|
|
6
|
+
return Object.freeze({active:bool(r?.active,false)})}var CANCEL_REASON_MAX=240;function parseCancelReceipt(wire){let r=row(wire);if(r===null)return null;let feeCents=num(r.fee_cents);return feeCents===null||feeCents<0?null:/* @__PURE__ */Object.freeze({feeCents:feeCents,currency:str(r.currency)??"usd",feeRecorded:bool(r.fee_recorded,feeCents>0),summary:trimmedOrNull(r.summary)})}var TELEVET_JOIN_OPENS_MINUTES_BEFORE=15,TELEVET_JOIN_CLOSES_MINUTES_AFTER=250,JOINABLE=/* @__PURE__ */new Set(["scheduled","in_progress"]);function startsAtMs(consult){let parsed=Date.parse(consult.scheduledAt);return Number.isNaN(parsed)?null:parsed}function televetJoinOpensAtMs(consult){let start=startsAtMs(consult);return start===null?null:start-TELEVET_JOIN_OPENS_MINUTES_BEFORE*6e4}function televetJoinDecision(consult,nowMs){if(!JOINABLE.has(consult.status))return{joinable:false,reason:`status_${consult.status}`};if(!consult.hasRoom)return{joinable:false,reason:"room_not_ready"};let start=startsAtMs(consult);return start===null||nowMs<start-TELEVET_JOIN_OPENS_MINUTES_BEFORE*6e4?{joinable:false,reason:"too_early"}:nowMs>start+TELEVET_JOIN_CLOSES_MINUTES_AFTER*6e4?{joinable:false,reason:"too_late"}:{joinable:true}}function splitTelevetVisits(consults,nowMs){let upcoming=[],past=[];for(let consult of consults){let start=startsAtMs(consult);(JOINABLE.has(consult.status)&&start!==null&&start+TELEVET_JOIN_CLOSES_MINUTES_AFTER*6e4>nowMs?upcoming:past).push(consult)}return upcoming.sort((a,b)=>(startsAtMs(a)??0)-(startsAtMs(b)??0)),past.sort((a,b)=>(startsAtMs(b)??0)-(startsAtMs(a)??0)),/* @__PURE__ */Object.freeze({upcoming:/* @__PURE__ */Object.freeze(upcoming),past:/* @__PURE__ */Object.freeze(past)})}function canManageTelevetVisit(status){return status==="scheduled"}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}function callHostAsync(fn,...args){let started;try{started=fn(...args)}catch(error){return reportHostFailure(error),Promise.resolve({ok:false,error:error})}return Promise.resolve(started).then(value=>({ok:true,value:value}),error=>({ok:false,error:error}))}var EMERGENCY_ER_LINE="Go to the nearest emergency vet now.";var DRAFT=s=>s,PLACEHOLDER_MARKERS=["[PLACEHOLDER","[PLAN NAME]","[LINK]","[Last]","TODO","TBD"];function isPlaceholderCopy(value){return PLACEHOLDER_MARKERS.some(m=>value.toUpperCase().includes(m.toUpperCase()))}function fill(template,slots){let out=template;for(let[key,value]of Object.entries(slots))out=out.split(`{${key}}`).join(value);return out}var TELEVET_BOOKING_COPY=/* @__PURE__ */Object.freeze({stateBlockedTitle:DRAFT("Not available in this state yet"),noCliniciansTitle:DRAFT("No vets available right now"),noCliniciansBody:DRAFT("Nobody is free in your area at the moment. This changes through the day."),noCliniciansRetryCta:DRAFT("Check again"),noCliniciansRegionBody:DRAFT("Video visits have to be with a vet licensed in your state, and we don’t have one there yet."),yourVetTitle:DRAFT("Your vet"),licensedPillTemplate:DRAFT("Licensed in {state}"),reviewsLabel:DRAFT("reviews"),vetTechRoleLabel:DRAFT("Vet tech"),vetTechNoRxLine:DRAFT("Vet techs can’t prescribe medication."),rescheduleFromTemplate:DRAFT("Moving your visit on {when}"),rescheduleFailed:DRAFT("That did not move. Your original time is unchanged."),rescheduleStepLabel:DRAFT("Reschedule"),rescheduleTitleTemplate:DRAFT("Pick a new time for {pet}"),rescheduleNowLabel:DRAFT("Now"),rescheduleMoveTemplate:DRAFT("Move to {when}"),rescheduleMoving:DRAFT("Moving…"),rescheduleKeepLabel:DRAFT("Keep the visit as it is"),keepExistingCta:DRAFT("Keep my current time"),bookingPausedTitle:DRAFT("Booking is not available right now."),slotsErrorTitle:DRAFT("Could not load times"),noSlotsTitle:DRAFT("No times available"),nextOpeningTemplate:DRAFT("Next opening across our vets: {when}"),seeOtherVetsCta:DRAFT("See other vets"),retryCta:DRAFT("Try again"),holdExpired:DRAFT("That time is no longer held. Pick another."),slotTaken:DRAFT("That time was just taken. Pick another."),reasonPlaceholder:DRAFT("What is going on with your pet?"),reasonTooLong:DRAFT("That is too long. Please shorten it."),shareRecordsOff:DRAFT("Share health records with this vet"),confirmNotEntitled:DRAFT("A Pro membership is needed to book a video visit."),confirmFailed:DRAFT("That did not book. Try again."),checkAvailabilityCta:DRAFT("Check availability"),stateInterest:/* @__PURE__ */Object.freeze({cta:DRAFT("Add me to the list"),submitting:DRAFT("Adding you to the list…"),joinedTitle:DRAFT("You are on the list"),joinedBody:DRAFT("We will let you know when this changes."),failed:DRAFT("That did not save. Try again.")}),media:/* @__PURE__ */Object.freeze({droppedTemplate:DRAFT("{n} attachment did not upload."),droppedPluralTemplate:DRAFT("{n} attachments did not upload."),refusedSizeTemplate:DRAFT("{n} attachment was too large to send."),refusedSizePluralTemplate:DRAFT("{n} attachments were too large to send."),refusedTypeTemplate:DRAFT("{n} attachment is a file type that cannot be sent."),refusedTypePluralTemplate:DRAFT("{n} attachments are file types that cannot be sent."),refusedUnreadableTemplate:DRAFT("{n} attachment could not be read."),refusedUnreadablePluralTemplate:DRAFT("{n} attachments could not be read.")}),navTitle:DRAFT("Book a visit"),petFallback:"your pet",whereTitleTemplate:DRAFT("Where will {pet} be during the visit?"),whereLeadTemplate:DRAFT("Pick where {pronoun} be for the call, not where you live. It decides what the vet can do."),wherePronounFallback:"they’ll",whereFormLabelTemplate:DRAFT("Where {pet} will be"),whereLegend:DRAFT("State"),wherePrescribeMetaTemplate:DRAFT("Video visit, and prescriptions if {pet} needs them"),whereWellnessMeta:DRAFT("Wellness visit: advice and a care plan, no prescriptions yet"),whereAnotherState:DRAFT("Another state"),whereWhichState:DRAFT("Which state?"),whereLicensedTemplate:DRAFT("{vet} is licensed in {state}, so a prescription can be part of {pet}’s plan."),whereAskEveryTime:DRAFT("We ask every time: state rules require it."),issuesTitleTemplate:DRAFT("What’s going on with {pet}?"),issuesHint:DRAFT("Pick as many as you like."),issuesFormLabel:DRAFT("What’s going on"),issuesLegend:DRAFT("Main issues"),issuesPickOne:DRAFT("Pick at least one. Not sure? Choose Something else."),otherIssue:DRAFT("Something else"),describeHeadingTemplate:DRAFT("Tell {vet} what you’re seeing"),describeFieldLabel:DRAFT("What you’re seeing"),emergencyCheck:/* @__PURE__ */Object.freeze({titleTemplate:DRAFT("Is {pet} doing any of these right now?"),lead:DRAFT("A scheduled video visit isn’t the right place for an emergency."),signs:/* @__PURE__ */Object.freeze([DRAFT("Trouble breathing, or blue, grey or very pale gums"),DRAFT("Collapsed, or can’t stand up"),DRAFT("A seizure"),DRAFT("Ate something toxic, like grapes, chocolate, xylitol or medicine"),DRAFT("A swollen, hard belly, or retching with nothing coming up"),DRAFT("Bleeding that won’t stop"),DRAFT("Straining to pee with nothing coming out")]),formLabel:DRAFT("Emergency check"),legend:DRAFT("Any of these now?"),noneCta:DRAFT("No, none of these"),someCta:DRAFT("Yes, at least one")}),timeHeading:DRAFT("Pick a time"),timeMorning:DRAFT("Morning"),timeAfternoon:DRAFT("Afternoon"),timeEvening:DRAFT("Evening"),timeLegendTemplate:DRAFT("Time on {day}"),dayLegend:DRAFT("Day"),reviewHeading:DRAFT("Does this look right?"),summaryWhere:DRAFT("Where"),changeCta:DRAFT("Change"),whereAttestTemplate:DRAFT("{pet} and I will be in {state} during the visit."),attestBoth:DRAFT("Check both boxes to book the visit."),bookedStepLabel:DRAFT("Booked"),bookedTitleTemplate:DRAFT("You’re booked with {vet}"),bookedLeadTemplate:DRAFT("{when}, for {pet}."),footnote:DRAFT("Video visits are with a licensed veterinarian. Prescriptions where allowed, starting with California. In an emergency, go to the nearest emergency animal hospital."),rescheduleNavTitle:DRAFT("Change your visit"),close:DRAFT("Close"),continueCta:DRAFT("Continue"),petSelectTitle:DRAFT("Who is this visit for?"),addPetCta:DRAFT("Add a pet"),addAnotherPetCta:DRAFT("Add another pet"),locationUnknownTitle:DRAFT("We need your location to find a vet"),locationUnknownBody:DRAFT("Turn on location for Everfur, then try again."),locationUnknownCta:DRAFT("Allow location"),locationBlockedTitle:DRAFT("Location is turned off"),locationBlockedBody:DRAFT("Everfur needs your location to match you with a vet in your area."),locationBlockedCta:DRAFT("Open Settings"),locationUnavailableTitle:DRAFT("We could not read your location"),locationUnavailableBody:DRAFT("Try again in a moment."),stateAttestTemplate:DRAFT("I confirm my pet and I are in {state} right now."),describeHeading:DRAFT("Tell the vet what you are seeing"),describeHelpLong:DRAFT("When it started, what’s changed, what you’ve tried. Anything helps."),addPhotoCta:DRAFT("Add photos or videos"),addPhotoMeta:DRAFT("Optional. A close-up in good light helps."),removePhotoLabel:DRAFT("Remove photo"),summaryPet:DRAFT("Pet"),summaryVet:DRAFT("Vet"),summaryWhen:DRAFT("When"),summaryLength:DRAFT("Length"),summaryReason:DRAFT("About"),summaryLengthTemplate:DRAFT("{n} minutes"),confirmCta:DRAFT("Book the visit"),confirmBusy:DRAFT("Booking…"),bookedTitle:DRAFT("You are booked."),addToCalendarCta:DRAFT("Add to calendar"),doneCta:DRAFT("Done"),booked:/* @__PURE__ */Object.freeze({remindPromise:DRAFT("We will notify you 30 minutes before."),summaryPromise:DRAFT("{pet}'s summary goes to the vet ahead of the call."),recordsPromiseTemplate:DRAFT("{pet}’s records and your notes go to {vet} ahead of the call."),recordsPhotoPromiseTemplate:DRAFT("{pet}’s records, your notes and the photo go to {vet} ahead of the call."),stepsLabel:DRAFT("What happens next"),joinPromise:DRAFT("Join right here in the app. No links to hunt for."),backToPet:DRAFT("Back to {pet}"),calendarAdded:DRAFT("Added to your calendar"),calendarFailedBody:DRAFT("That did not save to your calendar.")}),chrome:/* @__PURE__ */Object.freeze({closeHint:DRAFT("Closes without saving"),discardTitle:DRAFT("Leave without booking?"),discardBody:DRAFT("Your answers will not be saved."),discardConfirmCta:DRAFT("Leave"),discardKeepCta:DRAFT("Keep going"),noPetsTitle:DRAFT("No pets on this account"),loadFailedTitle:DRAFT("Could not load"),retryCta:DRAFT("Try again")}),emergency:/* @__PURE__ */Object.freeze({bannerTitle:DRAFT("This can’t wait for a scheduled visit."),keepBookingCta:DRAFT("I’ve handled this, continue booking"),lede:DRAFT("What you’re describing is the kind of thing vets want to see in person, now. Call one of these first."),ledeWithoutExits:DRAFT("What you’re describing is the kind of thing vets want to see in person, now."),exitPrimaryVetTitle:DRAFT("Call {petName}’s regular vet"),exitFindErTitle:DRAFT("Find an emergency vet near you"),exitGoToErTitle:EMERGENCY_ER_LINE,startCallHint:DRAFT("Starts a phone call"),poisonControl:DRAFT("ASPCA Animal Poison Control"),poisonControlDetail:DRAFT("(888) 426-4435 · a fee may apply"),poisonControlTel:"tel:+18884264435"}),visit:/* @__PURE__ */Object.freeze({title:DRAFT("Your visit")}),loading:/* @__PURE__ */Object.freeze({pets:"Loading pets. Nothing to read yet.",clinicians:"Loading vets. Nothing to read yet.",slots:"Loading times. Nothing to read yet.",consult:"Loading your visit. Nothing to read yet.",progressTemplate:"Step {step} of {total}"})});function televetBookingCopyValues(node=TELEVET_BOOKING_COPY){return typeof node=="string"?[node]:typeof node!="object"||node===null?[]:Object.values(node).flatMap(v=>televetBookingCopyValues(v))}function isTelevetBookingCopyReady(){return televetBookingCopyValues().every(value=>value.trim().length>0&&!isPlaceholderCopy(value))}var TELEVET_EMERGENCY_EXITS_WEB=/* @__PURE__ */Object.freeze({goToEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitGoToErTitle,findEmergencyVet:TELEVET_BOOKING_COPY.emergency.exitFindErTitle,poisonControl:TELEVET_BOOKING_COPY.emergency.poisonControl,poisonControlDetail:TELEVET_BOOKING_COPY.emergency.poisonControlDetail,poisonControlTel:TELEVET_BOOKING_COPY.emergency.poisonControlTel}),TELEVET_BOOKING_COPY_WEB=/* @__PURE__ */Object.freeze({...TELEVET_BOOKING_COPY,close:"Close booking",reasonPlaceholder:"She's been scratching her left ear a lot this week...",backLabel:"Back"});var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
|
|
7
7
|
/* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
|
|
8
8
|
/* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
|
|
9
9
|
/* @__PURE__ */Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),
|
|
@@ -218,19 +218,19 @@ return jsxs("div",{style:styles.root,"data-testid":testID,children:[header,
|
|
|
218
218
|
/* @__PURE__ */jsx(TelevetDayStrip,{slots:slots,selectedDayKey:activeDay,onSelectDay:day=>setDayKey(day.key),groupLabel:dayGroupLabel}),zone?/* @__PURE__ */jsx("p",{id:zoneId,style:styles.zone,"data-testid":"televet-slot-zone",children:zone}):null,
|
|
219
219
|
/* @__PURE__ */jsx("div",{style:styles.gridScroll,onKeyDown:onGridKeyDown,children:groups(times,periodLabels).map(group=>/* @__PURE__ */jsxs("div",{style:styles.group,children:[group.label?/* @__PURE__ */jsx("p",{"aria-hidden":"true",style:styles.period,"data-testid":`televet-slot-period-${group.key}`,children:group.label}):null,
|
|
220
220
|
/* @__PURE__ */jsx("ul",{role:"list","aria-label":group.label?`${legend}, ${group.label}`:legend,...zone?{"aria-describedby":zoneId}:{},"aria-busy":blocked||void 0,style:styles.grid,children:group.slots.map(slot=>{let busy=busySlotId===slot.slotId,picked=selectedSlot?.slotId===slot.slotId;/* @__PURE__ */
|
|
221
|
-
return jsx("li",{style:styles.gridItem,children:/* @__PURE__ */jsx("button",{ref:node=>{node?chipRefs.current.set(slot.slotId,node):chipRefs.current.delete(slot.slotId)},type:"button",tabIndex:slot.slotId===stopId?0:-1,onClick:blocked?void 0:()=>onPick(slot),onFocus:()=>setFocusId(slot.slotId),"aria-disabled":blocked||void 0,"aria-busy":busy||void 0,"aria-pressed":picked||void 0,"aria-label":formatWhenWithDay(slot.startsAt),"data-testid":`${rowTestIdPrefix}-${slot.slotId}`,style:{...styles.chip,...picked?styles.chipPicked:styles.chipRest,...busy?styles.chipBusy:null,...blocked&&!busy?styles.chipDisabled:null},children:/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:{...styles.chipLabel,...picked?styles.chipLabelPicked:styles.chipLabelRest,...busy?styles.chipLabelBusy:null},children:formatClock(slot.startsAt)})})},slot.slotId)})})]},group.key))})]})}function slotIndexForKey(key,index,chips){let last=chips.length-1;if(key==="ArrowRight")return Math.min(last,index+1);if(key==="ArrowLeft")return Math.max(0,index-1);if(key==="Home")return 0;if(key==="End")return last;if(key!=="ArrowDown"&&key!=="ArrowUp")return null;let from=chips[index]?.getBoundingClientRect();if(from===void 0)return null;let centre=from.left+from.width/2,down=key==="ArrowDown",best=null;for(let i=0;i<chips.length;i+=1){let chip=chips[i];if(chip==null||i===index)continue;let box=chip.getBoundingClientRect(),row2=down?box.top-from.top:from.top-box.top;if(row2<from.height/2)continue;let dx=Math.abs(box.left+box.width/2-centre);(best===null||row2<best.row-1||Math.abs(row2-best.row)<=1&&dx<best.dx)&&(best={index:i,row:row2,dx:dx})}return best===null?index:best.index}function groups(times,labels){return labels?["morning","afternoon","evening"].map(period=>({key:period,label:labels[period],slots:times.filter(s=>televetDayPeriod(s.startsAt)===period)})).filter(group=>group.slots.length>0):[{key:"all",label:null,slots:times}]}function firstOffered(days,keys){for(let key of keys)if(key!==null&&days.some(day=>day.key===key))return key;return null}function makeStyles6(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),rem=n=>`${String(n)}px`,settle=theme.motion.reducedMotion?"none":"border-color 180ms ease, background-color 180ms ease";return{root:{display:"flex",flexDirection:"column",flex:"1 1 auto",minHeight:0,gap:rem(space.md)},gridScroll:{flex:"1 1 auto",minHeight:0,overflowY:"auto",overscrollBehavior:"contain",display:"flex",flexDirection:"column",gap:rem(space.lg),paddingBottom:rem(space.md)},group:{display:"flex",flexDirection:"column",gap:rem(space.sm)},period:{margin:0,...faceCss(theme,"bold"),color:look.ink,fontSize:rem(size.bodyTight),lineHeight:String(lineHeight.snug)},zone:{margin:0,...faceCss(theme,"mono"),color:look.muted,fontSize:rem(size.caption),lineHeight:String(lineHeight.normal),letterSpacing:"0.04em"},grid:{listStyle:"none",margin:0,padding:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(104px, 1fr))",gap:rem(space.sm)},gridItem:{display:"flex",minWidth:0},chip:{width:"100%",minHeight:44,borderRadius:rem(radius.pill),borderStyle:"solid",borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",paddingLeft:rem(space.lg),paddingRight:rem(space.lg),cursor:"pointer",boxSizing:"border-box",transition:settle,...slotRadius(slots.chip)},chipPicked:{borderColor:look.ink,backgroundColor:look.pink},chipRest:slotLonghandCss(slots.chip,1.5),chipLabelRest:slots.chip?.textColor===void 0?{}:{color:slots.chip.textColor},chipLabelPicked:{color:look.onPink},chipBusy:{backgroundColor:color.primary,borderColor:color.primary},chipDisabled:{opacity:.45,cursor:"not-allowed"},chipLabel:{...faceCss(theme,"monoBold"),color:look.ink,fontSize:rem(size.bodyTight),fontVariantNumeric:"tabular-nums",lineHeight:String(lineHeight.tight)},chipLabelBusy:{color:color.onPrimary}}}function TelevetSummaryRow({label:label,value:value,last:last=false,action:action,testID:testID}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
|
|
221
|
+
return jsx("li",{style:styles.gridItem,children:/* @__PURE__ */jsx("button",{ref:node=>{node?chipRefs.current.set(slot.slotId,node):chipRefs.current.delete(slot.slotId)},type:"button",tabIndex:slot.slotId===stopId?0:-1,onClick:blocked?void 0:()=>onPick(slot),onFocus:()=>setFocusId(slot.slotId),"aria-disabled":blocked||void 0,"aria-busy":busy||void 0,"aria-pressed":picked||void 0,"aria-label":formatWhenWithDay(slot.startsAt),"data-testid":`${rowTestIdPrefix}-${slot.slotId}`,style:{...styles.chip,...picked?styles.chipPicked:styles.chipRest,...busy?styles.chipBusy:null,...blocked&&!busy?styles.chipDisabled:null},children:/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:{...styles.chipLabel,...picked?styles.chipLabelPicked:styles.chipLabelRest,...busy?styles.chipLabelBusy:null},children:formatClock(slot.startsAt)})})},slot.slotId)})})]},group.key))})]})}function slotIndexForKey(key,index,chips){let last=chips.length-1;if(key==="ArrowRight")return Math.min(last,index+1);if(key==="ArrowLeft")return Math.max(0,index-1);if(key==="Home")return 0;if(key==="End")return last;if(key!=="ArrowDown"&&key!=="ArrowUp")return null;let from=chips[index]?.getBoundingClientRect();if(from===void 0)return null;let centre=from.left+from.width/2,down=key==="ArrowDown",best=null;for(let i=0;i<chips.length;i+=1){let chip=chips[i];if(chip==null||i===index)continue;let box=chip.getBoundingClientRect(),row2=down?box.top-from.top:from.top-box.top;if(row2<from.height/2)continue;let dx=Math.abs(box.left+box.width/2-centre);(best===null||row2<best.row-1||Math.abs(row2-best.row)<=1&&dx<best.dx)&&(best={index:i,row:row2,dx:dx})}return best===null?index:best.index}function groups(times,labels){return labels?["morning","afternoon","evening"].map(period=>({key:period,label:labels[period],slots:times.filter(s=>televetDayPeriod(s.startsAt)===period)})).filter(group=>group.slots.length>0):[{key:"all",label:null,slots:times}]}function firstOffered(days,keys){for(let key of keys)if(key!==null&&days.some(day=>day.key===key))return key;return null}function makeStyles6(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),rem=n=>`${String(n)}px`,settle=theme.motion.reducedMotion?"none":"border-color 180ms ease, background-color 180ms ease";return{root:{display:"flex",flexDirection:"column",flex:"1 1 auto",minHeight:0,gap:rem(space.md)},gridScroll:{flex:"1 1 auto",minHeight:0,overflowY:"auto",overscrollBehavior:"contain",display:"flex",flexDirection:"column",gap:rem(space.lg),paddingBottom:rem(space.md)},group:{display:"flex",flexDirection:"column",gap:rem(space.sm)},period:{margin:0,...faceCss(theme,"bold"),color:look.ink,fontSize:rem(size.bodyTight),lineHeight:String(lineHeight.snug)},zone:{margin:0,...faceCss(theme,"mono"),color:look.muted,fontSize:rem(size.caption),lineHeight:String(lineHeight.normal),letterSpacing:"0.04em"},grid:{listStyle:"none",margin:0,padding:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(104px, 1fr))",gap:rem(space.sm)},gridItem:{display:"flex",minWidth:0},chip:{width:"100%",minHeight:44,borderRadius:rem(radius.pill),borderStyle:"solid",borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",paddingLeft:rem(space.lg),paddingRight:rem(space.lg),cursor:"pointer",boxSizing:"border-box",transition:settle,...slotRadius(slots.chip)},chipPicked:{borderColor:look.ink,backgroundColor:look.pink},chipRest:slotLonghandCss(slots.chip,1.5),chipLabelRest:slots.chip?.textColor===void 0?{}:{color:slots.chip.textColor},chipLabelPicked:{color:look.onPink},chipBusy:{backgroundColor:color.primary,borderColor:color.primary},chipDisabled:{opacity:.45,cursor:"not-allowed"},chipLabel:{...faceCss(theme,"monoBold"),color:look.ink,fontSize:rem(size.bodyTight),fontVariantNumeric:"tabular-nums",lineHeight:String(lineHeight.tight)},chipLabelBusy:{color:color.onPrimary}}}function TelevetSummaryRow({label:label,value:value,last:last=false,action:action,note:note,testID:testID}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
|
|
222
222
|
return jsxs("div",{style:{...styles.row,...last?styles.rowLast:null},"data-testid":testID,children:[
|
|
223
223
|
/* @__PURE__ */jsx("dt",{style:styles.rowLabel,children:label}),
|
|
224
224
|
/* @__PURE__ */jsxs("dd",{style:{...styles.rowValue,...styles.rowValueLine},children:[
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */jsxs("span",{style:styles.rowValueText,children:[value,note?/* @__PURE__ */jsx("span",{style:styles.rowNote,"data-testid":testID?`${testID}-note`:void 0,children:note}):null]}),action?/* @__PURE__ */jsx("span",{style:styles.rowAction,children:action}):null]})]})}function TelevetConsentCheckbox({label:label,checked:checked,onToggle:onToggle,testID:testID}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles7(theme),[theme]);
|
|
226
226
|
/* @__PURE__ */
|
|
227
227
|
return jsxs("label",{style:styles.consent,children:[
|
|
228
228
|
/* @__PURE__ */jsx("input",{type:"checkbox",checked:checked,onChange:event=>onToggle(event.currentTarget.checked),"data-testid":testID,style:VISUALLY_HIDDEN}),
|
|
229
229
|
/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:{...styles.box,...checked?styles.boxChecked:null},children:checked?/* @__PURE__ */jsx("span",{style:styles.tick,children:TICK}):null}),
|
|
230
230
|
/* @__PURE__ */jsx("span",{style:styles.consentLabel,children:label})]})}var TICK="✓";function TelevetSummaryCard({children:children,testID:testID}){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
|
|
231
|
-
return jsx("dl",{style:styles.card,"data-testid":testID,children:children})}function makeStyles7(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,rem=n=>`${String(n)}px`,cardInk=slots.card?.textColor===void 0?{}:{color:slots.card.textColor};return{card:{margin:0,borderRadius:rem(radius.lg),borderStyle:"solid",borderWidth:1,borderColor:color.borderRingCream,backgroundColor:color.surface,paddingLeft:rem(space.xl),paddingRight:rem(space.xl),paddingTop:rem(space.xs),paddingBottom:rem(space.xs),boxSizing:"border-box",...slotLonghandCss(slots.card,1)},row:{display:"flex",flexDirection:"column",gap:2,paddingTop:rem(space.md),paddingBottom:rem(space.md),borderBottomStyle:"solid",borderBottomWidth:1,borderBottomColor:color.borderRingCream},rowLast:{borderBottomWidth:0},rowValueLine:{display:"flex",flexDirection:"row",alignItems:"center",gap:rem(14)},rowValueText:{flex:"1 1 auto",minWidth:0},rowAction:{flexShrink:0,marginLeft:"auto",whiteSpace:"normal"},rowLabel:{margin:0,...faceCss(theme,"regular"),color:color.text.muted,fontSize:rem(14),lineHeight:String(lineHeight.normal),...cardInk},rowValue:{margin:0,marginInlineStart:0,minWidth:0,overflowWrap:"anywhere",whiteSpace:"pre-line",...faceCss(theme,"bold"),color:color.brandInk,fontSize:rem(size.body),lineHeight:String(lineHeight.snug),...cardInk},consent:{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:rem(space.md),minHeight:MIN_TOUCH_TARGET,padding:`${rem(14)} ${rem(space.lg)}`,borderRadius:rem(radius.sm),backgroundColor:color.surfaceSubtle,cursor:"pointer",boxSizing:"border-box"},box:{width:24,height:24,marginTop:1,flexShrink:0,borderRadius:rem(radius.xs),borderStyle:"solid",borderWidth:1.5,borderColor:color.brandInk,backgroundColor:color.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",transition:theme.motion.reducedMotion?"none":"background-color 180ms ease"},boxChecked:{backgroundColor:color.primary,borderColor:color.primary},tick:{...faceCss(theme,"bold"),color:color.onPrimary,fontSize:rem(size.caption),lineHeight:"1"},consentLabel:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere",...faceCss(theme,"regular"),color:color.text.primary,fontSize:rem(size.bodyTight),lineHeight:String(lineHeight.relaxed)}}}function ReviewStep({headingRef:headingRef,when:when,onChangeWhen:onChangeWhen,stateName:stateName,about:about,lengthMinutes:lengthMinutes,clinician:clinician,petName:petName,reason:reason,shareRecords:shareRecords,onToggleShare:onToggleShare,stateCode:stateCode,stateAttested:stateAttested,onToggleStateAttest:onToggleStateAttest,cancellationTerms:cancellationTerms,termsAttested:termsAttested,onToggleTermsAttest:onToggleTermsAttest,canConfirm:ready,busy:busy,failure:failure2,onConfirm:onConfirm,emergency:emergency,onAcknowledgeEmergency:onAcknowledgeEmergency,onSeeOtherVets:onSeeOtherVets,mediaShortfall:mediaShortfall=NO_MEDIA_SHORTFALL,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet}){let styles=useBookingStyles(),theme=useEverfurTheme(),local=useMemo(()=>makeLocalStyles(theme),[theme]),[unticked,setUnticked]=useState(false),emergencyLede=TELEVET_BOOKING_COPY_WEB.emergency.lede,place=stateName??stateCode??"",attestLabel=petName?fill(TELEVET_BOOKING_COPY_WEB.whereAttestTemplate,{pet:petName,state:place}):fill(TELEVET_BOOKING_COPY_WEB.stateAttestTemplate,{state:place}),aboutLine=about??reason,twoBoxes=!!stateCode&&!!cancellationTerms,ticked=(!stateCode||stateAttested)&&(!cancellationTerms||termsAttested);/* @__PURE__ */
|
|
231
|
+
return jsx("dl",{style:styles.card,"data-testid":testID,children:children})}function makeStyles7(theme){let{color:color,space:space,radius:radius,type:type,slots:slots}=theme,{size:size,lineHeight:lineHeight}=type,rem=n=>`${String(n)}px`,cardInk=slots.card?.textColor===void 0?{}:{color:slots.card.textColor};return{card:{margin:0,borderRadius:rem(radius.lg),borderStyle:"solid",borderWidth:1,borderColor:color.borderRingCream,backgroundColor:color.surface,paddingLeft:rem(space.xl),paddingRight:rem(space.xl),paddingTop:rem(space.xs),paddingBottom:rem(space.xs),boxSizing:"border-box",...slotLonghandCss(slots.card,1)},row:{display:"flex",flexDirection:"column",gap:2,paddingTop:rem(space.md),paddingBottom:rem(space.md),borderBottomStyle:"solid",borderBottomWidth:1,borderBottomColor:color.borderRingCream},rowLast:{borderBottomWidth:0},rowValueLine:{display:"flex",flexDirection:"row",alignItems:"center",gap:rem(14)},rowValueText:{flex:"1 1 auto",minWidth:0},rowAction:{flexShrink:0,marginLeft:"auto",whiteSpace:"normal"},rowLabel:{margin:0,...faceCss(theme,"regular"),color:color.text.muted,fontSize:rem(14),lineHeight:String(lineHeight.normal),...cardInk},rowValue:{margin:0,marginInlineStart:0,minWidth:0,overflowWrap:"anywhere",whiteSpace:"pre-line",...faceCss(theme,"bold"),color:color.brandInk,fontSize:rem(size.body),lineHeight:String(lineHeight.snug),...cardInk},rowNote:{display:"block",...faceCss(theme,"regular"),color:color.text.muted,fontSize:rem(size.caption),lineHeight:String(lineHeight.normal),...cardInk},consent:{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:rem(space.md),minHeight:MIN_TOUCH_TARGET,padding:`${rem(14)} ${rem(space.lg)}`,borderRadius:rem(radius.sm),backgroundColor:color.surfaceSubtle,cursor:"pointer",boxSizing:"border-box"},box:{width:24,height:24,marginTop:1,flexShrink:0,borderRadius:rem(radius.xs),borderStyle:"solid",borderWidth:1.5,borderColor:color.brandInk,backgroundColor:color.surface,display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",transition:theme.motion.reducedMotion?"none":"background-color 180ms ease"},boxChecked:{backgroundColor:color.primary,borderColor:color.primary},tick:{...faceCss(theme,"bold"),color:color.onPrimary,fontSize:rem(size.caption),lineHeight:"1"},consentLabel:{flex:"1 1 auto",minWidth:0,overflowWrap:"anywhere",...faceCss(theme,"regular"),color:color.text.primary,fontSize:rem(size.bodyTight),lineHeight:String(lineHeight.relaxed)}}}function ReviewStep({headingRef:headingRef,when:when,onChangeWhen:onChangeWhen,stateName:stateName,about:about,lengthMinutes:lengthMinutes,clinician:clinician,clinicianRole:clinicianRole,petName:petName,reason:reason,shareRecords:shareRecords,onToggleShare:onToggleShare,stateCode:stateCode,stateAttested:stateAttested,onToggleStateAttest:onToggleStateAttest,cancellationTerms:cancellationTerms,termsAttested:termsAttested,onToggleTermsAttest:onToggleTermsAttest,canConfirm:ready,busy:busy,failure:failure2,onConfirm:onConfirm,emergency:emergency,onAcknowledgeEmergency:onAcknowledgeEmergency,onSeeOtherVets:onSeeOtherVets,mediaShortfall:mediaShortfall=NO_MEDIA_SHORTFALL,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet}){let styles=useBookingStyles(),theme=useEverfurTheme(),local=useMemo(()=>makeLocalStyles(theme),[theme]),[unticked,setUnticked]=useState(false),emergencyLede=TELEVET_BOOKING_COPY_WEB.emergency.lede,place=stateName??stateCode??"",attestLabel=petName?fill(TELEVET_BOOKING_COPY_WEB.whereAttestTemplate,{pet:petName,state:place}):fill(TELEVET_BOOKING_COPY_WEB.stateAttestTemplate,{state:place}),aboutLine=about??reason,twoBoxes=!!stateCode&&!!cancellationTerms,ticked=(!stateCode||stateAttested)&&(!cancellationTerms||termsAttested);/* @__PURE__ */
|
|
232
232
|
return jsxs(TelevetStepFrame,{headingRef:headingRef,heading:TELEVET_BOOKING_COPY_WEB.reviewHeading,testID:"televet-booking-review",scrollTestID:"televet-booking-review-scroll",footer:emergency?null:/* @__PURE__ */jsx(TelevetButton,{label:busy?TELEVET_BOOKING_COPY_WEB.confirmBusy:TELEVET_BOOKING_COPY_WEB.confirmCta,kind:"primary",size:"lg",loading:busy,busyAnnouncement:TELEVET_BOOKING_COPY_WEB.confirmBusy,disabled:!ready||busy||!twoBoxes&&!ticked,onPress:()=>{if(!ticked){setUnticked(true);return}onConfirm()},testID:"televet-review-confirm"}),children:[
|
|
233
|
-
/* @__PURE__ */jsxs(TelevetSummaryCard,{testID:"televet-review-summary",children:[petName?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryPet,value:petName,testID:"televet-review-row-pet"}):null,clinician?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryVet,value:clinician,testID:"televet-review-row-vet"}):null,
|
|
233
|
+
/* @__PURE__ */jsxs(TelevetSummaryCard,{testID:"televet-review-summary",children:[petName?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryPet,value:petName,testID:"televet-review-row-pet"}):null,clinician?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryVet,value:clinicianRole==="vet_tech"?`${clinician} · ${TELEVET_BOOKING_COPY_WEB.vetTechRoleLabel}`:clinician,note:clinicianRole==="vet_tech"?TELEVET_BOOKING_COPY_WEB.vetTechNoRxLine:null,testID:"televet-review-row-vet"}):null,
|
|
234
234
|
/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryWhen,value:when,testID:"televet-review-row-when",action:onChangeWhen?/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.changeCta,kind:"quiet",fullWidth:false,onPress:onChangeWhen,testID:"televet-review-change-when"}):null}),
|
|
235
235
|
/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryLength,value:fill(TELEVET_BOOKING_COPY_WEB.summaryLengthTemplate,{n:String(lengthMinutes)}),testID:"televet-review-row-length"}),place?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryWhere,value:place,testID:"televet-review-row-where"}):null,aboutLine?/* @__PURE__ */jsx(TelevetSummaryRow,{label:TELEVET_BOOKING_COPY_WEB.summaryReason,value:aboutLine,last:true,testID:"televet-review-row-reason"}):null]}),
|
|
236
236
|
/* @__PURE__ */jsxs("div",{style:styles.list,children:[stateCode?/* @__PURE__ */jsx(TelevetConsentCheckbox,{label:attestLabel,checked:stateAttested,onToggle:next=>{setUnticked(false),onToggleStateAttest(next)},testID:"televet-review-state-attest"}):null,cancellationTerms?/* @__PURE__ */jsx(TelevetConsentCheckbox,{label:cancellationTerms,checked:termsAttested,onToggle:next=>{setUnticked(false),onToggleTermsAttest(next)},testID:"televet-review-terms-attest"}):null,
|
|
@@ -254,10 +254,10 @@ return jsxs("button",{type:"button",role:"radio","aria-checked":selected,onClick
|
|
|
254
254
|
/* @__PURE__ */jsx("span",{style:{...local.optionTitle,...selected?null:local.optionRestInk},children:title}),meta?/* @__PURE__ */jsx("span",{style:{...local.optionMeta,...selected?null:local.optionRestInk},children:meta}):null]})]})}function radiosOf(group){return Array.from(group.querySelectorAll('[role="radio"]')).filter(radio=>radio.closest('[role="radiogroup"]')===group)}function TelevetRadioGroup({label:label,style:style,testID:testID,children:children}){let ref=useRef(null);return useEffect(()=>{let group=ref.current;if(group===null)return;let radios=radiosOf(group),checked=radios.findIndex(radio=>radio.getAttribute("aria-checked")==="true"),stop=checked<0?0:checked;radios.forEach((radio,index)=>{radio.tabIndex=index===stop?0:-1})}),/* @__PURE__ */jsx("div",{ref:ref,role:"radiogroup","aria-label":label,onKeyDown:event=>{let group=ref.current;if(group===null)return;let radios=radiosOf(group),index=radios.indexOf(event.target);if(index<0||radios.length===0)return;let last=radios.length-1,next=event.key==="ArrowDown"||event.key==="ArrowRight"?(index+1)%radios.length:event.key==="ArrowUp"||event.key==="ArrowLeft"?(index+last)%radios.length:event.key==="Home"?0:event.key==="End"?last:null;if(next===null||next===index)return;event.preventDefault();let target=radios[next];target?.focus(),target?.click()},style:style,...testID?{"data-testid":testID}:{},children:children})}function PetStep({headingRef:headingRef,pets:pets,isPending:isPending,isError:isError,error:error,onRetry:onRetry,selectedId:selectedId,onSelect:onSelect,onNext:onNext,onAddPet:onAddPet}){let styles=useBookingStyles(),theme=useEverfurTheme(),local=useMemo(()=>makeLocalStyles(theme),[theme]);return isPending?/* @__PURE__ */jsx("div",{role:"progressbar","aria-label":TELEVET_BOOKING_COPY_WEB.loading.pets,"aria-busy":"true",style:styles.list,"data-testid":"televet-pets-loading",children:[0,1].map(i=>/* @__PURE__ */jsx(TelevetSkeletonBlock,{height:96},i))}):isError?/* @__PURE__ */jsx("div",{"data-testid":"televet-pets-error",children:/* @__PURE__ */jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY_WEB.chrome.loadFailedTitle,actionLabel:TELEVET_BOOKING_COPY_WEB.chrome.retryCta,onRetry:onRetry})}):pets.length===0?/* @__PURE__ */jsx("div",{"data-testid":"televet-pets-empty",children:/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY_WEB.chrome.noPetsTitle,actionLabel:TELEVET_BOOKING_COPY_WEB.addPetCta,onAction:onAddPet})}):/* @__PURE__ */jsx(TelevetStepFrame,{headingRef:headingRef,heading:TELEVET_BOOKING_COPY_WEB.petSelectTitle,testID:"televet-booking-pets",footerStart:onAddPet?/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.addAnotherPetCta,kind:"quiet",fullWidth:false,onPress:onAddPet,testID:"televet-pet-add"}):null,footer:onNext?/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.continueCta,kind:"primary",size:"lg",disabled:!selectedId,onPress:onNext,testID:"televet-pets-next"}):null,children:/* @__PURE__ */jsx(TelevetRadioGroup,{label:TELEVET_BOOKING_COPY_WEB.petSelectTitle,style:local.options,testID:"televet-pets",children:pets.map(pet=>/* @__PURE__ */jsx(TelevetOptionCard,{title:pet.name??"",meta:formatTelevetPetMetaLine(pet),selected:selectedId===pet.petRef,onPress:()=>onSelect(pet.petRef),testID:`televet-pet-${pet.petRef}`,leading:/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:local.optionAvatar,children:initialOf(pet.name??"")})},pet.petRef))})})}var PERSON_GLYPH="○";function initialOf(name){let trimmed=name.trim();return trimmed.length===0?PERSON_GLYPH:trimmed.slice(0,1).toUpperCase()}function ClinicianStep({headingRef:headingRef,clinicians:clinicians,isPending:isPending,isError:isError,error:error,selectedId:selectedId,stateCode:stateCode,stateName:stateName,onSelect:onSelect,onRetry:onRetry}){let styles=useBookingStyles(),theme=useEverfurTheme(),local=useMemo(()=>makeLocalStyles(theme),[theme]);if(isPending)/* @__PURE__ */
|
|
255
255
|
return jsx("div",{role:"progressbar","aria-label":TELEVET_BOOKING_COPY_WEB.loading.clinicians,"aria-busy":"true",style:styles.list,"data-testid":"televet-clinicians-loading",children:/* @__PURE__ */jsx(TelevetSkeletonBlock,{height:240})});if(isError)/* @__PURE__ */
|
|
256
256
|
return jsx("div",{"data-testid":"televet-clinicians-error",children:/* @__PURE__ */jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY_WEB.chrome.loadFailedTitle,actionLabel:TELEVET_BOOKING_COPY_WEB.chrome.retryCta,onRetry:onRetry})});if(clinicians.length===0)/* @__PURE__ */
|
|
257
|
-
return jsx("div",{"data-testid":"televet-clinicians-empty",children:/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY_WEB.noCliniciansTitle,message:TELEVET_BOOKING_COPY_WEB.noCliniciansBody,actionLabel:TELEVET_BOOKING_COPY_WEB.noCliniciansRetryCta,onAction:onRetry})});let vet=clinicians.find(c=>c.clinicianId===selectedId)??clinicians[0];if(vet===void 0)return null;let code=stateCode?.trim().toUpperCase()??"",licensedHere=code.length>0&&vet.licensedStates.some(l=>l.state.trim().toUpperCase()===code);/* @__PURE__ */
|
|
257
|
+
return jsx("div",{"data-testid":"televet-clinicians-empty",children:/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY_WEB.noCliniciansTitle,message:TELEVET_BOOKING_COPY_WEB.noCliniciansBody,actionLabel:TELEVET_BOOKING_COPY_WEB.noCliniciansRetryCta,onAction:onRetry})});let vet=clinicians.find(c=>c.clinicianId===selectedId)??clinicians[0];if(vet===void 0)return null;let code=stateCode?.trim().toUpperCase()??"",licensedHere=code.length>0&&vet.licensedStates.some(l=>l.state.trim().toUpperCase()===code),isTech=vet.role==="vet_tech";/* @__PURE__ */
|
|
258
258
|
return jsx(TelevetStepFrame,{headingRef:headingRef,heading:TELEVET_BOOKING_COPY_WEB.yourVetTitle,testID:"televet-clinicians",footer:/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.continueCta,kind:"primary",size:"lg",onPress:()=>onSelect(vet.clinicianId),testID:`televet-clinician-${vet.clinicianId}`}),children:/* @__PURE__ */jsxs("div",{style:local.meet,children:[
|
|
259
259
|
/* @__PURE__ */jsx("span",{"aria-hidden":"true",style:local.vetAvatar,children:clinicianInitial(vet.displayName)||PERSON_GLYPH}),
|
|
260
|
-
/* @__PURE__ */jsx("p",{style:local.vetName,children:vet.credentials?`${vet.displayName}, ${vet.credentials}`:vet.displayName}),licensedHere&&stateName?/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */jsx("p",{style:local.vetName,children:vet.credentials?`${vet.displayName}, ${vet.credentials}`:vet.displayName}),isTech||licensedHere&&stateName?/* @__PURE__ */jsxs("div",{style:local.pills,children:[isTech?/* @__PURE__ */jsx("span",{style:local.pill,"data-testid":"televet-vet-role",children:TELEVET_BOOKING_COPY_WEB.vetTechRoleLabel}):null,licensedHere&&stateName?/* @__PURE__ */jsx("span",{style:local.pill,"data-testid":"televet-vet-licensed",children:fill(TELEVET_BOOKING_COPY_WEB.licensedPillTemplate,{state:stateName})}):null]}):null,isTech?/* @__PURE__ */jsx("p",{style:local.vetRating,"data-testid":"televet-vet-no-rx",children:TELEVET_BOOKING_COPY_WEB.vetTechNoRxLine}):null,vet.rating!==null&&vet.ratingCount!==null?/* @__PURE__ */jsx("p",{style:local.vetRating,"data-testid":"televet-vet-rating",children:`★ ${String(vet.rating)} · ${String(vet.ratingCount)} ${TELEVET_BOOKING_COPY_WEB.reviewsLabel}`}):null,vet.bio?/* @__PURE__ */jsx("p",{style:local.vetBio,"data-testid":"televet-vet-bio",children:vet.bio}):null]})})}function SlotStep({headingRef:headingRef,slots:slots,enabled:enabled,isPending:isPending,isError:isError,error:error,busySlotId:busySlotId,failure:failure2,selectedSlot:selectedSlot,nextOpening:nextOpening,onPick:onPick,onRetry:onRetry,onSeeOtherVets:onSeeOtherVets}){let styles=useBookingStyles();return enabled?isPending?/* @__PURE__ */jsx("div",{role:"progressbar","aria-label":TELEVET_BOOKING_COPY_WEB.loading.slots,"aria-busy":"true",style:styles.list,"data-testid":"televet-slots-loading",children:[0,1,2].map(i=>/* @__PURE__ */jsx(TelevetSkeletonBlock,{height:48},i))}):isError?/* @__PURE__ */jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY_WEB.slotsErrorTitle,actionLabel:TELEVET_BOOKING_COPY_WEB.retryCta,onRetry:onRetry,testID:"televet-slots-error"}):slots.length===0?/* @__PURE__ */jsx("div",{"data-testid":"televet-slots-empty",children:/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY_WEB.noSlotsTitle,message:nextOpening?fill(TELEVET_BOOKING_COPY_WEB.nextOpeningTemplate,{when:formatWhenWithDay(nextOpening.startsAt)}):void 0,actionLabel:nextOpening?TELEVET_BOOKING_COPY_WEB.seeOtherVetsCta:void 0,onAction:nextOpening?onSeeOtherVets:void 0})}):
|
|
261
261
|
/* @__PURE__ */jsxs(TelevetStepFrame,{headingRef:headingRef,heading:TELEVET_BOOKING_COPY_WEB.timeHeading,testID:"televet-slots",children:[failure2==="expired"?/* @__PURE__ */jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY_WEB.holdExpired}):null,failure2==="taken"?/* @__PURE__ */jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY_WEB.slotTaken}):null,failure2==="failed"||failure2==="rate_limited"?/* @__PURE__ */jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY_WEB.confirmFailed,testID:"televet-slots-hold-failed"}):null,
|
|
262
262
|
/* @__PURE__ */jsx(TelevetSlotPicker,{slots:slots,busySlotId:busySlotId,onPick:onPick,selectedSlot:selectedSlot,dayGroupLabel:TELEVET_BOOKING_COPY_WEB.dayLegend,timeGroupLabel:TELEVET_BOOKING_COPY_WEB.timeHeading,periodLabels:{morning:TELEVET_BOOKING_COPY_WEB.timeMorning,afternoon:TELEVET_BOOKING_COPY_WEB.timeAfternoon,evening:TELEVET_BOOKING_COPY_WEB.timeEvening},timeLegendTemplate:TELEVET_BOOKING_COPY_WEB.timeLegendTemplate})]}):/* @__PURE__ */jsx("div",{"data-testid":"televet-slots-unavailable",children:/* @__PURE__ */jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY_WEB.bookingPausedTitle})})}function IssuesStep({headingRef:headingRef,petName:petName,chips:chips,selected:selected,onToggle:onToggle,onNext:onNext}){let theme=useEverfurTheme(),local=useMemo(()=>makeLocalStyles(theme),[theme]),[refused,setRefused]=useState(false),heading=fill(TELEVET_BOOKING_COPY_WEB.issuesTitleTemplate,{pet:petName??TELEVET_BOOKING_COPY_WEB.petFallback});/* @__PURE__ */
|
|
263
263
|
return jsxs(TelevetStepFrame,{headingRef:headingRef,heading:heading,lead:TELEVET_BOOKING_COPY_WEB.issuesHint,testID:"televet-booking-issues",footer:/* @__PURE__ */jsx(TelevetButton,{label:TELEVET_BOOKING_COPY_WEB.continueCta,kind:"primary",size:"lg",onPress:()=>{if(selected.length===0){setRefused(true);return}onNext()},testID:"televet-issues-next"}),children:[
|
|
@@ -292,7 +292,7 @@ return jsxs(TelevetStepFrame,{headingRef:headingRef,heading:fill(TELEVET_BOOKING
|
|
|
292
292
|
return jsx("div",{style:{...styles.screen,...style},"data-testid":testID??"televet-booking",children:/* @__PURE__ */jsx("div",{style:styles.stepFill,"data-testid":"televet-booking-copy-unapproved",children:renderUnavailable?renderUnavailable():null})});let canGoBack=!simulate&&(triage.open||hasPreviousStep(state,ctx))&&step!=="booked",goBack=()=>{if(triage.open){triage.close();return}triage.cancel(),dispatch({type:"back"})};
|
|
293
293
|
/* @__PURE__ */
|
|
294
294
|
return jsx(NestedHeadingLevelContext.Provider,{value:nestedLevel,children:/* @__PURE__ */jsx(TelevetStepNavContext.Provider,{value:{canGoBack:canGoBack,onBack:goBack},children:/* @__PURE__ */jsxs("div",{style:{...styles.screen,...style},"data-testid":testID??"televet-booking",children:[
|
|
295
|
-
/* @__PURE__ */jsx(TelevetBookingChrome,{step:step,furthestIndex:state.furthestIndex,triageOpen:triage.open,stepContext:ctx,canGoBack:canGoBack,showBack:gated||step==="clinician"&&clinicianOutcome,isDirty:isDirty,onBack:goBack,onClose:()=>onExit?.(),headingLevel:rootLevel,...onConfirmDiscard?{onConfirmDiscard:onConfirmDiscard}:{}}),simulate?/* @__PURE__ */jsx(TelevetVisitSimulator,{headingRef:headingRef,petId:draft.petId,roster:roster,onAddPet:onAddPet,onPickPet:petId=>dispatch({type:"patch",patch:{petId:petId}})}):gated?/* @__PURE__ */jsx(TelevetBookingGate,{state:gateState,petName:nameOf(pets,draft.petId),...primaryVet?{primaryVet:primaryVet}:{},onFindEmergencyVet:onFindEmergencyVet,stateInterest:noLicensedVetInterest,...onStateInterest?{onCheckAvailability:()=>dispatch({type:"goTo",step:"clinician"})}:{},onAcknowledgeEmergency:()=>{triage.acknowledge(composedReason),dispatch({type:"next"})},...renderUnavailable?{renderUnavailable:renderUnavailable}:{}}):step==="time"?/* @__PURE__ */jsx(SlotStep,{headingRef:headingRef,slots:slots.data??[],enabled:slots.enabled,isPending:slots.enabled&&slots.isPending&&slots.data===null,isError:slots.isError,error:slots.error,busySlotId:hold.isPending?hold.variables:null,failure:failure2,selectedSlot:draft.slot??refusedSlot,nextOpening:nextOpening,onPick:holdAndAdvance,onRetry:()=>slots.refetch(),onSeeOtherVets:()=>dispatch({type:"goTo",step:"clinician"})}):step==="review"?/* @__PURE__ */jsx(ReviewStep,{headingRef:headingRef,when:draft.slot?formatVisitDayTime(draft.slot.startsAt):"",onChangeWhen:()=>dispatch({type:"goTo",step:"time"}),stateName:where.stateName,about:intake.aboutLine,lengthMinutes:(draft.slot?televetSlotMinutes(draft.slot):null)??CONSULT_MINUTES,petName:nameOf(pets,draft.petId),reason:composedReason.trim(),clinician:clinicians.data?.find(c=>c.clinicianId===draft.clinicianId)?.displayName??null,shareRecords:draft.shareHealthRecords,stateCode:draft.state,stateAttested:stateAttested,onToggleStateAttest:setStateAttested,cancellationTerms:cancellation.data?.summary??null,termsAttested:termsAttested,onToggleTermsAttest:setTermsAttested,onToggleShare:next=>dispatch({type:"patch",patch:{shareHealthRecords:next}}),canConfirm:canConfirm(draft,composedReason),busy:book.isPending||sendMedia.sending,failure:failure2,onConfirm:confirm,emergency:emergency,onAcknowledgeEmergency:()=>submitBooking(true),mediaShortfall:sendMedia.shortfall,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet,onSeeOtherVets:()=>dispatch({type:"goTo",step:"clinician"})}):step==="booked"?/* @__PURE__ */jsx("div",{style:styles.stepFill,"data-testid":"televet-booking-booked",children:bookedConsult?/* @__PURE__ */jsxs(Fragment,{children:[
|
|
295
|
+
/* @__PURE__ */jsx(TelevetBookingChrome,{step:step,furthestIndex:state.furthestIndex,triageOpen:triage.open,stepContext:ctx,canGoBack:canGoBack,showBack:gated||step==="clinician"&&clinicianOutcome,isDirty:isDirty,onBack:goBack,onClose:()=>onExit?.(),headingLevel:rootLevel,...onConfirmDiscard?{onConfirmDiscard:onConfirmDiscard}:{}}),simulate?/* @__PURE__ */jsx(TelevetVisitSimulator,{headingRef:headingRef,petId:draft.petId,roster:roster,onAddPet:onAddPet,onPickPet:petId=>dispatch({type:"patch",patch:{petId:petId}})}):gated?/* @__PURE__ */jsx(TelevetBookingGate,{state:gateState,petName:nameOf(pets,draft.petId),...primaryVet?{primaryVet:primaryVet}:{},onFindEmergencyVet:onFindEmergencyVet,stateInterest:noLicensedVetInterest,...onStateInterest?{onCheckAvailability:()=>dispatch({type:"goTo",step:"clinician"})}:{},onAcknowledgeEmergency:()=>{triage.acknowledge(composedReason),dispatch({type:"next"})},...renderUnavailable?{renderUnavailable:renderUnavailable}:{}}):step==="time"?/* @__PURE__ */jsx(SlotStep,{headingRef:headingRef,slots:slots.data??[],enabled:slots.enabled,isPending:slots.enabled&&slots.isPending&&slots.data===null,isError:slots.isError,error:slots.error,busySlotId:hold.isPending?hold.variables:null,failure:failure2,selectedSlot:draft.slot??refusedSlot,nextOpening:nextOpening,onPick:holdAndAdvance,onRetry:()=>slots.refetch(),onSeeOtherVets:()=>dispatch({type:"goTo",step:"clinician"})}):step==="review"?/* @__PURE__ */jsx(ReviewStep,{headingRef:headingRef,when:draft.slot?formatVisitDayTime(draft.slot.startsAt):"",onChangeWhen:()=>dispatch({type:"goTo",step:"time"}),stateName:where.stateName,about:intake.aboutLine,lengthMinutes:(draft.slot?televetSlotMinutes(draft.slot):null)??CONSULT_MINUTES,petName:nameOf(pets,draft.petId),reason:composedReason.trim(),clinician:clinicians.data?.find(c=>c.clinicianId===draft.clinicianId)?.displayName??null,clinicianRole:clinicians.data?.find(c=>c.clinicianId===draft.clinicianId)?.role??null,shareRecords:draft.shareHealthRecords,stateCode:draft.state,stateAttested:stateAttested,onToggleStateAttest:setStateAttested,cancellationTerms:cancellation.data?.summary??null,termsAttested:termsAttested,onToggleTermsAttest:setTermsAttested,onToggleShare:next=>dispatch({type:"patch",patch:{shareHealthRecords:next}}),canConfirm:canConfirm(draft,composedReason),busy:book.isPending||sendMedia.sending,failure:failure2,onConfirm:confirm,emergency:emergency,onAcknowledgeEmergency:()=>submitBooking(true),mediaShortfall:sendMedia.shortfall,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet,onSeeOtherVets:()=>dispatch({type:"goTo",step:"clinician"})}):step==="booked"?/* @__PURE__ */jsx("div",{style:styles.stepFill,"data-testid":"televet-booking-booked",children:bookedConsult?/* @__PURE__ */jsxs(Fragment,{children:[
|
|
296
296
|
/* @__PURE__ */jsx(TelevetBookedScreen,{consult:bookedConsult,petName:nameOf(pets,bookedConsult.petId)??nameOf(pets,draft.petId),onDone:()=>onExit?.(),canJoinInApp:canJoinInApp,lengthMinutes:(draft.slot?televetSlotMinutes(draft.slot):null)??CONSULT_MINUTES,sharedRecords:draft.shareHealthRecords,sentPhoto:sendMedia.sentOnePhoto(bookedConsult),...onAddToCalendar?{onAddToCalendar:onAddToCalendar}:{}}),
|
|
297
297
|
/* @__PURE__ */jsx(TelevetMediaDropNotice,{shortfall:sendMedia.bookedShortfall(bookedConsult),testIDPrefix:"televet-booked"})]}):null}):step==="clinician"&&clinicianOutcome?
|
|
298
298
|
/* @__PURE__ */jsx(TelevetClinicianOutcome,{state:clinicianState,cause:emptyRosterCause,locationStatus:locationStatus,...onRequestLocation?{onRequestLocation:onRequestLocation}:{},onRetry:()=>clinicians.refetch(),stateInterest:noLicensedVetInterest,...renderUnavailable?{renderUnavailable:renderUnavailable}:{}}):step==="clinician"?/* @__PURE__ */jsx(ClinicianStep,{headingRef:headingRef,clinicians:clinicians.data??[],isPending:clinicians.enabled&&clinicians.isPending,isError:clinicians.isError,error:clinicians.error,selectedId:draft.clinicianId,stateCode:draft.state,stateName:where.stateName,onRetry:()=>clinicians.refetch(),onSelect:clinicianId=>{dispatch({type:"patch",patch:{clinicianId:clinicianId}}),dispatch({type:"next"})}}):step==="issues"?/* @__PURE__ */jsx(IssuesStep,{headingRef:headingRef,petName:nameOf(pets,draft.petId),chips:intake.issueChips,selected:intake.concernIds,onToggle:intake.toggleConcern,onNext:()=>dispatch({type:"next"})}):step==="reason"?/* @__PURE__ */jsx(ReasonStep,{headingRef:headingRef,value:reasonText,composed:composedReason,vetName:matchedClinician?.displayName??null,onChange:setReasonText,media:media,onChangeMedia:setMedia,mediaLive:sendMedia.live,...onPickMedia?{onPickMedia:onPickMedia}:{},checking:triage.checking,onNext:()=>{triage.check(composedReason).then(goOn=>{goOn&&dispatch({type:"next"})})}}):step==="pet"?
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { E as EverfurTelevetFlowRequest, a as EverfurTelevetFlowPresenter } from '../../televetGlobal.d-
|
|
2
|
+
import { E as EverfurTelevetFlowRequest, a as EverfurTelevetFlowPresenter } from '../../televetGlobal.d-BWYJR391.cjs';
|
|
3
3
|
import { ReactNode, CSSProperties } from 'react';
|
|
4
|
-
import { T as TelevetCalendarWriter, a as TelevetMediaPicker, b as TelevetPrimaryVet, c as TelevetCalendarEvent } from '../../IntakeMedia.d-
|
|
5
|
-
export { d as TelevetIntakeMediaItem } from '../../IntakeMedia.d-
|
|
4
|
+
import { T as TelevetCalendarWriter, a as TelevetMediaPicker, b as TelevetPrimaryVet, c as TelevetCalendarEvent } from '../../IntakeMedia.d-CnGzpllr.cjs';
|
|
5
|
+
export { d as TelevetIntakeMediaItem } from '../../IntakeMedia.d-CnGzpllr.cjs';
|
|
6
6
|
import { U as UseVetVisitOptions, a as UseVetVisitState, V as VetVisitEntry, b as VetVisitErrorReason, c as VetVisitController } from '../../useVetVisit.d-BtdwhmgD.cjs';
|
|
7
7
|
export { d as VetVisitAvailability, e as VetVisitHandoff, f as VetVisitHandoffOptions, g as VetVisitHandoffVisit, h as VetVisitOpenResult, i as VetVisitReturn, j as VetVisitStatus, p as parseVetVisitReturn, v as vetVisitErrorReasonOf } from '../../useVetVisit.d-BtdwhmgD.cjs';
|
|
8
8
|
import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.cjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
|
|
2
|
-
import { E as EverfurTelevetFlowRequest, a as EverfurTelevetFlowPresenter } from '../../televetGlobal.d-
|
|
2
|
+
import { E as EverfurTelevetFlowRequest, a as EverfurTelevetFlowPresenter } from '../../televetGlobal.d-B0_jbCtC.js';
|
|
3
3
|
import { ReactNode, CSSProperties } from 'react';
|
|
4
|
-
import { T as TelevetCalendarWriter, a as TelevetMediaPicker, b as TelevetPrimaryVet, c as TelevetCalendarEvent } from '../../IntakeMedia.d-
|
|
5
|
-
export { d as TelevetIntakeMediaItem } from '../../IntakeMedia.d-
|
|
4
|
+
import { T as TelevetCalendarWriter, a as TelevetMediaPicker, b as TelevetPrimaryVet, c as TelevetCalendarEvent } from '../../IntakeMedia.d-B_ZVDxh3.js';
|
|
5
|
+
export { d as TelevetIntakeMediaItem } from '../../IntakeMedia.d-B_ZVDxh3.js';
|
|
6
6
|
import { U as UseVetVisitOptions, a as UseVetVisitState, V as VetVisitEntry, b as VetVisitErrorReason, c as VetVisitController } from '../../useVetVisit.d-DoYQimyt.js';
|
|
7
7
|
export { d as VetVisitAvailability, e as VetVisitHandoff, f as VetVisitHandoffOptions, g as VetVisitHandoffVisit, h as VetVisitOpenResult, i as VetVisitReturn, j as VetVisitStatus, p as parseVetVisitReturn, v as vetVisitErrorReasonOf } from '../../useVetVisit.d-DoYQimyt.js';
|
|
8
8
|
import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.js';
|
|
@@ -3,14 +3,14 @@ import { ReactNode, CSSProperties } from 'react';
|
|
|
3
3
|
import { a as CapabilityDecision } from '../../resolve.d-BTC3b6FW.cjs';
|
|
4
4
|
import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.cjs';
|
|
5
5
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.cjs';
|
|
6
|
-
import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../../optInView.d-
|
|
7
|
-
export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../../optInView.d-
|
|
8
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-
|
|
9
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-
|
|
6
|
+
import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../../optInView.d-CU1U_K-B.cjs';
|
|
7
|
+
export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../../optInView.d-CU1U_K-B.cjs';
|
|
8
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-3ROlHbnP.cjs';
|
|
9
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-Z_fyOZke.cjs';
|
|
10
10
|
export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
|
|
11
11
|
export { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
|
|
12
12
|
export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-DirW9hgO.cjs';
|
|
13
|
-
import '../../requestFunnel.d-
|
|
13
|
+
import '../../requestFunnel.d-CQX_Z1Hi.cjs';
|
|
14
14
|
|
|
15
15
|
interface EverfurTextingOptInProps {
|
|
16
16
|
/** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
|
|
@@ -3,14 +3,14 @@ import { ReactNode, CSSProperties } from 'react';
|
|
|
3
3
|
import { a as CapabilityDecision } from '../../resolve.d-BTC3b6FW.js';
|
|
4
4
|
import { E as EverfurError } from '../../EverfurError.d-8NHtlgzA.js';
|
|
5
5
|
export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.js';
|
|
6
|
-
import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../../optInView.d-
|
|
7
|
-
export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../../optInView.d-
|
|
8
|
-
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-
|
|
9
|
-
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-
|
|
6
|
+
import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../../optInView.d-DIGu47Lz.js';
|
|
7
|
+
export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../../optInView.d-DIGu47Lz.js';
|
|
8
|
+
export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../../identity.d-CRVNfZzQ.js';
|
|
9
|
+
export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../../config.d-KX-EkQ9j.js';
|
|
10
10
|
export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../../ids.d-B2GAAifq.js';
|
|
11
11
|
export { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
|
|
12
12
|
export { E as ErrorPolicyPort } from '../../ErrorPolicyPort.d-68yrE3BE.js';
|
|
13
|
-
import '../../requestFunnel.d-
|
|
13
|
+
import '../../requestFunnel.d-DSvCGf4J.js';
|
|
14
14
|
|
|
15
15
|
interface EverfurTextingOptInProps {
|
|
16
16
|
/** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
|
package/package.json
CHANGED