@everfur/sdk 1.4.0 → 1.5.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 (252) hide show
  1. package/README.md +2 -2
  2. package/dist/{Chat.d-BXuEjJsg.d.ts → Chat.d-BCfyvzX8.d.ts} +1 -1
  3. package/dist/{Chat.d-D9n8tSDD.d.cts → Chat.d-Od44h51D.d.cts} +1 -1
  4. package/dist/{DepthViews.d-PmjccZLr.d.cts → DepthViews.d-BGspxovy.d.cts} +1 -1
  5. package/dist/{DepthViews.d-aOChkwU2.d.ts → DepthViews.d-BIHVrf9r.d.ts} +1 -1
  6. package/dist/{DepthViews.d-ktxIIsnb.d.cts → DepthViews.d-BaLh7Lsi.d.cts} +1 -1
  7. package/dist/{DepthViews.d-CpF_Y_z9.d.ts → DepthViews.d-CEVk9poG.d.ts} +1 -1
  8. package/dist/ErrorPolicyPort.d-BIdmYQnk.d.cts +43 -0
  9. package/dist/ErrorPolicyPort.d-BnI5qWg4.d.ts +43 -0
  10. package/dist/{RecordsPage.d-BfMSOsg_.d.ts → RecordsPage.d-D10RIgdc.d.ts} +1 -1
  11. package/dist/{RecordsPage.d-DWjFpZs1.d.cts → RecordsPage.d-DbhYNSbq.d.cts} +1 -1
  12. package/dist/animations/index.cjs +1 -1
  13. package/dist/animations/index.d.cts +3 -3
  14. package/dist/animations/index.d.ts +3 -3
  15. package/dist/animations/index.js +1 -1
  16. package/dist/{attachments.d-DjWUR-h9.d.ts → attachments.d-BlukNfIf.d.ts} +2 -2
  17. package/dist/{attachments.d-Bsg6duaq.d.cts → attachments.d-CF4lLuGK.d.cts} +2 -2
  18. package/dist/{bookingCopy.d-ITpabqPr.d.ts → bookingCopy.d-BuDv16WP.d.ts} +12 -12
  19. package/dist/{bookingCopy.d-B39JAmIZ.d.cts → bookingCopy.d-rnBSqOSN.d.cts} +12 -12
  20. package/dist/{branding.d-Bzs4HJoN.d.cts → branding.d-CqDLKj1U.d.cts} +1 -1
  21. package/dist/{branding.d-CiC6xfGT.d.ts → branding.d-XrZYClN4.d.ts} +1 -1
  22. package/dist/{callCopy.d-Bw6oZT54.d.cts → callCopy.d-BQxpwXqT.d.cts} +3 -3
  23. package/dist/{callCopy.d-Bw6oZT54.d.ts → callCopy.d-BQxpwXqT.d.ts} +3 -3
  24. package/dist/{callRoom.d-B1DoYdJe.d.cts → callRoom.d-9Dm7XnUr.d.cts} +1 -1
  25. package/dist/{callRoom.d-Dqm1rUqT.d.ts → callRoom.d-t-khijDv.d.ts} +1 -1
  26. package/dist/{casesRepository.d-De4ZtgJ_.d.cts → casesRepository.d-CVuKTkJo.d.cts} +1 -1
  27. package/dist/{casesRepository.d-DsEeFd0F.d.ts → casesRepository.d-Dn1fK1b2.d.ts} +1 -1
  28. package/dist/chat/index.cjs +195 -195
  29. package/dist/chat/index.d.cts +14 -14
  30. package/dist/chat/index.d.ts +14 -14
  31. package/dist/chat/index.js +203 -203
  32. package/dist/chat/lite/index.cjs +206 -206
  33. package/dist/chat/lite/index.d.cts +14 -14
  34. package/dist/chat/lite/index.d.ts +14 -14
  35. package/dist/chat/lite/index.js +206 -206
  36. package/dist/{chatHandoffToken.d-sbumx0He.d.cts → chatHandoffToken.d-BjfmIxXk.d.cts} +7 -7
  37. package/dist/{chatHandoffToken.d-YJY6TZbj.d.ts → chatHandoffToken.d-CFiI6IMc.d.ts} +7 -7
  38. package/dist/{checkin.d-DxpoRutq.d.cts → checkin.d-BP3ZWBfX.d.cts} +19 -7
  39. package/dist/{checkin.d-C6vh9KVr.d.ts → checkin.d-CokpahFL.d.ts} +19 -7
  40. package/dist/{chunk-FZ6DAQFH.js → chunk-4KFFE42Z.js} +20 -20
  41. package/dist/{chunk-ZPIOCHKW.js → chunk-6IHY7HS7.js} +1 -1
  42. package/dist/{chunk-II4QDD6F.js → chunk-BMYNDBUR.js} +1 -1
  43. package/dist/{chunk-AJEELSFO.js → chunk-HHCGXQJR.js} +13 -13
  44. package/dist/client/index.cjs +31 -31
  45. package/dist/client/index.d.cts +24 -21
  46. package/dist/client/index.d.ts +24 -21
  47. package/dist/client/index.js +31 -31
  48. package/dist/{clinicBatch.d-B3YJc8IO.d.cts → clinicBatch.d-C0xx5L4j.d.cts} +3 -3
  49. package/dist/{clinicBatch.d-DhvQuPHV.d.ts → clinicBatch.d-DNi4UURs.d.ts} +3 -3
  50. package/dist/{config.d-DRoQ2lAx.d.ts → config.d-B7Z-KTGq.d.ts} +10 -2
  51. package/dist/{config.d-BiVy0fLx.d.cts → config.d-ClAI2RZ6.d.cts} +10 -2
  52. package/dist/consent/index.cjs +1 -1
  53. package/dist/consent/index.d.cts +6 -6
  54. package/dist/consent/index.d.ts +6 -6
  55. package/dist/consent/index.js +2 -2
  56. package/dist/{context.d-Cq2C4vdh.d.cts → context.d-Bj6-xYPA.d.cts} +13 -7
  57. package/dist/{context.d-D1l56nFr.d.ts → context.d-DS1GXUEY.d.ts} +13 -7
  58. package/dist/{copy.d-Ce_8KuZg.d.cts → copy.d--F5A9cXK.d.cts} +3 -3
  59. package/dist/{copy.d-BP36f_63.d.ts → copy.d-DmxuFJFe.d.ts} +3 -3
  60. package/dist/core/index.cjs +42 -41
  61. package/dist/core/index.d.cts +20 -20
  62. package/dist/core/index.d.ts +20 -20
  63. package/dist/core/index.js +42 -41
  64. package/dist/{depth.d-DzMMmRN4.d.ts → depth.d-CgzYE6_n.d.ts} +3 -3
  65. package/dist/{depth.d-BtlcIqPJ.d.cts → depth.d-DLaP0o8Y.d.cts} +3 -3
  66. package/dist/{entitlementRepository.d-x2YFdgYD.d.ts → entitlementRepository.d-CkUTlVAb.d.ts} +3 -3
  67. package/dist/{entitlementRepository.d-CEDU1gZE.d.cts → entitlementRepository.d-DVTp-BB9.d.cts} +3 -3
  68. package/dist/{focus.d-BX7oahFk.d.cts → focus.d-CLTjm6In.d.cts} +1 -1
  69. package/dist/{focus.d-armXecf0.d.ts → focus.d-u-HYvim0.d.ts} +1 -1
  70. package/dist/health-plan/index.cjs +1 -1
  71. package/dist/health-plan/index.d.cts +17 -17
  72. package/dist/health-plan/index.d.ts +17 -17
  73. package/dist/health-plan/index.js +1 -1
  74. package/dist/{healthPlanRepository.d-DBx7-NLE.d.cts → healthPlanRepository.d-B22kjrYa.d.cts} +3 -3
  75. package/dist/{healthPlanRepository.d-C7K9dJK5.d.ts → healthPlanRepository.d-CwRXeoM7.d.ts} +3 -3
  76. package/dist/{idempotency.d-Dak2-pON.d.cts → idempotency.d-CFVMhWcv.d.cts} +1 -1
  77. package/dist/{idempotency.d-symqJ8Tt.d.ts → idempotency.d-dOFfV91-.d.ts} +1 -1
  78. package/dist/{identity.d-DOKJFaiz.d.ts → identity.d-D4VtpqRr.d.ts} +1 -1
  79. package/dist/{identity.d-DIH9h3Le.d.cts → identity.d-DDpXOtas.d.cts} +1 -1
  80. package/dist/{inbox.d-AuGKeaZv.d.cts → inbox.d-CPcMMz-Y.d.cts} +2 -2
  81. package/dist/{inbox.d-B5b57OXc.d.ts → inbox.d-DJ9xgU1Z.d.ts} +2 -2
  82. package/dist/index.cjs +248 -247
  83. package/dist/index.d.cts +22 -22
  84. package/dist/index.d.ts +22 -22
  85. package/dist/index.js +247 -246
  86. package/dist/{introEvents.d-ehik7PEn.d.cts → introEvents.d-B7acmGwf.d.cts} +1 -1
  87. package/dist/{introEvents.d-S4Q4BOSt.d.ts → introEvents.d-DW3gLljE.d.ts} +1 -1
  88. package/dist/{layout.d-Bm2_1wa4.d.ts → layout.d-C8y_ki1V.d.ts} +1 -1
  89. package/dist/{layout.d-CFF-nBXf.d.cts → layout.d-DfaFM_lp.d.cts} +1 -1
  90. package/dist/{models.d-DOwpK1ZF.d.ts → models.d-BKmOfoqV.d.cts} +2 -2
  91. package/dist/{models.d-Su_BBBTW.d.cts → models.d-BULqCO2R.d.ts} +2 -2
  92. package/dist/notifications/inbox/index.cjs +9 -9
  93. package/dist/notifications/inbox/index.d.cts +7 -7
  94. package/dist/notifications/inbox/index.d.ts +7 -7
  95. package/dist/notifications/inbox/index.js +9 -9
  96. package/dist/notifications/index.cjs +3 -3
  97. package/dist/notifications/index.d.cts +8 -8
  98. package/dist/notifications/index.d.ts +8 -8
  99. package/dist/notifications/index.js +6 -6
  100. package/dist/{optInView.d-DbGx1A9R.d.cts → optInView.d-ByDJMrMv.d.cts} +13 -13
  101. package/dist/{optInView.d-xnIxCLlH.d.ts → optInView.d-DVshLxbD.d.ts} +13 -13
  102. package/dist/{parse.d-DtHmpAMT.d.cts → parse.d-BDZ7ffgj.d.cts} +4 -1
  103. package/dist/{parse.d-DtHmpAMT.d.ts → parse.d-BDZ7ffgj.d.ts} +4 -1
  104. package/dist/{pets.d-BEqKykpu.d.ts → pets.d-BpLObpfM.d.ts} +1 -1
  105. package/dist/{pets.d-BS6sLxY-.d.cts → pets.d-DXhzTNuI.d.cts} +1 -1
  106. package/dist/{petsRepository.d-iHrHkXM2.d.ts → petsRepository.d-_QfM7F6T.d.ts} +1 -1
  107. package/dist/{petsRepository.d-DB5CNKsK.d.cts → petsRepository.d-ai_tZ3lu.d.cts} +1 -1
  108. package/dist/photo/index.cjs +1 -1
  109. package/dist/photo/index.js +23 -23
  110. package/dist/{presentation.d-CWGjwq8Z.d.cts → presentation.d-BkIvMtIl.d.cts} +3 -3
  111. package/dist/{presentation.d-CWGjwq8Z.d.ts → presentation.d-BkIvMtIl.d.ts} +3 -3
  112. package/dist/records/depth/index.cjs +1 -1
  113. package/dist/records/depth/index.d.cts +10 -10
  114. package/dist/records/depth/index.d.ts +10 -10
  115. package/dist/records/depth/index.js +1 -1
  116. package/dist/records/index.cjs +2 -2
  117. package/dist/records/index.d.cts +13 -13
  118. package/dist/records/index.d.ts +13 -13
  119. package/dist/records/index.js +71 -71
  120. package/dist/{requestFunnel.d-SySe6xHp.d.cts → requestFunnel.d-BwZDfWVD.d.cts} +3 -3
  121. package/dist/{requestFunnel.d-CehftayS.d.ts → requestFunnel.d-DKBPTpsy.d.ts} +3 -3
  122. package/dist/{route.d-9wclfD-y.d.cts → route.d-DCzQh4ix.d.cts} +3 -3
  123. package/dist/{route.d-IP_gkOWL.d.ts → route.d-DSYEd2MR.d.ts} +3 -3
  124. package/dist/{runtimeTypes.d-BdUe3tYs.d.ts → runtimeTypes.d-BzUig75K.d.ts} +15 -11
  125. package/dist/{runtimeTypes.d-_UZ6rMUY.d.cts → runtimeTypes.d-CL4l7ta4.d.cts} +15 -11
  126. package/dist/{screenProps.d-Bd2yphad.d.cts → screenProps.d-6xmE1C-V.d.cts} +2 -2
  127. package/dist/{screenProps.d-D9Vi-Afl.d.ts → screenProps.d-fHBKArt_.d.ts} +2 -2
  128. package/dist/{sdkConfigStore.d-VPvsIL8E.d.ts → sdkConfigStore.d-BNCVVEWC.d.ts} +1 -1
  129. package/dist/{sdkConfigStore.d-BHrzkVpP.d.cts → sdkConfigStore.d-C2BAr9kI.d.cts} +1 -1
  130. package/dist/server/events/index.cjs +4 -4
  131. package/dist/server/events/index.d.cts +2 -2
  132. package/dist/server/events/index.d.ts +2 -2
  133. package/dist/server/events/index.js +4 -4
  134. package/dist/server/index.cjs +9 -9
  135. package/dist/server/index.d.cts +18 -4
  136. package/dist/server/index.d.ts +18 -4
  137. package/dist/server/index.js +9 -9
  138. package/dist/shop/index.d.cts +3 -3
  139. package/dist/shop/index.d.ts +3 -3
  140. package/dist/slots/index.cjs +1 -1
  141. package/dist/slots/index.d.cts +6 -6
  142. package/dist/slots/index.d.ts +6 -6
  143. package/dist/slots/index.js +1 -1
  144. package/dist/tabs/index.cjs +88 -85
  145. package/dist/tabs/index.d.cts +15 -15
  146. package/dist/tabs/index.d.ts +15 -15
  147. package/dist/tabs/index.js +87 -84
  148. package/dist/televet/booking/index.cjs +41 -41
  149. package/dist/televet/booking/index.d.cts +8 -8
  150. package/dist/televet/booking/index.d.ts +8 -8
  151. package/dist/televet/booking/index.js +4 -4
  152. package/dist/televet/call/index.d.cts +2 -2
  153. package/dist/televet/call/index.d.ts +2 -2
  154. package/dist/televet/index.cjs +1 -1
  155. package/dist/televet/index.js +1 -1
  156. package/dist/testing/index.cjs +1 -1
  157. package/dist/testing/index.d.cts +1 -1
  158. package/dist/testing/index.d.ts +1 -1
  159. package/dist/testing/index.js +1 -1
  160. package/dist/testing/rn/index.cjs +8 -8
  161. package/dist/testing/rn/index.d.cts +13 -13
  162. package/dist/testing/rn/index.d.ts +13 -13
  163. package/dist/testing/rn/index.js +9 -9
  164. package/dist/testing/web/index.cjs +3 -3
  165. package/dist/testing/web/index.d.cts +13 -13
  166. package/dist/testing/web/index.d.ts +13 -13
  167. package/dist/testing/web/index.js +1 -1
  168. package/dist/texting/index.cjs +1 -1
  169. package/dist/texting/index.d.cts +6 -6
  170. package/dist/texting/index.d.ts +6 -6
  171. package/dist/texting/index.js +26 -26
  172. package/dist/{threadOptions.d-bEAFkIsC.d.cts → threadOptions.d-Bqy5d5Fx.d.cts} +1 -1
  173. package/dist/{threadOptions.d-U5YBUKM-.d.ts → threadOptions.d-DOEIpk1t.d.ts} +1 -1
  174. package/dist/{threadOptions.d-BW0rePcs.d.cts → threadOptions.d-Dc57dm7h.d.cts} +7 -7
  175. package/dist/{threadOptions.d-CrAb71J2.d.ts → threadOptions.d-NSlFx-Lp.d.ts} +7 -7
  176. package/dist/{timelineRows.d-DXppCSCg.d.cts → timelineRows.d-7w8NsNi4.d.cts} +1 -1
  177. package/dist/{timelineRows.d-9Uhf4q5d.d.ts → timelineRows.d-CthNM5hV.d.ts} +1 -1
  178. package/dist/{typeStyle.d-rzVzCfLz.d.ts → typeStyle.d-8mcLhtbH.d.ts} +1 -1
  179. package/dist/{typeStyle.d-B-YgiWcS.d.cts → typeStyle.d-CLrQZW-r.d.cts} +1 -1
  180. package/dist/{unreadStore.d-gCsleb6l.d.ts → unreadStore.d-CLnChKca.d.ts} +17 -9
  181. package/dist/{unreadStore.d-w5x6lEpR.d.cts → unreadStore.d-Donv4bcF.d.cts} +17 -9
  182. package/dist/{useHealthPlanSubscription.d-CRBPMlsc.d.ts → useHealthPlanSubscription.d-CV7M21HS.d.ts} +3 -3
  183. package/dist/{useHealthPlanSubscription.d-DfjTYv1u.d.cts → useHealthPlanSubscription.d-SA9-SuKe.d.cts} +3 -3
  184. package/dist/{useInboxUnread.d-CP3KwSkn.d.ts → useInboxUnread.d-CXiaR3BZ.d.ts} +1 -1
  185. package/dist/{useInboxUnread.d-DiE_NbtS.d.cts → useInboxUnread.d-DERpMelw.d.cts} +1 -1
  186. package/dist/{usePresentation.d-DefUwatV.d.cts → usePresentation.d-BJzFicRQ.d.cts} +3 -3
  187. package/dist/{usePresentation.d-w5_oWKmh.d.ts → usePresentation.d-DgSGIWS-.d.ts} +3 -3
  188. package/dist/{useRecordsDepth.d-l6D0ZS4l.d.cts → useRecordsDepth.d-C9W45gwS.d.cts} +1 -1
  189. package/dist/{useRecordsDepth.d-DG2GiAyt.d.ts → useRecordsDepth.d-ZX2rhcUx.d.ts} +1 -1
  190. package/dist/{useUnread.d-xDOpYyqx.d.ts → useUnread.d-CedFK4k6.d.ts} +5 -5
  191. package/dist/{useUnread.d-DeRDFtTb.d.cts → useUnread.d-DST1GMmL.d.cts} +5 -5
  192. package/dist/video/index.cjs +1 -1
  193. package/dist/video/index.js +1 -1
  194. package/dist/{view.d-ufGX_MKK.d.cts → view.d-3lxzyJlL.d.cts} +6 -6
  195. package/dist/{view.d-iTInze7B.d.ts → view.d-DRiYNQJ8.d.ts} +6 -6
  196. package/dist/web/consent/index.cjs +3 -3
  197. package/dist/web/consent/index.d.cts +6 -6
  198. package/dist/web/consent/index.d.ts +6 -6
  199. package/dist/web/consent/index.js +5 -5
  200. package/dist/web/health-plan/index.cjs +2 -2
  201. package/dist/web/health-plan/index.d.cts +17 -17
  202. package/dist/web/health-plan/index.d.ts +17 -17
  203. package/dist/web/health-plan/index.js +1 -1
  204. package/dist/web/inbox/index.cjs +5 -5
  205. package/dist/web/inbox/index.d.cts +9 -8
  206. package/dist/web/inbox/index.d.ts +9 -8
  207. package/dist/web/inbox/index.js +5 -5
  208. package/dist/web/index.cjs +196 -195
  209. package/dist/web/index.d.cts +34 -34
  210. package/dist/web/index.d.ts +34 -34
  211. package/dist/web/index.js +196 -195
  212. package/dist/web/intro/index.cjs +10 -10
  213. package/dist/web/intro/index.d.cts +8 -8
  214. package/dist/web/intro/index.d.ts +8 -8
  215. package/dist/web/intro/index.js +6 -6
  216. package/dist/web/notifications/index.cjs +5 -5
  217. package/dist/web/notifications/index.d.cts +7 -7
  218. package/dist/web/notifications/index.d.ts +7 -7
  219. package/dist/web/notifications/index.js +1 -1
  220. package/dist/web/records/depth/index.cjs +1 -1
  221. package/dist/web/records/depth/index.d.cts +10 -10
  222. package/dist/web/records/depth/index.d.ts +10 -10
  223. package/dist/web/records/depth/index.js +1 -1
  224. package/dist/web/records/index.cjs +1 -1
  225. package/dist/web/records/index.d.cts +13 -13
  226. package/dist/web/records/index.d.ts +13 -13
  227. package/dist/web/records/index.js +1 -1
  228. package/dist/web/records-sheet/index.cjs +2 -2
  229. package/dist/web/records-sheet/index.js +2 -2
  230. package/dist/web/shop/index.cjs +1 -1
  231. package/dist/web/shop/index.d.cts +3 -3
  232. package/dist/web/shop/index.d.ts +3 -3
  233. package/dist/web/shop/index.js +15 -15
  234. package/dist/web/televet/booking/index.cjs +7 -7
  235. package/dist/web/televet/booking/index.d.cts +9 -9
  236. package/dist/web/televet/booking/index.d.ts +9 -9
  237. package/dist/web/televet/booking/index.js +69 -69
  238. package/dist/web/televet/call/index.cjs +1 -1
  239. package/dist/web/televet/call/index.d.cts +2 -2
  240. package/dist/web/televet/call/index.d.ts +2 -2
  241. package/dist/web/televet/call/index.js +1 -1
  242. package/dist/web/televet/index.cjs +6 -6
  243. package/dist/web/televet/index.js +1 -1
  244. package/dist/web/texting/index.cjs +1 -1
  245. package/dist/web/texting/index.d.cts +6 -6
  246. package/dist/web/texting/index.d.ts +6 -6
  247. package/dist/web/texting/index.js +1 -1
  248. package/dist/web/ui/index.cjs +1 -1
  249. package/dist/web/ui/index.js +32 -32
  250. package/package.json +1 -32
  251. package/dist/ErrorPolicyPort.d-68yrE3BE.d.ts +0 -23
  252. package/dist/ErrorPolicyPort.d-DirW9hgO.d.cts +0 -23
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
  "use strict";var e=require("react"),t=require("zod"),n=require("react/jsx-runtime");var r=["scheduled","in_progress","awaiting_summary","completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"],l=/* @__PURE__ */new Set(["completed","cancelled_owner","cancelled_ops","no_show_owner","no_show_vet"]),i=/* @__PURE__ */new Set(["scheduled","in_progress","awaiting_summary"]);function a(e){return i.has(e.status)}var o=["wellness","prescription"],s=60;function d(e){let t=Date.parse(e.startsAt),n=Date.parse(e.endsAt);if(Number.isNaN(t)||Number.isNaN(n))return null;let r=Math.round((n-t)/6e4);return r>0?Math.min(r,s):null}var u=64,c=2e3,p=10;function isWellFormedStateCode(e){return typeof e=="string"&&/^[A-Za-z]{2}$/.test(e.trim())}function f(e){return typeof e=="object"&&e!==null?e:null}function h(e){return typeof e=="string"&&e.length>0?e:null}function m(e){return typeof e=="string"&&e.trim().length>0?e.trim():null}function g(e,t){return typeof e=="boolean"?e:t}function b(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function y(e,t){return typeof t=="string"&&e.includes(t)?t:"unknown"}function v(e,t){if(!Array.isArray(e))/* @__PURE__ */return Object.freeze([]);let n=[];for(let r of e){let e=t(r);e!==null&&n.push(e)}/* @__PURE__ */
4
4
  return Object.freeze(n)}function x(e,t){let n=f(e);return n===null?null:/* @__PURE__ */Object.freeze({state:h(n.state)??t,wellnessAvailable:g(n.wellness_available,false),prescriptionsAvailable:g(n.prescriptions_available,false),cancellationPolicyText:m(n.cancellation_policy_text)})}function k(e){let t=f(e);if(t===null)return null;let n=m(t.summary),r=m(t.version);return n===null||r===null?null:/* @__PURE__ */Object.freeze({summary:n,version:r})}function w(e){let t=f(e);if(t===null)return null;let n=h(t.clinician_id),r=h(t.display_name);return n===null||r===null?null:/* @__PURE__ */Object.freeze({clinicianId:n,displayName:r,credentials:m(t.credentials_text),rating:b(t.rating),ratingCount:b(t.rating_count),bio:m(t.bio),photoRef:h(t.photo_ref),licensedStates:v(t.licensed_states,e=>{let t=f(e),n=t===null?null:h(t.state);return n===null?null:/* @__PURE__ */Object.freeze({state:n,canPrescribe:g(t?.can_prescribe,false)})}),role:T(t.clinician_role)})}function T(e){let t=h(e)?.trim().toLowerCase();return t==="vet"||t==="vet_tech"?t:null}function S(e){let t=f(e);if(t===null)return null;let n=h(t.slot_id),r=h(t.starts_at);return n===null||r===null?null:/* @__PURE__ */Object.freeze({slotId:n,startsAt:r,endsAt:h(t.ends_at)??r})}function C(e){let t=f(e);if(t===null)return null;let n=t.is_emergency===true,r=t.fallback===true;return n||r?/* @__PURE__ */Object.freeze({isEmergency:n,fallback:r}):t.is_emergency===false&&t.fallback===false?/* @__PURE__ */Object.freeze({isEmergency:false,fallback:false}):null}function j(e){let t=f(e);if(t===null)return null;let n=h(t.slot_id),r=h(t.hold_expires_at);return n===null||r===null?null:/* @__PURE__ */Object.freeze({slotId:n,expiresAt:r})}function _(e){let t=f(e);if(t===null)return null;let n=h(t.consult_id),l=h(t.scheduled_at);return n===null||l===null?null:/* @__PURE__ */Object.freeze({consultId:n,petId:h(t.pet_id)??"",clinicianId:h(t.clinician_id)??"",clinicianName:m(t.display_name),reasonText:m(t.reason_text),mediaRefs:v(t.media_refs,e=>h(e)),status:y(r,t.status),kind:y(o,t.kind),scheduledAt:l,emergencyFlagged:g(t.emergency_flagged,false),hasRoom:h(t.meeting_url)!==null})}function I(e){let t=f(e);/* @__PURE__ */
5
- return Object.freeze({active:g(t?.active,false)})}var E=240;function R(e){let t=f(e);if(t===null)return null;let n=b(t.fee_cents);return n===null||n<0?null:/* @__PURE__ */Object.freeze({feeCents:n,currency:h(t.currency)??"usd",feeRecorded:g(t.fee_recorded,n>0),summary:m(t.summary)})}function P(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e)}catch{}}function D(e){return(typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}function z(e,...t){if(typeof e=="function")try{let n=e(...t);return D(n)&&Promise.resolve(n).then(void 0,P),n}catch(e){P(e);return}}var F=/* @__PURE__ */new WeakMap;function A(e){if(typeof e!="function")return;let t=F.get(e);if(t!==void 0)return t;let n=(...t)=>{z(e,...t)};return F.set(e,n),n}function O(e,t){let n=null;for(let r of t){let t=e[r];typeof t=="function"&&(n??={...e},n[r]=A(t))}return n??e}function B(e,...t){let n;try{n=e(...t)}catch(e){return P(e),Promise.resolve({ok:false,error:e})}return Promise.resolve(n).then(e=>({ok:true,value:e}),e=>({ok:false,error:e}))}var L=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],N=/* @__PURE__ */Object.freeze(L.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(N.map(e=>e.wireCode));var M=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound"}),$=/* @__PURE__ */Object.freeze(N.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:M[e.wireCode]}))),W=new Map($.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),H=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set($.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...H]){let t=W.get(e+n);if(t)return t}}var V=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return V[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var U=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return U.has(e)}var q=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||q.has(e)}var K=500,Y=8e3,G=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(K*2**n,Y);return Math.floor(t()*r)}var J="This feature isn't available on your account right now.",X="Something in that request was not right. Check the details and try again.",Q=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:J,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:X,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:J,runtimeDisposed:X,unknown:"Something went wrong. Please try again."}),Z="This session has ended. Please sign in again.",ee="linked_account_read_only";function te(e,t,n){return e==="conflict"&&n===ee?J:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?Z:userFacingError(e)}function userFacingError(e){return Q[e]}function ne(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var re=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ee,l={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:te(e,t?.wireCode,r?ee:null)};t?.httpStatus!==void 0&&(l.httpStatus=t.httpStatus),t?.requestId&&(l.requestId=t.requestId),typeof t?.reasonCode=="string"&&re.test(t.reasonCode)&&(l.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(l.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&ne(l,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ne(l,"raw",t.raw),/* @__PURE__ */Object.freeze(l)}function ok(e,t){/* @__PURE__ */
5
+ return Object.freeze({active:g(t?.active,false)})}var E=240;function R(e){let t=f(e);if(t===null)return null;let n=b(t.fee_cents);return n===null||n<0?null:/* @__PURE__ */Object.freeze({feeCents:n,currency:h(t.currency)??"usd",feeRecorded:g(t.fee_recorded,n>0),summary:m(t.summary)})}function P(e){let t=globalThis.console;try{t?.error?.("[everfur] A host callback threw; the SDK ignored it.",e)}catch{}}function D(e){return(typeof e=="object"||typeof e=="function")&&e!==null&&typeof e.then=="function"}function z(e,...t){if(typeof e=="function")try{let n=e(...t);return D(n)&&Promise.resolve(n).then(void 0,P),n}catch(e){P(e);return}}var F=/* @__PURE__ */new WeakMap;function A(e){if(typeof e!="function")return;let t=F.get(e);if(t!==void 0)return t;let n=(...t)=>{z(e,...t)};return F.set(e,n),n}function O(e,t){let n=null;for(let r of t){let t=e[r];typeof t=="function"&&(n??={...e},n[r]=A(t))}return n??e}function B(e,...t){let n;try{n=e(...t)}catch(e){return P(e),Promise.resolve({ok:false,error:e})}return Promise.resolve(n).then(e=>({ok:true,value:e}),e=>({ok:false,error:e}))}var L=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],N=/* @__PURE__ */Object.freeze(L.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(N.map(e=>e.wireCode));var M=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),$=/* @__PURE__ */Object.freeze(N.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:M[e.wireCode]}))),W=new Map($.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),H=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set($.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...H]){let t=W.get(e+n);if(t)return t}}var V=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return V[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var U=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return U.has(e)}var q=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||q.has(e)}var K=500,Y=8e3,G=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(K*2**n,Y);return Math.floor(t()*r)}var J="This feature isn't available on your account right now.",X="Something in that request was not right. Check the details and try again.",Q=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:J,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:X,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:J,runtimeDisposed:X,unknown:"Something went wrong. Please try again."}),Z="This session has ended. Please sign in again.",ee="linked_account_read_only";function te(e,t,n){return e==="conflict"&&n===ee?J:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?Z:userFacingError(e)}function userFacingError(e){return Q[e]}function ne(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var re=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===ee,l={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:te(e,t?.wireCode,r?ee:null)};t?.httpStatus!==void 0&&(l.httpStatus=t.httpStatus),t?.requestId&&(l.requestId=t.requestId),typeof t?.reasonCode=="string"&&re.test(t.reasonCode)&&(l.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(l.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&ne(l,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&ne(l,"raw",t.raw),/* @__PURE__ */Object.freeze(l)}function ok(e,t){/* @__PURE__ */
6
6
  return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
7
7
  return Object.freeze({ok:false,error:e})}var le=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function assertNever(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}function errorFrame(e){/* @__PURE__ */
8
- return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var ie="x-everfur-anon-token",ae="anonTokenInvalid";async function oe(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function se(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[ie]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...de(e.headers),...authHeaders(t)}}}function de(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===ie||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await oe(t),r=await t.transport.request(withAuthHeaders(e,ue(t,n)));if(r.ok||pe(r.error.raw)!==ae||t.anonIdentity===void 0||t.userRef!==null)return r;let l=await t.anonIdentity.token({forceRefresh:true});return l===null||l===n?r:t.transport.request(withAuthHeaders(e,ue(t,l)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(se(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let l;try{l=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(se(e,{wireCode:pe(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:l,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(ce(i.error))):i}function ue(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function ce(e){let t=e.raw,n=pe(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function pe(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function fe(e,t){let n=globalThis.URL;if(typeof n=="function"){let r;try{r=t===void 0?new n(e):new n(e,t)}catch{return null}try{if(r.protocol)return r}catch{}}return be(e)}var he=/^([a-z][a-z0-9+.-]*):\/\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?(\[[0-9a-f:.]+\]|[\w.~-]+)(?::(\d*))?(\/[^?#]*)?(\?[^#]*)?(#.*)?$/i,me=/[\s\u0000-\u001f\u007f\\]/,ge={"http:":"80","https:":"443"};function be(e,t){let n=e.trim();let r=me.test(n)?null:he.exec(n);if(r===null)return null;let[,l="",i="",a="",o="",s="",d="",u="",c=""]=r,p=`${l.toLowerCase()}:`,f=Number(s);if(f>65535)return null;let h=s===""||String(f)===ge[p]?"":String(f),m=ge[p]!==void 0,g=o.toLowerCase()+(h&&`:${h}`),b=d||(m?"/":""),y=i||a?`${i}${a&&`:${a}`}@`:"";return{href:`${p}//${y}${g}${b}${u}${c}`,protocol:p,username:i,password:a,hostname:o.toLowerCase(),port:h,origin:m?`${p}//${g}`:"null",pathname:b,search:u==="?"?"":u,hash:c==="#"?"":c}}var ye="1.4.0";function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:ve(e)})}function ve(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var xe=3e4,ke=Y*2,we="idempotency-key",Te=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Se=/* @__PURE__ */Object.freeze({onEvent(){}}),Ce=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function je(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Se,n=e.timers??Ce,r=e.rng??Math.random,l=e.sleep??((e,t)=>We(e,n,t)),i=e.maxAttempts??G,a=e.unaryTimeoutMs??xe,o=e.newIdempotencyKey??Ie(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,u){let c=u?.maxAttempts,p=Math.max(1,c??i),f=u?.idempotent??Te.has(d.method),h=u?.idempotencyKey===void 0?null:je(u.idempotencyKey),m=f?h??o():null,g=_e(d,m),b=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:b,...m?{idempotencyKey:m}:{},...e});s(i({phase:"attempt"}));let o=Me(a,n),u=$e(o.signal,d.signal),f;try{f=await authedSend({...g,signal:u.signal},e.auth)}catch(e){f=err(networkError(e))}finally{u.dispose(),o.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=Re(h,b,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...c!==void 0?{perCallMaxAttempts:c}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await l(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);b+=1}}async function u(t){return withAuthHeaders(t,await Ne(e.auth))}async function*c(t,n,r){s(
8
+ return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var ie="x-everfur-anon-token",ae="anonTokenInvalid";async function oe(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function se(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[ie]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...de(e.headers),...authHeaders(t)}}}function de(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===ie||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await oe(t),r=await t.transport.request(withAuthHeaders(e,ue(t,n)));if(r.ok||pe(r.error.raw)!==ae||t.anonIdentity===void 0||t.userRef!==null)return r;let l=await t.anonIdentity.token({forceRefresh:true});return l===null||l===n?r:t.transport.request(withAuthHeaders(e,ue(t,l)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(se(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let l;try{l=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(se(e,{wireCode:pe(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:l,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(ce(i.error))):i}function ue(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function ce(e){let t=e.raw,n=pe(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function pe(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function fe(e,t){let n=globalThis.URL;if(typeof n=="function"){let r;try{r=t===void 0?new n(e):new n(e,t)}catch{return null}try{if(r.protocol)return r}catch{}}return be(e)}var he=/^([a-z][a-z0-9+.-]*):\/\/(?:([^:@/?#]*)(?::([^@/?#]*))?@)?(\[[0-9a-f:.]+\]|[\w.~-]+)(?::(\d*))?(\/[^?#]*)?(\?[^#]*)?(#.*)?$/i,me=/[\s\u0000-\u001f\u007f\\]/,ge={"http:":"80","https:":"443"};function be(e,t){let n=e.trim();let r=me.test(n)?null:he.exec(n);if(r===null)return null;let[,l="",i="",a="",o="",s="",d="",u="",c=""]=r,p=`${l.toLowerCase()}:`,f=Number(s);if(f>65535)return null;let h=s===""||String(f)===ge[p]?"":String(f),m=ge[p]!==void 0,g=o.toLowerCase()+(h&&`:${h}`),b=d||(m?"/":""),y=i||a?`${i}${a&&`:${a}`}@`:"";return{href:`${p}//${y}${g}${b}${u}${c}`,protocol:p,username:i,password:a,hostname:o.toLowerCase(),port:h,origin:m?`${p}//${g}`:"null",pathname:b,search:u==="?"?"":u,hash:c==="#"?"":c}}var ye="1.5.0";function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:ve(e)})}function ve(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var xe=3e4,ke=Y*2,we="idempotency-key",Te=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Se=/* @__PURE__ */Object.freeze({onEvent(){}}),Ce=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function je(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??Se,n=e.timers??Ce,r=e.rng??Math.random,l=e.sleep??((e,t)=>We(e,n,t)),i=e.maxAttempts??G,a=e.unaryTimeoutMs??xe,o=e.newIdempotencyKey??Ie(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,u){let c=u?.maxAttempts,p=Math.max(1,c??i),f=u?.idempotent??Te.has(d.method),h=u?.idempotencyKey===void 0?null:je(u.idempotencyKey),m=f?h??o():null,g=_e(d,m),b=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:b,...m?{idempotencyKey:m}:{},...e});s(i({phase:"attempt"}));let o=Me(a,n),u=$e(o.signal,d.signal),f;try{f=await authedSend({...g,signal:u.signal},e.auth)}catch(e){f=err(networkError(e))}finally{u.dispose(),o.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=Re(h,b,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...c!==void 0?{perCallMaxAttempts:c}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await l(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);b+=1}}async function u(t){return withAuthHeaders(t,await Ne(e.auth))}async function*c(t,n,r){s(
9
9
  /* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
10
10
  return Object.freeze({send:d,authorize:u,stream:c})}function _e(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==we&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function Ie(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var Ee=10;function Re(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=Pe(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let l=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(Ee,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let o=De(e,n.now);return o!==null?o>ke?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:l,delayMs:o}:{retry:true,reason:l,delayMs:backoffDelayMs(t,n.rng)}}function Pe(e){let t=e.code==="unknown"?fromWire(Be(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function De(e,t){let n=Fe(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=ze(e.raw);return r===null?null:Math.round(r*1e3)}function ze(e){for(let t of Ae(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function Fe(e){for(let t of Ae(e)){let e=t.resets_at,n=Oe(e);if(n!==null)return n}return null}function Ae(e){if(!Le(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];Le(r)&&t.push(r)}return t}function Oe(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function Be(e){for(let t of Ae(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function Le(e){return typeof e=="object"&&e!==null}async function Ne(e){if(e.mode==="anonymous"){let t=await oe(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function Me(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function $e(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let l=()=>r.abort();return e.addEventListener("abort",l,{once:true}),t.addEventListener("abort",l,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",l),t.removeEventListener("abort",l)}}}function We(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let l=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(l),r()};n?.addEventListener("abort",i,{once:true})})}function He(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(!(n>=56320&&n<=57343))return true;t+=1}else if(n>=56320&&n<=57343)return true}return false}function Ve(e){return[...e].length}var Ue=/* @__PURE__ */Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function canonicalPetSpecies(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(Ue,t)?Ue[t]:null}var qe=50,Ke=128,Ye=120,Ge=120,Je=2e3,Xe=120,Qe=80,Ze=/* @__PURE__ */new Set(["male","female","unknown"]),et=/* @__PURE__ */new Set(["day","month","year"]),tt=/* @__PURE__ */new Set(["low","medium","high","athletic"]),nt=/* @__PURE__ */new Set(["indoor","outdoor","both"]),rt=/* @__PURE__ */new Set(["mild","moderate","severe"]),lt=/^(\d{4})-(\d{2})-(\d{2})$/,it=[["sex","sex"],["spayedNeutered","spayed_neutered"],["birthDate","birth_date"],["birthDatePrecision","birth_date_precision"],["activityLevel","activity_level"],["indoorOutdoor","indoor_outdoor"],["foodBrand","food_brand"],["foodType","food_type"],["microchipId","microchip_id"]],at=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];/* @__PURE__ */Object.freeze([...it,...at].map(([e])=>e));function ot(e){let t=lt.exec(e);if(t===null)return false;let[n,r,l]=[Number(t[1]),Number(t[2]),Number(t[3])],i=new Date(Date.UTC(n,r-1,l));return i.getUTCFullYear()===n&&i.getUTCMonth()===r-1&&i.getUTCDate()===l}var st=e=>(t,n)=>typeof n=="string"&&e.has(n)?null:`${t} must be one of ${[...e].join(", ")}`,dt=(e,t)=>typeof t=="boolean"?null:`${e} must be true or false`,ut=(e,t)=>typeof t=="string"&&ot(t)?null:`${e} must be a real date written YYYY-MM-DD`,ct=(e,t={})=>(n,r)=>{if(typeof r!="string")return`${n} must be a string`;if(He(r))return`${n} contains an unpaired surrogate and cannot be encoded`;let l=t.trimmed?r.trim():r;if(t.required&&l.length===0)return`${n} is required and must not be blank`;let i=Ve(l);return i<=e?null:`${n} is ${i} characters; the server accepts at most ${e}`},pt={sex:st(Ze),spayedNeutered:dt,birthDate:ut,birthDatePrecision:st(et),activityLevel:st(tt),indoorOutdoor:st(nt),foodBrand:ct(Xe),foodType:ct(Xe),microchipId:ct(Qe)},ft=["ref","ref",false,ct(Ke,{required:true,trimmed:true})],ht=["notes","notes",false,ct(Je,{trimmed:true})],mt=[ft,["name","name",true,ct(Ye,{required:true,trimmed:true})],["dose","dose",false,ct(Ge,{trimmed:true})],["frequency","frequency",false,ct(Ge,{trimmed:true})],["startDate","start_date",false,ut],["endDate","end_date",false,ut],ht],gt={allergies:[ft,["allergen","allergen",true,ct(Ye,{required:true,trimmed:true})],["severity","severity",false,st(rt)],ht],medications:mt,supplements:mt,conditions:[ft,["conditionName","condition_name",true,ct(Ye,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,ut],ht]};function bt(e,t,n){let r=`${e}[${t}]`;if(typeof n!="object"||n===null||Array.isArray(n))return{error:`${r} must be an object`};let l=n,i={};for(let[t,n,a,o]of gt[e]){let e=l[t];if(e==null){if(a)return{error:`${r}.${t} is required`};e===null&&(i[n]=null);continue}let s=o(`${r}.${t}`,e);if(s!==null)return{error:s};i[n]=e}let a=i.start_date,o=i.end_date;return typeof a=="string"&&typeof o=="string"&&o<a?{error:`${r}.endDate must not be before startDate`}:{item:i}}function yt(e,t){if(!Array.isArray(t))return{error:`${e} must be an array (send [] to clear it)`};if(t.length>qe)return{error:`${e} has ${t.length} items; the server accepts at most ${qe}`};let n=[],r=/* @__PURE__ */new Set;for(let l=0;l<t.length;l+=1){let i=bt(e,l,t[l]);if("error"in i)return i;let a=i.item.ref;if(typeof a=="string"){let t=a.trim();if(r.has(t))return{error:`${e}: ref ${JSON.stringify(t)} is used twice; a ref names one item`};r.add(t)}n.push(i.item)}return{items:n}}function vt(e,t){let n=e,r={};for(let[e,t]of it){let l=n[e];if(l!==void 0){if(l!==null){let t=pt[e](e,l);if(t!==null)return{error:t}}r[t]=l}}let l=n.birthDate!==void 0,i=n.birthDatePrecision!==void 0;if(l!==i||l&&n.birthDate===null!=(n.birthDatePrecision===null))return{error:"birthDate and birthDatePrecision must be sent together, both set or both null"};for(let[e,t]of at){let l=n[e];if(l===void 0)continue;let i=yt(e,l);if("error"in i)return i;r[t]=i.items}return Object.keys(r).length>0&&t!==void 0&&canonicalPetSpecies(t)===null?{error:"health fields need a pet Everfur reads as a dog or a cat (dog, canine, k9, puppy, cat, feline, kitten)"}:{body:r}}var xt=e=>typeof e=="string"?e:null,kt=(e,t)=>typeof t=="string"&&e.has(t)?t:null,wt=e=>typeof e=="boolean"?e:null;function Tt(e,t){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.flatMap(e=>{if(typeof e!="object"||e===null||Array.isArray(e))return[];let n=t(e);return n===null?[]:[n]})):/* @__PURE__ */Object.freeze([])}function St(e){let t=xt(e.name);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:xt(e.ref),name:t,dose:xt(e.dose),frequency:xt(e.frequency),startDate:xt(e.start_date),endDate:xt(e.end_date),notes:xt(e.notes)})}function Ct(e){let t=e.profile_version;/* @__PURE__ */
11
11
  return Object.freeze({profileVersion:typeof t=="number"&&Number.isInteger(t)&&t>=0?t:0,sex:kt(Ze,e.sex),spayedNeutered:wt(e.spayed_neutered),birthDate:xt(e.birth_date),birthDatePrecision:kt(et,e.birth_date_precision),activityLevel:kt(tt,e.activity_level),indoorOutdoor:kt(nt,e.indoor_outdoor),foodBrand:xt(e.food_brand),foodType:xt(e.food_type),microchipId:xt(e.microchip_id),allergies:Tt(e.allergies,e=>{let t=xt(e.allergen);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:xt(e.ref),allergen:t,severity:kt(rt,e.severity),notes:xt(e.notes)})}),medications:Tt(e.medications,St),supplements:Tt(e.supplements,St),conditions:Tt(e.conditions,e=>{let t=xt(e.condition_name);return t===null||t.length===0?null:/* @__PURE__ */Object.freeze({ref:xt(e.ref),conditionName:t,diagnosedDate:xt(e.diagnosed_date),notes:xt(e.notes)})})})}var jt=100,_t=50,It=100,Et=50,Rt=500,Pt=128,Dt=6e4;function zt(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e})}function Ft(e,t,n){if(typeof t!="string")return zt(`${e} must be a string`);let r=Ve(t);return r<=n?null:zt(`${e} is ${r} characters; the server accepts at most ${n}`)}function At(e,t,n){return typeof t=="number"&&Number.isFinite(t)&&t>=0&&t<=n?null:zt(`${e} must be a finite number between 0 and ${n}`)}function Ot(petRef,e){if(typeof petRef!="string")return zt("pet_ref must be a string");if(petRef.trim().length===0)return zt("pet_ref must not be blank");if(He(petRef))return zt("pet_ref contains an unpaired surrogate and cannot be encoded");if(e!=null&&typeof e!="object")return zt("profile must be an object");let t=[Ft("pet_ref",petRef,Pt)];return e?.name!==void 0&&t.push(Ft("name",e.name,jt)),e?.species!==void 0&&t.push(Ft("species",e.species,_t)),e?.breed!==void 0&&t.push(Ft("breed",e.breed,It)),e?.ageYears!==void 0&&t.push(At("age_years",e.ageYears,Et)),e?.weightKg!==void 0&&t.push(At("weight_kg",e.weightKg,Rt)),t.find(e=>e!==null)??null}function Bt(e,t){let n=vt(e,t);return"error"in n?{error:zt(n.error)}:n}function Lt(e){if(typeof e!="object"||e===null)return{error:zt("patch must be an object")};let t=e,n=[["name","name",e=>Ft("name",e,jt)],["species","species",e=>Ft("species",e,_t)],["breed","breed",e=>Ft("breed",e,It)],["ageYears","age_years",e=>At("age_years",e,Et)],["weightKg","weight_kg",e=>At("weight_kg",e,Rt)]],r={};for(let[e,l,i]of n){let n=t[e];if(n!==void 0){if(n!==null){let e=i(n);if(e!==null)return{error:e}}r[l]=n}}let l=Bt(t,t.species);return"error"in l?l:(Object.assign(r,l.body),Object.keys(r).length===0?{error:zt("patch must change at least one field")}:{body:r})}function Nt(e){if(e==null)return{body:{}};let t=Bt(e,e.species);return"error"in t?t:{body:{...e.name!==void 0?{name:e.name}:{},...e.species!==void 0?{species:e.species}:{},...e.breed!==void 0?{breed:e.breed}:{},...e.ageYears!==void 0?{age_years:e.ageYears}:{},...e.weightKg!==void 0?{weight_kg:e.weightKg}:{},...t.body}}}var Mt=e=>typeof e=="string"?e:null,$t=e=>typeof e=="number"&&Number.isFinite(e)?e:null;function Wt(e,petRef){let t=typeof e=="object"&&e!==null?e:{};/* @__PURE__ */
@@ -80,14 +80,14 @@ return n.jsxs("div",{"data-testid":"televet-booking-not-entitled",style:r.list,c
80
80
  /* @__PURE__ */n.jsxs("div",{"data-testid":"televet-booking-state-blocked",children:[
81
81
  /* @__PURE__ */n.jsx(TelevetStateCard,{title:Ai.stateBlockedTitle}),
82
82
  /* @__PURE__ */n.jsx(TelevetStateInterestAction,{action:i,testIDPrefix:"televet-state-interest-state-blocked"})]}):h==="reason"&&f?/* @__PURE__ */n.jsx(TelevetEarlyEmergency,{...t!==void 0?{petName:t}:{},...r?{primaryVet:r}:{},onFindEmergencyVet:l,onContinue:o}):null}function ga(e){return e.noState?true:e.isPending||e.isError?false:e.isEmpty||e.notEntitled}function TelevetClinicianOutcome({state:e,cause:t,locationStatus:r,onRequestLocation:l,onRetry:i,stateInterest:a=null,renderUnavailable:o}){return e.noState?
83
- /* @__PURE__ */n.jsx("div",{"data-testid":"televet-booking-location-unknown",children:/* @__PURE__ */n.jsx(TelevetStateCard,{title:r==="blocked"?Ai.locationBlockedTitle:r==="unavailable"?Ai.locationUnavailableTitle:Ai.locationUnknownTitle,message:r==="blocked"?Ai.locationBlockedBody:r==="unavailable"?Ai.locationUnavailableBody:Ai.locationUnknownBody,actionLabel:l&&r!=="blocked"?Ai.locationUnknownCta:void 0,onAction:r==="blocked"?void 0:l})}):e.isEmpty?/* @__PURE__ */n.jsx(TelevetClinicianEmptyState,{cause:t,onRetry:i,stateInterest:a}):/* @__PURE__ */n.jsx(EntitlementPausedState,{...o?{renderUnavailable:o}:{}})}function ba(e){return e.trim().replace(/^dr\.?\s+/i,"").slice(0,1).toUpperCase()}function parseColor(e){let t=ya(e);return t===null?null:Ca(t)}function ya(e){if(typeof e=="number")return ka(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return va(t.slice(1));if(t.toLowerCase().startsWith("0x"))return va(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return xa(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=va(t);if(e!==null)return e}return/^\d+$/.test(t)?ka(Number.parseInt(t,10)):null}function va(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Ta(t[0]),g:Ta(t[1]),b:Ta(t[2]),a:1};if(t.length===6)return{r:wa(t,0),g:wa(t,2),b:wa(t,4),a:1};if(t.length===8){let e=wa(t,0);return{r:wa(t,2),g:wa(t,4),b:wa(t,6),a:e/255}}return null}function xa(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let l=Sa(Number(r[0])),i=Sa(Number(r[1])),a=Sa(Number(r[2]));if(l===null||i===null||a===null)return null;let o=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;o=Math.min(1,Math.max(0,e))}return{r:l,g:i,b:a,a:o}}function ka(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function wa(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Ta(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Sa(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Ca(e){if(e.a>=1)return ja(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function ja(e,t,n){return`#${_a(e)}${_a(t)}${_a(n)}`.toUpperCase()}function _a(e){return e.toString(16).padStart(2,"0")}function Ia(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Ea(e,t){let n=ya(e),r=ya(t);if(n===null||r===null)return null;let l=n.a>=1?n:Ia(n,{...r});return ja(l.r,l.g,l.b)}function Ra(e,t){let n=ya(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Pa=.22,Da=.5,za="#FFC3BC";function Fa(e){let t=e.color;return{ink:t.brandInk,text:t.text.primary,muted:t.text.muted,line:t.borderRingCream,mist:t.surfaceSubtle,surface:t.surface,pink:t.highlight,onPink:t.onHighlight,go:t.mark,alert:t.danger,alertWash:t.badgeBgCritical}}function Aa(e){let t=e.color,n=parseColor(t.highlight)===za,r=Ra(t.highlight,n?Pa:Da);return{...Fa(e),pinkSoft:(r===null?null:Ea(r,t.surface))??t.surface}}function televetConsultCalendarKey(e){return`televet-consult-${e}`}function TelevetBookedScreen({consult:t,petName:r,onDone:l,onAddToCalendar:i,canJoinInApp:a=false,lengthMinutes:o,sharedRecords:s=false,sentPhoto:d=false}){let u=useEverfurTheme(),c=sa(),p=e.useMemo(()=>Oa(u),[u]),f=`${e.useId()}-booked-title`,h=Ni(Wi()),[m,g]=e.useState("idle"),b=async()=>{if(!i)return;g("saving");let e=new Date(t.scheduledAt);if(Number.isNaN(e.getTime())){g("failed");return}let n=typeof o=="number"&&Number.isFinite(o)&&o>0?o:vn,r=await B(i,{key:televetConsultCalendarKey(t.consultId),title:Ai.visit.title,startDate:e,endDate:new Date(e.getTime()+n*6e4),alarmOffsetMinutes:-30});if(!r.ok){g("failed");return}g(r.value===true?"saved":r.value==="handed-off"?"idle":"failed")},y=[Ai.booked.remindPromise,s&&t.clinicianName?tn(d?Ai.booked.recordsPhotoPromiseTemplate:Ai.booked.recordsPromiseTemplate,{pet:r??Ai.petFallback,vet:t.clinicianName}):tn(Ai.booked.summaryPromise,{pet:r??""}),...a?[Ai.booked.joinPromise]:[]];if(!isTelevetBookingCopyReady())/* @__PURE__ */
84
- return n.jsx("div",{style:p.screen,"data-testid":"televet-booked-copy-unapproved"});let v=t.clinicianName?.trim()??"";/* @__PURE__ */
83
+ /* @__PURE__ */n.jsx("div",{"data-testid":"televet-booking-location-unknown",children:/* @__PURE__ */n.jsx(TelevetStateCard,{title:r==="blocked"?Ai.locationBlockedTitle:r==="unavailable"?Ai.locationUnavailableTitle:Ai.locationUnknownTitle,message:r==="blocked"?Ai.locationBlockedBody:r==="unavailable"?Ai.locationUnavailableBody:Ai.locationUnknownBody,actionLabel:l&&r!=="blocked"?Ai.locationUnknownCta:void 0,onAction:r==="blocked"?void 0:l})}):e.isEmpty?/* @__PURE__ */n.jsx(TelevetClinicianEmptyState,{cause:t,onRetry:i,stateInterest:a}):/* @__PURE__ */n.jsx(EntitlementPausedState,{...o?{renderUnavailable:o}:{}})}function ba(e){return e.trim().replace(/^dr\.?\s+/i,"").slice(0,1).toUpperCase()}function parseColor(e){let t=ya(e);return t===null?null:Ca(t)}function ya(e){if(typeof e=="number")return ka(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return va(t.slice(1));if(t.toLowerCase().startsWith("0x"))return va(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return xa(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=va(t);if(e!==null)return e}return/^\d+$/.test(t)?ka(Number.parseInt(t,10)):null}function va(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:Ta(t[0]),g:Ta(t[1]),b:Ta(t[2]),a:1};if(t.length===6)return{r:wa(t,0),g:wa(t,2),b:wa(t,4),a:1};if(t.length===8){let e=wa(t,0);return{r:wa(t,2),g:wa(t,4),b:wa(t,6),a:e/255}}return null}function xa(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let l=Sa(Number(r[0])),i=Sa(Number(r[1])),a=Sa(Number(r[2]));if(l===null||i===null||a===null)return null;let o=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;o=Math.min(1,Math.max(0,e))}return{r:l,g:i,b:a,a:o}}function ka(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function wa(e,t){return Number.parseInt(e.slice(t,t+2),16)}function Ta(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Sa(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Ca(e){if(e.a>=1)return ja(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function ja(e,t,n){return`#${_a(e)}${_a(t)}${_a(n)}`.toUpperCase()}function _a(e){return e.toString(16).padStart(2,"0")}function Ia(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Ea(e,t){let n=ya(e),r=ya(t);if(n===null||r===null)return null;let l=n.a>=1?n:Ia(n,{...r});return ja(l.r,l.g,l.b)}function Ra(e,t){let n=ya(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Pa=.22,Da=.5,za="#FFC3BC";function Fa(e){let t=e.color;return{ink:t.brandInk,text:t.text.primary,muted:t.text.muted,line:t.borderRingCream,mist:t.surfaceSubtle,surface:t.surface,pink:t.highlight,onPink:t.onHighlight,go:t.mark,alert:t.danger,alertWash:t.badgeBgCritical}}function Aa(e){let t=e.color,n=parseColor(t.highlight)===za,r=Ra(t.highlight,n?Pa:Da);return{...Fa(e),pinkSoft:(r===null?null:Ea(r,t.surface))??t.surface}}function televetConsultCalendarKey(e){return`televet-consult-${e}`}function TelevetBookedScreen({consult:t,petName:r,onDone:l,onAddToCalendar:i,canJoinInApp:a=false,lengthMinutes:o,sharedRecords:s=false,sentPhoto:d=false}){let u=useEverfurTheme(),c=sa(),p=e.useMemo(()=>Oa(u),[u]),f=`${e.useId()}-booked-title`,h=Ni(Wi()),[m,g]=e.useState("idle"),b=async()=>{if(!i)return;g("saving");let e=new Date(t.scheduledAt);if(Number.isNaN(e.getTime())){g("failed");return}let n=typeof o=="number"&&Number.isFinite(o)&&o>0?o:vn,r=await B(i,{key:televetConsultCalendarKey(t.consultId),title:Ai.visit.title,startDate:e,endDate:new Date(e.getTime()+n*6e4),alarmOffsetMinutes:-30});if(!r.ok){g("failed");return}g(r.value===true?"saved":r.value==="handed-off"?"idle":"failed")},y=r?.trim()||Ai.petFallback.charAt(0).toUpperCase()+Ai.petFallback.slice(1),v=[Ai.booked.remindPromise,s&&t.clinicianName?tn(d?Ai.booked.recordsPhotoPromiseTemplate:Ai.booked.recordsPromiseTemplate,{pet:y,vet:t.clinicianName}):tn(Ai.booked.summaryPromise,{pet:y}),...a?[Ai.booked.joinPromise]:[]];if(!isTelevetBookingCopyReady())/* @__PURE__ */
84
+ return n.jsx("div",{style:p.screen,"data-testid":"televet-booked-copy-unapproved"});let x=t.clinicianName?.trim()??"";/* @__PURE__ */
85
85
  return n.jsxs("section",{style:p.screen,"aria-labelledby":f,"data-testid":"televet-booked",children:[
86
- /* @__PURE__ */n.jsx("div",{"aria-hidden":"true",style:p.avatar,children:v.length>0?ba(v):null}),
87
- /* @__PURE__ */n.jsx(h,{id:f,style:p.title,children:v.length>0?tn(Ai.bookedTitleTemplate,{vet:v}):Ai.bookedTitle}),
86
+ /* @__PURE__ */n.jsx("div",{"aria-hidden":"true",style:p.avatar,children:x.length>0?ba(x):null}),
87
+ /* @__PURE__ */n.jsx(h,{id:f,style:p.title,children:x.length>0?tn(Ai.bookedTitleTemplate,{vet:x}):Ai.bookedTitle}),
88
88
  /* @__PURE__ */n.jsx("p",{style:p.when,children:r?/* @__PURE__ */n.jsxs(n.Fragment,{children:[
89
89
  /* @__PURE__ */n.jsx("time",{dateTime:t.scheduledAt,children:_n(t.scheduledAt)}),tn(Ai.bookedLeadTemplate,{when:"",pet:r})]}):/* @__PURE__ */n.jsx("time",{dateTime:t.scheduledAt,children:_n(t.scheduledAt)})}),
90
- /* @__PURE__ */n.jsx("section",{"aria-label":Ai.booked.stepsLabel,style:p.card,children:/* @__PURE__ */n.jsx("ol",{style:p.steps,"data-testid":"televet-booked-steps",children:y.map((e,t)=>/* @__PURE__ */n.jsxs("li",{style:{...p.step,...t===y.length-1?p.stepLast:null},children:[
90
+ /* @__PURE__ */n.jsx("section",{"aria-label":Ai.booked.stepsLabel,style:p.card,children:/* @__PURE__ */n.jsx("ol",{style:p.steps,"data-testid":"televet-booked-steps",children:v.map((e,t)=>/* @__PURE__ */n.jsxs("li",{style:{...p.step,...t===v.length-1?p.stepLast:null},children:[
91
91
  /* @__PURE__ */n.jsx("span",{"aria-hidden":"true",style:p.stepNumber,children:String(t+1).padStart(2,"0")}),
92
92
  /* @__PURE__ */n.jsx("span",{style:p.stepText,children:e.trim()})]},e))})}),
93
93
  /* @__PURE__ */n.jsxs("div",{style:p.actions,children:[i?/* @__PURE__ */n.jsx(TelevetButton,{label:m==="saved"?Ai.booked.calendarAdded:Ai.addToCalendarCta,kind:"secondary",size:"lg",fullWidth:false,loading:m==="saving",disabled:m==="saving"||m==="saved",onPress:()=>{b()},testID:"televet-booked-calendar"}):null,
@@ -2,22 +2,22 @@
2
2
  import { ReactNode, CSSProperties } from 'react';
3
3
  import { P as PetRef } from '../../../ids.d-B2GAAifq.cjs';
4
4
  export { B as Brand, _ as __brand } from '../../../ids.d-B2GAAifq.cjs';
5
- import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy.d-B39JAmIZ.cjs';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aT as TelevetJoinBlock, aU as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UpcomingTelevetVisitState, I as UseVetThreadOptions, V as VET_MESSAGES_COPY, J as VET_MESSAGE_CONTENT_MAX, K as VET_MESSAGE_PAGE_DEFAULT, L as VET_MESSAGE_PAGE_MAX, M as VetMessage, O as VetMessagePage, P as VetMessageRole, Q as VetMessagesAvailability, R as VetSendFailure, S as VetThread, W as VetThreadState, X as VetThreadsState, Y as VisitSummary, Z as VisitSummaryMedication, _ as VisitSummaryState, $ as attestation, a0 as canConfirm, a1 as canManageTelevetVisit, a2 as createTelevetBookingController, a3 as currentStep, a4 as emptyTelevetDraft, a5 as formatVisitRange, a6 as formatWhen, a7 as formatWhenWithDay, a8 as hasPreviousStep, a9 as initialTelevetBookingState, aa as isHoldExpired, ab as isMediaShortfallEmpty, ac as isSkipped, ad as isTelevetBookingCopyReady, ae as isVetMessagesDark, af as isVetThreadVetFirst, ag as mediaShortfallFromUnsentPicks, ah as splitTelevetVisits, ai as televetBookingKey, aj as televetBookingReducer, ak as televetBookingRefusal, al as televetCancelCall, am as televetConsultCall, an as televetEmptyRosterCause, ao as televetEmptyRosterView, ap as televetHoldCall, aq as televetJoinCall, aV as televetJoinDecision, ar as televetJoinOpensAtMs, at as televetMediaShortfallLines, au as televetRescheduleCall, av as televetThreadMessagesCall, aw as televetThreadReadCall, ax as televetVisitSummaryCall, ay as useEarlyTriage, az as useStateInterest, aA as useTelevetBookConsult, aB as useTelevetBookingAvailable, aC as useTelevetBookingController, aD as useTelevetBookingEntitlement, aE as useTelevetCancellationPolicy, aF as useTelevetClinicians, aG as useTelevetHoldSlot, aH as useTelevetJoin, aI as useTelevetNextSlot, aJ as useTelevetRescheduleConsult, aK as useTelevetSlots, aL as useTelevetStatePolicy, aM as useUpcomingTelevetVisit, aN as useVetThread, aO as useVetThreads, aP as useVisitSummary, aQ as validateBookingBody, aR as vetThreadPetRef, aS as withUnsentPicks } from '../../../bookingCopy.d-B39JAmIZ.cjs';
5
+ import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy.d-rnBSqOSN.cjs';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aT as TelevetJoinBlock, aU as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UpcomingTelevetVisitState, I as UseVetThreadOptions, V as VET_MESSAGES_COPY, J as VET_MESSAGE_CONTENT_MAX, K as VET_MESSAGE_PAGE_DEFAULT, L as VET_MESSAGE_PAGE_MAX, M as VetMessage, O as VetMessagePage, P as VetMessageRole, Q as VetMessagesAvailability, R as VetSendFailure, S as VetThread, W as VetThreadState, X as VetThreadsState, Y as VisitSummary, Z as VisitSummaryMedication, _ as VisitSummaryState, $ as attestation, a0 as canConfirm, a1 as canManageTelevetVisit, a2 as createTelevetBookingController, a3 as currentStep, a4 as emptyTelevetDraft, a5 as formatVisitRange, a6 as formatWhen, a7 as formatWhenWithDay, a8 as hasPreviousStep, a9 as initialTelevetBookingState, aa as isHoldExpired, ab as isMediaShortfallEmpty, ac as isSkipped, ad as isTelevetBookingCopyReady, ae as isVetMessagesDark, af as isVetThreadVetFirst, ag as mediaShortfallFromUnsentPicks, ah as splitTelevetVisits, ai as televetBookingKey, aj as televetBookingReducer, ak as televetBookingRefusal, al as televetCancelCall, am as televetConsultCall, an as televetEmptyRosterCause, ao as televetEmptyRosterView, ap as televetHoldCall, aq as televetJoinCall, aV as televetJoinDecision, ar as televetJoinOpensAtMs, at as televetMediaShortfallLines, au as televetRescheduleCall, av as televetThreadMessagesCall, aw as televetThreadReadCall, ax as televetVisitSummaryCall, ay as useEarlyTriage, az as useStateInterest, aA as useTelevetBookConsult, aB as useTelevetBookingAvailable, aC as useTelevetBookingController, aD as useTelevetBookingEntitlement, aE as useTelevetCancellationPolicy, aF as useTelevetClinicians, aG as useTelevetHoldSlot, aH as useTelevetJoin, aI as useTelevetNextSlot, aJ as useTelevetRescheduleConsult, aK as useTelevetSlots, aL as useTelevetStatePolicy, aM as useUpcomingTelevetVisit, aN as useVetThread, aO as useVetThreads, aP as useVisitSummary, aQ as validateBookingBody, aR as vetThreadPetRef, aS as withUnsentPicks } from '../../../bookingCopy.d-rnBSqOSN.cjs';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, c as TelevetSlot } from '../../../televetGlobal.d-gZrXPaLl.cjs';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, b as TelevetCancelReceipt, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../../televetGlobal.d-gZrXPaLl.cjs';
9
9
  import { a as TelevetMediaPicker, T as TelevetCalendarWriter, b as TelevetPrimaryVet } from '../../../IntakeMedia.d-LRXO38_z.cjs';
10
10
  export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCalendarEvent, g as TelevetEmergencyExits, h as TelevetEmergencyExitsProps, i as TelevetIntakeMedia, d as TelevetIntakeMediaItem, j as TelevetIntakeMediaProps, t as televetConsultCalendarKey } from '../../../IntakeMedia.d-LRXO38_z.cjs';
11
11
  import { V as VetVisitIntent } from '../../../visitIntent.d-CY7mrflo.cjs';
12
12
  import { n as EverfurTheme } from '../../../tokens.d-DDiPRgye.cjs';
13
- export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom.d-B1DoYdJe.cjs';
13
+ export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom.d-9Dm7XnUr.cjs';
14
14
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError.d-8NHtlgzA.cjs';
15
15
  export { E as EverfurResult } from '../../../EverfurResult.d-BFH-3s6E.cjs';
16
- export { W as WidgetPet } from '../../../petsRepository.d-DB5CNKsK.cjs';
17
- import '../../../requestFunnel.d-SySe6xHp.cjs';
18
- import '../../../ErrorPolicyPort.d-DirW9hgO.cjs';
19
- import '../../../config.d-BiVy0fLx.cjs';
20
- import '../../../identity.d-DIH9h3Le.cjs';
16
+ export { W as WidgetPet } from '../../../petsRepository.d-ai_tZ3lu.cjs';
17
+ import '../../../requestFunnel.d-BwZDfWVD.cjs';
18
+ import '../../../ErrorPolicyPort.d-BIdmYQnk.cjs';
19
+ import '../../../config.d-ClAI2RZ6.cjs';
20
+ import '../../../identity.d-DDpXOtas.cjs';
21
21
  import '../../../TelemetryPort.d-BDNr00hu.cjs';
22
22
  import '../../../profile.d-CSs1wlXT.cjs';
23
23
 
@@ -128,7 +128,7 @@ interface EverfurTelevetBookingProps {
128
128
  * ABSENT MEANS THE CONTROL DOES NOT RENDER. `POST /widget/v1/televet/state-interest` does not exist on the
129
129
  * partner plane, and the consumer WEB app already refused to ship this button over an unreachable write
130
130
  * for the same reason on its own pre-signup funnel: "the button would 401 for every visitor who pressed
131
- * it" (everfur-frontend StateUnavailableNotice.tsx:34-41).
131
+ * it" (the consumer web app StateUnavailableNotice.tsx:34-41).
132
132
  */
133
133
  readonly onStateInterest?: TelevetStateInterestWrite;
134
134
  /**
@@ -2,22 +2,22 @@
2
2
  import { ReactNode, CSSProperties } from 'react';
3
3
  import { P as PetRef } from '../../../ids.d-B2GAAifq.js';
4
4
  export { B as Brand, _ as __brand } from '../../../ids.d-B2GAAifq.js';
5
- import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy.d-ITpabqPr.js';
6
- export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aT as TelevetJoinBlock, aU as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UpcomingTelevetVisitState, I as UseVetThreadOptions, V as VET_MESSAGES_COPY, J as VET_MESSAGE_CONTENT_MAX, K as VET_MESSAGE_PAGE_DEFAULT, L as VET_MESSAGE_PAGE_MAX, M as VetMessage, O as VetMessagePage, P as VetMessageRole, Q as VetMessagesAvailability, R as VetSendFailure, S as VetThread, W as VetThreadState, X as VetThreadsState, Y as VisitSummary, Z as VisitSummaryMedication, _ as VisitSummaryState, $ as attestation, a0 as canConfirm, a1 as canManageTelevetVisit, a2 as createTelevetBookingController, a3 as currentStep, a4 as emptyTelevetDraft, a5 as formatVisitRange, a6 as formatWhen, a7 as formatWhenWithDay, a8 as hasPreviousStep, a9 as initialTelevetBookingState, aa as isHoldExpired, ab as isMediaShortfallEmpty, ac as isSkipped, ad as isTelevetBookingCopyReady, ae as isVetMessagesDark, af as isVetThreadVetFirst, ag as mediaShortfallFromUnsentPicks, ah as splitTelevetVisits, ai as televetBookingKey, aj as televetBookingReducer, ak as televetBookingRefusal, al as televetCancelCall, am as televetConsultCall, an as televetEmptyRosterCause, ao as televetEmptyRosterView, ap as televetHoldCall, aq as televetJoinCall, aV as televetJoinDecision, ar as televetJoinOpensAtMs, at as televetMediaShortfallLines, au as televetRescheduleCall, av as televetThreadMessagesCall, aw as televetThreadReadCall, ax as televetVisitSummaryCall, ay as useEarlyTriage, az as useStateInterest, aA as useTelevetBookConsult, aB as useTelevetBookingAvailable, aC as useTelevetBookingController, aD as useTelevetBookingEntitlement, aE as useTelevetCancellationPolicy, aF as useTelevetClinicians, aG as useTelevetHoldSlot, aH as useTelevetJoin, aI as useTelevetNextSlot, aJ as useTelevetRescheduleConsult, aK as useTelevetSlots, aL as useTelevetStatePolicy, aM as useUpcomingTelevetVisit, aN as useVetThread, aO as useVetThreads, aP as useVisitSummary, aQ as validateBookingBody, aR as vetThreadPetRef, aS as withUnsentPicks } from '../../../bookingCopy.d-ITpabqPr.js';
5
+ import { c as TelevetBookingStep, d as TelevetBookingContext, e as TelevetBookingController, f as TelevetTriageRead, g as TelevetStateInterestWrite, T as TelevetEmptyRosterCause, a as TelevetStateInterestAction$1, b as TelevetMediaShortfall, h as TelevetVetThreadTarget, i as TelevetDayPeriod } from '../../../bookingCopy.d-BuDv16WP.js';
6
+ export { C as CONSULT_MINUTES, N as NO_MEDIA_SHORTFALL, j as TELEVET_BOOKING_BASE, k as TELEVET_BOOKING_COPY, l as TELEVET_BOOKING_STEPS, m as TELEVET_CONSULT_PAGE_LIMIT, n as TELEVET_JOIN_CLOSES_MINUTES_AFTER, o as TELEVET_JOIN_OPENS_MINUTES_BEFORE, p as TELEVET_MESSAGE_THREADS_PATH, q as TelevetAttachmentMeta, r as TelevetAttachmentPolicy, s as TelevetBookingAction, t as TelevetBookingControllerDeps, u as TelevetBookingCopy, v as TelevetBookingDraft, w as TelevetBookingFailure, x as TelevetBookingRefusal, y as TelevetBookingState, z as TelevetEarlyTriage, A as TelevetEmptyRosterView, aT as TelevetJoinBlock, aU as TelevetJoinDecision, D as TelevetJoinState, E as TelevetMediaRefusal, F as TelevetRead, G as TelevetStateInterestReason, H as TelevetWrite, U as UpcomingTelevetVisitState, I as UseVetThreadOptions, V as VET_MESSAGES_COPY, J as VET_MESSAGE_CONTENT_MAX, K as VET_MESSAGE_PAGE_DEFAULT, L as VET_MESSAGE_PAGE_MAX, M as VetMessage, O as VetMessagePage, P as VetMessageRole, Q as VetMessagesAvailability, R as VetSendFailure, S as VetThread, W as VetThreadState, X as VetThreadsState, Y as VisitSummary, Z as VisitSummaryMedication, _ as VisitSummaryState, $ as attestation, a0 as canConfirm, a1 as canManageTelevetVisit, a2 as createTelevetBookingController, a3 as currentStep, a4 as emptyTelevetDraft, a5 as formatVisitRange, a6 as formatWhen, a7 as formatWhenWithDay, a8 as hasPreviousStep, a9 as initialTelevetBookingState, aa as isHoldExpired, ab as isMediaShortfallEmpty, ac as isSkipped, ad as isTelevetBookingCopyReady, ae as isVetMessagesDark, af as isVetThreadVetFirst, ag as mediaShortfallFromUnsentPicks, ah as splitTelevetVisits, ai as televetBookingKey, aj as televetBookingReducer, ak as televetBookingRefusal, al as televetCancelCall, am as televetConsultCall, an as televetEmptyRosterCause, ao as televetEmptyRosterView, ap as televetHoldCall, aq as televetJoinCall, aV as televetJoinDecision, ar as televetJoinOpensAtMs, at as televetMediaShortfallLines, au as televetRescheduleCall, av as televetThreadMessagesCall, aw as televetThreadReadCall, ax as televetVisitSummaryCall, ay as useEarlyTriage, az as useStateInterest, aA as useTelevetBookConsult, aB as useTelevetBookingAvailable, aC as useTelevetBookingController, aD as useTelevetBookingEntitlement, aE as useTelevetCancellationPolicy, aF as useTelevetClinicians, aG as useTelevetHoldSlot, aH as useTelevetJoin, aI as useTelevetNextSlot, aJ as useTelevetRescheduleConsult, aK as useTelevetSlots, aL as useTelevetStatePolicy, aM as useUpcomingTelevetVisit, aN as useVetThread, aO as useVetThreads, aP as useVisitSummary, aQ as validateBookingBody, aR as vetThreadPetRef, aS as withUnsentPicks } from '../../../bookingCopy.d-BuDv16WP.js';
7
7
  import { T as TelevetConsult, E as EverfurTelevetFlowRequest, c as TelevetSlot } from '../../../televetGlobal.d-DkJkV55Y.js';
8
8
  export { C as CANCELLATION_POLICY_VERSION_MAX, d as CANCEL_REASON_MAX, e as CONSULT_KINDS, f as CONSULT_STATUSES, g as ConsultKind, h as ConsultStatus, M as MEDIA_REFS_MAX, R as REASON_TEXT_MAX, i as TERMINAL_CONSULT_STATUSES, j as TelevetBookingBody, k as TelevetBookingEntitlement, b as TelevetCancelReceipt, l as TelevetCancellationPolicy, m as TelevetClinician, n as TelevetSlotHold, o as TelevetStatePolicy, p as TelevetTriageVerdict, q as isWellFormedStateCode } from '../../../televetGlobal.d-DkJkV55Y.js';
9
9
  import { a as TelevetMediaPicker, T as TelevetCalendarWriter, b as TelevetPrimaryVet } from '../../../IntakeMedia.d-CwSkSLNM.js';
10
10
  export { e as TelevetBookedScreen, f as TelevetBookedScreenProps, c as TelevetCalendarEvent, g as TelevetEmergencyExits, h as TelevetEmergencyExitsProps, i as TelevetIntakeMedia, d as TelevetIntakeMediaItem, j as TelevetIntakeMediaProps, t as televetConsultCalendarKey } from '../../../IntakeMedia.d-CwSkSLNM.js';
11
11
  import { V as VetVisitIntent } from '../../../visitIntent.d-CY7mrflo.js';
12
12
  import { n as EverfurTheme } from '../../../tokens.d-DDiPRgye.js';
13
- export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom.d-Dqm1rUqT.js';
13
+ export { b as VetCallCredential, c as VetCallJoinRefusal, d as VetCallLimits, p as parseVetCallCredential, v as vetCallJoinReason, e as vetCallJoinRefusal } from '../../../callRoom.d-t-khijDv.js';
14
14
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../../EverfurError.d-8NHtlgzA.js';
15
15
  export { E as EverfurResult } from '../../../EverfurResult.d-D_-254ZY.js';
16
- export { W as WidgetPet } from '../../../petsRepository.d-iHrHkXM2.js';
17
- import '../../../requestFunnel.d-CehftayS.js';
18
- import '../../../ErrorPolicyPort.d-68yrE3BE.js';
19
- import '../../../config.d-DRoQ2lAx.js';
20
- import '../../../identity.d-DOKJFaiz.js';
16
+ export { W as WidgetPet } from '../../../petsRepository.d-_QfM7F6T.js';
17
+ import '../../../requestFunnel.d-DKBPTpsy.js';
18
+ import '../../../ErrorPolicyPort.d-BnI5qWg4.js';
19
+ import '../../../config.d-B7Z-KTGq.js';
20
+ import '../../../identity.d-D4VtpqRr.js';
21
21
  import '../../../TelemetryPort.d-BDNr00hu.js';
22
22
  import '../../../profile.d-CSs1wlXT.js';
23
23
 
@@ -128,7 +128,7 @@ interface EverfurTelevetBookingProps {
128
128
  * ABSENT MEANS THE CONTROL DOES NOT RENDER. `POST /widget/v1/televet/state-interest` does not exist on the
129
129
  * partner plane, and the consumer WEB app already refused to ship this button over an unreachable write
130
130
  * for the same reason on its own pre-signup funnel: "the button would 401 for every visitor who pressed
131
- * it" (everfur-frontend StateUnavailableNotice.tsx:34-41).
131
+ * it" (the consumer web app StateUnavailableNotice.tsx:34-41).
132
132
  */
133
133
  readonly onStateInterest?: TelevetStateInterestWrite;
134
134
  /**