@everfur/sdk 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{Chat.d-qQVN6VLp.d.ts → Chat.d-BCfyvzX8.d.ts} +1 -1
- package/dist/{Chat.d-Bl-_TsvQ.d.cts → Chat.d-Od44h51D.d.cts} +1 -1
- package/dist/{DepthViews.d-PmjccZLr.d.cts → DepthViews.d-BGspxovy.d.cts} +1 -1
- package/dist/{DepthViews.d-aOChkwU2.d.ts → DepthViews.d-BIHVrf9r.d.ts} +1 -1
- package/dist/{DepthViews.d-ktxIIsnb.d.cts → DepthViews.d-BaLh7Lsi.d.cts} +1 -1
- package/dist/{DepthViews.d-CpF_Y_z9.d.ts → DepthViews.d-CEVk9poG.d.ts} +1 -1
- package/dist/ErrorPolicyPort.d-BIdmYQnk.d.cts +43 -0
- package/dist/ErrorPolicyPort.d-BnI5qWg4.d.ts +43 -0
- package/dist/{RecordsPage.d-BfMSOsg_.d.ts → RecordsPage.d-D10RIgdc.d.ts} +1 -1
- package/dist/{RecordsPage.d-DWjFpZs1.d.cts → RecordsPage.d-DbhYNSbq.d.cts} +1 -1
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments.d-DOmkQ_8O.d.ts → attachments.d-BlukNfIf.d.ts} +1 -1
- package/dist/{attachments.d-DBlHzWYy.d.cts → attachments.d-CF4lLuGK.d.cts} +1 -1
- package/dist/{bookingCopy.d-ITpabqPr.d.ts → bookingCopy.d-BuDv16WP.d.ts} +12 -12
- package/dist/{bookingCopy.d-B39JAmIZ.d.cts → bookingCopy.d-rnBSqOSN.d.cts} +12 -12
- package/dist/{callCopy.d-Bw6oZT54.d.cts → callCopy.d-BQxpwXqT.d.cts} +3 -3
- package/dist/{callCopy.d-Bw6oZT54.d.ts → callCopy.d-BQxpwXqT.d.ts} +3 -3
- package/dist/{callRoom.d-B1DoYdJe.d.cts → callRoom.d-9Dm7XnUr.d.cts} +1 -1
- package/dist/{callRoom.d-Dqm1rUqT.d.ts → callRoom.d-t-khijDv.d.ts} +1 -1
- package/dist/{casesRepository.d-De4ZtgJ_.d.cts → casesRepository.d-CVuKTkJo.d.cts} +1 -1
- package/dist/{casesRepository.d-DsEeFd0F.d.ts → casesRepository.d-Dn1fK1b2.d.ts} +1 -1
- package/dist/chat/index.cjs +21 -21
- package/dist/chat/index.d.cts +12 -12
- package/dist/chat/index.d.ts +12 -12
- package/dist/chat/index.js +21 -21
- package/dist/chat/lite/index.cjs +21 -21
- package/dist/chat/lite/index.d.cts +12 -12
- package/dist/chat/lite/index.d.ts +12 -12
- package/dist/chat/lite/index.js +21 -21
- package/dist/{chatHandoffToken.d-B4-iQ35P.d.cts → chatHandoffToken.d-BjfmIxXk.d.cts} +6 -6
- package/dist/{chatHandoffToken.d-Br3Gw3w-.d.ts → chatHandoffToken.d-CFiI6IMc.d.ts} +6 -6
- package/dist/{checkin.d-CAKQydg8.d.cts → checkin.d-BP3ZWBfX.d.cts} +5 -5
- package/dist/{checkin.d-qvYXugN3.d.ts → checkin.d-CokpahFL.d.ts} +5 -5
- package/dist/{chunk-PJHMKQ5C.js → chunk-4KFFE42Z.js} +19 -19
- package/dist/{chunk-7MMJ7CYN.js → chunk-6IHY7HS7.js} +1 -1
- package/dist/{chunk-6I4REU4U.js → chunk-BMYNDBUR.js} +1 -1
- package/dist/{chunk-5OK2AF63.js → chunk-HHCGXQJR.js} +19 -19
- package/dist/client/index.cjs +31 -31
- package/dist/client/index.d.cts +19 -16
- package/dist/client/index.d.ts +19 -16
- package/dist/client/index.js +30 -30
- package/dist/{clinicBatch.d-B3YJc8IO.d.cts → clinicBatch.d-C0xx5L4j.d.cts} +3 -3
- package/dist/{clinicBatch.d-DhvQuPHV.d.ts → clinicBatch.d-DNi4UURs.d.ts} +3 -3
- package/dist/{config.d-DRoQ2lAx.d.ts → config.d-B7Z-KTGq.d.ts} +10 -2
- package/dist/{config.d-BiVy0fLx.d.cts → config.d-ClAI2RZ6.d.cts} +10 -2
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/{context.d-DZfxKxNi.d.cts → context.d-Bj6-xYPA.d.cts} +11 -5
- package/dist/{context.d-FjU7dQP7.d.ts → context.d-DS1GXUEY.d.ts} +11 -5
- package/dist/{copy.d-Ce_8KuZg.d.cts → copy.d--F5A9cXK.d.cts} +3 -3
- package/dist/{copy.d-BP36f_63.d.ts → copy.d-DmxuFJFe.d.ts} +3 -3
- package/dist/core/index.cjs +41 -40
- package/dist/core/index.d.cts +16 -16
- package/dist/core/index.d.ts +16 -16
- package/dist/core/index.js +41 -40
- package/dist/{depth.d-DzMMmRN4.d.ts → depth.d-CgzYE6_n.d.ts} +3 -3
- package/dist/{depth.d-BtlcIqPJ.d.cts → depth.d-DLaP0o8Y.d.cts} +3 -3
- package/dist/{entitlementRepository.d-BltqS1W8.d.ts → entitlementRepository.d-CkUTlVAb.d.ts} +2 -2
- package/dist/{entitlementRepository.d-wfqpUIKN.d.cts → entitlementRepository.d-DVTp-BB9.d.cts} +2 -2
- package/dist/{focus.d-BX7oahFk.d.cts → focus.d-CLTjm6In.d.cts} +1 -1
- package/dist/{focus.d-armXecf0.d.ts → focus.d-u-HYvim0.d.ts} +1 -1
- package/dist/health-plan/index.d.cts +15 -15
- package/dist/health-plan/index.d.ts +15 -15
- package/dist/{healthPlanRepository.d-DBx7-NLE.d.cts → healthPlanRepository.d-B22kjrYa.d.cts} +3 -3
- package/dist/{healthPlanRepository.d-C7K9dJK5.d.ts → healthPlanRepository.d-CwRXeoM7.d.ts} +3 -3
- package/dist/{idempotency.d-Dak2-pON.d.cts → idempotency.d-CFVMhWcv.d.cts} +1 -1
- package/dist/{idempotency.d-symqJ8Tt.d.ts → idempotency.d-dOFfV91-.d.ts} +1 -1
- package/dist/{identity.d-DOKJFaiz.d.ts → identity.d-D4VtpqRr.d.ts} +1 -1
- package/dist/{identity.d-DIH9h3Le.d.cts → identity.d-DDpXOtas.d.cts} +1 -1
- package/dist/{inbox.d-AuGKeaZv.d.cts → inbox.d-CPcMMz-Y.d.cts} +2 -2
- package/dist/{inbox.d-B5b57OXc.d.ts → inbox.d-DJ9xgU1Z.d.ts} +2 -2
- package/dist/index.cjs +246 -245
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +244 -243
- package/dist/{introEvents.d-ehik7PEn.d.cts → introEvents.d-B7acmGwf.d.cts} +1 -1
- package/dist/{introEvents.d-S4Q4BOSt.d.ts → introEvents.d-DW3gLljE.d.ts} +1 -1
- package/dist/{layout.d-Bm2_1wa4.d.ts → layout.d-C8y_ki1V.d.ts} +1 -1
- package/dist/{layout.d-CFF-nBXf.d.cts → layout.d-DfaFM_lp.d.cts} +1 -1
- package/dist/{models.d-DOwpK1ZF.d.ts → models.d-BKmOfoqV.d.cts} +2 -2
- package/dist/{models.d-Su_BBBTW.d.cts → models.d-BULqCO2R.d.ts} +2 -2
- package/dist/notifications/inbox/index.d.cts +7 -7
- package/dist/notifications/inbox/index.d.ts +7 -7
- package/dist/notifications/index.d.cts +8 -8
- package/dist/notifications/index.d.ts +8 -8
- package/dist/{optInView.d-DbGx1A9R.d.cts → optInView.d-ByDJMrMv.d.cts} +13 -13
- package/dist/{optInView.d-xnIxCLlH.d.ts → optInView.d-DVshLxbD.d.ts} +13 -13
- package/dist/{parse.d-DtHmpAMT.d.cts → parse.d-BDZ7ffgj.d.cts} +4 -1
- package/dist/{parse.d-DtHmpAMT.d.ts → parse.d-BDZ7ffgj.d.ts} +4 -1
- package/dist/{pets.d-BEqKykpu.d.ts → pets.d-BpLObpfM.d.ts} +1 -1
- package/dist/{pets.d-BS6sLxY-.d.cts → pets.d-DXhzTNuI.d.cts} +1 -1
- package/dist/{petsRepository.d-iHrHkXM2.d.ts → petsRepository.d-_QfM7F6T.d.ts} +1 -1
- package/dist/{petsRepository.d-DB5CNKsK.d.cts → petsRepository.d-ai_tZ3lu.d.cts} +1 -1
- package/dist/records/depth/index.d.cts +10 -10
- package/dist/records/depth/index.d.ts +10 -10
- package/dist/records/index.cjs +1 -1
- package/dist/records/index.d.cts +11 -11
- package/dist/records/index.d.ts +11 -11
- package/dist/records/index.js +1 -1
- package/dist/{requestFunnel.d-SySe6xHp.d.cts → requestFunnel.d-BwZDfWVD.d.cts} +3 -3
- package/dist/{requestFunnel.d-CehftayS.d.ts → requestFunnel.d-DKBPTpsy.d.ts} +3 -3
- package/dist/{route.d-DSSSpSB-.d.cts → route.d-DCzQh4ix.d.cts} +3 -3
- package/dist/{route.d-B395-hNX.d.ts → route.d-DSYEd2MR.d.ts} +3 -3
- package/dist/{runtimeTypes.d-DAz0Tgw5.d.ts → runtimeTypes.d-BzUig75K.d.ts} +11 -7
- package/dist/{runtimeTypes.d-DPh1Wh15.d.cts → runtimeTypes.d-CL4l7ta4.d.cts} +11 -7
- package/dist/{screenProps.d-Bd2yphad.d.cts → screenProps.d-6xmE1C-V.d.cts} +2 -2
- package/dist/{screenProps.d-D9Vi-Afl.d.ts → screenProps.d-fHBKArt_.d.ts} +2 -2
- package/dist/{sdkConfigStore.d-VPvsIL8E.d.ts → sdkConfigStore.d-BNCVVEWC.d.ts} +1 -1
- package/dist/{sdkConfigStore.d-BHrzkVpP.d.cts → sdkConfigStore.d-C2BAr9kI.d.cts} +1 -1
- package/dist/server/events/index.cjs +4 -4
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +4 -4
- package/dist/server/index.cjs +9 -9
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +9 -9
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/slots/index.d.cts +6 -6
- package/dist/slots/index.d.ts +6 -6
- package/dist/tabs/index.cjs +87 -84
- package/dist/tabs/index.d.cts +15 -15
- package/dist/tabs/index.d.ts +15 -15
- package/dist/tabs/index.js +95 -92
- package/dist/televet/booking/index.cjs +75 -75
- package/dist/televet/booking/index.d.cts +8 -8
- package/dist/televet/booking/index.d.ts +8 -8
- package/dist/televet/booking/index.js +3 -3
- package/dist/televet/call/index.d.cts +2 -2
- package/dist/televet/call/index.d.ts +2 -2
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/rn/index.d.cts +10 -10
- package/dist/testing/rn/index.d.ts +10 -10
- package/dist/testing/web/index.d.cts +10 -10
- package/dist/testing/web/index.d.ts +10 -10
- package/dist/texting/index.d.cts +6 -6
- package/dist/texting/index.d.ts +6 -6
- package/dist/{threadOptions.d-bEAFkIsC.d.cts → threadOptions.d-Bqy5d5Fx.d.cts} +1 -1
- package/dist/{threadOptions.d-U5YBUKM-.d.ts → threadOptions.d-DOEIpk1t.d.ts} +1 -1
- package/dist/{threadOptions.d-DUQxxHyM.d.cts → threadOptions.d-Dc57dm7h.d.cts} +5 -5
- package/dist/{threadOptions.d-DnM9UcMx.d.ts → threadOptions.d-NSlFx-Lp.d.ts} +5 -5
- package/dist/{timelineRows.d-DXppCSCg.d.cts → timelineRows.d-7w8NsNi4.d.cts} +1 -1
- package/dist/{timelineRows.d-9Uhf4q5d.d.ts → timelineRows.d-CthNM5hV.d.ts} +1 -1
- package/dist/{useHealthPlanSubscription.d-CRBPMlsc.d.ts → useHealthPlanSubscription.d-CV7M21HS.d.ts} +3 -3
- package/dist/{useHealthPlanSubscription.d-DfjTYv1u.d.cts → useHealthPlanSubscription.d-SA9-SuKe.d.cts} +3 -3
- package/dist/{useInboxUnread.d-CP3KwSkn.d.ts → useInboxUnread.d-CXiaR3BZ.d.ts} +1 -1
- package/dist/{useInboxUnread.d-DiE_NbtS.d.cts → useInboxUnread.d-DERpMelw.d.cts} +1 -1
- package/dist/{usePresentation.d-DUYzYXgA.d.cts → usePresentation.d-BJzFicRQ.d.cts} +2 -2
- package/dist/{usePresentation.d-Buxz2Jkt.d.ts → usePresentation.d-DgSGIWS-.d.ts} +2 -2
- package/dist/{useRecordsDepth.d-l6D0ZS4l.d.cts → useRecordsDepth.d-C9W45gwS.d.cts} +1 -1
- package/dist/{useRecordsDepth.d-DG2GiAyt.d.ts → useRecordsDepth.d-ZX2rhcUx.d.ts} +1 -1
- package/dist/{useUnread.d-B6Ehu0ao.d.ts → useUnread.d-CedFK4k6.d.ts} +4 -4
- package/dist/{useUnread.d-7-cuCooM.d.cts → useUnread.d-DST1GMmL.d.cts} +4 -4
- package/dist/{view.d-ufGX_MKK.d.cts → view.d-3lxzyJlL.d.cts} +6 -6
- package/dist/{view.d-iTInze7B.d.ts → view.d-DRiYNQJ8.d.ts} +6 -6
- package/dist/web/consent/index.d.cts +6 -6
- package/dist/web/consent/index.d.ts +6 -6
- package/dist/web/health-plan/index.cjs +1 -1
- 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 +1 -1
- package/dist/web/inbox/index.d.cts +9 -8
- package/dist/web/inbox/index.d.ts +9 -8
- package/dist/web/index.cjs +191 -190
- package/dist/web/index.d.cts +28 -28
- package/dist/web/index.d.ts +28 -28
- package/dist/web/index.js +191 -190
- package/dist/web/intro/index.d.cts +8 -8
- package/dist/web/intro/index.d.ts +8 -8
- package/dist/web/notifications/index.d.cts +7 -7
- package/dist/web/notifications/index.d.ts +7 -7
- package/dist/web/records/depth/index.d.cts +10 -10
- package/dist/web/records/depth/index.d.ts +10 -10
- package/dist/web/records/index.d.cts +13 -13
- package/dist/web/records/index.d.ts +13 -13
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.js +1 -1
- 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 +6 -6
- package/dist/web/televet/booking/index.d.cts +9 -9
- package/dist/web/televet/booking/index.d.ts +9 -9
- package/dist/web/televet/booking/index.js +6 -6
- package/dist/web/televet/call/index.cjs +1 -1
- package/dist/web/televet/call/index.d.cts +2 -2
- package/dist/web/televet/call/index.d.ts +2 -2
- package/dist/web/televet/call/index.js +1 -1
- package/dist/web/texting/index.d.cts +6 -6
- package/dist/web/texting/index.d.ts +6 -6
- package/dist/web/ui/index.cjs +1 -1
- package/dist/web/ui/index.js +33 -33
- package/package.json +1 -32
- package/dist/ErrorPolicyPort.d-68yrE3BE.d.ts +0 -23
- package/dist/ErrorPolicyPort.d-DirW9hgO.d.cts +0 -23
package/dist/tabs/index.cjs
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
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
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");var s=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),d=globalThis;function c(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 u=d[s],p=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),f=c(u)?u:d[s]=p(),h=f.landed,g=f.noVet,b=f.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,e="host"){for(let t of[...h])try{t(petRef,e)}catch{}}function onHealthPlanRecordsLanded(e){return h.add(e),()=>{h.delete(e)}}function setHealthPlanNoVet(petRef,e){if((b.get(petRef)??false)!==e){e?b.set(petRef,true):b.delete(petRef);for(let t of[...g])try{t(petRef,e)}catch{}}}function healthPlanNoVet(petRef){return b.get(petRef)??false}function onHealthPlanNoVet(e){return g.add(e),()=>{g.delete(e)}}var m=[{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}],y=/* @__PURE__ */Object.freeze(m.map(e=>/* @__PURE__ */Object.freeze(e)));/* @__PURE__ */Object.freeze(y.map(e=>e.wireCode));var k=/* @__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"}),v=/* @__PURE__ */Object.freeze(y.map(e=>/* @__PURE__ */Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:k[e.wireCode]}))),w=new Map(v.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),x=/* @__PURE__ */Object.freeze(["http_envelope",...[...new Set(v.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",...x]){let t=w.get(e+n);if(t)return t}}var _=/* @__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 _[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 S=/* @__PURE__ */new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function isAutoRetryable(e){return S.has(e)}var C=/* @__PURE__ */new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function isRetryableCode(e){return isAutoRetryable(e)||C.has(e)}var R=500,j=8e3,A=4;function backoffDelayMs(e,t=Math.random){let n=Math.max(0,e),r=Math.min(R*2**n,j);return Math.floor(t()*r)}var F="This feature isn't available on your account right now.",E="Something in that request was not right. Check the details and try again.",I=/* @__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:F,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:E,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:F,runtimeDisposed:E,unknown:"Something went wrong. Please try again."}),T="This session has ended. Please sign in again.",D="linked_account_read_only";function P(e,t,n){return e==="conflict"&&n===D?F:(e==="authRejected"||e==="authExpired")&&typeof t=="string"&&t.trim().toLowerCase()==="session_revoked"?T:userFacingError(e)}function userFacingError(e){return I[e]}function O(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:false,writable:false,configurable:false})}var z=/^[a-z][a-z0-9_]{0,63}$/;function makeEverfurError(e,t){let n=contractErrorFor(t?.wireCode,t?.wireEnvelope),r=e==="conflict"&&t?.reasonCode===D,o={code:e,category:categoryFor(e),retryable:t?.retryable??(r?false:isRetryableCode(e)),displayMessage:P(e,t?.wireCode,r?D:null)};t?.httpStatus!==void 0&&(o.httpStatus=t.httpStatus),t?.requestId&&(o.requestId=t.requestId),typeof t?.reasonCode=="string"&&z.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&&O(o,"wireMessage",t.wireMessage),t?.raw!==void 0&&t.raw!==null&&O(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
|
-
return Object.freeze({ok:false,error:e})}var
|
|
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
|
|
4
|
+
return Object.freeze({ok:false,error:e})}var V=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 B="x-everfur-anon-token",N="anonTokenInvalid";async function $(e){if(e.userRef!==null||e.anonIdentity===void 0)return null;try{return await e.anonIdentity.token()}catch{return null}}function L(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[B]=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:{...W(e.headers),...authHeaders(t)}}}function W(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===B||(t[n]=r)}return t}async function authedSend(e,t){if(t.mode==="anonymous"){let n=await $(t),r=await t.transport.request(withAuthHeaders(e,M(t,n)));if(r.ok||q(r.error.raw)!==N||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,M(t,o)))}let n;try{n=await t.identity.currentToken()}catch(e){return t.identity.reportRejected?.(),err(L(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(L(e,{wireCode:q(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(U(i.error))):i}function M(e,t){return{mode:"anonymous",publishableKey:e.publishableKey,userRef:e.userRef,...e.sessionId?{sessionId:e.sessionId}:{},...t!==null?{anonToken:t}:{}}}function U(e){let t=e.raw,n=q(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 q(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:H(e)})}function H(e){return e instanceof Error?e.message:typeof e=="string"?e:"network request failed"}var K=3e4,Y=j*2,G="idempotency-key",J=/* @__PURE__ */new Set(["POST","PUT","PATCH","DELETE"]),Q=/* @__PURE__ */Object.freeze({onEvent(){}}),Z=/* @__PURE__ */Object.freeze({setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()});function X(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??Q,n=e.timers??Z,r=e.rng??Math.random,o=e.sleep??((e,t)=>ge(e,n,t)),i=e.maxAttempts??A,a=e.unaryTimeoutMs??K,l=e.newIdempotencyKey??te(),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??J.has(d.method),h=c?.idempotencyKey===void 0?null:X(c.idempotencyKey),g=f?h??l():null,b=ee(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=fe(a,n),c=he(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=re(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}:{}}),k={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",...k})),err(h);if(s(i({phase:"retry",...k,delayMs:y.delayMs})),await o(y.delayMs,d.signal),d.signal?.aborted===true)return s(i({phase:"settled",...k,reason:"aborted"})),err(h);m+=1}}async function c(t){return withAuthHeaders(t,await pe(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 ee(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==G&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function te(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var ne=10;function re(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=oe(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(ne,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=ie(e,n.now);return l!==null?l>Y?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function oe(e){let t=e.code==="unknown"?fromWire(ce(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function ie(e,t){let n=le(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=ae(e.raw);return r===null?null:Math.round(r*1e3)}function ae(e){for(let t of se(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function le(e){for(let t of se(e)){let e=t.resets_at,n=de(e);if(n!==null)return n}return null}function se(e){if(!ue(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];ue(r)&&t.push(r)}return t}function de(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 ce(e){for(let t of se(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function ue(e){return typeof e=="object"&&e!==null}async function pe(e){if(e.mode==="anonymous"){let t=await $(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 fe(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function he(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 ge(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 be="/widget/v1/me/intro";function me(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function ye(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function ke(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 ve(e){let t=()=>{let{services:t}=e.registry;return we({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(me(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function we(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=ke(o.value);return i===null?err(ye(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:be,signal:e.signal}:{method:"GET",path:be};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:be,body:{seen:true}})}}}var xe="everfur.intro.seen.v1:",_e=userRef=>`${xe}${userRef}`;async function Se(e,userRef){try{return await e.getItem(_e(userRef))!==null}catch{return false}}async function Ce(e,userRef,t){try{await e.setItem(_e(userRef),t)}catch{}}async function Re(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await Se(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 Ce(n,userRef,o.value.seenAt),false):true}async function je(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await Ce(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var Ae=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Fe=globalThis,Ee=Fe[Ae]??(Fe[Ae]=r.createContext(null));Ee.displayName??="EverfurContext";function Ie(){let e=r.useContext(Ee);if(e===null)throw new B("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 Te=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?"":`${Te(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 De=/* @__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 Pe=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?Pe[e]??null:null}var Oe=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?"":`${Oe(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 ze=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),Be=globalThis;function Ve(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var Ne=Be[ze],$e=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),Le=Ve(Ne)?Ne:Be[ze]=$e();function We(){for(let e of[...Le.listeners])try{e()}catch{}}function Me(){let e={};return Le.holds.add(e),Le.holds.size===1&&We(),()=>{Le.holds.delete(e)&&Le.holds.size===0&&We()}}function Ue(e){r.useEffect(()=>e?Me():void 0,[e])}function qe(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 He=/* @__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 Ke=/* @__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 ee(e,t){let n={};for(let[t,r]of Object.entries(e.headers??{}))t.toLowerCase()!==G&&(n[t]=r);return t!==null&&(n["Idempotency-Key"]=t),{...e,headers:n}}function te(){let e=0;return()=>`efk_${Date.now().toString(36)}_${(e++).toString(36)}_${Math.random().toString(36).slice(2,12)}`}var ne=10;function re(e,t,n){if(n.aborted)return{retry:false,reason:"aborted"};let r=oe(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(ne,Math.floor(t)))},a=n.perCallMaxAttempts??i()??n.maxAttempts;if(t+1>=a)return{retry:false,reason:"attempts-exhausted"};let l=ie(e,n.now);return l!==null?l>Y?{retry:false,reason:"server-reset-beyond-budget"}:{retry:true,reason:o,delayMs:l}:{retry:true,reason:o,delayMs:backoffDelayMs(t,n.rng)}}function oe(e){let t=e.code==="unknown"?fromWire(ce(e.raw)):e.code;return t==="quotaExceeded"?"quota":t==="rateLimited"||e.httpStatus===429?"burst":null}function ie(e,t){let n=le(e.raw);if(n!==null){let e=n-t;return e>0?e:0}let r=ae(e.raw);return r===null?null:Math.round(r*1e3)}function ae(e){for(let t of se(e)){let e=t.retry_after_seconds;if(typeof e=="number"&&Number.isFinite(e)&&e>=0)return e}return null}function le(e){for(let t of se(e)){let e=t.resets_at,n=de(e);if(n!==null)return n}return null}function se(e){if(!ue(e))return[];let t=[e];for(let n of["error","detail"]){let r=e[n];ue(r)&&t.push(r)}return t}function de(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 ce(e){for(let t of se(e)){let e=t.code;if(typeof e=="string"&&e.length>0)return e}return null}function ue(e){return typeof e=="object"&&e!==null}async function pe(e){if(e.mode==="anonymous"){let t=await $(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 fe(e,t){let n=new AbortController,r=t.setTimeout(()=>n.abort(),e);return{signal:n.signal,cancel:()=>t.clearTimeout(r)}}function he(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 ge(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 be="/widget/v1/me/intro";function me(e){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${e} was called after unmount`})}function ye(e){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${e}: the response was not the documented shape`})}function ke(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 ve(e){let t=()=>{let{services:t}=e.registry;return we({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})},n=e=>Promise.resolve(err(me(e)));return{read:r=>e.isDisposed?n("read"):t().read(r),markSeen:()=>e.isDisposed?n("markSeen"):t().markSeen()}}function we(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=ke(o.value);return i===null?err(ye(e)):ok(i)};return{read(e){let t=e?.signal?{method:"GET",path:be,signal:e.signal}:{method:"GET",path:be};return n("intro.read",t,{maxAttempts:1})},markSeen(){return n("intro.markSeen",{method:"PUT",path:be,body:{seen:true}})}}}var xe="everfur.intro.seen.v1:",_e=userRef=>`${xe}${userRef}`;async function Se(e,userRef){try{return await e.getItem(_e(userRef))!==null}catch{return false}}async function Ce(e,userRef,t){try{await e.setItem(_e(userRef),t)}catch{}}async function Re(e){let{repo:t,kv:n,userRef:userRef,signal:r}=e;if(userRef===null||await Se(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 Ce(n,userRef,o.value.seenAt),false):true}async function je(e){let{repo:t,kv:n,userRef:userRef}=e;if(userRef!==null){await Ce(n,userRef,(e.now?.()??/* @__PURE__ */new Date).toISOString());try{await t.markSeen()}catch{}}}var Ae=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurContext@v1"),Fe=globalThis,Ee=Fe[Ae]??(Fe[Ae]=r.createContext(null));Ee.displayName??="EverfurContext";function Ie(){let e=r.useContext(Ee);if(e===null)throw new V("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 Te=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?"":`${Te(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 De=/* @__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 Pe=["","one","two","three","four","five","six","seven","eight","nine","ten"];function numberWord(e){return Number.isInteger(e)&&e>=1&&e<=10?Pe[e]??null:null}var Oe=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?"":`${Oe(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 ze=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),Ve=globalThis;function Be(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var Ne=Ve[ze],$e=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),Le=Be(Ne)?Ne:Ve[ze]=$e();function We(){for(let e of[...Le.listeners])try{e()}catch{}}function Me(){let e={};return Le.holds.add(e),Le.holds.size===1&&We(),()=>{Le.holds.delete(e)&&Le.holds.size===0&&We()}}function Ue(e){r.useEffect(()=>e?Me():void 0,[e])}function qe(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 He=/* @__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 Ke=/* @__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 Ye(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 Ge(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Je(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=Ye(o.createdAt,n,t.now),a=i!==null&&Ge(i)?`${i} ${t.ago}`:i,l=a===null?t.kicker.replace(/\s*·\s*\{time\}
|
|
13
|
+
return Object.freeze({surface:"health_plan",petRef:t.petRef});default:return null}}function Ye(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 Ge(e){return typeof e=="string"&&/^\d+[mhdw]$/.test(e)}function Je(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=Ye(o.createdAt,n,t.now),a=i!==null&&Ge(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 Qe="your pet";var Ze=/* @__PURE__ */Symbol.for("everfur.sdk.rn.askHome");function Xe(){let e=globalThis,t=e[Ze];if(t!==void 0)return t;let n={factory:r.createContext(null),home:r.createContext(null)};return e[Ze]=n,n}var et=Xe().factory;Xe().home;var tt=()=>{};function nt(){try{return o.AppState.currentState==="active"}catch{return false}}function createAppStateLifecycle(){return{onForeground(e){let t;try{let n=o.AppState.currentState==="background";t=o.AppState.addEventListener("change",t=>{t==="background"?n=!0:t==="active"&&n&&(n=!1,e())})}catch{return tt}return()=>t.remove()},isVisible:nt}}var rt=/* @__PURE__ */Symbol.for("everfur.sdk.rn.chatPaneShown");function ot(){let e=globalThis,t=e[rt];if(t!==void 0)return t;let n=r.createContext(true);return e[rt]=n,n}var it=ot();function at(e){return e!=null&&(e.wait!==void 0||e.pick.hidden===true)}var lt=/* @__PURE__ */Object.freeze({ask:"Ask",plan:"Health Plan",records:"Records",listAll:"Ask, Health Plan and Records",listNoPlan:"Ask and Records"}),st=/* @__PURE__ */Object.freeze(["ask","plan","records"]),dt=/* @__PURE__ */Object.freeze(["ask","records"]);function ct(e){return e?dt:st}function ut(e,t){return e==="plan"&&t?"ask":e}function pt(e,t){return e.via==="link"?ut(e.ask!==void 0?"ask":e.tab,t):ut("plan",t)}function ft(e){let t=e.key===void 0?"":String(e.key);return e.via==="link"?`link:${e.tab}:${e.ask?.prompt??""}:${t}`:`plain:${t}`}var ht=6e4;function gt(e,t,n=ht){return e!==null&&t-e>=n}function bt(e){return e.pageVisible&&e.watching&>(e.lastReadAt,e.now)}function mt(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 yt(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 kt(e){return e===null?"":mt([e.checkout,e.page])}function vt(e,t){return JSON.stringify([yt(e),kt(t)])}function wt(e,t){return e!=="empty"&&e!=="ready"?false:t==="ready"||t==="failed"||t==="idle"}function xt(e,t){return e==="empty"&&!at(t?.page)}function _t(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 St=5e3;function Ct(e){return e.sameOpen?e.plan===void 0?e.planFailed?"drop":"wait":e.plan.empty?"drop":e.recordsPending?"wait":"play":"drop"}function Rt(){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 jt(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 At(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 Ft(e,t){return!e&&t}var Et=/* @__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 Et[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 Dt({name:e,enabled:false,isPending:true,limits:{}});let i=It(r,o);return r.filter(e=>o.get(e)?.granted!==true).length===0?Dt({name:e,enabled:true,isPending:false,limits:i}):Dt({name:e,enabled:false,isPending:false,limits:i,disabled:Tt(r,o)})}function It(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 Tt(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 Tt(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 Dt(e){let{runtime:t}=Ie(),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 Pt=/* @__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[Pt[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[Pt[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function Ot(e){return e<=450?"regular":e<=650?"medium":"bold"}var zt={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=Bt.get(e);n===void 0&&(n=/* @__PURE__ */new Map,Bt.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=Vt(e,t);return n.set(t,o),o}var Bt=/* @__PURE__ */new WeakMap;function Vt(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=Ot(Number(r)),i=n.face==="mono"?face(e,zt[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 Nt=/* @__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 $t=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){$t(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var Lt=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Wt={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Mt={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},Ut={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},qt={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Ht={regular:"400",medium:"500",bold:"700"},Kt={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Yt=0,Gt="System",Jt="monospace",Qt=["content","heading","control","compact","badge"];function Zt(e){let t={};for(let n of Qt)t[n]=e;return t}var Xt=[];function en(){return{family:Gt,mono:Jt,fontUrl:null,families:{regular:Gt,medium:Gt,bold:Gt,mono:Jt,monoMedium:Jt,monoBold:Jt},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:Ut,tierSizes:Zt(Ut),lineHeight:qt,weight:Ht,letterSpacing:Kt,scale:1,maxScale:Yt,scaleCaps:Lt,headingFamily:null,headingWeight:null,fontSources:Xt,roles:Nt,typeScale:1}}var tn={},nn=/* @__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 rn={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(nn.standard),emphasized:cssCubicBezier(nn.emphasized),exit:cssCubicBezier(nn.exit)},reducedMotion:false},on={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)"},an=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:on,space:Wt,radius:Mt,type:en(),motion:rn,slots:tn}),ln={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:ln,space:Wt,radius:Mt,type:en(),motion:rn,slots:tn});var sn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),dn=globalThis,cn=dn[sn]??(dn[sn]=r.createContext(an));cn.displayName??="EverfurThemeContext";function useEverfurTheme(){return r.useContext(cn)}function un(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=un(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 pn=r.forwardRef(function(e,t){return r.createElement(o.TextInput,{...e,...t===null?{}:{ref:t}})});function parseColor(e){let t=fn(e);return t===null?null:vn(t)}function fn(e){if(typeof e=="number")return bn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return hn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return hn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return gn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=hn(t);if(e!==null)return e}return/^\d+$/.test(t)?bn(Number.parseInt(t,10)):null}function hn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:yn(t[0]),g:yn(t[1]),b:yn(t[2]),a:1};if(t.length===6)return{r:mn(t,0),g:mn(t,2),b:mn(t,4),a:1};if(t.length===8){let e=mn(t,0);return{r:mn(t,2),g:mn(t,4),b:mn(t,6),a:e/255}}return null}function gn(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=kn(Number(r[0])),i=kn(Number(r[1])),a=kn(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 bn(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 mn(e,t){return Number.parseInt(e.slice(t,t+2),16)}function yn(e){return Number.parseInt(`${e??"0"}${e??"0"}`,16)}function kn(e){return Number.isFinite(e)?Math.min(255,Math.max(0,Math.round(e))):null}function vn(e){if(e.a>=1)return wn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function wn(e,t,n){return`#${xn(e)}${xn(t)}${xn(n)}`.toUpperCase()}function xn(e){return e.toString(16).padStart(2,"0")}var _n="#111111",Sn="#FFFFFF",Cn="#000000";function readableOn(e){let t=fn(e);if(t===null)return Sn;let n=An(t),r=An({r:17,g:17,b:17}),o=An({r:255,g:255,b:255});return En(n,o)>=En(n,r)?Sn:_n}function Rn(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(Sn,e)>=contrastRatio(Cn,e)?Sn:Cn}function jn(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(Sn)>=t(Cn)?Sn:Cn}function An(e){let t=Fn(e.r/255),n=Fn(e.g/255),r=Fn(e.b/255);return.2126*t+.7152*n+.0722*r}function Fn(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function En(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=fn(e),r=fn(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:In(n,o);return En(An(i),An(o))}function In(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 Tn(e,t){let n=fn(e),r=fn(t);if(n===null||r===null)return null;let o=n.a>=1?n:In(n,{...r});return wn(o.r,o.g,o.b)}function Dn(e,t){let n=fn(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 Pn=.05;function On(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(fn(e)===null)return n;if(i(e))return e;let a=Tn(e,o),l=a===null?null:fn(a),s=fn(n);if(l===null||s===null)return n;for(let e=1;e<1/Pn;e+=1){let t=e*Pn,n=(e,n)=>Math.round(e+(n-e)*t),r=wn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var zn=/* @__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"}),Bn=/* @__PURE__ */new WeakMap;function Vn(e){let t=Bn.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,...zn},i=(e,t)=>On(e,t,jn(t),Nn),a=(e,t)=>contrastRatio(e,t)>=Nn?e:Rn(t,Nn),l=[o.card,o.paper].map(e=>Tn(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 Bn.set(e,d),d}var Nn=4.5;function $n(e,t){for(let n of t)if(contrastRatio(n,e)>=Nn)return n;return Rn(e,Nn)}function Ln(e,t,n){let r=Dn(e,t);return(r===null?null:Tn(r,n))??n}function Wn(e){let t=Vn(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:$n(t.accent,[t.ink,t.onAccent]),accent2:Ln(t.accent,.75,r),accent4:Ln(t.accent,.17,r),accentChip:Ln(t.accent,.47,r),link:t.link,linkChip:Ln(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 Mn=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),Un=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),qn=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Hn=17,Kn=1.5,Yn=400,Gn=700;function Jn(e){return e<=450?"regular":e<=650?"medium":"bold"}function Qn(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Zn(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:Qn(n)}}let r=t==="$serif"?headingFace(e,Jn(n)):face(e,Jn(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Qn(n)}}function Xn(e,t,n={}){let r=Wn(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))Mn.has(e)||Un.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 qn){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:Hn,d=typeof a.lh=="number"?a.lh:Kn,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Zn(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(Yn,e),strong:(...e)=>p(Gn,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 er={".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"]}},tr=16;var nr=4e3,rr=.5;function or(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 ir(e,t,n){if(e.length===0)return n;let r=or(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=rr*e.length+1;for(let a of o)if(or(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=ir(t,o,(e.ch+rr)*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__ */
|
|
16
|
-
return i.jsxs(o.View,{style:
|
|
15
|
+
return Object.freeze({reason:userFacingError("accessDenied"),level:"user_entitlement",recoverable:false})}function Dt(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 Pt(e){let{runtime:t}=Ie(),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 Ot=/* @__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[Ot[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[Ot[t]]};let o=face(e,t);return o.fontWeight===void 0||r===null?o:{fontFamily:o.fontFamily,fontWeight:r}}function zt(e){return e<=450?"regular":e<=650?"medium":"bold"}var Vt={regular:"mono",medium:"monoMedium",bold:"monoBold"};function textRole(e,t){let n=Bt.get(e);n===void 0&&(n=/* @__PURE__ */new Map,Bt.set(e,n));let r=n.get(t);if(r!==void 0)return r;let o=Nt(e,t);return n.set(t,o),o}var Bt=/* @__PURE__ */new WeakMap;function Nt(e,t){let n=e.type.roles[t],r=n.weight==="400"&&n.face!=="mono"?e.type.weight.regular:n.weight,o=zt(Number(r)),i=n.face==="mono"?face(e,Vt[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 $t=/* @__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 Lt=Object.freeze;function deepFreeze(e){if(e!==null&&typeof e=="object"&&!Object.isFrozen(e)){Lt(e);for(let t of Object.keys(e))deepFreeze(e[t])}return e}var Wt=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3});var Mt={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},Ut={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},qt={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},Ht={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},Kt={regular:"400",medium:"500",bold:"700"},Yt={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},Gt=0,Jt="System",Qt="monospace",Zt=["content","heading","control","compact","badge"];function Xt(e){let t={};for(let n of Zt)t[n]=e;return t}var en=[];function tn(){return{family:Jt,mono:Qt,fontUrl:null,families:{regular:Jt,medium:Jt,bold:Jt,mono:Qt,monoMedium:Qt,monoBold:Qt},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:qt,tierSizes:Xt(qt),lineHeight:Ht,weight:Kt,letterSpacing:Yt,scale:1,maxScale:Gt,scaleCaps:Wt,headingFamily:null,headingWeight:null,fontSources:en,roles:$t,typeScale:1}}var nn={},rn=/* @__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(rn.standard),emphasized:cssCubicBezier(rn.emphasized),exit:cssCubicBezier(rn.exit)},reducedMotion:false},an={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)"},ln=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:an,space:Mt,radius:Ut,type:tn(),motion:on,slots:nn}),sn={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:sn,space:Mt,radius:Ut,type:tn(),motion:on,slots:nn});var dn=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),cn=globalThis,un=cn[dn]??(cn[dn]=r.createContext(ln));un.displayName??="EverfurThemeContext";function useEverfurTheme(){return r.useContext(un)}function pn(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=pn(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 fn=r.forwardRef(function(e,t){return r.createElement(o.TextInput,{...e,...t===null?{}:{ref:t}})});function parseColor(e){let t=hn(e);return t===null?null:wn(t)}function hn(e){if(typeof e=="number")return mn(e);if(typeof e!="string")return null;let t=e.trim();if(t.length===0)return null;if(t.startsWith("#"))return gn(t.slice(1));if(t.toLowerCase().startsWith("0x"))return gn(t.slice(2));if(t.toLowerCase().startsWith("rgb"))return bn(t);if(/^[0-9a-fA-F]+$/.test(t)){let e=gn(t);if(e!==null)return e}return/^\d+$/.test(t)?mn(Number.parseInt(t,10)):null}function gn(e){let t=e.trim();if(!/^[0-9a-fA-F]+$/.test(t))return null;if(t.length===3)return{r:kn(t[0]),g:kn(t[1]),b:kn(t[2]),a:1};if(t.length===6)return{r:yn(t,0),g:yn(t,2),b:yn(t,4),a:1};if(t.length===8){let e=yn(t,0);return{r:yn(t,2),g:yn(t,4),b:yn(t,6),a:e/255}}return null}function bn(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 mn(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 yn(e,t){return Number.parseInt(e.slice(t,t+2),16)}function kn(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 wn(e){if(e.a>=1)return xn(e.r,e.g,e.b);let t=Math.round(e.a*1e3)/1e3;return`rgba(${e.r},${e.g},${e.b},${t})`}function xn(e,t,n){return`#${_n(e)}${_n(t)}${_n(n)}`.toUpperCase()}function _n(e){return e.toString(16).padStart(2,"0")}var Sn="#111111",Cn="#FFFFFF",Rn="#000000";function readableOn(e){let t=hn(e);if(t===null)return Cn;let n=Fn(t),r=Fn({r:17,g:17,b:17}),o=Fn({r:255,g:255,b:255});return In(n,o)>=In(n,r)?Cn:Sn}function jn(e,t){let n=readableOn(e);return contrastRatio(n,e)>=t?n:contrastRatio(Cn,e)>=contrastRatio(Rn,e)?Cn:Rn}function An(e){let t=t=>e.reduce((e,n)=>Math.min(e,contrastRatio(t,n)),Number.POSITIVE_INFINITY);return t(Cn)>=t(Rn)?Cn:Rn}function Fn(e){let t=En(e.r/255),n=En(e.g/255),r=En(e.b/255);return.2126*t+.7152*n+.0722*r}function En(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function In(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}function contrastRatio(e,t){let n=hn(e),r=hn(t);if(n===null||r===null)return 1;let o=r.a>=1?r:{...r},i=n.a>=1?n:Tn(n,o);return In(Fn(i),Fn(o))}function Tn(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 Dn(e,t){let n=hn(e),r=hn(t);if(n===null||r===null)return null;let o=n.a>=1?n:Tn(n,{...r});return xn(o.r,o.g,o.b)}function Pn(e,t){let n=hn(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 On=.05;function zn(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(hn(e)===null)return n;if(i(e))return e;let a=Dn(e,o),l=a===null?null:hn(a),s=hn(n);if(l===null||s===null)return n;for(let e=1;e<1/On;e+=1){let t=e*On,n=(e,n)=>Math.round(e+(n-e)*t),r=xn(n(l.r,s.r),n(l.g,s.g),n(l.b,s.b));if(i(r))return r}return n}var Vn=/* @__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"}),Bn=/* @__PURE__ */new WeakMap;function Nn(e){let t=Bn.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,...Vn},i=(e,t)=>zn(e,t,An(t),$n),a=(e,t)=>contrastRatio(e,t)>=$n?e:jn(t,$n),l=[o.card,o.paper].map(e=>Dn(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 Bn.set(e,d),d}var $n=4.5;function Ln(e,t){for(let n of t)if(contrastRatio(n,e)>=$n)return n;return jn(e,$n)}function Wn(e,t,n){let r=Pn(e,t);return(r===null?null:Dn(r,n))??n}function Mn(e){let t=Nn(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:Ln(t.accent,[t.ink,t.onAccent]),accent2:Wn(t.accent,.75,r),accent4:Wn(t.accent,.17,r),accentChip:Wn(t.accent,.47,r),link:t.link,linkChip:Wn(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 Un=/* @__PURE__ */new Set(["color","fontSize","fontWeight","fontStyle","lh","ls","family","textAlign","textTransform","textDecorationLine"]),qn=/* @__PURE__ */new Set(["dur","delay","stagger","ease","tint","k","cols","nowrap"]),Hn=["paddingTop","paddingRight","paddingBottom","paddingLeft"],Kn=17,Yn=1.5,Gn=400,Jn=700;function Qn(e){return e<=450?"regular":e<=650?"medium":"bold"}function Zn(e){let t=Math.min(900,Math.max(100,Math.round(e/100)*100));return String(t)}function Xn(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:Zn(n)}}let r=t==="$serif"?headingFace(e,Qn(n)):face(e,Qn(n));return r.fontWeight===void 0?{fontFamily:r.fontFamily}:{fontFamily:r.fontFamily,fontWeight:Zn(n)}}function er(e,t,n={}){let r=Mn(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))Un.has(e)||qn.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 Hn){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:Kn,d=typeof a.lh=="number"?a.lh:Yn,c=typeof a.fontWeight=="string"?Number(a.fontWeight):t,p=typeof a.family=="string"?a.family:"$sans",f={...Xn(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(Gn,e),strong:(...e)=>p(Jn,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 tr={".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"]}},nr=16;var rr=4e3,or=.5;function ir(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 ar(e,t,n){if(e.length===0)return n;let r=ir(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=or*e.length+1;for(let a of o)if(ir(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=ar(t,o,(e.ch+or)*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__ */
|
|
16
|
+
return i.jsxs(o.View,{style:lr.wrap,children:[
|
|
17
17
|
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:p===null?t:[t,{maxWidth:p}],accessibilityRole:"header",children:e}),
|
|
18
|
-
/* @__PURE__ */i.jsx(o.View,{style:
|
|
18
|
+
/* @__PURE__ */i.jsx(o.View,{style:lr.probeClip,pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */i.jsxs(o.View,{style:lr.probeRow,children:[
|
|
19
19
|
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.ch=t}),children:"0"}),
|
|
20
|
-
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:a.join(" ")}),a.map((e,n)=>/* @__PURE__ */i.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var
|
|
21
|
-
return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function
|
|
22
|
-
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Hr={".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"}},Kr={".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}},Yr=[.23,1,.32,1],Gr=[.32,.72,0,1],Jr={opacity:0,translateY:8},Qr={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Zr={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},Xr={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=Xr[e];/* @__PURE__ */
|
|
23
|
-
return i.jsx(o.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
|
|
24
|
-
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?
|
|
20
|
+
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.line=t}),children:a.join(" ")}),a.map((e,n)=>/* @__PURE__ */i.jsx(Text,{tier:"heading",style:t,onLayout:h((e,t)=>{e.words[n]=t}),children:e},`${n}:${e}`))]})})]})}var lr=o.StyleSheet.create({wrap:{alignSelf:"stretch",alignItems:"center"},probeClip:{position:"absolute",left:0,top:0,width:0,height:0,overflow:"hidden",opacity:0},probeRow:{width:rr,flexDirection:"row",alignItems:"flex-start"}});function sr(e){return{kit:er(e,tr),Title:BalancedTitle,titleCh:nr}}function dr(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 cr(e,t){let n=dr(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 ur=/* @__PURE__ */new Set(["expo","fcm","apns"]),pr=/* @__PURE__ */new Set(["ios","android"]),fr=4096,hr=128,gr=64,br=/[\0- ]/;function mr(e,t){return makeEverfurError("validationFailed",{retryable:false,wireMessage:e,...t?{reasonCode:t}:{}})}function yr(e){if(typeof e!="object"||e===null)return mr("registerDevice needs an input object");let{token:t,provider:n,platform:r,installationId:o}=e;return typeof n!="string"||!ur.has(n)?mr("provider must be expo, fcm or apns"):typeof r!="string"||!pr.has(r)?mr("platform must be ios or android"):typeof t!="string"||t.trim().length===0||t.length>fr||br.test(t)?mr(`token must be a push token of 1..${fr} characters with no whitespace`,"token_invalid"):o!==void 0&&(typeof o!="string"||o.length===0||o.length>hr)?mr(`installationId must be 1..${hr} characters`):null}var kr=/^[A-Za-z][A-Za-z0-9_+-]*(\/[A-Za-z0-9_+-]+){0,2}$/,vr=64,wr=/^[A-Za-z]{2,8}(-[A-Za-z0-9]{1,8})*$/,xr=35;function _r(e){return e.httpStatus===400&&e.code==="validationFailed"}function Sr(e){let t={...e};return delete t.timezone,delete t.locale,t}function Cr(e,t,n){return typeof e=="string"&&e.length<=n&&t.test(e)?e:null}function Rr(e){return typeof e!="string"||e.length===0||e.length>gr?mr(`deviceId must be 1..${gr} characters`):br.test(e)||e.includes("/")||e==="."||e===".."?mr("deviceId is not a device id"):null}function jr(e){if(typeof e!="object"||e===null)return mr("setPreferences needs an input object");let{pushEnabled:t,emailEnabled:n}=e;return typeof t!="boolean"||typeof n!="boolean"?mr("pushEnabled and emailEnabled must both be booleans: the route replaces both switches"):null}function Ar(e){return typeof e=="string"&&e.length>0?e:null}function Fr(e){if(typeof e!="object"||e===null)return null;let t=e,n=Ar(t.device_id),r=Ar(t.provider),o=Ar(t.platform),i=Ar(t.registered_at),a=Ar(t.last_seen_at);if(n===null||r===null||o===null||i===null||a===null||!ur.has(r)||!pr.has(o))return null;let l=t.installation_id;/* @__PURE__ */
|
|
21
|
+
return Object.freeze({deviceId:n,provider:r,platform:o,installationId:typeof l=="string"&&l.length>0?l:null,registeredAt:i,lastSeenAt:a})}function Er(e){if(typeof e!="object"||e===null)return null;let t=e,n=Ar(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 Ir(e){return makeEverfurError("internalError",{retryable:false,wireMessage:`${e}: the response was not the documented shape`})}var Tr=/* @__PURE__ */Object.freeze({provider_unsupported:{code:"validationFailed",retryable:false},token_invalid:{code:"validationFailed",retryable:false},device_cipher_unavailable:{code:"serviceUnavailable",retryable:true}});function Dr(e){return cr(e,Tr)}function Pr(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 Or({auth:t.authFor(null),...t.errorPolicy?{errorPolicy:t.errorPolicy}:{}})};return{registerDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Pr("registerDevice"))):t().registerDevice(n,r),unregisterDevice:(n,r)=>e.isDisposed?Promise.resolve(err(Pr("unregisterDevice"))):t().unregisterDevice(n,r),setPreferences:(n,r)=>e.isDisposed?Promise.resolve(err(Pr("setPreferences"))):t().setPreferences(n,r)}}function Or(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=yr(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=Cr(e.timezone,kr,vr);a!==null&&(i.timezone=a);let l=Cr(e.locale,wr,xr);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&&_r(d.error)&&(a!==null||l!==null)&&(d=await s(Sr(i))),!d.ok)return err(Dr(d.error));let c=Fr(d.value);return c===null?err(Ir("registerDevice")):ok(c)},async unregisterDevice(e,r){let o=Rr(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(Dr(i.error))},async setPreferences(e,r){let o=jr(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(Dr(i.error));let a=Er(i.value);return a===null?err(Ir("setPreferences")):ok(a)}}}function zr(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 Vr=/* @__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 Br=/* @__PURE__ */Object.freeze({title:Vr.title,titleFor:e=>{let t=e?.trim()??"";return t.length>0?`Request ${t}’s records`:Vr.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:Vr.placeholder,searchA11y:Vr.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:Vr.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 Nr=1.609344;function $r(e){return e===null||!Number.isFinite(e)?null:(e/Nr).toFixed(1)}function Lr(e){let t=$r(e);return t===null?"":`${t} mi`}var Wr=300,Mr=2;var Ur=/* @__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 qr(e,t){let[n,o]=r.useState(""),[i,a]=r.useState(""),[l,s]=r.useState([]),[d,c]=r.useState(null),[u,p]=r.useState([]),[f,h]=r.useState(true),[g,b]=r.useState(false),[m,y]=r.useState(false),[k,v]=r.useState(null),[w,x]=r.useState(null),[_,S]=r.useState(0),C=r.useRef(0),R=r.useRef(true),j=t?.latitude,A=t?.longitude,F=r.useMemo(()=>void 0,[j,A]);r.useEffect(()=>(R.current=true,()=>{R.current=false,C.current+=1}),[e]),r.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]),r.useEffect(()=>{let e=n.trim();if(e.length<Mr){a("");return}let t=setTimeout(()=>a(e),Wr);return()=>clearTimeout(t)},[n]);let E=i.length>=Mr;r.useEffect(()=>{let t=C.current+=1;if(s([]),c(null),v(null),x(null),!E){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)):v(e.error),b(false))}).catch(()=>{R.current&&t===C.current&&b(false)})},[e,i,E,F,_]);let I=r.useCallback(()=>{if(!E||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,E,m,F]),T=r.useCallback(e=>o(e),[]),D=r.useCallback(()=>S(e=>e+1),[]);return r.useMemo(()=>({query:n,debouncedQuery:i,isSearchActive:E,clinics:l,recent:u,recentLoading:f,initialLoading:g,loadingMore:m,hasNextPage:d!==null,error:k,pageError:w,setQuery:T,loadMore:I,retry:D}),[n,i,E,l,u,f,g,m,d,k,w,T,I,D])}function Hr(e,t,n,r){/* @__PURE__ */
|
|
22
|
+
return Object.freeze({key:e?.id??`free:${t??""}`,clinic:e,freeText:t,email:n,idempotencyKey:r})}var Kr={".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"}},Yr={".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}},Gr=[.23,1,.32,1],Jr=[.32,.72,0,1],Qr={opacity:0,translateY:8},Zr={tabTop:140,tabHeight:46,sheetGap:10,sheetTopAll:56},Xr={toastY:-8,bannerY:-60,pillScale:.94,pressScale:.97,blankDrop:3,rows:{dur:260,delay:560,stagger:60},blanks:{dur:520,delay:300,stagger:80}},eo={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=eo[e];/* @__PURE__ */
|
|
23
|
+
return i.jsx(o.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 to={transform:[{scale:Xr.pressScale}]};function IntroButton({kit:e,label:t,onPress:n,rules:r=[],disabled:a=false,busy:l=false,icon:s,style:d,testID:c}){let u=[".emb-btn",".in-body .emb-btn",...r,a&&".emb-btn[disabled]"];/* @__PURE__ */
|
|
24
|
+
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?to: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")}),
|
|
25
25
|
/* @__PURE__ */i.jsx(Text,{tier:"control",style:e.text(...u),children:t})]})}function IntroLink({kit:e,label:t,onPress:n,rules:r=[],testID:a}){/* @__PURE__ */
|
|
26
|
-
return i.jsx(o.Pressable,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?
|
|
27
|
-
return i.jsx(o.View,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */i.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__ */i.jsx(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var
|
|
26
|
+
return i.jsx(o.Pressable,{accessibilityRole:"link",onPress:n,style:({pressed:t})=>[e.view(".in-link",...r),{justifyContent:"center"},t&&!e.reduced?to:null],...a===void 0?{}:{testID:a},children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:e.text(".in-link",...r),children:t})})}var no=r.forwardRef(function({kit:e,words:t,testID:n},r){/* @__PURE__ */
|
|
27
|
+
return i.jsx(o.View,{ref:r,accessible:true,accessibilityRole:"header",accessibilityLabel:t,style:e.view(".in-h"),...n===void 0?{}:{testID:n},children:/* @__PURE__ */i.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__ */i.jsx(Text,{style:[e.view(...n),e.text(...n)],...r===void 0?{}:{testID:r},children:t})}var ro=/^[^@\s]+@[^@\s]+\.[^@\s]+$/,oo={transform:[{scale:Xr.pressScale}]};function io(e){return[e.address?.trim()??"",Lr(e.distanceKm)].filter(e=>e!=="").join(" · ")}function Field({kit:e,icon:t,value:n,placeholder:r,label:a,onChange:l,onSubmit:s,kind:d,maxLength:c,testID:u}){/* @__PURE__ */
|
|
28
28
|
return i.jsxs(o.View,{style:e.view(".in-search"),children:[t?/* @__PURE__ */i.jsx(IntroIcon,{name:"search",style:e.icon(".in-search svg")}):null,
|
|
29
|
-
/* @__PURE__ */i.jsx(
|
|
29
|
+
/* @__PURE__ */i.jsx(fn,{value:n,placeholder:r,placeholderTextColor:e.colors.ink3,accessibilityLabel:a,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 ao=r.forwardRef(function({kit:e,text:t,onPick:a,onUpload:l},s){let d=n.useEverfurRecordsClinic(),c=qr(d),u=r.useRef(te()),[p,f]=r.useState(null),[h,g]=r.useState(false),[b,m]=r.useState(""),[y,k]=r.useState(""),v=c.isSearchActive?c.clinics:c.recent,w=v.find(e=>e.id===p)??v[0]??null,x=c.isSearchActive&&!c.initialLoading&&c.error===null&&v.length===0,_=b.trim()===""?c.query.trim():b.trim(),S=_!==""&&ro.test(y.trim()),C=()=>{if(h){S&&a(Hr(null,_,y.trim().toLowerCase(),u.current()));return}w!==null&&a(Hr(w,null,"",u.current()))},R=h?S:w!==null,j=c.initialLoading||!c.isSearchActive&&c.recentLoading;/* @__PURE__ */
|
|
30
30
|
return i.jsxs(i.Fragment,{children:[
|
|
31
|
-
/* @__PURE__ */i.jsx(
|
|
31
|
+
/* @__PURE__ */i.jsx(no,{ref:s,kit:e,words:t.title,testID:"everfur-intro-title"}),
|
|
32
32
|
/* @__PURE__ */i.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__ */i.jsxs(o.View,{style:e.view(".in-clinics"),children:[
|
|
33
33
|
/* @__PURE__ */i.jsx(Field,{kit:e,icon:false,kind:"text",value:b===""?c.query:b,placeholder:Br.fallback.namePlaceholder,label:Br.fallback.nameLabel,maxLength:200,onChange:m,testID:"everfur-intro-clinic-name"}),
|
|
34
34
|
/* @__PURE__ */i.jsx(Field,{kit:e,icon:false,kind:"email",value:y,placeholder:Br.fallback.emailPlaceholder,label:Br.fallback.emailLabel,maxLength:320,onChange:k,onSubmit:C,testID:"everfur-intro-clinic-email"}),
|
|
35
|
-
/* @__PURE__ */i.jsx(IntroLine,{kit:e,words:Br.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */i.jsxs(o.View,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:j},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[v.map(t=>{let n=w?.id===t.id,r=
|
|
36
|
-
return i.jsxs(o.Pressable,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>f(t.id),style:({pressed:t})=>[e.view(".in-clinic",a),t&&!e.reduced?
|
|
35
|
+
/* @__PURE__ */i.jsx(IntroLine,{kit:e,words:Br.fallback.reviewNote,rules:[".in-p",".in-p--s"]})]}):/* @__PURE__ */i.jsxs(o.View,{accessibilityRole:"radiogroup",accessibilityLabel:t.list,accessibilityState:{busy:j},style:e.view(".in-clinics"),testID:"everfur-intro-clinics",children:[v.map(t=>{let n=w?.id===t.id,r=io(t),a=n&&'.in-clinic[aria-checked="true"]';/* @__PURE__ */
|
|
36
|
+
return i.jsxs(o.Pressable,{accessibilityRole:"radio",accessibilityState:{checked:n},accessibilityLabel:r===""?t.name:`${t.name}, ${r}`,onPress:()=>f(t.id),style:({pressed:t})=>[e.view(".in-clinic",a),t&&!e.reduced?oo:null],testID:`everfur-intro-clinic-${t.id}`,children:[
|
|
37
37
|
/* @__PURE__ */i.jsxs(o.View,{style:e.col(".in-clinic",0),children:[
|
|
38
38
|
/* @__PURE__ */i.jsx(Text,{style:e.strong(".in-clinic",".in-clinic b"),children:t.name}),r===""?null:/* @__PURE__ */i.jsx(Text,{style:[e.view(".in-clinic small"),e.text(".in-clinic",".in-clinic small")],children:r})]}),
|
|
39
39
|
/* @__PURE__ */i.jsx(o.View,{style:[e.view(".in-tick",n&&'.in-clinic[aria-checked="true"] .in-tick'),e.col(".in-clinic",1)],children:/* @__PURE__ */i.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__ */i.jsxs(o.View,{accessibilityRole:"alert",style:e.view(".in-none"),testID:"everfur-intro-clinic-error",children:[
|
|
40
|
-
/* @__PURE__ */i.jsx(Text,{style:e.text(".in-none"),children:c.error.displayMessage}),c.error.retryable?/* @__PURE__ */i.jsx(IntroLink,{kit:e,label:
|
|
40
|
+
/* @__PURE__ */i.jsx(Text,{style:e.text(".in-none"),children:c.error.displayMessage}),c.error.retryable?/* @__PURE__ */i.jsx(IntroLink,{kit:e,label:Ur.retry,onPress:c.retry,rules:[".in-none .in-link"],testID:"everfur-intro-clinic-retry"}):null]}):null,x?/* @__PURE__ */i.jsxs(o.View,{style:e.view(".in-none"),testID:"everfur-intro-clinic-none",children:[
|
|
41
41
|
/* @__PURE__ */i.jsx(Text,{style:e.text(".in-none"),children:`${Br.fallback.title} ${Br.fallback.subtitle}`}),
|
|
42
42
|
/* @__PURE__ */i.jsx(IntroLink,{kit:e,label:t.add,onPress:()=>g(true),rules:[".in-none .in-link"],testID:"everfur-intro-clinic-add"})]}):null]}),
|
|
43
43
|
/* @__PURE__ */i.jsx(IntroLine,{kit:e,words:t.more,rules:[".in-p",".in-p--s"]}),
|
|
44
44
|
/* @__PURE__ */i.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__ */i.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:a}){/* @__PURE__ */
|
|
45
|
-
return i.jsx(n.EverfurRecordsConsent,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...r===void 0?{}:{ownerName:r},...o===void 0?{}:{onCaptureSignature:o},onCreated:a,style:{flex:1}})}function
|
|
45
|
+
return i.jsx(n.EverfurRecordsConsent,{petRef:petRef,...e===void 0?{}:{petName:e},clinic:t,...r===void 0?{}:{ownerName:r},...o===void 0?{}:{onCaptureSignature:o},onCreated:a,style:{flex:1}})}function lo(e){return er(e,Kr,Yr)}var so=60,co=24,uo=240,po=o.Easing.bezier(.25,.1,.25,1),fo=o.Easing.bezier(.42,0,.58,1),ho=o.Easing.bezier(...Gr),go=o.Easing.bezier(...Jr),bo=8,mo=o.Platform.OS==="ios",yo=o.Platform.OS!=="web";function ko(e){return e===null?po:o.Easing.bezier(...e)}function vo(e){if(e===null)return;let t=o.AccessibilityInfo.sendAccessibilityEvent;typeof t=="function"&&t.call(o.AccessibilityInfo,e,"focus")}function EverfurIntro(e){let{petRef:petRef,onClose:t,onClosed:n,onFrame:a}=e,l=e.mode??"intro",s=useEverfurTheme(),d=r.useMemo(()=>lo(s),[s]),c=d.reduced,{runtime:u}=Ie(),p=r.useMemo(()=>({...De,...e.copy}),[e.copy]),f=r.useMemo(()=>introFacts(e.page??null,e.petName),[e.page,e.petName]),h=r.useMemo(()=>e.blanks??defaultIntroBlanks(f.pet),[e.blanks,f.pet]),g=r.useMemo(()=>introText({facts:f,copy:p,blanks:h.length,resultsPending:e.resultsPending===true}),[f,p,h.length,e.resultsPending]),[b,m]=r.useState(l==="records"?"clinic":"tabs"),[y,k]=r.useState(false),[v,w]=r.useState(false),[x,_]=r.useState(null),S=r.useRef(/* @__PURE__ */new Map),[C,R]=r.useState(""),[j,A]=r.useState(false),[F,E]=r.useState(0),[I,T]=r.useState(0),D=r.useRef(false),P=r.useRef(0),O=r.useRef(0),z=r.useRef(null),V=r.useRef(null),B=r.useRef([]),N=r.useCallback((e,t)=>{B.current.push(setTimeout(e,t))},[]);r.useEffect(()=>()=>B.current.forEach(clearTimeout),[]);let $=r.useRef(new o.Animated.Value(0)).current,L=r.useRef(new o.Animated.Value(0)).current,W=r.useRef(new o.Animated.Value(0)).current,M=r.useRef(new o.Animated.Value(0)).current,U=r.useRef(new o.Animated.Value(1)).current,q=r.useRef([0,1,2].map(()=>new o.Animated.Value(c?1:0))).current,H=b!=="tabs",K=r.useRef(new o.Animated.Value(H?1:0)).current,Y=r.useRef(false);r.useEffect(()=>{a?.(v?null:b)},[b,v,a]),r.useEffect(()=>()=>a?.(null),[a]);let G=r.useRef(b);G.current=b;let J=r.useCallback(()=>{N(()=>vo(G.current==="consent"?V.current:z.current),so)},[N]),Q=e=>{let t=Math.round(e.nativeEvent.layout.height);if(t!==I&&T(t),Y.current||D.current)return;Y.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"),i=[o.Animated.timing($,{toValue:1,duration:n.dur,easing:c?po:go,useNativeDriver:yo}),o.Animated.timing(L,{toValue:1,duration:r.dur,easing:ko(r.ease),useNativeDriver:yo})];if(!c&&b==="tabs"){let e=Xr.rows;q.forEach((t,n)=>i.push(o.Animated.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:ho,useNativeDriver:yo})))}o.Animated.parallel(i).start(),J()};r.useEffect(()=>{if(D.current)return;let e=H?d.motion(".in-dim",".ph-intro.is-on.is-all .in-dim--mid"):d.motion(".in-dim");o.Animated.timing(W,{toValue:H?1:0,duration:e.dur,easing:ko(e.ease),useNativeDriver:yo}).start();let t=d.motion(".in-bars b::after");o.Animated.timing(K,{toValue:H?1:0,duration:t.dur,easing:ko(t.ease),useNativeDriver:false}).start()},[H,d,W,K]);let Z=r.useMemo(()=>h.map(()=>new o.Animated.Value(0)),[h]);r.useEffect(()=>{if(b!=="ask"||c)return;let e=Xr.blanks;Z.forEach(e=>e.setValue(0));let t=o.Animated.parallel(Z.map((t,n)=>o.Animated.timing(t,{toValue:1,duration:e.dur,delay:e.delay+n*e.stagger,easing:fo,useNativeDriver:false})));return t.start(),()=>t.stop()},[b,c,Z]);let X=r.useCallback((e,t=false)=>{k(t),m(e),P.current=0,U.setValue(0),o.Animated.timing(U,{toValue:1,duration:c?150:uo,easing:c?po:ho,useNativeDriver:yo}).start(),J()},[U,c,J]),ee=r.useCallback((e,r=null,i=null)=>{if(D.current)return;D.current=true,w(true),t({exit:e,toast:r,notifications:i});let a=d.motion(".in-sheet"),l=d.motion(".in-dim");o.Animated.parallel([o.Animated.timing($,{toValue:0,duration:a.dur,easing:c?po:ho,useNativeDriver:yo}),o.Animated.timing(L,{toValue:0,duration:l.dur,easing:ko(l.ease),useNativeDriver:yo}),o.Animated.timing(W,{toValue:0,duration:l.dur,easing:ko(l.ease),useNativeDriver:yo})]).start(),N(()=>n?.(),c?160:260)},[t,n,N,c,d,$,L,W]),te=r.useCallback(()=>ee(l==="records"?"stay":"ask"),[ee,l]),ne=r.useCallback(e=>ee("plan",e?g.toast.on:g.toast.off,e),[ee,g]),re=e.onUpload,oe=r.useMemo(()=>re===void 0?void 0:()=>{ee("stay"),re()},[re,ee]),ie=r.useRef(false),ae=r.useCallback(async()=>{if(ie.current)return;ie.current=true,A(true);let t=false;try{e.onEnableNotifications!==void 0?t=await e.onEnableNotifications()===!0:t=(await createNotificationsClient(u).setPreferences({pushEnabled:!0,emailEnabled:!0})).ok}catch{t=false}ie.current=false,A(false),ne(t)},[e,u,ne]),le=()=>{D.current||(b==="sent"?ne(false):te())},se=r.useRef(te);se.current=te;let de=r.useRef(true);de.current=b!=="sent"&&b!=="consent"&&!v;let ce=r.useMemo(()=>o.PanResponder.create({onMoveShouldSetPanResponderCapture:(e,t)=>de.current&&P.current<=0&&t.dy>bo&&Math.abs(t.dy)>Math.abs(t.dx),onPanResponderGrant:()=>{O.current===0&&(O.current=Date.now())},onPanResponderMove:(e,t)=>M.setValue(t.dy>0?t.dy:t.dy/4),onPanResponderRelease:(e,t)=>{let n=Date.now()-(O.current||Date.now());O.current=0,isIntroSwipeOut(t.dy,n)?se.current():o.Animated.timing(M,{toValue:0,duration:d.motion(".in-sheet",".ph-intro.is-on .in-sheet").dur,easing:go,useNativeDriver:yo}).start()},onPanResponderTerminate:()=>{O.current=0,o.Animated.timing(M,{toValue:0,duration:uo,easing:ho,useNativeDriver:yo}).start()}}),[M,d]),ue=r.useCallback(t=>{let n=x===null?"":x.clinic?.name??x.freeText??"",r={petRef:petRef,clinicName:n,requestId:t.id,at:/* @__PURE__ */(new Date).toISOString()};R(n),e.onRequested?.(r),X("sent")},[x,petRef,e,X]),pe=e.tabBar?.top??Zr.tabTop,fe=e.tabBar?.height??Zr.tabHeight,he=F===0?void 0:H?F-Zr.sheetTopAll:F-pe-fe-Zr.sheetGap,ge=b==="clinic"&&l!=="records"||b==="novet"||b==="consent",be=b!=="sent",me=I>0?I:F>0?F:1e3,ye=c?{opacity:$,transform:[{translateY:M}]}:{transform:[{translateY:o.Animated.add($.interpolate({inputRange:[0,1],outputRange:[me,0]}),M)}]},ke=c?{opacity:U}:{opacity:U,transform:[{translateX:U.interpolate({inputRange:[0,1],outputRange:[y?-co:co,0]})}]},ve=e=>{let t=s.meta.hidePoweredBy?null:/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-by"),children:[
|
|
46
46
|
/* @__PURE__ */i.jsx(Text,{tier:"compact",style:d.text(".in-eyebrow",".in-by"),children:g.poweredBy}),
|
|
47
|
-
/* @__PURE__ */i.jsx(IntroIcon,{name:"wordmark",style:d.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */i.jsx(Text,{tier:"compact",style:d.text(".in-eyebrow"),children:e}),t]})},we=e=>e===""?null:/* @__PURE__ */i.jsx(
|
|
47
|
+
/* @__PURE__ */i.jsx(IntroIcon,{name:"wordmark",style:d.icon(".in-by svg")})]});return e===""&&t===null?null:/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-eyebrow"),children:[e===""?null:/* @__PURE__ */i.jsx(Text,{tier:"compact",style:d.text(".in-eyebrow"),children:e}),t]})},we=e=>e===""?null:/* @__PURE__ */i.jsx(no,{ref:z,kit:d,words:e,testID:"everfur-intro-title"}),xe=(e,t)=>e===""?null:t?/* @__PURE__ */i.jsx(o.View,{ref:z,accessible:true,accessibilityLabel:e,children:/* @__PURE__ */i.jsx(IntroLine,{kit:d,words:e,rules:[".in-p"]})}):/* @__PURE__ */i.jsx(IntroLine,{kit:d,words:e,rules:[".in-p"]}),_e=null;if(b==="tabs"){let t=[["ask","chat",".in-ic--y",e.tabLabels?.ask??"Ask",g.tabs.ask],["plan","heartcheck",".in-ic--c",e.tabLabels?.plan??"Health Plan",g.tabs.plan],["records","file",".in-ic--g",e.tabLabels?.records??"Records",g.tabs.records]];_e=/* @__PURE__ */i.jsxs(i.Fragment,{children:[ve(g.tabs.eyebrow),we(g.tabs.title),
|
|
48
48
|
/* @__PURE__ */i.jsx(IntroLine,{kit:d,words:g.tabs.lede,rules:[".in-p"]}),
|
|
49
|
-
/* @__PURE__ */i.jsx(o.View,{accessibilityRole:"list",style:d.view(".in-rows"),children:t.map(([e,t,n,r,a],l)=>{let s=q[l],u=c?null:{opacity:s.interpolate({inputRange:[0,1],outputRange:[
|
|
49
|
+
/* @__PURE__ */i.jsx(o.View,{accessibilityRole:"list",style:d.view(".in-rows"),children:t.map(([e,t,n,r,a],l)=>{let s=q[l],u=c?null:{opacity:s.interpolate({inputRange:[0,1],outputRange:[Qr.opacity,1]}),transform:[{translateY:s.interpolate({inputRange:[0,1],outputRange:[Qr.translateY,0]})}]};/* @__PURE__ */
|
|
50
50
|
return i.jsxs(o.Animated.View,{style:[d.view(".in-rows li"),u],testID:`everfur-intro-row-${e}`,children:[
|
|
51
51
|
/* @__PURE__ */i.jsx(o.View,{style:[d.view(".in-ic",n),d.col(".in-rows li",0)],children:/* @__PURE__ */i.jsx(IntroIcon,{name:t,style:d.icon(".in-ic svg")})}),
|
|
52
52
|
/* @__PURE__ */i.jsxs(o.View,{style:d.col(".in-rows li",1),children:[
|
|
@@ -56,7 +56,7 @@ return i.jsxs(o.Animated.View,{style:[d.view(".in-rows li"),u],testID:`everfur-i
|
|
|
56
56
|
/* @__PURE__ */i.jsx(IntroButton,{kit:d,label:g.ask.later,onPress:te,rules:[".emb-btn--ghost"],style:d.col(".in-pair",0),testID:"everfur-intro-later"}),
|
|
57
57
|
/* @__PURE__ */i.jsx(IntroButton,{kit:d,label:g.ask.connect,onPress:()=>X("clinic"),style:d.col(".in-pair",1),testID:"everfur-intro-connect"})]}),
|
|
58
58
|
/* @__PURE__ */i.jsx(IntroLine,{kit:d,words:g.ask.fine,rules:[".in-fine"]}),
|
|
59
|
-
/* @__PURE__ */i.jsx(IntroLink,{kit:d,label:g.ask.noVet,onPress:()=>X("novet"),testID:"everfur-intro-novet"})]});else if(b==="clinic")_e=/* @__PURE__ */i.jsx(
|
|
59
|
+
/* @__PURE__ */i.jsx(IntroLink,{kit:d,label:g.ask.noVet,onPress:()=>X("novet"),testID:"everfur-intro-novet"})]});else if(b==="clinic")_e=/* @__PURE__ */i.jsx(ao,{ref:z,kit:d,text:g.clinic,onPick:e=>{_(zr(S.current,e)),X("consent")},...oe===void 0?{}:{onUpload:oe}});else if(b==="consent")_e=x===null?null:/* @__PURE__ */i.jsx(IntroConsentFrame,{petRef:petRef,...f.pet.name==="your pet"?{}:{petName:f.pet.name},draft:x,...e.ownerName===void 0?{}:{ownerName:e.ownerName},...e.onCaptureSignature===void 0?{}:{onCaptureSignature:e.onCaptureSignature},onCreated:ue});else if(b==="sent"){let e=[[g.sent.sentStep,C===""?"":g.sent.sentTo(C),"done"],[g.sent.clinicStep,g.sent.clinicEta,"now"],[g.sent.blanksStep,g.sent.blanksDetail,""]];_e=/* @__PURE__ */i.jsxs(i.Fragment,{children:[ve(g.sent.eyebrow),we(g.sent.title),
|
|
60
60
|
/* @__PURE__ */i.jsx(o.View,{style:d.view(".in-sent"),children:/* @__PURE__ */i.jsx(Track,{kit:d,label:g.sent.track,steps:e.filter(([e])=>e!=="")})}),
|
|
61
61
|
/* @__PURE__ */i.jsx(IntroLine,{kit:d,words:g.sent.lede,rules:[".in-p"]}),
|
|
62
62
|
/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-stack"),children:[
|
|
@@ -68,9 +68,9 @@ return i.jsx(o.Modal,{transparent:true,visible:true,animationType:"none",statusB
|
|
|
68
68
|
/* @__PURE__ */i.jsx(o.Animated.View,{...Re,pointerEvents:"none",style:[d.view(".in-dim",".in-dim--top"),{height:pe,opacity:L}]}),
|
|
69
69
|
/* @__PURE__ */i.jsx(o.Animated.View,{...Re,pointerEvents:"none",style:[d.view(".in-dim"),{top:pe,height:fe,opacity:W}]}),
|
|
70
70
|
/* @__PURE__ */i.jsx(o.Animated.View,{...Re,pointerEvents:"none",style:[d.view(".in-dim",".in-dim--bot"),{top:pe+fe,opacity:L}]}),
|
|
71
|
-
/* @__PURE__ */i.jsx(o.KeyboardAvoidingView,{behavior:
|
|
71
|
+
/* @__PURE__ */i.jsx(o.KeyboardAvoidingView,{behavior:mo?"padding":void 0,enabled:!Se,pointerEvents:"box-none",style:{position:"absolute",top:0,right:0,bottom:0,left:0},children:/* @__PURE__ */i.jsxs(o.Animated.View,{accessibilityViewIsModal:true,accessibilityLabel:l==="intro"?g.sheetLabel.intro:g.sheetLabel.records,style:Ce,onLayout:Q,onTouchStart:()=>{O.current=Date.now()},...ce.panHandlers,testID:"everfur-intro-sheet",children:[
|
|
72
72
|
/* @__PURE__ */i.jsx(o.View,{...Re,style:d.view(".in-grab")}),
|
|
73
|
-
/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-top",l==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[ge?/* @__PURE__ */i.jsx(o.Pressable,{ref:
|
|
73
|
+
/* @__PURE__ */i.jsxs(o.View,{style:d.view(".in-top",l==="records"&&'.in-sheet[data-mode="records"] .in-top'),children:[ge?/* @__PURE__ */i.jsx(o.Pressable,{ref:V,accessibilityRole:"button",accessibilityLabel:g.back,style:d.view(".in-back"),onPress:()=>X(b==="consent"?"clinic":"ask",true),testID:"everfur-intro-back",children:/* @__PURE__ */i.jsx(IntroIcon,{name:"back",style:d.icon(".in-back svg")})}):null,l==="intro"?/* @__PURE__ */i.jsx(Bars,{kit:d,fill:K}):null,be&&l==="intro"?/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",style:[d.view(".in-skip"),{justifyContent:"center"}],onPress:te,testID:"everfur-intro-skip",children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:d.text(".in-skip"),children:g.skip})}):null,be&&l==="records"?/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",accessibilityLabel:g.close,style:d.view(".in-x"),onPress:te,testID:"everfur-intro-close",children:/* @__PURE__ */i.jsx(IntroIcon,{name:"x",style:d.icon(".in-x svg")})}):null]}),Se?/* @__PURE__ */i.jsx(o.View,{style:{flex:1},children:_e}):/* @__PURE__ */i.jsx(o.ScrollView,{style:{flexGrow:0,flexShrink:1},bounces:false,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,scrollEventThrottle:16,onScroll:e=>{P.current=e.nativeEvent.contentOffset.y},children:/* @__PURE__ */i.jsx(o.Animated.View,{style:[d.view(".in-body"),ke],testID:`everfur-intro-frame-${b}`,children:_e})},b)]})})]})})}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__ */
|
|
74
74
|
return i.jsxs(o.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view(".in-bars"),children:[
|
|
75
75
|
/* @__PURE__ */i.jsx(o.View,{style:e.view(".in-bars b"),children:/* @__PURE__ */i.jsx(o.View,{style:[...r,{width:"100%"}]})}),
|
|
76
76
|
/* @__PURE__ */i.jsx(o.View,{style:e.view(".in-bars b"),children:/* @__PURE__ */i.jsx(o.Animated.View,{style:[...r,{width:n}],testID:"everfur-intro-bar-2"})})]})}function Blanks({kit:e,title:t,pill:n,label:r,blanks:a,pulses:l}){let s=e.colors.accent4??"",d=e.colors.accent2??s;/* @__PURE__ */
|
|
@@ -82,35 +82,35 @@ return i.jsxs(o.View,{style:e.view(".blanks li"),testID:`everfur-intro-blank-${n
|
|
|
82
82
|
/* @__PURE__ */i.jsx(o.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[e.view(".blanks li > b"),e.col(".blanks li",0)],children:/* @__PURE__ */i.jsx(Text,{style:e.text(".blanks li > b"),children:n+1})}),
|
|
83
83
|
/* @__PURE__ */i.jsxs(o.View,{style:e.col(".blanks li",1),children:[
|
|
84
84
|
/* @__PURE__ */i.jsxs(Text,{accessibilityLabel:`${t.before}${r}${t.after}`,style:e.text(".blanks li > span"),children:[t.before,
|
|
85
|
-
/* @__PURE__ */i.jsx(o.Animated.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:
|
|
85
|
+
/* @__PURE__ */i.jsx(o.Animated.View,{style:[e.view(".blank",t.width==="s"&&".blank--s",t.width==="l"&&".blank--l"),{top:Xr.blankDrop,marginTop:-3},c]}),t.after]}),t.source===""?null:/* @__PURE__ */i.jsx(Text,{style:e.text(".blanks li > small"),children:t.source})]})]},n)})})]})}function Track({kit:e,label:t,steps:n}){/* @__PURE__ */
|
|
86
86
|
return i.jsx(o.View,{accessibilityRole:"list",accessibilityLabel:t,style:e.view(".sh-track"),children:n.map(([t,r,a],l)=>{let s=l===n.length-1,d=n[l+1]?.[2]==="done";/* @__PURE__ */
|
|
87
87
|
return i.jsxs(o.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__ */i.jsx(o.View,{style:e.view(".sh-track li::before",a==="done"&&d&&".sh-track li.is-done:has(+ li.is-done)::before")}),
|
|
88
88
|
/* @__PURE__ */i.jsx(o.View,{style:[e.view(".sh-track__dot",a==="done"&&".sh-track .is-done .sh-track__dot",a==="now"&&".sh-track .is-now .sh-track__dot"),e.col(".sh-track li",0)],children:a==="done"?/* @__PURE__ */i.jsx(IntroIcon,{name:"check",style:e.icon(".sh-track__dot svg")}):null}),
|
|
89
89
|
/* @__PURE__ */i.jsxs(o.View,{style:e.col(".sh-track li",1),children:[
|
|
90
|
-
/* @__PURE__ */i.jsx(Text,{style:e.text(".sh-track strong",a===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */i.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:i,watching:a,onPlan:l,onPlanFailed:s}){let{status:d,plan:c,refresh:u}=t.useEverfurHealthPlan({petRef:petRef}),p=r.useRef(null),f=r.useRef({plan:u,page:i,watching:a});f.current={plan:u,page:i,watching:a},r.useEffect(()=>{let t=
|
|
90
|
+
/* @__PURE__ */i.jsx(Text,{style:e.text(".sh-track strong",a===""&&".sh-track li:not(.is-done):not(.is-now) strong"),children:t}),r===""?null:/* @__PURE__ */i.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:i,watching:a,onPlan:l,onPlanFailed:s}){let{status:d,plan:c,refresh:u}=t.useEverfurHealthPlan({petRef:petRef}),p=r.useRef(null),f=r.useRef({plan:u,page:i,watching:a});f.current={plan:u,page:i,watching:a},r.useEffect(()=>{let t=wt(d,e);(d==="failed"||t)&&(p.current=Date.now()),t?l(petRef,{empty:xt(d,n),signature:vt(c,n)}):d==="failed"&&s(petRef)},[d,c,e,n,petRef,l,s]);let h=r.useRef(()=>{});return h.current=e=>{let t=f.current;bt({pageVisible:e,watching:t.watching,lastReadAt:p.current,now:Date.now()})&&(p.current=null,t.plan(),t.page())},r.useEffect(()=>{let e=o.AppState.addEventListener("change",e=>{e==="active"&&h.current(true)});return()=>e.remove()},[]),r.useEffect(()=>{a&&h.current(o.AppState.currentState!=="background")},[a]),null}function RecordsProbe({petRef:petRef,onRecords:e}){let{status:t}=n.useEverfurRecords({petRef:petRef});return r.useEffect(()=>{e(petRef,t==="empty"?"none":t==="populated"?"some":null)},[t,petRef,e]),null}var wo=6e3,xo=50,_o=o.Platform.OS!=="web";function EverfurRecordsLandedBanner({text:e,icon:t,onLand:n,testID:a}){let l=useEverfurTheme(),s=r.useMemo(()=>lo(l),[l]),[d,c]=r.useState(0),u=r.useRef(new o.Animated.Value(0)).current,p=r.useRef(false),f=r.useRef(false),h=r.useRef(n);h.current=n,r.useEffect(()=>{let e=setTimeout(()=>{f.current||(f.current=true,h.current())},wo);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");o.Animated.timing(u,{toValue:1,duration:n.dur,easing:s.reduced?o.Easing.bezier(.25,.1,.25,1):o.Easing.bezier(...Jr),useNativeDriver:_o}).start()},b=-((d>0?d:200)-Xr.bannerY),m=s.reduced?{opacity:u}:{transform:[{translateY:u.interpolate({inputRange:[0,1],outputRange:[b,0]})}]},{position:y,left:k,right:v,zIndex:w,top:x,..._}=s.view(".ph-banner",".ph-banner.is-on"),S=typeof x=="number"?Math.max(0,x-xo):0;/* @__PURE__ */
|
|
91
91
|
return i.jsx(o.Animated.View,{pointerEvents:"box-none",style:[{position:y,left:k,right:v,zIndex:w,top:S},m],onLayout:g,children:/* @__PURE__ */i.jsxs(o.Pressable,{accessibilityRole:"button",accessibilityLiveRegion:"polite",onPress:()=>{f.current||(f.current=true,n())},style:_,testID:a??"everfur-records-banner",children:[
|
|
92
92
|
/* @__PURE__ */i.jsx(o.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[s.view(".ph-banner__app"),s.col(".ph-banner",0)],children:t}),
|
|
93
93
|
/* @__PURE__ */i.jsxs(o.View,{style:s.col(".ph-banner",1),children:[
|
|
94
94
|
/* @__PURE__ */i.jsxs(o.View,{style:s.view(".ph-banner__meta"),children:[e.app===""?/* @__PURE__ */i.jsx(o.View,{}):/* @__PURE__ */i.jsx(Text,{tier:"compact",style:s.text(".ph-banner__meta",".ph-banner__meta strong"),children:e.app}),
|
|
95
95
|
/* @__PURE__ */i.jsx(Text,{tier:"compact",style:s.text(".ph-banner__meta"),children:e.now})]}),
|
|
96
|
-
/* @__PURE__ */i.jsx(Text,{style:[s.view(".ph-banner__txt > strong"),s.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */i.jsx(Text,{style:s.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var
|
|
97
|
-
return i.jsx(o.View,{style:[
|
|
98
|
-
return i.jsxs(o.View,{style:
|
|
96
|
+
/* @__PURE__ */i.jsx(Text,{style:[s.view(".ph-banner__txt > strong"),s.text(".ph-banner__txt > strong")],children:e.title}),e.body===""?null:/* @__PURE__ */i.jsx(Text,{style:s.text(".ph-banner__txt > span:last-child"),children:e.body})]})]})})}var So={pointerEvents:"none",accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"};function Co(e){return{width:e,height:e,alignItems:"center",justifyContent:"center"}}function Ro(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__ */
|
|
97
|
+
return i.jsx(o.View,{style:[Co(e),{borderRadius:e/2,borderWidth:t??o.StyleSheet.hairlineWidth,borderColor:n}],children:r})}function ArrowUpGlyph({size:e,color:t,strokeWidth:n,testID:r}){let a=Ro(e,n),l=e*.46;/* @__PURE__ */
|
|
98
|
+
return i.jsxs(o.View,{style:Co(e),testID:r,...So,children:[
|
|
99
99
|
/* @__PURE__ */i.jsx(o.View,{style:{position:"absolute",top:e*.16,bottom:e*.12,width:a,borderRadius:a,backgroundColor:t}}),
|
|
100
|
-
/* @__PURE__ */i.jsx(o.View,{style:{position:"absolute",top:e*.16+a/2,width:l,height:l,borderLeftWidth:a,borderTopWidth:a,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var
|
|
101
|
-
return i.jsx(o.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
|
|
100
|
+
/* @__PURE__ */i.jsx(o.View,{style:{position:"absolute",top:e*.16+a/2,width:l,height:l,borderLeftWidth:a,borderTopWidth:a,borderColor:t,transform:[{rotate:"45deg"}]}})]})}var jo={".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 Ao=/* @__PURE__ */new WeakMap;function Fo(e){let t=Ao.get(e);if(t!==void 0)return t;let n=er(e,jo);return Ao.set(e,n),n}function ShellIcon({name:e,style:t}){let n=eo[e];/* @__PURE__ */
|
|
101
|
+
return i.jsx(o.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 Eo=1.35;function ShellAskBar({placeholder:e,field:t,send:n,onAsk:a,testID:l}){let s=useEverfurTheme(),d=Fo(s),[c,u]=r.useState(""),p=s.slots.composerInput,f=s.slots.sendButton,h=c.trim()==="",g=()=>{let e=c.trim();e!==""&&(u(""),a(e))},b=d.view(".askbar__send");/* @__PURE__ */
|
|
102
102
|
return i.jsx(o.View,{style:d.view(".ph-askbar"),testID:l,children:/* @__PURE__ */i.jsxs(o.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:[
|
|
103
|
-
/* @__PURE__ */i.jsx(
|
|
104
|
-
/* @__PURE__ */i.jsx(o.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__ */i.jsx(ArrowUpGlyph,{size:20,color:f?.textColor??d.colors.onPrimary??s.color.surface})})]})})}function
|
|
105
|
-
return i.jsx(o.Image,{source:{uri:e},style:r,resizeMode:a,...u,onError:()=>{c.onError(),s?.()},...d===void 0?{}:{testID:d}})}function
|
|
103
|
+
/* @__PURE__ */i.jsx(fn,{value:c,onChangeText:u,placeholder:e,placeholderTextColor:p?.textColor??s.color.text.placeholder,accessibilityLabel:t,onSubmitEditing:g,returnKeyType:"send",maxFontSizeMultiplier:Eo,style:[d.text(".askbar input"),{flex:1,minWidth:0,paddingVertical:12,color:p?.textColor??d.colors.ink}],testID:`${l}-input`}),
|
|
104
|
+
/* @__PURE__ */i.jsx(o.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__ */i.jsx(ArrowUpGlyph,{size:20,color:f?.textColor??d.colors.onPrimary??s.color.surface})})]})})}function Io(e){let[t,n]=r.useState(null);return{shown:e!==null&&t!==e,onError:()=>n(e)}}function BrandImage({uri:e,label:t,decorative:n=false,style:r,resizeMode:a="contain",fallback:l=null,onError:s,testID:d}){let c=Io(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__ */
|
|
105
|
+
return i.jsx(o.Image,{source:{uri:e},style:r,resizeMode:a,...u,onError:()=>{c.onError(),s?.()},...d===void 0?{}:{testID:d}})}function To(e){return[e.surface,e.surfaceCream,e.surfaceSubtle,e.background,e.chatGround,e.composerFill]}function Do(e){if(e.brightness!=="light")return false;let t=ln.color,n=e.color,r=(e,t)=>parseColor(e)===parseColor(t),o=new Set(To(t));return r(n.brand,t.brand)&&r(n.accent,t.accent)&&To(n).every(e=>o.has(e))}var Po=/* @__PURE__ */Object.freeze([
|
|
106
106
|
/* @__PURE__ */Object.freeze({background:"#ffbdbd",foreground:"#6d1d14"}),
|
|
107
107
|
/* @__PURE__ */Object.freeze({background:"#a0c4f6",foreground:"#0b3a73"}),
|
|
108
108
|
/* @__PURE__ */Object.freeze({background:"#fbc558",foreground:"#10462e"}),
|
|
109
109
|
/* @__PURE__ */Object.freeze({background:"#bde7c5",foreground:"#0e3b22"}),
|
|
110
110
|
/* @__PURE__ */Object.freeze({background:"#dcc7f4",foreground:"#3a1d6a"}),
|
|
111
|
-
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function
|
|
112
|
-
return i.jsx(Ring,{size:t,strokeWidth:n,color:a.color.mark,children:/* @__PURE__ */i.jsx(o.View,{style:[l.disc,{width:s,height:s,borderRadius:s/2},d===null?l.discEmpty:{backgroundColor:d.background}],children:/* @__PURE__ */i.jsx(Text,{tier:"badge",style:[l.letter,{fontSize:c,lineHeight:Math.round(c*1.2),color:d===null?a.color.text.muted:d.foreground}],children:d===null?
|
|
113
|
-
return Object.freeze(t)}function
|
|
111
|
+
/* @__PURE__ */Object.freeze({background:"#ffd8a8",foreground:"#5a2a04"})]);function Oo(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return Po[t%Po.length]}function zo(e){let t=(e??"").trim();return(Array.from(t)[0]??"?").toUpperCase()}function Vo(e){return{...Oo(e.petRef),initial:zo(e.name)}}function Bo(e,t,n){let r=Vo(e);return t?r:{background:n.fill,foreground:n.ink,initial:r.initial}}function No(e){return Math.max(12,Math.round(e*.42))}function PetDisc({pet:e,size:t,ringStroke:n}){let a=useEverfurTheme(),l=r.useMemo(()=>$o(a),[a]),s=t-n*2,d=e===null?null:Bo(e,Do(a),{fill:a.color.highlight,ink:a.color.onHighlight}),c=No(s);/* @__PURE__ */
|
|
112
|
+
return i.jsx(Ring,{size:t,strokeWidth:n,color:a.color.mark,children:/* @__PURE__ */i.jsx(o.View,{style:[l.disc,{width:s,height:s,borderRadius:s/2},d===null?l.discEmpty:{backgroundColor:d.background}],children:/* @__PURE__ */i.jsx(Text,{tier:"badge",style:[l.letter,{fontSize:c,lineHeight:Math.round(c*1.2),color:d===null?a.color.text.muted:d.foreground}],children:d===null?zo(null):d.initial})})})}function $o(e){return o.StyleSheet.create({disc:{alignItems:"center",justifyContent:"center",overflow:"hidden"},discEmpty:{backgroundColor:e.color.brandSoft},letter:{...face(e,"bold"),textAlign:"center",includeFontPadding:false}})}var Lo=/* @__PURE__ */Object.freeze({planPlaceholder:"Ask what’s right for {petName}…",recordsPlaceholder:"Ask about {petName}’s records…",field:"Message",send:"Send",back:"Back",poweredBy:"powered by",poweredByLabel:"powered by Everfur",notificationKicker:"Notification · {time}"});function Wo(e){if(e===void 0)return Lo;let t={...Lo};for(let n of Object.keys(Lo)){let r=e[n];typeof r=="string"&&r.trim().length>0&&(t[n]=r)}/* @__PURE__ */
|
|
113
|
+
return Object.freeze(t)}function Mo(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,n)=>t[n]??(n==="pet"?t.petName:void 0)??"")}var Uo=360;function ShellHeader({options:t,tab:n,pushed:l,petRef:petRef,petName:s,copy:d,onInboxOpen:c}){let u=useEverfurTheme(),p=Fo(u),{width:f}=o.useWindowDimensions(),[h,g]=r.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,k=n==="ask"&&l===null,v=k?".ph-lockup .ph-mark":".ph-mark",w=t.mark??(u.meta.logoUrl===null?null:/* @__PURE__ */i.jsx(BrandImage,{uri:u.meta.logoUrl,label:u.meta.displayName,decorative:k,style:p.icon(v)})),x=l!==null?/* @__PURE__ */i.jsx(o.Pressable,{onPress:l.onBack,accessibilityRole:"button",accessibilityLabel:d.back,hitSlop:4,style:[p.view(".ph-back"),{display:"flex"}],testID:"everfur-shell-back",children:/* @__PURE__ */i.jsx(ShellIcon,{name:"back",style:[p.icon(".ph-back svg"),{tintColor:y}]})}):/* @__PURE__ */i.jsx(Pet,{options:t,kit:p,petRef:petRef,petName:s,ink:y}),_=l!==null?/* @__PURE__ */i.jsx(Text,{tier:"heading",numberOfLines:1,accessibilityRole:"header",style:[p.text(".ph-title"),{display:"flex",color:y,textAlign:"center"}],testID:"everfur-shell-title",children:l.title}):k?/* @__PURE__ */i.jsx(e.EverfurPoweredBy,{children:/* @__PURE__ */i.jsxs(o.View,{accessible:true,accessibilityLabel:Mo("{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>=Uo?/* @__PURE__ */i.jsxs(i.Fragment,{children:[
|
|
114
114
|
/* @__PURE__ */i.jsx(o.View,{style:p.view(".ph-lockup__rule")}),
|
|
115
115
|
/* @__PURE__ */i.jsxs(o.View,{style:p.view(".ph-lockup__by"),children:[
|
|
116
116
|
/* @__PURE__ */i.jsx(Text,{tier:"badge",style:p.text(".ph-lockup__by"),children:d.poweredBy}),
|
|
@@ -118,83 +118,86 @@ return Object.freeze(t)}function Wo(e,t){return e.replace(/\{([a-zA-Z]+)\}/g,(e,
|
|
|
118
118
|
return i.jsxs(o.View,{style:[p.view(".ph-head"),{flexDirection:"row",backgroundColor:m}],testID:"everfur-shell-header",children:[
|
|
119
119
|
/* @__PURE__ */i.jsx(o.View,{style:[p.view(".ph-head__start"),{flex:1,flexBasis:0}],children:x}),
|
|
120
120
|
/* @__PURE__ */i.jsx(o.View,{style:{flexShrink:1,alignItems:"center",justifyContent:"center"},children:_}),
|
|
121
|
-
/* @__PURE__ */i.jsx(o.View,{style:[p.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&l===null?/* @__PURE__ */i.jsx(a.EverfurInboxBell,{onPress:t.onBell??(()=>g(true)),color:y,ground:m}):null}),S&&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
|
|
122
|
-
return i.jsx(
|
|
121
|
+
/* @__PURE__ */i.jsx(o.View,{style:[p.view(".ph-head__end"),{flex:1,flexBasis:0}],children:S&&l===null?/* @__PURE__ */i.jsx(a.EverfurInboxBell,{onPress:t.onBell??(()=>g(true)),color:y,ground:m}):null}),S&&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 qo=/* @__PURE__ */r.createContext(null);function useEverfurTabs(){return r.useContext(qo)}var Ho=200,Ko=4,Yo=2600,Go=600,Jo=o.Easing.bezier(.25,.1,.25,1),Qo=o.Platform.OS!=="web",Zo=/* @__PURE__ */Object.freeze({chats:He.heading,newChat:He.newChat}),Xo={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(()=>lo(f),[f]),g=r.useMemo(()=>({...lt,...a.copy}),[a.copy]),{runtime:b,userRef:userRef}=Ie(),m=Pt("healthPlan"),y=Pt("records"),k=Pt("recordsClinic"),[v,w]=r.useState(()=>/* @__PURE__ */new Map),[x,_]=r.useState(()=>/* @__PURE__ */new Set),S=r.useCallback((e,t)=>{w(n=>{let r=n.get(e),o=_t(r,t);return o===r?n:new Map(n).set(e,o)}),_(t=>t.has(e)?new Set([...t].filter(t=>t!==e)):t)},[]),C=r.useCallback(e=>{_(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=ct(j),E=r.useRef(j);E.current=j;let I=t.useHealthPlanPage({petRef:petRef,enabled:m&&petRef!==null}),[T,D]=r.useState(()=>pt(l,false)),[P,O]=r.useState(()=>/* @__PURE__ */new Set(["ask",pt(l,false)])),z=r.useCallback(e=>{let t=ut(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),W=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]),M=$===null||$.petRef!==petRef?null:$,U=ft(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?W(l.ask.prompt,l.ask.card):z(pt(l,E.current)),K(l.via==="plain"?U:null)},[U,l,W,z]);let Y=r.useMemo(()=>Rt(),[]),G=p&&T==="ask",J=r.useRef(G);J.current=G;let Q=a.chat?.lifecycle,Z=r.useMemo(()=>Q===null?null:jt(At(Q??createAppStateLifecycle(),()=>J.current),Y),[Q,Y]),X=r.useRef(G);r.useEffect(()=>{let e=Ft(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,we]=r.useState(null),xe=r.useRef(null),_e=r.useRef(null),Se=r.useMemo(()=>ve(b),[b]),Ce=b.registry.services.kv,Ae=re?.maxWidth??Go,Fe=re!==null&&m,Ee=Fe&&H!==null&&p&&userRef!==null&&petRef!==null,[Te,Pe]=r.useState(null);r.useEffect(()=>{if(!Ee)return;let e=H;if(o.Dimensions.get("window").width>=Ae){Pe(e);return}let t=new AbortController,n=petRef;return Re({repo:Se,kv:Ce,userRef:userRef,signal:t.signal}).then(r=>{t.signal.aborted||(Pe(e),r&&de({key:e,petRef:n}))},()=>{t.signal.aborted||Pe(e)}),()=>t.abort()},[Ee,H,userRef,petRef,Se,Ce,Ae]);let Oe=Fe&&H!==null&&p&&(userRef===null||petRef===null)&&o.Dimensions.get("window").width<Ae,[ze,Ve]=r.useState(null);r.useEffect(()=>{if(!Oe)return;let e=H,t=setTimeout(()=>Ve(e),St);return()=>clearTimeout(t)},[Oe,H]),Ue(Oe&&ze!==H||Ee&&Te!==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=xe.current;e===null||typeof e.measureInWindow!="function"||e.measureInWindow((e,t,n,r)=>{Number.isFinite(t)&&r>0&&we({top:Math.round(t),height:Math.round(r)})})},[]);r.useEffect(()=>{if(se===null||oe!==null)return;let e=Ct({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}))},Ho);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),St);return()=>clearTimeout(e)},[se]);let We=r.useCallback(()=>{petRef!==null&&(Le(),ie(e=>({mode:"records",id:(e?.id??0)+1})))},[petRef,Le]),Me=r.useCallback(e=>{(oe?.mode??"intro")==="intro"&&je({repo:Se,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,Se,Ce,userRef,petRef,z,ne]),He=r.useCallback(()=>ie(null),[]),Ye=r.useCallback(e=>{ue({petRef:e.petRef,notified:null}),setHealthPlanNoVet(e.petRef,false),d?.(e)},[d]),Ge=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 Ze=re?.copy,Xe=r.useCallback(()=>introText({facts:introFacts(I.page,a.petName),copy:{...De,...Ze},blanks:0,resultsPending:false}),[I.page,a.petName,Ze]),tt=r.useRef(void 0),nt=r.useCallback(()=>{ge(false),z("plan"),petRef!==null&&ne(Xe().toast.landed)},[z,petRef,ne,Xe]);r.useEffect(()=>{let e=tt.current;if(tt.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):nt()},[Ne,ce,petRef,c,nt]);let rt=a.chat,ot=a.resultsPending??I.page?.page?.wait!==void 0,at=r.useMemo(()=>ot?{...rt?.presentation,chatTopCard:"none"}:rt?.presentation,[ot,rt?.presentation]),st=r.useCallback(()=>z("plan"),[z]),dt=r.useCallback(()=>z("records"),[z]),ht=r.useCallback(()=>z("ask"),[z]),gt=a.plan,bt=r.useMemo(()=>gt?.focus===void 0?void 0:{...gt.focus,onConnectRecords:gt.focus.onConnectRecords??dt,onWaitAction:gt.focus.onWaitAction??ht},[gt?.focus,dt,ht]),mt=a.petName??I.page?.pet.name??"",yt=mt.trim()||Qe,kt=a.records,vt=kt?.sheet,wt=r.useCallback(()=>{We()},[We]),xt={active:p&&T==="records",askBar:false},Et={onRequestFromClinic:wt,noVet:be,onOpenPlan:st},It=qe(kt),Tt=vt===false?false:{...xt,...typeof vt=="object"?qe(vt):{}},Dt=petRef===null?null:/* @__PURE__ */i.jsx(n.EverfurRecords,{...Et,...It,sheet:Tt,petRef:petRef,...mt===""?{}:{petName:mt},onAsk:kt?.onAsk??(e=>W(e)),style:[{flex:1},kt?.style]},petRef),[Ot,zt]=r.useState([]),Vt=Ot.length===0?null:Ot[Ot.length-1]??null,Bt=r.useCallback(e=>{let t={title:e.title,onBack:e.onBack};return zt(e=>[...e,t]),()=>zt(e=>e.filter(e=>e!==t))},[]),Nt=r.useMemo(()=>Wo(a.shellCopy),[a.shellCopy]),$t=r.useCallback(e=>{let t=Mo(Nt.notificationKicker,{petName:yt,time:"{time}"}),n=Je(e,{kicker:t,now:Ke.now,ago:Ke.timeAgoSuffix},Date.now());return n===null?false:(n.tab==="ask"?W(n.prompt,n.card):B(n.tab),true)},[Nt,yt,W,B]),Lt=r.useMemo(()=>({tab:T,open:B,ask:W,requestRecords:We,push:Bt,openInboxItem:$t}),[T,B,W,We,Bt,$t]),Wt=a.tabsRef;r.useLayoutEffect(()=>{if(Wt!==void 0)return Wt.current=Lt,()=>{Wt.current===Lt&&(Wt.current=null)}},[Wt,Lt]);let Mt=ae==="tabs",Ut=a.header===void 0||a.header===false?null:a.header===true?{}:a.header,qt=r.useCallback(e=>W(e),[W]),Ht=e=>a.composer===false?null:/* @__PURE__ */i.jsx(ShellAskBar,{placeholder:Mo(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__ */
|
|
122
|
+
return i.jsx(qo.Provider,{value:Lt,children:/* @__PURE__ */i.jsxs(o.View,{style:[{flex:1,minHeight:0,position:"relative"},a.style],testID:a.testID??"everfur-tabs",children:[Ut===null?null:/* @__PURE__ */i.jsx(ShellHeader,{options:Ut,tab:T,pushed:Vt,petRef:petRef,petName:mt,copy:Nt,onInboxOpen:$t}),Vt!==null?null:/* @__PURE__ */i.jsx(TabBar,{kit:h,barRef:xe,tabs:F,sub:T,lit:Mt,copy:g,planHidden:j,badges:a.badges,onOpen:B}),petRef===null||!m?null:/* @__PURE__ */i.jsx(PlanProbe,{petRef:petRef,pagePhase:I.phase,page:I.page,refreshPage:I.refresh,watching:p&&(T==="plan"||j),onPlan:S,onPlanFailed:C}),petRef!==null&&y&&(se!==null||oe!==null||ce!==null)?/* @__PURE__ */i.jsx(RecordsProbe,{petRef:petRef,onRecords:Be}):null,
|
|
123
123
|
/* @__PURE__ */i.jsxs(o.View,{style:{flex:1,minHeight:0},children:[
|
|
124
|
-
/* @__PURE__ */i.jsxs(o.View,{style:
|
|
125
|
-
/* @__PURE__ */i.jsx(o.View,{style:{flex:1,minHeight:0},children:/* @__PURE__ */i.jsx(
|
|
126
|
-
/* @__PURE__ */i.jsx(o.ScrollView,{ref:_e,style:{flex:1},children:/* @__PURE__ */i.jsx(t.HealthPlanScrollScope,{scrollRef:_e,children:/* @__PURE__ */i.jsx(t.EverfurHealthPlan,{...
|
|
127
|
-
/* @__PURE__ */i.jsx(o.View,{style:{flex:1,minHeight:0},children:a.renderRecords===void 0?
|
|
124
|
+
/* @__PURE__ */i.jsxs(o.View,{style:Kt("ask"),testID:"everfur-pane-ask",children:[
|
|
125
|
+
/* @__PURE__ */i.jsx(o.View,{style:{flex:1,minHeight:0},children:/* @__PURE__ */i.jsx(it.Provider,{value:G,children:/* @__PURE__ */i.jsx(et.Provider,{value:sr,children:/* @__PURE__ */i.jsx(e.EverfurChat,{header:false,historyBar:Zo,...rt,style:[{flex:1,paddingTop:0},rt?.style],...at===void 0?{}:{presentation:at},...ot&&a.pendingStarterPrompts!==void 0?{starterPrompts:a.pendingStarterPrompts}:{},...petRef===null?{}:{petRef:petRef},lifecycle:Z,onOpenHealthPlan:st,...M===null?{}:{initialAsk:M.prompt,initialAskKey:M.id,...M.card===void 0?{}:{initialAskCard:M.card}}})})})},petRef??"none"),a.paneFooter?.ask]}),P.has("plan")&&!j?/* @__PURE__ */i.jsxs(o.View,{style:Kt("plan"),testID:"everfur-pane-plan",children:[
|
|
126
|
+
/* @__PURE__ */i.jsx(o.ScrollView,{ref:_e,style:{flex:1},children:/* @__PURE__ */i.jsx(t.HealthPlanScrollScope,{scrollRef:_e,children:/* @__PURE__ */i.jsx(t.EverfurHealthPlan,{...gt,...bt===void 0?{}:{focus:bt},petRef:petRef},A)})},petRef??"none"),a.paneFooter?.plan??Ht("plan")]}):null,P.has("records")?/* @__PURE__ */i.jsxs(o.View,{style:Kt("records"),testID:"everfur-pane-records",children:[
|
|
127
|
+
/* @__PURE__ */i.jsx(o.View,{style:{flex:1,minHeight:0},children:a.renderRecords===void 0?Dt:a.renderRecords(Dt)},petRef??"none"),a.paneFooter?.records??Ht("records")]}):null]}),ee===null||u!==void 0?null:/* @__PURE__ */i.jsx(Toast,{kit:h,text:ee.text},`toast-${ee.id}`),he?/* @__PURE__ */i.jsx(EverfurRecordsLandedBanner,{text:Xe().banner,...re?.bannerIcon===void 0?{}:{icon:re.bannerIcon},onLand:nt}):null,oe===null||petRef===null?null:/* @__PURE__ */i.jsx(EverfurIntro,{petRef:petRef,mode:oe.mode,page:I.page,petName:a.petName??null,recordsConnected:oe.mode==="intro"&&($e||!k),resultsPending:ot,...re?.copy===void 0?{}:{copy:re.copy},...re?.blanks===void 0?{}:{blanks:re.blanks},tabBar:ke,tabLabels:{ask:g.ask,plan:g.plan,records:g.records},onFrame:Ge,onClose:Me,onClosed:He,onRequested:Ye,...re?.onEnableNotifications===void 0?{}:{onEnableNotifications:re.onEnableNotifications},onUpload:re?.onUpload??dt,...re?.ownerName===void 0?{}:{ownerName:re.ownerName},...re?.onCaptureSignature===void 0?{}:{onCaptureSignature:re.onCaptureSignature}},`intro-${oe.id}`)]})})}function TabBar({kit:e,barRef:t,tabs:n,sub:r,lit:a,copy:l,planHidden:s,badges:d,onOpen:c}){let{borderBottomWidth:u=0,borderBottomColor:p,...f}=e.view(".ph-sub");/* @__PURE__ */
|
|
128
128
|
return i.jsxs(o.View,{ref:t,accessibilityRole:"tablist",accessibilityLabel:s?l.listNoPlan:l.listAll,style:f,testID:"everfur-tabs-bar",children:[u>0?/* @__PURE__ */i.jsx(o.View,{pointerEvents:"none",style:{position:"absolute",left:0,right:0,bottom:0,height:u,backgroundColor:p},testID:"everfur-tabs-edge"}):null,n.map((t,n)=>{let s=r===t,u=[".ph-sub button",`.ph-sub [data-sub="${t}"]`,s&&'.ph-sub button[aria-selected="true"]',a&&'#ph[data-in-frame="tabs"] .ph-sub button'];/* @__PURE__ */
|
|
129
129
|
return i.jsxs(o.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:s},onPress:()=>c(t),style:[e.view(...u),e.col(".ph-sub",n),{alignItems:"center",justifyContent:"center"}],testID:`everfur-tab-${t}`,children:[
|
|
130
130
|
/* @__PURE__ */i.jsx(TabPill,{kit:e,id:t,lit:a}),
|
|
131
131
|
/* @__PURE__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",maxWidth:"100%"},children:[
|
|
132
|
-
/* @__PURE__ */i.jsx(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...u),{flexShrink:1}],children:l[t]}),d?.[t]===true?/* @__PURE__ */i.jsx(o.View,{style:[e.view(".ph-sub button .ph-new"),
|
|
133
|
-
return i.jsx(o.Animated.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof d=="string"?{backgroundColor:d}:null,c],testID:`everfur-tab-pill-${t}`})}function Toast({kit:e,text:t}){let n=r.useRef(new o.Animated.Value(0)).current;r.useEffect(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");o.Animated.timing(n,{toValue:1,duration:r.dur,easing:o.Easing.bezier(...
|
|
134
|
-
return i.jsx(o.Animated.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:Ho},a],testID:"everfur-tabs-toast",children:/* @__PURE__ */i.jsx(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=Ie();return r.useMemo(()=>{let t=ve(e),n=e.registry.services.kv;return{shouldPlay:e=>Re({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>je({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var Xo=[{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$"]}],ei={"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":"$"},ti={"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"},ni={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=ni.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"];(!ni.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__ */
|
|
135
|
-
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)])})}function fillSdkText(e,t,n={}){let r={partner:t["text.partner_name"],plan:t["plan.name"],assistant:t["text.ask.name"],pet:
|
|
136
|
-
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,
|
|
137
|
-
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
|
|
138
|
-
return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var
|
|
139
|
-
return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return
|
|
140
|
-
return Object.freeze(t)}function
|
|
141
|
-
return Object.freeze({videoAndRx:
|
|
142
|
-
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
|
|
132
|
+
/* @__PURE__ */i.jsx(Text,{tier:"compact",numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,style:[e.text(...u),{flexShrink:1}],children:l[t]}),d?.[t]===true?/* @__PURE__ */i.jsx(o.View,{style:[e.view(".ph-sub button .ph-new"),Xo],testID:`everfur-tab-${t}-new`}):null]}),s?/* @__PURE__ */i.jsx(o.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:e.view('.ph-sub button[aria-selected="true"]::after',a&&'#ph[data-in-frame="tabs"] .ph-sub button::after')}):null]},t)})]})}function TabPill({kit:e,id:t,lit:n}){let a=r.useRef(new o.Animated.Value(n?1:0)).current,l=`.ph-sub [data-sub="${t}"]`,s=e.raw("k",l),d=e.raw("tint",l);r.useEffect(()=>{let t=n?e.motion(".ph-sub button::before",'#ph[data-in-frame="tabs"] .ph-sub button::before'):e.motion(".ph-sub button::before"),r=typeof s=="number"?s:0;o.Animated.timing(a,{toValue:n?1:0,duration:t.dur,delay:n?t.delay+r*t.stagger:0,easing:e.reduced?Jo:o.Easing.bezier(...Gr),useNativeDriver:Qo}).start()},[n,e,s,a]);let c=e.reduced?{opacity:a}:{opacity:a,transform:[{scale:a.interpolate({inputRange:[0,1],outputRange:[Xr.pillScale,1]})}]};/* @__PURE__ */
|
|
133
|
+
return i.jsx(o.Animated.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:[e.view(".ph-sub button::before"),typeof d=="string"?{backgroundColor:d}:null,c],testID:`everfur-tab-pill-${t}`})}function Toast({kit:e,text:t}){let n=r.useRef(new o.Animated.Value(0)).current;r.useEffect(()=>{let r=e.motion(".ph-toast",".ph-toast.is-on");o.Animated.timing(n,{toValue:1,duration:r.dur,easing:o.Easing.bezier(...Gr),useNativeDriver:Qo}).start();let i=o.AccessibilityInfo.announceForAccessibility;o.Platform.OS==="ios"&&typeof i=="function"&&i.call(o.AccessibilityInfo,t);let a=setTimeout(()=>{let t=e.motion(".ph-toast");o.Animated.timing(n,{toValue:0,duration:t.dur,easing:o.Easing.bezier(...Gr),useNativeDriver:Qo}).start()},Yo);return()=>clearTimeout(a)},[e,n,t]);let a=e.reduced?{opacity:n}:{opacity:n,transform:[{translateY:n.interpolate({inputRange:[0,1],outputRange:[Xr.toastY,0]})}]};/* @__PURE__ */
|
|
134
|
+
return i.jsx(o.Animated.View,{pointerEvents:"none",accessibilityLiveRegion:"polite",style:[e.view(".ph-toast"),{top:Ko},a],testID:"everfur-tabs-toast",children:/* @__PURE__ */i.jsx(Text,{style:e.text(".ph-toast"),children:t})})}function useEverfurIntroSeen(){let{runtime:e,userRef:userRef}=Ie();return r.useMemo(()=>{let t=ve(e),n=e.registry.services.kv;return{shouldPlay:e=>Re({repo:t,kv:n,userRef:userRef,...e===void 0?{}:{signal:e}}),markSeen:()=>je({repo:t,kv:n,userRef:userRef})}},[e,userRef])}var ei=[{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$"]}],ti={"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":"$"},ni={"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"},ri={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=ri.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"];(!ri.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__ */
|
|
135
|
+
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 oi="your pet",ii=/\{([a-z]+)\}/g;function ai(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(ii,(t,n,r)=>{let i=o[n];return i!==void 0?i:n==="pet"?ai(e,r)?oi.charAt(0).toUpperCase()+oi.slice(1):oi: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 li={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__ */
|
|
136
|
+
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,li[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__ */
|
|
137
|
+
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 si="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!==si,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 askFootLines(e){let t=[sdkFixed(e,"ask.emergency")];return isInsidePartner(e.settings)&&t.push(sdkFixed(e,"ask.privacy")),/* @__PURE__ */Object.freeze(t)}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__ */
|
|
138
|
+
return Object.freeze(e.settings["features.partner_data"].map(n=>sdkFixed(e,t[n])))}var di="https:\\/\\/sdk(?:-[a-z]+)?\\.everfur\\.com";function ci(e){return e.replace(/[.*+?^${}()|[\]\\/]/g,"\\$&")}var ui=typeof __EVERFUR_BRAND_CDN_ORIGIN__=="string"&&__EVERFUR_BRAND_CDN_ORIGIN__.length>0?ci(__EVERFUR_BRAND_CDN_ORIGIN__):di;var pi=/^#[0-9A-Fa-f]{6}$/,fi=/\{([a-z]+)\}/g;function hi(e){return[...e.matchAll(fi)].map(e=>e[1])}var gi=/* @__PURE__ */new Set(["pet","partner","plan","assistant","cap"]),bi=/* @__PURE__ */new Set(["text.partner_name","text.ask.name","plan.name"]);function mi(e,t){return bi.has(e)?!/[{}]/.test(t):hi(t).every(t=>gi.has(t)||t==="left"&&e==="text.cap.counter")}function yi(e,t){let n=new Set(hi(e));return hi(t).every(e=>n.has(e)||gi.has(e))}var ki=/^(US)?\$\d{1,3}(,\d{3})*(\.\d{2})?$/;function vi(e){return typeof e=="string"&&pi.test(e)}function wi(e){return typeof e=="number"&&Number.isFinite(e)}function xi(e,t){return!(e.range!==void 0&&(t<e.range[0]||t>e.range[1])||e.oneOf!==void 0&&!e.oneOf.includes(t))}var _i=/* @__PURE__ */new RegExp(`^${ui}\\/brand\\/[0-9a-f]{16}\\.woff2$`);function Si(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"||!_i.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__ */
|
|
139
|
+
return Object.freeze(t)}function parseSettingValue(e,t){switch(e.kind){case"color":return vi(t)?t.toUpperCase():void 0;case"colorOrNone":return t==="none"?"none":vi(t)?t.toUpperCase():void 0;case"hexList":{if(!Array.isArray(t))return;let n=t.filter(vi).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 Si(t);case"boolean":return typeof t=="boolean"?t:void 0;case"number":return wi(t)&&xi(e,t)?t:void 0;case"numberOrNull":return t===null?null:wi(t)&&xi(e,t)?t:void 0;case"money":return typeof t=="string"&&ki.test(t)?t:void 0;case"moneyOrNull":return t===null?null:typeof t=="string"&&ki.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:mi(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={...ti},r=[];for(let e of ei){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={...ni};if(e!==null&&typeof e=="object"&&!Array.isArray(e))for(let[n,r]of Object.entries(e))!Object.prototype.hasOwnProperty.call(ni,n)||typeof r!="string"||r===""||yi(ni[n],r)&&(t[n]=r);/* @__PURE__ */
|
|
140
|
+
return Object.freeze(t)}function Ci(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__ */
|
|
141
|
+
return Object.freeze({videoAndRx:Ci(t.video_and_rx),adviceOnly:Ci(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(!wi(n)||r===null||typeof r!="object"||Array.isArray(r))return null;let o=wi(t.schema_version)?t.schema_version:3;/* @__PURE__ */
|
|
142
|
+
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 Ri=/* @__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 ji="presentation";var Ai=/* @__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 Fi=/* @__PURE__ */new RegExp(`^${ui}\\/brand\\/[0-9a-f]{16}\\.(png|jpg|webp)$`);function hardenBrandAssetUrl(e){let t=hardenHttpsUrl(e);return t!==null&&Fi.test(t)?t:null}var Ei="everfur-ask";function Ii(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 Ii(n))t.push(/* @__PURE__ */Object.freeze({family:n.family,src:n.url,weight:e}));/* @__PURE__ */
|
|
143
143
|
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__ */
|
|
144
|
-
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
|
|
145
|
-
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:t["text.ask.placeholder"],placeholderFillsPet:true,hidePoweredBy:false,backgroundColor:t["look.color.surface"],textColor:t["look.color.ink"],borderRadius:t["look.radius.card"],assistantAvatarUrl:n===vi?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:xi})}var _i="/widget/v1/sdk-config",Si="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[Si]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:_i,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 Ci(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 Ri(e){let t=3421674724,n=2216829733;for(let r of Ci(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 ji="everfur.sdkconfig.v3.";function Ai(e){return`${ji}${Ri(e)}`}function Fi(e,t,n){return`everfur.sdkconfig.freecap.v1.${Ri(`${e}|${t}|${n}`)}`}var Ei=300*1e3,Ii=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function Ti(e,t){try{let n=await e.getItem(Ai(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function Di(e,t,n){try{n===null?await e.removeItem(Ai(t)):await e.setItem(Ai(t),serializeSdkConfig(n))}catch{}}function Pi(e){let t=Ii,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":{Di(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(Di(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 Ti(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>=Ei;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=Fi(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(Fi(e.scope,t,n))??null},addFreeUsed(t,n){let r=Fi(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=Fi(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 Oi(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 zi(e){return e==null||e.disposed?null:e.store!==null?e.store:Oi(e,Pi({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var Bi=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Vi=()=>()=>{},Ni=()=>Bi;function $i(){return zi(r.useContext(Ee)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Li($i())}function Li(e){return r.useSyncExternalStore(e?.subscribe??Vi,e?.getSnapshot??Ni,e?.getSnapshot??Ni)}function useLoadEverfurSdkConfig(){let e=$i();return r.useEffect(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Wi(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=r.createContext(null))}var Mi=/* @__PURE__ */Wi();var Ui="Go to the nearest emergency vet now.";var qi=/* @__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:Ui,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 Hi=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function Ki(){let e=globalThis,t=e[Hi];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[Hi]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return r.useEffect(()=>{if(n)return;let e=Ki();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:qi.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return Gi(`optional peer '${e}' is not installed: ${Ji(t)}`)}let o=Yi(r);return o==null?Gi(`optional peer '${e}' resolved to no module`):n&&!n(o)?Gi(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function Yi(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function Gi(e){/* @__PURE__ */
|
|
146
|
-
return Object.freeze({available:false,module:null,reason:e})}function
|
|
147
|
-
return i.jsx(BrandImage,{uri:c,decorative:true,style:t,fallback:n,...a===void 0?{}:{testID:a}})}var
|
|
148
|
-
return i.jsx(o.View,{style:{flex:1,backgroundColor:
|
|
149
|
-
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:
|
|
150
|
-
/* @__PURE__ */i.jsx(o.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__ */i.jsx(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:
|
|
151
|
-
/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children
|
|
152
|
-
/* @__PURE__ */i.jsx(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:
|
|
153
|
-
return i.jsx(EverfurPoweredBy2,{children:/* @__PURE__ */i.jsxs(o.View,{accessible:true,accessibilityLabel:`${r}, ${
|
|
154
|
-
/* @__PURE__ */i.jsx(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */i.jsx(o.View,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),a]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:a=null}){let{tablet:l}=
|
|
155
|
-
return i.jsx(o.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__ */i.jsxs(o.View,{accessibilityViewIsModal:true,style:[{backgroundColor:
|
|
144
|
+
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 Ti=/* @__PURE__ */Object.freeze([...Ai,...Ri.map(e=>`slots.${e}`),"hide_powered_by",ji]);function sdkConfigBranding(e){let t=e.settings,n=t["look.ask_icon"],r=t["look.font.heading_weight"];/* @__PURE__ */
|
|
145
|
+
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===Ei?null:n,slots:slotsOf(t),presentation:{chatComposerMic:true,chatComposerUpload:true,chatComposerStyle:"compact",chatComposerPlaceholder:"generic",safetyDisclaimerPlacement:"composer",chatGeneralBanner:t["layout.severity"]!=="off"},lockedFields:Ti})}var Di="/widget/v1/sdk-config",Pi="x-everfur-sdk-config-schema";function sdkConfigRequest(e){let t={[Pi]:String(3)};return typeof e=="number"&&Number.isFinite(e)&&(t["if-none-match"]=`"r${e}.s${3}"`),{method:"GET",path:Di,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 Oi(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 zi(e){let t=3421674724,n=2216829733;for(let r of Oi(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 Vi="everfur.sdkconfig.v3.";function Bi(e){return`${Vi}${zi(e)}`}function Ni(e,t,n){return`everfur.sdkconfig.freecap.v1.${zi(`${e}|${t}|${n}`)}`}var $i=300*1e3,Li=/* @__PURE__ */Object.freeze({status:"idle",active:null,pending:null});async function Wi(e,t){try{let n=await e.getItem(Bi(t));return n===null?null:parseSdkConfig(JSON.parse(n))}catch{return null}}async function Mi(e,t,n){try{n===null?await e.removeItem(Bi(t)):await e.setItem(Bi(t),serializeSdkConfig(n))}catch{}}function Ui(e){let t=Li,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":{Mi(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(Mi(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 Wi(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>=$i;return t.status==="idle"||t.status==="failed"||e?b():Promise.resolve()},retry:b,readFreeUsed(t,n){let r=Ni(e.scope,t,n);return f(r).then(()=>d.get(r)??0)},peekFreeUsed(t,n){return d.get(Ni(e.scope,t,n))??null},addFreeUsed(t,n){let r=Ni(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=Ni(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 qi(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 Hi(e){return e==null||e.disposed?null:e.store!==null?e.store:qi(e,Ui({kv:e.kv,scope:e.scope,fetch:t=>fetchSdkConfig(e.funnel(),t)}))}var Ki=/* @__PURE__ */Object.freeze({status:"legacy",active:null,pending:null}),Yi=()=>()=>{},Gi=()=>Ki;function Ji(){return Hi(r.useContext(Ee)?.runtime?.sdkConfigHost)}function useEverfurSdkConfig(){return Qi(Ji())}function Qi(e){return r.useSyncExternalStore(e?.subscribe??Yi,e?.getSnapshot??Gi,e?.getSnapshot??Gi)}function useLoadEverfurSdkConfig(){let e=Ji();return r.useEffect(()=>{e!==null&&(e.adoptLatest(),e.load())},[e]),useEverfurSdkConfig()}function Zi(){let e=/* @__PURE__ */Symbol.for("@everfur/sdk#SdkSurfaceHooks@v1"),t=globalThis;return t[e]??(t[e]=r.createContext(null))}var Xi=/* @__PURE__ */Zi();var ea="Go to the nearest emergency vet now.";var ta=/* @__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:ea,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 na=/* @__PURE__ */Symbol.for("everfur.sdk.rn.poweredBy");function ra(){let e=globalThis,t=e[na];if(t!==void 0)return t;let n={count:0,listeners:/* @__PURE__ */new Set};return e[na]=n,n}function EverfurPoweredBy2({children:e,style:t}){let n=useEverfurTheme().meta.hidePoweredBy;return r.useEffect(()=>{if(n)return;let e=ra();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:ta.poweredBy})}function optionalModule(e,t,n){let r;try{r=t()}catch(t){return ia(`optional peer '${e}' is not installed: ${aa(t)}`)}let o=oa(r);return o==null?ia(`optional peer '${e}' resolved to no module`):n&&!n(o)?ia(`optional peer '${e}' is present but failed its shape check`):/* @__PURE__ */Object.freeze({available:true,module:o})}function oa(e){return typeof e=="object"&&e!==null&&"default"in e&&Object.keys(e).length<=2?e.default:e}function ia(e){/* @__PURE__ */
|
|
146
|
+
return Object.freeze({available:false,module:null,reason:e})}function aa(e){return e instanceof Error?e.message:typeof e=="string"?e:"unknown load error"}var la=/* @__PURE__ */new RegExp(`^${ui}\\/brand\\/[0-9a-f]{16}\\.svg$`);function sa(e){if(typeof e!="object"||e===null)return false;let t=e.SvgUri;return typeof t=="function"||typeof t=="object"&&t!==null}var da=null;function registerEverfurSvg(e){if(e===null)return da=null,false;let t=optionalModule("react-native-svg",e,sa);return da=t.available?t.module:null,t.available}function ca(e){let t=hardenHttpsUrl(e);return t!==null&&la.test(t)?t:null}function ua(e){let t=o.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:a}){let[l,s]=r.useState(false),d=ca(e);if(d!==null){let e=ua(t),r=da?.SvgUri;return r===void 0||e===null||l?n:/* @__PURE__ */i.jsx(o.View,{style:t,accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:a??"everfur-sdk-svg",children:/* @__PURE__ */i.jsx(r,{uri:d,width:e.width,height:e.height,onError:()=>s(true)})})}let c=e.trim()===""?null:hardenBrandAssetUrl(e);/* @__PURE__ */
|
|
147
|
+
return i.jsx(BrandImage,{uri:c,decorative:true,style:t,fallback:n,...a===void 0?{}:{testID:a}})}var pa="#10462E",fa=640,ha=600,ga="#FFFFFF",ba="#8A8A8A";function ma(){let{width:e}=o.useWindowDimensions(),t=e>=ha;return{tablet:t,column:t?{width:"100%",maxWidth:fa,alignSelf:"center",flex:1}:{flex:1}}}function SdkNeutralScreen({failed:e,onRetry:t}){/* @__PURE__ */
|
|
148
|
+
return i.jsx(o.View,{style:{flex:1,backgroundColor:ga,alignItems:"center",justifyContent:"center",padding:24},testID:e?"everfur-sdk-error":"everfur-sdk-loading",children:e?/* @__PURE__ */i.jsxs(i.Fragment,{children:[
|
|
149
|
+
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:{fontSize:16,color:"#1A1A1A",textAlign:"center"},accessibilityRole:"header",children:ni["load.error"]}),
|
|
150
|
+
/* @__PURE__ */i.jsx(o.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__ */i.jsx(Text,{tier:"control",style:{fontSize:15,color:"#1A1A1A"},children:ni["load.retry"]})})]}):/* @__PURE__ */i.jsx(o.ActivityIndicator,{color:ba})})}function ya(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"],a=/* @__PURE__ */i.jsxs(o.View,{style:t?{flexDirection:"row",alignItems:"center",gap:5}:{gap:1,alignItems:"flex-start"},children:[
|
|
151
|
+
/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{fontFamily:e["look.font.body"],fontSize:12,lineHeight:12,color:e["look.color.muted"]},children:Lo.poweredBy}),
|
|
152
|
+
/* @__PURE__ */i.jsx(ShellIcon,{name:"wordmark",style:{width:t?44:52,height:t?16:19,tintColor:pa}})]});/* @__PURE__ */
|
|
153
|
+
return i.jsx(EverfurPoweredBy2,{children:/* @__PURE__ */i.jsxs(o.View,{accessible:true,accessibilityLabel:`${r}, ${Lo.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:[
|
|
154
|
+
/* @__PURE__ */i.jsx(SdkBrandArt,{url:n,style:t?{height:20,width:110}:{height:30,width:92,borderRadius:7}}),t?null:/* @__PURE__ */i.jsx(o.View,{style:{width:1,height:28,backgroundColor:e["look.color.line"]}}),a]})})}function SdkSheet({sheet:e,settings:t,onPrimary:n,onDismiss:r,notice:a=null}){let{tablet:l}=ma(),s=t["look.color.heading"],d=t["look.font.body"];/* @__PURE__ */
|
|
155
|
+
return i.jsx(o.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__ */i.jsxs(o.View,{accessibilityViewIsModal:true,style:[{backgroundColor:ga,borderTopLeftRadius:t["look.radius.sheet"],borderTopRightRadius:t["look.radius.sheet"],paddingTop:10,paddingHorizontal:18,paddingBottom:l?40:30,gap:12},l?{width:fa,alignSelf:"center"}:null],children:[e.badge!==null?/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{alignSelf:"flex-start",fontFamily:d,fontSize:12,color:s,backgroundColor:t["look.color.tint"],paddingHorizontal:10,paddingVertical:4,borderRadius:12,overflow:"hidden"},children:e.badge}):null,e.title!==null?/* @__PURE__ */i.jsx(Text,{tier:"heading",accessibilityRole:"header",style:{fontFamily:t["look.font.heading"],fontWeight:String(t["look.font.heading_weight"]),fontSize:20,color:s},children:e.title}):null,e.locked.map(e=>/* @__PURE__ */i.jsx(Text,{style:{fontFamily:d,fontSize:15,color:t["look.color.ink"]},children:e},e)),e.price.map(e=>/* @__PURE__ */i.jsx(Text,{style:{fontFamily:d,fontSize:15,color:t["look.color.muted"]},testID:"everfur-sdk-price",children:e},e)),a!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:d,fontSize:15,color:t["look.color.ink"]},testID:"everfur-sdk-sheet-notice",children:a}):null,
|
|
156
156
|
/* @__PURE__ */i.jsx(SdkButton,{settings:t,label:e.button,onPress:n,testID:"everfur-sdk-sheet-primary"}),
|
|
157
157
|
/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:r,style:{minHeight:44,alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-sheet-dismiss",children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:{fontFamily:d,fontSize:15,color:t["look.color.muted"]},children:e.dismiss})})]})})}function SdkButton({settings:e,label:t,onPress:n,testID:r}){let{fill:a,ink:l}=buttonFill(e);/* @__PURE__ */
|
|
158
158
|
return i.jsx(o.Pressable,{accessibilityRole:"button",onPress:n,style:{minHeight:48,borderRadius:24,backgroundColor:a,alignItems:"center",justifyContent:"center",paddingHorizontal:20},...r===void 0?{}:{testID:r},children:/* @__PURE__ */i.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__ */
|
|
159
|
-
return i.jsx(o.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__ */i.jsx(Text,{tier:"compact",style:{fontFamily:e["look.font.body"],fontSize:12.5,color:e["look.color.ink"]},children:t})})}function SdkDockBar({config:e,onPress:
|
|
160
|
-
return i.jsx(o.Pressable,{accessibilityRole:"button",onPress:
|
|
159
|
+
return i.jsx(o.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__ */i.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__ */
|
|
160
|
+
return i.jsx(o.Pressable,{accessibilityRole:"button",onPress:n,style:{margin:12,minHeight:50,borderRadius:25,borderWidth:1.5,borderColor:r["look.color.heading"],backgroundColor:ga,justifyContent:"center",paddingHorizontal:18},testID:"everfur-sdk-dock",children:/* @__PURE__ */i.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__ */
|
|
161
|
+
return i.jsxs(o.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:[
|
|
162
|
+
/* @__PURE__ */i.jsx(o.View,{style:{width:20,height:20,borderRadius:10,marginBottom:3,backgroundColor:t,opacity:.55}}),
|
|
163
|
+
/* @__PURE__ */i.jsx(o.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 a=e.settings,l=a["look.font.body"],s=a["look.color.ink"],d=a["look.color.muted"],c=t.photo===null?null:ya(t.photo);/* @__PURE__ */
|
|
161
164
|
return i.jsxs(o.ScrollView,{style:r,contentContainerStyle:{gap:14,paddingHorizontal:16,paddingTop:16,paddingBottom:22},testID:`everfur-sdk-vet-${t.level}`,children:[
|
|
162
|
-
/* @__PURE__ */i.jsxs(o.View,{style:{backgroundColor:
|
|
165
|
+
/* @__PURE__ */i.jsxs(o.View,{style:{backgroundColor:ga,borderWidth:1,borderColor:a["look.color.line"],borderRadius:a["look.radius.card"],padding:16,gap:12},children:[
|
|
163
166
|
/* @__PURE__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",gap:12},children:[
|
|
164
|
-
/* @__PURE__ */i.jsx(BrandImage,{uri:c,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback
|
|
167
|
+
/* @__PURE__ */i.jsx(BrandImage,{uri:c,decorative:true,resizeMode:"cover",style:{width:52,height:52,borderRadius:26},fallback:t.initial!==null?/* @__PURE__ */i.jsx(o.View,{style:{width:52,height:52,borderRadius:26,backgroundColor:a["look.color.tint"],alignItems:"center",justifyContent:"center"},testID:"everfur-sdk-vet-initial",children:/* @__PURE__ */i.jsx(Text,{tier:"heading",style:{fontFamily:a["look.font.heading"],fontSize:20,color:a["look.color.heading"]},children:t.initial})}):/* @__PURE__ */i.jsx(VetPersonMark,{tint:a["look.color.tint"],ink:a["look.color.heading"]})}),
|
|
165
168
|
/* @__PURE__ */i.jsxs(o.View,{style:{flex:1,gap:2},children:[
|
|
166
169
|
/* @__PURE__ */i.jsx(Text,{tier:"heading",style:{fontFamily:a["look.font.heading"],fontWeight:String(a["look.font.heading_weight"]),fontSize:17,color:a["look.color.heading"]},children:t.name}),t.title!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:13,color:d},children:t.title}):null]})]}),t.allowance!==null||t.extra!==null?/* @__PURE__ */i.jsxs(o.View,{style:{backgroundColor:a["look.color.tint"],borderRadius:Math.max(8,a["look.radius.card"]-4),padding:12,gap:2},testID:"everfur-sdk-vet-allowance",children:[t.allowance!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:14,fontWeight:"600",color:s},children:t.allowance}):null,t.extra!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:13,color:d},children:t.extra}):null]}):null,
|
|
167
170
|
/* @__PURE__ */i.jsx(SdkButton,{settings:a,label:t.seeTimes,onPress:n,testID:"everfur-sdk-vet-book"})]}),t.gate!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:14,color:s},testID:"everfur-sdk-vet-gate",children:t.gate}):null,t.rx!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:14,color:s},testID:"everfur-sdk-vet-rx",children:t.rx}):null,
|
|
168
|
-
/* @__PURE__ */i.jsx(o.View,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},children:e},e))}),t.privacy!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function
|
|
169
|
-
return i.jsxs(o.View,{style:[{alignItems:"flex-end",gap:8},s],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[p?/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:h,style:{maxWidth:240,backgroundColor:
|
|
170
|
-
/* @__PURE__ */i.jsxs(o.Pressable,{accessibilityRole:"button",accessibilityLabel:
|
|
171
|
-
/* @__PURE__ */i.jsx(SdkBrandArt,{url:u,style:{width:c?24:30,height:c?24:30},fallback:/* @__PURE__ */i.jsx(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:d["look.color.on_launcher"]}})}),c?/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{fontFamily:d["look.font.body"],fontSize:10,color:d["look.color.on_launcher"]},children:
|
|
172
|
-
return i.jsx(EverfurTabs,{petRef:n?.petRef??null,petName:n?.name??null,opened:{via:"plain"}})}function
|
|
171
|
+
/* @__PURE__ */i.jsx(o.View,{style:{gap:4},children:t.legal.map(e=>/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},children:e},e))}),t.privacy!==null?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:l,fontSize:12,color:d},testID:"everfur-sdk-vet-privacy",children:t.privacy}):null]})}function ka(e){return sdkText(e,"text.tabs.ask")}function SdkLauncherView({config:e,onPress:t,replyWaiting:n,tipSeen:a,onTipSeen:l,style:s}){let d=e.settings,c=d["layout.presentation"]==="full_screen",u=d["look.ask_icon"]===Ei?"":d["look.ask_icon"],[p,f]=r.useState(c&&!a);r.useEffect(()=>{(!c||a)&&f(false)},[c,a]);let h=()=>{f(false),l()};/* @__PURE__ */
|
|
172
|
+
return i.jsxs(o.View,{style:[{alignItems:"flex-end",gap:8},s],pointerEvents:"box-none",testID:"everfur-sdk-launcher",children:[p?/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:h,style:{maxWidth:240,backgroundColor:ga,borderRadius:14,borderWidth:1,borderColor:d["look.color.line"],paddingHorizontal:14,paddingVertical:10},testID:"everfur-sdk-launcher-tip",children:/* @__PURE__ */i.jsx(Text,{style:{fontFamily:d["look.font.body"],fontSize:14,color:d["look.color.ink"]},children:sdkText(e,"text.launcher.tip")})}):null,
|
|
173
|
+
/* @__PURE__ */i.jsxs(o.Pressable,{accessibilityRole:"button",accessibilityLabel:ka(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:[
|
|
174
|
+
/* @__PURE__ */i.jsx(SdkBrandArt,{url:u,style:{width:c?24:30,height:c?24:30},fallback:/* @__PURE__ */i.jsx(ShellIcon,{name:"wordmark",style:{width:36,height:13,tintColor:d["look.color.on_launcher"]}})}),c?/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{fontFamily:d["look.font.body"],fontSize:10,color:d["look.color.on_launcher"]},children:ka(e)}):null,c&&n?/* @__PURE__ */i.jsx(o.View,{style:{position:"absolute",top:2,right:2,width:12,height:12,borderRadius:6,backgroundColor:"#C03410",borderWidth:2,borderColor:ga},testID:"everfur-sdk-launcher-dot"}):null]})]})}function va(e){let t=e.activePetRef;return e.pets.find(e=>e.petRef===t)??e.pets[0]??null}function EverfurSdkApp(e){let t=Ji(),n=useEverfurSdkConfig();r.useEffect(()=>{if(t===null)return;t.adoptLatest(),t.load();let e=o.AppState.addEventListener("change",e=>{e==="active"&&t.retry()});return()=>e.remove()},[t]);let a=r.useCallback(()=>{t?.retry()},[t]);return n.active!==null?/* @__PURE__ */i.jsx(SdkShell,{...e,config:n.active}):n.status==="legacy"?/* @__PURE__ */i.jsx(LegacyPath,{...e}):/* @__PURE__ */i.jsx(SdkNeutralScreen,{failed:n.status==="failed",onRetry:a})}function LegacyPath({host:e,renderLegacy:t}){if(t!==void 0)return t();let n=va(e);/* @__PURE__ */
|
|
175
|
+
return i.jsx(EverfurTabs,{petRef:n?.petRef??null,petName:n?.name??null,opened:{via:"plain"}})}function wa(e,t,n){let o=Ji(),i=e.settings["access.mode"]==="free_cap",a=capMonth(/* @__PURE__ */new Date),[l,s]=r.useState(()=>o?.peekFreeUsed(t,a)??0),d=r.useRef(true),c=r.useRef(n);c.current=n,r.useEffect(()=>{if(d.current=true,!(o===null||!i))return o.readFreeUsed(t,a).then(e=>{d.current&&s(e)}),()=>{d.current=false}},[o,i,t,a]);let u=r.useMemo(()=>!i||o===null?null:{onMessageSent:()=>{o.addFreeUsed(t,a).then(e=>{d.current&&s(e)})},onFreeCapReached:e=>{o.setFreeUsed(t,a,e.used).then(e=>{d.current&&s(e)}),c.current(e)}},[i,o,t,a]);return{used:l,hooks:u}}var xa=He.heading;function SdkShell({host:e,section:t,onSectionChange:n,chat:a,records:l,style:s,config:d}){let c=d.settings,u=r.useContext(Ee),p=va(e),f=vetLevelFor(d.stateGate,p?.location??null),h=r.useMemo(()=>resolveLayout(c,f),[c,f]),g=e.membership??"unknown",b=e.userId??u?.userRef??"anonymous",m=r.useRef(()=>{}),{used:y,hooks:k}=wa(d,b,e=>m.current(e)),v=askAccess(d,g,y),{tablet:w,column:x}=ma(),[_,S]=r.useState(t??h.sections[0]??"ask");r.useEffect(()=>{t!==void 0&&S(t)},[t]);let C=r.useCallback(e=>{S(e),n?.(e)},[n]),R=h.vetOnAsk!=="none",j=_==="vet"&&!R?"ask":_,[A,F]=r.useState(null),E=r.useCallback((e,t=null)=>{let n={sheet:e.kind==="members"?membersSheet(d):planSheet(d,p?.name),reason:e,notice:t};F(r=>t===null&&e.kind==="cap"&&r?.reason.kind==="cap"?{...n,notice:r.notice}:n)},[d,p?.name]);m.current=e=>E({kind:"cap"},e.emergencyGuidance??null);let I=()=>{A!==null&&(e.onOpenPlan?.(A.reason,A.sheet.soldBy),F(null))};r.useEffect(()=>{v.kind==="members_only"?E({kind:"members"}):v.kind==="cap_reached"&&E({kind:"cap"})},[v.kind,E]);let T=e=>isLocked(d,g,e),D={flex:1,backgroundColor:c["look.color.surface"]},P=j==="vet"?/* @__PURE__ */i.jsx(VetPane,{config:d,pet:p,level:f,locked:T("video_visits"),onLocked:()=>E({kind:"locked",part:"video_visits"}),onAsk:()=>C("ask")}):j==="records"?/* @__PURE__ */i.jsx(RecordsPane,{config:d,host:e,pet:p,vetShown:R,records:l,onPlan:e=>E({kind:"locked",part:e}),onVet:()=>R?C("vet"):void 0,locked:T,onAsk:()=>C("ask")}):/* @__PURE__ */i.jsx(AskPane,{config:d,layout:h,pet:p,level:f,access:v,hooks:k,chat:a,locked:T,onVet:()=>C("vet"),onPlan:()=>E({kind:v.kind==="members_only"?"members":"cap"})});/* @__PURE__ */
|
|
173
176
|
return i.jsxs(o.View,{style:[D,s],testID:`everfur-sdk-app-${h.nav}`,children:[
|
|
174
177
|
/* @__PURE__ */i.jsxs(o.View,{style:x,testID:w?"everfur-sdk-column-tablet":"everfur-sdk-column-phone",children:[
|
|
175
178
|
/* @__PURE__ */i.jsx(Header,{config:d,layout:h,host:e,pet:p,section:j,level:f,onSection:C}),h.nav==="bottom_tabs"||h.nav==="chat_first"?null:/* @__PURE__ */i.jsx(SectionNav,{config:d,layout:h,level:f,section:j,onSection:C,vetDot:e.vetMessageWaiting===true}),
|
|
176
|
-
/* @__PURE__ */i.jsx(o.View,{style:{flex:1},children:P}),h.nav==="bottom_tabs"?/* @__PURE__ */i.jsx(SectionNav,{config:d,layout:h,level:f,section:j,onSection:C,vetDot:e.vetMessageWaiting===true,bottom:true}):null]}),A!==null?/* @__PURE__ */i.jsx(SdkSheet,{sheet:A.sheet,settings:c,onPrimary:I,onDismiss:()=>F(null),notice:A.notice}):null]})}function
|
|
179
|
+
/* @__PURE__ */i.jsx(o.View,{style:{flex:1},children:P}),h.nav==="bottom_tabs"?/* @__PURE__ */i.jsx(SectionNav,{config:d,layout:h,level:f,section:j,onSection:C,vetDot:e.vetMessageWaiting===true,bottom:true}):null]}),A!==null?/* @__PURE__ */i.jsx(SdkSheet,{sheet:A.sheet,settings:c,onPrimary:I,onDismiss:()=>F(null),notice:A.notice}):null]})}function _a(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:a,vetDot:l,bottom:s=false}){let d=e.settings;return t.sections.length<2?null:/* @__PURE__ */i.jsx(o.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__ */
|
|
177
180
|
return i.jsxs(o.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:u},onPress:()=>a(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:[
|
|
178
|
-
/* @__PURE__ */i.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:
|
|
181
|
+
/* @__PURE__ */i.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:_a(e,c,n)}),c==="vet"&&l&&t.vetBadge==="tab_dot"?/* @__PURE__ */i.jsx(o.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:a,level:l,onSection:s}){let d=e.settings,c=d["look.color.heading"],u=(e,t,n)=>/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:t,style:{minWidth:44,minHeight:44,alignItems:"center",justifyContent:"center"},testID:n,children:/* @__PURE__ */i.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__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:16,paddingTop:12,paddingBottom:8},testID:"everfur-sdk-header-sections",children:[t!==""?/* @__PURE__ */i.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,
|
|
179
182
|
/* @__PURE__ */i.jsx(SdkLockup,{settings:d})]});return a==="ask"?/* @__PURE__ */i.jsxs(o.View,{children:[n,
|
|
180
183
|
/* @__PURE__ */i.jsx(MemoryRow,{config:e,pet:r})]}):n}if(t.nav==="chat_first"){let p=t.vetOnAsk==="header_button"&&a==="ask";/* @__PURE__ */
|
|
181
184
|
return i.jsxs(o.View,{testID:"everfur-sdk-header-chat-first",children:[
|
|
182
185
|
/* @__PURE__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52},children:[u("↓",n.onClose,"everfur-sdk-down"),
|
|
183
|
-
/* @__PURE__ */i.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:a==="ask"?sdkText(e,"text.ask.name"):
|
|
186
|
+
/* @__PURE__ */i.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:a==="ask"?sdkText(e,"text.ask.name"):_a(e,a,l)}),p?/* @__PURE__ */i.jsx(VetPill,{config:e,layout:t,level:l,waiting:n.vetMessageWaiting===true,onPress:()=>s("vet")}):a!=="ask"?u("×",()=>s("ask"),"everfur-sdk-back-to-ask"):/* @__PURE__ */i.jsx(o.View,{style:{minWidth:44}})]}),a==="ask"?/* @__PURE__ */i.jsx(MemoryRow,{config:e,pet:r,withLockup:true}):null]})}let p=t.presentation==="full_screen",f=t.vetOnAsk==="header_button"&&a==="ask";/* @__PURE__ */
|
|
184
187
|
return i.jsxs(o.View,{testID:`everfur-sdk-header-${t.nav}`,children:[
|
|
185
188
|
/* @__PURE__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",paddingHorizontal:8,minHeight:52,gap:8},children:[
|
|
186
189
|
/* @__PURE__ */i.jsx(o.View,{style:{flex:1,alignItems:"flex-start"},children:p?/* @__PURE__ */i.jsx(PetSwitcher,{config:e,host:n,pet:r}):null}),
|
|
187
190
|
/* @__PURE__ */i.jsx(SdkLockup,{settings:d}),
|
|
188
191
|
/* @__PURE__ */i.jsxs(o.View,{style:{flex:1,alignItems:"flex-end"},children:[f?/* @__PURE__ */i.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"&&(a==="ask"||a==="vet")?/* @__PURE__ */i.jsx(AskVetSwitch,{config:e,level:l,section:a,onSection:s}):null,a==="ask"?/* @__PURE__ */i.jsx(MemoryRow,{config:e,pet:r}):null]})}function AskVetSwitch({config:e,level:t,section:n,onSection:r}){let a=e.settings;/* @__PURE__ */
|
|
189
|
-
return i.jsx(o.View,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:a["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(l=>/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:n===l},onPress:()=>r(l),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===l?a["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${l}`,children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:{fontFamily:a["look.font.body"],fontSize:15,color:n===l?a["look.color.heading"]:a["look.color.muted"]},children:
|
|
192
|
+
return i.jsx(o.View,{accessibilityRole:"tablist",style:{flexDirection:"row",borderBottomWidth:1,borderColor:a["look.color.line"],paddingHorizontal:8},testID:"everfur-sdk-ask-vet-switch",children:["ask","vet"].map(l=>/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"tab",accessibilityState:{selected:n===l},onPress:()=>r(l),style:{minHeight:44,paddingHorizontal:12,justifyContent:"center",borderBottomWidth:2,borderBottomColor:n===l?a["look.color.primary"]:"transparent"},testID:`everfur-sdk-switch-${l}`,children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:{fontFamily:a["look.font.body"],fontSize:15,color:n===l?a["look.color.heading"]:a["look.color.muted"]},children:_a(e,l,t)})},l))})}function VetPill({config:e,layout:t,level:n,waiting:r,onPress:a}){let l=e.settings,s=t.vetBadge==="header_pill"&&r;/* @__PURE__ */
|
|
190
193
|
return i.jsxs(o.Pressable,{accessibilityRole:"button",onPress:a,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__ */i.jsx(o.View,{style:{width:8,height:8,borderRadius:4,backgroundColor:l["look.color.dot"]},testID:"everfur-sdk-vet-pill-dot"}):null,
|
|
191
194
|
/* @__PURE__ */i.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__ */i.jsxs(o.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:[
|
|
192
|
-
/* @__PURE__ */i.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__ */i.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__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */i.jsx(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */i.jsx(o.View,{}),n?/* @__PURE__ */i.jsx(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:a,level:l,access:s,hooks:d,chat:c,locked:u,onVet:p,onPlan:f}){let h=t.settings,g=h["look.color.heading"],b=r.useMemo(()=>({title:sdkText(t,"text.ask.greeting",a===null?{}:{pet:a.name}),chipTints:h["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,g)}))}),[t,h,g,a]),m=r.useMemo(()=>({chats:
|
|
193
|
-
return i.jsxs(o.View,{style:{flex:1},testID:"everfur-sdk-ask",children:[y?/* @__PURE__ */i.jsx(o.View,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:f,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:{fontFamily:h["look.font.body"],fontSize:15,color:h["look.color.accent"]},children:s.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */i.jsx(
|
|
195
|
+
/* @__PURE__ */i.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__ */i.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__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:16,paddingTop:10},testID:"everfur-sdk-memory-row",children:[r!==null?/* @__PURE__ */i.jsx(SdkMemoryChip,{settings:e.settings,label:r}):/* @__PURE__ */i.jsx(o.View,{}),n?/* @__PURE__ */i.jsx(SdkLockup,{settings:e.settings}):null]})}function AskPane({config:t,layout:n,pet:a,level:l,access:s,hooks:d,chat:c,locked:u,onVet:p,onPlan:f}){let h=t.settings,g=h["look.color.heading"],b=r.useMemo(()=>({title:sdkText(t,"text.ask.greeting",a===null?{}:{pet:a.name}),chipTints:h["look.color.chips"].map(e=>({tint:e,ink:chipInk(e,g)}))}),[t,h,g,a]),m=r.useMemo(()=>({chats:xa,newChat:sdkText(t,"text.ask.new_chat")}),[t]),y=s.kind==="members_only"||s.kind==="cap_reached",k=askFootLines(t).filter(e=>e!==sdkFixed(t,"ask.emergency")),v=n.vetOnAsk!=="none"&&l!=="none"?a?.location?.state:void 0;/* @__PURE__ */
|
|
196
|
+
return i.jsxs(o.View,{style:{flex:1},testID:"everfur-sdk-ask",children:[y?/* @__PURE__ */i.jsx(o.View,{style:{flex:1,alignItems:"center",justifyContent:"center",padding:24},testID:"everfur-sdk-ask-blocked",children:/* @__PURE__ */i.jsx(o.Pressable,{accessibilityRole:"button",onPress:f,style:{minHeight:44,justifyContent:"center"},children:/* @__PURE__ */i.jsx(Text,{tier:"control",style:{fontFamily:h["look.font.body"],fontSize:15,color:h["look.color.accent"]},children:s.kind==="members_only"?sdkText(t,"text.members.button"):sdkText(t,"text.cap.button")})})}):/* @__PURE__ */i.jsx(Xi.Provider,{value:d,children:/* @__PURE__ */i.jsx(e.EverfurChat,{...c,...a===null?{}:{petRef:a.petRef},...v===void 0?{}:{vetUsState:v},...u("texting")||!h["features.texting"]?{textingEntry:false}:{},...n.vetOnAsk==="none"?{}:{onFindVet:p},emptyState:b,historyBar:m,style:{flex:1}})}),s.kind==="counter"?/* @__PURE__ */i.jsx(Text,{style:{textAlign:"center",fontFamily:h["look.font.label"]==="body"?h["look.font.body"]:h["look.font.label"],fontSize:12,color:h["look.color.muted"],paddingVertical:4},testID:"everfur-sdk-counter",children:s.line}):null,k.map(e=>/* @__PURE__ */i.jsx(Text,{style:{textAlign:"center",fontFamily:h["look.font.body"],fontSize:12,color:h["look.color.muted"],paddingBottom:6,paddingHorizontal:16},testID:"everfur-sdk-ask-privacy",children:e},e))]})}function VetPane({config:e,pet:t,level:n,locked:r,onLocked:a,onAsk:s}){let d=l.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__ */
|
|
194
197
|
return i.jsxs(o.View,{style:{flex:1},children:[
|
|
195
198
|
/* @__PURE__ */i.jsx(SdkVetHomeView,{config:e,home:c,onBook:()=>{r?a():d.open(t?.petRef??null)},style:{flex:1}}),
|
|
196
|
-
/* @__PURE__ */i.jsx(SdkDockBar,{config:e,onPress:s})]})}function RecordsPane({config:e,host:t,pet:r,vetShown:a,records:l,onPlan:s,onVet:d,locked:c,onAsk:u}){let p=e.settings,f=new Set(p["features.partner_data"]),h=(t.partnerData??[]).filter(e=>f.has(e.source)),g=partnerDataSources(e),b=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results");/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */i.jsx(SdkDockBar,{config:e,pet:t?.name,onPress:s})]})}function RecordsPane({config:e,host:t,pet:r,vetShown:a,records:l,onPlan:s,onVet:d,locked:c,onAsk:u}){let p=e.settings,f=new Set(p["features.partner_data"]),h=(t.partnerData??[]).filter(e=>f.has(e.source)),g=partnerDataSources(e),b=t=>sdkFixed(e,t==="park_checkins"?"pdata.tag.park_checkins":t==="camera_events"?"pdata.tag.camera_events":"pdata.tag.dna_results");/* @__PURE__ */
|
|
197
200
|
return i.jsxs(o.View,{style:{flex:1},testID:"everfur-sdk-records",children:[r===null?null:/* @__PURE__ */i.jsx(n.EverfurRecords,{...l,petRef:r.petRef,petName:r.name,weightUnit:p["units.weight"],noVet:!a,onOpenPlan:()=>s("previous_results"),...a?{onSpeakToVet:d}:{},...c("link_records")?{onRequestFromClinic:()=>s("link_records")}:{},style:{flex:1}}),h.length>0?/* @__PURE__ */i.jsx(o.View,{style:{paddingHorizontal:16,paddingVertical:8,gap:6},testID:"everfur-sdk-partner-data",accessibilityLabel:g.join(", "),children:h.map((e,t)=>/* @__PURE__ */i.jsxs(o.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[
|
|
198
201
|
/* @__PURE__ */i.jsx(Text,{tier:"badge",style:{fontFamily:p["look.font.body"],fontSize:11,color:p["look.color.heading"],backgroundColor:p["look.color.tint"],paddingHorizontal:8,paddingVertical:2,borderRadius:10,overflow:"hidden"},children:b(e.source)}),
|
|
199
202
|
/* @__PURE__ */i.jsx(Text,{style:{flex:1,fontFamily:p["look.font.body"],fontSize:14,color:p["look.color.ink"]},children:e.title}),e.date!==void 0?/* @__PURE__ */i.jsx(Text,{style:{fontFamily:p["look.font.body"],fontSize:12,color:p["look.color.muted"]},children:e.date}):null]},`${e.source}-${t}`))}):null,
|
|
200
|
-
/* @__PURE__ */i.jsx(SdkDockBar,{config:e,onPress:u})]})}function EverfurSdkLauncher({onPress:t,tipSeen:n=false,onTipSeen:o,replyWaiting:a,onReplyWaitingChange:l,style:s}){let d
|
|
203
|
+
/* @__PURE__ */i.jsx(SdkDockBar,{config:e,pet:r?.name,onPress:u})]})}function EverfurSdkLauncher({onPress:t,tipSeen:n=false,onTipSeen:o,replyWaiting:a,onReplyWaitingChange:l,style:s}){let d=Ji(),{active:c}=useEverfurSdkConfig();r.useEffect(()=>{d?.load()},[d]);let u=e.useEverfurUnread({petRef:null}),p=a??u.hasUnread===true;return r.useEffect(()=>{l?.(p)},[p,l]),c===null||c.settings["layout.launcher"]!=="floating_button"?null:/* @__PURE__ */i.jsx(SdkLauncherView,{config:c,onPress:t,replyWaiting:p,tipSeen:n,onTipSeen:()=>o?.(),...s===void 0?{}:{style:s}})}exports.EVERFUR_INTRO_COPY=De;exports.EVERFUR_TABS_COPY=lt;exports.EVERFUR_TABS_SHELL_COPY=Lo;exports.EverfurIntro=EverfurIntro;exports.EverfurRecordsLandedBanner=EverfurRecordsLandedBanner;exports.EverfurSdkApp=EverfurSdkApp;exports.EverfurSdkLauncher=EverfurSdkLauncher;exports.EverfurTabs=EverfurTabs;exports.RECORDS_BANNER_MS=wo;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;
|