@everfur/sdk 0.14.0 → 0.15.1

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 (300) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/LICENSE.md +1 -0
  3. package/README.md +12 -5
  4. package/SDK-LICENSE.txt +130 -0
  5. package/THIRD_PARTY_NOTICES +9 -0
  6. package/dist/CameraPort.d-Cv31Pz7g.d.cts +1 -0
  7. package/dist/CameraPort.d-Cv31Pz7g.d.ts +1 -0
  8. package/dist/{Chat.d-aycmX1CA.d.cts → Chat.d-BO5iJsR2.d.cts} +12 -3
  9. package/dist/{Chat.d-puminpyi.d.ts → Chat.d-BlsnQwCQ.d.ts} +12 -3
  10. package/dist/{DepthViews.d-DIvxzLDf.d.ts → DepthViews.d--1daZblh.d.cts} +2 -1
  11. package/dist/{DepthViews.d-wLNkzk9f.d.cts → DepthViews.d-BuEWI6Ln.d.ts} +2 -1
  12. package/dist/{DepthViews.d-Dy0Zl-s-.d.ts → DepthViews.d-CKTnEeUo.d.ts} +2 -1
  13. package/dist/{DepthViews.d-BdvFZgPs.d.cts → DepthViews.d-PuBGdAYk.d.cts} +2 -1
  14. package/dist/ErrorPolicyPort.d-68yrE3BE.d.ts +1 -0
  15. package/dist/ErrorPolicyPort.d-DirW9hgO.d.cts +1 -0
  16. package/dist/EverfurError.d-8NHtlgzA.d.cts +1 -0
  17. package/dist/EverfurError.d-8NHtlgzA.d.ts +1 -0
  18. package/dist/EverfurResult.d-BFH-3s6E.d.cts +1 -0
  19. package/dist/EverfurResult.d-D_-254ZY.d.ts +1 -0
  20. package/dist/IntakeMedia.d-4a89XrP7.d.ts +1 -0
  21. package/dist/IntakeMedia.d-DGxrhgIW.d.ts +1 -0
  22. package/dist/IntakeMedia.d-DUPR4lVM.d.cts +1 -0
  23. package/dist/IntakeMedia.d-JJCUvQu7.d.cts +1 -0
  24. package/dist/LICENSE.md +1 -0
  25. package/dist/LifecyclePort.d-Cr1p33a7.d.cts +1 -0
  26. package/dist/LifecyclePort.d-Cr1p33a7.d.ts +1 -0
  27. package/dist/PhotoController.d-BzCJOE7e.d.cts +1 -0
  28. package/dist/PhotoController.d-D0XiUUOl.d.ts +1 -0
  29. package/dist/{RecordsPage.d-9Ank15PT.d.ts → RecordsPage.d-CBB8sfoY.d.ts} +2 -1
  30. package/dist/{RecordsPage.d-DMKU0IKc.d.cts → RecordsPage.d-Dq5gpQG0.d.cts} +2 -1
  31. package/dist/SDK-LICENSE.txt +130 -0
  32. package/dist/THIRD_PARTY_NOTICES +9 -0
  33. package/dist/TelemetryPort.d-BDNr00hu.d.cts +1 -0
  34. package/dist/TelemetryPort.d-BDNr00hu.d.ts +1 -0
  35. package/dist/animations/index.cjs +2 -1
  36. package/dist/animations/index.d.cts +24 -21
  37. package/dist/animations/index.d.ts +24 -21
  38. package/dist/animations/index.js +2 -1
  39. package/dist/{attachments.d--sIsfk6e.d.ts → attachments.d-C2nkIyDB.d.ts} +3 -2
  40. package/dist/{attachments.d-rp3xs-Q3.d.ts → attachments.d-DFP9yvz9.d.ts} +7 -6
  41. package/dist/{attachments.d-DNUCiyy5.d.cts → attachments.d-DRHsJkni.d.cts} +7 -6
  42. package/dist/{attachments.d-ZEpTUeWN.d.cts → attachments.d-DRUC35Ti.d.cts} +3 -2
  43. package/dist/{bookingCopy.d-D0uIIFAJ.d.ts → bookingCopy.d-CFL-1Be2.d.ts} +3 -2
  44. package/dist/{bookingCopy.d-DUrmVcLs.d.cts → bookingCopy.d-bF_QknDC.d.cts} +3 -2
  45. package/dist/{branding.d-CTXTUg_8.d.cts → branding.d-Bbc6p1XY.d.cts} +2 -1
  46. package/dist/{branding.d-DxJSoFce.d.ts → branding.d-y6c0UwhE.d.ts} +2 -1
  47. package/dist/cacheEpoch.d-DknKn3S0.d.cts +1 -0
  48. package/dist/cacheEpoch.d-DknKn3S0.d.ts +1 -0
  49. package/dist/callCopy.d-Bw6oZT54.d.cts +1 -0
  50. package/dist/callCopy.d-Bw6oZT54.d.ts +1 -0
  51. package/dist/callRoom.d-B1DoYdJe.d.cts +1 -0
  52. package/dist/callRoom.d-Dqm1rUqT.d.ts +1 -0
  53. package/dist/{casesRepository.d-DCnix2pT.d.cts → casesRepository.d-BMOnT1fg.d.cts} +2 -1
  54. package/dist/{casesRepository.d-DbirgbyH.d.ts → casesRepository.d-C__BnffJ.d.ts} +2 -1
  55. package/dist/chat/index.cjs +16 -15
  56. package/dist/chat/index.d.cts +10 -9
  57. package/dist/chat/index.d.ts +10 -9
  58. package/dist/chat/index.js +16 -15
  59. package/dist/client/index.cjs +4 -3
  60. package/dist/client/index.d.cts +11 -10
  61. package/dist/client/index.d.ts +11 -10
  62. package/dist/client/index.js +4 -3
  63. package/dist/{clinicBatch.d-Ccmrngcu.d.cts → clinicBatch.d-C5deJ4xY.d.cts} +3 -2
  64. package/dist/{clinicBatch.d-D9Ci7IpP.d.ts → clinicBatch.d-D68RYvc3.d.ts} +3 -2
  65. package/dist/clinicModels.d-BXgKZqDb.d.cts +1 -0
  66. package/dist/clinicModels.d-CaS64-P-.d.ts +1 -0
  67. package/dist/clinicRequestProps.d-1dCtouGA.d.cts +1 -0
  68. package/dist/clinicRequestProps.d-CjsMg_OD.d.ts +1 -0
  69. package/dist/{config.d-DJ4mvf_w.d.cts → config.d-BQgrIDdu.d.cts} +2 -1
  70. package/dist/{config.d-MX7IKP2f.d.ts → config.d-XSMThgVj.d.ts} +2 -1
  71. package/dist/consent/index.cjs +1 -0
  72. package/dist/consent/index.d.cts +6 -5
  73. package/dist/consent/index.d.ts +6 -5
  74. package/dist/consent/index.js +1 -0
  75. package/dist/{context.d-C6MJsMpN.d.cts → context.d-Ba8YyJpk.d.cts} +8 -7
  76. package/dist/{context.d-BdnBe8Oe.d.ts → context.d-xoh5vmxS.d.ts} +8 -7
  77. package/dist/{copy.d-C_u7shha.d.cts → copy.d-Cq-s-UUv.d.cts} +3 -2
  78. package/dist/{copy.d-BIfQOoDB.d.ts → copy.d-HV9fU5kh.d.ts} +3 -2
  79. package/dist/core/index.cjs +3 -2
  80. package/dist/core/index.d.cts +17 -16
  81. package/dist/core/index.d.ts +17 -16
  82. package/dist/core/index.js +3 -2
  83. package/dist/{depth.d-COFxYWLU.d.ts → depth.d-D7kKiYl7.d.ts} +3 -2
  84. package/dist/{depth.d-D2e5WZuE.d.cts → depth.d-DYnkz8Re.d.cts} +3 -2
  85. package/dist/{entitlementRepository.d-BP15dFbe.d.cts → entitlementRepository.d-B_kEPLhz.d.cts} +4 -3
  86. package/dist/{entitlementRepository.d-DLuxnGi5.d.ts → entitlementRepository.d-DmnUZLl_.d.ts} +4 -3
  87. package/dist/features.d-DrQxTw3-.d.cts +1 -0
  88. package/dist/features.d-DrQxTw3-.d.ts +1 -0
  89. package/dist/{focus.d-jQWp0hdK.d.cts → focus.d-BHm_QtQ9.d.cts} +21 -4
  90. package/dist/{focus.d-C0Tr0oVJ.d.ts → focus.d-CjL6Cj0m.d.ts} +21 -4
  91. package/dist/health-plan/index.cjs +48 -42
  92. package/dist/health-plan/index.d.cts +9 -8
  93. package/dist/health-plan/index.d.ts +9 -8
  94. package/dist/health-plan/index.js +49 -43
  95. package/dist/{idempotency.d-DXb1BN2A.d.ts → idempotency.d-BSRK8od4.d.cts} +9 -1
  96. package/dist/{idempotency.d-HF6fyRt2.d.cts → idempotency.d-CFc4CCc9.d.ts} +9 -1
  97. package/dist/{identity.d-BePPZ7Uv.d.ts → identity.d-Be2Es9Td.d.ts} +2 -1
  98. package/dist/{identity.d-CJfnWOdH.d.cts → identity.d-HbwYQ4-z.d.cts} +2 -1
  99. package/dist/ids.d-B2GAAifq.d.cts +1 -0
  100. package/dist/ids.d-B2GAAifq.d.ts +1 -0
  101. package/dist/index.cjs +19 -18
  102. package/dist/index.d.cts +17 -16
  103. package/dist/index.d.ts +17 -16
  104. package/dist/index.js +19 -18
  105. package/dist/{introEvents.d-DHlMvmC7.d.ts → introEvents.d-DflJ6J9H.d.ts} +2 -1
  106. package/dist/{introEvents.d-BkGDT_kG.d.cts → introEvents.d-Dr34KIaD.d.cts} +2 -1
  107. package/dist/introEvents.d-dS3fJCH1.d.cts +1 -0
  108. package/dist/introEvents.d-dS3fJCH1.d.ts +1 -0
  109. package/dist/models.d-BSqvbTE1.d.cts +1 -0
  110. package/dist/models.d-DOwnr8fi.d.ts +1 -0
  111. package/dist/notifications/index.cjs +1 -0
  112. package/dist/notifications/index.d.cts +5 -4
  113. package/dist/notifications/index.d.ts +5 -4
  114. package/dist/notifications/index.js +1 -0
  115. package/dist/{optInView.d-s-w4aGN3.d.ts → optInView.d-3mbj1mR6.d.ts} +15 -2
  116. package/dist/{optInView.d-0iI5JoAf.d.cts → optInView.d-D23o1gtT.d.cts} +15 -2
  117. package/dist/optionalModule.d-DbJmsq5f.d.cts +1 -0
  118. package/dist/optionalModule.d-DbJmsq5f.d.ts +1 -0
  119. package/dist/{parse.d-EmsgOUMQ.d.cts → parse.d-4lUXdmvY.d.cts} +2 -1
  120. package/dist/{parse.d-COt1qVA6.d.ts → parse.d-BERabxHw.d.ts} +2 -1
  121. package/dist/{pets.d-nNAVnw7f.d.cts → pets.d-CHU0UbXt.d.cts} +2 -1
  122. package/dist/{pets.d-BFT_b53y.d.ts → pets.d-D_ayuqjp.d.ts} +2 -1
  123. package/dist/{petsRepository.d-B2TpRE7r.d.cts → petsRepository.d-Bwfe8yuR.d.cts} +2 -1
  124. package/dist/{petsRepository.d-RGwSZcYl.d.ts → petsRepository.d-DUaAWoTv.d.ts} +2 -1
  125. package/dist/photo/index.cjs +1 -0
  126. package/dist/photo/index.d.cts +1 -0
  127. package/dist/photo/index.d.ts +1 -0
  128. package/dist/photo/index.js +1 -0
  129. package/dist/{planSignals.d-DSnxKoWe.d.ts → planSignals.d-CON9gTvJ.d.ts} +3 -2
  130. package/dist/{planSignals.d-BDbp2e-k.d.cts → planSignals.d-Dha2CMDF.d.cts} +3 -2
  131. package/dist/ports.d-BX4f4UsB.d.cts +1 -0
  132. package/dist/ports.d-BX4f4UsB.d.ts +1 -0
  133. package/dist/{ports.d-DBA_gsq5.d.cts → ports.d-ClbPRUtx.d.cts} +5 -4
  134. package/dist/{ports.d-D2n4HRUy.d.ts → ports.d-DzEJMVRs.d.ts} +5 -4
  135. package/dist/presentation.d-vy8kTGfR.d.cts +1 -0
  136. package/dist/presentation.d-vy8kTGfR.d.ts +1 -0
  137. package/dist/profile.d-CSs1wlXT.d.cts +1 -0
  138. package/dist/profile.d-CSs1wlXT.d.ts +1 -0
  139. package/dist/projection.d-CeIUsbSk.d.cts +1 -0
  140. package/dist/projection.d-CeIUsbSk.d.ts +1 -0
  141. package/dist/quickPrompts.d-NM_81Jc1.d.cts +1 -0
  142. package/dist/quickPrompts.d-NM_81Jc1.d.ts +1 -0
  143. package/dist/records/depth/index.cjs +1 -0
  144. package/dist/records/depth/index.d.cts +10 -9
  145. package/dist/records/depth/index.d.ts +10 -9
  146. package/dist/records/depth/index.js +1 -0
  147. package/dist/records/index.cjs +63 -52
  148. package/dist/records/index.d.cts +22 -15
  149. package/dist/records/index.d.ts +22 -15
  150. package/dist/records/index.js +64 -53
  151. package/dist/recordsAsk.d-C5CGSi3j.d.cts +1 -0
  152. package/dist/recordsAsk.d-C5CGSi3j.d.ts +1 -0
  153. package/dist/{requestFunnel.d-RZex94XX.d.cts → requestFunnel.d-JoqddYSx.d.cts} +3 -2
  154. package/dist/{requestFunnel.d-D9edIEjZ.d.ts → requestFunnel.d-YabU6G-Z.d.ts} +3 -2
  155. package/dist/resolve.d-CoQWUy1Y.d.cts +1 -0
  156. package/dist/resolve.d-CoQWUy1Y.d.ts +1 -0
  157. package/dist/{runtimeTypes.d-LkwZaF7z.d.cts → runtimeTypes.d-Cv38YuzP.d.cts} +6 -5
  158. package/dist/{runtimeTypes.d-BYq38b17.d.ts → runtimeTypes.d-DQTBJAbk.d.ts} +6 -5
  159. package/dist/{screenProps.d-BVzRzowC.d.ts → screenProps.d-BuJLzFkN.d.ts} +2 -1
  160. package/dist/{screenProps.d-CQ0qZJkr.d.cts → screenProps.d-C-AuHoyF.d.cts} +2 -1
  161. package/dist/server/events/index.cjs +2 -1
  162. package/dist/server/events/index.d.cts +3 -2
  163. package/dist/server/events/index.d.ts +3 -2
  164. package/dist/server/events/index.js +2 -1
  165. package/dist/server/index.cjs +2 -1
  166. package/dist/server/index.d.cts +4 -3
  167. package/dist/server/index.d.ts +4 -3
  168. package/dist/server/index.js +2 -1
  169. package/dist/sheetCopy.d-CAhLOxjc.d.cts +1 -0
  170. package/dist/sheetCopy.d-CAhLOxjc.d.ts +1 -0
  171. package/dist/sheetSeam.d-B09jf4YC.d.ts +1 -0
  172. package/dist/sheetSeam.d-BBuEIVsa.d.cts +1 -0
  173. package/dist/shop/index.cjs +6 -4
  174. package/dist/shop/index.d.cts +16 -3
  175. package/dist/shop/index.d.ts +16 -3
  176. package/dist/shop/index.js +6 -4
  177. package/dist/species.d-BXAIMh7I.d.cts +1 -0
  178. package/dist/species.d-BXAIMh7I.d.ts +1 -0
  179. package/dist/tabs/index.cjs +4 -3
  180. package/dist/tabs/index.d.cts +10 -8
  181. package/dist/tabs/index.d.ts +10 -8
  182. package/dist/tabs/index.js +4 -3
  183. package/dist/tabsModel.d-BfIQg6yS.d.cts +1 -0
  184. package/dist/tabsModel.d-BfIQg6yS.d.ts +1 -0
  185. package/dist/televet/booking/index.cjs +1 -0
  186. package/dist/televet/booking/index.d.cts +7 -6
  187. package/dist/televet/booking/index.d.ts +7 -6
  188. package/dist/televet/booking/index.js +1 -0
  189. package/dist/televet/call/index.cjs +1 -0
  190. package/dist/televet/call/index.d.cts +1 -0
  191. package/dist/televet/call/index.d.ts +1 -0
  192. package/dist/televet/call/index.js +1 -0
  193. package/dist/televet/index.cjs +1 -0
  194. package/dist/televet/index.d.cts +1 -0
  195. package/dist/televet/index.d.ts +1 -0
  196. package/dist/televet/index.js +1 -0
  197. package/dist/televetGlobal.d-CC-DrqkQ.d.ts +1 -0
  198. package/dist/televetGlobal.d-CKwDCbmN.d.cts +1 -0
  199. package/dist/testing/index.cjs +2 -1
  200. package/dist/testing/index.d.cts +2 -1
  201. package/dist/testing/index.d.ts +2 -1
  202. package/dist/testing/index.js +2 -1
  203. package/dist/testing/rn/index.cjs +2 -2
  204. package/dist/testing/rn/index.d.cts +13 -11
  205. package/dist/testing/rn/index.d.ts +13 -11
  206. package/dist/testing/rn/index.js +2 -2
  207. package/dist/testing/web/index.cjs +1 -0
  208. package/dist/testing/web/index.d.cts +10 -9
  209. package/dist/testing/web/index.d.ts +10 -9
  210. package/dist/testing/web/index.js +1 -0
  211. package/dist/texting/index.cjs +2 -1
  212. package/dist/texting/index.d.cts +9 -6
  213. package/dist/texting/index.d.ts +9 -6
  214. package/dist/texting/index.js +2 -1
  215. package/dist/{threadOptions.d-B6GA09aM.d.ts → threadOptions.d-8x_1evAr.d.ts} +3 -2
  216. package/dist/{threadOptions.d-9r4Csa7k.d.cts → threadOptions.d-DBrmOwmb.d.cts} +3 -2
  217. package/dist/{timelineRows.d-BvM2A7_G.d.cts → timelineRows.d-B6lLC8Ud.d.cts} +2 -1
  218. package/dist/{timelineRows.d-Bes8ip2v.d.ts → timelineRows.d-Brlkti-G.d.ts} +2 -1
  219. package/dist/{tokens.d-DarDaV39.d.cts → tokens.d-BUVqme2D.d.cts} +2 -1
  220. package/dist/{tokens.d-DarDaV39.d.ts → tokens.d-BUVqme2D.d.ts} +2 -1
  221. package/dist/{typeStyle.d-Co5KF0up.d.ts → typeStyle.d-B3Kdtjie.d.ts} +3 -2
  222. package/dist/{typeStyle.d-xIZj02Ru.d.cts → typeStyle.d-DmlwyJq-.d.cts} +3 -2
  223. package/dist/uploadTransport.d-CWL7CdWP.d.cts +1 -0
  224. package/dist/uploadTransport.d-EGoUl7gX.d.ts +1 -0
  225. package/dist/useIntroSeen.d-CTWFUthO.d.cts +1 -0
  226. package/dist/useIntroSeen.d-CTWFUthO.d.ts +1 -0
  227. package/dist/{usePresentation.d-DYTF_ZGf.d.cts → usePresentation.d-BcdCIuEU.d.cts} +2 -1
  228. package/dist/{usePresentation.d-BGz32Vlm.d.ts → usePresentation.d-Bne14SlX.d.ts} +2 -1
  229. package/dist/useRecords.d-BYNX01El.d.cts +1 -0
  230. package/dist/useRecords.d-DWk61a4c.d.ts +1 -0
  231. package/dist/{useRecordsDepth.d-BQRL0Hez.d.ts → useRecordsDepth.d-Cd6J03o5.d.ts} +2 -1
  232. package/dist/{useRecordsDepth.d--LLA_4ga.d.cts → useRecordsDepth.d-DAa169VY.d.cts} +2 -1
  233. package/dist/useVetVisit.d-BtdwhmgD.d.cts +1 -0
  234. package/dist/useVetVisit.d-DoYQimyt.d.ts +1 -0
  235. package/dist/video/index.cjs +1 -0
  236. package/dist/video/index.d.cts +1 -0
  237. package/dist/video/index.d.ts +1 -0
  238. package/dist/video/index.js +1 -0
  239. package/dist/{view.d-0yBjLTV3.d.cts → view.d-3d5_O7Xk.d.cts} +4 -3
  240. package/dist/{view.d-DqbCADFa.d.ts → view.d-DkGM8GNA.d.ts} +4 -3
  241. package/dist/visitIntent.d-D7_yVp1I.d.cts +1 -0
  242. package/dist/visitIntent.d-D7_yVp1I.d.ts +1 -0
  243. package/dist/web/consent/index.cjs +1 -0
  244. package/dist/web/consent/index.d.cts +6 -5
  245. package/dist/web/consent/index.d.ts +6 -5
  246. package/dist/web/consent/index.js +1 -0
  247. package/dist/web/health-plan/index.cjs +37 -31
  248. package/dist/web/health-plan/index.d.cts +11 -10
  249. package/dist/web/health-plan/index.d.ts +11 -10
  250. package/dist/web/health-plan/index.js +37 -31
  251. package/dist/web/index.cjs +24 -21
  252. package/dist/web/index.d.cts +39 -29
  253. package/dist/web/index.d.ts +39 -29
  254. package/dist/web/index.js +24 -21
  255. package/dist/web/intro/index.cjs +1 -0
  256. package/dist/web/intro/index.d.cts +7 -6
  257. package/dist/web/intro/index.d.ts +7 -6
  258. package/dist/web/intro/index.js +1 -0
  259. package/dist/web/notifications/index.cjs +1 -0
  260. package/dist/web/notifications/index.d.cts +4 -3
  261. package/dist/web/notifications/index.d.ts +4 -3
  262. package/dist/web/notifications/index.js +1 -0
  263. package/dist/web/records/depth/index.cjs +1 -0
  264. package/dist/web/records/depth/index.d.cts +10 -9
  265. package/dist/web/records/depth/index.d.ts +10 -9
  266. package/dist/web/records/depth/index.js +1 -0
  267. package/dist/web/records/index.cjs +3 -2
  268. package/dist/web/records/index.d.cts +12 -11
  269. package/dist/web/records/index.d.ts +12 -11
  270. package/dist/web/records/index.js +3 -2
  271. package/dist/web/records/upload/index.cjs +1 -0
  272. package/dist/web/records/upload/index.d.cts +1 -0
  273. package/dist/web/records/upload/index.d.ts +1 -0
  274. package/dist/web/records/upload/index.js +1 -0
  275. package/dist/web/records-sheet/index.cjs +88 -62
  276. package/dist/web/records-sheet/index.d.cts +10 -2
  277. package/dist/web/records-sheet/index.d.ts +10 -2
  278. package/dist/web/records-sheet/index.js +88 -62
  279. package/dist/web/shop/index.cjs +8 -6
  280. package/dist/web/shop/index.d.cts +4 -3
  281. package/dist/web/shop/index.d.ts +4 -3
  282. package/dist/web/shop/index.js +8 -6
  283. package/dist/web/televet/booking/index.cjs +1 -0
  284. package/dist/web/televet/booking/index.d.cts +8 -7
  285. package/dist/web/televet/booking/index.d.ts +8 -7
  286. package/dist/web/televet/booking/index.js +1 -0
  287. package/dist/web/televet/call/index.cjs +1 -0
  288. package/dist/web/televet/call/index.d.cts +1 -0
  289. package/dist/web/televet/call/index.d.ts +1 -0
  290. package/dist/web/televet/call/index.js +1 -0
  291. package/dist/web/televet/index.cjs +1 -0
  292. package/dist/web/televet/index.d.cts +1 -0
  293. package/dist/web/televet/index.d.ts +1 -0
  294. package/dist/web/televet/index.js +1 -0
  295. package/dist/web/texting/index.cjs +2 -1
  296. package/dist/web/texting/index.d.cts +9 -6
  297. package/dist/web/texting/index.d.ts +9 -6
  298. package/dist/web/texting/index.js +2 -1
  299. package/package.json +11 -5
  300. package/LICENSE +0 -21
@@ -1,22 +1,23 @@
1
- import { f as EntitlementSnapshot } from '../../runtimeTypes.d-BYq38b17.js';
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { f as EntitlementSnapshot } from '../../runtimeTypes.d-DQTBJAbk.js';
2
3
  import { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
3
4
  import { R as RecordsRequestId, P as PetRef } from '../../ids.d-B2GAAifq.js';
4
5
  export { B as Brand, _ as __brand } from '../../ids.d-B2GAAifq.js';
5
6
  import { d as RecordsRequestView } from '../../models.d-DOwnr8fi.js';
6
7
  export { i as RecordsRequestStatus, j as RecordsSimpleStatus } from '../../models.d-DOwnr8fi.js';
7
8
  export { E as EverfurError, a as EverfurErrorCategory, b as EverfurErrorCode } from '../../EverfurError.d-8NHtlgzA.js';
8
- export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-DarDaV39.js';
9
- export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-DxJSoFce.js';
9
+ export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-BUVqme2D.js';
10
+ export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-y6c0UwhE.js';
10
11
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve.d-CoQWUy1Y.js';
11
- import '../../petsRepository.d-RGwSZcYl.js';
12
- import '../../identity.d-BePPZ7Uv.js';
13
- import '../../config.d-MX7IKP2f.js';
12
+ import '../../petsRepository.d-DUaAWoTv.js';
13
+ import '../../identity.d-Be2Es9Td.js';
14
+ import '../../config.d-XSMThgVj.js';
14
15
  import '../../profile.d-CSs1wlXT.js';
15
16
  import '../../cacheEpoch.d-DknKn3S0.js';
16
17
  import '../../ErrorPolicyPort.d-68yrE3BE.js';
17
- import '../../ports.d-D2n4HRUy.js';
18
- import '../../casesRepository.d-DbirgbyH.js';
19
- import '../../requestFunnel.d-D9edIEjZ.js';
18
+ import '../../ports.d-DzEJMVRs.js';
19
+ import '../../casesRepository.d-C__BnffJ.js';
20
+ import '../../requestFunnel.d-YabU6G-Z.js';
20
21
  import '../../TelemetryPort.d-BDNr00hu.js';
21
22
  import '../../ports.d-BX4f4UsB.js';
22
23
  import '../../CameraPort.d-Cv31Pz7g.js';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  "use client";
2
3
  import{createContext,useMemo,useContext}from"react";import{z}from"zod";function ok(value,warning){/* @__PURE__ */
3
4
  return Object.freeze({ok:true,value:value})}function err(error){/* @__PURE__ */
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  "use strict";var react=require("react"),reactNative=require("react-native"),jsxRuntime=require("react/jsx-runtime");function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base=face(theme,fallback);return base.fontWeight===void 0||headingWeight===null?base:{fontFamily:base.fontFamily,fontWeight:headingWeight}}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state2){return Object.is(props.resetKey,state2.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
2
3
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
3
4
  /* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
@@ -155,7 +156,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:styles.petRow,children:[
155
156
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles.chips,accessibilityRole:"radiogroup",accessibilityLabel:copy.defaultPetLabel,children:pets.map(pet=>{let picked=pet.petRef===value;/* @__PURE__ */
156
157
  return jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>onChoose(pet.petRef),disabled:saving,accessibilityRole:"radio",accessibilityState:{checked:picked,disabled:saving},accessibilityLabel:pet.name??pet.petRef,style:[styles.chip,picked?styles.chipPicked:null],children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:[styles.chipLabel,picked?styles.chipLabelPicked:null],children:pet.name??pet.petRef})},pet.petRef)})}),
157
158
  /* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.links,children:[
158
- /* @__PURE__ */jsxRuntime.jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return reactNative.StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return react.useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=react.useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=react.useSyncExternalStore(subscribe2,read,read);return react.useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=react.useState({user:null,value:IDLE});return react.useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=react.useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=react.useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=react.useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=react.useState(null),texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});react.useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);react.useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),react.useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;react.useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),react.useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=react.useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=react.useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=react.useCallback(()=>{mine&&current.stage==="enrolling"&&update2({...current,stage:"offered"})},[mine,current,update2]),dismiss=react.useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=react.useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),brand=texting.profile?.brandName??"";return react.useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat"});return react.useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
159
+ /* @__PURE__ */jsxRuntime.jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return reactNative.StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return react.useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=react.useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=react.useSyncExternalStore(subscribe2,read,read);return react.useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=react.useState({user:null,value:IDLE});return react.useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=react.useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=react.useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=react.useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=react.useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});react.useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);react.useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),react.useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;react.useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),react.useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=react.useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=react.useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=react.useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=react.useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=react.useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=react.useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return react.useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return react.useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=react.useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
159
160
  return jsxRuntime.jsx(AskEntry,{ask:ask,styles:styles})}function AskEntry({ask:ask,styles:styles}){let{texting:texting}=ask,{status:status,profile:profile,snapshot:snapshot}=texting,[phone,setPhone]=react.useState(""),[consented,setConsented]=react.useState(false),[code,setCode]=react.useState(""),[problem,setProblem]=react.useState(null),onNumber=status==="enroll"||status==="requesting"&&!snapshot.resending,onCode=status==="code"||status==="confirming"||status==="requesting";react.useEffect(()=>{setProblem(null)},[status]);let close=/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{onPress:ask.close,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,hitSlop:8,style:styles.close,testID:"texting-ask-close",children:[
160
161
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles.closeBar,styles.closeBarA]}),
161
162
  /* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[styles.closeBar,styles.closeBarB]})]}),refusal=snapshot.error===null?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles.notice,accessibilityRole:"alert",children:[
@@ -1,16 +1,17 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode } from 'react';
2
3
  import { StyleProp, ViewStyle } from 'react-native';
3
4
  import { a as CapabilityDecision } from '../resolve.d-CoQWUy1Y.cjs';
4
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.cjs';
5
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
6
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-0iI5JoAf.cjs';
7
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-0iI5JoAf.cjs';
8
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-CJfnWOdH.cjs';
9
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-DJ4mvf_w.cjs';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-D23o1gtT.cjs';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-D23o1gtT.cjs';
9
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-HbwYQ4-z.cjs';
10
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-BQgrIDdu.cjs';
10
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.cjs';
11
12
  export { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
12
13
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-DirW9hgO.cjs';
13
- import '../requestFunnel.d-RZex94XX.cjs';
14
+ import '../requestFunnel.d-JoqddYSx.cjs';
14
15
 
15
16
  interface EverfurTextingOptInProps {
16
17
  /** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
@@ -49,9 +50,11 @@ interface ChatTextingAskControllerProps {
49
50
  readonly ready: boolean;
50
51
  /** Called with the ask's state whenever it changes. */
51
52
  readonly onAsk: (ask: TextingAsk) => void;
53
+ /** The chat header draws its always-visible entry to the number entry (`TextingAsk.canOpen` / `open`). Default false. */
54
+ readonly entry?: boolean;
52
55
  }
53
56
  /** Runs the ask for the chat and reports it; draws nothing. `EverfurChat` mounts it itself. */
54
- declare function ChatTextingAskController({ enabled, ready, onAsk }: ChatTextingAskControllerProps): ReactNode;
57
+ declare function ChatTextingAskController({ enabled, ready, onAsk, entry }: ChatTextingAskControllerProps): ReactNode;
55
58
  /** The words the chat's thread draws for the ask: the line, its two chips and the closing line. */
56
59
  interface TextingAskLines {
57
60
  readonly line: string;
@@ -1,16 +1,17 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode } from 'react';
2
3
  import { StyleProp, ViewStyle } from 'react-native';
3
4
  import { a as CapabilityDecision } from '../resolve.d-CoQWUy1Y.js';
4
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.js';
5
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
6
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-s-w4aGN3.js';
7
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-s-w4aGN3.js';
8
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-BePPZ7Uv.js';
9
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-MX7IKP2f.js';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-3mbj1mR6.js';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-3mbj1mR6.js';
9
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-Be2Es9Td.js';
10
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config.d-XSMThgVj.js';
10
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.js';
11
12
  export { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
12
13
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort.d-68yrE3BE.js';
13
- import '../requestFunnel.d-D9edIEjZ.js';
14
+ import '../requestFunnel.d-YabU6G-Z.js';
14
15
 
15
16
  interface EverfurTextingOptInProps {
16
17
  /** Called when the member's step changes (for example to `verified` or `optedOut`). A throw is swallowed. */
@@ -49,9 +50,11 @@ interface ChatTextingAskControllerProps {
49
50
  readonly ready: boolean;
50
51
  /** Called with the ask's state whenever it changes. */
51
52
  readonly onAsk: (ask: TextingAsk) => void;
53
+ /** The chat header draws its always-visible entry to the number entry (`TextingAsk.canOpen` / `open`). Default false. */
54
+ readonly entry?: boolean;
52
55
  }
53
56
  /** Runs the ask for the chat and reports it; draws nothing. `EverfurChat` mounts it itself. */
54
- declare function ChatTextingAskController({ enabled, ready, onAsk }: ChatTextingAskControllerProps): ReactNode;
57
+ declare function ChatTextingAskController({ enabled, ready, onAsk, entry }: ChatTextingAskControllerProps): ReactNode;
55
58
  /** The words the chat's thread draws for the ask: the line, its two chips and the closing line. */
56
59
  interface TextingAskLines {
57
60
  readonly line: string;
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import{createContext,forwardRef,createElement,useMemo,useRef,useEffect,useSyncExternalStore,useCallback,useState,useContext,Component}from"react";import{TextInput as TextInput$1,View,ActivityIndicator,Pressable,StyleSheet,Modal,Text as Text$1}from"react-native";import{jsxs,jsx,Fragment}from"react/jsx-runtime";function slotBox(slot,borderWidth){if(slot===void 0)return{};let out={};return slot.backgroundColor!==void 0&&(out.backgroundColor=slot.backgroundColor),slot.borderColor!==void 0&&(out.borderColor=slot.borderColor,out.borderWidth=borderWidth??1),slot.borderRadius!==void 0&&(out.borderRadius=slot.borderRadius),out}function slotText(slot){return slot?.textColor===void 0?{}:{color:slot.textColor}}var FACE_WEIGHT=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(theme,weight){let type=theme.type,fontFamily=type.families[weight];return weight==="mono"||type.namedFaces[weight]?{fontFamily:fontFamily}:{fontFamily:fontFamily,fontWeight:type.weight[FACE_WEIGHT[weight]]}}function headingFace(theme,fallback="bold"){let{headingFamily:headingFamily,headingWeight:headingWeight}=theme.type;if(headingFamily===null&&headingWeight===null)return face(theme,fallback);if(headingFamily!==null)return{fontFamily:headingFamily,fontWeight:headingWeight??theme.type.weight[FACE_WEIGHT[fallback]]};let base=face(theme,fallback);return base.fontWeight===void 0||headingWeight===null?base:{fontFamily:base.fontFamily,fontWeight:headingWeight}}function reportHostFailure(error){let globalConsole=globalThis.console;try{globalConsole?.error?.("[everfur] A host callback threw; the SDK ignored it.",error)}catch{}}function isThenable(value){return(typeof value=="object"||typeof value=="function")&&value!==null&&typeof value.then=="function"}function callHost(fn,...args){if(typeof fn=="function")try{let result=fn(...args);return isThenable(result)&&Promise.resolve(result).then(void 0,reportHostFailure),result}catch(error){reportHostFailure(error);return}}var GUARDED=/* @__PURE__ */new WeakMap;function guardHost(fn){if(typeof fn!="function")return;let cached=GUARDED.get(fn);if(cached!==void 0)return cached;let guarded=(...args)=>{callHost(fn,...args)};return GUARDED.set(fn,guarded),guarded}function guardHostProps(props,names){let guarded=null;for(let name of names){let fn=props[name];typeof fn=="function"&&(guarded??={...props},guarded[name]=guardHost(fn))}return guarded??props}var HostRenderBoundary=class extends Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state2){return Object.is(props.resetKey,state2.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:createElement(RenderHost,{render:render})})}var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
2
3
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
3
4
  /* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
@@ -155,7 +156,7 @@ return jsxs(View,{style:styles.petRow,children:[
155
156
  /* @__PURE__ */jsx(View,{style:styles.chips,accessibilityRole:"radiogroup",accessibilityLabel:copy.defaultPetLabel,children:pets.map(pet=>{let picked=pet.petRef===value;/* @__PURE__ */
156
157
  return jsx(Pressable,{onPress:()=>onChoose(pet.petRef),disabled:saving,accessibilityRole:"radio",accessibilityState:{checked:picked,disabled:saving},accessibilityLabel:pet.name??pet.petRef,style:[styles.chip,picked?styles.chipPicked:null],children:/* @__PURE__ */jsx(Text,{tier:"compact",style:[styles.chipLabel,picked?styles.chipLabelPicked:null],children:pet.name??pet.petRef})},pet.petRef)})}),
157
158
  /* @__PURE__ */jsxs(View,{style:styles.links,children:[
158
- /* @__PURE__ */jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=useSyncExternalStore(subscribe2,read,read);return useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=useState({user:null,value:IDLE});return useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=useState(null),texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=useCallback(()=>{mine&&current.stage==="enrolling"&&update2({...current,stage:"offered"})},[mine,current,update2]),dismiss=useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),brand=texting.profile?.brandName??"";return useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat"});return useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
159
+ /* @__PURE__ */jsx(Button,{label:saving?copy.savingPet:copy.savePet,kind:"secondary",busy:saving,disabled:!changed,styles:styles,onPress:()=>{value!==null&&onSave(value)},testID:"texting-pet-save"}),saved&&!changed?/* @__PURE__ */jsx(Text,{style:styles.footnote,children:copy.petSaved}):null]})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,text3=(size,ink,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:ink}),cardInk=slots.card?.textColor;return StyleSheet.create({card:{gap:space.md,padding:space.lg,borderRadius:radius.lg,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,...slotBox(slots.card,1)},title:text3(type.size.subtitle,cardInk??color.text.primary,"bold"),subtitle:text3(type.size.body,cardInk??color.text.primary,"bold"),body:text3(type.size.body,cardInk??color.text.secondary,"regular"),footnote:text3(type.size.caption,color.text.muted,"regular"),phone:text3(type.size.body,cardInk??color.text.primary,"bold"),label:text3(type.size.caption,cardInk??color.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.md,borderWidth:1,borderColor:color.controlEdge,backgroundColor:color.surface,...text3(type.size.body,color.text.primary,"regular"),...slotBox(slots.input,1),...slotText(slots.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:space.sm,minHeight:44},box:{width:24,height:24,borderRadius:radius.xs,borderWidth:2,borderColor:color.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},boxChecked:{backgroundColor:color.brand,borderColor:color.brandInk},tick:{...text3(type.size.caption,color.text.onBrand,"bold")},consentText:{flex:1,...text3(type.size.caption,cardInk??color.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:color.brand,...slotBox(slots.primaryButton)},primaryLabel:{...text3(type.size.body,color.text.onBrand,"bold"),...slotText(slots.primaryButton)},secondary:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:color.surface},secondaryLabel:text3(type.size.caption,color.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...text3(type.size.caption,color.linkInk,"bold"),...slotText(slots.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:space.md},notice:{gap:space.xs},noticeText:text3(type.size.caption,color.errorRed,"regular"),confirm:{gap:space.sm,padding:space.md,borderRadius:radius.md,backgroundColor:color.surfaceSubtle},petRow:{gap:space.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:space.sm},chip:{minHeight:44,paddingHorizontal:space.md,borderRadius:radius.pill,borderWidth:1,borderColor:color.brandBorder,backgroundColor:color.surface,justifyContent:"center",...slotBox(slots.chip,1)},chipPicked:{backgroundColor:color.brandSoft,borderColor:color.brandInk},chipLabel:{...text3(type.size.caption,color.text.primary,"regular"),...slotText(slots.chip)},chipLabelPicked:{...face(theme,"bold"),color:color.brandInk}})}var INTRO_OPEN_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),host=globalThis;function isIntroOpenState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.holds instanceof Set&&v.listeners instanceof Set}var stored=host[INTRO_OPEN_SYMBOL],fresh=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),state=isIntroOpenState(stored)?stored:host[INTRO_OPEN_SYMBOL]=fresh();function isIntroOpen(){return state.holds.size>0}function subscribe(listener){return state.listeners.add(listener),()=>{state.listeners.delete(listener)}}function useIntroOpen(){return useSyncExternalStore(subscribe,isIntroOpen,isIntroOpen)}function resolveTextingAskDue(input){let readEnabled=input.enabled&&input.capabilityGranted&&input.hasProfile&&input.signedIn&&input.scheduleEligible&&!input.offeredThisSession,due=readEnabled&&input.identity==="none"&&input.surfaceReady;return{readEnabled:readEnabled,due:due}}var URGENT_LEVELS=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(chat){if(chat.isBootstrapping===true||chat.isLoadingHistory===true||chat.isStreaming===true||chat.status==="error"||chat.stopped===true)return false;let last=chat.messages[chat.messages.length-1];return last===void 0||last.role!=="assistant"||last.pending===true||last.checkin!==void 0||last.text.trim().length===0?false:!(typeof last.urgencyLevel=="string"&&URGENT_LEVELS.has(last.urgencyLevel))}var IN_MEMORY_KVS=/* @__PURE__ */new WeakSet;function isInMemoryKv(kv){return IN_MEMORY_KVS.has(kv)}var TEXTING_ASK_SCHEDULE_KEY="everfur.texting.askSchedule.v1",TEXTING_ASK_SNOOZE_MS=2880*60*1e3,TEXTING_ASK_MAX_ASKS=3,EMPTY_TEXTING_ASK_ENTRY=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(read,now){if(read.status!=="ok")return false;let{entry:entry}=read;return entry.completed||entry.askCount>=TEXTING_ASK_MAX_ASKS?false:entry.nextAskAt===null||now>=entry.nextAskAt}function applyTextingAsk(entry,now){return{askCount:Math.min(entry.askCount+1,TEXTING_ASK_MAX_ASKS),nextAskAt:now+TEXTING_ASK_SNOOZE_MS,completed:entry.completed}}function applyTextingAskSnooze(entry,now){return{...entry,nextAskAt:now+TEXTING_ASK_SNOOZE_MS}}function applyTextingAskCompleted(entry){return{...entry,completed:true}}function nextTextingAskNumber(entry){return entry.askCount<=0?1:entry.askCount===1?2:3}function entryOf(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let o=raw,{askCount:askCount,nextAskAt:nextAskAt,completed:completed}=o;return typeof askCount!="number"||!Number.isInteger(askCount)||askCount<0||nextAskAt!==null&&(typeof nextAskAt!="number"||!Number.isFinite(nextAskAt))||typeof completed!="boolean"?null:{askCount:Math.min(askCount,TEXTING_ASK_MAX_ASKS),nextAskAt:nextAskAt,completed:completed}}function parseTextingAskMap(raw){let value;try{value=JSON.parse(raw)}catch{return null}if(value===null||typeof value!="object"||Array.isArray(value))return null;let out={};for(let[key,item]of Object.entries(value)){let entry=entryOf(item);if(entry===null)return null;out[key]=entry}return out}var SLOT=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function shared(){let host2=globalThis,state2=host2[SLOT];return state2===void 0&&(state2={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},host2[SLOT]=state2),state2.sessionListeners===void 0&&(state2.sessionListeners=/* @__PURE__ */new Set),state2}async function load(kv){if(isInMemoryKv(kv))return{status:"unreadable"};let raw;try{raw=await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)}catch{return{status:"unreadable"}}if(raw===null)try{return await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,"{}"),await kv.getItem(TEXTING_ASK_SCHEDULE_KEY)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let map=parseTextingAskMap(raw);if(map!==null)return{status:"ok",map:map};try{await kv.removeItem(TEXTING_ASK_SCHEDULE_KEY)}catch{}return{status:"unreadable"}}function subscribeTextingAskSchedule(listener){let{listeners:listeners2}=shared();return listeners2.add(listener),()=>{listeners2.delete(listener)}}function update(kv,userRef,change){let state2=shared(),run=async()=>{let loaded=await load(kv);if(loaded.status!=="ok")return;let current=loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY;try{await kv.setItem(TEXTING_ASK_SCHEDULE_KEY,JSON.stringify({...loaded.map,[userRef]:change(current)}))}catch{return}for(let listener of[...state2.listeners])listener()},next=state2.writeChain.then(run,run);return state2.writeChain=next.catch(()=>{}),next}async function readTextingAskSchedule(kv,userRef){let loaded=await load(kv);return loaded.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:loaded.map[userRef]??EMPTY_TEXTING_ASK_ENTRY}}function recordTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAsk(entry,now))}function snoozeTextingAsk(kv,userRef,now=Date.now()){return update(kv,userRef,entry=>applyTextingAskSnooze(entry,now))}function markTextingAskCompleted(kv,userRef){return update(kv,userRef,applyTextingAskCompleted)}function textingAskSession(userRef){return shared().sessions.get(userRef)??null}function setTextingAskSession(userRef,entry){let state2=shared();state2.sessions.set(userRef,entry);for(let listener of[...state2.sessionListeners])listener()}function subscribeTextingAskSessions(listener){let{sessionListeners:sessionListeners}=shared();return sessionListeners.add(listener),()=>{sessionListeners.delete(listener)}}var NO_SNAPSHOT=()=>null;function useTextingGranted(){let{runtime:runtime}=useEverfurContext(),source=runtime.entitlements??null,subscribe2=useCallback(listener=>source===null?()=>{}:source.subscribe(listener),[source]),read=source===null?NO_SNAPSHOT:source.getSnapshot,snapshot=useSyncExternalStore(subscribe2,read,read);return useMemo(()=>snapshot!==null&&decideCapability("texting",snapshot.decisions,{isPending:snapshot.isPending}).enabled,[snapshot])}var IDLE=/* @__PURE__ */Object.freeze({status:"idle"});function useAskSchedule(userRef){let{runtime:runtime}=useEverfurContext(),kv=runtime.registry.services.kv,[state2,setState]=useState({user:null,value:IDLE});return useEffect(()=>{if(userRef===null)return;let live=true,read=()=>{readTextingAskSchedule(kv,userRef).then(value=>{live&&setState({user:userRef,value:{status:"ready",read:value}})})};read();let unsubscribe=subscribeTextingAskSchedule(read);return()=>{live=false,unsubscribe()}},[kv,userRef]),state2.user===userRef?state2.value:IDLE}function identityOf(texting){switch(texting.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(options={}){let enabled=options.enabled!==false,ready=options.ready!==false,surface=options.surface??"prompt",entryWanted=options.entry===true,{runtime:runtime,userRef:userRef}=useEverfurContext(),kv=runtime.registry.services.kv,granted=useTextingGranted(),schedule=useAskSchedule(enabled&&userRef!==null?userRef:null),readSession=useCallback(()=>userRef===null?null:textingAskSession(userRef),[userRef]),current=useSyncExternalStore(subscribeTextingAskSessions,readSession,readSession),update2=useCallback(entry=>{userRef!==null&&setTextingAskSession(userRef,entry)},[userRef]),mine=current!==null&&current.surface===surface,handedOff=current!==null&&current.fromPrompt===true,stage=mine?current.stage==="handoff"?"hidden":current.stage:surface==="prompt"&&handedOff?"dismissed":"hidden",now=Date.now(),scheduleEligible=schedule.status==="ready"&&isTextingAskEligible(schedule.read,now),[readFor,setReadFor]=useState(null),entryRead=entryWanted&&userRef!==null&&granted,texting=useTextingState(userRef!==null&&readFor===userRef||stage!=="hidden"||mine||entryRead),identity=identityOf(texting),{readEnabled:readEnabled,due:due}=resolveTextingAskDue({enabled:enabled,capabilityGranted:granted,hasProfile:texting.profile!==null,signedIn:userRef!==null,scheduleEligible:scheduleEligible,offeredThisSession:current!==null,identity:identity,surfaceReady:ready});useEffect(()=>{readEnabled&&userRef!==null&&setReadFor(userRef)},[readEnabled,userRef]);let askNumber=current?.askNumber??(schedule.status==="ready"&&schedule.read.status==="ok"?nextTextingAskNumber(schedule.read.entry):1);useEffect(()=>{!due||userRef===null||textingAskSession(userRef)!==null||update2({surface:surface,stage:"offered",answered:false,askNumber:askNumber})},[due,userRef,update2,askNumber,surface]),useEffect(()=>{!mine||current.stage!=="handoff"||enabled&&ready&&granted&&texting.profile!==null&&identity==="none"&&update2({...current,stage:"offered"})},[mine,current,enabled,ready,granted,texting.profile,identity,update2]);let completed=schedule.status==="ready"&&schedule.read.status==="ok"&&schedule.read.entry.completed;useEffect(()=>{userRef===null||identity!=="exists"||completed||schedule.status!=="ready"||markTextingAskCompleted(kv,userRef)},[identity,completed,schedule.status,kv,userRef]),useEffect(()=>{mine&&current.stage==="enrolling"&&texting.status==="verified"&&update2({...current,stage:"verified"})},[mine,current,texting.status,update2]);let answer=useCallback(entry=>userRef===null||entry.answered?entry:(recordTextingAsk(kv,userRef),{...entry,answered:true}),[kv,userRef]),accept=useCallback(()=>{mine&&current.stage==="offered"&&update2({...current,stage:"enrolling"})},[mine,current,update2]),close=useCallback(()=>{if(!mine||current.stage!=="enrolling")return;let{back:back,...rest}=current;update2({...rest,stage:back??"offered"})},[mine,current,update2]),dismiss=useCallback(()=>{if(!(!mine||current.stage!=="offered"&&current.stage!=="enrolling")){if(surface==="prompt"){update2({...answer(current),surface:"chat",stage:"handoff",fromPrompt:true});return}current.fromPrompt===true&&current.answered&&userRef!==null&&snoozeTextingAsk(kv,userRef),update2({...answer(current),stage:"dismissed"})}},[mine,current,surface,update2,answer,kv,userRef]),{start:startCode}=texting,start=useCallback(async phone=>!mine||current.stage!=="enrolling"?false:(current.answered||update2(answer(current)),startCode(phone)),[mine,current,update2,answer,startCode]),canOpen=entryRead&&texting.profile!==null&&identity==="none"&&stage!=="enrolling"&&stage!=="verified",open=useCallback(()=>{if(!canOpen||userRef===null)return;let was=mine?current:null;update2({surface:surface,stage:"enrolling",answered:was?.answered??false,askNumber:current?.askNumber??askNumber,...was?.fromPrompt===true?{fromPrompt:true}:{},back:was?.stage==="offered"?"offered":"dismissed"})},[canOpen,userRef,mine,current,update2,surface,askNumber]),brand=texting.profile?.brandName??"";return useMemo(()=>({stage:userRef===null?"hidden":stage,brand:brand,askNumber:askNumber,texting:texting,accept:accept,dismiss:dismiss,close:close,start:start,canOpen:canOpen,open:open}),[userRef,stage,brand,askNumber,texting,accept,dismiss,close,start,canOpen,open])}var ABSOLUTE_FILL=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:enabled,ready:ready,onAsk:onAsk,entry:entry=false}){let ask=useTextingAsk({enabled:enabled,ready:ready,surface:"chat",entry:entry});return useEffect(()=>{callHost(onAsk,ask)},[ask,onAsk]),null}function textingAskLines(ask){return{line:TEXTING_BRAND_COPY.chatAskLine(ask.brand),accept:TEXTING_COPY.promptAccept,dismiss:TEXTING_COPY.promptDismiss,verified:TEXTING_BRAND_COPY.chatAskVerified(ask.brand)}}function ChatTextingAskComposer({ask:ask}){let theme=useEverfurTheme(),styles=useMemo(()=>makeAskStyles(theme),[theme]);/* @__PURE__ */
159
160
  return jsx(AskEntry,{ask:ask,styles:styles})}function AskEntry({ask:ask,styles:styles}){let{texting:texting}=ask,{status:status,profile:profile,snapshot:snapshot}=texting,[phone,setPhone]=useState(""),[consented,setConsented]=useState(false),[code,setCode]=useState(""),[problem,setProblem]=useState(null),onNumber=status==="enroll"||status==="requesting"&&!snapshot.resending,onCode=status==="code"||status==="confirming"||status==="requesting";useEffect(()=>{setProblem(null)},[status]);let close=/* @__PURE__ */jsxs(Pressable,{onPress:ask.close,accessibilityRole:"button",accessibilityLabel:TEXTING_COPY.close,hitSlop:8,style:styles.close,testID:"texting-ask-close",children:[
160
161
  /* @__PURE__ */jsx(View,{style:[styles.closeBar,styles.closeBarA]}),
161
162
  /* @__PURE__ */jsx(View,{style:[styles.closeBar,styles.closeBarB]})]}),refusal=snapshot.error===null?null:/* @__PURE__ */jsxs(View,{style:styles.notice,accessibilityRole:"alert",children:[
@@ -1,9 +1,10 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode, CSSProperties } from 'react';
2
3
  import { a as CapabilityDecision } from './resolve.d-CoQWUy1Y.js';
3
4
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
4
5
  import { P as PetRef } from './ids.d-B2GAAifq.js';
5
- import { b as HealthPlanFocusDesign, c as HealthPlanFocusCopy, d as HealthPlanFocusClassNames, e as HealthPlanFocusIcon, f as HealthPlanItem, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-C0Tr0oVJ.js';
6
- import { H as HealthPlanBlanksFacts, a as HealthPlanPriceFormat, b as HealthPlanLayoutProps, c as HealthPlanEmptyCopy } from './usePresentation.d-BGz32Vlm.js';
6
+ import { b as HealthPlanFocusDesign, c as HealthPlanFocusCopy, d as HealthPlanFocusClassNames, e as HealthPlanFocusIcon, f as HealthPlanItem, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-CjL6Cj0m.js';
7
+ import { H as HealthPlanBlanksFacts, a as HealthPlanPriceFormat, b as HealthPlanLayoutProps, c as HealthPlanEmptyCopy } from './usePresentation.d-Bne14SlX.js';
7
8
  import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
8
9
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
9
10
  import { i as EverfurPresentationInput } from './presentation.d-vy8kTGfR.js';
@@ -1,9 +1,10 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode, CSSProperties } from 'react';
2
3
  import { a as CapabilityDecision } from './resolve.d-CoQWUy1Y.cjs';
3
4
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
4
5
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
5
- import { b as HealthPlanFocusDesign, c as HealthPlanFocusCopy, d as HealthPlanFocusClassNames, e as HealthPlanFocusIcon, f as HealthPlanItem, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-jQWp0hdK.cjs';
6
- import { H as HealthPlanBlanksFacts, a as HealthPlanPriceFormat, b as HealthPlanLayoutProps, c as HealthPlanEmptyCopy } from './usePresentation.d-DYTF_ZGf.cjs';
6
+ import { b as HealthPlanFocusDesign, c as HealthPlanFocusCopy, d as HealthPlanFocusClassNames, e as HealthPlanFocusIcon, f as HealthPlanItem, g as HealthPlanSubscription, h as HealthPlanOneBoxOrder, i as HealthPlanSubscriptionRepository, j as HealthPlanPageRepository, k as HealthPlanShopOrder, l as HealthPlanCheckoutProvider } from './focus.d-BHm_QtQ9.cjs';
7
+ import { H as HealthPlanBlanksFacts, a as HealthPlanPriceFormat, b as HealthPlanLayoutProps, c as HealthPlanEmptyCopy } from './usePresentation.d-BcdCIuEU.cjs';
7
8
  import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
8
9
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
9
10
  import { i as EverfurPresentationInput } from './presentation.d-vy8kTGfR.cjs';
@@ -1,4 +1,5 @@
1
- import { p as RecordsTimelineView } from './depth.d-D2e5WZuE.cjs';
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { p as RecordsTimelineView } from './depth.d-DYnkz8Re.cjs';
2
3
 
3
4
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
4
5
  interface TimelineRow {
@@ -1,4 +1,5 @@
1
- import { p as RecordsTimelineView } from './depth.d-COFxYWLU.js';
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { p as RecordsTimelineView } from './depth.d-D7kKiYl7.js';
2
3
 
3
4
  type TimelineRowKind = 'visit' | 'vaccine' | 'weight' | 'medication';
4
5
  interface TimelineRow {
@@ -1,5 +1,6 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  /** The fixed set of slot names, in the order the surfaces list them. */
2
- declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel"];
3
+ declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel", "planWash", "planChip"];
3
4
  type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
4
5
  /** The allow-listed paint keys a slot accepts. */
5
6
  declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
@@ -1,5 +1,6 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  /** The fixed set of slot names, in the order the surfaces list them. */
2
- declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel"];
3
+ declare const THEME_SLOT_NAMES: readonly ["composerInput", "sendButton", "userBubble", "assistantBubble", "vetBubble", "recordCard", "vetVisitButton", "primaryButton", "link", "header", "banner", "chip", "card", "input", "tab", "bookingStep", "dialog", "cartBar", "planCard", "planReasonLabel", "planWash", "planChip"];
3
4
  type EverfurThemeSlotName = (typeof THEME_SLOT_NAMES)[number];
4
5
  /** The allow-listed paint keys a slot accepts. */
5
6
  declare const THEME_SLOT_KEYS: readonly ["backgroundColor", "borderColor", "borderRadius", "textColor"];
@@ -1,5 +1,6 @@
1
- import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-DxJSoFce.js';
2
- import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-DarDaV39.js';
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-y6c0UwhE.js';
3
+ import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-BUVqme2D.js';
3
4
 
4
5
  /** One partner input the contrast guard adjusted. */
5
6
  interface EverfurThemeAdjustment {
@@ -1,5 +1,6 @@
1
- import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-CTXTUg_8.cjs';
2
- import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-DarDaV39.cjs';
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
+ import { C as ClientBranding, E as EverfurThemeInput } from './branding.d-Bbc6p1XY.cjs';
3
+ import { m as EverfurTheme, d as EverfurFontWeight, a as EverfurFontFaceKey } from './tokens.d-BUVqme2D.cjs';
3
4
 
4
5
  /** One partner input the contrast guard adjusted. */
5
6
  interface EverfurThemeAdjustment {
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.cjs';
2
3
 
3
4
  /** The subset of `fetch` this adapter calls. */
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { F as FileHandle, U as UploadTransport } from './ports.d-BX4f4UsB.js';
2
3
 
3
4
  /** The subset of `fetch` this adapter calls. */
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  /** His drag (plan.src.html L5345-5368): out past 90px, or past 12px at more than 0.11 px/ms. */
2
3
  declare function isIntroSwipeOut(dy: number, ms: number): boolean;
3
4
 
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  /** His drag (plan.src.html L5345-5368): out past 90px, or past 12px at more than 0.11 px/ms. */
2
3
  declare function isIntroSwipeOut(dy: number, ms: number): boolean;
3
4
 
@@ -1,7 +1,8 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode } from 'react';
2
3
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
3
4
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
4
- import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-jQWp0hdK.cjs';
5
+ import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-BHm_QtQ9.cjs';
5
6
  import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.cjs';
6
7
  import { d as RecordsRequestView, f as RecordsView } from './models.d-BSqvbTE1.cjs';
7
8
  import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-vy8kTGfR.cjs';
@@ -1,7 +1,8 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { ReactNode } from 'react';
2
3
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
3
4
  import { P as PetRef } from './ids.d-B2GAAifq.js';
4
- import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-C0Tr0oVJ.js';
5
+ import { f as HealthPlanItem, m as HealthPlan, n as HealthPlanRepository, o as HealthPlanReasonKind } from './focus.d-CjL6Cj0m.js';
5
6
  import { L as LifecyclePort } from './LifecyclePort.d-Cr1p33a7.js';
6
7
  import { d as RecordsRequestView, f as RecordsView } from './models.d-DOwnr8fi.js';
7
8
  import { i as EverfurPresentationInput, h as EverfurPresentation } from './presentation.d-vy8kTGfR.js';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
2
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
3
4
  import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.cjs';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
3
4
  import { R as RecordsRequestId, P as PetRef } from './ids.d-B2GAAifq.js';
@@ -1,7 +1,8 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
3
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
3
4
  import { P as PetRef } from './ids.d-B2GAAifq.js';
4
- import { l as RecordsDepthClient } from './depth.d-COFxYWLU.js';
5
+ import { l as RecordsDepthClient } from './depth.d-D7kKiYl7.js';
5
6
 
6
7
  type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
7
8
  /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
@@ -1,7 +1,8 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
2
3
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
3
4
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
4
- import { l as RecordsDepthClient } from './depth.d-D2e5WZuE.cjs';
5
+ import { l as RecordsDepthClient } from './depth.d-DYnkz8Re.cjs';
5
6
 
6
7
  type RecordsDepthStatus = 'loading' | 'empty' | 'error' | 'populated';
7
8
  /** One depth read as a render state. `withheld` (no consent, or a fail-closed parse) renders nothing. */
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
2
3
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
3
4
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
3
  import { P as PetRef } from './ids.d-B2GAAifq.js';
3
4
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  "use strict";var react=require("react"),reactNative=require("react-native"),jsxRuntime=require("react/jsx-runtime");var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
2
3
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
3
4
  /* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.cjs';
2
3
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
3
4
  import { E as EverfurResult } from '../EverfurResult.d-BFH-3s6E.cjs';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.js';
2
3
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
3
4
  import { E as EverfurResult } from '../EverfurResult.d-D_-254ZY.js';
@@ -1,3 +1,4 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import{createContext,forwardRef,createElement,useState,useEffect,useCallback,useSyncExternalStore,useMemo,useContext,Component}from"react";import{TextInput,View,ActivityIndicator,Pressable,ScrollView,StyleSheet,Text as Text$1}from"react-native";import{jsx,jsxs}from"react/jsx-runtime";var CONTRACT_RETRYABILITY=/* @__PURE__ */Object.freeze([
2
3
  /* @__PURE__ */Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),
3
4
  /* @__PURE__ */Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),
@@ -1,11 +1,12 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.cjs';
2
3
  import { P as PetRef } from './ids.d-B2GAAifq.cjs';
3
- import { E as RecordMarkersView } from './depth.d-D2e5WZuE.cjs';
4
- import { R as RecordsDepthStatus } from './useRecordsDepth.d--LLA_4ga.cjs';
4
+ import { E as RecordMarkersView } from './depth.d-DYnkz8Re.cjs';
5
+ import { R as RecordsDepthStatus } from './useRecordsDepth.d-DAa169VY.cjs';
5
6
  import { E as EverfurResult } from './EverfurResult.d-BFH-3s6E.cjs';
6
7
  import { g as RecordPdfLink, i as RecordShareAudienceScope, R as RecordShareAudience, c as RecordShareLink, d as RecordShareEmailInput, e as RecordShareEmailReceipt } from './features.d-DrQxTw3-.cjs';
7
8
  import { a as RecordEntity, d as RecordsRequestView } from './models.d-BSqvbTE1.cjs';
8
- import { a as RecordsClinicBatchClient } from './clinicBatch.d-Ccmrngcu.cjs';
9
+ import { a as RecordsClinicBatchClient } from './clinicBatch.d-C5deJ4xY.cjs';
9
10
  import { R as RecordsClinicController } from './clinicRequestProps.d-1dCtouGA.cjs';
10
11
 
11
12
  interface UseRecordsMarkersState {
@@ -1,11 +1,12 @@
1
+ /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
1
2
  import { E as EverfurError } from './EverfurError.d-8NHtlgzA.js';
2
3
  import { P as PetRef } from './ids.d-B2GAAifq.js';
3
- import { E as RecordMarkersView } from './depth.d-COFxYWLU.js';
4
- import { R as RecordsDepthStatus } from './useRecordsDepth.d-BQRL0Hez.js';
4
+ import { E as RecordMarkersView } from './depth.d-D7kKiYl7.js';
5
+ import { R as RecordsDepthStatus } from './useRecordsDepth.d-Cd6J03o5.js';
5
6
  import { E as EverfurResult } from './EverfurResult.d-D_-254ZY.js';
6
7
  import { g as RecordPdfLink, i as RecordShareAudienceScope, R as RecordShareAudience, c as RecordShareLink, d as RecordShareEmailInput, e as RecordShareEmailReceipt } from './features.d-DrQxTw3-.js';
7
8
  import { a as RecordEntity, d as RecordsRequestView } from './models.d-DOwnr8fi.js';
8
- import { a as RecordsClinicBatchClient } from './clinicBatch.d-D9Ci7IpP.js';
9
+ import { a as RecordsClinicBatchClient } from './clinicBatch.d-D68RYvc3.js';
9
10
  import { R as RecordsClinicController } from './clinicRequestProps.d-CjsMg_OD.js';
10
11
 
11
12
  interface UseRecordsMarkersState {