@everfur/sdk 0.9.3 → 0.10.0

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.
Files changed (135) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +17 -8
  3. package/dist/{Chat-Dy1L27a8.d.ts → Chat-DwGk5APA.d.ts} +3 -3
  4. package/dist/{Chat-Bkv-MLLu.d.cts → Chat-Ml-HlOiV.d.cts} +3 -3
  5. package/dist/{DepthViews-CBalhef3.d.cts → DepthViews-DAJySZqL.d.cts} +1 -1
  6. package/dist/{DepthViews-De6yb5Tq.d.ts → DepthViews-DwCS5KKh.d.ts} +1 -1
  7. package/dist/{DepthViews-eRdy2ayE.d.cts → DepthViews-PgA2KvTE.d.cts} +1 -1
  8. package/dist/{DepthViews-BwyzpEyX.d.ts → DepthViews-kM-_Mn2x.d.ts} +1 -1
  9. package/dist/animations/index.cjs +1 -1
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/animations/index.js +1 -1
  13. package/dist/{attachments-Brt7ivEo.d.ts → attachments-BH0vdghi.d.ts} +2 -2
  14. package/dist/{attachments-tPWJ0DJI.d.cts → attachments-BV1Mbqm-.d.cts} +5 -5
  15. package/dist/{attachments-BAcQdIz7.d.ts → attachments-DWv9stp1.d.ts} +5 -5
  16. package/dist/{attachments-DhGAelCA.d.cts → attachments-DaWeeeBW.d.cts} +2 -2
  17. package/dist/{bookingCopy-CJLAgEgK.d.ts → bookingCopy-Cc3Cl-IJ.d.ts} +2 -2
  18. package/dist/{bookingCopy-Ds2JGcPE.d.cts → bookingCopy-DRwrhDUe.d.cts} +2 -2
  19. package/dist/{casesRepository-D0aQSXkb.d.cts → casesRepository-BhfPDWhY.d.cts} +1 -1
  20. package/dist/{casesRepository-DjhMfm_n.d.ts → casesRepository-DMkRRKr8.d.ts} +1 -1
  21. package/dist/chat/index.cjs +7 -7
  22. package/dist/chat/index.d.cts +9 -9
  23. package/dist/chat/index.d.ts +9 -9
  24. package/dist/chat/index.js +7 -7
  25. package/dist/client/index.cjs +2 -2
  26. package/dist/client/index.d.cts +6 -6
  27. package/dist/client/index.d.ts +6 -6
  28. package/dist/client/index.js +2 -2
  29. package/dist/{config-DeUmccwl.d.ts → config-CuOczZUI.d.ts} +1 -1
  30. package/dist/{config-C68HTCf4.d.cts → config-lilR0260.d.cts} +1 -1
  31. package/dist/consent/index.cjs +1 -1
  32. package/dist/consent/index.d.cts +5 -5
  33. package/dist/consent/index.d.ts +5 -5
  34. package/dist/consent/index.js +1 -1
  35. package/dist/{context-DY9pcjdK.d.cts → context-BA6X6ZHd.d.cts} +13 -5
  36. package/dist/{context-D_2sCvoo.d.ts → context-CL3cR0MA.d.ts} +13 -5
  37. package/dist/{copy-wAnv8ldC.d.ts → copy-A2n7xXsL.d.ts} +2 -2
  38. package/dist/{copy-tYW0C83H.d.cts → copy-DkoUo0VR.d.cts} +2 -2
  39. package/dist/core/index.cjs +6 -7
  40. package/dist/core/index.d.cts +12 -12
  41. package/dist/core/index.d.ts +12 -12
  42. package/dist/core/index.js +6 -7
  43. package/dist/{depth-C7RIscDR.d.ts → depth-6_BYIt0s.d.ts} +2 -2
  44. package/dist/{depth-jbSWsweM.d.cts → depth-DOPtk0vF.d.cts} +2 -2
  45. package/dist/{entitlementRepository-D7Fc7OdG.d.ts → entitlementRepository-BE-L6vX1.d.ts} +2 -2
  46. package/dist/{entitlementRepository-Ccc6K6wB.d.cts → entitlementRepository-Blh38A2b.d.cts} +2 -2
  47. package/dist/{identity-BTT6YtH5.d.ts → identity-4lohfP2L.d.ts} +8 -2
  48. package/dist/{identity-ScajqjK5.d.cts → identity-YXqHjBln.d.cts} +8 -2
  49. package/dist/index.cjs +7 -8
  50. package/dist/index.d.cts +15 -14
  51. package/dist/index.d.ts +15 -14
  52. package/dist/index.js +7 -8
  53. package/dist/notifications/index.cjs +1 -1
  54. package/dist/notifications/index.d.cts +2 -2
  55. package/dist/notifications/index.d.ts +2 -2
  56. package/dist/notifications/index.js +1 -1
  57. package/dist/{pets-CqeoV1Jv.d.ts → pets-DzXi_9hY.d.ts} +1 -1
  58. package/dist/{pets-uKMldfz0.d.cts → pets-m61lisZt.d.cts} +1 -1
  59. package/dist/{petsRepository-BdfbY9Oe.d.ts → petsRepository-B1I6Lq_m.d.ts} +1 -1
  60. package/dist/{petsRepository-BYe7_MUo.d.cts → petsRepository-CQeuDdDC.d.cts} +1 -1
  61. package/dist/photo/index.cjs +1 -1
  62. package/dist/photo/index.js +1 -1
  63. package/dist/{ports-D4FQKTBS.d.ts → ports-CrGAcey9.d.ts} +6 -4
  64. package/dist/{ports-okLpXkpu.d.cts → ports-DUqO_XX0.d.cts} +6 -4
  65. package/dist/records/depth/index.cjs +3 -3
  66. package/dist/records/depth/index.d.cts +7 -7
  67. package/dist/records/depth/index.d.ts +7 -7
  68. package/dist/records/depth/index.js +3 -3
  69. package/dist/records/index.cjs +7 -7
  70. package/dist/records/index.d.cts +9 -9
  71. package/dist/records/index.d.ts +9 -9
  72. package/dist/records/index.js +7 -7
  73. package/dist/{requestFunnel-Dhaj0yUq.d.ts → requestFunnel-B86gQFka.d.ts} +2 -2
  74. package/dist/{requestFunnel-u8qnM5Ll.d.cts → requestFunnel-hXkP5T7K.d.cts} +2 -2
  75. package/dist/{runtimeTypes-C67itXfp.d.cts → runtimeTypes-Bt_tIj3h.d.cts} +29 -5
  76. package/dist/{runtimeTypes-BFes64Vp.d.ts → runtimeTypes-DXKxY2yq.d.ts} +29 -5
  77. package/dist/server/events/index.cjs +2 -2
  78. package/dist/server/events/index.d.cts +25 -6
  79. package/dist/server/events/index.d.ts +25 -6
  80. package/dist/server/events/index.js +2 -2
  81. package/dist/server/index.cjs +4 -4
  82. package/dist/server/index.d.cts +5 -4
  83. package/dist/server/index.d.ts +5 -4
  84. package/dist/server/index.js +4 -4
  85. package/dist/televet/booking/index.cjs +18 -15
  86. package/dist/televet/booking/index.d.cts +6 -6
  87. package/dist/televet/booking/index.d.ts +6 -6
  88. package/dist/televet/booking/index.js +19 -16
  89. package/dist/televet/index.cjs +1 -1
  90. package/dist/televet/index.js +1 -1
  91. package/dist/testing/index.d.cts +1 -1
  92. package/dist/testing/index.d.ts +1 -1
  93. package/dist/testing/rn/index.cjs +1 -1
  94. package/dist/testing/rn/index.d.cts +7 -7
  95. package/dist/testing/rn/index.d.ts +7 -7
  96. package/dist/testing/rn/index.js +1 -1
  97. package/dist/testing/web/index.cjs +1 -1
  98. package/dist/testing/web/index.d.cts +7 -7
  99. package/dist/testing/web/index.d.ts +7 -7
  100. package/dist/testing/web/index.js +1 -1
  101. package/dist/{timelineRows-pd4wYVbe.d.ts → timelineRows-C2ObTmfN.d.ts} +1 -1
  102. package/dist/{timelineRows-CDSO3ElK.d.cts → timelineRows-CrA-ePrQ.d.cts} +1 -1
  103. package/dist/{useRecordsDepth-W3UAKQRN.d.cts → useRecordsDepth-Dcr9y6i-.d.cts} +1 -1
  104. package/dist/{useRecordsDepth-CqSMkcyR.d.ts → useRecordsDepth-NQNJaGyk.d.ts} +1 -1
  105. package/dist/video/index.cjs +1 -1
  106. package/dist/video/index.js +1 -1
  107. package/dist/{view-CKfIaJYp.d.ts → view-DWJa2L0U.d.ts} +2 -2
  108. package/dist/{view-h7RPJAEe.d.cts → view-Dk7xpBJ4.d.cts} +2 -2
  109. package/dist/web/consent/index.cjs +1 -1
  110. package/dist/web/consent/index.d.cts +5 -5
  111. package/dist/web/consent/index.d.ts +5 -5
  112. package/dist/web/consent/index.js +1 -1
  113. package/dist/web/index.cjs +7 -8
  114. package/dist/web/index.d.cts +17 -16
  115. package/dist/web/index.d.ts +17 -16
  116. package/dist/web/index.js +7 -8
  117. package/dist/web/notifications/index.cjs +1 -1
  118. package/dist/web/notifications/index.d.cts +3 -3
  119. package/dist/web/notifications/index.d.ts +3 -3
  120. package/dist/web/notifications/index.js +1 -1
  121. package/dist/web/records/depth/index.cjs +3 -3
  122. package/dist/web/records/depth/index.d.cts +7 -7
  123. package/dist/web/records/depth/index.d.ts +7 -7
  124. package/dist/web/records/depth/index.js +3 -3
  125. package/dist/web/records/index.cjs +7 -7
  126. package/dist/web/records/index.d.cts +9 -9
  127. package/dist/web/records/index.d.ts +9 -9
  128. package/dist/web/records/index.js +7 -7
  129. package/dist/web/televet/booking/index.cjs +4 -4
  130. package/dist/web/televet/booking/index.d.cts +6 -6
  131. package/dist/web/televet/booking/index.d.ts +6 -6
  132. package/dist/web/televet/booking/index.js +4 -4
  133. package/dist/web/televet/index.cjs +1 -1
  134. package/dist/web/televet/index.js +1 -1
  135. package/package.json +1 -1
@@ -88,7 +88,7 @@ return Object.freeze({kind:"error",terminal:true,code:fields.code,retryable:fiel
88
88
  /* @__PURE__ */Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),
89
89
  /* @__PURE__ */Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(row2=>row2.wireCode));var NORMALIZED_FOLD=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict"}),CONTRACT_ERROR_ROWS=/* @__PURE__ */Object.freeze(CONTRACT_RETRYABILITY.map(generated=>/* @__PURE__ */Object.freeze({wireCode:generated.wireCode,envelope:generated.envelope,retryable:generated.retryable,normalized:NORMALIZED_FOLD[generated.wireCode]}))),BY_KEY=new Map(CONTRACT_ERROR_ROWS.map(r=>[r.envelope+r.wireCode.toUpperCase(),r])),ENVELOPE_LOOKUP_ORDER=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(CONTRACT_ERROR_ROWS.map(r=>r.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(wireCode,envelope){if(typeof wireCode!="string")return;let key=wireCode.trim().toUpperCase();if(key.length!==0)for(let candidate of[envelope??"http_envelope",...ENVELOPE_LOOKUP_ORDER]){let row2=BY_KEY.get(candidate+key);if(row2)return row2}}var CATEGORY_OF=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(code){return CATEGORY_OF[code]}function fromWire(wire){let contractRow=contractErrorFor(wire);if(contractRow)return contractRow.normalized;let upper=(wire??"").trim().toUpperCase(),canonical=upper.replace(/[^A-Z0-9]/g,"");if(canonical==="AUTHREJECTED")return"authRejected";if(upper.startsWith("AUTH"))return"authExpired";switch(canonical){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var AUTO_RETRYABLE_CODES=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(code){return AUTO_RETRYABLE_CODES.has(code)}var RETRYABLE_CONTRACT_CODES=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(code){return isAutoRetryable(code)||RETRYABLE_CONTRACT_CODES.has(code)}var BACKOFF_BASE_MS=500,BACKOFF_CAP_MS=8e3,MAX_RETRY_ATTEMPTS=4;function backoffDelayMs(attempt,rng=Math.random){let bounded=Math.max(0,attempt),ceiling=Math.min(BACKOFF_BASE_MS*2**bounded,BACKOFF_CAP_MS);return Math.floor(rng()*ceiling)}var ACCESS_DENIED_COPY="This feature isn't available on your account right now.",VALIDATION_FAILED_COPY="Something in that request was not right. Check the details and try again.",USER_FACING_COPY=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:ACCESS_DENIED_COPY,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:VALIDATION_FAILED_COPY,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:ACCESS_DENIED_COPY,runtimeDisposed:VALIDATION_FAILED_COPY,unknown:"Something went wrong. Please try again."});function userFacingError(code){return USER_FACING_COPY[code]}function defineHidden(target,key,value){Object.defineProperty(target,key,{value:value,enumerable:false,writable:false,configurable:false})}var REASON_CODE_SHAPE=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(code,opts){let row2=contractErrorFor(opts?.wireCode,opts?.wireEnvelope),error={code:code,category:categoryFor(code),retryable:opts?.retryable??isRetryableCode(code),displayMessage:userFacingError(code)};opts?.httpStatus!==void 0&&(error.httpStatus=opts.httpStatus),opts?.requestId&&(error.requestId=opts.requestId),typeof opts?.reasonCode=="string"&&REASON_CODE_SHAPE.test(opts.reasonCode)&&(error.reasonCode=opts.reasonCode);let wait=opts?.retryAfterSeconds;if(typeof wait=="number"&&Number.isFinite(wait)&&wait>=0&&(error.retryAfterSeconds=Math.round(wait)),row2);return opts?.wireMessage&&defineHidden(error,"wireMessage",opts.wireMessage),opts?.raw!==void 0&&opts.raw!==null&&defineHidden(error,"raw",opts.raw),/* @__PURE__ */Object.freeze(error)}function ok(value,warning){/* @__PURE__ */
90
90
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
91
- return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?err(authRejectedError(retry.error.httpStatus)):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}function networkError(cause){return makeEverfurError("internalError",{retryable:true,wireMessage:describeCause(cause)})}function describeCause(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"network request failed"}var FUNNEL_UNARY_TIMEOUT_MS=3e4,RETRY_OVERRIDE_MAX_MS=BACKOFF_CAP_MS*2,IDEMPOTENCY_HEADER="idempotency-key",MUTATING_METHODS=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),NOOP_OBSERVER=/* @__PURE__ */Object.freeze({onEvent(){}}),defaultFunnelTimers=/* @__PURE__ */Object.freeze({setTimeout:(handler,ms)=>setTimeout(handler,ms),clearTimeout:handle=>clearTimeout(handle),now:()=>Date.now()});function seededIdempotencyKey(seed){let safe=seed.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return safe.length===0?null:`efs_${safe}`.slice(0,128)}function createRequestFunnel(deps){let observer=deps.observer??NOOP_OBSERVER,timers=deps.timers??defaultFunnelTimers,rng=deps.rng??Math.random,sleep=deps.sleep??((ms,signal)=>delayAbortable(ms,timers,signal)),ceiling=deps.maxAttempts??MAX_RETRY_ATTEMPTS,timeoutMs=deps.unaryTimeoutMs??FUNNEL_UNARY_TIMEOUT_MS,mintKey=deps.newIdempotencyKey??defaultIdempotencyKeyFactory(),emit=event=>{try{observer.onEvent(event)}catch{}};async function send(call,req,opts){let perCallMaxAttempts=opts?.maxAttempts,maxAttempts=Math.max(1,perCallMaxAttempts??ceiling),idempotent=opts?.idempotent??MUTATING_METHODS.has(req.method),seeded=opts?.idempotencyKey===void 0?null:seededIdempotencyKey(opts.idempotencyKey),idempotencyKey=idempotent?seeded??mintKey():null,base=assembleHeaders(req,idempotencyKey),attempt=0;for(;;){let stamp2=extra=>/* @__PURE__ */Object.freeze({call:call,method:req.method,path:req.path,attempt:attempt,...idempotencyKey?{idempotencyKey:idempotencyKey}:{},...extra});emit(stamp2({phase:"attempt"}));let deadline=boundedSignal(timeoutMs,timers),merged=mergeSignals(deadline.signal,req.signal),settled;try{settled=await authedSend({...base,signal:merged.signal},deps.auth)}catch(cause){settled=err(networkError(cause))}finally{merged.dispose(),deadline.cancel()}if(settled.ok)return emit(stamp2({phase:"settled",ok:true,reason:"ok"})),settled;let error=settled.error,decision=decideRetry(error,attempt,{maxAttempts:maxAttempts,rng:rng,now:timers.now(),aborted:req.signal?.aborted===true,...perCallMaxAttempts!==void 0?{perCallMaxAttempts:perCallMaxAttempts}:{},...deps.errorPolicy!==void 0?{policy:deps.errorPolicy}:{}}),settledEvent={ok:false,code:error.code,reason:decision.reason,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{},...error.requestId!==void 0?{requestId:error.requestId}:{}};if(!decision.retry)return emit(stamp2({phase:"settled",...settledEvent})),err(error);if(emit(stamp2({phase:"retry",...settledEvent,delayMs:decision.delayMs})),await sleep(decision.delayMs,req.signal),req.signal?.aborted===true)return emit(stamp2({phase:"settled",...settledEvent,reason:"aborted"})),err(error);attempt+=1}}async function authorize(req){return withAuthHeaders(req,await resolveDeviceAuth(deps.auth))}async function*stream(call,req,signal){emit(
91
+ return Object.freeze({ok:false,error:error})}var EverfurConfigError=class _EverfurConfigError extends Error{constructor(kind,message){super(message),this.name="EverfurConfigError",this.kind=kind,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function authHeaders(auth){let headers={};return auth.mode==="personalized"?headers.authorization=`Bearer ${auth.token}`:headers["x-everfur-partner-key"]=auth.publishableKey,auth.userRef&&(headers["x-everfur-user-ref"]=auth.userRef),auth.sessionId&&(headers["x-everfur-session-id"]=auth.sessionId),headers}function withAuthHeaders(req,auth){return{...req,headers:{...stripAuthHeaders(req.headers),...authHeaders(auth)}}}function stripAuthHeaders(headers){if(!headers)return{};let out={};for(let[key,value]of Object.entries(headers)){let lower=key.toLowerCase();lower==="authorization"||lower==="x-everfur-partner-key"||(out[key]=value)}return out}async function authedSend(req,ctx){if(ctx.mode==="anonymous")return ctx.transport.request(withAuthHeaders(req,{mode:"anonymous",publishableKey:ctx.publishableKey,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));let token;try{token=await ctx.identity.currentToken()}catch{return ctx.identity.reportRejected?.(),err(authRejectedError())}let first=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:token,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));if(first.ok||first.error.httpStatus!==401)return first;let refreshed;try{refreshed=await ctx.identity.currentToken({forceRefresh:!0})}catch{return ctx.identity.reportRejected?.(),err(authRejectedError())}let retry=await ctx.transport.request(withAuthHeaders(req,{mode:"personalized",token:refreshed,userRef:ctx.userRef,...ctx.sessionId?{sessionId:ctx.sessionId}:{}}));return!retry.ok&&retry.error.httpStatus===401?(ctx.identity.reportRejected?.(),err(authRejectedError(retry.error.httpStatus))):retry}function authRejectedError(httpStatus){return makeEverfurError("authRejected",{retryable:false,...httpStatus!==void 0?{httpStatus:httpStatus}:{}})}function networkError(cause){return makeEverfurError("internalError",{retryable:true,wireMessage:describeCause(cause)})}function describeCause(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"network request failed"}var FUNNEL_UNARY_TIMEOUT_MS=3e4,RETRY_OVERRIDE_MAX_MS=BACKOFF_CAP_MS*2,IDEMPOTENCY_HEADER="idempotency-key",MUTATING_METHODS=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),NOOP_OBSERVER=/* @__PURE__ */Object.freeze({onEvent(){}}),defaultFunnelTimers=/* @__PURE__ */Object.freeze({setTimeout:(handler,ms)=>setTimeout(handler,ms),clearTimeout:handle=>clearTimeout(handle),now:()=>Date.now()});function seededIdempotencyKey(seed){let safe=seed.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return safe.length===0?null:`efs_${safe}`.slice(0,128)}function createRequestFunnel(deps){let observer=deps.observer??NOOP_OBSERVER,timers=deps.timers??defaultFunnelTimers,rng=deps.rng??Math.random,sleep=deps.sleep??((ms,signal)=>delayAbortable(ms,timers,signal)),ceiling=deps.maxAttempts??MAX_RETRY_ATTEMPTS,timeoutMs=deps.unaryTimeoutMs??FUNNEL_UNARY_TIMEOUT_MS,mintKey=deps.newIdempotencyKey??defaultIdempotencyKeyFactory(),emit=event=>{try{observer.onEvent(event)}catch{}};async function send(call,req,opts){let perCallMaxAttempts=opts?.maxAttempts,maxAttempts=Math.max(1,perCallMaxAttempts??ceiling),idempotent=opts?.idempotent??MUTATING_METHODS.has(req.method),seeded=opts?.idempotencyKey===void 0?null:seededIdempotencyKey(opts.idempotencyKey),idempotencyKey=idempotent?seeded??mintKey():null,base=assembleHeaders(req,idempotencyKey),attempt=0;for(;;){let stamp2=extra=>/* @__PURE__ */Object.freeze({call:call,method:req.method,path:req.path,attempt:attempt,...idempotencyKey?{idempotencyKey:idempotencyKey}:{},...extra});emit(stamp2({phase:"attempt"}));let deadline=boundedSignal(timeoutMs,timers),merged=mergeSignals(deadline.signal,req.signal),settled;try{settled=await authedSend({...base,signal:merged.signal},deps.auth)}catch(cause){settled=err(networkError(cause))}finally{merged.dispose(),deadline.cancel()}if(settled.ok)return emit(stamp2({phase:"settled",ok:true,reason:"ok"})),settled;let error=settled.error,decision=decideRetry(error,attempt,{maxAttempts:maxAttempts,rng:rng,now:timers.now(),aborted:req.signal?.aborted===true,...perCallMaxAttempts!==void 0?{perCallMaxAttempts:perCallMaxAttempts}:{},...deps.errorPolicy!==void 0?{policy:deps.errorPolicy}:{}}),settledEvent={ok:false,code:error.code,reason:decision.reason,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{},...error.requestId!==void 0?{requestId:error.requestId}:{}};if(!decision.retry)return emit(stamp2({phase:"settled",...settledEvent})),err(error);if(emit(stamp2({phase:"retry",...settledEvent,delayMs:decision.delayMs})),await sleep(decision.delayMs,req.signal),req.signal?.aborted===true)return emit(stamp2({phase:"settled",...settledEvent,reason:"aborted"})),err(error);attempt+=1}}async function authorize(req){return withAuthHeaders(req,await resolveDeviceAuth(deps.auth))}async function*stream(call,req,signal){emit(
92
92
  /* @__PURE__ */Object.freeze({call:call,phase:"stream.open",method:req.method,path:req.path,attempt:0}));try{yield*deps.auth.transport.stream(req,signal)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
93
93
  return Object.freeze({send:send,authorize:authorize,stream:stream})}function assembleHeaders(req,idempotencyKey){let headers={};for(let[key,value]of Object.entries(req.headers??{}))key.toLowerCase()!==IDEMPOTENCY_HEADER&&(headers[key]=value);return idempotencyKey!==null&&(headers["Idempotency-Key"]=idempotencyKey),{...req,headers:headers}}function defaultIdempotencyKeyFactory(){let counter=0;return()=>`efk_${Date.now().toString(36)}_${(counter++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var POLICY_MAX_ATTEMPTS_CAP=10;function decideRetry(error,attempt,ctx){if(ctx.aborted)return{retry:false,reason:"aborted"};let throttle=throttleKind(error);if(throttle==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(throttle!=="burst"&&!isAutoRetryable(error.code))return{retry:false,reason:"terminal-code"};let reason=throttle==="burst"?"burst-throttle":"retryable-code";if((()=>{if(ctx.policy===void 0)return false;try{return!ctx.policy.shouldRetry(error.code,attempt)}catch{return false}})())return{retry:false,reason:"terminal-code"};let policyCeiling=()=>{if(ctx.policy===void 0)return null;let raw;try{raw=ctx.policy.maxAttempts(error.code)}catch{return null}return typeof raw!="number"||!Number.isFinite(raw)?null:Math.max(1,Math.min(POLICY_MAX_ATTEMPTS_CAP,Math.floor(raw)))},ceiling=ctx.perCallMaxAttempts??policyCeiling()??ctx.maxAttempts;if(attempt+1>=ceiling)return{retry:false,reason:"attempts-exhausted"};let override=retryOverrideMs(error,ctx.now);return override!==null?override>RETRY_OVERRIDE_MAX_MS?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:reason,delayMs:override}:{retry:true,reason:reason,delayMs:backoffDelayMs(attempt,ctx.rng)}}function throttleKind(error){let code=error.code==="unknown"?fromWire(rawWireCode(error.raw)):error.code;return code==="quotaExceeded"?"quota":code==="rateLimited"||error.httpStatus===429?"burst":null}function retryOverrideMs(error,now){let at=findResetsAt(error.raw);if(at!==null){let delta=at-now;return delta>0?delta:0}let wait=findRetryAfterSeconds(error.raw);return wait===null?null:Math.round(wait*1e3)}function findRetryAfterSeconds(raw){for(let scope of candidateScopes(raw)){let value=scope.retry_after_seconds;if(typeof value=="number"&&Number.isFinite(value)&&value>=0)return value}return null}function findResetsAt(raw){for(let scope of candidateScopes(raw)){let value=scope.resets_at,parsed=parseInstantMs(value);if(parsed!==null)return parsed}return null}function candidateScopes(raw){if(!isRecord(raw))return[];let out=[raw];for(let nested of["error","detail"]){let value=raw[nested];isRecord(value)&&out.push(value)}return out}function parseInstantMs(value){if(typeof value=="number"&&Number.isFinite(value))return value<1e11?Math.round(value*1e3):Math.round(value);if(typeof value=="string"&&value.trim().length>0){let parsed=Date.parse(value);return Number.isFinite(parsed)?parsed:null}return null}function rawWireCode(raw){for(let scope of candidateScopes(raw)){let code=scope.code;if(typeof code=="string"&&code.length>0)return code}return null}function isRecord(value){return typeof value=="object"&&value!==null}async function resolveDeviceAuth(auth){return auth.mode==="anonymous"?{mode:"anonymous",publishableKey:auth.publishableKey,userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}:{mode:"personalized",token:await auth.identity.currentToken(),userRef:auth.userRef,...auth.sessionId?{sessionId:auth.sessionId}:{}}}function boundedSignal(ms,timers){let ctrl=new AbortController,handle=timers.setTimeout(()=>ctrl.abort(),ms);return{signal:ctrl.signal,cancel:()=>timers.clearTimeout(handle)}}function mergeSignals(deadline,caller){let noop=()=>{};if(!caller)return{signal:deadline,dispose:noop};let ctrl=new AbortController;if(deadline.aborted||caller.aborted)return ctrl.abort(),{signal:ctrl.signal,dispose:noop};let onAbort=()=>ctrl.abort();return deadline.addEventListener("abort",onAbort,{once:true}),caller.addEventListener("abort",onAbort,{once:true}),{signal:ctrl.signal,dispose:()=>{deadline.removeEventListener("abort",onAbort),caller.removeEventListener("abort",onAbort)}}}function delayAbortable(ms,timers,signal){return ms<=0||signal?.aborted===true?Promise.resolve():new Promise(resolve=>{let handle=timers.setTimeout(()=>{signal?.removeEventListener("abort",onAbort),resolve()},ms),onAbort=()=>{timers.clearTimeout(handle),resolve()};signal?.addEventListener("abort",onAbort,{once:true})})}var TELEVET_ATTACHMENT_MIME_TYPES=/* @__PURE__ */Object.freeze(["image/jpeg","image/png","image/webp","image/heic","image/heif","application/pdf","text/csv","video/mp4","video/quicktime"]),TELEVET_ATTACHMENT_MAX_BYTES=25*1024*1024,TELEVET_ATTACHMENT_VIDEO_MAX_BYTES=200*1024*1024,SUFFIX_TYPES=[[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".png","image/png"],[".webp","image/webp"],[".heic","image/heic"],[".heif","image/heif"],[".pdf","application/pdf"],[".csv","text/csv"],[".mp4","video/mp4"],[".mov","video/quicktime"]];function televetAttachmentContentType(filename,mimeType){let direct=(mimeType??"").trim().toLowerCase();if(direct==="image/jpg")return"image/jpeg";if(TELEVET_ATTACHMENT_MIME_TYPES.includes(direct))return direct;if(direct.length>0)return null;let name=filename.toLowerCase();return SUFFIX_TYPES.find(([suffix])=>name.endsWith(suffix))?.[1]??null}function televetAttachmentRefusal(pick2){let type=televetAttachmentContentType(pick2.filename,pick2.mimeType);if(type===null)return"type";if(!Number.isFinite(pick2.fileSize)||pick2.fileSize<=0)return"unreadable";let ceiling=type.startsWith("video/")?TELEVET_ATTACHMENT_VIDEO_MAX_BYTES:TELEVET_ATTACHMENT_MAX_BYTES;return pick2.fileSize<=ceiling?null:"size"}function parseTelevetAttachmentPolicy(raw){if(typeof raw!="object"||raw===null)return null;let o=raw,str4=v=>typeof v=="string"&&v.length>0?v:null,num3=v=>typeof v=="number"&&Number.isFinite(v)?v:null,uploadUrl=str4(o.upload_url),s3Key=str4(o.s3_key);if(uploadUrl===null||s3Key===null)return null;let fields={},rawFields=o.upload_fields;if(typeof rawFields=="object"&&rawFields!==null)for(let[key,value]of Object.entries(rawFields))typeof value=="string"&&(fields[key]=value);/* @__PURE__ */
94
94
  return Object.freeze({upload_id:str4(o.upload_id)??"",upload_url:uploadUrl,upload_fields:/* @__PURE__ */Object.freeze(fields),expires_in_seconds:num3(o.expires_in_seconds)??0,max_content_length:num3(o.max_content_length)??TELEVET_ATTACHMENT_MAX_BYTES,s3_key:s3Key,purpose:str4(o.purpose)})}function wireCodeOf(raw){if(typeof raw!="object"||raw===null)return null;let scopes=[raw,raw.detail,raw.error];for(let scope of scopes)if(!(typeof scope!="object"||scope===null))for(let key of["error","code"]){let value=scope[key];if(typeof value=="string"&&value.length>0)return value}return null}function televetAttachmentInitiateFailure(error){if(error.httpStatus===404)return"dark";if(error.httpStatus===400){let code=wireCodeOf(error.raw);if(code==="FILE_TOO_LARGE")return"size";if(code==="INVALID_CONTENT_TYPE")return"type"}return"failed"}var TELEVET_BOOKING_NOT_LIVE="televet_booking_not_live";function televetBookingNotLiveError(status){return makeEverfurError("conflict",{retryable:false,reasonCode:TELEVET_BOOKING_NOT_LIVE,wireMessage:`the booking was answered with a consult whose status is ${status}, which is not a live visit`})}var TELEVET_BOOKING_KEY_REUSED="televet_booking_key_reused",KEY_REUSED_WIRE_CODE="IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST";function foldTelevetBookingKeyReused(error){return error.httpStatus!==409||error.reasonCode===TELEVET_BOOKING_KEY_REUSED||details(error)?.code!==KEY_REUSED_WIRE_CODE?error:makeEverfurError(error.code,{retryable:false,httpStatus:409,...error.requestId!==void 0?{requestId:error.requestId}:{},wireCode:KEY_REUSED_WIRE_CODE,reasonCode:TELEVET_BOOKING_KEY_REUSED,...error.wireMessage!==void 0?{wireMessage:error.wireMessage}:{},raw:error.raw})}function details(error){let raw=error.raw;if(typeof raw!="object"||raw===null)return null;let direct=raw,nested=direct.detail??direct.error;return typeof nested=="object"&&nested!==null?nested:direct}function categoriesOf(error){let raw=details(error)?.categories;return Array.isArray(raw)?/* @__PURE__ */Object.freeze(raw.filter(c=>typeof c=="string")):/* @__PURE__ */Object.freeze([])}function retryAfterOf(error){let raw=details(error)?.retry_after_seconds;return typeof raw=="number"&&Number.isFinite(raw)&&raw>0?raw:null}function messageOf(error){let wire=error.wireMessage;if(typeof wire=="string"&&wire.trim().length>0)return wire.trim();let raw=details(error)?.message;return typeof raw=="string"&&raw.trim().length>0?raw.trim():null}function codeOf(error){let reason=error.reasonCode;if(typeof reason=="string"&&reason.length>0)return reason;let raw=details(error),code=raw?.code??raw?.error_code;return typeof code=="string"&&code.length>0?code:null}function televetBookingRefusal(error){let status=error.httpStatus;if(status===402)/* @__PURE__ */return Object.freeze({kind:"not_entitled"});if(status===429||error.code==="rateLimited"||error.code==="quotaExceeded")/* @__PURE__ */
@@ -160,8 +160,8 @@ return jsxRuntime.jsxs(reactNative.View,{testID:"televet-booking-not-entitled",s
160
160
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:"televet-booking-state-blocked",children:[
161
161
  /* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY.stateBlockedTitle}),
162
162
  /* @__PURE__ */jsxRuntime.jsx(TelevetStateInterestAction,{action:stateInterest,testIDPrefix:"televet-state-interest-state-blocked"})]}):step==="reason"&&triageOpen?/* @__PURE__ */jsxRuntime.jsx(TelevetEarlyEmergency,{...petName!==void 0?{petName:petName}:{},...primaryVet?{primaryVet:primaryVet}:{},onFindEmergencyVet:onFindEmergencyVet,onContinue:onAcknowledgeEmergency}):null}var warnedNoStateSeam=false;function warnNoStateSeamOnce(){if(!warnedNoStateSeam){warnedNoStateSeam=true;try{globalThis.console?.warn?.("[everfur] The vet booking has no US state for this member, so it cannot list vets. Pass the member's two-letter state as `usState` (on EverfurTelevet, VetVisitButton or EverfurChat as `vetUsState`), or pass `onRequestLocation` so the booking can ask your app to resolve one. The SDK never reads a device location itself.")}catch{}}}function televetClinicianOutcomeApplies(state){return state.noState?true:state.isPending||state.isError?false:state.isEmpty||state.notEntitled}function TelevetClinicianOutcome({state:state,cause:cause,locationStatus:locationStatus,onRequestLocation:onRequestLocation,onRetry:onRetry,stateInterest:stateInterest=null,renderUnavailable:renderUnavailable}){let hostCannotLocate=state.noState&&!onRequestLocation;return react.useEffect(()=>{hostCannotLocate&&warnNoStateSeamOnce()},[hostCannotLocate]),state.noState?
163
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"televet-booking-location-unknown",children:/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedTitle:locationStatus==="unavailable"?TELEVET_BOOKING_COPY.locationUnavailableTitle:TELEVET_BOOKING_COPY.locationUnknownTitle,message:locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedBody:locationStatus==="unavailable"?TELEVET_BOOKING_COPY.locationUnavailableBody:onRequestLocation?TELEVET_BOOKING_COPY.locationUnknownBody:void 0,actionLabel:onRequestLocation?locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedCta:TELEVET_BOOKING_COPY.locationUnknownCta:void 0,onAction:onRequestLocation})}):state.isEmpty?/* @__PURE__ */jsxRuntime.jsx(TelevetClinicianEmptyState,{cause:cause,onRetry:onRetry,stateInterest:stateInterest}):/* @__PURE__ */jsxRuntime.jsx(EntitlementPausedState,{...renderUnavailable?{renderUnavailable:renderUnavailable}:{}})}function televetConsultCalendarKey(consultId){return`televet-consult-${consultId}`}function TelevetBookedScreen({consult:consult,petName:petName,onDone:onDone,onAddToCalendar:onAddToCalendar,canJoinInApp:canJoinInApp=false,sharedRecords:sharedRecords=false,sentPhoto:sentPhoto=false}){let theme=useEverfurTheme(),shared=useBookingStyles(),styles2=react.useMemo(()=>makeStyles2(theme),[theme]),[calendarState,setCalendarState]=react.useState("idle"),addToCalendar=async()=>{if(!onAddToCalendar)return;setCalendarState("saving");let start=new Date(consult.scheduledAt);if(Number.isNaN(start.getTime())){setCalendarState("failed");return}let outcome=await callHostAsync(onAddToCalendar,{key:televetConsultCalendarKey(consult.consultId),title:TELEVET_BOOKING_COPY.visit.title,startDate:start,endDate:new Date(start.getTime()+CONSULT_MINUTES*6e4),alarmOffsetMinutes:-30});setCalendarState(outcome.ok&&outcome.value===true?"saved":"failed")},vetName=consult.clinicianName?.trim()??"",steps=[TELEVET_BOOKING_COPY.booked.remindPromise,sharedRecords&&vetName.length>0?fill(sentPhoto?TELEVET_BOOKING_COPY.booked.recordsPhotoPromiseTemplate:TELEVET_BOOKING_COPY.booked.recordsPromiseTemplate,{pet:petName??TELEVET_BOOKING_COPY.petFallback,vet:vetName}):fill(TELEVET_BOOKING_COPY.booked.summaryPromise,{pet:petName??""}),...canJoinInApp?[TELEVET_BOOKING_COPY.booked.joinPromise]:[]],settle=react.useRef(new reactNative.Animated.Value(theme.motion.reducedMotion?1:0)).current;return react.useEffect(()=>{theme.motion.reducedMotion||reactNative.Animated.spring(settle,{toValue:1,damping:14,stiffness:180,mass:1,useNativeDriver:true}).start()},[settle,theme.motion.reducedMotion]),isTelevetBookingCopyReady()?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.screen,testID:"televet-booked",children:[
164
- /* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:[styles2.avatar,{opacity:settle,transform:[{scale:settle.interpolate({inputRange:[0,1],outputRange:[.92,1]})}]}],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.avatarText,children:vetName.length>0?vetName.replace(/^dr\.?\s+/i,"").slice(0,1).toUpperCase():""})}),
163
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"televet-booking-location-unknown",children:/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedTitle:locationStatus==="unavailable"?TELEVET_BOOKING_COPY.locationUnavailableTitle:TELEVET_BOOKING_COPY.locationUnknownTitle,message:locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedBody:locationStatus==="unavailable"?TELEVET_BOOKING_COPY.locationUnavailableBody:onRequestLocation?TELEVET_BOOKING_COPY.locationUnknownBody:void 0,actionLabel:onRequestLocation?locationStatus==="blocked"?TELEVET_BOOKING_COPY.locationBlockedCta:TELEVET_BOOKING_COPY.locationUnknownCta:void 0,onAction:onRequestLocation})}):state.isEmpty?/* @__PURE__ */jsxRuntime.jsx(TelevetClinicianEmptyState,{cause:cause,onRetry:onRetry,stateInterest:stateInterest}):/* @__PURE__ */jsxRuntime.jsx(EntitlementPausedState,{...renderUnavailable?{renderUnavailable:renderUnavailable}:{}})}function clinicianInitial(displayName){return displayName.trim().replace(/^dr\.?\s+/i,"").slice(0,1).toUpperCase()}function televetConsultCalendarKey(consultId){return`televet-consult-${consultId}`}function TelevetBookedScreen({consult:consult,petName:petName,onDone:onDone,onAddToCalendar:onAddToCalendar,canJoinInApp:canJoinInApp=false,sharedRecords:sharedRecords=false,sentPhoto:sentPhoto=false}){let theme=useEverfurTheme(),shared=useBookingStyles(),styles2=react.useMemo(()=>makeStyles2(theme),[theme]),[calendarState,setCalendarState]=react.useState("idle"),addToCalendar=async()=>{if(!onAddToCalendar)return;setCalendarState("saving");let start=new Date(consult.scheduledAt);if(Number.isNaN(start.getTime())){setCalendarState("failed");return}let outcome=await callHostAsync(onAddToCalendar,{key:televetConsultCalendarKey(consult.consultId),title:TELEVET_BOOKING_COPY.visit.title,startDate:start,endDate:new Date(start.getTime()+CONSULT_MINUTES*6e4),alarmOffsetMinutes:-30});setCalendarState(outcome.ok&&outcome.value===true?"saved":"failed")},vetName=consult.clinicianName?.trim()??"",steps=[TELEVET_BOOKING_COPY.booked.remindPromise,sharedRecords&&vetName.length>0?fill(sentPhoto?TELEVET_BOOKING_COPY.booked.recordsPhotoPromiseTemplate:TELEVET_BOOKING_COPY.booked.recordsPromiseTemplate,{pet:petName??TELEVET_BOOKING_COPY.petFallback,vet:vetName}):fill(TELEVET_BOOKING_COPY.booked.summaryPromise,{pet:petName??""}),...canJoinInApp?[TELEVET_BOOKING_COPY.booked.joinPromise]:[]],settle=react.useRef(new reactNative.Animated.Value(theme.motion.reducedMotion?1:0)).current;return react.useEffect(()=>{theme.motion.reducedMotion||reactNative.Animated.spring(settle,{toValue:1,damping:14,stiffness:180,mass:1,useNativeDriver:true}).start()},[settle,theme.motion.reducedMotion]),isTelevetBookingCopyReady()?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.screen,testID:"televet-booked",children:[
164
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:[styles2.avatar,{opacity:settle,transform:[{scale:settle.interpolate({inputRange:[0,1],outputRange:[.92,1]})}]}],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.avatarText,children:vetName.length>0?clinicianInitial(vetName):""})}),
165
165
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.title,accessibilityRole:"header",children:vetName.length>0?fill(TELEVET_BOOKING_COPY.bookedTitleTemplate,{vet:vetName}):TELEVET_BOOKING_COPY.bookedTitle}),
166
166
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.when,children:petName?fill(TELEVET_BOOKING_COPY.bookedLeadTemplate,{when:formatBookedWhen(consult.scheduledAt),pet:petName}):formatBookedWhen(consult.scheduledAt)}),
167
167
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.steps,accessibilityLabel:TELEVET_BOOKING_COPY.booked.stepsLabel,testID:"televet-booked-steps",children:steps.map((step,i)=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles2.step,i===steps.length-1?styles2.stepLast:null],children:[
@@ -176,7 +176,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles2.wrap,children:[
176
176
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.center,accessibilityRole:"header",accessibilityLabel:`${title??TELEVET_BOOKING_COPY.navTitle}, ${label}`,children:[
177
177
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:styles2.stepLabel,testID:"televet-booking-progress-label",children:label}),
178
178
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.segments,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"televet-booking-rail",children:segments.map((name,index)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles2.segment,index<current?styles2.segmentDone:null]},name))})]}),
179
- /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:confirmClose,accessibilityRole:"button",accessibilityLabel:TELEVET_BOOKING_COPY.close,accessibilityHint:TELEVET_BOOKING_COPY.chrome.closeHint,testID:"televet-booking-close",style:styles2.ring,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.close,accessibilityElementsHidden:true,importantForAccessibility:"no",children:CLOSE_GLYPH})})]})]})}var CLOSE_GLYPH="×",BACK_LABEL="Back",LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function makeStyles3(theme){let{space:space,type:type}=theme,look=televetLook(theme),header=theme.slots.header,ink=header?.textColor??look.ink;return reactNative.StyleSheet.create({wrap:{...slotBox(insetSlot(header,theme.radius.lg))},logoBar:{alignItems:"center",paddingTop:space.sm},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH},bar:{flexDirection:"row",alignItems:"center",gap:space.md,paddingVertical:space.sm,minHeight:60},ring:{width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,borderRadius:MIN_TOUCH_TARGET/2,borderWidth:1.5,borderColor:look.line,alignItems:"center",justifyContent:"center"},chevron:{width:10,height:10,marginLeft:4,borderLeftWidth:2,borderBottomWidth:2,borderColor:ink,transform:[{rotate:"45deg"}]},close:{...face(theme,"regular"),color:ink,fontSize:24,lineHeight:26},center:{flex:1,alignItems:"center",gap:6},stepLabel:{...face(theme,"monoBold"),color:ink,fontSize:12,lineHeight:16,letterSpacing:1.2,textTransform:"uppercase"},segments:{flexDirection:"row",gap:4,alignSelf:"stretch"},segment:{flex:1,height:4,borderRadius:2,backgroundColor:look.mist},segmentDone:{backgroundColor:look.go},title:{...headingFace(theme,"medium"),color:ink,fontSize:type.size.subtitle}})}function formatTelevetPetMetaLine(pet){let parts=[],breed=pet.breed?.trim();breed&&parts.push(breed);let years=wholeYears(pet.ageYears);years!==null&&parts.push(`${String(years)} year${years===1?"":"s"}`);let weight=pet.weightKg;return typeof weight=="number"&&Number.isFinite(weight)&&weight>0&&parts.push(`${String(Math.round(weight))} kg`),parts.join(" · ")}function wholeYears(ageYears){if(typeof ageYears!="number"||!Number.isFinite(ageYears))return null;let years=Math.floor(ageYears);return years>=0?years:null}function TelevetIntakeMedia({media:media,onChange:onChange,onPickMedia:onPickMedia,meta:meta}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles4(theme),[theme]),remaining=MEDIA_REFS_MAX-media.length,[busy,setBusy]=react.useState(false);if(!onPickMedia)return null;let pick2=async()=>{if(!(busy||remaining<=0)){setBusy(true);try{let outcome=await callHostAsync(onPickMedia,remaining);if(!outcome.ok||outcome.value===null||outcome.value.length===0)return;let existing=new Set(media.map(m=>m.uri)),fresh2=outcome.value.filter(p=>typeof p?.uri=="string"&&p.uri.length>0&&!existing.has(p.uri));if(fresh2.length===0)return;onChange([...media,...fresh2].slice(0,MEDIA_REFS_MAX))}finally{setBusy(false)}}};/* @__PURE__ */
179
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:confirmClose,accessibilityRole:"button",accessibilityLabel:TELEVET_BOOKING_COPY.close,accessibilityHint:TELEVET_BOOKING_COPY.chrome.closeHint,testID:"televet-booking-close",style:styles2.ring,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.close,accessibilityElementsHidden:true,importantForAccessibility:"no",children:CLOSE_GLYPH})})]})]})}var CLOSE_GLYPH="×",BACK_LABEL="Back",LOGO_HEIGHT=28,LOGO_MAX_WIDTH=160;function makeStyles3(theme){let{space:space,type:type}=theme,look=televetLook(theme),header=theme.slots.header,ink=header?.textColor??look.ink;return reactNative.StyleSheet.create({wrap:{...slotBox(insetSlot(header,theme.radius.lg))},logoBar:{alignItems:"center",paddingTop:space.sm},logo:{height:LOGO_HEIGHT,width:LOGO_MAX_WIDTH},bar:{flexDirection:"row",alignItems:"center",gap:space.md,paddingVertical:space.sm,minHeight:60},ring:{width:MIN_TOUCH_TARGET,height:MIN_TOUCH_TARGET,borderRadius:MIN_TOUCH_TARGET/2,borderWidth:1.5,borderColor:look.line,alignItems:"center",justifyContent:"center"},chevron:{width:10,height:10,marginLeft:4,borderLeftWidth:2,borderBottomWidth:2,borderColor:ink,transform:[{rotate:"45deg"}]},close:{...face(theme,"regular"),color:ink,fontSize:24,lineHeight:26},center:{flex:1,alignItems:"center",gap:6},stepLabel:{...face(theme,"monoBold"),color:ink,fontSize:12,lineHeight:16,letterSpacing:1.2,textTransform:"uppercase"},segments:{flexDirection:"row",gap:4,alignSelf:"stretch"},segment:{flex:1,height:4,borderRadius:2,backgroundColor:look.mist},segmentDone:{backgroundColor:look.go},title:{...headingFace(theme,"medium"),color:ink,fontSize:type.size.subtitle}})}function formatTelevetPetMetaLine(pet){let parts=[],breed=pet.breed?.trim();breed&&parts.push(breed);let years=wholeYears(pet.ageYears);years!==null&&parts.push(`${String(years)} year${years===1?"":"s"}`);let weight=pet.weightKg;return typeof weight=="number"&&Number.isFinite(weight)&&weight>0&&parts.push(`${String(Math.round(weight))} kg`),parts.join(" · ")}function wholeYears(ageYears){if(typeof ageYears!="number"||!Number.isFinite(ageYears))return null;let years=Math.floor(ageYears);return years>=0?years:null}var NO_PROPS=/* @__PURE__ */Object.freeze({}),REMEASURE_INTERVAL_MS=100,REMEASURE_ATTEMPTS=20;function readWindowTops(chatTopInWindow,chatTopInParent,chatHeight,windowHeight){return![chatTopInWindow,chatTopInParent,chatHeight,windowHeight].every(Number.isFinite)||chatTopInWindow+chatHeight>windowHeight+1?null:{chatTop:Math.max(0,chatTopInWindow),parentTop:Math.max(0,chatTopInWindow-chatTopInParent)}}function useChatKeyboardOffset(hostOffset,lifts){let hostGiven=typeof hostOffset=="number",probeRef=react.useRef(null),[reading,setReading]=react.useState(null),frame=react.useRef(null),retry=react.useRef(null),mounted=react.useRef(true),stopRetry=react.useCallback(()=>{retry.current!==null&&clearTimeout(retry.current),retry.current=null},[]);react.useEffect(()=>(mounted.current=true,()=>{mounted.current=false,stopRetry()}),[stopRetry]);let measure=react.useCallback(function measureAt(attempt){probeRef.current?.measureInWindow((_x,windowY)=>{let at=frame.current;if(!mounted.current||at===null)return;let next=readWindowTops(windowY,at.y,at.height,reactNative.Dimensions.get("window").height);if(next!==null){setReading(last=>last!==null&&last.chatTop===next.chatTop&&last.parentTop===next.parentTop?last:next);return}attempt>=REMEASURE_ATTEMPTS||(retry.current=setTimeout(()=>{retry.current=null,measureAt(attempt+1)},REMEASURE_INTERVAL_MS))})},[]),onLayout=react.useCallback(event=>{let{y:y,height:height}=event.nativeEvent.layout;frame.current={y:y,height:height},stopRetry(),measure(0)},[measure,stopRetry]);return react.useMemo(()=>{if(!lifts)return{avoidingProps:NO_PROPS,probeRef:null,topInWindow:null};let measured=reading?.parentTop??0;return{avoidingProps:measured>0?{keyboardVerticalOffset:measured,onLayout:onLayout}:{onLayout:onLayout},probeRef:probeRef,topInWindow:reading?.chatTop??null}},[lifts,hostGiven,hostOffset,reading,onLayout])}function KeyboardOffsetProbe({probeRef:probeRef}){return probeRef===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{ref:probeRef,collapsable:false,pointerEvents:"none",style:PROBE_STYLE})}var PROBE_STYLE=/* @__PURE__ */Object.freeze({position:"absolute",top:0,left:0,width:0,height:0});function TelevetIntakeMedia({media:media,onChange:onChange,onPickMedia:onPickMedia,meta:meta}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles4(theme),[theme]),remaining=MEDIA_REFS_MAX-media.length,[busy,setBusy]=react.useState(false);if(!onPickMedia)return null;let pick2=async()=>{if(!(busy||remaining<=0)){setBusy(true);try{let outcome=await callHostAsync(onPickMedia,remaining);if(!outcome.ok||outcome.value===null||outcome.value.length===0)return;let existing=new Set(media.map(m=>m.uri)),fresh2=outcome.value.filter(p=>typeof p?.uri=="string"&&p.uri.length>0&&!existing.has(p.uri));if(fresh2.length===0)return;onChange([...media,...fresh2].slice(0,MEDIA_REFS_MAX))}finally{setBusy(false)}}};/* @__PURE__ */
180
180
  return jsxRuntime.jsxs(reactNative.View,{children:[
181
181
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.row,children:[media.map((m,i)=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.thumb,children:[
182
182
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:m.uri},style:styles2.thumbImage,resizeMode:"cover"}),m.mimeType?.startsWith("video/")?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.videoBadge,testID:`televet-intake-media-video-${String(i)}`,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles2.videoBadgeText,children:VIDEO_GLYPH})}):null,
@@ -194,7 +194,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles2.root,testID:testID,childr
194
194
  /* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{style:styles2.gridScroll,contentContainerStyle:styles2.groups,showsVerticalScrollIndicator:false,children:groups(times,periodLabels).map(group=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.group,children:[group.label?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:styles2.period,accessibilityRole:"header",testID:`televet-slot-period-${group.key}`,children:group.label}):null,
195
195
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.grid,children:group.slots.map(slot=>{let index=times.indexOf(slot),busy=busySlotId===slot.slotId,blocked=busySlotId!==null,picked=selectedSlot?.slotId===slot.slotId,chipZone=mixedZones?zones[index]??"":"";/* @__PURE__ */
196
196
  return jsxRuntime.jsxs(reactNative.Pressable,{onPress:()=>onPick(slot),disabled:blocked,accessibilityRole:"button",accessibilityLabel:[formatClock(slot.startsAt),chipZone].filter(part=>part.length>0).join(" "),accessibilityState:{disabled:blocked,busy:busy,selected:picked},testID:`${rowTestIdPrefix}-${slot.slotId}`,style:({pressed:pressed})=>[styles2.chip,picked?styles2.chipPicked:null,busy?styles2.chipBusy:null,blocked&&!busy?styles2.chipDisabled:null,pressed&&!theme.motion.reducedMotion?styles2.chipPressed:null],children:[
197
- /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles2.chipLabel,picked?styles2.chipLabelPicked:null,busy?styles2.chipLabelBusy:null],children:formatClock(slot.startsAt)}),chipZone.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles2.chipZone,picked?styles2.chipLabelPicked:null,busy?styles2.chipLabelBusy:null],testID:`${rowTestIdPrefix}-${slot.slotId}-zone`,children:chipZone}):null]},slot.slotId)})})]},group.key))})]})}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}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),chip=theme.slots.chip,chipText=slotText(chip);return reactNative.StyleSheet.create({root:{flex:1,minHeight:0},groups:{gap:space.lg,paddingBottom:space.xl},group:{gap:space.sm},period:{...face(theme,"monoBold"),color:look.muted,fontSize:12,lineHeight:16,letterSpacing:.96,textTransform:"uppercase"},gridScroll:{flex:1},zone:{textAlign:"center",...face(theme,"mono"),color:color.text.muted,fontSize:size.tiny,lineHeight:size.tiny*lineHeight.normal,letterSpacing:.4,paddingVertical:space.md},grid:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minWidth:96,flexGrow:1,flexBasis:"28%",minHeight:44,borderRadius:radius.pill,borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,alignItems:"center",justifyContent:"center",paddingHorizontal:space.md,...slotBox(chip,1.5)},chipPicked:{borderColor:look.ink,backgroundColor:look.pink},chipLabelPicked:{color:look.onPink},chipPressed:{transform:[{scale:.95}]},chipBusy:{backgroundColor:color.primary,borderColor:color.primary},chipDisabled:{opacity:.45},chipLabel:{...face(theme,"bold"),color:look.ink,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.snug,fontVariant:["tabular-nums"],...chipText},chipLabelBusy:{color:color.onPrimary},chipZone:{...face(theme,"mono"),color:color.text.muted,fontSize:size.tiny,lineHeight:size.tiny*lineHeight.normal,letterSpacing:.4,...chipText}})}function TelevetSummaryRow({label:label,value:value,last:last=false,action:action,testID:testID}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
197
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles2.chipLabel,picked?styles2.chipLabelPicked:null,busy?styles2.chipLabelBusy:null],children:formatClock(slot.startsAt)}),chipZone.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles2.chipZone,picked?styles2.chipLabelPicked:null,busy?styles2.chipLabelBusy:null],testID:`${rowTestIdPrefix}-${slot.slotId}-zone`,children:chipZone}):null]},slot.slotId)})})]},group.key))})]})}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}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),chip=theme.slots.chip,chipText=slotText(chip);return reactNative.StyleSheet.create({root:{flex:1,minHeight:0},groups:{gap:space.lg,paddingBottom:space.xl},group:{gap:space.sm},period:{...face(theme,"monoBold"),color:look.muted,fontSize:12,lineHeight:16,letterSpacing:.96,textTransform:"uppercase"},gridScroll:{flex:1},zone:{textAlign:"center",...face(theme,"mono"),color:color.text.muted,fontSize:size.tiny,lineHeight:size.tiny*lineHeight.normal,letterSpacing:.4,paddingVertical:space.md},grid:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minWidth:96,flexGrow:1,flexBasis:"auto",minHeight:44,borderRadius:radius.pill,borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,alignItems:"center",justifyContent:"center",paddingHorizontal:space.md,...slotBox(chip,1.5)},chipPicked:{borderColor:look.ink,backgroundColor:look.pink},chipLabelPicked:{color:look.onPink},chipPressed:{transform:[{scale:.95}]},chipBusy:{backgroundColor:color.primary,borderColor:color.primary},chipDisabled:{opacity:.45},chipLabel:{...face(theme,"bold"),color:look.ink,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.snug,fontVariant:["tabular-nums"],...chipText},chipLabelBusy:{color:color.onPrimary},chipZone:{...face(theme,"mono"),color:color.text.muted,fontSize:size.tiny,lineHeight:size.tiny*lineHeight.normal,letterSpacing:.4,...chipText}})}function TelevetSummaryRow({label:label,value:value,last:last=false,action:action,testID:testID}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
198
198
  return jsxRuntime.jsxs(reactNative.View,{style:[styles2.row,last?styles2.rowLast:null],testID:testID,children:[
199
199
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.rowLabel,children:label}),
200
200
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.rowValue,children:value}),action??null]})}function TelevetConsentCheckbox({label:label,checked:checked,onToggle:onToggle,testID:testID}){let theme=useEverfurTheme(),styles2=react.useMemo(()=>makeStyles7(theme),[theme]);/* @__PURE__ */
@@ -215,11 +215,12 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles2.scrollRoot,testID:"televe
215
215
  /* @__PURE__ */jsxRuntime.jsx(TelevetEmergencyExits,{petName:petName,primaryVet:primaryVet,onFindEmergencyVet:onFindEmergencyVet}),
216
216
  /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.emergency.keepBookingCta,kind:"secondary",loading:busy,disabled:busy,onPress:onAcknowledgeEmergency,testID:"televet-review-emergency-ack"})]}):null,failure2==="failed"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.confirmFailed}):null,failure2==="clinician_unavailable"?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.list,testID:"televet-review-clinician-unavailable",children:[
217
217
  /* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.confirmFailed}),
218
- /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.seeOtherVetsCta,kind:"secondary",onPress:onSeeOtherVets,testID:"televet-review-see-other-vets"})]}):null,failure2==="rate_limited"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.confirmFailed,testID:"televet-review-rate-limited"}):null,failure2==="not_entitled"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.bookingPausedTitle,testID:"televet-review-not-entitled"}):null]}),emergency?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.scrollFooter,children:/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:busy?TELEVET_BOOKING_COPY.confirmBusy:TELEVET_BOOKING_COPY.confirmCta,kind:"primary",loading:busy,disabled:!ready||busy||!!stateCode&&!stateAttested||!!cancellationTerms&&!termsAttested,onPress:onConfirm,testID:"televet-review-confirm"})})]})}var PERSON_GLYPH="○";function nameOf(pets,petId){return petId?pets.find(p=>p.petRef===petId||p.petId===petId)?.name??null:null}function TelevetStepFrame({heading:heading,lead:lead,testID:testID,scrollTestID:scrollTestID,scrollRef:scrollRef,footer:footer,children:children}){let styles2=useBookingStyles(),theme=useEverfurTheme(),local=react.useMemo(()=>makeLocalStyles(theme),[theme]);/* @__PURE__ */
219
- return jsxRuntime.jsxs(reactNative.View,{style:styles2.scrollRoot,testID:testID,children:[
220
- /* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{...scrollRef?{ref:scrollRef}:{},style:styles2.scrollBody,contentContainerStyle:local.body,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive",showsVerticalScrollIndicator:false,...scrollTestID?{testID:scrollTestID}:{},children:[
218
+ /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.seeOtherVetsCta,kind:"secondary",onPress:onSeeOtherVets,testID:"televet-review-see-other-vets"})]}):null,failure2==="rate_limited"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.confirmFailed,testID:"televet-review-rate-limited"}):null,failure2==="not_entitled"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.bookingPausedTitle,testID:"televet-review-not-entitled"}):null]}),emergency?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.scrollFooter,children:/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:busy?TELEVET_BOOKING_COPY.confirmBusy:TELEVET_BOOKING_COPY.confirmCta,kind:"primary",loading:busy,disabled:!ready||busy||!!stateCode&&!stateAttested||!!cancellationTerms&&!termsAttested,onPress:onConfirm,testID:"televet-review-confirm"})})]})}var PERSON_GLYPH="○";function nameOf(pets,petId){return petId?pets.find(p=>p.petRef===petId||p.petId===petId)?.name??null:null}function TelevetStepFrame({heading:heading,lead:lead,testID:testID,scrollTestID:scrollTestID,scrollRef:scrollRef,footer:footer,children:children}){let styles2=useBookingStyles(),theme=useEverfurTheme(),local=react.useMemo(()=>makeLocalStyles(theme),[theme]),ios=reactNative.Platform.OS==="ios",keyboard=useChatKeyboardOffset(void 0,ios);/* @__PURE__ */
219
+ return jsxRuntime.jsx(reactNative.View,{style:styles2.scrollRoot,testID:testID,children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{behavior:ios?"padding":void 0,style:local.avoider,...keyboard.avoidingProps,children:[
220
+ /* @__PURE__ */jsxRuntime.jsx(KeyboardOffsetProbe,{probeRef:keyboard.probeRef}),
221
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{...scrollRef?{ref:scrollRef}:{},style:styles2.scrollBody,contentContainerStyle:local.body,keyboardShouldPersistTaps:"handled",keyboardDismissMode:ios?"interactive":"on-drag",showsVerticalScrollIndicator:false,...scrollTestID?{testID:scrollTestID}:{},children:[
221
222
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:local.head,children:[
222
- /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.stepTitle,accessibilityRole:"header",children:heading}),lead?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.stepHelp,children:lead}):null]}),children]}),footer?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.scrollFooter,children:footer}):null]})}function TelevetChoiceRow({title:title,meta:meta,selected:selected,onPress:onPress,testID:testID,leading:leading}){let theme=useEverfurTheme(),local=react.useMemo(()=>makeLocalStyles(theme),[theme]);/* @__PURE__ */
223
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.stepTitle,accessibilityRole:"header",children:heading}),lead?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.stepHelp,children:lead}):null]}),children]}),footer?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.scrollFooter,children:footer}):null]})})}function TelevetChoiceRow({title:title,meta:meta,selected:selected,onPress:onPress,testID:testID,leading:leading}){let theme=useEverfurTheme(),local=react.useMemo(()=>makeLocalStyles(theme),[theme]);/* @__PURE__ */
223
224
  return jsxRuntime.jsxs(reactNative.Pressable,{onPress:onPress,accessibilityRole:"radio",accessibilityLabel:meta?`${title}, ${meta}`:title,accessibilityState:{checked:selected,selected:selected},testID:testID,style:({pressed:pressed})=>[local.choice,selected?local.choiceSelected:null,pressed&&!theme.motion.reducedMotion?local.pressed:null],children:[leading??/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:local.radio,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[local.radioDot,selected?local.radioDotOn:null]})}),
224
225
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:local.choiceText,children:[
225
226
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:local.choiceTitle,children:title}),meta?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:local.choiceMeta,children:meta}):null]})]})}function PetStep({pets:pets,isPending:isPending,isError:isError,error:error,onRetry:onRetry,selectedId:selectedId,onSelect:onSelect,onNext:onNext,onAddPet:onAddPet}){let styles2=useBookingStyles(),theme=useEverfurTheme(),local=react.useMemo(()=>makeLocalStyles(theme),[theme]);return isPending?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.list,testID:"televet-pets-loading",children:[0,1].map(i=>/* @__PURE__ */jsxRuntime.jsx(TelevetSkeletonBlock,{height:72},i))}):isError?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"televet-pets-error",children:/* @__PURE__ */jsxRuntime.jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY.chrome.loadFailedTitle,actionLabel:TELEVET_BOOKING_COPY.chrome.retryCta,onRetry:onRetry})}):pets.length===0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"televet-pets-empty",children:/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY.chrome.noPetsTitle,actionLabel:TELEVET_BOOKING_COPY.addPetCta,onAction:onAddPet})}):/* @__PURE__ */jsxRuntime.jsxs(TelevetStepFrame,{heading:TELEVET_BOOKING_COPY.petSelectTitle,testID:"televet-booking-pets",footer:onNext?/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.continueCta,kind:"primary",disabled:!selectedId,onPress:onNext,testID:"televet-pets-next"}):null,children:[
@@ -228,7 +229,7 @@ return jsxRuntime.jsx(reactNative.View,{style:styles2.list,testID:"televet-clini
228
229
  return jsxRuntime.jsx(reactNative.View,{testID:"televet-clinicians-error",children:/* @__PURE__ */jsxRuntime.jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY.chrome.loadFailedTitle,actionLabel:TELEVET_BOOKING_COPY.chrome.retryCta,onRetry:onRetry})});if(clinicians.length===0)/* @__PURE__ */
229
230
  return jsxRuntime.jsx(reactNative.View,{testID:"televet-clinicians-empty",children:/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY.noCliniciansTitle,message:TELEVET_BOOKING_COPY.noCliniciansBody,actionLabel:TELEVET_BOOKING_COPY.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__ */
230
231
  return jsxRuntime.jsx(TelevetStepFrame,{heading:TELEVET_BOOKING_COPY.yourVetTitle,testID:"televet-clinicians",footer:/* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_BOOKING_COPY.continueCta,kind:"primary",onPress:()=>onSelect(vet.clinicianId),testID:`televet-clinician-${vet.clinicianId}`}),children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:local.meet,children:[
231
- /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:local.vetAvatar,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:local.vetAvatarText,children:initialOf(vet.displayName)})}),
232
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:local.vetAvatar,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:local.vetAvatarText,children:clinicianInitial(vet.displayName)||PERSON_GLYPH})}),
232
233
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:local.vetName,children:vet.credentials?`${vet.displayName}, ${vet.credentials}`:vet.displayName}),licensedHere&&stateName?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:local.pill,testID:"televet-vet-licensed",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:local.pillText,children:fill(TELEVET_BOOKING_COPY.licensedPillTemplate,{state:stateName})})}):null,vet.rating!==null&&vet.ratingCount!==null?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:local.vetRating,testID:"televet-vet-rating",children:`★ ${String(vet.rating)} · ${String(vet.ratingCount)} ${TELEVET_BOOKING_COPY.reviewsLabel}`}):null,vet.bio?/* @__PURE__ */jsxRuntime.jsx(Text,{style:local.vetBio,testID:"televet-vet-bio",children:vet.bio}):null]})})}function SlotStep({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 styles2=useBookingStyles();return enabled?isPending?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles2.list,testID:"televet-slots-loading",children:[0,1,2].map(i=>/* @__PURE__ */jsxRuntime.jsx(TelevetSkeletonBlock,{height:48},i))}):isError?/* @__PURE__ */jsxRuntime.jsx(TelevetLoadFailed,{error:error,title:TELEVET_BOOKING_COPY.slotsErrorTitle,actionLabel:TELEVET_BOOKING_COPY.retryCta,onRetry:onRetry,testID:"televet-slots-error"}):slots.length===0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:"televet-slots-empty",children:/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_BOOKING_COPY.noSlotsTitle,message:nextOpening?fill(TELEVET_BOOKING_COPY.nextOpeningTemplate,{when:formatWhenWithDay(nextOpening.startsAt)}):void 0,actionLabel:nextOpening?TELEVET_BOOKING_COPY.seeOtherVetsCta:void 0,onAction:nextOpening?onSeeOtherVets:void 0})}):
233
234
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.stepFillBox,testID:"televet-slots",children:[
234
235
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles2.stepTitle,accessibilityRole:"header",children:TELEVET_BOOKING_COPY.timeHeading}),failure2==="expired"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.holdExpired}):null,failure2==="taken"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.slotTaken}):null,failure2==="failed"||failure2==="rate_limited"?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.confirmFailed,testID:"televet-slots-hold-failed"}):null,
@@ -237,7 +238,7 @@ return jsxRuntime.jsxs(TelevetStepFrame,{heading:heading,lead:TELEVET_BOOKING_CO
237
238
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:local.field,children:[
238
239
  /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:local.fieldLabel,children:TELEVET_BOOKING_COPY.describeFieldLabel}),
239
240
  /* @__PURE__ */jsxRuntime.jsx(TextInput,{value:value,onChangeText:onChange,multiline:true,accessibilityLabel:TELEVET_BOOKING_COPY.describeFieldLabel,placeholder:TELEVET_BOOKING_COPY.reasonPlaceholder,placeholderTextColor:theme.color.text.placeholder,style:local.reasonInput,testID:"televet-reason-input"})]}),(composed??value).trim().length>REASON_TEXT_MAX?/* @__PURE__ */jsxRuntime.jsx(TelevetFailureLine,{message:TELEVET_BOOKING_COPY.reasonTooLong}):null,
240
- /* @__PURE__ */jsxRuntime.jsx(TelevetIntakeMedia,{media:media,onChange:onChangeMedia,meta:mediaLive?TELEVET_BOOKING_COPY.addPhotoMeta:null,...onPickMedia?{onPickMedia:onPickMedia}:{}})]})}function makeLocalStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),card=theme.slots.card,cardText=slotText(card);return reactNative.StyleSheet.create({marker:{minHeight:1},spacer:{height:space.md},body:{gap:space.xl,paddingBottom:space.xl},head:{gap:space.sm},pressed:{transform:[{scale:.98}]},choices:{gap:space.md},choice:{flexDirection:"row",alignItems:"center",gap:space.lg,minHeight:64,paddingVertical:space.lg,paddingHorizontal:18,borderRadius:radius.lg,borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,...slotBox(card,1.5)},choiceSelected:{borderColor:look.ink,backgroundColor:look.pinkSoft},radio:{width:22,height:22,borderRadius:11,borderWidth:1.5,borderColor:look.ink,alignItems:"center",justifyContent:"center"},radioDot:{width:10,height:10,borderRadius:5,backgroundColor:"transparent"},radioDotOn:{backgroundColor:look.ink},choiceText:{flex:1,gap:2},choiceTitle:{...face(theme,"bold"),color:look.ink,fontSize:size.body,lineHeight:size.body*lineHeight.snug},choiceMeta:{...face(theme,"regular"),color:look.muted,fontSize:size.caption,lineHeight:size.caption*lineHeight.normal},petDisc:{width:48,height:48,borderRadius:24,backgroundColor:look.mist,alignItems:"center",justifyContent:"center"},petDiscGlyph:{...face(theme,"medium"),color:look.ink,fontSize:size.subtitle,lineHeight:size.subtitle},meet:{alignItems:"center",gap:6,paddingVertical:space.xxl,paddingHorizontal:space.xl,borderRadius:radius.lg,borderWidth:1,borderColor:look.line,...slotBox(card,1)},vetAvatar:{width:104,height:104,borderRadius:52,borderWidth:4,borderColor:look.go,backgroundColor:look.mist,alignItems:"center",justifyContent:"center",marginBottom:space.sm},vetAvatarText:{...face(theme,"medium"),color:look.ink,fontSize:36,lineHeight:40},vetName:{...headingFace(theme,"medium"),color:look.ink,fontSize:size.heading,lineHeight:size.heading*lineHeight.snug,textAlign:"center",...cardText},pill:{height:24,paddingHorizontal:10,borderRadius:radius.pill,borderWidth:1.5,borderColor:look.line,justifyContent:"center",marginVertical:space.xs},pillText:{...face(theme,"monoBold"),color:look.muted,fontSize:11,letterSpacing:.9,textTransform:"uppercase"},vetRating:{...face(theme,"regular"),color:look.muted,fontSize:size.caption,lineHeight:size.caption*lineHeight.normal,...cardText},vetBio:{...face(theme,"regular"),color:look.text,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.relaxed,textAlign:"center",...cardText},field:{gap:space.sm},fieldLabel:{...face(theme,"bold"),color:look.ink,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.snug},reasonInput:{minHeight:140,textAlignVertical:"top",borderWidth:1.5,borderColor:look.line,borderRadius:radius.lg,paddingVertical:space.lg,paddingHorizontal:18,backgroundColor:look.surface,...face(theme,"regular"),color:color.text.primary,fontSize:size.body,lineHeight:size.body*lineHeight.relaxed,...slotBox(theme.slots.input,1.5),...slotText(theme.slots.input)},emergencyBanner:{gap:space.md,padding:18,borderRadius:radius.lg,borderWidth:1.5,borderColor:look.alert,backgroundColor:look.alertWash},emergencyTitle:{...face(theme,"bold"),color:color.errorRed,fontSize:size.subtitle,lineHeight:size.subtitle*lineHeight.snug},emergencyLede:{...face(theme,"regular"),color:look.text,fontSize:size.body,lineHeight:size.body*lineHeight.relaxed}})}function TelevetLoadFailed({error:error,title:title,actionLabel:actionLabel,onRetry:onRetry,testID:testID}){let wait=useRateLimitWait(error),test=testID===void 0?{}:{testID:testID};return wait.rateLimited?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_RATE_LIMITED_COPY.title,message:TELEVET_RATE_LIMITED_COPY.body,...wait.waiting?{}:{actionLabel:actionLabel,onAction:onRetry},testID:testID===void 0?"televet-rate-limited":`${testID}-rate-limited`}):/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:title,actionLabel:actionLabel,onAction:onRetry,...test})}function TelevetVisitSimulator({petId:petId,roster:roster,onAddPet:onAddPet,onPickPet:onPickPet}){return petId===null?/* @__PURE__ */jsxRuntime.jsx(PetStep,{pets:roster.pets,isPending:roster.loading,isError:roster.error!==null,onRetry:()=>{roster.refresh()},onAddPet:onAddPet,selectedId:null,onSelect:onPickPet}):/* @__PURE__ */jsxRuntime.jsx(SimulatorScreen,{petRef:petId})}function SimulatorScreen({petRef:petRef}){let styles2=useBookingStyles(),sim=useTelevetVisitSimulator(petRef);/* @__PURE__ */
241
+ /* @__PURE__ */jsxRuntime.jsx(TelevetIntakeMedia,{media:media,onChange:onChangeMedia,meta:mediaLive?TELEVET_BOOKING_COPY.addPhotoMeta:null,...onPickMedia?{onPickMedia:onPickMedia}:{}})]})}function makeLocalStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme,{size:size,lineHeight:lineHeight}=type,look=televetLook(theme),card=theme.slots.card,cardText=slotText(card);return reactNative.StyleSheet.create({marker:{minHeight:1},spacer:{height:space.md},body:{gap:space.xl,paddingBottom:space.xl},avoider:{flex:1,minHeight:0},head:{gap:space.sm},pressed:{transform:[{scale:.98}]},choices:{gap:space.md},choice:{flexDirection:"row",alignItems:"center",gap:space.lg,minHeight:64,paddingVertical:space.lg,paddingHorizontal:18,borderRadius:radius.lg,borderWidth:1.5,borderColor:look.line,backgroundColor:look.surface,...slotBox(card,1.5)},choiceSelected:{borderColor:look.ink,backgroundColor:look.pinkSoft},radio:{width:22,height:22,borderRadius:11,borderWidth:1.5,borderColor:look.ink,alignItems:"center",justifyContent:"center"},radioDot:{width:10,height:10,borderRadius:5,backgroundColor:"transparent"},radioDotOn:{backgroundColor:look.ink},choiceText:{flex:1,gap:2},choiceTitle:{...face(theme,"bold"),color:look.ink,fontSize:size.body,lineHeight:size.body*lineHeight.snug},choiceMeta:{...face(theme,"regular"),color:look.muted,fontSize:size.caption,lineHeight:size.caption*lineHeight.normal},petDisc:{width:48,height:48,borderRadius:24,backgroundColor:look.mist,alignItems:"center",justifyContent:"center"},petDiscGlyph:{...face(theme,"medium"),color:look.ink,fontSize:size.subtitle,lineHeight:size.subtitle},meet:{alignItems:"center",gap:6,paddingVertical:space.xxl,paddingHorizontal:space.xl,borderRadius:radius.lg,borderWidth:1,borderColor:look.line,...slotBox(card,1)},vetAvatar:{width:104,height:104,borderRadius:52,borderWidth:4,borderColor:look.go,backgroundColor:look.mist,alignItems:"center",justifyContent:"center",marginBottom:space.sm},vetAvatarText:{...face(theme,"medium"),color:look.ink,fontSize:36,lineHeight:40},vetName:{...headingFace(theme,"medium"),color:look.ink,fontSize:size.heading,lineHeight:size.heading*lineHeight.snug,textAlign:"center",...cardText},pill:{height:24,paddingHorizontal:10,borderRadius:radius.pill,borderWidth:1.5,borderColor:look.line,justifyContent:"center",marginVertical:space.xs},pillText:{...face(theme,"monoBold"),color:look.muted,fontSize:11,letterSpacing:.9,textTransform:"uppercase"},vetRating:{...face(theme,"regular"),color:look.muted,fontSize:size.caption,lineHeight:size.caption*lineHeight.normal,...cardText},vetBio:{...face(theme,"regular"),color:look.text,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.relaxed,textAlign:"center",...cardText},field:{gap:space.sm},fieldLabel:{...face(theme,"bold"),color:look.ink,fontSize:size.bodyTight,lineHeight:size.bodyTight*lineHeight.snug},reasonInput:{minHeight:140,textAlignVertical:"top",borderWidth:1.5,borderColor:look.line,borderRadius:radius.lg,paddingVertical:space.lg,paddingHorizontal:18,backgroundColor:look.surface,...face(theme,"regular"),color:color.text.primary,fontSize:size.body,lineHeight:size.body*lineHeight.relaxed,...slotBox(theme.slots.input,1.5),...slotText(theme.slots.input)},emergencyBanner:{gap:space.md,padding:18,borderRadius:radius.lg,borderWidth:1.5,borderColor:look.alert,backgroundColor:look.alertWash},emergencyTitle:{...face(theme,"bold"),color:color.errorRed,fontSize:size.subtitle,lineHeight:size.subtitle*lineHeight.snug},emergencyLede:{...face(theme,"regular"),color:look.text,fontSize:size.body,lineHeight:size.body*lineHeight.relaxed}})}function TelevetLoadFailed({error:error,title:title,actionLabel:actionLabel,onRetry:onRetry,testID:testID}){let wait=useRateLimitWait(error),test=testID===void 0?{}:{testID:testID};return wait.rateLimited?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_RATE_LIMITED_COPY.title,message:TELEVET_RATE_LIMITED_COPY.body,...wait.waiting?{}:{actionLabel:actionLabel,onAction:onRetry},testID:testID===void 0?"televet-rate-limited":`${testID}-rate-limited`}):/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:title,actionLabel:actionLabel,onAction:onRetry,...test})}function TelevetVisitSimulator({petId:petId,roster:roster,onAddPet:onAddPet,onPickPet:onPickPet}){return petId===null?/* @__PURE__ */jsxRuntime.jsx(PetStep,{pets:roster.pets,isPending:roster.loading,isError:roster.error!==null,onRetry:()=>{roster.refresh()},onAddPet:onAddPet,selectedId:null,onSelect:onPickPet}):/* @__PURE__ */jsxRuntime.jsx(SimulatorScreen,{petRef:petId})}function SimulatorScreen({petRef:petRef}){let styles2=useBookingStyles(),sim=useTelevetVisitSimulator(petRef);/* @__PURE__ */
241
242
  return jsxRuntime.jsx(reactNative.View,{style:styles2.stepFill,testID:"televet-simulator",children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{contentContainerStyle:styles2.list,children:[
242
243
  /* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:TELEVET_SIMULATOR_COPY.title}),
243
244
  /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_SIMULATOR_COPY.create,onPress:sim.create,kind:"secondary",disabled:sim.busy,testID:"televet-simulator-create"}),sim.visitLine!==null?/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
@@ -348,17 +349,19 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles2.screen,style],testID:"te
348
349
  return jsxRuntime.jsxs(reactNative.View,{style:styles2.bookCard,testID:"televet-visits-book-card",children:[
349
350
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.bookTitle,children:title}),
350
351
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.bookSubtitle,children:TELEVET_VISITS_COPY_NATIVE.bookCardSubtitle}),
351
- /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.bookCta,kind:"primary",onPress:onBook,testID:"televet-visits-book"})]})}var LOAD_OLDER_WITHIN=48;function TelevetVetThreadScreen({petRef:petRef,petName:petName,vetName:vetName,ownerCanStart:ownerCanStart,controller:injected,onBack:onBack,style:style}){let visit=useVisitStyles(),styles2=useVetThreadStyles(),controller=useTelevetBookingController(injected),thread=useVetThread(controller,petRef,{ownerCanStart:ownerCanStart}),[draft,setDraft]=react.useState(""),scrollRef=react.useRef(null),named=vetName?.trim()||newestVetName(thread.messages),vet=vetNameOr(named),newest=thread.messages[thread.messages.length-1]?.messageId;react.useEffect(()=>{thread.status==="ready"&&scrollRef.current?.scrollToEnd?.({animated:false})},[thread.status,newest]);let submit=()=>{let words=draft;words.trim().length===0||thread.sending||thread.send(words).then(landed=>{landed&&setDraft("")})},canSend=draft.trim().length>0&&!thread.sending;/* @__PURE__ */
352
+ /* @__PURE__ */jsxRuntime.jsx(TelevetButton,{label:TELEVET_VISITS_COPY_NATIVE.bookCta,kind:"primary",onPress:onBook,testID:"televet-visits-book"})]})}var LOAD_OLDER_WITHIN=48,AVOIDER=/* @__PURE__ */Object.freeze({flex:1,minHeight:0});function TelevetVetThreadScreen({petRef:petRef,petName:petName,vetName:vetName,ownerCanStart:ownerCanStart,controller:injected,onBack:onBack,style:style}){let visit=useVisitStyles(),styles2=useVetThreadStyles(),controller=useTelevetBookingController(injected),thread=useVetThread(controller,petRef,{ownerCanStart:ownerCanStart}),[draft,setDraft]=react.useState(""),scrollRef=react.useRef(null),ios=reactNative.Platform.OS==="ios",keyboard=useChatKeyboardOffset(void 0,ios),named=vetName?.trim()||newestVetName(thread.messages),vet=vetNameOr(named),newest=thread.messages[thread.messages.length-1]?.messageId;react.useEffect(()=>{thread.status==="ready"&&scrollRef.current?.scrollToEnd?.({animated:false})},[thread.status,newest]);let submit=()=>{let words=draft;words.trim().length===0||thread.sending||thread.send(words).then(landed=>{landed&&setDraft("")})},canSend=draft.trim().length>0&&!thread.sending;/* @__PURE__ */
352
353
  return jsxRuntime.jsxs(reactNative.View,{style:[visit.screen,style],testID:"televet-vet-thread",children:[
353
354
  /* @__PURE__ */jsxRuntime.jsx(TelevetVisitBackRow,{onBack:onBack,testID:"televet-vet-thread-back"}),
354
355
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.head,children:[
355
- /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.screenTitle,accessibilityRole:"header",children:sentenceCase(petNameOr(petName))}),named?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.meta,children:fillVetCopy(VET_MESSAGES_COPY.threadMetaTemplateNative,{vet:named})}):null]}),thread.status==="loading"?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:visit.stack,testID:"televet-vet-thread-loading",accessibilityLabel:VET_MESSAGES_COPY.loading,children:[
356
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.screenTitle,accessibilityRole:"header",children:sentenceCase(petNameOr(petName))}),named?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.meta,children:fillVetCopy(VET_MESSAGES_COPY.threadMetaTemplateNative,{vet:named})}):null]}),
357
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.KeyboardAvoidingView,{behavior:ios?"padding":void 0,style:AVOIDER,...keyboard.avoidingProps,children:[
358
+ /* @__PURE__ */jsxRuntime.jsx(KeyboardOffsetProbe,{probeRef:keyboard.probeRef}),thread.status==="loading"?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:visit.stack,testID:"televet-vet-thread-loading",accessibilityLabel:VET_MESSAGES_COPY.loading,children:[
356
359
  /* @__PURE__ */jsxRuntime.jsx(TelevetSkeletonBlock,{height:56}),
357
- /* @__PURE__ */jsxRuntime.jsx(TelevetSkeletonBlock,{height:56})]}):thread.status==="error"?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:VET_MESSAGES_COPY.loadFailed,actionLabel:VET_MESSAGES_COPY.retry,onAction:thread.retry,testID:"televet-vet-thread-error"}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{ref:scrollRef,accessibilityLabel:fillVetCopy(VET_MESSAGES_COPY.threadLogTemplate,{vet:vet}),contentContainerStyle:styles2.log,scrollEventThrottle:64,onScroll:event=>{event.nativeEvent.contentOffset.y<=LOAD_OLDER_WITHIN&&thread.loadOlder()},testID:"televet-vet-thread-log",children:[thread.messages.length===0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.system,children:VET_MESSAGES_COPY.empty}):null,thread.messages.map((message,index)=>/* @__PURE__ */jsxRuntime.jsx(ThreadItem,{message:message,previous:thread.messages[index-1],vet:vet,styles:styles2},message.messageId))]}),thread.status==="ready"&&thread.canWrite?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:visit.stack,children:[
360
+ /* @__PURE__ */jsxRuntime.jsx(TelevetSkeletonBlock,{height:56})]}):thread.status==="error"?/* @__PURE__ */jsxRuntime.jsx(TelevetStateCard,{title:VET_MESSAGES_COPY.loadFailed,actionLabel:VET_MESSAGES_COPY.retry,onAction:thread.retry,testID:"televet-vet-thread-error"}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.ScrollView,{ref:scrollRef,accessibilityLabel:fillVetCopy(VET_MESSAGES_COPY.threadLogTemplate,{vet:vet}),contentContainerStyle:styles2.log,scrollEventThrottle:64,keyboardShouldPersistTaps:"handled",keyboardDismissMode:ios?"interactive":"on-drag",onScroll:event=>{event.nativeEvent.contentOffset.y<=LOAD_OLDER_WITHIN&&thread.loadOlder()},testID:"televet-vet-thread-log",children:[thread.messages.length===0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.system,children:VET_MESSAGES_COPY.empty}):null,thread.messages.map((message,index)=>/* @__PURE__ */jsxRuntime.jsx(ThreadItem,{message:message,previous:thread.messages[index-1],vet:vet,styles:styles2},message.messageId))]}),thread.status==="ready"&&thread.canWrite?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:visit.stack,children:[
358
361
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.composer,children:[
359
362
  /* @__PURE__ */jsxRuntime.jsx(TextInput,{value:draft,onChangeText:setDraft,multiline:true,accessibilityLabel:sentenceCase(fillVetCopy(VET_MESSAGES_COPY.composerLabelTemplateNative,{vet:vet})),placeholder:fillVetCopy(VET_MESSAGES_COPY.composerPlaceholderTemplate,{vet:vet}),style:styles2.field,testID:"televet-vet-thread-field"}),
360
363
  /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:submit,disabled:!canSend,accessibilityRole:"button",accessibilityLabel:VET_MESSAGES_COPY.send,accessibilityState:{disabled:!canSend,busy:thread.sending},style:[styles2.send,canSend?null:styles2.sendDisabled],testID:"televet-vet-thread-send",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles2.sendLabel,children:VET_MESSAGES_COPY.send})})]}),thread.sendFailure==="notSent"?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.failure,accessibilityLiveRegion:"assertive",testID:"televet-vet-thread-failure",children:VET_MESSAGES_COPY.notSent}):thread.sentCount>0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.note,accessibilityLiveRegion:"polite",testID:"televet-vet-thread-status",children:VET_MESSAGES_COPY.sent}):null,
361
- /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.note,children:sentenceCase(fillVetCopy(VET_MESSAGES_COPY.composerNoteTemplate,{vet:vet}))})]}):null,thread.sendFailure==="vetWritesFirst"?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.note,accessibilityLiveRegion:"polite",testID:"televet-vet-thread-vet-first",children:VET_MESSAGES_COPY.vetWritesFirst}):null]})}function ThreadItem({message:message,previous:previous,vet:vet,styles:styles2}){let day=formatDayLong(message.createdAt),newDay=previous===void 0||formatDayLong(previous.createdAt)!==day,attachments=message.attachmentCount>0?fillVetCopy(VET_MESSAGES_COPY.attachmentsTemplate,{n:String(message.attachmentCount)}):null;/* @__PURE__ */
364
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.note,children:sentenceCase(fillVetCopy(VET_MESSAGES_COPY.composerNoteTemplate,{vet:vet}))})]}):null,thread.sendFailure==="vetWritesFirst"?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.note,accessibilityLiveRegion:"polite",testID:"televet-vet-thread-vet-first",children:VET_MESSAGES_COPY.vetWritesFirst}):null]})]})}function ThreadItem({message:message,previous:previous,vet:vet,styles:styles2}){let day=formatDayLong(message.createdAt),newDay=previous===void 0||formatDayLong(previous.createdAt)!==day,attachments=message.attachmentCount>0?fillVetCopy(VET_MESSAGES_COPY.attachmentsTemplate,{n:String(message.attachmentCount)}):null;/* @__PURE__ */
362
365
  return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[newDay?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.day,children:day}):null,message.role==="system"?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.system,children:message.content}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles2.item,message.role==="owner"?styles2.itemMine:null],testID:`televet-vet-thread-message-${message.messageId}`,children:[message.role==="vet"?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles2.whoRow,children:[
363
366
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.who,children:message.senderName??sentenceCase(vet)}),
364
367
  /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.time,children:formatClock(message.createdAt)})]}):null,message.content.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:message.role==="owner"?styles2.bubbleMine:styles2.bubbleVet,children:message.content}):null,attachments?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles2.attachments,children:attachments}):null]})]})}function newestVetName(messages){for(let i=messages.length-1;i>=0;i-=1){let name=messages[i]?.role==="vet"?messages[i]?.senderName:null;if(name)return name}return null}function TelevetVisitSummaryScreen({consult:consult,controller:injected,onBack:onBack,onMessageVet:onMessageVet,onBook:onBook,style:style}){let visit=useVisitStyles(),styles2=useVetThreadStyles(),controller=useTelevetBookingController(injected),read=useVisitSummary(controller,consult.consultId),{pets:pets}=useEverfurPets(),petName=nameOf(pets,consult.petId),summary=read.summary,named=summary?.approvedByName??consult.clinicianName,vet=vetNameOr(named),title=petName&&consult.clinicianName?fillVetCopy(TELEVET_VISITS_COPY_NATIVE.visitTitleTemplate,{pet:petName,vet:consult.clinicianName}):sentenceCase(petNameOr(petName)),meta=[formatDate(consult.scheduledAt),named].filter(Boolean).join(" · "),threadPetRef=vetThreadPetRef(pets,consult.petId),messageVet=onMessageVet&&threadPetRef!==null?()=>onMessageVet({petRef:threadPetRef,petName:petName,vetName:named??null}):void 0;/* @__PURE__ */
@@ -2,8 +2,8 @@ import { ReactNode, ComponentType, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { P as PetRef } from '../../ids-B2GAAifq.cjs';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.cjs';
5
- import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-Ds2JGcPE.cjs';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-Ds2JGcPE.cjs';
5
+ import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-DRwrhDUe.cjs';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-DRwrhDUe.cjs';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, b as TelevetCancelReceipt, c as TelevetSlot } from '../../televetGlobal-C5dTUACe.cjs';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../televetGlobal-C5dTUACe.cjs';
9
9
  import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.cjs';
@@ -12,11 +12,11 @@ export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCa
12
12
  export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../callRoom-BhIdadyV.cjs';
13
13
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.cjs';
14
14
  export { E as EverfurResult } from '../../EverfurResult-COlXj1wq.cjs';
15
- export { W as WidgetPet } from '../../petsRepository-BYe7_MUo.cjs';
16
- import '../../requestFunnel-u8qnM5Ll.cjs';
15
+ export { W as WidgetPet } from '../../petsRepository-CQeuDdDC.cjs';
16
+ import '../../requestFunnel-hXkP5T7K.cjs';
17
17
  import '../../ErrorPolicyPort-10s3HJCt.cjs';
18
- import '../../config-C68HTCf4.cjs';
19
- import '../../identity-ScajqjK5.cjs';
18
+ import '../../config-lilR0260.cjs';
19
+ import '../../identity-YXqHjBln.cjs';
20
20
  import '../../TelemetryPort-BDNr00hu.cjs';
21
21
  import '../../profile-CSs1wlXT.cjs';
22
22
 
@@ -2,8 +2,8 @@ import { ReactNode, ComponentType, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { P as PetRef } from '../../ids-B2GAAifq.js';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.js';
5
- import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-CJLAgEgK.js';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-CJLAgEgK.js';
5
+ import { T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../bookingCopy-Cc3Cl-IJ.js';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, B as TelevetJoinReadiness, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UseVetThreadOptions, V as VET_MESSAGES_COPY, I as VET_MESSAGE_CONTENT_MAX, J as VET_MESSAGE_PAGE_DEFAULT, K as VET_MESSAGE_PAGE_MAX, L as VetMessage, M as VetMessagePage, O as VetMessageRole, P as VetMessagesAvailability, Q as VetSendFailure, R as VetThread, S as VetThreadState, W as VetThreadsState, X as VisitSummary, Y as VisitSummaryMedication, Z as VisitSummaryState, _ as attestation, $ as canConfirm, a0 as canManageTelevetVisit, a1 as createTelevetBookingController, a2 as currentStep, a3 as emptyTelevetDraft, a4 as formatVisitRange, a5 as formatWhen, a6 as formatWhenWithDay, a7 as hasPreviousStep, a8 as initialTelevetBookingState, a9 as isHoldExpired, aa as isMediaShortfallEmpty, ab as isSkipped, ac as isTelevetBookingCopyReady, ad as isVetMessagesDark, ae as isVetThreadVetFirst, af as mediaShortfallFromUnsentPicks, ag as splitTelevetVisits, ah as televetBookingKey, ai as televetBookingReducer, aj as televetBookingRefusal, ak as televetCancelCall, al as televetConsultCall, am as televetEmptyRosterCause, an as televetEmptyRosterView, ao as televetHoldCall, ap as televetJoinCall, aq as televetJoinOpensAtMs, ar as televetJoinReadiness, as as televetMediaShortfallLines, at as televetRescheduleCall, au as televetThreadMessagesCall, av as televetThreadReadCall, aw as televetVisitSummaryCall, ax as useEarlyTriage, ay as useStateInterest, az as useTelevetBookConsult, aA as useTelevetBookingAvailable, aB as useTelevetBookingController, aC as useTelevetBookingEntitlement, aD as useTelevetCancellationPolicy, aE as useTelevetClinicians, aF as useTelevetHoldSlot, aG as useTelevetJoin, aH as useTelevetNextSlot, aI as useTelevetRescheduleConsult, aJ as useTelevetSlots, aK as useTelevetStatePolicy, aL as useVetThread, aM as useVetThreads, aN as useVisitSummary, aO as validateBookingBody, aP as vetThreadPetRef, aQ as withUnsentPicks } from '../../bookingCopy-Cc3Cl-IJ.js';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, b as TelevetCancelReceipt, c as TelevetSlot } from '../../televetGlobal-CnjrfhT4.js';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../televetGlobal-CnjrfhT4.js';
9
9
  import { V as VetVisitIntent } from '../../visitIntent-D7_yVp1I.js';
@@ -12,11 +12,11 @@ export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCa
12
12
  export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../callRoom-B92eH_ij.js';
13
13
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-DeBqRpQV.js';
14
14
  export { E as EverfurResult } from '../../EverfurResult-ClPTS0P2.js';
15
- export { W as WidgetPet } from '../../petsRepository-BdfbY9Oe.js';
16
- import '../../requestFunnel-Dhaj0yUq.js';
15
+ export { W as WidgetPet } from '../../petsRepository-B1I6Lq_m.js';
16
+ import '../../requestFunnel-B86gQFka.js';
17
17
  import '../../ErrorPolicyPort-C3nNSS_j.js';
18
- import '../../config-DeUmccwl.js';
19
- import '../../identity-BTT6YtH5.js';
18
+ import '../../config-CuOczZUI.js';
19
+ import '../../identity-4lohfP2L.js';
20
20
  import '../../TelemetryPort-BDNr00hu.js';
21
21
  import '../../profile-CSs1wlXT.js';
22
22