@everfur/sdk 0.8.0 → 0.9.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 (139) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +1 -1
  3. package/dist/{Chat-s2vcPbw3.d.cts → Chat-Cb3Y8VwS.d.cts} +3 -3
  4. package/dist/{Chat-Cv9EYMYA.d.ts → Chat-ClhB_8sp.d.ts} +3 -3
  5. package/dist/{DepthViews-CVxUHOJ-.d.ts → DepthViews-BSkuUGBB.d.ts} +1 -1
  6. package/dist/{DepthViews-DNRY0Ugm.d.ts → DepthViews-CSCS-tZg.d.ts} +1 -1
  7. package/dist/{DepthViews-Cz7mSW7p.d.cts → DepthViews-CW1z8pnl.d.cts} +1 -1
  8. package/dist/{DepthViews-DvNixbxg.d.cts → DepthViews-DDiPxyzg.d.cts} +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-y3EcOX_w.d.cts → attachments-BD70jZZL.d.cts} +2 -2
  14. package/dist/{attachments-y_aO4hlk.d.ts → attachments-CC7aHpwZ.d.ts} +5 -5
  15. package/dist/{attachments-BaslXMdS.d.ts → attachments-DAUy3vPR.d.ts} +2 -2
  16. package/dist/{attachments-DbFwz4iq.d.cts → attachments-DaOaIBNf.d.cts} +5 -5
  17. package/dist/{bookingCopy-B3UMITD-.d.ts → bookingCopy-CUW9Gdzc.d.ts} +2 -2
  18. package/dist/{bookingCopy-4i1R7klo.d.cts → bookingCopy-oEjqkiNA.d.cts} +2 -2
  19. package/dist/{branding-BYEqU855.d.ts → branding-aGleD_ki.d.ts} +99 -6
  20. package/dist/{branding-BwEu68C8.d.cts → branding-ctD0B2Th.d.cts} +99 -6
  21. package/dist/{casesRepository-B6Z0XBIb.d.cts → casesRepository-Bzs7aw4t.d.cts} +1 -1
  22. package/dist/{casesRepository-SI0zp5YH.d.ts → casesRepository-CywqL6mj.d.ts} +1 -1
  23. package/dist/chat/index.cjs +20 -18
  24. package/dist/chat/index.d.cts +9 -9
  25. package/dist/chat/index.d.ts +9 -9
  26. package/dist/chat/index.js +20 -18
  27. package/dist/client/index.cjs +7 -7
  28. package/dist/client/index.d.cts +10 -10
  29. package/dist/client/index.d.ts +10 -10
  30. package/dist/client/index.js +7 -7
  31. package/dist/{config-Cvo47voG.d.ts → config-BysLVhku.d.ts} +1 -1
  32. package/dist/{config-v5k6NsK_.d.cts → config-EZzEyS-c.d.cts} +1 -1
  33. package/dist/consent/index.cjs +1 -1
  34. package/dist/consent/index.d.cts +5 -5
  35. package/dist/consent/index.d.ts +5 -5
  36. package/dist/consent/index.js +1 -1
  37. package/dist/{context-BZOtJbBO.d.cts → context-DUwYArkM.d.cts} +7 -7
  38. package/dist/{context-cZ7NZ0sG.d.ts → context-DpfgbnOU.d.ts} +7 -7
  39. package/dist/{copy-ChJupm1p.d.cts → copy-DK4r9oGz.d.cts} +2 -2
  40. package/dist/{copy-CZBUHbyS.d.ts → copy-LxZGnFXJ.d.ts} +2 -2
  41. package/dist/core/index.cjs +2 -2
  42. package/dist/core/index.d.cts +15 -15
  43. package/dist/core/index.d.ts +15 -15
  44. package/dist/core/index.js +2 -2
  45. package/dist/{depth-CRyU7-pf.d.cts → depth-DAd77kRe.d.cts} +2 -2
  46. package/dist/{depth-vNpwOkZ8.d.ts → depth-Mk7quUNa.d.ts} +2 -2
  47. package/dist/{entitlementRepository-CUdxbQrP.d.ts → entitlementRepository-CrD0O7VR.d.ts} +3 -3
  48. package/dist/{entitlementRepository-Bv8nSYRd.d.cts → entitlementRepository-Dra_4FU_.d.cts} +3 -3
  49. package/dist/{identity-BHaMJ3KK.d.cts → identity-75whJXyP.d.cts} +1 -1
  50. package/dist/{identity-B8GkH53J.d.ts → identity-BiyMDMrR.d.ts} +1 -1
  51. package/dist/index.cjs +24 -22
  52. package/dist/index.d.cts +16 -16
  53. package/dist/index.d.ts +16 -16
  54. package/dist/index.js +24 -22
  55. package/dist/notifications/index.d.cts +2 -2
  56. package/dist/notifications/index.d.ts +2 -2
  57. package/dist/{pets-BI7Ji8hi.d.cts → pets-DoXxTw4x.d.cts} +1 -1
  58. package/dist/{pets-Dnn-DK1T.d.ts → pets-W2BuLYko.d.ts} +1 -1
  59. package/dist/{petsRepository-B2lO1sKS.d.ts → petsRepository-ByMzq1Z9.d.ts} +1 -1
  60. package/dist/{petsRepository-BP9nhM1R.d.cts → petsRepository-yyoo0k2I.d.cts} +1 -1
  61. package/dist/photo/index.cjs +1 -1
  62. package/dist/photo/index.js +1 -1
  63. package/dist/{ports-C40S2V14.d.cts → ports-BeVJYP0_.d.cts} +4 -4
  64. package/dist/{ports-BUXF0Rp3.d.ts → ports-zYl8S_lI.d.ts} +4 -4
  65. package/dist/records/depth/index.cjs +6 -6
  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 +6 -6
  69. package/dist/records/index.cjs +30 -30
  70. package/dist/records/index.d.cts +9 -9
  71. package/dist/records/index.d.ts +9 -9
  72. package/dist/records/index.js +30 -30
  73. package/dist/{requestFunnel-BrOijMcw.d.ts → requestFunnel-BPeBZdKp.d.ts} +2 -2
  74. package/dist/{requestFunnel-BxNVGyGm.d.cts → requestFunnel-DHeSzCT6.d.cts} +2 -2
  75. package/dist/{runtimeTypes-CvI1ZH8j.d.ts → runtimeTypes-Cc207nbn.d.ts} +5 -5
  76. package/dist/{runtimeTypes-DOO3f-W-.d.cts → runtimeTypes-DgMizQKz.d.cts} +5 -5
  77. package/dist/server/events/index.cjs +1 -1
  78. package/dist/server/events/index.d.cts +2 -2
  79. package/dist/server/events/index.d.ts +2 -2
  80. package/dist/server/events/index.js +1 -1
  81. package/dist/server/index.cjs +1 -1
  82. package/dist/server/index.d.cts +3 -3
  83. package/dist/server/index.d.ts +3 -3
  84. package/dist/server/index.js +1 -1
  85. package/dist/televet/booking/index.cjs +15 -13
  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 +15 -13
  89. package/dist/televet/call/index.cjs +1 -1
  90. package/dist/televet/call/index.js +1 -1
  91. package/dist/televet/index.cjs +1 -1
  92. package/dist/televet/index.js +1 -1
  93. package/dist/testing/index.d.cts +1 -1
  94. package/dist/testing/index.d.ts +1 -1
  95. package/dist/testing/rn/index.cjs +1 -1
  96. package/dist/testing/rn/index.d.cts +9 -9
  97. package/dist/testing/rn/index.d.ts +9 -9
  98. package/dist/testing/rn/index.js +1 -1
  99. package/dist/testing/web/index.d.cts +9 -9
  100. package/dist/testing/web/index.d.ts +9 -9
  101. package/dist/{timelineRows-CEx2TzYB.d.ts → timelineRows-D22vGN9t.d.ts} +1 -1
  102. package/dist/{timelineRows-Dffceql_.d.cts → timelineRows-DUQIWSjc.d.cts} +1 -1
  103. package/dist/{tokens-Tzo1KBND.d.cts → tokens-RAKZj7M8.d.cts} +47 -4
  104. package/dist/{tokens-Tzo1KBND.d.ts → tokens-RAKZj7M8.d.ts} +47 -4
  105. package/dist/{typeStyle-C3IG9Sft.d.ts → typeStyle-DVj8iCC1.d.ts} +11 -3
  106. package/dist/{typeStyle-CZ3Tj60N.d.cts → typeStyle-Nt7w0rhE.d.cts} +11 -3
  107. package/dist/{useRecordsDepth-DuPUJFDQ.d.ts → useRecordsDepth-C0Qfoghi.d.ts} +1 -1
  108. package/dist/{useRecordsDepth-D6a6-_u_.d.cts → useRecordsDepth-Mbysp548.d.cts} +1 -1
  109. package/dist/video/index.cjs +1 -1
  110. package/dist/video/index.js +1 -1
  111. package/dist/{view-UFwCG1Pn.d.cts → view-CskIgOFV.d.cts} +2 -2
  112. package/dist/{view-BSmN5RWf.d.ts → view-DqKXtxEZ.d.ts} +2 -2
  113. package/dist/web/consent/index.cjs +1 -1
  114. package/dist/web/consent/index.d.cts +5 -5
  115. package/dist/web/consent/index.d.ts +5 -5
  116. package/dist/web/consent/index.js +1 -1
  117. package/dist/web/index.cjs +29 -28
  118. package/dist/web/index.d.cts +26 -20
  119. package/dist/web/index.d.ts +26 -20
  120. package/dist/web/index.js +29 -28
  121. package/dist/web/notifications/index.d.cts +3 -3
  122. package/dist/web/notifications/index.d.ts +3 -3
  123. package/dist/web/records/depth/index.cjs +9 -8
  124. package/dist/web/records/depth/index.d.cts +7 -7
  125. package/dist/web/records/depth/index.d.ts +7 -7
  126. package/dist/web/records/depth/index.js +9 -8
  127. package/dist/web/records/index.cjs +51 -49
  128. package/dist/web/records/index.d.cts +9 -9
  129. package/dist/web/records/index.d.ts +9 -9
  130. package/dist/web/records/index.js +52 -50
  131. package/dist/web/televet/booking/index.cjs +21 -19
  132. package/dist/web/televet/booking/index.d.cts +11 -11
  133. package/dist/web/televet/booking/index.d.ts +11 -11
  134. package/dist/web/televet/booking/index.js +21 -19
  135. package/dist/web/televet/call/index.cjs +1 -1
  136. package/dist/web/televet/call/index.js +1 -1
  137. package/dist/web/televet/index.cjs +1 -1
  138. package/dist/web/televet/index.js +1 -1
  139. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
1
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-pEXDbUJ1.js';
2
2
  export { E as EverfurResult } from '../../EverfurResult-sKkoXew0.js';
3
3
  export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '../../ids-B2GAAifq.js';
4
- export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-BYEqU855.js';
4
+ export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens-RAKZj7M8.js';
5
+ export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-aGleD_ki.js';
5
6
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.js';
6
- export { E as EntitlementSnapshot } from '../../runtimeTypes-CvI1ZH8j.js';
7
+ export { E as EntitlementSnapshot } from '../../runtimeTypes-Cc207nbn.js';
7
8
  export { c as RecordsRequestStatus, d as RecordsRequestView, e as RecordsSimpleStatus } from '../../models-CrbUwbuS.js';
8
9
  import { ReactNode } from 'react';
9
10
  import { R as RiskTier } from '../../PhotoController-vzY5bfY_.js';
10
11
  export { EverfurTestEntitlements, RecordsSandboxActionResult, RecordsSandboxClinicReply, RecordsSandboxController, RecordsSandboxResult, VetVisitSandboxActionResult, VetVisitSandboxController, VetVisitSandboxEvent, VetVisitSandboxReminderStage, VetVisitSandboxResult, VetVisitSandboxStatus, VetVisitSandboxVisit, useEverfurRecordsSandbox, useEverfurTestEntitlements, useEverfurVetVisitSandbox } from '../web/index.js';
11
- import '../../tokens-Tzo1KBND.js';
12
- import '../../petsRepository-B2lO1sKS.js';
13
- import '../../identity-B8GkH53J.js';
14
- import '../../config-Cvo47voG.js';
12
+ import '../../petsRepository-ByMzq1Z9.js';
13
+ import '../../identity-BiyMDMrR.js';
14
+ import '../../config-BysLVhku.js';
15
15
  import '../../profile-CSs1wlXT.js';
16
16
  import '../../cacheEpoch-DknKn3S0.js';
17
17
  import '../../ErrorPolicyPort-DwSnmGcX.js';
18
- import '../../ports-BUXF0Rp3.js';
19
- import '../../casesRepository-SI0zp5YH.js';
20
- import '../../requestFunnel-BrOijMcw.js';
18
+ import '../../ports-zYl8S_lI.js';
19
+ import '../../casesRepository-CywqL6mj.js';
20
+ import '../../requestFunnel-BPeBZdKp.js';
21
21
  import '../../TelemetryPort-BDNr00hu.js';
22
22
  import '../../ports-BN6RHF9W.js';
23
23
  import '../../CameraPort-Cv31Pz7g.js';
@@ -1,4 +1,4 @@
1
- import{createContext,forwardRef,createElement,useMemo,useState,useEffect,useRef,useContext}from"react";import{TextInput,Animated,Easing,View,StyleSheet,Text as Text$1}from"react-native";import{jsx,jsxs,Fragment}from"react/jsx-runtime";import{z}from"zod";var CHAT_COPY=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",footnoteNative:"Educational, not a diagnosis. Emergency? Call a vet.",footnoteWeb:"Everfur’s assistant isn’t a vet and doesn’t diagnose. Your vet makes the calls. Not for emergencies: if {petName} is in distress, go to the nearest emergency animal hospital now.",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});function fillCopy(template,values){return template.replace(/\{(\w+)\}/g,(match,key)=>{let value=values[key];return value===void 0?match:String(value)})}function petNameSlot(name){return name?.trim()||CHAT_COPY.emptyTitlePetFallback}function forPet(template,name){return fillCopy(template,{petName:petNameSlot(name)})}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return createElement(Text$1,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}forwardRef(function(props,ref){return createElement(TextInput,{...props,...ref===null?{}:{ref:ref}})});function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var MIN_SURFACE_HEIGHT=120,MIN_TOUCH_TARGET=44,INPUT_MAX_HEIGHT=120,BUBBLE_MAX_WIDTH="88%",BUBBLE_MAX_WIDTH_CAP=520,HALF_STEP=2,BUBBLE_EDGE_WIDTH=.5,BUBBLE_LEAD_USER=1.5,BUBBLE_LEAD_ASSISTANT=1.6,PENDING_OPACITY=.6,COMPOSER_MIN_HEIGHT=56,COMPOSER_BORDER_WIDTH=1.5,COMPOSER_PADDING_RIGHT=5,COMPOSER_PADDING_VERTICAL=5,INPUT_MIN_HEIGHT=36,INPUT_LINE_HEIGHT=20,APP_BODY_SIZE=14,SEND_CONTROL_SIZE=MIN_TOUCH_TARGET;var SEND_DISABLED_OPACITY=.4,ATTACH_CONTROL_SIZE=MIN_TOUCH_TARGET;var ATTACH_DISABLED_OPACITY=.4,EMPTY_MIN_HEIGHT=480,FOLLOW_UP_HEADING_SIZE=12,FOLLOW_UP_HEADING_TRACKING=.72,FOLLOW_UP_ROW_MIN_HEIGHT=48,RULE_WIDTH=1,FOOTNOTE_SIZE=12,FOOTNOTE_LINE=18,EMPTY_PADDING_TOP="12%";function useChatTheme(){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles(theme),[theme]);return{theme:theme,styles:styles}}function makeStyles(theme){let c=theme.color,s=theme.space,r=theme.radius,t=theme.type,userLine=Math.round(t.size.body*BUBBLE_LEAD_USER),assistantLine=Math.round(t.size.body*BUBBLE_LEAD_ASSISTANT),inputLine=Math.round(INPUT_LINE_HEIGHT*t.size.body/APP_BODY_SIZE),rule=c.borderRingCream,slots=theme.slots;return StyleSheet.create({container:{flex:1,minHeight:MIN_SURFACE_HEIGHT,backgroundColor:c.chatGround},body:{flex:1},centered:{minHeight:MIN_SURFACE_HEIGHT,flexGrow:1,alignItems:"center",justifyContent:"center",padding:s.xl},emptyContent:{flexGrow:1,alignItems:"stretch",justifyContent:"flex-start",paddingTop:EMPTY_PADDING_TOP,paddingHorizontal:s.lg,paddingBottom:s.lg,minHeight:EMPTY_MIN_HEIGHT,gap:s.lg},errorText:{...face(theme,"regular"),fontSize:t.size.subtitle,lineHeight:t.size.subtitle*t.lineHeight.snug,color:c.danger,textAlign:"center",marginBottom:s.md},retryButton:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:s.xl,paddingVertical:s.sm,borderRadius:r.pill,backgroundColor:c.brand,...slotBox(slots.primaryButton)},retryLabel:{...face(theme,"medium"),color:c.onPrimary,fontSize:t.size.body,...slotText(slots.primaryButton)},setupNotice:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.sm,paddingHorizontal:s.lg,paddingVertical:s.sm,backgroundColor:c.surfaceCream},setupNoticeText:{...face(theme,"regular"),color:c.danger,fontSize:t.size.caption,flexShrink:1},turnNotice:{gap:s.xs,padding:s.md,borderRadius:r.lg,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.brandBorder,alignItems:"flex-start"},turnNoticeError:{borderColor:c.danger},turnNoticeTitle:{...face(theme,"bold"),color:c.text.primary,fontSize:t.size.body},turnNoticeTitleError:{color:c.danger},turnNoticeBody:{...face(theme,"regular"),color:c.text.secondary,fontSize:t.size.caption,lineHeight:t.size.caption*t.lineHeight.normal},turnNoticeAction:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center"},turnNoticeActionLabel:{...face(theme,"medium"),color:c.brandInk,fontSize:t.size.body},setupNoticeAction:{...face(theme,"medium"),color:c.brandInk,fontSize:t.size.caption},reconnectingCaption:{...face(theme,"medium"),color:c.text.secondary,fontSize:t.size.caption,lineHeight:t.size.caption*t.lineHeight.normal,textTransform:"uppercase",letterSpacing:.5},readingLine:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.bodyTight,lineHeight:Math.round(t.size.bodyTight*t.lineHeight.relaxed)},list:{flex:1},listContent:{padding:s.lg,gap:s.xl},rowBlock:{gap:s.sm},rowBlockUser:{},rowBlockAssistant:{paddingRight:s.xl},row:{flexDirection:"row"},rowUser:{justifyContent:"flex-end"},rowAssistant:{justifyContent:"flex-start"},bubble:{maxWidth:BUBBLE_MAX_WIDTH,alignItems:"flex-start"},bubbleSideUser:{alignItems:"flex-end"},bubbleUser:{maxWidth:BUBBLE_MAX_WIDTH_CAP,paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,backgroundColor:c.bubbleUser,...c.primaryEdge!==c.primary&&c.bubbleUser===c.primary?{borderWidth:BUBBLE_EDGE_WIDTH,borderColor:c.primaryEdge}:{},borderRadius:r.lg,borderBottomRightRadius:r.xs,...slotBox(slots.userBubble,BUBBLE_EDGE_WIDTH)},bubbleAssistant:slots.assistantBubble?.backgroundColor===void 0?{...slotBox(slots.assistantBubble,BUBBLE_EDGE_WIDTH)}:{paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,borderRadius:r.lg,...slotBox(slots.assistantBubble,BUBBLE_EDGE_WIDTH)},bubbleVet:{maxWidth:BUBBLE_MAX_WIDTH_CAP,paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,backgroundColor:c.bubbleVet,borderRadius:r.lg,borderTopLeftRadius:r.xs,...slotBox(slots.vetBubble,BUBBLE_EDGE_WIDTH)},bubblePending:{opacity:PENDING_OPACITY},bubbleTextUser:{...face(theme,"regular"),color:c.onPrimary,fontSize:t.size.body,lineHeight:userLine,...slotText(slots.userBubble)},bubbleTextAssistant:{...face(theme,"regular"),color:c.text.primary,fontSize:t.size.body,lineHeight:assistantLine,...slotText(slots.assistantBubble)},bubbleTextVet:{...face(theme,"regular"),color:c.onBubbleVet,fontSize:t.size.body,lineHeight:userLine,...slotText(slots.vetBubble)},assistantName:{...face(theme,"bold"),color:c.brandInk,fontSize:t.size.bodyTight,marginBottom:s.xs},vetHeader:{flexDirection:"row",alignItems:"baseline",gap:s.sm,marginBottom:s.xs},vetSender:{...face(theme,"bold"),color:c.text.primary,fontSize:t.size.bodyTight},vetTime:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.caption},bubbleBold:face(theme,"bold"),bubbleItalic:{fontStyle:"italic"},bubbleCode:face(theme,"mono"),followUps:{alignSelf:"stretch",marginTop:s.md},followUpsHeading:{...face(theme,"monoBold"),color:c.text.muted,fontSize:FOLLOW_UP_HEADING_SIZE,textTransform:"uppercase",letterSpacing:FOLLOW_UP_HEADING_TRACKING,paddingBottom:s.sm,borderBottomWidth:RULE_WIDTH,borderBottomColor:rule},followUpSlot:{alignSelf:"stretch"},followUpSlotRuled:{borderTopWidth:RULE_WIDTH,borderTopColor:rule},followUpRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.md,minHeight:FOLLOW_UP_ROW_MIN_HEIGHT,paddingVertical:s.sm+HALF_STEP},followUpText:{...face(theme,"bold"),flex:1,color:c.brandInk,fontSize:t.size.bodyTight},composerOuter:{position:"relative"},composer:{marginHorizontal:s.md,marginTop:s.xs,minHeight:COMPOSER_MIN_HEIGHT,justifyContent:"center",paddingLeft:s.sm,paddingRight:COMPOSER_PADDING_RIGHT,paddingVertical:COMPOSER_PADDING_VERTICAL,backgroundColor:c.composerFill,borderWidth:COMPOSER_BORDER_WIDTH,borderColor:c.composerBorder,borderRadius:r.pill,...slotBox(slots.composerInput,COMPOSER_BORDER_WIDTH)},composerRow:{flexDirection:"row",alignItems:"center",gap:s.xs,minHeight:INPUT_MIN_HEIGHT},attachControl:{width:ATTACH_CONTROL_SIZE,height:ATTACH_CONTROL_SIZE,alignItems:"center",justifyContent:"center"},attachControlDisabled:{opacity:ATTACH_DISABLED_OPACITY},input:{flex:1,minHeight:INPUT_MIN_HEIGHT,maxHeight:INPUT_MAX_HEIGHT,paddingHorizontal:0,paddingVertical:0,...face(theme,"regular"),fontSize:t.size.body,lineHeight:inputLine,color:c.text.primary,...slotText(slots.composerInput)},sendControl:{minHeight:SEND_CONTROL_SIZE,minWidth:SEND_CONTROL_SIZE,alignItems:"center",justifyContent:"center"},sendDisc:{width:SEND_CONTROL_SIZE,height:SEND_CONTROL_SIZE,borderRadius:SEND_CONTROL_SIZE/2,alignItems:"center",justifyContent:"center",...slotBox(slots.sendButton)},sendControlDisabled:{opacity:SEND_DISABLED_OPACITY},footnote:{...face(theme,"regular"),color:c.text.muted,fontSize:FOOTNOTE_SIZE,lineHeight:FOOTNOTE_LINE,textAlign:"center",marginTop:s.sm,marginBottom:s.xs,paddingHorizontal:s.lg},poweredBy:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.micro,textAlign:"center",paddingBottom:s.xs}})}function TypingIndicator({petName:petName=null}){let{styles:styles}=useChatTheme(),line=forPet(CHAT_COPY.reading,petName);/* @__PURE__ */
1
+ import{createContext,forwardRef,createElement,useMemo,useState,useEffect,useRef,useContext}from"react";import{TextInput,Animated,Easing,View,StyleSheet,Text as Text$1}from"react-native";import{jsx,jsxs,Fragment}from"react/jsx-runtime";import{z}from"zod";var CHAT_COPY=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",footnoteNative:"Educational, not a diagnosis. Emergency? Call a vet.",footnoteWeb:"Everfur’s assistant isn’t a vet and doesn’t diagnose. Your vet makes the calls. Not for emergencies: if {petName} is in distress, go to the nearest emergency animal hospital now.",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});function fillCopy(template,values){return template.replace(/\{(\w+)\}/g,(match,key)=>{let value=values[key];return value===void 0?match:String(value)})}function petNameSlot(name){return name?.trim()||CHAT_COPY.emptyTitlePetFallback}function forPet(template,name){return fillCopy(template,{petName:petNameSlot(name)})}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return createElement(Text$1,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}forwardRef(function(props,ref){return createElement(TextInput,{...props,...ref===null?{}:{ref:ref}})});function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base=face(theme,fallback);return base.fontWeight===void 0||headingWeight===null?base:{fontFamily:base.fontFamily,fontWeight:headingWeight}}var MIN_SURFACE_HEIGHT=120,MIN_TOUCH_TARGET=44,INPUT_MAX_HEIGHT=120,BUBBLE_MAX_WIDTH="88%",BUBBLE_MAX_WIDTH_CAP=520,HALF_STEP=2,BUBBLE_EDGE_WIDTH=.5,BUBBLE_LEAD_USER=1.5,BUBBLE_LEAD_ASSISTANT=1.6,PENDING_OPACITY=.6,COMPOSER_MIN_HEIGHT=56,COMPOSER_BORDER_WIDTH=1.5,COMPOSER_PADDING_RIGHT=5,COMPOSER_PADDING_VERTICAL=5,INPUT_MIN_HEIGHT=36,INPUT_LINE_HEIGHT=20,APP_BODY_SIZE=14,SEND_CONTROL_SIZE=MIN_TOUCH_TARGET;var SEND_DISABLED_OPACITY=.4,ATTACH_CONTROL_SIZE=MIN_TOUCH_TARGET;var ATTACH_DISABLED_OPACITY=.4,EMPTY_MIN_HEIGHT=480,FOLLOW_UP_HEADING_SIZE=12,FOLLOW_UP_HEADING_TRACKING=.72,FOLLOW_UP_ROW_MIN_HEIGHT=48,RULE_WIDTH=1,FOOTNOTE_SIZE=12,FOOTNOTE_LINE=18,EMPTY_PADDING_TOP="12%",ASSISTANT_AVATAR_SIZE=20;function useChatTheme(){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles(theme),[theme]);return{theme:theme,styles:styles}}function makeStyles(theme){let c=theme.color,s=theme.space,r=theme.radius,t=theme.type,userLine=Math.round(t.size.body*BUBBLE_LEAD_USER),assistantLine=Math.round(t.size.body*BUBBLE_LEAD_ASSISTANT),inputLine=Math.round(INPUT_LINE_HEIGHT*t.size.body/APP_BODY_SIZE),rule=c.borderRingCream,slots=theme.slots;return StyleSheet.create({container:{flex:1,minHeight:MIN_SURFACE_HEIGHT,backgroundColor:c.chatGround},body:{flex:1},centered:{minHeight:MIN_SURFACE_HEIGHT,flexGrow:1,alignItems:"center",justifyContent:"center",padding:s.xl},emptyContent:{flexGrow:1,alignItems:"stretch",justifyContent:"flex-start",paddingTop:EMPTY_PADDING_TOP,paddingHorizontal:s.lg,paddingBottom:s.lg,minHeight:EMPTY_MIN_HEIGHT,gap:s.lg},errorText:{...face(theme,"regular"),fontSize:t.size.subtitle,lineHeight:t.size.subtitle*t.lineHeight.snug,color:c.danger,textAlign:"center",marginBottom:s.md},retryButton:{minHeight:MIN_TOUCH_TARGET,minWidth:MIN_TOUCH_TARGET,alignItems:"center",justifyContent:"center",paddingHorizontal:s.xl,paddingVertical:s.sm,borderRadius:r.pill,backgroundColor:c.brand,...slotBox(slots.primaryButton)},retryLabel:{...face(theme,"medium"),color:c.onPrimary,fontSize:t.size.body,...slotText(slots.primaryButton)},setupNotice:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.sm,paddingHorizontal:s.lg,paddingVertical:s.sm,backgroundColor:c.surfaceCream},setupNoticeText:{...face(theme,"regular"),color:c.danger,fontSize:t.size.caption,flexShrink:1},turnNotice:{gap:s.xs,padding:s.md,borderRadius:r.lg,backgroundColor:c.surfaceCream,borderWidth:StyleSheet.hairlineWidth,borderColor:c.brandBorder,alignItems:"flex-start",...slotBox(slots.card,StyleSheet.hairlineWidth)},turnNoticeError:{borderColor:c.danger},turnNoticeTitle:{...headingFace(theme,"bold"),color:c.text.primary,fontSize:t.size.body,...slotText(slots.card)},turnNoticeTitleError:{color:c.danger},turnNoticeBody:{...face(theme,"regular"),color:c.text.secondary,fontSize:t.size.caption,lineHeight:t.size.caption*t.lineHeight.normal,...slotText(slots.card)},turnNoticeAction:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center"},turnNoticeActionLabel:{...face(theme,"medium"),color:c.brandInk,fontSize:t.size.body},setupNoticeAction:{...face(theme,"medium"),color:c.brandInk,fontSize:t.size.caption},reconnectingCaption:{...face(theme,"medium"),color:c.text.secondary,fontSize:t.size.caption,lineHeight:t.size.caption*t.lineHeight.normal,textTransform:"uppercase",letterSpacing:.5},readingLine:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.bodyTight,lineHeight:Math.round(t.size.bodyTight*t.lineHeight.relaxed)},list:{flex:1},listContent:{padding:s.lg,gap:s.xl},rowBlock:{gap:s.sm},rowBlockUser:{},rowBlockAssistant:{paddingRight:s.xl},row:{flexDirection:"row"},rowUser:{justifyContent:"flex-end"},rowAssistant:{justifyContent:"flex-start"},bubble:{maxWidth:BUBBLE_MAX_WIDTH,alignItems:"flex-start"},bubbleSideUser:{alignItems:"flex-end"},bubbleUser:{maxWidth:BUBBLE_MAX_WIDTH_CAP,paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,backgroundColor:c.bubbleUser,...c.primaryEdge!==c.primary&&c.bubbleUser===c.primary?{borderWidth:BUBBLE_EDGE_WIDTH,borderColor:c.primaryEdge}:{},borderRadius:r.lg,borderBottomRightRadius:r.xs,...slotBox(slots.userBubble,BUBBLE_EDGE_WIDTH)},bubbleAssistant:slots.assistantBubble?.backgroundColor===void 0?{...slotBox(slots.assistantBubble,BUBBLE_EDGE_WIDTH)}:{paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,borderRadius:r.lg,...slotBox(slots.assistantBubble,BUBBLE_EDGE_WIDTH)},bubbleVet:{maxWidth:BUBBLE_MAX_WIDTH_CAP,paddingVertical:s.md,paddingHorizontal:s.lg+HALF_STEP,backgroundColor:c.bubbleVet,borderRadius:r.lg,borderTopLeftRadius:r.xs,...slotBox(slots.vetBubble,BUBBLE_EDGE_WIDTH)},bubblePending:{opacity:PENDING_OPACITY},bubbleTextUser:{...face(theme,"regular"),color:c.onPrimary,fontSize:t.size.body,lineHeight:userLine,...slotText(slots.userBubble)},bubbleTextAssistant:{...face(theme,"regular"),color:c.text.primary,fontSize:t.size.body,lineHeight:assistantLine,...slotText(slots.assistantBubble)},bubbleTextVet:{...face(theme,"regular"),color:c.onBubbleVet,fontSize:t.size.body,lineHeight:userLine,...slotText(slots.vetBubble)},assistantName:{...face(theme,"bold"),color:c.brandInk,fontSize:t.size.bodyTight,marginBottom:s.xs},assistantSender:{flexDirection:"row",alignItems:"center",gap:s.sm,marginBottom:s.xs},assistantAvatar:{width:ASSISTANT_AVATAR_SIZE,height:ASSISTANT_AVATAR_SIZE,borderRadius:ASSISTANT_AVATAR_SIZE/2},assistantNameInRow:{marginBottom:0},vetHeader:{flexDirection:"row",alignItems:"baseline",gap:s.sm,marginBottom:s.xs},vetSender:{...face(theme,"bold"),color:c.text.primary,fontSize:t.size.bodyTight},vetTime:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.caption},bubbleBold:face(theme,"bold"),bubbleItalic:{fontStyle:"italic"},bubbleCode:face(theme,"mono"),followUps:{alignSelf:"stretch",marginTop:s.md},followUpsHeading:{...face(theme,"monoBold"),color:c.text.muted,fontSize:FOLLOW_UP_HEADING_SIZE,textTransform:"uppercase",letterSpacing:FOLLOW_UP_HEADING_TRACKING,paddingBottom:s.sm,borderBottomWidth:RULE_WIDTH,borderBottomColor:rule},followUpSlot:{alignSelf:"stretch"},followUpSlotRuled:{borderTopWidth:RULE_WIDTH,borderTopColor:rule},followUpRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:s.md,minHeight:FOLLOW_UP_ROW_MIN_HEIGHT,paddingVertical:s.sm+HALF_STEP,...slots.chip?.backgroundColor!==void 0||slots.chip?.borderColor!==void 0?{paddingHorizontal:s.md}:{},...slotBox(slots.chip)},followUpText:{...face(theme,"bold"),flex:1,color:c.brandInk,fontSize:t.size.bodyTight,...slotText(slots.chip)},composerOuter:{position:"relative"},composer:{marginHorizontal:s.md,marginTop:s.xs,minHeight:COMPOSER_MIN_HEIGHT,justifyContent:"center",paddingLeft:s.sm,paddingRight:COMPOSER_PADDING_RIGHT,paddingVertical:COMPOSER_PADDING_VERTICAL,backgroundColor:c.composerFill,borderWidth:COMPOSER_BORDER_WIDTH,borderColor:c.composerBorder,borderRadius:r.pill,...slotBox(slots.composerInput,COMPOSER_BORDER_WIDTH)},composerRow:{flexDirection:"row",alignItems:"center",gap:s.xs,minHeight:INPUT_MIN_HEIGHT},attachControl:{width:ATTACH_CONTROL_SIZE,height:ATTACH_CONTROL_SIZE,alignItems:"center",justifyContent:"center"},attachControlDisabled:{opacity:ATTACH_DISABLED_OPACITY},input:{flex:1,minHeight:INPUT_MIN_HEIGHT,maxHeight:INPUT_MAX_HEIGHT,paddingHorizontal:0,paddingVertical:0,...face(theme,"regular"),fontSize:t.size.body,lineHeight:inputLine,color:c.text.primary,...slotText(slots.composerInput)},sendControl:{minHeight:SEND_CONTROL_SIZE,minWidth:SEND_CONTROL_SIZE,alignItems:"center",justifyContent:"center"},sendDisc:{width:SEND_CONTROL_SIZE,height:SEND_CONTROL_SIZE,borderRadius:SEND_CONTROL_SIZE/2,alignItems:"center",justifyContent:"center",...slotBox(slots.sendButton)},sendControlDisabled:{opacity:SEND_DISABLED_OPACITY},footnote:{...face(theme,"regular"),color:c.text.muted,fontSize:FOOTNOTE_SIZE,lineHeight:FOOTNOTE_LINE,textAlign:"center",marginTop:s.sm,marginBottom:s.xs,paddingHorizontal:s.lg},poweredBy:{...face(theme,"regular"),color:c.text.muted,fontSize:t.size.micro,textAlign:"center",paddingBottom:s.xs}})}function TypingIndicator({petName:petName=null}){let{styles:styles}=useChatTheme(),line=forPet(CHAT_COPY.reading,petName);/* @__PURE__ */
2
2
  return jsx(Text,{tier:"compact",style:styles.readingLine,accessibilityRole:"text",accessibilityLabel:line,accessibilityLiveRegion:"polite",accessibilityState:{busy:true},children:line})}var ROTATION_PERIOD_MS=1400,REVEAL_DELAY_MS=300;function AnalyzingIndicator(){let theme=useEverfurTheme(),styles=useMemo(()=>makeStyles2(theme),[theme]),reduced=theme.motion.reducedMotion,[visible,setVisible]=useState(false);useEffect(()=>{let id=setTimeout(()=>setVisible(true),REVEAL_DELAY_MS);return()=>clearTimeout(id)},[]);let spin=useRef(new Animated.Value(0)).current;useEffect(()=>{if(reduced||!visible)return;let loop=Animated.loop(Animated.timing(spin,{toValue:1,duration:ROTATION_PERIOD_MS,easing:Easing.linear,useNativeDriver:true}));return loop.start(),()=>loop.stop()},[reduced,visible,spin]);let arcMotionStyle=reduced?null:{transform:[{rotate:spin.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}]};/* @__PURE__ */
3
3
  return jsx(View,{style:styles.wrap,accessible:true,accessibilityState:{busy:true},accessibilityLabel:"Analyzing photo",children:visible?/* @__PURE__ */jsxs(Fragment,{children:[
4
4
  /* @__PURE__ */jsx(Animated.View,{style:[styles.ring,arcMotionStyle]}),
@@ -1,25 +1,25 @@
1
- import { E as EntitlementSnapshot } from '../../runtimeTypes-DOO3f-W-.cjs';
1
+ import { E as EntitlementSnapshot } from '../../runtimeTypes-DgMizQKz.cjs';
2
2
  import { E as EverfurResult } from '../../EverfurResult-dtl8ERAw.cjs';
3
3
  import { R as RecordsRequestId, P as PetRef } from '../../ids-B2GAAifq.cjs';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.cjs';
5
5
  import { d as RecordsRequestView } from '../../models-DzvqEjMm.cjs';
6
6
  export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-DzvqEjMm.cjs';
7
7
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-pEXDbUJ1.cjs';
8
- export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-BwEu68C8.cjs';
8
+ export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens-RAKZj7M8.cjs';
9
+ export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-ctD0B2Th.cjs';
9
10
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.cjs';
10
- import '../../petsRepository-BP9nhM1R.cjs';
11
- import '../../identity-BHaMJ3KK.cjs';
12
- import '../../config-v5k6NsK_.cjs';
11
+ import '../../petsRepository-yyoo0k2I.cjs';
12
+ import '../../identity-75whJXyP.cjs';
13
+ import '../../config-EZzEyS-c.cjs';
13
14
  import '../../profile-CSs1wlXT.cjs';
14
15
  import '../../cacheEpoch-DknKn3S0.cjs';
15
16
  import '../../ErrorPolicyPort-NFDPe-5w.cjs';
16
- import '../../ports-C40S2V14.cjs';
17
- import '../../casesRepository-B6Z0XBIb.cjs';
18
- import '../../requestFunnel-BxNVGyGm.cjs';
17
+ import '../../ports-BeVJYP0_.cjs';
18
+ import '../../casesRepository-Bzs7aw4t.cjs';
19
+ import '../../requestFunnel-DHeSzCT6.cjs';
19
20
  import '../../TelemetryPort-BDNr00hu.cjs';
20
21
  import '../../ports-BN6RHF9W.cjs';
21
22
  import '../../CameraPort-Cv31Pz7g.cjs';
22
- import '../../tokens-Tzo1KBND.cjs';
23
23
 
24
24
  /** The testing seam handle: apply a resolved verdict to THIS provider's runtime. */
25
25
  interface EverfurTestEntitlements {
@@ -1,25 +1,25 @@
1
- import { E as EntitlementSnapshot } from '../../runtimeTypes-CvI1ZH8j.js';
1
+ import { E as EntitlementSnapshot } from '../../runtimeTypes-Cc207nbn.js';
2
2
  import { E as EverfurResult } from '../../EverfurResult-sKkoXew0.js';
3
3
  import { R as RecordsRequestId, P as PetRef } from '../../ids-B2GAAifq.js';
4
4
  export { B as Brand, _ as __brand } from '../../ids-B2GAAifq.js';
5
5
  import { d as RecordsRequestView } from '../../models-CrbUwbuS.js';
6
6
  export { c as RecordsRequestStatus, e as RecordsSimpleStatus } from '../../models-CrbUwbuS.js';
7
7
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError-pEXDbUJ1.js';
8
- export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-BYEqU855.js';
8
+ export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens-RAKZj7M8.js';
9
+ export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding-aGleD_ki.js';
9
10
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve-D4Ywz5OS.js';
10
- import '../../petsRepository-B2lO1sKS.js';
11
- import '../../identity-B8GkH53J.js';
12
- import '../../config-Cvo47voG.js';
11
+ import '../../petsRepository-ByMzq1Z9.js';
12
+ import '../../identity-BiyMDMrR.js';
13
+ import '../../config-BysLVhku.js';
13
14
  import '../../profile-CSs1wlXT.js';
14
15
  import '../../cacheEpoch-DknKn3S0.js';
15
16
  import '../../ErrorPolicyPort-DwSnmGcX.js';
16
- import '../../ports-BUXF0Rp3.js';
17
- import '../../casesRepository-SI0zp5YH.js';
18
- import '../../requestFunnel-BrOijMcw.js';
17
+ import '../../ports-zYl8S_lI.js';
18
+ import '../../casesRepository-CywqL6mj.js';
19
+ import '../../requestFunnel-BPeBZdKp.js';
19
20
  import '../../TelemetryPort-BDNr00hu.js';
20
21
  import '../../ports-BN6RHF9W.js';
21
22
  import '../../CameraPort-Cv31Pz7g.js';
22
- import '../../tokens-Tzo1KBND.js';
23
23
 
24
24
  /** The testing seam handle: apply a resolved verdict to THIS provider's runtime. */
25
25
  interface EverfurTestEntitlements {
@@ -1,4 +1,4 @@
1
- import { r as RecordsTimelineView } from './depth-vNpwOkZ8.js';
1
+ import { r as RecordsTimelineView } from './depth-Mk7quUNa.js';
2
2
 
3
3
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
4
4
  interface TimelineRow {
@@ -1,4 +1,4 @@
1
- import { r as RecordsTimelineView } from './depth-CRyU7-pf.cjs';
1
+ import { r as RecordsTimelineView } from './depth-DAd77kRe.cjs';
2
2
 
3
3
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
4
4
  interface TimelineRow {
@@ -1,5 +1,5 @@
1
1
  /** The fixed set of slot names, in the order the surfaces list them. */
2
- declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link"];
2
+ declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog"];
3
3
  type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
4
4
  /** The allow-listed paint keys a slot accepts. */
5
5
  declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
@@ -210,6 +210,16 @@ interface EverfurColorTokens {
210
210
  readonly primaryEdge: string;
211
211
  readonly checkupCardLowRiskBg: string;
212
212
  readonly checkupCardConcernBg: string;
213
+ /**
214
+ * The INFORMATIONAL status colour as ink: the title of the `Good to know` and `Monitor at home` banners on a
215
+ * partner palette. Follows `brandInk` unless a branding sets `info_color` (`colorInfo`), which re-derives it,
216
+ * guarded at 4.5:1 on every ground and on its own wash. Everfur's own light look keeps the banner's authored chip.
217
+ */
218
+ readonly info: string;
219
+ /** The informational wash under `info`: the brand's soft wash unless a branding sets `info_color`. */
220
+ readonly badgeBgInfo: string;
221
+ /** The informational edge (a banner's outline): `structureEdge` unless a branding sets `info_color` (3:1). */
222
+ readonly infoEdge: string;
213
223
  }
214
224
  /** Spacing scale (dp). */
215
225
  interface EverfurSpaceTokens {
@@ -253,9 +263,10 @@ interface EverfurLineHeightTokens {
253
263
  * RN-assignable font-weight literals. Typed as the exact string literals we ship (not bare `string`) so a
254
264
  * consumer can spread a weight token straight into a `Text` style: React Native's `TextStyle['fontWeight']`
255
265
  * accepts these, but rejects `string`. Kept framework-free (no react-native import) to hold the client layer's
256
- * no-framework boundary - these three literals are a subset of RN's fontWeight union.
266
+ * no-framework boundary - these literals are a subset of RN's fontWeight union. The compiled default uses 400,
267
+ * 500 and 700; a branding's `font_weight_body` / `font_weight_heading` may name any hundred from 100 to 900.
257
268
  */
258
- type EverfurFontWeight = '400' | '500' | '700';
269
+ type EverfurFontWeight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
259
270
  /** RN fontWeight tokens. */
260
271
  interface EverfurWeightTokens {
261
272
  readonly regular: EverfurFontWeight;
@@ -336,6 +347,33 @@ interface EverfurTypeTokens {
336
347
  * chrome tiers; 0 means none (React Native's `maxFontSizeMultiplier` semantics).
337
348
  */
338
349
  readonly scaleCaps: Readonly<Record<'content' | 'heading' | 'control' | 'compact' | 'badge', number>>;
350
+ /**
351
+ * The family of the HEADINGS (screen and card titles, the header bar's title), from `heading_font_family`
352
+ * (`fontFamilyHeading`); null keeps each heading in the face it is drawn with. Read it through `headingFace()`.
353
+ */
354
+ readonly headingFamily: string | null;
355
+ /** The weight of the headings (`font_weight_heading`, `fontWeightHeading`, 100 to 900); null keeps each heading's own. */
356
+ readonly headingWeight: EverfurFontWeight | null;
357
+ /**
358
+ * The font files and stylesheets the theme asks the host to load (`appearance.fonts`, at most four). The web
359
+ * provider loads them once per page; React Native never fetches a font (the app registers it with expo-font and
360
+ * passes the family). Empty by default.
361
+ */
362
+ readonly fontSources: readonly EverfurFontSource[];
363
+ }
364
+ /**
365
+ * One font the theme asks the web host to load (`appearance.fonts`). Exactly one of `src` (an https font file, loaded
366
+ * with the FontFace API under `family`, `weight` and `style`) or `cssSrc` (an https stylesheet, such as a Google Fonts
367
+ * link, added once as a `<link rel="stylesheet">`). The family is then named by `fontFamily` or `fontFamilyHeading`.
368
+ */
369
+ interface EverfurFontSource {
370
+ readonly family: string;
371
+ readonly src?: string;
372
+ readonly cssSrc?: string;
373
+ /** The weight the file carries, 100 to 900; absent, 400. Ignored for a stylesheet. */
374
+ readonly weight?: EverfurFontWeight;
375
+ /** `normal` (the default) or `italic`. Ignored for a stylesheet. */
376
+ readonly style?: 'normal' | 'italic';
339
377
  }
340
378
  interface EverfurSpringToken {
341
379
  readonly damping: number;
@@ -373,6 +411,11 @@ interface EverfurThemeMeta {
373
411
  readonly placeholder: string | null;
374
412
  /** White-label switch (hide_powered_by): drop the "powered by everfur" attribution. Default false (shown). */
375
413
  readonly hidePoweredBy: boolean;
414
+ /**
415
+ * The image an assistant message shows in place of the default assistant mark (`assistant_avatar_url`,
416
+ * `assistantAvatarUrl`), https only; null keeps the default. A failed load falls back to the default mark.
417
+ */
418
+ readonly assistantAvatarUrl: string | null;
376
419
  }
377
420
  /**
378
421
  * The frozen, never-null theme the rn layer renders. Read a token as `theme.color.brand`,
@@ -415,4 +458,4 @@ declare const EVERFUR_LIGHT: EverfurTheme;
415
458
  /** The compiled DARK default (deeply frozen). */
416
459
  declare const EVERFUR_DARK: EverfurTheme;
417
460
 
418
- export { SLOT_MIN_CONTRAST as A, SYSTEM_FONT_FAMILY as B, SYSTEM_MONO_FAMILY as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, type SlotGrounds as F, type SlotSurrounds as G, TEXT_SCALE_TIER_CAPS as H, cssCubicBezier as I, deepFreeze as J, guardSlotContrast as K, mergeThemeSlots as L, parseThemeSlots as M, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontWeight as c, type EverfurLetterSpacingTokens as d, type EverfurLineHeightTokens as e, type EverfurMotionDurationTokens as f, type EverfurMotionTokens as g, type EverfurRadiusTokens as h, type EverfurSpaceTokens as i, type EverfurSpringToken as j, type EverfurTextColorTokens as k, type EverfurTheme as l, type EverfurThemeMeta as m, type EverfurThemeSlot as n, type EverfurThemeSlotKey as o, type EverfurThemeSlotName as p, type EverfurThemeSlots as q, type EverfurTypeSizeTokens as r, type EverfurTypeTokens as s, type EverfurWeightTokens as t, THEME_SLOT_NAMES as u, EASING_CURVES as v, EVERFUR_DARK as w, EVERFUR_LIGHT as x, type EverfurEasingCurve as y, type EverfurTextScaleTier as z };
461
+ export { type EverfurTextScaleTier as A, SLOT_MIN_CONTRAST as B, SYSTEM_FONT_FAMILY as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, SYSTEM_MONO_FAMILY as F, type SlotGrounds as G, type SlotSurrounds as H, TEXT_SCALE_TIER_CAPS as I, cssCubicBezier as J, deepFreeze as K, guardSlotContrast as L, mergeThemeSlots as M, parseThemeSlots as N, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontSource as c, type EverfurFontWeight as d, type EverfurLetterSpacingTokens as e, type EverfurLineHeightTokens as f, type EverfurMotionDurationTokens as g, type EverfurMotionTokens as h, type EverfurRadiusTokens as i, type EverfurSpaceTokens as j, type EverfurSpringToken as k, type EverfurTextColorTokens as l, type EverfurTheme as m, type EverfurThemeMeta as n, type EverfurThemeSlot as o, type EverfurThemeSlotKey as p, type EverfurThemeSlotName as q, type EverfurThemeSlots as r, type EverfurTypeSizeTokens as s, type EverfurTypeTokens as t, type EverfurWeightTokens as u, THEME_SLOT_NAMES as v, EASING_CURVES as w, EVERFUR_DARK as x, EVERFUR_LIGHT as y, type EverfurEasingCurve as z };
@@ -1,5 +1,5 @@
1
1
  /** The fixed set of slot names, in the order the surfaces list them. */
2
- declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link"];
2
+ declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog"];
3
3
  type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
4
4
  /** The allow-listed paint keys a slot accepts. */
5
5
  declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
@@ -210,6 +210,16 @@ interface EverfurColorTokens {
210
210
  readonly primaryEdge: string;
211
211
  readonly checkupCardLowRiskBg: string;
212
212
  readonly checkupCardConcernBg: string;
213
+ /**
214
+ * The INFORMATIONAL status colour as ink: the title of the `Good to know` and `Monitor at home` banners on a
215
+ * partner palette. Follows `brandInk` unless a branding sets `info_color` (`colorInfo`), which re-derives it,
216
+ * guarded at 4.5:1 on every ground and on its own wash. Everfur's own light look keeps the banner's authored chip.
217
+ */
218
+ readonly info: string;
219
+ /** The informational wash under `info`: the brand's soft wash unless a branding sets `info_color`. */
220
+ readonly badgeBgInfo: string;
221
+ /** The informational edge (a banner's outline): `structureEdge` unless a branding sets `info_color` (3:1). */
222
+ readonly infoEdge: string;
213
223
  }
214
224
  /** Spacing scale (dp). */
215
225
  interface EverfurSpaceTokens {
@@ -253,9 +263,10 @@ interface EverfurLineHeightTokens {
253
263
  * RN-assignable font-weight literals. Typed as the exact string literals we ship (not bare `string`) so a
254
264
  * consumer can spread a weight token straight into a `Text` style: React Native's `TextStyle['fontWeight']`
255
265
  * accepts these, but rejects `string`. Kept framework-free (no react-native import) to hold the client layer's
256
- * no-framework boundary - these three literals are a subset of RN's fontWeight union.
266
+ * no-framework boundary - these literals are a subset of RN's fontWeight union. The compiled default uses 400,
267
+ * 500 and 700; a branding's `font_weight_body` / `font_weight_heading` may name any hundred from 100 to 900.
257
268
  */
258
- type EverfurFontWeight = '400' | '500' | '700';
269
+ type EverfurFontWeight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
259
270
  /** RN fontWeight tokens. */
260
271
  interface EverfurWeightTokens {
261
272
  readonly regular: EverfurFontWeight;
@@ -336,6 +347,33 @@ interface EverfurTypeTokens {
336
347
  * chrome tiers; 0 means none (React Native's `maxFontSizeMultiplier` semantics).
337
348
  */
338
349
  readonly scaleCaps: Readonly<Record<'content' | 'heading' | 'control' | 'compact' | 'badge', number>>;
350
+ /**
351
+ * The family of the HEADINGS (screen and card titles, the header bar's title), from `heading_font_family`
352
+ * (`fontFamilyHeading`); null keeps each heading in the face it is drawn with. Read it through `headingFace()`.
353
+ */
354
+ readonly headingFamily: string | null;
355
+ /** The weight of the headings (`font_weight_heading`, `fontWeightHeading`, 100 to 900); null keeps each heading's own. */
356
+ readonly headingWeight: EverfurFontWeight | null;
357
+ /**
358
+ * The font files and stylesheets the theme asks the host to load (`appearance.fonts`, at most four). The web
359
+ * provider loads them once per page; React Native never fetches a font (the app registers it with expo-font and
360
+ * passes the family). Empty by default.
361
+ */
362
+ readonly fontSources: readonly EverfurFontSource[];
363
+ }
364
+ /**
365
+ * One font the theme asks the web host to load (`appearance.fonts`). Exactly one of `src` (an https font file, loaded
366
+ * with the FontFace API under `family`, `weight` and `style`) or `cssSrc` (an https stylesheet, such as a Google Fonts
367
+ * link, added once as a `<link rel="stylesheet">`). The family is then named by `fontFamily` or `fontFamilyHeading`.
368
+ */
369
+ interface EverfurFontSource {
370
+ readonly family: string;
371
+ readonly src?: string;
372
+ readonly cssSrc?: string;
373
+ /** The weight the file carries, 100 to 900; absent, 400. Ignored for a stylesheet. */
374
+ readonly weight?: EverfurFontWeight;
375
+ /** `normal` (the default) or `italic`. Ignored for a stylesheet. */
376
+ readonly style?: 'normal' | 'italic';
339
377
  }
340
378
  interface EverfurSpringToken {
341
379
  readonly damping: number;
@@ -373,6 +411,11 @@ interface EverfurThemeMeta {
373
411
  readonly placeholder: string | null;
374
412
  /** White-label switch (hide_powered_by): drop the "powered by everfur" attribution. Default false (shown). */
375
413
  readonly hidePoweredBy: boolean;
414
+ /**
415
+ * The image an assistant message shows in place of the default assistant mark (`assistant_avatar_url`,
416
+ * `assistantAvatarUrl`), https only; null keeps the default. A failed load falls back to the default mark.
417
+ */
418
+ readonly assistantAvatarUrl: string | null;
376
419
  }
377
420
  /**
378
421
  * The frozen, never-null theme the rn layer renders. Read a token as `theme.color.brand`,
@@ -415,4 +458,4 @@ declare const EVERFUR_LIGHT: EverfurTheme;
415
458
  /** The compiled DARK default (deeply frozen). */
416
459
  declare const EVERFUR_DARK: EverfurTheme;
417
460
 
418
- export { SLOT_MIN_CONTRAST as A, SYSTEM_FONT_FAMILY as B, SYSTEM_MONO_FAMILY as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, type SlotGrounds as F, type SlotSurrounds as G, TEXT_SCALE_TIER_CAPS as H, cssCubicBezier as I, deepFreeze as J, guardSlotContrast as K, mergeThemeSlots as L, parseThemeSlots as M, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontWeight as c, type EverfurLetterSpacingTokens as d, type EverfurLineHeightTokens as e, type EverfurMotionDurationTokens as f, type EverfurMotionTokens as g, type EverfurRadiusTokens as h, type EverfurSpaceTokens as i, type EverfurSpringToken as j, type EverfurTextColorTokens as k, type EverfurTheme as l, type EverfurThemeMeta as m, type EverfurThemeSlot as n, type EverfurThemeSlotKey as o, type EverfurThemeSlotName as p, type EverfurThemeSlots as q, type EverfurTypeSizeTokens as r, type EverfurTypeTokens as s, type EverfurWeightTokens as t, THEME_SLOT_NAMES as u, EASING_CURVES as v, EVERFUR_DARK as w, EVERFUR_LIGHT as x, type EverfurEasingCurve as y, type EverfurTextScaleTier as z };
461
+ export { type EverfurTextScaleTier as A, SLOT_MIN_CONTRAST as B, SYSTEM_FONT_FAMILY as C, DEFAULT_MAX_FONT_SCALE as D, type EverfurColorTokens as E, SYSTEM_MONO_FAMILY as F, type SlotGrounds as G, type SlotSurrounds as H, TEXT_SCALE_TIER_CAPS as I, cssCubicBezier as J, deepFreeze as K, guardSlotContrast as L, mergeThemeSlots as M, parseThemeSlots as N, SLOT_MIN_BORDER_CONTRAST as S, THEME_SLOT_KEYS as T, type EverfurFontFaceKey as a, type EverfurFontFamilies as b, type EverfurFontSource as c, type EverfurFontWeight as d, type EverfurLetterSpacingTokens as e, type EverfurLineHeightTokens as f, type EverfurMotionDurationTokens as g, type EverfurMotionTokens as h, type EverfurRadiusTokens as i, type EverfurSpaceTokens as j, type EverfurSpringToken as k, type EverfurTextColorTokens as l, type EverfurTheme as m, type EverfurThemeMeta as n, type EverfurThemeSlot as o, type EverfurThemeSlotKey as p, type EverfurThemeSlotName as q, type EverfurThemeSlots as r, type EverfurTypeSizeTokens as s, type EverfurTypeTokens as t, type EverfurWeightTokens as u, THEME_SLOT_NAMES as v, EASING_CURVES as w, EVERFUR_DARK as x, EVERFUR_LIGHT as y, type EverfurEasingCurve as z };
@@ -1,5 +1,5 @@
1
- import { C as ClientBranding, E as EverfurThemeInput } from './branding-BYEqU855.js';
2
- import { l as EverfurTheme, c as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-Tzo1KBND.js';
1
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding-aGleD_ki.js';
2
+ import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-RAKZj7M8.js';
3
3
 
4
4
  /** One partner input the contrast guard adjusted. */
5
5
  interface EverfurThemeAdjustment {
@@ -127,5 +127,13 @@ interface EverfurFaceStyle {
127
127
  * `{ ...face(theme, 'bold'), fontSize: theme.type.size.body }`. Pure and total over any resolved theme.
128
128
  */
129
129
  declare function face(theme: EverfurTheme, weight: EverfurFontFaceKey): EverfurFaceStyle;
130
+ /**
131
+ * The family and weight of a HEADING (a screen or card title, the header bar's title) that is drawn in `fallback`
132
+ * (most headings are `bold`). A branding's `heading_font_family` makes it a base family at the heading weight
133
+ * (`font_weight_heading`, else the fallback face's weight); a heading weight alone re-weights the fallback face unless
134
+ * that face is a NAMED face (the weight is baked into it, and a synthetic weight over it is the platform bug `face()`
135
+ * exists to avoid). With neither set this is exactly `face(theme, fallback)`, so Everfur's look is unchanged.
136
+ */
137
+ declare function headingFace(theme: EverfurTheme, fallback?: EverfurFontFaceKey): EverfurFaceStyle;
130
138
 
131
- export { type EverfurFaceStyle as E, type ResolveThemeInput as R, TEXT_SCALE_FLOOR as T, type EverfurThemeAdjustment as a, face as f, previewTheme as p, resolveTheme as r, themeAdjustments as t, withServerBranding as w };
139
+ export { type EverfurFaceStyle as E, type ResolveThemeInput as R, TEXT_SCALE_FLOOR as T, type EverfurThemeAdjustment as a, face as f, headingFace as h, previewTheme as p, resolveTheme as r, themeAdjustments as t, withServerBranding as w };
@@ -1,5 +1,5 @@
1
- import { C as ClientBranding, E as EverfurThemeInput } from './branding-BwEu68C8.cjs';
2
- import { l as EverfurTheme, c as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-Tzo1KBND.cjs';
1
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding-ctD0B2Th.cjs';
2
+ import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens-RAKZj7M8.cjs';
3
3
 
4
4
  /** One partner input the contrast guard adjusted. */
5
5
  interface EverfurThemeAdjustment {
@@ -127,5 +127,13 @@ interface EverfurFaceStyle {
127
127
  * `{ ...face(theme, 'bold'), fontSize: theme.type.size.body }`. Pure and total over any resolved theme.
128
128
  */
129
129
  declare function face(theme: EverfurTheme, weight: EverfurFontFaceKey): EverfurFaceStyle;
130
+ /**
131
+ * The family and weight of a HEADING (a screen or card title, the header bar's title) that is drawn in `fallback`
132
+ * (most headings are `bold`). A branding's `heading_font_family` makes it a base family at the heading weight
133
+ * (`font_weight_heading`, else the fallback face's weight); a heading weight alone re-weights the fallback face unless
134
+ * that face is a NAMED face (the weight is baked into it, and a synthetic weight over it is the platform bug `face()`
135
+ * exists to avoid). With neither set this is exactly `face(theme, fallback)`, so Everfur's look is unchanged.
136
+ */
137
+ declare function headingFace(theme: EverfurTheme, fallback?: EverfurFontFaceKey): EverfurFaceStyle;
130
138
 
131
- export { type EverfurFaceStyle as E, type ResolveThemeInput as R, TEXT_SCALE_FLOOR as T, type EverfurThemeAdjustment as a, face as f, previewTheme as p, resolveTheme as r, themeAdjustments as t, withServerBranding as w };
139
+ export { type EverfurFaceStyle as E, type ResolveThemeInput as R, TEXT_SCALE_FLOOR as T, type EverfurThemeAdjustment as a, face as f, headingFace as h, previewTheme as p, resolveTheme as r, themeAdjustments as t, withServerBranding as w };
@@ -1,5 +1,5 @@
1
1
  import { R as RecordsRequestId, P as PetRef } from './ids-B2GAAifq.js';
2
- import { ag as RecordsClinicSearchInput, ah as RecordsClinicSearchPage, ai as RecordsRecentClinicsInput, aj as RecordsAuthorizationCopy, ak as CreateClinicRequestInput, al as RecordsSignatureUploadPolicy, m as RecordsClinic, W as RecordsClinicBatch, X as RecordsClinicBatchClient, n as RecordsDepthClient } from './depth-vNpwOkZ8.js';
2
+ import { ag as RecordsClinicSearchInput, ah as RecordsClinicSearchPage, ai as RecordsRecentClinicsInput, aj as RecordsAuthorizationCopy, ak as CreateClinicRequestInput, al as RecordsSignatureUploadPolicy, m as RecordsClinic, W as RecordsClinicBatch, X as RecordsClinicBatchClient, n as RecordsDepthClient } from './depth-Mk7quUNa.js';
3
3
  import { E as EverfurResult } from './EverfurResult-sKkoXew0.js';
4
4
  import { f as RecordsRequestGroupView, d as RecordsRequestView } from './models-CrbUwbuS.js';
5
5
  import { E as EverfurError } from './EverfurError-pEXDbUJ1.js';
@@ -1,5 +1,5 @@
1
1
  import { R as RecordsRequestId, P as PetRef } from './ids-B2GAAifq.cjs';
2
- import { ag as RecordsClinicSearchInput, ah as RecordsClinicSearchPage, ai as RecordsRecentClinicsInput, aj as RecordsAuthorizationCopy, ak as CreateClinicRequestInput, al as RecordsSignatureUploadPolicy, m as RecordsClinic, W as RecordsClinicBatch, X as RecordsClinicBatchClient, n as RecordsDepthClient } from './depth-CRyU7-pf.cjs';
2
+ import { ag as RecordsClinicSearchInput, ah as RecordsClinicSearchPage, ai as RecordsRecentClinicsInput, aj as RecordsAuthorizationCopy, ak as CreateClinicRequestInput, al as RecordsSignatureUploadPolicy, m as RecordsClinic, W as RecordsClinicBatch, X as RecordsClinicBatchClient, n as RecordsDepthClient } from './depth-DAd77kRe.cjs';
3
3
  import { E as EverfurResult } from './EverfurResult-dtl8ERAw.cjs';
4
4
  import { f as RecordsRequestGroupView, d as RecordsRequestView } from './models-DzvqEjMm.cjs';
5
5
  import { E as EverfurError } from './EverfurError-pEXDbUJ1.cjs';
@@ -96,7 +96,7 @@ return Object.freeze({metadata:/* @__PURE__ */Object.freeze(out),droppedOperator
96
96
  return Object.freeze({url:url,fields:/* @__PURE__ */Object.freeze(fields),s3Key:s3Key,expiresAt:asFiniteNumber(raw.expires_at)})}async function stageUpload(upload,source,policy,idempotencyKey,signal){try{return await upload.presignedPut(fileHandleFromMedia(source),{target:policy,idempotencyKey:idempotencyKey,...signal?{signal:signal}:{}}),ok(void 0)}catch{return err(makeEverfurError("mediaUploadFailed",{retryable:false}))}}async function submitAnalyze(funnel,path,body,detectGate,signal){let req={method:"POST",path:path,body:body,...signal?{signal:signal}:{}},res=await funnel.send("media.analyze",req);if(res.ok){let job=parseAsyncJob(res.value);return job!==null?{kind:"async",job:job}:{kind:"sync",body:res.value}}let gate=detectGate(res.error.httpStatus,res.error);return gate!==null?{kind:"gate",gate:gate}:{kind:"error",error:res.error}}function parseAsyncJob(raw){if(!isRecord2(raw))return null;let jobId=asString(raw.job_id);if(jobId===null)return null;let status=asString(raw.status);return status!==null&&isTerminalStatus(status)?null:/* @__PURE__ */Object.freeze({jobId:jobId,estimatedSeconds:asFiniteNumber(raw.estimated_completion_seconds)})}var POLL_FIRST_DELAY_MS=2e3,POLL_MAX_DELAY_MS=5e3,POLL_BUDGET_MS=9e4;async function pollJob(funnel,jobId,deps){let{timers:timers,signal:signal,alive:alive}=deps,start=timers.now(),budget=Math.max(POLL_BUDGET_MS,(deps.estimatedSeconds??0)*1e3),delay=POLL_FIRST_DELAY_MS;for(;;){if(signal.aborted||!alive())return{kind:"aborted"};if(await delayAbortable2(delay,signal,timers),signal.aborted||!alive())return{kind:"aborted"};if(timers.now()-start>budget)return{kind:"timeout"};let path=ENDPOINTS.job(jobId);if(path===null)return{kind:"notFound"};let res=await funnel.send("media.pollJob",{method:"GET",path:path,...signal?{signal:signal}:{}},{maxAttempts:1});if(signal.aborted||!alive())return{kind:"aborted"};if(!res.ok){if(res.error.httpStatus===404)return{kind:"notFound"};delay=Math.min(POLL_MAX_DELAY_MS,delay+1e3);continue}let status=jobStatusOf(res.value);if(status==="COMPLETED")return{kind:"complete",body:res.value};if(status==="FAILED")return{kind:"failed",error:jobFailureError(res.value)};delay=Math.min(POLL_MAX_DELAY_MS,delay+1e3)}}function jobStatusOf(body){return isRecord2(body)?(asString(body.status)??"PROCESSING").toUpperCase():"PROCESSING"}function isTerminalStatus(status){let upper=status.toUpperCase();return upper==="COMPLETED"||upper==="FAILED"}function jobFailureError(body){let wire=isRecord2(body)?asString(body.error)??asString(body.error_code):null;return makeEverfurError("internalError",{retryable:false,...wire?{wireMessage:wire}:{}})}function detectNoGate(){return null}function analyzeBody(s3Key,extra){let body={s3_key:s3Key};return extra.type!==void 0&&(body.type=extra.type),extra.petRef!=null&&(body.pet_id=extra.petRef),extra.precheckToken!=null&&(body.precheck_token=extra.precheckToken),body}function createVideoController(deps){return new VideoController(deps)}var VideoController=class extends MediaStore{constructor(deps){super({status:"idle",job:null,result:null,error:null,isCaptureAvailable:isCaptureAvailable(deps.camera),progress:0}),this.funnel=deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}}),this.camera=deps.camera,this.upload=deps.upload,this.defaultPetRef=deps.petRef??null,this.telemetry=deps.telemetry??noopTelemetry,this.timers=deps.timers??defaultTimers,this.makeIdempotencyKey=deps.makeIdempotencyKey??defaultIdempotencyFactory()}async capture(opts){if(!isCaptureAvailable(this.camera))return err(makeEverfurError("unknown",{retryable:false}));let source;try{source=await this.camera.capture(captureOptionsFor("video",15))}catch{return this.snapshot.status!=="idle"&&this.patch({status:"idle",progress:0}),err(makeEverfurError("unknown",{retryable:false}))}return this.submit(source,opts?.petRef!==void 0?{petRef:opts.petRef}:void 0)}async submit(source,opts){let op=this.beginOperation(opts?.signal),petRef=opts?.petRef??this.defaultPetRef,idempotencyKey=this.makeIdempotencyKey(),startedAt=this.timers.now();this.patch({status:"uploading",progress:0,error:null,result:null,job:null});try{let initiated=await initiateUpload(this.funnel,{purpose:"gait_video",contentType:source.mimeType,byteSize:mediaByteSize(source),signal:op.signal});if(op.signal.aborted||!this.alive(op.epoch))return abortedResult();if(!initiated.ok)return this.fail(op,initiated.error);let staged=await stageUpload(this.upload,source,initiated.value,idempotencyKey,op.signal);if(op.signal.aborted||!this.alive(op.epoch))return abortedResult();if(!staged.ok)return this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",outcome:"failed"}),this.fail(op,staged.error);this.patch({progress:1}),this.telemetry.track("analysis.upload",{capability:"video",purpose:"gait_video",byteSize:mediaByteSize(source)??0,durationMs:mediaDurationMs(source)??0,outcome:"ok"}),this.patch({status:"analyzing"});let outcome=await submitAnalyze(this.funnel,ENDPOINTS.videoAnalyze,analyzeBody(initiated.value.s3Key,{petRef:petRef}),detectNoGate,op.signal);if(op.signal.aborted||!this.alive(op.epoch))return abortedResult();if(outcome.kind==="error")return this.fail(op,outcome.error);if(outcome.kind==="gate")return this.fail(op,makeEverfurError("unknown",{retryable:!1}));if(outcome.kind==="sync"){let jobId=resultIdOf(outcome.body)??"";return this.complete(op,outcome.body,jobId,startedAt)}let job=outcome.job;this.patch({job:{id:job.jobId,state:"processing"}});let poll=await pollJob(this.funnel,job.jobId,{timers:this.timers,signal:op.signal,alive:()=>this.alive(op.epoch),estimatedSeconds:job.estimatedSeconds});if(op.signal.aborted||!this.alive(op.epoch))return abortedResult();switch(poll.kind){case"aborted":return abortedResult();case"complete":return this.complete(op,poll.body,job.jobId,startedAt);case"failed":return this.fail(op,poll.error);case"timeout":return this.fail(op,makeEverfurError("streamTimeout",{retryable:!0}));case"notFound":return this.patch({job:null}),this.fail(op,makeEverfurError("conversationNotFound",{retryable:!1,httpStatus:404}));default:return this.fail(op,makeEverfurError("internalError",{retryable:!1}))}}finally{op.settle()}}cancel(){this.inFlight?.abort(),this.inFlight=null,(this.snapshot.status==="uploading"||this.snapshot.status==="analyzing")&&this.patch({status:"idle",progress:0})}complete(op,body,jobId,startedAt){if(!this.alive(op.epoch))return abortedResult();let mapped=mapVideoResult(body,jobId);return mapped.droppedOperatorKeys>0&&this.telemetry.track("analysis.metadata_leak_guard",{droppedKeyCount:mapped.droppedOperatorKeys}),this.telemetry.track("analysis.quality_gate",{usable:mapped.result.quality.usable,reasons:mapped.result.quality.reasons}),this.patch({status:"complete",progress:1,result:mapped.result,error:null,job:{id:jobId,state:"complete"}}),this.telemetry.track("analysis.result",{capability:"video",modelVersion:mapped.result.modelVersion??"",timeToResultMs:this.timers.now()-startedAt}),ok(jobId)}fail(op,error){return this.alive(op.epoch)?(this.patch({status:"error",error:error,progress:0}),this.telemetry.trackExpectedFailure("analysis.error",{code:error.code,...error.httpStatus!==void 0?{httpStatus:error.httpStatus}:{}}),err(error)):abortedResult()}};function mapVideoResult(body,jobId){let projection=projectDetectionMetadata(locateDetectionMetadata(body)),interpretation=parseInterpretation(locateInterpretation(body)),modelVersion=asString(projection.metadata.model_version)??(isRecord2(body)?asString(body.model_version):null);return{result:/* @__PURE__ */Object.freeze({jobId:jobId,analysisType:"gait",detections:parseVideoDetections(body),interpretation:interpretation,modelVersion:modelVersion,quality:parseQuality(body)}),droppedOperatorKeys:projection.droppedOperatorKeys}}function parseVideoDetections(body){let raw=isRecord2(body)?body.detections:null;if(!Array.isArray(raw))/* @__PURE__ */return Object.freeze([]);let out=[];for(let entry of raw){if(!isRecord2(entry))continue;let label=asString(entry.label)??asString(entry.name);label!==null&&out.push(
97
97
  /* @__PURE__ */Object.freeze({label:label,confidence:asUnitNumber(entry.confidence)??0,timestampMs:asFiniteNumber(entry.timestamp_ms??entry.timestamp),durationMs:asFiniteNumber(entry.duration_ms??entry.duration)}))}/* @__PURE__ */
98
98
  return Object.freeze(out)}function parseQuality(body){let raw=isRecord2(body)?body.quality:null;if(!isRecord2(raw))/* @__PURE__ */return Object.freeze({usable:true,reasons:/* @__PURE__ */Object.freeze([])});let usable=raw.usable;/* @__PURE__ */
99
- return Object.freeze({usable:typeof usable=="boolean"?usable:true,reasons:/* @__PURE__ */Object.freeze(asStringList(raw.reasons))})}function resultIdOf(body){return isRecord2(body)?asString(body.result_id)??asString(body.request_id)??asString(body.job_id):null}function abortedResult(){return err(makeEverfurError("unknown",{retryable:false}))}function defaultIdempotencyFactory(){let counter=0;return()=>`video-analyze-${Date.now().toString(36)}-${(counter++).toString(36)}-${Math.random().toString(36).slice(2,10)}`}var EVERFUR_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),globalContextHost=globalThis,EverfurContext=globalContextHost[EVERFUR_CONTEXT_SYMBOL]??(globalContextHost[EVERFUR_CONTEXT_SYMBOL]=react.createContext(null));EverfurContext.displayName??="EverfurContext";function useEverfurContext(){let ctx=react.useContext(EverfurContext);if(ctx===null)throw new EverfurConfigError("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return ctx}var BOOTSTRAP_SNAPSHOT=/* @__PURE__ */Object.freeze({status:"idle",job:null,result:null,error:null,isCaptureAvailable:false,progress:0}),NOOP_UNSUBSCRIBE=()=>{};function useEverfurVideo(opts){let{runtime:runtime,userRef:userRef,activePet:activePet,scopeEpoch:scopeEpoch}=useEverfurContext(),petRef=opts?.petRef??activePet??null,[controller,setController]=react.useState(null);react.useEffect(()=>{let{services:services}=runtime.registry,acquired=runtime.registry.acquire("video",`${userRef??""}|${petRef??""}`,()=>createVideoController({...services.errorPolicy?{errorPolicy:services.errorPolicy}:{},auth:services.authFor(userRef),camera:services.camera,upload:services.upload,petRef:petRef,telemetry:services.telemetry}),controller2=>controller2.dispose());return setController(acquired),()=>{setController(current=>current===acquired?null:current),runtime.registry.release(acquired)}},[runtime,userRef,petRef,scopeEpoch]);let subscribe=react.useCallback(onChange=>controller?controller.subscribe(onChange):NOOP_UNSUBSCRIBE,[controller]),getSnapshot=react.useCallback(()=>controller?controller.getSnapshot():BOOTSTRAP_SNAPSHOT,[controller]),snapshot=react.useSyncExternalStore(subscribe,getSnapshot,getSnapshot),submit=react.useCallback(source=>controller?controller.submit(source):Promise.resolve(notReadyError()),[controller]),capture=react.useCallback(()=>controller?controller.capture():Promise.resolve(notReadyError()),[controller]),cancel=react.useCallback(()=>{controller?.cancel()},[controller]);return react.useMemo(()=>({status:snapshot.status,job:snapshot.job,result:snapshot.result,error:snapshot.error,isCaptureAvailable:snapshot.isCaptureAvailable,progress:snapshot.progress,isBootstrapping:controller===null,submit:submit,capture:capture,cancel:cancel}),[snapshot,controller,submit,capture,cancel])}function notReadyError(){return err(makeEverfurError("internalError",{retryable:true}))}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
99
+ return Object.freeze({usable:typeof usable=="boolean"?usable:true,reasons:/* @__PURE__ */Object.freeze(asStringList(raw.reasons))})}function resultIdOf(body){return isRecord2(body)?asString(body.result_id)??asString(body.request_id)??asString(body.job_id):null}function abortedResult(){return err(makeEverfurError("unknown",{retryable:false}))}function defaultIdempotencyFactory(){let counter=0;return()=>`video-analyze-${Date.now().toString(36)}-${(counter++).toString(36)}-${Math.random().toString(36).slice(2,10)}`}var EVERFUR_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),globalContextHost=globalThis,EverfurContext=globalContextHost[EVERFUR_CONTEXT_SYMBOL]??(globalContextHost[EVERFUR_CONTEXT_SYMBOL]=react.createContext(null));EverfurContext.displayName??="EverfurContext";function useEverfurContext(){let ctx=react.useContext(EverfurContext);if(ctx===null)throw new EverfurConfigError("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return ctx}var BOOTSTRAP_SNAPSHOT=/* @__PURE__ */Object.freeze({status:"idle",job:null,result:null,error:null,isCaptureAvailable:false,progress:0}),NOOP_UNSUBSCRIBE=()=>{};function useEverfurVideo(opts){let{runtime:runtime,userRef:userRef,activePet:activePet,scopeEpoch:scopeEpoch}=useEverfurContext(),petRef=opts?.petRef??activePet??null,[controller,setController]=react.useState(null);react.useEffect(()=>{let{services:services}=runtime.registry,acquired=runtime.registry.acquire("video",`${userRef??""}|${petRef??""}`,()=>createVideoController({...services.errorPolicy?{errorPolicy:services.errorPolicy}:{},auth:services.authFor(userRef),camera:services.camera,upload:services.upload,petRef:petRef,telemetry:services.telemetry}),controller2=>controller2.dispose());return setController(acquired),()=>{setController(current=>current===acquired?null:current),runtime.registry.release(acquired)}},[runtime,userRef,petRef,scopeEpoch]);let subscribe=react.useCallback(onChange=>controller?controller.subscribe(onChange):NOOP_UNSUBSCRIBE,[controller]),getSnapshot=react.useCallback(()=>controller?controller.getSnapshot():BOOTSTRAP_SNAPSHOT,[controller]),snapshot=react.useSyncExternalStore(subscribe,getSnapshot,getSnapshot),submit=react.useCallback(source=>controller?controller.submit(source):Promise.resolve(notReadyError()),[controller]),capture=react.useCallback(()=>controller?controller.capture():Promise.resolve(notReadyError()),[controller]),cancel=react.useCallback(()=>{controller?.cancel()},[controller]);return react.useMemo(()=>({status:snapshot.status,job:snapshot.job,result:snapshot.result,error:snapshot.error,isCaptureAvailable:snapshot.isCaptureAvailable,progress:snapshot.progress,isBootstrapping:controller===null,submit:submit,capture:capture,cancel:cancel}),[snapshot,controller,submit,capture,cancel])}function notReadyError(){return err(makeEverfurError("internalError",{retryable:true}))}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve){return`cubic-bezier(${curve.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap=type.scaleCaps[tier];return cap>0?cap:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap===void 0?props:{maxFontSizeMultiplier:cap,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state){return Object.is(props.resetKey,state.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
100
100
  return Object.freeze({reason:explicit.reason,level:explicit.level,recoverable:explicit.recoverable})}/* @__PURE__ */
101
101
  return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function freezeDecision(d){let base={name:d.name,enabled:d.enabled,isPending:d.isPending,limits:/* @__PURE__ */Object.freeze({...d.limits})};return d.disabled!==void 0&&(base.disabled=d.disabled),/* @__PURE__ */Object.freeze(base)}function useCapability(name){let{runtime:runtime}=useEverfurContext(),store=runtime.entitlements,snapshot=react.useSyncExternalStore(store.subscribe,store.getSnapshot,store.getSnapshot);return react.useMemo(()=>decideCapability(name,snapshot.decisions,{isPending:snapshot.isPending}),[name,snapshot])}var MIN_OFFSTATE_HEIGHT=48;function selectView(decision){return decision.isPending?"pending":decision.enabled?"enabled":"disabled"}function CapabilityGate(props){let{capability:capability,children:children,renderDisabled:renderDisabled,renderPending:renderPending,style:style}=props,decision=useCapability(capability),view=react.useMemo(()=>selectView(decision),[decision]);switch(view){case"enabled":return children;case"pending":return renderPending?/* @__PURE__ */jsxRuntime.jsx(HostRender,{render:renderPending,fallback:/* @__PURE__ */jsxRuntime.jsx(PendingSkeleton,{capability:capability,style:style})}):/* @__PURE__ */jsxRuntime.jsx(PendingSkeleton,{capability:capability,style:style});case"disabled":return renderDisabled?/* @__PURE__ */jsxRuntime.jsx(HostRender,{render:()=>renderDisabled(decision),fallback:/* @__PURE__ */jsxRuntime.jsx(OffState,{decision:decision,style:style}),resetKey:decision}):/* @__PURE__ */jsxRuntime.jsx(OffState,{decision:decision,style:style});default:return assertNever(view)}}function PendingSkeleton({capability:capability,style:style}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]);/* @__PURE__ */
102
102
  return jsxRuntime.jsx(reactNative.View,{style:[styles.offstate,style],accessible:true,accessibilityState:{busy:true},accessibilityLabel:`Loading ${capability}`,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.skeletonBar})})}function OffState({decision:decision,style:style}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]),message=decision.disabled?.reason??"";/* @__PURE__ */