@everfur/sdk 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chat.d-B4GybUU4.d.ts → Chat.d-BIr_4AJt.d.ts} +1 -1
- package/dist/{Chat.d-DPM2ncxi.d.cts → Chat.d-BhevtXn9.d.cts} +1 -1
- package/dist/{DepthViews.d-BGspxovy.d.cts → DepthViews.d-C8KdfzwR.d.cts} +1 -1
- package/dist/{DepthViews.d-BaLh7Lsi.d.cts → DepthViews.d-DWQ-J208.d.cts} +1 -1
- package/dist/{DepthViews.d-BIHVrf9r.d.ts → DepthViews.d-DYVUq4Xk.d.ts} +1 -1
- package/dist/{DepthViews.d-CEVk9poG.d.ts → DepthViews.d-oKr9R0Ql.d.ts} +1 -1
- package/dist/{IntakeMedia.d-CwSkSLNM.d.ts → IntakeMedia.d-B-ZZK6vd.d.ts} +1 -1
- package/dist/{IntakeMedia.d-LRXO38_z.d.cts → IntakeMedia.d-CuVkzIsO.d.cts} +1 -1
- package/dist/{IntakeMedia.d-DmaeGU6T.d.cts → IntakeMedia.d-CyF6NPHx.d.cts} +1 -1
- package/dist/{IntakeMedia.d-Dyb9R8b0.d.ts → IntakeMedia.d-vU8g9OM5.d.ts} +1 -1
- package/dist/{RecordsPage.d-D10RIgdc.d.ts → RecordsPage.d-DU8Nswzh.d.ts} +1 -1
- package/dist/{RecordsPage.d-DbhYNSbq.d.cts → RecordsPage.d-DzPhqMHW.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments.d-CF4lLuGK.d.cts → attachments.d-0nOPDIng.d.cts} +1 -1
- package/dist/{attachments.d-BlukNfIf.d.ts → attachments.d-BlyI-RCY.d.ts} +1 -1
- package/dist/{bookingCopy.d-Bn8bdo89.d.ts → bookingCopy.d-ClL8OxBS.d.ts} +3 -3
- package/dist/{bookingCopy.d-Dg7bPM-U.d.cts → bookingCopy.d-DUVqhF5f.d.cts} +3 -3
- package/dist/{branding.d-XrZYClN4.d.ts → branding.d-D0LV3aFE.d.ts} +1 -1
- package/dist/{branding.d-CqDLKj1U.d.cts → branding.d-DzSPLZKl.d.cts} +1 -1
- package/dist/{casesRepository.d-CVuKTkJo.d.cts → casesRepository.d-DnanKXJ1.d.cts} +1 -1
- package/dist/{casesRepository.d-Dn1fK1b2.d.ts → casesRepository.d-_4QucKVC.d.ts} +1 -1
- package/dist/chat/index.cjs +239 -238
- package/dist/chat/index.d.cts +11 -11
- package/dist/chat/index.d.ts +11 -11
- package/dist/chat/index.js +241 -240
- package/dist/chat/lite/index.cjs +239 -238
- package/dist/chat/lite/index.d.cts +11 -11
- package/dist/chat/lite/index.d.ts +11 -11
- package/dist/chat/lite/index.js +239 -238
- package/dist/chat-cards/index.cjs +2 -2
- package/dist/chat-cards/index.js +9 -9
- package/dist/{chatHandoffToken.d-zdp23Ukr.d.ts → chatHandoffToken.d-BoZGGbIB.d.ts} +5 -5
- package/dist/{chatHandoffToken.d-Cap2z62P.d.cts → chatHandoffToken.d-DhhGdLNH.d.cts} +5 -5
- package/dist/{checkin.d-CuIUahcd.d.cts → checkin.d-DB-HlK7r.d.cts} +9 -4
- package/dist/{checkin.d-BoZXWjxX.d.ts → checkin.d-DogrR06X.d.ts} +9 -4
- package/dist/{chunk-LMIBOI3I.js → chunk-6E3J6IVM.js} +13 -13
- package/dist/{chunk-6AIEUA4V.js → chunk-J5ZUBY3S.js} +1 -1
- package/dist/{chunk-BN7OAFBS.js → chunk-LPHBCDJP.js} +21 -21
- package/dist/{chunk-IXHLESYC.js → chunk-ULQDOC75.js} +1 -1
- package/dist/client/index.cjs +28 -27
- package/dist/client/index.d.cts +13 -13
- package/dist/client/index.d.ts +13 -13
- package/dist/client/index.js +25 -24
- package/dist/{clinicBatch.d-C0xx5L4j.d.cts → clinicBatch.d-BvPF6vXS.d.cts} +2 -2
- package/dist/{clinicBatch.d-DNi4UURs.d.ts → clinicBatch.d-CF0GIvpx.d.ts} +2 -2
- package/dist/{config.d-B7Z-KTGq.d.ts → config.d-Bc41Ax6M.d.ts} +5 -1
- package/dist/{config.d-ClAI2RZ6.d.cts → config.d-Bn6GEGfl.d.cts} +5 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/{context.d-D7zX6Q0J.d.ts → context.d-0QfLaI3W.d.ts} +5 -5
- package/dist/{context.d-guaLkx5t.d.cts → context.d-CyQpedoU.d.cts} +5 -5
- package/dist/{copy.d--F5A9cXK.d.cts → copy.d-B55PpLxr.d.cts} +2 -2
- package/dist/{copy.d-DmxuFJFe.d.ts → copy.d-B8wIE6cH.d.ts} +2 -2
- package/dist/core/index.cjs +32 -31
- package/dist/core/index.d.cts +22 -16
- package/dist/core/index.d.ts +22 -16
- package/dist/core/index.js +37 -36
- package/dist/{depth.d-CgzYE6_n.d.ts → depth.d-CrtZXnLy.d.ts} +2 -2
- package/dist/{depth.d-DLaP0o8Y.d.cts → depth.d-Cxz6VisZ.d.cts} +2 -2
- package/dist/{entitlementRepository.d-CkUTlVAb.d.ts → entitlementRepository.d-BaZTIe1B.d.ts} +3 -3
- package/dist/{entitlementRepository.d-DVTp-BB9.d.cts → entitlementRepository.d-YeNG2TKI.d.cts} +3 -3
- package/dist/{focus.d-u-HYvim0.d.ts → focus.d-520VEHKB.d.ts} +1 -1
- package/dist/{focus.d-CLTjm6In.d.cts → focus.d-DoempN1I.d.cts} +1 -1
- package/dist/health-plan/index.cjs +236 -235
- package/dist/health-plan/index.d.cts +15 -15
- package/dist/health-plan/index.d.ts +15 -15
- package/dist/health-plan/index.js +236 -235
- package/dist/{healthPlanRepository.d-CwRXeoM7.d.ts → healthPlanRepository.d-BHu9LO0r.d.ts} +2 -2
- package/dist/{healthPlanRepository.d-B22kjrYa.d.cts → healthPlanRepository.d-tUR1f_5s.d.cts} +2 -2
- package/dist/{idempotency.d-DrxKLPPe.d.cts → idempotency.d-CcFLvzYW.d.cts} +1 -1
- package/dist/{idempotency.d-CbB07p64.d.ts → idempotency.d-CvqKG3Uq.d.ts} +1 -1
- package/dist/{identity.d-D4VtpqRr.d.ts → identity.d-Bex_XJZx.d.ts} +1 -1
- package/dist/{identity.d-DDpXOtas.d.cts → identity.d-Dm0Buvn8.d.cts} +1 -1
- package/dist/{inbox.d-B2JXK0uI.d.ts → inbox.d-9ajb0oiJ.d.ts} +1 -1
- package/dist/{inbox.d-CwA1ogzV.d.cts → inbox.d-CGCYOZIq.d.cts} +1 -1
- package/dist/index.cjs +259 -258
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +258 -257
- package/dist/{introEvents.d-DW3gLljE.d.ts → introEvents.d-CuVaufTy.d.ts} +1 -1
- package/dist/{introEvents.d-B7acmGwf.d.cts → introEvents.d-DU6feqx4.d.cts} +1 -1
- package/dist/{layout.d-C8y_ki1V.d.ts → layout.d-BQ5IVS-m.d.ts} +1 -1
- package/dist/{layout.d-DfaFM_lp.d.cts → layout.d-CSPr33BP.d.cts} +1 -1
- package/dist/notifications/inbox/index.d.cts +6 -6
- package/dist/notifications/inbox/index.d.ts +6 -6
- package/dist/notifications/index.d.cts +7 -7
- package/dist/notifications/index.d.ts +7 -7
- package/dist/{optInView.d-Cps7aLQN.d.ts → optInView.d-DpGXnpGw.d.ts} +21 -3
- package/dist/{optInView.d-ChJyJMBA.d.cts → optInView.d-dLjrI3co.d.cts} +21 -3
- package/dist/{pets.d-BpLObpfM.d.ts → pets.d-CHdSIoBf.d.ts} +1 -1
- package/dist/{pets.d-DXhzTNuI.d.cts → pets.d-jnhrJhqm.d.cts} +1 -1
- package/dist/{petsRepository.d-ai_tZ3lu.d.cts → petsRepository.d-BeKRiNao.d.cts} +1 -1
- package/dist/{petsRepository.d-_QfM7F6T.d.ts → petsRepository.d-BjwB1vku.d.ts} +1 -1
- package/dist/{presentation.d-BkIvMtIl.d.cts → presentation.d-Br3TnwA6.d.cts} +17 -1
- package/dist/{presentation.d-BkIvMtIl.d.ts → presentation.d-Br3TnwA6.d.ts} +17 -1
- package/dist/records/depth/index.d.cts +9 -9
- package/dist/records/depth/index.d.ts +9 -9
- package/dist/records/index.cjs +237 -228
- package/dist/records/index.d.cts +39 -12
- package/dist/records/index.d.ts +39 -12
- package/dist/records/index.js +155 -146
- package/dist/{requestFunnel.d-DKBPTpsy.d.ts → requestFunnel.d-C_NMgz9R.d.ts} +2 -2
- package/dist/{requestFunnel.d-BwZDfWVD.d.cts → requestFunnel.d-DoJWLySc.d.cts} +2 -2
- package/dist/{route.d-QBCoO62z.d.cts → route.d-BW2abFVK.d.cts} +2 -2
- package/dist/{route.d-B3u14HJT.d.ts → route.d-Olr_gXaa.d.ts} +2 -2
- package/dist/{runtimeTypes.d-hjN6xvxm.d.ts → runtimeTypes.d-Bp2VW6YE.d.ts} +6 -6
- package/dist/{runtimeTypes.d-BSxuUCOX.d.cts → runtimeTypes.d-StvJY45N.d.cts} +6 -6
- package/dist/{screenProps.d-fHBKArt_.d.ts → screenProps.d-BTLSji0N.d.ts} +1 -1
- package/dist/{screenProps.d-6xmE1C-V.d.cts → screenProps.d-B_5Bh7aQ.d.cts} +1 -1
- package/dist/server/events/index.cjs +2 -2
- package/dist/server/events/index.d.cts +19 -5
- package/dist/server/events/index.d.ts +19 -5
- package/dist/server/events/index.js +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/slots/index.cjs +200 -199
- package/dist/slots/index.d.cts +5 -5
- package/dist/slots/index.d.ts +5 -5
- package/dist/slots/index.js +200 -199
- package/dist/tabs/index.cjs +200 -190
- package/dist/tabs/index.d.cts +68 -11
- package/dist/tabs/index.d.ts +68 -11
- package/dist/tabs/index.js +201 -191
- package/dist/tabs-bar/index.cjs +247 -0
- package/dist/tabs-bar/index.d.cts +10 -0
- package/dist/tabs-bar/index.d.ts +10 -0
- package/dist/tabs-bar/index.js +247 -0
- package/dist/{tabsModel.d-D9GWPFrL.d.ts → tabsModel.d-B4MSQB57.d.cts} +5 -2
- package/dist/{tabsModel.d-D9GWPFrL.d.cts → tabsModel.d-C8pd-DP3.d.ts} +5 -2
- package/dist/televet/booking/index.cjs +147 -145
- package/dist/televet/booking/index.d.cts +10 -10
- package/dist/televet/booking/index.d.ts +10 -10
- package/dist/televet/booking/index.js +163 -161
- package/dist/televet/call/index.cjs +52 -52
- package/dist/televet/call/index.d.cts +5 -0
- package/dist/televet/call/index.d.ts +5 -0
- package/dist/televet/call/index.js +25 -25
- package/dist/televet/index.d.cts +3 -3
- package/dist/televet/index.d.ts +3 -3
- package/dist/{televetGlobal.d-gZrXPaLl.d.cts → televetGlobal.d-B_I_fy7O.d.cts} +9 -0
- package/dist/{televetGlobal.d-DkJkV55Y.d.ts → televetGlobal.d-DN7o45WJ.d.ts} +9 -0
- package/dist/testing/index.cjs +3 -3
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +3 -3
- package/dist/testing/rn/index.d.cts +9 -9
- package/dist/testing/rn/index.d.ts +9 -9
- package/dist/testing/web/index.d.cts +9 -9
- package/dist/testing/web/index.d.ts +9 -9
- package/dist/texting/index.cjs +32 -27
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/texting/index.js +52 -47
- package/dist/{threadOptions.d-NSlFx-Lp.d.ts → threadOptions.d-D_3hk79R.d.ts} +5 -5
- package/dist/{threadOptions.d-Dc57dm7h.d.cts → threadOptions.d-D_GU6lp9.d.cts} +5 -5
- package/dist/{timelineRows.d-CthNM5hV.d.ts → timelineRows.d-BbVuARtc.d.ts} +1 -1
- package/dist/{timelineRows.d-7w8NsNi4.d.cts → timelineRows.d-BiLAAbYl.d.cts} +1 -1
- package/dist/{typeStyle.d-8mcLhtbH.d.ts → typeStyle.d-DSk99BuZ.d.ts} +1 -1
- package/dist/{typeStyle.d-CLrQZW-r.d.cts → typeStyle.d-DqR6mWCF.d.cts} +1 -1
- package/dist/{useHealthPlanSubscription.d-CV7M21HS.d.ts → useHealthPlanSubscription.d-CpE6l1VW.d.ts} +3 -3
- package/dist/{useHealthPlanSubscription.d-SA9-SuKe.d.cts → useHealthPlanSubscription.d-DRiWDJXq.d.cts} +3 -3
- package/dist/{useInboxUnread.d-0DrQPn7J.d.ts → useInboxUnread.d-BV7PkWDH.d.ts} +1 -1
- package/dist/{useInboxUnread.d-CRcOTkmu.d.cts → useInboxUnread.d-CElyXBkY.d.cts} +1 -1
- package/dist/{usePresentation.d-BJzFicRQ.d.cts → usePresentation.d-BcazazQH.d.cts} +3 -3
- package/dist/{usePresentation.d-DgSGIWS-.d.ts → usePresentation.d-CMOypLlH.d.ts} +3 -3
- package/dist/{useRecordsDepth.d-ZX2rhcUx.d.ts → useRecordsDepth.d-Bka4KQhq.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-C9W45gwS.d.cts → useRecordsDepth.d-TgmpxKdX.d.cts} +1 -1
- package/dist/{useUnread.d-4SbFChbd.d.ts → useUnread.d-CGqaP-dB.d.ts} +27 -5
- package/dist/{useUnread.d-B0YhhR_D.d.cts → useUnread.d-DVVnYNPU.d.cts} +27 -5
- package/dist/{view.d-3lxzyJlL.d.cts → view.d-CwruYhQy.d.cts} +3 -3
- package/dist/{view.d-DRiYNQJ8.d.ts → view.d-DamH8TQF.d.ts} +3 -3
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/health-plan/index.cjs +9 -8
- package/dist/web/health-plan/index.d.cts +16 -16
- package/dist/web/health-plan/index.d.ts +16 -16
- package/dist/web/health-plan/index.js +49 -48
- package/dist/web/inbox/index.d.cts +7 -7
- package/dist/web/inbox/index.d.ts +7 -7
- package/dist/web/index.cjs +185 -184
- package/dist/web/index.d.cts +32 -32
- package/dist/web/index.d.ts +32 -32
- package/dist/web/index.js +187 -186
- package/dist/web/intro/index.d.cts +7 -7
- package/dist/web/intro/index.d.ts +7 -7
- package/dist/web/notifications/index.d.cts +6 -6
- package/dist/web/notifications/index.d.ts +6 -6
- package/dist/web/records/depth/index.d.cts +9 -9
- package/dist/web/records/depth/index.d.ts +9 -9
- package/dist/web/records/index.d.cts +11 -11
- package/dist/web/records/index.d.ts +11 -11
- package/dist/web/records-sheet/index.cjs +111 -110
- package/dist/web/records-sheet/index.js +111 -110
- package/dist/web/shop/index.cjs +1 -1
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/shop/index.js +1 -1
- package/dist/web/televet/booking/index.cjs +3 -3
- package/dist/web/televet/booking/index.d.cts +10 -10
- package/dist/web/televet/booking/index.d.ts +10 -10
- package/dist/web/televet/booking/index.js +69 -69
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/televet/index.d.cts +3 -3
- package/dist/web/televet/index.d.ts +3 -3
- package/dist/web/texting/index.cjs +34 -29
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/dist/web/texting/index.js +45 -40
- package/dist/web/ui/index.cjs +1 -1
- package/dist/web/ui/index.js +33 -33
- package/package.json +16 -1
- package/tabs-bar/package.json +8 -0
package/dist/tabs/index.cjs
CHANGED
|
@@ -1,206 +1,216 @@
|
|
|
1
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
|
-
"use strict";var e=require("@everfur/sdk/chat"),t=require("@everfur/sdk/health-plan"),n=require("@everfur/sdk/records"),r=require("react"),o=require("react-native"),i=require("react/jsx-runtime"),a=require("@everfur/sdk/notifications/inbox"),l=require("@everfur/sdk/televet"),s=require("react-native-safe-area-context");function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:true,get:function(){return e[n]}})}})}t.default=e;return Object.freeze(t)}var c=/*#__PURE__*/d(o);var u=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),p=globalThis;function f(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var h=p[u],g=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),b=f(h)?h:p[u]=g(),m=b.landed,y=b.noVet,k=b.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...m])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return m.add(e),()=>{m.delete(e)}}function setHealthPlanNoVet(petRef,e){if((k.get(petRef)??false)!==e){e?k.set(petRef,true):k.delete(petRef);for(let t of[...y])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return k.get(petRef)??false}function onHealthPlanNoVet(e){return y.add(e),()=>{y.delete(e)}}var v=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],w=/* @__PURE__ */Object.freeze(v.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(w.map(e=>e.wireCode));var x=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),S=/* @__PURE__ */Object.freeze(w.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:x[e.wireCode]}))),_=new Map(S.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),C=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(S.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...C]){let t=_.get(e+n);if(t)return t}}var R=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return R[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var j=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return j.has(e)}var A=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||A.has(e)}var F=500,E=8e3,I=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(F*2**n,E);return Math.floor(t()*r)}var T="This feature isn't available on your account right now.",D="Something in that request was not right. Check the details and try again.",P=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:T,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:D,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:T,runtimeDisposed:D,unknown:"Something went wrong. Please try again."}),O="This session has ended. Please sign in again.",z="linked_account_read_only";function V(e,t,n){return e==="conflict"&&n===z?T:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?O:userFacingError(e)}function userFacingError(e){return P[e]}function B(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var N=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===z,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:V(e,t?.wireCode,r?z:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&N.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&B(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&B(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
2
|
+
"use strict";var e=require("@everfur/sdk/chat"),t=require("@everfur/sdk/health-plan"),n=require("@everfur/sdk/records"),r=require("@everfur/sdk/televet"),o=require("react"),i=require("react-native"),a=require("react/jsx-runtime"),l=require("@everfur/sdk/notifications/inbox"),s=require("react-native-safe-area-context");function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:true,get:function(){return e[n]}})}})}t.default=e;return Object.freeze(t)}var c=/*#__PURE__*/d(i);var u=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),p=globalThis;function f(e){if(typeof e!="object"||e===null)return false;let t=e;return t.landed instanceof Set&&t.noVet instanceof Set&&t.noVetByPet instanceof Map}var h=p[u],g=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),b=f(h)?h:p[u]=g(),m=b.landed,y=b.noVet,v=b.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...m])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return m.add(e),()=>{m.delete(e)}}function setHealthPlanNoVet(petRef,e){if((v.get(petRef)??false)!==e){e?v.set(petRef,true):v.delete(petRef);for(let t of[...y])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return v.get(petRef)??false}function onHealthPlanNoVet(e){return y.add(e),()=>{y.delete(e)}}var k=[{wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true},{wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true},{wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false},{wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false},{wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false},{wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"anchor_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"anchor_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"anonTokenInvalid",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true},{wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"before_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundle_not_uploaded",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"bundles_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"catalog_empty_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"catalog_shrink_refused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"endpoint_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"environment_mismatch",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"inbox_cursor_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false},{wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"item_id_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"linked_account_read_only",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false},{wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false},{wireCode:"not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"open_url_not_allowed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false},{wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"read_target_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"restricted_key",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"session_revoked",envelope:"http_envelope",httpStatus:401,retryable:false},{wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false},{wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true},{wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"subscription_keys_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"ticket_not_resolved",envelope:"http_envelope",httpStatus:409,retryable:false},{wireCode:"tickets_disabled",envelope:"http_envelope",httpStatus:404,retryable:false},{wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"timezone_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true},{wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"unrestrictedKeyRequired",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false},{wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false},{wireCode:"user_ref_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true},{wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false},{wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false},{wireCode:"web_push_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true},{wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false},{wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false}],w=/* @__PURE__ */Object.freeze(k.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(w.map(e=>e.wireCode));var x=/* @__PURE__ */Object.freeze({ValidationException:"validationFailed",AuthorizationException:"authRejected",PaymentRequiredException:"paymentRequired",AccessDeniedException:"accessDenied",ResourceNotFoundException:"resourceNotFound",ConflictException:"conflict",ThrottlingException:"rateLimited",InternalFailureException:"internalError",NotImplementedException:"notImplemented",ServiceUnavailableException:"serviceUnavailable",MethodNotAllowedException:"validationFailed",authExpired:"authExpired",unavailable:"serviceUnavailable",session_required:"sessionRequired",session_revoked:"authExpired",anonTokenInvalid:"authRejected",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",unrestrictedKeyRequired:"accessDenied",user_ref_invalid:"validationFailed",event_cursor_invalid:"validationFailed",event_filter_invalid:"validationFailed",event_payload_invalid:"validationFailed",event_type_unknown:"validationFailed",idempotency_key_invalid:"validationFailed",idempotency_key_required:"validationFailed",idempotency_key_reused:"idempotencyConflict",payload_too_large:"validationFailed",webhook_url_rejected:"validationFailed",webhook_endpoint_update_empty:"validationFailed",webhook_endpoint_update_invalid:"validationFailed",event_type_not_available:"conflict",record_subject_not_found:"resourceNotFound",records_consent_required:"conflict",record_species_unsupported:"validationFailed",record_upload_invalid:"validationFailed",FILE_TOO_LARGE:"validationFailed",INVALID_CONTENT_TYPE:"validationFailed",attachment_unreadable:"validationFailed",provider_unsupported:"validationFailed",token_invalid:"validationFailed",device_cipher_unavailable:"serviceUnavailable",email_invalid:"validationFailed",consent_required:"validationFailed",consent_invalid:"validationFailed",consent_scope_wrong_route:"validationFailed",IDEMPOTENCY_KEY_IN_FLIGHT:"idempotencyInFlight",IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST:"idempotencyConflict",DAILY_QUOTA_EXCEEDED:"quotaExceeded",TIER_UPGRADE_REQUIRED:"paymentRequired",not_found:"conversationNotFound",timeout:"streamTimeout",internal_error:"internalError",invalid_request:"validationFailed",invalid_client:"authRejected",invalid_grant:"authRejected",unsupported_grant_type:"validationFailed",invalid_scope:"validationFailed",invalid_target:"validationFailed",invalid_redirect_uri:"validationFailed",invalid_client_metadata:"validationFailed",unsupported_response_type:"validationFailed",access_denied:"accessDenied",slow_down:"rateLimited",mcp_request_not_found:"resourceNotFound",mcp_request_gone:"resourceNotFound",mcp_connection_not_found:"resourceNotFound",mcp_request_conflict:"conflict",sandbox_only:"accessDenied",tenant_has_no_capabilities:"conflict",verify_mint_refused:"accessDenied",verify_mint_rate_limited:"rateLimited",verify_mint_unavailable:"serviceUnavailable",verify_user_ref_invalid:"validationFailed",insufficient_scope:"accessDenied",tenant_filter_invalid:"validationFailed",tenant_resource_not_found:"resourceNotFound",tenant_surface_not_enabled:"conflict",pet_health_species_unsupported:"validationFailed",pet_health_list_removals_unconfirmed:"validationFailed",petRefInUse:"conflict",share_limit_reached:"conflict",pet_not_registered:"resourceNotFound",species_unsupported:"validationFailed",partner_visit_owner_only:"accessDenied",partner_visit_link_conflict:"conflict",partner_visit_pet_already_mapped:"conflict",linked_account_read_only:"conflict",catalog_empty_refused:"conflict",catalog_shrink_refused:"conflict",endpoint_not_allowed:"validationFailed",event_id_invalid:"validationFailed",inbox_cursor_invalid:"validationFailed",item_id_invalid:"validationFailed",open_url_not_allowed:"validationFailed",read_target_invalid:"validationFailed",subscription_keys_invalid:"validationFailed",web_push_unavailable:"serviceUnavailable",anchor_not_found:"resourceNotFound",anchor_ref_invalid:"validationFailed",before_invalid:"validationFailed",bundle_mismatch:"validationFailed",bundle_not_uploaded:"validationFailed",bundles_unavailable:"serviceUnavailable",environment_mismatch:"validationFailed",restricted_key:"accessDenied",ticket_not_resolved:"conflict",tickets_disabled:"resourceNotFound",timezone_invalid:"validationFailed"}),_=/* @__PURE__ */Object.freeze(w.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:x[e.wireCode]}))),S=new Map(_.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),C=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(_.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function contractErrorFor(e,t){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let e of[t??"http_envelope",...C]){let t=S.get(e+n);if(t)return t}}var R=/* @__PURE__ */Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",identitySignatureRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"invalidRequest",runtimeDisposed:"invalidRequest",conversationNotFound:"notFound",petNotFound:"notFound",resourceNotFound:"notFound",conflict:"conflict",idempotencyConflict:"conflict",idempotencyInFlight:"conflict",streamTimeout:"connection",streamIncomplete:"connection",upstreamLlmTimeout:"connection",serviceUnavailable:"connection",internalError:"server",notImplemented:"server",mediaUploadFailed:"media",moderationBlocked:"policy",unknown:"unknown"});function categoryFor(e){return R[e]}function fromWire(e){let t=contractErrorFor(e);if(t)return t.normalized;let n=(e??"").trim().toUpperCase(),r=n.replace(/[^A-Z0-9]/g,"");if(r==="AUTHREJECTED")return"authRejected";if(n.startsWith("AUTH"))return"authExpired";switch(r){case"DAILYQUOTAEXCEEDED":case"QUOTAEXCEEDED":return"quotaExceeded";case"RATELIMITED":case"TOOMANYREQUESTS":case"TELEVETRATELIMITED":return"rateLimited";case"IDEMPOTENCYKEYCONFLICT":case"IDEMPOTENCYCONFLICT":return"idempotencyConflict";case"ACCESSDENIED":case"FORBIDDEN":return"accessDenied";case"IDENTITYSIGNATUREREQUIRED":return"identitySignatureRequired";case"FREECAPREACHED":return"paymentRequired";case"RUNTIMEDISPOSED":return"runtimeDisposed";case"NOTFOUND":case"CONVERSATIONNOTFOUND":return"conversationNotFound";case"PETNOTFOUND":return"petNotFound";case"TIMEOUT":case"STREAMTIMEOUT":return"streamTimeout";case"MEDIAUPLOADFAILED":case"UNRECOGNIZEDVIDEOFORMAT":case"FILETOOSMALL":return"mediaUploadFailed";case"MODERATIONBLOCKED":return"moderationBlocked";case"UPSTREAMLLMTIMEOUT":return"upstreamLlmTimeout";case"INTERNALERROR":case"INTERNALSERVERERROR":return"internalError";case"STREAMINCOMPLETE":case"CHATSTREAMINCOMPLETE":return"streamIncomplete";case"INVALIDANALYSISTYPE":case"INVALIDUPLOADPURPOSE":return"unknown";default:return"unknown"}}var j=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return j.has(e)}var A=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||A.has(e)}var F=500,T=8e3,I=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(F*2**n,T);return Math.floor(t()*r)}var E="This feature isn't available on your account right now.",P="Something in that request was not right. Check the details and try again.",D=/* @__PURE__ */Object.freeze({authExpired:"Please sign in again to continue.",authRejected:"Please sign in again to continue.",sessionRequired:"This app needs to be updated to keep using Everfur.",accessDenied:E,paymentRequired:"This is part of a paid plan.",quotaExceeded:"You have used today's messages. This resets tomorrow.",rateLimited:"You are sending messages quickly. Try again in a few seconds.",validationFailed:P,sdkUpdateRequired:"This app needs to be updated to keep using Everfur.",conflict:"That is already running. Wait for it to finish, then try again.",idempotencyConflict:"That message was already delivered.",idempotencyInFlight:"That is still processing. Give it a moment.",conversationNotFound:"This conversation is no longer available.",petNotFound:"We could not find that pet. Please pick a pet and try again.",resourceNotFound:"We could not find that.",streamTimeout:"The response timed out. Tap retry to try again.",mediaUploadFailed:"We could not upload that photo. Please attach it again.",moderationBlocked:"This request cannot be answered here.",upstreamLlmTimeout:"The response timed out. Tap retry to try again.",internalError:"We hit a snag on our end. Please try again.",notImplemented:"That is not available yet.",serviceUnavailable:"That service is briefly unavailable. Try again shortly.",streamIncomplete:"The connection dropped mid-answer. Tap retry to continue.",identitySignatureRequired:E,runtimeDisposed:P,unknown:"Something went wrong. Please try again."}),O="This session has ended. Please sign in again.",z="linked_account_read_only";function B(e,t,n){return e==="conflict"&&n===z?E:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?O:userFacingError(e)}function userFacingError(e){return D[e]}function V(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var N=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===z,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:B(e,t?.wireCode,r?z:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&N.test(t.reasonCode)&&(o.reasonCode=t.reasonCode);let i=t?.retryAfterSeconds;if(typeof i=="number"&&Number.isFinite(i)&&i>=0&&(o.retryAfterSeconds=Math.round(i)),n);return t?.wireMessage&&V(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&V(o,"raw",t.raw),/* @__PURE__ */Object.freeze(o)}function ok(e,t){/* @__PURE__ */
|
|
3
3
|
return Object.freeze({ok:true,value:e})}function err(e){/* @__PURE__ */
|
|
4
4
|
return Object.freeze({ok:false,error:e})}var $=class _EverfurConfigError extends Error{constructor(e,t){super(t),this.name="EverfurConfigError",this.kind=e,Object.setPrototypeOf(this,_EverfurConfigError.prototype)}};function errorFrame(e){/* @__PURE__ */
|
|
5
|
-
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var L="x-everfur-anon-token",M="anonTokenInvalid";async function
|
|
5
|
+
return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:null,...e.freeCap?{freeCap:/* @__PURE__ */Object.freeze({...e.freeCap})}:{}})}var L="x-everfur-anon-token",M="anonTokenInvalid";async function U(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function W(e,t){let n=e instanceof Error?e.message:typeof e=="string"?e:null;return makeEverfurError("authRejected",{retryable:false,...t?.wireCode?{wireCode:t.wireCode}:{},...t?.requestId?{requestId:t.requestId}:{},...n?{wireMessage:n}:{},...e!=null?{raw:e}:{}})}function authHeaders(e){let t={};return e.mode==="personalized"?t.authorization=`Bearer ${e.token}`:(t["x-everfur-partner-key"]=e.publishableKey,e.anonToken&&(t[L]=e.anonToken)),e.userRef&&(t["x-everfur-user-ref"]=e.userRef),e.sessionId&&(t["x-everfur-session-id"]=e.sessionId),t}function withAuthHeaders(e,t){return{...e,headers:{...q(e.headers),...authHeaders(t)}}}function q(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=n.toLowerCase();e==="authorization"||e==="x-everfur-partner-key"||e===L||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await U(t),r=await t.transport.request(withAuthHeaders(e,H(t,n)));if(r.ok||Y(r.error.raw)!==M||t.anonIdentity===void 0||t.userRef!==null)return r;let o=await t.anonIdentity.token({forceRefresh:true});return o===null||o===n?r:t.transport.request(withAuthHeaders(e,H(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(W(e))}let r=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:n,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));if(r.ok||r.error.httpStatus!==401)return r;let o;try{o=await t.identity.currentToken({forceRefresh:!0})}catch(e){return t.identity.reportRejected?.(),err(W(e,{wireCode:Y(r.error.raw),requestId:r.error.requestId}))}let i=await t.transport.request(withAuthHeaders(e,{mode:"personalized",token:o,userRef:t.userRef,...t.sessionId?{sessionId:t.sessionId}:{}}));return!i.ok&&i.error.httpStatus===401?(t.identity.reportRejected?.(),err(K(i.error))):i}function H(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function K(e){let t=e.raw,n=Y(t);return makeEverfurError("authRejected",{retryable:false,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId?{requestId:e.requestId}:{},...n?{wireCode:n}:{},...e.reasonCode?{reasonCode:e.reasonCode}:{},...e.wireMessage?{wireMessage:e.wireMessage}:{},...t!=null?{raw:t}:{}})}function Y(e){if(typeof e!="object"||e===null)return null;let t=e,n=(typeof t.error=="object"&&t.error!==null?t.error.code:void 0)??t.code;return typeof n=="string"&&n.length>0?n:null}function networkError(e){return makeEverfurError("internalError",{retryable:true,wireMessage:G(e)})}function G(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var J=3e4,Q=T*2,Z="idempotency-key",X=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),ee=/* @__PURE__ */Object.freeze({onEvent(){}}),te=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function ne(e){let t=e.trim().replace(/[^A-Za-z0-9_.:-]/g,"-");return t.length===0?null:`efs_${t}`.slice(0,128)}function createRequestFunnel(e){let t=e.observer??ee,n=e.timers??te,r=e.rng??Math.random,o=e.sleep??((e,t)=>ye(e,n,t)),i=e.maxAttempts??I,a=e.unaryTimeoutMs??J,l=e.newIdempotencyKey??oe(),s=e=>{try{t.onEvent(e)}catch{}};async function d(t,d,c){let u=c?.maxAttempts,p=Math.max(1,u??i),f=c?.idempotent??X.has(d.method),h=c?.idempotencyKey===void 0?null:ne(c.idempotencyKey),g=f?h??l():null,b=re(d,g),m=0;for(;;){let i=e=>/* @__PURE__ */Object.freeze({call:t,method:d.method,path:d.path,attempt:m,...g?{idempotencyKey:g}:{},...e});s(i({phase:"attempt"}));let l=be(a,n),c=me(l.signal,d.signal),f;try{f=await authedSend({...b,signal:c.signal},e.auth)}catch(e){f=err(networkError(e))}finally{c.dispose(),l.cancel()}if(f.ok)return s(i({phase:"settled",ok:true,reason:"ok"})),f;let h=f.error,y=ae(h,m,{maxAttempts:p,rng:r,now:n.now(),aborted:d.signal?.aborted===true,...u!==void 0?{perCallMaxAttempts:u}:{},...e.errorPolicy!==void 0?{policy:e.errorPolicy}:{}}),v={ok:false,code:h.code,reason:y.reason,...h.httpStatus!==void 0?{httpStatus:h.httpStatus}:{},...h.requestId!==void 0?{requestId:h.requestId}:{}};if(!y.retry)return s(i({phase:"settled",...v})),err(h);if(s(i({phase:"retry",...v,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...v,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await ge(e.auth))}async function*u(t,n,r){s(
|
|
6
6
|
/* @__PURE__ */Object.freeze({call:t,phase:"stream.open",method:n.method,path:n.path,attempt:0}));try{yield*e.auth.transport.stream(n,r)}catch{yield errorFrame({code:"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null})}}/* @__PURE__ */
|
|
7
|
-
return Object.freeze({send:d,authorize:c,stream:u})}function re(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Z&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function oe(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var ie=10;function ae(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=le(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(ie,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=se(e,n.now);return l!==null?l>Q?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function le(e){let t=e.code==="unknown"?fromWire(fe(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function se(e,t){let n=ce(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=de(e.raw);return r===null?null:Math.round(r*1e3)}function de(e){for(let t of ue(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function ce(e){for(let t of ue(e)){let e=t.resets_at,n=pe(e);if(n!==null)return n}return null}function ue(e){if(!he(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];he(r)&&t.push(r)}return t}function pe(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function fe(e){for(let t of ue(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function he(e){return typeof e=="object"&&e!==null}async function ge(e){if(e.mode==="anonymous"){let t=await W(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function be(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function me(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function ye(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var ke="/widget/v1/me/intro";function ve(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function we(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function xe(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function Se(e){let t=()=>{let{services:t}=e.registry;return _e({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(ve(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function _e(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=xe(o.value);return i===null?err(we(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:ke,signal:e.signal}:{method:"GET",path:ke};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:ke,body:{seen:true}})}}}var Ce="everfur.intro.seen.v1:",Re=userRef=>`${Ce}${userRef}`;async function je(e,userRef){try{return await e.getItem(Re(userRef))!==null}catch{return false}}async function Ae(e,userRef,t){try{await e.setItem(Re(userRef),t)}catch{}}async function Fe(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await je(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await Ae(n,userRef,o.value.seenAt),false):true}async function Ee(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await Ae(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var Ie=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Te=globalThis,De=Te[Ie]??(Te[Ie]=r.createContext(null));De.displayName??="EverfurContext";function Pe(){let e=r.useContext(De);if(e===null)throw new $("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var Oe=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${Oe(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var ze=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var Ve=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?Ve[e]??null:null}var Be=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${Be(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var Ne=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),$e=globalThis;function Le(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var Me=$e[Ne],We=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),Ue=Le(Me)?Me:$e[Ne]=We();function qe(){for(let e of[...Ue.listeners])try{e()}catch{}}function He(){let e={};return Ue.holds.add(e),Ue.holds.size===1&&qe(),()=>{Ue.holds.delete(e)&&Ue.holds.size===0&&qe()}}function Ke(e){r.useEffect(()=>e?He():void 0,[e])}function Ye(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var Ge=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var Je=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
7
|
+
return Object.freeze({send:d,authorize:c,stream:u})}function re(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==Z&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function oe(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var ie=10;function ae(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=le(e);if(r==="quota")return{retry:false,reason:"daily-quota-exhausted"};if(r!=="burst"&&!isAutoRetryable(e.code))return{retry:false,reason:"terminal-code"};let o=r==="burst"?"burst-throttle":"retryable-code";if((()=>{if(n.policy===void 0)return false;try{return!n.policy.shouldRetry(e.code,t)}catch{return false}})())return{retry:false,reason:"terminal-code"};let i=()=>{if(n.policy===void 0)return null;let t;try{t=n.policy.maxAttempts(e.code)}catch{return null}return typeof t!="number"||!Number.isFinite(t)?null:Math.max(1,Math.min(ie,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=se(e,n.now);return l!==null?l>Q?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function le(e){let t=e.code==="unknown"?fromWire(fe(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function se(e,t){let n=ce(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=de(e.raw);return r===null?null:Math.round(r*1e3)}function de(e){for(let t of ue(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function ce(e){for(let t of ue(e)){let e=t.resets_at,n=pe(e);if(n!==null)return n}return null}function ue(e){if(!he(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];he(r)&&t.push(r)}return t}function pe(e){if(typeof e=="number"&&Number.isFinite(e))return e<1e11?Math.round(e*1e3):Math.round(e);if(typeof e=="string"&&e.trim().length>0){let t=Date.parse(e);return Number.isFinite(t)?t:null}return null}function fe(e){for(let t of ue(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function he(e){return typeof e=="object"&&e!==null}async function ge(e){if(e.mode==="anonymous"){let t=await U(e);return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}return{mode:"personalized",token:await e.identity.currentToken(),userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{}}}function be(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function me(e,t){let n=()=>{};if(!t)return{signal:e,dispose:n};let r=new AbortController;if(e.aborted||t.aborted)return r.abort(),{signal:r.signal,dispose:n};let o=()=>r.abort();return e.addEventListener("abort",o,{once:true}),t.addEventListener("abort",o,{once:true}),{signal:r.signal,dispose:()=>{e.removeEventListener("abort",o),t.removeEventListener("abort",o)}}}function ye(e,t,n){return e<=0||n?.aborted===true?Promise.resolve():new Promise(r=>{let o=t.setTimeout(()=>{n?.removeEventListener("abort",i),r()},e),i=()=>{t.clearTimeout(o),r()};n?.addEventListener("abort",i,{once:true})})}var ve="/widget/v1/me/intro";function ke(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function we(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function xe(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e;if(!("seen_at"in t))return null;let n=t.seen_at;return n===null?/* @__PURE__ */Object.freeze({seenAt:null}):typeof n!="string"||n.length===0||n.length>64||Number.isNaN(Date.parse(n))?null:/* @__PURE__ */Object.freeze({seenAt:n})}function _e(e){let t=()=>{let{services:t}=e.registry;return Se({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(ke(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function Se(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=async(e,n,r)=>{let o=await t.send(e,n,r);if(!o.ok)return err(o.error);let i=xe(o.value);return i===null?err(we(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:ve,signal:e.signal}:{method:"GET",path:ve};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:ve,body:{seen:true}})}}}var Ce="everfur.intro.seen.v1:",Re=userRef=>`${Ce}${userRef}`;async function je(e,userRef){try{return await e.getItem(Re(userRef))!==null}catch{return false}}async function Ae(e,userRef,t){try{await e.setItem(Re(userRef),t)}catch{}}async function Fe(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await je(n,userRef))return false;let o;try{o=await t.read(r?{signal:r}:void 0)}catch{return false}return r?.aborted===true||!o.ok?false:o.value.seenAt!==null?(await Ae(n,userRef,o.value.seenAt),false):true}async function Te(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await Ae(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var Ie=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Ee=globalThis,Pe=Ee[Ie]??(Ee[Ie]=o.createContext(null));Pe.displayName??="EverfurContext";function De(){let e=o.useContext(Pe);if(e===null)throw new $("not-initialized","Everfur hooks must be called inside <EverfurProvider>. Wrap your tree once, high.");return e}function healthPlanPetWords(e,t){let n=e?.trim()??"",r=n===""?"your pet":n,o=n===""?"Your pet":n;return t==="female"?{name:r,Name:o,poss:"her",Poss:"Her",obj:"her"}:t==="male"?{name:r,Name:o,poss:"his",Poss:"His",obj:"him"}:{name:r,Name:o,poss:`${r}'s`,Poss:`${o}'s`,obj:r}}var Oe=e=>e===null?"":`${e.productName} renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`;function healthPlanFocusCopyFor(e){let t=healthPlanPetWords(e.name,e.sex),n=e=>e.petName?.trim()||t.name,NameOf=e=>e.petName?.trim()||t.Name,r=/* @__PURE__ */Object.freeze({jumpKicker:(e,n)=>n?`In ${t.poss} plan, every ${e.intervalDays} days`:e.offer?`${e.discountPercent}% off ${t.poss} first box`:e.intervalDays>0?`Ships every ${e.intervalDays} days`:r.onceLine(e),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:e=>e.offer?`First box, then ${e.box??""}`:`${e.box??""} every ${e.intervalDays} days`,priceLine:e=>e.offer?`${e.discountPercent}% off the first box. Ships every ${e.intervalDays} days.`:e.intervalDays>0?`Ships every ${e.intervalDays} days.`:r.onceOffer(e),once:"One box",onceLine:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:e=>`Buy one box, ${e.once??e.box??""}`,subscribed:"Subscribed",subscribedLine:(e,t)=>t===null?`Every ${e.intervalDays} days`:`Every ${e.intervalDays} days · next box ${t}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:e=>`Checkout: ${e.productName}`,checkoutOffer:e=>`${e.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:e=>`${e} days`,buyOnceOption:"Buy once",checkoutGo:(e,t,n)=>`${t?"Subscribe":"Buy now"} · ${n} today`,renews:e=>`Renews every ${e.intervalDays} days at ${e.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:e=>e.onceDiscountPercent>0?`${e.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:e=>`${NameOf(e)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:e=>`${e.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${t.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:e=>e===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${e}`,refill:`A text 3 days before ${t.poss} next box. Reply SKIP to skip it.`,nextBoxShips:e=>`${t.Poss} next box ships, ${e.box??""}.`,startedDone:`Back to ${t.poss} plan`,manageKicker:"Your subscription",manageTitle:e=>`Manage ${e.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(e,n)=>n===null?"Skipped.":`Skipped. ${t.Poss} next box ships ${n}.`,cancelled:e=>`${e.productName} is cancelled. Restart it from ${t.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:e=>e>0?`Cart, ${e} item${e>1?"s":""}`:"Cart, empty",addToCart:e=>`Add to cart · ${e}`,viewCart:"View cart",addedToCart:(e,t)=>`${e.productName} is in your cart${t?", as a subscription":""}.`,removedFromCart:e=>`${e} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:e=>`${NameOf(e)}'s plan pick lands here when you add it.`,seeOrders:`See ${t.poss} orders`,quantityLabel:e=>`How many: ${e}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:e=>e.offer?`First box ${e.discountPercent}% off, then ${e.box??""} every ${e.intervalDays} days`:`Every ${e.intervalDays} days`,cartOnceLine:(e,n)=>n?`An extra box. ${t.Poss} plan keeps shipping.`:e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",cartModeLabel:e=>`How to buy ${e}`,cartModeSubscribe:e=>e.offer?`Subscribe, ${e.discountPercent}% off the first box`:"Subscribe",cartModeOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:e=>`Then ${e.productName}`,renewsEvery:e=>`${e.box??""} every ${e.intervalDays} days`,checkoutCart:e=>`Checkout · ${e}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:e=>`Subscription, every ${e.intervalDays} days`,cartItemQuantity:e=>`Qty ${e}`,placeOrder:(e,t)=>`${t?"Place order and subscribe":"Place order"} · ${e}`,cartFine:e=>`${e===null?"":`${Oe(e)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${t.Poss} subscription`,nextBox:e=>`Next box ${e}`,everyDays:e=>`Every ${e} days`,ordersHeading:e=>e?"Orders":`${t.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:e=>`The boxes from ${n(e)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:e=>e===null?"Order":`Order ${e}`,arrivesBy:e=>`Arrives by ${e}`,deliveredOn:e=>`Delivered ${e}`,expected:e=>`Expected ${e}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:e=>`Track on ${e}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(e,t)=>`Qty ${e}${t?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${t.poss} weight to size ${t.poss} dose`,addWeightBody:`From a home scale or ${t.poss} last vet visit.`,connectRecordsTitle:`Connect ${t.poss} vet records`,connectRecordsBody:`${t.Poss} weight, visits and labs make ${t.poss} plan sharper.`,weightKicker:`${t.Poss} weight`,weightTitle:e=>`Add ${n(e)}'s weight`,weightBody:`From a home scale or ${t.poss} last vet visit. ${t.Poss} plan uses it to size ${t.poss} dose.`,weightField:`${t.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${t.poss} weight in pounds, like 14.1.`,weightSave:`Save ${t.poss} weight`,weightSaved:e=>`Saved: ${e} lb. ${t.Poss} dose is sized for ${t.obj}.`,weightSavedKg:e=>`Saved: ${e} kg. ${t.Poss} dose is sized for ${t.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:e=>`Built with ${e}`,fromVet:e=>`From ${e}`,waitVetTips:e=>`Free tips from ${e}, built around that risk`,signalsFit:e=>`${e} of ${e} signals fit ${t.Name}`,signalsValue:e=>`${e}/${e}`,noPick:`No supplement for this one. ${t.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${t.poss} next checkup`,savedForCheckup:`Saved for ${t.poss} next checkup`,blanksLabel:`${t.Poss} three blanks`,blanksAsked:e=>`Asked ${e}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${t.poss} vet records`,blanksFilled:(e,t)=>`${e} of ${t} filled`,blanksWeight:`Keep ${t.obj} at `,blanksWeightSource:`From ${t.poss} vet visits`,blanksDose:(e,t)=>`${e} of ${t}`,blanksDoseSource:`Sized to ${t.poss} weight`,blanksShots:`${t.Poss} next shots are due `,blanksShotsSource:`From ${t.poss} clinic`,blankEmpty:"blank",recordsLanded:`${t.Poss} records are in. ${t.Poss} plan now uses ${t.poss} weight and ${t.poss} visits.`,todayLabel:`${t.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${t.poss} report`,askReport:"Ask about it",fullOpen:`See ${t.poss} full plan`,fullOpenLine:`${t.Poss} vet, reviews and ${t.poss} checkup`,fullClose:`Show ${t.poss} brief plan`,fullCloseLine:`${t.Poss} risk, tips, pick and signs`,hopeNoted:e=>`Noted. When ${t.poss} results land, we'll start with ${e}.`,productLink:e=>`${e}, see the product`,productPhotos:e=>`${e} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${t.name}`,ratingLine:e=>`· ${e} reviews`,productOffer:e=>`${e.discountPercent}% off ${t.poss} first box`,productEvery:e=>`Every ${e.intervalDays} days`,productOnce:e=>e.onceDiscountPercent>0?`One box, ${e.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:e=>`On ${t.poss} plan, every ${e.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:e=>`${e} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:e=>`Read all ${e} reviews`,starsLabel:e=>`${e} out of 5 stars`,buyNow:"Buy now"});return r}healthPlanFocusCopyFor({sex:"female"});var ze=/* @__PURE__ */Object.freeze({eyebrow:"",lede:"",pendingLede:"",recordsRowMore:"",planTopic:"",askTitle:"",noVetTitle:"",sentFine:"",clinicEta:"",blanksDetail:"",bannerBody:"",appName:""});function introPetWords(e,t){let n=healthPlanPetWords(e,t);return{...n,subj:t==="female"?"she":t==="male"?"he":n.name}}var Be=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?Be[e]??null:null}var Ve=e=>e===""?e:e.charAt(0).toUpperCase()+e.slice(1);function defaultIntroBlanks(e){return[{before:`Keep ${e.obj} at `,after:" lb",source:`From ${e.poss} vet visits`},{before:`${e.Poss} next shots are due `,after:"",source:`From ${e.poss} clinic`,width:"l"}]}function introFacts(e,t){let n=e?.pet.name??t??null,r=e?.page??null,o=r?.byline?.name?.trim()??"";return{pet:introPetWords(n,e?.pet.sex??null),planTitle:r?.title.trim()??"",vetName:e?.vetReviewed===true&&o!==""?o:null,tips:r?.routine?.steps.length??0}}function introText(e){let{facts:t,copy:n,resultsPending:r}=e,o=t.pet,i=numberWord(e.blanks),a=numberWord(t.tips),l=n.planTopic.trim(),s=t.vetName===null?null:t.vetName.replace(/ /g," "),d=l===""?"":`One plan for ${o.poss} ${l}${s===null?"":`, built with ${s}`}.`,c=a===null?"":`${Ve(a)} tips, one thing to add.`,u=r?`${o.Poss} plan arrives with ${o.poss} results.`:[d,c].filter(e=>e!=="").join(" "),p=[`What could go wrong for ${o.name}, and what's changed.`,n.recordsRowMore.trim()].filter(e=>e!=="").join(" ");return{sheetLabel:{intro:`Welcome to ${o.Name}'s tab`,records:`Request ${o.poss} records`},back:"Back",skip:"Skip",close:"Close",poweredBy:"powered by",tabs:{eyebrow:n.eyebrow,title:`${o.Name}'s health, in three tabs.`,lede:r?n.pendingLede:n.lede,ask:`Trained on 50,000+ peer-reviewed vet publications. Ask about ${o.name} any hour (the 2 am ones too).`,plan:u,records:p,next:"Next",seePlan:`See ${o.poss} plan`},ask:{title:n.askTitle,lede:i===null?"":`${o.Poss} plan has ${i} blanks only ${o.poss} vet can fill (we ask the clinic for you).`,blanksPill:`${e.blanks} blanks`,blankLabel:"blank",later:"Later",connect:`Connect ${o.poss} vet`,fine:`We send ${o.poss} clinic a secure request and read every page they send back.`,noVet:`${o.Name} doesn't have a vet yet`},clinic:{title:`Where does ${o.name} see ${o.poss} vet?`,search:"Clinic name, city or zip",searchLabel:`Search for ${o.poss} clinic`,list:"Clinics",more:`Sees more than one? Start with the one ${o.subj} sees most.`,request:`Request ${o.poss} records`,upload:"Upload a PDF or a photo instead",add:`Add ${o.poss} clinic`},sent:{eyebrow:"Request sent",title:"Sent. Now it's the clinic's turn.",track:`${o.Poss} records request`,sentStep:"Request sent",sentTo:e=>`Today, to ${e}`,clinicStep:`${o.Poss} clinic sends ${o.poss} records`,clinicEta:n.clinicEta,blanksStep:i===null?"":`${o.Poss} ${i} blanks fill in`,blanksDetail:n.blanksDetail,lede:`Turn on notifications and we'll tell you the minute ${o.name}'s records are in.`,notify:"Turn on notifications",notNow:"Not now",fine:n.sentFine},noVet:{title:n.noVetTitle,lede:i===null?"":`When ${o.subj} does, connect ${o.poss} vet in Records and ${o.poss} ${i} blanks fill in.`,seePlan:`See ${o.poss} plan`},toast:{on:`Notifications on. We'll tell you the minute ${o.name}'s records are in.`,off:`Requested. ${o.Name}'s records will show up here when they're in.`,landed:`${o.Poss} records are in. ${o.Poss} plan now uses ${o.poss} weight and ${o.poss} visits.`},banner:{app:n.appName,now:"now",title:`${o.Name}'s records are in`,body:n.bannerBody}}}var Ne=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),$e=globalThis;function Le(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var Me=$e[Ne],Ue=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),We=Le(Me)?Me:$e[Ne]=Ue();function qe(){for(let e of[...We.listeners])try{e()}catch{}}function He(){let e={};return We.holds.add(e),We.holds.size===1&&qe(),()=>{We.holds.delete(e)&&We.holds.size===0&&qe()}}function Ke(e){o.useEffect(()=>e?He():void 0,[e])}function Ye(e){let t={};if(e==null)return t;for(let n of Object.keys(e))e[n]!==void 0&&(t[n]=e[n]);return t}var Ge=/* @__PURE__ */Object.freeze({heading:"Chats",empty:"No chats yet",emptyBody:"Start a new conversation to see it here.",noMatch:"No chats match that.",loading:"Loading your chats…",loadFailed:"Couldn’t load your chats",loadingMore:"Loading more…",untitled:"New conversation",newChat:"New chat",searchPlaceholder:"Search chats…",search:"Search chats",countLabel:"Chats and vet messages",countSeparator:" · ",newReply:"New reply · {date}",retry:"Try again",close:"Close",closeA11y:"Close history",more:"Load more",earlier:"Load earlier messages",loadingEarlier:"Loading earlier messages…",openConversation:"Open conversation",unreadPrefix:"Unread. "});var Je=/* @__PURE__ */Object.freeze({title:"Notifications",loading:"Loading notifications",emptyTitle:"You’re all caught up",emptyBody:"Updates about your pet’s care will show up here.",errorTitle:"Could not load your notifications",errorBody:"Check your connection and try again.",retry:"Try again",rowFallbackTitle:"Notification",unreadPrefix:"Unread.",timeAgoSuffix:"ago",now:"Now",more:"Show more",detailErrorTitle:"Could not load this notification",detailErrorBody:"Check your connection and try again.",notFoundTitle:"This notification is no longer available",notFoundBody:"The notification may have expired or been removed.",back:"Back to inbox"});function surfaceForNotification(e){let{target:t}=e;switch(t.kind){case"case":case"chat":/* @__PURE__ */
|
|
8
8
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:t});case"pet":return e.eventType==="chat.reminder_due"?/* @__PURE__ */Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:/* @__PURE__ */Object.freeze({kind:"chat",petRef:t.petRef,conversationId:null})}):e.eventType.startsWith("care.")?null:/* @__PURE__ */Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"tip":/* @__PURE__ */
|
|
9
9
|
return Object.freeze({surface:"chat",petRef:t.petRef,checkinTarget:null});case"record_request":/* @__PURE__ */
|
|
10
10
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:t.requestId});case"records":case"vaccine":case"labs":/* @__PURE__ */
|
|
11
11
|
return Object.freeze({surface:"records",petRef:t.petRef,requestId:null});case"visit":/* @__PURE__ */
|
|
12
12
|
return Object.freeze({surface:"visit",visitRef:t.visitRef,intent:t.intent,petRef:t.petRef});case"health_plan":/* @__PURE__ */
|
|
13
|
-
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Qe(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Ze(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Xe(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Qe(o.createdAt,n,t.now),a=i!==null&&Ze(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/g,"").replace(/\{time\}/g,""):t.kicker.replace(/\{time\}/g,a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var et="your pet";var tt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function nt(){let e=globalThis,t=e[tt];if(t!==void 0)return t;let n={factory:
|
|
13
|
+
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Qe(e,t,n){let r=new Date(e),o=r.getTime();if(Number.isNaN(o))return null;let i=t-o;if(i<6e4)return n;if(i<36e5)return`${Math.floor(i/6e4)}m`;if(i<864e5)return`${Math.floor(i/36e5)}h`;if(i<6048e5)return`${Math.floor(i/864e5)}d`;if(i<5*6048e5)return`${Math.floor(i/6048e5)}w`;let a=r.getFullYear()===new Date(t).getFullYear();try{return r.toLocaleDateString("en-US",{month:"short",day:"numeric",...a?{}:{year:"numeric"}})}catch{return r.toISOString().slice(0,10)}}function Ze(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Xe(e,t,n){let r=e.notification===null?null:surfaceForNotification(e.notification);if(r?.surface==="health_plan")return{tab:"plan"};if(r?.surface==="records")return{tab:"records"};if(r?.surface==="visit")return null;let{item:o}=e;if(o.title.trim()==="")return null;let i=Qe(o.createdAt,n,t.now),a=i!==null&&Ze(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}/g,"").replace(/\{time\}/g,""):t.kicker.replace(/\{time\}/g,a);return{tab:"ask",prompt:o.title,card:{kicker:l,title:o.title,...o.body.trim()===""?{}:{body:o.body}}}}var et="your pet";var tt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function nt(){let e=globalThis,t=e[tt];if(t!==void 0)return t;let n={factory:o.createContext(null),home:o.createContext(null)};return e[tt]=n,n}var rt=nt().factory;nt().home;var ot=()=>{};function it(){try{return i.AppState.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=i.AppState.currentState==="background";t=i.AppState.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return ot}return()=>t.remove()},isVisible:it}}var at=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function lt(){let e=globalThis,t=e[at];if(t!==void 0)return t;let n=o.createContext(true);return e[at]=n,n}var st=lt();var dt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatShellTabsBar");function ct(){let e=globalThis,t=e[dt];if(t!==void 0)return t;let n=o.createContext(false);return e[dt]=n,n}var ut=ct();function pt(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var ft=/* @__PURE__ */Object.freeze({ask:"Ask",vet:"Vet",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),ht=/* @__PURE__ */Object.freeze(["ask","plan","records"]),gt=ht,bt=/* @__PURE__ */Object.freeze(["ask","records"]);function mt(e,t=ht){if(t===ht)return e?bt:gt;let n=e?t.filter(e=>e!=="plan"):t;return n.length===0?["ask"]:n}function yt(e,t,n=ht){let r=mt(t,n);return r.includes(e)?e:r.includes("ask")?"ask":r[0]??"ask"}function vt(e,t){if(kt(e,gt))return t.listAll;if(kt(e,bt))return t.listNoPlan;let n=e.map(e=>t[e]);return n.length<=1?n[0]??"":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]??""}`}function kt(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function wt(e,t,n=ht){return e.via==="link"?yt(e.ask!==void 0?"ask":e.tab,t,n):yt("plan",t,n)}function xt(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var _t=6e4;function St(e,t,n=_t){return e!==null&&t-e>=n}function Ct(e){return e.pageVisible&&e.watching&&St(e.lastReadAt,e.now)}function Rt(e){return JSON.stringify(e,(e,t)=>{if(t===null||typeof t!="object"||Array.isArray(t))return t;let n={};for(let e of Object.keys(t).sort())n[e]=t[e];return n})}function jt(e){if(e===null)return"";let t=e.items.map(e=>[e.productId,e.partnerSku,e.title,e.description,e.category,e.price,e.currency,e.imageUrl,e.url,e.sample]).sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0);return JSON.stringify([e.headline,t])}function At(e){return e===null?"":Rt([e.checkout,e.page])}function Ft(e,t){return JSON.stringify([jt(e),At(t)])}function Tt(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function It(e,t){return e==="empty"&&!pt(t?.page)}function Et(e,t){return e===void 0?{empty:t.empty,signature:t.signature,epoch:0}:e.empty===t.empty&&e.signature===t.signature?e:{empty:t.empty,signature:t.signature,epoch:e.signature===t.signature?e.epoch:e.epoch+1}}var Pt=5e3;function Dt(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function Ot(){let e=/* @__PURE__ */new Set;return{listen(t){let n=()=>t();return e.add(n),()=>{e.delete(n)}},fire(){for(let t of[...e])try{t()}catch{}}}}function zt(e,t){return{...{onForeground(n){let r=e.onForeground(n),o=t.listen(n);return()=>{o(),r()}}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function Bt(e,t){return{...{onForeground(n){return e.onForeground(()=>{t()&&n()})}},...e.onOnline===void 0?{}:{onOnline:e.onOnline.bind(e)},...e.onAnnounced===void 0?{}:{onAnnounced:e.onAnnounced.bind(e)},...e.isOffline===void 0?{}:{isOffline:e.isOffline.bind(e)}}}function Vt(e,t){return!e&&t}var Nt=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(e){return Nt[e]}function decideCapability(e,t,n){let r=requires(e),o=/* @__PURE__ */new Map;for(let e of t)o.set(e.resource,e);if(n?.isPending===true&&r.some(e=>!o.has(e)))return Mt({name:e,enabled:false,isPending:true,limits:{}});let i=$t(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?Mt({name:e,enabled:true,isPending:false,limits:i}):Mt({name:e,enabled:false,isPending:false,limits:i,disabled:Lt(r,o)})}function $t(e,t){let n={};for(let r of e){let e=t.get(r)?.limits;if(e)for(let[t,r]of Object.entries(e)){let e=n[t];n[t]=e===void 0?r:Math.min(e,r)}}return n}function Lt(e,t){for(let n of e){let e=t.get(n)?.disabled;if(e)/* @__PURE__ */
|
|
14
14
|
return Object.freeze({reason:e.reason,level:e.level,recoverable:e.recoverable})}/* @__PURE__ */
|
|
15
|
-
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function zt(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function Vt(e){let{runtime:t}=Pe(),n=t.entitlements,o=r.useCallback(e=>n===void 0?()=>{}:n.subscribe(e),[n]),i=r.useCallback(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return r.useSyncExternalStore(o,i,i)}var Bt=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[Bt[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[Bt[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function Nt(e){return e<=450?"regular":e<=650?"medium":"bold"}var $t={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=Lt.get(e);n===void 0&&(n=/* @__PURE__ */new Map,Lt.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=Mt(e,t);return n.set(t,o),o}var Lt=/* @__PURE__ */new WeakMap;function Mt(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=Nt(Number(r)),i=n.face==="mono"?face(e,$t[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var Wt=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var Ut=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Ut(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var qt=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Ht={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Kt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Yt={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Gt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Jt={regular:"400",medium:"500",bold:"700"},Qt={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Zt=0,Xt="System",en="monospace",tn=["content","heading","control","compact","badge"];function nn(e){let t={};for(let n of tn)t[n]=e;return t}var rn=[];function on(){return{family:Xt,mono:en,fontUrl:null,families:{regular:Xt,medium:Xt,bold:Xt,mono:en,monoMedium:en,monoBold:en},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Yt,tierSizes:nn(Yt),lineHeight:Gt,weight:Jt,letterSpacing:Qt,scale:1,maxScale:Zt,scaleCaps:qt,headingFamily:null,headingWeight:null,fontSources:rn,roles:Wt,typeScale:1}}var an={},ln=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var sn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(ln.standard),emphasized:cssCubicBezier(ln.emphasized),exit:cssCubicBezier(ln.exit)},reducedMotion:false},dn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},cn=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:dn,space:Ht,radius:Kt,type:on(),motion:sn,slots:an}),un={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:un,space:Ht,radius:Kt,type:on(),motion:sn,slots:an});var pn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),fn=globalThis,hn=fn[pn]??(fn[pn]=r.createContext(cn));hn.displayName??="EverfurThemeContext";function useEverfurTheme(){return r.useContext(hn)}function gn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let i=useEverfurTheme(),a=t===void 0?void 0:i.type.roles[t],l=gn(i.type,e??a?.tier??"content"),s=t===void 0?n:{...n,style:[{...textRole(i,t),color:i.color.text.primary,flexShrink:1},n.style]};return r.createElement(o.Text,l===void 0?s:{maxFontSizeMultiplier:l,...s})}var bn=r.forwardRef(function(e,t){return r.createElement(o.TextInput,{...e,...t===null?{}:{ref:t}})});var mn=640,yn=600,kn=/* @__PURE__ */Object.freeze({width:0,height:0}),vn="useWindowDimensions"in c&&typeof c.useWindowDimensions=="function"?c.useWindowDimensions:()=>kn,wn=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:mn,alignSelf:"center"}),xn=/* @__PURE__ */Object.freeze({...wn,flex:1}),Sn=/* @__PURE__ */Object.freeze({...wn,flexGrow:1,flexShrink:1});function _n(){return vn().width>=yn}function Cn(){let e=_n();return{tablet:e,column:e?xn:{flex:1}}}function Rn(e="flow"){let{width:t}=vn();if(t<yn)return null;if(e==="flow")return wn;let n=Math.max(0,Math.round((t-mn)/2));return{left:n,right:n}}function jn(e,t){return t===null?e:[e,t]}var An=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),Fn=globalThis,En=Fn[An]??(Fn[An]=r.createContext(false));En.displayName??="EverfurInSdkColumn";function SdkColumnScope({children:e}){/* @__PURE__ */
|
|
16
|
-
return i.jsx(En.Provider,{value:true,children:e})}function SdkTabletColumn({children:e,style:t,testID:n}){let a=_n(),l=r.useContext(En);return!a||l?e:/* @__PURE__ */i.jsx(o.View,{style:t===void 0?Sn:[Sn,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */i.jsx(En.Provider,{value:true,children:e})})}function parseColor(e){let t=In(e);return t===null?null:Bn(t)}function In(e){if(typeof e=="number")return Pn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return Tn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return Tn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return Dn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=Tn(t);if(e!==null)return e}return/^\d+$/.test(t)?Pn(Number.parseInt(t,10)):null}function Tn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:zn(t[0]),g:zn(t[1]),b:zn(t[2]),a:1};if(t.length===6)return{r:On(t,0),g:On(t,2),b:On(t,4),a:1};if(t.length===8){let e=On(t,0);return{r:On(t,2),g:On(t,4),b:On(t,6),a:e/255}}return null}function Dn(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=Vn(Number(r[0])),i=Vn(Number(r[1])),a=Vn(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function Pn(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function On(e,t){return Number.parseInt(e.slice(t,t+2),16)}function zn(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function Vn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function Bn(e){if(e.a>=1)return Nn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function Nn(e,t,n){return`#${$n(e)}${$n(t)}${$n(n)}`.toUpperCase()}function $n(e){return e.toString(16).padStart(2,"0")}var Ln="#111111",Mn="#FFFFFF",Wn="#000000";function readableOn(e){let t=In(e);if(t===null)return Mn;let n=Hn(t),r=Hn({r:17,g:17,b:17}),o=Hn({r:255,g:255,b:255});return Yn(n,o)>=Yn(n,r)?Mn:Ln}function Un(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(Mn,e)>=contrastRatio(Wn,e)?Mn:Wn}function qn(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(Mn)>=t(Wn)?Mn:Wn}function Hn(e){let t=Kn(e.r/255),n=Kn(e.g/255),r=Kn(e.b/255);return.2126*t+.7152*n+.0722*r}function Kn(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Yn(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=In(e),r=In(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:Gn(n,o);return Yn(Hn(i),Hn(o))}function Gn(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function Jn(e,t){let n=In(e),r=In(t);if(n===null||r===null)return null;let o=n.a>=1?n:Gn(n,{...r});return Nn(o.r,o.g,o.b)}function Qn(e,t){let n=In(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Zn=.05;function Xn(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(In(e)===null)return n;if(i(e))return e;let a=Jn(e,o),l=a===null?null:In(a),s=In(n);if(l===null||s===null)return n;for(let e=1;e<1/Zn;e+=1){let t=e*Zn,n=(e,n)=>Math.round(e+(n-e)*t),r=Nn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var er=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),tr=/* @__PURE__ */new WeakMap;function nr(e){let t=tr.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...er},i=(e,t)=>Xn(e,t,qn(t),rr),a=(e,t)=>contrastRatio(e,t)>=rr?e:Un(t,rr),l=[o.card,o.paper].map(e=>Jn(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return tr.set(e,d),d}var rr=4.5;function or(e,t){for(let n of t)if(contrastRatio(n,e)>=rr)return n;return Un(e,rr)}function ir(e,t,n){let r=Qn(e,t);return(r===null?null:Jn(r,n))??n}function ar(e){let t=nr(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:or(t.accent,[t.ink,t.onAccent]),accent2:ir(t.accent,.75,r),accent4:ir(t.accent,.17,r),accentChip:ir(t.accent,.47,r),link:t.link,linkChip:ir(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var lr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),sr=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),dr=["paddingTop","paddingRight","paddingBottom","paddingLeft"],cr=17,ur=1.5,pr=400,fr=700;function hr(e){return e<=450?"regular":e<=650?"medium":"bold"}function gr(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function br(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:gr(n)}}let r=t==="$serif"?headingFace(e,hr(n)):face(e,hr(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:gr(n)}}function mr(e,t,n={}){let r=ar(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))lr.has(e)||sr.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of dr){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:cr,d=typeof a.lh=="number"?a.lh:ur,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...br(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(pr,e),strong:(...e)=>p(fr,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var yr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},kr=16;var vr=4e3,wr=.5;function xr(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Sr(e,t,n){if(e.length===0)return n;let r=xr(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=wr*e.length+1;for(let a of o)if(xr(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let a=r.useMemo(()=>e.split(/\s+/).filter(e=>e!==""),[e]),l=o.StyleSheet.flatten(t),s=[e,l.fontFamily,l.fontSize,l.fontWeight,l.letterSpacing].join("|"),d=r.useRef({key:"",ch:null,line:null,words:[]});d.current.key!==s&&(d.current={key:s,ch:null,line:null,words:a.map(()=>null)});let[c,u]=r.useState(null),p=c!==null&&c.key===s?c.value:null,f=()=>{let e=d.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Sr(t,o,(e.ch+wr)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{d.current.key===s&&(e(d.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
17
|
-
return i.jsxs(o.View,{style:_r.wrap,children:[
|
|
18
|
-
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var uo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},po={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},fo=[.23,1,.32,1],ho=[.32,.72,0,1],go={opacity:0,translateY:8},bo={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},mo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},yo={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=yo[e];/* @__PURE__ */
|
|
24
|
-
return
|
|
25
|
-
return i.jsxs(o.Pressable,{accessibilityRole:"button",accessibilityState:{disabled:a,busy:l},disabled:a||l,onPress:n,style:({pressed:t})=>[e.view(...u),d,t&&!e.reduced?ko:null],...c===void 0?{}:{testID:c},children:[s===void 0?null:/* @__PURE__ */i.jsx(IntroIcon,{name:s,style:e.icon(...u,".emb-btn svg",".in-stack .emb-btn svg")}),
|
|
26
|
-
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
return
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */i.
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */i.
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */i.
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */i.jsx(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
/* @__PURE__ */i.
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */i.
|
|
97
|
-
/* @__PURE__ */i.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
15
|
+
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function Mt(e){let t={name:e.name,enabled:e.enabled,isPending:e.isPending,limits:/* @__PURE__ */Object.freeze({...e.limits})};return e.disabled!==void 0&&(t.disabled=e.disabled),/* @__PURE__ */Object.freeze(t)}function Ut(e){let{runtime:t}=De(),n=t.entitlements,r=o.useCallback(e=>n===void 0?()=>{}:n.subscribe(e),[n]),i=o.useCallback(()=>{if(n===void 0)return false;let t=n.getSnapshot();return decideCapability(e,t.decisions,{isPending:t.isPending}).enabled},[n,e]);return o.useSyncExternalStore(r,i,i)}var Wt=()=>()=>{},qt=()=>null;function Ht(e,t){return o.useSyncExternalStore(t?.subscribe??Wt,t?.get??qt,t?.get??qt)??e}var Kt=/* @__PURE__ */Object.freeze(["ask","vet","plan","records"]),Yt=/* @__PURE__ */Object.freeze({chatAnswerStyle:"cards",chatHistoryStyle:"sheet",chatTopCard:"focus",chatFollowUpCount:3,chatFollowUpsExcludeTelevet:false,chatComposerMic:true,chatComposerUpload:true,safetyDisclaimerPlacement:"composer",healthPlanLayout:"focus_plan",recordsTopRiskLine:true,recordsClearResultsFilter:true,chatComposerStyle:"compact",chatComposerPlaceholder:"pet_name",chatHistoryBar:"scroll",chatGeneralBanner:true,chatSendButton:"always_dark",chatTextingAsk:true,serverSlots:false,shellTabs:null,shellHeader:"classic"}),Gt=/* @__PURE__ */Object.freeze({chatAnswerStyle:"chat_answer_style",chatHistoryStyle:"chat_history_style",chatTopCard:"chat_top_card",chatFollowUpCount:"chat_follow_up_count",chatFollowUpsExcludeTelevet:"chat_follow_ups_exclude_televet",chatComposerMic:"chat_composer_mic",chatComposerUpload:"chat_composer_upload",safetyDisclaimerPlacement:"safety_disclaimer_placement",healthPlanLayout:"health_plan_layout",recordsTopRiskLine:"records_top_risk_line",recordsClearResultsFilter:"records_clear_results_filter",chatComposerStyle:"chat_composer_style",chatComposerPlaceholder:"chat_composer_placeholder",chatHistoryBar:"chat_history_bar",chatGeneralBanner:"chat_general_banner",chatSendButton:"chat_send_button",chatTextingAsk:"chat_texting_ask",serverSlots:"server_slots",shellTabs:"shell_tabs",shellHeader:"shell_header"}),Jt=Object.keys(Gt),Qt="presentation",Zt="presentation.";var Xt={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer","none"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"],shellHeader:["classic","tabs_bar"]};function en(e){if(!Array.isArray(e)||e.length===0)return;let t=/* @__PURE__ */new Set;for(let n of e){if(typeof n!="string"||!Kt.includes(n)||t.has(n))return;t.add(n)}/* @__PURE__ */
|
|
16
|
+
return Object.freeze([...e])}var tn=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk","serverSlots"]);function nn(e,t){if(t==null)return;if(e==="shellTabs")return en(t);let n=Xt[e];return n!==void 0?typeof t=="string"&&n.includes(t)?t:void 0:tn.has(e)?typeof t=="boolean"?t:void 0:typeof t=="number"&&Number.isInteger(t)&&t>=0&&t<=3?t:void 0}function parsePresentation(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n={};for(let e of Jt){let r=Gt[e],o=Object.prototype.hasOwnProperty.call(t,r)?t[r]:t[e],i=nn(e,o);i!==void 0&&(n[e]=i)}return Object.keys(n).length===0?null:/* @__PURE__ */Object.freeze(n)}function isPresentationFieldLocked(e,t){if(t==null)return false;let n=`${Zt}${Gt[e]}`;for(let e of t)if(e===Qt||e===n)return true;return false}function resolvePresentation(e){let t=parsePresentation(e?.server??null)??{},{safetyDisclaimerPlacement:n,...r}=t,o=n==="none"||n===void 0?r:{...r,safetyDisclaimerPlacement:n},i=parsePresentation(e?.client??null)??{},a=e?.locked?[...e.locked]:null,l={};for(let e of Jt){let t=o[e],n=isPresentationFieldLocked(e,a)?void 0:i[e];l[e]=n??t??Yt[e]}/* @__PURE__ */
|
|
17
|
+
return Object.freeze(l)}var rn=/* @__PURE__ */Object.freeze({branding:null}),on=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>rn});function an(e){return e?Object.keys(e).sort().map(t=>`${t}=${String(e[t])}`).join("&"):""}function useEverfurPresentation(e){return ln(e).presentation}function ln(e){let{runtime:t}=De(),n=t?.entitlements??on,r=o.useCallback(()=>n.getSnapshot()?.branding??null,[n]),i=Ht(o.useSyncExternalStore(n.subscribe,r,r),t?.sdkConfigHost?.branding),a=an(e);return o.useMemo(()=>{let t=i?.lockedFields??null;return{presentation:resolvePresentation({server:i?.presentation??null,locked:t,client:e??null}),isLocked:e=>isPresentationFieldLocked(e,t)}},[i,a])}var sn=/* @__PURE__ */Symbol.for("@everfur/sdk#TelevetShellLook@v1");function dn(){let e=globalThis,t=e[sn];if(t!==void 0)return t;let n={mounted:0,listeners:/* @__PURE__ */new Set};return e[sn]=n,n}function cn(e){let t=dn();t.mounted=Math.max(0,t.mounted+e);for(let e of[...t.listeners])e()}function un(e){o.useEffect(()=>{if(e)return cn(1),()=>cn(-1)},[e])}var pn=/* @__PURE__ */Object.freeze({regular:"regular",medium:"medium",bold:"bold",mono:"regular",monoMedium:"medium",monoBold:"bold"});function face(e,t){let n=e.type,r=n.families[t];return t==="mono"||n.namedFaces[t]?{fontFamily:r}:{fontFamily:r,fontWeight:n.weight[pn[t]]}}function headingFace(e,t="bold"){let{headingFamily:n,headingWeight:r}=e.type;if(n===null&&r===null)return face(e,t);if(n!==null)return{fontFamily:n,fontWeight:r??e.type.weight[pn[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function fn(e){return e<=450?"regular":e<=650?"medium":"bold"}var hn={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=gn.get(e);n===void 0&&(n=/* @__PURE__ */new Map,gn.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=bn(e,t);return n.set(t,o),o}var gn=/* @__PURE__ */new WeakMap;function bn(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=fn(Number(r)),i=n.face==="mono"?face(e,hn[o]):n.face==="heading"?headingFace(e,o):face(e,o),a=n.face==="heading"?e.type.headingWeight??r:r,l=i.fontWeight===void 0?i:{fontFamily:i.fontFamily,fontWeight:a},s=n.size,d={...l,fontSize:s,lineHeight:Math.round(s*n.lineHeight*100)/100};return n.letterSpacing!==0&&(d.letterSpacing=Math.round(s*n.letterSpacing*100)/100),n.uppercase&&(d.textTransform="uppercase"),/* @__PURE__ */Object.freeze(d)}var mn=/* @__PURE__ */Object.freeze({display:/* @__PURE__ */Object.freeze({size:29,lineHeight:1.06,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),title:/* @__PURE__ */Object.freeze({size:23,lineHeight:1.12,weight:"800",face:"heading",letterSpacing:-.01,uppercase:false,tier:"heading"}),cardTitle:/* @__PURE__ */Object.freeze({size:19,lineHeight:1.22,weight:"800",face:"sans",letterSpacing:0,uppercase:false,tier:"heading"}),rowTitle:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.4,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),body:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),message:/* @__PURE__ */Object.freeze({size:15.5,lineHeight:1.5,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),bodySmall:/* @__PURE__ */Object.freeze({size:14.5,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),caption:/* @__PURE__ */Object.freeze({size:13,lineHeight:1.4,weight:"400",face:"sans",letterSpacing:0,uppercase:false,tier:"content"}),label:/* @__PURE__ */Object.freeze({size:10.5,lineHeight:1.4,weight:"400",face:"mono",letterSpacing:.05,uppercase:true,tier:"compact"}),eyebrow:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"400",face:"mono",letterSpacing:.07,uppercase:true,tier:"compact"}),chip:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.3,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),tab:/* @__PURE__ */Object.freeze({size:16,lineHeight:1.5,weight:"600",face:"sans",letterSpacing:0,uppercase:false,tier:"compact"}),button:/* @__PURE__ */Object.freeze({size:15,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"control"}),badge:/* @__PURE__ */Object.freeze({size:12,lineHeight:1.5,weight:"700",face:"sans",letterSpacing:0,uppercase:false,tier:"badge"})});var yn=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){yn(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var vn=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var kn={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},wn={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},xn={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},_n={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Sn={regular:"400",medium:"500",bold:"700"},Cn={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Rn=0,jn="System",An="monospace",Fn=["content","heading","control","compact","badge"];function Tn(e){let t={};for(let n of Fn)t[n]=e;return t}var In=[];function En(){return{family:jn,mono:An,fontUrl:null,families:{regular:jn,medium:jn,bold:jn,mono:An,monoMedium:An,monoBold:An},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:xn,tierSizes:Tn(xn),lineHeight:_n,weight:Sn,letterSpacing:Cn,scale:1,maxScale:Rn,scaleCaps:vn,headingFamily:null,headingWeight:null,fontSources:In,roles:mn,typeScale:1}}var Pn={},Dn=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(e){return`cubic-bezier(${e.join(", ")})`}var On={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(Dn.standard),emphasized:cssCubicBezier(Dn.emphasized),exit:cssCubicBezier(Dn.exit)},reducedMotion:false},zn={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},Bn=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:zn,space:kn,radius:wn,type:En(),motion:On,slots:Pn}),Vn={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"};deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:Vn,space:kn,radius:wn,type:En(),motion:On,slots:Pn});var Nn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),$n=globalThis,Ln=$n[Nn]??($n[Nn]=o.createContext(Bn));Ln.displayName??="EverfurThemeContext";function useEverfurTheme(){return o.useContext(Ln)}function Mn(e,t){let n=e.scaleCaps[t];return n>0?n:void 0}function Text({tier:e,variant:t,...n}){let r=useEverfurTheme(),a=t===void 0?void 0:r.type.roles[t],l=Mn(r.type,e??a?.tier??"content"),s=t===void 0?n:{...n,style:[{...textRole(r,t),color:r.color.text.primary,flexShrink:1},n.style]};return o.createElement(i.Text,l===void 0?s:{maxFontSizeMultiplier:l,...s})}var Un=o.forwardRef(function(e,t){return o.createElement(i.TextInput,{...e,...t===null?{}:{ref:t}})});var Wn=640,qn=600,Hn=/* @__PURE__ */Object.freeze({width:0,height:0}),Kn="useWindowDimensions"in c&&typeof c.useWindowDimensions=="function"?c.useWindowDimensions:()=>Hn,Yn=/* @__PURE__ */Object.freeze({width:"100%",maxWidth:Wn,alignSelf:"center"}),Gn=/* @__PURE__ */Object.freeze({...Yn,flex:1}),Jn=/* @__PURE__ */Object.freeze({...Yn,flexGrow:1,flexShrink:1});function Qn(){return Kn().width>=qn}function Zn(){let e=Qn();return{tablet:e,column:e?Gn:{flex:1}}}function Xn(e="flow"){let{width:t}=Kn();if(t<qn)return null;if(e==="flow")return Yn;let n=Math.max(0,Math.round((t-Wn)/2));return{left:n,right:n}}function er(e,t){return t===null?e:[e,t]}var tr=/* @__PURE__ */Symbol.for("@everfur/sdk#InSdkColumn@v1"),nr=globalThis,rr=nr[tr]??(nr[tr]=o.createContext(false));rr.displayName??="EverfurInSdkColumn";function SdkColumnScope({children:e}){/* @__PURE__ */
|
|
18
|
+
return a.jsx(rr.Provider,{value:true,children:e})}function SdkTabletColumn({children:e,style:t,testID:n}){let r=Qn(),l=o.useContext(rr);return!r||l?e:/* @__PURE__ */a.jsx(i.View,{style:t===void 0?Jn:[Jn,t],testID:n??"everfur-tablet-column",children:/* @__PURE__ */a.jsx(rr.Provider,{value:true,children:e})})}function parseColor(e){let t=or(e);return t===null?null:ur(t)}function or(e){if(typeof e=="number")return lr(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return ir(t.slice(1));if(t.toLowerCase().startsWith("0x"))return ir(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return ar(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=ir(t);if(e!==null)return e}return/^\d+$/.test(t)?lr(Number.parseInt(t,10)):null}function ir(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:dr(t[0]),g:dr(t[1]),b:dr(t[2]),a:1};if(t.length===6)return{r:sr(t,0),g:sr(t,2),b:sr(t,4),a:1};if(t.length===8){let e=sr(t,0);return{r:sr(t,2),g:sr(t,4),b:sr(t,6),a:e/255}}return null}function ar(e){let t=e.indexOf("("),n=e.indexOf(")");if(t<0||n<0||n<t)return null;let r=e.slice(t+1,n).split(",").map(e=>e.trim());if(r.length<3)return null;let o=cr(Number(r[0])),i=cr(Number(r[1])),a=cr(Number(r[2]));if(o===null||i===null||a===null)return null;let l=1;if(r.length>=4){let e=Number(r[3]);if(!Number.isFinite(e))return null;l=Math.min(1,Math.max(0,e))}return{r:o,g:i,b:a,a:l}}function lr(e){if(!Number.isFinite(e))return null;let t=Math.trunc(e)>>>0,n=t>>>24&255;return{r:t>>>16&255,g:t>>>8&255,b:t&255,a:n===0?1:n/255}}function sr(e,t){return Number.parseInt(e.slice(t,t+2),16)}function dr(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function cr(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function ur(e){if(e.a>=1)return pr(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function pr(e,t,n){return`#${fr(e)}${fr(t)}${fr(n)}`.toUpperCase()}function fr(e){return e.toString(16).padStart(2,"0")}var hr="#111111",gr="#FFFFFF",br="#000000";function readableOn(e){let t=or(e);if(t===null)return gr;let n=vr(t),r=vr({r:17,g:17,b:17}),o=vr({r:255,g:255,b:255});return wr(n,o)>=wr(n,r)?gr:hr}function mr(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(gr,e)>=contrastRatio(br,e)?gr:br}function yr(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(gr)>=t(br)?gr:br}function vr(e){let t=kr(e.r/255),n=kr(e.g/255),r=kr(e.b/255);return.2126*t+.7152*n+.0722*r}function kr(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wr(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=or(e),r=or(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:xr(n,o);return wr(vr(i),vr(o))}function xr(e,t){let n=e.a,r=(e,t)=>Math.round(e*n+t*(1-n));return{r:r(e.r,t.r),g:r(e.g,t.g),b:r(e.b,t.b),a:1}}function _r(e,t){let n=or(e),r=or(t);if(n===null||r===null)return null;let o=n.a>=1?n:xr(n,{...r});return pr(o.r,o.g,o.b)}function Sr(e,t){let n=or(e);if(n===null)return null;let r=Math.min(1,Math.max(0,t));return`rgba(${n.r}, ${n.g}, ${n.b}, ${r})`}var Cr=.05;function Rr(e,t,n,r){let o=t[0];if(o===void 0)return n;let i=e=>t.every(t=>contrastRatio(e,t)>=r);if(or(e)===null)return n;if(i(e))return e;let a=_r(e,o),l=a===null?null:or(a),s=or(n);if(l===null||s===null)return n;for(let e=1;e<1/Cr;e+=1){let t=e*Cr,n=(e,n)=>Math.round(e+(n-e)*t),r=pr(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var jr=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),Ar=/* @__PURE__ */new WeakMap;function Fr(e){let t=Ar.get(e);if(t!==void 0)return t;let n=e.color,r=e.brightness==="dark",o=r?{dark:r,ink:n.text.primary,ink2:n.text.secondary,ink3:n.text.muted,paper:n.background,card:n.surface,line:n.borderRingCream,tile:n.surfaceSubtle,shadow:n.shadow,riskBg:n.badgeBgCritical,riskInk:n.danger,riskDot:n.danger,clearBg:n.badgeBgPositive,clearInk:n.success,clearDot:n.success,watchDot:n.warningStrong}:{dark:r,...jr},i=(e,t)=>Rr(e,t,yr(t),Tr),a=(e,t)=>contrastRatio(e,t)>=Tr?e:mr(t,Tr),l=[o.card,o.paper].map(e=>_r(n.brandSoft,e)??e),s={primary:n.primary,onPrimary:a(n.onPrimary,n.primary),accent:n.accent,onAccent:a(n.onAccent,n.accent),link:i(n.linkInk,[o.card,o.paper,o.tile]),badge:n.brandSoft,onBadge:i(n.brandInk,l)},d=/* @__PURE__ */Object.freeze({...o,...s});return Ar.set(e,d),d}var Tr=4.5;function Ir(e,t){for(let n of t)if(contrastRatio(n,e)>=Tr)return n;return mr(e,Tr)}function Er(e,t,n){let r=Sr(e,t);return(r===null?null:_r(r,n))??n}function Pr(e){let t=Fr(e),n=e.color,r=t.card;return{ink:t.ink,ink2:t.ink2,ink3:t.ink3,paper:t.paper,tile:t.tile,line:t.line,card:r,onInk:t.dark?n.background:"#FFFFFF",primary:t.primary,onPrimary:t.onPrimary,accent:t.accent,onAccent:Ir(t.accent,[t.ink,t.onAccent]),accent2:Er(t.accent,.75,r),accent4:Er(t.accent,.17,r),accentChip:Er(t.accent,.47,r),link:t.link,linkChip:Er(t.link,.2,r),riskDot:t.riskDot,riskChip:t.dark?n.badgeBgCritical:"#FFD8D6",clearBg:t.clearBg,clearInk:t.clearInk,clearChip:t.dark?n.badgeBgPositive:"#DDEFC4",byInk:n.brandInk}}var Dr=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),Or=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),zr=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Br=17,Vr=1.5,Nr=400,$r=700;function Lr(e){return e<=450?"regular":e<=650?"medium":"bold"}function Mr(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Ur(e,t,n){if(t==="$mono"){let t=n<=450?"mono":n<=650?"monoMedium":"monoBold",r=face(e,t);return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Mr(n)}}let r=t==="$serif"?headingFace(e,Lr(n)):face(e,Lr(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Mr(n)}}function Wr(e,t,n={}){let r=Pr(e),o=e.brightness==="dark",i=e.motion.reducedMotion,a=e=>{if(typeof e=="string"&&e.startsWith("$")){let t=e.slice(1);return t.startsWith("n_")?o?r.line??e:`#${t.slice(2)}`:t==="sans"||t==="serif"||t==="mono"?e:r[t]??e}return Array.isArray(e)?e.map(e=>a(e)):e},l=/* @__PURE__ */new Map,s=e=>{let r=e.filter(e=>typeof e=="string"&&e!==""),o=r.join("|"),s=l.get(o);if(s!==void 0)return s;let d={},c=e=>{if(e!==void 0)for(let[t,n]of Object.entries(e))d[t]=a(n)};for(let e of r)c(t[e]),i&&c(n[e]);let u=/* @__PURE__ */Object.freeze(d);return l.set(o,u),u},d=/* @__PURE__ */new Map,c=(...e)=>{let t=e.filter(Boolean).join("|"),n=d.get(t);if(n!==void 0)return n;let r=s(e),o={};for(let[e,t]of Object.entries(r))Dr.has(e)||Or.has(e)||e==="ring"||e==="edge"||e==="shadow"||e==="round"||e==="zIndex"&&typeof t=="number"&&t<0||t!==null&&(o[e]=t);if((typeof r.fontSize=="number"||r.flexDirection==="row")&&r.position!=="absolute"&&typeof r.height=="number"&&typeof r.width!="number"){let e=o.height;delete o.height,typeof o.minHeight!="number"&&(o.minHeight=e)}let i=r.ring;if(Array.isArray(i)){let[e,t]=i;o.borderWidth=e,o.borderColor=t;for(let t of zr){let n=o[t];typeof n=="number"&&(o[t]=Math.max(0,n-e))}}let a=r.edge;if(Array.isArray(a)){let[e,t]=a;o.borderBottomWidth=e,o.borderBottomColor=t}let l=r.shadow;if(Array.isArray(l)){let[e,t,n,r]=l;o.shadowColor=r,o.shadowOffset={width:e,height:t},o.shadowOpacity=1,o.shadowRadius=n/2}if(r.round===1){let e=typeof r.width=="number"?r.width:typeof r.height=="number"?r.height:999;o.borderRadius=e/2}let c=/* @__PURE__ */Object.freeze(o);return d.set(t,c),c},u=/* @__PURE__ */new Map,p=(t,n)=>{let o=`${t}|${n.filter(Boolean).join("|")}`,i=u.get(o);if(i!==void 0)return i;let a=s(n),l=typeof a.fontSize=="number"?a.fontSize:Br,d=typeof a.lh=="number"?a.lh:Vr,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Ur(e,p,c),fontSize:l,lineHeight:Math.round(l*d*100)/100,color:typeof a.color=="string"?a.color:r.ink};typeof a.ls=="number"&&(f.letterSpacing=Math.round(a.ls*l*100)/100);for(let e of["fontStyle","textAlign","textTransform","textDecorationLine"])typeof a[e]=="string"&&(f[e]=a[e]);let h=/* @__PURE__ */Object.freeze(f);return u.set(o,h),h};return{reduced:i,colors:r,view:c,text:(...e)=>p(Nr,e),strong:(...e)=>p($r,e),icon:(...e)=>{let t=s(e),n={tintColor:typeof t.color=="string"?t.color:r.ink};for(let e of["width","height","opacity"])typeof t[e]=="number"&&(n[e]=t[e]);return n},col:(e,t)=>{let n=s([e]).cols;if(!Array.isArray(n))return{};let r=n[Math.min(t,n.length-1)];if(typeof r=="number")return{width:r,flexShrink:0};let o=typeof r=="string"?Number.parseFloat(r):1;return{flex:Number.isFinite(o)?o:1,minWidth:0}},motion:(...e)=>{let t=s(e),n=t.ease;return{dur:typeof t.dur=="number"?t.dur:0,delay:typeof t.delay=="number"?t.delay:0,stagger:typeof t.stagger=="number"?t.stagger:0,ease:Array.isArray(n)&&n.length===4?n:null}},raw:(e,...t)=>s(t)[e]}}var qr={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".dot":{width:9,height:9,round:1,flexGrow:0,flexShrink:0},".dot--risk":{backgroundColor:"$riskDot"},".ask-chips":{flexDirection:"column",alignItems:"center",marginTop:22,gap:10},".chip":{paddingTop:10,paddingRight:16,paddingBottom:10,paddingLeft:16,borderRadius:999,fontSize:15,fontWeight:"600",lh:1.3,textAlign:"center",dur:160,ease:[.23,1,.32,1]},".ask-empty":{minHeight:"100%",flexDirection:"column",alignItems:"center",paddingTop:14,paddingRight:16,paddingBottom:22,paddingLeft:16,textAlign:"center"},".ask-empty h2":{fontSize:23,lh:1.12},".ask-start":{width:"100%",marginTop:"auto",marginRight:0,marginBottom:"auto",marginLeft:0,paddingTop:18,paddingRight:0,paddingBottom:18,paddingLeft:0,flexDirection:"column",alignItems:"center"},".ask-empty .ask-chips":{marginTop:14,alignSelf:"center",alignItems:"stretch",width:"100%",maxWidth:340},".hp-need__k":{flexDirection:"row",alignItems:"center",fontSize:15,fontWeight:"800",gap:8},".hp-srcs":{marginLeft:"auto",flexDirection:"row",gap:4},".hp-src":{height:24,paddingTop:0,paddingRight:9,paddingBottom:0,paddingLeft:9,borderRadius:999,backgroundColor:"$tile",color:"$ink2",fontSize:12,fontWeight:"700",flexDirection:"row",alignItems:"center",nowrap:1},".hp-src--dna":{backgroundColor:"$n_E0FDFF",color:"$link"},".hp-need__s":{alignItems:"baseline",marginTop:6,fontSize:15,lh:1.45,color:"$ink2",flexDirection:"row",cols:[9,"1fr"],gap:9},".hp-need__s b":{color:"$ink",fontWeight:"800"},".ask-focus":{width:"100%",paddingTop:14,paddingRight:16,paddingBottom:16,paddingLeft:16,borderRadius:20,backgroundColor:"$card",textAlign:"left",shadow:[0,1,3,"rgba(38, 37, 35, .07)"]},".ask-focus h3":{marginTop:10,fontSize:18,fontWeight:"800",lh:1.22},".ask-focus__x":{width:36,height:36,marginTop:-8,marginRight:-10,marginBottom:-8,marginLeft:-2,alignItems:"center",justifyContent:"center",round:1,color:"$ink2"},".ask-focus__x svg":{width:18,height:18},".ask-focus-pill":{marginLeft:"auto",flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,borderRadius:999,backgroundColor:"$n_FFE3E1",color:"$n_B0231B",fontSize:15,fontWeight:"800",gap:7},".ask-focus-pill i":{width:8,height:8,round:1,backgroundColor:"$riskDot"},".ask-focus .hp-need__s":{fontSize:14.5},".ask-focus__acts":{flexDirection:"row",flexWrap:"wrap",alignItems:"center",marginTop:12,rowGap:4,columnGap:16},".ask-focus__q":{minHeight:36,fontSize:14.5,fontWeight:"700",color:"$link",textDecorationLine:"underline"},".ask-top":{alignSelf:"stretch",flexDirection:"row",marginTop:-8,marginRight:0,marginBottom:6,marginLeft:0},".thread__hist":{flexDirection:"row",alignItems:"center",minHeight:36,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,fontSize:15,fontWeight:"700",color:"$link",gap:6},".thread__hist svg":{width:18,height:18},".thread__count":{minWidth:22,height:20,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:6,borderRadius:999,backgroundColor:"$card",color:"$ink2",fontSize:12,fontWeight:"800",alignItems:"center",justifyContent:"center",ring:[1,"$line"]}},Hr=16;var Kr=4e3,Yr=.5;function Gr(e,t,n){let r=1,o=-1;for(let i of e)o<0?o=i:o+t+i<=n?o+=t+i:(r+=1,o=i);return r}function Jr(e,t,n){if(e.length===0)return n;let r=Gr(e,t,n),o=[];for(let r=0;r<e.length;r+=1){let i=0;for(let a=r;a<e.length;a+=1)i+=(a>r?t:0)+e[a],i<=n&&o.push(i)}o.sort((e,t)=>e-t);let i=Yr*e.length+1;for(let a of o)if(Gr(e,t,a)<=r)return Math.min(n,a+i);return n}function BalancedTitle({text:e,style:t,measureCh:n}){let r=o.useMemo(()=>e.split(/\s+/).filter(e=>e!==""),[e]),l=i.StyleSheet.flatten(t),s=[e,l.fontFamily,l.fontSize,l.fontWeight,l.letterSpacing].join("|"),d=o.useRef({key:"",ch:null,line:null,words:[]});d.current.key!==s&&(d.current={key:s,ch:null,line:null,words:r.map(()=>null)});let[c,u]=o.useState(null),p=c!==null&&c.key===s?c.value:null,f=()=>{let e=d.current;if(e.ch===null||e.line===null||e.words.some(e=>e===null))return;let t=e.words,r=t.reduce((e,t)=>e+t,0),o=t.length>1?Math.max(0,(e.line-r)/(t.length-1)):0,i=Jr(t,o,(e.ch+Yr)*n);u(t=>t!==null&&t.key===e.key&&t.value===i?t:{key:e.key,value:i})},h=e=>t=>{d.current.key===s&&(e(d.current,t.nativeEvent.layout.width),f())};/* @__PURE__ */
|
|
19
|
+
return a.jsxs(i.View,{style:Qr.wrap,children:[
|
|
20
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
|
|
21
|
+
/* @__PURE__ */a.jsx(i.View,{style:Qr.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */a.jsxs(i.View,{style:Qr.probeRow,children:[
|
|
22
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.ch=t}),children:"0"}),
|
|
23
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:r.join(" ")}),r.map((e,n)=>/* @__PURE__ */a.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var Qr=i.StyleSheet.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:Kr,flexDirection:"row",alignItems:"flex-start"}});function Zr(e){return{kit:Wr(e,qr),Title:BalancedTitle,titleCh:Hr}}function Xr(e){let t=e.raw;if(typeof t!="object"||t===null)return null;let n=t.code;return typeof n=="string"&&n.length>0?n:null}function eo(e,t){let n=Xr(e);if(n===null)return e;let r=t[n];return r===void 0?e:makeEverfurError(r.code,{retryable:r.retryable,...e.httpStatus!==void 0?{httpStatus:e.httpStatus}:{},...e.requestId!==void 0?{requestId:e.requestId}:{},wireCode:n,reasonCode:n,...e.wireMessage!==void 0?{wireMessage:e.wireMessage}:{},raw:e.raw})}var to=/* @__PURE__ */new Set(["expo","fcm","apns"]),no=/* @__PURE__ */new Set(["ios","android"]),ro=4096,oo=128,io=64,ao=/[\0- ]/;function lo(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function so(e){if(typeof e!="object"||e===null)return lo("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!to.has(n)?lo("provider must be expo, fcm or apns"):typeof r!="string"||!no.has(r)?lo("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>ro||ao.test(t)?lo(`token must be a push token of 1..${ro} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>oo)?lo(`installationId must be 1..${oo} characters`):null}var co=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,uo=64,po=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,fo=35;function ho(e){return e.httpStatus===400&&e.code==="validationFailed"}function go(e){let t={...e};return delete t.timezone,delete t.locale,t}function bo(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function mo(e){return typeof e!="string"||e.length===0||e.length>io?lo(`deviceId must be 1..${io} characters`):ao.test(e)||e.includes("/")||e==="."||e===".."?lo("deviceId is not a device id"):null}function yo(e){if(typeof e!="object"||e===null)return lo("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?lo("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function vo(e){return typeof e=="string"&&e.length>0?e:null}function ko(e){if(typeof e!="object"||e===null)return null;let t=e,n=vo(t.device_id),r=vo(t.provider),o=vo(t.platform),i=vo(t.registered_at),a=vo(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!to.has(r)||!no.has(o))return null;let l=t.installation_id;/* @__PURE__ */
|
|
24
|
+
return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function wo(e){if(typeof e!="object"||e===null)return null;let t=e,n=vo(t.updated_at);return typeof t.push_enabled!="boolean"||typeof t.email_enabled!="boolean"||n===null?null:/* @__PURE__ */Object.freeze({pushEnabled:t.push_enabled,emailEnabled:t.email_enabled,updatedAt:n})}function xo(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var _o=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function So(e){return eo(e,_o)}function Co(e){return makeEverfurError("validationFailed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function createNotificationsClient(e){let t=()=>{let{services:t}=e.registry;return Ro({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Co("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Co("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(Co("setPreferences"))):t().setPreferences(n,r)}}function Ro(e){let t=e.funnel??createRequestFunnel({auth:e.auth,...e.errorPolicy?{errorPolicy:e.errorPolicy}:{}}),n=(e,t)=>t?{...e,signal:t}:e;return{async registerDevice(e,r){let o=so(e);if(o!==null)return err(o);let i={token:e.token,provider:e.provider,platform:e.platform};e.installationId!==void 0&&(i.installation_id=e.installationId);let a=bo(e.timezone,co,uo);a!==null&&(i.timezone=a);let l=bo(e.locale,po,fo);l!==null&&(i.locale=l);let s=e=>t.send("notifications.registerDevice",n({method:"POST",path:"/widget/v1/me/devices",body:e},r?.signal)),d=await s(i);if(!d.ok&&ho(d.error)&&(a!==null||l!==null)&&(d=await s(go(i))),!d.ok)return err(So(d.error));let c=ko(d.value);return c===null?err(xo("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=mo(e);if(o!==null)return err(o);let i=await t.send("notifications.unregisterDevice",n({method:"DELETE",path:`/widget/v1/me/devices/${encodeURIComponent(e)}`},r?.signal));return i.ok?ok(void 0):err(So(i.error))},async setPreferences(e,r){let o=yo(e);if(o!==null)return err(o);let i=await t.send("notifications.setPreferences",n({method:"PUT",path:"/widget/v1/me/notification-preferences",body:{push_enabled:e.pushEnabled,email_enabled:e.emailEnabled}},r?.signal));if(!i.ok)return err(So(i.error));let a=wo(i.value);return a===null?err(xo("setPreferences")):ok(a)}}}function jo(e,t){let n=`${t.key}\n${t.email}`,r=e.get(n);return r===void 0?(e.set(n,t.idempotencyKey),t):r===t.idempotencyKey?t:/* @__PURE__ */Object.freeze({...t,idempotencyKey:r})}function isIntroSwipeOut(e,t){let n=t>0?Math.abs(e)/t:0;return e>90||e>12&&n>.11}var Ao=/* @__PURE__ */Object.freeze({title:"Request records",clinic:"Clinic",search:"Search clinics by name or location",placeholder:"Clinic name, city, or ZIP",email:"Clinic email",emailPlaceholder:"records@clinic.com",ownerName:"Your full name",scopeHeading:"What you’re authorizing",send:"Send request",sending:"Sending…",cancel:"Cancel",sign:"Signature",draw:"Draw your signature",type:"Type your name to sign",toType:"Can’t draw? Type your name instead",toDraw:"Draw your signature instead",clear:"Clear",drawHint:"Draw your signature in the box above.",clearA11y:"Clear signature",typedSignatureA11y:e=>`Typed signature: ${e}`,missingSignature:"Please add your signature before submitting.",recentlyUsed:"Recently used",moreClinics:"Load more"});var Fo=/* @__PURE__ */Object.freeze({title:Ao.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:Ao.title},leadWeb:"Find the clinic that has them. We send a secure request and read every page they send back.",leadNative:"Find the clinic that has them.",searchLabelWeb:"Find the clinic",howItWorks:"How it works",howSteps:e=>[{title:"We send a secure request",body:"With your permission, straight to the clinic’s records team."},{title:"The clinic sends the file",body:"Most clinics respond within 3 to 5 business days. We follow up for you."},{title:"Everfur reads every page",body:`Visits, vaccines, labs and prescriptions land in ${e}’s records.`}],placeholder:Ao.placeholder,searchA11y:Ao.search,clearSearch:"Clear search",loading:"Loading clinics",uploadOwn:"I already have the records",uploadOwnStarting:"Setting up your upload…",noPet:"Add a pet first, then come back to request their records.",recentlyUsed:Ao.recentlyUsed,noMatch:e=>`No clinics match “${e}”. You can still request records using the option above.`,loadingMore:"Loading more…",loadMoreFailed:"Couldn’t load more. Tap to retry.",selectA11y:e=>`Request records from ${e}`,resultsCount:e=>e===1?"Showing 1 clinic":`Showing ${String(e)} clinics`,fallback:/* @__PURE__ */Object.freeze({title:"Can’t find your clinic?",subtitle:"Add it by email and we’ll request your records.",nameLabel:"Clinic name",namePlaceholder:"Your clinic’s name",emailLabel:"Clinic email",emailPlaceholder:"records@clinic.com",reviewNote:"We review every request by hand before reaching out to the clinic.",submit:"Continue"})});var To=1.609344;function Io(e){return e===null||!Number.isFinite(e)?null:(e/To).toFixed(1)}function Eo(e){let t=Io(e);return t===null?"":`${t} mi`}var Po=300,Do=2;var Oo=/* @__PURE__ */Object.freeze({loading:"Loading",empty:"No records yet",upload:"Upload records",consentRequired:"Consent required",allow:"Allow",allPetsConsent:"This covers all your pets. You can withdraw it at any time.",sessionRequired:"Sign in required",recordUnavailable:"Record unavailable",retry:"Try again",records:"Records",beingReviewed:"being reviewed"});function zo(e,t){let[n,r]=o.useState(""),[i,a]=o.useState(""),[l,s]=o.useState([]),[d,c]=o.useState(null),[u,p]=o.useState([]),[f,h]=o.useState(true),[g,b]=o.useState(false),[m,y]=o.useState(false),[v,k]=o.useState(null),[w,x]=o.useState(null),[_,S]=o.useState(0),C=o.useRef(0),R=o.useRef(true),j=t?.latitude,A=t?.longitude,F=o.useMemo(()=>void 0,[j,A]);o.useEffect(()=>(R.current=true,()=>{R.current=false,C.current+=1}),[e]),o.useEffect(()=>{let t=true;return h(true),e.recentClinics({limit:5}).then(e=>{t&&(e.ok&&p(e.value.clinics),h(false))}).catch(()=>{t&&h(false)}),()=>{t=false}},[e]),o.useEffect(()=>{let e=n.trim();if(e.length<Do){a("");return}let t=setTimeout(()=>a(e),Po);return()=>clearTimeout(t)},[n]);let T=i.length>=Do;o.useEffect(()=>{let t=C.current+=1;if(s([]),c(null),k(null),x(null),!T){b(false);return}b(true),e.searchClinics({query:i,limit:25,...F?{location:F}:{}}).then(e=>{!R.current||t!==C.current||(e.ok?(s(e.value.clinics),c(e.value.nextCursor)):k(e.error),b(false))}).catch(()=>{R.current&&t===C.current&&b(false)})},[e,i,T,F,_]);let I=o.useCallback(()=>{if(!T||d===null||m)return;let t=C.current;y(true),x(null),e.searchClinics({query:i,limit:25,cursor:d,...F?{location:F}:{}}).then(e=>{!R.current||t!==C.current||(e.ok?(s(t=>[...t,...e.value.clinics]),c(e.value.nextCursor)):x(e.error),y(false))}).catch(()=>{R.current&&t===C.current&&y(false)})},[e,d,i,T,m,F]),E=o.useCallback(e=>r(e),[]),P=o.useCallback(()=>S(e=>e+1),[]);return o.useMemo(()=>({query:n,debouncedQuery:i,isSearchActive:T,clinics:l,recent:u,recentLoading:f,initialLoading:g,loadingMore:m,hasNextPage:d!==null,error:v,pageError:w,setQuery:E,loadMore:I,retry:P}),[n,i,T,l,u,f,g,m,d,v,w,E,I,P])}function Bo(e,t,n,r){/* @__PURE__ */
|
|
25
|
+
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Vo={".serif":{family:"$serif",fontWeight:"800",ls:-.01},".emb-btn":{flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:48,paddingTop:0,paddingRight:22,paddingBottom:0,paddingLeft:22,borderRadius:999,backgroundColor:"$primary",color:"$onPrimary",fontWeight:"700",fontSize:16,textDecorationLine:"none",dur:160,ease:[.23,1,.32,1],gap:8},".emb-btn svg":{width:20,height:20},".emb-btn--block":{width:"100%"},".emb-btn--ghost":{backgroundColor:"transparent",color:"$ink",ring:[1.5,"$ink"]},".emb-btn--sm":{minHeight:40,paddingTop:0,paddingRight:16,paddingBottom:0,paddingLeft:16,fontSize:15},".emb-btn--lg":{minHeight:56,paddingTop:0,paddingRight:28,paddingBottom:0,paddingLeft:28,fontSize:17},".emb-btn[disabled]":{opacity:.32},".ph-sub":{flexGrow:0,flexShrink:0,height:46,backgroundColor:"$paper",edge:[1,"$line"],flexDirection:"row",cols:["1fr","1fr","1fr"]},".ph-sub button":{position:"relative",fontSize:16,fontWeight:"600",color:"$ink3",textAlign:"center",dur:240},'.ph-sub button[aria-selected="true"]':{color:"$ink",fontWeight:"800"},'.ph-sub button[aria-selected="true"]::after':{position:"absolute",left:"18%",right:"18%",bottom:0,height:3,borderTopLeftRadius:3,borderTopRightRadius:3,borderBottomRightRadius:0,borderBottomLeftRadius:0,backgroundColor:"$ink"},".ph-sub button .ph-new":{position:"absolute",top:12,marginLeft:3,width:7,height:7,round:1,backgroundColor:"$riskDot"},".ph-toast":{position:"absolute",left:16,right:16,top:112,zIndex:50,backgroundColor:"$ink",color:"$onInk",borderRadius:16,paddingTop:12,paddingRight:15,paddingBottom:12,paddingLeft:15,fontSize:14.5,lh:1.4,opacity:0,dur:160},".ph-toast.is-on":{opacity:1,dur:220},".cp-tag":{family:"$mono",fontSize:10,ls:.06,textTransform:"uppercase",backgroundColor:"$ink",color:"$onInk",paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,borderRadius:5},".cp-tag--s":{backgroundColor:"$card",color:"$ink"},".sh-track":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".sh-track li":{position:"relative",paddingBottom:16,flexDirection:"row",cols:[22,"1fr"],gap:12},".sh-track li:last-child":{paddingBottom:0},".sh-track li::before":{position:"absolute",left:10,top:20,bottom:-2,width:2,borderRadius:1,backgroundColor:"$n_E2DFD9"},".sh-track li:last-child::before":{display:"none"},".sh-track li.is-done:has(+ li.is-done)::before":{backgroundColor:"$primary"},".sh-track__dot":{width:22,height:22,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$card",ring:[2,"$n_CFCBC4"],position:"relative",zIndex:1},".sh-track__dot svg":{width:13,height:13,color:"$card"},".sh-track .is-done .sh-track__dot":{backgroundColor:"$ink",ring:null,shadow:null},".sh-track .is-now .sh-track__dot":{backgroundColor:"$accent",ring:[2,"$ink"]},".sh-track strong":{fontSize:15.5,fontWeight:"800",lh:1.3},".sh-track small":{marginTop:1,fontSize:14,lh:1.35,color:"$ink3"},".sh-track li:not(.is-done):not(.is-now) strong":{color:"$ink3",fontWeight:"700"},".ph-intro":{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:45},".in-dim":{position:"absolute",left:0,right:0,backgroundColor:"rgba(38, 37, 35, .5)",opacity:0,dur:240},".in-dim--top":{top:0},".in-dim--bot":{bottom:0},".ph-intro.is-on .in-dim--top":{opacity:1,dur:380},".ph-intro.is-on .in-dim--bot":{opacity:1,dur:380},".ph-intro.is-on.is-all .in-dim--mid":{opacity:1,dur:380},".in-sheet":{position:"absolute",left:0,right:0,bottom:0,backgroundColor:"$card",borderTopLeftRadius:28,borderTopRightRadius:28,borderBottomRightRadius:0,borderBottomLeftRadius:0,paddingTop:10,paddingRight:20,paddingBottom:30,paddingLeft:20,shadow:[0,-10,30,"rgba(38, 37, 35, .14)"],dur:240,ease:[.23,1,.32,1]},".ph-intro.is-on .in-sheet":{dur:380,ease:[.32,.72,0,1]},".in-sheet.is-drag":{dur:0},".in-grab":{width:40,height:5,borderRadius:3,backgroundColor:"$n_DAD7D1",marginTop:0,marginRight:"auto",marginBottom:8,marginLeft:"auto"},".in-top":{flexDirection:"row",alignItems:"center",minHeight:40,gap:12},".in-back":{width:40,height:40,marginLeft:-10,alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0},".in-x":{width:40,height:40,marginLeft:"auto",alignItems:"center",justifyContent:"center",round:1,flexGrow:0,flexShrink:0,marginTop:0,marginRight:-10,marginBottom:0},".in-back svg":{width:22,height:22},".in-x svg":{width:22,height:22},".in-bars":{flex:1,flexDirection:"row",gap:6},".in-bars b":{flex:1,height:4,borderRadius:2,backgroundColor:"$line",overflow:"hidden",position:"relative"},".in-bars b::after":{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:"$ink",borderRadius:2,dur:240,ease:[.23,1,.32,1]},".in-skip":{minHeight:40,paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:10,marginRight:-4,fontSize:15.5,fontWeight:"700",color:"$ink2",flexGrow:0,flexShrink:0},'.in-sheet[data-mode="records"] .in-bars':{display:"none"},'.in-sheet[data-mode="records"] .in-skip':{display:"none"},'.in-sheet[data-mode="intro"] .in-x':{display:"none"},'.in-sheet[data-mode="records"] .in-top':{justifyContent:"space-between"},".in-body":{paddingTop:6,gap:14},".in-eyebrow":{flexDirection:"row",alignItems:"center",flexWrap:"wrap",fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",rowGap:4,columnGap:8},".in-by":{flexDirection:"row",alignItems:"center",textTransform:"none",ls:0,fontWeight:"500",fontSize:13,gap:5},".in-by svg":{width:54,height:19,color:"$n_10462E"},".in-h":{fontSize:29,lh:1.08,marginTop:-2,marginRight:0,marginBottom:0,marginLeft:0},".in-p":{fontSize:16,lh:1.45,color:"$ink2"},".in-p--s":{fontSize:15},".in-rows":{marginTop:2,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:9},".in-rows li":{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:18,paddingTop:13,paddingRight:14,paddingBottom:13,paddingLeft:14,flexDirection:"row",cols:[40,"1fr"],gap:12},".in-rows b":{fontSize:17,fontWeight:"800",lh:1.25},".in-rows li > span:last-child > span":{fontSize:15,lh:1.4,color:"$ink2",marginTop:1},".in-ic":{width:40,height:40,borderRadius:12,alignItems:"center",justifyContent:"center"},".in-ic svg":{width:22,height:22},".in-ic--y":{backgroundColor:"$accentChip"},".in-ic--c":{backgroundColor:"$linkChip"},".in-ic--g":{backgroundColor:"$clearChip"},".ph-sub button::before":{position:"absolute",top:7,right:8,bottom:7,left:8,zIndex:-1,borderRadius:999,opacity:0,dur:200},'.ph-sub [data-sub="ask"]':{tint:"$accentChip",k:0},'.ph-sub [data-sub="plan"]':{tint:"$linkChip",k:1},'.ph-sub [data-sub="records"]':{tint:"$clearChip",k:2},'#ph[data-in-frame="tabs"] .ph-sub button':{color:"$ink",fontWeight:"800"},'#ph[data-in-frame="tabs"] .ph-sub button::before':{opacity:1,dur:260,delay:560,stagger:60},'#ph[data-in-frame="tabs"] .ph-sub button::after':{opacity:0},".in-pair":{flexDirection:"row",cols:["1fr","1.5fr"],gap:10},".in-stack":{gap:8},".in-body .emb-btn":{dur:120,ease:[.23,1,.32,1]},".in-fine":{fontSize:13.5,lh:1.4,color:"$ink3",textAlign:"center"},".in-link":{alignSelf:"center",minHeight:40,paddingTop:0,paddingRight:8,paddingBottom:0,paddingLeft:8,fontSize:15,fontWeight:"700",color:"$link",textDecorationLine:"underline",dur:120,ease:[.23,1,.32,1]},".blanks":{backgroundColor:"$paper",borderRadius:20,paddingTop:12,paddingRight:12,paddingBottom:13,paddingLeft:12,gap:8},".blanks__h":{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:0,paddingRight:2,paddingBottom:2,paddingLeft:2,fontSize:12.5,fontWeight:"800",ls:.07,textTransform:"uppercase",color:"$ink3",gap:10},".blanks__h em":{fontStyle:"normal",ls:.01,textTransform:"none",fontSize:13,fontWeight:"800",color:"$onAccent",backgroundColor:"$accent",borderRadius:999,paddingTop:2,paddingRight:10,paddingBottom:2,paddingLeft:10,nowrap:1},'.blanks[data-st="filled"] .blanks__h em':{backgroundColor:"$clearBg",color:"$clearInk"},".blanks ol":{marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,gap:7},".blanks li":{columnGap:11,alignItems:"center",backgroundColor:"$card",borderRadius:15,paddingTop:9,paddingRight:12,paddingBottom:9,paddingLeft:9,flexDirection:"row",cols:[34,"1fr"]},".blanks li > b":{width:34,height:40,borderRadius:11,alignItems:"center",justifyContent:"center",family:"$serif",fontSize:22,fontWeight:"800",backgroundColor:"$accentChip"},".blanks li > span":{fontSize:16,fontWeight:"700",lh:1.35},".blanks li > small":{fontSize:13.5,color:"$ink3"},".blank":{minWidth:36,height:20,borderRadius:6,backgroundColor:"$accent4",ring:[1.5,"$accent"],fontStyle:"normal"},".blank--s":{minWidth:24},".blank--l":{minWidth:64},'.blanks[data-st="filled"] .blank':{height:"auto",minWidth:0,backgroundColor:"transparent",ring:null,shadow:null,paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:3,marginTop:0,marginRight:-3,marginBottom:0,marginLeft:-3,borderRadius:6},".in-search":{flexDirection:"row",alignItems:"center",height:50,borderRadius:14,backgroundColor:"$paper",ring:[1.5,"$ink"],paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,gap:10},".in-search svg":{width:20,height:20,color:"$ink3",flexGrow:0,flexShrink:0},".in-search input":{flex:1,minWidth:0,borderWidth:0,backgroundColor:"transparent",fontSize:16,color:"$ink"},".in-clinics":{gap:8},".in-clinic":{width:"100%",alignItems:"center",textAlign:"left",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,dur:120,ease:[.23,1,.32,1],flexDirection:"row",cols:["1fr",24],gap:10},".in-clinic b":{fontSize:16,lh:1.3},".in-clinic b .cp-tag":{marginLeft:6,ring:[1,"$line"]},".in-clinic small":{fontSize:14,color:"$ink3",marginTop:1},'.in-clinic[aria-checked="true"]':{backgroundColor:"$accent4",ring:[1.5,"$accent"]},".in-tick":{width:24,height:24,round:1,alignItems:"center",justifyContent:"center",ring:[1.5,"$n_CFCBC4"]},".in-tick svg":{width:14,height:14,color:"$card",opacity:0},'.in-clinic[aria-checked="true"] .in-tick':{backgroundColor:"$ink",ring:null,shadow:null},'.in-clinic[aria-checked="true"] .in-tick svg':{opacity:1},".in-none":{fontSize:15,color:"$ink2",backgroundColor:"$paper",borderRadius:16,paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,gap:4},".in-none .in-link":{alignSelf:"flex-start",paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},".in-prog":{fontSize:15,color:"$ink2",gap:7},".in-prog__bar":{height:5,borderRadius:3,backgroundColor:"$tile",overflow:"hidden"},".in-prog__bar i":{height:"100%",width:0,backgroundColor:"$ink",borderRadius:3,dur:600,ease:[.23,1,.32,1]},".in-sent":{backgroundColor:"$paper",borderRadius:20,paddingTop:16,paddingRight:16,paddingBottom:16,paddingLeft:14},".in-sent .sh-track li":{paddingBottom:14},".in-sent .sh-track li:last-child":{paddingBottom:0},".in-stack .emb-btn svg":{width:20,height:20},".ph-banner":{position:"absolute",left:10,right:10,top:54,zIndex:55,alignItems:"flex-start",textAlign:"left",paddingTop:12,paddingRight:14,paddingBottom:12,paddingLeft:14,borderRadius:22,backgroundColor:"rgba(250, 250, 249, .97)",shadow:[0,14,34,"rgba(38, 37, 35, .4)"],ring:[1,"rgba(38, 37, 35, .06)"],dur:240,ease:[.23,1,.32,1],flexDirection:"row",cols:[38,"1fr"],gap:11},".ph-banner.is-on":{dur:380,ease:[.32,.72,0,1]},".ph-banner__app":{width:38,height:38,borderRadius:10,backgroundColor:"$accent",alignItems:"center",justifyContent:"center"},".ph-banner__app svg":{width:24,height:23},".ph-banner__meta":{flexDirection:"row",justifyContent:"space-between",fontSize:13,color:"$ink3"},".ph-banner__meta strong":{fontSize:13,fontWeight:"600",color:"$ink3"},".ph-banner__txt > strong":{fontSize:15.5,fontWeight:"700",lh:1.3,marginTop:1},".ph-banner__txt > span:last-child":{fontSize:15,lh:1.35,color:"$ink2"}},No={".ph-sub button::before":{dur:150,delay:0},'#ph[data-in-frame="tabs"] .ph-sub button::before':{dur:150,delay:0},".in-sheet":{opacity:0,dur:150},".ph-intro.is-on .in-sheet":{opacity:1,dur:150},".in-sheet.is-drag":{opacity:1},".in-dim":{dur:150},".ph-intro.is-on .in-dim--top":{dur:150},".ph-intro.is-on .in-dim--bot":{dur:150},".ph-intro.is-on.is-all .in-dim--mid":{dur:150},".ph-banner":{opacity:0,dur:150},".ph-banner.is-on":{opacity:1,dur:150}},$o=[.23,1,.32,1],Lo=[.32,.72,0,1],Mo={opacity:0,translateY:8},Uo={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Wo={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},qo={chat:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAB/ElEQVR4Ae3BPWicZQAA4CfvvUMxNSqp/dHJUeogiSUpWRQKDi6djFKV/k1OHdqhTipSih1LQzYR2rg5iZNQDiFYijlCK4KLUDi4SgsNDRVqEyV8HHfvXQ+a9vvgBb/nUavVarXaNo15nFedMe1NO5VnXct1F3QMGTPsIxe9qBr3nPC9AQ2Djrhsh6rsMO8PNyWC1D4LqrZot0SUOmlC1+/+Up7dXleYcNx5faLUrK5pK8o15VeFgxJBakbhmhVlW3FNYVYiSL2k0FGFjsKkRJCBIANBBoIMBBkIMhBkIMhAkIEgA0EGggwEGQgyEGQgyECQgSADQQaCDAQZCDIQpNYU9qjCXoU1iSC1qjBrv7K9YUahJRGlVr2tcNM3bmn7UduwA94VbcdrPtHVkohSC04aVzhmy0O73NfvBVe85+k9cEmiIXVX22H9Gn5zQ8+sq97yLI76WSIa9K1/LHpezyt6zjrnWaz51JIB0bAlTWdMmTKu38uWHPK01rVc97XbhkSP03bKjF8Uxmx5x3f26HrotItKEj2Jhi+cFXTdclhLaaJRNnTt0zSn5wcfu6dE0SgNXaf0PPKZC0oWbUfb+5aVLhpl06CffOiOCkSjBP02fe4r/6pENMqGntvmNVUmGuVPDzxnS9MHOirUMMrfls2Z9KWj1tVqtf+v/wAyK17WT9+2hwAAAABJRU5ErkJggg=="},heartcheck:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAAEgklEQVR4Ae3Bf4yWdQEA8M/zPgzFzsmlOSkk2QAHaHMRdCIXevxydWCTGZIzmYySQJcJS3MTl1lsxvqDwpuyGs2kLIhByLU7qqkUFgWtA71onHbUnQFGlngRd+duz757ee953vfe91b/vZ+PqqqqqqqqqmGKlOd6k4w1zlg9jnldh90GG6XBeFcZ70KdOh33qpeVITK0Ot9UZ7CTvm2jUxLvc5+VLjXYfvc6YAiR0iZbb5HiNlkr8oSVittprT8pIVLKNK1GK+2gyHVK+4c5DioqVtx0e11iKGNcYSijLNWsWxGRYj6qVY28Zs971VHdxvuQmy2T9l17tOkwxkRXazRf3r80OCBTpJgjJgu2e8whhabZbpy8Drc6pNCHPWqhoM21MsWyfd5dgofdq9tgXb5vocskDrvBMYN12arPTRKX6/Y7GWJZauxwkcR9Nsh2xnPmGoPfavCmbC94ywKJGZqclRLLstSnJdosU9wZz+j0lLV6FLffUpcZ8B5H/FFKTpZ6wTqlva3JLkNZJ6iXISdLvcRZO/wv/FivxCwZctLea5LEK/pU6iarXKpQr3aJqS6WkpNWL2hTqa/7uW856gMKtQnqpeSk9QhGqcw6DxpQ6xGFRgrOSclJ6xBMUInVHhWMVGii4JiUnLRj+iUmKt89Ngp6rVdogqBDSk7aOX+VGGWM8txpk6DPEu3Od6ULJF7TKyUnS4dggUJ32uE2g91mi0jwOdsUWiA4JkNOllbBauf7jO+5xXO+5HyNtooEa2w22P2CVhlysjytT2Ka6YIRHpNYb43gY7aJBettMFidKRJ9npIhJ0uXPYJV8voFT1hjQJ09RgqaPCRtpWCnUzLEsv3bUolrbHfCgD6nfVIwX48ee9UInrVc2hSb5CS+6M8yxLId9VkXG5Bzvc36DTjkQrMEc92hRvBTt+szWOxn3i/RbaVMsWz93rJQYoy37ZPYq8ZMwUjBrzQ6K+1BdwhWOyRTrJjfW+BKidl+6E2JFjVmKvQHc5yRNsGPxBIv+IIiYsW9ZIURBsRm2CxocYF6eUfc6J/SInuMk3jHPKcVESvulH4NEmPVahbsVWOmRKfZ/i7Lk24RPOx5RcVK+bVbXS5R55wXBS0iN+Koef4iyzprBAfdrV9RsVL6/MYKkUSD1x0S/NJOP/BVf5PlHt8Q9JrvDSXESuvyhkbBIoe9Iuj2mh5ZFtsiEizXoqTYUA74rzkSkU85qF1pi/xEJHjAk4YQG9qLatUJljjhgOJWeEYkeNzjhhQrR7OrXCcR+YSLtMoS2eBrIkGTB5QhVp5dJrlWcIOpdupVaKQd7pK31XJliZWn3zZX+Ihgqtm2+4+8Wi3myGtytzLFyrfbO+aKJD7odi87LjHTL0wR9Puyh5QtVol9jlhkhMRoy/R7Sc5XfMclgrOWeFoFIpWaZZfR8vaLTZd3WqN9KhKp3GTNxsnWaZ52FYpV7qQtrjFJ2m7zHVex2HD0eNZJH1dolfv1GIbI8E21zdUS7RY7bJhiw3fCZrVmYKPFulRVVVX937wLjmYiRAD5+2oAAAAASUVORK5CYII="},file:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACN0lEQVR4Ae3BP4scZRwA4Of9Zc5NQkStch6IcqARK4tTsXJFDuQsFOFABW0sYqmfQRDyAcTGIoiS8rTYJIho0MIPEPwTo6ggnN0hmHDN7lgsw2bvMu/MnBsZYZ/H0tJSnyXN3rFhTdLGr875UUdJk+88posbtnytk2Py3va6bu7yqm/8roOQt6G74y4b6iDknXYUJ1z0rNYKeWHqL/fK+8GjZk645HlXtBLulIHLhloJeaW2xqZuqgxc8pwWQl7SVpj6zcvGpo4b2dQoLN6ObWNTAyObGoRFSaYSdmwbm1oxsikr3Bk7to1NrRjZlBHySm1NTJ00NDS05wOVFZ/bUquwaA/6yu18bM2+2wr/lfs8rEZYlO81GagRFuW8G/KSGoVFGTnlaQMHveKsBoW8pItvHfaUSlIj9EDogdADoQdCDxTySoedcb96u6651USlVKPQzUlXrcv7yRmdhLxk3pZ1TR7xoplQSWqEbibaSDoJeaV5F+1q8odPzUxUSjUK3exb84Z19a77xK2SSlKjkJcc9pEukkahB0IPhB4o5JUO+tALVtX702feMlNqFPKSeU9406qcVWc9biZpFPJK8za08aSZUqOQl8z7QhtfmkkaFfJK8657zUtOq7drx89mJiqlGoW85KALLugiVJIaoQdCD4QeCD0QeiD0QOiBQl5p6h5XHM0DKhM1Cnl7Ks/4t/bUCHnXLM4vaoS89920GO+qdUze33Y85JS7Hd2+q95zztLS0v/TP569YMkUqobUAAAAAElFTkSuQmCC"},back:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACGklEQVR4Ae3Bra4eRQAA0LPf9AXYKwbRkPIASzAoSLoXBGRUDaS8HcFNr6rBIO6aipqKu7ICjeimwQwO0hCyg5v9wX3nuLq6urpqFJztme/87r0NOmfqvfSVD35wp1lwnt69L/zjez97r9HFWW5MPrN6qtnFOW7cG9TeanZxht69Qe1XrzS7OK43GdRmz23QOao3GdRmo8UGnWN6k0FtNlps0jmiNxnUZqPFRp39epNBbTZabNbZqzcZ1GajxQ6dfXqTQW02WuzS2aM3GdRmo8VOne16k0FtNlrs1tmqNxnUZqPFAZ1tepNBbTZaHNLZojcZ1GajxUGddr3JoDYbLQ7rtOpNBrXZaHGCR9p8ZDKoPbi1OMVFmzuD2oNbi5NctHjsG7XZrcVpLloU//XOqYIWxac+t3oiyYqTBG0mSbSKvnWnOEXQ5k8vJNHqY0lWnCBoVWRJtIqSrDgsaFdkSbSKkqw4KNiiyJJoFSVZcUiwTZEl0SpKsuKAYKsiS6JVlGTFbsF2RZZEqyjJip2CPYosiVZRkhW7BPsUWRKtoiQrdgj2KrIkWkVJVmwW7FdkSbSKkqzYKDiiyJJoFSVZsUlwTJEl0SpKsmKD4KgiS6JVlGRFs+C4IkuiVfTUT/7SKDhDkSXR6rHX3mp0cY7FrQe1G80uzvLO1x786w+/aBacp3jhS5/44EdvNOuc7ZknXvrN1dXV1dX/4G9ZtJHJgYcMcQAAAABJRU5ErkJggg=="},x:{width:22,height:22,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAQAAABJXchjAAACb0lEQVR4Ae3BPaokVRgA0DP3y3SMBM3E2FQ0MprEBdzb/QpEcAmCoShmJmLoGgpeoQgDGohoJJi/TxNxViDjAmoQKYp+81dd1ZlS59jtdrvdbvdfFs75yDc+kB7Y7p77PvXILxaFZR/60l2veF9K2zTfetVd7/rLrxYUyz4xCb1mi6YXJp9ZVKwVes1aTS+sFJb94WhWHN1I5x1cK07e87sFYdlvblTFrEppWdMrZqMrX1sUzkmpKiZFldLzNb0wG3UGZ4TzUqqKSVGl9GxNL8xGncFZYY2UqmJSVCk9remF2agzWCGsk1JVTIoqpcc1vTAbdQarhLVSqopJUaV00vTCbNQZrBTWS6kqJkWV0qTphdmoM1gtbJFSVUyKKiWaXpiNOoMNwjYpHc2Koxtv6IXZqDPY5I7tmmvPdzDYKGyXblTF00ZXBpuFS6RUFY8bdQYXCJdJqSpORp3BRYpL3fHQbQ9dLFym6b3othdUKV0gXKLphScVVUqbhe2aa8WzFEc30kZhq+babQfXqmJWpbRJ2KbpFbPRlUFKVTEpqpQ2CFs0vTAbdQb/SqkqJkWV0mphvaYXZqPOYJZSVUyKKqWVwlpNL8xGncFtKVXFpKhSWiWs0/TCbNQZPCmlqpgUVUorhDWaXpiNOoNnSakqJkWV0lnhvKYXZqPO4HlSqopJUaV0Rjin6YXZqDNYklJVTIoqpUVh2T33FSdXBuekdDQrjn72wIKw7HsvOzkYrJFuHJ285SsLimWvOTkYrDU4OHndorDsJe+YHAy2SDeOJl/40YKw7Ad/e9OfDr6zVfrJ2x752Od2u91ut9v9f/0DIGjD825hJnwAAAAASUVORK5CYII="},search:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAADJklEQVR4Ae3BXWhVdQAA8N89By2n82PWFBfLQfQQ5MWupuWTRaXlQ1hBZvjWLMMK+0IShEgiI0gU+rBArKiQwNvUagoavWgGQiwqH0qFWRKOyu85W8ifg657ds49wl5iv59hw4YNu1IlRTWZqAk9jutxxUrqNc4C95tvtEtO2mGr7f5WWEk9rrHSE0ZJd9oGr+lRSEm+1V40SrZT1nhVAbFsDbZ6zAh5RrrTNJ/rU6eSLM2+NN3lDtjhiG6RKVrNN93lvnOvP9SlJMt+MyROWO8dRww01eOWaZTY71Z1KRncFg9KfGCZk9KN8a5FEh97RB1ig1niJYm1ntRrML0+02CO4GYHdckVS9fgCw2CDVbIs0uzmYLbveW8HLF0L7tbsNti/fJ95Q6tLmrUb7cckTQjPS0451EX1OOCh50VPCWWI5LmHqMEax1Vr25vCsa6S45ImoWCfusUsV5ioRyRWrEHBHsdV8RR3woWKskUqdWqUbBPUXsFE10nU6RWo8Svijok0ShTpNZYiV8UdUiiUaZIrbMS/YrqlTgvU6TWMYlmRU2W+F2mSK1jEs2Kmizo95tMkVq9fhLMVtRtgi79MkXSdAruM0ERE8wTdMoRSdMpGGG5IlaIBTvliKTZo0/wgmb1utbzgnP2yBFJc8r7gtE+EalH7FNXCd5zTo5IupVOCOZ6Qz3WmSv40yq5YunOOm2eYLYGu2R73TMSz/lGrthg9pnpRsEcN9ipV7oxNlkqcdhidYgNrmqBSYJplpvoZ38ZaKrVPlJxyXiTbZerJMsk28xwuQN2OKJbZIpW802XZqN2OUqyXW2zh9TnsOslNmqXKZatzxY/mmWcbIe1W6pNWVDRokOGWL4fvK3PLCOkO+0Vi3yPqjZlQUWLDoOK1aPP1zbo8o9WI11yUtUaS3XqE1S1KQsqWnQYRElRTSZqwnE9etQq2WSJxEbtUsWKOqNHt249zkhX1aYsqGjRIUVsKFS1KQsqWnSoERsaVW3KgooWHf4jNlSq2pQFFQd1GSA2dKpa3CIYb7MBYkNpmzZlF63SZYDY0NrqkJs860PDhg373/kXh1m18JaQSPQAAAAASUVORK5CYII="},bell:{width:20,height:20,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAQAAACQ9RH5AAACX0lEQVR4Ae3BX2hVdQAA4O/87n2oxCw3ckG6IB+kZUE9tL0YI0iSQYiROOwhgmjTAqF66o9URNRDFG3BeggiiShBgxp7irB/BGUEYlhCkVzTxpAgshKMw+GitrPfPT+7cHq436enp6enp6rMxVhrSL9+Z82bd8hRyTJpBtznbje70Nfe9YYTEmSqW+Yxj7hMud+94EV/qChT1QbvGBDXco9PVZKpZtKU833lB8ew2nVucb5Jr6kgU8UzHtd20sv2+Mk517rXw/q1Pe0pHWU6G7dH26Neddpil9jlOW3j3tZBQycj9mvIHTdqrzPKnPGJOXdZJjdmTktUQ1zTASvlThlxSMwx+2x3KZpGTTkrIojbZo3CnY7q5HtjCmuNiwridihM+UIVn5lRmBQVxAy4Ve60Z1W1219yw64WEcRsVXjfL6o67gO5zGYRQcyIwqwUswrDIoKY1QoHpTioMCgiiFmj0JKipTAoIoi5RuFXKVoKgyKCmgQ1CWoS1CSoSVCToCZBTYKaBDUJahLUJKhJsLRp/9W0JQVL2WlCYa9U+xUm7LCEhnIbvSWTO2LMn9J8aIs+uY0O+FGJTJnrfe5yhe+ckG6VdQq/GXbYIpky37hJ98zaZJGgzCrdNKpEUGZGN+1SIlNuwDrd8a0FXbDcg7b6t20esFySphR9PjaEFWacM2EaD7nNgsqCFFcZknvFjdrWe0nuBldK0JBi3v1WoOkOJy3os8nr+uV+9qQEmTRbvKfcZvskaEhz2BWGLfa8KUkaUs1p2uBCuz0hUeZirLTd7Ub87UsfedMpPf9f/wDy4XMuWu1V4gAAAABJRU5ErkJggg=="},check:{width:14,height:14,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAQAAABvygHQAAABdUlEQVR4Ae3BvWpTYQAA0NN8ubVUcNZFaJUOgpti8QcKesHSpa1Cqr6APoHPIYib7jZILelVIVtFXAQfQa2DD5EvKJePyk2atGk66JBzTExM/FdmLegTnMxtnzx1zo6K4CSWvHcGV7T88lfN+JZ8cEryW0XduO4oTEuavqqoG0+uZVrS9kiPKePIFTJJ24qOHlOOL1fIJG0rOvpMOa5cIZMU1nQcUNNvwYzhlr2TSbat6hgg6PXKS4998d0gd7XUJS33RAMFVYueY1bDZ9/0y+3IJIU10RA1VTXJjMJNvXKFTFJYFQ0VVP102SWlugc++mHfsh2ZZNu66BBBr7euuqiUadi1p5RrySSFddGhgl5dTTfMKWU27NqTK2SSwqroCEG/rk3XXFDKNJz2QiZ5477oSMFBUdN1c0rTbqlJtjREIwgGiZoWzatqaugaSTBY1LRo3r5ND3WNKBgm2rTkvNKWDV0jC4aLXjtrzjNPdE1MTPwjfwDF5lTRg1trxQAAAABJRU5ErkJggg=="},wordmark:{width:54,height:19,uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAAA5CAQAAAAfWjgQAAAIE0lEQVR4Ae3BC5hWZYEA4HeO89jITFeQBNFgKSREQiwYaoNAN0V5EAxyiREGTc0NL6UmmJuYEhQaFCQSXgbLFtYL5mVdtBDaEk1xXVwuQjgRTGPgKLcZ6Fm3y+l7Tuf/Z/75x5EZYabet8Dfgi8Ybwh+bbH5XtXCCrR3JZ5QKtN1ZmhRR2jvVvuYbMN9xFItKNK+fdMADfXXogq1Z8f7isQ+S1Q5V29UaFGF2rOrJJ402h5Md7Xp7tKiCrRffawTvOwkdVpNpP2aL/FZdVpRpL0aZJhgkTVaVaS9uklihlYWaZ/6OE1wl61aWaR9ukJiulYXaY+Oc6Fgtd9odZH26BKJ2d4GkfanyHmCzZZ5GxSqr4vBRuqhQKzOC+ap1pJ6GGy4Dwr+2/94yGvenCGGi+31gEq5naWbYI6W1smpejrS/1nnWVX+okCmo93gEg1VuE6V2FRnyOX/nSqYq7/69hsh+LArXKS+Hea5SeLLRsm2wFJ80iInSD2iXI33eEAkUy9dBC/YLdN898l0qz6yzfAE7nGsbJNV4mrXK5aaZZo/K5QabZFOcil3lnFWobeh8utvqPpqBRe7TS6d3eh8Z3tRrJehsj2CUX4s20irDPGaKmVy6y/bg7INMEi228UG6SlbMRabKNtU/ZxFocQV5gheM929XkFPk3zR+3C0lU7zUwdjgS8IXjLXA3agh0ku9T70sMonbJDbYD9GjWttwkfNFjvRnUabqUzrm2ciqk23CZcZI3amC9xRIBjvR4LNRtgi9V5LfFqsTn+bMcCPnCB42UA1GurlJbG9Jrtf7GtuECx3hky9PeW9Ylv0t09QrMJYwRwTdPaSESpR4gmlEu+3Q6qDWsG9PivW21L9BF8yV0ODVeglOM8PJXq7V1/BlW7BKqPsQanVEuv0jcS6WCTYZrAtMr1utG1iHSwWe94IewW/VyOXTQ6IjXe/2Ag3CNY4R7aNRgt6ukmi1mUSl+jsdaepFPucUqkBMpVLzBJsNFV+q90ol41ulZiB9c60R+wGqRMVRWLfUiyYokZ9+31FMNgEsUpLBB9WKpcyRdjgUUGFxBh16vuZWwWX6yrxukQRvmq7YIBMnWWaKFjpeYlqTdkht50SRShXJ+gnUxShjzJBtYfkssRuwQWCuyUmyOVyse8JJuks+Hfb5LJQ4mK57LRAYptM26VOMEgwX3NEmvaAZyW2S9WqizBB4t805knBMMHPbRBMVKy+431U7B7BuRL3ym2tHYJ/kkuF1J1SlVZInSuocr+WNkdqrtRCIpwhsUZjnpP4lGCe4F3K1HeJ2J12CYZI/JfGrBUMlssyqWqnqBR71HCZLhXM1tJe8XOpe1yoBlWmuZJC9JHYpjGvSnQX3O3rOoldbKFsnxe7TXCKYonfacxvJT5ks2x1Vsv0vH/Q0DidxGp8X0t7Srbb3e6vCnVVJDHPLrkdK9FRUKvCVWInK/W01DidsNazgp5Sq/xRbr0l3q2+F70ZUwQ/tF/z/FFT1sujUInURzStQGKRqwSf87TURWLflThSaoimlahvm6b1N0QwR3OVaMrL8ij0B6lVmrZBYpPlThebbJpawQlOw05L5fKYDvJ7w071VWlaueBBWzVXB02pkUehGqlrPKM5ljhdrMRYiwWTxRbbJ1Endaa34g1N6aBMcLPmO1ZTdssj8rrdEt01T4VqwSSJiWILpTZIddU6husotswvNF8/Tfm9PCI8KzFQPjOttFI/me4SDDNAbIwueNSvpDbYJTFIPg9b6XFvxYWCad6KUgclwt0S4+VTZqihsi2QuEJskliFbMskxmtcNyMNdbLmO94osZ96SfP11cNBifCwA4IuyjRmmG7Yaa1M2z0o+Aw+5Gy86j7ZbpMY53iNmST2guabIpghv0guUx2kCLt8Q2K2TnKbL1ahvtmCDv7Zv4h9V32/9JjELLl1dZ3Y7ZpvvNhaT8pll8QADZ1sgoMUid3ofwXHWKJIQxX6oNbN6ntKpWCK88SWaOhSuwTjzdJQRw8pwjpLJd4hcZR8RugmNl1uv1YrOMcxshWpwB6JSKYjJUrkEQnOUSU41SrdZRroZyaJXWyHhm4VfEJHLLNZQ1ucaY/gGsu9X6ZhnnOKWLnUaInROmrc5WIvW6YxqwRHuUOxVHc/0Q9XS4yWaazEFHkUSBznPgMlVnheLd7pHw0UXGaeXEpUK5E43eNyO8lDugsOeMx6b+AYY3UU2+1cy/Flo/AOpVI7rRfc4QcyHWu72GQVGjPI0xJbXW+r2BDTFGGm76uU2KRa0FFfqUq/EVxkkyyFEtsMMsVsRWLDDZfpt86zQm773Kdc8CuPa8yLTvYdE8WKjDFGpo0+Y71YL0PVd7Shgp/IdqHYHks17hnX+KbgAypkmula3aV66SWXHnoIOqinUKb5/sO1Sp0o0zrL3Gy3xn1PuWChfHaZZK6vGqyrTMvd5kFvzefFZtovn2/ZZ4b3yHbAdW5x0Ark0t8xPuYIPGeDLZr2SUeIrbHXm/FxXfXFG56x1SaZPqibxm2xTep0/4n9unlNU44yxlinehe2esoKj3hF8Clv3hp7ZSnQtj1sJL7tSodQpC072kixmx1SkbbsfLH5qh1SkbbsfBwwyyEWabsG6oWZqhxikbbrcuyxwCEXaauKnY2v2emQi7RVZym20XccBiJt1QX4osNCpG06zqfdYYXDQqRtKvOqf3WYiLRN5a5W7TARaYvOsE+Fw0akLbreVIeRSNtzkp2e8HcHZZwPOKz8CdAtAnYO9l4QAAAAAElFTkSuQmCC"}};function IntroIcon({name:e,style:t,testID:n}){let r=qo[e];/* @__PURE__ */
|
|
26
|
+
return a.jsx(i.Image,{source:{uri:r.uri,width:r.width*3,height:r.height*3},style:[{width:r.width,height:r.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",...n===void 0?{}:{testID:n}})}var Ho={transform:[{scale:Wo.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:o=false,busy:l=false,icon:s,style:d,testID:c}){let u=[".emb-btn",".in-body .emb-btn",...r,o&&".emb-btn[disabled]"];/* @__PURE__ */
|
|
27
|
+
return a.jsxs(i.Pressable,{accessibilityRole:"button",accessibilityState:{disabled:o,busy:l},disabled:o||l,onPress:n,style:({pressed:t})=>[e.view(...u),d,t&&!e.reduced?Ho:null],...c===void 0?{}:{testID:c},children:[s===void 0?null:/* @__PURE__ */a.jsx(IntroIcon,{name:s,style:e.icon(...u,".emb-btn svg",".in-stack .emb-btn svg")}),
|
|
28
|
+
/* @__PURE__ */a.jsx(Text,{tier:"control",style:e.text(...u),children:t})]})}function IntroLink({kit:e,label:t,onPress:n,rules:r=[],testID:o}){/* @__PURE__ */
|
|
29
|
+
return a.jsx(i.Pressable,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?Ho:null],...o===void 0?{}:{testID:o},children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var Ko=o.forwardRef(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
|
|
30
|
+
return a.jsx(i.View,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */a.jsx(Text,{tier:"heading",style:e.text(".serif",".in-h"),children:t})})});function IntroLine({kit:e,words:t,rules:n,testID:r}){return t===""?null:/* @__PURE__ */a.jsx(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var Yo=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,Go={transform:[{scale:Wo.pressScale}]};function Jo(e){return[e.address?.trim()??"",Eo(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:o,onChange:l,onSubmit:s,kind:d,maxLength:c,testID:u}){/* @__PURE__ */
|
|
31
|
+
return a.jsxs(i.View,{style:e.view(".in-search"),children:[t?/* @__PURE__ */a.jsx(IntroIcon,{name:"search",style:e.icon(".in-search svg")}):null,
|
|
32
|
+
/* @__PURE__ */a.jsx(Un,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:o,autoComplete:"off",autoCorrect:false,autoCapitalize:d==="email"?"none":"words",inputMode:d==="email"?"email":d==="search"?"search":"text",returnKeyType:d==="search"?"search":"next",...c===void 0?{}:{maxLength:c},style:[e.view(".in-search input"),e.text(".in-search input"),{paddingVertical:0}],onChangeText:l,...s===void 0?{}:{onSubmitEditing:s},testID:u})]})}var Qo=o.forwardRef(function({kit:e,text:t,onPick:r,onUpload:l},s){let d=n.useEverfurRecordsClinic(),c=zo(d),u=o.useRef(oe()),[p,f]=o.useState(null),[h,g]=o.useState(false),[b,m]=o.useState(""),[y,v]=o.useState(""),k=c.isSearchActive?c.clinics:c.recent,w=k.find(e=>e.id===p)??k[0]??null,x=c.isSearchActive&&!c.initialLoading&&c.error===null&&k.length===0,_=b.trim()===""?c.query.trim():b.trim(),S=_!==""&&Yo.test(y.trim()),C=()=>{if(h){S&&r(Bo(null,_,y.trim().toLowerCase(),u.current()));return}w!==null&&r(Bo(w,null,"",u.current()))},R=h?S:w!==null,j=c.initialLoading||!c.isSearchActive&&c.recentLoading;/* @__PURE__ */
|
|
33
|
+
return a.jsxs(a.Fragment,{children:[
|
|
34
|
+
/* @__PURE__ */a.jsx(Ko,{ref:s,kit:e,words:t.title,testID:"everfur-intro-title"}),
|
|
35
|
+
/* @__PURE__ */a.jsx(Field,{kit:e,icon:true,kind:"search",value:c.query,placeholder:t.search,label:t.searchLabel,onChange:e=>{c.setQuery(e),g(false)},onSubmit:C,testID:"everfur-intro-clinic-search"}),h?/* @__PURE__ */a.jsxs(i.View,{style:e.view(".in-clinics"),children:[
|
|
36
|
+
/* @__PURE__ */a.jsx(Field,{kit:e,icon:false,kind:"text",value:b===""?c.query:b,placeholder:Fo.fallback.namePlaceholder,label:Fo.fallback.nameLabel,maxLength:200,onChange:m,testID:"everfur-intro-clinic-name"}),
|
|
37
|
+
/* @__PURE__ */a.jsx(Field,{kit:e,icon:false,kind:"email",value:y,placeholder:Fo.fallback.emailPlaceholder,label:Fo.fallback.emailLabel,maxLength:320,onChange:v,onSubmit:C,testID:"everfur-intro-clinic-email"}),
|
|
38
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:e,words:Fo.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */a.jsxs(i.View,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:j},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[k.map(t=>{let n=w?.id===t.id,r=Jo(t),o=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
|
|
39
|
+
return a.jsxs(i.Pressable,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>f(t.id),style:({pressed:t})=>[e.view(".in-clinic",o),t&&!e.reduced?Go:null],testID:`everfur-intro-clinic-${t.id}`,children:[
|
|
40
|
+
/* @__PURE__ */a.jsxs(i.View,{style:e.col(".in-clinic",0),children:[
|
|
41
|
+
/* @__PURE__ */a.jsx(Text,{style:e.strong(".in-clinic",".in-clinic b"),children:t.name}),r===""?null:/* @__PURE__ */a.jsx(Text,{style:[e.view(".in-clinic small"),e.text(".in-clinic",".in-clinic small")],children:r})]}),
|
|
42
|
+
/* @__PURE__ */a.jsx(i.View,{style:[e.view(".in-tick",n&&'.in-clinic[aria-checked="true"] .in-tick'),e.col(".in-clinic",1)],children:/* @__PURE__ */a.jsx(IntroIcon,{name:"check",style:e.icon(".in-tick svg",n&&'.in-clinic[aria-checked="true"] .in-tick svg')})})]},t.id)}),c.error!==null&&c.isSearchActive?/* @__PURE__ */a.jsxs(i.View,{accessibilityRole:"alert",style:e.view(".in-none"),testID:"everfur-intro-clinic-error",children:[
|
|
43
|
+
/* @__PURE__ */a.jsx(Text,{style:e.text(".in-none"),children:c.error.displayMessage}),c.error.retryable?/* @__PURE__ */a.jsx(IntroLink,{kit:e,label:Oo.retry,onPress:c.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,x?/* @__PURE__ */a.jsxs(i.View,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
|
|
44
|
+
/* @__PURE__ */a.jsx(Text,{style:e.text(".in-none"),children:`${Fo.fallback.title} ${Fo.fallback.subtitle}`}),
|
|
45
|
+
/* @__PURE__ */a.jsx(IntroLink,{kit:e,label:t.add,onPress:()=>g(true),rules:[".in-none .in-link"],testID:"everfur-intro-clinic-add"})]}):null]}),
|
|
46
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:e,words:t.more,rules:[".in-p",".in-p--s"]}),
|
|
47
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:e,label:t.request,onPress:C,rules:[".emb-btn--block"],disabled:!R,testID:"everfur-intro-clinic-request"}),l===void 0?null:/* @__PURE__ */a.jsx(IntroLink,{kit:e,label:t.upload,onPress:l,testID:"everfur-intro-clinic-upload"})]})});function IntroConsentFrame({petRef:petRef,petName:e,draft:t,ownerName:r,onCaptureSignature:o,onCreated:i}){/* @__PURE__ */
|
|
48
|
+
return a.jsx(n.EverfurRecordsConsent,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...r===void 0?{}:{ownerName:r},...o===void 0?{}:{onCaptureSignature:o},onCreated:i,style:{flex:1}})}function Zo(e){return Wr(e,Vo,No)}var Xo=60,ei=24,ti=240,ni=i.Easing.bezier(.25,.1,.25,1),ri=i.Easing.bezier(.42,0,.58,1),oi=i.Easing.bezier(...$o),ii=i.Easing.bezier(...Lo),ai=8,li=i.Platform.OS==="ios",si=i.Platform.OS!=="web";function di(e){return e===null?ni:i.Easing.bezier(...e)}function ci(e){if(e===null)return;let t=i.AccessibilityInfo.sendAccessibilityEvent;typeof t=="function"&&t.call(i.AccessibilityInfo,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:r}=e,l=e.mode??"intro",s=useEverfurTheme(),d=o.useMemo(()=>Zo(s),[s]),c=Xn("pinned"),u=d.reduced,{runtime:p}=De(),f=o.useMemo(()=>({...ze,...e.copy}),[e.copy]),h=o.useMemo(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),g=o.useMemo(()=>e.blanks??defaultIntroBlanks(h.pet),[e.blanks,h.pet]),b=o.useMemo(()=>introText({facts:h,copy:f,blanks:g.length,resultsPending:e.resultsPending===true}),[h,f,g.length,e.resultsPending]),[m,y]=o.useState(l==="records"?"clinic":"tabs"),[v,k]=o.useState(false),[w,x]=o.useState(false),[_,S]=o.useState(null),C=o.useRef(/* @__PURE__ */new Map),[R,j]=o.useState(""),[A,F]=o.useState(false),[T,I]=o.useState(0),[E,P]=o.useState(0),D=o.useRef(false),O=o.useRef(0),z=o.useRef(0),B=o.useRef(null),V=o.useRef(null),N=o.useRef([]),$=o.useCallback((e,t)=>{N.current.push(setTimeout(e,t))},[]);o.useEffect(()=>()=>N.current.forEach(clearTimeout),[]);let L=o.useRef(new i.Animated.Value(0)).current,M=o.useRef(new i.Animated.Value(0)).current,U=o.useRef(new i.Animated.Value(0)).current,W=o.useRef(new i.Animated.Value(0)).current,q=o.useRef(new i.Animated.Value(1)).current,H=o.useRef([0,1,2].map(()=>new i.Animated.Value(u?1:0))).current,K=m!=="tabs",Y=o.useRef(new i.Animated.Value(K?1:0)).current,G=o.useRef(false);o.useEffect(()=>{r?.(w?null:m)},[m,w,r]),o.useEffect(()=>()=>r?.(null),[r]);let J=o.useRef(m);J.current=m;let Q=o.useCallback(()=>{$(()=>ci(J.current==="consent"?V.current:B.current),Xo)},[$]),Z=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==E&&P(t),G.current||D.current)return;G.current=true;let n=d.motion(".in-sheet",".ph-intro.is-on .in-sheet"),r=d.motion(".in-dim",".ph-intro.is-on .in-dim--top"),o=[i.Animated.timing(L,{toValue:1,duration:n.dur,easing:u?ni:ii,useNativeDriver:si}),i.Animated.timing(M,{toValue:1,duration:r.dur,easing:di(r.ease),useNativeDriver:si})];if(!u&&m==="tabs"){let e=Wo.rows;H.forEach((t,n)=>o.push(i.Animated.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:oi,useNativeDriver:si})))}i.Animated.parallel(o).start(),Q()};o.useEffect(()=>{if(D.current)return;let e=K?d.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):d.motion(".in-dim");i.Animated.timing(U,{toValue:K?1:0,duration:e.dur,easing:di(e.ease),useNativeDriver:si}).start();let t=d.motion(".in-bars b::after");i.Animated.timing(Y,{toValue:K?1:0,duration:t.dur,easing:di(t.ease),useNativeDriver:false}).start()},[K,d,U,Y]);let X=o.useMemo(()=>g.map(()=>new i.Animated.Value(0)),[g]);o.useEffect(()=>{if(m!=="ask"||u)return;let e=Wo.blanks;X.forEach(e=>e.setValue(0));let t=i.Animated.parallel(X.map((t,n)=>i.Animated.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:ri,useNativeDriver:false})));return t.start(),()=>t.stop()},[m,u,X]);let ee=o.useCallback((e,t=false)=>{k(t),y(e),O.current=0,q.setValue(0),i.Animated.timing(q,{toValue:1,duration:u?150:ti,easing:u?ni:oi,useNativeDriver:si}).start(),Q()},[q,u,Q]),te=o.useCallback((e,r=null,o=null)=>{if(D.current)return;D.current=true,x(true),t({exit:e,toast:r,notifications:o});let a=d.motion(".in-sheet"),l=d.motion(".in-dim");i.Animated.parallel([i.Animated.timing(L,{toValue:0,duration:a.dur,easing:u?ni:oi,useNativeDriver:si}),i.Animated.timing(M,{toValue:0,duration:l.dur,easing:di(l.ease),useNativeDriver:si}),i.Animated.timing(U,{toValue:0,duration:l.dur,easing:di(l.ease),useNativeDriver:si})]).start(),$(()=>n?.(),u?160:260)},[t,n,$,u,d,L,M,U]),ne=o.useCallback(()=>te(l==="records"?"stay":"ask"),[te,l]),re=o.useCallback(e=>te("plan",e?b.toast.on:b.toast.off,e),[te,b]),oe=e.onUpload,ie=o.useMemo(()=>oe===void 0?void 0:()=>{te("stay"),oe()},[oe,te]),ae=o.useRef(false),le=o.useCallback(async()=>{if(ae.current)return;ae.current=true,F(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(p).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}ae.current=false,F(false),re(t)},[e,p,re]),se=()=>{D.current||(m==="sent"?re(false):ne())},de=o.useRef(ne);de.current=ne;let ce=o.useRef(true);ce.current=m!=="sent"&&m!=="consent"&&!w;let ue=o.useMemo(()=>i.PanResponder.create({onMoveShouldSetPanResponderCapture:(e,t)=>ce.current&&O.current<=0&&t.dy>ai&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{z.current===0&&(z.current=Date.now())},onPanResponderMove:(e,t)=>W.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(z.current||Date.now());z.current=0,isIntroSwipeOut(t.dy,n)?de.current():i.Animated.timing(W,{toValue:0,duration:d.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:ii,useNativeDriver:si}).start()},onPanResponderTerminate:()=>{z.current=0,i.Animated.timing(W,{toValue:0,duration:ti,easing:oi,useNativeDriver:si}).start()}}),[W,d]),pe=o.useCallback(t=>{let n=_===null?"":_.clinic?.name??_.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};j(n),e.onRequested?.(r),ee("sent")},[_,petRef,e,ee]),fe=e.tabBar?.top??Uo.tabTop,he=e.tabBar?.height??Uo.tabHeight,ge=T===0?void 0:K?T-Uo.sheetTopAll:T-fe-he-Uo.sheetGap,be=m==="clinic"&&l!=="records"||m==="novet"||m==="consent",me=m!=="sent",ye=E>0?E:T>0?T:1e3,ve=u?{opacity:L,transform:[{translateY:W}]}:{transform:[{translateY:i.Animated.add(L.interpolate({inputRange:[0,1],outputRange:[ye,0]}),W)}]},ke=u?{opacity:q}:{opacity:q,transform:[{translateX:q.interpolate({inputRange:[0,1],outputRange:[v?-ei:ei,0]})}]},we=e=>{let t=s.meta.hidePoweredBy?null:/* @__PURE__ */a.jsxs(i.View,{style:d.view(".in-by"),children:[
|
|
49
|
+
/* @__PURE__ */a.jsx(Text,{tier:"compact",style:d.text(".in-eyebrow",".in-by"),children:b.poweredBy}),
|
|
50
|
+
/* @__PURE__ */a.jsx(IntroIcon,{name:"wordmark",style:d.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */a.jsxs(i.View,{style:d.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */a.jsx(Text,{tier:"compact",style:d.text(".in-eyebrow"),children:e}),t]})},xe=e=>e===""?null:/* @__PURE__ */a.jsx(Ko,{ref:B,kit:d,words:e,testID:"everfur-intro-title"}),_e=(e,t)=>e===""?null:t?/* @__PURE__ */a.jsx(i.View,{ref:B,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:e,rules:[".in-p"]})}):/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:e,rules:[".in-p"]}),Se=null;if(m==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",b.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",b.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",b.tabs.records]];Se=/* @__PURE__ */a.jsxs(a.Fragment,{children:[we(b.tabs.eyebrow),xe(b.tabs.title),
|
|
51
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:b.tabs.lede,rules:[".in-p"]}),
|
|
52
|
+
/* @__PURE__ */a.jsx(i.View,{accessibilityRole:"list",style:d.view(".in-rows"),children:t.map(([e,t,n,r,o],l)=>{let s=H[l],c=u?null:{opacity:s.interpolate({inputRange:[0,1],outputRange:[Mo.opacity,1]}),transform:[{translateY:s.interpolate({inputRange:[0,1],outputRange:[Mo.translateY,0]})}]};/* @__PURE__ */
|
|
53
|
+
return a.jsxs(i.Animated.View,{style:[d.view(".in-rows li"),c],testID:`everfur-intro-row-${e}`,children:[
|
|
54
|
+
/* @__PURE__ */a.jsx(i.View,{style:[d.view(".in-ic",n),d.col(".in-rows li",0)],children:/* @__PURE__ */a.jsx(IntroIcon,{name:t,style:d.icon(".in-ic svg")})}),
|
|
55
|
+
/* @__PURE__ */a.jsxs(i.View,{style:d.col(".in-rows li",1),children:[
|
|
56
|
+
/* @__PURE__ */a.jsx(Text,{style:d.text(".in-rows b"),children:r}),o===""?null:/* @__PURE__ */a.jsx(Text,{style:[d.view(".in-rows li > span:last-child > span"),d.text(".in-rows li > span:last-child > span")],children:o})]})]},e)})}),e.recordsConnected===true?/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.tabs.seePlan,onPress:()=>te("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-see-plan"}):/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.tabs.next,onPress:()=>ee("ask"),rules:[".emb-btn--block"],testID:"everfur-intro-next"})]})}else if(m==="ask")Se=/* @__PURE__ */a.jsxs(a.Fragment,{children:[we(b.tabs.eyebrow),xe(b.ask.title),_e(b.ask.lede,b.ask.title===""),
|
|
57
|
+
/* @__PURE__ */a.jsx(Blanks,{kit:d,title:h.planTitle,pill:b.ask.blanksPill,label:b.ask.blankLabel,blanks:g,pulses:u?null:X}),
|
|
58
|
+
/* @__PURE__ */a.jsxs(i.View,{style:d.view(".in-pair"),children:[
|
|
59
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.ask.later,onPress:ne,rules:[".emb-btn--ghost"],style:d.col(".in-pair",0),testID:"everfur-intro-later"}),
|
|
60
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.ask.connect,onPress:()=>ee("clinic"),style:d.col(".in-pair",1),testID:"everfur-intro-connect"})]}),
|
|
61
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:b.ask.fine,rules:[".in-fine"]}),
|
|
62
|
+
/* @__PURE__ */a.jsx(IntroLink,{kit:d,label:b.ask.noVet,onPress:()=>ee("novet"),testID:"everfur-intro-novet"})]});else if(m==="clinic")Se=/* @__PURE__ */a.jsx(Qo,{ref:B,kit:d,text:b.clinic,onPick:e=>{S(jo(C.current,e)),ee("consent")},...ie===void 0?{}:{onUpload:ie}});else if(m==="consent")Se=_===null?null:/* @__PURE__ */a.jsx(IntroConsentFrame,{petRef:petRef,...h.pet.name==="your pet"?{}:{petName:h.pet.name},draft:_,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:pe});else if(m==="sent"){let e=[[b.sent.sentStep,R===""?"":b.sent.sentTo(R),"done"],[b.sent.clinicStep,b.sent.clinicEta,"now"],[b.sent.blanksStep,b.sent.blanksDetail,""]];Se=/* @__PURE__ */a.jsxs(a.Fragment,{children:[we(b.sent.eyebrow),xe(b.sent.title),
|
|
63
|
+
/* @__PURE__ */a.jsx(i.View,{style:d.view(".in-sent"),children:/* @__PURE__ */a.jsx(Track,{kit:d,label:b.sent.track,steps:e.filter(([e])=>e!=="")})}),
|
|
64
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:b.sent.lede,rules:[".in-p"]}),
|
|
65
|
+
/* @__PURE__ */a.jsxs(i.View,{style:d.view(".in-stack"),children:[
|
|
66
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.sent.notify,icon:"bell",busy:A,onPress:()=>{le()},rules:[".emb-btn--block"],testID:"everfur-intro-notify"}),
|
|
67
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.sent.notNow,onPress:()=>re(false),rules:[".emb-btn--block",".emb-btn--ghost"],testID:"everfur-intro-not-now"})]}),
|
|
68
|
+
/* @__PURE__ */a.jsx(IntroLine,{kit:d,words:b.sent.fine,rules:[".in-fine"]})]})}else Se=/* @__PURE__ */a.jsxs(a.Fragment,{children:[we(b.tabs.eyebrow),xe(b.noVet.title),_e(b.noVet.lede,b.noVet.title===""),
|
|
69
|
+
/* @__PURE__ */a.jsx(IntroButton,{kit:d,label:b.noVet.seePlan,onPress:()=>te("plan"),rules:[".emb-btn--block"],testID:"everfur-intro-novet-plan"})]});let Ce=m==="consent",Re=[er(d.view(".in-sheet",".ph-intro.is-on .in-sheet"),c),ge===void 0?null:Ce?{height:ge}:{maxHeight:ge},ve],je={accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};/* @__PURE__ */
|
|
70
|
+
return a.jsx(i.Modal,{transparent:true,visible:true,animationType:"none",statusBarTranslucent:true,onRequestClose:se,children:/* @__PURE__ */a.jsxs(i.View,{style:{flex:1},onLayout:e=>I(Math.round(e.nativeEvent.layout.height)),testID:e.testID??"everfur-intro",children:[
|
|
71
|
+
/* @__PURE__ */a.jsx(i.Animated.View,{...je,pointerEvents:"none",style:[d.view(".in-dim",".in-dim--top"),{height:fe,opacity:M}]}),
|
|
72
|
+
/* @__PURE__ */a.jsx(i.Animated.View,{...je,pointerEvents:"none",style:[d.view(".in-dim"),{top:fe,height:he,opacity:U}]}),
|
|
73
|
+
/* @__PURE__ */a.jsx(i.Animated.View,{...je,pointerEvents:"none",style:[d.view(".in-dim",".in-dim--bot"),{top:fe+he,opacity:M}]}),
|
|
74
|
+
/* @__PURE__ */a.jsx(i.KeyboardAvoidingView,{behavior:li?"padding":void 0,enabled:!Ce,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */a.jsxs(i.Animated.View,{accessibilityViewIsModal:true,accessibilityLabel:l==="intro"?b.sheetLabel.intro:b.sheetLabel.records,style:Re,onLayout:Z,onTouchStart:()=>{z.current=Date.now()},...ue.panHandlers,testID:"everfur-intro-sheet",children:[
|
|
75
|
+
/* @__PURE__ */a.jsx(i.View,{...je,style:d.view(".in-grab")}),
|
|
76
|
+
/* @__PURE__ */a.jsxs(i.View,{style:d.view(".in-top",l==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[be?/* @__PURE__ */a.jsx(i.Pressable,{ref:V,accessibilityRole:"button",accessibilityLabel:b.back,style:d.view(".in-back"),onPress:()=>ee(m==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */a.jsx(IntroIcon,{name:"back",style:d.icon(".in-back svg")})}):null,l==="intro"?/* @__PURE__ */a.jsx(Bars,{kit:d,fill:Y}):null,me&&l==="intro"?/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",style:[d.view(".in-skip"),{justifyContent:"center"}],onPress:ne,testID:"everfur-intro-skip",children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:d.text(".in-skip"),children:b.skip})}):null,me&&l==="records"?/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",accessibilityLabel:b.close,style:d.view(".in-x"),onPress:ne,testID:"everfur-intro-close",children:/* @__PURE__ */a.jsx(IntroIcon,{name:"x",style:d.icon(".in-x svg")})}):null]}),Ce?/* @__PURE__ */a.jsx(i.View,{style:{flex:1},children:Se}):/* @__PURE__ */a.jsx(i.ScrollView,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{O.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */a.jsx(i.Animated.View,{style:[d.view(".in-body"),ke],testID:`everfur-intro-frame-${m}`,children:Se})},m)]})})]})})}function Bars({kit:e,fill:t}){let n=t.interpolate({inputRange:[0,1],outputRange:["0%","100%"]}),r=[e.view(".in-bars b::after"),{right:void 0}];/* @__PURE__ */
|
|
77
|
+
return a.jsxs(i.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view(".in-bars"),children:[
|
|
78
|
+
/* @__PURE__ */a.jsx(i.View,{style:e.view(".in-bars b"),children:/* @__PURE__ */a.jsx(i.View,{style:[...r,{width:"100%"}]})}),
|
|
79
|
+
/* @__PURE__ */a.jsx(i.View,{style:e.view(".in-bars b"),children:/* @__PURE__ */a.jsx(i.Animated.View,{style:[...r,{width:n}],testID:"everfur-intro-bar-2"})})]})}function Blanks({kit:e,title:t,pill:n,label:r,blanks:o,pulses:l}){let s=e.colors.accent4??"",d=e.colors.accent2??s;/* @__PURE__ */
|
|
80
|
+
return a.jsxs(i.View,{style:e.view(".blanks"),children:[
|
|
81
|
+
/* @__PURE__ */a.jsxs(i.View,{style:e.view(".blanks__h"),children:[
|
|
82
|
+
/* @__PURE__ */a.jsx(Text,{tier:"compact",style:[e.text(".blanks__h"),{flexShrink:1}],children:t}),n===""?null:/* @__PURE__ */a.jsx(i.View,{style:e.view(".blanks__h em"),children:/* @__PURE__ */a.jsx(Text,{tier:"compact",numberOfLines:1,style:e.text(".blanks__h",".blanks__h em"),children:n})})]}),
|
|
83
|
+
/* @__PURE__ */a.jsx(i.View,{accessibilityRole:"list",style:e.view(".blanks ol"),children:o.map((t,n)=>{let o=l?.[n],c=o===void 0?null:{backgroundColor:o.interpolate({inputRange:[0,.5,1],outputRange:[s,d,s]})};/* @__PURE__ */
|
|
84
|
+
return a.jsxs(i.View,{style:e.view(".blanks li"),testID:`everfur-intro-blank-${n}`,children:[
|
|
85
|
+
/* @__PURE__ */a.jsx(i.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[e.view(".blanks li > b"),e.col(".blanks li",0)],children:/* @__PURE__ */a.jsx(Text,{style:e.text(".blanks li > b"),children:n+1})}),
|
|
86
|
+
/* @__PURE__ */a.jsxs(i.View,{style:e.col(".blanks li",1),children:[
|
|
87
|
+
/* @__PURE__ */a.jsxs(Text,{accessibilityLabel:`${t.before}${r}${t.after}`,style:e.text(".blanks li > span"),children:[t.before,
|
|
88
|
+
/* @__PURE__ */a.jsx(i.Animated.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:Wo.blankDrop,marginTop:-3},c]}),t.after]}),t.source===""?null:/* @__PURE__ */a.jsx(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
|
|
89
|
+
return a.jsx(i.View,{accessibilityRole:"list",accessibilityLabel:t,style:e.view(".sh-track"),children:n.map(([t,r,o],l)=>{let s=l===n.length-1,d=n[l+1]?.[2]==="done";/* @__PURE__ */
|
|
90
|
+
return a.jsxs(i.View,{style:e.view(".sh-track li",".in-sent .sh-track li",s&&".sh-track li:last-child",s&&".in-sent .sh-track li:last-child"),children:[s?null:/* @__PURE__ */a.jsx(i.View,{style:e.view(".sh-track li::before",o==="done"&&d&&".sh-track li.is-done:has(+ li.is-done)::before")}),
|
|
91
|
+
/* @__PURE__ */a.jsx(i.View,{style:[e.view(".sh-track__dot",o==="done"&&".sh-track .is-done .sh-track__dot",o==="now"&&".sh-track .is-now .sh-track__dot"),e.col(".sh-track li",0)],children:o==="done"?/* @__PURE__ */a.jsx(IntroIcon,{name:"check",style:e.icon(".sh-track__dot svg")}):null}),
|
|
92
|
+
/* @__PURE__ */a.jsxs(i.View,{style:e.col(".sh-track li",1),children:[
|
|
93
|
+
/* @__PURE__ */a.jsx(Text,{style:e.text(".sh-track strong",o===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */a.jsx(Text,{style:[e.view(".sh-track small"),e.text(".sh-track small")],children:r})]})]},t)})})}function PlanProbe({petRef:petRef,pagePhase:e,page:n,refreshPage:r,watching:a,onPlan:l,onPlanFailed:s}){let{status:d,plan:c,refresh:u}=t.useEverfurHealthPlan({petRef:petRef}),p=o.useRef(null),f=o.useRef({plan:u,page:r,watching:a});f.current={plan:u,page:r,watching:a},o.useEffect(()=>{let t=Tt(d,e);(d==="failed"||t)&&(p.current=Date.now()),t?l(petRef,{empty:It(d,n),signature:Ft(c,n)}):d==="failed"&&s(petRef)},[d,c,e,n,petRef,l,s]);let h=o.useRef(()=>{});return h.current=e=>{let t=f.current;Ct({pageVisible:e,watching:t.watching,lastReadAt:p.current,now:Date.now()})&&(p.current=null,t.plan(),t.page())},o.useEffect(()=>{let e=i.AppState.addEventListener("change",e=>{e==="active"&&h.current(true)});return()=>e.remove()},[]),o.useEffect(()=>{a&&h.current(i.AppState.currentState!=="background")},[a]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=n.useEverfurRecords({petRef:petRef});return o.useEffect(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var ui=6e3,pi=50,fi=i.Platform.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:r}){let l=useEverfurTheme(),s=o.useMemo(()=>Zo(l),[l]),[d,c]=o.useState(0),u=o.useRef(new i.Animated.Value(0)).current,p=o.useRef(false),f=o.useRef(false),h=o.useRef(n);h.current=n,o.useEffect(()=>{let e=setTimeout(()=>{f.current||(f.current=true,h.current())},ui);return()=>clearTimeout(e)},[]);let g=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==d&&c(t),p.current)return;p.current=true;let n=s.motion(".ph-banner",".ph-banner.is-on");i.Animated.timing(u,{toValue:1,duration:n.dur,easing:s.reduced?i.Easing.bezier(.25,.1,.25,1):i.Easing.bezier(...Lo),useNativeDriver:fi}).start()},b=-((d>0?d:200)-Wo.bannerY),m=s.reduced?{opacity:u}:{transform:[{translateY:u.interpolate({inputRange:[0,1],outputRange:[b,0]})}]},{position:y,left:v,right:k,zIndex:w,top:x,..._}=s.view(".ph-banner",".ph-banner.is-on"),S=typeof x=="number"?Math.max(0,x-pi):0;/* @__PURE__ */
|
|
94
|
+
return a.jsx(i.Animated.View,{pointerEvents:"box-none",style:[{position:y,left:v,right:k,zIndex:w,top:S},m],onLayout:g,children:/* @__PURE__ */a.jsxs(i.Pressable,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{f.current||(f.current=true,n())},style:_,testID:r??"everfur-records-banner",children:[
|
|
95
|
+
/* @__PURE__ */a.jsx(i.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[s.view(".ph-banner__app"),s.col(".ph-banner",0)],children:t}),
|
|
96
|
+
/* @__PURE__ */a.jsxs(i.View,{style:s.col(".ph-banner",1),children:[
|
|
97
|
+
/* @__PURE__ */a.jsxs(i.View,{style:s.view(".ph-banner__meta"),children:[e.app===""?/* @__PURE__ */a.jsx(i.View,{}):/* @__PURE__ */a.jsx(Text,{tier:"compact",style:s.text(".ph-banner__meta",".ph-banner__meta strong"),children:e.app}),
|
|
98
|
+
/* @__PURE__ */a.jsx(Text,{tier:"compact",style:s.text(".ph-banner__meta"),children:e.now})]}),
|
|
99
|
+
/* @__PURE__ */a.jsx(Text,{style:[s.view(".ph-banner__txt > strong"),s.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */a.jsx(Text,{style:s.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var hi={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function gi(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function bi(e,t){return t??Math.max(1.5,Math.round(e/11*10)/10)}function Ring({size:e,strokeWidth:t,color:n,children:r}){/* @__PURE__ */
|
|
100
|
+
return a.jsx(i.View,{style:[gi(e),{borderRadius:e/2,borderWidth:t??i.StyleSheet.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let o=bi(e,n),l=e*.46;/* @__PURE__ */
|
|
101
|
+
return a.jsxs(i.View,{style:gi(e),testID:r,...hi,children:[
|
|
102
|
+
/* @__PURE__ */a.jsx(i.View,{style:{position:"absolute",top:e*.16,bottom:e*.12,width:o,borderRadius:o,backgroundColor:t}}),
|
|
103
|
+
/* @__PURE__ */a.jsx(i.View,{style:{position:"absolute",top:e*.16+o/2,width:l,height:l,borderLeftWidth:o,borderTopWidth:o,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var mi={".ph-head":{flexGrow:0,flexShrink:0,height:58,alignItems:"center",paddingTop:0,paddingRight:14,paddingBottom:0,paddingLeft:14,position:"relative",zIndex:6,backgroundColor:"$paper"},".ph-head__start":{flexDirection:"row",alignItems:"center",minWidth:0},".ph-head__end":{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",marginRight:-6,gap:10},".ph-pet":{flexDirection:"row",alignItems:"center",minHeight:44,fontSize:17,color:"$ink2",gap:9},".ph-pet img":{width:36,height:36,round:1},".ph-back":{display:"none",width:44,height:44,marginLeft:-6,alignItems:"center",justifyContent:"center"},".ph-back svg":{width:26,height:26},".ph-mark":{width:31,height:29,color:"$accent"},".ph-lockup":{display:"none",alignItems:"center",gap:9},".ph-lockup .ph-mark":{width:26,height:25},".ph-lockup__rule":{width:1,height:24,backgroundColor:"$n_D9D6D0"},".ph-lockup__by":{family:"$mono",fontSize:9,lh:1,color:"$ink3",gap:0},".ph-lockup__by svg":{width:62,height:22,marginTop:-1,marginRight:0,marginBottom:-6,marginLeft:0,color:"$byInk"},".ph-title":{display:"none",fontSize:17,fontWeight:"800",nowrap:1},'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup':{flexDirection:"row"},".askbar":{flexDirection:"row",alignItems:"center",height:52,paddingTop:0,paddingRight:6,paddingBottom:0,paddingLeft:8,borderRadius:999,backgroundColor:"$card",ring:[1.5,"$ink"],gap:6},".askbar input":{flex:1,minWidth:0,height:"100%",borderWidth:0,backgroundColor:"transparent",fontSize:16},".askbar__send":{width:40,height:40,round:1,alignItems:"center",justifyContent:"center",backgroundColor:"$primary",color:"$onPrimary",flexGrow:0,flexShrink:0,dur:160,ease:[.23,1,.32,1]},".askbar__send svg":{width:20,height:20},".askbar__send[disabled]":{opacity:.3},".ph-askbar":{flexGrow:0,flexShrink:0,paddingTop:10,paddingRight:14,paddingBottom:10,paddingLeft:14,backgroundColor:"$paper"}};var yi=/* @__PURE__ */new WeakMap;function vi(e){let t=yi.get(e);if(t!==void 0)return t;let n=Wr(e,mi);return yi.set(e,n),n}function ShellIcon({name:e,style:t}){let n=qo[e];/* @__PURE__ */
|
|
104
|
+
return a.jsx(i.Image,{source:{uri:n.uri,width:n.width*3,height:n.height*3},style:[{width:n.width,height:n.height},t],resizeMode:"contain",accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"})}var ki=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:r,testID:l}){let s=useEverfurTheme(),d=vi(s),[c,u]=o.useState(""),p=s.slots.composerInput,f=s.slots.sendButton,h=c.trim()==="",g=()=>{let e=c.trim();e!==""&&(u(""),r(e))},b=d.view(".askbar__send");/* @__PURE__ */
|
|
105
|
+
return a.jsx(i.View,{style:d.view(".ph-askbar"),testID:l,children:/* @__PURE__ */a.jsxs(i.View,{style:[d.view(".askbar"),{height:void 0,minHeight:52},p?.backgroundColor===void 0?null:{backgroundColor:p.backgroundColor},p?.borderColor===void 0?null:{borderColor:p.borderColor}],children:[
|
|
106
|
+
/* @__PURE__ */a.jsx(Un,{value:c,onChangeText:u,placeholder:e,placeholderTextColor:p?.textColor??s.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:g,returnKeyType:"send",maxFontSizeMultiplier:ki,style:[d.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:p?.textColor??d.colors.ink}],testID:`${l}-input`}),
|
|
107
|
+
/* @__PURE__ */a.jsx(i.Pressable,{onPress:g,disabled:h,accessibilityRole:"button",accessibilityLabel:n,accessibilityState:{disabled:h},style:[b,f?.backgroundColor===void 0?null:{backgroundColor:f.backgroundColor}],testID:`${l}-send`,children:/* @__PURE__ */a.jsx(ArrowUpGlyph,{size:20,color:f?.textColor??d.colors.onPrimary??s.color.surface})})]})})}function wi(e){let[t,n]=o.useState(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:o="contain",fallback:l=null,onError:s,testID:d}){let c=wi(e);if(e===null||!c.shown)return l;let u=n?{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"}:{accessible:true,accessibilityRole:"image",...t===void 0?{}:{accessibilityLabel:t}};/* @__PURE__ */
|
|
108
|
+
return a.jsx(i.Image,{source:{uri:e},style:r,resizeMode:o,...u,onError:()=>{c.onError(),s?.()},...d===void 0?{}:{testID:d}})}function xi(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function _i(e){if(e.brightness!=="light")return false;let t=Bn.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(xi(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&xi(n).every(e=>o.has(e))}var Si=/* @__PURE__ */Object.freeze([
|
|
107
109
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
108
110
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
109
111
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
110
112
|
/* @__PURE__ */Object.freeze({background:"#bde7c5",foreground:"#0e3b22"}),
|
|
111
113
|
/* @__PURE__ */Object.freeze({background:"#dcc7f4",foreground:"#3a1d6a"}),
|
|
112
|
-
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function
|
|
113
|
-
return
|
|
114
|
-
return Object.freeze(t)}function
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
return
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */i.jsx(o.View,{style:[p.view(".ph-head__end"),{flex:1,flexBasis:0}],children:_&&l===null?/* @__PURE__ */i.jsx(a.EverfurInboxBell,{onPress:t.onBell??(()=>g(true)),color:y,ground:m}):null}),_&&t.onBell===void 0?/* @__PURE__ */i.jsx(a.EverfurInboxSheet,{...t.inbox,visible:h,onClose:()=>g(false),onOpen:C??c}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let a=t.view(".ph-pet img"),l=typeof a.width=="number"?a.width:36,s=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */i.jsx(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:l/2}],resizeMode:"cover",fallback:/* @__PURE__ */i.jsx(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:l,ringStroke:0})}):/* @__PURE__ */i.jsx(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:l,ringStroke:0}),d=/* @__PURE__ */i.jsxs(i.Fragment,{children:[s,n===""?null:/* @__PURE__ */i.jsx(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),c=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */i.jsx(o.View,{style:c,testID:"everfur-shell-pet",children:d}):/* @__PURE__ */i.jsx(o.Pressable,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:c,testID:"everfur-shell-pet",children:d})}var si=/* @__PURE__ */r.createContext(null);function useEverfurTabs(){return r.useContext(si)}var di=200,ci=4,ui=2600,pi=600,fi=o.Easing.bezier(.25,.1,.25,1),hi=o.Platform.OS!=="web",gi=/* @__PURE__ */Object.freeze({chats:Ge.heading,newChat:Ge.newChat}),bi={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(a){let{petRef:petRef,opened:l,onTabChange:s,onRecordsRequested:d,onRecordsLanded:c,onToast:u}=a,p=a.visible??true,f=useEverfurTheme(),h=r.useMemo(()=>Co(f),[f]),g=r.useMemo(()=>({...ct,...a.copy}),[a.copy]),{runtime:b,userRef:userRef}=Pe(),m=Vt("healthPlan"),y=Vt("records"),k=Vt("recordsClinic"),[v,w]=r.useState(()=>/* @__PURE__ */new Map),[x,S]=r.useState(()=>/* @__PURE__ */new Set),_=r.useCallback((e,t)=>{w(n=>{let r=n.get(e),o=Rt(r,t);return o===r?n:new Map(n).set(e,o)}),S(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),C=r.useCallback(e=>{S(t=>t.has(e)?t:new Set(t).add(e))},[]),R=petRef===null?void 0:v.get(petRef),j=!m||R?.empty===true,A=`${petRef??"none"}:${R?.epoch??0}`,F=ft(j),E=r.useRef(j);E.current=j;let I=t.useHealthPlanPage({petRef:petRef,enabled:m&&petRef!==null}),[T,D]=r.useState(()=>gt(l,false)),[P,O]=r.useState(()=>/* @__PURE__ */new Set(["ask",gt(l,false)])),z=r.useCallback(e=>{let t=ht(e,E.current);D(t),O(e=>e.has(t)?e:new Set(e).add(t))},[]);r.useEffect(()=>{j&&T==="plan"&&D("ask")},[j,T]);let V=r.useRef(null);r.useEffect(()=>{j||V.current!=="plan"||(V.current=null,z("plan"))},[j,z]);let B=r.useCallback(e=>{V.current=null,z(e)},[z]),N=r.useRef(s);N.current=s,r.useEffect(()=>{N.current?.(T)},[T]);let[$,L]=r.useState(null),M=r.useCallback((e,t)=>{e!==""&&L(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),V.current=null,z("ask")},[petRef,z]),W=$===null||$.petRef!==petRef?null:$,U=bt(l),q=r.useRef(null),[H,K]=r.useState(null);r.useEffect(()=>{if(q.current===U)return;q.current=U;let e=l.via==="link"?l.ask!==void 0?"ask":l.tab:"plan";V.current=l.via==="link"&&e==="plan"&&E.current?"plan":null,l.via==="link"&&l.ask!==void 0?M(l.ask.prompt,l.ask.card):z(gt(l,E.current)),K(l.via==="plain"?U:null)},[U,l,M,z]);let Y=r.useMemo(()=>Ft(),[]),G=p&&T==="ask",J=r.useRef(G);J.current=G;let Q=a.chat?.lifecycle,Z=r.useMemo(()=>Q===null?null:Et(It(Q??createAppStateLifecycle(),()=>J.current),Y),[Q,Y]),X=r.useRef(G);r.useEffect(()=>{let e=Tt(X.current,G);X.current=G,e&&Y.fire()},[G,Y]);let[ee,te]=r.useState(null),ne=r.useCallback(e=>{e!==""&&(u!==void 0?u(e):te(t=>({id:(t?.id??0)+1,text:e})))},[u]),re=a.intro===false?null:a.intro??{},[oe,ie]=r.useState(null),[ae,le]=r.useState(null),[se,de]=r.useState(null),[ce,ue]=r.useState(null),[pe,fe]=r.useState(()=>/* @__PURE__ */new Map),[he,ge]=r.useState(false),[be,me]=r.useState(false),ye=r.useRef(null),[ke,ve]=r.useState(null),we=r.useRef(null),xe=r.useRef(null),_e=r.useMemo(()=>Se(b),[b]),Ce=b.registry.services.kv,Re=re?.maxWidth??pi,je=re!==null&&m,Ae=je&&H!==null&&p&&userRef!==null&&petRef!==null,[Ie,Te]=r.useState(null);r.useEffect(()=>{if(!Ae)return;let e=H;if(o.Dimensions.get("window").width>=Re){Te(e);return}let t=new AbortController,n=petRef;return Fe({repo:_e,kv:Ce,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||(Te(e),r&&de({key:e,petRef:n}))},()=>{t.signal.aborted||Te(e)}),()=>t.abort()},[Ae,H,userRef,petRef,_e,Ce,Re]);let De=je&&H!==null&&p&&(userRef===null||petRef===null)&&o.Dimensions.get("window").width<Re,[Oe,Ve]=r.useState(null);r.useEffect(()=>{if(!De)return;let e=H,t=setTimeout(()=>Ve(e),jt);return()=>clearTimeout(t)},[De,H]),Ke(De&&Oe!==H||Ae&&Ie!==H||se!==null||oe!==null);let Be=r.useCallback((e,t)=>{fe(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Ne=petRef===null?void 0:pe.get(petRef),$e=Ne==="some";r.useEffect(()=>{petRef!==null&&$e&&setHealthPlanNoVet(petRef,false)},[petRef,$e]);let Le=r.useCallback(()=>{let e=we.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&ve({top:Math.round(t),height:Math.round(r)})})},[]);r.useEffect(()=>{if(se===null||oe!==null)return;let e=At({sameOpen:se.key===H&&se.petRef===petRef,plan:R,planFailed:x.has(se.petRef),recordsPending:y&&Ne===void 0});if(e==="drop"&&de(null),e!=="play")return;z("ask"),Le();let t=setTimeout(()=>{de(null),ie(e=>({mode:"intro",id:(e?.id??0)+1}))},di);return()=>clearTimeout(t)},[se,oe,H,petRef,R,x,y,Ne,z,Le]),r.useEffect(()=>{if(se===null)return;let e=setTimeout(()=>de(e=>e===se?null:e),jt);return()=>clearTimeout(e)},[se]);let Me=r.useCallback(()=>{petRef!==null&&(Le(),ie(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,Le]),We=r.useCallback(e=>{(oe?.mode??"intro")==="intro"&&Ee({repo:_e,kv:Ce,userRef:userRef}),ye.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?z("plan"):e.exit==="ask"&&z("ask"),e.notifications!==null&&ue(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ne(e.toast)},[oe,_e,Ce,userRef,petRef,z,ne]),Ue=r.useCallback(()=>ie(null),[]),qe=r.useCallback(e=>{ue({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),d?.(e)},[d]),He=r.useCallback(e=>{e!==null&&(ye.current=e),le(e)},[]);r.useEffect(()=>{if(petRef===null){me(false);return}return me(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&me(t)})},[petRef]),r.useEffect(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let Ge=re?.copy,Qe=r.useCallback(()=>introText({facts:introFacts(I.page,a.petName),copy:{...ze,...Ge},blanks:0,resultsPending:false}),[I.page,a.petName,Ge]),Ze=r.useRef(void 0),tt=r.useCallback(()=>{ge(false),z("plan"),petRef!==null&&ne(Qe().toast.landed)},[z,petRef,ne,Qe]);r.useEffect(()=>{let e=Ze.current;if(Ze.current=Ne,ce===null||petRef===null||ce.petRef!==petRef||e!=="none"||Ne!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};c?.(t),notifyHealthPlanRecordsLanded(petRef),ue(null),ce.notified===true?ge(true):tt()},[Ne,ce,petRef,c,tt]);let nt=a.chat,ot=a.resultsPending??I.page?.page?.wait!==void 0,it=r.useMemo(()=>ot?{...nt?.presentation,chatTopCard:"none"}:nt?.presentation,[ot,nt?.presentation]),at=r.useCallback(()=>z("plan"),[z]),lt=r.useCallback(()=>z("records"),[z]),dt=r.useCallback(()=>z("ask"),[z]),ut=a.plan,pt=r.useMemo(()=>ut?.focus===void 0?void 0:{...ut.focus,onConnectRecords:ut.focus.onConnectRecords??lt,onWaitAction:ut.focus.onWaitAction??dt},[ut?.focus,lt,dt]),mt=a.petName??I.page?.pet.name??"",yt=mt.trim()||et,kt=a.records,vt=kt?.sheet,wt=r.useCallback(()=>{Me()},[Me]),xt={active:p&&T==="records",askBar:false},St={onRequestFromClinic:wt,noVet:be,onOpenPlan:at},_t=Ye(kt),Ct=vt===false?false:{...xt,...typeof vt=="object"?Ye(vt):{}},Dt=petRef===null?null:/* @__PURE__ */i.jsx(n.EverfurRecords,{...St,..._t,sheet:Ct,petRef:petRef,...mt===""?{}:{petName:mt},onAsk:kt?.onAsk??(e=>M(e)),style:[{flex:1},kt?.style]},petRef),[Pt,Ot]=r.useState([]),zt=Pt.length===0?null:Pt[Pt.length-1]??null,Bt=r.useCallback(e=>{let t={title:e.title,onBack:e.onBack};return Ot(e=>[...e,t]),()=>Ot(e=>e.filter(e=>e!==t))},[]),Nt=r.useMemo(()=>ii(a.shellCopy),[a.shellCopy]),$t=r.useCallback(e=>{let t=ai(Nt.notificationKicker,{petName:yt,time:"{time}"}),n=Xe(e,{kicker:t,now:Je.now,ago:Je.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?M(n.prompt,n.card):B(n.tab),true)},[Nt,yt,M,B]),Lt=r.useMemo(()=>({tab:T,open:B,ask:M,requestRecords:Me,push:Bt,openInboxItem:$t}),[T,B,M,Me,Bt,$t]),Mt=a.tabsRef;r.useLayoutEffect(()=>{if(Mt!==void 0)return Mt.current=Lt,()=>{Mt.current===Lt&&(Mt.current=null)}},[Mt,Lt]);let Wt=ae==="tabs",Ut=a.header===void 0||a.header===false?null:a.header===true?{}:a.header,qt=r.useCallback(e=>M(e),[M]),Ht=e=>a.composer===false?null:/* @__PURE__ */i.jsx(ShellAskBar,{placeholder:ai(e==="plan"?Nt.planPlaceholder:Nt.recordsPlaceholder,{petName:yt}),field:Nt.field,send:Nt.send,onAsk:qt,testID:`everfur-askbar-${e}`}),Kt=e=>T===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
|
|
123
|
-
return
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
|
|
136
|
-
return i.jsx(o.Animated.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:ci},a],testID:"everfur-tabs-toast",children:/* @__PURE__ */i.jsx(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=Pe();return r.useMemo(()=>{let t=Se(e),n=e.registry.services.kv;return{shouldPlay:e=>Fe({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>Ee({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var mi=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],yi={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},ki={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},vi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=vi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!vi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var Ci="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==Ci,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
|
|
140
|
-
return Object.freeze(e
|
|
141
|
-
return Object.freeze(
|
|
142
|
-
return Object.freeze(t)}function
|
|
143
|
-
return Object.freeze(
|
|
144
|
-
return Object.freeze(
|
|
114
|
+
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function Ci(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return Si[t%Si.length]}function Ri(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function ji(e){return{...Ci(e.petRef),initial:Ri(e.name)}}function Ai(e,t,n){let r=ji(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function Fi(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let r=useEverfurTheme(),l=o.useMemo(()=>Ti(r),[r]),s=t-n*2,d=e===null?null:Ai(e,_i(r),{fill:r.color.highlight,ink:r.color.onHighlight}),c=Fi(s);/* @__PURE__ */
|
|
115
|
+
return a.jsx(Ring,{size:t,strokeWidth:n,color:r.color.mark,children:/* @__PURE__ */a.jsx(i.View,{style:[l.disc,{width:s,height:s,borderRadius:s/2},d===null?l.discEmpty:{backgroundColor:d.background}],children:/* @__PURE__ */a.jsx(Text,{tier:"badge",style:[l.letter,{fontSize:c,lineHeight:Math.round(c*1.2),color:d===null?r.color.text.muted:d.foreground}],children:d===null?Ri(null):d.initial})})})}function Ti(e){return i.StyleSheet.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var Ii=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",close:"Close",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}",switchPet:"{petName}. Switch pet",choosePet:"Choose pet"});function Ei(e){if(e===void 0)return Ii;let t={...Ii};for(let n of Object.keys(Ii)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
|
|
116
|
+
return Object.freeze(t)}function Pi(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??(n==="pet"?t.petName:void 0)??"")}var Di=360;function ShellHeader({options:t,tab:n,pushed:r,petRef:petRef,petName:s,copy:d,onInboxOpen:c}){let u=useEverfurTheme(),p=vi(u),{width:f}=i.useWindowDimensions(),[h,g]=o.useState(false),b=u.slots.header,m=b?.backgroundColor??p.colors.paper??u.color.surface,y=b?.textColor??p.colors.ink??u.color.text.primary,v=n==="ask"&&r===null,k=v?".ph-lockup .ph-mark":".ph-mark",w=t.mark??(u.meta.logoUrl===null?null:/* @__PURE__ */a.jsx(BrandImage,{uri:u.meta.logoUrl,label:u.meta.displayName,decorative:v,style:p.icon(k)})),x=r!==null?/* @__PURE__ */a.jsx(i.Pressable,{onPress:r.onBack,accessibilityRole:"button",accessibilityLabel:d.back,hitSlop:4,style:[p.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */a.jsx(ShellIcon,{name:"back",style:[p.icon(".ph-back svg"),{tintColor:y}]})}):/* @__PURE__ */a.jsx(Pet,{options:t,kit:p,petRef:petRef,petName:s,ink:y}),_=r!==null?/* @__PURE__ */a.jsx(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[p.text(".ph-title"),{display:"flex",color:y,textAlign:"center"}],testID:"everfur-shell-title",children:r.title}):v?/* @__PURE__ */a.jsx(e.EverfurPoweredBy,{children:/* @__PURE__ */a.jsxs(i.View,{accessible:true,accessibilityLabel:Pi("{name}, {by}",{name:u.meta.displayName,by:d.poweredByLabel}),style:[p.view(".ph-lockup",'.ph[data-tab="ask"]:not([data-pushed="1"]) .ph-lockup'),{display:"flex"}],testID:"everfur-shell-lockup",children:[w,f>=Di?/* @__PURE__ */a.jsxs(a.Fragment,{children:[
|
|
117
|
+
/* @__PURE__ */a.jsx(i.View,{style:p.view(".ph-lockup__rule")}),
|
|
118
|
+
/* @__PURE__ */a.jsxs(i.View,{style:p.view(".ph-lockup__by"),children:[
|
|
119
|
+
/* @__PURE__ */a.jsx(Text,{tier:"badge",style:p.text(".ph-lockup__by"),children:d.poweredBy}),
|
|
120
|
+
/* @__PURE__ */a.jsx(ShellIcon,{name:"wordmark",style:[p.icon(".ph-lockup__by svg"),{tintColor:p.colors.byInk??y}]})]})]}):null]})}):/* @__PURE__ */a.jsx(i.View,{testID:"everfur-shell-mark",children:w}),S=t.bell!==false,C=t.inbox?.onOpen;/* @__PURE__ */
|
|
121
|
+
return a.jsxs(i.View,{style:[p.view(".ph-head"),{flexDirection:"row",backgroundColor:m}],testID:"everfur-shell-header",children:[
|
|
122
|
+
/* @__PURE__ */a.jsx(i.View,{style:[p.view(".ph-head__start"),{flex:1,flexBasis:0}],children:x}),
|
|
123
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flexShrink:1,alignItems:"center",justifyContent:"center"},children:_}),
|
|
124
|
+
/* @__PURE__ */a.jsx(i.View,{style:[p.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&r===null?/* @__PURE__ */a.jsx(l.EverfurInboxBell,{onPress:t.onBell??(()=>g(true)),color:y,ground:m}):null}),S&&t.onBell===void 0?/* @__PURE__ */a.jsx(l.EverfurInboxSheet,{...t.inbox,visible:h,onClose:()=>g(false),onOpen:C??c}):null]})}function Pet({options:e,kit:t,petRef:petRef,petName:n,ink:r}){let o=t.view(".ph-pet img"),l=typeof o.width=="number"?o.width:36,s=e.petPhotoUrl!==void 0&&e.petPhotoUrl!==null&&e.petPhotoUrl!==""?/* @__PURE__ */a.jsx(BrandImage,{uri:e.petPhotoUrl,label:n,decorative:true,style:[t.icon(".ph-pet img"),{borderRadius:l/2}],resizeMode:"cover",fallback:/* @__PURE__ */a.jsx(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:l,ringStroke:0})}):/* @__PURE__ */a.jsx(PetDisc,{pet:petRef===null?null:{petRef:petRef,name:n},size:l,ringStroke:0}),d=/* @__PURE__ */a.jsxs(a.Fragment,{children:[s,n===""?null:/* @__PURE__ */a.jsx(Text,{tier:"heading",numberOfLines:1,style:[t.text(".ph-pet"),{color:r===t.colors.ink?t.colors.ink2:r,flexShrink:1}],children:n})]}),c=[t.view(".ph-pet"),{minWidth:0,flexShrink:1}];return e.onPet===void 0?/* @__PURE__ */a.jsx(i.View,{style:c,testID:"everfur-shell-pet",children:d}):/* @__PURE__ */a.jsx(i.Pressable,{onPress:e.onPet,accessibilityRole:"button",accessibilityLabel:n===""?void 0:n,style:c,testID:"everfur-shell-pet",children:d})}var Oi=/* @__PURE__ */Symbol.for("everfur.sdk.tabsBar.v1");function zi(){return globalThis[Oi]??null}function Bi(e){return e==="tabs_bar"&&zi()!==null}var Vi=/* @__PURE__ */o.createContext(null);function useEverfurTabs(){return o.useContext(Vi)}var Ni=200,$i=4,Li=2600,Mi=600,Ui=i.Easing.bezier(.25,.1,.25,1),Wi=i.Platform.OS!=="web",qi=/* @__PURE__ */Object.freeze({chats:Ge.heading,newChat:Ge.newChat}),Hi={position:"relative",top:0,alignSelf:"flex-start"};function EverfurTabs(r){let{petRef:petRef,opened:l,onTabChange:s,onRecordsRequested:d,onRecordsLanded:c,onToast:u}=r,p=r.visible??true,f=useEverfurTheme(),h=o.useMemo(()=>Zo(f),[f]),g=o.useMemo(()=>({...ft,...r.copy}),[r.copy]),{runtime:b,userRef:userRef}=De(),m=Ut("healthPlan"),y=Ut("records"),v=Ut("recordsClinic"),k=Ut("televet"),w=useEverfurPresentation({...r.tabs===void 0?{}:{shellTabs:r.tabs},...r.headerStyle===void 0?{}:{shellHeader:r.headerStyle}}),x=w.shellTabs??ht,_=o.useRef(x);_.current=x;let S=o.useMemo(()=>k||!x.includes("vet")?x:x.filter(e=>e!=="vet"),[x,k]),C=o.useRef(S);C.current=S;let R=Bi(w.shellHeader),j=R?zi()?.header??null:null;un(R);let[A,F]=o.useState(()=>/* @__PURE__ */new Map),[T,I]=o.useState(()=>/* @__PURE__ */new Set),E=o.useCallback((e,t)=>{F(n=>{let r=n.get(e),o=Et(r,t);return o===r?n:new Map(n).set(e,o)}),I(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),P=o.useCallback(e=>{I(t=>t.has(e)?t:new Set(t).add(e))},[]),D=petRef===null?void 0:A.get(petRef),O=!m||D?.empty===true,z=`${petRef??"none"}:${D?.epoch??0}`,B=mt(O,S),V=o.useRef(O);V.current=O;let N=t.useHealthPlanPage({petRef:petRef,enabled:m&&petRef!==null}),[$,L]=o.useState(()=>wt(l,false,S)),[M,U]=o.useState(()=>/* @__PURE__ */new Set(["ask",wt(l,false,S)])),W=o.useCallback(e=>{let t=yt(e,V.current,C.current);L(t),U(e=>e.has(t)?e:new Set(e).add(t))},[]);o.useEffect(()=>{let e=yt($,O,S);e!==$&&L(e)},[O,$,S]);let q=o.useRef(null);o.useEffect(()=>{let e=q.current;e===null||!mt(O,S).includes(e)||(q.current=null,W(e))},[O,S,W]);let H=o.useCallback(e=>{q.current=null,W(e)},[W]),K=o.useRef(s);K.current=s,o.useEffect(()=>{K.current?.($)},[$]);let[Y,G]=o.useState(null),J=o.useCallback((e,t)=>{e!==""&&G(n=>({id:(n?.id??0)+1,prompt:e,petRef:petRef,...t===void 0?{}:{card:t}})),q.current=null,W("ask")},[petRef,W]),Q=Y===null||Y.petRef!==petRef?null:Y,Z=xt(l),X=o.useRef(null),[ee,te]=o.useState(null);o.useEffect(()=>{if(X.current===Z)return;X.current=Z;let e=l.via==="link"?l.ask!==void 0?"ask":l.tab:"plan",t=l.via==="link"&&(e==="plan"||e==="vet")&&_.current.includes(e)&&!mt(V.current,C.current).includes(e);q.current=t?e:null,l.via==="link"&&l.ask!==void 0?J(l.ask.prompt,l.ask.card):W(wt(l,V.current,C.current)),te(l.via==="plain"?Z:null)},[Z,l,J,W]);let ne=o.useMemo(()=>Ot(),[]),re=p&&$==="ask",oe=o.useRef(re);oe.current=re;let ie=r.chat?.lifecycle,ae=o.useMemo(()=>ie===null?null:zt(Bt(ie??createAppStateLifecycle(),()=>oe.current),ne),[ie,ne]),le=o.useRef(re);o.useEffect(()=>{let e=Vt(le.current,re);le.current=re,e&&ne.fire()},[re,ne]);let[se,de]=o.useState(null),ce=o.useCallback(e=>{e!==""&&(u!==void 0?u(e):de(t=>({id:(t?.id??0)+1,text:e})))},[u]),ue=r.intro===false?null:r.intro??{},[pe,fe]=o.useState(null),[he,ge]=o.useState(null),[be,me]=o.useState(null),[ye,ve]=o.useState(null),[ke,we]=o.useState(()=>/* @__PURE__ */new Map),[xe,Se]=o.useState(false),[Ce,Re]=o.useState(false),je=o.useRef(null),[Ae,Ie]=o.useState(null),Ee=o.useRef(null),Pe=o.useRef(null),Oe=o.useMemo(()=>_e(b),[b]),Be=b.registry.services.kv,Ve=ue?.maxWidth??Mi,Ne=ue!==null&&m,$e=Ne&&ee!==null&&p&&userRef!==null&&petRef!==null,[Le,Me]=o.useState(null);o.useEffect(()=>{if(!$e)return;let e=ee;if(i.Dimensions.get("window").width>=Ve){Me(e);return}let t=new AbortController,n=petRef;return Fe({repo:Oe,kv:Be,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||(Me(e),r&&me({key:e,petRef:n}))},()=>{t.signal.aborted||Me(e)}),()=>t.abort()},[$e,ee,userRef,petRef,Oe,Be,Ve]);let Ue=Ne&&ee!==null&&p&&(userRef===null||petRef===null)&&i.Dimensions.get("window").width<Ve,[We,qe]=o.useState(null);o.useEffect(()=>{if(!Ue)return;let e=ee,t=setTimeout(()=>qe(e),Pt);return()=>clearTimeout(t)},[Ue,ee]),Ke(Ue&&We!==ee||$e&&Le!==ee||be!==null||pe!==null);let He=o.useCallback((e,t)=>{we(n=>n.get(e)===t?n:new Map(n).set(e,t))},[]),Ge=petRef===null?void 0:ke.get(petRef),Qe=Ge==="some";o.useEffect(()=>{petRef!==null&&Qe&&setHealthPlanNoVet(petRef,false)},[petRef,Qe]);let Ze=o.useCallback(()=>{let e=Ee.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&Ie({top:Math.round(t),height:Math.round(r)})})},[]);o.useEffect(()=>{if(be===null||pe!==null)return;let e=Dt({sameOpen:be.key===ee&&be.petRef===petRef,plan:D,planFailed:T.has(be.petRef),recordsPending:y&&Ge===void 0});if(e==="drop"&&me(null),e!=="play")return;W("ask"),Ze();let t=setTimeout(()=>{me(null),fe(e=>({mode:"intro",id:(e?.id??0)+1}))},Ni);return()=>clearTimeout(t)},[be,pe,ee,petRef,D,T,y,Ge,W,Ze]),o.useEffect(()=>{if(be===null)return;let e=setTimeout(()=>me(e=>e===be?null:e),Pt);return()=>clearTimeout(e)},[be]);let tt=o.useCallback(()=>{petRef!==null&&(Ze(),fe(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,Ze]),nt=o.useCallback(e=>{(pe?.mode??"intro")==="intro"&&Te({repo:Oe,kv:Be,userRef:userRef}),je.current==="novet"&&petRef!==null&&setHealthPlanNoVet(petRef,true),e.exit==="plan"?W("plan"):e.exit==="ask"&&W("ask"),e.notifications!==null&&ve(t=>t===null?t:{...t,notified:e.notifications}),e.toast!==null&&ce(e.toast)},[pe,Oe,Be,userRef,petRef,W,ce]),ot=o.useCallback(()=>fe(null),[]),it=o.useCallback(e=>{ve({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),d?.(e)},[d]),at=o.useCallback(e=>{e!==null&&(je.current=e),ge(e)},[]);o.useEffect(()=>{if(petRef===null){Re(false);return}return Re(healthPlanNoVet(petRef)),onHealthPlanNoVet((e,t)=>{e===petRef&&Re(t)})},[petRef]),o.useEffect(()=>onHealthPlanRecordsLanded(e=>setHealthPlanNoVet(e,false)),[]);let lt=ue?.copy,dt=o.useCallback(()=>introText({facts:introFacts(N.page,r.petName),copy:{...ze,...lt},blanks:0,resultsPending:false}),[N.page,r.petName,lt]),ct=o.useRef(void 0),pt=o.useCallback(()=>{Se(false),W("plan"),petRef!==null&&ce(dt().toast.landed)},[W,petRef,ce,dt]);o.useEffect(()=>{let e=ct.current;if(ct.current=Ge,ye===null||petRef===null||ye.petRef!==petRef||e!=="none"||Ge!=="some")return;let t={petRef:petRef,at:/* @__PURE__ */(new Date).toISOString()};c?.(t),notifyHealthPlanRecordsLanded(petRef),ve(null),ye.notified===true?Se(true):pt()},[Ge,ye,petRef,c,pt]);let gt=r.chat,bt=r.resultsPending??N.page?.page?.wait!==void 0,vt=o.useMemo(()=>{let e=R?{shellHeader:"tabs_bar",...gt?.presentation}:gt?.presentation;return bt?{...e,chatTopCard:"none"}:e},[bt,gt?.presentation,R]),kt=o.useCallback(()=>W("plan"),[W]),_t=o.useCallback(()=>W("records"),[W]),St=o.useCallback(()=>W("ask"),[W]),Ct=r.plan,Rt=o.useMemo(()=>Ct?.focus===void 0?void 0:{...Ct.focus,onConnectRecords:Ct.focus.onConnectRecords??_t,onWaitAction:Ct.focus.onWaitAction??St},[Ct?.focus,_t,St]),jt=r.petName??N.page?.pet.name??"",At=jt.trim()||et,Ft=r.records,Tt=Ft?.sheet,It=o.useCallback(()=>{tt()},[tt]),Nt=typeof r.header=="object"?r.header.petPhotoUrl:void 0,[$t,Lt]=o.useState([]),Mt=$t.length===0?null:$t[$t.length-1]??null,Wt=o.useCallback(e=>{let t={...e};return Lt(e=>[...e,t]),()=>Lt(e=>e.filter(e=>e!==t))},[]),qt={active:p&&$==="records",askBar:false,layout:R?"tabs_bar":"hub",...R?{shellPush:Wt}:{},...R&&Nt!==void 0?{petPhotoUrl:Nt}:{}},Ht={onRequestFromClinic:It,noVet:Ce,onOpenPlan:kt},Kt=Ye(Ft),Yt=Tt===false?false:{...qt,...typeof Tt=="object"?Ye(Tt):{}},Gt=petRef===null?null:/* @__PURE__ */a.jsx(n.EverfurRecords,{...Ht,...Kt,sheet:Yt,petRef:petRef,...jt===""?{}:{petName:jt},onAsk:Ft?.onAsk??(e=>J(e)),style:[{flex:1},Ft?.style]},petRef),Jt=o.useMemo(()=>Ei(r.shellCopy),[r.shellCopy]),Qt=o.useCallback(e=>{let t=Pi(Jt.notificationKicker,{petName:At,time:"{time}"}),n=Xe(e,{kicker:t,now:Je.now,ago:Je.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?J(n.prompt,n.card):H(n.tab),true)},[Jt,At,J,H]),Zt=o.useMemo(()=>({tab:$,open:H,ask:J,requestRecords:tt,push:Wt,openInboxItem:Qt}),[$,H,J,tt,Wt,Qt]),Xt=r.tabsRef;o.useLayoutEffect(()=>{if(Xt!==void 0)return Xt.current=Zt,()=>{Xt.current===Zt&&(Xt.current=null)}},[Xt,Zt]);let en=he==="tabs",tn=r.header===void 0||r.header===false?null:r.header===true?{}:r.header,nn=o.useCallback(e=>J(e),[J]),rn=j?.TabsAskBar??ShellAskBar,on=e=>r.composer===false?null:/* @__PURE__ */a.jsx(rn,{placeholder:Mt?.askPlaceholder??Pi(e==="plan"?Jt.planPlaceholder:e==="vet"?j.askWords.vet:Jt.recordsPlaceholder,{petName:At}),...j&>?.attachments?{onUpload:St,uploadLabel:j.askWords.upload}:{},field:Jt.field,send:Jt.send,onAsk:nn,testID:`everfur-askbar-${e}`}),an=e=>$===e?{flex:1,minHeight:0}:{display:"none"};/* @__PURE__ */
|
|
125
|
+
return a.jsx(Vi.Provider,{value:Zt,children:/* @__PURE__ */a.jsxs(i.View,{style:[{flex:1,minHeight:0,position:"relative"},r.style],testID:r.testID??"everfur-tabs",children:[
|
|
126
|
+
/* @__PURE__ */a.jsxs(SdkTabletColumn,{style:{minHeight:0},children:[j!==null?/* @__PURE__ */a.jsx(j.TabsBarHeader,{options:tn??{},pushed:Mt,petRef:petRef,petName:jt,copy:Jt,onClose:r.onClose,onAddToCalendar:r.vet?.onAddToCalendar}):tn===null?null:/* @__PURE__ */a.jsx(ShellHeader,{options:tn,tab:$,pushed:Mt,petRef:petRef,petName:jt,copy:Jt,onInboxOpen:Qt}),Mt!==null?null:j!==null?/* @__PURE__ */a.jsx(j.SubTabs,{barRef:Ee,tabs:B,sub:$,copy:g,badges:r.badges,onOpen:H}):/* @__PURE__ */a.jsx(TabBar,{kit:h,barRef:Ee,tabs:B,sub:$,lit:en,copy:g,badges:r.badges,onOpen:H}),petRef===null||!m?null:/* @__PURE__ */a.jsx(PlanProbe,{petRef:petRef,pagePhase:N.phase,page:N.page,refreshPage:N.refresh,watching:p&&($==="plan"||O),onPlan:E,onPlanFailed:P}),petRef!==null&&y&&(be!==null||pe!==null||ye!==null)?/* @__PURE__ */a.jsx(RecordsProbe,{petRef:petRef,onRecords:He}):null,
|
|
127
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flex:1,minHeight:0},children:[
|
|
128
|
+
/* @__PURE__ */a.jsxs(i.View,{style:an("ask"),testID:"everfur-pane-ask",children:[
|
|
129
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flex:1,minHeight:0},children:/* @__PURE__ */a.jsx(st.Provider,{value:re,children:/* @__PURE__ */a.jsx(ut.Provider,{value:R,children:/* @__PURE__ */a.jsx(rt.Provider,{value:Zr,children:/* @__PURE__ */a.jsx(e.EverfurChat,{header:false,historyBar:qi,...gt,style:[{flex:1,paddingTop:0},gt?.style],...vt===void 0?{}:{presentation:vt},...bt&&r.pendingStarterPrompts!==void 0?{starterPrompts:r.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:ae,onOpenHealthPlan:kt,...R?{onOpenRecord:gt?.onOpenRecord??_t}:gt?.onOpenRecord?{onOpenRecord:gt.onOpenRecord}:{},...Q===null?{}:{initialAsk:Q.prompt,initialAskKey:Q.id,...Q.card===void 0?{}:{initialAskCard:Q.card}}})})})})},petRef??"none"),r.paneFooter?.ask]}),M.has("plan")&&!O?/* @__PURE__ */a.jsxs(i.View,{style:an("plan"),testID:"everfur-pane-plan",children:[
|
|
130
|
+
/* @__PURE__ */a.jsx(i.ScrollView,{ref:Pe,style:{flex:1},children:/* @__PURE__ */a.jsx(t.HealthPlanScrollScope,{scrollRef:Pe,children:/* @__PURE__ */a.jsx(t.EverfurHealthPlan,{...Ct,...Rt===void 0?{}:{focus:Rt},petRef:petRef},z)})},petRef??"none"),r.paneFooter?.plan??on("plan")]}):null,M.has("vet")&&B.includes("vet")?/* @__PURE__ */a.jsxs(i.View,{style:an("vet"),testID:"everfur-pane-vet",children:[
|
|
131
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flex:1,minHeight:0},children:r.vet?.render===void 0?/* @__PURE__ */a.jsx(VetPane,{petRef:petRef,button:r.vet?.button,vetPhotoUrl:r.vet?.vetPhotoUrl,tabsBar:R}):r.vet.render({petRef:petRef,petName:jt})},petRef??"none"),r.paneFooter?.vet??(j&&on("vet"))]}):null,M.has("records")?/* @__PURE__ */a.jsxs(i.View,{style:an("records"),testID:"everfur-pane-records",children:[
|
|
132
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flex:1,minHeight:0},children:r.renderRecords===void 0?Gt:r.renderRecords(Gt)},petRef??"none"),r.paneFooter?.records??on("records")]}):null]}),se===null||u!==void 0?null:/* @__PURE__ */a.jsx(Toast,{kit:h,text:se.text},`toast-${se.id}`),xe?/* @__PURE__ */a.jsx(EverfurRecordsLandedBanner,{text:dt().banner,...ue?.bannerIcon===void 0?{}:{icon:ue.bannerIcon},onLand:pt}):null]}),pe===null||petRef===null?null:/* @__PURE__ */a.jsx(EverfurIntro,{petRef:petRef,mode:pe.mode,page:N.page,petName:r.petName??null,recordsConnected:pe.mode==="intro"&&(Qe||!v),resultsPending:bt,...ue?.copy===void 0?{}:{copy:ue.copy},...ue?.blanks===void 0?{}:{blanks:ue.blanks},tabBar:Ae,tabLabels:{ask:g.ask,plan:g.plan,records:g.records},onFrame:at,onClose:nt,onClosed:ot,onRequested:it,...ue?.onEnableNotifications===void 0?{}:{onEnableNotifications:ue.onEnableNotifications},onUpload:ue?.onUpload??_t,...ue?.ownerName===void 0?{}:{ownerName:ue.ownerName},...ue?.onCaptureSignature===void 0?{}:{onCaptureSignature:ue.onCaptureSignature}},`intro-${pe.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:o,copy:l,badges:s,onOpen:d}){let{borderBottomWidth:c=0,borderBottomColor:u,...p}=e.view(".ph-sub"),f=n.length>3;/* @__PURE__ */
|
|
133
|
+
return a.jsxs(i.View,{ref:t,accessibilityRole:"tablist",accessibilityLabel:vt(n,l),style:p,testID:"everfur-tabs-bar",children:[c>0?/* @__PURE__ */a.jsx(i.View,{pointerEvents:"none",style:{position:"absolute",left:0,right:0,bottom:0,height:c,backgroundColor:u},testID:"everfur-tabs-edge"}):null,n.map((t,n)=>{let c=r===t,u=[".ph-sub button",`.ph-sub [data-sub="${t}"]`,c&&'.ph-sub button[aria-selected="true"]',o&&'#ph[data-in-frame="tabs"] .ph-sub button'];/* @__PURE__ */
|
|
134
|
+
return a.jsxs(i.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:c},onPress:()=>d(t),style:[e.view(...u),e.col(".ph-sub",n),{alignItems:"center",justifyContent:"center"}],testID:`everfur-tab-${t}`,children:[
|
|
135
|
+
/* @__PURE__ */a.jsx(TabPill,{kit:e,id:t,index:n,lit:o}),
|
|
136
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",maxWidth:"100%"},children:[
|
|
137
|
+
/* @__PURE__ */a.jsx(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...u),f?Ki:null,{flexShrink:1}],children:l[t]}),s?.[t]===true?/* @__PURE__ */a.jsx(i.View,{style:[e.view(".ph-sub button .ph-new"),Hi],testID:`everfur-tab-${t}-new`}):null]}),c?/* @__PURE__ */a.jsx(i.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',o&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function VetPane({petRef:petRef,button:e,vetPhotoUrl:t,tabsBar:n}){let o=n?zi()?.vet.VetHome:void 0;return o!==void 0?/* @__PURE__ */a.jsxs(i.View,{style:{flex:1,minHeight:0},children:[
|
|
138
|
+
/* @__PURE__ */a.jsx(o,{petRef:petRef,...e?.usState!==void 0?{usState:e.usState}:{},...e?.onStartInApp!==void 0?{onStartInApp:e.onStartInApp}:{},vetPhotoUrl:t}),
|
|
139
|
+
/* @__PURE__ */a.jsx(r.EverfurTelevetHost,{})]}):/* @__PURE__ */a.jsx(i.View,{style:{flex:1,minHeight:0,alignItems:"center",justifyContent:"center",padding:16},testID:"everfur-vet-home",children:/* @__PURE__ */a.jsx(r.VetVisitButton,{...e,petRef:petRef})})}function TabPill({kit:e,id:t,index:n,lit:r}){let l=o.useRef(new i.Animated.Value(r?1:0)).current,s=`.ph-sub [data-sub="${t}"]`,d=e.raw("k",s)??n,c=e.raw("tint",s)??(t==="vet"?e.colors.riskChip:void 0);o.useEffect(()=>{let t=r?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),n=typeof d=="number"?d:0;i.Animated.timing(l,{toValue:r?1:0,duration:t.dur,delay:r?t.delay+n*t.stagger:0,easing:e.reduced?Ui:i.Easing.bezier(...$o),useNativeDriver:Wi}).start()},[r,e,d,l]);let u=e.reduced?{opacity:l}:{opacity:l,transform:[{scale:l.interpolate({inputRange:[0,1],outputRange:[Wo.pillScale,1]})}]};/* @__PURE__ */
|
|
140
|
+
return a.jsx(i.Animated.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof c=="string"?{backgroundColor:c}:null,u],testID:`everfur-tab-pill-${t}`})}var Ki=/* @__PURE__ */Object.freeze({fontSize:15});function Toast({kit:e,text:t}){let n=o.useRef(new i.Animated.Value(0)).current;o.useEffect(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");i.Animated.timing(n,{toValue:1,duration:r.dur,easing:i.Easing.bezier(...$o),useNativeDriver:Wi}).start();let o=i.AccessibilityInfo.announceForAccessibility;i.Platform.OS==="ios"&&typeof o=="function"&&o.call(i.AccessibilityInfo,t);let a=setTimeout(()=>{let t=e.motion(".ph-toast");i.Animated.timing(n,{toValue:0,duration:t.dur,easing:i.Easing.bezier(...$o),useNativeDriver:Wi}).start()},Li);return()=>clearTimeout(a)},[e,n,t]);let r=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[Wo.toastY,0]})}]};/* @__PURE__ */
|
|
141
|
+
return a.jsx(i.Animated.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:$i},r],testID:"everfur-tabs-toast",children:/* @__PURE__ */a.jsx(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=De();return o.useMemo(()=>{let t=_e(e),n=e.registry.services.kv;return{shouldPlay:e=>Fe({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>Te({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Yi=[{key:"look.color.primary",kind:"color",default:"#10462E"},{key:"look.color.on_primary",kind:"color",default:"#FFFFFF"},{key:"look.color.accent",kind:"color",default:"#07C168"},{key:"look.color.tint",kind:"color",default:"#DAF6E8"},{key:"look.color.chips",kind:"hexList",default:["#97E4C0","#F3CD73","#FFC3BC"]},{key:"look.color.surface",kind:"color",default:"#FFFFFF"},{key:"look.color.heading",kind:"color",default:"#10462E"},{key:"look.color.ink",kind:"color",default:"#000000"},{key:"look.color.muted",kind:"color",default:"#6B6B6B"},{key:"look.color.line",kind:"color",default:"#E4E4E4"},{key:"look.color.bubble",kind:"colorOrNone",default:"#10462E"},{key:"look.color.launcher",kind:"color",default:"#10462E"},{key:"look.color.on_launcher",kind:"color",default:"#07C168"},{key:"look.color.dot",kind:"color",default:"#07C168"},{key:"look.chat_wash",kind:"hexList",default:[]},{key:"look.font.heading",kind:"text",default:"Azeret"},{key:"look.font.body",kind:"text",default:"Azeret"},{key:"look.font.chat",kind:"text",default:"body"},{key:"look.font.label",kind:"text",default:"Azeret Mono"},{key:"look.font.heading_weight",kind:"number",default:700,oneOf:[500,600,700,800]},{key:"look.font.files",kind:"fontFiles",default:[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}]},{key:"look.radius.card",kind:"number",default:20,range:[0,28]},{key:"look.radius.sheet",kind:"number",default:28,range:[0,28]},{key:"look.logo.wordmark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.logo.mark",kind:"text",default:"brand/guide/img/wordmark-green.png"},{key:"look.ask_icon",kind:"text",default:"everfur-ask"},{key:"look.lockup",kind:"choice",default:"side_by_side",oneOf:["side_by_side","stacked"]},{key:"text.partner_name",kind:"string",default:"Everfur",max:20},{key:"text.ask.name",kind:"string",default:"Everfur",max:16},{key:"text.ask.greeting",kind:"string",default:"What can we help {pet} with today?",max:56},{key:"text.ask.placeholder",kind:"string",default:"Ask anything about {pet}…",max:34},{key:"text.ask.dock_placeholder",kind:"string",default:"Ask {assistant} about {pet}…",max:34},{key:"text.ask.memory_chip",kind:"string",default:"Remembers {pet}",max:22},{key:"text.ask.from_history",kind:"string",default:"From {pet}'s history",max:28},{key:"text.ask.watch_for",kind:"string",default:"Watch for",max:24},{key:"text.ask.new_chat",kind:"string",default:"New chat",max:12},{key:"text.tabs.ask",kind:"string",default:"Ask",max:12},{key:"text.tabs.vet",kind:"string",default:"Vet",max:10},{key:"text.tabs.records",kind:"string",default:"Health",max:16},{key:"text.launcher.tip",kind:"string",default:"New: ask anything about your pets, 24/7.",max:48},{key:"text.nav.page_title",kind:"string",default:"",max:14,emptyOk:true},{key:"text.vet.book",kind:"string",default:"Book a video visit",max:22},{key:"text.vet.booked",kind:"string",default:"{pet}'s visit is booked",max:40},{key:"text.vet.see_times",kind:"string",default:"Find a time",max:16},{key:"text.vet.join",kind:"string",default:"Get ready",max:14},{key:"text.vet.add_calendar",kind:"string",default:"Add to calendar",max:20},{key:"text.records.empty_title",kind:"string",default:"Add {pet}'s records",max:36},{key:"text.records.empty_body",kind:"string",default:"Records can come from more than one clinic over a lifetime.",max:160},{key:"text.records.request",kind:"string",default:"Request from a clinic",max:34},{key:"text.records.upload",kind:"string",default:"Upload a document",max:24},{key:"text.cap.counter",kind:"string",default:"{left} of {cap} free messages left this month",max:48},{key:"text.cap.reached",kind:"string",default:"You've used your {cap} free messages this month.",max:64},{key:"text.cap.button",kind:"string",default:"See {plan}",max:24},{key:"text.members.title",kind:"string",default:"Ask anything about your pets, anytime",max:48},{key:"text.members.badge",kind:"string",default:"Members only",max:32},{key:"text.members.button",kind:"string",default:"Join membership",max:24},{key:"text.ui.not_now",kind:"string",default:"Not now",max:12},{key:"text.notify.records_ready",kind:"string",default:"When records arrive",max:28,reference:true},{key:"text.notify.visit_reminder",kind:"string",default:"Visit reminders",max:28,reference:true},{key:"text.notify.vet_reply",kind:"string",default:"Replies from the vet",max:28,reference:true},{key:"text.notify.care_due",kind:"string",default:"Care that's due",max:28,reference:true},{key:"layout.nav",kind:"choice",default:"bottom_tabs",oneOf:["bottom_tabs","top_tabs","sections_page","chat_first"]},{key:"layout.sections",kind:"itemList",default:["ask","records"],items:["ask","vet","records"]},{key:"layout.vet_on_ask",kind:"choice",default:"top",oneOf:["top","header_button","own_tab","in_answers"]},{key:"layout.vet_badge",kind:"choice",default:"tab_dot",oneOf:["none","header_pill","tab_dot"]},{key:"layout.memory_chip",kind:"boolean",default:false},{key:"layout.severity",kind:"choice",default:"four_levels",oneOf:["off","three_levels","four_levels"]},{key:"layout.suggestions",kind:"choice",default:"center",oneOf:["center","above_bar"]},{key:"layout.opens_on",kind:"choice",default:"new_chat",oneOf:["new_chat","last_chat"]},{key:"layout.answer_byline",kind:"choice",default:"avatar",oneOf:["none","avatar","wordmark"]},{key:"layout.launcher",kind:"choice",default:"none",oneOf:["none","floating_button"]},{key:"layout.presentation",kind:"choice",default:"in_tab",oneOf:["in_tab","full_screen"]},{key:"features.chat",kind:"boolean",default:true},{key:"features.records",kind:"boolean",default:true},{key:"features.video_visits",kind:"boolean",default:true},{key:"features.prescriptions",kind:"boolean",default:true},{key:"features.shop",kind:"choice",default:"everfur_care",oneOf:["off","everfur_care","partner_pick","partner_cart"],reference:true},{key:"features.partner_data",kind:"itemList",default:[],items:["park_checkins","camera_events","dna_results"]},{key:"features.texting",kind:"boolean",default:true,reference:true},{key:"features.texting_cap",kind:"numberOrNull",default:null,range:[1,999],reference:true},{key:"features.notify.records_ready",kind:"boolean",default:true,reference:true},{key:"features.notify.visit_reminder",kind:"boolean",default:true,reference:true},{key:"features.notify.vet_reply",kind:"boolean",default:true,reference:true},{key:"features.notify.care_due",kind:"boolean",default:true,reference:true},{key:"access.mode",kind:"choice",default:"open",oneOf:["open","free_cap","members_only"]},{key:"access.free_messages",kind:"number",default:0,range:[0,50]},{key:"access.locked",kind:"itemList",default:["video_visits"],items:["video_visits","texting","link_records","previous_results","dashboard","goals"]},{key:"plan.name",kind:"string",default:"Everfur Pro",max:20},{key:"plan.sold_by",kind:"choice",default:"everfur",oneOf:["everfur","partner"]},{key:"plan.price_display",kind:"choice",default:"full",oneOf:["full","monthly_equivalent","hidden"]},{key:"plan.price_year",kind:"money",default:"$144.99"},{key:"plan.price_month",kind:"money",default:"$15.00"},{key:"vet.visits_per_year",kind:"numberOrNull",default:null,range:[1,24]},{key:"vet.extra_visit_price",kind:"moneyOrNull",default:null},{key:"vet.name",kind:"string",default:"Licensed Everfur vet",max:28},{key:"vet.title",kind:"string",default:"",max:32,emptyOk:true},{key:"vet.photo",kind:"text",default:"prototypes/televet-photos/r5/vet.jpg"},{key:"units.weight",kind:"choice",default:"lb",oneOf:["lb","kg"]},{key:"units.temperature",kind:"choice",default:"F",oneOf:["F","C"]},{key:"units.distance",kind:"choice",default:"mi",oneOf:["mi","km"],reference:true},{key:"units.currency",kind:"choice",default:"$",oneOf:["$","US$"]}],Gi={"look.color.primary":"#10462E","look.color.on_primary":"#FFFFFF","look.color.accent":"#07C168","look.color.tint":"#DAF6E8","look.color.chips":["#97E4C0","#F3CD73","#FFC3BC"],"look.color.surface":"#FFFFFF","look.color.heading":"#10462E","look.color.ink":"#000000","look.color.muted":"#6B6B6B","look.color.line":"#E4E4E4","look.color.bubble":"#10462E","look.color.launcher":"#10462E","look.color.on_launcher":"#07C168","look.color.dot":"#07C168","look.chat_wash":[],"look.font.heading":"Azeret","look.font.body":"Azeret","look.font.chat":"body","look.font.label":"Azeret Mono","look.font.heading_weight":700,"look.font.files":[{family:"Azeret",weight:"400",url:"brand/fonts/Azeret/Azeret-Regular.woff2"},{family:"Azeret",weight:"500",url:"brand/fonts/Azeret/Azeret-Medium.woff2"},{family:"Azeret",weight:"700",url:"brand/fonts/Azeret/Azeret-Bold.woff2"},{family:"Azeret Mono",weight:"400",url:"brand/fonts/Azeret-Mono/AzeretMono-Regular.woff2"}],"look.radius.card":20,"look.radius.sheet":28,"look.logo.wordmark":"brand/guide/img/wordmark-green.png","look.logo.mark":"brand/guide/img/wordmark-green.png","look.ask_icon":"everfur-ask","look.lockup":"side_by_side","text.partner_name":"Everfur","text.ask.name":"Everfur","text.ask.greeting":"What can we help {pet} with today?","text.ask.placeholder":"Ask anything about {pet}…","text.ask.dock_placeholder":"Ask {assistant} about {pet}…","text.ask.memory_chip":"Remembers {pet}","text.ask.from_history":"From {pet}'s history","text.ask.watch_for":"Watch for","text.ask.new_chat":"New chat","text.tabs.ask":"Ask","text.tabs.vet":"Vet","text.tabs.records":"Health","text.launcher.tip":"New: ask anything about your pets, 24/7.","text.nav.page_title":"","text.vet.book":"Book a video visit","text.vet.booked":"{pet}'s visit is booked","text.vet.see_times":"Find a time","text.vet.join":"Get ready","text.vet.add_calendar":"Add to calendar","text.records.empty_title":"Add {pet}'s records","text.records.empty_body":"Records can come from more than one clinic over a lifetime.","text.records.request":"Request from a clinic","text.records.upload":"Upload a document","text.cap.counter":"{left} of {cap} free messages left this month","text.cap.reached":"You've used your {cap} free messages this month.","text.cap.button":"See {plan}","text.members.title":"Ask anything about your pets, anytime","text.members.badge":"Members only","text.members.button":"Join membership","text.ui.not_now":"Not now","text.notify.records_ready":"When records arrive","text.notify.visit_reminder":"Visit reminders","text.notify.vet_reply":"Replies from the vet","text.notify.care_due":"Care that's due","layout.nav":"bottom_tabs","layout.sections":["ask","records"],"layout.vet_on_ask":"top","layout.vet_badge":"tab_dot","layout.memory_chip":false,"layout.severity":"four_levels","layout.suggestions":"center","layout.opens_on":"new_chat","layout.answer_byline":"avatar","layout.launcher":"none","layout.presentation":"in_tab","features.chat":true,"features.records":true,"features.video_visits":true,"features.prescriptions":true,"features.shop":"everfur_care","features.partner_data":[],"features.texting":true,"features.texting_cap":null,"features.notify.records_ready":true,"features.notify.visit_reminder":true,"features.notify.vet_reply":true,"features.notify.care_due":true,"access.mode":"open","access.free_messages":0,"access.locked":["video_visits"],"plan.name":"Everfur Pro","plan.sold_by":"everfur","plan.price_display":"full","plan.price_year":"$144.99","plan.price_month":"$15.00","vet.visits_per_year":null,"vet.extra_visit_price":null,"vet.name":"Licensed Everfur vet","vet.title":"","vet.photo":"prototypes/televet-photos/r5/vet.jpg","units.weight":"lb","units.temperature":"F","units.distance":"mi","units.currency":"$"},Ji={"ask.emergency":"Emergency? Call a vet.","ask.privacy":"Confidential. {partner} can't see this chat.","ask.you":"You","ask.today":"Today","ask.follow_ups":"Follow-up questions","ask.attach.photo":"Photo","ask.attach.camera":"Camera","banner.four.0":"Good to know","banner.four.1":"Monitor at home","banner.four.2":"See a vet today","banner.four.3":"Call a vet now","banner.three.0":"All clear","banner.three.1":"Monitor at home","banner.three.2":"See a vet now","banner.body.lowest":"Just general info about {pet}. Nothing here needs action right now.","locked.video_visits":"Video visits with a vet","locked.texting":"Ask by text","locked.link_records":"Link {pet}'s vet records","locked.previous_results":"Previous results","locked.dashboard":"Health dashboard","locked.goals":"Goals for {pet}","plan.price.year":"a year","plan.price.month":"/month","plan.price.billed":"Billed Annually","vet.wellness_tab":"Wellness","vet.opening":"Next opening {when}","vet.next_visit":"Next video visit","vet.badge":"Booked","vet.length":"10 minutes","vet.kind_wellness":"wellness video call","vet.reschedule":"Reschedule","vet.cancel":"Cancel","vet.note":"The vet has {pet}'s records and what you've asked {assistant}. The visit opens right here, 15 minutes before.","vet.book_another":"Book another visit","vet.past_visits":"Past visits","vet.allowance":"{left} of {visits} video visits left this year","vet.extra":"Extra visits are {price} each","vet.gate.visits":"{pet} lives in {state}: a licensed vet can see {them} by video.","vet.gate.wellness":"{pet} lives in {state}: a vet gives general advice by video. No prescriptions.","vet.rx":"Prescriptions, if the vet decides {pet} needs one.","vet.card.when":"Video visit, tomorrow from {when}","vet.card.wellness_when":"Wellness video call, general advice","vet.card.wellness":"A vet can talk it through with you by video: general advice, no exam.","vet.next.text":"We'll text you and send a notification 30 minutes before.","vet.next.notify":"We'll send a notification 30 minutes before.","vet.next.summary":"{pet}'s summary goes to the vet ahead of the call.","vet.next.join":"Join right here in the app. No links to hunt for.","vet.done":"Done","vet.legal":"Video visits are with a licensed veterinarian.","vet.legal.rx":"Prescriptions where allowed, starting with California.","vet.legal.emergency":"In an emergency, go to the nearest emergency animal hospital.","vet.privacy":"Everfur is a separate provider. Your visits and messages are confidential, and {partner} can't see them.","records.status.in_range":"In range","records.status.watch":"Watch","records.vitals.temperature":"Temperature","records.vitals.heart_rate":"Heart rate","records.vitals.weight":"Weight","records.needs":"Needs a look","records.care":"Upcoming care","records.tiles":"Records & history","records.tile.labs":"Labs & bloodwork","records.tile.vaccines":"Vaccines","records.tile.visits":"Visits & records","records.tile.screenings":"Screenings","records.chart.over":"Over","records.chart.under":"Under","records.history":"History","pdata.park_checkins":"Park check-ins","pdata.camera_events":"Camera events","pdata.dna_results":"{partner} DNA","pdata.tag.park_checkins":"Park check-in","pdata.tag.camera_events":"Camera","pdata.tag.dna_results":"{partner} DNA","ask.tag.records":"Records","vet.book_another.for":"For {pet}","upload.title":"Upload a document","upload.body":"A PDF, or a photo of a paper record. Add them all; we sort them by date.","upload.photo":"Take a photo","upload.photo.note":"of a paper record","upload.library":"Choose from photos","upload.file":"Choose a file","upload.file.note":"PDF","load.error":"Couldn't load","load.retry":"Try again"},Qi={vetOnAskByNav:{bottom_tabs:["top","own_tab","header_button","in_answers"],top_tabs:["own_tab","header_button","in_answers"],sections_page:["own_tab","in_answers"],chat_first:["header_button","in_answers"]},presentationByNav:{bottom_tabs:["in_tab"],top_tabs:["in_tab","full_screen"],sections_page:["in_tab"],chat_first:["in_tab"]}};function vetLevelFor(e,t){if(t==null||(t.country??"US").toUpperCase()!=="US")return"none";let n=(t.state??"").toUpperCase();return n===""?"none":e.videoAndRx.includes(n)?"visits":e.adviceOnly.includes(n)?"wellness":"none"}function resolveLayout(e,t){let n=[],r=e["layout.nav"],o=e["features.video_visits"]&&t!=="none",i=e["layout.vet_on_ask"],a=Qi.vetOnAskByNav[r];e["features.video_visits"]&&!a.includes(i)&&(n.push("layout.vet_on_ask"),i=e["layout.sections"].includes("vet")&&a.includes("own_tab")?"own_tab":"in_answers"),o||(i="none");let l=/* @__PURE__ */new Set,s=[];for(let t of e["layout.sections"]){if(l.has(t)){n.push("layout.sections");continue}l.add(t),!(t==="vet"&&i!=="own_tab")&&(t==="ask"&&!e["features.chat"]||t==="records"&&!e["features.records"]||s.push(t))}i==="own_tab"&&!s.includes("vet")&&s.push("vet"),r==="chat_first"&&!s.includes("ask")&&(n.push("layout.sections"),s.unshift("ask")),s.length===0&&s.push(e["features.records"]&&!e["features.chat"]?"records":"ask");let d=e["layout.presentation"];(!Qi.presentationByNav[r].includes(d)||d==="full_screen"&&e["layout.launcher"]!=="floating_button")&&(d!=="in_tab"&&n.push("layout.presentation"),d="in_tab");let c=e["layout.vet_badge"];c==="header_pill"&&d==="full_screen"&&i==="own_tab"&&(c="tab_dot");let u=d==="full_screen"?"close":r==="chat_first"?"down":"none";/* @__PURE__ */
|
|
142
|
+
return Object.freeze({nav:r,sections:/* @__PURE__ */Object.freeze(s),vetOnAsk:i,vetBadge:c,presentation:d,launcher:e["layout.launcher"]==="floating_button",closeControl:u,adjusted:/* @__PURE__ */Object.freeze([...new Set(n)])})}var Zi="your pet",Xi=/\{([a-z]+)\}/g;function ea(e,t){return/(^|[.!?]\s+)$/.test(e.slice(0,t))}function fillSdkText(e,t,n={}){let r=typeof n.pet=="string"?n.pet.trim():"",o={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:r===""?void 0:r,cap:String(n.cap??t["access.free_messages"]),left:n.left===void 0?void 0:String(n.left),visits:n.visits===void 0?void 0:String(n.visits),price:n.price,state:n.state,them:n.them??"them",when:n.when};return e.replace(Xi,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?ea(e,r)?Zi.charAt(0).toUpperCase()+Zi.slice(1):Zi:t})}function sdkText(e,t,n){return fillSdkText(e.settings[t],e.settings,n)}function sdkFixed(e,t,n){return fillSdkText(e.fixedStrings[t],e.settings,n)}function isInsidePartner(e){return e["text.partner_name"]!=="Everfur"}function objectPronoun(e){let t=(e??"").toLowerCase();return t==="female"||t==="f"?"her":t==="male"||t==="m"?"him":"them"}function askAccess(e,t,n){let r=e.settings;if(t==="member")return{kind:"open"};if(r["access.mode"]==="members_only")return{kind:"members_only"};if(r["access.mode"]==="free_cap"){let t=r["access.free_messages"];if(t<1)return{kind:"open"};let o=Math.max(0,t-Math.max(0,Math.floor(n)));return o===0?{kind:"cap_reached",cap:t}:{kind:"counter",left:o,cap:t,line:sdkText(e,"text.cap.counter",{cap:t,left:o})}}return{kind:"open"}}function isLocked(e,t,n){return t==="member"||e.settings["access.mode"]==="open"&&t==="unknown"?false:e.settings["access.locked"].includes(n)}function capMonth(e){let t=e.getUTCMonth()+1;return`${e.getUTCFullYear()}-${t<10?"0":""}${t}`}var ta={video_visits:"locked.video_visits",texting:"locked.texting",link_records:"locked.link_records",previous_results:"locked.previous_results",dashboard:"locked.dashboard",goals:"locked.goals"};function formatPrice(e,t){let n=t.replace(/^(US)?\$/,"");return`${e["units.currency"]}${n}`}function priceLines(e){let t=e.settings;switch(t["plan.price_display"]){case"full":return[`${formatPrice(t,t["plan.price_year"])} ${sdkFixed(e,"plan.price.year")}`];case"monthly_equivalent":return[`${formatPrice(t,t["plan.price_month"])}${sdkFixed(e,"plan.price.month")}`,sdkFixed(e,"plan.price.billed")];default:return[]}}function planSheet(e,t){let n=e.settings,r=t===void 0?{}:{pet:t};/* @__PURE__ */
|
|
143
|
+
return Object.freeze({kind:"plan",title:n["access.mode"]==="free_cap"?sdkText(e,"text.cap.reached",{cap:n["access.free_messages"]}):null,badge:null,price:priceLines(e),locked:n["access.locked"].map(t=>sdkFixed(e,ta[t],r)),button:sdkText(e,"text.cap.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:n["plan.sold_by"]})}function membersSheet(e){let t=e.settings;/* @__PURE__ */
|
|
144
|
+
return Object.freeze({kind:"members",title:sdkText(e,"text.members.title"),badge:sdkText(e,"text.members.badge"),price:priceLines(e),locked:[],button:sdkText(e,"text.members.button"),dismiss:sdkText(e,"text.ui.not_now"),soldBy:t["plan.sold_by"]})}function vetTabLabel(e,t){return t==="wellness"?sdkFixed(e,"vet.wellness_tab"):sdkText(e,"text.tabs.vet")}var na="Licensed Everfur vet";function prescriptionsAllowed(e,t){return e["features.prescriptions"]&&t==="visits"}function vetHome(e,t){let n=e.settings,r=n["vet.name"],o=n["vet.photo"].trim()===""?null:n["vet.photo"],i=r!==na,a=t.pet===void 0?{}:{pet:t.pet},l=n["vet.visits_per_year"],s=l!==null&&t.visitsUsed!==null&&t.visitsUsed!==void 0?sdkFixed(e,"vet.allowance",{left:Math.max(0,l-t.visitsUsed),visits:l}):null,d=n["vet.extra_visit_price"],c=t.stateName?.trim()??"",u={...a,state:c,them:objectPronoun(t.petSex)},p=c!==""&&t.level==="visits"?sdkFixed(e,"vet.gate.visits",u):c!==""&&t.level==="wellness"?sdkFixed(e,"vet.gate.wellness",u):null,f=[sdkFixed(e,"vet.legal")];return n["features.prescriptions"]&&f.push(sdkFixed(e,"vet.legal.rx")),f.push(sdkFixed(e,"vet.legal.emergency")),/* @__PURE__ */Object.freeze({level:t.level,name:r,title:n["vet.title"].trim()===""?null:n["vet.title"],photo:o,initial:o===null&&i?r.trim().charAt(0).toUpperCase():null,book:sdkText(e,"text.vet.book"),seeTimes:sdkText(e,"text.vet.see_times"),allowance:s,extra:d===null?null:sdkFixed(e,"vet.extra",{price:formatPrice(n,d)}),gate:p,rx:prescriptionsAllowed(n,t.level)?sdkFixed(e,"vet.rx",a):null,legal:/* @__PURE__ */Object.freeze(f),privacy:isInsidePartner(n)?sdkFixed(e,"vet.privacy"):null})}function chipInk(e,t){return contrastRatio(t,e)>=contrastRatio("#FFFFFF",e)?t:"#FFFFFF"}function bubbleInk(e,t){return contrastRatio(e,"#FFFFFF")>=contrastRatio(e,t)?"#FFFFFF":t}function buttonFill(e){let t=e["look.color.primary"];return contrastRatio(t,e["look.color.surface"])<1.3?{fill:e["look.color.heading"],ink:"#FFFFFF"}:{fill:t,ink:e["look.color.on_primary"]}}function memoryChip(e,t){return e.settings["layout.memory_chip"]?sdkText(e,"text.ask.memory_chip",t===void 0?{}:{pet:t}):null}function partnerDataSources(e){let t={park_checkins:"pdata.park_checkins",camera_events:"pdata.camera_events",dna_results:"pdata.dna_results"};/* @__PURE__ */
|
|
145
|
+
return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var ra="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function oa(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var ia=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?oa(__EVERFUR_BRAND_CDN_ORIGIN__):ra;var aa=/^#[0-9A-Fa-f]{6}$/,la=/\{([a-z]+)\}/g;function sa(e){return[...e.matchAll(la)].map(e=>e[1])}var da=/* @__PURE__ */new Set(["pet","partner","plan","assistant","cap"]),ca=/* @__PURE__ */new Set(["text.partner_name","text.ask.name","plan.name"]);function ua(e,t){return ca.has(e)?!/[{}]/.test(t):sa(t).every(t=>da.has(t)||t==="left"&&e==="text.cap.counter")}function pa(e,t){let n=new Set(sa(e));return sa(t).every(e=>n.has(e)||da.has(e))}var fa=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function ha(e){return typeof e=="string"&&aa.test(e)}function ga(e){return typeof e=="number"&&Number.isFinite(e)}function ba(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var ma=/* @__PURE__ */new RegExp(`^${ia}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function ya(e){if(!Array.isArray(e))return;let t=[];for(let n of e){if(n===null||typeof n!="object")continue;let{family:e,weight:r,url:o}=n;if(typeof e!="string"||e.trim()===""||typeof o!="string"||!ma.test(o))continue;let i=typeof r=="number"?String(r):typeof r=="string"?r:"400";t.push(/* @__PURE__ */Object.freeze({family:e,weight:i,url:o}))}/* @__PURE__ */
|
|
146
|
+
return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return ha(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":ha(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(ha).map(e=>e.toUpperCase());return n.length!==t.length||n.length>4||e.key==="look.color.chips"&&n.length<1||e.key==="look.chat_wash"&&n.length===1?void 0:/* @__PURE__ */Object.freeze(n)}case"fontFiles":return ya(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return ga(t)&&ba(e,t)?t:void 0;case"numberOrNull":return t===null?null:ga(t)&&ba(e,t)?t:void 0;case"money":return typeof t=="string"&&fa.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&fa.test(t)?t:void 0;case"choice":return e.oneOf!==void 0&&e.oneOf.includes(t)?t:void 0;case"itemList":{if(!Array.isArray(t))return;let n=e.items??[],r=t.filter(e=>typeof e=="string"&&n.includes(e));return r.length!==t.length||new Set(r).size!==r.length&&e.key!=="layout.sections"?void 0:/* @__PURE__ */Object.freeze([...r])}case"string":return typeof t!="string"||t.trim()===""&&e.emptyOk!==true?void 0:ua(e.key,t)?t:void 0;case"text":return typeof t=="string"?t:void 0;default:return}}function resolveSettings(e){let t=e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},n={...Gi},r=[];for(let e of Yi){if(!Object.prototype.hasOwnProperty.call(t,e.key))continue;let o=parseSettingValue(e,t[e.key]);o===void 0?r.push(e.key):n[e.key]=o}return{settings:/* @__PURE__ */Object.freeze(n),rejected:/* @__PURE__ */Object.freeze(r)}}function resolveFixedStrings(e){let t={...Ji};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))!Object.prototype.hasOwnProperty.call(Ji,n)||typeof r!="string"||r===""||pa(Ji[n],r)&&(t[n]=r);/* @__PURE__ */
|
|
147
|
+
return Object.freeze(t)}function va(e){return Array.isArray(e)?/* @__PURE__ */Object.freeze(e.filter(e=>typeof e=="string").map(e=>e.toUpperCase())):/* @__PURE__ */Object.freeze([])}function parseStateGate(e){let t=e!==null&&typeof e=="object"?e:{};/* @__PURE__ */
|
|
148
|
+
return Object.freeze({videoAndRx:va(t.video_and_rx),adviceOnly:va(t.advice_only)})}function parseSdkConfig(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,n=t.revision,r=t.settings;if(!ga(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=ga(t.schema_version)?t.schema_version:3;/* @__PURE__ */
|
|
149
|
+
return Object.freeze({schemaVersion:o,partner:typeof t.partner=="string"?t.partner:"",revision:n,settings:resolveSettings(r).settings,fixedStrings:resolveFixedStrings(t.fixed_strings),stateGate:parseStateGate(t.state_gate)})}function serializeSdkConfig(e){return JSON.stringify({schema_version:e.schemaVersion,partner:e.partner,revision:e.revision,settings:e.settings,fixed_strings:e.fixedStrings,state_gate:{video_and_rx:e.stateGate.videoAndRx,advice_only:e.stateGate.adviceOnly}})}var ka=/* @__PURE__ */Object.freeze(["composerInput","sendButton","userBubble","assistantBubble","vetBubble","recordCard","vetVisitButton","primaryButton","link","header","banner","chip","card","input","tab","bookingStep","dialog","cartBar","planCard","planReasonLabel","planWash","planChip"]);var wa=/* @__PURE__ */Object.freeze(["display_name","logo_url","logo_url_dark","primary_color","accent_color","primary_color_dark","accent_color_dark","brightness","color_scheme","font_family","font_url","fonts","font_urls","chat_placeholder","surface_style","radius_scale","accessibility_max_font_scale","slots","background_color","background_color_dark","text_color","text_color_dark","danger_color","danger_color_dark","font_size_base","border_radius","spacing_unit","success_color","success_color_dark","warning_color","warning_color_dark","info_color","info_color_dark","heading_font_family","font_weight_body","font_weight_heading","line_height","assistant_avatar_url","font_sources"]);function hardenHttpsUrl(e){if(e===null)return null;let t=e.trim();return t.length===0?null:/^https:\/\/\S+$/i.test(t)?t:null}var xa=/* @__PURE__ */new RegExp(`^${ia}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&xa.test(t)?t:null}var _a="everfur-ask";function Sa(e){let t=e.weight.trim().split(/\s+/).map(Number).filter(e=>Number.isFinite(e)),n=t[0]??400,r=t[1]??n,o=[];for(let e=Math.ceil(n/100)*100;e<=r;e+=100)e>=100&&e<=900&&o.push(String(e));return o.length===0?["400"]:o}function fontSourcesOf(e){let t=[];for(let n of e["look.font.files"])for(let e of Sa(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
|
|
145
150
|
return Object.freeze(t)}function slotsOf(e){let t=buttonFill(e),n=e["look.color.heading"],r=e["look.color.bubble"],o=e["look.color.chips"][0]??e["look.color.tint"],i=e["look.radius.card"];/* @__PURE__ */
|
|
146
|
-
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var
|
|
147
|
-
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===Ki?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Gi})}var Ji="/widget/v1/sdk-config",Qi="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[Qi]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:Ji,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function Zi(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function Xi(e){let t=3421674724,n=2216829733;for(let r of Zi(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var ea="everfur.sdkconfig.v3.";function ta(e){return`${ea}${Xi(e)}`}function na(e,t,n){return`everfur.sdkconfig.freecap.v1.${Xi(`${e}|${t}|${n}`)}`}var ra=300*1e3,oa=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function ia(e,t){try{let n=await e.getItem(ta(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function aa(e,t,n){try{n===null?await e.removeItem(ta(t)):await e.setItem(ta(t),serializeSdkConfig(n))}catch{}}function la(e){let t=oa,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{aa(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(aa(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await ia(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=ra;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=na(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(na(e.scope,t,n))??null},addFreeUsed(t,n){let r=na(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=na(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function sa(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function da(e){return e==null||e.disposed?null:e.store!==null?e.store:sa(e,la({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var ca=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),ua=()=>()=>{},pa=()=>ca;function fa(){return da(r.useContext(De)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return ha(fa())}function ha(e){return r.useSyncExternalStore(e?.subscribe??ua,e?.getSnapshot??pa,e?.getSnapshot??pa)}function useLoadEverfurSdkConfig(){let e=fa();return r.useEffect(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function ga(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=r.createContext(null))}var ba=/* @__PURE__ */ga();var ma="Go to the nearest emergency vet now.";var ya=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:ma,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var ka=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function va(){let e=globalThis,t=e[ka];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[ka]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return r.useEffect(()=>{if(n)return;let e=va();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */i.jsx(Text,{tier:"compact",style:t,accessibilityRole:"text",children:ya.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return xa(`optional peer '${e}' is not installed: ${Sa(t)}`)}let o=wa(r);return o==null?xa(`optional peer '${e}' resolved to no module`):n&&!n(o)?xa(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function wa(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function xa(e){/* @__PURE__ */
|
|
148
|
-
return Object.freeze({available:false,module:null,reason:e})}function
|
|
149
|
-
return
|
|
150
|
-
return
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
return
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
return
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
return
|
|
161
|
-
return
|
|
162
|
-
return
|
|
163
|
-
return
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
return
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
return
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
return
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */i.jsx(
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
return
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
return
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
return
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
|
|
196
|
-
return
|
|
197
|
-
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
/* @__PURE__ */
|
|
151
|
+
return Object.freeze({primaryButton:{backgroundColor:t.fill,textColor:t.ink},sendButton:{backgroundColor:t.fill,textColor:t.ink},vetVisitButton:{backgroundColor:t.fill,textColor:t.ink},userBubble:r==="none"?{backgroundColor:e["look.color.surface"],textColor:e["look.color.ink"]}:{backgroundColor:r,textColor:bubbleInk(r,e["look.color.ink"])},composerInput:{borderColor:n,backgroundColor:"#FFFFFF",textColor:e["look.color.ink"]},chip:{backgroundColor:o,textColor:chipInk(o,n)},card:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i,textColor:e["look.color.ink"]},recordCard:{backgroundColor:"#FFFFFF",borderColor:e["look.color.line"],borderRadius:i},dialog:{borderRadius:e["look.radius.sheet"]},header:{backgroundColor:e["look.color.surface"],textColor:n},tab:{textColor:n,borderColor:e["look.color.primary"]},link:{textColor:e["look.color.accent"]}})}var Ca=/* @__PURE__ */Object.freeze([...wa,...ka.map(e=>`slots.${e}`),"hide_powered_by",Qt]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
|
|
152
|
+
return Object.freeze({schemaVersion:2,displayName:t["text.partner_name"],logoUrl:t["look.logo.mark"],primaryColor:t["look.color.primary"],accentColor:t["look.color.accent"],brightness:"light",fontFamily:t["look.font.body"],fontUrl:null,headingFontFamily:t["look.font.heading"],fontWeightHeading:String(r),fontSources:fontSourcesOf(t),placeholder:fillSdkText(t["text.ask.placeholder"],t,{pet:"{pet}"}),placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===_a?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Ca})}var Ra="/widget/v1/sdk-config",ja="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[ja]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:Ra,headers:t}}async function fetchSdkConfig(e,t){let n=await e.send("sdkConfig.fetch",sdkConfigRequest(t));if(!n.ok)return n.error.httpStatus===304?{kind:"notModified"}:n.error.httpStatus===404?{kind:"notEnabled"}:{kind:"failed",error:n.error};let r=parseSdkConfig(n.value);return r===null?{kind:"failed",error:makeEverfurError("internalError",{retryable:true,wireMessage:"malformed sdk-config response"})}:{kind:"updated",config:r}}function Aa(e){let t=[];for(let n of e){let e=n.codePointAt(0);e<128?t.push(e):e<2048?t.push(192|e>>6,128|e&63):e<65536?t.push(224|e>>12,128|e>>6&63,128|e&63):t.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|e&63)}return t}function Fa(e){let t=3421674724,n=2216829733;for(let r of Aa(e)){n=(n^r)>>>0;let e=n*435,o=Math.floor(e/4294967296),i=e>>>0;t=t*435+o+n*256>>>0,n=i}return t.toString(16).padStart(8,"0")+n.toString(16).padStart(8,"0")}var Ta="everfur.sdkconfig.v3.";function Ia(e){return`${Ta}${Fa(e)}`}function Ea(e,t,n){return`everfur.sdkconfig.freecap.v1.${Fa(`${e}|${t}|${n}`)}`}var Pa=300*1e3,Da=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function Oa(e,t){try{let n=await e.getItem(Ia(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function za(e,t,n){try{n===null?await e.removeItem(Ia(t)):await e.setItem(Ia(t),serializeSdkConfig(n))}catch{}}function Ba(e){let t=Da,n=false,r=null,o=false,i=null,a=false,l=e.now??Date.now,s=/* @__PURE__ */new Set,d=/* @__PURE__ */new Map,c=/* @__PURE__ */new Map,u=Promise.resolve(),p=e=>{if(!n){t=/* @__PURE__ */Object.freeze({...t,...e});for(let e of[...s])try{e()}catch{}}},f=t=>{if(d.has(t))return Promise.resolve();let n=c.get(t);return n===void 0&&(n=(async()=>{let n=0;try{let r=await e.kv.getItem(t),o=r===null?0:Number.parseInt(r,10);n=Number.isFinite(o)&&o>0?o:0}catch{n=0}d.has(t)||d.set(t,n)})(),c.set(t,n)),n},h=()=>t.pending??t.active,g=async()=>{let r;try{r=await e.fetch(h()?.revision??null)}catch(e){r={kind:"failed",error:e}}if(!n)switch(i=l(),r.kind){case"updated":{za(e.kv,e.scope,r.config),a=false,t.status==="legacy"?p({pending:r.config}):t.active===null?p({status:"ready",active:r.config,pending:null}):r.config.revision===t.active.revision?p({status:"ready",pending:null}):p({status:"ready",pending:r.config});return}case"notModified":t.pending===null&&(a=false),p({status:t.active===null?"failed":"ready"});return;case"notEnabled":if(za(e.kv,e.scope,null),t.active===null){p({status:"legacy",pending:null});return}a=true,p({status:"ready",pending:null});return;default:p({status:t.active===null?"failed":"ready"})}},b=()=>(r!==null||(r=(async()=>{if(t.active===null&&t.status!=="legacy"&&p({status:"loading"}),!o){o=true;let n=await Oa(e.kv,e.scope);n!==null&&t.active===null&&p({status:"ready",active:n})}await g()})().finally(()=>{r=null})),r);return{subscribe(e){return s.add(e),()=>{s.delete(e)}},getSnapshot:()=>t,load(){if(r!==null)return r;let e=i===null||l()-i>=Pa;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=Ea(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(Ea(e.scope,t,n))??null},addFreeUsed(t,n){let r=Ea(e.scope,t,n);return f(r).then(()=>{let t=(d.get(r)??0)+1;return d.set(r,t),u=u.then(async()=>{try{await e.kv.setItem(r,String(d.get(r)??t))}catch{}}),t})},setFreeUsed(t,n,r){let o=Ea(e.scope,t,n),i=Number.isInteger(r)&&r>0?r:0;return f(o).then(()=>(d.set(o,i),u=u.then(async()=>{try{await e.kv.setItem(o,String(d.get(o)??i))}catch{}}),i))},adoptLatest(){if(a){a=false,p({status:"legacy",active:null,pending:null});return}t.pending!==null&&p({status:"ready",active:t.pending,pending:null})},dispose(){n=true,s.clear()}}}function Va(e,t){e.store=t;let n=null,r=()=>{let r=t.getSnapshot().active;r!==n&&(n=r,e.branding.set(r===null?null:sdkConfigBranding(r)))};return t.subscribe(r),r(),t}function Na(e){return e==null||e.disposed?null:e.store!==null?e.store:Va(e,Ba({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var $a=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),La=()=>()=>{},Ma=()=>$a;function Ua(){return Na(o.useContext(Pe)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Wa(Ua())}function Wa(e){return o.useSyncExternalStore(e?.subscribe??La,e?.getSnapshot??Ma,e?.getSnapshot??Ma)}function useLoadEverfurSdkConfig(){let e=Ua();return o.useEffect(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function qa(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=o.createContext(null))}var Ha=/* @__PURE__ */qa();var Ka="Go to the nearest emergency vet now.";var Ya=/* @__PURE__ */Object.freeze({placeholder:"Ask anything about {petName}…",placeholderFollowUpWeb:"Ask a follow-up…",placeholderUrgentWeb:"Tell us what’s happening…",composerLabel:"Message",attachPhotoOrFileNative:"Add a photo or file",suggestions:"Suggestions",reading:"Reading {petName}’s records…",answered:"Everfur answered.",assistantName:"Everfur",followUpsHeadingNative:"Follow-up questions",turnFailedTitleWeb:"Everfur couldn’t answer that just now.",send:"Send",stop:"Stop",retry:"Try again",poweredBy:"powered by everfur",senderUser:"You",senderAssistant:"Assistant",senderVet:"Your vet",loading:"Loading",empty:"No messages yet",transcript:"Chat with Everfur",emptyTitle:"What can we help {petName} with today?",emptyTitlePetFallback:"your pet",copied:"Copied",copyUserMessage:"Copy your message",copyAssistantMessage:"Copy assistant message",feedbackHelpful:"Helpful",feedbackNeutral:"Neutral",feedbackNotHelpful:"Not helpful",feedbackTitle:"What went wrong?",feedbackSubtitle:"Your feedback helps make answers more reliable.",feedbackReasonInaccurate:"Inaccurate",feedbackReasonOutdated:"Out of date",feedbackReasonUnsafe:"Unsafe advice",feedbackReasonUnclear:"Confusing or unclear",feedbackReasonOther:"Something else",feedbackNotesPlaceholder:"Add details (optional)",feedbackSubmit:"Submit feedback",feedbackSkip:"Skip",feedbackSkipA11y:"Skip feedback",feedbackThanks:"Thanks for the feedback",feedbackFailed:"Couldn't send feedback. Please try again.",turnFailedTitle:"Message failed",turnRetry:"Retry",turnUnreachableTitle:"Couldn't reach this chat",turnStartNewChat:"Start a new chat",reconnecting:"Reconnecting…",turnStoppedTitle:"Response stopped",turnStoppedBody:"You stopped this response before it finished. Tap retry to try again.",sourceSingular:"source",sourcePlural:"sources",showSources:"Show",hideSources:"Hide",sourcesHeading:"Sources",openSource:"Open source",urgencyGeneralReason:"Just general info about {petName}. Nothing here needs action right now.",findVet:"Find a vet",findVetA11y:"Find a vet near you",nearestEmergencyVet:"Nearest emergency vet",goToNearestEmergencyVet:Ka,poisonControlWeb:"ASPCA Poison Control",poisonControlNative:"ASPCA Animal Poison Control, (888) 426-4435",showLatestVetAlert:"Show latest vet alert",dismissBanner:"Dismiss {label} banner",openHistoryNative:"Chats and vet messages",openHistoryWeb:"Chats",showChatsWeb:"Show chats",hideChatsWeb:"Hide chats",newReplySuffix:", a new reply",yourPets:"Your pets",yourPet:"Your pet",switchActivePet:"{name}. Switch pet",petCurrentlyActive:"{name}, currently active",switchToPet:"Switch to {name}",activePrefix:"Active · ",close:"Close",addAnotherPet:"Add a pet",addPet:"Add a pet",capReached:"You've used your {cap} free messages this month.",attachmentPhoto:"Photo",attachmentCamera:"Camera",closeAttachmentPicker:"Close attachment picker",addAttachment:"Add attachment, {used} of {total} used",attachmentsFull:"Attachments full, {used} of {total} used",retryUpload:"Retry uploading {filename}",removeAttachment:"Remove {filename}",previewAttachment:"Preview {filename}",closePreview:"Close preview",attachedImage:"Attached image: {filename}, opens a full-screen preview",attachmentTooLarge:"Files must be under {max}. {filename} is {size}.",attachmentTooMany:"You can attach up to {max} files per message.",attachmentUnsupported:"{filename} isn't a supported file type yet.",attachmentNetwork:"Couldn't reach the server. Check your connection and try again.",attachmentServer:"Upload failed{status}. Please try again.",attachmentCancelled:"Upload cancelled.",attachmentRateLimited:"Slow down. Please wait a moment and try again.",attachmentQuota:"Daily image limit reached. Try again tomorrow.",attachmentConflict:"Something went wrong. Tap to retry.",attachmentUnknown:"Something went wrong. Please try again.",attachmentsFailedBlocked:"Some attachments failed to upload. Remove or retry them before sending.",dictate:"Dictate a message",stopDictation:"Stop dictation",listening:"Listening",micBlocked:"Microphone access is blocked. Allow it in your browser settings to dictate.",noSpeech:"We didn't catch that. Tap the mic and try again.",dictationUnavailable:"Voice typing isn't available right now."});var Ga=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function Ja(){let e=globalThis,t=e[Ga];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Ga]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return o.useEffect(()=>{if(n)return;let e=Ja();return e.count+=1,e.listeners.forEach(e=>e()),()=>{e.count-=1,e.listeners.forEach(e=>e())}},[n]),n?null:e??/* @__PURE__ */a.jsx(Text,{tier:"compact",style:t,accessibilityRole:"text",children:Ya.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Za(`optional peer '${e}' is not installed: ${Xa(t)}`)}let o=Qa(r);return o==null?Za(`optional peer '${e}' resolved to no module`):n&&!n(o)?Za(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Qa(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Za(e){/* @__PURE__ */
|
|
153
|
+
return Object.freeze({available:false,module:null,reason:e})}function Xa(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var el=/* @__PURE__ */new RegExp(`^${ia}\\/brand\\/[0-9a-f]{16}\\.svg$`);function tl(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var nl=null;function registerEverfurSvg(e){if(e===null)return nl=null,false;let t=optionalModule("react-native-svg",e,tl);return nl=t.available?t.module:null,t.available}function rl(e){let t=hardenHttpsUrl(e);return t!==null&&el.test(t)?t:null}function ol(e){let t=i.StyleSheet.flatten(e),n=t?.width,r=t?.height;return typeof n=="number"&&typeof r=="number"?{width:n,height:r}:null}function SdkBrandArt({url:e,style:t,fallback:n=null,testID:r}){let[l,s]=o.useState(false),d=rl(e);if(d!==null){let e=ol(t),o=nl?.SvgUri;return o===void 0||e===null||l?n:/* @__PURE__ */a.jsx(i.View,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:r??"everfur-sdk-svg",children:/* @__PURE__ */a.jsx(o,{uri:d,width:e.width,height:e.height,onError:()=>s(true)})})}let c=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
|
|
154
|
+
return a.jsx(BrandImage,{uri:c,decorative:true,style:t,fallback:n,...r===void 0?{}:{testID:r}})}var il="#10462E",al="#FFFFFF",ll="#8A8A8A";function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
|
|
155
|
+
return a.jsx(i.View,{style:{flex:1,backgroundColor:al,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */a.jsxs(a.Fragment,{children:[
|
|
156
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:Ji["load.error"]}),
|
|
157
|
+
/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",onPress:t,style:{marginTop:14,minHeight:44,paddingHorizontal:20,borderRadius:22,borderWidth:1,borderColor:"#D9D9D9",alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-retry",children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:Ji["load.retry"]})})]}):/* @__PURE__ */a.jsx(i.ActivityIndicator,{color:ll})})}function sl(e){return e.trim()===""?null:hardenBrandAssetUrl(e)}function SdkLockup({settings:e}){let t=e["look.lockup"]==="stacked",n=t?e["look.logo.wordmark"]:e["look.logo.mark"],r=e["text.partner_name"],o=/* @__PURE__ */a.jsxs(i.View,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
|
|
158
|
+
/* @__PURE__ */a.jsx(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:Ii.poweredBy}),
|
|
159
|
+
/* @__PURE__ */a.jsx(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:il}})]});/* @__PURE__ */
|
|
160
|
+
return a.jsx(EverfurPoweredBy2,{children:/* @__PURE__ */a.jsxs(i.View,{accessible:true,accessibilityLabel:`${r}, ${Ii.poweredByLabel}`,style:t?{flexDirection:"column",alignItems:"center",gap:3}:{flexDirection:"row",alignItems:"center",gap:8,flexShrink:1},testID:t?"everfur-sdk-lockup-stacked":"everfur-sdk-lockup-side",children:[
|
|
161
|
+
/* @__PURE__ */a.jsx(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */a.jsx(i.View,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),o]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:o=null,bottomInset:l=0}){let{tablet:s}=Zn(),d=t["look.color.heading"],c=t["look.font.body"];/* @__PURE__ */
|
|
162
|
+
return a.jsx(i.View,{style:{position:"absolute",left:0,right:0,top:0,bottom:0,justifyContent:"flex-end",backgroundColor:"rgba(0,0,0,0.32)"},testID:`everfur-sdk-sheet-${e.kind}`,children:/* @__PURE__ */a.jsxs(i.View,{accessibilityViewIsModal:true,style:[{backgroundColor:al,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:(s?40:30)+l,gap:12},s?{width:Wn,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */a.jsx(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:c,fontSize:12,color:d,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */a.jsx(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:d},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */a.jsx(Text,{style:{fontFamily:c,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */a.jsx(Text,{style:{fontFamily:c,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),o!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:c,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:o}):null,
|
|
163
|
+
/* @__PURE__ */a.jsx(SdkButton,{settings:t,label:e.button,onPress:n,testID:"everfur-sdk-sheet-primary"}),
|
|
164
|
+
/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",onPress:r,style:{minHeight:44,alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-sheet-dismiss",children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:c,fontSize:15,color:t["look.color.muted"]},children:e.dismiss})})]})})}function SdkButton({settings:e,label:t,onPress:n,testID:r}){let{fill:o,ink:l}=buttonFill(e);/* @__PURE__ */
|
|
165
|
+
return a.jsx(i.Pressable,{accessibilityRole:"button",onPress:n,style:{minHeight:48,borderRadius:24,backgroundColor:o,alignItems:"center",justifyContent:"center",paddingHorizontal:20},...r===void 0?{}:{testID:r},children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:e["look.font.body"],fontSize:16,fontWeight:"600",color:l},children:t})})}function SdkMemoryChip({settings:e,label:t}){/* @__PURE__ */
|
|
166
|
+
return a.jsx(i.View,{style:{alignSelf:"flex-start",minHeight:30,paddingHorizontal:12,borderRadius:15,borderWidth:1,borderColor:e["look.color.line"],backgroundColor:"rgba(255,255,255,0.75)",justifyContent:"center"},testID:"everfur-sdk-memory-chip",children:/* @__PURE__ */a.jsx(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,pet:t,onPress:n}){let r=e.settings;/* @__PURE__ */
|
|
167
|
+
return a.jsx(i.Pressable,{accessibilityRole:"button",onPress:n,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:r["look.color.heading"],backgroundColor:al,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */a.jsx(Text,{numberOfLines:1,ellipsizeMode:"tail",style:{fontFamily:r["look.font.body"],fontSize:15,color:r["look.color.muted"]},children:sdkText(e,"text.ask.dock_placeholder",{pet:t??null})})})}function VetPersonMark({tint:e,ink:t}){/* @__PURE__ */
|
|
168
|
+
return a.jsxs(i.View,{style:{width:52,height:52,borderRadius:26,overflow:"hidden",backgroundColor:e,alignItems:"center",justifyContent:"flex-end"},accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:"everfur-sdk-vet-person",children:[
|
|
169
|
+
/* @__PURE__ */a.jsx(i.View,{style:{width:20,height:20,borderRadius:10,marginBottom:3,backgroundColor:t,opacity:.55}}),
|
|
170
|
+
/* @__PURE__ */a.jsx(i.View,{style:{width:34,height:15,borderTopLeftRadius:17,borderTopRightRadius:17,backgroundColor:t,opacity:.55}})]})}function SdkVetHomeView({config:e,home:t,onBook:n,style:r}){let o=e.settings,l=o["look.font.body"],s=o["look.color.ink"],d=o["look.color.muted"],c=t.photo===null?null:sl(t.photo);/* @__PURE__ */
|
|
171
|
+
return a.jsxs(i.ScrollView,{style:r,contentContainerStyle:{gap:14,paddingHorizontal:16,paddingTop:16,paddingBottom:22},testID:`everfur-sdk-vet-${t.level}`,children:[
|
|
172
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{backgroundColor:al,borderWidth:1,borderColor:o["look.color.line"],borderRadius:o["look.radius.card"],padding:16,gap:12},children:[
|
|
173
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",gap:12},children:[
|
|
174
|
+
/* @__PURE__ */a.jsx(BrandImage,{uri:c,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:t.initial!==null?/* @__PURE__ */a.jsx(i.View,{style:{width:52,height:52,borderRadius:26,backgroundColor:o["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */a.jsx(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontSize:20,color:o["look.color.heading"]},children:t.initial})}):/* @__PURE__ */a.jsx(VetPersonMark,{tint:o["look.color.tint"],ink:o["look.color.heading"]})}),
|
|
175
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flex:1,gap:2},children:[
|
|
176
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",style:{fontFamily:o["look.font.heading"],fontWeight:String(o["look.font.heading_weight"]),fontSize:17,color:o["look.color.heading"]},children:t.name}),t.title!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:13,color:d},children:t.title}):null]})]}),t.allowance!==null||t.extra!==null?/* @__PURE__ */a.jsxs(i.View,{style:{backgroundColor:o["look.color.tint"],borderRadius:Math.max(8,o["look.radius.card"]-4),padding:12,gap:2},testID:"everfur-sdk-vet-allowance",children:[t.allowance!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:14,fontWeight:"600",color:s},children:t.allowance}):null,t.extra!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:13,color:d},children:t.extra}):null]}):null,
|
|
177
|
+
/* @__PURE__ */a.jsx(SdkButton,{settings:o,label:t.seeTimes,onPress:n,testID:"everfur-sdk-vet-book"})]}),t.gate!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:14,color:s},testID:"everfur-sdk-vet-gate",children:t.gate}):null,t.rx!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:14,color:s},testID:"everfur-sdk-vet-rx",children:t.rx}):null,
|
|
178
|
+
/* @__PURE__ */a.jsx(i.View,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},children:e},e))}),t.privacy!==null?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function dl(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:r,onTipSeen:l,style:s}){let d=e.settings,c=d["layout.presentation"]==="full_screen",u=d["look.ask_icon"]===_a?"":d["look.ask_icon"],[p,f]=o.useState(c&&!r);o.useEffect(()=>{(!c||r)&&f(false)},[c,r]);let h=()=>{f(false),l()};/* @__PURE__ */
|
|
179
|
+
return a.jsxs(i.View,{style:[{alignItems:"flex-end",gap:8},s],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[p?/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",onPress:h,style:{maxWidth:240,backgroundColor:al,borderRadius:14,borderWidth:1,borderColor:d["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */a.jsx(Text,{style:{fontFamily:d["look.font.body"],fontSize:14,color:d["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
|
|
180
|
+
/* @__PURE__ */a.jsxs(i.Pressable,{accessibilityRole:"button",accessibilityLabel:dl(e),onPress:()=>{p&&h(),t()},style:{width:60,height:60,borderRadius:30,backgroundColor:d["look.color.launcher"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-launcher-button",children:[
|
|
181
|
+
/* @__PURE__ */a.jsx(SdkBrandArt,{url:u,style:{width:c?24:30,height:c?24:30},fallback:/* @__PURE__ */a.jsx(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:d["look.color.on_launcher"]}})}),c?/* @__PURE__ */a.jsx(Text,{tier:"badge",style:{fontFamily:d["look.font.body"],fontSize:10,color:d["look.color.on_launcher"]},children:dl(e)}):null,c&&n?/* @__PURE__ */a.jsx(i.View,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:al},testID:"everfur-sdk-launcher-dot"}):null]})]})}var cl=true;function ul(e,t,n,r){if(n===null)return e;let o=r&&e.vetOnAsk!=="none",i=mt(cl,n).filter(e=>e==="vet"?o:e==="ask"?t["features.chat"]:e==="records"?t["features.records"]:false);e.nav==="chat_first"&&!i.includes("ask")&&i.unshift("ask"),i.length===0&&i.push(t["features.records"]&&!t["features.chat"]?"records":"ask");let a=i.includes("vet"),l=o?a?"own_tab":e.vetOnAsk==="own_tab"?"in_answers":e.vetOnAsk:"none",s=e.vetBadge==="header_pill"&&e.presentation==="full_screen"&&l==="own_tab"?"tab_dot":e.vetBadge;/* @__PURE__ */
|
|
182
|
+
return Object.freeze({...e,sections:/* @__PURE__ */Object.freeze(i),vetOnAsk:l,vetBadge:s})}function pl(e,t,n){let r=t.vetOnAsk!=="none";return n?t.sections.includes(e)?e:e==="vet"&&r?"vet":hl(yt(e,cl,t.sections)):e==="vet"&&!r?"ask":e}function fl(e,t,n){if(!n)return e??t.sections[0]??"ask";let r=wt(e===void 0?{via:"plain"}:{via:"link",tab:e},cl,t.sections);return e==="vet"&&r!=="vet"?pl("vet",t,true):hl(r)}function hl(e){return e==="plan"?"ask":e}function gl(e){return e===void 0?{section:void 0,key:null}:typeof e=="string"?{section:e,key:null}:{section:e.section,key:e.key}}function bl(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=Ua(),n=useEverfurSdkConfig();o.useEffect(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=i.AppState.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let r=o.useCallback(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */a.jsx(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */a.jsx(LegacyPath,{...e}):/* @__PURE__ */a.jsx(SdkNeutralScreen,{failed:n.status==="failed",onRetry:r})}var ml=/* @__PURE__ */Object.freeze({branding:null}),yl=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>ml});function vl(e,t){let n=o.useContext(Pe)?.runtime?.entitlements??yl,r=o.useCallback(()=>n.getSnapshot()?.branding??null,[n]),i=o.useSyncExternalStore(n.subscribe,r,r),a=e===void 0?"":e.join(",");return o.useMemo(()=>{let n=resolvePresentation({server:i?.presentation??null,locked:i?.lockedFields??null,client:{...e===void 0?{}:{shellTabs:e},...t===void 0?{}:{shellHeader:t}}});return{shellTabs:n.shellTabs??null,shellHeader:Bi(n.shellHeader)?"tabs_bar":"classic"}},[i,a,t])}function kl(e,t){let n=()=>{if(t===null)return;let n=e.pets.findIndex(e=>e.petRef===t.petRef),r=e.pets[(n+1)%e.pets.length];r!==void 0&&r.petRef!==t.petRef&&e.onPetChange?.(r.petRef)},r=e.onPickPet??(e.pets.length>1&&e.onPetChange!==void 0?n:void 0);return{...t?.photoUrl===void 0?{}:{petPhotoUrl:t.photoUrl},...r===void 0?{}:{onPet:r}}}function LegacyPath({host:e,renderLegacy:t,section:n,tabs:r,headerStyle:o}){let i=vl(r,o);if(t!==void 0)return t();let l=bl(e),s=i.shellHeader==="tabs_bar";/* @__PURE__ */
|
|
183
|
+
return a.jsx(EverfurTabs,{petRef:l?.petRef??null,petName:l?.name??null,opened:wl(n,i.shellTabs?.includes("vet")===true),...r===void 0?{}:{tabs:r},...o===void 0?{}:{headerStyle:o},...s?{header:kl(e,l)}:{},...s&&e.onClose!==void 0?{onClose:e.onClose}:{},...e.vetMessageWaiting===true?{badges:{vet:true}}:{}})}function wl(e,t){let{section:n,key:r}=gl(e);return n===void 0||n==="vet"&&!t?{via:"plain"}:r===null?{via:"link",tab:n}:{via:"link",tab:n,key:r}}function xl(e,t,n){let r=Ua(),i=e.settings["access.mode"]==="free_cap",a=capMonth(/* @__PURE__ */new Date),[l,s]=o.useState(()=>r?.peekFreeUsed(t,a)??0),d=o.useRef(true),c=o.useRef(n);c.current=n,o.useEffect(()=>{if(d.current=true,!(r===null||!i))return r.readFreeUsed(t,a).then(e=>{d.current&&s(e)}),()=>{d.current=false}},[r,i,t,a]);let u=o.useMemo(()=>!i||r===null?null:{onMessageSent:()=>{r.addFreeUsed(t,a).then(e=>{d.current&&s(e)})},onFreeCapReached:e=>{r.setFreeUsed(t,a,e.used).then(e=>{d.current&&s(e)}),c.current(e)}},[i,r,t,a]);return{used:l,hooks:u}}var _l=Ge.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:r,records:l,style:s,config:d,tabs:c,headerStyle:u}){let p=d.settings,f=o.useContext(Pe),h=bl(e),g=vetLevelFor(d.stateGate,h?.location??null),b=vl(c,u),m=b.shellTabs!==null,y=b.shellHeader==="tabs_bar";un(y);let v=Ut("televet"),k=o.useMemo(()=>ul(resolveLayout(p,g),p,b.shellTabs,v),[p,g,b.shellTabs,v]),w=e.membership??"unknown",x=e.userId??f?.userRef??"anonymous",_=o.useRef(()=>{}),{used:S,hooks:C}=xl(d,x,e=>_.current(e)),R=askAccess(d,w,S),{tablet:j,column:A}=Zn(),F=gl(t),[T,I]=o.useState(()=>fl(F.section,k,m));o.useEffect(()=>{F.section!==void 0&&I(F.section)},[F.section,F.key]);let E=o.useCallback(e=>{I(e),n?.(e)},[n]),P=k.vetOnAsk!=="none",D=pl(T,k,m),O=k.closeControl!=="none",[z,B]=o.useState(null),[V,N]=o.useState(null),$=o.useCallback(e=>(N(e),()=>N(t=>t===e?null:t)),[]),L=o.useCallback((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(d):planSheet(d,h?.name),reason:e,notice:t};B(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[d,h?.name]);_.current=e=>L({kind:"cap"},e.emergencyGuidance??null);let M=()=>{z!==null&&(e.onOpenPlan?.(z.reason,z.sheet.soldBy),B(null))};o.useEffect(()=>{R.kind==="members_only"?L({kind:"members"}):R.kind==="cap_reached"&&L({kind:"cap"})},[R.kind,L]);let U=e=>isLocked(d,w,e),W={flex:1,backgroundColor:p["look.color.surface"]},q=D==="vet"?/* @__PURE__ */a.jsx(VetPane2,{config:d,pet:h,level:g,tabsBar:y,locked:U("video_visits"),onLocked:()=>L({kind:"locked",part:"video_visits"}),onAsk:()=>E("ask")}):D==="records"?/* @__PURE__ */a.jsx(RecordsPane,{config:d,host:e,pet:h,tabsBar:y,shellPush:$,vetShown:P,records:l,onPlan:e=>L({kind:"locked",part:e}),onVet:()=>P?E("vet"):void 0,locked:U,onAsk:()=>E("ask")}):/* @__PURE__ */a.jsx(AskPane,{config:d,layout:k,pet:h,level:g,access:R,hooks:C,chat:r,locked:U,tabsBar:y,onRecords:()=>E("records"),onVet:()=>E("vet"),onPlan:()=>L({kind:R.kind==="members_only"?"members":"cap"})}),H=/* @__PURE__ */a.jsx(SdkColumnScope,{children:q});/* @__PURE__ */
|
|
184
|
+
return a.jsx(ShellSafeArea,{framed:O,children:t=>/* @__PURE__ */a.jsxs(i.View,{style:[W,s],testID:`everfur-sdk-app-${k.nav}`,children:[
|
|
185
|
+
/* @__PURE__ */a.jsx(Framed,{framed:O,insets:t,children:/* @__PURE__ */a.jsxs(i.View,{style:A,testID:j?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[y?/* @__PURE__ */a.jsx(TabsBar,{config:d,layout:k,host:e,pet:h,section:D,level:g,onSection:E,deep:D==="records"?V:null}):/* @__PURE__ */a.jsx(Header,{config:d,layout:k,host:e,pet:h,section:D,level:g,onSection:E}),y||k.nav==="bottom_tabs"||k.nav==="chat_first"?null:/* @__PURE__ */a.jsx(SectionNav,{config:d,layout:k,level:g,section:D,onSection:E,vetDot:e.vetMessageWaiting===true}),
|
|
186
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flex:1},children:H}),!y&&k.nav==="bottom_tabs"?/* @__PURE__ */a.jsx(SectionNav,{config:d,layout:k,level:g,section:D,onSection:E,vetDot:e.vetMessageWaiting===true,bottom:true}):null]})}),z!==null?/* @__PURE__ */a.jsx(SdkSheet,{sheet:z.sheet,settings:p,onPrimary:M,onDismiss:()=>B(null),notice:z.notice,bottomInset:t.bottom}):null]})})}var Sl=/* @__PURE__ */Object.freeze({top:0,bottom:0,left:0,right:0});function ShellSafeArea({framed:e,children:t}){let n=o.useContext(s.SafeAreaInsetsContext);return e?
|
|
187
|
+
/* @__PURE__ */a.jsx(s.SafeAreaProvider,{initialMetrics:n===null?s.initialWindowMetrics:null,children:/* @__PURE__ */a.jsx(MeasuredInsets,{children:t})}):t(Sl)}function MeasuredInsets({children:e}){return e(s.useSafeAreaInsets())}function Framed({framed:e,insets:t,children:n}){return e?/* @__PURE__ */a.jsx(i.View,{style:{flex:1,paddingTop:t.top,paddingBottom:t.bottom,paddingLeft:t.left,paddingRight:t.right},testID:"everfur-sdk-safe-area",children:n}):n}function Cl(e,t,n){return t==="vet"?vetTabLabel(e,n):sdkText(e,t==="ask"?"text.tabs.ask":"text.tabs.records")}function SectionNav({config:e,layout:t,level:n,section:r,onSection:o,vetDot:l,bottom:s=false}){let d=e.settings;return t.sections.length<2?null:/* @__PURE__ */a.jsx(i.View,{accessibilityRole:"tablist",style:[{flexDirection:"row",borderColor:d["look.color.line"],backgroundColor:d["look.color.surface"]},s?{borderTopWidth:1,paddingBottom:6}:{borderBottomWidth:1,paddingHorizontal:8}],testID:s?"everfur-sdk-tabs-bottom":"everfur-sdk-tabs-top",children:t.sections.map(c=>{let u=c===r;/* @__PURE__ */
|
|
188
|
+
return a.jsxs(i.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:u},onPress:()=>o(c),style:{flex:s?1:0,minHeight:44,paddingHorizontal:12,alignItems:"center",justifyContent:"center",flexDirection:"row",gap:6,borderBottomWidth:s?0:2,borderBottomColor:u?d["look.color.primary"]:"transparent"},testID:`everfur-sdk-tab-${c}`,children:[
|
|
189
|
+
/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:d["look.font.body"],fontSize:15,fontWeight:u?"600":"400",color:u?d["look.color.heading"]:d["look.color.muted"]},children:Cl(e,c,n)}),c==="vet"&&l&&t.vetBadge==="tab_dot"?/* @__PURE__ */a.jsx(i.View,{style:{width:7,height:7,borderRadius:4,backgroundColor:d["look.color.dot"]},testID:"everfur-sdk-vet-dot"}):null]},c)})})}function Header({config:e,layout:t,host:n,pet:r,section:o,level:l,onSection:s}){let d=e.settings,c=d["look.color.heading"],u=(e,t,n)=>/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontSize:20,color:c},children:e})});if(t.nav==="sections_page"){let t=sdkText(e,"text.nav.page_title"),n=/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */a.jsx(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:d["look.font.heading"],fontWeight:String(d["look.font.heading_weight"]),fontSize:24,color:c},children:t}):null,
|
|
190
|
+
/* @__PURE__ */a.jsx(SdkLockup,{settings:d})]});return o==="ask"?/* @__PURE__ */a.jsxs(i.View,{children:[n,
|
|
191
|
+
/* @__PURE__ */a.jsx(MemoryRow,{config:e,pet:r})]}):n}if(t.nav==="chat_first"){let p=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
192
|
+
return a.jsxs(i.View,{testID:"everfur-sdk-header-chat-first",children:[
|
|
193
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52},children:[u("↓",n.onClose,"everfur-sdk-down"),
|
|
194
|
+
/* @__PURE__ */a.jsx(Text,{tier:"heading",numberOfLines:1,style:{flex:1,textAlign:"center",fontFamily:d["look.font.heading"],fontWeight:String(d["look.font.heading_weight"]),fontSize:17,color:c},children:o==="ask"?sdkText(e,"text.ask.name"):Cl(e,o,l)}),p?/* @__PURE__ */a.jsx(VetPill,{config:e,layout:t,level:l,waiting:n.vetMessageWaiting===true,onPress:()=>s("vet")}):o!=="ask"?u("×",()=>s("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */a.jsx(i.View,{style:{minWidth:44}})]}),o==="ask"?/* @__PURE__ */a.jsx(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let p=t.presentation==="full_screen",f=t.vetOnAsk==="header_button"&&o==="ask";/* @__PURE__ */
|
|
195
|
+
return a.jsxs(i.View,{testID:`everfur-sdk-header-${t.nav}`,children:[
|
|
196
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52,gap:8},children:[
|
|
197
|
+
/* @__PURE__ */a.jsx(i.View,{style:{flex:1,alignItems:"flex-start"},children:p?/* @__PURE__ */a.jsx(PetSwitcher,{config:e,host:n,pet:r}):null}),
|
|
198
|
+
/* @__PURE__ */a.jsx(SdkLockup,{settings:d}),
|
|
199
|
+
/* @__PURE__ */a.jsxs(i.View,{style:{flex:1,alignItems:"flex-end"},children:[f?/* @__PURE__ */a.jsx(VetPill,{config:e,layout:t,level:l,waiting:n.vetMessageWaiting===true,onPress:()=>s("vet")}):null,p?u("×",n.onClose,"everfur-sdk-close"):null]})]}),t.nav==="bottom_tabs"&&t.vetOnAsk==="top"&&(o==="ask"||o==="vet")?/* @__PURE__ */a.jsx(AskVetSwitch,{config:e,level:l,section:o,onSection:s}):null,o==="ask"?/* @__PURE__ */a.jsx(MemoryRow,{config:e,pet:r}):null]})}function Rl(e,t){let n=Cl(e,"ask",t),r=Cl(e,"records",t),o=ft.plan;return{ask:n,vet:Cl(e,"vet",t),plan:o,records:r,listAll:`${n}, ${o} and ${r}`,listNoPlan:`${n} and ${r}`}}function TabsBar({config:e,layout:t,host:n,pet:r,section:l,level:s,onSection:d,deep:c}){let u=o.useMemo(()=>Rl(e,s),[e,s]),p=o.useCallback(e=>d(e==="plan"?"ask":e),[d]),f=!t.sections.includes(l),h=c??(f?{title:Cl(e,l,s),onBack:()=>d("ask")}:null),g=t.closeControl==="none"?void 0:n.onClose,b=n.vetMessageWaiting===true&&t.vetBadge!=="none"?{vet:true}:void 0,m=zi()?.header;return m===void 0?null:/* @__PURE__ */a.jsxs(i.View,{testID:"everfur-sdk-header-tabs-bar",children:[
|
|
200
|
+
/* @__PURE__ */a.jsx(m.TabsBarHeader,{options:kl(n,r),pushed:h,petRef:r?.petRef??null,petName:r?.name??"",copy:Ii,onClose:g}),c!==null||t.sections.length<2?null:/* @__PURE__ */a.jsx(m.SubTabs,{tabs:t.sections,sub:l,copy:u,badges:b,onOpen:p}),l==="ask"?/* @__PURE__ */a.jsx(MemoryRow,{config:e,pet:r}):null]})}function AskVetSwitch({config:e,level:t,section:n,onSection:r}){let o=e.settings;/* @__PURE__ */
|
|
201
|
+
return a.jsx(i.View,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:o["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(l=>/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:n===l},onPress:()=>r(l),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===l?o["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${l}`,children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:o["look.font.body"],fontSize:15,color:n===l?o["look.color.heading"]:o["look.color.muted"]},children:Cl(e,l,t)})},l))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:o}){let l=e.settings,s=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
|
|
202
|
+
return a.jsxs(i.Pressable,{accessibilityRole:"button",onPress:o,style:{flexDirection:"row",alignItems:"center",gap:6,height:32,paddingLeft:10,paddingRight:12,borderRadius:16,backgroundColor:"#FFFFFF",borderWidth:1,borderColor:l["look.color.line"]},testID:"everfur-sdk-vet-pill",children:[s?/* @__PURE__ */a.jsx(i.View,{style:{width:8,height:8,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-pill-dot"}):null,
|
|
203
|
+
/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:l["look.font.body"],fontSize:14,color:l["look.color.heading"]},children:vetTabLabel(e,n)})]})}function PetSwitcher({config:e,host:t,pet:n}){let r=e.settings;return n===null?null:/* @__PURE__ */a.jsxs(i.Pressable,{accessibilityRole:"button",onPress:()=>{if(t.pets.length<2)return;let e=t.pets.findIndex(e=>e.petRef===n.petRef),r=t.pets[(e+1)%t.pets.length];r!==void 0&&t.onPetChange?.(r.petRef)},style:{minHeight:44,flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8},testID:"everfur-sdk-pet-switcher",children:[
|
|
204
|
+
/* @__PURE__ */a.jsx(Text,{tier:"control",numberOfLines:1,style:{fontFamily:r["look.font.body"],fontSize:15,fontWeight:"600",color:r["look.color.heading"]},children:n.name}),t.pets.length>1?/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontSize:12,color:r["look.color.heading"]},children:"▾"}):null]})}function MemoryRow({config:e,pet:t,withLockup:n=false}){let r=memoryChip(e,t?.name);return r===null&&!n?null:/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */a.jsx(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */a.jsx(i.View,{}),n?/* @__PURE__ */a.jsx(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:r,level:l,access:s,hooks:d,chat:c,locked:u,tabsBar:p,onRecords:f,onVet:h,onPlan:g}){let b=t.settings,m=b["look.color.heading"],y=o.useMemo(()=>({title:sdkText(t,"text.ask.greeting",r===null?{}:{pet:r.name}),chipTints:b["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,m)}))}),[t,b,m,r]),v=o.useMemo(()=>({chats:_l,newChat:sdkText(t,"text.ask.new_chat")}),[t]),k=s.kind==="members_only"||s.kind==="cap_reached",w=n.vetOnAsk!=="none"&&l!=="none"?r?.location?.state:void 0;/* @__PURE__ */
|
|
205
|
+
return a.jsxs(i.View,{style:{flex:1},testID:"everfur-sdk-ask",children:[k?/* @__PURE__ */a.jsx(i.View,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */a.jsx(i.Pressable,{accessibilityRole:"button",onPress:g,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */a.jsx(Text,{tier:"control",style:{fontFamily:b["look.font.body"],fontSize:15,color:b["look.color.accent"]},children:s.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */a.jsx(Ha.Provider,{value:d,children:/* @__PURE__ */a.jsx(ut.Provider,{value:p,children:/* @__PURE__ */a.jsx(e.EverfurChat,{header:false,...c,...r===null?{}:{petRef:r.petRef},...w===void 0?{}:{vetUsState:w},...u("texting")||!b["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:h},emptyState:y,historyBar:v,style:{flex:1,paddingTop:0},...p?{onOpenRecord:c?.onOpenRecord??f}:{}})})}),s.kind==="counter"?/* @__PURE__ */a.jsx(Text,{style:{textAlign:"center",fontFamily:b["look.font.label"]==="body"?b["look.font.body"]:b["look.font.label"],fontSize:12,color:b["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:s.line}):null]})}function VetPane2({config:e,pet:t,level:n,tabsBar:o,locked:l,onLocked:s,onAsk:d}){let c=o?zi()?.vet.VetHome:void 0;if(c!==void 0&&jl(e,n,t)){let e=t?.location?.state;/* @__PURE__ */
|
|
206
|
+
return a.jsxs(i.View,{style:{flex:1},testID:"everfur-sdk-vet-tabs-bar",children:[
|
|
207
|
+
/* @__PURE__ */a.jsx(c,{petRef:t?.petRef??null,...e===void 0?{}:{usState:e},...l?{onStartInApp:()=>s()}:{},style:{flex:1}}),
|
|
208
|
+
/* @__PURE__ */a.jsx(r.EverfurTelevetHost,{})]})}/* @__PURE__ */
|
|
209
|
+
return a.jsx(ConfigVetPane,{config:e,pet:t,level:n,locked:l,onLocked:s,onAsk:d})}function jl(e,t,n){if(t!=="visits")return false;let r=e.settings["vet.visits_per_year"],o=n?.visitsUsed;return r===null||o===null||o===void 0||o<r}function ConfigVetPane({config:e,pet:t,level:n,locked:o,onLocked:l,onAsk:s}){let d=r.useVetVisit({petRef:t?.petRef??null,usState:t?.location?.state??null}),c=vetHome(e,{level:n,...t===null?{}:{pet:t.name,petSex:t.sex??null,visitsUsed:t.visitsUsed??null},...t?.stateName!==void 0?{stateName:t.stateName}:t?.location?.state!==void 0?{stateName:t.location.state}:{}});/* @__PURE__ */
|
|
210
|
+
return a.jsxs(i.View,{style:{flex:1},children:[
|
|
211
|
+
/* @__PURE__ */a.jsx(SdkVetHomeView,{config:e,home:c,onBook:()=>{o?l():d.open(t?.petRef??null)},style:{flex:1}}),
|
|
212
|
+
/* @__PURE__ */a.jsx(SdkDockBar,{config:e,pet:t?.name,onPress:s})]})}function RecordsPane({config:e,host:t,pet:r,tabsBar:o,shellPush:l,vetShown:s,records:d,onPlan:c,onVet:u,locked:p,onAsk:f}){let h=e.settings,g=new Set(h["features.partner_data"]),b=(t.partnerData??[]).filter(e=>g.has(e.source)),m=partnerDataSources(e),y=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results"),v=d?.sheet,k=!o||v===false?v:{layout:"tabs_bar",shellPush:l,...r?.photoUrl===void 0?{}:{petPhotoUrl:r.photoUrl},...typeof v=="object"?v:{}};/* @__PURE__ */
|
|
213
|
+
return a.jsxs(i.View,{style:{flex:1},testID:"everfur-sdk-records",children:[r===null?null:/* @__PURE__ */a.jsx(n.EverfurRecords,{...d,...k===void 0?{}:{sheet:k},petRef:r.petRef,petName:r.name,weightUnit:h["units.weight"],noVet:!s,onOpenPlan:()=>c("previous_results"),...s?{onSpeakToVet:u}:{},...p("link_records")?{onRequestFromClinic:()=>c("link_records")}:{},style:{flex:1}}),b.length>0?/* @__PURE__ */a.jsx(i.View,{style:{paddingHorizontal:16,paddingVertical:8,gap:6},testID:"everfur-sdk-partner-data",accessibilityLabel:m.join(", "),children:b.map((e,t)=>/* @__PURE__ */a.jsxs(i.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
|
|
214
|
+
/* @__PURE__ */a.jsx(Text,{tier:"badge",style:{fontFamily:h["look.font.body"],fontSize:11,color:h["look.color.heading"],backgroundColor:h["look.color.tint"],paddingHorizontal:8,paddingVertical:2,borderRadius:10,overflow:"hidden"},children:y(e.source)}),
|
|
215
|
+
/* @__PURE__ */a.jsx(Text,{style:{flex:1,fontFamily:h["look.font.body"],fontSize:14,color:h["look.color.ink"]},children:e.title}),e.date!==void 0?/* @__PURE__ */a.jsx(Text,{style:{fontFamily:h["look.font.body"],fontSize:12,color:h["look.color.muted"]},children:e.date}):null]},`${e.source}-${t}`))}):null,
|
|
216
|
+
/* @__PURE__ */a.jsx(SdkDockBar,{config:e,pet:r?.name,onPress:f})]})}function EverfurSdkLauncher({onPress:t,tipSeen:n=false,onTipSeen:r,replyWaiting:i,onReplyWaitingChange:l,style:s}){let d=Ua(),{active:c}=useEverfurSdkConfig();o.useEffect(()=>{d?.load()},[d]);let u=e.useEverfurUnread({petRef:null}),p=i??u.hasUnread===true;return o.useEffect(()=>{l?.(p)},[p,l]),c===null||c.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */a.jsx(SdkLauncherView,{config:c,onPress:t,replyWaiting:p,tipSeen:n,onTipSeen:()=>r?.(),...s===void 0?{}:{style:s}})}exports.EVERFUR_INTRO_COPY=ze;exports.EVERFUR_TABS_COPY=ft;exports.EVERFUR_TABS_SHELL_COPY=Ii;exports.EverfurIntro=EverfurIntro;exports.EverfurRecordsLandedBanner=EverfurRecordsLandedBanner;exports.EverfurSdkApp=EverfurSdkApp;exports.EverfurSdkLauncher=EverfurSdkLauncher;exports.EverfurTabs=EverfurTabs;exports.RECORDS_BANNER_MS=ui;exports.defaultIntroBlanks=defaultIntroBlanks;exports.introFacts=introFacts;exports.introPetWords=introPetWords;exports.introText=introText;exports.isIntroSwipeOut=isIntroSwipeOut;exports.numberWord=numberWord;exports.registerEverfurSvg=registerEverfurSvg;exports.useEverfurIntroSeen=useEverfurIntroSeen;exports.useEverfurSdkConfig=useEverfurSdkConfig;exports.useEverfurTabs=useEverfurTabs;exports.useLoadEverfurSdkConfig=useLoadEverfurSdkConfig;
|