@everfur/sdk 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{Chat-DZpYH8Uh.d.ts → Chat-CFi5cNUF.d.ts} +3 -3
  3. package/dist/{Chat-bATY4atj.d.cts → Chat-DQOsAumH.d.cts} +3 -3
  4. package/dist/{DepthViews-C4DC4Kom.d.cts → DepthViews-C409ubw-.d.cts} +1 -1
  5. package/dist/{DepthViews-BpHUbjSY.d.cts → DepthViews-D81c95Ra.d.cts} +1 -1
  6. package/dist/{DepthViews-dLTizxjr.d.ts → DepthViews-es8mIK0w.d.ts} +1 -1
  7. package/dist/{DepthViews-qBIoA48w.d.ts → DepthViews-uilL1NJZ.d.ts} +1 -1
  8. package/dist/{BookedScreen-DFJcgf1e.d.ts → IntakeMedia-BcjjUizr.d.ts} +40 -1
  9. package/dist/{BookedScreen-R5X_Zrlh.d.cts → IntakeMedia-CL_S2tZE.d.cts} +40 -1
  10. package/dist/animations/index.d.cts +3 -3
  11. package/dist/animations/index.d.ts +3 -3
  12. package/dist/{attachments-Ce06TWqe.d.cts → attachments-B2GjBgvF.d.cts} +2 -2
  13. package/dist/{attachments-CUOGILir.d.cts → attachments-DI710no4.d.cts} +5 -5
  14. package/dist/{attachments-CPRFfoHT.d.ts → attachments-DNaSbmA3.d.ts} +2 -2
  15. package/dist/{attachments-CXAnZcEg.d.ts → attachments-SF88N654.d.ts} +5 -5
  16. package/dist/{bookingCopy-DFTv9w6J.d.ts → bookingCopy-D2N3RhsV.d.ts} +2 -2
  17. package/dist/{bookingCopy-BwVopcoV.d.cts → bookingCopy-xlXxORCA.d.cts} +2 -2
  18. package/dist/{casesRepository-CJchNp3x.d.cts → casesRepository-B-md8h1S.d.cts} +1 -1
  19. package/dist/{casesRepository-DAVcY3jC.d.ts → casesRepository-CC6951TK.d.ts} +1 -1
  20. package/dist/chat/index.d.cts +9 -9
  21. package/dist/chat/index.d.ts +9 -9
  22. package/dist/client/index.cjs +1 -1
  23. package/dist/client/index.d.cts +6 -6
  24. package/dist/client/index.d.ts +6 -6
  25. package/dist/client/index.js +1 -1
  26. package/dist/{config-ZxwCylac.d.ts → config-BM0sv5jx.d.ts} +1 -1
  27. package/dist/{config-h5h6TsHL.d.cts → config-Daa1plhQ.d.cts} +1 -1
  28. package/dist/consent/index.d.cts +5 -5
  29. package/dist/consent/index.d.ts +5 -5
  30. package/dist/{context-DtPIshVA.d.ts → context-CDV2pwGI.d.ts} +5 -5
  31. package/dist/{context-CtsAgJnc.d.cts → context-DQHtwcHN.d.cts} +5 -5
  32. package/dist/{copy-CaWaplQc.d.cts → copy-BEx5F71o.d.cts} +2 -2
  33. package/dist/{copy-Cg89Qoal.d.ts → copy-Cl1l-qmY.d.ts} +2 -2
  34. package/dist/core/index.cjs +1 -1
  35. package/dist/core/index.d.cts +12 -12
  36. package/dist/core/index.d.ts +12 -12
  37. package/dist/core/index.js +1 -1
  38. package/dist/{depth-EXZYEO70.d.cts → depth-CAAwiStc.d.cts} +3 -3
  39. package/dist/{depth-Bo4bAwcn.d.ts → depth-DfNRVtrV.d.ts} +3 -3
  40. package/dist/{entitlementRepository-DcbIx8yV.d.ts → entitlementRepository-CVWvND1P.d.ts} +2 -2
  41. package/dist/{entitlementRepository-BYtVb1oU.d.cts → entitlementRepository-DPvWjV-N.d.cts} +2 -2
  42. package/dist/{identity-EC5-apbY.d.ts → identity-BhT7oJDS.d.ts} +1 -1
  43. package/dist/{identity-b5Vp32Vp.d.cts → identity-DUlshgow.d.cts} +1 -1
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.d.cts +12 -12
  46. package/dist/index.d.ts +12 -12
  47. package/dist/index.js +1 -1
  48. package/dist/notifications/index.d.cts +2 -2
  49. package/dist/notifications/index.d.ts +2 -2
  50. package/dist/{pets-DM8QvKLo.d.cts → pets-Bneph9m1.d.cts} +1 -1
  51. package/dist/{pets-B_27_agU.d.ts → pets-DjcLmRrW.d.ts} +1 -1
  52. package/dist/{petsRepository-BJsJ4cju.d.cts → petsRepository-BnVre3q7.d.cts} +1 -1
  53. package/dist/{petsRepository-CuYZZaI5.d.ts → petsRepository-BwxmfX_s.d.ts} +1 -1
  54. package/dist/{ports-ZmJYgd5I.d.cts → ports-BPKxFOSe.d.cts} +4 -4
  55. package/dist/{ports-nXHf50_X.d.ts → ports-Di9rdLO9.d.ts} +4 -4
  56. package/dist/records/depth/index.d.cts +7 -7
  57. package/dist/records/depth/index.d.ts +7 -7
  58. package/dist/records/index.d.cts +9 -9
  59. package/dist/records/index.d.ts +9 -9
  60. package/dist/{requestFunnel-Ve9BshTB.d.ts → requestFunnel-CiSX2pun.d.ts} +2 -2
  61. package/dist/{requestFunnel-C_cZXhIA.d.cts → requestFunnel-DMR_1T3O.d.cts} +2 -2
  62. package/dist/{runtimeTypes-D155OlBW.d.cts → runtimeTypes-2gJ5hYoE.d.cts} +4 -4
  63. package/dist/{runtimeTypes-ByKsp8hm.d.ts → runtimeTypes-CkMFCbHW.d.ts} +4 -4
  64. package/dist/server/events/index.cjs +1 -1
  65. package/dist/server/events/index.d.cts +2 -2
  66. package/dist/server/events/index.d.ts +2 -2
  67. package/dist/server/events/index.js +1 -1
  68. package/dist/server/index.cjs +1 -1
  69. package/dist/server/index.d.cts +3 -3
  70. package/dist/server/index.d.ts +3 -3
  71. package/dist/server/index.js +1 -1
  72. package/dist/televet/booking/index.d.cts +6 -6
  73. package/dist/televet/booking/index.d.ts +6 -6
  74. package/dist/testing/index.d.cts +1 -1
  75. package/dist/testing/index.d.ts +1 -1
  76. package/dist/testing/rn/index.d.cts +7 -7
  77. package/dist/testing/rn/index.d.ts +7 -7
  78. package/dist/testing/web/index.d.cts +7 -7
  79. package/dist/testing/web/index.d.ts +7 -7
  80. package/dist/{timelineRows-DXpjECfA.d.ts → timelineRows-D3171ksh.d.ts} +1 -1
  81. package/dist/{timelineRows-BNF43SXK.d.cts → timelineRows-DDnz4gx2.d.cts} +1 -1
  82. package/dist/{useRecordsDepth-CARTuHKh.d.cts → useRecordsDepth-COJ0wSYK.d.cts} +1 -1
  83. package/dist/{useRecordsDepth-fPSv-GXU.d.ts → useRecordsDepth-Z9FF5X4E.d.ts} +1 -1
  84. package/dist/{view-Dc-JlFkf.d.ts → view-DoQEHXJR.d.ts} +2 -2
  85. package/dist/{view-DGPaVno8.d.cts → view-nRy6SitU.d.cts} +2 -2
  86. package/dist/web/consent/index.d.cts +5 -5
  87. package/dist/web/consent/index.d.ts +5 -5
  88. package/dist/web/index.cjs +2 -2
  89. package/dist/web/index.d.cts +14 -14
  90. package/dist/web/index.d.ts +14 -14
  91. package/dist/web/index.js +2 -2
  92. package/dist/web/notifications/index.d.cts +3 -3
  93. package/dist/web/notifications/index.d.ts +3 -3
  94. package/dist/web/records/depth/index.d.cts +7 -7
  95. package/dist/web/records/depth/index.d.ts +7 -7
  96. package/dist/web/records/index.d.cts +9 -9
  97. package/dist/web/records/index.d.ts +9 -9
  98. package/dist/web/televet/booking/index.cjs +1 -1
  99. package/dist/web/televet/booking/index.d.cts +15 -49
  100. package/dist/web/televet/booking/index.d.ts +15 -49
  101. package/dist/web/televet/booking/index.js +1 -1
  102. package/dist/web/televet/index.cjs +1 -1
  103. package/dist/web/televet/index.d.cts +11 -3
  104. package/dist/web/televet/index.d.ts +11 -3
  105. package/dist/web/televet/index.js +1 -1
  106. package/package.json +1 -1
@@ -1,18 +1,18 @@
1
1
  import { b as EverfurErrorCode } from '../EverfurError-DmELDpXp.js';
2
2
  export { A as AUTO_RETRYABLE_CODES, B as BACKOFF_BASE_MS, d as BACKOFF_CAP_MS, e as EVERFUR_ERROR_CATEGORIES, f as EVERFUR_ERROR_CODES, E as EverfurError, a as EverfurErrorCategory, M as MAX_RETRY_ATTEMPTS, g as MakeEverfurErrorOptions, R as RETRYABLE_CONTRACT_CODES, h as backoffDelayMs, j as canRecreateOnNotFound, c as categoryFor, k as fromHttpStatus, l as fromWire, m as isAutoRetryable, i as isRetryableCode, n as makeEverfurError, s as shouldRetry, u as userFacingError } from '../EverfurError-DmELDpXp.js';
3
3
  export { a as EverfurConfigError, E as EverfurResult, b as EverfurThrownError, e as err, i as isErr, c as isOk, o as ok, u as unwrap } from '../EverfurResult-SGvHKsCB.js';
4
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-ZxwCylac.js';
4
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, B as ByteSource, C as ClientConfigFailure, k as ClientConfigFailureReason, l as ClientConfigOutcome, m as DEFAULT_CONTRACT_VERSION, D as DeltaFrame, c as DoneFrame, n as EMPTY_FRAME_ARRAYS, o as ENV_API_BASE_URL, E as ErrorFrame, p as EventSourceFactory, q as EventSourceInit, r as EventSourceLike, s as EventSourceMessage, t as EverfurConfig, d as EverfurRequest, e as EverfurRequestBase, u as FetchInit, j as FetchLike, v as FetchResponseLike, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, R as RawResponse, w as ReadableStreamLike, x as ResolveClientConfigOptions, y as ResolvedClientConfig, S as SDK_PLATFORM, z as SDK_VERSION, G as SdkPlatform, I as ServerRequestIdSource, J as TransportDeps, T as TransportPort, U as UnknownFrame, i as UrgencyLevel, K as acceptedFrame, L as analysisCompleteFrame, N as analysisStartedFrame, O as assertNever, P as bufferedTextByteSource, Q as buildBaseHeaders, V as checkPublishableKey, W as createHttpTransport, X as deltaFrame, Y as doneFrame, Z as errorFrame, _ as errorFromResponse, $ as eventSourceByteSource, a0 as eventSourceRequestId, a1 as fetchByteSource, a2 as getGlobalFetch, a3 as heartbeatFrame, a4 as networkError, a5 as parseSse, a6 as requestIdOf, a7 as requestJson, a8 as requestRaw, a9 as resolveApiBaseUrl, aa as resolveClientConfig, ab as tryResolveApiBaseUrl, ac as tryResolveClientConfig, ad as unknownFrame } from '../config-BM0sv5jx.js';
5
5
  export { B as Brand, a as ClientId, C as ConversationId, D as DocumentId, J as JobId, P as PetRef, R as RecordsRequestId, b as ResponseId, U as UserRef, _ as __brand, c as conversationId, p as petRef, d as unsafeClientId, e as unsafeConversationId, f as unsafeDocumentId, g as unsafeJobId, h as unsafePetRef, i as unsafeRecordsRequestId, j as unsafeResponseId, k as unsafeUserRef, u as userRef } from '../ids-B2GAAifq.js';
6
- export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-EC5-apbY.js';
6
+ export { A as AuthContext, D as DeviceAuth, I as IdentityProvider, M as MintedToken, T as TokenProvider, a as authHeaders, b as authedSend, c as createIdentityProvider, n as newSessionId, w as withAuthHeaders } from '../identity-BhT7oJDS.js';
7
7
  export { a as CapabilityDecision, b as CapabilityDisabled, C as CapabilityName, c as DecideOptions, D as DisabledLevel, E as EntitlementDecision, L as LevelGrant, R as ResolvedEntitlements, d as decideCapability, e as deniedDecisionsFor, r as requires, f as resolveEntitlements } from '../resolve-D4Ywz5OS.js';
8
- export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-DcbIx8yV.js';
8
+ export { E as ENTITLEMENTS_PATH, a as EntitlementResolution, F as FetchEntitlementsArgs, f as fetchEntitlements } from '../entitlementRepository-CVWvND1P.js';
9
9
  import { E as EverfurTheme } from '../tokens-BYtbKwFh.js';
10
10
  export { D as DEFAULT_MAX_FONT_SCALE, v as EASING_CURVES, w as EVERFUR_DARK, x as EVERFUR_LIGHT, c as EverfurColorTokens, y as EverfurEasingCurve, b as EverfurFontFaceKey, d as EverfurFontFamilies, a as EverfurFontWeight, e as EverfurLetterSpacingTokens, f as EverfurLineHeightTokens, g as EverfurMotionDurationTokens, h as EverfurMotionTokens, i as EverfurRadiusTokens, j as EverfurSpaceTokens, k as EverfurSpringToken, l as EverfurTextColorTokens, z as EverfurTextScaleTier, m as EverfurThemeMeta, n as EverfurThemeSlot, o as EverfurThemeSlotKey, p as EverfurThemeSlotName, q as EverfurThemeSlots, r as EverfurTypeSizeTokens, s as EverfurTypeTokens, t as EverfurWeightTokens, S as SLOT_MIN_BORDER_CONTRAST, A as SLOT_MIN_CONTRAST, B as SYSTEM_FONT_FAMILY, C as SYSTEM_MONO_FAMILY, F as SlotGrounds, G as TEXT_SCALE_TIER_CAPS, T as THEME_SLOT_KEYS, u as THEME_SLOT_NAMES, H as cssCubicBezier, I as deepFreeze, J as guardSlotContrast, K as mergeThemeSlots, L as parseThemeSlots } from '../tokens-BYtbKwFh.js';
11
11
  export { E as EverfurFaceStyle, R as ResolveThemeInput, T as TEXT_SCALE_FLOOR, f as face, p as previewTheme, r as resolveTheme, w as withServerBranding } from '../typeStyle-DKz02DGU.js';
12
12
  export { A as APPEARANCE_PRESETS, a as APPEARANCE_PRESET_NAMES, b as APPEARANCE_SIZE_RANGES, C as ClientBranding, c as EverfurAppearance, d as EverfurAppearancePreset, e as EverfurAppearanceRules, f as EverfurAppearanceVariables, g as EverfurThemeFontFaceKey, h as EverfurThemeFontUrlsInput, i as EverfurThemeFontsInput, E as EverfurThemeInput, j as EverfurThemeSlotInput, k as EverfurThemeSlotsInput, L as LOCKABLE_THEME_FIELDS, m as LockableThemeField, M as MAX_FONT_SCALE_CEILING, R as RadiusScale, n as SLOT_LOCK_PREFIX, o as SlotLockName, S as SurfaceStyle, T as THEME_SCHEMA_VERSIONS, p as ThemeLockName, l as expandAppearance, q as hardenHttpsUrl, r as isEmptyBranding, s as isKnownBrandingSchema, t as lockedFieldsOf, u as parseClientBranding, v as parsePx } from '../branding-ytH4jJq1.js';
13
- export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-Ve9BshTB.js';
14
- export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-CuYZZaI5.js';
15
- export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-DAVcY3jC.js';
13
+ export { F as FunnelSendOptions, R as RequestFunnel, a as RequestFunnelDeps, c as createRequestFunnel } from '../requestFunnel-CiSX2pun.js';
14
+ export { c as PET_AGE_YEARS_MAX, d as PET_BREED_MAX, e as PET_NAME_MAX, f as PET_SPECIES_MAX, g as PET_WEIGHT_KG_MAX, P as PetProfileInput, a as PetProfilePatch, h as PetsRepository, R as RegisteredPet, W as WidgetPet, i as createPetsRepository, w as widgetPetFromWire } from '../petsRepository-BwxmfX_s.js';
15
+ export { b as CHECKIN_ANSWERS, c as CasesRepository, C as CheckinAnswer, a as CheckinOutcome, W as WatchCase, d as createCasesRepository } from '../casesRepository-CC6951TK.js';
16
16
  import '../ErrorPolicyPort-D22LUVrK.js';
17
17
  import '../profile-CSs1wlXT.js';
18
18
 
@@ -1,4 +1,4 @@
1
- import {z}from'zod';var Pt=Object.defineProperty;var o=(e,r)=>Pt(e,"name",{value:r,configurable:true});var je=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(je.map(e=>e.wireCode));var Dt=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",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",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"}),Lr=Object.freeze(je.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Dt[e.wireCode]}))),Nt=new Map(Lr.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Mt=Object.freeze(["http_envelope",...[...new Set(Lr.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function ve(e,r){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let t of [r??"http_envelope",...Mt]){let i=Nt.get(t+n);if(i)return i}}o(ve,"contractErrorFor");function Lt(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(Lt,"contractDocUrl");var Mr=null;function Br(e){return null}o(Br,"publishedDocUrl");var us=Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","unknown"]),ds=Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),Bt=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"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 zr(e){return Bt[e]}o(zr,"categoryFor");function oe(e){let r=ve(e);if(r)return r.normalized;let n=(e??"").trim().toUpperCase(),t=n.replace(/[^A-Z0-9]/g,"");if(t==="AUTHREJECTED")return "authRejected";if(n.startsWith("AUTH"))return "authExpired";switch(t){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 "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"}}o(oe,"fromWire");function jr(e){return e===401?"authExpired":e===403?"accessDenied":e===404?"conversationNotFound":e===409?"idempotencyConflict":e===421?"unknown":e===429?"rateLimited":e===400||e===422?"unknown":e>=500?"internalError":"unknown"}o(jr,"fromHttpStatus");var zt=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function W(e){return zt.has(e)}o(W,"isAutoRetryable");var jt=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function Ur(e){return W(e)||jt.has(e)}o(Ur,"isRetryableCode");function cs(e,r=false){return r||W(e)}o(cs,"shouldRetry");var Ut=500,Ue=8e3,qr=4;function Hr(e,r=Math.random){let n=Math.max(0,e),t=Math.min(Ut*2**n,Ue);return Math.floor(r()*t)}o(Hr,"backoffDelayMs");function fs(e){return e==="conversationNotFound"}o(fs,"canRecreateOnNotFound");var qt=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:"This feature isn't available on your account right now.",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:"Something in that request was not right. Check the details and try again.",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.",unknown:"Something went wrong. Please try again."});function qe(e){return qt[e]}o(qe,"userFacingError");function Kr(e,r,n){Object.defineProperty(e,r,{value:n,enumerable:false,writable:false,configurable:false});}o(Kr,"defineHidden");var Ht=/^[a-z][a-z0-9_]{0,63}$/;function S(e,r){let n=ve(r?.wireCode,r?.wireEnvelope),t={code:e,category:zr(e),retryable:r?.retryable??Ur(e),displayMessage:qe(e)};if(r?.httpStatus!==void 0&&(t.httpStatus=r.httpStatus),r?.requestId&&(t.requestId=r.requestId),typeof r?.reasonCode=="string"&&Ht.test(r.reasonCode)&&(t.reasonCode=r.reasonCode),n);return r?.wireMessage&&Kr(t,"wireMessage",r.wireMessage),r?.raw!==void 0&&r.raw!==null&&Kr(t,"raw",r.raw),Object.freeze(t)}o(S,"makeEverfurError");function x(e,r){return Object.freeze(r===void 0?{ok:true,value:e}:{ok:true,value:e,warning:r})}o(x,"ok");function y(e){return Object.freeze({ok:false,error:e})}o(y,"err");function Es(e){return e.ok}o(Es,"isOk");function vs(e){return !e.ok}o(vs,"isErr");var _e=class _e extends Error{constructor(r){super(`${r.code}: ${r.displayMessage}`),this.name="EverfurThrownError",this.error=r,this.code=r.code,this.category=r.category,Object.setPrototypeOf(this,_e.prototype);}};o(_e,"EverfurThrownError");var He=_e;function _s(e){if(e.ok)return e.value;throw new He(e.error)}o(_s,"unwrap");var Re=class Re extends Error{constructor(r,n){super(n),this.name="EverfurConfigError",this.kind=r,Object.setPrototypeOf(this,Re.prototype);}};o(Re,"EverfurConfigError");var k=Re;var Kt="0.7.0",$t="react-native",Gt="2026-09-19",$r="EVERFUR_API_BASE_URL";function de(e,r){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:r})})}o(de,"configFailure");function Wt(e){let r=typeof e=="string"?e.trim():"";return r.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(r)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}o(Wt,"checkPublishableKey");function Vt(e,r){let n=Wt(e?.publishableKey);if(n!==null)return Object.freeze({ok:false,failure:n});let t=e.publishableKey.trim(),i=Gr(e.apiBaseUrl);if(!i.ok)return i;let a=e.contractVersion?.trim()||Gt;return Object.freeze({ok:true,config:Object.freeze({publishableKey:t,apiBaseUrl:i.value,contractVersion:a,sdkVersion:Kt,platform:r?.platform??$t,debug:e.debug===true})})}o(Vt,"tryResolveClientConfig");function Ts(e,r){let n=Vt(e,r);if(!n.ok)throw new k("invalid-argument",n.failure.message);return n.config}o(Ts,"resolveClientConfig");function Gr(e){let r=e?.trim(),n=r&&r.length>0?r:no($r);return n?eo(n):de("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${$r}. The SDK never ships a hardcoded host.`)}o(Gr,"tryResolveApiBaseUrl");function Ss(e){let r=Gr(e);if(!r.ok)throw new k("invalid-argument",r.failure.message);return r.value}o(Ss,"resolveApiBaseUrl");function Wr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}o(Wr,"buildBaseHeaders");var Yt=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function Xt(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}o(Xt,"hostOf");function Qt(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}o(Qt,"isPrintableHost");function Jt(e,r){let n=e.indexOf("://");return n<0||e.slice(n+3).includes("@")?false:Qt(r)}o(Jt,"canEchoOrigin");function Zt(e,r){return `${e}://${r}`}o(Zt,"safeOrigin");function eo(e){let r=e.trim(),n=Yt.exec(r);if(n===null||n[2]===void 0||n[2].length===0)return de("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let t=(n[1]??"").toLowerCase(),i=Xt(n[2]);if(i.length===0)return de("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let a=Jt(r,i)?`: ${Zt(t,i)}`:"";if(t!=="https"){if(!(t==="http"&&ro(i)))return t==="http"?de("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${a}`):de("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${a}`)}let s=r.endsWith("/")?r.slice(0,-1):r;return Object.freeze({ok:true,value:s})}o(eo,"normalizeBaseUrl");function ro(e){let r=e.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"}o(ro,"isLoopbackHost");function no(e){let n=globalThis.process?.env?.[e];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}o(no,"readEnv");function ie(e){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>=55296&&n<=56319){let t=e.charCodeAt(r+1);if(!(t>=56320&&t<=57343))return true;r+=1;}else if(n>=56320&&n<=57343)return true}return false}o(ie,"hasLoneSurrogate");function V(e){return [...e].length}o(V,"serverLength");var Vr=128,Yr=128,Xr=/[\u0000-\u001F\u007F]/,to=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ps(e){let r=e,n=V(r);if(n===0||n>Yr)throw new k("invalid-argument",`petRef must be 1..${Yr} characters`);if(Xr.test(r))throw new k("invalid-argument","petRef must be printable (no control characters)");return r}o(Ps,"petRef");function Ds(e){let r=e,n=V(r);if(n===0||n>Vr)throw new k("invalid-argument",`userRef must be 1..${Vr} characters`);if(r.includes("@"))throw new k("invalid-argument","userRef must not contain '@'");if(Xr.test(r))throw new k("invalid-argument","userRef must be printable (no control characters)");return r}o(Ds,"userRef");function Ns(e){if(!to.test(e))throw new k("invalid-argument","conversationId must be a UUID");return e}o(Ns,"conversationId");function Ms(e){return e}o(Ms,"unsafePetRef");function Ls(e){return e}o(Ls,"unsafeUserRef");function Bs(e){return e}o(Bs,"unsafeConversationId");function zs(e){return e}o(zs,"unsafeResponseId");function js(e){return e}o(js,"unsafeClientId");function Us(e){return e}o(Us,"unsafeDocumentId");function qs(e){return e}o(qs,"unsafeJobId");function Hs(e){return e}o(Hs,"unsafeRecordsRequestId");function Vs(e,r,n){let t=null,i=null,a=false,s=o(()=>i||(i=(async()=>{try{let l=await r(),u=typeof l=="string"?l:l?.token;if(typeof u!="string"||u.length===0)throw new k("invalid-argument","TokenProvider returned an empty token");return t=u,n?.(typeof l=="string"?null:oo(l.expiresAt)),u}finally{i=null;}})(),i),"load");return {userRef:e,async currentToken(l){if(a)throw new k("not-initialized","This identity was cleared (sign-out); mint a new one.");return l?.forceRefresh&&(t=null),t!==null?t:s()},hasToken(){return !a&&t!==null},clear(){a=true,t=null;}}}o(Vs,"createIdentityProvider");function oo(e){if(e===void 0)return null;let r=typeof e=="number"?e<1e11?e*1e3:e:new Date(e).getTime();return Number.isFinite(r)?r:null}o(oo,"expiryMs");function Ys(){let e=new Uint8Array(16),r=globalThis.crypto;if(typeof r?.getRandomValues=="function")r.getRandomValues(e);else for(let t=0;t<e.length;t+=1)e[t]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=[];for(let t=0;t<e.length;t+=1)n.push(e[t].toString(16).padStart(2,"0"));return n.slice(0,4).join("")+"-"+n.slice(4,6).join("")+"-"+n.slice(6,8).join("")+"-"+n.slice(8,10).join("")+"-"+n.slice(10,16).join("")}o(Ys,"newSessionId");function io(e){let r={};return e.mode==="personalized"?r.authorization=`Bearer ${e.token}`:r["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(r["x-everfur-user-ref"]=e.userRef),e.sessionId&&(r["x-everfur-session-id"]=e.sessionId),r}o(io,"authHeaders");function ce(e,r){return {...e,headers:{...ao(e.headers),...io(r)}}}o(ce,"withAuthHeaders");function ao(e){if(!e)return {};let r={};for(let[n,t]of Object.entries(e)){let i=n.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(r[n]=t);}return r}o(ao,"stripAuthHeaders");async function Qr(e,r){if(r.mode==="anonymous")return r.transport.request(ce(e,{mode:"anonymous",publishableKey:r.publishableKey,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));let n;try{n=await r.identity.currentToken();}catch{return y(Ke())}let t=await r.transport.request(ce(e,{mode:"personalized",token:n,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));if(t.ok||t.error.httpStatus!==401)return t;let i;try{i=await r.identity.currentToken({forceRefresh:!0});}catch{return y(Ke())}let a=await r.transport.request(ce(e,{mode:"personalized",token:i,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));return !a.ok&&a.error.httpStatus===401?y(Ke(a.error.httpStatus)):a}o(Qr,"authedSend");function Ke(e){return S("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(Ke,"authRejectedError");function Js(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}o(Js,"assertNever");var so=Object.freeze([]),lo=Object.freeze([]);function Jr(e,r,n=null){return Object.freeze({kind:"accepted",streamId:e,lastEventId:r,serverRequestId:n,terminal:false})}o(Jr,"acceptedFrame");function Zr(e,r=null){return Object.freeze({kind:"heartbeat",lastEventId:e,serverRequestId:r,terminal:false})}o(Zr,"heartbeatFrame");function en(e,r,n=null){return Object.freeze({kind:"delta",delta:e,lastEventId:r,serverRequestId:n,terminal:false})}o(en,"deltaFrame");function rn(e,r=null){return Object.freeze({kind:"done",terminal:true,conversationId:e.conversationId,messageId:e.messageId,title:e.title,followUpQuestions:Object.freeze([...e.followUpQuestions]),citations:Object.freeze([...e.citations]),citationStatus:e.citationStatus,urgencyLevel:e.urgencyLevel,urgencyReason:e.urgencyReason,urgencyProvided:e.urgencyProvided??e.urgencyLevel!==null,resultId:e.resultId,lastEventId:e.lastEventId,serverRequestId:r})}o(rn,"doneFrame");function j(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}o(j,"errorFrame");function nn(e,r,n=null){return Object.freeze({kind:"analysisStarted",requestId:e,lastEventId:r,serverRequestId:n,terminal:false})}o(nn,"analysisStartedFrame");function tn(e,r=null){return Object.freeze({kind:"analysisComplete",terminal:false,resultId:e.resultId,analysisType:e.analysisType,modelVersion:e.modelVersion,confidence:e.confidence,detections:Object.freeze([...e.detections]),interpretation:e.interpretation,lastEventId:e.lastEventId,serverRequestId:r})}o(tn,"analysisCompleteFrame");function on(e,r,n=null){return Object.freeze({kind:"unknown",raw:{...e},lastEventId:r,serverRequestId:n,terminal:false})}o(on,"unknownFrame");var Zs=Object.freeze({strings:so,maps:lo});var an=`
1
+ import {z}from'zod';var Pt=Object.defineProperty;var o=(e,r)=>Pt(e,"name",{value:r,configurable:true});var je=Object.freeze([Object.freeze({wireCode:"AccessDeniedException",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"AuthorizationException",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"ConflictException",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"DAILY_QUOTA_EXCEEDED",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"FILE_TOO_LARGE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_IN_FLIGHT",envelope:"http_envelope",httpStatus:409,retryable:true}),Object.freeze({wireCode:"IDEMPOTENCY_KEY_REUSED_DIFFERENT_REQUEST",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"INVALID_CONTENT_TYPE",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"InternalFailureException",envelope:"http_envelope",httpStatus:500,retryable:true}),Object.freeze({wireCode:"MethodNotAllowedException",envelope:"http_envelope",httpStatus:405,retryable:false}),Object.freeze({wireCode:"NotImplementedException",envelope:"http_envelope",httpStatus:501,retryable:false}),Object.freeze({wireCode:"PaymentRequiredException",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ResourceNotFoundException",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"ServiceUnavailableException",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"TIER_UPGRADE_REQUIRED",envelope:"http_envelope",httpStatus:402,retryable:false}),Object.freeze({wireCode:"ThrottlingException",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"ValidationException",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"accessDenied",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"access_denied",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"attachment_unreadable",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"authExpired",envelope:"http_envelope",httpStatus:401,retryable:true}),Object.freeze({wireCode:"authRejected",envelope:"http_envelope",httpStatus:401,retryable:false}),Object.freeze({wireCode:"consent_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_required",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"consent_scope_wrong_route",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"device_cipher_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"email_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"event_cursor_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_payload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_not_available",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"event_type_unknown",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_required",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"idempotency_key_reused",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"insufficientCapability",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"insufficient_scope",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"internal_error",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"invalidRequest",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_client",envelope:"oauth_error",httpStatus:401,retryable:false}),Object.freeze({wireCode:"invalid_client_metadata",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_grant",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_redirect_uri",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_request",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_scope",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"invalid_target",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"mcp_connection_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"mcp_request_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"mcp_request_gone",envelope:"http_envelope",httpStatus:410,retryable:false}),Object.freeze({wireCode:"mcp_request_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"not_found",envelope:"sse_frame",httpStatus:200,retryable:false}),Object.freeze({wireCode:"partner_visit_link_conflict",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"partner_visit_owner_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"partner_visit_pet_already_mapped",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"payload_too_large",envelope:"http_envelope",httpStatus:413,retryable:false}),Object.freeze({wireCode:"petRefInUse",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"pet_health_list_removals_unconfirmed",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_health_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"pet_not_registered",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"provider_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"rateLimited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"record_species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"record_subject_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"record_upload_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"records_consent_required",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"sandbox_only",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"session_required",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"share_limit_reached",envelope:"http_envelope",httpStatus:429,retryable:false}),Object.freeze({wireCode:"slow_down",envelope:"oauth_error",httpStatus:429,retryable:true}),Object.freeze({wireCode:"species_unsupported",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"tenant_filter_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"tenant_has_no_capabilities",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"tenant_resource_not_found",envelope:"http_envelope",httpStatus:404,retryable:false}),Object.freeze({wireCode:"tenant_surface_not_enabled",envelope:"http_envelope",httpStatus:409,retryable:false}),Object.freeze({wireCode:"timeout",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"token_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"unavailable",envelope:"sse_frame",httpStatus:200,retryable:true}),Object.freeze({wireCode:"unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"unsupported_grant_type",envelope:"oauth_error",httpStatus:400,retryable:false}),Object.freeze({wireCode:"unsupported_response_type",envelope:"oauth_error",httpStatus:302,retryable:false}),Object.freeze({wireCode:"verify_mint_rate_limited",envelope:"http_envelope",httpStatus:429,retryable:true}),Object.freeze({wireCode:"verify_mint_refused",envelope:"http_envelope",httpStatus:403,retryable:false}),Object.freeze({wireCode:"verify_mint_unavailable",envelope:"http_envelope",httpStatus:503,retryable:true}),Object.freeze({wireCode:"verify_user_ref_invalid",envelope:"http_envelope",httpStatus:422,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_empty",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_endpoint_update_invalid",envelope:"http_envelope",httpStatus:400,retryable:false}),Object.freeze({wireCode:"webhook_url_rejected",envelope:"http_envelope",httpStatus:400,retryable:false})]);Object.freeze(je.map(e=>e.wireCode));var Dt=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",accessDenied:"accessDenied",invalidRequest:"sdkUpdateRequired",authRejected:"authRejected",rateLimited:"rateLimited",insufficientCapability:"accessDenied",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"}),Lr=Object.freeze(je.map(e=>Object.freeze({wireCode:e.wireCode,envelope:e.envelope,retryable:e.retryable,normalized:Dt[e.wireCode]}))),Nt=new Map(Lr.map(e=>[e.envelope+e.wireCode.toUpperCase(),e])),Mt=Object.freeze(["http_envelope",...[...new Set(Lr.map(e=>e.envelope))].filter(e=>e!=="http_envelope").sort()]);function ve(e,r){if(typeof e!="string")return;let n=e.trim().toUpperCase();if(n.length!==0)for(let t of [r??"http_envelope",...Mt]){let i=Nt.get(t+n);if(i)return i}}o(ve,"contractErrorFor");function Lt(e){return e.envelope==="sse_frame"?`/errors#sse-${e.wireCode}`:e.envelope==="oauth_error"?`/errors#oauth-${e.wireCode}`:`/errors#${e.wireCode}`}o(Lt,"contractDocUrl");var Mr=null;function Br(e){return null}o(Br,"publishedDocUrl");var us=Object.freeze(["authExpired","authRejected","sessionRequired","accessDenied","paymentRequired","quotaExceeded","rateLimited","validationFailed","sdkUpdateRequired","conflict","idempotencyConflict","idempotencyInFlight","conversationNotFound","petNotFound","resourceNotFound","streamTimeout","mediaUploadFailed","moderationBlocked","upstreamLlmTimeout","internalError","notImplemented","serviceUnavailable","streamIncomplete","unknown"]),ds=Object.freeze(["authentication","authorization","entitlement","rateLimit","invalidRequest","notFound","conflict","connection","server","media","policy","unknown"]),Bt=Object.freeze({authExpired:"authentication",authRejected:"authentication",sessionRequired:"authentication",accessDenied:"authorization",paymentRequired:"entitlement",quotaExceeded:"rateLimit",rateLimited:"rateLimit",validationFailed:"invalidRequest",sdkUpdateRequired:"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 zr(e){return Bt[e]}o(zr,"categoryFor");function oe(e){let r=ve(e);if(r)return r.normalized;let n=(e??"").trim().toUpperCase(),t=n.replace(/[^A-Z0-9]/g,"");if(t==="AUTHREJECTED")return "authRejected";if(n.startsWith("AUTH"))return "authExpired";switch(t){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 "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"}}o(oe,"fromWire");function jr(e){return e===401?"authExpired":e===403?"accessDenied":e===404?"conversationNotFound":e===409?"idempotencyConflict":e===421?"unknown":e===429?"rateLimited":e===400||e===422?"unknown":e>=500?"internalError":"unknown"}o(jr,"fromHttpStatus");var zt=new Set(["streamTimeout","rateLimited","internalError","upstreamLlmTimeout","streamIncomplete"]);function W(e){return zt.has(e)}o(W,"isAutoRetryable");var jt=new Set(["serviceUnavailable","conflict","idempotencyInFlight"]);function Ur(e){return W(e)||jt.has(e)}o(Ur,"isRetryableCode");function cs(e,r=false){return r||W(e)}o(cs,"shouldRetry");var Ut=500,Ue=8e3,qr=4;function Hr(e,r=Math.random){let n=Math.max(0,e),t=Math.min(Ut*2**n,Ue);return Math.floor(r()*t)}o(Hr,"backoffDelayMs");function fs(e){return e==="conversationNotFound"}o(fs,"canRecreateOnNotFound");var qt=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:"This feature isn't available on your account right now.",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:"Something in that request was not right. Check the details and try again.",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.",unknown:"Something went wrong. Please try again."});function qe(e){return qt[e]}o(qe,"userFacingError");function Kr(e,r,n){Object.defineProperty(e,r,{value:n,enumerable:false,writable:false,configurable:false});}o(Kr,"defineHidden");var Ht=/^[a-z][a-z0-9_]{0,63}$/;function S(e,r){let n=ve(r?.wireCode,r?.wireEnvelope),t={code:e,category:zr(e),retryable:r?.retryable??Ur(e),displayMessage:qe(e)};if(r?.httpStatus!==void 0&&(t.httpStatus=r.httpStatus),r?.requestId&&(t.requestId=r.requestId),typeof r?.reasonCode=="string"&&Ht.test(r.reasonCode)&&(t.reasonCode=r.reasonCode),n);return r?.wireMessage&&Kr(t,"wireMessage",r.wireMessage),r?.raw!==void 0&&r.raw!==null&&Kr(t,"raw",r.raw),Object.freeze(t)}o(S,"makeEverfurError");function x(e,r){return Object.freeze(r===void 0?{ok:true,value:e}:{ok:true,value:e,warning:r})}o(x,"ok");function y(e){return Object.freeze({ok:false,error:e})}o(y,"err");function Es(e){return e.ok}o(Es,"isOk");function vs(e){return !e.ok}o(vs,"isErr");var _e=class _e extends Error{constructor(r){super(`${r.code}: ${r.displayMessage}`),this.name="EverfurThrownError",this.error=r,this.code=r.code,this.category=r.category,Object.setPrototypeOf(this,_e.prototype);}};o(_e,"EverfurThrownError");var He=_e;function _s(e){if(e.ok)return e.value;throw new He(e.error)}o(_s,"unwrap");var Re=class Re extends Error{constructor(r,n){super(n),this.name="EverfurConfigError",this.kind=r,Object.setPrototypeOf(this,Re.prototype);}};o(Re,"EverfurConfigError");var k=Re;var Kt="0.7.1",$t="react-native",Gt="2026-09-19",$r="EVERFUR_API_BASE_URL";function de(e,r){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:r})})}o(de,"configFailure");function Wt(e){let r=typeof e=="string"?e.trim():"";return r.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(r)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}o(Wt,"checkPublishableKey");function Vt(e,r){let n=Wt(e?.publishableKey);if(n!==null)return Object.freeze({ok:false,failure:n});let t=e.publishableKey.trim(),i=Gr(e.apiBaseUrl);if(!i.ok)return i;let a=e.contractVersion?.trim()||Gt;return Object.freeze({ok:true,config:Object.freeze({publishableKey:t,apiBaseUrl:i.value,contractVersion:a,sdkVersion:Kt,platform:r?.platform??$t,debug:e.debug===true})})}o(Vt,"tryResolveClientConfig");function Ts(e,r){let n=Vt(e,r);if(!n.ok)throw new k("invalid-argument",n.failure.message);return n.config}o(Ts,"resolveClientConfig");function Gr(e){let r=e?.trim(),n=r&&r.length>0?r:no($r);return n?eo(n):de("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${$r}. The SDK never ships a hardcoded host.`)}o(Gr,"tryResolveApiBaseUrl");function Ss(e){let r=Gr(e);if(!r.ok)throw new k("invalid-argument",r.failure.message);return r.value}o(Ss,"resolveApiBaseUrl");function Wr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}o(Wr,"buildBaseHeaders");var Yt=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function Xt(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}o(Xt,"hostOf");function Qt(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}o(Qt,"isPrintableHost");function Jt(e,r){let n=e.indexOf("://");return n<0||e.slice(n+3).includes("@")?false:Qt(r)}o(Jt,"canEchoOrigin");function Zt(e,r){return `${e}://${r}`}o(Zt,"safeOrigin");function eo(e){let r=e.trim(),n=Yt.exec(r);if(n===null||n[2]===void 0||n[2].length===0)return de("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let t=(n[1]??"").toLowerCase(),i=Xt(n[2]);if(i.length===0)return de("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let a=Jt(r,i)?`: ${Zt(t,i)}`:"";if(t!=="https"){if(!(t==="http"&&ro(i)))return t==="http"?de("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${a}`):de("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${a}`)}let s=r.endsWith("/")?r.slice(0,-1):r;return Object.freeze({ok:true,value:s})}o(eo,"normalizeBaseUrl");function ro(e){let r=e.toLowerCase();return r==="localhost"||r==="127.0.0.1"||r==="[::1]"||r==="::1"}o(ro,"isLoopbackHost");function no(e){let n=globalThis.process?.env?.[e];return typeof n=="string"&&n.trim().length>0?n.trim():void 0}o(no,"readEnv");function ie(e){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>=55296&&n<=56319){let t=e.charCodeAt(r+1);if(!(t>=56320&&t<=57343))return true;r+=1;}else if(n>=56320&&n<=57343)return true}return false}o(ie,"hasLoneSurrogate");function V(e){return [...e].length}o(V,"serverLength");var Vr=128,Yr=128,Xr=/[\u0000-\u001F\u007F]/,to=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Ps(e){let r=e,n=V(r);if(n===0||n>Yr)throw new k("invalid-argument",`petRef must be 1..${Yr} characters`);if(Xr.test(r))throw new k("invalid-argument","petRef must be printable (no control characters)");return r}o(Ps,"petRef");function Ds(e){let r=e,n=V(r);if(n===0||n>Vr)throw new k("invalid-argument",`userRef must be 1..${Vr} characters`);if(r.includes("@"))throw new k("invalid-argument","userRef must not contain '@'");if(Xr.test(r))throw new k("invalid-argument","userRef must be printable (no control characters)");return r}o(Ds,"userRef");function Ns(e){if(!to.test(e))throw new k("invalid-argument","conversationId must be a UUID");return e}o(Ns,"conversationId");function Ms(e){return e}o(Ms,"unsafePetRef");function Ls(e){return e}o(Ls,"unsafeUserRef");function Bs(e){return e}o(Bs,"unsafeConversationId");function zs(e){return e}o(zs,"unsafeResponseId");function js(e){return e}o(js,"unsafeClientId");function Us(e){return e}o(Us,"unsafeDocumentId");function qs(e){return e}o(qs,"unsafeJobId");function Hs(e){return e}o(Hs,"unsafeRecordsRequestId");function Vs(e,r,n){let t=null,i=null,a=false,s=o(()=>i||(i=(async()=>{try{let l=await r(),u=typeof l=="string"?l:l?.token;if(typeof u!="string"||u.length===0)throw new k("invalid-argument","TokenProvider returned an empty token");return t=u,n?.(typeof l=="string"?null:oo(l.expiresAt)),u}finally{i=null;}})(),i),"load");return {userRef:e,async currentToken(l){if(a)throw new k("not-initialized","This identity was cleared (sign-out); mint a new one.");return l?.forceRefresh&&(t=null),t!==null?t:s()},hasToken(){return !a&&t!==null},clear(){a=true,t=null;}}}o(Vs,"createIdentityProvider");function oo(e){if(e===void 0)return null;let r=typeof e=="number"?e<1e11?e*1e3:e:new Date(e).getTime();return Number.isFinite(r)?r:null}o(oo,"expiryMs");function Ys(){let e=new Uint8Array(16),r=globalThis.crypto;if(typeof r?.getRandomValues=="function")r.getRandomValues(e);else for(let t=0;t<e.length;t+=1)e[t]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=[];for(let t=0;t<e.length;t+=1)n.push(e[t].toString(16).padStart(2,"0"));return n.slice(0,4).join("")+"-"+n.slice(4,6).join("")+"-"+n.slice(6,8).join("")+"-"+n.slice(8,10).join("")+"-"+n.slice(10,16).join("")}o(Ys,"newSessionId");function io(e){let r={};return e.mode==="personalized"?r.authorization=`Bearer ${e.token}`:r["x-everfur-partner-key"]=e.publishableKey,e.userRef&&(r["x-everfur-user-ref"]=e.userRef),e.sessionId&&(r["x-everfur-session-id"]=e.sessionId),r}o(io,"authHeaders");function ce(e,r){return {...e,headers:{...ao(e.headers),...io(r)}}}o(ce,"withAuthHeaders");function ao(e){if(!e)return {};let r={};for(let[n,t]of Object.entries(e)){let i=n.toLowerCase();i==="authorization"||i==="x-everfur-partner-key"||(r[n]=t);}return r}o(ao,"stripAuthHeaders");async function Qr(e,r){if(r.mode==="anonymous")return r.transport.request(ce(e,{mode:"anonymous",publishableKey:r.publishableKey,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));let n;try{n=await r.identity.currentToken();}catch{return y(Ke())}let t=await r.transport.request(ce(e,{mode:"personalized",token:n,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));if(t.ok||t.error.httpStatus!==401)return t;let i;try{i=await r.identity.currentToken({forceRefresh:!0});}catch{return y(Ke())}let a=await r.transport.request(ce(e,{mode:"personalized",token:i,userRef:r.userRef,...r.sessionId?{sessionId:r.sessionId}:{}}));return !a.ok&&a.error.httpStatus===401?y(Ke(a.error.httpStatus)):a}o(Qr,"authedSend");function Ke(e){return S("authRejected",{retryable:false,...e!==void 0?{httpStatus:e}:{}})}o(Ke,"authRejectedError");function Js(e){throw new Error(`assertNever: unhandled discriminated-union member ${JSON.stringify(e)}`)}o(Js,"assertNever");var so=Object.freeze([]),lo=Object.freeze([]);function Jr(e,r,n=null){return Object.freeze({kind:"accepted",streamId:e,lastEventId:r,serverRequestId:n,terminal:false})}o(Jr,"acceptedFrame");function Zr(e,r=null){return Object.freeze({kind:"heartbeat",lastEventId:e,serverRequestId:r,terminal:false})}o(Zr,"heartbeatFrame");function en(e,r,n=null){return Object.freeze({kind:"delta",delta:e,lastEventId:r,serverRequestId:n,terminal:false})}o(en,"deltaFrame");function rn(e,r=null){return Object.freeze({kind:"done",terminal:true,conversationId:e.conversationId,messageId:e.messageId,title:e.title,followUpQuestions:Object.freeze([...e.followUpQuestions]),citations:Object.freeze([...e.citations]),citationStatus:e.citationStatus,urgencyLevel:e.urgencyLevel,urgencyReason:e.urgencyReason,urgencyProvided:e.urgencyProvided??e.urgencyLevel!==null,resultId:e.resultId,lastEventId:e.lastEventId,serverRequestId:r})}o(rn,"doneFrame");function j(e){return Object.freeze({kind:"error",terminal:true,code:e.code,retryable:e.retryable,wireMessage:e.wireMessage,synthesized:e.synthesized,lastEventId:e.lastEventId,serverRequestId:e.serverRequestId??null})}o(j,"errorFrame");function nn(e,r,n=null){return Object.freeze({kind:"analysisStarted",requestId:e,lastEventId:r,serverRequestId:n,terminal:false})}o(nn,"analysisStartedFrame");function tn(e,r=null){return Object.freeze({kind:"analysisComplete",terminal:false,resultId:e.resultId,analysisType:e.analysisType,modelVersion:e.modelVersion,confidence:e.confidence,detections:Object.freeze([...e.detections]),interpretation:e.interpretation,lastEventId:e.lastEventId,serverRequestId:r})}o(tn,"analysisCompleteFrame");function on(e,r,n=null){return Object.freeze({kind:"unknown",raw:{...e},lastEventId:r,serverRequestId:n,terminal:false})}o(on,"unknownFrame");var Zs=Object.freeze({strings:so,maps:lo});var an=`
2
2
 
3
3
  `,uo=1048576,co=z.record(z.string(),z.unknown()),fo=["emergency","schedule_soon","home_care"];async function*Ce(e,r=null){let n=null,t=o(()=>(n!==null||(n=typeof r=="function"?r():r),n),"requestIdNow"),i=new TextDecoder("utf-8"),a="",s=0,l=false;for await(let u of e){for(a+=i.decode(u,{stream:true});;){let d=a.indexOf(an,s);if(d===-1)break;let f=a.slice(0,d);a=a.slice(d+an.length),s=0;let c=sn(f,t());if(c!==null&&(c.kind==="delta"&&(l=true),yield c,c.terminal))return}if(s=a.length>0?a.length-1:0,a.length>uo){yield j({code:l?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:t()});return}}if(a+=i.decode(),a.trim().length>0){let u=sn(a,t());if(u!==null&&(u.kind==="delta"&&(l=true),yield u,u.terminal))return}yield j({code:l?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:t()});}o(Ce,"parseSse");function sn(e,r){let n=null,t=[];for(let s of e.split(`
4
4
  `)){let l=s.replace(/\s+$/,"");l.length===0||l.startsWith(":")||(l.startsWith("id:")?n=l.slice(3).trim():l.startsWith("data:")&&t.push(l.slice(5).replace(/^ /,"")));}if(t.length===0)return null;let i;try{i=JSON.parse(t.join(`
@@ -409,7 +409,7 @@ declare function getGlobalFetch(): FetchLike;
409
409
  * Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
410
410
  * keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
411
411
  */
412
- declare const SDK_VERSION = "0.7.0";
412
+ declare const SDK_VERSION = "0.7.1";
413
413
  /**
414
414
  * The platforms this package ships an entry point for, as the wire names them (X-Everfur-SDK-Platform).
415
415
  *
@@ -409,7 +409,7 @@ declare function getGlobalFetch(): FetchLike;
409
409
  * Package semver, sent as X-Everfur-SDK-Version. MUST track package.json version (release checklist Item 12
410
410
  * keeps the npm semver tag and this constant in lockstep). Set inside the SDK, never by partner code.
411
411
  */
412
- declare const SDK_VERSION = "0.7.0";
412
+ declare const SDK_VERSION = "0.7.1";
413
413
  /**
414
414
  * The platforms this package ships an entry point for, as the wire names them (X-Everfur-SDK-Platform).
415
415
  *
@@ -1,15 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- import { E as EverfurConsentScope } from '../copy-CaWaplQc.cjs';
4
- export { C as CONSENT_COPY, a as CONSENT_SCOPE_COPY, b as CONSENT_VERSION_MAX, c as ConsentRepository, d as ConsentRepositoryDeps, e as ConsentRowView, f as ConsentRuntime, g as ConsentScopeCopy, h as EVERFUR_CONSENT_SCOPES, i as EverfurConsentDecision, j as EverfurConsentOptions, k as EverfurConsentScopeState, l as EverfurConsentState, m as EverfurConsentStatus, n as EverfurConsentVerdict, o as consentRowView, p as createConsentRepository, q as createConsentRepositoryOver, r as isEverfurConsentScope, u as useEverfurConsent, s as useEverfurConsentRepository } from '../copy-CaWaplQc.cjs';
3
+ import { E as EverfurConsentScope } from '../copy-BEx5F71o.cjs';
4
+ export { C as CONSENT_COPY, a as CONSENT_SCOPE_COPY, b as CONSENT_VERSION_MAX, c as ConsentRepository, d as ConsentRepositoryDeps, e as ConsentRowView, f as ConsentRuntime, g as ConsentScopeCopy, h as EVERFUR_CONSENT_SCOPES, i as EverfurConsentDecision, j as EverfurConsentOptions, k as EverfurConsentScopeState, l as EverfurConsentState, m as EverfurConsentStatus, n as EverfurConsentVerdict, o as consentRowView, p as createConsentRepository, q as createConsentRepositoryOver, r as isEverfurConsentScope, u as useEverfurConsent, s as useEverfurConsentRepository } from '../copy-BEx5F71o.cjs';
5
5
  import { E as EverfurError } from '../EverfurError-DmELDpXp.cjs';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DmELDpXp.cjs';
7
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-b5Vp32Vp.cjs';
8
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-h5h6TsHL.cjs';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-DUlshgow.cjs';
8
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-Daa1plhQ.cjs';
9
9
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids-B2GAAifq.cjs';
10
10
  export { E as EverfurResult } from '../EverfurResult-ZtH-YV1h.cjs';
11
11
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort-D6CybiqJ.cjs';
12
- import '../requestFunnel-C_cZXhIA.cjs';
12
+ import '../requestFunnel-DMR_1T3O.cjs';
13
13
 
14
14
  interface EverfurConsentToggleProps {
15
15
  /** Which act this row is. One row is one act; two acts are two rows, never one switch. */
@@ -1,15 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- import { E as EverfurConsentScope } from '../copy-Cg89Qoal.js';
4
- export { C as CONSENT_COPY, a as CONSENT_SCOPE_COPY, b as CONSENT_VERSION_MAX, c as ConsentRepository, d as ConsentRepositoryDeps, e as ConsentRowView, f as ConsentRuntime, g as ConsentScopeCopy, h as EVERFUR_CONSENT_SCOPES, i as EverfurConsentDecision, j as EverfurConsentOptions, k as EverfurConsentScopeState, l as EverfurConsentState, m as EverfurConsentStatus, n as EverfurConsentVerdict, o as consentRowView, p as createConsentRepository, q as createConsentRepositoryOver, r as isEverfurConsentScope, u as useEverfurConsent, s as useEverfurConsentRepository } from '../copy-Cg89Qoal.js';
3
+ import { E as EverfurConsentScope } from '../copy-Cl1l-qmY.js';
4
+ export { C as CONSENT_COPY, a as CONSENT_SCOPE_COPY, b as CONSENT_VERSION_MAX, c as ConsentRepository, d as ConsentRepositoryDeps, e as ConsentRowView, f as ConsentRuntime, g as ConsentScopeCopy, h as EVERFUR_CONSENT_SCOPES, i as EverfurConsentDecision, j as EverfurConsentOptions, k as EverfurConsentScopeState, l as EverfurConsentState, m as EverfurConsentStatus, n as EverfurConsentVerdict, o as consentRowView, p as createConsentRepository, q as createConsentRepositoryOver, r as isEverfurConsentScope, u as useEverfurConsent, s as useEverfurConsentRepository } from '../copy-Cl1l-qmY.js';
5
5
  import { E as EverfurError } from '../EverfurError-DmELDpXp.js';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError-DmELDpXp.js';
7
- export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-EC5-apbY.js';
8
- export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-ZxwCylac.js';
7
+ export { A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity-BhT7oJDS.js';
8
+ export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, H as HeartbeatFrame, h as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, i as UrgencyLevel } from '../config-BM0sv5jx.js';
9
9
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids-B2GAAifq.js';
10
10
  export { E as EverfurResult } from '../EverfurResult-SGvHKsCB.js';
11
11
  export { E as ErrorPolicyPort } from '../ErrorPolicyPort-D22LUVrK.js';
12
- import '../requestFunnel-Ve9BshTB.js';
12
+ import '../requestFunnel-CiSX2pun.js';
13
13
 
14
14
  interface EverfurConsentToggleProps {
15
15
  /** Which act this row is. One row is one act; two acts are two rows, never one switch. */
@@ -1,18 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { U as UserRef, P as PetRef } from './ids-B2GAAifq.js';
3
3
  import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.js';
4
- import { T as TokenProvider } from './identity-EC5-apbY.js';
5
- import { T as TransportPort } from './config-ZxwCylac.js';
4
+ import { T as TokenProvider } from './identity-BhT7oJDS.js';
5
+ import { T as TransportPort } from './config-BM0sv5jx.js';
6
6
  import { K as KvPort, I as ImageCachePort } from './cacheEpoch-DknKn3S0.js';
7
- import { S as SecureStorePort, b as LogSink, e as EverfurRuntime } from './runtimeTypes-ByKsp8hm.js';
7
+ import { S as SecureStorePort, b as LogSink, e as EverfurRuntime } from './runtimeTypes-CkMFCbHW.js';
8
8
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.js';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-D22LUVrK.js';
10
10
  import { C as CameraPort } from './CameraPort-Cv31Pz7g.js';
11
11
  import { U as UploadTransport } from './ports-BN6RHF9W.js';
12
- import { U as UploadPort } from './ports-nXHf50_X.js';
12
+ import { U as UploadPort } from './ports-Di9rdLO9.js';
13
13
  import { E as EverfurThemeInput } from './branding-ytH4jJq1.js';
14
14
  import { E as EverfurError } from './EverfurError-DmELDpXp.js';
15
- import { b as WidgetPetProfile } from './petsRepository-CuYZZaI5.js';
15
+ import { b as WidgetPetProfile } from './petsRepository-BwxmfX_s.js';
16
16
  import { E as EverfurTheme } from './tokens-BYtbKwFh.js';
17
17
 
18
18
  interface EverfurConfig {
@@ -1,18 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { U as UserRef, P as PetRef } from './ids-B2GAAifq.cjs';
3
3
  import { C as CapabilityName, a as CapabilityDecision } from './resolve-D4Ywz5OS.cjs';
4
- import { T as TokenProvider } from './identity-b5Vp32Vp.cjs';
5
- import { T as TransportPort } from './config-h5h6TsHL.cjs';
4
+ import { T as TokenProvider } from './identity-DUlshgow.cjs';
5
+ import { T as TransportPort } from './config-Daa1plhQ.cjs';
6
6
  import { K as KvPort, I as ImageCachePort } from './cacheEpoch-DknKn3S0.cjs';
7
- import { S as SecureStorePort, b as LogSink, e as EverfurRuntime } from './runtimeTypes-D155OlBW.cjs';
7
+ import { S as SecureStorePort, b as LogSink, e as EverfurRuntime } from './runtimeTypes-2gJ5hYoE.cjs';
8
8
  import { T as TelemetryPort } from './TelemetryPort-BDNr00hu.cjs';
9
9
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-D6CybiqJ.cjs';
10
10
  import { C as CameraPort } from './CameraPort-Cv31Pz7g.cjs';
11
11
  import { U as UploadTransport } from './ports-BN6RHF9W.cjs';
12
- import { U as UploadPort } from './ports-ZmJYgd5I.cjs';
12
+ import { U as UploadPort } from './ports-BPKxFOSe.cjs';
13
13
  import { E as EverfurThemeInput } from './branding-Bio5MM6g.cjs';
14
14
  import { E as EverfurError } from './EverfurError-DmELDpXp.cjs';
15
- import { b as WidgetPetProfile } from './petsRepository-BJsJ4cju.cjs';
15
+ import { b as WidgetPetProfile } from './petsRepository-BnVre3q7.cjs';
16
16
  import { E as EverfurTheme } from './tokens-BYtbKwFh.cjs';
17
17
 
18
18
  interface EverfurConfig {
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurError } from './EverfurError-DmELDpXp.cjs';
2
2
  import { E as EverfurResult } from './EverfurResult-ZtH-YV1h.cjs';
3
- import { R as RequestFunnel } from './requestFunnel-C_cZXhIA.cjs';
4
- import { A as AuthContext } from './identity-b5Vp32Vp.cjs';
3
+ import { R as RequestFunnel } from './requestFunnel-DMR_1T3O.cjs';
4
+ import { A as AuthContext } from './identity-DUlshgow.cjs';
5
5
  import { U as UserRef } from './ids-B2GAAifq.cjs';
6
6
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-D6CybiqJ.cjs';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurError } from './EverfurError-DmELDpXp.js';
2
2
  import { E as EverfurResult } from './EverfurResult-SGvHKsCB.js';
3
- import { R as RequestFunnel } from './requestFunnel-Ve9BshTB.js';
4
- import { A as AuthContext } from './identity-EC5-apbY.js';
3
+ import { R as RequestFunnel } from './requestFunnel-CiSX2pun.js';
4
+ import { A as AuthContext } from './identity-BhT7oJDS.js';
5
5
  import { U as UserRef } from './ids-B2GAAifq.js';
6
6
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-D22LUVrK.js';
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  `,Wi=1048576,Gi=zod.z.record(zod.z.string(),zod.z.unknown()),Yi=["emergency","schedule_soon","home_care"];async function*He(e,t=null){let r=null,n=i(()=>(r!==null||(r=typeof t=="function"?t():t),r),"requestIdNow"),o=new TextDecoder("utf-8"),s="",l=0,u=false;for await(let a of e){for(s+=o.decode(a,{stream:true});;){let d=s.indexOf(Vr,l);if(d===-1)break;let c=s.slice(0,d);s=s.slice(d+Vr.length),l=0;let p=$r(c,n());if(p!==null&&(p.kind==="delta"&&(u=true),yield p,p.terminal))return}if(l=s.length>0?s.length-1:0,s.length>Wi){yield B({code:u?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:n()});return}}if(s+=o.decode(),s.trim().length>0){let a=$r(s,n());if(a!==null&&(a.kind==="delta"&&(u=true),yield a,a.terminal))return}yield B({code:u?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:n()});}i(He,"parseSse");function $r(e,t){let r=null,n=[];for(let l of e.split(`
4
4
  `)){let u=l.replace(/\s+$/,"");u.length===0||u.startsWith(":")||(u.startsWith("id:")?r=u.slice(3).trim():u.startsWith("data:")&&n.push(u.slice(5).replace(/^ /,"")));}if(n.length===0)return null;let o;try{o=JSON.parse(n.join(`
5
- `));}catch{return null}if(typeof o!="object"||o===null||Array.isArray(o))return null;let s=Gi.safeParse(o);return s.success?Xi(s.data,r,t):null}i($r,"parseBlock");function Xi(e,t,r){let n=e.type,o=e.event;if(n==="error"||"error"in e)return B({code:N(e.code)??"unknown",retryable:e.retryable===true,wireMessage:N(e.error),synthesized:false,lastEventId:t,serverRequestId:r});if(n==="done"||e.done===true)return Lr({conversationId:N(e.conversation_id)??"",messageId:N(e.message_id),title:N(e.title),followUpQuestions:Ji(e.follow_up_questions),citations:Wr(e.citations),citationStatus:N(e.citation_status),urgencyLevel:Gr(e.urgency_level),urgencyReason:N(e.urgency_reason),urgencyProvided:Zi(e),resultId:N(e.result_id),lastEventId:t},r);if(n==="accepted"||e.status==="reasoning")return Dr(N(e.stream_id),t,r);if(n==="heartbeat"||e.heartbeat===true)return jr(t,r);if(n==="text.delta"||"delta"in e||"token"in e){let s=N(e.delta)??N(e.token)??"";return zr(s,t,r)}return o==="analysis_started"?Nr(N(e.request_id),t,r):o==="analysis_complete"?Ur({resultId:N(e.result_id),analysisType:N(e.analysis_type),modelVersion:N(e.model_version),confidence:Qi(e.confidence),detections:Wr(e.detections),interpretation:N(e.interpretation),lastEventId:t},r):Br(e,t,r)}i(Xi,"frameFromWire");function N(e){return typeof e=="string"?e:null}i(N,"asString");function Qi(e){return typeof e=="number"&&Number.isFinite(e)?e:null}i(Qi,"asNumber");function Gr(e){return typeof e=="string"&&Yi.includes(e)?e:null}i(Gr,"asUrgency");function Zi(e){if(!Object.prototype.hasOwnProperty.call(e,"urgency_level"))return false;let t=e.urgency_level;return t===null||Gr(t)!==null}i(Zi,"urgencySlotProvided");function Ji(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:String(t)):[]}i(Ji,"asStringList");function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(es,"isPlainObject");function Wr(e){return Array.isArray(e)?e.filter(es):[]}i(Wr,"asMapList");var ts="0.7.0",ht="react-native",rs="2026-09-19",Ke="EVERFUR_API_BASE_URL";function he(e,t){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:t})})}i(he,"configFailure");function bt(e){let t=typeof e=="string"?e.trim():"";return t.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(t)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}i(bt,"checkPublishableKey");function Yr(e,t){let r=bt(e?.publishableKey);if(r!==null)return Object.freeze({ok:false,failure:r});let n=e.publishableKey.trim(),o=ns(e.apiBaseUrl);if(!o.ok)return o;let s=e.contractVersion?.trim()||rs;return Object.freeze({ok:true,config:Object.freeze({publishableKey:n,apiBaseUrl:o.value,contractVersion:s,sdkVersion:ts,platform:t?.platform??ht,debug:e.debug===true})})}i(Yr,"tryResolveClientConfig");function ns(e){let t=e?.trim(),r=t&&t.length>0?t:cs(Ke);return r?us(r):he("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${Ke}. The SDK never ships a hardcoded host.`)}i(ns,"tryResolveApiBaseUrl");function Xr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}i(Xr,"buildBaseHeaders");var os=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function is(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}i(is,"hostOf");function ss(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}i(ss,"isPrintableHost");function as(e,t){let r=e.indexOf("://");return r<0||e.slice(r+3).includes("@")?false:ss(t)}i(as,"canEchoOrigin");function ls(e,t){return `${e}://${t}`}i(ls,"safeOrigin");function us(e){let t=e.trim(),r=os.exec(t);if(r===null||r[2]===void 0||r[2].length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let n=(r[1]??"").toLowerCase(),o=is(r[2]);if(o.length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let s=as(t,o)?`: ${ls(n,o)}`:"";if(n!=="https"){if(!(n==="http"&&ds(o)))return n==="http"?he("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${s}`):he("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${s}`)}let l=t.endsWith("/")?t.slice(0,-1):t;return Object.freeze({ok:true,value:l})}i(us,"normalizeBaseUrl");function ds(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="::1"}i(ds,"isLoopbackHost");function cs(e){let r=globalThis.process?.env?.[e];return typeof r=="string"&&r.trim().length>0?r.trim():void 0}i(cs,"readEnv");var ps=3e4,en="x-request-id";async function*Qr(e){if(!e)return;let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;n&&n.length>0&&(yield n);}}finally{await t.cancel?.();}}i(Qr,"fetchByteSource");function fs(e){let t=new TextEncoder,r=ys(),n=false,o=i(a=>{let d="";a.lastEventId&&(d+=`id: ${a.lastEventId}
5
+ `));}catch{return null}if(typeof o!="object"||o===null||Array.isArray(o))return null;let s=Gi.safeParse(o);return s.success?Xi(s.data,r,t):null}i($r,"parseBlock");function Xi(e,t,r){let n=e.type,o=e.event;if(n==="error"||"error"in e)return B({code:N(e.code)??"unknown",retryable:e.retryable===true,wireMessage:N(e.error),synthesized:false,lastEventId:t,serverRequestId:r});if(n==="done"||e.done===true)return Lr({conversationId:N(e.conversation_id)??"",messageId:N(e.message_id),title:N(e.title),followUpQuestions:Ji(e.follow_up_questions),citations:Wr(e.citations),citationStatus:N(e.citation_status),urgencyLevel:Gr(e.urgency_level),urgencyReason:N(e.urgency_reason),urgencyProvided:Zi(e),resultId:N(e.result_id),lastEventId:t},r);if(n==="accepted"||e.status==="reasoning")return Dr(N(e.stream_id),t,r);if(n==="heartbeat"||e.heartbeat===true)return jr(t,r);if(n==="text.delta"||"delta"in e||"token"in e){let s=N(e.delta)??N(e.token)??"";return zr(s,t,r)}return o==="analysis_started"?Nr(N(e.request_id),t,r):o==="analysis_complete"?Ur({resultId:N(e.result_id),analysisType:N(e.analysis_type),modelVersion:N(e.model_version),confidence:Qi(e.confidence),detections:Wr(e.detections),interpretation:N(e.interpretation),lastEventId:t},r):Br(e,t,r)}i(Xi,"frameFromWire");function N(e){return typeof e=="string"?e:null}i(N,"asString");function Qi(e){return typeof e=="number"&&Number.isFinite(e)?e:null}i(Qi,"asNumber");function Gr(e){return typeof e=="string"&&Yi.includes(e)?e:null}i(Gr,"asUrgency");function Zi(e){if(!Object.prototype.hasOwnProperty.call(e,"urgency_level"))return false;let t=e.urgency_level;return t===null||Gr(t)!==null}i(Zi,"urgencySlotProvided");function Ji(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:String(t)):[]}i(Ji,"asStringList");function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(es,"isPlainObject");function Wr(e){return Array.isArray(e)?e.filter(es):[]}i(Wr,"asMapList");var ts="0.7.1",ht="react-native",rs="2026-09-19",Ke="EVERFUR_API_BASE_URL";function he(e,t){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:t})})}i(he,"configFailure");function bt(e){let t=typeof e=="string"?e.trim():"";return t.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(t)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}i(bt,"checkPublishableKey");function Yr(e,t){let r=bt(e?.publishableKey);if(r!==null)return Object.freeze({ok:false,failure:r});let n=e.publishableKey.trim(),o=ns(e.apiBaseUrl);if(!o.ok)return o;let s=e.contractVersion?.trim()||rs;return Object.freeze({ok:true,config:Object.freeze({publishableKey:n,apiBaseUrl:o.value,contractVersion:s,sdkVersion:ts,platform:t?.platform??ht,debug:e.debug===true})})}i(Yr,"tryResolveClientConfig");function ns(e){let t=e?.trim(),r=t&&t.length>0?t:cs(Ke);return r?us(r):he("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${Ke}. The SDK never ships a hardcoded host.`)}i(ns,"tryResolveApiBaseUrl");function Xr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}i(Xr,"buildBaseHeaders");var os=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function is(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}i(is,"hostOf");function ss(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}i(ss,"isPrintableHost");function as(e,t){let r=e.indexOf("://");return r<0||e.slice(r+3).includes("@")?false:ss(t)}i(as,"canEchoOrigin");function ls(e,t){return `${e}://${t}`}i(ls,"safeOrigin");function us(e){let t=e.trim(),r=os.exec(t);if(r===null||r[2]===void 0||r[2].length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let n=(r[1]??"").toLowerCase(),o=is(r[2]);if(o.length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let s=as(t,o)?`: ${ls(n,o)}`:"";if(n!=="https"){if(!(n==="http"&&ds(o)))return n==="http"?he("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${s}`):he("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${s}`)}let l=t.endsWith("/")?t.slice(0,-1):t;return Object.freeze({ok:true,value:l})}i(us,"normalizeBaseUrl");function ds(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="::1"}i(ds,"isLoopbackHost");function cs(e){let r=globalThis.process?.env?.[e];return typeof r=="string"&&r.trim().length>0?r.trim():void 0}i(cs,"readEnv");var ps=3e4,en="x-request-id";async function*Qr(e){if(!e)return;let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;n&&n.length>0&&(yield n);}}finally{await t.cancel?.();}}i(Qr,"fetchByteSource");function fs(e){let t=new TextEncoder,r=ys(),n=false,o=i(a=>{let d="";a.lastEventId&&(d+=`id: ${a.lastEventId}
6
6
  `);let c=a.data??"";for(let p of c.split(`
7
7
  `))d+=`data: ${p}
8
8
  `;d+=`
@@ -1,30 +1,30 @@
1
1
  export { K as KvPort } from '../cacheEpoch-DknKn3S0.cjs';
2
- import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-D155OlBW.cjs';
3
- export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-D155OlBW.cjs';
2
+ import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-2gJ5hYoE.cjs';
3
+ export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-2gJ5hYoE.cjs';
4
4
  import { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.cjs';
5
5
  export { n as noopTelemetry } from '../TelemetryPort-BDNr00hu.cjs';
6
6
  export { E as ErrorPolicyPort, d as defaultErrorPolicy } from '../ErrorPolicyPort-D6CybiqJ.cjs';
7
7
  export { C as CameraPort, a as CaptureOptions, M as MediaSource, u as unavailableCamera } from '../CameraPort-Cv31Pz7g.cjs';
8
8
  export { F as FileHandle, b as FilePort } from '../ports-BN6RHF9W.cjs';
9
9
  export { O as OptionalModule, o as optionalModule } from '../optionalModule-DbJmsq5f.cjs';
10
- import { o as ChatControllerDeps, n as ChatController, p as SuggestedPromptCategory } from '../ports-ZmJYgd5I.cjs';
11
- export { q as CHAT_FEEDBACK_TYPES, r as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, s as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, t as ChatSnapshot, l as ChatStatus, m as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, u as Timers, v as isCheckinSettled } from '../ports-ZmJYgd5I.cjs';
10
+ import { o as ChatControllerDeps, n as ChatController, p as SuggestedPromptCategory } from '../ports-BPKxFOSe.cjs';
11
+ export { q as CHAT_FEEDBACK_TYPES, r as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, s as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, t as ChatSnapshot, l as ChatStatus, m as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, u as Timers, v as isCheckinSettled } from '../ports-BPKxFOSe.cjs';
12
12
  import { E as EverfurError } from '../EverfurError-DmELDpXp.cjs';
13
13
  import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.cjs';
14
- export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-Ce06TWqe.cjs';
15
- import { p as EventSourceFactory, G as SdkPlatform } from '../config-h5h6TsHL.cjs';
16
- import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-BYtVb1oU.cjs';
14
+ export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-B2GjBgvF.cjs';
15
+ import { p as EventSourceFactory, G as SdkPlatform } from '../config-Daa1plhQ.cjs';
16
+ import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-DPvWjV-N.cjs';
17
17
  import { E as EntitlementDecision } from '../resolve-D4Ywz5OS.cjs';
18
- import { A as AuthContext } from '../identity-b5Vp32Vp.cjs';
18
+ import { A as AuthContext } from '../identity-DUlshgow.cjs';
19
19
  import { C as ClientBranding } from '../branding-Bio5MM6g.cjs';
20
20
  export { c as EverfurAppearance, d as EverfurAppearancePreset, e as EverfurAppearanceRules, f as EverfurAppearanceVariables, E as EverfurThemeInput } from '../branding-Bio5MM6g.cjs';
21
- export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, w as FACT_VALUE_FIELD, x as FactFieldValue, y as FactValueKind, H as HttpRecordsClinicRepositoryDeps, z as HttpRecordsRepositoryDeps, A as RECORDS_CLINIC_BATCH_MAX, B as RECORD_SHARE_AUDIENCES, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, D as RecordFactEditInput, E as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, G as RecordMarker, I as RecordMarkerLatest, J as RecordMarkerPoint, K as RecordMarkerSummary, L as RecordMarkersView, M as RecordPdfLink, k as RecordPhysicalExam, N as RecordShare, O as RecordShareAudience, P as RecordShareAudienceScope, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, T as RecordShareLink, U as RecordShareRecipientKind, V as RecordsAuthorizationSignature, W as RecordsClinicBatch, X as RecordsClinicBatchClient, Y as RecordsClinicBatchItem, Z as RecordsClinicBatchResult, _ as RecordsClinicTarget, m as RecordsDepthClient, n as RecordsRequestDocument, $ as RecordsSignatureSuggestion, o as RecordsTimelineMedication, p as RecordsTimelineVaccine, q as RecordsTimelineView, r as RecordsTimelineVisit, s as RecordsTimelineWeight, a0 as SHARE_RECIPIENT_EMAIL_MAX, a1 as createRecordsClinicBatchClient, a2 as createRecordsDepthClient, a3 as factCorrectionFor, a4 as factValueCorrection, a5 as inferFactValueKind, a6 as isFactReviewerLocked, a7 as isShareRecipientEmail, t as mapDocumentContributions, u as mapRecordDepth, a8 as mapRecordMarkers, a9 as mapRecordPdfLink, aa as mapRecordShareEmailReceipt, ab as mapRecordShareLink, ac as mapRecordShareList, v as mapRecordsTimeline, ad as mapShareAudiences, ae as mapSignatureSuggestions, af as resolveShareUrl } from '../depth-EXZYEO70.cjs';
21
+ export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, x as FACT_VALUE_FIELD, y as FactFieldValue, z as FactValueKind, H as HttpRecordsClinicRepositoryDeps, A as HttpRecordsRepositoryDeps, B as RECORDS_CLINIC_BATCH_MAX, D as RECORD_SHARE_AUDIENCES, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, E as RecordFactEditInput, G as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, I as RecordMarker, J as RecordMarkerLatest, K as RecordMarkerPoint, L as RecordMarkerSummary, M as RecordMarkersView, N as RecordPdfLink, k as RecordPhysicalExam, O as RecordShare, l as RecordShareAudience, P as RecordShareAudienceScope, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, T as RecordShareLink, U as RecordShareRecipientKind, V as RecordsAuthorizationSignature, W as RecordsClinicBatch, X as RecordsClinicBatchClient, Y as RecordsClinicBatchItem, Z as RecordsClinicBatchResult, _ as RecordsClinicTarget, n as RecordsDepthClient, o as RecordsRequestDocument, $ as RecordsSignatureSuggestion, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, a0 as SHARE_RECIPIENT_EMAIL_MAX, a1 as createRecordsClinicBatchClient, a2 as createRecordsDepthClient, a3 as factCorrectionFor, a4 as factValueCorrection, a5 as inferFactValueKind, a6 as isFactReviewerLocked, a7 as isShareRecipientEmail, u as mapDocumentContributions, v as mapRecordDepth, a8 as mapRecordMarkers, a9 as mapRecordPdfLink, aa as mapRecordShareEmailReceipt, ab as mapRecordShareLink, ac as mapRecordShareList, w as mapRecordsTimeline, ad as mapShareAudiences, ae as mapSignatureSuggestions, af as resolveShareUrl } from '../depth-CAAwiStc.cjs';
22
22
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin, f as RecordsRequestGroupView, d as RecordsRequestView } from '../models-Bn2z0NNo.cjs';
23
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-CJchNp3x.cjs';
24
- import '../petsRepository-BJsJ4cju.cjs';
23
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-B-md8h1S.cjs';
24
+ import '../petsRepository-BnVre3q7.cjs';
25
25
  import '../EverfurResult-ZtH-YV1h.cjs';
26
26
  import '../profile-CSs1wlXT.cjs';
27
- import '../requestFunnel-C_cZXhIA.cjs';
27
+ import '../requestFunnel-DMR_1T3O.cjs';
28
28
  import '../tokens-BYtbKwFh.cjs';
29
29
 
30
30
  /**
@@ -1,30 +1,30 @@
1
1
  export { K as KvPort } from '../cacheEpoch-DknKn3S0.js';
2
- import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-ByKsp8hm.js';
3
- export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-ByKsp8hm.js';
2
+ import { C as CreateEverfurRuntimeInput, e as EverfurRuntime } from '../runtimeTypes-CkMFCbHW.js';
3
+ export { B as BeforeLogoutContext, f as BeforeLogoutHook, g as CapabilityKind, h as CapabilityRegistry, i as CapabilityServices, j as ChatControllerRegistry, k as ChatScope, E as EntitlementSnapshot, l as EntitlementStore, m as EverfurRuntimeConfig, L as LogLevel, a as LogRecord, b as LogSink, N as NULL_SECURE_STORE, P as PrepareOptions, c as PrepareResult, d as PrepareStatus, R as RuntimeTheme, n as RuntimeUser, S as SecureStorePort } from '../runtimeTypes-CkMFCbHW.js';
4
4
  import { T as TelemetryPort } from '../TelemetryPort-BDNr00hu.js';
5
5
  export { n as noopTelemetry } from '../TelemetryPort-BDNr00hu.js';
6
6
  export { E as ErrorPolicyPort, d as defaultErrorPolicy } from '../ErrorPolicyPort-D22LUVrK.js';
7
7
  export { C as CameraPort, a as CaptureOptions, M as MediaSource, u as unavailableCamera } from '../CameraPort-Cv31Pz7g.js';
8
8
  export { F as FileHandle, b as FilePort } from '../ports-BN6RHF9W.js';
9
9
  export { O as OptionalModule, o as optionalModule } from '../optionalModule-DbJmsq5f.js';
10
- import { o as ChatControllerDeps, n as ChatController, p as SuggestedPromptCategory } from '../ports-nXHf50_X.js';
11
- export { q as CHAT_FEEDBACK_TYPES, r as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, s as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, t as ChatSnapshot, l as ChatStatus, m as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, u as Timers, v as isCheckinSettled } from '../ports-nXHf50_X.js';
10
+ import { o as ChatControllerDeps, n as ChatController, p as SuggestedPromptCategory } from '../ports-Di9rdLO9.js';
11
+ export { q as CHAT_FEEDBACK_TYPES, r as CHECKIN_ANSWERABLE_STATUS, C as ChatCheckin, a as ChatCheckinTarget, b as ChatConversation, c as ChatConversationListOptions, d as ChatConversationPage, e as ChatFeedbackReceipt, f as ChatFeedbackType, s as ChatHandlers, g as ChatHistoryOptions, i as ChatMessage, h as ChatMessagePage, j as ChatMessageRole, k as ChatMessageSender, t as ChatSnapshot, l as ChatStatus, m as Citation, F as FEEDBACK_NOTES_MAX_CHARS, M as MAX_IMAGE_KEYS_PER_MESSAGE, S as SendOptions, u as Timers, v as isCheckinSettled } from '../ports-Di9rdLO9.js';
12
12
  import { E as EverfurError } from '../EverfurError-DmELDpXp.js';
13
13
  import { P as PetRef, C as ConversationId } from '../ids-B2GAAifq.js';
14
- export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-CPRFfoHT.js';
15
- import { p as EventSourceFactory, G as SdkPlatform } from '../config-ZxwCylac.js';
16
- import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-DcbIx8yV.js';
14
+ export { f as ATTACHMENT_ACCEPT, g as ATTACHMENT_BACKOFF_MS, h as ATTACHMENT_INITIATE_PATH, i as ATTACHMENT_MAX_ATTEMPTS, j as ATTACHMENT_MIME_TYPES, k as ATTACHMENT_QUEUE_CONCURRENCY, A as AttachmentError, a as AttachmentErrorCode, b as AttachmentOutcome, c as AttachmentQueue, l as AttachmentQueueDeps, m as AttachmentQueueSnapshot, d as AttachmentState, e as AttachmentStatus, n as AttachmentUploadPolicy, M as MAX_ATTACHMENTS_PER_MESSAGE, o as MAX_ATTACHMENT_BYTES, p as MAX_FILENAME_LENGTH, V as ValidatedAttachment, q as attachmentSize, r as createAttachmentQueue, s as formatBytes, t as initiateAttachmentUpload, u as isAttachmentMime, v as sanitizeFilename, w as uploadAttachmentBytes, x as validateAttachment } from '../attachments-DNaSbmA3.js';
15
+ import { p as EventSourceFactory, G as SdkPlatform } from '../config-BM0sv5jx.js';
16
+ import { a as EntitlementResolution, F as FetchEntitlementsArgs } from '../entitlementRepository-CVWvND1P.js';
17
17
  import { E as EntitlementDecision } from '../resolve-D4Ywz5OS.js';
18
- import { A as AuthContext } from '../identity-EC5-apbY.js';
18
+ import { A as AuthContext } from '../identity-BhT7oJDS.js';
19
19
  import { C as ClientBranding } from '../branding-ytH4jJq1.js';
20
20
  export { c as EverfurAppearance, d as EverfurAppearancePreset, e as EverfurAppearanceRules, f as EverfurAppearanceVariables, E as EverfurThemeInput } from '../branding-ytH4jJq1.js';
21
- export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, w as FACT_VALUE_FIELD, x as FactFieldValue, y as FactValueKind, H as HttpRecordsClinicRepositoryDeps, z as HttpRecordsRepositoryDeps, A as RECORDS_CLINIC_BATCH_MAX, B as RECORD_SHARE_AUDIENCES, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, D as RecordFactEditInput, E as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, G as RecordMarker, I as RecordMarkerLatest, J as RecordMarkerPoint, K as RecordMarkerSummary, L as RecordMarkersView, M as RecordPdfLink, k as RecordPhysicalExam, N as RecordShare, O as RecordShareAudience, P as RecordShareAudienceScope, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, T as RecordShareLink, U as RecordShareRecipientKind, V as RecordsAuthorizationSignature, W as RecordsClinicBatch, X as RecordsClinicBatchClient, Y as RecordsClinicBatchItem, Z as RecordsClinicBatchResult, _ as RecordsClinicTarget, m as RecordsDepthClient, n as RecordsRequestDocument, $ as RecordsSignatureSuggestion, o as RecordsTimelineMedication, p as RecordsTimelineVaccine, q as RecordsTimelineView, r as RecordsTimelineVisit, s as RecordsTimelineWeight, a0 as SHARE_RECIPIENT_EMAIL_MAX, a1 as createRecordsClinicBatchClient, a2 as createRecordsDepthClient, a3 as factCorrectionFor, a4 as factValueCorrection, a5 as inferFactValueKind, a6 as isFactReviewerLocked, a7 as isShareRecipientEmail, t as mapDocumentContributions, u as mapRecordDepth, a8 as mapRecordMarkers, a9 as mapRecordPdfLink, aa as mapRecordShareEmailReceipt, ab as mapRecordShareLink, ac as mapRecordShareList, v as mapRecordsTimeline, ad as mapShareAudiences, ae as mapSignatureSuggestions, af as resolveShareUrl } from '../depth-Bo4bAwcn.js';
21
+ export { C as CreateClinicRequestBatchInput, F as FACT_FIELD_BY_KIND, x as FACT_VALUE_FIELD, y as FactFieldValue, z as FactValueKind, H as HttpRecordsClinicRepositoryDeps, A as HttpRecordsRepositoryDeps, B as RECORDS_CLINIC_BATCH_MAX, D as RECORD_SHARE_AUDIENCES, R as RecordClinicianNote, a as RecordClinicianNoteSection, b as RecordCompleteness, c as RecordConflict, d as RecordConflictCandidate, e as RecordDepthView, f as RecordDocumentContributionsView, g as RecordEncounter, h as RecordExamSystem, E as RecordFactEditInput, G as RecordFactRemoveInput, i as RecordLabMarker, j as RecordLabPoint, I as RecordMarker, J as RecordMarkerLatest, K as RecordMarkerPoint, L as RecordMarkerSummary, M as RecordMarkersView, N as RecordPdfLink, k as RecordPhysicalExam, O as RecordShare, l as RecordShareAudience, P as RecordShareAudienceScope, Q as RecordShareEmailInput, S as RecordShareEmailReceipt, T as RecordShareLink, U as RecordShareRecipientKind, V as RecordsAuthorizationSignature, W as RecordsClinicBatch, X as RecordsClinicBatchClient, Y as RecordsClinicBatchItem, Z as RecordsClinicBatchResult, _ as RecordsClinicTarget, n as RecordsDepthClient, o as RecordsRequestDocument, $ as RecordsSignatureSuggestion, p as RecordsTimelineMedication, q as RecordsTimelineVaccine, r as RecordsTimelineView, s as RecordsTimelineVisit, t as RecordsTimelineWeight, a0 as SHARE_RECIPIENT_EMAIL_MAX, a1 as createRecordsClinicBatchClient, a2 as createRecordsDepthClient, a3 as factCorrectionFor, a4 as factValueCorrection, a5 as inferFactValueKind, a6 as isFactReviewerLocked, a7 as isShareRecipientEmail, u as mapDocumentContributions, v as mapRecordDepth, a8 as mapRecordMarkers, a9 as mapRecordPdfLink, aa as mapRecordShareEmailReceipt, ab as mapRecordShareLink, ac as mapRecordShareList, w as mapRecordsTimeline, ad as mapShareAudiences, ae as mapSignatureSuggestions, af as resolveShareUrl } from '../depth-DfNRVtrV.js';
22
22
  export { R as RecordDocumentMeta, a as RecordEntity, b as RecordOrigin, f as RecordsRequestGroupView, d as RecordsRequestView } from '../models-DSqA5Ahs.js';
23
- export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-DAVcY3jC.js';
24
- import '../petsRepository-CuYZZaI5.js';
23
+ export { C as CheckinAnswer, a as CheckinOutcome, W as WatchCase } from '../casesRepository-CC6951TK.js';
24
+ import '../petsRepository-BwxmfX_s.js';
25
25
  import '../EverfurResult-SGvHKsCB.js';
26
26
  import '../profile-CSs1wlXT.js';
27
- import '../requestFunnel-Ve9BshTB.js';
27
+ import '../requestFunnel-CiSX2pun.js';
28
28
  import '../tokens-BYtbKwFh.js';
29
29
 
30
30
  /**
@@ -2,7 +2,7 @@ import {z as z$1}from'zod';var Pi=Object.defineProperty;var i=(e,t)=>Pi(e,"name"
2
2
 
3
3
  `,Wi=1048576,Gi=z$1.record(z$1.string(),z$1.unknown()),Yi=["emergency","schedule_soon","home_care"];async function*He(e,t=null){let r=null,n=i(()=>(r!==null||(r=typeof t=="function"?t():t),r),"requestIdNow"),o=new TextDecoder("utf-8"),s="",l=0,u=false;for await(let a of e){for(s+=o.decode(a,{stream:true});;){let d=s.indexOf(Vr,l);if(d===-1)break;let c=s.slice(0,d);s=s.slice(d+Vr.length),l=0;let p=$r(c,n());if(p!==null&&(p.kind==="delta"&&(u=true),yield p,p.terminal))return}if(l=s.length>0?s.length-1:0,s.length>Wi){yield B({code:u?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:n()});return}}if(s+=o.decode(),s.trim().length>0){let a=$r(s,n());if(a!==null&&(a.kind==="delta"&&(u=true),yield a,a.terminal))return}yield B({code:u?"CHAT_STREAM_INCOMPLETE":"internal_error",retryable:true,wireMessage:null,synthesized:true,lastEventId:null,serverRequestId:n()});}i(He,"parseSse");function $r(e,t){let r=null,n=[];for(let l of e.split(`
4
4
  `)){let u=l.replace(/\s+$/,"");u.length===0||u.startsWith(":")||(u.startsWith("id:")?r=u.slice(3).trim():u.startsWith("data:")&&n.push(u.slice(5).replace(/^ /,"")));}if(n.length===0)return null;let o;try{o=JSON.parse(n.join(`
5
- `));}catch{return null}if(typeof o!="object"||o===null||Array.isArray(o))return null;let s=Gi.safeParse(o);return s.success?Xi(s.data,r,t):null}i($r,"parseBlock");function Xi(e,t,r){let n=e.type,o=e.event;if(n==="error"||"error"in e)return B({code:N(e.code)??"unknown",retryable:e.retryable===true,wireMessage:N(e.error),synthesized:false,lastEventId:t,serverRequestId:r});if(n==="done"||e.done===true)return Lr({conversationId:N(e.conversation_id)??"",messageId:N(e.message_id),title:N(e.title),followUpQuestions:Ji(e.follow_up_questions),citations:Wr(e.citations),citationStatus:N(e.citation_status),urgencyLevel:Gr(e.urgency_level),urgencyReason:N(e.urgency_reason),urgencyProvided:Zi(e),resultId:N(e.result_id),lastEventId:t},r);if(n==="accepted"||e.status==="reasoning")return Dr(N(e.stream_id),t,r);if(n==="heartbeat"||e.heartbeat===true)return jr(t,r);if(n==="text.delta"||"delta"in e||"token"in e){let s=N(e.delta)??N(e.token)??"";return zr(s,t,r)}return o==="analysis_started"?Nr(N(e.request_id),t,r):o==="analysis_complete"?Ur({resultId:N(e.result_id),analysisType:N(e.analysis_type),modelVersion:N(e.model_version),confidence:Qi(e.confidence),detections:Wr(e.detections),interpretation:N(e.interpretation),lastEventId:t},r):Br(e,t,r)}i(Xi,"frameFromWire");function N(e){return typeof e=="string"?e:null}i(N,"asString");function Qi(e){return typeof e=="number"&&Number.isFinite(e)?e:null}i(Qi,"asNumber");function Gr(e){return typeof e=="string"&&Yi.includes(e)?e:null}i(Gr,"asUrgency");function Zi(e){if(!Object.prototype.hasOwnProperty.call(e,"urgency_level"))return false;let t=e.urgency_level;return t===null||Gr(t)!==null}i(Zi,"urgencySlotProvided");function Ji(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:String(t)):[]}i(Ji,"asStringList");function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(es,"isPlainObject");function Wr(e){return Array.isArray(e)?e.filter(es):[]}i(Wr,"asMapList");var ts="0.7.0",ht="react-native",rs="2026-09-19",Ke="EVERFUR_API_BASE_URL";function he(e,t){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:t})})}i(he,"configFailure");function bt(e){let t=typeof e=="string"?e.trim():"";return t.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(t)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}i(bt,"checkPublishableKey");function Yr(e,t){let r=bt(e?.publishableKey);if(r!==null)return Object.freeze({ok:false,failure:r});let n=e.publishableKey.trim(),o=ns(e.apiBaseUrl);if(!o.ok)return o;let s=e.contractVersion?.trim()||rs;return Object.freeze({ok:true,config:Object.freeze({publishableKey:n,apiBaseUrl:o.value,contractVersion:s,sdkVersion:ts,platform:t?.platform??ht,debug:e.debug===true})})}i(Yr,"tryResolveClientConfig");function ns(e){let t=e?.trim(),r=t&&t.length>0?t:cs(Ke);return r?us(r):he("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${Ke}. The SDK never ships a hardcoded host.`)}i(ns,"tryResolveApiBaseUrl");function Xr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}i(Xr,"buildBaseHeaders");var os=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function is(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}i(is,"hostOf");function ss(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}i(ss,"isPrintableHost");function as(e,t){let r=e.indexOf("://");return r<0||e.slice(r+3).includes("@")?false:ss(t)}i(as,"canEchoOrigin");function ls(e,t){return `${e}://${t}`}i(ls,"safeOrigin");function us(e){let t=e.trim(),r=os.exec(t);if(r===null||r[2]===void 0||r[2].length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let n=(r[1]??"").toLowerCase(),o=is(r[2]);if(o.length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let s=as(t,o)?`: ${ls(n,o)}`:"";if(n!=="https"){if(!(n==="http"&&ds(o)))return n==="http"?he("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${s}`):he("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${s}`)}let l=t.endsWith("/")?t.slice(0,-1):t;return Object.freeze({ok:true,value:l})}i(us,"normalizeBaseUrl");function ds(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="::1"}i(ds,"isLoopbackHost");function cs(e){let r=globalThis.process?.env?.[e];return typeof r=="string"&&r.trim().length>0?r.trim():void 0}i(cs,"readEnv");var ps=3e4,en="x-request-id";async function*Qr(e){if(!e)return;let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;n&&n.length>0&&(yield n);}}finally{await t.cancel?.();}}i(Qr,"fetchByteSource");function fs(e){let t=new TextEncoder,r=ys(),n=false,o=i(a=>{let d="";a.lastEventId&&(d+=`id: ${a.lastEventId}
5
+ `));}catch{return null}if(typeof o!="object"||o===null||Array.isArray(o))return null;let s=Gi.safeParse(o);return s.success?Xi(s.data,r,t):null}i($r,"parseBlock");function Xi(e,t,r){let n=e.type,o=e.event;if(n==="error"||"error"in e)return B({code:N(e.code)??"unknown",retryable:e.retryable===true,wireMessage:N(e.error),synthesized:false,lastEventId:t,serverRequestId:r});if(n==="done"||e.done===true)return Lr({conversationId:N(e.conversation_id)??"",messageId:N(e.message_id),title:N(e.title),followUpQuestions:Ji(e.follow_up_questions),citations:Wr(e.citations),citationStatus:N(e.citation_status),urgencyLevel:Gr(e.urgency_level),urgencyReason:N(e.urgency_reason),urgencyProvided:Zi(e),resultId:N(e.result_id),lastEventId:t},r);if(n==="accepted"||e.status==="reasoning")return Dr(N(e.stream_id),t,r);if(n==="heartbeat"||e.heartbeat===true)return jr(t,r);if(n==="text.delta"||"delta"in e||"token"in e){let s=N(e.delta)??N(e.token)??"";return zr(s,t,r)}return o==="analysis_started"?Nr(N(e.request_id),t,r):o==="analysis_complete"?Ur({resultId:N(e.result_id),analysisType:N(e.analysis_type),modelVersion:N(e.model_version),confidence:Qi(e.confidence),detections:Wr(e.detections),interpretation:N(e.interpretation),lastEventId:t},r):Br(e,t,r)}i(Xi,"frameFromWire");function N(e){return typeof e=="string"?e:null}i(N,"asString");function Qi(e){return typeof e=="number"&&Number.isFinite(e)?e:null}i(Qi,"asNumber");function Gr(e){return typeof e=="string"&&Yi.includes(e)?e:null}i(Gr,"asUrgency");function Zi(e){if(!Object.prototype.hasOwnProperty.call(e,"urgency_level"))return false;let t=e.urgency_level;return t===null||Gr(t)!==null}i(Zi,"urgencySlotProvided");function Ji(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t:String(t)):[]}i(Ji,"asStringList");function es(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(es,"isPlainObject");function Wr(e){return Array.isArray(e)?e.filter(es):[]}i(Wr,"asMapList");var ts="0.7.1",ht="react-native",rs="2026-09-19",Ke="EVERFUR_API_BASE_URL";function he(e,t){return Object.freeze({ok:false,failure:Object.freeze({reason:e,message:t})})}i(he,"configFailure");function bt(e){let t=typeof e=="string"?e.trim():"";return t.length===0?{reason:"missing-publishable-key",message:"publishableKey is required"}:/^sk[_-]/i.test(t)?{reason:"secret-key-as-publishable-key",message:"publishableKey looks like a SECRET key (sk_...). A device must never hold a partner secret key: use the pk_ publishable key here, and keep the secret key on your server."}:null}i(bt,"checkPublishableKey");function Yr(e,t){let r=bt(e?.publishableKey);if(r!==null)return Object.freeze({ok:false,failure:r});let n=e.publishableKey.trim(),o=ns(e.apiBaseUrl);if(!o.ok)return o;let s=e.contractVersion?.trim()||rs;return Object.freeze({ok:true,config:Object.freeze({publishableKey:n,apiBaseUrl:o.value,contractVersion:s,sdkVersion:ts,platform:t?.platform??ht,debug:e.debug===true})})}i(Yr,"tryResolveClientConfig");function ns(e){let t=e?.trim(),r=t&&t.length>0?t:cs(Ke);return r?us(r):he("missing-api-base-url",`apiBaseUrl is required: pass config.apiBaseUrl or set ${Ke}. The SDK never ships a hardcoded host.`)}i(ns,"tryResolveApiBaseUrl");function Xr(e){return {"X-Everfur-SDK-Version":e.sdkVersion,"X-Everfur-SDK-Platform":e.platform,"X-Everfur-Contract":e.contractVersion}}i(Xr,"buildBaseHeaders");var os=/^([A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)/;function is(e){return e.slice(e.lastIndexOf("@")+1).replace(/:\d+$/,"").toLowerCase()}i(is,"hostOf");function ss(e){return e.length===0||e.includes("@")?false:e.startsWith("[")&&e.endsWith("]")?true:!e.includes(":")}i(ss,"isPrintableHost");function as(e,t){let r=e.indexOf("://");return r<0||e.slice(r+3).includes("@")?false:ss(t)}i(as,"canEchoOrigin");function ls(e,t){return `${e}://${t}`}i(ls,"safeOrigin");function us(e){let t=e.trim(),r=os.exec(t);if(r===null||r[2]===void 0||r[2].length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let n=(r[1]??"").toLowerCase(),o=is(r[2]);if(o.length===0)return he("malformed-api-base-url","apiBaseUrl is not a valid absolute URL");let s=as(t,o)?`: ${ls(n,o)}`:"";if(n!=="https"){if(!(n==="http"&&ds(o)))return n==="http"?he("insecure-api-base-url",`apiBaseUrl must use https (cleartext http is only allowed for localhost)${s}`):he("unsupported-api-base-url-scheme",`apiBaseUrl must be http(s)${s}`)}let l=t.endsWith("/")?t.slice(0,-1):t;return Object.freeze({ok:true,value:l})}i(us,"normalizeBaseUrl");function ds(e){let t=e.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="::1"}i(ds,"isLoopbackHost");function cs(e){let r=globalThis.process?.env?.[e];return typeof r=="string"&&r.trim().length>0?r.trim():void 0}i(cs,"readEnv");var ps=3e4,en="x-request-id";async function*Qr(e){if(!e)return;let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;n&&n.length>0&&(yield n);}}finally{await t.cancel?.();}}i(Qr,"fetchByteSource");function fs(e){let t=new TextEncoder,r=ys(),n=false,o=i(a=>{let d="";a.lastEventId&&(d+=`id: ${a.lastEventId}
6
6
  `);let c=a.data??"";for(let p of c.split(`
7
7
  `))d+=`data: ${p}
8
8
  `;d+=`
@@ -1,7 +1,7 @@
1
1
  import { E as EverfurResult } from './EverfurResult-ZtH-YV1h.cjs';
2
2
  import { P as PetRef } from './ids-B2GAAifq.cjs';
3
- import { R as RequestFunnel } from './requestFunnel-C_cZXhIA.cjs';
4
- import { A as AuthContext } from './identity-b5Vp32Vp.cjs';
3
+ import { R as RequestFunnel } from './requestFunnel-DMR_1T3O.cjs';
4
+ import { A as AuthContext } from './identity-DUlshgow.cjs';
5
5
  import { E as ErrorPolicyPort } from './ErrorPolicyPort-D6CybiqJ.cjs';
6
6
  import { d as RecordsRequestView, R as RecordDocumentMeta, a as RecordEntity } from './models-Bn2z0NNo.cjs';
7
7
  import { E as EverfurError } from './EverfurError-DmELDpXp.cjs';
@@ -625,4 +625,4 @@ interface RecordsDepthClient {
625
625
  /** The depth client, over the same auth, funnel and error policy as the records repository. */
626
626
  declare function createRecordsDepthClient(deps: HttpRecordsRepositoryDeps): RecordsDepthClient;
627
627
 
628
- export { type RecordsSignatureSuggestion as $, RECORDS_CLINIC_BATCH_MAX as A, RECORD_SHARE_AUDIENCES as B, type CreateClinicRequestBatchInput as C, type RecordFactEditInput as D, type RecordFactRemoveInput as E, FACT_FIELD_BY_KIND as F, type RecordMarker as G, type HttpRecordsClinicRepositoryDeps as H, type RecordMarkerLatest as I, type RecordMarkerPoint as J, type RecordMarkerSummary as K, type RecordMarkersView as L, type RecordPdfLink as M, type RecordShare as N, type RecordShareAudience as O, type RecordShareAudienceScope as P, type RecordShareEmailInput as Q, type RecordClinicianNote as R, type RecordShareEmailReceipt as S, type RecordShareLink as T, type RecordShareRecipientKind as U, type RecordsAuthorizationSignature as V, type RecordsClinicBatch as W, type RecordsClinicBatchClient as X, type RecordsClinicBatchItem as Y, type RecordsClinicBatchResult as Z, type RecordsClinicTarget as _, type RecordClinicianNoteSection as a, SHARE_RECIPIENT_EMAIL_MAX as a0, createRecordsClinicBatchClient as a1, createRecordsDepthClient as a2, factCorrectionFor as a3, factValueCorrection as a4, inferFactValueKind as a5, isFactReviewerLocked as a6, isShareRecipientEmail as a7, mapRecordMarkers as a8, mapRecordPdfLink as a9, mapRecordShareEmailReceipt as aa, mapRecordShareLink as ab, mapRecordShareList as ac, mapShareAudiences as ad, mapSignatureSuggestions as ae, resolveShareUrl as af, type RecordsClinicSearchInput as ag, type RecordsClinicSearchPage as ah, type RecordsRecentClinicsInput as ai, type RecordsAuthorizationCopy as aj, type CreateClinicRequestInput as ak, type RecordsSignatureUploadPolicy as al, type RecordsFeatures as am, type RecordsUploadContentType as an, type RecordsPhotoContentType as ao, acceptsPhotos as ap, type RecordCompleteness as b, type RecordConflict as c, type RecordConflictCandidate as d, type RecordDepthView as e, type RecordDocumentContributionsView as f, type RecordEncounter as g, type RecordExamSystem as h, type RecordLabMarker as i, type RecordLabPoint as j, type RecordPhysicalExam as k, type RecordsClinic as l, type RecordsDepthClient as m, type RecordsRequestDocument as n, type RecordsTimelineMedication as o, type RecordsTimelineVaccine as p, type RecordsTimelineView as q, type RecordsTimelineVisit as r, type RecordsTimelineWeight as s, mapDocumentContributions as t, mapRecordDepth as u, mapRecordsTimeline as v, FACT_VALUE_FIELD as w, type FactFieldValue as x, type FactValueKind as y, type HttpRecordsRepositoryDeps as z };
628
+ export { type RecordsSignatureSuggestion as $, type HttpRecordsRepositoryDeps as A, RECORDS_CLINIC_BATCH_MAX as B, type CreateClinicRequestBatchInput as C, RECORD_SHARE_AUDIENCES as D, type RecordFactEditInput as E, FACT_FIELD_BY_KIND as F, type RecordFactRemoveInput as G, type HttpRecordsClinicRepositoryDeps as H, type RecordMarker as I, type RecordMarkerLatest as J, type RecordMarkerPoint as K, type RecordMarkerSummary as L, type RecordMarkersView as M, type RecordPdfLink as N, type RecordShare as O, type RecordShareAudienceScope as P, type RecordShareEmailInput as Q, type RecordClinicianNote as R, type RecordShareEmailReceipt as S, type RecordShareLink as T, type RecordShareRecipientKind as U, type RecordsAuthorizationSignature as V, type RecordsClinicBatch as W, type RecordsClinicBatchClient as X, type RecordsClinicBatchItem as Y, type RecordsClinicBatchResult as Z, type RecordsClinicTarget as _, type RecordClinicianNoteSection as a, SHARE_RECIPIENT_EMAIL_MAX as a0, createRecordsClinicBatchClient as a1, createRecordsDepthClient as a2, factCorrectionFor as a3, factValueCorrection as a4, inferFactValueKind as a5, isFactReviewerLocked as a6, isShareRecipientEmail as a7, mapRecordMarkers as a8, mapRecordPdfLink as a9, mapRecordShareEmailReceipt as aa, mapRecordShareLink as ab, mapRecordShareList as ac, mapShareAudiences as ad, mapSignatureSuggestions as ae, resolveShareUrl as af, type RecordsClinicSearchInput as ag, type RecordsClinicSearchPage as ah, type RecordsRecentClinicsInput as ai, type RecordsAuthorizationCopy as aj, type CreateClinicRequestInput as ak, type RecordsSignatureUploadPolicy as al, type RecordsFeatures as am, type RecordsUploadContentType as an, type RecordsPhotoContentType as ao, acceptsPhotos as ap, type RecordCompleteness as b, type RecordConflict as c, type RecordConflictCandidate as d, type RecordDepthView as e, type RecordDocumentContributionsView as f, type RecordEncounter as g, type RecordExamSystem as h, type RecordLabMarker as i, type RecordLabPoint as j, type RecordPhysicalExam as k, type RecordShareAudience as l, type RecordsClinic as m, type RecordsDepthClient as n, type RecordsRequestDocument as o, type RecordsTimelineMedication as p, type RecordsTimelineVaccine as q, type RecordsTimelineView as r, type RecordsTimelineVisit as s, type RecordsTimelineWeight as t, mapDocumentContributions as u, mapRecordDepth as v, mapRecordsTimeline as w, FACT_VALUE_FIELD as x, type FactFieldValue as y, type FactValueKind as z };