@everfur/sdk 0.7.1 → 0.8.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 (185) hide show
  1. package/CHANGELOG.md +311 -0
  2. package/README.md +24 -16
  3. package/dist/{Chat-CFi5cNUF.d.ts → Chat-Cv9EYMYA.d.ts} +3 -3
  4. package/dist/{Chat-DQOsAumH.d.cts → Chat-s2vcPbw3.d.cts} +3 -3
  5. package/dist/{DepthViews-uilL1NJZ.d.ts → DepthViews-CVxUHOJ-.d.ts} +1 -1
  6. package/dist/{DepthViews-C409ubw-.d.cts → DepthViews-Cz7mSW7p.d.cts} +1 -1
  7. package/dist/{DepthViews-es8mIK0w.d.ts → DepthViews-DNRY0Ugm.d.ts} +1 -1
  8. package/dist/{DepthViews-D81c95Ra.d.cts → DepthViews-DvNixbxg.d.cts} +1 -1
  9. package/dist/{ErrorPolicyPort-D22LUVrK.d.ts → ErrorPolicyPort-DwSnmGcX.d.ts} +1 -1
  10. package/dist/{ErrorPolicyPort-D6CybiqJ.d.cts → ErrorPolicyPort-NFDPe-5w.d.cts} +1 -1
  11. package/dist/{EverfurError-DmELDpXp.d.cts → EverfurError-pEXDbUJ1.d.cts} +9 -1
  12. package/dist/{EverfurError-DmELDpXp.d.ts → EverfurError-pEXDbUJ1.d.ts} +9 -1
  13. package/dist/{EverfurResult-ZtH-YV1h.d.cts → EverfurResult-dtl8ERAw.d.cts} +1 -1
  14. package/dist/{EverfurResult-SGvHKsCB.d.ts → EverfurResult-sKkoXew0.d.ts} +1 -1
  15. package/dist/IntakeMedia-BFZfBLjB.d.cts +116 -0
  16. package/dist/{IntakeMedia-BcjjUizr.d.ts → IntakeMedia-BH0fYDT2.d.cts} +19 -2
  17. package/dist/{IntakeMedia-CL_S2tZE.d.cts → IntakeMedia-Bavl7E4Z.d.ts} +19 -2
  18. package/dist/IntakeMedia-C8GlN_GK.d.ts +116 -0
  19. package/dist/animations/index.cjs +109 -1
  20. package/dist/animations/index.d.cts +6 -6
  21. package/dist/animations/index.d.ts +6 -6
  22. package/dist/animations/index.js +109 -1
  23. package/dist/{attachments-DNaSbmA3.d.ts → attachments-BaslXMdS.d.ts} +3 -3
  24. package/dist/{attachments-DI710no4.d.cts → attachments-DbFwz4iq.d.cts} +7 -7
  25. package/dist/{attachments-B2GjBgvF.d.cts → attachments-y3EcOX_w.d.cts} +3 -3
  26. package/dist/{attachments-SF88N654.d.ts → attachments-y_aO4hlk.d.ts} +7 -7
  27. package/dist/{bookingCopy-xlXxORCA.d.cts → bookingCopy-4i1R7klo.d.cts} +15 -7
  28. package/dist/{bookingCopy-D2N3RhsV.d.ts → bookingCopy-B3UMITD-.d.ts} +15 -7
  29. package/dist/{branding-ytH4jJq1.d.ts → branding-BYEqU855.d.ts} +1 -1
  30. package/dist/{branding-Bio5MM6g.d.cts → branding-BwEu68C8.d.cts} +1 -1
  31. package/dist/{callRoom-7wrE3RP2.d.ts → callRoom-B1qq_D-4.d.ts} +1 -1
  32. package/dist/{callRoom-B_EqaUzx.d.cts → callRoom-DfZTWFXh.d.cts} +1 -1
  33. package/dist/{casesRepository-B-md8h1S.d.cts → casesRepository-B6Z0XBIb.d.cts} +2 -2
  34. package/dist/{casesRepository-CC6951TK.d.ts → casesRepository-SI0zp5YH.d.ts} +2 -2
  35. package/dist/chat/index.cjs +333 -1
  36. package/dist/chat/index.d.cts +12 -12
  37. package/dist/chat/index.d.ts +12 -12
  38. package/dist/chat/index.js +333 -1
  39. package/dist/client/index.cjs +115 -11
  40. package/dist/client/index.d.cts +14 -14
  41. package/dist/client/index.d.ts +14 -14
  42. package/dist/client/index.js +115 -11
  43. package/dist/{config-BM0sv5jx.d.ts → config-Cvo47voG.d.ts} +3 -3
  44. package/dist/{config-Daa1plhQ.d.cts → config-v5k6NsK_.d.cts} +3 -3
  45. package/dist/consent/index.cjs +112 -1
  46. package/dist/consent/index.d.cts +9 -9
  47. package/dist/consent/index.d.ts +9 -9
  48. package/dist/consent/index.js +112 -1
  49. package/dist/{context-DQHtwcHN.d.cts → context-BZOtJbBO.d.cts} +9 -9
  50. package/dist/{context-CDV2pwGI.d.ts → context-cZ7NZ0sG.d.ts} +9 -9
  51. package/dist/{copy-Cl1l-qmY.d.ts → copy-CZBUHbyS.d.ts} +5 -5
  52. package/dist/{copy-BEx5F71o.d.cts → copy-ChJupm1p.d.cts} +5 -5
  53. package/dist/core/index.cjs +140 -13
  54. package/dist/core/index.d.cts +19 -19
  55. package/dist/core/index.d.ts +19 -19
  56. package/dist/core/index.js +140 -13
  57. package/dist/{depth-CAAwiStc.d.cts → depth-CRyU7-pf.d.cts} +7 -6
  58. package/dist/{depth-DfNRVtrV.d.ts → depth-vNpwOkZ8.d.ts} +7 -6
  59. package/dist/{entitlementRepository-DPvWjV-N.d.cts → entitlementRepository-Bv8nSYRd.d.cts} +4 -4
  60. package/dist/{entitlementRepository-CVWvND1P.d.ts → entitlementRepository-CUdxbQrP.d.ts} +4 -4
  61. package/dist/{identity-BhT7oJDS.d.ts → identity-B8GkH53J.d.ts} +2 -2
  62. package/dist/{identity-DUlshgow.d.cts → identity-BHaMJ3KK.d.cts} +2 -2
  63. package/dist/index.cjs +363 -12
  64. package/dist/index.d.cts +19 -19
  65. package/dist/index.d.ts +19 -19
  66. package/dist/index.js +363 -12
  67. package/dist/{models-DSqA5Ahs.d.ts → models-CrbUwbuS.d.ts} +1 -1
  68. package/dist/{models-Bn2z0NNo.d.cts → models-DzvqEjMm.d.cts} +1 -1
  69. package/dist/notifications/index.cjs +94 -2
  70. package/dist/notifications/index.d.cts +5 -5
  71. package/dist/notifications/index.d.ts +5 -5
  72. package/dist/notifications/index.js +94 -2
  73. package/dist/{pets-Bneph9m1.d.cts → pets-BI7Ji8hi.d.cts} +2 -2
  74. package/dist/{pets-DjcLmRrW.d.ts → pets-Dnn-DK1T.d.ts} +2 -2
  75. package/dist/{petsRepository-BwxmfX_s.d.ts → petsRepository-B2lO1sKS.d.ts} +2 -2
  76. package/dist/{petsRepository-BnVre3q7.d.cts → petsRepository-BP9nhM1R.d.cts} +2 -2
  77. package/dist/photo/index.cjs +131 -1
  78. package/dist/photo/index.d.cts +3 -3
  79. package/dist/photo/index.d.ts +3 -3
  80. package/dist/photo/index.js +131 -1
  81. package/dist/{ports-Di9rdLO9.d.ts → ports-BUXF0Rp3.d.ts} +7 -7
  82. package/dist/{ports-BPKxFOSe.d.cts → ports-C40S2V14.d.cts} +7 -7
  83. package/dist/records/depth/index.cjs +200 -2
  84. package/dist/records/depth/index.d.cts +11 -11
  85. package/dist/records/depth/index.d.ts +11 -11
  86. package/dist/records/depth/index.js +200 -2
  87. package/dist/records/index.cjs +742 -4
  88. package/dist/records/index.d.cts +22 -14
  89. package/dist/records/index.d.ts +22 -14
  90. package/dist/records/index.js +742 -4
  91. package/dist/{requestFunnel-CiSX2pun.d.ts → requestFunnel-BrOijMcw.d.ts} +5 -5
  92. package/dist/{requestFunnel-DMR_1T3O.d.cts → requestFunnel-BxNVGyGm.d.cts} +5 -5
  93. package/dist/{runtimeTypes-CkMFCbHW.d.ts → runtimeTypes-CvI1ZH8j.d.ts} +7 -7
  94. package/dist/{runtimeTypes-2gJ5hYoE.d.cts → runtimeTypes-DOO3f-W-.d.cts} +7 -7
  95. package/dist/server/events/index.cjs +92 -2
  96. package/dist/server/events/index.d.cts +4 -4
  97. package/dist/server/events/index.d.ts +4 -4
  98. package/dist/server/events/index.js +92 -2
  99. package/dist/server/index.cjs +95 -2
  100. package/dist/server/index.d.cts +5 -5
  101. package/dist/server/index.d.ts +5 -5
  102. package/dist/server/index.js +95 -2
  103. package/dist/televet/booking/index.cjs +394 -4
  104. package/dist/televet/booking/index.d.cts +24 -127
  105. package/dist/televet/booking/index.d.ts +24 -127
  106. package/dist/televet/booking/index.js +394 -4
  107. package/dist/televet/call/index.cjs +71 -1
  108. package/dist/televet/call/index.d.cts +3 -3
  109. package/dist/televet/call/index.d.ts +3 -3
  110. package/dist/televet/call/index.js +71 -1
  111. package/dist/televet/index.cjs +101 -1
  112. package/dist/televet/index.d.cts +25 -8
  113. package/dist/televet/index.d.ts +25 -8
  114. package/dist/televet/index.js +101 -1
  115. package/dist/{bookingTypes-D4pD3tHs.d.ts → televetGlobal-C5dTUACe.d.cts} +34 -1
  116. package/dist/{bookingTypes-D4pD3tHs.d.cts → televetGlobal-CnjrfhT4.d.ts} +34 -1
  117. package/dist/testing/index.cjs +98 -7
  118. package/dist/testing/index.d.cts +3 -3
  119. package/dist/testing/index.d.ts +3 -3
  120. package/dist/testing/index.js +98 -7
  121. package/dist/testing/rn/index.cjs +101 -1
  122. package/dist/testing/rn/index.d.cts +13 -13
  123. package/dist/testing/rn/index.d.ts +13 -13
  124. package/dist/testing/rn/index.js +101 -1
  125. package/dist/testing/web/index.cjs +95 -1
  126. package/dist/testing/web/index.d.cts +14 -14
  127. package/dist/testing/web/index.d.ts +14 -14
  128. package/dist/testing/web/index.js +95 -1
  129. package/dist/{timelineRows-D3171ksh.d.ts → timelineRows-CEx2TzYB.d.ts} +1 -1
  130. package/dist/{timelineRows-DDnz4gx2.d.cts → timelineRows-Dffceql_.d.cts} +1 -1
  131. package/dist/{tokens-BYtbKwFh.d.cts → tokens-Tzo1KBND.d.cts} +43 -2
  132. package/dist/{tokens-BYtbKwFh.d.ts → tokens-Tzo1KBND.d.ts} +43 -2
  133. package/dist/{typeStyle-DKz02DGU.d.ts → typeStyle-C3IG9Sft.d.ts} +22 -3
  134. package/dist/{typeStyle-BqfwxZH4.d.cts → typeStyle-CZ3Tj60N.d.cts} +22 -3
  135. package/dist/{useRecordsDepth-COJ0wSYK.d.cts → useRecordsDepth-D6a6-_u_.d.cts} +7 -6
  136. package/dist/{useRecordsDepth-Z9FF5X4E.d.ts → useRecordsDepth-DuPUJFDQ.d.ts} +7 -6
  137. package/dist/{useVetVisit-Ds8f1peV.d.cts → useVetVisit-BQX_aTJs.d.cts} +2 -2
  138. package/dist/{useVetVisit-BsjoDO-n.d.ts → useVetVisit-RPBOabl8.d.ts} +2 -2
  139. package/dist/video/index.cjs +122 -1
  140. package/dist/video/index.d.cts +3 -3
  141. package/dist/video/index.d.ts +3 -3
  142. package/dist/video/index.js +122 -1
  143. package/dist/{view-DoQEHXJR.d.ts → view-BSmN5RWf.d.ts} +5 -5
  144. package/dist/{view-nRy6SitU.d.cts → view-UFwCG1Pn.d.cts} +5 -5
  145. package/dist/web/consent/index.cjs +111 -1
  146. package/dist/web/consent/index.d.cts +9 -9
  147. package/dist/web/consent/index.d.ts +9 -9
  148. package/dist/web/consent/index.js +111 -1
  149. package/dist/web/index.cjs +325 -14
  150. package/dist/web/index.d.cts +22 -22
  151. package/dist/web/index.d.ts +22 -22
  152. package/dist/web/index.js +325 -14
  153. package/dist/web/notifications/index.cjs +95 -2
  154. package/dist/web/notifications/index.d.cts +7 -7
  155. package/dist/web/notifications/index.d.ts +7 -7
  156. package/dist/web/notifications/index.js +95 -2
  157. package/dist/web/records/depth/index.cjs +169 -2
  158. package/dist/web/records/depth/index.d.cts +11 -11
  159. package/dist/web/records/depth/index.d.ts +11 -11
  160. package/dist/web/records/depth/index.js +169 -2
  161. package/dist/web/records/index.cjs +689 -4
  162. package/dist/web/records/index.d.cts +34 -37
  163. package/dist/web/records/index.d.ts +34 -37
  164. package/dist/web/records/index.js +689 -4
  165. package/dist/web/records/upload/index.cjs +3 -0
  166. package/dist/web/records/upload/index.d.cts +23 -0
  167. package/dist/web/records/upload/index.d.ts +23 -0
  168. package/dist/web/records/upload/index.js +3 -0
  169. package/dist/web/televet/booking/index.cjs +423 -4
  170. package/dist/web/televet/booking/index.d.cts +21 -35
  171. package/dist/web/televet/booking/index.d.ts +21 -35
  172. package/dist/web/televet/booking/index.js +423 -4
  173. package/dist/web/televet/call/index.cjs +28 -1
  174. package/dist/web/televet/call/index.d.cts +2 -2
  175. package/dist/web/televet/call/index.d.ts +2 -2
  176. package/dist/web/televet/call/index.js +28 -1
  177. package/dist/web/televet/index.cjs +102 -4
  178. package/dist/web/televet/index.d.cts +22 -11
  179. package/dist/web/televet/index.d.ts +22 -11
  180. package/dist/web/televet/index.js +102 -4
  181. package/package.json +20 -4
  182. package/web/records/upload/native-blocked.cjs +12 -0
  183. package/web/records/upload/package.json +8 -0
  184. package/dist/televetGlobal-CEk0_cW9.d.cts +0 -34
  185. package/dist/televetGlobal-Cs9Wbqsy.d.ts +0 -34
@@ -1 +1,71 @@
1
- 'use strict';var react=require('react'),reactNative=require('react-native'),reactNativeSafeAreaContext=require('react-native-safe-area-context'),jsxRuntime=require('react/jsx-runtime');var Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function h(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(h,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",lobbyTitleNoName:"Your vet is joining",lobbySubtitle:"Usually under a minute",lobbyPrepLabel:"WHILE YOU WAIT",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:n(e=>{let t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} minutes`,"lobbyDuration"),waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:n(e=>{let t=e?.trim()??"";return t.length>0?`Before ${t} joins`:i.lobbyPrepLabel},"lobbyTipsTitle"),lobbyTipSpot:"Find a bright, quiet spot.",joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,Q="System",ee="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:Q,mono:ee,fontUrl:null,families:{regular:Q,medium:Q,bold:Q,mono:ee,monoMedium:ee,monoBold:ee},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Te=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Ce(e){return `cubic-bezier(${e.join(", ")})`}n(Ce,"cssCubicBezier");var dt={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Ce(Te.standard),emphasized:Ce(Te.emphasized),exit:Ce(Te.exit)},reducedMotion:false},or={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",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},ut=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:dt,slots:st}),ar={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",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:dt,slots:st});var ct=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ct]??(ft[ct]=react.createContext(ut));Ee.displayName??="EverfurThemeContext";function A(){return react.useContext(Ee)}n(A,"useEverfurTheme");function cr(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(cr,"tierMultiplier");function b({tier:e="content",...t}){let{type:r}=A(),a=cr(r,e);return react.createElement(reactNative.Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(b,"Text");react.forwardRef(n(function(t,r){return react.createElement(reactNative.TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(u){return ke(`optional peer '${e}' is not installed: ${pr(u)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[everfur] The in-app vet call needs the Daily native modules, which this app has not registered. Install @daily-co/react-native-daily-js, @daily-co/react-native-webrtc and (Expo) @daily-co/config-plugin-rn-daily-js, rebuild the native app (a JS-only OTA cannot add a native module), and call registerEverfurDaily(() => require('@daily-co/react-native-daily-js')) once in your app entry. ON EXPO GO THIS CANNOT BE FIXED BY INSTALLING: Expo Go runs a fixed set of native modules and cannot load Daily at any version, so you need a development build (expo prebuild, then run the native app) before the in-app call works at all. Until then the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function re(e){return typeof e=="object"&&e!==null}n(re,"isRecordLike");function gr(e){return re(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=re(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,u={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(u)?u:null}n(br,"normalizeDailyModule");function ht(e){if(!re(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function te(e){return Object.freeze({available:false,module:null,reason:e})}n(te,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=te(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=te(t.reason),x;let r=t.module.box;if(!re(r))return x=te(bt),x;let a=br(r);return x=a===null?te(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function z({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:u}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:u,children:t})}n(z,"CallControl");function $({children:e,testID:t}){return jsxRuntime.jsx(reactNative.View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n($,"GlyphBox");function Le({color:e}){return jsxRuntime.jsx(reactNative.View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function ne({color:e,off:t=false}){return jsxRuntime.jsxs($,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.micCapsule,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micCradle,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(ne,"MicGlyph");function oe({color:e,off:t=false}){return jsxRuntime.jsxs($,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.cameraBody,{borderColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(oe,"CameraGlyph");function Tt({color:e,off:t=false}){return jsxRuntime.jsxs($,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxRuntime.jsxs(reactNative.View,{style:y.row,children:[jsxRuntime.jsx(reactNative.View,{style:[y.speakerBox,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsxRuntime.jsx(reactNative.View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsxRuntime.jsx(Le,{color:e}):null]})}n(Tt,"SpeakerGlyph");function ae({color:e}){return jsxRuntime.jsx($,{testID:"glyph-switch-camera",children:jsxRuntime.jsxs(reactNative.View,{style:[y.switchBody,{borderColor:e}],children:[jsxRuntime.jsx(reactNative.View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsxRuntime.jsx(reactNative.View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(ae,"SwitchCameraGlyph");function Ct({color:e}){return jsxRuntime.jsx($,{testID:"glyph-leave",children:jsxRuntime.jsxs(reactNative.View,{style:y.column,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiver,{borderColor:e}]}),jsxRuntime.jsxs(reactNative.View,{style:y.receiverPads,children:[jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]}),jsxRuntime.jsx(reactNative.View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Ct,"LeaveGlyph");var y=reactNative.StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var k=Object.freeze({surface:"rgba(255,255,255,0.08)",surfaceRaised:"rgba(255,255,255,0.14)",surfaceActive:"rgba(255,255,255,0.24)",hairline:"rgba(255,255,255,0.18)",glyph:"rgba(255,255,255,0.72)",textSecondary:"rgba(255,255,255,0.78)",textTertiary:"rgba(255,255,255,0.56)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Dr=132,Fr=184,Vr=44;function Fe(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(Fe,"soldMinutes");function Ir({reducedMotion:e,styles:t}){let r=react.useRef(Array.from({length:xt},()=>new reactNative.Animated.Value(wt))).current;return react.useEffect(()=>{if(e)return;let a=r.map((o,u)=>reactNative.Animated.loop(reactNative.Animated.sequence([reactNative.Animated.delay(u*Et),reactNative.Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),reactNative.Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),reactNative.Animated.delay((xt-u-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsxRuntime.jsx(reactNative.View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsxRuntime.jsx(reactNative.Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Ir,"WaitingDots");function De({label:e,glyph:t,active:r,onPress:a,testID:o,styles:u}){return jsxRuntime.jsx(reactNative.Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[u.control,r?null:u.controlOff],children:t})}n(De,"LobbyControl");function Ve(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:u,onToggleMic:T,onToggleCamera:O,onSwitchCamera:Y,onLeave:q,style:K}=e,v=A(),s=react.useMemo(()=>Or(v),[v]),l=reactNativeSafeAreaContext.useSafeAreaInsets(),{width:P}=reactNative.useWindowDimensions(),B=P<Lr?Dr:Fr;return jsxRuntime.jsxs(reactNative.View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},K],testID:"everfur-vet-lobby",children:[jsxRuntime.jsxs(reactNative.View,{style:s.topRow,children:[jsxRuntime.jsx(reactNative.Pressable,{onPress:q,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsxRuntime.jsx(b,{tier:"control",style:s.leaveLabel,children:i.leaveCta})}),jsxRuntime.jsx(b,{tier:"badge",style:s.prepLabel,testID:"everfur-vet-lobby-label",children:i.waitingRoomLabel})]}),jsxRuntime.jsxs(reactNative.View,{style:s.center,children:[jsxRuntime.jsxs(reactNative.View,{style:[s.avatar,{width:B,height:B,borderRadius:B/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphHead}),jsxRuntime.jsx(reactNative.View,{style:s.avatarGlyphBody})]}),jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsxRuntime.jsx(b,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsxRuntime.jsx(b,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsxRuntime.jsx(Ir,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxRuntime.jsxs(reactNative.View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsxRuntime.jsx(b,{tier:"badge",style:s.prepLabel,children:i.lobbyTipsTitle(t)}),[i.lobbyTipSpot,i.lobbyPrep(r)].map((N,R)=>jsxRuntime.jsxs(reactNative.View,{style:s.tip,children:[jsxRuntime.jsx(b,{tier:"badge",style:s.tipNumber,accessibilityElementsHidden:true,importantForAccessibility:"no",children:String(R+1).padStart(2,"0")}),jsxRuntime.jsx(b,{style:s.prepBody,children:N})]},N))]}),jsxRuntime.jsxs(reactNative.View,{style:s.controls,children:[jsxRuntime.jsx(De,{label:o?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(ne,{color:v.color.text.onBrand,off:!o}),active:o,onPress:T,testID:"everfur-vet-lobby-mic",styles:s}),jsxRuntime.jsx(De,{label:u?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(oe,{color:v.color.text.onBrand,off:!u}),active:u,onPress:O,testID:"everfur-vet-lobby-camera",styles:s}),u&&Y?jsxRuntime.jsx(De,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(ae,{color:v.color.text.onBrand}),active:true,onPress:Y,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsxRuntime.jsx(b,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(Fe(a))})]})}n(Ve,"EverfurVetCallLobby");function Or(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center",gap:r.md},tip:{flexDirection:"row",gap:r.md,alignItems:"flex-start",paddingTop:r.sm},tipNumber:{...h(e,"monoBold"),color:k.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:Vr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:k.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:k.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:k.glyph},title:{...h(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...h(e,"regular"),color:k.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:k.hairline,backgroundColor:k.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...h(e,"monoBold"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...h(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:k.surfaceRaised},controlOff:{backgroundColor:k.surfaceActive},duration:{...h(e,"medium"),color:k.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Or,"makeStyles");var Ie=5e3;function Oe(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Oe,"settleWithin");function Dt(e,t){let r=react.useRef(e);react.useEffect(()=>{r.current=e;});let a=react.useRef(false);react.useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=react.useRef(false),u=react.useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),T=react.useRef(false),O=react.useCallback(()=>{T.current||(T.current=true,Oe(t(),Ie).then(u));},[t,u]);return {reportLeft:u,leave:O,leaving:T}}n(Dt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Ar(){let e=globalThis;return e[Pr]??=new Map}n(Ar,"receipts");function Ft(e){return (Ar().get(e)??0)>0}n(Ft,"hasRecordingNoticeAccepted");function Vt(e){let[t,r]=react.useState(true),a=react.useRef(true),o=react.useCallback(()=>{let u=e.current;if(!u?.setNativeInCallAudioMode)return;let T=!a.current;a.current=T,r(T),u.setNativeInCallAudioMode(T?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Vt,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxRuntime.jsxs(reactNative.View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsxRuntime.jsx(reactNative.View,{style:e.remoteOffHead}),jsxRuntime.jsx(reactNative.View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsxRuntime.jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:u,consultMinutes:T,daily:O,telemetry:Y,onUnavailable:q,renderUnavailable:K,style:v}=rt(e,["onLeave"]),s=A(),l=react.useMemo(()=>$r(s),[s]),P=reactNativeSafeAreaContext.useSafeAreaInsets(),B=Y??Xe,N=react.useRef(B);react.useEffect(()=>{N.current=B;});let R=react.useRef(null),[de,At]=react.useState(()=>Ft(t)),[Bt,J]=react.useState("joining"),[Z,Nt]=react.useState(null),[je,Mt]=react.useState(null),[M,_t]=react.useState(true),[S,jt]=react.useState(true),{speakerOn:W,toggleSpeaker:Ht}=Vt(R),[zt,Wt]=react.useState(true),[ue,Ut]=react.useState({flip:false,speaker:false}),[U,Gt]=react.useState(null),[He,ze]=react.useState(0),We=ge(t,r),_=react.useMemo(()=>We?O?{available:true,module:O,reason:""}:Se():null,[We,O]),G=_?.available?_.module:null,F=react.useMemo(()=>_===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:_.available?null:{reason:"dailyMissing",detail:`${we} (${_.reason})`},[_]),ce=react.useRef(false);react.useEffect(()=>{if(F===null){ce.current=false;return}if(be(q,F.reason,F.detail),!ce.current){ce.current=true;try{globalThis.console?.warn?.(F.detail);}catch{}}},[F,q]);let fe=react.useCallback(async()=>{let c=R.current;if(R.current=null,!!c){await Oe(new Promise(f=>f(c.leave())),Ie);try{c.setLocalAudio(!1),c.setLocalVideo(!1);}catch{}try{await c.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Dt(a,fe);react.useEffect(()=>{if(G===null||!de)return;let c=false,f=G.createCallObject();R.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let j=n(()=>{let H=Object.values(f.participants());Mt(H.find(me=>me.local)??null),Nt(H.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let H of Ke)f.on(H,j);let Je=n(()=>{c||Ue.current||(J("left"),pe());},"onLeftMeeting"),Ze=n(()=>{c||J("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{c||(J("joined"),Gt(Date.now()),j(),N.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{c||(J("error"),N.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{c=true;for(let H of Ke)f.off(H,j);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[G,de,t,r,fe,pe,Ue]),react.useEffect(()=>{if(U===null)return;ze(Date.now()-U);let c=setInterval(()=>{ze(Date.now()-U);},1e3);return ()=>{clearInterval(c);}},[U]);let Ge=react.useCallback(()=>{let c=R.current;c&&_t(f=>(c.setLocalAudio(!f),!f));},[]),$e=react.useCallback(()=>{let c=R.current;c&&jt(f=>(c.setLocalVideo(!f),!f));},[]),Ye=react.useCallback(()=>{let c=R.current;c?.cycleCamera&&c.cycleCamera().then(f=>{let j=f?.device?.facingMode;j&&Wt(j==="user");},()=>{});},[]);if(F!==null)return K?jsxRuntime.jsx(jsxRuntime.Fragment,{children:K(F.reason,F.detail)}):null;if(G===null)return null;if(!de)return jsxRuntime.jsxs(reactNative.View,{style:[l.notice,{paddingTop:P.top+s.space.xl,paddingBottom:P.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsxRuntime.jsx(b,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>At(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsxRuntime.jsx(b,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsxRuntime.jsx(reactNative.Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(b,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(Bt==="error")return jsxRuntime.jsxs(reactNative.View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsxRuntime.jsx(b,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsxRuntime.jsx(reactNative.Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsxRuntime.jsx(b,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(Z===null)return jsxRuntime.jsx(Ve,{clinicianName:o,petName:u,consultMinutes:T,micOn:M,cameraOn:S,onToggleMic:Ge,onToggleCamera:$e,...ue.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=G.DailyMediaView,X=o?.trim()??"",$t=He>=Fe(T)*6e4;return jsxRuntime.jsxs(reactNative.View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxRuntime.jsxs(reactNative.View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsxRuntime.jsx(qe,{videoTrack:Ne(Z.videoTrack),audioTrack:Ne(Z.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(Z)?null:jsxRuntime.jsxs(reactNative.View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsxRuntime.jsx(zr,{styles:l}),X.length>0?jsxRuntime.jsx(b,{style:l.remoteOffName,numberOfLines:1,children:X}):null]})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.statusRow,{top:P.top+s.space.sm}],pointerEvents:"none",children:[X.length>0?jsxRuntime.jsx(b,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:X}):null,U!==null?jsxRuntime.jsx(b,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxRuntime.jsxs(reactNative.View,{style:[l.selfView,{top:P.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsxRuntime.jsx(qe,{videoTrack:S?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&S?null:jsxRuntime.jsx(reactNative.View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsxRuntime.jsx(b,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxRuntime.jsxs(reactNative.View,{style:[l.controlBar,{bottom:P.bottom+s.space.lg}],children:[ue.speaker?jsxRuntime.jsx(z,{label:W?i.speakerOffCta:i.speakerOnCta,glyph:jsxRuntime.jsx(Tt,{color:W?s.color.text.onBrand:_e,off:!W}),muted:!W,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,W?null:l.controlMuted]}):null,jsxRuntime.jsx(z,{label:M?i.muteCta:i.unmuteCta,glyph:jsxRuntime.jsx(ne,{color:M?s.color.text.onBrand:_e,off:!M}),muted:!M,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,M?null:l.controlMuted]}),jsxRuntime.jsx(z,{label:S?i.cameraOffCta:i.cameraOnCta,glyph:jsxRuntime.jsx(oe,{color:S?s.color.text.onBrand:_e,off:!S}),muted:!S,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,S?null:l.controlMuted]}),ue.flip&&S?jsxRuntime.jsx(z,{label:i.switchCameraCta,glyph:jsxRuntime.jsx(ae,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsxRuntime.jsx(z,{label:i.leaveCta,glyph:jsxRuntime.jsx(Ct,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",It="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",Ot=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:Ot+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...h(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:Ot,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:It,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:It},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...h(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...h(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...h(e,"medium"),color:t.brandInk,fontSize:o.size.body},selfViewOffLabel:{...h(e,"medium"),color:"rgba(255,255,255,0.78)",fontSize:o.size.micro,textAlign:"center"},controlBar:{position:"absolute",left:0,right:0,flexDirection:"row",justifyContent:"center",alignItems:"center",gap:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...h(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...h(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");exports.EVERFUR_DAILY_SETUP=we;exports.EverfurVetCall=Wr;exports.EverfurVetCallLobby=Ve;exports.VET_CALL_CONSULT_MINUTES=he;exports.VET_CALL_COPY=i;exports.isEverfurDailyModule=ht;exports.isSafeRoomUrl=Qe;exports.isUsableRoomCredential=ge;exports.loadEverfurDaily=Se;exports.registerEverfurDaily=hr;
1
+ "use strict";var react=require("react"),reactNative=require("react-native"),reactNativeSafeAreaContext=require("react-native-safe-area-context"),jsxRuntime=require("react/jsx-runtime");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 noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function isSafeRoomUrl(url){try{return new URL(url.trim()).protocol==="https:"}catch{return false}}function isUsableRoomCredential(roomUrl,token){return isSafeRoomUrl(roomUrl)&&token.trim().length>0}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var VET_CALL_CONSULT_MINUTES=10,VET_CALL_COPY=/* @__PURE__ */Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",lobbyTitleNoName:"Your vet is joining",lobbySubtitle:"Usually under a minute",lobbyPrepLabel:"WHILE YOU WAIT",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function formatElapsed(ms){let total=Math.max(0,Math.floor(ms/1e3)),seconds=String(total%60).padStart(2,"0"),minutes=Math.floor(total%3600/60),hours=Math.floor(total/3600);return hours>0?`${hours}:${String(minutes).padStart(2,"0")}:${seconds}`:`${minutes}:${seconds}`}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});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}})});function optionalModule(name,load,validate){let candidate;try{candidate=load()}catch(cause){return frozenUnavailable(`optional peer '${name}' is not installed: ${describe(cause)}`)}let resolved=unwrapDefault(candidate);return resolved==null?frozenUnavailable(`optional peer '${name}' resolved to no module`):validate&&!validate(resolved)?frozenUnavailable(`optional peer '${name}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:resolved})}function unwrapDefault(candidate){return typeof candidate=="object"&&candidate!==null&&"default"in candidate&&Object.keys(candidate).length<=2?candidate.default:candidate}function frozenUnavailable(reason){/* @__PURE__ */
2
+ return Object.freeze({available:false,module:null,reason:reason})}function describe(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"unknown load error"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function markEverfurDailyRegistered(registered){televetGlobal().dailyRegistered=registered}var EVERFUR_DAILY_SETUP=`[everfur] The in-app vet call needs the Daily native modules, which this app has not registered. Install @daily-co/react-native-daily-js, @daily-co/react-native-webrtc and (Expo) @daily-co/config-plugin-rn-daily-js, rebuild the native app (a JS-only OTA cannot add a native module), and call registerEverfurDaily(() => require('@daily-co/react-native-daily-js')) once in your app entry. ON EXPO GO THIS CANNOT BE FIXED BY INSTALLING: Expo Go runs a fixed set of native modules and cannot load Daily at any version, so you need a development build (expo prebuild, then run the native app) before the in-app call works at all. Until then the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,DAILY_PEER="@daily-co/react-native-daily-js",NOT_REGISTERED=`optional peer '${DAILY_PEER}' has no registered loader`,WRONG_SHAPE=`optional peer '${DAILY_PEER}' is present but failed its shape check`;function isRecordLike(candidate){return typeof candidate=="object"&&candidate!==null}function isDailyBox(candidate){return isRecordLike(candidate)&&"box"in candidate}function normalizeDailyModule(candidate){let inner=candidate.default,fallback=isRecordLike(inner)||typeof inner=="function"?inner:{},owner=typeof candidate.createCallObject=="function"?candidate:fallback,factory=owner.createCallObject,merged={createCallObject:typeof factory=="function"?factory.bind(owner):factory,DailyMediaView:candidate.DailyMediaView??fallback.DailyMediaView};return isEverfurDailyModule(merged)?merged:null}function isEverfurDailyModule(candidate){if(!isRecordLike(candidate)||typeof candidate.createCallObject!="function")return false;let view=candidate.DailyMediaView;return typeof view=="function"||typeof view=="object"&&view!==null}var loader=null,memo=null;function unavailable(reason){/* @__PURE__ */
3
+ return Object.freeze({available:false,module:null,reason:reason})}function registerEverfurDaily(next){loader=next,memo=null,markEverfurDailyRegistered(next!==null)}function loadEverfurDaily(){if(memo!==null)return memo;let load=loader;if(load===null)return memo=unavailable(NOT_REGISTERED),memo;let raw=optionalModule(DAILY_PEER,()=>({box:load()}),isDailyBox);if(!raw.available)return memo=unavailable(raw.reason),memo;let inner=raw.module.box;if(!isRecordLike(inner))return memo=unavailable(WRONG_SHAPE),memo;let normalized=normalizeDailyModule(inner);return memo=normalized===null?unavailable(WRONG_SHAPE):/* @__PURE__ */Object.freeze({available:true,module:normalized}),memo}function CallControl({label:label,glyph:glyph,onPress:onPress,testID:testID,muted:muted=false,style:style}){/* @__PURE__ */
4
+ return jsxRuntime.jsx(reactNative.Pressable,{onPress:onPress,testID:testID,accessibilityRole:"button",accessibilityLabel:label,accessibilityState:{selected:muted},style:style,children:glyph})}function GlyphBox({children:children,testID:testID}){/* @__PURE__ */
5
+ return jsxRuntime.jsx(reactNative.View,{style:s.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:testID,children:children})}function Slash({color:color}){/* @__PURE__ */
6
+ return jsxRuntime.jsx(reactNative.View,{style:[s.slash,{backgroundColor:color}]})}function MicGlyph({color:color,off:off=false}){/* @__PURE__ */
7
+ return jsxRuntime.jsxs(GlyphBox,{testID:off?"glyph-mic-off":"glyph-mic",children:[
8
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.column,children:[
9
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.micCapsule,{borderColor:color}]}),
10
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.micCradle,{borderColor:color}]}),
11
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.micStem,{backgroundColor:color}]})]}),off?/* @__PURE__ */jsxRuntime.jsx(Slash,{color:color}):null]})}function CameraGlyph({color:color,off:off=false}){/* @__PURE__ */
12
+ return jsxRuntime.jsxs(GlyphBox,{testID:off?"glyph-camera-off":"glyph-camera",children:[
13
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.row,children:[
14
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.cameraBody,{borderColor:color}]}),
15
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.cameraLens,{borderRightColor:color}]})]}),off?/* @__PURE__ */jsxRuntime.jsx(Slash,{color:color}):null]})}function SpeakerGlyph({color:color,off:off=false}){/* @__PURE__ */
16
+ return jsxRuntime.jsxs(GlyphBox,{testID:off?"glyph-speaker-off":"glyph-speaker",children:[
17
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.row,children:[
18
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.speakerBox,{backgroundColor:color}]}),
19
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.speakerCone,{borderRightColor:color}]}),off?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.speakerWave,{borderColor:color}]})]}),off?/* @__PURE__ */jsxRuntime.jsx(Slash,{color:color}):null]})}function SwitchCameraGlyph({color:color}){/* @__PURE__ */
20
+ return jsxRuntime.jsx(GlyphBox,{testID:"glyph-switch-camera",children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[s.switchBody,{borderColor:color}],children:[
21
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.switchTurn,{borderColor:color,borderTopColor:"transparent"}]}),
22
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.switchHead,{borderBottomColor:color}]})]})})}function LeaveGlyph({color:color}){/* @__PURE__ */
23
+ return jsxRuntime.jsx(GlyphBox,{testID:"glyph-leave",children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.column,children:[
24
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.receiver,{borderColor:color}]}),
25
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:s.receiverPads,children:[
26
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.receiverPad,{backgroundColor:color}]}),
27
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[s.receiverPad,{backgroundColor:color}]})]})]})})}var s=reactNative.StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var ON_BRAND=/* @__PURE__ */Object.freeze({surface:"rgba(255,255,255,0.08)",surfaceRaised:"rgba(255,255,255,0.14)",surfaceActive:"rgba(255,255,255,0.24)",hairline:"rgba(255,255,255,0.18)",glyph:"rgba(255,255,255,0.72)",textSecondary:"rgba(255,255,255,0.78)",textTertiary:"rgba(255,255,255,0.56)"}),DOT_COUNT=3,DOT_STEP_MS=180,DOT_FADE_MS=420,DOT_REST_OPACITY=.35,DOT_STATIC_OPACITY=.6,NARROW_WIDTH=360,AVATAR_NARROW=132,AVATAR_WIDE=184,MIN_TOUCH_TARGET=44;function soldMinutes(served){return typeof served=="number"&&Number.isInteger(served)&&served>=1?served:10}function WaitingDots({reducedMotion:reducedMotion,styles:styles}){let values=react.useRef(Array.from({length:DOT_COUNT},()=>new reactNative.Animated.Value(DOT_REST_OPACITY))).current;return react.useEffect(()=>{if(reducedMotion)return;let loops=values.map((value,index)=>reactNative.Animated.loop(reactNative.Animated.sequence([reactNative.Animated.delay(index*DOT_STEP_MS),reactNative.Animated.timing(value,{toValue:1,duration:DOT_FADE_MS,useNativeDriver:true}),reactNative.Animated.timing(value,{toValue:DOT_REST_OPACITY,duration:DOT_FADE_MS,useNativeDriver:true}),reactNative.Animated.delay((DOT_COUNT-index-1)*DOT_STEP_MS)])));for(let loop of loops)loop.start();return()=>{for(let loop of loops)loop.stop()}},[reducedMotion,values]),/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:values.map((value,index)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:[styles.dot,{opacity:reducedMotion?DOT_STATIC_OPACITY:value}]},index))})}function LobbyControl({label:label,glyph:glyph,active:active,onPress:onPress,testID:testID,styles:styles}){/* @__PURE__ */
28
+ return jsxRuntime.jsx(reactNative.Pressable,{onPress:onPress,testID:testID,accessibilityRole:"button",accessibilityState:{selected:!active},accessibilityLabel:label,style:[styles.control,active?null:styles.controlOff],children:glyph})}function EverfurVetCallLobby(props){let{clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,micOn:micOn,cameraOn:cameraOn,onToggleMic:onToggleMic,onToggleCamera:onToggleCamera,onSwitchCamera:onSwitchCamera,onLeave:onLeave,style:style}=props,theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles(theme),[theme]),insets=reactNativeSafeAreaContext.useSafeAreaInsets(),{width:width}=reactNative.useWindowDimensions(),avatarSize=width<NARROW_WIDTH?AVATAR_NARROW:AVATAR_WIDE;/* @__PURE__ */
29
+ return jsxRuntime.jsxs(reactNative.View,{style:[styles.root,{paddingTop:insets.top+theme.space.sm,paddingBottom:insets.bottom+theme.space.lg},style],testID:"everfur-vet-lobby",children:[
30
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.topRow,children:[
31
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:onLeave,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:styles.leaveHit,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.leaveLabel,children:VET_CALL_COPY.leaveCta})}),
32
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.prepLabel,testID:"everfur-vet-lobby-label",children:VET_CALL_COPY.waitingRoomLabel})]}),
33
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.center,children:[
34
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles.avatar,{width:avatarSize,height:avatarSize,borderRadius:avatarSize/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
35
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.avatarGlyphHead}),
36
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.avatarGlyphBody})]}),
37
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessibilityLiveRegion:"polite",accessible:true,children:[
38
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"heading",style:styles.title,testID:"everfur-vet-lobby-title",children:VET_CALL_COPY.lobbyTitle(clinicianName)}),
39
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.subtitle,testID:"everfur-vet-lobby-subtitle",children:VET_CALL_COPY.lobbySubtitle})]}),
40
+ /* @__PURE__ */jsxRuntime.jsx(WaitingDots,{reducedMotion:theme.motion.reducedMotion,styles:styles})]}),
41
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.prepCard,testID:"everfur-vet-lobby-prep",children:[
42
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.prepLabel,children:VET_CALL_COPY.lobbyTipsTitle(clinicianName)}),[VET_CALL_COPY.lobbyTipSpot,VET_CALL_COPY.lobbyPrep(petName)].map((tip,i)=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.tip,children:[
43
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.tipNumber,accessibilityElementsHidden:true,importantForAccessibility:"no",children:String(i+1).padStart(2,"0")}),
44
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.prepBody,children:tip})]},tip))]}),
45
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.controls,children:[
46
+ /* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:micOn?VET_CALL_COPY.muteCta:VET_CALL_COPY.unmuteCta,glyph:/* @__PURE__ */jsxRuntime.jsx(MicGlyph,{color:theme.color.text.onBrand,off:!micOn}),active:micOn,onPress:onToggleMic,testID:"everfur-vet-lobby-mic",styles:styles}),
47
+ /* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:cameraOn?VET_CALL_COPY.cameraOffCta:VET_CALL_COPY.cameraOnCta,glyph:/* @__PURE__ */jsxRuntime.jsx(CameraGlyph,{color:theme.color.text.onBrand,off:!cameraOn}),active:cameraOn,onPress:onToggleCamera,testID:"everfur-vet-lobby-camera",styles:styles}),cameraOn&&onSwitchCamera?/* @__PURE__ */jsxRuntime.jsx(LobbyControl,{label:VET_CALL_COPY.switchCameraCta,glyph:/* @__PURE__ */jsxRuntime.jsx(SwitchCameraGlyph,{color:theme.color.text.onBrand}),active:true,onPress:onSwitchCamera,testID:"everfur-vet-lobby-switch-camera",styles:styles}):null]}),
48
+ /* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.duration,testID:"everfur-vet-lobby-duration",children:VET_CALL_COPY.lobbyDuration(soldMinutes(consultMinutes))})]})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:color.brand,paddingHorizontal:space.lg},topRow:{flexDirection:"row",alignItems:"center",gap:space.md},tip:{flexDirection:"row",gap:space.md,alignItems:"flex-start",paddingTop:space.sm},tipNumber:{...face(theme,"monoBold"),color:ON_BRAND.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center",paddingVertical:space.xs,paddingRight:space.md},leaveLabel:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:color.success,backgroundColor:ON_BRAND.surface,marginBottom:space.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:ON_BRAND.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:ON_BRAND.glyph},title:{...face(theme,"bold"),color:color.text.onBrand,fontSize:type.size.heading,lineHeight:Math.round(type.size.heading*type.lineHeight.snug),textAlign:"center",paddingHorizontal:space.sm},subtitle:{...face(theme,"regular"),color:ON_BRAND.textSecondary,fontSize:type.size.body,textAlign:"center",marginTop:space.xs},dotRow:{flexDirection:"row",gap:space.xs,marginTop:space.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:color.success},prepCard:{borderRadius:radius.lg,borderWidth:1,borderColor:ON_BRAND.hairline,backgroundColor:ON_BRAND.surface,padding:space.lg,marginBottom:space.lg},prepLabel:{...face(theme,"monoBold"),color:color.accent,fontSize:type.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...face(theme,"regular"),color:color.text.onBrand,fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:space.lg,marginBottom:space.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:ON_BRAND.surfaceRaised},controlOff:{backgroundColor:ON_BRAND.surfaceActive},duration:{...face(theme,"medium"),color:ON_BRAND.textTertiary,fontSize:type.size.micro,letterSpacing:1.6,textAlign:"center"}})}var LEAVE_SETTLE_MS=5e3;function settleWithin(work,ms){return new Promise(resolve=>{let timer=setTimeout(resolve,ms);work.catch(()=>{}).then(()=>{clearTimeout(timer),resolve()})})}function useLeaveOnce(onLeave,teardown){let onLeaveRef=react.useRef(onLeave);react.useEffect(()=>{onLeaveRef.current=onLeave});let liveRef=react.useRef(false);react.useEffect(()=>(liveRef.current=true,()=>{liveRef.current=false}),[]);let reportedRef=react.useRef(false),reportLeft=react.useCallback(()=>{reportedRef.current||!liveRef.current||(reportedRef.current=true,onLeaveRef.current())},[]),leavingRef=react.useRef(false),leave=react.useCallback(()=>{leavingRef.current||(leavingRef.current=true,settleWithin(teardown(),LEAVE_SETTLE_MS).then(reportLeft))},[teardown,reportLeft]);return{reportLeft:reportLeft,leave:leave,leaving:leavingRef}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function hasRecordingNoticeAccepted(roomUrl){return(receipts().get(roomUrl)??0)>0}function useSpeakerRoute(callRef){let[speakerOn,setSpeakerOn]=react.useState(true),route=react.useRef(true),toggleSpeaker=react.useCallback(()=>{let call=callRef.current;if(!call?.setNativeInCallAudioMode)return;let next=!route.current;route.current=next,setSpeakerOn(next),call.setNativeInCallAudioMode(next?"video":"voice")},[callRef]);return{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}}function asTrack(track){return track??null}function hasVideo(participant){return!!participant?.videoTrack}function PersonMark({styles:styles}){/* @__PURE__ */
49
+ return jsxRuntime.jsxs(reactNative.View,{style:styles.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
50
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.remoteOffHead}),
51
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.remoteOffBody})]})}function EverfurVetCall(props){/* @__PURE__ */
52
+ return jsxRuntime.jsx(VetCallRoom,{...props},props.roomUrl)}function VetCallRoom(props){let{roomUrl:roomUrl,token:token,onLeave:onLeave,clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,daily:daily,telemetry:telemetry,onUnavailable:onUnavailable,renderUnavailable:renderUnavailable,style:style}=guardHostProps(props,["onLeave"]),theme=useEverfurTheme(),styles=react.useMemo(()=>makeStyles2(theme),[theme]),insets=reactNativeSafeAreaContext.useSafeAreaInsets(),sink=telemetry??noopTelemetry,sinkRef=react.useRef(sink);react.useEffect(()=>{sinkRef.current=sink});let callRef=react.useRef(null),[acknowledged,setAcknowledged]=react.useState(()=>hasRecordingNoticeAccepted(roomUrl)),[phase,setPhase]=react.useState("joining"),[remote,setRemote]=react.useState(null),[local,setLocal]=react.useState(null),[micOn,setMicOn]=react.useState(true),[camOn,setCamOn]=react.useState(true),{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}=useSpeakerRoute(callRef),[frontCamera,setFrontCamera]=react.useState(true),[caps,setCaps]=react.useState({flip:false,speaker:false}),[joinedAtMs,setJoinedAtMs]=react.useState(null),[elapsedMs,setElapsedMs]=react.useState(0),credentialOk=isUsableRoomCredential(roomUrl,token),loaded=react.useMemo(()=>credentialOk?daily?{available:true,module:daily,reason:""}:loadEverfurDaily():null,[credentialOk,daily]),module=loaded?.available?loaded.module:null,unavailable2=react.useMemo(()=>loaded===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:loaded.available?null:{reason:"dailyMissing",detail:`${EVERFUR_DAILY_SETUP} (${loaded.reason})`},[loaded]),warned=react.useRef(false);react.useEffect(()=>{if(unavailable2===null){warned.current=false;return}if(callHost(onUnavailable,unavailable2.reason,unavailable2.detail),!warned.current){warned.current=true;try{globalThis.console?.warn?.(unavailable2.detail)}catch{}}},[unavailable2,onUnavailable]);let teardown=react.useCallback(async()=>{let call=callRef.current;if(callRef.current=null,!!call){await settleWithin(new Promise(settle=>settle(call.leave())),LEAVE_SETTLE_MS);try{call.setLocalAudio(!1),call.setLocalVideo(!1)}catch{}try{await call.destroy()}catch{}}},[]),{reportLeft:reportLeft,leave:leave,leaving:leaving}=useLeaveOnce(onLeave,teardown);react.useEffect(()=>{if(module===null||!acknowledged)return;let cancelled=false,call=module.createCallObject();callRef.current=call,setCaps({flip:typeof call.cycleCamera=="function",speaker:typeof call.setNativeInCallAudioMode=="function"});let syncParticipants=()=>{let all=Object.values(call.participants());setLocal(all.find(p=>p.local)??null),setRemote(all.find(p=>!p.local)??null)},events=["participant-joined","participant-updated","participant-left"];for(let event of events)call.on(event,syncParticipants);let onLeftMeeting=()=>{cancelled||leaving.current||(setPhase("left"),reportLeft())},onError=()=>{cancelled||setPhase("error")};return call.on("left-meeting",onLeftMeeting),call.on("error",onError),call.join({url:roomUrl,token:token}).then(()=>{cancelled||(setPhase("joined"),setJoinedAtMs(Date.now()),syncParticipants(),sinkRef.current.track("televet.call.joined",{provider:"daily"}))}).catch(()=>{cancelled||(setPhase("error"),sinkRef.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}))}),()=>{cancelled=true;for(let event of events)call.off(event,syncParticipants);call.off("left-meeting",onLeftMeeting),call.off("error",onError),teardown()}},[module,acknowledged,roomUrl,token,teardown,reportLeft,leaving]),react.useEffect(()=>{if(joinedAtMs===null)return;setElapsedMs(Date.now()-joinedAtMs);let id=setInterval(()=>{setElapsedMs(Date.now()-joinedAtMs)},1e3);return()=>{clearInterval(id)}},[joinedAtMs]);let toggleMic=react.useCallback(()=>{let call=callRef.current;call&&setMicOn(on=>(call.setLocalAudio(!on),!on))},[]),toggleCam=react.useCallback(()=>{let call=callRef.current;call&&setCamOn(on=>(call.setLocalVideo(!on),!on))},[]),flipCamera=react.useCallback(()=>{let call=callRef.current;call?.cycleCamera&&call.cycleCamera().then(result=>{let facing=result?.device?.facingMode;facing&&setFrontCamera(facing==="user")},()=>{})},[]);if(unavailable2!==null)return renderUnavailable?/* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment,{children:renderUnavailable(unavailable2.reason,unavailable2.detail)}):null;if(module===null)return null;if(!acknowledged)/* @__PURE__ */
53
+ return jsxRuntime.jsxs(reactNative.View,{style:[styles.notice,{paddingTop:insets.top+theme.space.xl,paddingBottom:insets.bottom+theme.space.xl},style],testID:"everfur-vet-call-recording-notice",children:[
54
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.noticeTitle,accessibilityRole:"header",children:VET_CALL_COPY.recordingNoticeTitle}),
55
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>setAcknowledged(true),accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:styles.noticeContinue,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.noticeContinueLabel,children:VET_CALL_COPY.recordingNoticeCta})}),
56
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:reportLeft,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-call-recording-leave",style:styles.errorLeaveHit,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.noticeLeave,children:VET_CALL_COPY.leaveCta})})]});if(phase==="error")/* @__PURE__ */
57
+ return jsxRuntime.jsxs(reactNative.View,{style:[styles.centered,style],testID:"everfur-vet-call-error",children:[
58
+ /* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.status,accessibilityLiveRegion:"polite",children:VET_CALL_COPY.joinFailedReason}),
59
+ /* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:leave,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-call-error-leave",style:styles.errorLeaveHit,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles.errorLeave,children:VET_CALL_COPY.leaveCta})})]});if(remote===null)/* @__PURE__ */
60
+ return jsxRuntime.jsx(EverfurVetCallLobby,{clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,micOn:micOn,cameraOn:camOn,onToggleMic:toggleMic,onToggleCamera:toggleCam,...caps.flip?{onSwitchCamera:flipCamera}:{},onLeave:leave,style:style});let MediaView=module.DailyMediaView,name=clinicianName?.trim()??"",overTime=elapsedMs>=soldMinutes(consultMinutes)*6e4;/* @__PURE__ */
61
+ return jsxRuntime.jsxs(reactNative.View,{style:[styles.root,style],testID:"everfur-vet-call",children:[
62
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.fill,testID:"everfur-vet-call-remote",children:[
63
+ /* @__PURE__ */jsxRuntime.jsx(MediaView,{videoTrack:asTrack(remote.videoTrack),audioTrack:asTrack(remote.audioTrack),mirror:false,objectFit:"cover",style:styles.fill}),hasVideo(remote)?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[
64
+ /* @__PURE__ */jsxRuntime.jsx(PersonMark,{styles:styles}),name.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.remoteOffName,numberOfLines:1,children:name}):null]})]}),
65
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles.statusRow,{top:insets.top+theme.space.sm}],pointerEvents:"none",children:[name.length>0?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:styles.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:name}):null,joinedAtMs!==null?/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:[styles.statusMeta,overTime?styles.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:formatElapsed(elapsedMs)}):null]}),
66
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles.selfView,{top:insets.top+theme.space.sm}],testID:"everfur-vet-call-self",children:[
67
+ /* @__PURE__ */jsxRuntime.jsx(MediaView,{videoTrack:camOn?asTrack(local?.videoTrack):null,audioTrack:null,mirror:frontCamera,objectFit:"cover",style:styles.fill}),local?.videoTrack&&camOn?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles.selfViewOff,styles.fill],testID:"everfur-vet-call-self-off",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles.selfViewOffLabel,children:VET_CALL_COPY.selfCameraOffLabel})})]}),
68
+ /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[styles.controlBar,{bottom:insets.bottom+theme.space.lg}],children:[caps.speaker?/* @__PURE__ */jsxRuntime.jsx(CallControl,{label:speakerOn?VET_CALL_COPY.speakerOffCta:VET_CALL_COPY.speakerOnCta,glyph:/* @__PURE__ */jsxRuntime.jsx(SpeakerGlyph,{color:speakerOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!speakerOn}),muted:!speakerOn,onPress:toggleSpeaker,testID:"everfur-vet-call-speaker",style:[styles.control,speakerOn?null:styles.controlMuted]}):null,
69
+ /* @__PURE__ */jsxRuntime.jsx(CallControl,{label:micOn?VET_CALL_COPY.muteCta:VET_CALL_COPY.unmuteCta,glyph:/* @__PURE__ */jsxRuntime.jsx(MicGlyph,{color:micOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!micOn}),muted:!micOn,onPress:toggleMic,testID:"everfur-vet-call-mic",style:[styles.control,micOn?null:styles.controlMuted]}),
70
+ /* @__PURE__ */jsxRuntime.jsx(CallControl,{label:camOn?VET_CALL_COPY.cameraOffCta:VET_CALL_COPY.cameraOnCta,glyph:/* @__PURE__ */jsxRuntime.jsx(CameraGlyph,{color:camOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!camOn}),muted:!camOn,onPress:toggleCam,testID:"everfur-vet-call-camera",style:[styles.control,camOn?null:styles.controlMuted]}),caps.flip&&camOn?/* @__PURE__ */jsxRuntime.jsx(CallControl,{label:VET_CALL_COPY.switchCameraCta,glyph:/* @__PURE__ */jsxRuntime.jsx(SwitchCameraGlyph,{color:theme.color.text.onBrand}),onPress:flipCamera,testID:"everfur-vet-call-switch-camera",style:styles.control}):null,
71
+ /* @__PURE__ */jsxRuntime.jsx(CallControl,{label:VET_CALL_COPY.leaveCta,glyph:/* @__PURE__ */jsxRuntime.jsx(LeaveGlyph,{color:theme.color.text.onBrand}),onPress:leave,testID:"everfur-vet-call-leave",style:[styles.control,styles.controlDanger]})]})]})}var CALL_GROUND="#141414",SELF_VIEW_GROUND="#1B1B1B",CONTROL_SCRIM="rgba(20,20,20,0.62)",CONTROL_ON_LIGHT_INK="#141414",SELF_VIEW_WIDTH=104,OVER_VIDEO_SHADOW={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function makeStyles2(theme){let{color:color,space:space,radius:radius,type:type}=theme;return reactNative.StyleSheet.create({root:{flex:1,backgroundColor:CALL_GROUND},fill:{...ABSOLUTE_FILL},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:space.lg,padding:space.xl,backgroundColor:CALL_GROUND},statusRow:{position:"absolute",left:space.md,right:SELF_VIEW_WIDTH+space.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body,...OVER_VIDEO_SHADOW},statusMeta:{...face(theme,"mono"),color:color.text.onBrand,fontSize:type.size.caption,...OVER_VIDEO_SHADOW},statusMetaOver:{color:color.danger},selfView:{position:"absolute",right:space.md,width:SELF_VIEW_WIDTH,height:148,borderRadius:radius.lg,overflow:"hidden",backgroundColor:SELF_VIEW_GROUND,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:space.xs,backgroundColor:SELF_VIEW_GROUND},remoteOff:{...ABSOLUTE_FILL,alignItems:"center",justifyContent:"center",gap:space.md,backgroundColor:CALL_GROUND},remoteOffAvatar:{width:96,height:96,borderRadius:radius.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.subtitle,paddingHorizontal:space.xl},notice:{flex:1,justifyContent:"center",gap:space.lg,paddingHorizontal:space.xl,backgroundColor:color.surface},noticeTitle:{...face(theme,"medium"),fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed),color:color.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,borderRadius:radius.pill,backgroundColor:color.primary},noticeContinueLabel:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body},noticeLeave:{...face(theme,"medium"),color:color.brandInk,fontSize:type.size.body},selfViewOffLabel:{...face(theme,"medium"),color:"rgba(255,255,255,0.78)",fontSize:type.size.micro,textAlign:"center"},controlBar:{position:"absolute",left:0,right:0,flexDirection:"row",justifyContent:"center",alignItems:"center",gap:space.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:CONTROL_SCRIM},controlMuted:{backgroundColor:color.text.onBrand},controlDanger:{backgroundColor:color.danger},status:{...face(theme,"medium"),fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed),color:color.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:space.lg},errorLeave:{...face(theme,"medium"),color:color.surface,fontSize:type.size.body,textDecorationLine:"underline"}})}exports.EVERFUR_DAILY_SETUP=EVERFUR_DAILY_SETUP;exports.EverfurVetCall=EverfurVetCall;exports.EverfurVetCallLobby=EverfurVetCallLobby;exports.VET_CALL_CONSULT_MINUTES=VET_CALL_CONSULT_MINUTES;exports.VET_CALL_COPY=VET_CALL_COPY;exports.isEverfurDailyModule=isEverfurDailyModule;exports.isSafeRoomUrl=isSafeRoomUrl;exports.isUsableRoomCredential=isUsableRoomCredential;exports.loadEverfurDaily=loadEverfurDaily;exports.registerEverfurDaily=registerEverfurDaily;
@@ -2,9 +2,9 @@ import { ComponentType, ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { T as TelemetryPort } from '../../TelemetryPort-BDNr00hu.cjs';
4
4
  import { O as OptionalModule } from '../../optionalModule-DbJmsq5f.cjs';
5
- export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-B_EqaUzx.cjs';
5
+ export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-DfZTWFXh.cjs';
6
6
  export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-DHjem0R-.cjs';
7
- import '../../EverfurError-DmELDpXp.cjs';
7
+ import '../../EverfurError-pEXDbUJ1.cjs';
8
8
 
9
9
  /**
10
10
  * A participant's media track. Daily types this `MediaStreamTrack | false | null`: `false` means the track
@@ -79,7 +79,7 @@ declare function isEverfurDailyModule(candidate: unknown): candidate is EverfurD
79
79
  * Everfur call surface mounts:
80
80
  *
81
81
  * ```ts
82
- * import { registerEverfurDaily } from '@everfur/sdk/televet';
82
+ * import { registerEverfurDaily } from '@everfur/sdk/televet/call';
83
83
  * registerEverfurDaily(() => require('@daily-co/react-native-daily-js'));
84
84
  * ```
85
85
  *
@@ -2,9 +2,9 @@ import { ComponentType, ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { T as TelemetryPort } from '../../TelemetryPort-BDNr00hu.js';
4
4
  import { O as OptionalModule } from '../../optionalModule-DbJmsq5f.js';
5
- export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-7wrE3RP2.js';
5
+ export { V as VetCallPhase, i as isSafeRoomUrl, a as isUsableRoomCredential } from '../../callRoom-B1qq_D-4.js';
6
6
  export { V as VET_CALL_CONSULT_MINUTES, a as VET_CALL_COPY } from '../../callCopy-DHjem0R-.js';
7
- import '../../EverfurError-DmELDpXp.js';
7
+ import '../../EverfurError-pEXDbUJ1.js';
8
8
 
9
9
  /**
10
10
  * A participant's media track. Daily types this `MediaStreamTrack | false | null`: `false` means the track
@@ -79,7 +79,7 @@ declare function isEverfurDailyModule(candidate: unknown): candidate is EverfurD
79
79
  * Everfur call surface mounts:
80
80
  *
81
81
  * ```ts
82
- * import { registerEverfurDaily } from '@everfur/sdk/televet';
82
+ * import { registerEverfurDaily } from '@everfur/sdk/televet/call';
83
83
  * registerEverfurDaily(() => require('@daily-co/react-native-daily-js'));
84
84
  * ```
85
85
  *
@@ -1 +1,71 @@
1
- import {createContext,forwardRef,createElement,useMemo,useRef,useEffect,useState,useCallback,useContext}from'react';import {StyleSheet,TextInput,useWindowDimensions,View,Pressable,Text,Animated}from'react-native';import {useSafeAreaInsets}from'react-native-safe-area-context';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var Yt=Object.defineProperty;var n=(e,t)=>Yt(e,"name",{value:t,configurable:true});var qt=Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function h(e,t){let r=e.type,a=r.families[t];return t==="mono"||r.namedFaces[t]?{fontFamily:a}:{fontFamily:a,fontWeight:r.weight[qt[t]]}}n(h,"face");var Xe=Object.freeze({track(){},trackExpectedFailure(){}});function Qe(e){try{return new URL(e.trim()).protocol==="https:"}catch{return false}}n(Qe,"isSafeRoomUrl");function ge(e,t){return Qe(e)&&t.trim().length>0}n(ge,"isUsableRoomCredential");function et(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e);}catch{}}n(et,"reportHostFailure");function Kt(e){return (typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}n(Kt,"isThenable");function be(e,...t){if(typeof e=="function")try{let r=e(...t);return Kt(r)&&Promise.resolve(r).then(void 0,et),r}catch(r){et(r);return}}n(be,"callHost");var tt=new WeakMap;function Jt(e){if(typeof e!="function")return;let t=tt.get(e);if(t!==void 0)return t;let r=n((...a)=>{be(e,...a);},"guarded");return tt.set(e,r),r}n(Jt,"guardHost");function rt(e,t){let r=null;for(let a of t){let o=e[a];typeof o=="function"&&(r??={...e},r[a]=Jt(o));}return r??e}n(rt,"guardHostProps");var he=10,i=Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",lobbyTitleNoName:"Your vet is joining",lobbySubtitle:"Usually under a minute",lobbyPrepLabel:"WHILE YOU WAIT",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:n(e=>{let t=e?.trim()??"";return t.length>0?`${t} is joining`:i.lobbyTitleNoName},"lobbyTitle"),lobbyPrep:n(e=>{let t=e?.trim()??"";return t.length>0?`Have ${t} nearby and somewhere well lit.`:i.lobbyPrepNoPet},"lobbyPrep"),lobbyDuration:n(e=>`${e} minutes`,"lobbyDuration"),waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:n(e=>{let t=e?.trim()??"";return t.length>0?`Before ${t} joins`:i.lobbyPrepLabel},"lobbyTipsTitle"),lobbyTipSpot:"Find a bright, quiet spot.",joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function nt(e){let t=Math.max(0,Math.floor(e/1e3)),r=String(t%60).padStart(2,"0"),a=Math.floor(t%3600/60),o=Math.floor(t/3600);return o>0?`${o}:${String(a).padStart(2,"0")}:${r}`:`${a}:${r}`}n(nt,"formatElapsed");var ve=Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function xe(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Object.freeze(e);for(let t of Object.keys(e))xe(e[t]);}return e}n(xe,"deepFreeze");var Zt=Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),at={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},lt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},ot={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Xt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Qt={regular:"400",medium:"500",bold:"700"},er={eyebrow:1,monoWide:.9,headerBrand:-0.42,tight:-0.35},tr=0,Q="System",ee="monospace",rr=["content","heading","control","compact","badge"];function nr(e){let t={};for(let r of rr)t[r]=e;return t}n(nr,"authoredTierSizes");function it(){return {family:Q,mono:ee,fontUrl:null,families:{regular:Q,medium:Q,bold:Q,mono:ee,monoMedium:ee,monoBold:ee},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:ot,tierSizes:nr(ot),lineHeight:Xt,weight:Qt,letterSpacing:er,scale:1,maxScale:tr,scaleCaps:Zt}}n(it,"baseType");var st={},Te=Object.freeze({standard:Object.freeze([.2,0,0,1]),emphasized:Object.freeze([.2,.8,.2,1]),exit:Object.freeze([.4,0,1,1])});function Ce(e){return `cubic-bezier(${e.join(", ")})`}n(Ce,"cssCubicBezier");var dt={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:Ce(Te.standard),emphasized:Ce(Te.emphasized),exit:Ce(Te.exit)},reducedMotion:false},or={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",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)"},ut=xe({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:or,space:at,radius:lt,type:it(),motion:dt,slots:st}),ar={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",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)"};xe({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false},color:ar,space:at,radius:lt,type:it(),motion:dt,slots:st});var ct=Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),ft=globalThis,Ee=ft[ct]??(ft[ct]=createContext(ut));Ee.displayName??="EverfurThemeContext";function A(){return useContext(Ee)}n(A,"useEverfurTheme");function cr(e,t){let r=e.scaleCaps[t];return r>0?r:void 0}n(cr,"tierMultiplier");function b({tier:e="content",...t}){let{type:r}=A(),a=cr(r,e);return createElement(Text,a===void 0?t:{maxFontSizeMultiplier:a,...t})}n(b,"Text");forwardRef(n(function(t,r){return createElement(TextInput,{...t,...r===null?{}:{ref:r}})},"TextInput"));function yt(e,t,r){let a;try{a=t();}catch(u){return ke(`optional peer '${e}' is not installed: ${pr(u)}`)}let o=fr(a);return o==null?ke(`optional peer '${e}' resolved to no module`):r&&!r(o)?ke(`optional peer '${e}' is present but failed its shape check`):Object.freeze({available:true,module:o})}n(yt,"optionalModule");function fr(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}n(fr,"unwrapDefault");function ke(e){return Object.freeze({available:false,module:null,reason:e})}n(ke,"frozenUnavailable");function pr(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}n(pr,"describe");var mt=Symbol.for("@everfur/sdk/televet");function yr(){let e=globalThis,t=e[mt];if(t!==void 0)return t;let r={presenter:null,snapshot:Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:new Set,dailyRegistered:false};return e[mt]=r,r}n(yr,"televetGlobal");function gt(e){yr().dailyRegistered=e;}n(gt,"markEverfurDailyRegistered");var we=`[everfur] The in-app vet call needs the Daily native modules, which this app has not registered. Install @daily-co/react-native-daily-js, @daily-co/react-native-webrtc and (Expo) @daily-co/config-plugin-rn-daily-js, rebuild the native app (a JS-only OTA cannot add a native module), and call registerEverfurDaily(() => require('@daily-co/react-native-daily-js')) once in your app entry. ON EXPO GO THIS CANNOT BE FIXED BY INSTALLING: Expo Go runs a fixed set of native modules and cannot load Daily at any version, so you need a development build (expo prebuild, then run the native app) before the in-app call works at all. Until then the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,Re="@daily-co/react-native-daily-js",mr=`optional peer '${Re}' has no registered loader`,bt=`optional peer '${Re}' is present but failed its shape check`;function re(e){return typeof e=="object"&&e!==null}n(re,"isRecordLike");function gr(e){return re(e)&&"box"in e}n(gr,"isDailyBox");function br(e){let t=e.default,r=re(t)||typeof t=="function"?t:{},a=typeof e.createCallObject=="function"?e:r,o=a.createCallObject,u={createCallObject:typeof o=="function"?o.bind(a):o,DailyMediaView:e.DailyMediaView??r.DailyMediaView};return ht(u)?u:null}n(br,"normalizeDailyModule");function ht(e){if(!re(e)||typeof e.createCallObject!="function")return false;let t=e.DailyMediaView;return typeof t=="function"||typeof t=="object"&&t!==null}n(ht,"isEverfurDailyModule");var vt=null,x=null;function te(e){return Object.freeze({available:false,module:null,reason:e})}n(te,"unavailable");function hr(e){vt=e,x=null,gt(e!==null);}n(hr,"registerEverfurDaily");function Se(){if(x!==null)return x;let e=vt;if(e===null)return x=te(mr),x;let t=yt(Re,()=>({box:e()}),gr);if(!t.available)return x=te(t.reason),x;let r=t.module.box;if(!re(r))return x=te(bt),x;let a=br(r);return x=a===null?te(bt):Object.freeze({available:true,module:a}),x}n(Se,"loadEverfurDaily");function z({label:e,glyph:t,onPress:r,testID:a,muted:o=false,style:u}){return jsx(Pressable,{onPress:r,testID:a,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{selected:o},style:u,children:t})}n(z,"CallControl");function $({children:e,testID:t}){return jsx(View,{style:y.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:t,children:e})}n($,"GlyphBox");function Le({color:e}){return jsx(View,{style:[y.slash,{backgroundColor:e}]})}n(Le,"Slash");function ne({color:e,off:t=false}){return jsxs($,{testID:t?"glyph-mic-off":"glyph-mic",children:[jsxs(View,{style:y.column,children:[jsx(View,{style:[y.micCapsule,{borderColor:e}]}),jsx(View,{style:[y.micCradle,{borderColor:e}]}),jsx(View,{style:[y.micStem,{backgroundColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(ne,"MicGlyph");function oe({color:e,off:t=false}){return jsxs($,{testID:t?"glyph-camera-off":"glyph-camera",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.cameraBody,{borderColor:e}]}),jsx(View,{style:[y.cameraLens,{borderRightColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(oe,"CameraGlyph");function Tt({color:e,off:t=false}){return jsxs($,{testID:t?"glyph-speaker-off":"glyph-speaker",children:[jsxs(View,{style:y.row,children:[jsx(View,{style:[y.speakerBox,{backgroundColor:e}]}),jsx(View,{style:[y.speakerCone,{borderRightColor:e}]}),t?null:jsx(View,{style:[y.speakerWave,{borderColor:e}]})]}),t?jsx(Le,{color:e}):null]})}n(Tt,"SpeakerGlyph");function ae({color:e}){return jsx($,{testID:"glyph-switch-camera",children:jsxs(View,{style:[y.switchBody,{borderColor:e}],children:[jsx(View,{style:[y.switchTurn,{borderColor:e,borderTopColor:"transparent"}]}),jsx(View,{style:[y.switchHead,{borderBottomColor:e}]})]})})}n(ae,"SwitchCameraGlyph");function Ct({color:e}){return jsx($,{testID:"glyph-leave",children:jsxs(View,{style:y.column,children:[jsx(View,{style:[y.receiver,{borderColor:e}]}),jsxs(View,{style:y.receiverPads,children:[jsx(View,{style:[y.receiverPad,{backgroundColor:e}]}),jsx(View,{style:[y.receiverPad,{backgroundColor:e}]})]})]})})}n(Ct,"LeaveGlyph");var y=StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var k=Object.freeze({surface:"rgba(255,255,255,0.08)",surfaceRaised:"rgba(255,255,255,0.14)",surfaceActive:"rgba(255,255,255,0.24)",hairline:"rgba(255,255,255,0.18)",glyph:"rgba(255,255,255,0.72)",textSecondary:"rgba(255,255,255,0.78)",textTertiary:"rgba(255,255,255,0.56)"}),xt=3,Et=180,kt=420,wt=.35,Sr=.6,Lr=360,Dr=132,Fr=184,Vr=44;function Fe(e){return typeof e=="number"&&Number.isInteger(e)&&e>=1?e:10}n(Fe,"soldMinutes");function Ir({reducedMotion:e,styles:t}){let r=useRef(Array.from({length:xt},()=>new Animated.Value(wt))).current;return useEffect(()=>{if(e)return;let a=r.map((o,u)=>Animated.loop(Animated.sequence([Animated.delay(u*Et),Animated.timing(o,{toValue:1,duration:kt,useNativeDriver:true}),Animated.timing(o,{toValue:wt,duration:kt,useNativeDriver:true}),Animated.delay((xt-u-1)*Et)])));for(let o of a)o.start();return ()=>{for(let o of a)o.stop();}},[e,r]),jsx(View,{style:t.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:r.map((a,o)=>jsx(Animated.View,{style:[t.dot,{opacity:e?Sr:a}]},o))})}n(Ir,"WaitingDots");function De({label:e,glyph:t,active:r,onPress:a,testID:o,styles:u}){return jsx(Pressable,{onPress:a,testID:o,accessibilityRole:"button",accessibilityState:{selected:!r},accessibilityLabel:e,style:[u.control,r?null:u.controlOff],children:t})}n(De,"LobbyControl");function Ve(e){let{clinicianName:t,petName:r,consultMinutes:a,micOn:o,cameraOn:u,onToggleMic:T,onToggleCamera:O,onSwitchCamera:Y,onLeave:q,style:K}=e,v=A(),s=useMemo(()=>Or(v),[v]),l=useSafeAreaInsets(),{width:P}=useWindowDimensions(),B=P<Lr?Dr:Fr;return jsxs(View,{style:[s.root,{paddingTop:l.top+v.space.sm,paddingBottom:l.bottom+v.space.lg},K],testID:"everfur-vet-lobby",children:[jsxs(View,{style:s.topRow,children:[jsx(Pressable,{onPress:q,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:s.leaveHit,children:jsx(b,{tier:"control",style:s.leaveLabel,children:i.leaveCta})}),jsx(b,{tier:"badge",style:s.prepLabel,testID:"everfur-vet-lobby-label",children:i.waitingRoomLabel})]}),jsxs(View,{style:s.center,children:[jsxs(View,{style:[s.avatar,{width:B,height:B,borderRadius:B/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:s.avatarGlyphHead}),jsx(View,{style:s.avatarGlyphBody})]}),jsxs(View,{accessibilityLiveRegion:"polite",accessible:true,children:[jsx(b,{tier:"heading",style:s.title,testID:"everfur-vet-lobby-title",children:i.lobbyTitle(t)}),jsx(b,{style:s.subtitle,testID:"everfur-vet-lobby-subtitle",children:i.lobbySubtitle})]}),jsx(Ir,{reducedMotion:v.motion.reducedMotion,styles:s})]}),jsxs(View,{style:s.prepCard,testID:"everfur-vet-lobby-prep",children:[jsx(b,{tier:"badge",style:s.prepLabel,children:i.lobbyTipsTitle(t)}),[i.lobbyTipSpot,i.lobbyPrep(r)].map((N,R)=>jsxs(View,{style:s.tip,children:[jsx(b,{tier:"badge",style:s.tipNumber,accessibilityElementsHidden:true,importantForAccessibility:"no",children:String(R+1).padStart(2,"0")}),jsx(b,{style:s.prepBody,children:N})]},N))]}),jsxs(View,{style:s.controls,children:[jsx(De,{label:o?i.muteCta:i.unmuteCta,glyph:jsx(ne,{color:v.color.text.onBrand,off:!o}),active:o,onPress:T,testID:"everfur-vet-lobby-mic",styles:s}),jsx(De,{label:u?i.cameraOffCta:i.cameraOnCta,glyph:jsx(oe,{color:v.color.text.onBrand,off:!u}),active:u,onPress:O,testID:"everfur-vet-lobby-camera",styles:s}),u&&Y?jsx(De,{label:i.switchCameraCta,glyph:jsx(ae,{color:v.color.text.onBrand}),active:true,onPress:Y,testID:"everfur-vet-lobby-switch-camera",styles:s}):null]}),jsx(b,{tier:"badge",style:s.duration,testID:"everfur-vet-lobby-duration",children:i.lobbyDuration(Fe(a))})]})}n(Ve,"EverfurVetCallLobby");function Or(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:t.brand,paddingHorizontal:r.lg},topRow:{flexDirection:"row",alignItems:"center",gap:r.md},tip:{flexDirection:"row",gap:r.md,alignItems:"flex-start",paddingTop:r.sm},tipNumber:{...h(e,"monoBold"),color:k.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:Vr,justifyContent:"center",paddingVertical:r.xs,paddingRight:r.md},leaveLabel:{...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:t.success,backgroundColor:k.surface,marginBottom:r.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:k.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:k.glyph},title:{...h(e,"bold"),color:t.text.onBrand,fontSize:o.size.heading,lineHeight:Math.round(o.size.heading*o.lineHeight.snug),textAlign:"center",paddingHorizontal:r.sm},subtitle:{...h(e,"regular"),color:k.textSecondary,fontSize:o.size.body,textAlign:"center",marginTop:r.xs},dotRow:{flexDirection:"row",gap:r.xs,marginTop:r.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:t.success},prepCard:{borderRadius:a.lg,borderWidth:1,borderColor:k.hairline,backgroundColor:k.surface,padding:r.lg,marginBottom:r.lg},prepLabel:{...h(e,"monoBold"),color:t.accent,fontSize:o.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...h(e,"regular"),color:t.text.onBrand,fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:r.lg,marginBottom:r.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:k.surfaceRaised},controlOff:{backgroundColor:k.surfaceActive},duration:{...h(e,"medium"),color:k.textTertiary,fontSize:o.size.micro,letterSpacing:1.6,textAlign:"center"}})}n(Or,"makeStyles");var Ie=5e3;function Oe(e,t){return new Promise(r=>{let a=setTimeout(r,t);e.catch(()=>{}).then(()=>{clearTimeout(a),r();});})}n(Oe,"settleWithin");function Dt(e,t){let r=useRef(e);useEffect(()=>{r.current=e;});let a=useRef(false);useEffect(()=>(a.current=true,()=>{a.current=false;}),[]);let o=useRef(false),u=useCallback(()=>{o.current||!a.current||(o.current=true,r.current());},[]),T=useRef(false),O=useCallback(()=>{T.current||(T.current=true,Oe(t(),Ie).then(u));},[t,u]);return {reportLeft:u,leave:O,leaving:T}}n(Dt,"useLeaveOnce");var Pr=Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function Ar(){let e=globalThis;return e[Pr]??=new Map}n(Ar,"receipts");function Ft(e){return (Ar().get(e)??0)>0}n(Ft,"hasRecordingNoticeAccepted");function Vt(e){let[t,r]=useState(true),a=useRef(true),o=useCallback(()=>{let u=e.current;if(!u?.setNativeInCallAudioMode)return;let T=!a.current;a.current=T,r(T),u.setNativeInCallAudioMode(T?"video":"voice");},[e]);return {speakerOn:t,toggleSpeaker:o}}n(Vt,"useSpeakerRoute");function Ne(e){return e??null}n(Ne,"asTrack");function Hr(e){return !!e?.videoTrack}n(Hr,"hasVideo");function zr({styles:e}){return jsxs(View,{style:e.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[jsx(View,{style:e.remoteOffHead}),jsx(View,{style:e.remoteOffBody})]})}n(zr,"PersonMark");function Wr(e){return jsx(Ur,{...e},e.roomUrl)}n(Wr,"EverfurVetCall");function Ur(e){let{roomUrl:t,token:r,onLeave:a,clinicianName:o,petName:u,consultMinutes:T,daily:O,telemetry:Y,onUnavailable:q,renderUnavailable:K,style:v}=rt(e,["onLeave"]),s=A(),l=useMemo(()=>$r(s),[s]),P=useSafeAreaInsets(),B=Y??Xe,N=useRef(B);useEffect(()=>{N.current=B;});let R=useRef(null),[de,At]=useState(()=>Ft(t)),[Bt,J]=useState("joining"),[Z,Nt]=useState(null),[je,Mt]=useState(null),[M,_t]=useState(true),[S,jt]=useState(true),{speakerOn:W,toggleSpeaker:Ht}=Vt(R),[zt,Wt]=useState(true),[ue,Ut]=useState({flip:false,speaker:false}),[U,Gt]=useState(null),[He,ze]=useState(0),We=ge(t,r),_=useMemo(()=>We?O?{available:true,module:O,reason:""}:Se():null,[We,O]),G=_?.available?_.module:null,F=useMemo(()=>_===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:_.available?null:{reason:"dailyMissing",detail:`${we} (${_.reason})`},[_]),ce=useRef(false);useEffect(()=>{if(F===null){ce.current=false;return}if(be(q,F.reason,F.detail),!ce.current){ce.current=true;try{globalThis.console?.warn?.(F.detail);}catch{}}},[F,q]);let fe=useCallback(async()=>{let c=R.current;if(R.current=null,!!c){await Oe(new Promise(f=>f(c.leave())),Ie);try{c.setLocalAudio(!1),c.setLocalVideo(!1);}catch{}try{await c.destroy();}catch{}}},[]),{reportLeft:pe,leave:ye,leaving:Ue}=Dt(a,fe);useEffect(()=>{if(G===null||!de)return;let c=false,f=G.createCallObject();R.current=f,Ut({flip:typeof f.cycleCamera=="function",speaker:typeof f.setNativeInCallAudioMode=="function"});let j=n(()=>{let H=Object.values(f.participants());Mt(H.find(me=>me.local)??null),Nt(H.find(me=>!me.local)??null);},"syncParticipants"),Ke=["participant-joined","participant-updated","participant-left"];for(let H of Ke)f.on(H,j);let Je=n(()=>{c||Ue.current||(J("left"),pe());},"onLeftMeeting"),Ze=n(()=>{c||J("error");},"onError");return f.on("left-meeting",Je),f.on("error",Ze),f.join({url:t,token:r}).then(()=>{c||(J("joined"),Gt(Date.now()),j(),N.current.track("televet.call.joined",{provider:"daily"}));}).catch(()=>{c||(J("error"),N.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}));}),()=>{c=true;for(let H of Ke)f.off(H,j);f.off("left-meeting",Je),f.off("error",Ze),fe();}},[G,de,t,r,fe,pe,Ue]),useEffect(()=>{if(U===null)return;ze(Date.now()-U);let c=setInterval(()=>{ze(Date.now()-U);},1e3);return ()=>{clearInterval(c);}},[U]);let Ge=useCallback(()=>{let c=R.current;c&&_t(f=>(c.setLocalAudio(!f),!f));},[]),$e=useCallback(()=>{let c=R.current;c&&jt(f=>(c.setLocalVideo(!f),!f));},[]),Ye=useCallback(()=>{let c=R.current;c?.cycleCamera&&c.cycleCamera().then(f=>{let j=f?.device?.facingMode;j&&Wt(j==="user");},()=>{});},[]);if(F!==null)return K?jsx(Fragment,{children:K(F.reason,F.detail)}):null;if(G===null)return null;if(!de)return jsxs(View,{style:[l.notice,{paddingTop:P.top+s.space.xl,paddingBottom:P.bottom+s.space.xl},v],testID:"everfur-vet-call-recording-notice",children:[jsx(b,{style:l.noticeTitle,accessibilityRole:"header",children:i.recordingNoticeTitle}),jsx(Pressable,{onPress:()=>At(true),accessibilityRole:"button",accessibilityLabel:i.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:l.noticeContinue,children:jsx(b,{tier:"control",style:l.noticeContinueLabel,children:i.recordingNoticeCta})}),jsx(Pressable,{onPress:pe,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-recording-leave",style:l.errorLeaveHit,children:jsx(b,{tier:"control",style:l.noticeLeave,children:i.leaveCta})})]});if(Bt==="error")return jsxs(View,{style:[l.centered,v],testID:"everfur-vet-call-error",children:[jsx(b,{style:l.status,accessibilityLiveRegion:"polite",children:i.joinFailedReason}),jsx(Pressable,{onPress:ye,accessibilityRole:"button",accessibilityLabel:i.leaveCta,testID:"everfur-vet-call-error-leave",style:l.errorLeaveHit,children:jsx(b,{tier:"control",style:l.errorLeave,children:i.leaveCta})})]});if(Z===null)return jsx(Ve,{clinicianName:o,petName:u,consultMinutes:T,micOn:M,cameraOn:S,onToggleMic:Ge,onToggleCamera:$e,...ue.flip?{onSwitchCamera:Ye}:{},onLeave:ye,style:v});let qe=G.DailyMediaView,X=o?.trim()??"",$t=He>=Fe(T)*6e4;return jsxs(View,{style:[l.root,v],testID:"everfur-vet-call",children:[jsxs(View,{style:l.fill,testID:"everfur-vet-call-remote",children:[jsx(qe,{videoTrack:Ne(Z.videoTrack),audioTrack:Ne(Z.audioTrack),mirror:false,objectFit:"cover",style:l.fill}),Hr(Z)?null:jsxs(View,{style:l.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[jsx(zr,{styles:l}),X.length>0?jsx(b,{style:l.remoteOffName,numberOfLines:1,children:X}):null]})]}),jsxs(View,{style:[l.statusRow,{top:P.top+s.space.sm}],pointerEvents:"none",children:[X.length>0?jsx(b,{tier:"compact",style:l.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:X}):null,U!==null?jsx(b,{tier:"badge",style:[l.statusMeta,$t?l.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:nt(He)}):null]}),jsxs(View,{style:[l.selfView,{top:P.top+s.space.sm}],testID:"everfur-vet-call-self",children:[jsx(qe,{videoTrack:S?Ne(je?.videoTrack):null,audioTrack:null,mirror:zt,objectFit:"cover",style:l.fill}),je?.videoTrack&&S?null:jsx(View,{style:[l.selfViewOff,l.fill],testID:"everfur-vet-call-self-off",children:jsx(b,{tier:"badge",style:l.selfViewOffLabel,children:i.selfCameraOffLabel})})]}),jsxs(View,{style:[l.controlBar,{bottom:P.bottom+s.space.lg}],children:[ue.speaker?jsx(z,{label:W?i.speakerOffCta:i.speakerOnCta,glyph:jsx(Tt,{color:W?s.color.text.onBrand:_e,off:!W}),muted:!W,onPress:Ht,testID:"everfur-vet-call-speaker",style:[l.control,W?null:l.controlMuted]}):null,jsx(z,{label:M?i.muteCta:i.unmuteCta,glyph:jsx(ne,{color:M?s.color.text.onBrand:_e,off:!M}),muted:!M,onPress:Ge,testID:"everfur-vet-call-mic",style:[l.control,M?null:l.controlMuted]}),jsx(z,{label:S?i.cameraOffCta:i.cameraOnCta,glyph:jsx(oe,{color:S?s.color.text.onBrand:_e,off:!S}),muted:!S,onPress:$e,testID:"everfur-vet-call-camera",style:[l.control,S?null:l.controlMuted]}),ue.flip&&S?jsx(z,{label:i.switchCameraCta,glyph:jsx(ae,{color:s.color.text.onBrand}),onPress:Ye,testID:"everfur-vet-call-switch-camera",style:l.control}):null,jsx(z,{label:i.leaveCta,glyph:jsx(Ct,{color:s.color.text.onBrand}),onPress:ye,testID:"everfur-vet-call-leave",style:[l.control,l.controlDanger]})]})]})}n(Ur,"VetCallRoom");var Me="#141414",It="#1B1B1B",Gr="rgba(20,20,20,0.62)",_e="#141414",Ot=104,Pt={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function $r(e){let{color:t,space:r,radius:a,type:o}=e;return StyleSheet.create({root:{flex:1,backgroundColor:Me},fill:{...ve},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:r.lg,padding:r.xl,backgroundColor:Me},statusRow:{position:"absolute",left:r.md,right:Ot+r.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.body,...Pt},statusMeta:{...h(e,"mono"),color:t.text.onBrand,fontSize:o.size.caption,...Pt},statusMetaOver:{color:t.danger},selfView:{position:"absolute",right:r.md,width:Ot,height:148,borderRadius:a.lg,overflow:"hidden",backgroundColor:It,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:r.xs,backgroundColor:It},remoteOff:{...ve,alignItems:"center",justifyContent:"center",gap:r.md,backgroundColor:Me},remoteOffAvatar:{width:96,height:96,borderRadius:a.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...h(e,"medium"),color:t.text.onBrand,fontSize:o.size.subtitle,paddingHorizontal:r.xl},notice:{flex:1,justifyContent:"center",gap:r.lg,paddingHorizontal:r.xl,backgroundColor:t.surface},noticeTitle:{...h(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.xl,borderRadius:a.pill,backgroundColor:t.primary},noticeContinueLabel:{...h(e,"medium"),color:t.onPrimary,fontSize:o.size.body},noticeLeave:{...h(e,"medium"),color:t.brandInk,fontSize:o.size.body},selfViewOffLabel:{...h(e,"medium"),color:"rgba(255,255,255,0.78)",fontSize:o.size.micro,textAlign:"center"},controlBar:{position:"absolute",left:0,right:0,flexDirection:"row",justifyContent:"center",alignItems:"center",gap:r.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:r.md,alignItems:"center",justifyContent:"center",borderRadius:a.pill,backgroundColor:Gr},controlMuted:{backgroundColor:t.text.onBrand},controlDanger:{backgroundColor:t.danger},status:{...h(e,"medium"),fontSize:o.size.subtitle,lineHeight:Math.round(o.size.subtitle*o.lineHeight.relaxed),color:t.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:r.lg},errorLeave:{...h(e,"medium"),color:t.surface,fontSize:o.size.body,textDecorationLine:"underline"}})}n($r,"makeStyles");export{we as EVERFUR_DAILY_SETUP,Wr as EverfurVetCall,Ve as EverfurVetCallLobby,he as VET_CALL_CONSULT_MINUTES,i as VET_CALL_COPY,ht as isEverfurDailyModule,Qe as isSafeRoomUrl,ge as isUsableRoomCredential,Se as loadEverfurDaily,hr as registerEverfurDaily};
1
+ import{createContext,forwardRef,createElement,useMemo,useRef,useEffect,useState,useCallback,useContext}from"react";import{TextInput,StyleSheet,useWindowDimensions,View,Pressable,Text as Text$1,Animated}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{jsxs,jsx,Fragment}from"react/jsx-runtime";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 noopTelemetry=/* @__PURE__ */Object.freeze({track(){},trackExpectedFailure(){}});function isSafeRoomUrl(url){try{return new URL(url.trim()).protocol==="https:"}catch{return false}}function isUsableRoomCredential(roomUrl,token){return isSafeRoomUrl(roomUrl)&&token.trim().length>0}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var VET_CALL_CONSULT_MINUTES=10,VET_CALL_COPY=/* @__PURE__ */Object.freeze({muteCta:"Mute",unmuteCta:"Unmute",cameraOffCta:"Camera off",cameraOnCta:"Camera on",leaveCta:"Leave",switchCameraCta:"Switch camera",speakerOffCta:"Speaker off",speakerOnCta:"Speaker on",lobbyTitleNoName:"Your vet is joining",lobbySubtitle:"Usually under a minute",lobbyPrepLabel:"WHILE YOU WAIT",lobbyPrepNoPet:"Have your pet nearby and somewhere well lit.",lobbyTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`${name} is joining`:VET_CALL_COPY.lobbyTitleNoName},lobbyPrep:petName=>{let pet=petName?.trim()??"";return pet.length>0?`Have ${pet} nearby and somewhere well lit.`:VET_CALL_COPY.lobbyPrepNoPet},lobbyDuration:minutes=>`${minutes} minutes`,waitingRoomLabel:"Waiting room",leaveWaitingRoomLabel:"Leave the waiting room",lobbyTipsTitle:clinicianName=>{let name=clinicianName?.trim()??"";return name.length>0?`Before ${name} joins`:VET_CALL_COPY.lobbyPrepLabel},lobbyTipSpot:"Find a bright, quiet spot.",joinFailedReason:"That did not open. Try again.",recordingNoticeTitle:"This consultation is recorded.",recordingNoticeCta:"Continue to the call",recordingNoticeDecline:"Not now",selfCameraOffLabel:"Your camera is off"});function formatElapsed(ms){let total=Math.max(0,Math.floor(ms/1e3)),seconds=String(total%60).padStart(2,"0"),minutes=Math.floor(total%3600/60),hours=Math.floor(total/3600);return hours>0?`${hours}:${String(minutes).padStart(2,"0")}:${seconds}`:`${minutes}:${seconds}`}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});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 optionalModule(name,load,validate){let candidate;try{candidate=load()}catch(cause){return frozenUnavailable(`optional peer '${name}' is not installed: ${describe(cause)}`)}let resolved=unwrapDefault(candidate);return resolved==null?frozenUnavailable(`optional peer '${name}' resolved to no module`):validate&&!validate(resolved)?frozenUnavailable(`optional peer '${name}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:resolved})}function unwrapDefault(candidate){return typeof candidate=="object"&&candidate!==null&&"default"in candidate&&Object.keys(candidate).length<=2?candidate.default:candidate}function frozenUnavailable(reason){/* @__PURE__ */
2
+ return Object.freeze({available:false,module:null,reason:reason})}function describe(cause){return cause instanceof Error?cause.message:typeof cause=="string"?cause:"unknown load error"}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/televet");function televetGlobal(){let realm=globalThis,existing=realm[SLOT];if(existing!==void 0)return existing;let created={presenter:null,snapshot:/* @__PURE__ */Object.freeze({request:null,serial:0,activeHost:null}),hosts:[],nextHost:1,listeners:/* @__PURE__ */new Set,dailyRegistered:false};return realm[SLOT]=created,created}function markEverfurDailyRegistered(registered){televetGlobal().dailyRegistered=registered}var EVERFUR_DAILY_SETUP=`[everfur] The in-app vet call needs the Daily native modules, which this app has not registered. Install @daily-co/react-native-daily-js, @daily-co/react-native-webrtc and (Expo) @daily-co/config-plugin-rn-daily-js, rebuild the native app (a JS-only OTA cannot add a native module), and call registerEverfurDaily(() => require('@daily-co/react-native-daily-js')) once in your app entry. ON EXPO GO THIS CANNOT BE FIXED BY INSTALLING: Expo Go runs a fixed set of native modules and cannot load Daily at any version, so you need a development build (expo prebuild, then run the native app) before the in-app call works at all. Until then the in-app visit tells the member the call cannot be joined; <VetVisitButton prefer="redirect" /> is the explicit way to the hosted visit in the browser, which needs no native module.`,DAILY_PEER="@daily-co/react-native-daily-js",NOT_REGISTERED=`optional peer '${DAILY_PEER}' has no registered loader`,WRONG_SHAPE=`optional peer '${DAILY_PEER}' is present but failed its shape check`;function isRecordLike(candidate){return typeof candidate=="object"&&candidate!==null}function isDailyBox(candidate){return isRecordLike(candidate)&&"box"in candidate}function normalizeDailyModule(candidate){let inner=candidate.default,fallback=isRecordLike(inner)||typeof inner=="function"?inner:{},owner=typeof candidate.createCallObject=="function"?candidate:fallback,factory=owner.createCallObject,merged={createCallObject:typeof factory=="function"?factory.bind(owner):factory,DailyMediaView:candidate.DailyMediaView??fallback.DailyMediaView};return isEverfurDailyModule(merged)?merged:null}function isEverfurDailyModule(candidate){if(!isRecordLike(candidate)||typeof candidate.createCallObject!="function")return false;let view=candidate.DailyMediaView;return typeof view=="function"||typeof view=="object"&&view!==null}var loader=null,memo=null;function unavailable(reason){/* @__PURE__ */
3
+ return Object.freeze({available:false,module:null,reason:reason})}function registerEverfurDaily(next){loader=next,memo=null,markEverfurDailyRegistered(next!==null)}function loadEverfurDaily(){if(memo!==null)return memo;let load=loader;if(load===null)return memo=unavailable(NOT_REGISTERED),memo;let raw=optionalModule(DAILY_PEER,()=>({box:load()}),isDailyBox);if(!raw.available)return memo=unavailable(raw.reason),memo;let inner=raw.module.box;if(!isRecordLike(inner))return memo=unavailable(WRONG_SHAPE),memo;let normalized=normalizeDailyModule(inner);return memo=normalized===null?unavailable(WRONG_SHAPE):/* @__PURE__ */Object.freeze({available:true,module:normalized}),memo}function CallControl({label:label,glyph:glyph,onPress:onPress,testID:testID,muted:muted=false,style:style}){/* @__PURE__ */
4
+ return jsx(Pressable,{onPress:onPress,testID:testID,accessibilityRole:"button",accessibilityLabel:label,accessibilityState:{selected:muted},style:style,children:glyph})}function GlyphBox({children:children,testID:testID}){/* @__PURE__ */
5
+ return jsx(View,{style:s.box,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:testID,children:children})}function Slash({color:color}){/* @__PURE__ */
6
+ return jsx(View,{style:[s.slash,{backgroundColor:color}]})}function MicGlyph({color:color,off:off=false}){/* @__PURE__ */
7
+ return jsxs(GlyphBox,{testID:off?"glyph-mic-off":"glyph-mic",children:[
8
+ /* @__PURE__ */jsxs(View,{style:s.column,children:[
9
+ /* @__PURE__ */jsx(View,{style:[s.micCapsule,{borderColor:color}]}),
10
+ /* @__PURE__ */jsx(View,{style:[s.micCradle,{borderColor:color}]}),
11
+ /* @__PURE__ */jsx(View,{style:[s.micStem,{backgroundColor:color}]})]}),off?/* @__PURE__ */jsx(Slash,{color:color}):null]})}function CameraGlyph({color:color,off:off=false}){/* @__PURE__ */
12
+ return jsxs(GlyphBox,{testID:off?"glyph-camera-off":"glyph-camera",children:[
13
+ /* @__PURE__ */jsxs(View,{style:s.row,children:[
14
+ /* @__PURE__ */jsx(View,{style:[s.cameraBody,{borderColor:color}]}),
15
+ /* @__PURE__ */jsx(View,{style:[s.cameraLens,{borderRightColor:color}]})]}),off?/* @__PURE__ */jsx(Slash,{color:color}):null]})}function SpeakerGlyph({color:color,off:off=false}){/* @__PURE__ */
16
+ return jsxs(GlyphBox,{testID:off?"glyph-speaker-off":"glyph-speaker",children:[
17
+ /* @__PURE__ */jsxs(View,{style:s.row,children:[
18
+ /* @__PURE__ */jsx(View,{style:[s.speakerBox,{backgroundColor:color}]}),
19
+ /* @__PURE__ */jsx(View,{style:[s.speakerCone,{borderRightColor:color}]}),off?null:/* @__PURE__ */jsx(View,{style:[s.speakerWave,{borderColor:color}]})]}),off?/* @__PURE__ */jsx(Slash,{color:color}):null]})}function SwitchCameraGlyph({color:color}){/* @__PURE__ */
20
+ return jsx(GlyphBox,{testID:"glyph-switch-camera",children:/* @__PURE__ */jsxs(View,{style:[s.switchBody,{borderColor:color}],children:[
21
+ /* @__PURE__ */jsx(View,{style:[s.switchTurn,{borderColor:color,borderTopColor:"transparent"}]}),
22
+ /* @__PURE__ */jsx(View,{style:[s.switchHead,{borderBottomColor:color}]})]})})}function LeaveGlyph({color:color}){/* @__PURE__ */
23
+ return jsx(GlyphBox,{testID:"glyph-leave",children:/* @__PURE__ */jsxs(View,{style:s.column,children:[
24
+ /* @__PURE__ */jsx(View,{style:[s.receiver,{borderColor:color}]}),
25
+ /* @__PURE__ */jsxs(View,{style:s.receiverPads,children:[
26
+ /* @__PURE__ */jsx(View,{style:[s.receiverPad,{backgroundColor:color}]}),
27
+ /* @__PURE__ */jsx(View,{style:[s.receiverPad,{backgroundColor:color}]})]})]})})}var s=StyleSheet.create({box:{width:24,height:24,alignItems:"center",justifyContent:"center"},row:{flexDirection:"row",alignItems:"center"},column:{alignItems:"center"},slash:{position:"absolute",width:2,height:28,borderRadius:1,transform:[{rotate:"-45deg"}]},micCapsule:{width:10,height:14,borderRadius:5,borderWidth:2},micCradle:{width:16,height:8,marginTop:-5,borderWidth:2,borderTopWidth:0,borderBottomLeftRadius:8,borderBottomRightRadius:8},micStem:{width:2,height:3},cameraBody:{width:14,height:12,borderRadius:3,borderWidth:2},cameraLens:{width:0,height:0,marginLeft:1,borderTopWidth:5,borderBottomWidth:5,borderRightWidth:6,borderTopColor:"transparent",borderBottomColor:"transparent"},speakerBox:{width:4,height:8,borderRadius:1},speakerCone:{width:0,height:0,borderTopWidth:7,borderBottomWidth:7,borderRightWidth:7,borderTopColor:"transparent",borderBottomColor:"transparent",transform:[{rotate:"180deg"}]},speakerWave:{width:7,height:12,marginLeft:2,borderWidth:2,borderLeftWidth:0,borderTopRightRadius:6,borderBottomRightRadius:6},switchBody:{width:20,height:15,borderRadius:3,borderWidth:2,alignItems:"center",justifyContent:"center"},switchTurn:{width:9,height:9,borderRadius:4.5,borderWidth:2},switchHead:{position:"absolute",top:2,right:4,width:0,height:0,borderLeftWidth:3,borderRightWidth:3,borderBottomWidth:4,borderLeftColor:"transparent",borderRightColor:"transparent"},receiver:{width:22,height:10,borderWidth:3,borderBottomWidth:0,borderTopLeftRadius:11,borderTopRightRadius:11},receiverPads:{flexDirection:"row",width:22,justifyContent:"space-between",marginTop:-1},receiverPad:{width:5,height:4,borderRadius:1}});var ON_BRAND=/* @__PURE__ */Object.freeze({surface:"rgba(255,255,255,0.08)",surfaceRaised:"rgba(255,255,255,0.14)",surfaceActive:"rgba(255,255,255,0.24)",hairline:"rgba(255,255,255,0.18)",glyph:"rgba(255,255,255,0.72)",textSecondary:"rgba(255,255,255,0.78)",textTertiary:"rgba(255,255,255,0.56)"}),DOT_COUNT=3,DOT_STEP_MS=180,DOT_FADE_MS=420,DOT_REST_OPACITY=.35,DOT_STATIC_OPACITY=.6,NARROW_WIDTH=360,AVATAR_NARROW=132,AVATAR_WIDE=184,MIN_TOUCH_TARGET=44;function soldMinutes(served){return typeof served=="number"&&Number.isInteger(served)&&served>=1?served:10}function WaitingDots({reducedMotion:reducedMotion,styles:styles}){let values=useRef(Array.from({length:DOT_COUNT},()=>new Animated.Value(DOT_REST_OPACITY))).current;return useEffect(()=>{if(reducedMotion)return;let loops=values.map((value,index)=>Animated.loop(Animated.sequence([Animated.delay(index*DOT_STEP_MS),Animated.timing(value,{toValue:1,duration:DOT_FADE_MS,useNativeDriver:true}),Animated.timing(value,{toValue:DOT_REST_OPACITY,duration:DOT_FADE_MS,useNativeDriver:true}),Animated.delay((DOT_COUNT-index-1)*DOT_STEP_MS)])));for(let loop of loops)loop.start();return()=>{for(let loop of loops)loop.stop()}},[reducedMotion,values]),/* @__PURE__ */jsx(View,{style:styles.dotRow,testID:"everfur-vet-lobby-dots",accessibilityElementsHidden:true,importantForAccessibility:"no",children:values.map((value,index)=>/* @__PURE__ */jsx(Animated.View,{style:[styles.dot,{opacity:reducedMotion?DOT_STATIC_OPACITY:value}]},index))})}function LobbyControl({label:label,glyph:glyph,active:active,onPress:onPress,testID:testID,styles:styles}){/* @__PURE__ */
28
+ return jsx(Pressable,{onPress:onPress,testID:testID,accessibilityRole:"button",accessibilityState:{selected:!active},accessibilityLabel:label,style:[styles.control,active?null:styles.controlOff],children:glyph})}function EverfurVetCallLobby(props){let{clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,micOn:micOn,cameraOn:cameraOn,onToggleMic:onToggleMic,onToggleCamera:onToggleCamera,onSwitchCamera:onSwitchCamera,onLeave:onLeave,style:style}=props,theme=useEverfurTheme(),styles=useMemo(()=>makeStyles(theme),[theme]),insets=useSafeAreaInsets(),{width:width}=useWindowDimensions(),avatarSize=width<NARROW_WIDTH?AVATAR_NARROW:AVATAR_WIDE;/* @__PURE__ */
29
+ return jsxs(View,{style:[styles.root,{paddingTop:insets.top+theme.space.sm,paddingBottom:insets.bottom+theme.space.lg},style],testID:"everfur-vet-lobby",children:[
30
+ /* @__PURE__ */jsxs(View,{style:styles.topRow,children:[
31
+ /* @__PURE__ */jsx(Pressable,{onPress:onLeave,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-lobby-leave",hitSlop:12,style:styles.leaveHit,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.leaveLabel,children:VET_CALL_COPY.leaveCta})}),
32
+ /* @__PURE__ */jsx(Text,{tier:"badge",style:styles.prepLabel,testID:"everfur-vet-lobby-label",children:VET_CALL_COPY.waitingRoomLabel})]}),
33
+ /* @__PURE__ */jsxs(View,{style:styles.center,children:[
34
+ /* @__PURE__ */jsxs(View,{style:[styles.avatar,{width:avatarSize,height:avatarSize,borderRadius:avatarSize/2}],testID:"everfur-vet-lobby-avatar",accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
35
+ /* @__PURE__ */jsx(View,{style:styles.avatarGlyphHead}),
36
+ /* @__PURE__ */jsx(View,{style:styles.avatarGlyphBody})]}),
37
+ /* @__PURE__ */jsxs(View,{accessibilityLiveRegion:"polite",accessible:true,children:[
38
+ /* @__PURE__ */jsx(Text,{tier:"heading",style:styles.title,testID:"everfur-vet-lobby-title",children:VET_CALL_COPY.lobbyTitle(clinicianName)}),
39
+ /* @__PURE__ */jsx(Text,{style:styles.subtitle,testID:"everfur-vet-lobby-subtitle",children:VET_CALL_COPY.lobbySubtitle})]}),
40
+ /* @__PURE__ */jsx(WaitingDots,{reducedMotion:theme.motion.reducedMotion,styles:styles})]}),
41
+ /* @__PURE__ */jsxs(View,{style:styles.prepCard,testID:"everfur-vet-lobby-prep",children:[
42
+ /* @__PURE__ */jsx(Text,{tier:"badge",style:styles.prepLabel,children:VET_CALL_COPY.lobbyTipsTitle(clinicianName)}),[VET_CALL_COPY.lobbyTipSpot,VET_CALL_COPY.lobbyPrep(petName)].map((tip,i)=>/* @__PURE__ */jsxs(View,{style:styles.tip,children:[
43
+ /* @__PURE__ */jsx(Text,{tier:"badge",style:styles.tipNumber,accessibilityElementsHidden:true,importantForAccessibility:"no",children:String(i+1).padStart(2,"0")}),
44
+ /* @__PURE__ */jsx(Text,{style:styles.prepBody,children:tip})]},tip))]}),
45
+ /* @__PURE__ */jsxs(View,{style:styles.controls,children:[
46
+ /* @__PURE__ */jsx(LobbyControl,{label:micOn?VET_CALL_COPY.muteCta:VET_CALL_COPY.unmuteCta,glyph:/* @__PURE__ */jsx(MicGlyph,{color:theme.color.text.onBrand,off:!micOn}),active:micOn,onPress:onToggleMic,testID:"everfur-vet-lobby-mic",styles:styles}),
47
+ /* @__PURE__ */jsx(LobbyControl,{label:cameraOn?VET_CALL_COPY.cameraOffCta:VET_CALL_COPY.cameraOnCta,glyph:/* @__PURE__ */jsx(CameraGlyph,{color:theme.color.text.onBrand,off:!cameraOn}),active:cameraOn,onPress:onToggleCamera,testID:"everfur-vet-lobby-camera",styles:styles}),cameraOn&&onSwitchCamera?/* @__PURE__ */jsx(LobbyControl,{label:VET_CALL_COPY.switchCameraCta,glyph:/* @__PURE__ */jsx(SwitchCameraGlyph,{color:theme.color.text.onBrand}),active:true,onPress:onSwitchCamera,testID:"everfur-vet-lobby-switch-camera",styles:styles}):null]}),
48
+ /* @__PURE__ */jsx(Text,{tier:"badge",style:styles.duration,testID:"everfur-vet-lobby-duration",children:VET_CALL_COPY.lobbyDuration(soldMinutes(consultMinutes))})]})}function makeStyles(theme){let{color:color,space:space,radius:radius,type:type}=theme;return StyleSheet.create({root:{flex:1,backgroundColor:color.brand,paddingHorizontal:space.lg},topRow:{flexDirection:"row",alignItems:"center",gap:space.md},tip:{flexDirection:"row",gap:space.md,alignItems:"flex-start",paddingTop:space.sm},tipNumber:{...face(theme,"monoBold"),color:ON_BRAND.textSecondary,fontSize:13,width:24,paddingTop:4},leaveHit:{minHeight:MIN_TOUCH_TARGET,justifyContent:"center",paddingVertical:space.xs,paddingRight:space.md},leaveLabel:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body},center:{flex:1,alignItems:"center",justifyContent:"center"},avatar:{alignItems:"center",justifyContent:"center",borderWidth:2,borderColor:color.success,backgroundColor:ON_BRAND.surface,marginBottom:space.lg,overflow:"hidden"},avatarGlyphHead:{width:34,height:34,borderRadius:17,borderWidth:2,borderColor:ON_BRAND.glyph,marginBottom:6},avatarGlyphBody:{width:66,height:33,borderTopLeftRadius:33,borderTopRightRadius:33,borderWidth:2,borderBottomWidth:0,borderColor:ON_BRAND.glyph},title:{...face(theme,"bold"),color:color.text.onBrand,fontSize:type.size.heading,lineHeight:Math.round(type.size.heading*type.lineHeight.snug),textAlign:"center",paddingHorizontal:space.sm},subtitle:{...face(theme,"regular"),color:ON_BRAND.textSecondary,fontSize:type.size.body,textAlign:"center",marginTop:space.xs},dotRow:{flexDirection:"row",gap:space.xs,marginTop:space.lg},dot:{width:8,height:8,borderRadius:4,backgroundColor:color.success},prepCard:{borderRadius:radius.lg,borderWidth:1,borderColor:ON_BRAND.hairline,backgroundColor:ON_BRAND.surface,padding:space.lg,marginBottom:space.lg},prepLabel:{...face(theme,"monoBold"),color:color.accent,fontSize:type.size.micro,letterSpacing:1.2,textTransform:"uppercase"},prepBody:{...face(theme,"regular"),color:color.text.onBrand,fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed)},controls:{flexDirection:"row",justifyContent:"center",gap:space.lg,marginBottom:space.lg},control:{minWidth:64,minHeight:48,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:ON_BRAND.surfaceRaised},controlOff:{backgroundColor:ON_BRAND.surfaceActive},duration:{...face(theme,"medium"),color:ON_BRAND.textTertiary,fontSize:type.size.micro,letterSpacing:1.6,textAlign:"center"}})}var LEAVE_SETTLE_MS=5e3;function settleWithin(work,ms){return new Promise(resolve=>{let timer=setTimeout(resolve,ms);work.catch(()=>{}).then(()=>{clearTimeout(timer),resolve()})})}function useLeaveOnce(onLeave,teardown){let onLeaveRef=useRef(onLeave);useEffect(()=>{onLeaveRef.current=onLeave});let liveRef=useRef(false);useEffect(()=>(liveRef.current=true,()=>{liveRef.current=false}),[]);let reportedRef=useRef(false),reportLeft=useCallback(()=>{reportedRef.current||!liveRef.current||(reportedRef.current=true,onLeaveRef.current())},[]),leavingRef=useRef(false),leave=useCallback(()=>{leavingRef.current||(leavingRef.current=true,settleWithin(teardown(),LEAVE_SETTLE_MS).then(reportLeft))},[teardown,reportLeft]);return{reportLeft:reportLeft,leave:leave,leaving:leavingRef}}var SLOT2=/* @__PURE__ */Symbol.for("@everfur/sdk/televet/recording-notice-receipt");function receipts(){let realm=globalThis;return realm[SLOT2]??=/* @__PURE__ */new Map}function hasRecordingNoticeAccepted(roomUrl){return(receipts().get(roomUrl)??0)>0}function useSpeakerRoute(callRef){let[speakerOn,setSpeakerOn]=useState(true),route=useRef(true),toggleSpeaker=useCallback(()=>{let call=callRef.current;if(!call?.setNativeInCallAudioMode)return;let next=!route.current;route.current=next,setSpeakerOn(next),call.setNativeInCallAudioMode(next?"video":"voice")},[callRef]);return{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}}function asTrack(track){return track??null}function hasVideo(participant){return!!participant?.videoTrack}function PersonMark({styles:styles}){/* @__PURE__ */
49
+ return jsxs(View,{style:styles.remoteOffAvatar,accessibilityElementsHidden:true,importantForAccessibility:"no",children:[
50
+ /* @__PURE__ */jsx(View,{style:styles.remoteOffHead}),
51
+ /* @__PURE__ */jsx(View,{style:styles.remoteOffBody})]})}function EverfurVetCall(props){/* @__PURE__ */
52
+ return jsx(VetCallRoom,{...props},props.roomUrl)}function VetCallRoom(props){let{roomUrl:roomUrl,token:token,onLeave:onLeave,clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,daily:daily,telemetry:telemetry,onUnavailable:onUnavailable,renderUnavailable:renderUnavailable,style:style}=guardHostProps(props,["onLeave"]),theme=useEverfurTheme(),styles=useMemo(()=>makeStyles2(theme),[theme]),insets=useSafeAreaInsets(),sink=telemetry??noopTelemetry,sinkRef=useRef(sink);useEffect(()=>{sinkRef.current=sink});let callRef=useRef(null),[acknowledged,setAcknowledged]=useState(()=>hasRecordingNoticeAccepted(roomUrl)),[phase,setPhase]=useState("joining"),[remote,setRemote]=useState(null),[local,setLocal]=useState(null),[micOn,setMicOn]=useState(true),[camOn,setCamOn]=useState(true),{speakerOn:speakerOn,toggleSpeaker:toggleSpeaker}=useSpeakerRoute(callRef),[frontCamera,setFrontCamera]=useState(true),[caps,setCaps]=useState({flip:false,speaker:false}),[joinedAtMs,setJoinedAtMs]=useState(null),[elapsedMs,setElapsedMs]=useState(0),credentialOk=isUsableRoomCredential(roomUrl,token),loaded=useMemo(()=>credentialOk?daily?{available:true,module:daily,reason:""}:loadEverfurDaily():null,[credentialOk,daily]),module=loaded?.available?loaded.module:null,unavailable2=useMemo(()=>loaded===null?{reason:"roomUnusable",detail:"[everfur] The vet call needs an https room URL and a non-empty join token."}:loaded.available?null:{reason:"dailyMissing",detail:`${EVERFUR_DAILY_SETUP} (${loaded.reason})`},[loaded]),warned=useRef(false);useEffect(()=>{if(unavailable2===null){warned.current=false;return}if(callHost(onUnavailable,unavailable2.reason,unavailable2.detail),!warned.current){warned.current=true;try{globalThis.console?.warn?.(unavailable2.detail)}catch{}}},[unavailable2,onUnavailable]);let teardown=useCallback(async()=>{let call=callRef.current;if(callRef.current=null,!!call){await settleWithin(new Promise(settle=>settle(call.leave())),LEAVE_SETTLE_MS);try{call.setLocalAudio(!1),call.setLocalVideo(!1)}catch{}try{await call.destroy()}catch{}}},[]),{reportLeft:reportLeft,leave:leave,leaving:leaving}=useLeaveOnce(onLeave,teardown);useEffect(()=>{if(module===null||!acknowledged)return;let cancelled=false,call=module.createCallObject();callRef.current=call,setCaps({flip:typeof call.cycleCamera=="function",speaker:typeof call.setNativeInCallAudioMode=="function"});let syncParticipants=()=>{let all=Object.values(call.participants());setLocal(all.find(p=>p.local)??null),setRemote(all.find(p=>!p.local)??null)},events=["participant-joined","participant-updated","participant-left"];for(let event of events)call.on(event,syncParticipants);let onLeftMeeting=()=>{cancelled||leaving.current||(setPhase("left"),reportLeft())},onError=()=>{cancelled||setPhase("error")};return call.on("left-meeting",onLeftMeeting),call.on("error",onError),call.join({url:roomUrl,token:token}).then(()=>{cancelled||(setPhase("joined"),setJoinedAtMs(Date.now()),syncParticipants(),sinkRef.current.track("televet.call.joined",{provider:"daily"}))}).catch(()=>{cancelled||(setPhase("error"),sinkRef.current.trackExpectedFailure("televet.call.join_failed",{provider:"daily"}))}),()=>{cancelled=true;for(let event of events)call.off(event,syncParticipants);call.off("left-meeting",onLeftMeeting),call.off("error",onError),teardown()}},[module,acknowledged,roomUrl,token,teardown,reportLeft,leaving]),useEffect(()=>{if(joinedAtMs===null)return;setElapsedMs(Date.now()-joinedAtMs);let id=setInterval(()=>{setElapsedMs(Date.now()-joinedAtMs)},1e3);return()=>{clearInterval(id)}},[joinedAtMs]);let toggleMic=useCallback(()=>{let call=callRef.current;call&&setMicOn(on=>(call.setLocalAudio(!on),!on))},[]),toggleCam=useCallback(()=>{let call=callRef.current;call&&setCamOn(on=>(call.setLocalVideo(!on),!on))},[]),flipCamera=useCallback(()=>{let call=callRef.current;call?.cycleCamera&&call.cycleCamera().then(result=>{let facing=result?.device?.facingMode;facing&&setFrontCamera(facing==="user")},()=>{})},[]);if(unavailable2!==null)return renderUnavailable?/* @__PURE__ */jsx(Fragment,{children:renderUnavailable(unavailable2.reason,unavailable2.detail)}):null;if(module===null)return null;if(!acknowledged)/* @__PURE__ */
53
+ return jsxs(View,{style:[styles.notice,{paddingTop:insets.top+theme.space.xl,paddingBottom:insets.bottom+theme.space.xl},style],testID:"everfur-vet-call-recording-notice",children:[
54
+ /* @__PURE__ */jsx(Text,{style:styles.noticeTitle,accessibilityRole:"header",children:VET_CALL_COPY.recordingNoticeTitle}),
55
+ /* @__PURE__ */jsx(Pressable,{onPress:()=>setAcknowledged(true),accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.recordingNoticeCta,testID:"everfur-vet-call-recording-continue",style:styles.noticeContinue,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.noticeContinueLabel,children:VET_CALL_COPY.recordingNoticeCta})}),
56
+ /* @__PURE__ */jsx(Pressable,{onPress:reportLeft,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-call-recording-leave",style:styles.errorLeaveHit,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.noticeLeave,children:VET_CALL_COPY.leaveCta})})]});if(phase==="error")/* @__PURE__ */
57
+ return jsxs(View,{style:[styles.centered,style],testID:"everfur-vet-call-error",children:[
58
+ /* @__PURE__ */jsx(Text,{style:styles.status,accessibilityLiveRegion:"polite",children:VET_CALL_COPY.joinFailedReason}),
59
+ /* @__PURE__ */jsx(Pressable,{onPress:leave,accessibilityRole:"button",accessibilityLabel:VET_CALL_COPY.leaveCta,testID:"everfur-vet-call-error-leave",style:styles.errorLeaveHit,children:/* @__PURE__ */jsx(Text,{tier:"control",style:styles.errorLeave,children:VET_CALL_COPY.leaveCta})})]});if(remote===null)/* @__PURE__ */
60
+ return jsx(EverfurVetCallLobby,{clinicianName:clinicianName,petName:petName,consultMinutes:consultMinutes,micOn:micOn,cameraOn:camOn,onToggleMic:toggleMic,onToggleCamera:toggleCam,...caps.flip?{onSwitchCamera:flipCamera}:{},onLeave:leave,style:style});let MediaView=module.DailyMediaView,name=clinicianName?.trim()??"",overTime=elapsedMs>=soldMinutes(consultMinutes)*6e4;/* @__PURE__ */
61
+ return jsxs(View,{style:[styles.root,style],testID:"everfur-vet-call",children:[
62
+ /* @__PURE__ */jsxs(View,{style:styles.fill,testID:"everfur-vet-call-remote",children:[
63
+ /* @__PURE__ */jsx(MediaView,{videoTrack:asTrack(remote.videoTrack),audioTrack:asTrack(remote.audioTrack),mirror:false,objectFit:"cover",style:styles.fill}),hasVideo(remote)?null:/* @__PURE__ */jsxs(View,{style:styles.remoteOff,testID:"everfur-vet-call-remote-camera-off",children:[
64
+ /* @__PURE__ */jsx(PersonMark,{styles:styles}),name.length>0?/* @__PURE__ */jsx(Text,{style:styles.remoteOffName,numberOfLines:1,children:name}):null]})]}),
65
+ /* @__PURE__ */jsxs(View,{style:[styles.statusRow,{top:insets.top+theme.space.sm}],pointerEvents:"none",children:[name.length>0?/* @__PURE__ */jsx(Text,{tier:"compact",style:styles.statusName,numberOfLines:1,testID:"everfur-vet-call-remote-name",children:name}):null,joinedAtMs!==null?/* @__PURE__ */jsx(Text,{tier:"badge",style:[styles.statusMeta,overTime?styles.statusMetaOver:null],testID:"everfur-vet-call-elapsed",children:formatElapsed(elapsedMs)}):null]}),
66
+ /* @__PURE__ */jsxs(View,{style:[styles.selfView,{top:insets.top+theme.space.sm}],testID:"everfur-vet-call-self",children:[
67
+ /* @__PURE__ */jsx(MediaView,{videoTrack:camOn?asTrack(local?.videoTrack):null,audioTrack:null,mirror:frontCamera,objectFit:"cover",style:styles.fill}),local?.videoTrack&&camOn?null:/* @__PURE__ */jsx(View,{style:[styles.selfViewOff,styles.fill],testID:"everfur-vet-call-self-off",children:/* @__PURE__ */jsx(Text,{tier:"badge",style:styles.selfViewOffLabel,children:VET_CALL_COPY.selfCameraOffLabel})})]}),
68
+ /* @__PURE__ */jsxs(View,{style:[styles.controlBar,{bottom:insets.bottom+theme.space.lg}],children:[caps.speaker?/* @__PURE__ */jsx(CallControl,{label:speakerOn?VET_CALL_COPY.speakerOffCta:VET_CALL_COPY.speakerOnCta,glyph:/* @__PURE__ */jsx(SpeakerGlyph,{color:speakerOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!speakerOn}),muted:!speakerOn,onPress:toggleSpeaker,testID:"everfur-vet-call-speaker",style:[styles.control,speakerOn?null:styles.controlMuted]}):null,
69
+ /* @__PURE__ */jsx(CallControl,{label:micOn?VET_CALL_COPY.muteCta:VET_CALL_COPY.unmuteCta,glyph:/* @__PURE__ */jsx(MicGlyph,{color:micOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!micOn}),muted:!micOn,onPress:toggleMic,testID:"everfur-vet-call-mic",style:[styles.control,micOn?null:styles.controlMuted]}),
70
+ /* @__PURE__ */jsx(CallControl,{label:camOn?VET_CALL_COPY.cameraOffCta:VET_CALL_COPY.cameraOnCta,glyph:/* @__PURE__ */jsx(CameraGlyph,{color:camOn?theme.color.text.onBrand:CONTROL_ON_LIGHT_INK,off:!camOn}),muted:!camOn,onPress:toggleCam,testID:"everfur-vet-call-camera",style:[styles.control,camOn?null:styles.controlMuted]}),caps.flip&&camOn?/* @__PURE__ */jsx(CallControl,{label:VET_CALL_COPY.switchCameraCta,glyph:/* @__PURE__ */jsx(SwitchCameraGlyph,{color:theme.color.text.onBrand}),onPress:flipCamera,testID:"everfur-vet-call-switch-camera",style:styles.control}):null,
71
+ /* @__PURE__ */jsx(CallControl,{label:VET_CALL_COPY.leaveCta,glyph:/* @__PURE__ */jsx(LeaveGlyph,{color:theme.color.text.onBrand}),onPress:leave,testID:"everfur-vet-call-leave",style:[styles.control,styles.controlDanger]})]})]})}var CALL_GROUND="#141414",SELF_VIEW_GROUND="#1B1B1B",CONTROL_SCRIM="rgba(20,20,20,0.62)",CONTROL_ON_LIGHT_INK="#141414",SELF_VIEW_WIDTH=104,OVER_VIDEO_SHADOW={textShadowColor:"rgba(0,0,0,0.55)",textShadowRadius:6};function makeStyles2(theme){let{color:color,space:space,radius:radius,type:type}=theme;return StyleSheet.create({root:{flex:1,backgroundColor:CALL_GROUND},fill:{...ABSOLUTE_FILL},centered:{flex:1,alignItems:"center",justifyContent:"center",gap:space.lg,padding:space.xl,backgroundColor:CALL_GROUND},statusRow:{position:"absolute",left:space.md,right:SELF_VIEW_WIDTH+space.md*2,flexDirection:"column",alignItems:"flex-start",gap:2},statusName:{flexShrink:1,...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.body,...OVER_VIDEO_SHADOW},statusMeta:{...face(theme,"mono"),color:color.text.onBrand,fontSize:type.size.caption,...OVER_VIDEO_SHADOW},statusMetaOver:{color:color.danger},selfView:{position:"absolute",right:space.md,width:SELF_VIEW_WIDTH,height:148,borderRadius:radius.lg,overflow:"hidden",backgroundColor:SELF_VIEW_GROUND,borderWidth:1,borderColor:"rgba(255,255,255,0.24)",shadowColor:"#000",shadowOpacity:.35,shadowRadius:12,shadowOffset:{width:0,height:4},elevation:6},selfViewOff:{alignItems:"center",justifyContent:"center",paddingHorizontal:space.xs,backgroundColor:SELF_VIEW_GROUND},remoteOff:{...ABSOLUTE_FILL,alignItems:"center",justifyContent:"center",gap:space.md,backgroundColor:CALL_GROUND},remoteOffAvatar:{width:96,height:96,borderRadius:radius.pill,overflow:"hidden",alignItems:"center",justifyContent:"flex-end",backgroundColor:"rgba(255,255,255,0.14)"},remoteOffHead:{width:36,height:36,borderRadius:18,marginBottom:6,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffBody:{width:64,height:28,borderTopLeftRadius:32,borderTopRightRadius:32,backgroundColor:"rgba(255,255,255,0.56)"},remoteOffName:{...face(theme,"medium"),color:color.text.onBrand,fontSize:type.size.subtitle,paddingHorizontal:space.xl},notice:{flex:1,justifyContent:"center",gap:space.lg,paddingHorizontal:space.xl,backgroundColor:color.surface},noticeTitle:{...face(theme,"medium"),fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed),color:color.text.primary},noticeContinue:{minHeight:44,alignItems:"center",justifyContent:"center",paddingHorizontal:space.xl,borderRadius:radius.pill,backgroundColor:color.primary},noticeContinueLabel:{...face(theme,"medium"),color:color.onPrimary,fontSize:type.size.body},noticeLeave:{...face(theme,"medium"),color:color.brandInk,fontSize:type.size.body},selfViewOffLabel:{...face(theme,"medium"),color:"rgba(255,255,255,0.78)",fontSize:type.size.micro,textAlign:"center"},controlBar:{position:"absolute",left:0,right:0,flexDirection:"row",justifyContent:"center",alignItems:"center",gap:space.sm},control:{minWidth:54,minHeight:56,paddingHorizontal:space.md,alignItems:"center",justifyContent:"center",borderRadius:radius.pill,backgroundColor:CONTROL_SCRIM},controlMuted:{backgroundColor:color.text.onBrand},controlDanger:{backgroundColor:color.danger},status:{...face(theme,"medium"),fontSize:type.size.subtitle,lineHeight:Math.round(type.size.subtitle*type.lineHeight.relaxed),color:color.surface,textAlign:"center"},errorLeaveHit:{minHeight:44,minWidth:44,alignItems:"center",justifyContent:"center",paddingHorizontal:space.lg},errorLeave:{...face(theme,"medium"),color:color.surface,fontSize:type.size.body,textDecorationLine:"underline"}})}export{EVERFUR_DAILY_SETUP,EverfurVetCall,EverfurVetCallLobby,VET_CALL_CONSULT_MINUTES,VET_CALL_COPY,isEverfurDailyModule,isSafeRoomUrl,isUsableRoomCredential,loadEverfurDaily,registerEverfurDaily};