@everfur/sdk 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/chat-cards/package.json +8 -0
  2. package/dist/{Chat.d-BCfyvzX8.d.ts → Chat.d-B4GybUU4.d.ts} +1 -1
  3. package/dist/{Chat.d-Od44h51D.d.cts → Chat.d-DPM2ncxi.d.cts} +1 -1
  4. package/dist/{bookingCopy.d-BL2-URcv.d.ts → bookingCopy.d-Bn8bdo89.d.ts} +4 -4
  5. package/dist/{bookingCopy.d-Dfew1pjY.d.cts → bookingCopy.d-Dg7bPM-U.d.cts} +4 -4
  6. package/dist/chat/index.cjs +174 -174
  7. package/dist/chat/index.d.cts +4 -4
  8. package/dist/chat/index.d.ts +4 -4
  9. package/dist/chat/index.js +340 -340
  10. package/dist/chat/lite/index.cjs +174 -174
  11. package/dist/chat/lite/index.d.cts +4 -4
  12. package/dist/chat/lite/index.d.ts +4 -4
  13. package/dist/chat/lite/index.js +339 -339
  14. package/dist/chat-cards/index.cjs +18 -0
  15. package/dist/chat-cards/index.d.cts +15 -0
  16. package/dist/chat-cards/index.d.ts +15 -0
  17. package/dist/chat-cards/index.js +18 -0
  18. package/dist/{chatHandoffToken.d-BjfmIxXk.d.cts → chatHandoffToken.d-Cap2z62P.d.cts} +1 -1
  19. package/dist/{chatHandoffToken.d-CFiI6IMc.d.ts → chatHandoffToken.d-zdp23Ukr.d.ts} +1 -1
  20. package/dist/{checkin.d-CokpahFL.d.ts → checkin.d-BoZXWjxX.d.ts} +8 -0
  21. package/dist/{checkin.d-BP3ZWBfX.d.cts → checkin.d-CuIUahcd.d.cts} +8 -0
  22. package/dist/{chunk-K7YHXFPQ.js → chunk-6AIEUA4V.js} +1 -1
  23. package/dist/{chunk-2T5CB5MW.js → chunk-BN7OAFBS.js} +16 -16
  24. package/dist/{chunk-CMDCBYUH.js → chunk-IXHLESYC.js} +1 -1
  25. package/dist/{chunk-ASE36WGP.js → chunk-LMIBOI3I.js} +12 -12
  26. package/dist/client/index.cjs +1 -1
  27. package/dist/client/index.d.cts +1 -1
  28. package/dist/client/index.d.ts +1 -1
  29. package/dist/client/index.js +1 -1
  30. package/dist/{context.d-DS1GXUEY.d.ts → context.d-D7zX6Q0J.d.ts} +1 -1
  31. package/dist/{context.d-Bj6-xYPA.d.cts → context.d-guaLkx5t.d.cts} +1 -1
  32. package/dist/core/index.cjs +2 -2
  33. package/dist/core/index.d.cts +4 -4
  34. package/dist/core/index.d.ts +4 -4
  35. package/dist/core/index.js +2 -2
  36. package/dist/{idempotency.d-dOFfV91-.d.ts → idempotency.d-CbB07p64.d.ts} +10 -8
  37. package/dist/{idempotency.d-CFVMhWcv.d.cts → idempotency.d-DrxKLPPe.d.cts} +10 -8
  38. package/dist/index.cjs +354 -354
  39. package/dist/index.d.cts +7 -7
  40. package/dist/index.d.ts +7 -7
  41. package/dist/index.js +364 -364
  42. package/dist/notifications/index.d.cts +3 -3
  43. package/dist/notifications/index.d.ts +3 -3
  44. package/dist/{optInView.d-ByDJMrMv.d.cts → optInView.d-ChJyJMBA.d.cts} +4 -1
  45. package/dist/{optInView.d-DVshLxbD.d.ts → optInView.d-Cps7aLQN.d.ts} +4 -1
  46. package/dist/records/index.cjs +1 -1
  47. package/dist/records/index.js +1 -1
  48. package/dist/{route.d-DtuKY5dM.d.ts → route.d-B3u14HJT.d.ts} +1 -1
  49. package/dist/{route.d-Nt-r-7IO.d.cts → route.d-QBCoO62z.d.cts} +1 -1
  50. package/dist/{runtimeTypes.d-CL4l7ta4.d.cts → runtimeTypes.d-BSxuUCOX.d.cts} +1 -1
  51. package/dist/{runtimeTypes.d-BzUig75K.d.ts → runtimeTypes.d-hjN6xvxm.d.ts} +1 -1
  52. package/dist/server/events/index.cjs +1 -1
  53. package/dist/server/events/index.js +1 -1
  54. package/dist/server/index.cjs +1 -1
  55. package/dist/server/index.js +1 -1
  56. package/dist/shop/index.cjs +1 -1
  57. package/dist/shop/index.d.cts +2 -2
  58. package/dist/shop/index.d.ts +2 -2
  59. package/dist/shop/index.js +1 -1
  60. package/dist/televet/booking/index.cjs +156 -156
  61. package/dist/televet/booking/index.d.cts +2 -2
  62. package/dist/televet/booking/index.d.ts +2 -2
  63. package/dist/televet/booking/index.js +156 -156
  64. package/dist/testing/rn/index.d.cts +2 -2
  65. package/dist/testing/rn/index.d.ts +2 -2
  66. package/dist/testing/web/index.d.cts +2 -2
  67. package/dist/testing/web/index.d.ts +2 -2
  68. package/dist/texting/index.cjs +8 -8
  69. package/dist/texting/index.d.cts +2 -2
  70. package/dist/texting/index.d.ts +2 -2
  71. package/dist/texting/index.js +8 -8
  72. package/dist/{useUnread.d-CedFK4k6.d.ts → useUnread.d-4SbFChbd.d.ts} +30 -3
  73. package/dist/{useUnread.d-DST1GMmL.d.cts → useUnread.d-B0YhhR_D.d.cts} +30 -3
  74. package/dist/web/health-plan/index.cjs +1 -1
  75. package/dist/web/health-plan/index.js +1 -1
  76. package/dist/web/index.cjs +4 -4
  77. package/dist/web/index.d.cts +7 -7
  78. package/dist/web/index.d.ts +7 -7
  79. package/dist/web/index.js +4 -4
  80. package/dist/web/notifications/index.d.cts +2 -2
  81. package/dist/web/notifications/index.d.ts +2 -2
  82. package/dist/web/records-sheet/index.cjs +1 -1
  83. package/dist/web/records-sheet/index.js +1 -1
  84. package/dist/web/shop/index.cjs +2 -2
  85. package/dist/web/shop/index.d.cts +2 -2
  86. package/dist/web/shop/index.d.ts +2 -2
  87. package/dist/web/shop/index.js +3 -3
  88. package/dist/web/televet/booking/index.cjs +185 -185
  89. package/dist/web/televet/booking/index.d.cts +2 -2
  90. package/dist/web/televet/booking/index.d.ts +2 -2
  91. package/dist/web/televet/booking/index.js +185 -185
  92. package/dist/web/televet/call/index.cjs +1 -1
  93. package/dist/web/televet/call/index.js +1 -1
  94. package/dist/web/texting/index.cjs +3 -4
  95. package/dist/web/texting/index.d.cts +2 -2
  96. package/dist/web/texting/index.d.ts +2 -2
  97. package/dist/web/texting/index.js +3 -4
  98. package/dist/web/ui/index.cjs +1 -1
  99. package/dist/web/ui/index.js +33 -33
  100. package/package.json +16 -1
@@ -5,7 +5,7 @@ export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '..
5
5
  export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-DDiPRgye.cjs';
6
6
  export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-CqDLKj1U.cjs';
7
7
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve.d-BTC3b6FW.cjs';
8
- export { f as EntitlementSnapshot } from '../../runtimeTypes.d-CL4l7ta4.cjs';
8
+ export { f as EntitlementSnapshot } from '../../runtimeTypes.d-BSxuUCOX.cjs';
9
9
  export { l as RecordsRequestStatus, e as RecordsRequestView, m as RecordsSimpleStatus } from '../../models.d-D75NFs32.cjs';
10
10
  import { ReactNode } from 'react';
11
11
  import { R as RiskTier } from '../../PhotoController.d-Cb8Juile.cjs';
@@ -17,7 +17,7 @@ import '../../config.d-ClAI2RZ6.cjs';
17
17
  import '../../profile.d-CSs1wlXT.cjs';
18
18
  import '../../ErrorPolicyPort.d-BIdmYQnk.cjs';
19
19
  import '../../cacheEpoch.d-DknKn3S0.cjs';
20
- import '../../checkin.d-BP3ZWBfX.cjs';
20
+ import '../../checkin.d-CuIUahcd.cjs';
21
21
  import '../../casesRepository.d-CVuKTkJo.cjs';
22
22
  import '../../requestFunnel.d-BwZDfWVD.cjs';
23
23
  import '../../TelemetryPort.d-BDNr00hu.cjs';
@@ -5,7 +5,7 @@ export { B as Brand, P as PetRef, R as RecordsRequestId, _ as __brand } from '..
5
5
  export { c as EverfurFontSource, d as EverfurFontWeight } from '../../tokens.d-DDiPRgye.js';
6
6
  export { C as ClientBranding, R as RadiusScale, S as SurfaceStyle } from '../../branding.d-XrZYClN4.js';
7
7
  export { b as CapabilityDisabled, D as DisabledLevel, E as EntitlementDecision } from '../../resolve.d-BTC3b6FW.js';
8
- export { f as EntitlementSnapshot } from '../../runtimeTypes.d-BzUig75K.js';
8
+ export { f as EntitlementSnapshot } from '../../runtimeTypes.d-hjN6xvxm.js';
9
9
  export { l as RecordsRequestStatus, e as RecordsRequestView, m as RecordsSimpleStatus } from '../../models.d-C7d9Li6n.js';
10
10
  import { ReactNode } from 'react';
11
11
  import { R as RiskTier } from '../../PhotoController.d-BrFJ2lAc.js';
@@ -17,7 +17,7 @@ import '../../config.d-B7Z-KTGq.js';
17
17
  import '../../profile.d-CSs1wlXT.js';
18
18
  import '../../ErrorPolicyPort.d-BnI5qWg4.js';
19
19
  import '../../cacheEpoch.d-DknKn3S0.js';
20
- import '../../checkin.d-CokpahFL.js';
20
+ import '../../checkin.d-BoZXWjxX.js';
21
21
  import '../../casesRepository.d-Dn1fK1b2.js';
22
22
  import '../../requestFunnel.d-DKBPTpsy.js';
23
23
  import '../../TelemetryPort.d-BDNr00hu.js';
@@ -1,5 +1,5 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
- import { f as EntitlementSnapshot } from '../../runtimeTypes.d-CL4l7ta4.cjs';
2
+ import { f as EntitlementSnapshot } from '../../runtimeTypes.d-BSxuUCOX.cjs';
3
3
  import { E as EverfurResult } from '../../EverfurResult.d-BFH-3s6E.cjs';
4
4
  import { R as RecordsRequestId, P as PetRef } from '../../ids.d-B2GAAifq.cjs';
5
5
  export { B as Brand, _ as __brand } from '../../ids.d-B2GAAifq.cjs';
@@ -15,7 +15,7 @@ import '../../config.d-ClAI2RZ6.cjs';
15
15
  import '../../profile.d-CSs1wlXT.cjs';
16
16
  import '../../ErrorPolicyPort.d-BIdmYQnk.cjs';
17
17
  import '../../cacheEpoch.d-DknKn3S0.cjs';
18
- import '../../checkin.d-BP3ZWBfX.cjs';
18
+ import '../../checkin.d-CuIUahcd.cjs';
19
19
  import '../../casesRepository.d-CVuKTkJo.cjs';
20
20
  import '../../requestFunnel.d-BwZDfWVD.cjs';
21
21
  import '../../TelemetryPort.d-BDNr00hu.cjs';
@@ -1,5 +1,5 @@
1
1
  /*! @everfur/sdk. Copyright (c) 2026 Strand Health Inc. dba Everfur. All rights reserved. Use is subject to the Everfur SDK License: https://docs.everfur.com/license */
2
- import { f as EntitlementSnapshot } from '../../runtimeTypes.d-BzUig75K.js';
2
+ import { f as EntitlementSnapshot } from '../../runtimeTypes.d-hjN6xvxm.js';
3
3
  import { E as EverfurResult } from '../../EverfurResult.d-D_-254ZY.js';
4
4
  import { R as RecordsRequestId, P as PetRef } from '../../ids.d-B2GAAifq.js';
5
5
  export { B as Brand, _ as __brand } from '../../ids.d-B2GAAifq.js';
@@ -15,7 +15,7 @@ import '../../config.d-B7Z-KTGq.js';
15
15
  import '../../profile.d-CSs1wlXT.js';
16
16
  import '../../ErrorPolicyPort.d-BnI5qWg4.js';
17
17
  import '../../cacheEpoch.d-DknKn3S0.js';
18
- import '../../checkin.d-CokpahFL.js';
18
+ import '../../checkin.d-BoZXWjxX.js';
19
19
  import '../../casesRepository.d-Dn1fK1b2.js';
20
20
  import '../../requestFunnel.d-DKBPTpsy.js';
21
21
  import '../../TelemetryPort.d-BDNr00hu.js';
@@ -17,9 +17,9 @@ return r.jsx(t.View,{style:[l.offstate,i],accessible:true,accessibilityState:{bu
17
17
  return r.jsx(t.View,{style:[l.offstate,i],accessible:true,accessibilityRole:"text",accessibilityLabel:a,children:a.length>0?/* @__PURE__ */r.jsx(Text,{style:l.offstateText,children:a}):null})}function Mr(e){let{color:r,space:n,radius:i,type:o}=e;return t.StyleSheet.create({offstate:{minHeight:zr,justifyContent:"center",paddingHorizontal:n.lg,paddingVertical:n.md,backgroundColor:r.surfaceCream,borderRadius:i.md,borderWidth:t.StyleSheet.hairlineWidth,borderColor:r.brandBorder},offstateText:{...face(e,"regular"),fontSize:o.size.body,lineHeight:Math.round(o.size.body*o.lineHeight.normal),color:r.text.muted},skeletonBar:{height:n.md,borderRadius:i.xs,backgroundColor:r.brandSofter}})}function Br(e){if(!(t.Platform.OS!=="ios"||e===""))try{let r=t.AccessibilityInfo?.announceForAccessibility;typeof r=="function"&&r.call(t.AccessibilityInfo,e)}catch{}}function AnnounceLine({line:t}){return e.useEffect(()=>{Br(t)},[t]),null}function EverfurTextingOptIn(n){let i=b(n,["onStatusChange"]),o=e.useMemo(()=>({copy:Ft(n.copy),brandCopy:It(n.brandCopy)}),[n.copy,n.brandCopy]),{copy:l,brandCopy:a}=o,s=useEverfurTheme(),d=e.useMemo(()=>qr(s),[s]),u=useEverfurTexting();return u.status==="signedOut"?/* @__PURE__ */r.jsxs(t.View,{style:[d.card,i.style],children:[
18
18
  /* @__PURE__ */r.jsx(Text,{style:d.title,accessibilityRole:"header",children:a.introTitle(s.meta.displayName)}),
19
19
  /* @__PURE__ */r.jsx(Text,{style:d.body,children:l.signedOut})]}):/* @__PURE__ */r.jsx(CapabilityGate,{capability:"texting",...i.renderDisabled?{renderDisabled:i.renderDisabled}:{},style:i.style,children:/* @__PURE__ */r.jsx(Rt.Provider,{value:o,children:/* @__PURE__ */r.jsx(OptInBody,{...i,texting:u,styles:d})})})}function Button({label:e,onPress:n,disabled:i=false,busy:o=false,styles:l,kind:a="primary",testID:s}){let d=a==="primary"?l.primary:a==="secondary"?l.secondary:l.link,u=a==="primary"?l.primaryLabel:a==="secondary"?l.secondaryLabel:l.linkLabel;/* @__PURE__ */
20
- return r.jsx(t.Pressable,{onPress:n,disabled:i||o,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{disabled:i||o,busy:o},style:[d,i||o?l.dimmed:null],...s===void 0?{}:{testID:s},children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:u,children:e})})}function OptInBody({texting:n,styles:i,onStatusChange:o,renderNotice:l,style:a}){let{copy:s,brandCopy:d}=Ot(),u=useEverfurTheme(),{status:c,profile:p,snapshot:f}=n,h=p?.brandName??u.meta.displayName,[b,y]=e.useState(""),[g,m]=e.useState(false),[v,_]=e.useState(""),[x,C]=e.useState(null),[w,S]=e.useState(false),[k,E]=e.useState(null),[T,j]=e.useState(false);e.useEffect(()=>{o?.(c)},[o,c]),e.useEffect(()=>{C(null),S(false)},[c]);let F=(e,n=false)=>/* @__PURE__ */r.jsx(t.View,{style:[i.card,a],accessibilityState:{busy:n},children:e}),I=(e,n)=>{let o=textingErrorText(e,f.failedAction,f.codeRefusal,s),a=textingSupportText(e,s);/* @__PURE__ */
20
+ return r.jsx(t.Pressable,{onPress:n,disabled:i||o,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{disabled:i||o,busy:o},style:[d,i||o?l.dimmed:null],...s===void 0?{}:{testID:s},children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:u,children:e})})}function OptInBody({texting:n,styles:i,onStatusChange:o,renderNotice:l,style:a}){let{copy:s,brandCopy:d}=Ot(),u=useEverfurTheme(),{status:c,profile:p,snapshot:f}=n,h=p?.brandName??u.meta.displayName,[b,y]=e.useState(""),[g,m]=e.useState(false),[v,_]=e.useState(""),[x,C]=e.useState(null),[w,S]=e.useState(false),[k,E]=e.useState(null),[T,j]=e.useState(false);e.useEffect(()=>{o?.(c)},[o,c]),e.useEffect(()=>{C(null),S(false)},[c]);let F=(e,n=false)=>/* @__PURE__ */r.jsx(t.View,{style:[i.card,a],accessibilityState:{busy:n},children:e}),I=(e,n)=>{let o=textingErrorText(e,f.failedAction,f.codeRefusal,s);/* @__PURE__ */
21
21
  return r.jsxs(t.View,{style:i.notice,accessibilityLiveRegion:"polite",children:[
22
- /* @__PURE__ */r.jsx(HostRender,{resetKey:e,render:()=>l?l(e):/* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:o}),fallback:/* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:o})}),a===null?null:/* @__PURE__ */r.jsx(Text,{style:i.footnote,children:a}),n===void 0?null:/* @__PURE__ */r.jsx(Button,{label:s.retry,onPress:n,styles:i,kind:"link"}),l?null:/* @__PURE__ */r.jsx(AnnounceLine,{line:a===null?o:`${o} ${a}`})]})},R=x===null?null:/* @__PURE__ */r.jsxs(r.Fragment,{children:[
22
+ /* @__PURE__ */r.jsx(HostRender,{resetKey:e,render:()=>l?l(e):/* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:o}),fallback:/* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:o})}),n===void 0?null:/* @__PURE__ */r.jsx(Button,{label:s.retry,onPress:n,styles:i,kind:"link"}),l?null:/* @__PURE__ */r.jsx(AnnounceLine,{line:o})]})},R=x===null?null:/* @__PURE__ */r.jsxs(r.Fragment,{children:[
23
23
  /* @__PURE__ */r.jsx(Text,{style:i.noticeText,accessibilityLiveRegion:"polite",children:textingInputProblemText(x,s)}),
24
24
  /* @__PURE__ */r.jsx(AnnounceLine,{line:textingInputProblemText(x,s)})]});if(c==="unavailable")return F(
25
25
  /* @__PURE__ */r.jsxs(r.Fragment,{children:[
@@ -68,19 +68,19 @@ return r.jsx(t.Pressable,{onPress:()=>a(n.petRef),disabled:o,accessibilityRole:"
68
68
  /* @__PURE__ */r.jsx(Button,{label:o?d.savingPet:d.savePet,kind:"secondary",busy:o,disabled:!p,styles:e,onPress:()=>{c!==null&&s(c)},testID:"texting-pet-save"}),l&&!p?/* @__PURE__ */r.jsx(Text,{style:e.footnote,children:d.petSaved}):null]})]})}function qr(e){let{color:r,radius:o,space:l,type:a,slots:s}=e,d=(t,r,n)=>({...face(e,n),fontSize:t,lineHeight:Math.round(t*a.lineHeight.snug),color:r}),u=s.card?.textColor;return t.StyleSheet.create({card:{gap:l.md,padding:l.lg,borderRadius:o.lg,borderWidth:1,borderColor:r.brandBorder,backgroundColor:r.surface,...n(s.card,1)},title:d(a.size.subtitle,u??r.text.primary,"bold"),subtitle:d(a.size.body,u??r.text.primary,"bold"),body:d(a.size.body,u??r.text.secondary,"regular"),footnote:d(a.size.caption,r.text.muted,"regular"),phone:d(a.size.body,u??r.text.primary,"bold"),label:d(a.size.caption,u??r.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:l.md,borderRadius:o.md,borderWidth:1,borderColor:r.controlEdge,backgroundColor:r.surface,...d(a.size.body,r.text.primary,"regular"),...n(s.input,1),...i(s.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:l.sm,minHeight:44},box:{width:24,height:24,borderRadius:o.xs,borderWidth:2,borderColor:r.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:r.surface},boxChecked:{backgroundColor:r.brand,borderColor:r.brandInk},tick:{...d(a.size.caption,r.text.onBrand,"bold")},consentText:{flex:1,...d(a.size.caption,u??r.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:l.lg,borderRadius:o.pill,alignItems:"center",justifyContent:"center",backgroundColor:r.brand,...n(s.primaryButton)},primaryLabel:{...d(a.size.body,r.text.onBrand,"bold"),...i(s.primaryButton)},secondary:{minHeight:44,paddingHorizontal:l.lg,borderRadius:o.pill,borderWidth:1,borderColor:r.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:r.surface},secondaryLabel:d(a.size.caption,r.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...d(a.size.caption,r.linkInk,"bold"),...i(s.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:l.md},notice:{gap:l.xs},noticeText:d(a.size.caption,r.errorRed,"regular"),confirm:{gap:l.sm,padding:l.md,borderRadius:o.md,backgroundColor:r.surfaceSubtle},petRow:{gap:l.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:l.sm},chip:{minHeight:44,paddingHorizontal:l.md,borderRadius:o.pill,borderWidth:1,borderColor:r.brandBorder,backgroundColor:r.surface,justifyContent:"center",...n(s.chip,1)},chipPicked:{backgroundColor:r.brandSoft,borderColor:r.brandInk},chipLabel:{...d(a.size.caption,r.text.primary,"regular"),...i(s.chip)},chipLabelPicked:{...face(e,"bold"),color:r.brandInk}})}var Vr=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),Hr=globalThis;function Ur(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var $r=Hr[Vr],Wr=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),Yr=Ur($r)?$r:Hr[Vr]=Wr();function Kr(){return Yr.holds.size>0}function Gr(e){return Yr.listeners.add(e),()=>{Yr.listeners.delete(e)}}function Xr(){return e.useSyncExternalStore(Gr,Kr,Kr)}function resolveTextingAskDue(e){let t=e.enabled&&e.capabilityGranted&&e.hasProfile&&e.signedIn&&e.scheduleEligible&&!e.offeredThisSession,r=t&&e.identity==="none"&&e.surfaceReady;return{readEnabled:t,due:r}}var Qr=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(e){if(e.isBootstrapping===true||e.isLoadingHistory===true||e.isStreaming===true||e.status==="error"||e.stopped===true)return false;let t=e.messages[e.messages.length-1];return t===void 0||t.role!=="assistant"||t.pending===true||t.checkin!==void 0||t.text.trim().length===0?false:!(typeof t.urgencyLevel=="string"&&Qr.has(t.urgencyLevel))}var Jr=/* @__PURE__ */new WeakSet;function Zr(e){return Jr.has(e)}var en="everfur.texting.askSchedule.v1",tn=2880*60*1e3,rn=3,nn=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(e,t){if(e.status!=="ok")return false;let{entry:r}=e;return r.completed||r.askCount>=rn?false:r.nextAskAt===null||t>=r.nextAskAt}function on(e,t){return{askCount:Math.min(e.askCount+1,rn),nextAskAt:t+tn,completed:e.completed}}function ln(e,t){return{...e,nextAskAt:t+tn}}function an(e){return{...e,completed:true}}function sn(e){return e.askCount<=0?1:e.askCount===1?2:3}function dn(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,{askCount:r,nextAskAt:n,completed:i}=t;return typeof r!="number"||!Number.isInteger(r)||r<0||n!==null&&(typeof n!="number"||!Number.isFinite(n))||typeof i!="boolean"?null:{askCount:Math.min(r,rn),nextAskAt:n,completed:i}}function un(e){let t;try{t=JSON.parse(e)}catch{return null}if(t===null||typeof t!="object"||Array.isArray(t))return null;let r={};for(let[e,n]of Object.entries(t)){let t=dn(n);if(t===null)return null;r[e]=t}return r}var cn=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function pn(){let e=globalThis,t=e[cn];return t===void 0&&(t={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},e[cn]=t),t.sessionListeners===void 0&&(t.sessionListeners=/* @__PURE__ */new Set),t}async function fn(e){if(Zr(e))return{status:"unreadable"};let t;try{t=await e.getItem(en)}catch{return{status:"unreadable"}}if(t===null)try{return await e.setItem(en,"{}"),await e.getItem(en)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let r=un(t);if(r!==null)return{status:"ok",map:r};try{await e.removeItem(en)}catch{}return{status:"unreadable"}}function hn(e){let{listeners:t}=pn();return t.add(e),()=>{t.delete(e)}}function bn(e,userRef,t){let r=pn(),n=async()=>{let n=await fn(e);if(n.status!=="ok")return;let i=n.map[userRef]??nn;try{await e.setItem(en,JSON.stringify({...n.map,[userRef]:t(i)}))}catch{return}for(let e of[...r.listeners])e()},i=r.writeChain.then(n,n);return r.writeChain=i.catch(()=>{}),i}async function yn(e,userRef){let t=await fn(e);return t.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:t.map[userRef]??nn}}function gn(e,userRef,t=Date.now()){return bn(e,userRef,e=>on(e,t))}function mn(e,userRef,t=Date.now()){return bn(e,userRef,e=>ln(e,t))}function vn(e,userRef){return bn(e,userRef,an)}function _n(userRef){return pn().sessions.get(userRef)??null}function xn(userRef,e){let t=pn();t.sessions.set(userRef,e);for(let e of[...t.sessionListeners])e()}function Cn(e){let{sessionListeners:t}=pn();return t.add(e),()=>{t.delete(e)}}var NO_SNAPSHOT=()=>null;function wn(){let{runtime:t}=St(),r=t.entitlements??null,n=e.useCallback(e=>r===null?()=>{}:r.subscribe(e),[r]),i=r===null?NO_SNAPSHOT:r.getSnapshot,o=e.useSyncExternalStore(n,i,i);return e.useMemo(()=>o!==null&&decideCapability("texting",o.decisions,{isPending:o.isPending}).enabled,[o])}var Sn=/* @__PURE__ */Object.freeze({status:"idle"});function kn(userRef){let{runtime:t}=St(),r=t.registry.services.kv,[n,i]=e.useState({user:null,value:Sn});return e.useEffect(()=>{if(userRef===null)return;let e=true,t=()=>{yn(r,userRef).then(t=>{e&&i({user:userRef,value:{status:"ready",read:t}})})};t();let n=hn(t);return()=>{e=false,n()}},[r,userRef]),n.user===userRef?n.value:Sn}function En(e){switch(e.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(t={}){let r=t.enabled!==false,n=t.ready!==false,i=t.surface??"prompt",o=t.entry===true,{runtime:l,userRef:userRef}=St(),a=l.registry.services.kv,s=wn(),d=kn(r&&userRef!==null?userRef:null),u=e.useCallback(()=>userRef===null?null:_n(userRef),[userRef]),c=e.useSyncExternalStore(Cn,u,u),p=e.useCallback(e=>{userRef!==null&&xn(userRef,e)},[userRef]),f=c!==null&&c.surface===i,h=c!==null&&c.fromPrompt===true,b=f?c.stage==="handoff"?"hidden":c.stage:i==="prompt"&&h?"dismissed":"hidden",y=Date.now(),g=d.status==="ready"&&isTextingAskEligible(d.read,y),[m,v]=e.useState(null),_=o&&userRef!==null&&s,x=or(userRef!==null&&m===userRef||b!=="hidden"||f||_),C=En(x),{readEnabled:w,due:S}=resolveTextingAskDue({enabled:r,capabilityGranted:s,hasProfile:x.profile!==null,signedIn:userRef!==null,scheduleEligible:g,offeredThisSession:c!==null,identity:C,surfaceReady:n});e.useEffect(()=>{w&&userRef!==null&&v(userRef)},[w,userRef]);let k=c?.askNumber??(d.status==="ready"&&d.read.status==="ok"?sn(d.read.entry):1);e.useEffect(()=>{!S||userRef===null||_n(userRef)!==null||p({surface:i,stage:"offered",answered:false,askNumber:k})},[S,userRef,p,k,i]),e.useEffect(()=>{!f||c.stage!=="handoff"||r&&n&&s&&x.profile!==null&&C==="none"&&p({...c,stage:"offered"})},[f,c,r,n,s,x.profile,C,p]);let E=d.status==="ready"&&d.read.status==="ok"&&d.read.entry.completed;e.useEffect(()=>{userRef===null||C!=="exists"||E||d.status!=="ready"||vn(a,userRef)},[C,E,d.status,a,userRef]),e.useEffect(()=>{f&&c.stage==="enrolling"&&x.status==="verified"&&p({...c,stage:"verified"})},[f,c,x.status,p]);let T=e.useCallback(e=>userRef===null||e.answered?e:(gn(a,userRef),{...e,answered:true}),[a,userRef]),j=e.useCallback(()=>{f&&c.stage==="offered"&&p({...c,stage:"enrolling"})},[f,c,p]),F=e.useCallback(()=>{if(!f||c.stage!=="enrolling")return;let{back:e,...t}=c;p({...t,stage:e??"offered"})},[f,c,p]),I=e.useCallback(()=>{if(!(!f||c.stage!=="offered"&&c.stage!=="enrolling")){if(i==="prompt"){p({...T(c),surface:"chat",stage:"handoff",fromPrompt:true});return}c.fromPrompt===true&&c.answered&&userRef!==null&&mn(a,userRef),p({...T(c),stage:"dismissed"})}},[f,c,i,p,T,a,userRef]),{start:R}=x,O=e.useCallback(async e=>!f||c.stage!=="enrolling"?false:(c.answered||p(T(c)),R(e)),[f,c,p,T,R]),A=_&&x.profile!==null&&C==="none"&&b!=="enrolling"&&b!=="verified",P=e.useCallback(()=>{if(!A||userRef===null)return;let e=f?c:null;p({surface:i,stage:"enrolling",answered:e?.answered??false,askNumber:c?.askNumber??k,...e?.fromPrompt===true?{fromPrompt:true}:{},back:e?.stage==="offered"?"offered":"dismissed"})},[A,userRef,f,c,p,i,k]),D=x.profile?.brandName??"";return e.useMemo(()=>({stage:userRef===null?"hidden":b,brand:D,askNumber:k,texting:x,accept:j,dismiss:I,close:F,start:O,canOpen:A,open:P}),[userRef,b,D,k,x,j,I,F,O,A,P])}var Tn=/* @__PURE__ */new Set(["signedOut","unavailable","failed","verified","optingOut","optedOut"]);function jn(t,r,n,i){let{userRef:userRef}=St(),o=e.useRef(null),{canOpen:l,open:a,stage:s,texting:d}=t;e.useEffect(()=>{if(!r){o.current=null;return}if(!(userRef===null||o.current===userRef)){if(l){o.current=userRef,a();return}if(s==="enrolling"||s==="verified"){o.current=userRef;return}(!n||Tn.has(d.status))&&(o.current=userRef,p(i,"skipped"))}},[r,userRef,l,a,s,d.status,n,i])}var Fn=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:t,ready:r,onAsk:n,entry:i=false}){let o=useTextingAsk({enabled:t,ready:r,surface:"chat",entry:i});return e.useEffect(()=>{p(n,o)},[o,n]),null}function textingAskLines(e){return{line:Tt.chatAskLine(e.brand),accept:Et.promptAccept,dismiss:Et.promptDismiss,verified:Tt.chatAskVerified(e.brand)}}function ChatTextingAskComposer({ask:t}){let n=useEverfurTheme(),i=e.useMemo(()=>In(n),[n]);/* @__PURE__ */
69
69
  return r.jsx(AskEntry,{ask:t,styles:i})}function AskEntry({ask:n,styles:i}){let{texting:o}=n,{status:l,profile:a,snapshot:s}=o,[d,u]=e.useState(""),[c,p]=e.useState(false),[f,h]=e.useState(""),[b,y]=e.useState(null),[g,m]=e.useState(false),v={onFocus:()=>m(true),onBlur:()=>m(false)},_=g?[i.pill,i.pillFocused]:i.pill,x=l==="enroll"||l==="requesting"&&!s.resending,C=l==="code"||l==="confirming"||l==="requesting",w=e.useRef(null),S=e.useRef(null),k=l==="enroll",E=l==="code";e.useEffect(()=>{y(null)},[l]),e.useEffect(()=>{k?w.current?.focus():E&&S.current?.focus()},[k,E]);let T=/* @__PURE__ */r.jsxs(t.Pressable,{onPress:n.close,accessibilityRole:"button",accessibilityLabel:Et.close,hitSlop:8,style:i.close,testID:"texting-ask-close",children:[
70
70
  /* @__PURE__ */r.jsx(t.View,{style:[i.closeBar,i.closeBarA]}),
71
- /* @__PURE__ */r.jsx(t.View,{style:[i.closeBar,i.closeBarB]})]}),j=s.error===null?null:textingErrorText(s.error,s.failedAction,s.codeRefusal),F=s.error===null?null:textingSupportText(s.error),I=j===null?null:/* @__PURE__ */r.jsxs(t.View,{style:i.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
72
- /* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:j}),F===null?null:/* @__PURE__ */r.jsx(Text,{style:i.footnote,children:F}),
73
- /* @__PURE__ */r.jsx(AnnounceLine,{line:F===null?j:`${j} ${F}`})]}),R=b===null?null:/* @__PURE__ */r.jsxs(r.Fragment,{children:[
71
+ /* @__PURE__ */r.jsx(t.View,{style:[i.closeBar,i.closeBarB]})]}),j=s.error===null?null:textingErrorText(s.error,s.failedAction,s.codeRefusal),F=j===null?null:/* @__PURE__ */r.jsxs(t.View,{style:i.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
72
+ /* @__PURE__ */r.jsx(Text,{style:i.noticeText,children:j}),
73
+ /* @__PURE__ */r.jsx(AnnounceLine,{line:j})]}),I=b===null?null:/* @__PURE__ */r.jsxs(r.Fragment,{children:[
74
74
  /* @__PURE__ */r.jsx(Text,{style:i.noticeText,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:textingInputProblemText(b)}),
75
75
  /* @__PURE__ */r.jsx(AnnounceLine,{line:textingInputProblemText(b)})]});if(a===null)return null;if(l==="loading"||l==="failed"||l==="signedOut"||l==="unavailable")/* @__PURE__ */
76
76
  return r.jsx(t.View,{style:i.root,testID:"texting-ask-entry",accessibilityState:{busy:l==="loading"},children:/* @__PURE__ */r.jsxs(t.View,{style:i.head,children:[
77
- /* @__PURE__ */r.jsx(t.View,{style:i.headBody,children:l==="failed"?I:null}),T]})});if(x){let e=l==="requesting",o=()=>{let e=validateTextingEnroll(d,c);y(e),e===null&&n.start(d)};/* @__PURE__ */
77
+ /* @__PURE__ */r.jsx(t.View,{style:i.headBody,children:l==="failed"?F:null}),T]})});if(x){let e=l==="requesting",o=()=>{let e=validateTextingEnroll(d,c);y(e),e===null&&n.start(d)};/* @__PURE__ */
78
78
  return r.jsxs(t.View,{style:i.root,testID:"texting-ask-phone",children:[
79
79
  /* @__PURE__ */r.jsxs(t.View,{style:i.head,children:[
80
80
  /* @__PURE__ */r.jsxs(t.View,{style:i.headBody,children:[
81
81
  /* @__PURE__ */r.jsxs(t.Pressable,{onPress:()=>p(!c),disabled:e,accessibilityRole:"checkbox",accessibilityState:{checked:c,disabled:e},accessibilityLabel:a.consentText,style:i.consentRow,testID:"texting-ask-consent",children:[
82
82
  /* @__PURE__ */r.jsx(t.View,{style:[i.box,c?i.boxChecked:null],accessibilityElementsHidden:true,importantForAccessibility:"no",children:c?/* @__PURE__ */r.jsx(Text,{style:i.tick,children:"✓"}):null}),
83
- /* @__PURE__ */r.jsx(Text,{style:i.consentText,children:a.consentText})]}),a.helpContact===null?null:/* @__PURE__ */r.jsxs(Text,{style:i.footnote,children:[Et.helpContactLabel," ",a.helpContact]})]}),T]}),R,I,
83
+ /* @__PURE__ */r.jsx(Text,{style:i.consentText,children:a.consentText})]}),a.helpContact===null?null:/* @__PURE__ */r.jsxs(Text,{style:i.footnote,children:[Et.helpContactLabel," ",a.helpContact]})]}),T]}),I,F,
84
84
  /* @__PURE__ */r.jsxs(t.View,{style:_,children:[
85
85
  /* @__PURE__ */r.jsx(Or,{value:d,onChangeText:u,editable:!e,keyboardType:"phone-pad",textContentType:"telephoneNumber",autoComplete:"tel",accessibilityLabel:Et.phoneLabel,placeholder:Et.phoneLabel,placeholderTextColor:i.placeholder.color,ref:w,onSubmitEditing:o,...v,style:i.field,testID:"texting-ask-phone-input"},"phone"),
86
86
  /* @__PURE__ */r.jsx(t.Pressable,{onPress:o,disabled:e,accessibilityRole:"button",accessibilityLabel:e?Et.sendingCode:Et.sendCode,accessibilityState:{disabled:e,busy:e},style:[i.primary,e?i.dimmed:null],testID:"texting-ask-send",children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:i.primaryLabel,children:e?Et.sendingCode:Et.sendCode})})]})]})}if(C){let e=l==="confirming",n=l==="requesting",a=e||n,d=()=>{let e=validateTextingCode(f);y(e),e===null&&o.confirm(f)};/* @__PURE__ */
@@ -90,7 +90,7 @@ return r.jsxs(t.View,{style:i.root,testID:"texting-ask-code",children:[
90
90
  /* @__PURE__ */r.jsxs(Text,{style:i.body,children:[Et.codeSentTo," ",formatTextingPhone(s.phoneE164)]}),
91
91
  /* @__PURE__ */r.jsxs(t.View,{style:i.links,children:[
92
92
  /* @__PURE__ */r.jsx(t.Pressable,{onPress:()=>{h(""),o.resend()},disabled:a,accessibilityRole:"button",accessibilityState:{disabled:a,busy:n},style:[i.link,a?i.dimmed:null],children:/* @__PURE__ */r.jsx(Text,{style:i.linkLabel,children:Et.requestNewCode})}),
93
- /* @__PURE__ */r.jsx(t.Pressable,{onPress:()=>{h(""),o.changeNumber()},disabled:a,accessibilityRole:"button",accessibilityState:{disabled:a},style:[i.link,a?i.dimmed:null],children:/* @__PURE__ */r.jsx(Text,{style:i.linkLabel,children:Et.changeNumber})})]})]}),T]}),R,I,
93
+ /* @__PURE__ */r.jsx(t.Pressable,{onPress:()=>{h(""),o.changeNumber()},disabled:a,accessibilityRole:"button",accessibilityState:{disabled:a},style:[i.link,a?i.dimmed:null],children:/* @__PURE__ */r.jsx(Text,{style:i.linkLabel,children:Et.changeNumber})})]})]}),T]}),I,F,
94
94
  /* @__PURE__ */r.jsxs(t.View,{style:_,children:[
95
95
  /* @__PURE__ */r.jsx(Or,{value:f,onChangeText:e=>h(e.replace(/\D/g,"")),editable:!a,keyboardType:"number-pad",textContentType:"oneTimeCode",autoComplete:"sms-otp",maxLength:6,accessibilityLabel:Et.codeLabel,placeholder:Et.codeLabel,placeholderTextColor:i.placeholder.color,ref:S,onSubmitEditing:d,...v,style:[i.field,i.digits],testID:"texting-ask-code-input"},"code"),
96
96
  /* @__PURE__ */r.jsx(t.Pressable,{onPress:d,disabled:a,accessibilityRole:"button",accessibilityLabel:e?Et.confirmingCode:Et.confirmCode,accessibilityState:{disabled:a,busy:e},style:[i.primary,a?i.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */r.jsx(Text,{tier:"control",style:i.primaryLabel,children:e?Et.confirmingCode:Et.confirmCode})})]})]})}return null}function In(e,r="auto"){let{color:o,radius:l,space:a,type:s,slots:d}=e,u=(t,r,n)=>({...face(e,n),fontSize:t,lineHeight:Math.round(t*s.lineHeight.snug),color:r}),c={textAlign:r};return t.StyleSheet.create({root:{gap:a.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:a.sm},headBody:{flex:1,minWidth:0,gap:a.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:a.sm,minHeight:44},box:{width:24,height:24,borderRadius:l.xs,borderWidth:2,borderColor:o.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:o.surface},boxChecked:{backgroundColor:o.brand,borderColor:o.brandInk},tick:u(s.size.caption,o.text.onBrand,"bold"),consentText:{...r==="center"?{flexShrink:1}:{flex:1},...u(s.size.caption,o.text.secondary,"regular"),...c},body:{...u(s.size.body,o.text.primary,"regular"),...c},footnote:{...u(s.size.caption,o.text.muted,"regular"),...c},placeholder:{color:o.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:a.xs,minHeight:50,paddingVertical:a.xs,paddingLeft:a.md,paddingRight:a.xs,borderRadius:l.pill,borderWidth:1.5,borderColor:o.controlEdge,backgroundColor:o.surface,...n(d.input,1)},pillFocused:{borderWidth:1.5,borderColor:d.input?.borderColor??o.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...u(s.size.body,o.text.primary,"regular"),...i(d.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:a.lg,borderRadius:l.pill,alignItems:"center",justifyContent:"center",backgroundColor:o.brand,...n(d.primaryButton)},primaryLabel:{...u(s.size.caption,o.text.onBrand,"bold"),...i(d.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:o.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:a.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...u(s.size.caption,o.linkInk,"bold"),...i(d.link)},notice:{gap:a.xs},noticeText:{...u(s.size.caption,o.errorRed,"regular"),...c}})}var Rn=["portrait","landscape"],On=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:n,requested:i=false}){let o=Xr(),l=useTextingAsk({surface:"prompt",ready:!o,entry:i});jn(l,i,wn(),n);let a=useEverfurTheme(),s=e.useMemo(()=>An(a),[a]),d=e.useMemo(()=>In(a,"center"),[a]),u=e.useRef(false),[c,f]=e.useState(false);On.has(l.stage)&&(u.current=true);let h=u.current&&(On.has(l.stage)||l.stage==="verified")&&!c&&!o,b=()=>{c||(l.stage==="verified"?(f(true),p(n,"verified")):l.dismiss())};if(e.useEffect(()=>{u.current&&l.stage==="dismissed"&&!c&&(f(true),p(n,"dismissed"))},[l.stage,n,c]),!h)return null;let y=l.stage==="verified"?Et.verifiedTitle:Tt.promptTitle(l.brand);/* @__PURE__ */
@@ -4,8 +4,8 @@ import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { a as CapabilityDecision } from '../resolve.d-BTC3b6FW.cjs';
5
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.cjs';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.cjs';
7
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-ByDJMrMv.cjs';
8
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-ByDJMrMv.cjs';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-ChJyJMBA.cjs';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-ChJyJMBA.cjs';
9
9
  export { a as AnonIdentityProvider, A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-DDpXOtas.cjs';
10
10
  export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, h as FreeCapRefusal, H as HeartbeatFrame, i as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, j as UrgencyLevel } from '../config.d-ClAI2RZ6.cjs';
11
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.cjs';
@@ -4,8 +4,8 @@ import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { a as CapabilityDecision } from '../resolve.d-BTC3b6FW.js';
5
5
  import { E as EverfurError } from '../EverfurError.d-8NHtlgzA.js';
6
6
  export { a as EverfurErrorCategory, b as EverfurErrorCode } from '../EverfurError.d-8NHtlgzA.js';
7
- import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-DVshLxbD.js';
8
- export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-DVshLxbD.js';
7
+ import { E as EverfurTextingViewStatus, T as TextingCopy, a as TextingBrandCopy, b as TextingAsk } from '../optInView.d-Cps7aLQN.js';
8
+ export { C as COPY_PLACEHOLDER_PREFIX, c as EVERFUR_TEXTING_STATUSES, d as EverfurTextingChallenge, e as EverfurTextingIdentity, f as EverfurTextingInputProblem, g as EverfurTextingProfile, h as EverfurTextingReason, i as EverfurTextingState, j as EverfurTextingStatus, k as EverfurTextingVerificationInput, l as TEXTING_ASK_MAX_ASKS, m as TEXTING_ASK_SCHEDULE_KEY, n as TEXTING_ASK_SNOOZE_MS, o as TEXTING_BRAND_COPY, p as TEXTING_CODE_PATTERN, q as TEXTING_COPY, r as TEXTING_COPY_PLACEHOLDERS, s as TEXTING_UI_CODE_LENGTH, t as TextingAction, u as TextingAskDue, v as TextingAskDueInput, w as TextingAskEntry, x as TextingAskIdentity, y as TextingAskOptions, z as TextingAskScheduleRead, A as TextingAskStage, B as TextingAskThreadMessage, D as TextingAskThreadState, F as TextingCodeRefusal, G as TextingController, H as TextingPhase, I as TextingRepository, J as TextingRepositoryDeps, K as TextingRuntime, L as TextingSnapshot, M as createTextingRepository, N as createTextingRepositoryOver, O as formatTextingPhone, P as isE164, Q as isTextingAskEligible, R as parseTextingProfile, S as resolveTextingAskDue, U as textingAskThreadReady, V as textingErrorText, W as textingIdentityFromWire, X as textingInputProblemText, Y as textingOptedOutBody, Z as textingReasonOf, _ as textingSupportText, $ as toTextingE164, a0 as useEverfurTexting, a1 as useEverfurTextingProfile, a2 as useEverfurTextingRepository, a3 as useTextingAsk, a4 as validateTextingCode, a5 as validateTextingEnroll } from '../optInView.d-Cps7aLQN.js';
9
9
  export { a as AnonIdentityProvider, A as AuthContext, I as IdentityProvider, M as MintedToken, T as TokenProvider } from '../identity.d-D4VtpqRr.js';
10
10
  export { A as AcceptedFrame, a as AnalysisCompleteFrame, b as AnalysisStartedFrame, D as DeltaFrame, c as DoneFrame, E as ErrorFrame, d as EverfurRequest, e as EverfurRequestBase, F as Frame, f as FrameBase, g as FrameKind, h as FreeCapRefusal, H as HeartbeatFrame, i as HttpMethod, M as MultipartBody, T as TransportPort, U as UnknownFrame, j as UrgencyLevel } from '../config.d-B7Z-KTGq.js';
11
11
  export { B as Brand, C as ConversationId, P as PetRef, R as RecordsRequestId, U as UserRef, _ as __brand } from '../ids.d-B2GAAifq.js';
@@ -17,9 +17,9 @@ return w(c,{style:[i.offstate,t],accessible:true,accessibilityState:{busy:true},
17
17
  return w(c,{style:[i.offstate,t],accessible:true,accessibilityRole:"text",accessibilityLabel:o,children:o.length>0?/* @__PURE__ */w(Text,{style:i.offstateText,children:o}):null})}function an(e){let{color:t,space:r,radius:n,type:i}=e;return h.create({offstate:{minHeight:on,justifyContent:"center",paddingHorizontal:r.lg,paddingVertical:r.md,backgroundColor:t.surfaceCream,borderRadius:n.md,borderWidth:h.hairlineWidth,borderColor:t.brandBorder},offstateText:{...face(e,"regular"),fontSize:i.size.body,lineHeight:Math.round(i.size.body*i.lineHeight.normal),color:t.text.muted},skeletonBar:{height:r.md,borderRadius:n.xs,backgroundColor:t.brandSofter}})}function sn(e){if(!(m.OS!=="ios"||e===""))try{let t=_?.announceForAccessibility;typeof t=="function"&&t.call(_,e)}catch{}}function AnnounceLine({line:e}){return i(()=>{sn(e)},[e]),null}function EverfurTextingOptIn(e){let t=L(e,["onStatusChange"]),n=r(()=>({copy:Qt(e.copy),brandCopy:Jt(e.brandCopy)}),[e.copy,e.brandCopy]),{copy:i,brandCopy:o}=n,l=useEverfurTheme(),a=r(()=>dn(l),[l]),s=useEverfurTexting();return s.status==="signedOut"?/* @__PURE__ */C(c,{style:[a.card,t.style],children:[
18
18
  /* @__PURE__ */w(Text,{style:a.title,accessibilityRole:"header",children:o.introTitle(l.meta.displayName)}),
19
19
  /* @__PURE__ */w(Text,{style:a.body,children:i.signedOut})]}):/* @__PURE__ */w(CapabilityGate,{capability:"texting",...t.renderDisabled?{renderDisabled:t.renderDisabled}:{},style:t.style,children:/* @__PURE__ */w(Xt.Provider,{value:n,children:/* @__PURE__ */w(OptInBody,{...t,texting:s,styles:a})})})}function Button({label:e,onPress:t,disabled:r=false,busy:n=false,styles:i,kind:o="primary",testID:l}){let a=o==="primary"?i.primary:o==="secondary"?i.secondary:i.link,s=o==="primary"?i.primaryLabel:o==="secondary"?i.secondaryLabel:i.linkLabel;/* @__PURE__ */
20
- return w(f,{onPress:t,disabled:r||n,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{disabled:r||n,busy:n},style:[a,r||n?i.dimmed:null],...l===void 0?{}:{testID:l},children:/* @__PURE__ */w(Text,{tier:"control",style:s,children:e})})}function OptInBody({texting:e,styles:t,onStatusChange:r,renderNotice:n,style:o}){let{copy:l,brandCopy:s}=Zt(),d=useEverfurTheme(),{status:u,profile:h,snapshot:b}=e,y=h?.brandName??d.meta.displayName,[g,m]=a(""),[v,_]=a(false),[k,x]=a(""),[T,E]=a(null),[F,I]=a(false),[R,O]=a(null),[A,D]=a(false);i(()=>{r?.(u)},[r,u]),i(()=>{E(null),I(false)},[u]);let P=(e,r=false)=>/* @__PURE__ */w(c,{style:[t.card,o],accessibilityState:{busy:r},children:e}),z=(e,r)=>{let i=textingErrorText(e,b.failedAction,b.codeRefusal,l),o=textingSupportText(e,l);/* @__PURE__ */
20
+ return w(f,{onPress:t,disabled:r||n,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{disabled:r||n,busy:n},style:[a,r||n?i.dimmed:null],...l===void 0?{}:{testID:l},children:/* @__PURE__ */w(Text,{tier:"control",style:s,children:e})})}function OptInBody({texting:e,styles:t,onStatusChange:r,renderNotice:n,style:o}){let{copy:l,brandCopy:s}=Zt(),d=useEverfurTheme(),{status:u,profile:h,snapshot:b}=e,y=h?.brandName??d.meta.displayName,[g,m]=a(""),[v,_]=a(false),[k,x]=a(""),[T,E]=a(null),[F,I]=a(false),[R,O]=a(null),[A,D]=a(false);i(()=>{r?.(u)},[r,u]),i(()=>{E(null),I(false)},[u]);let P=(e,r=false)=>/* @__PURE__ */w(c,{style:[t.card,o],accessibilityState:{busy:r},children:e}),z=(e,r)=>{let i=textingErrorText(e,b.failedAction,b.codeRefusal,l);/* @__PURE__ */
21
21
  return C(c,{style:t.notice,accessibilityLiveRegion:"polite",children:[
22
- /* @__PURE__ */w(HostRender,{resetKey:e,render:()=>n?n(e):/* @__PURE__ */w(Text,{style:t.noticeText,children:i}),fallback:/* @__PURE__ */w(Text,{style:t.noticeText,children:i})}),o===null?null:/* @__PURE__ */w(Text,{style:t.footnote,children:o}),r===void 0?null:/* @__PURE__ */w(Button,{label:l.retry,onPress:r,styles:t,kind:"link"}),n?null:/* @__PURE__ */w(AnnounceLine,{line:o===null?i:`${i} ${o}`})]})},L=T===null?null:/* @__PURE__ */C(S,{children:[
22
+ /* @__PURE__ */w(HostRender,{resetKey:e,render:()=>n?n(e):/* @__PURE__ */w(Text,{style:t.noticeText,children:i}),fallback:/* @__PURE__ */w(Text,{style:t.noticeText,children:i})}),r===void 0?null:/* @__PURE__ */w(Button,{label:l.retry,onPress:r,styles:t,kind:"link"}),n?null:/* @__PURE__ */w(AnnounceLine,{line:i})]})},L=T===null?null:/* @__PURE__ */C(S,{children:[
23
23
  /* @__PURE__ */w(Text,{style:t.noticeText,accessibilityLiveRegion:"polite",children:textingInputProblemText(T,l)}),
24
24
  /* @__PURE__ */w(AnnounceLine,{line:textingInputProblemText(T,l)})]});if(u==="unavailable")return P(
25
25
  /* @__PURE__ */C(S,{children:[
@@ -68,19 +68,19 @@ return w(f,{onPress:()=>o(t.petRef),disabled:n,accessibilityRole:"radio",accessi
68
68
  /* @__PURE__ */w(Button,{label:n?a.savingPet:a.savePet,kind:"secondary",busy:n,disabled:!u,styles:e,onPress:()=>{d!==null&&l(d)},testID:"texting-pet-save"}),i&&!u?/* @__PURE__ */w(Text,{style:e.footnote,children:a.petSaved}):null]})]})}function dn(e){let{color:t,radius:r,space:n,type:i,slots:o}=e,l=(t,r,n)=>({...face(e,n),fontSize:t,lineHeight:Math.round(t*i.lineHeight.snug),color:r}),a=o.card?.textColor;return h.create({card:{gap:n.md,padding:n.lg,borderRadius:r.lg,borderWidth:1,borderColor:t.brandBorder,backgroundColor:t.surface,...k(o.card,1)},title:l(i.size.subtitle,a??t.text.primary,"bold"),subtitle:l(i.size.body,a??t.text.primary,"bold"),body:l(i.size.body,a??t.text.secondary,"regular"),footnote:l(i.size.caption,t.text.muted,"regular"),phone:l(i.size.body,a??t.text.primary,"bold"),label:l(i.size.caption,a??t.text.primary,"bold"),input:{minHeight:44,paddingHorizontal:n.md,borderRadius:r.md,borderWidth:1,borderColor:t.controlEdge,backgroundColor:t.surface,...l(i.size.body,t.text.primary,"regular"),...k(o.input,1),...x(o.input)},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:n.sm,minHeight:44},box:{width:24,height:24,borderRadius:r.xs,borderWidth:2,borderColor:t.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:t.surface},boxChecked:{backgroundColor:t.brand,borderColor:t.brandInk},tick:{...l(i.size.caption,t.text.onBrand,"bold")},consentText:{flex:1,...l(i.size.caption,a??t.text.secondary,"regular")},primary:{minHeight:44,paddingHorizontal:n.lg,borderRadius:r.pill,alignItems:"center",justifyContent:"center",backgroundColor:t.brand,...k(o.primaryButton)},primaryLabel:{...l(i.size.body,t.text.onBrand,"bold"),...x(o.primaryButton)},secondary:{minHeight:44,paddingHorizontal:n.lg,borderRadius:r.pill,borderWidth:1,borderColor:t.brandBorder,alignItems:"center",justifyContent:"center",backgroundColor:t.surface},secondaryLabel:l(i.size.caption,t.brandInk,"bold"),link:{minHeight:44,justifyContent:"center",alignSelf:"flex-start"},linkLabel:{...l(i.size.caption,t.linkInk,"bold"),...x(o.link)},dimmed:{opacity:.5},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:n.md},notice:{gap:n.xs},noticeText:l(i.size.caption,t.errorRed,"regular"),confirm:{gap:n.sm,padding:n.md,borderRadius:r.md,backgroundColor:t.surfaceSubtle},petRow:{gap:n.xs},chips:{flexDirection:"row",flexWrap:"wrap",gap:n.sm},chip:{minHeight:44,paddingHorizontal:n.md,borderRadius:r.pill,borderWidth:1,borderColor:t.brandBorder,backgroundColor:t.surface,justifyContent:"center",...k(o.chip,1)},chipPicked:{backgroundColor:t.brandSoft,borderColor:t.brandInk},chipLabel:{...l(i.size.caption,t.text.primary,"regular"),...x(o.chip)},chipLabelPicked:{...face(e,"bold"),color:t.brandInk}})}var un=/* @__PURE__ */Symbol.for("@everfur/sdk#IntroOpen@v1"),cn=globalThis;function pn(e){if(typeof e!="object"||e===null)return false;let t=e;return t.holds instanceof Set&&t.listeners instanceof Set}var fn=cn[un],hn=()=>({holds:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set}),bn=pn(fn)?fn:cn[un]=hn();function yn(){return bn.holds.size>0}function gn(e){return bn.listeners.add(e),()=>{bn.listeners.delete(e)}}function mn(){return o(gn,yn,yn)}function resolveTextingAskDue(e){let t=e.enabled&&e.capabilityGranted&&e.hasProfile&&e.signedIn&&e.scheduleEligible&&!e.offeredThisSession,r=t&&e.identity==="none"&&e.surfaceReady;return{readEnabled:t,due:r}}var vn=/* @__PURE__ */new Set(["emergency","schedule_soon"]);function textingAskThreadReady(e){if(e.isBootstrapping===true||e.isLoadingHistory===true||e.isStreaming===true||e.status==="error"||e.stopped===true)return false;let t=e.messages[e.messages.length-1];return t===void 0||t.role!=="assistant"||t.pending===true||t.checkin!==void 0||t.text.trim().length===0?false:!(typeof t.urgencyLevel=="string"&&vn.has(t.urgencyLevel))}var _n=/* @__PURE__ */new WeakSet;function Cn(e){return _n.has(e)}var wn="everfur.texting.askSchedule.v1",Sn=2880*60*1e3,kn=3,xn=/* @__PURE__ */Object.freeze({askCount:0,nextAskAt:null,completed:false});function isTextingAskEligible(e,t){if(e.status!=="ok")return false;let{entry:r}=e;return r.completed||r.askCount>=kn?false:r.nextAskAt===null||t>=r.nextAskAt}function Tn(e,t){return{askCount:Math.min(e.askCount+1,kn),nextAskAt:t+Sn,completed:e.completed}}function En(e,t){return{...e,nextAskAt:t+Sn}}function Fn(e){return{...e,completed:true}}function In(e){return e.askCount<=0?1:e.askCount===1?2:3}function Rn(e){if(e===null||typeof e!="object"||Array.isArray(e))return null;let t=e,{askCount:r,nextAskAt:n,completed:i}=t;return typeof r!="number"||!Number.isInteger(r)||r<0||n!==null&&(typeof n!="number"||!Number.isFinite(n))||typeof i!="boolean"?null:{askCount:Math.min(r,kn),nextAskAt:n,completed:i}}function On(e){let t;try{t=JSON.parse(e)}catch{return null}if(t===null||typeof t!="object"||Array.isArray(t))return null;let r={};for(let[e,n]of Object.entries(t)){let t=Rn(n);if(t===null)return null;r[e]=t}return r}var An=/* @__PURE__ */Symbol.for("@everfur/sdk/texting/ask-schedule@v1");function Dn(){let e=globalThis,t=e[An];return t===void 0&&(t={sessions:/* @__PURE__ */new Map,sessionListeners:/* @__PURE__ */new Set,listeners:/* @__PURE__ */new Set,writeChain:Promise.resolve()},e[An]=t),t.sessionListeners===void 0&&(t.sessionListeners=/* @__PURE__ */new Set),t}async function Pn(e){if(Cn(e))return{status:"unreadable"};let t;try{t=await e.getItem(wn)}catch{return{status:"unreadable"}}if(t===null)try{return await e.setItem(wn,"{}"),await e.getItem(wn)===null?{status:"unreadable"}:{status:"ok",map:{}}}catch{return{status:"unreadable"}}let r=On(t);if(r!==null)return{status:"ok",map:r};try{await e.removeItem(wn)}catch{}return{status:"unreadable"}}function zn(e){let{listeners:t}=Dn();return t.add(e),()=>{t.delete(e)}}function Ln(e,userRef,t){let r=Dn(),n=async()=>{let n=await Pn(e);if(n.status!=="ok")return;let i=n.map[userRef]??xn;try{await e.setItem(wn,JSON.stringify({...n.map,[userRef]:t(i)}))}catch{return}for(let e of[...r.listeners])e()},i=r.writeChain.then(n,n);return r.writeChain=i.catch(()=>{}),i}async function jn(e,userRef){let t=await Pn(e);return t.status!=="ok"?{status:"unreadable"}:{status:"ok",entry:t.map[userRef]??xn}}function Nn(e,userRef,t=Date.now()){return Ln(e,userRef,e=>Tn(e,t))}function Bn(e,userRef,t=Date.now()){return Ln(e,userRef,e=>En(e,t))}function Mn(e,userRef){return Ln(e,userRef,Fn)}function qn(userRef){return Dn().sessions.get(userRef)??null}function Hn(userRef,e){let t=Dn();t.sessions.set(userRef,e);for(let e of[...t.sessionListeners])e()}function Un(e){let{sessionListeners:t}=Dn();return t.add(e),()=>{t.delete(e)}}var NO_SNAPSHOT=()=>null;function $n(){let{runtime:e}=Vt(),t=e.entitlements??null,n=l(e=>t===null?()=>{}:t.subscribe(e),[t]),i=t===null?NO_SNAPSHOT:t.getSnapshot,a=o(n,i,i);return r(()=>a!==null&&decideCapability("texting",a.decisions,{isPending:a.isPending}).enabled,[a])}var Vn=/* @__PURE__ */Object.freeze({status:"idle"});function Wn(userRef){let{runtime:e}=Vt(),t=e.registry.services.kv,[r,n]=a({user:null,value:Vn});return i(()=>{if(userRef===null)return;let e=true,r=()=>{jn(t,userRef).then(t=>{e&&n({user:userRef,value:{status:"ready",read:t}})})};r();let i=zn(r);return()=>{e=false,i()}},[t,userRef]),r.user===userRef?r.value:Vn}function Yn(e){switch(e.status){case"enroll":case"requesting":case"code":case"confirming":return"none";case"verified":case"optingOut":case"optedOut":return"exists";default:return"unknown"}}function useTextingAsk(e={}){let t=e.enabled!==false,n=e.ready!==false,s=e.surface??"prompt",d=e.entry===true,{runtime:u,userRef:userRef}=Vt(),c=u.registry.services.kv,p=$n(),f=Wn(t&&userRef!==null?userRef:null),h=l(()=>userRef===null?null:qn(userRef),[userRef]),b=o(Un,h,h),y=l(e=>{userRef!==null&&Hn(userRef,e)},[userRef]),g=b!==null&&b.surface===s,m=b!==null&&b.fromPrompt===true,v=g?b.stage==="handoff"?"hidden":b.stage:s==="prompt"&&m?"dismissed":"hidden",_=Date.now(),C=f.status==="ready"&&isTextingAskEligible(f.read,_),[w,S]=a(null),k=d&&userRef!==null&&p,x=Tr(userRef!==null&&w===userRef||v!=="hidden"||g||k),T=Yn(x),{readEnabled:E,due:F}=resolveTextingAskDue({enabled:t,capabilityGranted:p,hasProfile:x.profile!==null,signedIn:userRef!==null,scheduleEligible:C,offeredThisSession:b!==null,identity:T,surfaceReady:n});i(()=>{E&&userRef!==null&&S(userRef)},[E,userRef]);let I=b?.askNumber??(f.status==="ready"&&f.read.status==="ok"?In(f.read.entry):1);i(()=>{!F||userRef===null||qn(userRef)!==null||y({surface:s,stage:"offered",answered:false,askNumber:I})},[F,userRef,y,I,s]),i(()=>{!g||b.stage!=="handoff"||t&&n&&p&&x.profile!==null&&T==="none"&&y({...b,stage:"offered"})},[g,b,t,n,p,x.profile,T,y]);let R=f.status==="ready"&&f.read.status==="ok"&&f.read.entry.completed;i(()=>{userRef===null||T!=="exists"||R||f.status!=="ready"||Mn(c,userRef)},[T,R,f.status,c,userRef]),i(()=>{g&&b.stage==="enrolling"&&x.status==="verified"&&y({...b,stage:"verified"})},[g,b,x.status,y]);let O=l(e=>userRef===null||e.answered?e:(Nn(c,userRef),{...e,answered:true}),[c,userRef]),A=l(()=>{g&&b.stage==="offered"&&y({...b,stage:"enrolling"})},[g,b,y]),D=l(()=>{if(!g||b.stage!=="enrolling")return;let{back:e,...t}=b;y({...t,stage:e??"offered"})},[g,b,y]),P=l(()=>{if(!(!g||b.stage!=="offered"&&b.stage!=="enrolling")){if(s==="prompt"){y({...O(b),surface:"chat",stage:"handoff",fromPrompt:true});return}b.fromPrompt===true&&b.answered&&userRef!==null&&Bn(c,userRef),y({...O(b),stage:"dismissed"})}},[g,b,s,y,O,c,userRef]),{start:z}=x,L=l(async e=>!g||b.stage!=="enrolling"?false:(b.answered||y(O(b)),z(e)),[g,b,y,O,z]),j=k&&x.profile!==null&&T==="none"&&v!=="enrolling"&&v!=="verified",N=l(()=>{if(!j||userRef===null)return;let e=g?b:null;y({surface:s,stage:"enrolling",answered:e?.answered??false,askNumber:b?.askNumber??I,...e?.fromPrompt===true?{fromPrompt:true}:{},back:e?.stage==="offered"?"offered":"dismissed"})},[j,userRef,g,b,y,s,I]),B=x.profile?.brandName??"";return r(()=>({stage:userRef===null?"hidden":v,brand:B,askNumber:I,texting:x,accept:A,dismiss:P,close:D,start:L,canOpen:j,open:N}),[userRef,v,B,I,x,A,P,D,L,j,N])}var Kn=/* @__PURE__ */new Set(["signedOut","unavailable","failed","verified","optingOut","optedOut"]);function Gn(e,t,r,o){let{userRef:userRef}=Vt(),l=n(null),{canOpen:a,open:s,stage:d,texting:u}=e;i(()=>{if(!t){l.current=null;return}if(!(userRef===null||l.current===userRef)){if(a){l.current=userRef,s();return}if(d==="enrolling"||d==="verified"){l.current=userRef;return}(!r||Kn.has(u.status))&&(l.current=userRef,D(o,"skipped"))}},[t,userRef,a,s,d,u.status,r,o])}var Qn=/* @__PURE__ */Object.freeze({position:"absolute",top:0,right:0,bottom:0,left:0});function ChatTextingAskController({enabled:e,ready:t,onAsk:r,entry:n=false}){let o=useTextingAsk({enabled:e,ready:t,surface:"chat",entry:n});return i(()=>{D(r,o)},[o,r]),null}function textingAskLines(e){return{line:Kt.chatAskLine(e.brand),accept:Yt.promptAccept,dismiss:Yt.promptDismiss,verified:Kt.chatAskVerified(e.brand)}}function ChatTextingAskComposer({ask:e}){let t=useEverfurTheme(),n=r(()=>Jn(t),[t]);/* @__PURE__ */
69
69
  return w(AskEntry,{ask:e,styles:n})}function AskEntry({ask:e,styles:t}){let{texting:r}=e,{status:o,profile:l,snapshot:s}=r,[d,u]=a(""),[p,h]=a(false),[b,y]=a(""),[g,m]=a(null),[v,_]=a(false),k={onFocus:()=>_(true),onBlur:()=>_(false)},x=v?[t.pill,t.pillFocused]:t.pill,T=o==="enroll"||o==="requesting"&&!s.resending,E=o==="code"||o==="confirming"||o==="requesting",F=n(null),I=n(null),R=o==="enroll",O=o==="code";i(()=>{m(null)},[o]),i(()=>{R?F.current?.focus():O&&I.current?.focus()},[R,O]);let A=/* @__PURE__ */C(f,{onPress:e.close,accessibilityRole:"button",accessibilityLabel:Yt.close,hitSlop:8,style:t.close,testID:"texting-ask-close",children:[
70
70
  /* @__PURE__ */w(c,{style:[t.closeBar,t.closeBarA]}),
71
- /* @__PURE__ */w(c,{style:[t.closeBar,t.closeBarB]})]}),D=s.error===null?null:textingErrorText(s.error,s.failedAction,s.codeRefusal),P=s.error===null?null:textingSupportText(s.error),z=D===null?null:/* @__PURE__ */C(c,{style:t.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
72
- /* @__PURE__ */w(Text,{style:t.noticeText,children:D}),P===null?null:/* @__PURE__ */w(Text,{style:t.footnote,children:P}),
73
- /* @__PURE__ */w(AnnounceLine,{line:P===null?D:`${D} ${P}`})]}),L=g===null?null:/* @__PURE__ */C(S,{children:[
71
+ /* @__PURE__ */w(c,{style:[t.closeBar,t.closeBarB]})]}),D=s.error===null?null:textingErrorText(s.error,s.failedAction,s.codeRefusal),P=D===null?null:/* @__PURE__ */C(c,{style:t.notice,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:[
72
+ /* @__PURE__ */w(Text,{style:t.noticeText,children:D}),
73
+ /* @__PURE__ */w(AnnounceLine,{line:D})]}),z=g===null?null:/* @__PURE__ */C(S,{children:[
74
74
  /* @__PURE__ */w(Text,{style:t.noticeText,accessibilityRole:"alert",accessibilityLiveRegion:"polite",children:textingInputProblemText(g)}),
75
75
  /* @__PURE__ */w(AnnounceLine,{line:textingInputProblemText(g)})]});if(l===null)return null;if(o==="loading"||o==="failed"||o==="signedOut"||o==="unavailable")/* @__PURE__ */
76
76
  return w(c,{style:t.root,testID:"texting-ask-entry",accessibilityState:{busy:o==="loading"},children:/* @__PURE__ */C(c,{style:t.head,children:[
77
- /* @__PURE__ */w(c,{style:t.headBody,children:o==="failed"?z:null}),A]})});if(T){let r=o==="requesting",n=()=>{let t=validateTextingEnroll(d,p);m(t),t===null&&e.start(d)};/* @__PURE__ */
77
+ /* @__PURE__ */w(c,{style:t.headBody,children:o==="failed"?P:null}),A]})});if(T){let r=o==="requesting",n=()=>{let t=validateTextingEnroll(d,p);m(t),t===null&&e.start(d)};/* @__PURE__ */
78
78
  return C(c,{style:t.root,testID:"texting-ask-phone",children:[
79
79
  /* @__PURE__ */C(c,{style:t.head,children:[
80
80
  /* @__PURE__ */C(c,{style:t.headBody,children:[
81
81
  /* @__PURE__ */C(f,{onPress:()=>h(!p),disabled:r,accessibilityRole:"checkbox",accessibilityState:{checked:p,disabled:r},accessibilityLabel:l.consentText,style:t.consentRow,testID:"texting-ask-consent",children:[
82
82
  /* @__PURE__ */w(c,{style:[t.box,p?t.boxChecked:null],accessibilityElementsHidden:true,importantForAccessibility:"no",children:p?/* @__PURE__ */w(Text,{style:t.tick,children:"✓"}):null}),
83
- /* @__PURE__ */w(Text,{style:t.consentText,children:l.consentText})]}),l.helpContact===null?null:/* @__PURE__ */C(Text,{style:t.footnote,children:[Yt.helpContactLabel," ",l.helpContact]})]}),A]}),L,z,
83
+ /* @__PURE__ */w(Text,{style:t.consentText,children:l.consentText})]}),l.helpContact===null?null:/* @__PURE__ */C(Text,{style:t.footnote,children:[Yt.helpContactLabel," ",l.helpContact]})]}),A]}),z,P,
84
84
  /* @__PURE__ */C(c,{style:x,children:[
85
85
  /* @__PURE__ */w(Zr,{value:d,onChangeText:u,editable:!r,keyboardType:"phone-pad",textContentType:"telephoneNumber",autoComplete:"tel",accessibilityLabel:Yt.phoneLabel,placeholder:Yt.phoneLabel,placeholderTextColor:t.placeholder.color,ref:F,onSubmitEditing:n,...k,style:t.field,testID:"texting-ask-phone-input"},"phone"),
86
86
  /* @__PURE__ */w(f,{onPress:n,disabled:r,accessibilityRole:"button",accessibilityLabel:r?Yt.sendingCode:Yt.sendCode,accessibilityState:{disabled:r,busy:r},style:[t.primary,r?t.dimmed:null],testID:"texting-ask-send",children:/* @__PURE__ */w(Text,{tier:"control",style:t.primaryLabel,children:r?Yt.sendingCode:Yt.sendCode})})]})]})}if(E){let e=o==="confirming",n=o==="requesting",i=e||n,l=()=>{let e=validateTextingCode(b);m(e),e===null&&r.confirm(b)};/* @__PURE__ */
@@ -90,7 +90,7 @@ return C(c,{style:t.root,testID:"texting-ask-code",children:[
90
90
  /* @__PURE__ */C(Text,{style:t.body,children:[Yt.codeSentTo," ",formatTextingPhone(s.phoneE164)]}),
91
91
  /* @__PURE__ */C(c,{style:t.links,children:[
92
92
  /* @__PURE__ */w(f,{onPress:()=>{y(""),r.resend()},disabled:i,accessibilityRole:"button",accessibilityState:{disabled:i,busy:n},style:[t.link,i?t.dimmed:null],children:/* @__PURE__ */w(Text,{style:t.linkLabel,children:Yt.requestNewCode})}),
93
- /* @__PURE__ */w(f,{onPress:()=>{y(""),r.changeNumber()},disabled:i,accessibilityRole:"button",accessibilityState:{disabled:i},style:[t.link,i?t.dimmed:null],children:/* @__PURE__ */w(Text,{style:t.linkLabel,children:Yt.changeNumber})})]})]}),A]}),L,z,
93
+ /* @__PURE__ */w(f,{onPress:()=>{y(""),r.changeNumber()},disabled:i,accessibilityRole:"button",accessibilityState:{disabled:i},style:[t.link,i?t.dimmed:null],children:/* @__PURE__ */w(Text,{style:t.linkLabel,children:Yt.changeNumber})})]})]}),A]}),z,P,
94
94
  /* @__PURE__ */C(c,{style:x,children:[
95
95
  /* @__PURE__ */w(Zr,{value:b,onChangeText:e=>y(e.replace(/\D/g,"")),editable:!i,keyboardType:"number-pad",textContentType:"oneTimeCode",autoComplete:"sms-otp",maxLength:6,accessibilityLabel:Yt.codeLabel,placeholder:Yt.codeLabel,placeholderTextColor:t.placeholder.color,ref:I,onSubmitEditing:l,...k,style:[t.field,t.digits],testID:"texting-ask-code-input"},"code"),
96
96
  /* @__PURE__ */w(f,{onPress:l,disabled:i,accessibilityRole:"button",accessibilityLabel:e?Yt.confirmingCode:Yt.confirmCode,accessibilityState:{disabled:i,busy:e},style:[t.primary,i?t.dimmed:null],testID:"texting-ask-confirm",children:/* @__PURE__ */w(Text,{tier:"control",style:t.primaryLabel,children:e?Yt.confirmingCode:Yt.confirmCode})})]})]})}return null}function Jn(e,t="auto"){let{color:r,radius:n,space:i,type:o,slots:l}=e,a=(t,r,n)=>({...face(e,n),fontSize:t,lineHeight:Math.round(t*o.lineHeight.snug),color:r}),s={textAlign:t};return h.create({root:{gap:i.sm,width:"100%"},head:{flexDirection:"row",alignItems:"flex-start",gap:i.sm},headBody:{flex:1,minWidth:0,gap:i.xs},consentRow:{flexDirection:"row",alignItems:"flex-start",gap:i.sm,minHeight:44},box:{width:24,height:24,borderRadius:n.xs,borderWidth:2,borderColor:r.controlEdge,alignItems:"center",justifyContent:"center",backgroundColor:r.surface},boxChecked:{backgroundColor:r.brand,borderColor:r.brandInk},tick:a(o.size.caption,r.text.onBrand,"bold"),consentText:{...t==="center"?{flexShrink:1}:{flex:1},...a(o.size.caption,r.text.secondary,"regular"),...s},body:{...a(o.size.body,r.text.primary,"regular"),...s},footnote:{...a(o.size.caption,r.text.muted,"regular"),...s},placeholder:{color:r.text.placeholder},pill:{flexDirection:"row",alignItems:"center",gap:i.xs,minHeight:50,paddingVertical:i.xs,paddingLeft:i.md,paddingRight:i.xs,borderRadius:n.pill,borderWidth:1.5,borderColor:r.controlEdge,backgroundColor:r.surface,...k(l.input,1)},pillFocused:{borderWidth:1.5,borderColor:l.input?.borderColor??r.brandInk},field:{flex:1,minWidth:0,minHeight:44,padding:0,...a(o.size.body,r.text.primary,"regular"),...x(l.input)},digits:{fontVariant:["tabular-nums"]},primary:{minHeight:44,paddingHorizontal:i.lg,borderRadius:n.pill,alignItems:"center",justifyContent:"center",backgroundColor:r.brand,...k(l.primaryButton)},primaryLabel:{...a(o.size.caption,r.text.onBrand,"bold"),...x(l.primaryButton)},dimmed:{opacity:.5},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},closeBar:{position:"absolute",width:18,height:2,borderRadius:1,backgroundColor:r.text.muted},closeBarA:{transform:[{rotate:"45deg"}]},closeBarB:{transform:[{rotate:"-45deg"}]},links:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:i.md},link:{minHeight:44,justifyContent:"center"},linkLabel:{...a(o.size.caption,r.linkInk,"bold"),...x(l.link)},notice:{gap:i.xs},noticeText:{...a(o.size.caption,r.errorRed,"regular"),...s}})}var Xn=["portrait","landscape"],Zn=/* @__PURE__ */new Set(["offered","enrolling"]);function EverfurTextingPrompt({onResolved:e,requested:t=false}){let o=mn(),l=useTextingAsk({surface:"prompt",ready:!o,entry:t});Gn(l,t,$n(),e);let s=useEverfurTheme(),d=r(()=>ei(s),[s]),u=r(()=>Jn(s,"center"),[s]),p=n(false),[h,v]=a(false);Zn.has(l.stage)&&(p.current=true);let _=p.current&&(Zn.has(l.stage)||l.stage==="verified")&&!h&&!o,k=()=>{h||(l.stage==="verified"?(v(true),D(e,"verified")):l.dismiss())};if(i(()=>{p.current&&l.stage==="dismissed"&&!h&&(v(true),D(e,"dismissed"))},[l.stage,e,h]),!_)return null;let x=l.stage==="verified"?Yt.verifiedTitle:Kt.promptTitle(l.brand);/* @__PURE__ */
@@ -3,11 +3,11 @@ import { ReactNode } from 'react';
3
3
  import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.js';
5
5
  import { i as EverfurPresentationInput } from './presentation.d-BkIvMtIl.js';
6
- import { a as ChatCheckinTarget } from './checkin.d-CokpahFL.js';
6
+ import { a as ChatCheckinTarget } from './checkin.d-BoZXWjxX.js';
7
7
  import { W as WidgetPet, P as PetProfileInput } from './petsRepository.d-_QfM7F6T.js';
8
8
  import { E as EverfurStarterPrompt } from './quickPrompts.d-NM_81Jc1.js';
9
9
  import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.js';
10
- import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy, i as UseEverfurUnreadOptions, d as EverfurUnreadState } from './chatHandoffToken.d-CFiI6IMc.js';
10
+ import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy, i as UseEverfurUnreadOptions, d as EverfurUnreadState } from './chatHandoffToken.d-zdp23Ukr.js';
11
11
  import { F as FileHandle } from './ports.d-BX4f4UsB.js';
12
12
  import { g as EverfurChatOpeningCard, a as EverfurChatAnswerCards, f as EverfurChatHistorySheet, e as EverfurChatHistoryBar, c as EverfurChatEmptyState } from './threadOptions.d-DOEIpk1t.js';
13
13
  import { E as EverfurChatEmptyHeaderContext, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.js';
@@ -295,6 +295,33 @@ type EverfurDictationLoader = () => unknown;
295
295
  */
296
296
  declare function registerEverfurDictation(next: EverfurDictationLoader | null): void;
297
297
 
298
+ /**
299
+ * What `registerEverfurChatCards` takes: a function that returns the `@everfur/sdk/chat-cards` module, or a promise of
300
+ * it (`() => import('@everfur/sdk/chat-cards')`).
301
+ *
302
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
303
+ * sends cards only to tenants Everfur enables.
304
+ *
305
+ * @internal
306
+ */
307
+ type EverfurChatCardsLoader = () => {
308
+ readonly ServerCards: unknown;
309
+ } | Promise<{
310
+ readonly ServerCards: unknown;
311
+ }>;
312
+ /**
313
+ * Turns on server-sent chat cards (A2UI) on React Native: register the `@everfur/sdk/chat-cards` loader once, in your
314
+ * app entry, before the chat mounts. Passing `null` unregisters it. The module starts loading here; chat sends ask for
315
+ * cards only once it has loaded, so a loader that fails never asks for any. A chat already on screen reads the change
316
+ * on its next render.
317
+ *
318
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
319
+ * sends cards only to tenants Everfur enables.
320
+ *
321
+ * @internal
322
+ */
323
+ declare function registerEverfurChatCards(next: EverfurChatCardsLoader | null): void;
324
+
298
325
  /** The app's foreground edge for EverfurChat: AppState going from `background` back to `active`. */
299
326
  declare function createAppStateLifecycle(): LifecyclePort;
300
327
 
@@ -305,4 +332,4 @@ declare function createAppStateLifecycle(): LifecyclePort;
305
332
  */
306
333
  declare function useEverfurUnread(options?: UseEverfurUnreadOptions): EverfurUnreadState;
307
334
 
308
- export { type AttachmentSource as A, type EverfurChatAttachments as E, type RenderVetAction as R, type EverfurChatProps as a, type EverfurDictationLoader as b, createAppStateLifecycle as c, registerEverfurDictation as r, useEverfurUnread as u };
335
+ export { type AttachmentSource as A, type EverfurChatAttachments as E, type RenderVetAction as R, type EverfurChatCardsLoader as a, type EverfurChatProps as b, type EverfurDictationLoader as c, createAppStateLifecycle as d, registerEverfurDictation as e, registerEverfurChatCards as r, useEverfurUnread as u };
@@ -3,11 +3,11 @@ import { ReactNode } from 'react';
3
3
  import { StyleProp, ViewStyle } from 'react-native';
4
4
  import { P as PetRef, C as ConversationId } from './ids.d-B2GAAifq.cjs';
5
5
  import { i as EverfurPresentationInput } from './presentation.d-BkIvMtIl.cjs';
6
- import { a as ChatCheckinTarget } from './checkin.d-BP3ZWBfX.cjs';
6
+ import { a as ChatCheckinTarget } from './checkin.d-CuIUahcd.cjs';
7
7
  import { W as WidgetPet, P as PetProfileInput } from './petsRepository.d-ai_tZ3lu.cjs';
8
8
  import { E as EverfurStarterPrompt } from './quickPrompts.d-NM_81Jc1.cjs';
9
9
  import { L as LifecyclePort } from './LifecyclePort.d-Cb9NtmP-.cjs';
10
- import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy, i as UseEverfurUnreadOptions, d as EverfurUnreadState } from './chatHandoffToken.d-BjfmIxXk.cjs';
10
+ import { U as UrgencyDisplayLevel, E as EverfurChatDraftStore, b as ChatFollowUpPolicy, i as UseEverfurUnreadOptions, d as EverfurUnreadState } from './chatHandoffToken.d-Cap2z62P.cjs';
11
11
  import { F as FileHandle } from './ports.d-BX4f4UsB.cjs';
12
12
  import { g as EverfurChatOpeningCard, a as EverfurChatAnswerCards, f as EverfurChatHistorySheet, e as EverfurChatHistoryBar, c as EverfurChatEmptyState } from './threadOptions.d-Bqy5d5Fx.cjs';
13
13
  import { E as EverfurChatEmptyHeaderContext, a as EverfurChatTopCard } from './threadOptions.d-CW51PyVd.cjs';
@@ -295,6 +295,33 @@ type EverfurDictationLoader = () => unknown;
295
295
  */
296
296
  declare function registerEverfurDictation(next: EverfurDictationLoader | null): void;
297
297
 
298
+ /**
299
+ * What `registerEverfurChatCards` takes: a function that returns the `@everfur/sdk/chat-cards` module, or a promise of
300
+ * it (`() => import('@everfur/sdk/chat-cards')`).
301
+ *
302
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
303
+ * sends cards only to tenants Everfur enables.
304
+ *
305
+ * @internal
306
+ */
307
+ type EverfurChatCardsLoader = () => {
308
+ readonly ServerCards: unknown;
309
+ } | Promise<{
310
+ readonly ServerCards: unknown;
311
+ }>;
312
+ /**
313
+ * Turns on server-sent chat cards (A2UI) on React Native: register the `@everfur/sdk/chat-cards` loader once, in your
314
+ * app entry, before the chat mounts. Passing `null` unregisters it. The module starts loading here; chat sends ask for
315
+ * cards only once it has loaded, so a loader that fails never asks for any. A chat already on screen reads the change
316
+ * on its next render.
317
+ *
318
+ * Everfur internal preview, not part of the partner API: it may change or go away in any release, and the platform
319
+ * sends cards only to tenants Everfur enables.
320
+ *
321
+ * @internal
322
+ */
323
+ declare function registerEverfurChatCards(next: EverfurChatCardsLoader | null): void;
324
+
298
325
  /** The app's foreground edge for EverfurChat: AppState going from `background` back to `active`. */
299
326
  declare function createAppStateLifecycle(): LifecyclePort;
300
327
 
@@ -305,4 +332,4 @@ declare function createAppStateLifecycle(): LifecyclePort;
305
332
  */
306
333
  declare function useEverfurUnread(options?: UseEverfurUnreadOptions): EverfurUnreadState;
307
334
 
308
- export { type AttachmentSource as A, type EverfurChatAttachments as E, type RenderVetAction as R, type EverfurChatProps as a, type EverfurDictationLoader as b, createAppStateLifecycle as c, registerEverfurDictation as r, useEverfurUnread as u };
335
+ export { type AttachmentSource as A, type EverfurChatAttachments as E, type RenderVetAction as R, type EverfurChatCardsLoader as a, type EverfurChatProps as b, type EverfurDictationLoader as c, createAppStateLifecycle as d, registerEverfurDictation as e, registerEverfurChatCards as r, useEverfurUnread as u };