@everfur/sdk 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/{Chat.d-BHovj6Ku.d.ts → Chat.d-CoGJrK3t.d.ts} +1 -1
- package/dist/{Chat.d-BO-XtVYe.d.cts → Chat.d-JDtlG_EW.d.cts} +1 -1
- package/dist/{DepthViews.d-DKoZgF8l.d.ts → DepthViews.d-CNQn-eEr.d.ts} +1 -1
- package/dist/{DepthViews.d-CBUunxP1.d.ts → DepthViews.d-D31VlFKU.d.ts} +1 -1
- package/dist/{DepthViews.d-BwIkdmWZ.d.cts → DepthViews.d-XTv4s3ru.d.cts} +1 -1
- package/dist/{DepthViews.d-Bx85LeiP.d.cts → DepthViews.d-zxM_xbP9.d.cts} +1 -1
- package/dist/{RecordsPage.d-DRFp2LXH.d.cts → RecordsPage.d-CSZHrtWJ.d.cts} +11 -5
- package/dist/{RecordsPage.d-CsvBhU0f.d.ts → RecordsPage.d-D_y-ZB3S.d.ts} +11 -5
- package/dist/animations/index.d.cts +3 -3
- package/dist/animations/index.d.ts +3 -3
- package/dist/{attachments.d-DWUsHPf9.d.cts → attachments.d-D74wbmQU.d.cts} +1 -1
- package/dist/{attachments.d-DOZjCdkb.d.ts → attachments.d-Dm6NUJTR.d.ts} +1 -1
- package/dist/{bookingCopy.d-BlMWlvgv.d.ts → bookingCopy.d-DMmLKY5Q.d.ts} +2 -2
- package/dist/{bookingCopy.d-tvO7y6MK.d.cts → bookingCopy.d-iaYDPvPd.d.cts} +2 -2
- package/dist/{casesRepository.d-C7qbrOL-.d.ts → casesRepository.d-CCJJQXnl.d.ts} +1 -1
- package/dist/{casesRepository.d-sSo6oakf.d.cts → casesRepository.d-G2dahIKO.d.cts} +1 -1
- package/dist/chat/index.d.cts +10 -10
- package/dist/chat/index.d.ts +10 -10
- package/dist/chat/lite/index.d.cts +10 -10
- package/dist/chat/lite/index.d.ts +10 -10
- package/dist/{chatHandoffToken.d-C4tEyuCT.d.ts → chatHandoffToken.d-DVv9tl8h.d.ts} +5 -5
- package/dist/{chatHandoffToken.d-D6GUoBvs.d.cts → chatHandoffToken.d-xmnHrTA5.d.cts} +5 -5
- package/dist/{chatTypes.d-CSyw9em_.d.cts → chatTypes.d-CQC7GTdE.d.cts} +4 -4
- package/dist/{chatTypes.d-BI4vidgu.d.ts → chatTypes.d-hS1AilYl.d.ts} +4 -4
- package/dist/chunk-2NA7TPUA.js +5 -0
- package/dist/chunk-IJU5TV5N.js +12 -0
- package/dist/chunk-TFX6WMDN.js +30 -0
- package/dist/chunk-WZNPR5TY.js +34 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +6 -6
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/{clinicBatch.d-BxA_uGBb.d.cts → clinicBatch.d-4PFwKJfw.d.cts} +3 -3
- package/dist/{clinicBatch.d-T5oSAhY-.d.ts → clinicBatch.d-BpP2NBb3.d.ts} +3 -3
- package/dist/{clinicRequestProps.d-CjsMg_OD.d.ts → clinicRequestProps.d-BuMuGoVZ.d.ts} +1 -1
- package/dist/{clinicRequestProps.d-1dCtouGA.d.cts → clinicRequestProps.d-DjzUdDFx.d.cts} +1 -1
- package/dist/{config.d-N5Xzy53V.d.ts → config.d-D9igq-vT.d.ts} +1 -1
- package/dist/{config.d-jCmrhM4a.d.cts → config.d-cX5E6DAw.d.cts} +1 -1
- package/dist/consent/index.cjs +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +1 -1
- package/dist/{context.d-l4HkFJI8.d.cts → context.d-BrRRNw9I.d.cts} +4 -4
- package/dist/{context.d-BJEpEERH.d.ts → context.d-hPfsEsNf.d.ts} +4 -4
- package/dist/{copy.d-hFRaovog.d.ts → copy.d-CDlirTR4.d.ts} +2 -2
- package/dist/{copy.d-hS49oJ4w.d.cts → copy.d-DWjSkbrZ.d.cts} +2 -2
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +14 -14
- package/dist/core/index.d.ts +14 -14
- package/dist/core/index.js +1 -1
- package/dist/{depth.d-C99_xup2.d.ts → depth.d-CfBorxcQ.d.ts} +3 -3
- package/dist/{depth.d-BYwddMNU.d.cts → depth.d-KkrGx98U.d.cts} +3 -3
- package/dist/{entitlementRepository.d-CiU_QIPL.d.cts → entitlementRepository.d-BvnWpcQH.d.cts} +2 -2
- package/dist/{entitlementRepository.d-qZAlET7C.d.ts → entitlementRepository.d-DpQrIgW6.d.ts} +2 -2
- package/dist/{focus.d-RJMXplJc.d.cts → focus.d-9loikWy8.d.cts} +2 -2
- package/dist/{focus.d-CG6KhDBK.d.ts → focus.d-CYwVLDvR.d.ts} +2 -2
- package/dist/health-plan/index.cjs +53 -37
- package/dist/health-plan/index.d.cts +10 -10
- package/dist/health-plan/index.d.ts +10 -10
- package/dist/health-plan/index.js +54 -38
- package/dist/{idempotency.d-DJyOZDPb.d.cts → idempotency.d-CVKkUhY4.d.cts} +1 -1
- package/dist/{idempotency.d-D-ZWpO9p.d.ts → idempotency.d-DGQ_xML5.d.ts} +1 -1
- package/dist/{identity.d-CA7mW59I.d.cts → identity.d-Bnl5Z0MM.d.cts} +1 -1
- package/dist/{identity.d-DIOnFzXL.d.ts → identity.d-DR5YwO6E.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/{introEvents.d-BjqfFgE1.d.ts → introEvents.d-D_yL7lnE.d.ts} +1 -1
- package/dist/{introEvents.d-7wNDMhEF.d.cts → introEvents.d-JmPqEqMQ.d.cts} +1 -1
- package/dist/{models.d-BSqvbTE1.d.cts → models.d-BN53M9sU.d.cts} +52 -1
- package/dist/{models.d-DOwnr8fi.d.ts → models.d-Bhq9p6Wa.d.ts} +52 -1
- package/dist/notifications/inbox/index.d.cts +4 -4
- package/dist/notifications/inbox/index.d.ts +4 -4
- package/dist/notifications/index.d.cts +7 -7
- package/dist/notifications/index.d.ts +7 -7
- package/dist/{optInView.d-BQhHPleh.d.cts → optInView.d-BizcW_QG.d.cts} +2 -2
- package/dist/{optInView.d-B5v4cDDW.d.ts → optInView.d-CZvKlq-o.d.ts} +2 -2
- package/dist/{pets.d-DRqMaP8A.d.cts → pets.d-C4CWxQPh.d.cts} +1 -1
- package/dist/{pets.d-DVrOb-Bj.d.ts → pets.d-uCzgFbGi.d.ts} +1 -1
- package/dist/{petsRepository.d-tZADfKA1.d.cts → petsRepository.d-DOcVv9bd.d.cts} +1 -1
- package/dist/{petsRepository.d-CpYWRWFq.d.ts → petsRepository.d-DRW7NkKm.d.ts} +1 -1
- package/dist/records/depth/index.cjs +1 -1
- package/dist/records/depth/index.d.cts +11 -11
- package/dist/records/depth/index.d.ts +11 -11
- package/dist/records/depth/index.js +1 -1
- package/dist/records/index.cjs +16 -14
- package/dist/records/index.d.cts +47 -17
- package/dist/records/index.d.ts +47 -17
- package/dist/records/index.js +16 -14
- package/dist/{requestFunnel.d-B8OVGh0p.d.ts → requestFunnel.d-BYLycQMI.d.ts} +2 -2
- package/dist/{requestFunnel.d-C4abgvt9.d.cts → requestFunnel.d-CQ0O8fMG.d.cts} +2 -2
- package/dist/{route.d-BAZqGLfl.d.ts → route.d-DFJ0gXj8.d.ts} +2 -2
- package/dist/{route.d-CTf8h9vS.d.cts → route.d-q9yndhFy.d.cts} +2 -2
- package/dist/{runtimeTypes.d-DbaQKGLv.d.cts → runtimeTypes.d-3LRuzxr7.d.cts} +4 -4
- package/dist/{runtimeTypes.d-DrIz5e6L.d.ts → runtimeTypes.d-BJHYj2MI.d.ts} +4 -4
- package/dist/{screenProps.d-Di3wYGCn.d.cts → screenProps.d-DfAmuKkr.d.cts} +2 -2
- package/dist/{screenProps.d-BP8LAZWn.d.ts → screenProps.d-tVzlXGaN.d.ts} +2 -2
- package/dist/server/events/index.cjs +1 -1
- package/dist/server/events/index.d.cts +2 -2
- package/dist/server/events/index.d.ts +2 -2
- package/dist/server/events/index.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/{sheetSeam.d-BBuEIVsa.d.cts → sheetSeam.d-B9iQqG_I.d.cts} +2 -2
- package/dist/{sheetSeam.d-B09jf4YC.d.ts → sheetSeam.d-CtuKILqp.d.ts} +2 -2
- package/dist/shop/index.cjs +187 -145
- package/dist/shop/index.d.cts +3 -3
- package/dist/shop/index.d.ts +3 -3
- package/dist/shop/index.js +188 -146
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.d.cts +8 -8
- package/dist/tabs/index.d.ts +8 -8
- package/dist/tabs/index.js +1 -1
- package/dist/televet/booking/index.d.cts +6 -6
- package/dist/televet/booking/index.d.ts +6 -6
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/rn/index.d.cts +8 -8
- package/dist/testing/rn/index.d.ts +8 -8
- package/dist/testing/web/index.d.cts +9 -9
- package/dist/testing/web/index.d.ts +9 -9
- package/dist/texting/index.d.cts +5 -5
- package/dist/texting/index.d.ts +5 -5
- package/dist/{threadOptions.d-Cwmyu8pc.d.ts → threadOptions.d-DfH26dy7.d.ts} +2 -2
- package/dist/{threadOptions.d-REwBuXAY.d.cts → threadOptions.d-I6G3BdlP.d.cts} +2 -2
- package/dist/{timelineRows.d-CTlGQTB0.d.ts → timelineRows.d-CugnCOfZ.d.ts} +1 -1
- package/dist/{timelineRows.d-CongJG58.d.cts → timelineRows.d-uSfr2IP3.d.cts} +1 -1
- package/dist/{types.d-d3RdaeAA.d.cts → types.d-BOKzNuuF.d.cts} +87 -85
- package/dist/{types.d-d3RdaeAA.d.ts → types.d-BOKzNuuF.d.ts} +87 -85
- package/dist/ui/index.cjs +98 -46
- package/dist/ui/index.d.cts +4 -3
- package/dist/ui/index.d.ts +4 -3
- package/dist/ui/index.js +98 -46
- package/dist/{useHealthPlanSubscription.d-BSo5kFT9.d.ts → useHealthPlanSubscription.d-CVVQIFpG.d.ts} +2 -2
- package/dist/{useHealthPlanSubscription.d-Br7GKHTt.d.cts → useHealthPlanSubscription.d-DylPMm_m.d.cts} +2 -2
- package/dist/{useInboxUnread.d-Blxu00eY.d.ts → useInboxUnread.d-DDoSII8D.d.ts} +1 -1
- package/dist/{useInboxUnread.d-pi6FNnK-.d.cts → useInboxUnread.d-Dq3CCAa3.d.cts} +1 -1
- package/dist/{usePresentation.d-yd9Gh4GB.d.ts → usePresentation.d-CDNK4MDY.d.ts} +2 -2
- package/dist/{usePresentation.d-C6ci1s3j.d.cts → usePresentation.d-CrobH0d_.d.cts} +2 -2
- package/dist/{useRecords.d-BYNX01El.d.cts → useRecords.d-BMSW4aRD.d.cts} +46 -3
- package/dist/{useRecords.d-DWk61a4c.d.ts → useRecords.d-Cv1nhZrv.d.ts} +46 -3
- package/dist/{useRecordsDepth.d-C5snbNxR.d.ts → useRecordsDepth.d-BvBYIPii.d.ts} +1 -1
- package/dist/{useRecordsDepth.d-BIDVPfx7.d.cts → useRecordsDepth.d-Cd5Vyb7D.d.cts} +1 -1
- package/dist/{useUnread.d-CORommFJ.d.cts → useUnread.d-B4Yqcteg.d.cts} +3 -3
- package/dist/{useUnread.d-w0dKMnx7.d.ts → useUnread.d-ElAEfgl1.d.ts} +3 -3
- package/dist/{view.d-CK2UN4qn.d.ts → view.d-2RWoY9kd.d.ts} +5 -5
- package/dist/{view.d-DUhKppyl.d.cts → view.d-utmOR2ee.d.cts} +5 -5
- package/dist/web/consent/index.cjs +1 -1
- package/dist/web/consent/index.d.cts +5 -5
- package/dist/web/consent/index.d.ts +5 -5
- package/dist/web/consent/index.js +1 -1
- package/dist/web/health-plan/index.cjs +43 -16
- package/dist/web/health-plan/index.d.cts +12 -12
- package/dist/web/health-plan/index.d.ts +12 -12
- package/dist/web/health-plan/index.js +32 -27
- package/dist/web/health-plan/styles.css +160 -1
- package/dist/web/inbox/index.cjs +1 -1
- package/dist/web/inbox/index.d.cts +5 -5
- package/dist/web/inbox/index.d.ts +5 -5
- package/dist/web/inbox/index.js +1 -1
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.d.cts +27 -27
- package/dist/web/index.d.ts +27 -27
- package/dist/web/index.js +1 -1
- package/dist/web/intro/index.cjs +1 -1
- package/dist/web/intro/index.d.cts +8 -8
- package/dist/web/intro/index.d.ts +8 -8
- package/dist/web/intro/index.js +1 -1
- package/dist/web/notifications/index.d.cts +6 -6
- package/dist/web/notifications/index.d.ts +6 -6
- package/dist/web/records/depth/index.cjs +1 -1
- package/dist/web/records/depth/index.d.cts +11 -11
- package/dist/web/records/depth/index.d.ts +11 -11
- package/dist/web/records/depth/index.js +1 -1
- package/dist/web/records/index.cjs +15 -13
- package/dist/web/records/index.d.cts +43 -19
- package/dist/web/records/index.d.ts +43 -19
- package/dist/web/records/index.js +15 -13
- package/dist/web/records-sheet/index.cjs +1 -1
- package/dist/web/records-sheet/index.d.cts +4 -4
- package/dist/web/records-sheet/index.d.ts +4 -4
- package/dist/web/records-sheet/index.js +1 -1
- package/dist/web/shop/index.cjs +110 -88
- package/dist/web/shop/index.d.cts +3 -3
- package/dist/web/shop/index.d.ts +3 -3
- package/dist/web/shop/index.js +67 -81
- package/dist/web/televet/booking/index.d.cts +6 -6
- package/dist/web/televet/booking/index.d.ts +6 -6
- package/dist/web/texting/index.d.cts +5 -5
- package/dist/web/texting/index.d.ts +5 -5
- package/dist/web/ui/index.cjs +96 -57
- package/dist/web/ui/index.d.cts +4 -3
- package/dist/web/ui/index.d.ts +4 -3
- package/dist/web/ui/index.js +41 -46
- package/dist/web/ui/styles.css +481 -1
- package/package.json +5 -5
- package/dist/chunk-Y3Q4GW47.js +0 -31
|
@@ -16,10 +16,10 @@ return Object.freeze({orderId:orderId,productId:productId,title:str2(o.title),cu
|
|
|
16
16
|
return Object.freeze({status:status,orderNumber:trackingText(o.order_number,64),carrier:trackingText(o.carrier,64),trackingNumber:trackingText(o.tracking_number,128),trackingUrl:trackingUrlOf(o.tracking_url),shippedAt:instantOf(o.shipped_at),estimatedDelivery:dateOf(o.estimated_delivery),updatedAt:instantOf(o.updated_at)})}function trackingOf(raw){let t=healthPlanOrderTrackingFromWire(raw);return t===null?{}:{tracking:t}}function healthPlanOneBoxOrderPageFromWire(raw){let rows=raw!==null&&typeof raw=="object"?raw.orders:null;if(!Array.isArray(rows))return null;let cursor=raw.next_cursor;/* @__PURE__ */
|
|
17
17
|
return Object.freeze({orders:/* @__PURE__ */Object.freeze(rows.map(healthPlanOneBoxOrderFromWire).filter(x=>x!==null)),nextCursor:typeof cursor=="string"&&cursor.length>0&&cursor.length<=REF_MAX2?cursor:null})}function instantOf(value){return typeof value!="string"||value.length>40||!/^\d{4}-\d{2}-\d{2}T/.test(value)||Number.isNaN(Date.parse(value))?null:value}function oneBoxOf(value,boxPrice){if(value===null||typeof value!="object")return null;let o=value,price=money(o.price);return price===null||price>boxPrice?null:/* @__PURE__ */Object.freeze({price:price,discountPercent:int(o.discount_percent)??0})}function healthPlanSubscriptionQuoteFromWire(raw){if(raw===null||typeof raw!="object")return null;let o=raw,productId=idOf(o.product_id),currency=currencyOf2(o.currency),boxPrice=money(o.box_price),options=intervalsOf(o.interval_options);if(productId===null||currency===null||boxPrice===null||options.length===0)return null;let offerApplies=o.offer_applies===true,def=int(o.default_interval_days),s=o.supply,supply=null;if(s!==null&&typeof s=="object"){let so=s,unitsPerBox=int(so.units_per_box),unitsPerDay=money(so.units_per_day),supplyDays=int(so.supply_days);unitsPerBox!==null&&unitsPerDay!==null&&supplyDays!==null&&(supply=/* @__PURE__ */Object.freeze({unitsPerBox:unitsPerBox,unitLabel:str2(so.unit_label,30),unitsPerDay:unitsPerDay,supplyDays:supplyDays,doseBasis:so.dose_basis==="weight"?"weight":"assumed"}))}let pct=int(o.first_box_discount_percent)??0;/* @__PURE__ */
|
|
18
18
|
return Object.freeze({productId:productId,currency:currency,boxPrice:boxPrice,firstBoxPrice:offerApplies?money(o.first_box_price)??boxPrice:boxPrice,firstBoxDiscountPercent:offerApplies?pct:0,offerApplies:offerApplies,oneBox:oneBoxOf(o.one_box,boxPrice),intervalOptions:options,defaultIntervalDays:def!==null&&options.includes(def)?def:options[0],supply:supply,firstBoxShipsOn:dateOf(o.first_box_ships_on),subscription:healthPlanSubscriptionFromWire(o.subscription)})}function invalid2(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function malformed2(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response carried no subscription`})}function disposed2(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}var validRef2=value=>typeof value=="string"&&value.length>0&&value.length<=REF_MAX2;function base(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan/subscriptions`}function createHealthPlanSubscriptionRepositoryOver(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}})),one2=async(call,petRef,method,suffix,body)=>{if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send(call,{method:method,path:`${base(petRef)}${suffix}`,...body===void 0?{}:{body:body}});if(!res.ok)return err(res.error);let sub=healthPlanSubscriptionFromWire(res.value);return sub===null?err(malformed2(call)):ok(sub)},idSuffix=(id,tail="")=>validRef2(id)?`/${encodeURIComponent(id)}${tail}`:null;return{async quote(petRef,productId){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));if(!validRef2(productId))return err(invalid2("productId must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.quote",{method:"GET",path:`${base(petRef)}/quote`,query:{product_id:productId}});if(!res.ok)return err(res.error);let quote=healthPlanSubscriptionQuoteFromWire(res.value);return quote===null?err(malformed2("healthPlan.subscription.quote")):ok(quote)},async list(petRef){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.list",{method:"GET",path:base(petRef)});if(!res.ok)return err(res.error);let rows=res.value!==null&&typeof res.value=="object"?res.value.subscriptions:null;return Array.isArray(rows)?ok(/* @__PURE__ */Object.freeze(rows.map(healthPlanSubscriptionFromWire).filter(s=>s!==null))):err(malformed2("healthPlan.subscription.list"))},create(petRef,productId,intervalDays){return validRef2(productId)?one2("healthPlan.subscription.create",petRef,"POST","",{product_id:productId,...intervalDays===void 0?{}:{interval_days:intervalDays}}):Promise.resolve(err(invalid2("productId must be 1..128 characters")))},changeInterval(petRef,id,intervalDays){let s=idSuffix(id);return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.interval",petRef,"PATCH",s,{interval_days:intervalDays})},skip(petRef,id){let s=idSuffix(id,"/skip");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.skip",petRef,"POST",s,{})},cancel(petRef,id){let s=idSuffix(id,"/cancel");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.cancel",petRef,"POST",s,{})},restart(petRef,id,intervalDays){let s=idSuffix(id,"/restart");return s===null?Promise.resolve(err(invalid2("subscriptionId must be 1..128 characters"))):one2("healthPlan.subscription.restart",petRef,"POST",s,intervalDays===void 0?{}:{interval_days:intervalDays})},async buyOneBox(petRef,productId,tapKey){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));if(!validRef2(productId))return err(invalid2("productId must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.oneBox",{method:"POST",path:`${base(petRef)}/one-box`,body:{product_id:productId}},{idempotent:true,...tapKey===void 0?{}:{idempotencyKey:`hp-one-box:${tapKey}`}});if(!res.ok)return err(res.error);let order=healthPlanOneBoxOrderFromWire(res.value);return order===null?err(malformed2("healthPlan.subscription.oneBox")):ok(order)},async listOneBoxOrders(petRef){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${base(petRef)}/one-box`});if(!res.ok)return err(res.error);let page=healthPlanOneBoxOrderPageFromWire(res.value);return page===null?err(malformed2("healthPlan.subscription.oneBoxList")):ok(page.orders)},async listOneBoxOrderPage(petRef,opts){if(!validRef2(petRef))return err(invalid2("petRef must be 1..128 characters"));let limit=opts?.limit;if(limit!==void 0&&!(Number.isInteger(limit)&&limit>=1&&limit<=50))return err(invalid2("limit must be a whole number 1..50"));if(opts?.cursor!==void 0&&!validRef2(opts.cursor))return err(invalid2("cursor must be 1..128 characters"));let query={...limit!==void 0?{limit:String(limit)}:{},...opts?.cursor!==void 0?{cursor:opts.cursor}:{}},res=await funnel.send("healthPlan.subscription.oneBoxList",{method:"GET",path:`${base(petRef)}/one-box`,query:query});if(!res.ok)return err(res.error);let page=healthPlanOneBoxOrderPageFromWire(res.value);return page===null?err(malformed2("healthPlan.subscription.oneBoxList")):ok(page)}}}function createHealthPlanSubscriptionRepository(runtime){let over=()=>{let{services:services}=runtime.registry;return createHealthPlanSubscriptionRepositoryOver({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})},guard=(verb,f)=>(...a)=>runtime.isDisposed?Promise.resolve(err(disposed2(verb))):f(over(),...a);return{quote:guard("quote",(r,p,id)=>r.quote(p,id)),list:guard("list",(r,p)=>r.list(p)),create:guard("create",(r,p,id,n)=>r.create(p,id,n)),changeInterval:guard("changeInterval",(r,p,id,n)=>r.changeInterval(p,id,n)),skip:guard("skip",(r,p,id)=>r.skip(p,id)),cancel:guard("cancel",(r,p,id)=>r.cancel(p,id)),restart:guard("restart",(r,p,id,n)=>r.restart(p,id,n)),buyOneBox:guard("buyOneBox",(r,p,id,k2)=>r.buyOneBox(p,id,k2)),listOneBoxOrders:guard("listOneBoxOrders",(r,p)=>r.listOneBoxOrders(p)),listOneBoxOrderPage:guard("listOneBoxOrderPage",(r,p,o)=>r.listOneBoxOrderPage(p,o))}}var REFUSALS=/* @__PURE__ */new Set(["cart_disabled","cart_has_subscription","cart_currency_mixed","sample_product","partner_endpoint_missing","checkout_pending","already_subscribed"]);function healthPlanCheckoutRefusal(error){if(error==null||error.httpStatus!==409)return null;let raw=obj(error.raw);for(let candidate of[error.reasonCode,error.wireMessage,raw?.detail,raw?.message,raw?.reason_code])if(typeof candidate=="string"&&REFUSALS.has(candidate.trim()))return candidate.trim();return null}var REF_MAX3=128,CART_MAX=10,ICONS=/* @__PURE__ */new Set(["shield","arrow","check","star","truck","refresh","card","alert","x","chat","repeat","calendar","flame","box","cart","minus","plus","chev","pulse","file","kit","dna","heart","bottle","harness","ramp"]),TONES=/* @__PURE__ */new Set(["y","c","g","r"]),TRACK_STATES=/* @__PURE__ */new Set(["done","now","next"]),obj=value=>value!==null&&typeof value=="object"&&!Array.isArray(value)?value:null,str3=(value,max=1e3)=>typeof value=="string"&&value.trim().length>0&&value.length<=max?value.trim():null,kindOf=value=>typeof value=="string"&&/^[A-Za-z0-9_-]{1,40}$/.test(value)?value:null,iconOf=value=>typeof value=="string"&&ICONS.has(value)?value:null;function imageOf(value){let s=str3(value,2048);return s===null||/\s/.test(s)?null:/^https:\/\/[^/]/i.test(s)||/^\/(?![/\\])/.test(s)?s:null}var idOf2=value=>typeof value=="number"&&Number.isInteger(value)?String(value):str3(value,REF_MAX3);function weightOf(value){return typeof value=="number"&&Number.isFinite(value)&&value>0?value:null}function clean(fields){/* @__PURE__ */
|
|
19
|
-
return Object.freeze(Object.fromEntries(Object.entries(fields).filter(([,v])=>v!=null)))}function listOf(value,each,max=20){if(!Array.isArray(value))return null;let out=[];for(let row of value){if(out.length>=max)break;let
|
|
19
|
+
return Object.freeze(Object.fromEntries(Object.entries(fields).filter(([,v])=>v!=null)))}function listOf(value,each,max=20){if(!Array.isArray(value))return null;let out=[];for(let row of value){if(out.length>=max)break;let mapped2=each(row);mapped2!==null&&out.push(mapped2)}return out.length===0?null:/* @__PURE__ */Object.freeze(out)}var words=(value,max=12,len=300)=>listOf(value,v=>str3(v,len),max);function focusOf(value){let o=obj(value),kicker=str3(o?.kicker,120),title=str3(o?.title,300);if(o===null||kicker===null||title===null)return null;let risk=obj(o.risk),odds=obj(o.odds),quote=obj(o.quote),jump=obj(o.jump);return clean({kicker:kicker,title:title,sources:listOf(o.sources,r=>{let label=str3(obj(r)?.label,60);return label===null?null:clean({label:label,kind:kindOf(obj(r)?.kind)})},6),risk:str3(risk?.lead,300)===null?null:clean({lead:str3(risk?.lead,300),body:str3(risk?.body),kind:kindOf(risk?.kind)}),odds:str3(odds?.label,120)===null||str3(odds?.from,20)===null||str3(odds?.to,20)===null?null:clean({label:str3(odds?.label,120),tag:str3(odds?.tag,40),from:str3(odds?.from,20),to:str3(odds?.to,20),toLabel:str3(odds?.toLabel,120)}),quote:str3(quote?.text)===null?null:clean({kicker:str3(quote?.kicker,120),tag:str3(quote?.tag,40),text:str3(quote?.text)}),jump:str3(jump?.title,300)===null||str3(jump?.go,60)===null?null:clean({title:str3(jump?.title,300),go:str3(jump?.go,60)}),report:reportOf(o.report)})}function reportOf(value){let o=obj(value),label=str3(o?.label,120),text2=str3(o?.text,1200);return label===null||text2===null?null:clean({label:label,text:text2,actions:words(o?.actions,5,300)})}function routineOf(value){let o=obj(value),title=str3(o?.title,300),steps=listOf(o?.steps,r=>{let s=obj(r),t=str3(s?.title,300),tone=s?.tone;return t===null?null:clean({title:t,body:str3(s?.body),source:str3(s?.source,200),tone:typeof tone=="string"&&TONES.has(tone)?tone:null,icon:iconOf(s?.icon),fromVet:s?.fromVet===true?true:null})});return title===null||steps===null?null:clean({title:title,label:str3(o?.label,60),steps:steps})}function pickOf(value){let o=obj(value),title=str3(o?.title,300);if(o===null||title===null)return null;let rating=obj(o.rating),reviews=obj(o.reviews),why=obj(o.why),score=obj(why?.score),dose=obj(o.dose),ingredients=obj(o.ingredients),reviewItems=listOf(reviews?.items,r=>{let v=obj(r),stars=v?.stars,text2=str3(v?.text),by=str3(v?.by,80);return typeof stars!="number"||!Number.isFinite(stars)||stars<1||stars>5||text2===null||by===null?null:clean({stars:Math.round(stars),text:text2,by:by})},5),whyRows=listOf(why?.rows,r=>{let v=obj(r),chip=str3(v?.chip,40),t=str3(v?.title,300);return chip===null||t===null?null:clean({chip:chip,kind:kindOf(v?.kind),title:t,body:str3(v?.body)})}),stats=listOf(dose?.stats,r=>{let v=obj(r),val=str3(v?.value,40),label=str3(v?.label,120),kind=v?.kind;return val===null||label===null?null:clean({value:val,label:label,kind:kind==="weight"||kind==="dose"||kind==="days"?kind:null})},6),ingredientItems=words(ingredients?.items,12,80);return clean({title:title,none:o.none===true?true:null,hidden:o.none===true&&o.hidden===true?true:null,productId:idOf2(o.productId),partnerSku:str3(o.partnerSku,200),rating:str3(rating?.value,20)===null?null:clean({value:str3(rating?.value,20),label:str3(rating?.label,120)}),line:str3(o.line),reviews:str3(reviews?.label,200)===null||reviewItems===null?null:clean({label:str3(reviews?.label,200),items:reviewItems}),checkoutLine:str3(o.checkoutLine,300),why:str3(why?.title,200)===null||whyRows===null?null:clean({title:str3(why?.title,200),rows:whyRows,score:str3(score?.text,200)===null||str3(score?.value,20)===null?null:clean({text:str3(score?.text,200),value:str3(score?.value,20)})}),dose:str3(dose?.title,200)===null||stats===null?null:clean({title:str3(dose?.title,200),stats:stats,note:str3(dose?.note)}),doseLabel:str3(o.doseLabel,120),ingredients:ingredientItems===null?null:clean({label:str3(ingredients?.label,200),items:ingredientItems}),proof:str3(o.proof,300),trust:listOf(o.trust,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,120);return icon===null||label===null?null:clean({icon:icon,label:label})},6),more:str3(o.more,120),fine:str3(o.fine),checkin:str3(o.checkin,200),detail:healthPlanItemDetailOf(o.detail)??null})}function signsOf(value){let o=obj(value),title=str3(o?.title,200),items=listOf(o?.items,r=>{let v=obj(r),t=str3(v?.title,300),body=str3(v?.body);return t===null||body===null?null:clean({title:t,body:body,urgent:v?.urgent===true?true:null,callVet:v?.callVet===true?true:null})});return title===null||items===null?null:clean({title:title,items:items})}function checkupOf(value){let o=obj(value),title=str3(o?.title,200),questions=words(o?.questions,12,300),add=str3(o?.add,80),added=str3(o?.added,80);return title===null||questions===null||add===null||added===null?null:clean({title:title,questions:questions,add:add,added:added})}function extrasOf(value){let o=obj(value),title=str3(o?.title,200),items=listOf(o?.items,r=>{let v=obj(r),key=str3(v?.key,REF_MAX3),t=str3(v?.title,300),action=str3(v?.action,80),productId=idOf2(v?.productId),added=str3(v?.added,80)??(productId!==null?action:null);return key===null||t===null||action===null||added===null?null:clean({key:key,productId:productId,title:t,body:str3(v?.body),price:str3(v?.price,40),was:str3(v?.was,40),tag:str3(v?.tag,40),imageUrl:imageOf(v?.imageUrl),icon:iconOf(v?.icon),kind:kindOf(v?.kind),action:action,added:added,owned:v?.owned===true?true:null,detail:healthPlanItemDetailOf(v?.detail)??null})},6);return title===null||items===null?null:clean({title:title,items:items})}function waitOf(value){let o=obj(value),kicker=str3(o?.kicker,120),title=str3(o?.title,120);return o===null||kicker===null||title===null?null:clean({kicker:kicker,title:title,icon:iconOf(o.icon),track:listOf(o.track,r=>{let v=obj(r),t=str3(v?.title,120),state2=v?.state;return t===null?null:clean({title:t,detail:str3(v?.detail,120),state:typeof state2=="string"&&TRACK_STATES.has(state2)?state2:null,tag:str3(v?.tag,40)})},6),heading:str3(o.heading,200),rows:listOf(o.rows,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,120);if(icon===null||label===null)return null;if(v?.fromVet===true)return clean({icon:icon,label:label,text:"",fromVet:true});let text2=str3(v?.text,300);return text2===null?null:clean({icon:icon,label:label,text:text2})},6),note:str3(o.note,300),action:str3(o.action,80)})}function healthPlanFocusDesignFromWire(raw){let o=obj(raw),title=str3(o?.title,300),pick2=pickOf(o?.pick);if(o===null||title===null||pick2===null)return null;let byline=obj(o.byline);return clean({eyebrow:str3(o.eyebrow,120),title:title,subtitle:str3(o.subtitle,300),subtitleNoRecords:str3(o.subtitleNoRecords,300),headImageUrl:imageOf(o.headImageUrl),byline:str3(byline?.name,120)===null?null:clean({name:str3(byline?.name,120),role:str3(byline?.role,120),imageUrl:imageOf(byline?.imageUrl),shortName:str3(byline?.shortName,60)}),focus:focusOf(o.focus),routine:routineOf(o.routine),pick:pick2,signs:signsOf(o.signs),checkup:checkupOf(o.checkup),extras:extrasOf(o.extras),wait:waitOf(o.wait),fine:str3(o.fine),checkoutRows:listOf(o.checkoutRows,r=>{let v=obj(r),icon=iconOf(v?.icon),label=str3(v?.label,60),val=str3(v?.value,200);return icon===null||label===null||val===null?null:clean({icon:icon,label:label,value:val})},6)})}function healthPlanPageFromWire(raw,petRef){let o=obj(raw);if(o===null||!("page"in o))return null;let pet=obj(o.pet),sex=pet?.sex;/* @__PURE__ */
|
|
20
20
|
return Object.freeze({petRef:str3(o.pet_ref,REF_MAX3)??petRef,pet:/* @__PURE__ */Object.freeze({name:str3(pet?.name,120),species:str3(pet?.species,60),sex:sex==="female"||sex==="male"?sex:null,breed:str3(pet?.breed,120),weightKg:weightOf(pet?.weight_kg),weightLb:weightOf(pet?.weight_lb)}),checkout:o.checkout==="everfur_stripe"?"everfur_stripe":"partner",page:healthPlanFocusDesignFromWire(o.page),vetReviewed:o.vet_reviewed===true,trackingTextsEnabled:o.tracking_texts_enabled===true})}function healthPlanCheckoutSessionFromWire(raw){let o=obj(raw),checkoutId=idOf2(o?.checkout_id),url=str3(o?.url,4096);return checkoutId===null||url===null||!/^https:\/\/[^\s/][^\s]*$/i.test(url)?null:/* @__PURE__ */Object.freeze({checkoutId:checkoutId,url:url})}var STATUSES=/* @__PURE__ */new Set(["pending","paid","expired","failed"]);function healthPlanCheckoutStateFromWire(raw){let o=obj(raw),status=o?.status,purchase=o?.purchase;if(typeof status!="string"||!STATUSES.has(status)||purchase!=="one_box"&&purchase!=="subscription")return null;let order=healthPlanOneBoxOrderFromWire(o?.order),list=Array.isArray(o?.orders)?(o?.orders).map(healthPlanOneBoxOrderFromWire).filter(x=>x!==null):[];/* @__PURE__ */
|
|
21
21
|
return Object.freeze({status:status,purchase:purchase,order:order??list[0]??null,orders:/* @__PURE__ */Object.freeze(list.length>0?list:order===null?[]:[order]),subscription:healthPlanSubscriptionFromWire(o?.subscription)})}function invalid3(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function malformed3(call){return makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:`${call}: the response was not the expected shape`})}function disposed3(verb){return makeEverfurError("runtimeDisposed",{retryable:false,wireMessage:`the Everfur runtime is disposed; ${verb} was called after unmount`})}var validRef3=value=>typeof value=="string"&&value.length>0&&value.length<=REF_MAX3,absoluteUrl=value=>typeof value=="string"&&value.length<=2048&&/^https?:\/\/[^\s/][^\s]*$/i.test(value);function base2(petRef){return`/widget/v1/pets/${encodeURIComponent(petRef)}/plan`}async function readPage(funnel,petRef,opts){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let res=await funnel.send("healthPlan.page.read",{method:"GET",path:`${base2(petRef)}/page`,...opts?.signal?{signal:opts.signal}:{}});if(!res.ok)return err(res.error);let page=healthPlanPageFromWire(res.value,petRef);return page===null?err(malformed3("healthPlan.page.read")):ok(page)}var readers=/* @__PURE__ */new WeakMap;function createHealthPlanPageReader(runtime){let known=readers.get(runtime);if(known!==void 0)return known;let reader=makeHealthPlanPageReader(runtime);return readers.set(runtime,reader),reader}function makeHealthPlanPageReader(runtime){return{getPage:(petRef,opts)=>{if(runtime.isDisposed)return Promise.resolve(err(disposed3("getPage")));let{services:services}=runtime.registry,funnel=withPlainNotFound(createRequestFunnel({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}}));return readPage(funnel,petRef,opts)}}}function createHealthPlanPageRepositoryOver(deps){let funnel=withPlainNotFound(deps.funnel??createRequestFunnel({auth:deps.auth,...deps.errorPolicy?{errorPolicy:deps.errorPolicy}:{}}));return{getPage:(petRef,opts)=>readPage(funnel,petRef,opts),async startCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(body.productId))return err(invalid3("productId must be 1..128 characters"));if(body.purchase!=="one_box"&&body.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));if(body.intervalDays!==void 0&&(!Number.isInteger(body.intervalDays)||body.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"));if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{product_id:body.productId,purchase:body.purchase,...body.purchase==="subscription"&&body.intervalDays!==void 0?{interval_days:body.intervalDays}:{},success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async startCartCheckout(petRef,body,idempotencyKey){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));let items=body.items;if(!Array.isArray(items)||items.length<1||items.length>CART_MAX)return err(invalid3("items must hold 1..10 lines"));let seen=/* @__PURE__ */new Set;for(let it of items){if(!validRef3(it.productId)||seen.has(it.productId))return err(invalid3("each item needs a productId, once per cart"));if(seen.add(it.productId),it.purchase!=="one_box"&&it.purchase!=="subscription")return err(invalid3("purchase must be one_box or subscription"));let q=it.quantity??1;if(!Number.isInteger(q)||q<1||q>CART_MAX)return err(invalid3("quantity must be a whole number 1..10"));if(it.purchase==="subscription"&&q!==1)return err(invalid3("a subscription line is quantity 1"));if(it.intervalDays!==void 0&&(!Number.isInteger(it.intervalDays)||it.intervalDays<=0))return err(invalid3("intervalDays must be a positive whole number"))}if(!absoluteUrl(body.successUrl)||!absoluteUrl(body.cancelUrl))return err(invalid3("successUrl and cancelUrl must be absolute http(s) URLs"));let res=await funnel.send("healthPlan.checkout.start",{method:"POST",path:`${base2(petRef)}/checkout`,body:{items:items.map(it=>({product_id:it.productId,purchase:it.purchase,...it.purchase==="subscription"&&it.intervalDays!==void 0?{interval_days:it.intervalDays}:{},quantity:it.quantity??1})),success_url:body.successUrl,cancel_url:body.cancelUrl}},{idempotent:true,idempotencyKey:`hp-checkout:${idempotencyKey}`});if(!res.ok)return err(res.error);let session=healthPlanCheckoutSessionFromWire(res.value);return session===null?err(malformed3("healthPlan.checkout.start")):ok(session)},async getCheckout(petRef,checkoutId){if(!validRef3(petRef))return err(invalid3("petRef must be 1..128 characters"));if(!validRef3(checkoutId))return err(invalid3("checkoutId must be 1..128 characters"));let res=await funnel.send("healthPlan.checkout.read",{method:"GET",path:`${base2(petRef)}/checkout/${encodeURIComponent(checkoutId)}`});if(!res.ok)return err(res.error);let state2=healthPlanCheckoutStateFromWire(res.value);return state2===null?err(malformed3("healthPlan.checkout.read")):ok(state2)}}}function createHealthPlanPageRepository(runtime){let over=()=>{let{services:services}=runtime.registry;return createHealthPlanPageRepositoryOver({auth:services.authFor(null),...services.errorPolicy?{errorPolicy:services.errorPolicy}:{}})};return{getPage:(petRef,opts)=>runtime.isDisposed?Promise.resolve(err(disposed3("getPage"))):over().getPage(petRef,opts),startCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCheckout"))):over().startCheckout(petRef,body,key),startCartCheckout:(petRef,body,key)=>runtime.isDisposed?Promise.resolve(err(disposed3("startCartCheckout"))):over().startCartCheckout?.(petRef,body,key)??Promise.resolve(err(disposed3("startCartCheckout"))),getCheckout:(petRef,id)=>runtime.isDisposed?Promise.resolve(err(disposed3("getCheckout"))):over().getCheckout(petRef,id)}}var HEALTH_PLAN_PAGE_SHARE_MS=HEALTH_PLAN_STALE_MS,SHARED_READS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanPageReads@v1");function sharedReads(){let host=globalThis,stored2=host[SHARED_READS_SYMBOL];if(stored2 instanceof WeakMap)return stored2;let made=/* @__PURE__ */new WeakMap;return host[SHARED_READS_SYMBOL]=made,made}function readShared(reader,runtime,userRef,petRef,fresh2){let all=sharedReads(),reads=all.get(runtime);reads===void 0&&(reads=/* @__PURE__ */new Map,all.set(runtime,reads));let map=reads,key=`${userRef}\0${petRef}`,hit=map.get(key);if(!fresh2&&hit!==void 0&&(hit.at===null||Date.now()-hit.at<HEALTH_PLAN_PAGE_SHARE_MS))return hit.promise;let entry={at:null,promise:reader.getPage(petRef).then(res=>(map.get(key)===entry&&(res.ok||isNotFoundError(res.error)?entry.at=Date.now():map.delete(key)),res))};return map.set(key,entry),entry.promise}function useHealthPlanPageRepository(){let{runtime:runtime}=useEverfurContext();return react.useMemo(()=>createHealthPlanPageRepository(runtime),[runtime])}function useHealthPlanPage(options){let{userRef:userRef,runtime:runtime}=useEverfurContext(),own=react.useMemo(()=>createHealthPlanPageReader(runtime),[runtime]),hostRepository=options.repository,repository=hostRepository??own,getPage=react.useCallback((pet,fresh2)=>hostRepository!==void 0||userRef==null?repository.getPage(pet):readShared(own,runtime,userRef,pet,fresh2),[hostRepository,repository,own,runtime,userRef]),{petRef:petRef}=options,enabled=options.enabled!==false&&userRef!=null&&petRef!==null,[state2,setState]=react.useState({phase:"idle",petRef:null,page:null,error:null}),epoch=react.useRef(0),quiet=react.useRef(0),read=react.useCallback(async fresh2=>{let mine=++epoch.current;if(!enabled||petRef===null){setState(prev=>prev.phase==="idle"&&prev.petRef===null?prev:{phase:"idle",petRef:null,page:null,error:null});return}setState(prev=>({phase:"loading",petRef:petRef,page:prev.petRef===petRef?prev.page:null,error:null}));let res=await getPage(petRef,fresh2);mine===epoch.current&&(res.ok?setState({phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}):isNotFoundError(res.error)?setState({phase:"ready",petRef:petRef,page:null,error:null,missing:true,readyAt:Date.now()}):setState({phase:"failed",petRef:petRef,page:null,error:res.error}))},[enabled,petRef,getPage]),load=react.useCallback(()=>read(true),[read]),ready=state2.phase==="ready"&&state2.petRef===petRef,revalidate=react.useCallback(async()=>{if(!enabled||petRef===null||!ready)return;let mine=epoch.current,seq=++quiet.current,res=await getPage(petRef,true);mine!==epoch.current||seq!==quiet.current||!res.ok||setState(prev=>prev.phase==="ready"&&prev.petRef===petRef?{phase:"ready",petRef:petRef,page:res.value,error:null,readyAt:Date.now()}:prev)},[enabled,petRef,ready,getPage]);useHealthPlanRevalidation({lifecycle:options.lifecycle,refreshKey:options.refreshKey,readyAt:ready?state2.readyAt??null:null,revalidate:()=>{revalidate()},refresh:()=>{ready?revalidate():load()}}),react.useEffect(()=>(read(false),()=>{epoch.current+=1}),[read]);let stale=enabled&&state2.petRef!==petRef;return react.useMemo(()=>({phase:stale?"loading":state2.phase,page:stale?null:state2.page,error:stale?null:state2.error,missing:!stale&&state2.missing===true,refresh:load}),[stale,state2,load])}var DEFAULT_PRESENTATION=/* @__PURE__ */Object.freeze({chatAnswerStyle:"cards",chatHistoryStyle:"sheet",chatTopCard:"focus",chatFollowUpCount:3,chatFollowUpsExcludeTelevet:false,chatComposerMic:true,chatComposerUpload:true,safetyDisclaimerPlacement:"composer",healthPlanLayout:"focus_plan",recordsTopRiskLine:true,recordsClearResultsFilter:true,chatComposerStyle:"compact",chatComposerPlaceholder:"pet_name",chatHistoryBar:"scroll",chatGeneralBanner:true,chatSendButton:"always_dark",chatTextingAsk:true}),PRESENTATION_WIRE_NAMES=/* @__PURE__ */Object.freeze({chatAnswerStyle:"chat_answer_style",chatHistoryStyle:"chat_history_style",chatTopCard:"chat_top_card",chatFollowUpCount:"chat_follow_up_count",chatFollowUpsExcludeTelevet:"chat_follow_ups_exclude_televet",chatComposerMic:"chat_composer_mic",chatComposerUpload:"chat_composer_upload",safetyDisclaimerPlacement:"safety_disclaimer_placement",healthPlanLayout:"health_plan_layout",recordsTopRiskLine:"records_top_risk_line",recordsClearResultsFilter:"records_clear_results_filter",chatComposerStyle:"chat_composer_style",chatComposerPlaceholder:"chat_composer_placeholder",chatHistoryBar:"chat_history_bar",chatGeneralBanner:"chat_general_banner",chatSendButton:"chat_send_button",chatTextingAsk:"chat_texting_ask"}),FIELDS=Object.keys(PRESENTATION_WIRE_NAMES),PRESENTATION_LOCK="presentation",PRESENTATION_LOCK_PREFIX="presentation.";var ENUMS={chatAnswerStyle:["bubbles","cards"],chatHistoryStyle:["drawer","sheet"],chatTopCard:["none","focus"],safetyDisclaimerPlacement:["composer","answer_footer"],healthPlanLayout:["standard","focus_plan"],chatComposerStyle:["standard","compact"],chatComposerPlaceholder:["generic","pet_name"],chatHistoryBar:["pinned","scroll"],chatSendButton:["always_dark","dim_when_empty"]},BOOLS=/* @__PURE__ */new Set(["chatFollowUpsExcludeTelevet","chatComposerMic","chatComposerUpload","recordsTopRiskLine","recordsClearResultsFilter","chatGeneralBanner","chatTextingAsk"]);function parseField(field,value){if(value==null)return;let allowed=ENUMS[field];return allowed!==void 0?typeof value=="string"&&allowed.includes(value)?value:void 0:BOOLS.has(field)?typeof value=="boolean"?value:void 0:typeof value=="number"&&Number.isInteger(value)&&value>=0&&value<=3?value:void 0}function parsePresentation(raw){if(raw===null||typeof raw!="object"||Array.isArray(raw))return null;let source=raw,out={};for(let field of FIELDS){let wire=PRESENTATION_WIRE_NAMES[field],value=Object.prototype.hasOwnProperty.call(source,wire)?source[wire]:source[field],parsed=parseField(field,value);parsed!==void 0&&(out[field]=parsed)}return Object.keys(out).length===0?null:/* @__PURE__ */Object.freeze(out)}function isPresentationFieldLocked(field,locked){if(locked==null)return false;let one2=`${PRESENTATION_LOCK_PREFIX}${PRESENTATION_WIRE_NAMES[field]}`;for(let name of locked)if(name===PRESENTATION_LOCK||name===one2)return true;return false}function resolvePresentation(input){let server=parsePresentation(input?.server??null)??{},client=parsePresentation(input?.client??null)??{},locked=input?.locked?[...input.locked]:null,out={};for(let field of FIELDS){let fromServer=server[field],fromClient=isPresentationFieldLocked(field,locked)?void 0:client[field];out[field]=fromClient??fromServer??DEFAULT_PRESENTATION[field]}/* @__PURE__ */
|
|
22
|
-
return Object.freeze(out)}var NO_SNAPSHOT=/* @__PURE__ */Object.freeze({branding:null}),NO_STORE=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>NO_SNAPSHOT});function keyOf(input){return input?Object.keys(input).sort().map(k2=>`${k2}=${String(input[k2])}`).join("&"):""}function useEverfurPresentation(client){return useEverfurPresentationState(client).presentation}function useEverfurPresentationState(client){let{runtime:runtime}=useEverfurContext(),store=runtime?.entitlements??NO_STORE,readBranding=react.useCallback(()=>store.getSnapshot()?.branding??null,[store]),branding=react.useSyncExternalStore(store.subscribe,readBranding,readBranding),clientKey=keyOf(client);return react.useMemo(()=>{let locked=branding?.lockedFields??null;return{presentation:resolvePresentation({server:branding?.presentation??null,locked:locked,client:client??null}),isLocked:field=>isPresentationFieldLocked(field,locked)}},[branding,clientKey])}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state2){return Object.is(props.resetKey,state2.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}function hasLoneSurrogate(value){for(let i=0;i<value.length;i+=1){let code=value.charCodeAt(i);if(code>=55296&&code<=56319){let low=value.charCodeAt(i+1);if(!(low>=56320&&low<=57343))return true;i+=1}else if(code>=56320&&code<=57343)return true}return false}function serverLength(value){return[...value].length}var SPECIES_ALIASES=/* @__PURE__ */Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function canonicalPetSpecies(raw){if(typeof raw!="string")return null;let key=raw.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(SPECIES_ALIASES,key)?SPECIES_ALIASES[key]:null}var LIST_MAX=50,REF_MAX4=128,NAME_MAX=120,SHORT_MAX=120,NOTES_MAX=2e3,FOOD_MAX=120,MICROCHIP_MAX=80,SEXES=/* @__PURE__ */new Set(["male","female","unknown"]),PRECISIONS=/* @__PURE__ */new Set(["day","month","year"]),ACTIVITY=/* @__PURE__ */new Set(["low","medium","high","athletic"]),INDOOR_OUTDOOR=/* @__PURE__ */new Set(["indoor","outdoor","both"]),SEVERITIES=/* @__PURE__ */new Set(["mild","moderate","severe"]),ISO_DATE=/^(\d{4})-(\d{2})-(\d{2})$/,SCALAR_WIRE=[["sex","sex"],["spayedNeutered","spayed_neutered"],["birthDate","birth_date"],["birthDatePrecision","birth_date_precision"],["activityLevel","activity_level"],["indoorOutdoor","indoor_outdoor"],["foodBrand","food_brand"],["foodType","food_type"],["microchipId","microchip_id"]],LIST_WIRE=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];/* @__PURE__ */Object.freeze([...SCALAR_WIRE,...LIST_WIRE].map(([key])=>key));function isRealDate(value){let match=ISO_DATE.exec(value);if(match===null)return false;let[year,month,day]=[Number(match[1]),Number(match[2]),Number(match[3])],date2=new Date(Date.UTC(year,month-1,day));return date2.getUTCFullYear()===year&&date2.getUTCMonth()===month-1&&date2.getUTCDate()===day}var oneOf=allowed=>(field,value)=>typeof value=="string"&&allowed.has(value)?null:`${field} must be one of ${[...allowed].join(", ")}`,boolean=(field,value)=>typeof value=="boolean"?null:`${field} must be true or false`,date=(field,value)=>typeof value=="string"&&isRealDate(value)?null:`${field} must be a real date written YYYY-MM-DD`,text=(max,opts={})=>(field,value)=>{if(typeof value!="string")return`${field} must be a string`;if(hasLoneSurrogate(value))return`${field} contains an unpaired surrogate and cannot be encoded`;let measured=opts.trimmed?value.trim():value;if(opts.required&&measured.length===0)return`${field} is required and must not be blank`;let length=serverLength(measured);return length<=max?null:`${field} is ${length} characters; the server accepts at most ${max}`},SCALAR_CHECKS={sex:oneOf(SEXES),spayedNeutered:boolean,birthDate:date,birthDatePrecision:oneOf(PRECISIONS),activityLevel:oneOf(ACTIVITY),indoorOutdoor:oneOf(INDOOR_OUTDOOR),foodBrand:text(FOOD_MAX),foodType:text(FOOD_MAX),microchipId:text(MICROCHIP_MAX)},REF_FIELD=["ref","ref",false,text(REF_MAX4,{required:true,trimmed:true})],NOTES_FIELD=["notes","notes",false,text(NOTES_MAX,{trimmed:true})],MEDICATION_FIELDS=[REF_FIELD,["name","name",true,text(NAME_MAX,{required:true,trimmed:true})],["dose","dose",false,text(SHORT_MAX,{trimmed:true})],["frequency","frequency",false,text(SHORT_MAX,{trimmed:true})],["startDate","start_date",false,date],["endDate","end_date",false,date],NOTES_FIELD],ITEM_FIELDS={allergies:[REF_FIELD,["allergen","allergen",true,text(NAME_MAX,{required:true,trimmed:true})],["severity","severity",false,oneOf(SEVERITIES)],NOTES_FIELD],medications:MEDICATION_FIELDS,supplements:MEDICATION_FIELDS,conditions:[REF_FIELD,["conditionName","condition_name",true,text(NAME_MAX,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,date],NOTES_FIELD]};function itemToWire(list,index,raw){let at=`${list}[${index}]`;if(typeof raw!="object"||raw===null||Array.isArray(raw))return{error:`${at} must be an object`};let source=raw,item={};for(let[key,wire,isRequired,check]of ITEM_FIELDS[list]){let value=source[key];if(value==null){if(isRequired)return{error:`${at}.${key} is required`};value===null&&(item[wire]=null);continue}let bad=check(`${at}.${key}`,value);if(bad!==null)return{error:bad};item[wire]=value}let start=item.start_date,end=item.end_date;return typeof start=="string"&&typeof end=="string"&&end<start?{error:`${at}.endDate must not be before startDate`}:{item:item}}function listToWire(list,raw){if(!Array.isArray(raw))return{error:`${list} must be an array (send [] to clear it)`};if(raw.length>LIST_MAX)return{error:`${list} has ${raw.length} items; the server accepts at most ${LIST_MAX}`};let items=[],refs=/* @__PURE__ */new Set;for(let index=0;index<raw.length;index+=1){let
|
|
22
|
+
return Object.freeze(out)}var NO_SNAPSHOT=/* @__PURE__ */Object.freeze({branding:null}),NO_STORE=/* @__PURE__ */Object.freeze({subscribe:()=>()=>{},getSnapshot:()=>NO_SNAPSHOT});function keyOf(input){return input?Object.keys(input).sort().map(k2=>`${k2}=${String(input[k2])}`).join("&"):""}function useEverfurPresentation(client){return useEverfurPresentationState(client).presentation}function useEverfurPresentationState(client){let{runtime:runtime}=useEverfurContext(),store=runtime?.entitlements??NO_STORE,readBranding=react.useCallback(()=>store.getSnapshot()?.branding??null,[store]),branding=react.useSyncExternalStore(store.subscribe,readBranding,readBranding),clientKey=keyOf(client);return react.useMemo(()=>{let locked=branding?.lockedFields??null;return{presentation:resolvePresentation({server:branding?.presentation??null,locked:locked,client:client??null}),isLocked:field=>isPresentationFieldLocked(field,locked)}},[branding,clientKey])}var HostRenderBoundary=class extends react.Component{constructor(){super(...arguments);this.state={failed:false,key:this.props.resetKey}}static getDerivedStateFromError(){return{failed:true}}static getDerivedStateFromProps(props,state2){return Object.is(props.resetKey,state2.key)?null:{failed:false,key:props.resetKey}}render(){return this.state.failed?this.props.fallback:this.props.children}};function RenderHost({render:render}){return render()}function HostRender({render:render,fallback:fallback,resetKey:resetKey}){return react.createElement(HostRenderBoundary,{fallback:fallback,resetKey:resetKey,children:react.createElement(RenderHost,{render:render})})}function hasLoneSurrogate(value){for(let i=0;i<value.length;i+=1){let code=value.charCodeAt(i);if(code>=55296&&code<=56319){let low=value.charCodeAt(i+1);if(!(low>=56320&&low<=57343))return true;i+=1}else if(code>=56320&&code<=57343)return true}return false}function serverLength(value){return[...value].length}var SPECIES_ALIASES=/* @__PURE__ */Object.freeze({dog:"dog",canine:"dog",k9:"dog",puppy:"dog",cat:"cat",feline:"cat",kitten:"cat"});function canonicalPetSpecies(raw){if(typeof raw!="string")return null;let key=raw.trim().toLowerCase();return Object.prototype.hasOwnProperty.call(SPECIES_ALIASES,key)?SPECIES_ALIASES[key]:null}var LIST_MAX=50,REF_MAX4=128,NAME_MAX=120,SHORT_MAX=120,NOTES_MAX=2e3,FOOD_MAX=120,MICROCHIP_MAX=80,SEXES=/* @__PURE__ */new Set(["male","female","unknown"]),PRECISIONS=/* @__PURE__ */new Set(["day","month","year"]),ACTIVITY=/* @__PURE__ */new Set(["low","medium","high","athletic"]),INDOOR_OUTDOOR=/* @__PURE__ */new Set(["indoor","outdoor","both"]),SEVERITIES=/* @__PURE__ */new Set(["mild","moderate","severe"]),ISO_DATE=/^(\d{4})-(\d{2})-(\d{2})$/,SCALAR_WIRE=[["sex","sex"],["spayedNeutered","spayed_neutered"],["birthDate","birth_date"],["birthDatePrecision","birth_date_precision"],["activityLevel","activity_level"],["indoorOutdoor","indoor_outdoor"],["foodBrand","food_brand"],["foodType","food_type"],["microchipId","microchip_id"]],LIST_WIRE=[["allergies","allergies"],["medications","medications"],["supplements","supplements"],["conditions","conditions"]];/* @__PURE__ */Object.freeze([...SCALAR_WIRE,...LIST_WIRE].map(([key])=>key));function isRealDate(value){let match=ISO_DATE.exec(value);if(match===null)return false;let[year,month,day]=[Number(match[1]),Number(match[2]),Number(match[3])],date2=new Date(Date.UTC(year,month-1,day));return date2.getUTCFullYear()===year&&date2.getUTCMonth()===month-1&&date2.getUTCDate()===day}var oneOf=allowed=>(field,value)=>typeof value=="string"&&allowed.has(value)?null:`${field} must be one of ${[...allowed].join(", ")}`,boolean=(field,value)=>typeof value=="boolean"?null:`${field} must be true or false`,date=(field,value)=>typeof value=="string"&&isRealDate(value)?null:`${field} must be a real date written YYYY-MM-DD`,text=(max,opts={})=>(field,value)=>{if(typeof value!="string")return`${field} must be a string`;if(hasLoneSurrogate(value))return`${field} contains an unpaired surrogate and cannot be encoded`;let measured=opts.trimmed?value.trim():value;if(opts.required&&measured.length===0)return`${field} is required and must not be blank`;let length=serverLength(measured);return length<=max?null:`${field} is ${length} characters; the server accepts at most ${max}`},SCALAR_CHECKS={sex:oneOf(SEXES),spayedNeutered:boolean,birthDate:date,birthDatePrecision:oneOf(PRECISIONS),activityLevel:oneOf(ACTIVITY),indoorOutdoor:oneOf(INDOOR_OUTDOOR),foodBrand:text(FOOD_MAX),foodType:text(FOOD_MAX),microchipId:text(MICROCHIP_MAX)},REF_FIELD=["ref","ref",false,text(REF_MAX4,{required:true,trimmed:true})],NOTES_FIELD=["notes","notes",false,text(NOTES_MAX,{trimmed:true})],MEDICATION_FIELDS=[REF_FIELD,["name","name",true,text(NAME_MAX,{required:true,trimmed:true})],["dose","dose",false,text(SHORT_MAX,{trimmed:true})],["frequency","frequency",false,text(SHORT_MAX,{trimmed:true})],["startDate","start_date",false,date],["endDate","end_date",false,date],NOTES_FIELD],ITEM_FIELDS={allergies:[REF_FIELD,["allergen","allergen",true,text(NAME_MAX,{required:true,trimmed:true})],["severity","severity",false,oneOf(SEVERITIES)],NOTES_FIELD],medications:MEDICATION_FIELDS,supplements:MEDICATION_FIELDS,conditions:[REF_FIELD,["conditionName","condition_name",true,text(NAME_MAX,{required:true,trimmed:true})],["diagnosedDate","diagnosed_date",false,date],NOTES_FIELD]};function itemToWire(list,index,raw){let at=`${list}[${index}]`;if(typeof raw!="object"||raw===null||Array.isArray(raw))return{error:`${at} must be an object`};let source=raw,item={};for(let[key,wire,isRequired,check]of ITEM_FIELDS[list]){let value=source[key];if(value==null){if(isRequired)return{error:`${at}.${key} is required`};value===null&&(item[wire]=null);continue}let bad=check(`${at}.${key}`,value);if(bad!==null)return{error:bad};item[wire]=value}let start=item.start_date,end=item.end_date;return typeof start=="string"&&typeof end=="string"&&end<start?{error:`${at}.endDate must not be before startDate`}:{item:item}}function listToWire(list,raw){if(!Array.isArray(raw))return{error:`${list} must be an array (send [] to clear it)`};if(raw.length>LIST_MAX)return{error:`${list} has ${raw.length} items; the server accepts at most ${LIST_MAX}`};let items=[],refs=/* @__PURE__ */new Set;for(let index=0;index<raw.length;index+=1){let mapped2=itemToWire(list,index,raw[index]);if("error"in mapped2)return mapped2;let ref=mapped2.item.ref;if(typeof ref=="string"){let key=ref.trim();if(refs.has(key))return{error:`${list}: ref ${JSON.stringify(key)} is used twice; a ref names one item`};refs.add(key)}items.push(mapped2.item)}return{items:items}}function petHealthToWire(input,species){let source=input,body={};for(let[key,wire]of SCALAR_WIRE){let value=source[key];if(value!==void 0){if(value!==null){let bad=SCALAR_CHECKS[key](key,value);if(bad!==null)return{error:bad}}body[wire]=value}}let dateSent=source.birthDate!==void 0,precisionSent=source.birthDatePrecision!==void 0;if(dateSent!==precisionSent||dateSent&&source.birthDate===null!=(source.birthDatePrecision===null))return{error:"birthDate and birthDatePrecision must be sent together, both set or both null"};for(let[key,wire]of LIST_WIRE){let value=source[key];if(value===void 0)continue;let mapped2=listToWire(key,value);if("error"in mapped2)return mapped2;body[wire]=mapped2.items}return Object.keys(body).length>0&&species!==void 0&&canonicalPetSpecies(species)===null?{error:"health fields need a pet Everfur reads as a dog or a cat (dog, canine, k9, puppy, cat, feline, kitten)"}:{body:body}}var str4=value=>typeof value=="string"?value:null,pick=(allowed,value)=>typeof value=="string"&&allowed.has(value)?value:null,bool=value=>typeof value=="boolean"?value:null;function itemsFromWire(raw,map){return Array.isArray(raw)?/* @__PURE__ */Object.freeze(raw.flatMap(row=>{if(typeof row!="object"||row===null||Array.isArray(row))return[];let item=map(row);return item===null?[]:[item]})):/* @__PURE__ */Object.freeze([])}function medicationFromWire(o){let name=str4(o.name);return name===null||name.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(o.ref),name:name,dose:str4(o.dose),frequency:str4(o.frequency),startDate:str4(o.start_date),endDate:str4(o.end_date),notes:str4(o.notes)})}function petHealthFromWire(o){let version=o.profile_version;/* @__PURE__ */
|
|
23
23
|
return Object.freeze({profileVersion:typeof version=="number"&&Number.isInteger(version)&&version>=0?version:0,sex:pick(SEXES,o.sex),spayedNeutered:bool(o.spayed_neutered),birthDate:str4(o.birth_date),birthDatePrecision:pick(PRECISIONS,o.birth_date_precision),activityLevel:pick(ACTIVITY,o.activity_level),indoorOutdoor:pick(INDOOR_OUTDOOR,o.indoor_outdoor),foodBrand:str4(o.food_brand),foodType:str4(o.food_type),microchipId:str4(o.microchip_id),allergies:itemsFromWire(o.allergies,row=>{let allergen=str4(row.allergen);return allergen===null||allergen.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(row.ref),allergen:allergen,severity:pick(SEVERITIES,row.severity),notes:str4(row.notes)})}),medications:itemsFromWire(o.medications,medicationFromWire),supplements:itemsFromWire(o.supplements,medicationFromWire),conditions:itemsFromWire(o.conditions,row=>{let conditionName=str4(row.condition_name);return conditionName===null||conditionName.length===0?null:/* @__PURE__ */Object.freeze({ref:str4(row.ref),conditionName:conditionName,diagnosedDate:str4(row.diagnosed_date),notes:str4(row.notes)})})})}var PET_NAME_MAX=100,PET_SPECIES_MAX=50,PET_BREED_MAX=100,PET_AGE_YEARS_MAX=50,PET_WEIGHT_KG_MAX=500,PET_REF_MAX=128,ERASE_USER_DATA_TIMEOUT_MS=6e4;function invalid4(wireMessage){return makeEverfurError("validationFailed",{retryable:false,wireMessage:wireMessage})}function checkString(field,value,max){if(typeof value!="string")return invalid4(`${field} must be a string`);let length=serverLength(value);return length<=max?null:invalid4(`${field} is ${length} characters; the server accepts at most ${max}`)}function outOfRange(field,value,max){return typeof value=="number"&&Number.isFinite(value)&&value>=0&&value<=max?null:invalid4(`${field} must be a finite number between 0 and ${max}`)}function validate(petRef,profile){if(typeof petRef!="string")return invalid4("pet_ref must be a string");if(petRef.trim().length===0)return invalid4("pet_ref must not be blank");if(hasLoneSurrogate(petRef))return invalid4("pet_ref contains an unpaired surrogate and cannot be encoded");if(profile!=null&&typeof profile!="object")return invalid4("profile must be an object");let checks=[checkString("pet_ref",petRef,PET_REF_MAX)];return profile?.name!==void 0&&checks.push(checkString("name",profile.name,PET_NAME_MAX)),profile?.species!==void 0&&checks.push(checkString("species",profile.species,PET_SPECIES_MAX)),profile?.breed!==void 0&&checks.push(checkString("breed",profile.breed,PET_BREED_MAX)),profile?.ageYears!==void 0&&checks.push(outOfRange("age_years",profile.ageYears,PET_AGE_YEARS_MAX)),profile?.weightKg!==void 0&&checks.push(outOfRange("weight_kg",profile.weightKg,PET_WEIGHT_KG_MAX)),checks.find(c=>c!==null)??null}function healthToWire(source,species){let health=petHealthToWire(source,species);return"error"in health?{error:invalid4(health.error)}:health}function patchToWire(patch){if(typeof patch!="object"||patch===null)return{error:invalid4("patch must be an object")};let p=patch,fields=[["name","name",v=>checkString("name",v,PET_NAME_MAX)],["species","species",v=>checkString("species",v,PET_SPECIES_MAX)],["breed","breed",v=>checkString("breed",v,PET_BREED_MAX)],["ageYears","age_years",v=>outOfRange("age_years",v,PET_AGE_YEARS_MAX)],["weightKg","weight_kg",v=>outOfRange("weight_kg",v,PET_WEIGHT_KG_MAX)]],body={};for(let[key,wire,check]of fields){let value=p[key];if(value!==void 0){if(value!==null){let bad=check(value);if(bad!==null)return{error:bad}}body[wire]=value}}let health=healthToWire(p,p.species);return"error"in health?health:(Object.assign(body,health.body),Object.keys(body).length===0?{error:invalid4("patch must change at least one field")}:{body:body})}function toWire(profile){if(profile==null)return{body:{}};let health=healthToWire(profile,profile.species);return"error"in health?health:{body:{...profile.name!==void 0?{name:profile.name}:{},...profile.species!==void 0?{species:profile.species}:{},...profile.breed!==void 0?{breed:profile.breed}:{},...profile.ageYears!==void 0?{age_years:profile.ageYears}:{},...profile.weightKg!==void 0?{weight_kg:profile.weightKg}:{},...health.body}}}var str5=v=>typeof v=="string"?v:null,num=v=>typeof v=="number"&&Number.isFinite(v)?v:null;function fromWire2(raw,petRef){let o=typeof raw=="object"&&raw!==null?raw:{};/* @__PURE__ */
|
|
24
24
|
return Object.freeze({petRef:str5(o.pet_ref)??petRef,name:str5(o.name),species:str5(o.species),breed:str5(o.breed),ageYears:num(o.age_years),weightKg:num(o.weight_kg)})}function widgetPetFromWire(raw){if(typeof raw!="object"||raw===null)return null;let o=raw,petRef=str5(o.pet_ref);return petRef===null||petRef.length===0?null:/* @__PURE__ */Object.freeze({petId:str5(o.pet_id),petRef:petRef,name:str5(o.name),species:str5(o.species),breed:str5(o.breed),ageYears:num(o.age_years),weightKg:num(o.weight_kg),updatedAt:str5(o.updated_at)})}function widgetPetProfileFromWire(raw){let pet=widgetPetFromWire(raw);return pet===null?null:/* @__PURE__ */Object.freeze({...pet,...petHealthFromWire(raw)})}function petListFromWire(raw){let rows=Array.isArray(raw)?raw:typeof raw=="object"&&raw!==null&&Array.isArray(raw.pets)?raw.pets:[];/* @__PURE__ */
|
|
25
25
|
return Object.freeze(rows.flatMap(row=>{let pet=widgetPetFromWire(row);return pet===null?[]:[pet]}))}function createPetsRepository(auth){return createPetsRepositoryOver(createRequestFunnel({auth:auth}),createRequestFunnel({auth:auth,unaryTimeoutMs:ERASE_USER_DATA_TIMEOUT_MS}))}function createPetsRepositoryOver(funnel,eraseFunnel=funnel){let withSignal=(req,signal)=>signal?{...req,signal:signal}:req,petPath=petRef=>validate(petRef,void 0)??`/widget/v1/pets/${encodeURIComponent(petRef)}`;return{async list(opts){let res=await funnel.send("pets.list",withSignal({method:"GET",path:"/widget/v1/pets"},opts?.signal));return res.ok?ok(petListFromWire(res.value)):err(res.error)},async registerPet(petRef,profile,opts){let invalid5=validate(petRef,profile);if(invalid5!==null)return err(invalid5);let wire=toWire(profile);if("error"in wire)return err(wire.error);let base3={method:"POST",path:`/widget/v1/pets/${encodeURIComponent(petRef)}`,body:wire.body},res=await funnel.send("pets.registerPet",opts?.signal?{...base3,signal:opts.signal}:base3);return res.ok?ok(fromWire2(res.value,petRef)):err(res.error)},async updatePet(petRef,patch,opts){let path=petPath(petRef);if(typeof path!="string")return err(path);let wire=patchToWire(patch);if("error"in wire)return err(wire.error);let res=await funnel.send("pets.updatePet",withSignal({method:"PATCH",path:path,body:wire.body},opts?.signal));return res.ok?ok(fromWire2(res.value,petRef)):err(res.error)},async getPetProfile(petRef,opts){let path=petPath(petRef);if(typeof path!="string")return err(path);let res=await funnel.send("pets.getPetProfile",withSignal({method:"GET",path:`${path}/profile`},opts?.signal));if(!res.ok)return err(res.error);let profile=widgetPetProfileFromWire(res.value);return profile===null?err(makeEverfurError("internalError",{retryable:false,httpStatus:502,wireMessage:"the pet profile response carried no pet_ref"})):ok(profile)},async deletePet(petRef,opts){let path=petPath(petRef);if(typeof path!="string")return err(path);let res=await funnel.send("pets.deletePet",withSignal({method:"DELETE",path:path},opts?.signal));return res.ok?ok(void 0):err(res.error)},async eraseUserData(opts){let res=await eraseFunnel.send("pets.eraseUserData",withSignal({method:"DELETE",path:"/widget/v1/me"},opts?.signal),{maxAttempts:1});return res.ok?ok(void 0):err(res.error)}}}var listeners=/* @__PURE__ */new WeakMap;function subscribePetsChanged(runtime,listener){let set=listeners.get(runtime);return set===void 0&&(set=/* @__PURE__ */new Set,listeners.set(runtime,set)),set.add(listener),()=>{set?.delete(listener)}}function useEverfurPets(){let{runtime:runtime,userRef:userRef,activePet:activePetRef,scopeEpoch:scopeEpoch}=useEverfurContext(),repository=react.useMemo(()=>createPetsRepository(runtime.registry.services.authFor(userRef)),[runtime,userRef,scopeEpoch]),[state2,setState]=react.useState({repository:repository,pets:[],loading:true,error:null}),current=state2.repository===repository?state2:{pets:[],loading:true,error:null},generation=react.useRef(0),load=react.useCallback(async()=>{let request=++generation.current;setState(previous=>({...previous,repository:repository,loading:true,error:null,pets:previous.repository===repository?previous.pets:[]}));let result=await repository.list();request===generation.current&&setState(result.ok?{repository:repository,pets:result.value,loading:false,error:null}:previous=>({repository:repository,pets:previous.repository===repository?previous.pets:[],loading:false,error:result.error}))},[repository]);react.useEffect(()=>(load(),()=>{generation.current+=1}),[load]),react.useEffect(()=>subscribePetsChanged(runtime,()=>{load()}),[runtime,load]);let activePet=react.useMemo(()=>activePetRef===null?null:current.pets.find(pet=>pet.petRef===activePetRef)??null,[activePetRef,current.pets]);return react.useMemo(()=>({pets:current.pets,activePet:activePet,loading:current.loading,error:current.error,refresh:load}),[current.pets,current.loading,current.error,activePet,load])}var freezeInPlace=Object.freeze;function deepFreeze(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value)){freezeInPlace(value);for(let key of Object.keys(value))deepFreeze(value[key])}return value}var TEXT_SCALE_TIER_CAPS=/* @__PURE__ */Object.freeze({content:0,heading:2,control:1.8,compact:1.5,badge:1.3}),SPACE={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32},RADIUS={tile:5,xs:6,sm:10,md:14,lg:20,xl:28,pill:500},TYPE_SIZE={nano:8,small:9,micro:10,tiny:11,caption:13,bodyTight:15,body:17,subtitle:20,heading:22,verdict:24},LINE_HEIGHT={tight:1.15,snug:1.3,normal:1.4,relaxed:1.55},WEIGHT={regular:"400",medium:"500",bold:"700"},LETTER_SPACING={eyebrow:1,monoWide:.9,headerBrand:-.42,tight:-.35},DEFAULT_MAX_FONT_SCALE=0,SYSTEM_FONT_FAMILY="System",SYSTEM_MONO_FAMILY="monospace",TIERS=["content","heading","control","compact","badge"];function authoredTierSizes(size){let out={};for(let tier of TIERS)out[tier]=size;return out}var NO_FONT_SOURCES=[];function baseType(){return{family:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,fontUrl:null,families:{regular:SYSTEM_FONT_FAMILY,medium:SYSTEM_FONT_FAMILY,bold:SYSTEM_FONT_FAMILY,mono:SYSTEM_MONO_FAMILY,monoMedium:SYSTEM_MONO_FAMILY,monoBold:SYSTEM_MONO_FAMILY},namedFaces:{regular:false,medium:false,bold:false,mono:false,monoMedium:false,monoBold:false},fontUrls:{},size:TYPE_SIZE,tierSizes:authoredTierSizes(TYPE_SIZE),lineHeight:LINE_HEIGHT,weight:WEIGHT,letterSpacing:LETTER_SPACING,scale:1,maxScale:DEFAULT_MAX_FONT_SCALE,scaleCaps:TEXT_SCALE_TIER_CAPS,headingFamily:null,headingWeight:null,fontSources:NO_FONT_SOURCES}}var NO_SLOTS={},EASING_CURVES=/* @__PURE__ */Object.freeze({standard:/* @__PURE__ */Object.freeze([.2,0,0,1]),emphasized:/* @__PURE__ */Object.freeze([.2,.8,.2,1]),exit:/* @__PURE__ */Object.freeze([.4,0,1,1])});function cssCubicBezier(curve2){return`cubic-bezier(${curve2.join(", ")})`}var MOTION={duration:{instant:80,fast:140,normal:220,slow:320},spring:{gentle:{damping:18,stiffness:200}},easing:{standard:cssCubicBezier(EASING_CURVES.standard),emphasized:cssCubicBezier(EASING_CURVES.emphasized),exit:cssCubicBezier(EASING_CURVES.exit)},reducedMotion:false},LIGHT_COLOR={brand:"#10462E",brandSoft:"rgba(16,70,46,0.10)",brandSofter:"rgba(16,70,46,0.15)",brandBorder:"rgba(16,70,46,0.18)",borderHairlineGreen:"rgba(16,70,46,0.25)",brandBorderStrong:"rgba(16,70,46,0.55)",brandInk:"#10462E",linkInk:"#10462E",surface:"#FFFFFF",surfaceCream:"#FFFFFF",surfaceSubtle:"#F1F5F2",background:"#FFFFFF",borderRingCream:"#E4E4E4",chatGround:"#FFFFFF",composerFill:"#FFFFFF",composerBorder:"rgba(16,70,46,0.75)",shadow:"#0B3421",text:{primary:"#000000",secondary:"#0E462E",muted:"#6B6B6B",placeholder:"rgba(61,61,61,0.75)",onBrand:"#FFFFFF",metaCool:"#3D3D3D",timestamp:"rgba(61,61,61,0.75)"},primary:"#10462E",onPrimary:"#FFFFFF",accent:"#10462E",onAccent:"#FFFFFF",accentEdge:"#07C168",success:"#07C168",danger:"#C03410",onDanger:"#FFFFFF",errorRed:"#C03410",warningStrong:"#A45610",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.12)",badgeBgCaution:"rgba(217,130,29,0.14)",badgeBgCritical:"rgba(192,52,16,0.06)",badgeBgNeutral:"rgba(107,107,107,0.12)",bubbleUser:"#10462E",bubbleAssistant:"#FFFFFF",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#E9F1E9",scanButtonPink:"#FFC3BC",highlight:"#FFC3BC",onHighlight:"#000000",mark:"#07C168",controlEdge:"rgba(16,70,46,0.18)",structureEdge:"rgba(16,70,46,0.25)",primaryEdge:"#10462E",checkupCardLowRiskBg:"rgba(7,193,104,0.10)",checkupCardConcernBg:"rgba(239,167,0,0.10)",info:"#10462E",badgeBgInfo:"rgba(16,70,46,0.10)",infoEdge:"rgba(16,70,46,0.25)"},EVERFUR_LIGHT=deepFreeze({brightness:"light",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:LIGHT_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS}),DARK_COLOR={brand:"#6BD39A",brandSoft:"rgba(107,211,154,0.12)",brandSofter:"rgba(107,211,154,0.18)",brandBorder:"rgba(107,211,154,0.22)",borderHairlineGreen:"rgba(107,211,154,0.28)",brandBorderStrong:"rgba(107,211,154,0.55)",brandInk:"#6BD39A",linkInk:"#6BD39A",surface:"#1C1F23",surfaceCream:"#23272C",surfaceSubtle:"#23272C",background:"#15171A",borderRingCream:"#3A3F45",chatGround:"#1C1F23",composerFill:"#23272C",composerBorder:"rgba(107,211,154,0.75)",shadow:"#000000",text:{primary:"#F5F3F0",secondary:"#A9E4C4",muted:"#9A9A9A",placeholder:"rgba(255,255,255,0.55)",onBrand:"#0E1F17",metaCool:"#C9C9C9",timestamp:"rgba(245,243,240,0.7)"},primary:"#6BD39A",onPrimary:"#0E1F17",accent:"#6BD39A",onAccent:"#0E1F17",accentEdge:"#34D888",success:"#07C168",danger:"#F87171",onDanger:"#0E1F17",errorRed:"#FF6B5B",warningStrong:"#F0A35E",cautionAccent:"#D9821D",riskConcern:"#EFA700",sentiment:{up:"#07C168",neutral:"#FBC558",down:"#FF1B00"},badgeBgPositive:"rgba(7,193,104,0.18)",badgeBgCaution:"rgba(217,130,29,0.20)",badgeBgCritical:"rgba(185,28,28,0.22)",badgeBgNeutral:"rgba(255,255,255,0.10)",bubbleUser:"#6BD39A",bubbleAssistant:"#1C1F23",bubbleVet:"#FFC3BC",onBubbleVet:"#000000",skeleton:"#23272C",scanButtonPink:"#FFC3BC",highlight:"#605051",onHighlight:"#F5F3F0",mark:"#07C168",controlEdge:"rgba(107,211,154,0.22)",structureEdge:"rgba(107,211,154,0.28)",primaryEdge:"#6BD39A",checkupCardLowRiskBg:"rgba(7,193,104,0.16)",checkupCardConcernBg:"rgba(239,167,0,0.16)",info:"#6BD39A",badgeBgInfo:"rgba(107,211,154,0.12)",infoEdge:"rgba(107,211,154,0.28)"},EVERFUR_DARK=deepFreeze({brightness:"dark",highContrast:false,meta:{displayName:"Everfur",logoUrl:null,placeholder:null,hidePoweredBy:false,assistantAvatarUrl:null},color:DARK_COLOR,space:SPACE,radius:RADIUS,type:baseType(),motion:MOTION,slots:NO_SLOTS});var EVERFUR_THEME_CONTEXT_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#EverfurThemeContext@v1"),globalThemeHost=globalThis,EverfurThemeContext=globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]??(globalThemeHost[EVERFUR_THEME_CONTEXT_SYMBOL]=react.createContext(EVERFUR_LIGHT));EverfurThemeContext.displayName??="EverfurThemeContext";function useEverfurTheme(){return react.useContext(EverfurThemeContext)}function tierMultiplier(type,tier){let cap2=type.scaleCaps[tier];return cap2>0?cap2:void 0}function Text({tier:tier="content",...props}){let{type:type}=useEverfurTheme(),cap2=tierMultiplier(type,tier);return react.createElement(reactNative.Text,cap2===void 0?props:{maxFontSizeMultiplier:cap2,...props})}react.forwardRef(function(props,ref){return react.createElement(reactNative.TextInput,{...props,...ref===null?{}:{ref:ref}})});var REQUIRES=/* @__PURE__ */Object.freeze({chat:/* @__PURE__ */Object.freeze(["chat.message.create"]),records:/* @__PURE__ */Object.freeze(["records.upload.create","records.record.read"]),recordsClinic:/* @__PURE__ */Object.freeze(["records.clinic.create"]),video:/* @__PURE__ */Object.freeze(["video.gait.execute"]),photo:/* @__PURE__ */Object.freeze(["photo.checkup.execute"]),animations:/* @__PURE__ */Object.freeze(["animations.state.read"]),televet:/* @__PURE__ */Object.freeze(["televet.visit.create"]),texting:/* @__PURE__ */Object.freeze(["sms.identity.read","sms.identity.update"]),healthPlan:/* @__PURE__ */Object.freeze(["shop.plan.read","shop.plan.update"])});function requires(name){return REQUIRES[name]}function decideCapability(name,decisions,opts){let keys=requires(name),byResource=/* @__PURE__ */new Map;for(let decision of decisions)byResource.set(decision.resource,decision);if(opts?.isPending===true&&keys.some(key=>!byResource.has(key)))return freezeDecision({name:name,enabled:false,isPending:true,limits:{}});let limits=mergeLimits(keys,byResource);return keys.filter(key=>byResource.get(key)?.granted!==true).length===0?freezeDecision({name:name,enabled:true,isPending:false,limits:limits}):freezeDecision({name:name,enabled:false,isPending:false,limits:limits,disabled:disabledFor(keys,byResource)})}function mergeLimits(keys,byResource){let out={};for(let key of keys){let decisionLimits=byResource.get(key)?.limits;if(decisionLimits)for(let[limitKey,limitValue]of Object.entries(decisionLimits)){let existing=out[limitKey];out[limitKey]=existing===void 0?limitValue:Math.min(existing,limitValue)}}return out}function disabledFor(keys,byResource){for(let key of keys){let explicit=byResource.get(key)?.disabled;if(explicit)/* @__PURE__ */
|
|
@@ -32,19 +32,48 @@ return jsxRuntime.jsxs(reactNative.View,{style:[styles25.bar,style],accessibilit
|
|
|
32
32
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:styles25.labelRow,children:[
|
|
33
33
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles25.label,children:HEALTH_PLAN_TEMPLATES.cartLabel(theme.meta.displayName)}),cart.count>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:styles25.count,accessibilityElementsHidden:true,importantForAccessibility:"no",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:styles25.countLabel,children:String(cart.count)})}):null]}),cart.count===0?/* @__PURE__ */jsxRuntime.jsx(Text,{style:styles25.line,children:HEALTH_PLAN_COPY.cartEmpty}):subtotal===null?null:/* @__PURE__ */jsxRuntime.jsxs(Text,{style:styles25.line,children:[HEALTH_PLAN_COPY.subtotal," ",subtotal]})]}),onCheckout===void 0?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>{trackCheckoutStarted(telemetry,petRef,cart),onCheckout(cart.items)},disabled:disabled,accessibilityRole:"button",accessibilityLabel:HEALTH_PLAN_COPY.checkout,accessibilityState:{disabled:disabled,busy:busy},style:[styles25.checkout,disabled?styles25.dimmed:null],testID:"health-plan-checkout",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:styles25.checkoutLabel,children:HEALTH_PLAN_COPY.checkout})})]})}function makeStyles2(theme){let{color:color,radius:radius,space:space,type:type,slots:slots}=theme,ink=slots.cartBar?.textColor??color.text.onBrand,fill=slots.cartBar?.backgroundColor??color.brandInk,text2=(size,tint,weight)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*type.lineHeight.snug),color:tint});return reactNative.StyleSheet.create({bar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:space.md,paddingHorizontal:space.lg,paddingVertical:space.md,borderRadius:radius.lg,backgroundColor:color.brand,...slotBox(slots.cartBar)},copy:{flex:1,gap:2},labelRow:{flexDirection:"row",alignItems:"center",gap:space.sm},label:text2(type.size.body,ink,"bold"),count:{minWidth:22,height:22,paddingHorizontal:space.xs,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:ink},countLabel:text2(type.size.caption,fill,"bold"),line:text2(type.size.caption,ink,"regular"),checkout:{minHeight:44,paddingHorizontal:space.lg,borderRadius:radius.pill,alignItems:"center",justifyContent:"center",backgroundColor:ink},checkoutLabel:text2(type.size.body,fill,"bold"),dimmed:{opacity:.5}})}var SHEET_MOTION={in:320,out:220,inCurve:"drawer",outCurve:"out"},SCRIM_MOTION={in:240,out:200,inCurve:"ease",outCurve:"ease"},PUSH_MOTION={in:300,out:220,inCurve:"drawer",outCurve:"out"},TOAST_MOTION={in:220,out:160,inCurve:"out",outCurve:"out"},FADE_MOTION={in:160,out:160,inCurve:"ease",outCurve:"ease"},curves={};function curve(name){let made=curves[name];if(made!==void 0)return made;let[a,b,c,d]=name==="drawer"?[.32,.72,0,1]:name==="out"?[.23,1,.32,1]:[.25,.1,.25,1],built=reactNative.Easing.bezier(a,b,c,d);return curves[name]=built,built}function run(values,motions,open,done){let left=motions.length,drivers=motions.map((m,i)=>reactNative.Animated.timing(values[i],{toValue:open?1:0,duration:open?m.in:m.out,easing:curve(open?m.inCurve:m.outCurve),useNativeDriver:true}));for(let d of drivers)d.start(({finished:finished})=>{left-=1,finished&&left===0&&done()});return()=>{for(let d of drivers)d.stop()}}function PlanLinger({draw:draw,motions:motions}){let open=draw!==null,[kept,setKept]=react.useState(null);open&&kept?.draw!==draw&&setKept({draw:draw});let a=react.useRef(new reactNative.Animated.Value(0)).current,b=react.useRef(new reactNative.Animated.Value(0)).current,values=[a,b];react.useEffect(()=>{if(!(!open&&kept===null))return run(values,motions,open,()=>{open||setKept(null)})},[open]);let current=draw??kept?.draw;return current===void 0?null:current(values)}function PlanPushes({id:id,depth:depth,node:node,width:width,paper:paper,still:still}){let[at,setAt]=react.useState({id:id,depth:depth,node:node,leaving:null}),moved=id!==at.id;(moved||node!==at.node)&&setAt({id:id,depth:depth,node:node,leaving:moved?depth<at.depth?at.node:null:at.leaving});let enter=react.useRef(new reactNative.Animated.Value(1)).current,exit=react.useRef(new reactNative.Animated.Value(1)).current,motion=still?FADE_MOTION:PUSH_MOTION,last=react.useRef(depth);react.useLayoutEffect(()=>{let from=last.current;if(last.current=depth,depth>from)return enter.setValue(0),run([enter],[motion],true,()=>{});if(depth!==from)return exit.setValue(1),run([exit],[motion],false,()=>setAt(s=>({...s,leaving:null})))},[id]);let look=v=>still?{opacity:v}:{transform:[{translateX:v.interpolate({inputRange:[0,1],outputRange:[width,0]})}]};/* @__PURE__ */
|
|
34
34
|
return jsxRuntime.jsxs(reactNative.View,{children:[
|
|
35
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:look(enter),children:node}),at.leaving===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:paper},look(exit)],children:at.leaving})]})}var everfurTokens=/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({efDarkGreen:"#10462E",efWhite:"#FFFFFF",efBlack:"#000000",efDustyPink:"#FFC3BC",efBrightGreen:"#07C168",efYellow:"#F2C763",efDustyBlue:"#A8B9DA",efSkyBlue:"#4E98C9",efCharcoal:"#3D3D3D",efIconHoney:"#926F06",efIconLeaf:"#16864A",efIconSky:"#1E7AB7",efIconTeal:"#05827E",efIconCocoa:"#865B3F",efIconNavy:"#223E80",efIconBerry:"#B6407F",efIconAmber:"#B25E05",efIconMoss:"#5E7E1E",efIconSlate:"#5A6087",efIconRose:"#CA4463",efRedDeep:"#6D1D14",efRedBright:"#C03410",bg:"#FFFFFF",bgBrand:"#10462E",bgAccent:"#FFC3BC",bgAccentB2b:"#A8B9DA",bgWarm:"#F2C763",text:"#000000",textBrand:"#10462E",textOnBrand:"#FFFFFF",textCta:"#07C168",textMuted:"#6B6B6B",bgMist:"#F1F5F2",border:"#E4E4E4",borderStrong:"#3D3D3D",hi:"#DAF6E8",hiStrong:"#ABEACC",hiEdge:"#0B8A4E",now:"#0C844B",alert:"#C03410",alertDeep:"#6D1D14",btnPrimaryBg:"#10462E",btnPrimaryText:"#FFFFFF",btnSecondaryBg:"rgba(0, 0, 0, 0)",btnSecondaryText:"#10462E",btnSecondaryBorder:"#10462E",mixMint:"#7FE8AE",mixLegal:"#A9C4B5",mixPromptGreen:"#BFEFD8",mixPromptYellow:"#F7DC9E",mixRx:"#E0E6F2",mixShelf:"#F3F3F3",mixEar:"#F09FA3",efBone:"#FAF9F6",efTennisBall:"#DCEF5A",efFawn:"#E8CAA4",efPine:"#12301F",efPine70:"rgba(18, 48, 31, 0.72)",efLiver:"#7A4330",efMerle:"#AEB8C1",efNose:"#E9B6A6"}),font:/* @__PURE__ */Object.freeze({family:/* @__PURE__ */Object.freeze({base:'Azeret, "Helvetica Neue", Arial, sans-serif',mono:'"Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace'}),size:/* @__PURE__ */Object.freeze({xs:13,sm:15,md:17,lg:20,xl:24,"2xl":32,"3xl":40,"4xl":56}),lineHeight:/* @__PURE__ */Object.freeze({body:1.55,display:1.15}),weight:/* @__PURE__ */Object.freeze({regular:400,medium:500,bold:700})}),space:/* @__PURE__ */Object.freeze({1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64,9:96}),radius:/* @__PURE__ */Object.freeze({sm:6,md:10,lg:20,xl:28,pill:999}),shadow:/* @__PURE__ */Object.freeze({sm:/* @__PURE__ */Object.freeze({x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}),md:/* @__PURE__ */Object.freeze({x:0,y:4,blur:16,spread:0,color:"rgba(16, 70, 46, 0.08)"})}),layout:/* @__PURE__ */Object.freeze({container:1200,containerNarrow:720}),motion:/* @__PURE__ */Object.freeze({easing:/* @__PURE__ */Object.freeze({out:/* @__PURE__ */Object.freeze([.23,1,.32,1]),inOut:/* @__PURE__ */Object.freeze([.77,0,.175,1]),drawer:/* @__PURE__ */Object.freeze([.32,.72,0,1]),expo:/* @__PURE__ */Object.freeze([.16,1,.3,1]),bark:/* @__PURE__ */Object.freeze([.34,1.56,.64,1])}),duration:/* @__PURE__ */Object.freeze({press:160,fade:200,enter:300,sheet:420,sheetOut:240,draw:900})}),web:/* @__PURE__ */Object.freeze({serif:'Azeret, "Helvetica Neue", Arial, sans-serif',sans:'Azeret, "Helvetica Neue", Arial, sans-serif',tSmall:14,max:1312}),role:/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({ink:"#10462E",go:"#07C168",muted:"#6B6B6B",line:"#E4E4E4",pink50:"#FFE1DE",tintSage:"#E6ECE8",tintPink:"#FFEAE8",tintPinkSoft:"#FFF6F5",tintBlue:"#EAEEF6",tintYellow:"#FCF0D6",tintYellowEdge:"#F6D892",tintRed:"#FBF1EE",tintGo:"#DCF6EA",icoGrey:"#6B6B6B",icoSage:"#819E90",icoBlue:"#4E98C9",icoWarm:"#D6D0C2",icoAmber:"#B67B3F",amberText:"#A05E32",wxSun:"#F2C763",wxSunEdge:"#D5AD47",wxCloud:"#FFFFFF",wxCloudEdge:"#DEDEDE",wxCloudDark:"#EAEAEA",wxCloudDarkEdge:"#C5C5C5",wxRain:"#75AFD5",wxSnow:"#AFD1E7",wxMist:"#D4D4D4",cwShelf:"#FFFFFF",cwShelfDeep:"#F1F4F2",cwRx:"#E0E6F2",cwRxInk:"#5A6087",cwEdgeC:"#C6D3CD",nItch:"#CA4463",nJoints:"#5E7E1E",nItchC:"#FFC3BC",nJointsC:"#D8E0C9",lvlGood:"#77DDAC",lvlOk:"#F4CF7A",lvlHot:"#DC8F7C",lvlStorm:"#8DA4BB",mapLand:"#F5F5F5",mapEdge:"#EAEAEA",mapPark:"#D7F5E7",mapWater:"#D8E0EE",mapSand:"#FCF3DD"}),size:/* @__PURE__ */Object.freeze({max:1440,gutter:16,sideW:220,cardPad:16,barH:48,tabH:58,dock:64,side:16,stackGap:12})})});var everfurMetrics={button:{ink:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},go:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},outline:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:400,lineHeight:1,iconSize:24},pink:{fill:true,minHeight:60,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:18,fontWeight:700,lineHeight:1,iconSize:24},danger:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1.55,iconSize:20},inkSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},goSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},outlineSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:400,lineHeight:1,iconSize:20},pinkSm:{fill:true,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},row:{fill:false,minHeight:36,paddingX:14,gap:8,borderWidth:1,ring:false,fontSize:14,fontWeight:400,lineHeight:1,iconSize:17},outlineInSheetWeight:700,money:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"pink",fg:"ink",edgeColor:"ink"},moneySm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"pink",fg:"ink",edgeColor:"ink"},warn:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"none",fg:"alertDeep",edgeColor:"alert"},warnSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"none",fg:"alertDeep",edgeColor:"alert"},text:{fontSize:15,fontWeight:700,lineHeight:1.4,color:"ink",pressOpacity:.6}},pill:{minHeight:24,paddingX:10,fontSize:12,fontWeight:700,lineHeight:1,letterSpacing:.72,ring:{soon:1.25,overdue:1.25,clear:1.5,later:1.25,plain:1.5,new:1.5},plainRingAlpha:.2,dot:6,dotGap:6,allergyDot:{size:6,gap:6,color:"alert"},mono:true,upper:true,tones:{rx:{bg:"#E0E6F2",fg:"ink",ring:0,ringColor:"ink"},soon:{bg:"surface",fg:"ink",ring:1.25,ringColor:"tintYellowEdge"},overdue:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},clear:{bg:"surface",fg:"go",ring:1.5,ringColor:"go"},stable:{bg:"tintGo",fg:"ink",ring:0,ringColor:"ink"},later:{bg:"surface",fg:"muted",ring:1.25,ringColor:"line"},plain:{bg:"surface",fg:"ink",ring:1.5,ringColor:"ink/0.2"},new:{bg:"surface",fg:"ink",ring:1.5,ringColor:"go"},pink:{bg:"tintPink",fg:"ink",ring:0,ringColor:"ink"},watch:{bg:"#F9E6B9",fg:"ink",ring:0,ringColor:"ink"},high:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},allergy:{bg:"surface",fg:"alertDeep",ring:1.25,ringColor:"alert"}}},chip:{minHeight:42,paddingX:16,gap:8,borderWidth:1,fontSize:15,fontWeight:500,lineHeight:1.3},card:{padding:16,radius:20,borderWidth:1,titleSize:18,titleWeight:700,titleLineHeight:1.25,titleTracking:-.36,titleGap:12,leadSize:15,leadLineHeight:1.5,leadGap:12,headGapX:16,headGapY:8,headGap:12,bodySize:17,bodyLineHeight:1.55,ghost:{borderStyle:"dashed",borderColor:"#B9C9C2"}},sectionHeader:{gapX:12,gapY:8,marginTop:8},kicker:{fontSize:12,fontWeight:700,lineHeight:1.55,letterSpacing:.96,gap:8},quantityStepper:{borderWidth:1,borderColor:"line",ring:false,button:40,icon:18,valueMinWidth:28,offColor:"line",offOpacity:1,valueSize:17,valueWeight:700,valueLineHeight:1.55},tabs:{minHeight:44,gap:6,fontSize:15,fontWeight:500,currentWeight:700,lineHeight:1.55,indicator:3,hairline:1,dot:7},sheet:{radius:28,grabHeight:20,grabBarWidth:36,grabBarHeight:5,grabBarRadius:3,headPaddingTop:4,headPaddingX:16,headPaddingBottom:12,headGap:12,titlesGap:2,titleSize:18,close:36,closeIcon:20,bodyGap:12,bodyPaddingX:16,bodyPaddingBottom:24,actsGap:12,actsMarginTop:4},empty:{gap:8,titleSize:22,titleWeight:500,titleLineHeight:1.2,titleTracking:-.33,leadSize:15,leadLineHeight:1.5,actsGap:12,actsMarginTop:12,buttonMinWidth:200,linkMinHeight:44,linkPaddingX:4,linkSize:15,linkWeight:700,linkUnderlineOffset:3},skeleton:{gap:10,lineHeight:12,widths:[100,82,64]},summary:{paddingX:24,paddingY:0,radius:20,borderWidth:1,background:"surface",shadow:{color:"",x:0,y:0,blur:0,spread:0},rowDivider:1,rowMinHeight:0,rowCenter:false,rowPaddingY:14,termColor:"muted",valueColor:"ink",tabular:false,totalRowMinHeight:0,totalTermSize:15,totalTermWeight:400,totalTermColor:"muted",totalWeight:700,rowGapX:16,rowGapY:2,termSize:15,termLineHeight:1.55,valueSize:15,valueWeight:700,valueLineHeight:1.4,totalSize:20,totalLineHeight:1.4,off:{shown:true,size:15,weight:700,lineHeight:21,color:"go",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},icon:{size:24},timeline:{row:{shown:true,w:361,h:69.281,padding:[0,0,24,0],marginTop:0,marginBottom:0,gap:[16,16],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},done:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"ink",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"surface",fit:"cover",x:0,y:0,dy:0},now:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},next:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},nowInner:{size:10,color:"go"},check:{shown:true,w:16,h:16,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},lineDoneDone:{x:13,top:30,bottom:2,width:2,color:"ink"},lineDoneNow:{x:13,top:30,bottom:2,width:2,color:"ink"},lineNowNext:{x:13,top:30,bottom:2,width:2,color:"line"},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},head:{shown:true,w:317,h:27,padding:[3,0,0,0],marginTop:0,marginBottom:0,gap:[8,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},nextTitle:{shown:true,size:17,weight:700,lineHeight:22.1,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},when:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},thumbnail:{xs:{frame:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},img:{shown:false,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},sm:{frame:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},md:{frame:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:156,h:156,padding:[10,10,10,10],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},lg:{frame:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:174.5,h:174.5,padding:[14,14,18,14],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false}},text:{display:{shown:true,size:40,weight:500,lineHeight:39.2,color:"ink",tracking:-1.2,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},headline:{shown:true,size:30,weight:500,lineHeight:33,color:"ink",tracking:-.45,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:22,weight:500,lineHeight:26.4,color:"ink",tracking:-.33,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},heading:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},lead:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},meta:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"mono",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},caption:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},overline:{shown:true,size:12,weight:700,lineHeight:16.8,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},kicker:{shown:true,size:12,weight:700,lineHeight:18.6,color:"muted",tracking:.96,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},field:{gap:6,label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},input:{shown:true,w:361,h:52,padding:[0,16,0,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},focusEdge:"ink",errorEdge:"alert",value:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:1},valueInset:[2,1],icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},area:{shown:true,w:361,h:158,padding:[12,16,12,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},areaValue:{shown:true,size:17,weight:400,lineHeight:25.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:2},areaValueMinHeight:132,areaInset:[2,2],hint:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},error:{shown:true,size:15,weight:400,lineHeight:21.75,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},placeholder:"muted"},checkbox:{row:{shown:true,w:361,h:45,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},labelX:34,box:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"ink",edge:{width:1,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},tick:{w:5,h:10,stroke:2,color:"surface",rotate:45,dy:-1},label:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},boxed:{shown:true,w:361,h:50.5,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"bgMist",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0}},choice:{row:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},selected:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"pink",edge:{width:1,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},radio:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},radioOn:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:6,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},textX:34,title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},strut:26.35,meta:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},end:{shown:true,size:13,weight:400,lineHeight:20.15,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},group:{gap:8,legend:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},legendPaddingX:2,legendGap:0}},switch:{track:{shown:true,w:48,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"#D0D6D3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:"ink",thumb:{size:22,inset:3,travel:20,color:"surface",shadow:{color:"rgba(16, 70, 46, 0.06)",x:0,y:1,blur:2,spread:0}}},iconButton:{bare:{shown:true,w:44,h:44,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[22,22],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},bareIcon:22,offColor:"line",ring:{shown:true,w:36,h:36,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[18,18],bg:"surface",edge:{width:1,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},ringIcon:18,ringPressed:"tintSage",ringPressScale:.94},link:{text:{shown:true,size:17,weight:400,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},danger:{shown:true,size:15,weight:700,lineHeight:23.25,color:"alert",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},inline:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},lists:{rows:{row:{shown:true,w:327,h:94.781,padding:[16,0,16,0],marginTop:0,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},tiles:{list:{shown:true,w:343,h:175.813,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},outdent:8,row:{shown:true,w:343,h:62.281,padding:[10,8,10,8],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},leading:22,leadingFace:40,icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},text:{shown:true,w:261,h:42.281,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[2,2],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},pressed:"#EDF2EF",alert:{bg:"tintRed",icon:"alert",title:"alertDeep",subtitle:"alert"}},end:{text:{shown:true,size:15,weight:400,lineHeight:23.25,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},gap:8,chevron:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#819D90",fit:"cover",x:0,y:0,dy:0}},section:{title:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},titleGap:12,head:{shown:true,w:361,h:22.5,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[12,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},note:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:12,paddingTop:0}},avatar:{sizes:{xs:20,sm:36,md:48,lg:64,xl:128},face:40,bg:"surface",edge:{width:1,color:"line",ring:true},initials:{shown:true,size:15,weight:700,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},initialsXs:{shown:true,size:9,weight:700,lineHeight:13.95,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tints:{default:"tintPink",pink:"#FFCFC9",blue:"#C2CEE5",yellow:"#F6D78F",sage:"#C6D3CD"},ring:{width:2,offset:2,color:"go"},ringXl:{width:3,offset:4,color:"go"},dot:{size:12,edge:2,edgeColor:"surface"}},stack:{size:28,overlap:-8,initialsSize:12,halo:{width:2,color:"surface"}},banner:{box:{shown:true,w:361,h:155.391,padding:[16,16,16,16],marginTop:0,marginBottom:0,gap:[12,4],minHeight:0,radius:[20,20],bg:"#F1F5F2",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},iconRows:3,kicker:{shown:true,size:12,weight:700,lineHeight:16.8,color:"#5B5B5B",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:295,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tones:{info:{bg:"#F1F5F2",icon:"ink"},success:{bg:"tintGo",icon:"ink"},warn:{bg:"#FCF0D6",icon:"#926F06"},danger:{bg:"tintRed",icon:"alert"}}},toast:{box:{shown:true,w:200.281,h:40.25,padding:[10,16,10,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:15,weight:400,lineHeight:20.25,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:10},inset:16,rise:8,fade:200,hold:2600},spinner:{size:16,border:2,turn:700,openSide:true,reducedOpacity:.5},progress:{track:{shown:true,w:361,h:4,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"line",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},fill:"go",move:300},divider:{width:1,color:"line",label:{shown:true,size:12,weight:400,lineHeight:18.6,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},labelGap:12,labelLine:{width:1,color:"line"}},errorInline:{text:{shown:true,size:15,weight:400,lineHeight:21,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:361,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},linkPressedOpacity:.6},variants:{drawer:{frame:{shown:true,w:393,h:226.594,padding:[10,20,40,20],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[28,0],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:293.406,dy:0},maxHeight:.8,grab:{shown:true,w:40,h:5,padding:[0,0,0,0],marginTop:0,marginBottom:10,gap:[0,0],minHeight:0,radius:[2.5,2.5],bg:"#DAD7D1",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},top:{shown:true,w:353,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},kicker:{shown:true,size:11,weight:400,lineHeight:16.5,color:"muted",tracking:.88,face:"mono",upper:true,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},close:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},closeEnd:-8,closeIcon:22,title:{shown:true,size:24,weight:800,lineHeight:27.6,color:"ink",tracking:-.24,face:"serif",upper:false,wrap:"balance",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,w:353,h:82,padding:[0,0,0,0],marginTop:12,marginBottom:0,gap:[10,10],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:16,weight:400,lineHeight:24,color:"text",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},scrim:"ink/0.38",motion:{enterMs:320,enterEasing:[.32,.72,0,1],exitMs:220,exitEasing:[.23,1,.32,1],scrimEnterMs:240,scrimExitMs:200,scrimEasing:[.25,.1,.25,1]}},button:{ink:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:0,ring:false,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},outline:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:1.5,ring:true,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},sm:{fill:false,minHeight:40,paddingX:16,gap:8,borderWidth:1.5,ring:true,fontSize:15,fontWeight:700,lineHeight:1.5,iconSize:20},lg:{fill:false,minHeight:56,paddingX:28,gap:8,borderWidth:0,ring:false,fontSize:17,fontWeight:700,lineHeight:1.5,iconSize:20},disabledOpacity:.32,press:.97,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"},segmented:{track:{shown:true,w:361,h:44,padding:[4,4,4,4],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[22,22],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},option:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},label:{shown:true,size:14,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},chosen:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:0,y:0,dy:0},chosenLabel:{shown:true,size:14,weight:700,lineHeight:21,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},press:.96,transition:"background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},stepper:{track:{shown:true,w:110,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},button:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},icon:16,value:{shown:true,size:15.5,weight:800,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},valueWidth:30,disabledOpacity:.3,press:.9,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},summary:{box:{shown:true,w:361,h:144,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},row:{shown:true,w:329,h:34,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:34,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},term:{shown:true,size:15,weight:400,lineHeight:22.5,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},value:{shown:true,size:15,weight:400,lineHeight:22.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},totalRow:{shown:true,w:329,h:42,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:42,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},totalTerm:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},total:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renewRow:{shown:true,w:329,h:28,padding:[0,0,0,0],marginTop:-6,marginBottom:0,gap:[12,12],minHeight:28,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},renewTerm:{shown:true,size:14,weight:400,lineHeight:21,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renew:{shown:true,size:14,weight:400,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},inset:{shown:true,w:361,h:88,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"bg",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0}},toast:{box:{shown:true,w:361,h:64.594,padding:[12,15,12,15],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:16,y:62,dy:0},text:{shown:true,size:14.5,weight:400,lineHeight:20.3,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:12},motion:{enterMs:220,exitMs:160,easing:[.23,1,.32,1],rise:-8}},focus:{width:2,offset:2,color:"ink"}},press:{button:.97,iconButton:.94,card:.98},colors:{grab:"#C9C9C9",scrim:"rgba(0, 0, 0, 0.32)",watch:"#F9E6B9"}};function deepFreeze2(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value))for(let v of Object.values(value))deepFreeze2(v);return value}var k=everfurTokens,PRESET=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function asPreset(theme){return Object.defineProperty(theme,PRESET,{value:theme,enumerable:true}),deepFreeze2(theme)}var SCALE_CAPS={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},everfurTheme=asPreset({name:"everfur",colors:{bg:k.color.bg,surface:k.color.efWhite,text:k.color.text,ink:k.role.color.ink,onInk:k.color.efWhite,muted:k.role.color.muted,line:k.role.color.line,go:k.role.color.go,onGo:k.role.color.ink,pink:k.color.efDustyPink,onPink:k.role.color.ink,alert:k.color.alert,alertDeep:k.color.alertDeep,icoSage:k.role.color.icoSage,bgMist:k.color.bgMist,tintSage:k.role.color.tintSage,tintBlue:k.role.color.tintBlue,tintGo:k.role.color.tintGo,tintPink:k.role.color.tintPink,tintYellowEdge:k.role.color.tintYellowEdge,tintWatch:everfurMetrics.colors.watch,tintRed:k.role.color.tintRed,scrim:everfurMetrics.colors.scrim,grab:everfurMetrics.colors.grab,focus:k.role.color.ink},radius:{...k.radius},space:{...k.space},type:{family:k.font.family.base,mono:k.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:k.font.size.xs,sm:k.font.size.sm,md:k.font.size.md,lg:k.font.size.lg,xl:k.font.size.xl},weight:{...k.font.weight},lineHeight:{...k.font.lineHeight},scaleCaps:SCALE_CAPS},motion:{duration:{press:k.motion.duration.press,fade:k.motion.duration.fade,enter:k.motion.duration.enter,sheet:k.motion.duration.sheet,sheetOut:k.motion.duration.sheetOut},easing:{out:k.motion.easing.out,drawer:k.motion.easing.drawer},pop:{duration:k.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:everfurMetrics});function presetOf(theme){return theme[PRESET]??everfurTheme}function isObject(v){return v!==null&&typeof v=="object"&&!Array.isArray(v)}function merge(base3,over){if(!isObject(base3)||!isObject(over))return over===void 0?base3:over;let out={...base3};for(let[key,value]of Object.entries(over))value!==void 0&&(out[key]=merge(base3[key],value));return out}function resolveTheme(partial,base3=everfurTheme){return partial?deepFreeze2(merge(base3,partial)):base3}var ThemeContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),host=globalThis,context=host[key]??(host[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurThemeContext"),context})();function ThemeProvider({theme:theme,children:children}){let outer=useTheme(),key=theme===void 0||isComplete(theme)?theme:contentKey(theme),value=react.useMemo(()=>isComplete(theme)?filled(theme):resolveTheme(theme,outer),[key,outer]);return react.createElement(ThemeContext.Provider,{value:value},children)}function contentKey(value){return JSON.stringify(value,(_,v)=>isObject(v)&&!Array.isArray(v)?Object.fromEntries(Object.keys(v).sort().map(k2=>[k2,v[k2]])):v)}function isComplete(theme){return theme!==void 0&&Object.isFrozen(theme)&&GROUPS.every(g=>g in theme)}var GROUPS=["name","colors","radius","space","type","motion","metrics"];function hasEvery(shape,value){if(shape===void 0)return true;if(!isObject(shape))return value!==void 0;if(!isObject(value))return false;for(let key of Object.keys(shape))if(!hasEvery(shape[key],value[key]))return false;return true}var fills=/* @__PURE__ */new WeakMap;function filled(theme){let hit=fills.get(theme);if(hit)return hit;if(hasEvery(everfurTheme,theme))return fills.set(theme,theme),theme;let preset=presetOf(theme),merged=merge(everfurTheme,preset===everfurTheme?theme:merge(preset,theme));merged[PRESET]=preset;let out=deepFreeze2(merged);return fills.set(theme,out),out}function useTheme(){let explicit=react.useContext(ThemeContext);return explicit?filled(explicit):everfurTheme}var px=n=>Math.round(n*1e3)/1e3;function faceOf(weight,mono=false){return mono?weight>450?"monoBold":"mono":weight>650?"bold":weight>450?"medium":"regular"}function withAlpha(color,alpha){let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(!m)return color;let[r,g,b]=[m[1],m[2],m[3]].map(h=>parseInt(h,16));return`rgba(${r}, ${g}, ${b}, ${alpha})`}function colorOf(t,value){let m=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(value),role=m?.[1];if(!m||role===void 0||!(role in t.colors))return value;let c=t.colors[role];return m[2]===void 0?c:withAlpha(c,Number(m[2]))}function textPartSpec(t,p){return{size:p.size,weight:p.weight,lineHeight:p.lineHeight,color:colorOf(t,p.color),...p.face==="mono"?{mono:true}:{},...p.face==="serif"?{serif:true}:{},...p.tracking?{tracking:p.tracking}:{},...p.upper?{upper:true}:{},...p.deco==="none"?{}:{deco:p.deco==="strike"?"strike":"underline",decoOffset:p.decoOffset,decoThickness:p.decoThickness},...p.tabular?{tabular:true}:{},...p.wrap==="auto"?{}:{wrap:p.wrap==="balance"?"balance":"pretty"}}}function partFill(t,value){return value==="none"?void 0:colorOf(t,value)}function summarySpec(t){let m=t.metrics.summary,lh=(size,ratio)=>px(size*ratio);return{paddingX:m.paddingX,paddingY:m.paddingY,radius:m.radius,borderWidth:m.borderWidth,borderColor:t.colors.line,background:colorOf(t,m.background),shadow:m.shadow,row:{paddingY:m.rowPaddingY,minHeight:m.rowMinHeight,gapX:m.rowGapX,gapY:m.rowGapY,divider:m.rowDivider,center:m.rowCenter},totalRowMinHeight:m.totalRowMinHeight,gap:m.gap??0,totalMarginTop:m.totalMarginTop??0,tabular:m.tabular,term:{size:m.termSize,weight:t.type.weight.regular,lineHeight:lh(m.termSize,m.termLineHeight),color:colorOf(t,m.termColor)},value:{size:m.valueSize,weight:m.valueWeight,lineHeight:lh(m.valueSize,m.valueLineHeight),color:colorOf(t,m.valueColor)},totalTerm:{size:m.totalTermSize,weight:m.totalTermWeight,lineHeight:lh(m.totalTermSize,m.termLineHeight),color:colorOf(t,m.totalTermColor)},total:{size:m.totalSize,weight:m.totalWeight,lineHeight:lh(m.totalSize,m.totalLineHeight),color:colorOf(t,m.valueColor)},off:textPartSpec(t,t.metrics.summary.off)}}function skeletonWidth(t,index){let widths=t.metrics.skeleton.widths;return`${widths[index%widths.length]}%`}function itemTestID(parent,key,own){return own!==void 0?own:parent===void 0?void 0:`${parent}-${key}`}var TEXT_VARIANT_TIERS={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function textToneColor(t,tone){let c=t.colors;switch(tone){case"ink":return c.ink;case"text":return c.text;case"muted":return c.muted;case"danger":return c.alertDeep;case"inverse":return c.onInk;default:return}}function textVariantSpec(t,variant,tone,weight){let base3=textPartSpec(t,t.metrics.text[variant]),color=textToneColor(t,tone);return{...base3,...color?{color:color}:{},...weight?{weight:t.type.weight[weight]}:{}}}var TEXT_VARIANT_BREAKS={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function textVariantTier(t,variant){return t.type.variantTiers?.[variant]??TEXT_VARIANT_TIERS[variant]}function rnText(t,spec){let face2=faceOf(spec.weight,spec.mono===true);return{fontFamily:spec.serif?t.type.faces.serif??t.type.faces.bold:t.type.faces[face2],...t.type.namedFaces?{}:{fontWeight:String(spec.weight)},fontSize:spec.size,lineHeight:spec.lineHeight,color:spec.color,...spec.tracking?{letterSpacing:spec.tracking}:{},...spec.upper?{textTransform:"uppercase"}:{},...spec.deco?rnDeco(spec):{},...spec.tabular?{fontVariant:["tabular-nums"]}:{},...spec.wrap&&reactNative.Platform.OS==="web"?{textWrap:spec.wrap}:{}}}function rnDeco(spec){let base3={textDecorationLine:spec.deco==="strike"?"line-through":"underline"};return reactNative.Platform.OS!=="web"?base3:{...base3,...spec.decoOffset?{textUnderlineOffset:spec.decoOffset}:{},...spec.decoThickness?{textDecorationThickness:spec.decoThickness}:{}}}function rnBox(t,b){let[pt=0,pr=0,pb=0,pl=0]=b.padding,[rt=0,rb=0]=b.radius,fill=partFill(t,b.bg);return{paddingTop:pt,paddingRight:pr,paddingBottom:pb,paddingLeft:pl,...b.marginTop?{marginTop:b.marginTop}:{},...b.gap[0]?{columnGap:b.gap[0]}:{},...b.gap[1]?{rowGap:b.gap[1]}:{},...rt===rb?rt?{borderRadius:rt}:{}:{borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rb,borderBottomRightRadius:rb},...fill?{backgroundColor:fill}:{},...b.edge.width>0&&!b.edge.ring?{borderWidth:b.edge.width,borderColor:colorOf(t,b.edge.color)}:{},...b.minHeight?{minHeight:b.minHeight}:{},...rnShadow(b.shadow)}}function rnShadow(s){return s.blur===0&&s.y===0&&s.x===0?null:{shadowColor:s.color,shadowOffset:{width:s.x,height:s.y},shadowOpacity:1,shadowRadius:s.blur,elevation:1}}function breakProps(mode){return mode==="auto"?null:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:reactNative.Platform.OS==="android"&&mode==="balance"?{textBreakStrategy:"balanced"}:null}function weightStyle(t,weight){let w=t.type.weight[weight];return t.type.namedFaces?{fontFamily:t.type.faces[faceOf(w)]}:{fontWeight:String(w)}}function Text2({tier:tier,variant:variant,tone:tone,weight:weight,level:level,lineBreak:lineBreak,...props}){let t=useTheme(),cap2=t.type.scaleCaps[tier??(variant?textVariantTier(t,variant):"content")],breaks=breakProps(lineBreak??(variant?TEXT_VARIANT_BREAKS[variant]:"auto"));if(variant===void 0&&tone===void 0&&weight===void 0&&level===void 0)return breaks?react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...props}):react.createElement(reactNative.Text,cap2>0?{maxFontSizeMultiplier:cap2,...props}:props);let color=textToneColor(t,tone),own=variant?rnText(t,textVariantSpec(t,variant,tone,weight)):{...color?{color:color}:{},...weight?weightStyle(t,weight):{}},heading=level===void 0?{}:{accessibilityRole:"header",...reactNative.Platform.OS==="web"?{"aria-level":level}:{}};return react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...heading,...props,style:[own,props.style]})}reactNative.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",justifyContent:"center"},block:{alignSelf:"stretch"},auto:{alignSelf:"flex-start"},labelBox:{flexShrink:1},label:{textAlign:"center"}});reactNative.StyleSheet.create({head:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},shrink:{flexShrink:1},end:{justifyContent:"flex-end"}});reactNative.StyleSheet.create({chip:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});reactNative.StyleSheet.create({st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},acts:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});function rnTextPart(t,p){return rnText(t,textPartSpec(t,p))}reactNative.StyleSheet.create({acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"},st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},stActs:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});reactNative.StyleSheet.create({pill:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",maxWidth:"100%"},label:{flexShrink:1}});reactNative.StyleSheet.create({qty:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"},button:{alignItems:"center",justifyContent:"center"}});reactNative.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignSelf:"stretch"},hairline:{position:"absolute",left:0,right:0},tab:{flex:1,flexBasis:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},center:{flexShrink:1,textAlign:"center"}});reactNative.StyleSheet.create({scrim:{flex:1,justifyContent:"flex-end"},sheet:{maxHeight:"100%"},grab:{alignItems:"center",justifyContent:"center"},head:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1,flexGrow:1},close:{alignItems:"center",justifyContent:"center"},closeEnd:{marginLeft:"auto"},scroll:{flexGrow:0},top:{flexDirection:"row",alignItems:"center"}});function Skeleton({lines:lines=3,label:label,testID:testID,style:style}){let t=useTheme(),m=t.metrics.skeleton;/* @__PURE__ */
|
|
36
|
-
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{
|
|
37
|
-
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{
|
|
38
|
-
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[
|
|
35
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:look(enter),children:node}),at.leaving===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{pointerEvents:"none",style:[{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:paper},look(exit)],children:at.leaving})]})}var everfurTokens=/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({efDarkGreen:"#10462E",efWhite:"#FFFFFF",efBlack:"#000000",efDustyPink:"#FFC3BC",efBrightGreen:"#07C168",efYellow:"#F2C763",efDustyBlue:"#A8B9DA",efSkyBlue:"#4E98C9",efCharcoal:"#3D3D3D",efIconHoney:"#926F06",efIconLeaf:"#16864A",efIconSky:"#1E7AB7",efIconTeal:"#05827E",efIconCocoa:"#865B3F",efIconNavy:"#223E80",efIconBerry:"#B6407F",efIconAmber:"#B25E05",efIconMoss:"#5E7E1E",efIconSlate:"#5A6087",efIconRose:"#CA4463",efRedDeep:"#6D1D14",efRedBright:"#C03410",bg:"#FFFFFF",bgBrand:"#10462E",bgAccent:"#FFC3BC",bgAccentB2b:"#A8B9DA",bgWarm:"#F2C763",text:"#000000",textBrand:"#10462E",textOnBrand:"#FFFFFF",textCta:"#07C168",textMuted:"#6B6B6B",bgMist:"#F1F5F2",border:"#E4E4E4",borderStrong:"#3D3D3D",hi:"#DAF6E8",hiStrong:"#ABEACC",hiEdge:"#0B8A4E",now:"#0C844B",alert:"#C03410",alertDeep:"#6D1D14",btnPrimaryBg:"#10462E",btnPrimaryText:"#FFFFFF",btnSecondaryBg:"rgba(0, 0, 0, 0)",btnSecondaryText:"#10462E",btnSecondaryBorder:"#10462E",mixMint:"#7FE8AE",mixLegal:"#A9C4B5",mixPromptGreen:"#BFEFD8",mixPromptYellow:"#F7DC9E",mixRx:"#E0E6F2",mixShelf:"#F3F3F3",mixEar:"#F09FA3",efBone:"#FAF9F6",efTennisBall:"#DCEF5A",efFawn:"#E8CAA4",efPine:"#12301F",efPine70:"rgba(18, 48, 31, 0.72)",efLiver:"#7A4330",efMerle:"#AEB8C1",efNose:"#E9B6A6"}),font:/* @__PURE__ */Object.freeze({family:/* @__PURE__ */Object.freeze({base:'Azeret, "Helvetica Neue", Arial, sans-serif',mono:'"Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace'}),size:/* @__PURE__ */Object.freeze({xs:13,sm:15,md:17,lg:20,xl:24,"2xl":32,"3xl":40,"4xl":56}),lineHeight:/* @__PURE__ */Object.freeze({body:1.55,display:1.15}),weight:/* @__PURE__ */Object.freeze({regular:400,medium:500,bold:700})}),space:/* @__PURE__ */Object.freeze({1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64,9:96}),radius:/* @__PURE__ */Object.freeze({sm:6,md:10,lg:20,xl:28,pill:999}),shadow:/* @__PURE__ */Object.freeze({sm:/* @__PURE__ */Object.freeze({x:0,y:1,blur:2,spread:0,color:"rgba(16, 70, 46, 0.06)"}),md:/* @__PURE__ */Object.freeze({x:0,y:4,blur:16,spread:0,color:"rgba(16, 70, 46, 0.08)"})}),layout:/* @__PURE__ */Object.freeze({container:1200,containerNarrow:720}),motion:/* @__PURE__ */Object.freeze({easing:/* @__PURE__ */Object.freeze({out:/* @__PURE__ */Object.freeze([.23,1,.32,1]),inOut:/* @__PURE__ */Object.freeze([.77,0,.175,1]),drawer:/* @__PURE__ */Object.freeze([.32,.72,0,1]),expo:/* @__PURE__ */Object.freeze([.16,1,.3,1]),bark:/* @__PURE__ */Object.freeze([.34,1.56,.64,1])}),duration:/* @__PURE__ */Object.freeze({press:160,fade:200,enter:300,sheet:420,sheetOut:240,draw:900})}),web:/* @__PURE__ */Object.freeze({serif:'Azeret, "Helvetica Neue", Arial, sans-serif',sans:'Azeret, "Helvetica Neue", Arial, sans-serif',tSmall:14,max:1312}),role:/* @__PURE__ */Object.freeze({color:/* @__PURE__ */Object.freeze({ink:"#10462E",go:"#07C168",muted:"#6B6B6B",line:"#E4E4E4",pink50:"#FFE1DE",tintSage:"#E6ECE8",tintPink:"#FFEAE8",tintPinkSoft:"#FFF6F5",tintBlue:"#EAEEF6",tintYellow:"#FCF0D6",tintYellowEdge:"#F6D892",tintRed:"#FBF1EE",tintGo:"#DCF6EA",icoGrey:"#6B6B6B",icoSage:"#819E90",icoBlue:"#4E98C9",icoWarm:"#D6D0C2",icoAmber:"#B67B3F",amberText:"#A05E32",wxSun:"#F2C763",wxSunEdge:"#D5AD47",wxCloud:"#FFFFFF",wxCloudEdge:"#DEDEDE",wxCloudDark:"#EAEAEA",wxCloudDarkEdge:"#C5C5C5",wxRain:"#75AFD5",wxSnow:"#AFD1E7",wxMist:"#D4D4D4",cwShelf:"#FFFFFF",cwShelfDeep:"#F1F4F2",cwRx:"#E0E6F2",cwRxInk:"#5A6087",cwEdgeC:"#C6D3CD",nItch:"#CA4463",nJoints:"#5E7E1E",nItchC:"#FFC3BC",nJointsC:"#D8E0C9",lvlGood:"#77DDAC",lvlOk:"#F4CF7A",lvlHot:"#DC8F7C",lvlStorm:"#8DA4BB",mapLand:"#F5F5F5",mapEdge:"#EAEAEA",mapPark:"#D7F5E7",mapWater:"#D8E0EE",mapSand:"#FCF3DD"}),size:/* @__PURE__ */Object.freeze({max:1440,gutter:16,sideW:220,cardPad:16,barH:48,tabH:58,dock:64,side:16,stackGap:12})})});var BLOCK_BOX={shown:true,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},BLOCK_TEXT={shown:true,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},blockBox=p=>({...BLOCK_BOX,...p}),blockText=p=>({...BLOCK_TEXT,...p}),everfurMetrics={button:{ink:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},go:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24},outline:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:400,lineHeight:1,iconSize:24},pink:{fill:true,minHeight:60,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:18,fontWeight:700,lineHeight:1,iconSize:24},danger:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1.55,iconSize:20},inkSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},goSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},outlineSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:400,lineHeight:1,iconSize:20},pinkSm:{fill:true,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20},row:{fill:false,minHeight:36,paddingX:14,gap:8,borderWidth:1.5,ring:false,fontSize:14,fontWeight:400,lineHeight:1,iconSize:17},outlineInSheetWeight:700,money:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"pink",fg:"ink",edgeColor:"ink"},moneySm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"pink",fg:"ink",edgeColor:"ink"},warn:{fill:false,minHeight:52,paddingX:24,gap:8,borderWidth:1.5,ring:false,fontSize:17,fontWeight:700,lineHeight:1,iconSize:24,bg:"none",fg:"alertDeep",edgeColor:"alert"},warnSm:{fill:false,minHeight:46,paddingX:16,gap:8,borderWidth:1.5,ring:false,fontSize:15,fontWeight:700,lineHeight:1,iconSize:20,bg:"none",fg:"alertDeep",edgeColor:"alert"},text:{fontSize:15,fontWeight:700,lineHeight:1.4,color:"ink",pressOpacity:.6}},pill:{minHeight:24,paddingX:10,fontSize:12,fontWeight:700,lineHeight:1,letterSpacing:.72,ring:{soon:1.25,overdue:1.25,clear:1.5,later:1.25,plain:1.5,new:1.5},plainRingAlpha:.2,dot:6,dotGap:6,allergyDot:{size:6,gap:6,color:"alert"},mono:true,upper:true,tones:{rx:{bg:"#E0E6F2",fg:"ink",ring:0,ringColor:"ink"},soon:{bg:"surface",fg:"ink",ring:1.25,ringColor:"tintYellowEdge"},overdue:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},clear:{bg:"surface",fg:"go",ring:1.5,ringColor:"go"},stable:{bg:"tintGo",fg:"ink",ring:0,ringColor:"ink"},later:{bg:"surface",fg:"muted",ring:1.25,ringColor:"line"},plain:{bg:"surface",fg:"ink",ring:1.5,ringColor:"ink/0.2"},new:{bg:"surface",fg:"ink",ring:1.5,ringColor:"go"},pink:{bg:"tintPink",fg:"ink",ring:0,ringColor:"ink"},watch:{bg:"#F9E6B9",fg:"ink",ring:0,ringColor:"ink"},high:{bg:"surface",fg:"alert",ring:1.25,ringColor:"alert"},allergy:{bg:"surface",fg:"alertDeep",ring:1.25,ringColor:"alert"}}},chip:{minHeight:42,paddingX:16,gap:8,borderWidth:1,fontSize:15,fontWeight:500,lineHeight:1.3},card:{padding:16,radius:20,borderWidth:1,titleSize:18,titleWeight:700,titleLineHeight:1.25,titleTracking:-.36,titleGap:12,leadSize:15,leadLineHeight:1.5,leadGap:12,headGapX:16,headGapY:8,headGap:12,bodySize:17,bodyLineHeight:1.55,ghost:{borderStyle:"dashed",borderColor:"#B9C9C2"}},sectionHeader:{gapX:12,gapY:8,marginTop:8},kicker:{fontSize:12,fontWeight:700,lineHeight:1.55,letterSpacing:.96,gap:8},quantityStepper:{borderWidth:1,borderColor:"line",ring:false,button:40,icon:18,valueMinWidth:28,offColor:"line",offOpacity:1,valueSize:17,valueWeight:700,valueLineHeight:1.55},tabs:{minHeight:44,gap:6,fontSize:15,fontWeight:500,currentWeight:700,lineHeight:1.55,indicator:3,hairline:1,dot:7},sheet:{radius:28,grabHeight:20,grabBarWidth:36,grabBarHeight:5,grabBarRadius:3,headPaddingTop:4,headPaddingX:16,headPaddingBottom:12,headGap:12,titlesGap:2,titleSize:18,close:36,closeIcon:20,bodyGap:12,bodyPaddingX:16,bodyPaddingBottom:24,actsGap:12,actsMarginTop:4},empty:{gap:8,titleSize:22,titleWeight:500,titleLineHeight:1.2,titleTracking:-.33,leadSize:15,leadLineHeight:1.5,actsGap:12,actsMarginTop:12,buttonMinWidth:200,linkMinHeight:44,linkPaddingX:4,linkSize:15,linkWeight:700,linkUnderlineOffset:3},skeleton:{gap:10,lineHeight:12,widths:[100,82,64]},summary:{paddingX:24,paddingY:0,radius:20,borderWidth:1,background:"surface",shadow:{color:"",x:0,y:0,blur:0,spread:0},rowDivider:1,rowMinHeight:0,rowCenter:false,rowPaddingY:14,termColor:"muted",valueColor:"ink",tabular:false,totalRowMinHeight:0,totalTermSize:15,totalTermWeight:400,totalTermColor:"muted",totalWeight:700,rowGapX:16,rowGapY:2,termSize:15,termLineHeight:1.55,valueSize:15,valueWeight:700,valueLineHeight:1.4,totalSize:20,totalLineHeight:1.4,off:{shown:true,size:15,weight:700,lineHeight:21,color:"go",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},icon:{size:24},timeline:{row:{shown:true,w:361,h:69.281,padding:[0,0,24,0],marginTop:0,marginBottom:0,gap:[16,16],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},done:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"ink",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"surface",fit:"cover",x:0,y:0,dy:0},now:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},next:{shown:true,w:28,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"surface",edge:{width:2,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},nowInner:{size:10,color:"go"},check:{shown:true,w:16,h:16,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},lineDoneDone:{x:13,top:30,bottom:2,width:2,color:"ink"},lineDoneNow:{x:13,top:30,bottom:2,width:2,color:"ink"},lineNowNext:{x:13,top:30,bottom:2,width:2,color:"line"},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},head:{shown:true,w:317,h:27,padding:[3,0,0,0],marginTop:0,marginBottom:0,gap:[8,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},nextTitle:{shown:true,size:17,weight:700,lineHeight:22.1,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:3},when:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},thumbnail:{xs:{frame:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},img:{shown:false,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1,color:"line",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},sm:{frame:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:48,h:48,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:64,h:64,padding:[8,8,8,8],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[14,14],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},md:{frame:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:156,h:156,padding:[10,10,10,10],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:156,h:156,padding:[0,0,0,0],marginTop:0,marginBottom:6,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F5F5F5",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false},lg:{frame:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},img:{shown:true,w:174.5,h:174.5,padding:[14,14,18,14],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"contain",x:0,y:0,dy:0},empty:{shown:true,w:174.5,h:174.5,padding:[0,0,0,0],marginTop:0,marginBottom:8,gap:[0,0],minHeight:0,radius:[20,20],bg:"#F3F3F3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#1E7AB7",fit:"cover",x:0,y:0,dy:0},top:false}},text:{display:{shown:true,size:40,weight:500,lineHeight:39.2,color:"ink",tracking:-1.2,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},headline:{shown:true,size:30,weight:500,lineHeight:33,color:"ink",tracking:-.45,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:22,weight:500,lineHeight:26.4,color:"ink",tracking:-.33,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},heading:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},lead:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},meta:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"mono",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},caption:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},overline:{shown:true,size:12,weight:700,lineHeight:16.8,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},kicker:{shown:true,size:12,weight:700,lineHeight:18.6,color:"muted",tracking:.96,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},field:{gap:6,label:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},input:{shown:true,w:361,h:52,padding:[0,16,0,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},focusEdge:"ink",errorEdge:"alert",value:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:1},valueInset:[2,1],icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},area:{shown:true,w:361,h:158,padding:[12,16,12,16],marginTop:0,marginBottom:0,gap:[10,10],minHeight:52,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},areaValue:{shown:true,size:17,weight:400,lineHeight:25.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:2},areaValueMinHeight:132,areaInset:[2,2],hint:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},error:{shown:true,size:15,weight:400,lineHeight:21.75,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},placeholder:"muted"},checkbox:{row:{shown:true,w:361,h:45,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},labelX:34,box:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[6,6],bg:"ink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},tick:{w:5,h:10,stroke:2,color:"surface",rotate:45,dy:-1},label:{shown:true,size:15,weight:400,lineHeight:22.5,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},boxed:{shown:true,w:361,h:50.5,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"bgMist",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0}},choice:{row:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},selected:{shown:true,w:361,h:56.344,padding:[14,16,14,16],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"pink",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},radio:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:1.5,color:"icoSage",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},radioOn:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[10,10],bg:"surface",edge:{width:6,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},textX:34,title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},strut:26.35,meta:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0},end:{shown:true,size:13,weight:400,lineHeight:20.15,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},group:{gap:8,legend:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},legendPaddingX:2,legendGap:0}},switch:{track:{shown:true,w:48,h:28,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"#D0D6D3",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},on:"ink",thumb:{size:22,inset:3,travel:20,color:"surface",shadow:{color:"rgba(16, 70, 46, 0.06)",x:0,y:1,blur:2,spread:0}}},iconButton:{bare:{shown:true,w:44,h:44,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[22,22],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},bareIcon:22,offColor:"line",ring:{shown:true,w:36,h:36,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[18,18],bg:"surface",edge:{width:1.5,color:"ink",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},ringIcon:18,ringPressed:"tintSage",ringPressScale:.94},link:{text:{shown:true,size:17,weight:400,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},danger:{shown:true,size:15,weight:700,lineHeight:23.25,color:"alert",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:3,decoThickness:0,marginTop:0,paddingTop:0},inline:{shown:true,size:17,weight:400,lineHeight:26.35,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"underline",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},lists:{rows:{row:{shown:true,w:327,h:94.781,padding:[16,0,16,0],marginTop:0,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:1,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.85,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:2,paddingTop:0}},tiles:{list:{shown:true,w:343,h:175.813,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},outdent:8,row:{shown:true,w:343,h:62.281,padding:[10,8,10,8],marginTop:0,marginBottom:0,gap:[12,12],minHeight:0,radius:[10,10],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},leading:22,leadingFace:40,icon:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"muted",fit:"cover",x:0,y:0,dy:0},text:{shown:true,w:261,h:42.281,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[2,2],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},subtitle:{shown:true,size:13,weight:400,lineHeight:18.2,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},pressed:"#EDF2EF",alert:{bg:"tintRed",icon:"alert",title:"alertDeep",subtitle:"alert"}},end:{text:{shown:true,size:15,weight:400,lineHeight:23.25,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},gap:8,chevron:{shown:true,w:20,h:20,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"#819D90",fit:"cover",x:0,y:0,dy:0}},section:{title:{shown:true,size:18,weight:700,lineHeight:22.5,color:"ink",tracking:-.36,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},titleGap:12,head:{shown:true,w:361,h:22.5,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[12,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},note:{shown:true,size:13,weight:400,lineHeight:19.5,color:"muted",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:12,paddingTop:0}},avatar:{sizes:{xs:20,sm:36,md:48,lg:64,xl:128},face:40,bg:"surface",edge:{width:1,color:"line",ring:true},initials:{shown:true,size:15,weight:700,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},initialsXs:{shown:true,size:9,weight:700,lineHeight:13.95,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tints:{default:"tintPink",pink:"#FFCFC9",blue:"#C2CEE5",yellow:"#F6D78F",sage:"#C6D3CD"},ring:{width:2,offset:2,color:"go"},ringXl:{width:3,offset:4,color:"go"},dot:{size:12,edge:2,edgeColor:"surface"}},stack:{size:28,overlap:-8,initialsSize:12,halo:{width:2,color:"surface"}},banner:{box:{shown:true,w:361,h:155.391,padding:[16,16,16,16],marginTop:0,marginBottom:0,gap:[12,4],minHeight:0,radius:[20,20],bg:"#F1F5F2",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},icon:{shown:true,w:22,h:22,padding:[0,0,0,0],marginTop:1,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},iconRows:3,kicker:{shown:true,size:12,weight:700,lineHeight:16.8,color:"#5B5B5B",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},title:{shown:true,size:17,weight:700,lineHeight:22.1,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},text:{shown:true,size:15,weight:400,lineHeight:21.75,color:"text",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:295,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},tones:{info:{bg:"#F1F5F2",icon:"ink"},success:{bg:"tintGo",icon:"ink"},warn:{bg:"#FCF0D6",icon:"#926F06"},danger:{bg:"tintRed",icon:"alert"}}},toast:{box:{shown:true,w:200.281,h:40.25,padding:[10,16,10,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"surface",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:15,weight:400,lineHeight:20.25,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:10},inset:16,rise:8,fade:200,hold:2600},spinner:{size:16,border:2,turn:700,openSide:true,reducedOpacity:.5},progress:{track:{shown:true,w:361,h:4,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[999,999],bg:"line",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},fill:"go",move:300},divider:{width:1,color:"line",label:{shown:true,size:12,weight:400,lineHeight:18.6,color:"muted",tracking:.72,face:"mono",upper:true,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},labelGap:12,labelLine:{width:1,color:"line"}},errorInline:{text:{shown:true,size:15,weight:400,lineHeight:21,color:"alertDeep",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},acts:{shown:true,w:361,h:21,padding:[0,0,0,0],marginTop:8,marginBottom:0,gap:[16,8],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"text",fit:"cover",x:0,y:0,dy:0},link:{shown:true,size:15,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"pretty",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0}},linkPressedOpacity:.6},variants:{drawer:{frame:{shown:true,w:393,h:226.594,padding:[10,20,40,20],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[28,0],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:293.406,dy:0},maxHeight:.8,grab:{shown:true,w:40,h:5,padding:[0,0,0,0],marginTop:0,marginBottom:10,gap:[0,0],minHeight:0,radius:[2.5,2.5],bg:"#DAD7D1",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},top:{shown:true,w:353,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},kicker:{shown:true,size:11,weight:400,lineHeight:16.5,color:"muted",tracking:.88,face:"mono",upper:true,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},close:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},closeEnd:-8,closeIcon:22,title:{shown:true,size:24,weight:800,lineHeight:27.6,color:"ink",tracking:-.24,face:"serif",upper:false,wrap:"balance",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},body:{shown:true,w:353,h:82,padding:[0,0,0,0],marginTop:12,marginBottom:0,gap:[10,10],minHeight:0,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"text",fit:"cover",x:0,y:0,dy:0},text:{shown:true,size:16,weight:400,lineHeight:24,color:"text",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},scrim:"ink/0.38",motion:{enterMs:320,enterEasing:[.32,.72,0,1],exitMs:220,exitEasing:[.23,1,.32,1],scrimEnterMs:240,scrimExitMs:200,scrimEasing:[.25,.1,.25,1]}},button:{ink:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:0,ring:false,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},outline:{fill:false,minHeight:48,paddingX:22,gap:8,borderWidth:1.5,ring:true,fontSize:16,fontWeight:700,lineHeight:1.5,iconSize:20},sm:{fill:false,minHeight:40,paddingX:16,gap:8,borderWidth:1.5,ring:true,fontSize:15,fontWeight:700,lineHeight:1.5,iconSize:20},lg:{fill:false,minHeight:56,paddingX:28,gap:8,borderWidth:0,ring:false,fontSize:17,fontWeight:700,lineHeight:1.5,iconSize:20},disabledOpacity:.32,press:.97,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease"},segmented:{track:{shown:true,w:361,h:44,padding:[4,4,4,4],marginTop:0,marginBottom:0,gap:[4,4],minHeight:0,radius:[22,22],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},option:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},label:{shown:true,size:14,weight:700,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},chosen:{shown:true,w:115,h:36,padding:[0,6,0,6],marginTop:0,marginBottom:0,gap:[0,0],minHeight:36,radius:[18,18],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:0,y:0,dy:0},chosenLabel:{shown:true,size:14,weight:700,lineHeight:21,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},press:.96,transition:"background-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},stepper:{track:{shown:true,w:110,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},button:{shown:true,w:40,h:40,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[20,20],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},icon:16,value:{shown:true,size:15.5,weight:800,lineHeight:23.25,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},valueWidth:30,disabledOpacity:.3,press:.9,transition:"transform 160ms cubic-bezier(0.23, 1, 0.32, 1)"},summary:{box:{shown:true,w:361,h:144,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"surface",edge:{width:0,color:"line",ring:false},shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0},row:{shown:true,w:329,h:34,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:34,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},term:{shown:true,size:15,weight:400,lineHeight:22.5,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},value:{shown:true,size:15,weight:400,lineHeight:22.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},totalRow:{shown:true,w:329,h:42,padding:[0,0,0,0],marginTop:0,marginBottom:0,gap:[12,12],minHeight:42,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},totalTerm:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},total:{shown:true,size:17,weight:800,lineHeight:25.5,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renewRow:{shown:true,w:329,h:28,padding:[0,0,0,0],marginTop:-6,marginBottom:0,gap:[12,12],minHeight:28,radius:[0,0],bg:"none",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:true,color:"ink",fit:"cover",x:0,y:0,dy:0},renewTerm:{shown:true,size:14,weight:400,lineHeight:21,color:"#4A4845",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},renew:{shown:true,size:14,weight:400,lineHeight:21,color:"ink",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:true,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:0},inset:{shown:true,w:361,h:88,padding:[6,16,6,16],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"bg",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"ink",fit:"cover",x:0,y:0,dy:0}},toast:{box:{shown:true,w:361,h:64.594,padding:[12,15,12,15],marginTop:0,marginBottom:0,gap:[0,0],minHeight:0,radius:[16,16],bg:"ink",edge:{width:0,color:"line",ring:false},shadow:{color:"",x:0,y:0,blur:0,spread:0},center:false,color:"onInk",fit:"cover",x:16,y:62,dy:0},text:{shown:true,size:14.5,weight:400,lineHeight:20.3,color:"onInk",tracking:0,face:"sans",upper:false,wrap:"auto",tabular:false,deco:"none",decoOffset:0,decoThickness:0,marginTop:0,paddingTop:12},motion:{enterMs:220,exitMs:160,easing:[.23,1,.32,1],rise:-8}},focus:{width:2,offset:2,color:"ink"}},press:{button:.97,iconButton:.94,card:.98},colors:{grab:"#C9C9C9",scrim:"rgba(0, 0, 0, 0.32)",watch:"#F9E6B9",planInk:"#262523",planOnInk:"#FFFFFF",planAccent:"#FFCE34",planLink:"#00707C",planAccentWash:"#FFF7DC",planAccentChip:"#FFE7A1",planLinkWash:"#E0FDFF",planLinkChip:"#C8F4F8"}},everfurBlocksMetrics={order:{card:blockBox({w:361,h:163.547}),top:blockBox({w:361,h:39.547,gap:[12,12]}),title:blockText({size:16,weight:700,lineHeight:20,tracking:-.16}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted"}),total:blockText({size:16,weight:700,lineHeight:24.8,tabular:true}),shots:blockBox({w:361,h:64,marginTop:8,gap:[8,8]}),acts:blockBox({w:361,h:40,marginTop:12,gap:[8,8]}),go:blockBox({w:176.5,h:40,padding:[0,12,0,12],gap:[6,6],minHeight:40,radius:[999,999],bg:"go",center:true}),goText:blockText({size:14,weight:700,lineHeight:21.7}),plain:blockBox({w:176.5,h:40,padding:[0,12,0,12],gap:[6,6],minHeight:40,radius:[999,999],bg:"#F3F3F3",center:true}),plainText:blockText({size:14,weight:700,lineHeight:21.7}),note:blockText({size:13,weight:500,lineHeight:17.55,marginTop:8}),icon:blockBox({w:16,h:16}),actsColumns:2,shotPressScale:.96},orderQuiet:{top:blockBox({w:361,h:43.547,gap:[12,12]}),when:blockBox({w:300.063,h:24,gap:[8,4],center:true}),title:blockText({size:16,weight:700,lineHeight:20.8}),chip:blockBox({w:86.031,h:24,padding:[0,9,0,5],gap:[4,4],minHeight:24,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:12,weight:700,lineHeight:15.6,color:"ink"}),chipIcon:blockBox({w:14,h:14,color:"ink"}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted",marginTop:2}),total:blockText({size:16,weight:700,lineHeight:24.8,tabular:true}),shots:blockBox({w:361,h:64,marginTop:8,gap:[8,8]}),shot:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3"}),shotImg:blockBox({w:64,h:64,padding:[6.391,6.391,6.391,6.391],fit:"contain"}),shotBlend:"multiply",acts:blockBox({w:361,h:44,marginTop:12,gap:[12,12],center:true}),plain:blockBox({w:162.109,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"#F3F3F3",center:true}),plainText:blockText({size:14,weight:700,lineHeight:21.7}),icon:blockBox({w:16,h:16}),link:blockBox({w:62.578,h:44,padding:[0,6,0,6],minHeight:44}),linkText:blockText({size:14,weight:700,lineHeight:21.7,deco:"underline",decoOffset:3,decoThickness:1.5})},orderWeb:{card:blockBox({w:952,h:127.781,padding:[16,24,16,16],gap:[24,16],radius:[20,20],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.04)",x:0,y:1,blur:2,spread:0},center:true}),lift:{color:"rgba(0, 0, 0, 0.05)",x:0,y:6,blur:20,spread:0},shots:blockBox({w:172,h:72}),sq:blockBox({w:72,h:72,radius:[14,14],bg:"#F3F3F3"}),sqRing:3,sqOverlap:22,imgInset:.1,imgFit:"contain",imgBlend:"multiply",text:blockBox({w:446.547,h:95.781,gap:[2,2]}),when:blockBox({w:446.547,h:26,gap:[12,4],center:true}),title:blockText({size:19,weight:700,lineHeight:24.7,tabular:true}),total:blockText({size:19,weight:900,lineHeight:24.7,tabular:true}),chip:blockBox({w:94.547,h:26,padding:[0,10,0,6],gap:[4,4],minHeight:26,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:13,weight:700,lineHeight:16.9,color:"ink",tabular:true}),chipIcon:blockBox({w:16,h:16,color:"ink"}),meta:blockText({size:16,weight:400,lineHeight:22.4}),note:blockText({size:15,weight:400,lineHeight:21}),acts:blockBox({w:245.453,h:46,gap:[24,8],center:true}),plain:blockBox({w:160.031,h:46,padding:[0,20,0,20],gap:[8,8],minHeight:46,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true},center:true,color:"ink"}),plainText:blockText({size:16,weight:700,lineHeight:19.2,color:"ink"}),icon:blockBox({w:18,h:18,color:"ink"}),link:blockBox({w:61.422,h:44,gap:[8,8],minHeight:44,center:true,color:"ink"}),linkText:blockText({size:17,weight:700,lineHeight:20.4,color:"ink",deco:"underline",decoOffset:4}),go:blockBox({w:228.75,h:52,padding:[0,24,0,24],gap:[8,8],minHeight:52,radius:[999,999],bg:"ink",center:true,color:"surface"}),goText:blockText({size:17,weight:700,lineHeight:20.4,color:"surface",wrap:"auto"}),pressScale:.97,hoverFill:{color:"ink",share:.06,over:"surface"},chipOff:blockBox({w:97.422,h:26,padding:[0,10,0,6],gap:[4,4],minHeight:26,radius:[999,999],center:true,color:"ink"}),metaLink:blockText({size:16,weight:400,lineHeight:22.4,deco:"underline"}),narrow:{upTo:599,card:blockBox({w:560,h:247.391,padding:[16,16,16,16],gap:[24,16],radius:[20,20],bg:"surface",center:true}),sq:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3",shadow:{color:"#FFFFFF",x:0,y:0,blur:0,spread:3}}),sqOverlap:16},phone:{upTo:639,card:blockBox({w:335,h:120.984,gap:[12,8],center:true}),sq:blockBox({w:48,h:48,radius:[12,12],bg:"#F3F3F3"}),sqRing:2,sqOverlap:18,when:blockBox({w:215,h:46.797,gap:[12,2],center:true}),title:blockText({size:16,weight:700,lineHeight:20.8,tabular:true}),total:blockText({size:16,weight:900,lineHeight:20.8,tabular:true}),chip:blockBox({w:90.031,h:24,padding:[0,10,0,6],gap:[4,4],minHeight:24,radius:[999,999],bg:"tintGo",center:true,color:"ink"}),chipText:blockText({size:12,weight:700,lineHeight:15.6,color:"ink",tabular:true}),whatHidden:true,note:blockText({size:13,weight:400,lineHeight:18.2}),acts:blockBox({w:335,h:46,gap:[24,8],center:true}),plain:blockBox({w:144.531,h:46,padding:[0,16,0,16],gap:[8,8],minHeight:46,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#C6D3CD",ring:true},center:true,color:"ink"}),plainText:blockText({size:15,weight:700,lineHeight:18,color:"ink"}),linkText:blockText({size:15,weight:700,lineHeight:18,color:"ink",deco:"underline",decoOffset:4})}},product:{card:blockBox({w:156,h:310.969,gap:[4,4]}),kicker:blockText({size:12,weight:400,lineHeight:15.6,color:"muted",tracking:.12,face:"mono"}),name:blockText({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),meta:blockText({size:13,weight:400,lineHeight:18.2,color:"muted"}),buy:blockBox({w:156,h:36,marginTop:6,gap:[8,8],center:true}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true})},productCard:{card:blockBox({w:174.5,h:249.219,gap:[2,2]}),tag:blockBox({w:84.563,h:26,padding:[0,9,0,6],gap:[4,4],minHeight:26,radius:[999,999],bg:"surface",center:true,x:8,y:8}),tagIcon:blockBox({w:16,h:16,color:"#CA4463"}),tagText:blockText({size:12,weight:700,lineHeight:12}),price:blockBox({w:174.5,h:26.344,gap:[6,6]}),priceText:blockText({size:17,weight:700,lineHeight:26.35,tracking:-.17,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",tabular:true,deco:"strike"}),name:blockText({size:14,weight:500,lineHeight:18.2,wrap:"balance"}),meta:blockText({size:12,weight:400,lineHeight:16.2,color:"muted"}),metaAuto:blockText({size:12,weight:500,lineHeight:16.2,color:"#16864A"}),step:blockBox({w:112,h:38,radius:[19,19],bg:"surface",center:true,x:54.5,y:128.5}),stepIn:blockBox({w:112,h:38,radius:[19,19],bg:"ink",center:true,color:"surface",x:54.5,y:128.5}),stepAt:{right:8,bottom:8},stepButton:blockBox({w:38,h:38,radius:[19,19],center:true}),stepIcon:blockBox({w:18,h:18}),count:blockText({size:15,weight:700,lineHeight:23.25,color:"surface",tabular:true}),lift:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},per:blockText({size:12,weight:400,lineHeight:16.2,color:"muted",tabular:true}),metaAutoDark:blockText({size:12,weight:500,lineHeight:16.2,color:"ink"}),pill:blockBox({w:62.234,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"go",center:true,x:104.266,y:130.5}),pillText:blockText({size:14,weight:700,lineHeight:21.7}),pillOn:blockBox({w:90.016,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",edge:{width:2,color:"text",ring:true},center:true,x:76.484,y:130.5}),pillOnText:blockText({size:14,weight:700,lineHeight:21.7}),pillIcon:blockBox({w:16,h:16}),pillSoft:blockBox({w:80.125,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true,x:86.375,y:130.5}),pillSoftText:blockText({size:14,weight:700,lineHeight:21.7}),pillAt:{right:8,bottom:8},pillPressScale:.96},productBlend:{img:blockBox({w:174.5,h:174.5,padding:[32,14,16,14],fit:"contain"}),imgBlend:"multiply",lift:{color:"rgba(0, 0, 0, 0.08)",x:0,y:2,blur:8,spread:0},pill:blockBox({w:62.234,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"pink",edge:{width:1,color:"ink",ring:true},center:true,color:"ink",x:104.266,y:130.5}),pillText:blockText({size:14,weight:700,lineHeight:21.7,color:"ink"}),pillOn:blockBox({w:90.016,h:36,padding:[0,14,0,14],gap:[4,4],minHeight:36,radius:[999,999],bg:"surface",edge:{width:2,color:"ink",ring:true},center:true,color:"ink",x:76.484,y:130.5}),pillOnText:blockText({size:14,weight:700,lineHeight:21.7,color:"ink"}),pillPressScale:.97},productWeb:{card:blockBox({w:306.656,h:370.641,gap:[2,2]}),square:blockBox({w:306.656,h:306.656,marginBottom:10,radius:[20,20],bg:"#F5F5F5"}),imgInsetTag:{share:[.11,.11,.1,.11],px:[26,0,0,0]},imgInset:{share:[.07,.07,.07,.07],px:[0,0,0,0]},imgFit:"contain",imgBlend:"multiply",tag:blockBox({w:112.516,h:30,padding:[0,12,0,8],gap:[5,5],minHeight:30,radius:[999,999],bg:"#F7E3E8",center:true,color:"ink",x:10,y:10}),tagText:blockText({size:13,weight:700,lineHeight:14.3,color:"ink"}),tagIcon:blockBox({w:16,h:16,color:"#CA4463"}),tagMix:.15,name:blockText({size:17,weight:500,lineHeight:22.1,wrap:"balance"}),nameLeading:1.3,coverRadius:20,price:blockBox({w:306.656,h:27.891,gap:[8,2]}),priceText:blockText({size:18,weight:700,lineHeight:27.9,tracking:-.18,tabular:true}),was:blockText({size:15,weight:400,lineHeight:23.25,tabular:true,deco:"strike"}),per:blockText({size:15,weight:400,lineHeight:23.25,tabular:true}),badge:blockBox({w:32.625,h:22,padding:[0,8,0,8],radius:[999,999],bg:"#DEE4F1",edge:{width:1.5,color:"rgba(90, 96, 135, 0.45)",ring:true},center:true}),badgeText:blockText({size:13,weight:700,lineHeight:13,tabular:true}),meta:blockText({size:15,weight:400,lineHeight:21}),add:blockBox({w:44,h:44,radius:[22,22],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true}),addIcon:blockBox({w:20,h:20}),actAt:{right:10,bottom:10},step:blockBox({w:116,h:44,radius:[22,22],bg:"ink",center:true,color:"surface"}),stepButton:blockBox({w:44,h:44,radius:[22,22],center:true,color:"surface"}),stepIcon:blockBox({w:18,h:18,color:"surface"}),count:blockText({size:15,weight:700,lineHeight:23.25,color:"surface",tabular:true}),pill:blockBox({w:68.688,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"ink",center:true,color:"surface"}),pillText:blockText({size:15,weight:700,lineHeight:15,color:"surface"}),pillOn:blockBox({w:101.016,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"surface",edge:{width:2,color:"ink",ring:true},center:true,color:"ink"}),pillOnText:blockText({size:15,weight:700,lineHeight:15,color:"ink"}),pillIcon:blockBox({w:18,h:18,color:"ink"}),pillSoft:blockBox({w:87.859,h:44,padding:[0,16,0,16],gap:[6,6],minHeight:44,radius:[999,999],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.14)",x:0,y:2,blur:8,spread:0},center:true}),pillSoftText:blockText({size:15,weight:700,lineHeight:15}),nameSteps:[{upTo:599,name:blockText({size:16,weight:500,lineHeight:20.8,wrap:"balance"})},{upTo:399,name:blockText({size:14,weight:500,lineHeight:18.2,wrap:"balance"})}],addPressScale:.94,stepPressScale:.88,pillPressScale:.97,imgInsetEven:{share:[.07,.07,.07,.07],px:[0,0,0,0]},imgInsetWhite:{share:[.11,.11,.14,.11],px:[0,0,0,0]},groundWhite:"surface",focusOffset:3,hover:{ring:{width:1.5,share:.45,color:"ink"},underlineOffset:3}},productRow:{card:blockBox({shown:false,w:361,h:109.328,gap:[12,12],center:true}),name:blockText({shown:false,size:17,weight:700,lineHeight:22.1,color:"ink"}),meta:blockText({shown:false,size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2})},cart:{line:blockBox({w:361,h:109.328,gap:[12,12],center:true}),name:blockBox({w:289,h:24,gap:[8,4],center:true,color:"ink"}),nameText:blockText({size:17,weight:700,lineHeight:22.1,color:"ink"}),meta:blockText({size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2}),price:blockText({size:17,weight:700,lineHeight:26.35,color:"ink",tabular:true}),was:blockText({shown:false,size:13,weight:400,lineHeight:18.85,color:"muted",marginTop:2}),acts:blockBox({w:289,h:20.141,marginTop:6,gap:[16,16]}),remove:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",deco:"underline",decoOffset:3}),removeBox:blockBox({w:53.016,h:20.141,color:"ink"}),end:blockBox({w:289,h:26.344,gap:[4,4]})},cartSquare:{line:blockBox({w:361,h:95.094,gap:[12,12]}),sm:blockBox({w:48,h:48,radius:[12,12],bg:"#F3F3F3"}),md:blockBox({w:52,h:52,radius:[12,12],bg:"#F3F3F3"}),lg:blockBox({w:56,h:56,radius:[12,12],bg:"#F3F3F3"}),imgInset:.1,imgFit:"contain",imgBlend:"multiply",name:blockBox({w:239.109,h:20,gap:[6,4],center:true}),nameText:blockText({size:15,weight:700,lineHeight:19.5}),link:blockText({size:15,weight:700,lineHeight:19.5}),linkReach:4,badge:blockBox({w:29.344,h:20,padding:[0,7,0,7],radius:[999,999],bg:"#E0E6F2",edge:{width:1.5,color:"rgba(90, 96, 135, 0.45)",ring:true},center:true}),badgeText:blockText({size:12,weight:700,lineHeight:12}),meta:blockText({size:13,weight:400,lineHeight:17.55,color:"muted",marginTop:2}),acts:blockBox({w:239.109,h:32,marginTop:6,gap:[16,16]}),act:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",deco:"underline",decoOffset:3}),actBox:blockBox({w:84.531,h:32,minHeight:32,color:"ink"}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,color:"muted",tabular:true,deco:"strike"})},cartWeb:{line:blockBox({w:404,h:88,gap:[16,0],center:true}),sq:blockBox({w:88,h:88,radius:[14,14],bg:"#F3F3F3"}),imgInset:.1,imgFit:"contain",imgBlend:"multiply",name:blockBox({w:225.875,h:24.688,gap:[8,4],center:true}),nameText:blockText({size:19,weight:700,lineHeight:24.7}),link:blockText({size:19,weight:700,lineHeight:24.7}),linkReach:4,badge:blockBox({w:32.625,h:22,padding:[0,8,0,8],radius:[999,999],bg:"#DEE4F1",center:true}),badgeText:blockText({size:13,weight:700,lineHeight:13}),meta:blockText({size:15,weight:400,lineHeight:21,marginTop:2}),price:blockText({size:19,weight:700,lineHeight:29.45,tabular:true}),was:blockText({size:15,weight:400,lineHeight:23.25,tabular:true,deco:"strike"}),narrow:{upTo:599,sq:blockBox({w:64,h:64,radius:[14,14],bg:"#F3F3F3"}),cost:blockBox({w:432,h:29.438,marginTop:4,gap:[8,8]}),nameText:blockText({size:17,weight:700,lineHeight:22.1}),link:blockText({size:17,weight:700,lineHeight:22.1})},narrower:{upTo:330,sq:blockBox({w:56,h:56,radius:[14,14],bg:"#F3F3F3"}),cost:blockBox({w:216,h:29.438,marginTop:4,gap:[8,8]}),nameText:blockText({size:17,weight:700,lineHeight:22.1}),link:blockText({size:17,weight:700,lineHeight:22.1})},phone:{upTo:639,line:blockBox({w:303,h:81.25,gap:[12,0],center:true}),sq:blockBox({w:56,h:56,radius:[12,12],bg:"#F3F3F3"}),cost:blockBox({w:235,h:23.25,marginTop:2,gap:[8,8]}),nameText:blockText({size:15,weight:700,lineHeight:19.5}),link:blockText({size:15,weight:700,lineHeight:19.5}),meta:blockText({size:13,weight:400,lineHeight:17.55,marginTop:2}),price:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),was:blockText({size:13,weight:400,lineHeight:20.15,tabular:true,deco:"strike"}),smallUpTo:359,smallSq:48}},price:{note:blockText({size:13,weight:400,lineHeight:19.5,color:"muted",marginTop:12}),noteStrong:blockText({size:13,weight:700,lineHeight:19.5,color:"muted"})},priceWeb:{rows:blockBox({w:536,h:166.625,gap:[10,10]}),row:blockBox({w:536,h:26.344,gap:[16,16]}),term:blockText({size:17,weight:400,lineHeight:26.35,wrap:"balance"}),value:blockText({size:17,weight:700,lineHeight:26.35,tabular:true}),off:blockText({size:17,weight:700,lineHeight:26.35,color:"ink",wrap:"balance"}),total:blockBox({w:536,h:49.594,marginTop:8,gap:[16,16]}),totalTerm:blockText({size:20,weight:700,lineHeight:31,wrap:"balance"}),totalValue:blockText({size:32,weight:700,lineHeight:49.6,tracking:-.64,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:16}),noteStrong:blockText({size:15,weight:700,lineHeight:22.5,color:"ink"}),phone:{upTo:639,rows:blockBox({w:239,h:145.141,gap:[8,8]}),term:blockText({size:15,weight:400,lineHeight:23.25,wrap:"balance"}),value:blockText({size:15,weight:700,lineHeight:23.25,tabular:true}),totalTerm:blockText({size:18,weight:700,lineHeight:27.9,wrap:"balance"}),totalValue:blockText({size:28,weight:700,lineHeight:43.4,tracking:-.56,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:12})},drawer:{rows:blockBox({w:360,h:154.219,marginTop:32,gap:[10,10]}),term:blockText({size:17,weight:400,lineHeight:26.35,wrap:"balance"}),value:blockText({size:17,weight:700,lineHeight:26.35,tabular:true}),totalTerm:blockText({size:20,weight:700,lineHeight:31,wrap:"balance"}),totalValue:blockText({size:24,weight:700,lineHeight:37.2,tabular:true}),note:blockText({size:15,weight:400,lineHeight:22.5,marginTop:12})}},need:{card:blockBox({w:325,h:125.25,padding:[14,16,14,16],radius:[0,20],bg:"surface",shadow:{color:"rgba(0, 0, 0, 0.06)",x:0,y:2,blur:3,spread:-1}}),kicker:blockBox({w:293,h:24,gap:[8,8],center:true}),kickerText:blockText({size:15,weight:700,lineHeight:23.25}),source:blockBox({w:116.719,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#DAF6E8",center:true,color:"ink"}),sourceText:blockText({size:12,weight:700,lineHeight:18.6,color:"ink"}),title:blockText({shown:false,size:15,weight:700,lineHeight:23.25}),signal:blockBox({w:293,h:65.25,marginTop:8,gap:[9,9],color:"#4D4D4D"}),signalText:blockText({size:15,weight:400,lineHeight:21.75,color:"#4D4D4D"}),signalLead:blockText({size:15,weight:700,lineHeight:21.75}),dot:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"alert",color:"#4D4D4D",dy:-1}),score:blockBox({w:293,h:99.859,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[10,10],bg:"#FCF0D6",center:true}),scoreLabel:blockText({size:14,weight:600,lineHeight:18.9,color:"#4D4D4D"}),scoreTag:blockBox({w:63.125,h:20.188,padding:[2,6,2,6],marginTop:3,radius:[6,6],bg:"surface"}),scoreTagText:blockText({size:12,weight:600,lineHeight:16.2,tracking:.72,face:"mono",upper:true,marginTop:3,paddingTop:2}),scoreNums:blockBox({w:106.109,h:51.141,gap:[6,0],center:true}),scoreWas:blockText({size:17,weight:700,lineHeight:26.35,color:"muted",deco:"strike",decoThickness:1.5}),scoreArrow:blockBox({w:16,h:16,color:"muted"}),scoreArrowFlip:true,scoreNow:blockText({size:28,weight:700,lineHeight:28,tracking:-.84,tabular:true}),scoreOf:blockText({size:15,weight:700,lineHeight:15,color:"#4D4D4D",tabular:true}),scoreSince:blockText({size:13,weight:700,lineHeight:20.15,color:"ink",marginTop:3})},needPlan:{card:blockBox({w:329,h:380.172,padding:[16,16,16,16],marginTop:14,radius:[22,22],bg:"surface",shadow:{color:"rgba(38, 37, 35, 0.06)",x:0,y:1,blur:3,spread:0},color:"#262523"}),kicker:blockBox({w:297,h:24,gap:[8,8],center:true,color:"#262523"}),kickerText:blockText({size:15,weight:800,lineHeight:22.5,color:"#262523"}),source:blockBox({w:83.375,h:24,padding:[0,9,0,9],radius:[999,999],bg:"#F2F1EE",center:true,color:"#4A4845"}),sourceText:blockText({size:12,weight:700,lineHeight:18,color:"#4A4845"}),title:blockText({size:19,weight:800,lineHeight:23.18,color:"#262523",marginTop:12}),signal:blockBox({w:297,h:65.25,marginTop:6,gap:[9,9],color:"#4A4845"}),signalText:blockText({size:15,weight:400,lineHeight:21.75,color:"#4A4845"}),signalLead:blockText({size:15,weight:800,lineHeight:21.75,color:"#262523"}),dot:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5372B",color:"#4A4845",dy:-1}),score:blockBox({w:297,h:69.75,padding:[10,14,10,14],marginTop:12,gap:[12,12],radius:[14,14],bg:"planAccentWash",center:true,color:"#262523"}),scoreLabel:blockText({size:13.5,weight:600,lineHeight:18.225,color:"#4A4845",wrap:"balance"}),scoreTag:blockBox({w:51.609,h:17.5,padding:[2,6,2,6],marginTop:3,radius:[5,5],bg:"surface",color:"#262523"}),scoreTagText:blockText({size:10,weight:600,lineHeight:13.5,color:"#262523",tracking:.6,face:"mono",upper:true,wrap:"balance",marginTop:3,paddingTop:2}),scoreNums:blockBox({w:94.75,h:49.75,gap:[6,0],center:true,color:"#262523"}),scoreWas:blockText({size:17,weight:700,lineHeight:25.5,color:"#6B6863",deco:"strike"}),scoreArrow:blockBox({w:16,h:16,color:"#6B6863"}),scoreArrowFlip:true,scoreNow:blockText({size:28,weight:800,lineHeight:28,color:"#262523"}),scoreOf:blockText({size:13,weight:800,lineHeight:13,color:"muted"}),scoreSince:blockText({size:12.5,weight:700,lineHeight:18.75,color:"planLink",marginTop:3}),sources:blockBox({w:131.375,h:24,gap:[4,4],color:"#262523"}),sourceDna:blockBox({w:44,h:24,padding:[0,9,0,9],radius:[999,999],bg:"planLinkWash",center:true,color:"planLink"}),sourceDnaText:blockText({size:12,weight:700,lineHeight:18,color:"planLink"}),dotWatch:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#E5A000",color:"#4A4845",dy:-1}),dotClear:blockBox({w:9,h:9,radius:[4.5,4.5],bg:"#5FA82B",color:"#4A4845",dy:-1}),scoreLabelMax:135,says:blockBox({w:297,h:52,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysImg:blockBox({w:32,h:32,radius:[16,16],color:"#262523"}),saysText:blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845"}),saysBy:blockText({size:14.5,weight:800,lineHeight:20.3,color:"#262523"}),saysByGap:2,saysTag:blockBox({w:51.609,h:15,padding:[2,6,2,6],radius:[5,5],bg:"surface",color:"#262523"}),saysTagText:blockText({size:10,weight:400,lineHeight:14,color:"#262523",tracking:.6,face:"mono",upper:true,paddingTop:2}),saysBare:blockBox({w:297,h:81,padding:[10,12,10,12],marginTop:12,gap:[10,10],radius:[14,14],bg:"#F8F7F4",color:"#262523"}),saysKicker:blockText({size:17,weight:400,lineHeight:25.5,color:"#262523"}),saysSerif:blockText({size:17,weight:800,lineHeight:25.5,color:"#262523",tracking:-.17,wrap:"balance"}),jump:blockBox({w:297,h:60,padding:[8,14,8,8],marginTop:12,gap:[12,12],radius:[14,14],bg:"planInk",center:true,color:"planOnInk"}),jumpImg:blockBox({w:44,h:44,radius:[10,10],bg:"surface",color:"surface"}),jumpKicker:blockText({size:13,weight:800,lineHeight:19.5,color:"planAccent"}),jumpTitle:blockText({size:15,weight:800,lineHeight:18.75,color:"planOnInk"}),jumpGo:blockText({size:14,weight:800,lineHeight:21,color:"planOnInk"}),jumpPressScale:.98,more:blockBox({w:87.547,h:36,marginTop:6,marginBottom:-4,gap:[4,4],minHeight:36,center:true,color:"planLink"}),moreText:blockText({size:15,weight:800,lineHeight:22.5,color:"planLink"}),moreIcon:blockBox({w:16,h:16,color:"planLink"}),moreInset:16,moreTurn:{closed:90,open:-90},rep:blockBox({w:297,h:48.5,padding:[14,14,12,14],marginTop:10,radius:[16,16],bg:"#F8F7F4",color:"#262523"})},tip:{card:blockBox({w:201.5,h:275.031,padding:[8,10,10,10],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"tintBlue",g:"tintGo",r:"tintPink"},img:blockBox({w:181.5,h:113.438,radius:[10,10],bg:"#F3F3F3"}),n:blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:blockText({size:14,weight:700,lineHeight:14}),title:blockText({size:16,weight:700,lineHeight:20,marginTop:10}),text:blockText({size:15,weight:400,lineHeight:21,color:"#4D4D4D",marginTop:4}),foot:blockBox({w:181.5,h:26.594,padding:[8,0,0,0],gap:[4,4],center:true,color:"ink"}),footText:blockText({size:12,weight:400,lineHeight:18.6,color:"ink",tracking:.48,face:"mono",upper:true,paddingTop:8}),footArrow:blockBox({w:14,h:14,color:"ink"}),footArrowFlip:true,pressScale:.98,bare:blockBox({w:181.5,h:42,padding:[2,0,0,0],center:true}),thumb:blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:blockBox({w:22,h:22})},tipPhoto:{card:blockBox({w:221,h:152,padding:[8,8,12,8],radius:[20,20],bg:"#FCF0D6"}),tones:{y:"#FCF0D6",c:"#EEDCC8",g:"tintGo",r:"tintPink"},img:blockBox({w:205,h:102.5,radius:[10,10],bg:"#F3F3F3"}),imgAspect:2,n:blockBox({w:28,h:28,radius:[14,14],bg:"surface",center:true,x:8,y:8}),nText:blockText({size:14,weight:700,lineHeight:14}),title:blockText({size:15,weight:700,lineHeight:19.5,marginTop:10}),titleInset:4,pressScale:.98,bare:blockBox({w:205,h:42,padding:[2,0,0,0],center:true}),thumb:blockBox({w:40,h:40,radius:[10,10],bg:"surface",center:true}),thumbIcon:blockBox({w:22,h:22,color:"ink"})},tipWeb:{card:blockBox({w:226,h:172.047,gap:[10,10]}),img:blockBox({w:226,h:141.25,radius:[14,14]}),imgAspect:1.6,title:blockText({size:16,weight:700,lineHeight:20.8,wrap:"balance"}),coverRadius:10,row:{from:440,card:blockBox({w:400,h:80,padding:[6,0,6,0],gap:[10,10],minHeight:80,center:true}),img:blockBox({w:64,h:64,radius:[10,10]}),arrowColumn:18,arrow:blockBox({w:18,h:18,color:"ink"}),arrowTurn:180},phone:{upTo:639,card:blockBox({w:216,h:162.5,gap:[8,8]}),img:blockBox({w:216,h:135,radius:[14,14]}),imgAspect:1.6,title:blockText({size:15,weight:700,lineHeight:19.5,wrap:"balance"}),smallUpTo:359,smallW:208},mark:{tile:blockBox({w:226,h:141.25,radius:[14,14],bg:"#F5F5F5",center:true,color:"ink"}),icon:{share:.36,min:16,max:40,color:"ink"}},ring:{width:2,offset:2,color:"text"},hoverOffset:3},tipPlan:{card:blockBox({w:225.406,h:182.844,padding:[14,14,12,14],radius:[18,18],bg:"planAccentChip",color:"#262523"}),tones:{y:"planAccentChip",c:"planLinkChip",g:"#DDEFC4",r:"#FFD8D6"},top:blockBox({w:197.406,h:30,center:true,color:"#262523"}),nText:blockText({size:30,weight:900,lineHeight:30,color:"#262523"}),icon:blockBox({w:26,h:26,color:"#262523"}),title:blockText({size:17,weight:800,lineHeight:21.25,color:"#262523",marginTop:14}),text:blockText({size:14.5,weight:400,lineHeight:20.3,color:"#4A4845",marginTop:4}),foot:blockBox({w:197.406,h:25.75,padding:[10,0,0,0],color:"planLink"}),footText:blockText({size:10.5,weight:400,lineHeight:15.75,color:"planLink",tracking:.42,face:"mono",upper:true,paddingTop:10})},cartPlan:{line:blockBox({w:297,h:95.625,gap:[12,12],color:"#262523"}),img:blockBox({w:64,h:64,radius:[14,14],bg:"planLinkWash",center:true,color:"planLink"}),icon:blockBox({w:28,h:28,color:"planLink"}),name:blockText({size:16.5,weight:800,lineHeight:20.625,color:"#262523",wrap:"balance"}),prices:blockBox({w:221,h:24,marginTop:3,gap:[8,2],center:true,color:"#262523"}),price:blockText({size:16,weight:800,lineHeight:24,color:"#262523",tabular:true}),was:blockText({size:14,weight:600,lineHeight:21,color:"#6B6863",deco:"strike"}),small:blockText({size:14,weight:400,lineHeight:21,color:"#6B6863"}),acts:blockBox({w:221,h:40,marginTop:8,gap:[16,16],center:true,color:"#262523"}),step:blockBox({w:110,h:40,radius:[999,999],bg:"surface",edge:{width:1.5,color:"#DAD7D1",ring:true},center:true,color:"#262523"}),remove:blockBox({w:56.422,h:40,minHeight:40,color:"#4A4845"}),removeText:blockText({size:14.5,weight:700,lineHeight:21.75,color:"#4A4845",deco:"underline",decoOffset:3,decoThickness:1.5})}};function deepFreeze2(value){if(value!==null&&typeof value=="object"&&!Object.isFrozen(value))for(let v of Object.values(value))deepFreeze2(v);return value}var k=everfurTokens,PRESET=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#preset@v1");function asPreset(theme){return Object.defineProperty(theme,PRESET,{value:theme,enumerable:true}),deepFreeze2(theme)}var SCALE_CAPS={content:0,heading:2,control:1.8,compact:1.5,badge:1.3},everfurTheme=asPreset({name:"everfur",colors:{bg:k.color.bg,surface:k.color.efWhite,text:k.color.text,ink:k.role.color.ink,onInk:k.color.efWhite,muted:k.role.color.muted,line:k.role.color.line,go:k.role.color.go,onGo:k.role.color.ink,pink:k.color.efDustyPink,onPink:k.role.color.ink,alert:k.color.alert,alertDeep:k.color.alertDeep,icoSage:k.role.color.icoSage,bgMist:k.color.bgMist,tintSage:k.role.color.tintSage,tintBlue:k.role.color.tintBlue,tintGo:k.role.color.tintGo,tintPink:k.role.color.tintPink,tintYellowEdge:k.role.color.tintYellowEdge,tintWatch:everfurMetrics.colors.watch,tintRed:k.role.color.tintRed,scrim:everfurMetrics.colors.scrim,grab:everfurMetrics.colors.grab,focus:k.role.color.ink,planInk:everfurMetrics.colors.planInk,planOnInk:everfurMetrics.colors.planOnInk,planAccent:everfurMetrics.colors.planAccent,planLink:everfurMetrics.colors.planLink,planAccentWash:everfurMetrics.colors.planAccentWash,planAccentChip:everfurMetrics.colors.planAccentChip,planLinkWash:everfurMetrics.colors.planLinkWash,planLinkChip:everfurMetrics.colors.planLinkChip},radius:{...k.radius},space:{...k.space},type:{family:k.font.family.base,mono:k.font.family.mono,faces:{regular:"Azeret-Regular",medium:"Azeret-Medium",bold:"Azeret-Bold",mono:"AzeretMono-Regular",monoBold:"AzeretMono-Bold"},namedFaces:true,size:{xs:k.font.size.xs,sm:k.font.size.sm,md:k.font.size.md,lg:k.font.size.lg,xl:k.font.size.xl},weight:{...k.font.weight},lineHeight:{...k.font.lineHeight},scaleCaps:SCALE_CAPS},motion:{duration:{press:k.motion.duration.press,fade:k.motion.duration.fade,enter:k.motion.duration.enter,sheet:k.motion.duration.sheet,sheetOut:k.motion.duration.sheetOut},easing:{out:k.motion.easing.out,drawer:k.motion.easing.drawer},pop:{duration:k.motion.duration.enter,from:.95,peakAt:.55,amplitude:.035,switchAmplitude:.06},reduced:false},metrics:everfurMetrics});function presetOf(theme){return theme[PRESET]??everfurTheme}function isObject(v){return v!==null&&typeof v=="object"&&!Array.isArray(v)}function merge(base3,over){if(!isObject(base3)||!isObject(over))return over===void 0?base3:over;let out={...base3};for(let[key,value]of Object.entries(over))value!==void 0&&(out[key]=merge(base3[key],value));return out}function resolveTheme(partial,base3=everfurTheme){if(!partial)return base3;let merged=merge(base3,partial),given=partial.colors;if(given){let colors=merged.colors;for(let[wash,from,share]of PLAN_WASHES){let c=given[from];c!==void 0&&given[wash]===void 0&&(colors[wash]=mixHex(c,share,colors.surface)??colors[wash]??c)}}return deepFreeze2(merged)}var PLAN_WASHES=[["planAccentWash","planAccent",.17],["planAccentChip","planAccent",.47],["planLinkWash","planLink",.12],["planLinkChip","planLink",.2]];function mixHex(color,share,ground){let ch=v=>{let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(v??"");return m?[m[1],m[2],m[3]].map(h=>parseInt(h,16)):void 0},[c,g]=[ch(color),ch(ground)];if(!(!c||!g))return`#${c.map((v,i)=>Math.round(v*share+(g[i]??0)*(1-share)).toString(16).padStart(2,"0")).join("").toUpperCase()}`}var ThemeContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-core#ThemeContext@v1"),host=globalThis,context=host[key]??(host[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurThemeContext"),context})();function ThemeProvider({theme:theme,children:children}){let outer=useTheme(),key=theme===void 0||isComplete(theme)?theme:contentKey(theme),value=react.useMemo(()=>isComplete(theme)?filled(theme):resolveTheme(theme,outer),[key,outer]);return react.createElement(ThemeContext.Provider,{value:value},children)}function contentKey(value){return JSON.stringify(value,(_,v)=>isObject(v)&&!Array.isArray(v)?Object.fromEntries(Object.keys(v).sort().map(k2=>[k2,v[k2]])):v)}function isComplete(theme){return theme!==void 0&&Object.isFrozen(theme)&&GROUPS.every(g=>g in theme)}var GROUPS=["name","colors","radius","space","type","motion","metrics"];function hasEvery(shape,value){if(shape===void 0)return true;if(!isObject(shape))return value!==void 0;if(!isObject(value))return false;for(let key of Object.keys(shape))if(!hasEvery(shape[key],value[key]))return false;return true}var fills=/* @__PURE__ */new WeakMap;function filled(theme){let hit=fills.get(theme);if(hit)return hit;if(hasEvery(everfurTheme,theme))return fills.set(theme,theme),theme;let preset=presetOf(theme),merged=merge(everfurTheme,preset===everfurTheme?theme:merge(preset,theme));merged[PRESET]=preset;let out=deepFreeze2(merged);return fills.set(theme,out),out}function useTheme(){let explicit=react.useContext(ThemeContext);return explicit?filled(explicit):everfurTheme}var px=n=>Math.round(n*1e3)/1e3;function faceOf(weight,mono=false){return mono?weight>450?"monoBold":"mono":weight>500?"bold":weight>450?"medium":"regular"}function withAlpha(color,alpha){let m=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(!m)return color;let[r,g,b]=[m[1],m[2],m[3]].map(h=>parseInt(h,16));return`rgba(${r}, ${g}, ${b}, ${alpha})`}function channelsOf(color){let hex=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);if(hex)return[hex[1],hex[2],hex[3]].map(h=>parseInt(h,16));let rgb2=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(color);return rgb2?[rgb2[1],rgb2[2],rgb2[3]].map(Number):void 0}function mixColor(color,share,base3,fallback){let[c,b]=[channelsOf(color),channelsOf(base3)];return!c||!b?fallback:`rgb(${c.map((v,i)=>Math.round(v*share+(b[i]??0)*(1-share))).join(", ")})`}function colorOf(t,value){let m=/^([a-zA-Z]+)(?:\/([\d.]+))?$/.exec(value),role=m?.[1];if(!m||role===void 0||!(role in t.colors))return value;let c=t.colors[role];return m[2]===void 0?c:withAlpha(c,Number(m[2]))}function textPartSpec(t,p){return{size:p.size,weight:p.weight,lineHeight:p.lineHeight,color:colorOf(t,p.color),...p.face==="mono"?{mono:true}:{},...p.face==="serif"?{serif:true}:{},...p.tracking?{tracking:p.tracking}:{},...p.upper?{upper:true}:{},...p.deco==="none"?{}:{deco:p.deco==="strike"?"strike":"underline",decoOffset:p.decoOffset,decoThickness:p.decoThickness},...p.tabular?{tabular:true}:{},...p.wrap==="auto"?{}:{wrap:p.wrap==="balance"?"balance":"pretty"}}}function partFill(t,value){return value==="none"?void 0:colorOf(t,value)}function summarySpec(t){let m=t.metrics.summary,lh=(size,ratio)=>px(size*ratio);return{paddingX:m.paddingX,paddingY:m.paddingY,radius:m.radius,borderWidth:m.borderWidth,borderColor:t.colors.line,background:colorOf(t,m.background),shadow:m.shadow,row:{paddingY:m.rowPaddingY,minHeight:m.rowMinHeight,gapX:m.rowGapX,gapY:m.rowGapY,divider:m.rowDivider,center:m.rowCenter},totalRowMinHeight:m.totalRowMinHeight,gap:m.gap??0,totalMarginTop:m.totalMarginTop??0,tabular:m.tabular,term:{size:m.termSize,weight:t.type.weight.regular,lineHeight:lh(m.termSize,m.termLineHeight),color:colorOf(t,m.termColor)},value:{size:m.valueSize,weight:m.valueWeight,lineHeight:lh(m.valueSize,m.valueLineHeight),color:colorOf(t,m.valueColor)},totalTerm:{size:m.totalTermSize,weight:m.totalTermWeight,lineHeight:lh(m.totalTermSize,m.termLineHeight),color:colorOf(t,m.totalTermColor)},total:{size:m.totalSize,weight:m.totalWeight,lineHeight:lh(m.totalSize,m.totalLineHeight),color:colorOf(t,m.valueColor)},off:textPartSpec(t,t.metrics.summary.off)}}function skeletonWidth(t,index){let widths=t.metrics.skeleton.widths;return`${widths[index%widths.length]}%`}function itemTestID(parent,key,own){return own!==void 0?own:parent===void 0?void 0:`${parent}-${key}`}var nums=group=>group,isBox=v=>"edge"in v&&"shadow"in v&&"fit"in v,isText=v=>"deco"in v&&"face"in v&&"tabular"in v;function byValue(group){let out=/* @__PURE__ */new Map;for(let[k2,v]of Object.entries(group))out.has(v)||out.set(v,k2);return out}var groups,derived=/* @__PURE__ */new WeakMap;function tokenOf(map,theme,v){let k2=map.get(v),t=k2===void 0?void 0:theme[k2];return typeof t=="number"?t:v}function blocksMetrics(theme){let base3=everfurBlocksMetrics,p=everfurTheme;if(theme.space===p.space&&theme.radius===p.radius&&theme.type.size===p.type.size&&theme.type.weight===p.type.weight)return base3;let hit=derived.get(theme);if(hit)return hit;groups??(groups={space:byValue(nums(p.space)),radius:byValue(nums(p.radius)),size:byValue(nums(p.type.size)),weight:byValue(nums(p.type.weight))});let g=groups,space=v=>tokenOf(g.space,nums(theme.space),v),radius=v=>tokenOf(g.radius,nums(theme.radius),v),walk=v=>Array.isArray(v)?v.map(walk):v===null||typeof v!="object"?v:isBox(v)?{...v,padding:v.padding.map(space),gap:v.gap.map(space),marginTop:space(v.marginTop),marginBottom:space(v.marginBottom),radius:v.radius.map(radius)}:isText(v)?{...v,size:tokenOf(g.size,nums(theme.type.size),v.size),weight:tokenOf(g.weight,nums(theme.type.weight),v.weight),marginTop:space(v.marginTop),paddingTop:space(v.paddingTop)}:Object.fromEntries(Object.entries(v).map(([k2,x])=>[k2,walk(x)])),out=walk(base3);return derived.set(theme,out),out}var TEXT_VARIANT_TIERS={display:"heading",headline:"heading",title:"heading",heading:"heading",body:"content",lead:"content",label:"control",meta:"compact",caption:"content",overline:"compact",kicker:"compact"};function textToneColor(t,tone){let c=t.colors;switch(tone){case"ink":return c.ink;case"text":return c.text;case"muted":return c.muted;case"danger":return c.alertDeep;case"inverse":return c.onInk;default:return}}function textVariantSpec(t,variant,tone,weight){let base3=textPartSpec(t,t.metrics.text[variant]),color=textToneColor(t,tone);return{...base3,...color?{color:color}:{},...weight?{weight:t.type.weight[weight]}:{}}}var TEXT_VARIANT_BREAKS={display:"balance",headline:"balance",title:"balance",heading:"balance",body:"pretty",lead:"pretty",meta:"pretty",caption:"pretty",label:"auto",overline:"auto",kicker:"auto"};function textVariantTier(t,variant){return t.type.variantTiers?.[variant]??TEXT_VARIANT_TIERS[variant]}var ReducedMotionContext=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#ReducedMotionContext@v1"),host=globalThis,context=host[key]??(host[key]=react.createContext(null));return context.displayName??(context.displayName="EverfurReducedMotionContext"),context})();function useKnownReducedMotion(){return react.useContext(ReducedMotionContext)}function rnText(t,spec){let face2=faceOf(spec.weight,spec.mono===true);return{fontFamily:spec.serif?t.type.faces.serif??t.type.faces.bold:t.type.faces[face2],...t.type.namedFaces?{}:{fontWeight:String(spec.weight)},fontSize:spec.size,lineHeight:spec.lineHeight,color:spec.color,...spec.tracking?{letterSpacing:spec.tracking}:{},...spec.upper?{textTransform:"uppercase"}:{},...spec.deco?rnDeco(spec):{},...spec.tabular?{fontVariant:["tabular-nums"]}:{},...spec.wrap&&reactNative.Platform.OS==="web"?{textWrap:spec.wrap}:{}}}function rnDeco(spec){let base3={textDecorationLine:spec.deco==="strike"?"line-through":"underline"};return reactNative.Platform.OS!=="web"?base3:{...base3,...spec.decoOffset?{textUnderlineOffset:spec.decoOffset}:{},...spec.decoThickness?{textDecorationThickness:spec.decoThickness}:{}}}function rnBox(t,b){let[pt=0,pr=0,pb=0,pl=0]=b.padding,[rt=0,rb=0]=b.radius,fill=partFill(t,b.bg);return{paddingTop:pt,paddingRight:pr,paddingBottom:pb,paddingLeft:pl,...b.marginTop?{marginTop:b.marginTop}:{},...b.gap[0]?{columnGap:b.gap[0]}:{},...b.gap[1]?{rowGap:b.gap[1]}:{},...rt===rb?rt?{borderRadius:rt}:{}:{borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomLeftRadius:rb,borderBottomRightRadius:rb},...fill?{backgroundColor:fill}:{},...b.edge.width>0&&!b.edge.ring?{borderWidth:b.edge.width,borderColor:colorOf(t,b.edge.color)}:{},...b.minHeight?{minHeight:b.minHeight}:{},...rnShadow(b.shadow)}}function webReducedMotion(){if(reactNative.Platform.OS!=="web")return false;let g=globalThis;return typeof g.matchMedia=="function"&&g.matchMedia("(prefers-reduced-motion: reduce)").matches}function useOsReducedMotion(known){let[reduced,setReduced]=react.useState(()=>known===null&&webReducedMotion());return react.useEffect(()=>{if(known!==null)return;let mounted=true,query=reactNative.AccessibilityInfo?.isReduceMotionEnabled;if(typeof query=="function"){let result=query.call(reactNative.AccessibilityInfo);result!=null&&typeof result.then=="function"&&result.then(value=>{mounted&&setReduced(value===true)},()=>{})}let subscription=reactNative.AccessibilityInfo?.addEventListener?.("reduceMotionChanged",value=>setReduced(value===true));return()=>{mounted=false,subscription?.remove?.()}},[known]),known??reduced}function useRnReduced(t){let os=useOsReducedMotion(useKnownReducedMotion());return t.motion.reduced||os}function slopFor(size){let pad=Math.max(0,Math.ceil((44-size)/2));return pad===0?void 0:{top:pad,bottom:pad,left:pad,right:pad}}function rnShadow(s){return s.blur===0&&s.y===0&&s.x===0?null:{shadowColor:s.color,shadowOffset:{width:s.x,height:s.y},shadowOpacity:1,shadowRadius:s.blur,elevation:1}}function breakProps(mode){return mode==="auto"?null:reactNative.Platform.OS==="ios"?{lineBreakStrategyIOS:"push-out"}:reactNative.Platform.OS==="android"&&mode==="balance"?{textBreakStrategy:"balanced"}:null}function weightStyle(t,weight){let w=t.type.weight[weight];return t.type.namedFaces?{fontFamily:t.type.faces[faceOf(w)]}:{fontWeight:String(w)}}function Text2({tier:tier,variant:variant,tone:tone,weight:weight,level:level,lineBreak:lineBreak,...props}){let t=useTheme(),cap2=t.type.scaleCaps[tier??(variant?textVariantTier(t,variant):"content")],breaks=breakProps(lineBreak??(variant?TEXT_VARIANT_BREAKS[variant]:"auto"));if(variant===void 0&&tone===void 0&&weight===void 0&&level===void 0)return breaks?react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...props}):react.createElement(reactNative.Text,cap2>0?{maxFontSizeMultiplier:cap2,...props}:props);let color=textToneColor(t,tone),own=variant?rnText(t,textVariantSpec(t,variant,tone,weight)):{...color?{color:color}:{},...weight?weightStyle(t,weight):{}},heading=level===void 0?{}:{accessibilityRole:"header",...reactNative.Platform.OS==="web"?{"aria-level":level}:{}};return react.createElement(reactNative.Text,{...cap2>0?{maxFontSizeMultiplier:cap2}:{},...breaks,...heading,...props,style:[own,props.style]})}var BOX=24,FINE=16,SEAM=.8,fine=dp=>Math.round(dp*FINE);function place(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE}]}}function strokePieces(icon,k2,out){for(let s of icon.strokes){let w=s.width*k2,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px2=(pts[i*2]??0)*k2,py=(pts[i*2+1]??0)*k2,dx=(pts[j*2]??0)*k2-px2,dy=(pts[j*2+1]??0)*k2-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place(px2+ux*along,py+uy*along,fine(len+e0+e1),fine(w),ux,uy),borderTopLeftRadius:e0>0?fine(w)/2:0,borderBottomLeftRadius:e0>0?fine(w)/2:0,borderTopRightRadius:e1>0?fine(w)/2:0,borderBottomRightRadius:e1>0?fine(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces(icon,k2,out){for(let b of icon.boxes){let w=(b.w+b.width)*k2,h=(b.h+b.width)*k2;out.push({paint:"borderColor",style:{...place((b.x-b.width/2)*k2+w/2,(b.y-b.width/2)*k2+h/2,fine(w),fine(h),1,0),borderWidth:fine(b.width*k2),borderRadius:(b.radius+b.width/2)*k2*FINE,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces(icon,k2,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k2,(t[i*2+1]??0)*k2]),base3=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base3=i)}if(len<=0)continue;let b0=p[base3]??[0,0],b1=p[(base3+1)%3]??[0,0],a=p[(base3+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine(along),br=fine(len)-bl,bh=fine(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k2,y0=(e[1]??0)*k2,dx=(e[2]??0)*k2-x0,dy=(e[3]??0)*k2-y0,d=Math.hypot(dx,dy),in0=SEAM*(e[4]??0),in1=SEAM*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place(x0+dx/d*mid,y0+dy/d*mid,fine(bar),fine(SEAM),dx/d,dy/d)})}}var cache2=/* @__PURE__ */new WeakMap;function piecesOf(icon,size){let sizes=cache2.get(icon);sizes===void 0&&(sizes=/* @__PURE__ */new Map,cache2.set(icon,sizes));let hit=sizes.get(size);if(hit!==void 0)return hit;let out=[],k2=size/BOX;return boxPieces(icon,k2,out),strokePieces(icon,k2,out),trianglePieces(icon,k2,out),sizes.set(size,out),out}function Glyph({icon:icon,size:size,color:color,label:label,testID:testID,style:style}){let t=useTheme(),side=size??t.metrics.icon.size,ink=color??t.colors.ink;/* @__PURE__ */
|
|
36
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,pointerEvents:"none",style:[{width:side,height:side},style],...label?{accessible:true,accessibilityRole:"image",accessibilityLabel:label}:{accessible:false,accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"},children:piecesOf(icon,side).map((piece,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[piece.style,{[piece.paint]:ink}]},i))})}var REGISTRY=/* @__PURE__ */(()=>{let key=/* @__PURE__ */Symbol.for("@everfur-health/ui-native#icons@v1"),host=globalThis;return host[key]??(host[key]={icons:{},warned:/* @__PURE__ */new Set})})();function iconNamed(name){let icon=REGISTRY.icons[name];return icon===void 0&&(typeof __DEV__<"u"?__DEV__:typeof process<"u"&&process.env.NODE_ENV!=="production")&&!REGISTRY.warned.has(name)&&(REGISTRY.warned.add(name),console.warn(`@everfur-health/ui-native: no icon "${name}" is registered. The lean entry draws only the icons an app registers: registerIcons({ ... }) with the UI_RN_ICON_* exports, or pass a drawing.`)),icon}function Icon({name:name,...rest}){let icon=iconNamed(name);return icon?/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:icon,...rest}):null}reactNative.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",justifyContent:"center"},block:{alignSelf:"stretch"},auto:{alignSelf:"flex-start"},labelBox:{flexShrink:1},label:{textAlign:"center"}});reactNative.StyleSheet.create({head:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},shrink:{flexShrink:1},end:{justifyContent:"flex-end"}});reactNative.StyleSheet.create({chip:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});reactNative.StyleSheet.create({st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},acts:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});function rnTextPart(t,p){return rnText(t,textPartSpec(t,p))}reactNative.StyleSheet.create({acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"},st:{alignItems:"center",alignSelf:"stretch"},center:{textAlign:"center"},stActs:{alignItems:"center",alignSelf:"stretch"},link:{alignItems:"center",justifyContent:"center"},underline:{textDecorationLine:"underline"}});reactNative.StyleSheet.create({pill:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",maxWidth:"100%"},label:{flexShrink:1}});var UI_RN_ICON_ARROW_LEFT={strokes:[{width:2,cap:true,closed:false,points:[12,19,5,12,12,5]},{width:2,cap:true,closed:false,points:[19,12,5,12]}],boxes:[],triangles:[],seams:[]};var UI_RN_ICON_CHEVRON={strokes:[{width:2,cap:true,closed:false,points:[9,18.001,15,12.001,9,6.001]}],boxes:[],triangles:[],seams:[]};var UI_RN_ICON_LEAF={strokes:[{width:2,cap:true,closed:true,points:[11,20,8.727,19.628,6.697,18.538,5.131,16.848,4.199,14.741,4.001,12.446,4.558,10.211,5.811,8.278,7.624,6.856,9.8,6.1,12.322,5.587,14.274,5.099,15.788,4.568,16.993,3.921,18.02,3.088,19,2,19.734,3.557,20.375,5.318,20.828,7.42,21,10,20.72,12.286,19.931,14.388,18.708,16.245,17.127,17.796,15.265,18.98,13.198,19.735,11,20]},{width:2,cap:true,closed:false,points:[2,21,2.218,19.285,2.858,17.776,3.896,16.524,5.311,15.582,7.08,15,8.885,14.469,10.573,13.695,11.993,12.823,13,12]}],boxes:[],triangles:[],seams:[]};reactNative.StyleSheet.create({qty:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"},button:{alignItems:"center",justifyContent:"center"}});reactNative.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignSelf:"stretch"},hairline:{position:"absolute",left:0,right:0},tab:{flex:1,flexBasis:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},center:{flexShrink:1,textAlign:"center"}});reactNative.StyleSheet.create({scrim:{flex:1,justifyContent:"flex-end"},sheet:{maxHeight:"100%"},grab:{alignItems:"center",justifyContent:"center"},head:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},titles:{flexShrink:1,flexGrow:1},close:{alignItems:"center",justifyContent:"center"},closeEnd:{marginLeft:"auto"},scroll:{flexGrow:0},top:{flexDirection:"row",alignItems:"center"}});function Skeleton({lines:lines=3,label:label,testID:testID,style:style}){let t=useTheme(),m=t.metrics.skeleton;/* @__PURE__ */
|
|
37
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{rowGap:m.gap,alignSelf:"stretch"},style],...label?{accessible:true,accessibilityRole:"progressbar",accessibilityLabel:label,accessibilityState:{busy:true}}:{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants"},children:Array.from({length:Math.max(1,lines)},(_,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{height:m.lineHeight,width:skeletonWidth(t,i),borderRadius:t.radius.pill,backgroundColor:t.colors.tintSage}},i))})}function SummaryList({rows:given,total:total=false,trailingRows:trailingRows=[],loading:loading=false,loadingLabel:loadingLabel,variant:variant="standard",note:note,grouped:grouped=true,lineBreak:lineBreak,testID:testID,style:style}){let t=useTheme(),s=summarySpec(t);if(loading)/* @__PURE__ */
|
|
38
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{padding:s.paddingX,borderRadius:s.radius,backgroundColor:t.colors.surface},style],children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:4,label:loadingLabel})});let rows=typeof total=="object"?[...given,{...total,key:total.key??"total"}]:given,large=total!==false;if(rows.length===0)return null;let read=row=>grouped?{accessible:true,accessibilityLabel:`${row.term}, ${row.value}`}:null,breaks=lineBreak===void 0?null:{lineBreak:lineBreak},noteRow=note?{...note,key:note.key??"note"}:void 0,all=[...rows,...trailingRows,...noteRow?[noteRow]:[]];if(variant!=="standard"&&variant!=="flush"){let su=t.metrics.variants.summary;/* @__PURE__ */
|
|
39
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[rnBox(t,variant==="inset"?su.inset:su.box),style],children:all.map((row,i)=>{let kind=row===noteRow?"note":large&&i===rows.length-1?"total":"row",box=kind==="note"?su.renewRow:kind==="total"?su.totalRow:su.row,term=kind==="note"?su.renewTerm:kind==="total"?su.totalTerm:su.term,value=kind==="note"?su.renew:kind==="total"?su.total:su.value;/* @__PURE__ */
|
|
39
40
|
return jsxRuntime.jsxs(reactNative.View,{testID:itemTestID(testID,row.key??i,row.testID),...read(row),style:[styles11.cardRow,{columnGap:box.gap[0]??0,minHeight:box.minHeight||void 0,marginTop:box.marginTop||void 0}],children:[
|
|
40
41
|
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:rnText(t,textPartSpec(t,term)),children:row.term}),
|
|
41
|
-
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:rnText(t,textPartSpec(t,value)),children:row.value})]},row.key??`${i}`)})})}let
|
|
42
|
-
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{paddingHorizontal:s.paddingX,paddingVertical:s.paddingY,borderWidth:s.borderWidth,borderColor:s.borderColor,borderRadius:s.radius,backgroundColor:s.background},rnShadow(s.shadow),style],children:all.map((row,i)=>{let last=i===all.length-1,isTotal=large&&i===rows.length-1,minHeight=isTotal?s.totalRowMinHeight:s.row.minHeight;/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:rnText(t,textPartSpec(t,value)),children:row.value})]},row.key??`${i}`)})})}let flush=variant==="flush";/* @__PURE__ */
|
|
43
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:[{paddingHorizontal:flush?0:s.paddingX,paddingVertical:flush?0:s.paddingY,borderWidth:flush?0:s.borderWidth,borderColor:s.borderColor,borderRadius:s.radius,backgroundColor:s.background},rnShadow(s.shadow),style],children:all.map((row,i)=>{let last=i===all.length-1,isTotal=large&&i===rows.length-1,minHeight=isTotal?s.totalRowMinHeight:s.row.minHeight;/* @__PURE__ */
|
|
43
44
|
return jsxRuntime.jsxs(reactNative.View,{testID:itemTestID(testID,row.key??i,row.testID),...read(row),style:[styles11.row,{alignItems:s.row.center?"center":"baseline",paddingVertical:s.row.paddingY,columnGap:s.row.gapX,rowGap:s.row.gapY},minHeight?{minHeight:minHeight}:null,last||s.row.divider===0?null:{borderBottomWidth:s.row.divider,borderBottomColor:s.borderColor}],children:[
|
|
44
45
|
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:rnText(t,isTotal?s.totalTerm:s.term),children:row.term}),
|
|
45
|
-
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:[rnText(t,isTotal?s.total:row.tone==="off"?s.off:s.value),styles11.value,s.tabular?styles11.tabular:null],children:row.value})]},row.key??`${i}`)})})}var styles11=reactNative.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},cardRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},value:{marginLeft:"auto",textAlign:"right"},tabular:{fontVariant:["tabular-nums"]}});
|
|
46
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{...breaks,style:[rnText(t,isTotal?s.total:row.tone==="off"?s.off:s.value),styles11.value,s.tabular?styles11.tabular:null],children:row.value})]},row.key??`${i}`)})})}var styles11=reactNative.StyleSheet.create({row:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between"},cardRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},value:{marginLeft:"auto",textAlign:"right"},tabular:{fontVariant:["tabular-nums"]}});function BlockIcon({icon:icon,size:size,color:color,style:style}){let t=useTheme();return typeof icon=="function"?icon({size:size,color:color??t.colors.ink}):typeof icon!="string"?/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:icon,size:size,color:color,style:style}):/* @__PURE__ */jsxRuntime.jsx(Icon,{name:icon,size:size,color:color,style:style})}function FadeImage({onShown:onShown,onLoad:onLoad,style:style,...props}){let t=useTheme(),reduced=useRnReduced(t),fade=react.useRef(new reactNative.Animated.Value(0)).current;/* @__PURE__ */
|
|
47
|
+
return jsxRuntime.jsx(reactNative.Animated.Image,{...props,fadeDuration:0,onLoad:e=>{onLoad?.(e);let ms=t.motion.duration.fade;if(reduced||ms<=0){fade.setValue(1),onShown?.();return}reactNative.Animated.timing(fade,{toValue:1,duration:ms,easing:reactNative.Easing.out(reactNative.Easing.cubic),useNativeDriver:reactNative.Platform.OS!=="web"}).start(()=>onShown?.())},style:[style,{opacity:fade}]})}reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"flex-start"},noGap:{columnGap:0},box:{alignItems:"center",justifyContent:"center"},grow:{flex:1,minWidth:0}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},words:{flex:1,minWidth:0},center:{alignItems:"center",justifyContent:"center"}});reactNative.StyleSheet.create({hintRow:{flexDirection:"row",alignItems:"flex-start"},grow:{flex:1}});reactNative.StyleSheet.create({base:{alignItems:"center",justifyContent:"center",alignSelf:"flex-start"}});reactNative.StyleSheet.create({base:{alignSelf:"flex-start"}});reactNative.StyleSheet.create({track:{alignSelf:"flex-start"},thumb:{position:"absolute"}});reactNative.StyleSheet.create({box:{flexDirection:"row"},line:{alignItems:"center"},area:{alignItems:"stretch"},input:{flex:1,minWidth:0,margin:0,borderWidth:0,backgroundColor:"transparent"},hidden:{position:"absolute",width:1,height:1,overflow:"hidden",opacity:0}});reactNative.StyleSheet.create({clip:{overflow:"hidden"},center:{alignItems:"center",justifyContent:"center"},stack:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start"}});reactNative.StyleSheet.create({leadAuto:{flexShrink:0},words:{flex:1,minWidth:0},below:{alignSelf:"flex-start"},end:{flexDirection:"row",alignItems:"center",flexShrink:1,maxWidth:"45%",justifyContent:"flex-end"},flush:{marginTop:0}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"flex-start"},copy:{flex:1,minWidth:0},acts:{flexDirection:"row",flexWrap:"wrap",alignItems:"center"}});function Toast({message:message,action:action,variant:variant="pill",testID:testID,style:style}){let t=useTheme(),card=variant==="card",m=t.metrics.lists.toast,v=t.metrics.variants.toast,box=card?v.box:m.box,[pt=0,pr=0,pb=0,pl=0]=box.padding,words2=rnTextPart(t,card?v.text:m.text);/* @__PURE__ */
|
|
46
48
|
return jsxRuntime.jsxs(reactNative.View,{testID:testID,style:[card?styles22.card:[styles22.pill,{marginHorizontal:m.inset}],{paddingTop:pt,paddingRight:pr,paddingBottom:pb,paddingLeft:pl,borderRadius:box.radius[0]??0,backgroundColor:partFill(t,box.bg)},style],children:[
|
|
47
|
-
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[words2,card?styles22.start:styles22.center,styles22.shrink],children:message}),action?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:action.onPress,accessibilityRole:"button",accessibilityLabel:action.label,testID:testID?`${testID}-action`:void 0,style:({pressed:pressed})=>[{marginLeft:t.metrics.lists.banner.acts.gap[0]??0},pressed?{opacity:t.metrics.lists.linkPressedOpacity}:null],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{tier:"control",style:rnTextPart(t,{...card?v.text:m.text,weight:t.metrics.lists.banner.link.weight}),children:action.label})}):null]})}var styles22=reactNative.StyleSheet.create({fill:{flex:1},host:{position:"absolute",left:0,right:0,alignItems:"center"},cardHost:{position:"absolute"},card:{alignSelf:"stretch"},start:{textAlign:"left"},pill:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",alignSelf:"center",maxWidth:"100%"},center:{textAlign:"center"},shrink:{flexShrink:1}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});var DESIGN_V3_LIGHT=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),cache2=/* @__PURE__ */new WeakMap;function v3Palette(theme){let hit=cache2.get(theme);if(hit!==void 0)return hit;let c=theme.color,dark=theme.brightness==="dark",neutrals=dark?{dark:dark,ink:c.text.primary,ink2:c.text.secondary,ink3:c.text.muted,paper:c.background,card:c.surface,line:c.borderRingCream,tile:c.surfaceSubtle,shadow:c.shadow,riskBg:c.badgeBgCritical,riskInk:c.danger,riskDot:c.danger,clearBg:c.badgeBgPositive,clearInk:c.success,clearDot:c.success,watchDot:c.warningStrong}:{dark:dark,...DESIGN_V3_LIGHT},textOn=(ink,grounds)=>pushToContrast(ink,grounds,poleForGrounds(grounds),V3_TEXT_CONTRAST),labelOn=(ink,fill)=>contrastRatio(ink,fill)>=V3_TEXT_CONTRAST?ink:legibleOn(fill,V3_TEXT_CONTRAST),badgeGrounds=[neutrals.card,neutrals.paper].map(under=>flattenOnto(c.brandSoft,under)??under),brand={primary:c.primary,onPrimary:labelOn(c.onPrimary,c.primary),accent:c.accent,onAccent:labelOn(c.onAccent,c.accent),link:textOn(c.linkInk,[neutrals.card,neutrals.paper,neutrals.tile]),badge:c.brandSoft,onBadge:textOn(c.brandInk,badgeGrounds)},palette=/* @__PURE__ */Object.freeze({...neutrals,...brand});return cache2.set(theme,palette),palette}var V3_TEXT_CONTRAST=4.5;var GRAB="#DAD7D1";function planDsInput(p,outline=false){let r=role=>p.roles[role]??role,neutral=hex=>p.dark?r("line"):hex,box=(bg,extra={})=>({bg:bg,...extra}),words2=color=>({color:color}),noShadow={color:"",x:0,y:0,blur:0,spread:0};return{colors:{bg:r("paper"),surface:r("card"),text:r("black"),ink:r(outline?"ink":"primary"),onInk:r("onPrimary"),muted:r("ink3"),line:r("line"),scrim:r("scrim"),grab:neutral(GRAB),focus:r("ink")},type:p.type,motion:{reduced:p.reduced},metrics:{variants:{drawer:{frame:box(r("card"),{color:r("ink")}),grab:box(neutral(GRAB)),kicker:words2(r("ink3")),close:{color:r("ink")},title:{color:r("ink"),wrap:"auto"},text:words2(r("black")),scrim:r("scrim")},segmented:{track:box(r("card"),{edge:{color:neutral(GRAB)}}),label:words2(r("ink")),chosen:box(r("primary")),chosenLabel:words2(r("onPrimary"))},stepper:{track:box(r("card"),{edge:{color:neutral(GRAB)}}),button:{color:r("ink")},value:words2(r("ink"))},summary:{box:box(r("card"),p.dark?{shadow:noShadow}:{}),term:words2(r("ink2")),value:words2(r("ink")),totalTerm:words2(r("ink")),total:words2(r("ink")),renewTerm:words2(r("ink2")),renew:words2(r("ink")),inset:box(r("paper"))},toast:{box:box(r("ink")),text:words2(r("onInk"))},focus:{color:r("ink")}}}}}var caches=/* @__PURE__ */new WeakMap;function planDsTheme(key,preset,input,outline=false){let byPreset=caches.get(preset);byPreset===void 0&&(byPreset={fill:/* @__PURE__ */new WeakMap,outline:/* @__PURE__ */new WeakMap},caches.set(preset,byPreset));let cache5=byPreset[outline?"outline":"fill"],t=cache5.get(key);return t===void 0&&(t=resolveTheme(planDsInput(input(),outline),preset),cache5.set(key,t)),t}var rnBlockFonts=theme=>{let n=theme.type.namedFaces,family=key=>face(theme,key).fontFamily;return{family:family("regular"),mono:family("mono"),faces:{regular:family("regular"),medium:family("medium"),bold:family("bold"),mono:family("mono"),monoBold:family("monoBold"),serif:headingFace(theme,"bold").fontFamily},namedFaces:n.regular&&n.medium&&n.bold}};function rnPlanDsTheme(theme,roles){return planDsTheme(theme,everfurTheme,()=>({roles:roles,dark:v3Palette(theme).dark,type:{...rnBlockFonts(theme),scaleCaps:theme.type.scaleCaps},reduced:theme.motion.reducedMotion}))}function PlanDs(props){return react.createElement(ThemeProvider,{theme:props.theme},props.children)}var DESIGN_RN_PLAN=/* @__PURE__ */Object.freeze({root:{backgroundColor:"$paper",color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:28,paddingLeft:16,paddingRight:16,paddingTop:16},pageFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:16,textAlign:"center"},tools:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,justifyContent:"space-between",lineHeight:25.5,marginBottom:2,marginLeft:2,marginRight:-6,marginTop:-8},toolsEyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},toolsEnd:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5},orders:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:6,lineHeight:22.5,minHeight:44,paddingBottom:0,paddingLeft:8,paddingRight:8,paddingTop:0},ordersIcon:{height:21,width:21},cart:{alignItems:"center",backgroundColor:"transparent",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,height:44,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:44},cartIcon:{height:26,width:26},cartCount:{backgroundColor:"$riskDot",borderRadius:999,color:"$card",fontFamily:"sans",fontSize:12,fontVariant:["tabular-nums"],fontWeight:"800",height:20,lineHeight:20,minWidth:20,paddingBottom:0,paddingLeft:5,paddingRight:5,paddingTop:0,position:"absolute",right:1,ring:[{width:2,color:"$paper"}],textAlign:"center",top:3},head:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:["fr",56],lineHeight:25.5,paddingBottom:0,paddingLeft:2,paddingRight:2,paddingTop:2},eyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},title:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:30.74,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},subtitle:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},headImage:{backgroundColor:"$tile",borderRadius:28,height:56,ring:[{width:3,color:"$paper"},{width:5.5,color:"$accent"}],width:56},by:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[40,"fr",22],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},byImage:{backgroundColor:"$tile",borderRadius:20,height:40,width:40},byName:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75},byRole:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,marginTop:2,textTransform:"uppercase"},byOk:{color:"$link",height:22,width:22},need:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},needKicker:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:8,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sources:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:4,lineHeight:22.5,marginLeft:"auto"},source:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$tile",borderRadius:999,color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:12,fontWeight:"700",height:24,lineHeight:18,paddingBottom:0,paddingLeft:9,paddingRight:9,paddingTop:0},sourceDna:{backgroundColor:"$linkWash",color:"$link"},needTitle:{color:"$ink",fontFamily:"sans",fontSize:19,fontWeight:"800",lineHeight:23.18,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},needRisk:{alignItems:"baseline",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:9,grid:[9,"fr"],lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},needRiskLead:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:21.75},dot:{alignSelf:"flex-start",borderRadius:4.5,flexGrow:0,flexShrink:0,height:9,width:9},dotRisk:{backgroundColor:"$riskDot"},odds:{alignItems:"center",backgroundColor:"$accent4",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10},oddsKicker:{color:"$ink2",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:18.23,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:135},oddsTag:{alignSelf:"flex-start",backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,fontWeight:"600",letterSpacing:.6,lineHeight:13.5,marginTop:3,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},oddsNumbers:{alignItems:"center",color:"$ink",columnGap:6,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:["auto","auto","auto"],justifyItems:"flex-end",lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,rowGap:0},oddsFrom:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,textDecorationLine:"line-through"},oddsIcon:{color:"$ink3",height:16,width:16},oddsTo:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",lineHeight:28},oddsLabel:{color:"$link",fontFamily:"sans",fontSize:12.5,fontWeight:"700",lineHeight:18.75,marginTop:3},says:{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[32,"fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10},saysImage:{borderRadius:16,height:32,width:32},saysText:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysBy:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:20.3,marginRight:2},saysSerif:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},tag:{backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:14,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},jump:{alignItems:"center",backgroundColor:"$primary",borderRadius:14,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[44,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:8,paddingLeft:8,paddingRight:14,paddingTop:8,textAlign:"left",width:"100%"},jumpNoImage:{grid:["fr","auto"]},jumpImage:{backgroundColor:"$card",borderRadius:10,height:44,width:44},jumpSmall:{color:"$accent",fontFamily:"sans",fontSize:13,fontWeight:"800",lineHeight:19.5,textAlign:"left"},jumpStrong:{color:"$onPrimary",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75,textAlign:"left"},jumpGo:{color:"$onPrimary",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:21,textAlign:"left"},steps:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:12,paddingRight:12,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},stepsHead:{alignItems:"baseline",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,paddingBottom:0,paddingLeft:4,paddingRight:4,paddingTop:0},stepsTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stepsLabel:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.55,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},n:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},tips:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-12,marginRight:-12,marginTop:10,paddingBottom:2,paddingLeft:12,paddingRight:12,paddingTop:0},tip:{borderRadius:18,color:"$ink",flexBasis:"78%",flexDirection:"column",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:14},tipY:{backgroundColor:"$accentChip"},tipC:{backgroundColor:"$linkChip"},tipG:{backgroundColor:"$clearChip"},tipR:{backgroundColor:"$riskChip"},tipTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},tipIcon:{color:"$ink",height:26,width:26},tipN:{color:"$ink",fontFamily:"serif",fontSize:30,fontWeight:"900",lineHeight:30},tipStrong:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:21.25,marginTop:14},tipSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:4},tipEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:"auto",paddingTop:10,textTransform:"uppercase"},sec:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},secTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},secN:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},pick:{backgroundColor:"transparent",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},pickTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[76,"fr"],lineHeight:25.5},pickImage:{backgroundColor:"$paper",borderRadius:14,height:76,overflow:"hidden",width:76},pickTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stars:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13.5,fontWeight:"800",gap:4,lineHeight:20.25,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},starsIcon:{color:"$watchDot",height:14,width:14},starsLabel:{color:"$ink3",fontFamily:"sans",fontSize:13.5,fontWeight:"500",lineHeight:20.25},pickLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},reviews:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-16,marginRight:-16,marginTop:12,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0},review:{backgroundColor:"$paper",borderRadius:14,color:"$ink",flexBasis:"78%",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewStars:{color:"$watchDot",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:1,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},reviewStar:{height:13,width:13},reviewText:{color:"$ink",fontFamily:"sans",fontSize:15,lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:5},reviewBy:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:19.5,marginTop:4},why:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$ink"},lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},whyMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},whyList:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},whyRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[58,"fr"],lineHeight:25.5,marginTop:10},whyStrong:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:19.5},whySmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1},chip:{alignItems:"center",borderRadius:6,color:"$ink",fontFamily:"mono",fontSize:10.5,fontWeight:"700",height:22,justifyContent:"center",letterSpacing:.42,lineHeight:15.75,textTransform:"uppercase"},chipDna:{backgroundColor:"$linkWash",color:"$link"},chipAsk:{backgroundColor:"$accent4",color:"$ink"},chipRec:{backgroundColor:"$tile",color:"$ink2"},score:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:8,justifyContent:"space-between",lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:11,paddingLeft:14,paddingRight:12,paddingTop:11},scoreValue:{color:"$accent",flexGrow:0,flexShrink:0,fontFamily:"mono",fontSize:16,fontWeight:"700",lineHeight:20.8},dose:{backgroundColor:"$linkWash",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:10,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:12},doseMini:{color:"$link",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},doseList:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},doseItem:{alignItems:"center",backgroundColor:"$card",borderRadius:12,color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,paddingBottom:10,paddingLeft:4,paddingRight:4,paddingTop:10,textAlign:"center"},doseValue:{color:"$ink",fontFamily:"mono",fontSize:21,fontVariant:["tabular-nums"],fontWeight:"700",lineHeight:23.1,textAlign:"center"},doseLabel:{color:"$ink2",fontFamily:"sans",fontSize:12.5,lineHeight:16.25,textAlign:"center"},doseNote:{color:"$link",fontFamily:"sans",fontSize:14,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},ingredients:{color:"$ink",flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},ingredient:{backgroundColor:"$tile",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:20.25,paddingBottom:6,paddingLeft:10,paddingRight:10,paddingTop:6},opts:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:14},opt:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,inner:{width:1.5,color:"$n_DEDCD7"},justifyContent:"space-between",lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,textAlign:"left",width:"100%"},optOn:{inner:{width:2.5,color:"$ink"}},optOnce:{backgroundColor:"$paper",inner:null,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10,shadow:null},optOnceOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},optText:{alignItems:"flex-start",color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,textAlign:"left"},optStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,textAlign:"left"},optOnceStrong:{fontSize:15,fontWeight:"700",lineHeight:22.5},optSmall:{color:"$ink2",fontFamily:"sans",fontSize:13.5,lineHeight:20.25,textAlign:"left"},optOnceSmall:{fontSize:13,lineHeight:19.5},optTag:{backgroundColor:"$riskInk",borderRadius:6,color:"$card",fontFamily:"sans",fontSize:12,fontWeight:"800",lineHeight:18,marginBottom:4,paddingBottom:2,paddingLeft:8,paddingRight:8,paddingTop:2,textAlign:"left"},price:{alignItems:"flex-end",color:"$ink",columnGap:8,flexDirection:"column",flexWrap:"nowrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,minWidth:0,rowGap:0,textAlign:"left"},priceValue:{color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.4,textAlign:"left"},priceWas:{color:"$riskInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,textAlign:"left",textDecorationLine:"line-through"},optPrice:{color:"$ink",fontFamily:"sans",fontSize:18,fontWeight:"800",lineHeight:27,textAlign:"left"},optOncePrice:{color:"$ink2",fontSize:15,fontWeight:"700",lineHeight:22.5},buy:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12},button:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:52,paddingBottom:0,paddingLeft:20,paddingRight:20,paddingTop:0,textDecorationLine:"none",width:"100%"},buttonDisabled:{opacity:.32},proof:{alignItems:"center",color:"$riskInk",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:6,justifyContent:"center",lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},proofIcon:{flexGrow:0,flexShrink:0,height:21,marginTop:-2,width:21},trust:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trustItem:{alignItems:"center",color:"$ink2",fontFamily:"sans",fontSize:12.5,fontWeight:"600",gap:4,lineHeight:16.25,textAlign:"center"},trustIcon:{color:"$link",height:20,width:20},on:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[34,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:10,paddingTop:10},onIcon:{alignItems:"center",backgroundColor:"$clearDot",borderRadius:17,color:"$card",fontFamily:"sans",fontSize:17,height:34,justifyContent:"center",lineHeight:25.5,width:34},onIconSvg:{height:18,width:18},onStrong:{color:"$clearInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:18.75},onSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:17.55,marginTop:1},onButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:38,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},more:{color:"$ink",columnGap:18,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8,rowGap:0},moreButton:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:34,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},fine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},others:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},sign:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DEDCD7"},lineHeight:25.5,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},signUrgent:{backgroundColor:"$riskBg",inner:null,shadow:null},signTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",gap:8,lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},signUrgentTitle:{color:"$riskInk"},signUrgentIcon:{height:20,width:20},signBody:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:4},signUrgentBody:{color:"$ink"},questionsKicker:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},questions:{color:"$ink",fontFamily:"sans",fontSize:15,gap:6,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingLeft:22},questionsAfterKicker:{marginTop:6},add:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",inner:{width:2,color:"$ink"},justifyContent:"center",lineHeight:24,marginTop:14,minHeight:48,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,width:"100%"},addOn:{backgroundColor:"$clearBg",color:"$clearInk",inner:null,shadow:null},askRow:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[40,"fr",18],lineHeight:25.5,marginTop:10,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12,textAlign:"left",width:"100%"},askRowInSec:{marginTop:12},askRowIcon:{alignItems:"center",backgroundColor:"$card",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:40},askRowIconSvg:{height:21,width:21},askRowStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15,textAlign:"left"},askRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1,textAlign:"left"},askRowChev:{color:"$ink2",height:18,width:18},extras:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:22},extrasTitle:{color:"$ink3",fontFamily:"mono",fontSize:11,fontWeight:"400",letterSpacing:.77,lineHeight:12.65,marginBottom:0,marginLeft:4,marginRight:4,marginTop:0,textTransform:"uppercase"},extra:{alignItems:"flex-start",backgroundColor:"$card",borderRadius:22,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[56,"fr"],lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,rowGap:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},extraKit:{backgroundColor:"$linkWash",inner:null,shadow:null},extraImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},extraKitImage:{backgroundColor:"$card"},extraIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",height:56,justifyContent:"center",width:56},extraIconSvg:{height:26,width:26},extraTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},extraTitleSerif:{fontFamily:"serif",fontSize:21,fontWeight:"800",letterSpacing:-.21,lineHeight:25.2},extraBody:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},extraPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,rowGap:0},extraPriceValue:{color:"$ink",fontFamily:"sans",fontSize:19,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.6},extraPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:19.6,textDecorationLine:"line-through"},extraGo:{backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:21.75,marginTop:8,minHeight:40,paddingBottom:0,paddingLeft:18,paddingRight:18,paddingTop:0},extraGoOn:{backgroundColor:"$clearBg",color:"$clearInk"},wait:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},waitTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[46,"fr"],lineHeight:25.5},waitTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:13,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:46,justifyContent:"center",lineHeight:33,width:46},waitTileSvg:{height:23,width:23},waitMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},waitTitle:{color:"$ink",fontFamily:"serif",fontSize:26,fontWeight:"800",letterSpacing:-.26,lineHeight:27.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},waitKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},waitText:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15.5,fontWeight:"700",gap:8,lineHeight:23.25,marginBottom:12,marginLeft:0,marginRight:0,marginTop:16},waitTextSvg:{color:"$link",flexGrow:0,flexShrink:0,height:20,width:20},waitButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},track:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trackStep:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[22,"fr"],lineHeight:25.5,paddingBottom:16,position:"relative"},trackStepLast:{paddingBottom:0},trackLine:{backgroundColor:"$n_E2DFD9",borderRadius:1,bottom:-2,left:10,position:"absolute",top:20,width:2},trackLineDone:{backgroundColor:"$primary"},trackDot:{alignItems:"center",backgroundColor:"$card",borderRadius:11,height:22,inner:{width:2,color:"$n_CFCBC4"},justifyContent:"center",position:"relative",width:22,zIndex:1},trackDotDone:{backgroundColor:"$primary",inner:null,shadow:null},trackDotNow:{backgroundColor:"$accent",inner:{width:2,color:"$ink"}},trackDotSvg:{color:"$card",height:13,width:13},trackTitle:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15},trackTitleTodo:{color:"$ink3",fontWeight:"700"},trackDetail:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:1},trackTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:13.5,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},next:{backgroundColor:"$card",borderRadius:18,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:22,paddingBottom:4,paddingLeft:16,paddingRight:16,paddingTop:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left"},nextIn:{backgroundColor:"$paper",inner:null,marginTop:8,shadow:null},nextRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[36,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:0,paddingRight:0,paddingTop:10,textAlign:"left"},nextIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:36,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:36},nextIconSvg:{height:19,width:19},nextIconImage:{borderRadius:11,height:"100%",width:"100%"},nextLabel:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,textAlign:"left",textTransform:"uppercase"},nextText:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"600",lineHeight:20.25,marginTop:1,textAlign:"left"},done:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:20,paddingLeft:22,paddingRight:22,paddingTop:40,textAlign:"center"},doneCheck:{alignItems:"center",backgroundColor:"$accent",borderRadius:38,color:"$ink",fontFamily:"sans",fontSize:17,height:76,justifyContent:"center",lineHeight:25.5,marginBottom:0,marginLeft:"auto",marginRight:"auto",marginTop:0,textAlign:"center",width:76},doneCheckSvg:{height:38,width:38},doneTitle:{color:"$ink",fontFamily:"serif",fontSize:34,fontWeight:"800",letterSpacing:-.34,lineHeight:39.1,marginBottom:0,marginLeft:0,marginRight:0,marginTop:20,textAlign:"center"},doneWhen:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,textAlign:"center"},doneWho:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2,textAlign:"center"},pushFoot:{backgroundColor:"$paper",borderTopColor:"$line",borderTopWidth:1,color:"$ink",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:34,paddingLeft:18,paddingRight:18,paddingTop:12},pushFootStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5},shop:{color:"$ink",fontFamily:"sans",fontSize:17,gap:12,lineHeight:25.5,paddingBottom:28,paddingLeft:18,paddingRight:18,paddingTop:8},shopTitle:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:31.32,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopSub:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:-6},shopKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:18.4,marginBottom:-4,marginLeft:2,marginRight:2,marginTop:6},shopCard:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:16,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},shopFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopFineCenter:{marginTop:14,textAlign:"center"},shopEmpty:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:48,textAlign:"center"},shopEmptyTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:20,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:72,justifyContent:"center",lineHeight:33,marginBottom:8,textAlign:"center",width:72},shopEmptyTileSvg:{height:34,width:34},shopEmptyTitle:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",letterSpacing:-.28,lineHeight:30.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},shopEmptyText:{color:"$ink2",fontFamily:"sans",fontSize:15.5,lineHeight:22.48,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:298.07,textAlign:"center"},shopEmptyButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,marginTop:12,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textAlign:"center",textDecorationLine:"none"},shopLink:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},shopActions:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:4,lineHeight:25.5,marginTop:4},orderList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},order:{alignItems:"center",backgroundColor:"$card",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:["fr",18],lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:14,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left",width:"100%"},orderChev:{color:"$ink3",height:18,width:18},orderTop:{alignItems:"center",color:"$ink",columnGap:10,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,rowGap:4,textAlign:"left"},orderNo:{color:"$ink3",fontFamily:"mono",fontSize:12,letterSpacing:.48,lineHeight:18,textAlign:"left"},orderWhat:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20.8,marginTop:8,textAlign:"left"},orderMeta:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:2,textAlign:"left"},orderPics:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:10,textAlign:"left"},orderPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,overflow:"hidden",textAlign:"left",width:40},orderPicImage:{height:"100%",width:"100%"},orderPicSvg:{height:20,width:20},pill:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$accent3",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13,fontWeight:"800",gap:6,lineHeight:19.5,minHeight:26,paddingBottom:0,paddingLeft:10,paddingRight:10,paddingTop:0,textAlign:"left"},pillDone:{backgroundColor:"$clearBg",color:"$clearInk"},pillSub:{backgroundColor:"$linkWash",color:"$link"},cartItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:18,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},cartItem:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[64,"fr"],lineHeight:25.5},cartItemImage:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",fontFamily:"sans",fontSize:17,height:64,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:64},cartItemImageSvg:{height:28,width:28},cartItemTitle:{color:"$ink",fontFamily:"sans",fontSize:16.5,fontWeight:"800",lineHeight:20.63,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},cartItemPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:3,rowGap:2},cartItemPriceValue:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:24},cartItemPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"600",lineHeight:21,textDecorationLine:"line-through"},cartItemPriceNote:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:21},cartItemActions:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:16,lineHeight:25.5,marginTop:8},stepper:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,30,40],height:40,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},stepperButton:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},stepperButtonDisabled:{opacity:.3},stepperButtonSvg:{height:16,width:16},stepperValue:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:23.25,textAlign:"center"},remove:{backgroundColor:"transparent",color:"$ink2",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},mode:{color:"$ink",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:8},modeButton:{alignItems:"center",backgroundColor:"$paper",borderRadius:12,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"700",gap:10,justifyContent:"space-between",lineHeight:18.85,minHeight:44,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:8,textAlign:"left"},modeButtonOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},modePrice:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:18.85,textAlign:"left"},every:{backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:4,grid:["fr","fr","fr"],inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5,marginTop:8,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:4},everyButton:{backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:36,paddingBottom:0,paddingLeft:6,paddingRight:6,paddingTop:0,textAlign:"center"},everyButtonOn:{backgroundColor:"$primary",color:"$onPrimary"},summary:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},summaryRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:12,justifyContent:"space-between",lineHeight:22.5,minHeight:34},summaryLabel:{alignItems:"center",alignSelf:"flex-start",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:8,lineHeight:22.5},summaryTotal:{fontSize:17,fontWeight:"800",lineHeight:25.5,minHeight:42},summaryTotalLabel:{color:"$ink"},summaryRenew:{fontSize:14,lineHeight:21,marginTop:-6,minHeight:28},summaryTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,fontVariant:["tabular-nums"],letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},foot:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5},footFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},co:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:2},coProduct:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr"],lineHeight:25.5},coProductImage:{alignItems:"center",backgroundColor:"$accent3",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,height:56,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:56},coProductImageSvg:{height:30,width:30},coProductTitle:{color:"$ink",fontFamily:"sans",fontSize:20,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},coProductLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},coOptions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coOption:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},coOptionOn:{backgroundColor:"$accent4",inner:{width:2,color:"$ink"}},coOptionHit:{alignItems:"flex-start",backgroundColor:"transparent",borderRadius:16,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[22,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12,rowGap:2,textAlign:"left",width:"100%"},coOptionStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6,textAlign:"left"},coOptionSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:18.2,textAlign:"left"},coOptionPrice:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:21.6,textAlign:"right"},coOptionPriceWas:{color:"$riskInk",fontFamily:"sans",fontSize:13,fontVariant:["tabular-nums"],fontWeight:"600",lineHeight:17.55,textAlign:"right",textDecorationLine:"line-through"},coRadio:{alignItems:"center",borderRadius:11,height:22,inner:{width:2,color:"$n_BDB9B2"},justifyContent:"center",width:22},coRadioOn:{inner:{width:7,color:"$ink"}},coKicker:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},coWhen:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:12,paddingLeft:48,paddingRight:14,paddingTop:0},coItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coItem:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:12,grid:[44,"fr","auto"],lineHeight:22.5},coItemPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:15,height:44,justifyContent:"center",lineHeight:22.5,overflow:"hidden",width:44},coItemStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:19.38},coItemSmall:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},coItemValue:{color:"$ink",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:22.5},coRows:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:14,paddingRight:14,paddingTop:2},coRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,gap:10,grid:[20,73.6,"fr"],lineHeight:21.75,minHeight:40},coRowSvg:{color:"$ink2",height:20,width:20},coRowLabel:{color:"$ink3",fontFamily:"sans",fontSize:14.5,lineHeight:21.75},coRowValue:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75},coRowsShop:{backgroundColor:"$card",shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},coFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},coSummary:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:null,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:null},weightField:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,lineHeight:22.5,marginTop:14},weightInputWrap:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,position:"relative"},weightInput:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",height:58,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:36,paddingBottom:0,paddingLeft:18,paddingRight:56,paddingTop:0,width:"100%"},weightInputFocus:{inner:{width:2.5,color:"$ink"}},weightUnit:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,position:"absolute",right:18,top:"50%"},weightError:{color:"$riskInk",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,minHeight:20},weightActions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:10},subCard:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12},subCardImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},subCardStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20},subCardSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:2},subCardButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:40,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},carrier:{alignItems:"center",color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,"fr"],lineHeight:25.5,rowGap:4},carrierIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,width:40},carrierIconSvg:{height:21,width:21},carrierStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24},carrierSmall:{alignItems:"center",color:"$ink2",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"mono",fontSize:13,letterSpacing:.26,lineHeight:19.5,marginTop:1,rowGap:2},carrierButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,inner:{width:1.5,color:"$ink"},justifyContent:"center",lineHeight:22.5,marginTop:10,minHeight:40,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,textDecorationLine:"none"},carrierWait:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3},carrierTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},toast:{backgroundColor:"$ink",borderRadius:16,color:"$onInk",fontFamily:"sans",fontSize:14.5,left:16,lineHeight:20.3,opacity:1,paddingBottom:12,paddingLeft:15,paddingRight:15,paddingTop:12,position:"absolute",right:16,top:62,zIndex:50},scrim:{backgroundColor:"$scrim",bottom:0,left:0,opacity:1,position:"absolute",right:0,top:0,zIndex:40},sheet:{backgroundColor:"$card",borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:28,borderTopRightRadius:28,bottom:0,color:"$ink",fontFamily:"sans",fontSize:17,left:0,lineHeight:25.5,maxHeight:"80%",paddingBottom:40,paddingLeft:20,paddingRight:20,paddingTop:10,position:"absolute",right:0,zIndex:41},sheetGrab:{backgroundColor:"$n_DAD7D1",borderRadius:3,height:5,marginBottom:10,marginLeft:"auto",marginRight:"auto",marginTop:0,width:40},sheetTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},sheetKicker:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.88,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},sheetClose:{alignItems:"center",backgroundColor:"transparent",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,marginRight:-8,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:40},sheetCloseSvg:{height:22,width:22},sheetTitle:{color:"$ink",fontFamily:"serif",fontSize:24,fontWeight:"800",letterSpacing:-.24,lineHeight:27.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sheetBody:{color:"$black",fontFamily:"sans",fontSize:16,gap:10,lineHeight:24,marginTop:12},blanksWrap:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14},blanksCard:{backgroundColor:"$card",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:13,paddingLeft:12,paddingRight:12,paddingTop:12,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},blanksHead:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"sans",fontSize:12.5,fontWeight:"800",gap:10,justifyContent:"space-between",letterSpacing:.88,lineHeight:18.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:2,paddingRight:2,paddingTop:0,textTransform:"uppercase"},blanksPill:{backgroundColor:"$accent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13,fontStyle:"normal",fontWeight:"800",letterSpacing:.13,lineHeight:19.5,paddingBottom:2,paddingLeft:10,paddingRight:10,paddingTop:2,textTransform:"none"},blanksPillFilled:{backgroundColor:"$clearBg",color:"$clearInk"},blanksList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:7,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},blanksRow:{alignItems:"center",backgroundColor:"$paper",borderRadius:15,color:"$ink",columnGap:11,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[34,"fr"],lineHeight:25.5,paddingBottom:9,paddingLeft:9,paddingRight:12,paddingTop:9},blanksNum:{alignItems:"center",backgroundColor:"$accentChip",borderRadius:11,color:"$ink",fontFamily:"serif",fontSize:22,fontWeight:"800",height:40,justifyContent:"center",lineHeight:33,width:34},blanksText:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6},blanksSource:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},blank:{alignSelf:"flex-start",backgroundColor:"$accent4",borderRadius:6,color:"$ink",fontFamily:"sans",fontSize:16,fontStyle:"normal",fontWeight:"700",height:20,inner:{width:1.5,color:"$accent"},lineHeight:21.6,minWidth:36},blankS:{minWidth:24},blankL:{minWidth:64},blankFilled:{backgroundColor:"transparent",borderRadius:6,height:"auto",inner:null,marginBottom:0,marginLeft:-3,marginRight:-3,marginTop:0,minWidth:0,paddingBottom:0,paddingLeft:3,paddingRight:3,paddingTop:0,shadow:null},manageOrders:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"}}),DESIGN_RN_PLAN_ICONS=/* @__PURE__ */Object.freeze({shield:{strokes:[{width:1.8,cap:true,closed:true,points:[12,3,19,6,19,12,18.759,14.125,18.074,16,17,17.625,15.593,19,13.907,20.125,12,21,10.093,20.125,8.407,19,7,17.625,5.926,16,5.241,14.125,5,12,5,6]},{width:1.8,cap:true,closed:false,points:[9,12,11,14,15,10]}],boxes:[],triangles:[],seams:[]},arrow:{strokes:[{width:2,cap:true,closed:false,points:[4.5,12,19,12]},{width:2,cap:true,closed:false,points:[13.5,6.5,19,12,13.5,17.5]}],boxes:[],triangles:[],seams:[]},check:{strokes:[{width:2.4,cap:true,closed:false,points:[5,12.6,9.4,17,19,7.4]}],boxes:[],triangles:[],seams:[]},star:{strokes:[],boxes:[],triangles:[[12,16.9,6.8,19.6,7.8,13.8],[16.2,13.8,17.2,19.6,12,16.9],[7.8,13.8,3.5,9.7,9.4,8.8],[14.6,8.8,20.5,9.7,16.2,13.8],[9.4,8.8,12,3.5,14.6,8.8],[16.2,13.8,12,16.9,7.8,13.8],[14.6,8.8,16.2,13.8,7.8,13.8],[14.6,8.8,7.8,13.8,9.4,8.8]],seams:[[12,16.9,7.8,13.8,.245,.677],[12,16.9,16.2,13.8,.245,.677],[7.8,13.8,9.4,8.8,.69,.248],[14.6,8.8,16.2,13.8,.248,.243],[14.6,8.8,9.4,8.8,.68,.245],[16.2,13.8,7.8,13.8,.677,.68],[14.6,8.8,7.8,13.8,.68,.69]]},truck:{strokes:[{width:1.7,cap:false,closed:true,points:[2.8,6.5,14.2,6.5,14.2,16,2.8,16]},{width:1.7,cap:false,closed:false,points:[14.2,9.5,17.8,9.5,21.2,12.9,21.2,16,14.2,16]}],boxes:[{x:5,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7},{x:15.4,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7}],triangles:[],seams:[]},refresh:{strokes:[{width:1.7,cap:true,closed:false,points:[4,12,4.343,14.363,5.368,16.52,6.985,18.278,9.048,19.48,11.374,20.021,13.756,19.85,15.981,18.984,17.852,17.5,19.201,15.53,19.909,13.249,19.912,10.861,19.21,8.578,17.865,6.605,15.998,5.116,13.775,4.245,11.393,4.068,9.066,4.602,7,5.8]},{width:1.7,cap:true,closed:false,points:[4,4,4,8,8,8]}],boxes:[],triangles:[],seams:[]},card:{strokes:[{width:1.7,cap:true,closed:false,points:[3,9.5,21,9.5]},{width:1.7,cap:true,closed:false,points:[6.5,15,10.5,15]}],boxes:[{x:3,y:5.5,w:18,h:13,radius:2.2,width:1.7}],triangles:[],seams:[]},alert:{strokes:[{width:1.9,cap:true,closed:true,points:[12,3.5,21.5,20,2.5,20]},{width:1.9,cap:true,closed:false,points:[12,10,12,14.5]},{width:1.9,cap:true,closed:false,points:[12,17.2,12.01,17.2]}],boxes:[],triangles:[],seams:[]},x:{strokes:[{width:2,cap:true,closed:false,points:[6.5,6.5,17.5,17.5]},{width:2,cap:true,closed:false,points:[17.5,6.5,6.5,17.5]}],boxes:[],triangles:[],seams:[]},chat:{strokes:[{width:1.7,cap:false,closed:true,points:[5,5.2,19,5.2,19.8,5.414,20.386,6,20.6,6.8,20.6,15.4,20.386,16.2,19.8,16.786,19,17,10.3,17,5.5,20.6,5.5,17,5,17,4.2,16.786,3.614,16.2,3.4,15.4,3.4,6.8,3.614,6,4.2,5.414,5,5.2]}],boxes:[],triangles:[],seams:[]},repeat:{strokes:[{width:1.8,cap:true,closed:false,points:[4.5,11,4.824,8.824,5.766,6.837,7.244,5.208,9.131,4.077,11.264,3.543,13.461,3.65,15.533,4.391,17.3,5.7,19.5,8]},{width:1.8,cap:true,closed:false,points:[19.5,3.5,19.5,8,15,8]},{width:1.8,cap:true,closed:false,points:[19.5,13,19.176,15.176,18.234,17.163,16.756,18.792,14.869,19.923,12.736,20.457,10.539,20.35,8.467,19.609,6.7,18.3,4.5,16]},{width:1.8,cap:true,closed:false,points:[4.5,20.5,4.5,16,9,16]}],boxes:[],triangles:[],seams:[]},calendar:{strokes:[{width:1.8,cap:true,closed:false,points:[4,10,20,10]},{width:1.8,cap:true,closed:false,points:[8.5,3.5,8.5,7.5]},{width:1.8,cap:true,closed:false,points:[15.5,3.5,15.5,7.5]}],boxes:[{x:4,y:5.5,w:16,h:15,radius:2.5,width:1.8}],triangles:[],seams:[]},flame:{strokes:[],boxes:[],triangles:[[12.15,14.513,13.1,15.2,13.1,13.7],[11.5,13.3,12.15,14.513,13.1,13.7],[16.874,10.907,15.7,9.3,15.381,10.659],[14.7,16.7,16.838,18.516,17.693,16.84],[14.7,16.7,14.489,17.681,16.838,18.516],[18,14.9,14.507,15.633,17.693,16.84],[16.874,10.907,15.381,10.659,14.685,11.707],[17.693,12.759,16.874,10.907,14.685,11.707],[15.538,19.832,16.838,18.516,14.489,17.681],[14.685,11.707,13.959,14.633,17.693,12.759],[17.693,12.759,13.959,14.633,18,14.9],[13.891,20.692,13.055,19.006,12,21],[12,21,12,19.2,10.109,20.692],[8.462,19.832,10.109,20.692,10.659,18.863],[10.659,18.863,9.741,17.97,8.462,19.832],[6.307,16.84,9.602,15.677,6,14.9],[6.273,13.033,6,14.9,9.602,15.677],[9.602,15.677,10.113,14.812,6.273,13.033],[6.988,11.438,6.273,13.033,10.113,14.812],[13.525,7.088,12.856,5.017,12,3.5],[13.856,9.589,13.525,7.088,12,3.5],[13.7,12.4,13.856,9.589,12,3.5],[10.113,14.812,10.792,14.042,6.988,11.438],[14.7,16.7,17.693,16.84,14.507,15.633],[13.7,12.4,13.959,14.633,14.685,11.707],[14.507,15.633,18,14.9,13.959,14.633],[13.1,13.7,13.959,14.633,13.7,12.4],[11.5,13.3,13.1,13.7,13.7,12.4],[7.983,10.048,6.988,11.438,10.792,14.042],[10.792,14.042,11.5,13.3,7.983,10.048],[14.489,17.681,13.913,18.475,15.538,19.832],[13.891,20.692,15.538,19.832,13.913,18.475],[13.891,20.692,13.913,18.475,13.055,19.006],[12,19.2,12,21,13.055,19.006],[10.659,18.863,10.109,20.692,12,19.2],[7.162,18.516,8.462,19.832,9.741,17.97],[9.741,17.97,9.4,16.7,7.162,18.516],[6.307,16.84,7.162,18.516,9.4,16.7],[6.307,16.84,9.4,16.7,9.602,15.677],[9.1,8.8,7.983,10.048,11.5,13.3],[11.5,13.3,13.7,12.4,9.1,8.8],[10.054,7.77,9.1,8.8,13.7,12.4],[10.927,6.683,10.054,7.77,13.7,12.4],[11.613,5.481,10.927,6.683,13.7,12.4],[12.006,4.106,11.613,5.481,13.7,12.4],[12,2.5,12.006,4.106,13.7,12.4],[12,2.5,13.7,12.4,12,3.5]],seams:[[12.15,14.513,13.1,13.7,.121,.428],[11.5,13.3,13.1,13.7,.681,.356],[15.381,10.659,16.874,10.907,.033,.883],[14.7,16.7,16.838,18.516,.648,1.318],[14.7,16.7,17.693,16.84,.648,1.533],[14.489,17.681,16.838,18.516,.51,1.318],[14.507,15.633,18,14.9,.782,1.787],[14.507,15.633,17.693,16.84,.782,1.533],[14.685,11.707,16.874,10.907,.68,.883],[14.685,11.707,17.693,12.759,.61,.484],[14.489,17.681,15.538,19.832,.51,1.115],[13.959,14.633,14.685,11.707,1.333,.576],[13.959,14.633,17.693,12.759,.851,.484],[13.959,14.633,18,14.9,.851,1.787],[13.055,19.006,13.891,20.692,.36,.984],[12,21,13.055,19.006,.945,.395],[12,19.2,12,21,.394,.945],[10.109,20.692,12,19.2,.715,.394],[10.109,20.692,10.659,18.863,.715,.428],[10.659,18.863,8.462,19.832,.428,.809],[8.462,19.832,9.741,17.97,.809,.525],[6.307,16.84,9.602,15.677,1.65,.812],[6,14.9,9.602,15.677,.194,1.012],[6.273,13.033,9.602,15.677,2.068,1.012],[10.113,14.812,6.273,13.033,1.217,2.068],[10.113,14.812,6.988,11.438,1.217,2.2],[12,3.5,13.525,7.088,4.697,5.571],[12,3.5,13.856,9.589,4.697,3.017],[12,3.5,13.7,12.4,4.648,26.765],[10.792,14.042,6.988,11.438,1.339,2.2],[13.7,12.4,13.959,14.633,.819,1.333],[13.1,13.7,13.7,12.4,0,.819],[11.5,13.3,13.7,12.4,.681,.537],[10.792,14.042,7.983,10.048,1.339,2.328],[11.5,13.3,7.983,10.048,1.438,2.328],[13.913,18.475,15.538,19.832,.409,1.115],[13.891,20.692,13.913,18.475,.984,.409],[7.162,18.516,9.741,17.97,.977,.525],[7.162,18.516,9.4,16.7,.977,.677],[6.307,16.84,9.4,16.7,1.65,.677],[11.5,13.3,9.1,8.8,1.438,1.129],[13.7,12.4,9.1,8.8,2.046,1.129],[10.054,7.77,13.7,12.4,.079,2.285],[10.927,6.683,13.7,12.4,.237,3.126],[11.613,5.481,13.7,12.4,.475,5.451],[12.006,4.106,13.7,12.4,.961,15.892],[12,2.5,13.7,12.4,2.974,26.765]]},box:{strokes:[{width:1.7,cap:false,closed:true,points:[3.8,7.8,12,4,20.2,7.8,20.2,16.4,12,20,3.8,16.4]},{width:1.7,cap:false,closed:false,points:[3.8,7.8,12,11.6,20.2,7.8]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20]}],boxes:[],triangles:[],seams:[]},cart:{strokes:[{width:1.8,cap:true,closed:false,points:[2.8,4,5.4,4,7.7,14.6,8.203,15.401,9.1,15.7,17.3,15.7,18.197,15.401,18.7,14.6,20.4,7.6,6.3,7.6]}],boxes:[{x:8.3,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8},{x:15.8,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8}],triangles:[],seams:[]},minus:{strokes:[{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},plus:{strokes:[{width:2.2,cap:true,closed:false,points:[12,6,12,18]},{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},chev:{strokes:[{width:2,cap:true,closed:false,points:[9,5.5,15.5,12,9,18.5]}],boxes:[],triangles:[],seams:[]},pulse:{strokes:[{width:1.8,cap:true,closed:false,points:[3,12.5,6.8,12.5,9.2,6.9,13.4,17.5,15.8,12.5,21,12.5]}],boxes:[],triangles:[],seams:[]},file:{strokes:[{width:1.7,cap:true,closed:true,points:[7,3.5,14.2,3.5,18.5,7.8,18.5,20,18.324,20.424,17.9,20.6,7,20.6,6.576,20.424,6.4,20,6.4,4.1,6.576,3.676,7,3.5]},{width:1.7,cap:true,closed:false,points:[14,3.6,14,8,18.4,8]},{width:1.7,cap:true,closed:false,points:[9.4,12.4,14.6,12.4]},{width:1.7,cap:true,closed:false,points:[9.4,15.8,14.6,15.8]}],boxes:[],triangles:[],seams:[]},kit:{strokes:[{width:1.7,cap:false,closed:true,points:[4,7.6,12,3.6,20,7.6,20,16.4,12,20.4,4,16.4]},{width:1.7,cap:false,closed:false,points:[4,7.6,12,11.6,20,7.6]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20.4]}],boxes:[],triangles:[],seams:[]},dna:{strokes:[{width:1.7,cap:true,closed:false,points:[7,3.5,7.28,4.645,8.04,5.594,9.16,6.394,10.52,7.097,12,7.75,13.48,8.403,14.84,9.106,15.96,9.906,16.72,10.855,17,12,16.72,13.145,15.96,14.094,14.84,14.894,13.48,15.597,12,16.25,10.52,16.903,9.16,17.606,8.04,18.406,7.28,19.355,7,20.5]},{width:1.7,cap:true,closed:false,points:[17,3.5,16.72,4.645,15.96,5.594,14.84,6.394,13.48,7.097,12,7.75,10.52,8.403,9.16,9.106,8.04,9.906,7.28,10.855,7,12,7.28,13.145,8.04,14.094,9.16,14.894,10.52,15.597,12,16.25,13.48,16.903,14.84,17.606,15.96,18.406,16.72,19.355,17,20.5]},{width:1.7,cap:true,closed:false,points:[8.6,6.3,15.4,6.3]},{width:1.7,cap:true,closed:false,points:[8.6,17.7,15.4,17.7]},{width:1.7,cap:true,closed:false,points:[10.4,9.6,13.6,9.6]},{width:1.7,cap:true,closed:false,points:[10.4,14.4,13.6,14.4]}],boxes:[],triangles:[],seams:[]},heart:{strokes:[{width:1.8,cap:false,closed:true,points:[12,20.2,11.739,20.035,11.041,19.559,10.03,18.804,8.831,17.799,7.569,16.575,6.37,15.163,5.359,13.593,4.661,11.895,4.4,10.1,4.833,8.454,5.87,7.105,7.349,6.264,9.039,6.062,10.675,6.532,12,7.6,13.325,6.532,14.961,6.062,16.651,6.264,18.13,7.105,19.167,8.454,19.6,10.1,19.339,11.895,18.641,13.593,17.63,15.163,16.431,16.575,15.169,17.799,13.97,18.804,12.959,19.559,12.261,20.035,12,20.2]}],boxes:[],triangles:[],seams:[]},bottle:{strokes:[{width:1.7,cap:false,closed:true,points:[7.2,6.2,16.8,6.2,17.507,6.493,17.8,7.2,17.8,19.5,17.572,20.35,16.95,20.972,16.1,21.2,7.9,21.2,7.05,20.972,6.428,20.35,6.2,19.5,6.2,7.2,6.493,6.493,7.2,6.2]},{width:1.7,cap:false,closed:true,points:[9,11,15,11,15,16,9,16]}],boxes:[{x:8,y:2.8,w:8,h:3.4,radius:1,width:1.7}],triangles:[],seams:[]},harness:{strokes:[{width:1.5,cap:true,closed:false,points:[7.5,4.5,7.728,6.82,8.364,8.708,9.336,10.116,10.572,10.996,12,11.3,13.428,10.996,14.664,10.116,15.636,8.708,16.272,6.82,16.5,4.5]},{width:1.5,cap:true,closed:true,points:[5,12.6,19,12.6,19,17.2,18.692,18.35,17.85,19.192,16.7,19.5,7.3,19.5,6.15,19.192,5.308,18.35,5,17.2]},{width:1.5,cap:true,closed:false,points:[8.2,15.3,15.8,15.3]}],boxes:[{x:10.7,y:8.9,w:2.6,h:2.6,radius:1.3,width:1.5}],triangles:[],seams:[]},ramp:{strokes:[{width:1.5,cap:true,closed:false,points:[2.5,19.5,21.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,19.5,3.5,16.5,8,16.5,8,13.5,12.5,13.5,12.5,10.5,17,10.5,17,7.5,20.5,7.5,20.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,16.5,20.5,7.5],opacity:.35}],boxes:[],triangles:[],seams:[]}});var PLAN_LIGHT=/* @__PURE__ */Object.freeze({black:"#000000",onInk:"#FFFFFF",wash:"rgba(38, 37, 35, 0.06)",scrim:"rgba(38, 37, 35, 0.38)",riskChip:"#FFD8D6",clearChip:"#DDEFC4"});function rgb(color){let c=color.trim(),h=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(c);if(h!==null){let x=h[1].length===3?h[1].split("").map(d=>d+d).join(""):h[1];return[0,2,4].map(k2=>parseInt(x.slice(k2,k2+2),16))}let r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(c);return r===null?null:[Number(r[1]),Number(r[2]),Number(r[3])]}function mixPlanColor(color,share,ground){let a=rgb(color),b=rgb(ground);if(a===null||b===null)return ground;let to=k2=>Math.round(a[k2]*share+b[k2]*(1-share)).toString(16).padStart(2,"0");return`#${to(0)}${to(1)}${to(2)}`.toUpperCase()}function clearOf(color){let c=rgb(color);return c===null?"transparent":`rgba(${c[0]}, ${c[1]}, ${c[2]}, 0)`}function planRoles(theme){let c=theme.color,v=v3Palette(theme),card=v.card,link=v.link;return{ink:v.ink,ink2:v.ink2,ink3:v.ink3,paper:v.paper,tile:v.tile,line:v.line,card:card,riskBg:v.riskBg,riskInk:v.riskInk,riskDot:v.riskDot,clearBg:v.clearBg,clearInk:v.clearInk,clearDot:v.clearDot,watchDot:v.watchDot,...v.dark?{black:c.text.primary,onInk:c.background,wash:mixPlanColor(c.text.primary,.08,c.surface),scrim:"rgba(0, 0, 0, 0.6)",riskChip:c.badgeBgCritical,clearChip:c.badgeBgPositive}:PLAN_LIGHT,primary:v.primary,onPrimary:v.onPrimary,accent:v.accent,accent4:mixPlanColor(c.accent,.17,card),accent3:mixPlanColor(c.accent,.25,card),accentChip:mixPlanColor(c.accent,.47,card),link:link,linkWash:(v.dark?void 0:theme.slots.planWash?.backgroundColor)??mixPlanColor(link,.12,card),linkChip:(v.dark?void 0:theme.slots.planChip?.backgroundColor)??mixPlanColor(link,.2,card)}}var TEXT_KEYS=/* @__PURE__ */new Set(["fontSize","fontWeight","fontFamily","fontStyle","letterSpacing","lineHeight","textTransform","color","textAlign","textDecorationLine","fontVariant"]),DROP=/* @__PURE__ */new Set(["justifyItems"]);function font(theme,family,weight){let w=Number(weight??400);if(family==="serif"){let h=headingFace(theme,"bold");return h.fontWeight===void 0?{fontFamily:h.fontFamily}:{fontFamily:h.fontFamily,fontWeight:String(w)}}let mono=family==="mono",key=w>=650?mono?"monoBold":"bold":w>=450?mono?"monoMedium":"medium":mono?"mono":"regular",f=face(theme,key);return theme.type.namedFaces[key]?{fontFamily:f.fontFamily}:{fontFamily:f.fontFamily,fontWeight:String(w)}}function paintPart(theme,roles,part,dark,line){let box={},text2={},colour=v=>{if(!v.startsWith("$"))return v;let name=v.slice(1);return name.startsWith("n_")?dark?line:`#${name.slice(2)}`:roles[name]??v},rings=[],inner;for(let[key,value]of Object.entries(part))if(!(value===void 0||DROP.has(key)||key==="grid"||key==="fontWeight"))if(key==="fontFamily")Object.assign(text2,font(theme,String(value),part.fontWeight));else if(key==="shadow"){if(value===null)Object.assign(box,{shadowOpacity:0,elevation:0});else if(!dark){let s=value;Object.assign(box,{shadowColor:colour(s.color),shadowOpacity:s.opacity,shadowRadius:s.blur,shadowOffset:{width:s.x,height:s.y},elevation:Math.max(1,Math.round(s.blur/2))})}}else if(key==="inner"){let r=value;inner=r===null?null:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:r.width,borderColor:colour(r.color),pointerEvents:"none"}}else if(key==="ring"){let list=value,radius=typeof part.borderRadius=="number"?part.borderRadius:0;rings=list.map((r,i)=>({borderWidth:r.width-(list[i-1]?.width??0),borderColor:colour(r.color),borderRadius:radius+r.width})).reverse()}else key==="color"||key.endsWith("Color")?(key==="color"?text2:box)[key]=colour(String(value)):(TEXT_KEYS.has(key)?text2:box)[key]=value;part.fontWeight!==void 0&&part.fontFamily===void 0&&Object.assign(text2,font(theme,"sans",part.fontWeight));let outer=rings[0];if(outer!==void 0){let w=part.ring.reduce((m,r)=>Math.max(m,r.width),0),place2={...outer};if(box.position==="absolute"){for(let k2 of["position","zIndex"])box[k2]!==void 0&&(place2[k2]=box[k2]);for(let k2 of["top","right","bottom","left"])typeof box[k2]=="number"&&(place2[k2]=box[k2]-w);for(let k2 of["position","zIndex","top","right","bottom","left"])delete box[k2]}else{for(let k2 of["marginTop","marginRight","marginBottom","marginLeft"])place2[k2]=(typeof box[k2]=="number"?box[k2]:0)-w,delete box[k2];box.alignSelf!==void 0&&(place2.alignSelf=box.alignSelf,delete box.alignSelf)}rings[0]=place2}return{box:box,text:text2,rings:rings,...inner===void 0?{}:{inner:inner},grid:part.grid??[]}}var cache3=/* @__PURE__ */new WeakMap;function planPaint(theme){let hit=cache3.get(theme);if(hit!==void 0)return hit;let roles=planRoles(theme),dark=theme.brightness==="dark",out={roles:roles};for(let[name,part]of Object.entries(DESIGN_RN_PLAN))out[name]=paintPart(theme,roles,part,dark,roles.line);let painted=out;return cache3.set(theme,painted),painted}function gridCell(p,i){let t=p.grid[i];return t===void 0?{}:t==="fr"?{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0}:t==="auto"?{flexShrink:0}:typeof t=="number"?{width:t,flexShrink:0}:{}}var RADII=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],MARGINS=["margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical"],draws=/* @__PURE__ */new WeakMap;function planDraw(X){let hit=draws.get(X);if(hit!==void 0)return hit;let list=names=>names.filter(n=>typeof n=="string"),draw={bx:(...names)=>list(names).map(n=>X[n].box),im:(...names)=>list(names).map(n=>X[n].box),tx:(...names)=>list(names).map(n=>X[n].text),tb:(...names)=>list(names).flatMap(n=>[X[n].box,X[n].text]),ring:(name,node,place2)=>{let rings=X[name].rings;return rings.length===0?node:rings.reduceRight((child,style,i)=>react.createElement(reactNative.View,{key:i,style:i===0&&place2!==void 0?[style,place2]:style},child),node)},inner:(...names)=>{let ring=null,radius={};for(let n of list(names)){let p=X[n];p.inner!==void 0&&(ring=p.inner);for(let k2 of RADII)p.box[k2]!==void 0&&(radius={...radius,[k2]:p.box[k2]})}return ring===null?null:react.createElement(reactNative.View,{style:[ring,radius]})},ink:(name,fallback)=>typeof X[name].text.color=="string"?X[name].text.color:fallback,side:(name,fallback)=>typeof X[name].box.width=="number"?X[name].box.width:fallback,mod:(base3,kind)=>{if(kind===void 0||kind==="")return null;let name=`${base3}${kind.charAt(0).toUpperCase()}${kind.slice(1)}`;return name!=="roles"&&name in X?name:null},scroll:name=>{let place2={},content={};for(let[k2,v]of Object.entries(X[name].box))(MARGINS.includes(k2)?place2:content)[k2]=v;return{place:place2,content:content}},swipe:(name,inner)=>{let b=X[name].box,share=typeof b.flexBasis=="string"&&b.flexBasis.endsWith("%")?Number(b.flexBasis.slice(0,-1))/100:1,max=typeof b.maxWidth=="number"?b.maxWidth:1/0;return Math.round(Math.min(max,inner*share)*100)/100}};return draws.set(X,draw),draw}var PLAN_PRESS_SCALE=/* @__PURE__ */Object.freeze({button:.97,onButton:.96,jump:.98,opt:.98,add:.98,extraGo:.96,every:.96,askRow:.98,stepper:.9,mode:.98,order:.98,subCard:.96});function pressScale(style,scale,off){return off?style:({pressed:pressed})=>pressed?[style,{transform:[{scale:scale}]}]:style}var ORDER_STEPS=["ordered","shipped","out_for_delivery","delivered"],TRACK_STEP={ordered:0,shipped:1,delivered:3};function hostOrderView(o){let step=Math.max(0,ORDER_STEPS.indexOf(o.status));return{key:o.key,number:o.number??null,step:step,dates:o.dates??[],everfur:false,steps:[0,1,2,3],productId:null,items:o.items.map(x=>({title:x.title,quantity:x.quantity,price:x.price,imageUrl:x.imageUrl??null,icon:x.icon??null})),total:Math.round(o.items.reduce((n,x)=>n+x.price,0)*100)/100,currency:o.currency,subscriptionBox:o.subscriptionBox===true,carrier:o.carrier??null,trackingNumber:o.trackingNumber??null,trackingTag:o.trackingTag??null,trackingUrl:o.trackingUrl??null}}function everfurOrderView(o,items){let it=items.find(x=>x.productId===o.productId),t=o.tracking,quantity=o.quantity??1,total=o.total??Math.round(o.price*quantity*100)/100,step=t===void 0?0:TRACK_STEP[t.status];return{key:o.orderId,number:t?.orderNumber??null,step:step,dates:t===void 0?[o.createdAt??null]:[o.createdAt??null,t.shippedAt,null,step===3?null:t.estimatedDelivery],steps:t===void 0?[0]:[0,1,3],everfur:true,productId:o.productId,items:[{title:o.title??it?.title??"",quantity:quantity,price:total,imageUrl:it?.imageUrl??null,icon:null}],total:total,currency:o.currency,subscriptionBox:false,carrier:t?.carrier??null,trackingNumber:t?.trackingNumber??null,trackingTag:null,trackingUrl:t?.trackingUrl??null}}function formatShopDay(iso,locale,now=/* @__PURE__ */new Date){if(iso==null)return null;let dateOnly=/^\d{4}-\d{2}-\d{2}$/.test(iso),d=new Date(dateOnly?`${iso}T00:00:00Z`:iso);if(Number.isNaN(d.getTime()))return null;let tz=dateOnly?"UTC":void 0,year=Number(new Intl.DateTimeFormat("en-US",{year:"numeric",...tz?{timeZone:tz}:{}}).format(d));try{return new Intl.DateTimeFormat(locale??"en-US",year!==now.getFullYear()?{month:"short",day:"numeric",year:"numeric",...tz?{timeZone:tz}:{}}:{weekday:"short",month:"short",day:"numeric",...tz?{timeZone:tz}:{}}).format(d)}catch{return iso}}function andList(names){return names.length<=1?names[0]??"":`${names.slice(0,-1).join(", ")} and ${names[names.length-1]??""}`}var CENTER={justifyContent:"center"},SHRINK={flexShrink:1},FILL={width:"100%",height:"100%"},WRAP={flexWrap:"wrap"},FULL_ROW={width:"100%",alignSelf:"stretch"},HIT_44={top:2,bottom:2,left:2,right:2},IN_ROW={alignSelf:"auto"},SR_ONLY={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",borderWidth:0},inlineTag=(k2,label,part)=>/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",
|
|
49
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[words2,card?styles22.start:styles22.center,styles22.shrink],children:message}),action?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:action.onPress,accessibilityRole:"button",accessibilityLabel:action.label,testID:testID?`${testID}-action`:void 0,style:({pressed:pressed})=>[{marginLeft:t.metrics.lists.banner.acts.gap[0]??0},pressed?{opacity:t.metrics.lists.linkPressedOpacity}:null],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{tier:"control",style:rnTextPart(t,{...card?v.text:m.text,weight:t.metrics.lists.banner.link.weight}),children:action.label})}):null]})}var styles22=reactNative.StyleSheet.create({fill:{flex:1},host:{position:"absolute",left:0,right:0,alignItems:"center"},cardHost:{position:"absolute"},card:{alignSelf:"stretch"},start:{textAlign:"left"},pill:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",alignSelf:"center",maxWidth:"100%"},center:{textAlign:"center"},shrink:{flexShrink:1}});reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center"}});function rnSource(image){return typeof image=="number"?image:typeof image=="string"?image?{uri:image}:null:image&&typeof image=="object"&&image.uri?image:null}function Photo({image:image,onImageError:onImageError,box:box,testID:testID}){let t=useTheme(),[failed,setFailed]=react.useState(null),source=rnSource(image),style=[rnBox(t,box),{width:box.w,height:box.h,overflow:"hidden"}];return!source||failed===image?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:style}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:style,children:/* @__PURE__ */jsxRuntime.jsx(FadeImage,{testID:testID,source:source,resizeMode:"cover",onError:()=>{image!=null&&(setFailed(image),onImageError?.(image))},style:{position:"absolute",top:0,right:0,bottom:0,left:0}},JSON.stringify(source))})}function Quote({quote:quote,m:m,testID:testID}){let t=useTheme(),text2=p=>rnText(t,textPartSpec(t,p)),tag=quote.tag?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID===void 0?void 0:`${testID}-tag`,style:rnBox(t,m.saysTag),children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[text2(m.saysTagText),{paddingTop:0,lineHeight:m.saysTag.h-(m.saysTag.padding?.[0]??0)-(m.saysTag.padding?.[2]??0)}],children:quote.tag})}):null;return rnSource(quote.image)===null?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:testID,style:[rnBox(t,m.says),{flexDirection:"column",rowGap:m.saysBare.gap[1],marginTop:m.says.marginTop}],children:[quote.by||tag?/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.saysKicker),children:[quote.by,quote.by&&tag?" ":null,tag]}):null,
|
|
50
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.saysSerif),children:quote.text})]}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:testID,style:[rnBox(t,m.says),{flexDirection:"row",alignItems:"flex-start",columnGap:m.says.gap[0],marginTop:m.says.marginTop}],children:[
|
|
51
|
+
/* @__PURE__ */jsxRuntime.jsx(Photo,{image:quote.image,onImageError:quote.onImageError,box:m.saysImg}),
|
|
52
|
+
/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:[text2(m.saysText),{flex:1}],children:[quote.by?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.saysBy),children:quote.by}):null,quote.by?" ":null,quote.text,tag?" ":null,tag]})]})}function Jump({jump:jump,m:m,testID:testID}){let t=useTheme(),reduced=useRnReduced(t),text2=p=>rnText(t,textPartSpec(t,p)),photo=rnSource(jump.image)!==null,strip=[rnBox(t,m.jump),{flexDirection:"row",alignItems:"center",columnGap:m.jump.gap[0],marginTop:m.jump.marginTop}],inner=/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[photo?/* @__PURE__ */jsxRuntime.jsx(Photo,{image:jump.image,onImageError:jump.onImageError,box:m.jumpImg}):null,
|
|
53
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flex:1,minWidth:0},children:[
|
|
54
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpKicker),children:jump.kicker}),
|
|
55
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpTitle),children:jump.title})]}),
|
|
56
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.jumpGo),children:jump.go})]});return jump.onPress?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{testID:testID,onPress:jump.onPress,accessibilityRole:"button",accessibilityLabel:jump.accessibilityLabel??`${jump.kicker}, ${jump.title}`,style:({pressed:pressed})=>[...strip,pressed&&!reduced?{transform:[{scale:m.jumpPressScale}]}:null],children:inner}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:strip,children:inner})}function PlanNeedCard({kicker:kicker,source:source,sources:givenSources,title:title,signals:signals,score:score,more:more,quote:quote,jump:jump,variant:variant="standard",children:children,beforeJump:beforeJump,loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}){let t=useTheme(),plan=variant==="plan",mp=blocksMetrics(t).needPlan,m=plan?mp:blocksMetrics(t).need,part=n=>testID===void 0?void 0:`${testID}-${n}`,sources=givenSources??(source?[{label:source}]:[]),text2=p=>rnText(t,textPartSpec(t,p)),card=[rnBox(t,m.card),{marginTop:0},style];if(loading)/* @__PURE__ */
|
|
57
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:card,children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:3,label:loadingLabel})});let signalText=text2(m.signalText);/* @__PURE__ */
|
|
58
|
+
return jsxRuntime.jsxs(reactNative.View,{testID:testID,style:card,children:[
|
|
59
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexDirection:"row",alignItems:"center",columnGap:m.kicker.gap[0],minHeight:sources.length>0?m.kicker.h:void 0},children:[
|
|
60
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.kickerText),children:kicker}),sources.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{marginLeft:"auto",flexDirection:"row",columnGap:mp.sources.gap[0],flexShrink:1},children:sources.map((s,i)=>{let dna=s.kind==="dna";/* @__PURE__ */
|
|
61
|
+
return jsxRuntime.jsx(reactNative.View,{testID:part(givenSources?`source-${i}`:"source"),style:[rnBox(t,m.source),dna?{backgroundColor:colorOf(t,mp.sourceDna.bg)}:null,{height:m.source.h,justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{numberOfLines:1,style:text2(dna?mp.sourceDnaText:m.sourceText),children:s.label})},`${i}-${s.label}`)})}):null]}),title?/* @__PURE__ */jsxRuntime.jsx(Text2,{accessibilityRole:"header",style:[text2(m.title),{marginTop:m.title.marginTop}],children:title}):null,signals.map(s=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexDirection:"row",columnGap:m.signal.gap[0],marginTop:m.signal.marginTop},children:[s.dot===false?null:s.dot==="space"?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:m.dot.w}}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{height:signalText.lineHeight,justifyContent:"center",paddingTop:(signalText.fontSize??0)*.4-m.dot.h/2},children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:m.dot.w,height:m.dot.h,borderRadius:m.dot.w/2,backgroundColor:colorOf(t,plan&&s.tone==="watch"?mp.dotWatch.bg:plan&&s.tone==="clear"?mp.dotClear.bg:m.dot.bg),transform:[{translateY:m.dot.dy}]}})}),
|
|
62
|
+
/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:[signalText,{flex:1}],children:[s.lead?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.signalLead),children:s.lead}):null,s.lead?" ":null,s.text]})]},s.key)),plan&&more?/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
|
|
63
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{testID:part("more"),onPress:more.onPress,accessibilityRole:"button",accessibilityState:{expanded:more.expanded},"aria-expanded":more.expanded,style:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",columnGap:mp.more.gap[0],minHeight:mp.more.minHeight,marginTop:mp.more.marginTop,marginBottom:mp.more.marginBottom,marginLeft:mp.moreInset},children:[
|
|
64
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(mp.moreText),children:more.label}),
|
|
65
|
+
/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:UI_RN_ICON_CHEVRON,size:mp.moreIcon.w,color:colorOf(t,mp.moreText.color),style:{transform:[{rotate:`${more.expanded?mp.moreTurn.open:mp.moreTurn.closed}deg`}]}})]}),more.expanded?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:part("more-panel"),nativeID:more.panelId,style:[rnBox(t,mp.rep),{marginTop:mp.rep.marginTop}],children:more.content}):null]}):null,score?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:testID===void 0?void 0:`${testID}-score`,style:[rnBox(t,m.score),{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}],children:[
|
|
66
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{flexShrink:1,minWidth:0,maxWidth:plan&&mp.scoreLabelMax?mp.scoreLabelMax:void 0},children:/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.scoreLabel),children:[score.label,score.tag?" ":null,score.tag?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:part("tag"),style:rnBox(t,m.scoreTag),children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreTagText),children:score.tag})}):null]})}),
|
|
67
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessible:score.accessibilityLabel!==void 0,accessibilityLabel:score.accessibilityLabel,style:{flexShrink:0,alignItems:"flex-end"},children:[
|
|
68
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:{flexDirection:"row",alignItems:"center",columnGap:m.scoreNums.gap[0]},children:[score.was?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreWas),children:score.was}):null,score.was?score.icon!==void 0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:part("arrow"),children:/* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:score.icon,size:m.scoreArrow.w,color:colorOf(t,m.scoreArrow.color)})}):/* @__PURE__ */jsxRuntime.jsx(Glyph,{testID:part("arrow"),icon:UI_RN_ICON_ARROW_LEFT,size:m.scoreArrow.w,color:colorOf(t,m.scoreArrow.color),style:m.scoreArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,
|
|
69
|
+
/* @__PURE__ */jsxRuntime.jsxs(Text2,{style:text2(m.scoreNow),children:[score.now,score.of?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(m.scoreOf),children:score.of}):null]})]}),score.since?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[text2(m.scoreSince),{marginTop:m.scoreSince.marginTop}],children:score.since}):null]})]}):null,plan&"e?/* @__PURE__ */jsxRuntime.jsx(Quote,{quote:quote,m:mp,testID:part("quote")}):null,plan?beforeJump:null,plan&&jump?/* @__PURE__ */jsxRuntime.jsx(Jump,{jump:jump,m:mp,testID:part("jump")}):null,children]})}function rnSource2(image){return typeof image=="number"?image:typeof image=="string"?image?{uri:image}:null:image&&typeof image=="object"&&image.uri?image:null}function TipCard(props){let{number:number,title:title,text:line,foot:foot,footArrow:footArrow=false,footPress:footPress,tone:tone="y",image:image,onImageError:onImageError,icon:icon=UI_RN_ICON_LEAF,onPress:onPress,pressTarget:pressTarget="title",accessibilityLabel:accessibilityLabel,variant:variant="standard",loading:loading=false,loadingLabel:loadingLabel,testID:testID,style:style}=props,t=useTheme(),reduced=useRnReduced(t),m=blocksMetrics(t).tip,ph=blocksMetrics(t).tipPhoto,w=blocksMetrics(t).tipWeb,pl=blocksMetrics(t).tipPlan,web=variant==="web",photo=variant==="photo",plan=variant==="plan",[down,setDown]=react.useState(false),[failed,setFailed]=react.useState(null),text2=p=>rnText(t,textPartSpec(t,p)),kit=photo?{...m,card:ph.card,tones:ph.tones,img:ph.img,n:ph.n,nText:ph.nText,title:ph.title,pressScale:ph.pressScale,bare:ph.bare,thumb:ph.thumb,thumbIcon:ph.thumbIcon}:plan?{...m,card:pl.card,tones:pl.tones,title:pl.title,text:pl.text,footText:pl.footText,foot:pl.foot,pressScale:1}:m,card=web?[rnBox(t,w.card),style]:[rnBox(t,kit.card),{backgroundColor:colorOf(t,kit.tones[tone])},style],aspect=web?w.imgAspect:photo?ph.imgAspect:m.img.w/m.img.h,press=web?1:kit.pressScale;if(loading)/* @__PURE__ */
|
|
70
|
+
return jsxRuntime.jsx(reactNative.View,{testID:testID,style:card,children:/* @__PURE__ */jsxRuntime.jsx(Skeleton,{lines:3,label:loadingLabel})});let kn=kit.n,n=web?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[rnBox(t,kn),{position:"absolute",left:kn.x,top:kn.y,width:kn.w,height:kn.h,alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(kit.nText),children:number})}),titleText=/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(web?w.title:kit.title),children:title}),cover=onPress!==void 0&&(web||pressTarget==="card"),part=n2=>testID===void 0?void 0:`${testID}-${n2}`,given=plan?null:rnSource2(image),source=given&&failed!==image?given:null,footStyle=text2(kit.footText),arrow=footArrow||footPress?/* @__PURE__ */jsxRuntime.jsx(Glyph,{icon:UI_RN_ICON_ARROW_LEFT,size:m.footArrow.w,color:typeof footStyle.color=="string"?footStyle.color:void 0,style:m.footArrowFlip?{transform:[{rotate:"180deg"}]}:void 0}):null,footText=/* @__PURE__ */jsxRuntime.jsx(Text2,{style:footStyle,children:foot}),footRow={flexDirection:"row",alignItems:"center",columnGap:m.foot.gap[0]},footEl=foot&&!web&&!photo?footPress?/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{testID:footPress.testID??part("foot"),onPress:footPress.onPress,accessibilityRole:"link",accessibilityLabel:footPress.accessibilityLabel??foot,hitSlop:slopFor(footStyle.lineHeight??m.footArrow.w),style:[footRow,{marginTop:"auto",paddingTop:kit.foot.padding[0],alignSelf:"flex-start",zIndex:1}],children:[footText,arrow]}):arrow?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[footRow,{marginTop:"auto",paddingTop:kit.foot.padding[0]}],children:[footText,arrow]}):/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[footStyle,{marginTop:"auto",paddingTop:kit.foot.padding[0]}],children:foot}):null,failOn=()=>{image!=null&&(setFailed(image),onImageError?.(image))},thumbIcon=spec=>/* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:icon,size:spec.w,color:colorOf(t,spec.color)}),top=plan?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",minHeight:pl.top.h},children:[
|
|
71
|
+
/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(pl.nText),children:number}),
|
|
72
|
+
/* @__PURE__ */jsxRuntime.jsx(BlockIcon,{icon:icon,size:pl.icon.w,color:colorOf(t,pl.icon.color)})]}):!web&&!source?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:part("thumb"),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[rnBox(t,kit.bare),{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}],children:[
|
|
73
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[rnBox(t,kn),{width:kn.w,height:kn.h,alignItems:"center",justifyContent:"center"}],children:/* @__PURE__ */jsxRuntime.jsx(Text2,{style:text2(kit.nText),children:number})}),
|
|
74
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[rnBox(t,kit.thumb),{width:kit.thumb.w,height:kit.thumb.h,alignItems:"center",justifyContent:"center"}],children:thumbIcon(kit.thumbIcon)})]}):/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",style:[rnBox(t,web?w.img:kit.img),{width:"100%",aspectRatio:aspect,overflow:"hidden"}],children:[source?/* @__PURE__ */jsxRuntime.jsx(FadeImage,{testID:part("image"),source:source,resizeMode:"cover",onError:failOn,style:{position:"absolute",top:0,right:0,bottom:0,left:0}},typeof image=="string"?image:JSON.stringify(image)):null,n]}),body=/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[top,
|
|
75
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:web?null:{marginTop:kit.title.marginTop,marginHorizontal:photo?ph.titleInset:0},children:onPress&&!cover?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:onPress,accessibilityRole:"button",accessibilityLabel:title,children:titleText}):titleText}),line&&!web&&!photo?/* @__PURE__ */jsxRuntime.jsx(Text2,{style:[text2(kit.text),{marginTop:kit.text.marginTop}],children:line}):null,footEl]});return cover&&footPress?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{testID:testID,style:[...card,down&&!reduced?{transform:[{scale:press}]}:null],children:[body,
|
|
76
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{testID:part("cover"),onPress:onPress,onPressIn:()=>setDown(true),onPressOut:()=>setDown(false),accessibilityRole:"button",accessibilityLabel:accessibilityLabel??title,style:{position:"absolute",top:0,right:0,bottom:0,left:0}})]}):cover?/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{testID:testID,onPress:onPress,accessibilityRole:"button",accessibilityLabel:accessibilityLabel??title,style:({pressed:pressed})=>[...card,pressed&&!reduced&&press!==1?{transform:[{scale:press}]}:null],children:body}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{testID:testID,style:card,children:body})}var DESIGN_V3_LIGHT=/* @__PURE__ */Object.freeze({ink:"#262523",ink2:"#4A4845",ink3:"#6B6863",paper:"#F8F7F4",card:"#FFFFFF",line:"#E7E6E2",tile:"#F2F1EE",shadow:"rgba(38, 37, 35, .07)",riskBg:"#FFE3E1",riskInk:"#B0231B",riskDot:"#E5372B",clearBg:"#E6F4D3",clearInk:"#2F6A12",clearDot:"#5FA82B",watchDot:"#E5A000"}),cache3=/* @__PURE__ */new WeakMap;function v3Palette(theme){let hit=cache3.get(theme);if(hit!==void 0)return hit;let c=theme.color,dark=theme.brightness==="dark",neutrals=dark?{dark:dark,ink:c.text.primary,ink2:c.text.secondary,ink3:c.text.muted,paper:c.background,card:c.surface,line:c.borderRingCream,tile:c.surfaceSubtle,shadow:c.shadow,riskBg:c.badgeBgCritical,riskInk:c.danger,riskDot:c.danger,clearBg:c.badgeBgPositive,clearInk:c.success,clearDot:c.success,watchDot:c.warningStrong}:{dark:dark,...DESIGN_V3_LIGHT},textOn=(ink,grounds)=>pushToContrast(ink,grounds,poleForGrounds(grounds),V3_TEXT_CONTRAST),labelOn=(ink,fill)=>contrastRatio(ink,fill)>=V3_TEXT_CONTRAST?ink:legibleOn(fill,V3_TEXT_CONTRAST),badgeGrounds=[neutrals.card,neutrals.paper].map(under=>flattenOnto(c.brandSoft,under)??under),brand={primary:c.primary,onPrimary:labelOn(c.onPrimary,c.primary),accent:c.accent,onAccent:labelOn(c.onAccent,c.accent),link:textOn(c.linkInk,[neutrals.card,neutrals.paper,neutrals.tile]),badge:c.brandSoft,onBadge:textOn(c.brandInk,badgeGrounds)},palette=/* @__PURE__ */Object.freeze({...neutrals,...brand});return cache3.set(theme,palette),palette}var V3_TEXT_CONTRAST=4.5;var GRAB="#DAD7D1";function planDsInput(p,outline=false){let r=role=>p.roles[role]??role,neutral=hex=>p.dark?r("line"):hex,box=(bg,extra={})=>({bg:bg,...extra}),words2=color=>({color:color}),noShadow={color:"",x:0,y:0,blur:0,spread:0},plan=Object.fromEntries(Object.entries({planInk:"primary",planOnInk:"onPrimary",planAccent:"accent",planLink:"link",planAccentWash:"accent4",planAccentChip:"accentChip",planLinkWash:"linkWash",planLinkChip:"linkChip"}).flatMap(([k2,role])=>p.roles[role]===void 0?[]:[[k2,p.roles[role]]]));return{colors:{bg:r("paper"),surface:r("card"),text:r("black"),ink:r(outline?"ink":"primary"),onInk:r("onPrimary"),muted:r("ink3"),line:r("line"),scrim:r("scrim"),grab:neutral(GRAB),focus:r("ink"),...plan},type:p.type,motion:{reduced:p.reduced},metrics:{variants:{drawer:{frame:box(r("card"),{color:r("ink")}),grab:box(neutral(GRAB)),kicker:words2(r("ink3")),close:{color:r("ink")},title:{color:r("ink"),wrap:"auto"},text:words2(r("black")),scrim:r("scrim")},segmented:{track:box(r("card"),{edge:{color:neutral(GRAB)}}),label:words2(r("ink")),chosen:box(r("primary")),chosenLabel:words2(r("onPrimary"))},stepper:{track:box(r("card"),{edge:{color:neutral(GRAB)}}),button:{color:r("ink")},value:words2(r("ink"))},summary:{box:box(r("card"),p.dark?{shadow:noShadow}:{}),term:words2(r("ink2")),value:words2(r("ink")),totalTerm:words2(r("ink")),total:words2(r("ink")),renewTerm:words2(r("ink2")),renew:words2(r("ink")),inset:box(r("paper"))},toast:{box:box(r("ink")),text:words2(r("onInk"))},focus:{color:r("ink")}}}}}var caches=/* @__PURE__ */new WeakMap;function planDsTheme(key,preset,input,outline=false){let byPreset=caches.get(preset);byPreset===void 0&&(byPreset={fill:/* @__PURE__ */new WeakMap,outline:/* @__PURE__ */new WeakMap},caches.set(preset,byPreset));let cache6=byPreset[outline?"outline":"fill"],t=cache6.get(key);return t===void 0&&(t=resolveTheme(planDsInput(input(),outline),preset),cache6.set(key,t)),t}var rnBlockFonts=theme=>{let n=theme.type.namedFaces,family=key=>face(theme,key).fontFamily;return{family:family("regular"),mono:family("mono"),faces:{regular:family("regular"),medium:family("medium"),bold:family("bold"),mono:family("mono"),monoBold:family("monoBold"),serif:headingFace(theme,"bold").fontFamily},namedFaces:n.regular&&n.medium&&n.bold}},mapped=/* @__PURE__ */new WeakMap;function themeInputFromEverfur(theme,fonts,base3=everfurTheme){if(base3!==everfurTheme)return mapEverfur(theme,fonts,base3);let byTheme=mapped.get(fonts);byTheme===void 0&&mapped.set(fonts,byTheme=/* @__PURE__ */new WeakMap);let input=byTheme.get(theme);return input===void 0&&byTheme.set(theme,input=mapEverfur(theme,fonts,base3)),input}function mapEverfur(theme,fonts,base3){let c=theme.color,d=EVERFUR_LIGHT.color,dark=theme.brightness==="dark",compiled=dark?EVERFUR_DARK:EVERFUR_LIGHT,moved=key=>c[key]!==d[key],colors={};if(moved("primary")?(Object.assign(colors,{ink:c.primary,onInk:c.onPrimary,focus:c.primary}),moved("accent")||Object.assign(colors,{go:c.primary,onGo:c.onPrimary})):moved("onPrimary")&&(colors.onInk=c.onPrimary),moved("accent")&&Object.assign(colors,{go:c.accent,onGo:c.onAccent}),moved("brandSoft")&&(colors.tintSage=c.brandSoft),moved("danger")&&Object.assign(colors,{alert:c.danger,alertDeep:c.danger}),dark)Object.assign(colors,{bg:c.background,surface:c.surface,text:c.text.primary,muted:c.text.muted,line:c.borderRingCream});else{let k2=compiled.color;c.background!==k2.background&&(colors.bg=c.background),c.surface!==k2.surface&&(colors.surface=c.surface),c.text.primary!==k2.text.primary&&(colors.text=c.text.primary),c.text.muted!==k2.text.muted&&(colors.muted=c.text.muted)}let over={};Object.keys(colors).length>0&&(over.colors={...colors});let r=theme.radius,kr=compiled.radius;if(r.xs!==kr.xs||r.sm!==kr.sm||r.lg!==kr.lg||r.xl!==kr.xl||r.pill!==kr.pill){let radius={};r.xs!==kr.xs&&(radius.sm=r.xs),r.sm!==kr.sm&&(radius.md=r.sm),r.lg!==kr.lg&&(radius.lg=r.lg),r.xl!==kr.xl&&(radius.xl=r.xl),r.pill!==kr.pill&&(radius.pill=r.pill),over.radius=radius,(r.lg!==kr.lg||r.xl!==kr.xl)&&(over.metrics={...r.lg!==kr.lg?{card:{radius:r.lg},summary:{radius:r.lg}}:{},...r.xl!==kr.xl?{sheet:{radius:r.xl}}:{}})}if(theme.space.xs!==compiled.space.xs){let f=theme.space.xs/compiled.space.xs,s=base3.space,n=v=>Math.round(v*f);over.space={1:n(s[1]),2:n(s[2]),3:n(s[3]),4:n(s[4]),5:n(s[5]),6:n(s[6]),7:n(s[7]),8:n(s[8]),9:n(s[9])}}let ts=theme.type.size,ks=compiled.type.size,sizeMoved=ts.caption!==ks.caption||ts.bodyTight!==ks.bodyTight||ts.body!==ks.body||ts.subtitle!==ks.subtitle||ts.verdict!==ks.verdict,lh=theme.type.lineHeight,klh=compiled.type.lineHeight,lineMoved=lh.relaxed!==klh.relaxed||lh.tight!==klh.tight,caps=theme.type.scaleCaps,kcaps=compiled.type.scaleCaps,capsMoved=caps.content!==kcaps.content||caps.heading!==kcaps.heading||caps.control!==kcaps.control||caps.compact!==kcaps.compact||caps.badge!==kcaps.badge,typeMoved=sizeMoved||lineMoved||capsMoved;over.type={...sizeMoved?{size:{xs:ts.caption,sm:ts.bodyTight,md:ts.body,lg:ts.subtitle,xl:ts.verdict}}:{},...lineMoved?{lineHeight:{body:lh.relaxed,display:lh.tight}}:{},...capsMoved?{scaleCaps:{content:caps.content,heading:caps.heading,control:caps.control,compact:caps.compact,badge:caps.badge}}:{},...fonts(theme)},theme.motion.reducedMotion&&!base3.motion.reduced&&(over.motion={reduced:true});let branded=typeMoved||Object.keys(colors).length>0||Object.keys(over).some(k2=>k2!=="type"&&k2!=="colors")||theme.type.families.regular!==EVERFUR_LIGHT.type.families.regular,plan=planColors(theme,compiled,colors.surface??base3.colors.surface),ownPlan=Object.entries(plan).filter(([k2,v])=>v!==base3.colors[k2]);return ownPlan.length>0&&(over.colors={...colors,...Object.fromEntries(ownPlan)}),branded?{name:"partner",...over}:over}var DS_PLAN={planAccent:everfurTheme.colors.planAccent,planLink:everfurTheme.colors.planLink},PLAN_WASHES2={planAccentWash:["accent",.17],planAccentChip:["accent",.47],planLinkWash:["link",.12],planLinkChip:["link",.2]};function planColors(theme,compiled,surface){let v=v3Palette(theme),k2=v3Palette(compiled),c=theme.color,out={};(c.primary!==compiled.color.primary||c.onPrimary!==compiled.color.onPrimary)&&Object.assign(out,{planInk:c.primary,planOnInk:v.onPrimary}),c.accent!==compiled.color.accent&&(out.planAccent=c.accent),v.link!==k2.link&&(out.planLink=v.link);let ink={accent:out.planAccent??DS_PLAN.planAccent,link:out.planLink??DS_PLAN.planLink},slot={planLinkWash:v.dark?void 0:theme.slots.planWash?.backgroundColor,planLinkChip:v.dark?void 0:theme.slots.planChip?.backgroundColor},ownCard=surface.toLowerCase()!==v.card.toLowerCase();for(let[key,[from,share]]of Object.entries(PLAN_WASHES2)){let given=slot[key];given!==void 0?out[key]=given:ownCard&&(out[key]=mixColor(ink[from],share,v.card,v.card))}return out}function useBlockThemeInput(fonts){let everfur=useEverfurTheme();return react.useMemo(()=>themeInputFromEverfur(everfur,fonts),[everfur,fonts])}function rnPlanDsTheme(theme,roles){return planDsTheme(theme,everfurTheme,()=>({roles:roles,dark:v3Palette(theme).dark,type:{...rnBlockFonts(theme),scaleCaps:theme.type.scaleCaps},reduced:theme.motion.reducedMotion}))}function PlanDs(props){return react.createElement(ThemeProvider,{theme:props.theme},props.children)}var DESIGN_RN_PLAN=/* @__PURE__ */Object.freeze({root:{backgroundColor:"$paper",color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:28,paddingLeft:16,paddingRight:16,paddingTop:16},pageFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:16,textAlign:"center"},tools:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,justifyContent:"space-between",lineHeight:25.5,marginBottom:2,marginLeft:2,marginRight:-6,marginTop:-8},toolsEyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},toolsEnd:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5},orders:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:6,lineHeight:22.5,minHeight:44,paddingBottom:0,paddingLeft:8,paddingRight:8,paddingTop:0},ordersIcon:{height:21,width:21},cart:{alignItems:"center",backgroundColor:"transparent",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,height:44,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:44},cartIcon:{height:26,width:26},cartCount:{backgroundColor:"$riskDot",borderRadius:999,color:"$card",fontFamily:"sans",fontSize:12,fontVariant:["tabular-nums"],fontWeight:"800",height:20,lineHeight:20,minWidth:20,paddingBottom:0,paddingLeft:5,paddingRight:5,paddingTop:0,position:"absolute",right:1,ring:[{width:2,color:"$paper"}],textAlign:"center",top:3},head:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:["fr",56],lineHeight:25.5,paddingBottom:0,paddingLeft:2,paddingRight:2,paddingTop:2},eyebrow:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.77,lineHeight:16.5,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},title:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:30.74,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},subtitle:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},headImage:{backgroundColor:"$tile",borderRadius:28,height:56,ring:[{width:3,color:"$paper"},{width:5.5,color:"$accent"}],width:56},by:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[40,"fr",22],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},byImage:{backgroundColor:"$tile",borderRadius:20,height:40,width:40},byName:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75},byRole:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,marginTop:2,textTransform:"uppercase"},byOk:{color:"$link",height:22,width:22},need:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},needKicker:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:8,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sources:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"800",gap:4,lineHeight:22.5,marginLeft:"auto"},source:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$tile",borderRadius:999,color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:12,fontWeight:"700",height:24,lineHeight:18,paddingBottom:0,paddingLeft:9,paddingRight:9,paddingTop:0},sourceDna:{backgroundColor:"$linkWash",color:"$link"},needTitle:{color:"$ink",fontFamily:"sans",fontSize:19,fontWeight:"800",lineHeight:23.18,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},needRisk:{alignItems:"baseline",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:9,grid:[9,"fr"],lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6},needRiskLead:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:21.75},dot:{alignSelf:"flex-start",borderRadius:4.5,flexGrow:0,flexShrink:0,height:9,width:9},dotRisk:{backgroundColor:"$riskDot"},odds:{alignItems:"center",backgroundColor:"$accent4",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10},oddsKicker:{color:"$ink2",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:18.23,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:135},oddsTag:{alignSelf:"flex-start",backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,fontWeight:"600",letterSpacing:.6,lineHeight:13.5,marginTop:3,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},oddsNumbers:{alignItems:"center",color:"$ink",columnGap:6,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:["auto","auto","auto"],justifyItems:"flex-end",lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,rowGap:0},oddsFrom:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,textDecorationLine:"line-through"},oddsIcon:{color:"$ink3",height:16,width:16},oddsTo:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",lineHeight:28},oddsLabel:{color:"$link",fontFamily:"sans",fontSize:12.5,fontWeight:"700",lineHeight:18.75,marginTop:3},says:{alignItems:"flex-start",backgroundColor:"$paper",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[32,"fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:12,paddingTop:10},saysImage:{borderRadius:16,height:32,width:32},saysText:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},saysBy:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:20.3,marginRight:2},saysSerif:{color:"$ink",fontFamily:"serif",fontSize:17,fontWeight:"800",letterSpacing:-.17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},tag:{backgroundColor:"$card",borderRadius:5,color:"$ink",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:14,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},jump:{alignItems:"center",backgroundColor:"$primary",borderRadius:14,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[44,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:8,paddingLeft:8,paddingRight:14,paddingTop:8,textAlign:"left",width:"100%"},jumpNoImage:{grid:["fr","auto"]},jumpImage:{backgroundColor:"$card",borderRadius:10,height:44,width:44},jumpSmall:{color:"$accent",fontFamily:"sans",fontSize:13,fontWeight:"800",lineHeight:19.5,textAlign:"left"},jumpStrong:{color:"$onPrimary",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:18.75,textAlign:"left"},jumpGo:{color:"$onPrimary",fontFamily:"sans",fontSize:14,fontWeight:"800",lineHeight:21,textAlign:"left"},steps:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:12,paddingRight:12,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},stepsHead:{alignItems:"baseline",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,paddingBottom:0,paddingLeft:4,paddingRight:4,paddingTop:0},stepsTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stepsLabel:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.55,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},n:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},tips:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-12,marginRight:-12,marginTop:10,paddingBottom:2,paddingLeft:12,paddingRight:12,paddingTop:0},tip:{borderRadius:18,color:"$ink",flexBasis:"78%",flexDirection:"column",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:14},tipY:{backgroundColor:"$accentChip"},tipC:{backgroundColor:"$linkChip"},tipG:{backgroundColor:"$clearChip"},tipR:{backgroundColor:"$riskChip"},tipTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},tipIcon:{color:"$ink",height:26,width:26},tipN:{color:"$ink",fontFamily:"serif",fontSize:30,fontWeight:"900",lineHeight:30},tipStrong:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:21.25,marginTop:14},tipSmall:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginTop:4},tipEm:{color:"$link",fontFamily:"mono",fontSize:10.5,fontStyle:"normal",letterSpacing:.42,lineHeight:15.75,marginTop:"auto",paddingTop:10,textTransform:"uppercase"},sec:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},secTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:19,fontWeight:"800",gap:10,lineHeight:22.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},secN:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:12.5,fontWeight:"800",height:24,justifyContent:"center",lineHeight:15,width:24},pick:{backgroundColor:"transparent",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},pickTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[76,"fr"],lineHeight:25.5},pickImage:{backgroundColor:"$paper",borderRadius:14,height:76,overflow:"hidden",width:76},pickTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},stars:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13.5,fontWeight:"800",gap:4,lineHeight:20.25,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},starsIcon:{color:"$watchDot",height:14,width:14},starsLabel:{color:"$ink3",fontFamily:"sans",fontSize:13.5,fontWeight:"500",lineHeight:20.25},pickLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},reviews:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:-16,marginRight:-16,marginTop:12,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0},review:{backgroundColor:"$paper",borderRadius:14,color:"$ink",flexBasis:"78%",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:280,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},reviewStars:{color:"$watchDot",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:1,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},reviewStar:{height:13,width:13},reviewText:{color:"$ink",fontFamily:"sans",fontSize:15,lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:5},reviewBy:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:19.5,marginTop:4},why:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$ink"},lineHeight:25.5,marginTop:14,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12},whyMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},whyList:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},whyRow:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[58,"fr"],lineHeight:25.5,marginTop:10},whyStrong:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"800",lineHeight:19.5},whySmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1},chip:{alignItems:"center",borderRadius:6,color:"$ink",fontFamily:"mono",fontSize:10.5,fontWeight:"700",height:22,justifyContent:"center",letterSpacing:.42,lineHeight:15.75,textTransform:"uppercase"},chipDna:{backgroundColor:"$linkWash",color:"$link"},chipAsk:{backgroundColor:"$accent4",color:"$ink"},chipRec:{backgroundColor:"$tile",color:"$ink2"},score:{alignItems:"center",backgroundColor:"$primary",borderRadius:12,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:8,justifyContent:"space-between",lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:11,paddingLeft:14,paddingRight:12,paddingTop:11},scoreValue:{color:"$accent",flexGrow:0,flexShrink:0,fontFamily:"mono",fontSize:16,fontWeight:"700",lineHeight:20.8},dose:{backgroundColor:"$linkWash",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:10,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:12},doseMini:{color:"$link",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},doseList:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:8,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},doseItem:{alignItems:"center",backgroundColor:"$card",borderRadius:12,color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,paddingBottom:10,paddingLeft:4,paddingRight:4,paddingTop:10,textAlign:"center"},doseValue:{color:"$ink",fontFamily:"mono",fontSize:21,fontVariant:["tabular-nums"],fontWeight:"700",lineHeight:23.1,textAlign:"center"},doseLabel:{color:"$ink2",fontFamily:"sans",fontSize:12.5,lineHeight:16.25,textAlign:"center"},doseNote:{color:"$link",fontFamily:"sans",fontSize:14,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},ingredients:{color:"$ink",flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12},ingredient:{backgroundColor:"$tile",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13.5,fontWeight:"600",lineHeight:20.25,paddingBottom:6,paddingLeft:10,paddingRight:10,paddingTop:6},opts:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:14},opt:{alignItems:"center",backgroundColor:"$card",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,inner:{width:1.5,color:"$n_DEDCD7"},justifyContent:"space-between",lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,textAlign:"left",width:"100%"},optOn:{inner:{width:2.5,color:"$ink"}},optOnce:{backgroundColor:"$paper",inner:null,paddingBottom:10,paddingLeft:14,paddingRight:14,paddingTop:10,shadow:null},optOnceOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},optText:{alignItems:"flex-start",color:"$ink",fontFamily:"sans",fontSize:17,gap:2,lineHeight:25.5,textAlign:"left"},optStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,textAlign:"left"},optOnceStrong:{fontSize:15,fontWeight:"700",lineHeight:22.5},optSmall:{color:"$ink2",fontFamily:"sans",fontSize:13.5,lineHeight:20.25,textAlign:"left"},optOnceSmall:{fontSize:13,lineHeight:19.5},optTag:{backgroundColor:"$riskInk",borderRadius:6,color:"$card",fontFamily:"sans",fontSize:12,fontWeight:"800",lineHeight:18,marginBottom:4,paddingBottom:2,paddingLeft:8,paddingRight:8,paddingTop:2,textAlign:"left"},price:{alignItems:"flex-end",color:"$ink",columnGap:8,flexDirection:"column",flexWrap:"nowrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,minWidth:0,rowGap:0,textAlign:"left"},priceValue:{color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.4,textAlign:"left"},priceWas:{color:"$riskInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,textAlign:"left",textDecorationLine:"line-through"},optPrice:{color:"$ink",fontFamily:"sans",fontSize:18,fontWeight:"800",lineHeight:27,textAlign:"left"},optOncePrice:{color:"$ink2",fontSize:15,fontWeight:"700",lineHeight:22.5},buy:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:12,justifyContent:"space-between",lineHeight:25.5,marginTop:12},button:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:25.5,minHeight:52,paddingBottom:0,paddingLeft:20,paddingRight:20,paddingTop:0,textDecorationLine:"none",width:"100%"},buttonDisabled:{opacity:.32},proof:{alignItems:"center",color:"$riskInk",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"800",gap:6,justifyContent:"center",lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10},proofIcon:{flexGrow:0,flexShrink:0,height:21,marginTop:-2,width:21},trust:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,grid:["fr","fr","fr"],lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:12,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trustItem:{alignItems:"center",color:"$ink2",fontFamily:"sans",fontSize:12.5,fontWeight:"600",gap:4,lineHeight:16.25,textAlign:"center"},trustIcon:{color:"$link",height:20,width:20},on:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:14,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:[34,"fr","auto"],lineHeight:25.5,marginTop:12,paddingBottom:10,paddingLeft:12,paddingRight:10,paddingTop:10},onIcon:{alignItems:"center",backgroundColor:"$clearDot",borderRadius:17,color:"$card",fontFamily:"sans",fontSize:17,height:34,justifyContent:"center",lineHeight:25.5,width:34},onIconSvg:{height:18,width:18},onStrong:{color:"$clearInk",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:18.75},onSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:17.55,marginTop:1},onButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:38,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},more:{color:"$ink",columnGap:18,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8,rowGap:0},moreButton:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:34,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},fine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:8},others:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},sign:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DEDCD7"},lineHeight:25.5,marginTop:12,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14},signUrgent:{backgroundColor:"$riskBg",inner:null,shadow:null},signTitle:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",gap:8,lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},signUrgentTitle:{color:"$riskInk"},signUrgentIcon:{height:20,width:20},signBody:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:4},signUrgentBody:{color:"$ink"},questionsKicker:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},questions:{color:"$ink",fontFamily:"sans",fontSize:15,gap:6,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,paddingLeft:22},questionsAfterKicker:{marginTop:6},add:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"800",inner:{width:2,color:"$ink"},justifyContent:"center",lineHeight:24,marginTop:14,minHeight:48,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,width:"100%"},addOn:{backgroundColor:"$clearBg",color:"$clearInk",inner:null,shadow:null},askRow:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:16,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[40,"fr",18],lineHeight:25.5,marginTop:10,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12,textAlign:"left",width:"100%"},askRowInSec:{marginTop:12},askRowIcon:{alignItems:"center",backgroundColor:"$card",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:40},askRowIconSvg:{height:21,width:21},askRowStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15,textAlign:"left"},askRowSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:1,textAlign:"left"},askRowChev:{color:"$ink2",height:18,width:18},extras:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:22},extrasTitle:{color:"$ink3",fontFamily:"mono",fontSize:11,fontWeight:"400",letterSpacing:.77,lineHeight:12.65,marginBottom:0,marginLeft:4,marginRight:4,marginTop:0,textTransform:"uppercase"},extra:{alignItems:"flex-start",backgroundColor:"$card",borderRadius:22,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[56,"fr"],lineHeight:25.5,paddingBottom:14,paddingLeft:14,paddingRight:14,paddingTop:14,rowGap:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},extraKit:{backgroundColor:"$linkWash",inner:null,shadow:null},extraImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},extraKitImage:{backgroundColor:"$card"},extraIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",height:56,justifyContent:"center",width:56},extraIconSvg:{height:26,width:26},extraTitle:{color:"$ink",fontFamily:"sans",fontSize:17,fontWeight:"800",lineHeight:20.4,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},extraTitleSerif:{fontFamily:"serif",fontSize:21,fontWeight:"800",letterSpacing:-.21,lineHeight:25.2},extraBody:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:3},extraPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:14.5,lineHeight:20.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,rowGap:0},extraPriceValue:{color:"$ink",fontFamily:"sans",fontSize:19,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:26.6},extraPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:19.6,textDecorationLine:"line-through"},extraGo:{backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",fontFamily:"sans",fontSize:14.5,fontWeight:"800",lineHeight:21.75,marginTop:8,minHeight:40,paddingBottom:0,paddingLeft:18,paddingRight:18,paddingTop:0},extraGoOn:{backgroundColor:"$clearBg",color:"$clearInk"},wait:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14,paddingBottom:16,paddingLeft:16,paddingRight:16,paddingTop:16,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},waitTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[46,"fr"],lineHeight:25.5},waitTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:13,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:46,justifyContent:"center",lineHeight:33,width:46},waitTileSvg:{height:23,width:23},waitMini:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},waitTitle:{color:"$ink",fontFamily:"serif",fontSize:26,fontWeight:"800",letterSpacing:-.26,lineHeight:27.3,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},waitKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:18},waitText:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15.5,fontWeight:"700",gap:8,lineHeight:23.25,marginBottom:12,marginLeft:0,marginRight:0,marginTop:16},waitTextSvg:{color:"$link",flexGrow:0,flexShrink:0,height:20,width:20},waitButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textDecorationLine:"none",width:"100%"},track:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:14,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},trackStep:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[22,"fr"],lineHeight:25.5,paddingBottom:16,position:"relative"},trackStepLast:{paddingBottom:0},trackLine:{backgroundColor:"$n_E2DFD9",borderRadius:1,bottom:-2,left:10,position:"absolute",top:20,width:2},trackLineDone:{backgroundColor:"$primary"},trackDot:{alignItems:"center",backgroundColor:"$card",borderRadius:11,height:22,inner:{width:2,color:"$n_CFCBC4"},justifyContent:"center",position:"relative",width:22,zIndex:1},trackDotDone:{backgroundColor:"$primary",inner:null,shadow:null},trackDotNow:{backgroundColor:"$accent",inner:{width:2,color:"$ink"}},trackDotSvg:{color:"$card",height:13,width:13},trackTitle:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:20.15},trackTitleTodo:{color:"$ink3",fontWeight:"700"},trackDetail:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:1},trackTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:13.5,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},next:{backgroundColor:"$card",borderRadius:18,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:22,paddingBottom:4,paddingLeft:16,paddingRight:16,paddingTop:4,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left"},nextIn:{backgroundColor:"$paper",inner:null,marginTop:8,shadow:null},nextRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[36,"fr"],lineHeight:25.5,paddingBottom:10,paddingLeft:0,paddingRight:0,paddingTop:10,textAlign:"left"},nextIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:36,justifyContent:"center",lineHeight:25.5,textAlign:"left",width:36},nextIconSvg:{height:19,width:19},nextIconImage:{borderRadius:11,height:"100%",width:"100%"},nextLabel:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.53,lineHeight:15.75,textAlign:"left",textTransform:"uppercase"},nextText:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"600",lineHeight:20.25,marginTop:1,textAlign:"left"},done:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:20,paddingLeft:22,paddingRight:22,paddingTop:40,textAlign:"center"},doneCheck:{alignItems:"center",backgroundColor:"$accent",borderRadius:38,color:"$ink",fontFamily:"sans",fontSize:17,height:76,justifyContent:"center",lineHeight:25.5,marginBottom:0,marginLeft:"auto",marginRight:"auto",marginTop:0,textAlign:"center",width:76},doneCheckSvg:{height:38,width:38},doneTitle:{color:"$ink",fontFamily:"serif",fontSize:34,fontWeight:"800",letterSpacing:-.34,lineHeight:39.1,marginBottom:0,marginLeft:0,marginRight:0,marginTop:20,textAlign:"center"},doneWhen:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:10,textAlign:"center"},doneWho:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:22.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2,textAlign:"center"},pushFoot:{backgroundColor:"$paper",borderTopColor:"$line",borderTopWidth:1,color:"$ink",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:34,paddingLeft:18,paddingRight:18,paddingTop:12},pushFootStack:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5},shop:{color:"$ink",fontFamily:"sans",fontSize:17,gap:12,lineHeight:25.5,paddingBottom:28,paddingLeft:18,paddingRight:18,paddingTop:8},shopTitle:{color:"$ink",fontFamily:"serif",fontSize:29,fontWeight:"800",letterSpacing:-.29,lineHeight:31.32,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopSub:{color:"$ink2",fontFamily:"sans",fontSize:15,lineHeight:21.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:-6},shopKey:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:18.4,marginBottom:-4,marginLeft:2,marginRight:2,marginTop:6},shopCard:{backgroundColor:"$card",borderRadius:22,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:16,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},shopFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},shopFineCenter:{marginTop:14,textAlign:"center"},shopEmpty:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:48,textAlign:"center"},shopEmptyTile:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:20,color:"$link",flexGrow:0,flexShrink:0,fontFamily:"sans",fontSize:22,height:72,justifyContent:"center",lineHeight:33,marginBottom:8,textAlign:"center",width:72},shopEmptyTileSvg:{height:34,width:34},shopEmptyTitle:{color:"$ink",fontFamily:"serif",fontSize:28,fontWeight:"800",letterSpacing:-.28,lineHeight:30.8,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},shopEmptyText:{color:"$ink2",fontFamily:"sans",fontSize:15.5,lineHeight:22.48,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,maxWidth:298.07,textAlign:"center"},shopEmptyButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$primary",borderRadius:999,color:"$onPrimary",flexDirection:"row",fontFamily:"sans",fontSize:16,fontWeight:"700",gap:8,justifyContent:"center",lineHeight:24,marginTop:12,minHeight:48,paddingBottom:0,paddingLeft:22,paddingRight:22,paddingTop:0,textAlign:"center",textDecorationLine:"none"},shopLink:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},shopActions:{alignItems:"center",color:"$ink",fontFamily:"sans",fontSize:17,gap:4,lineHeight:25.5,marginTop:4},orderList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},order:{alignItems:"center",backgroundColor:"$card",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:10,grid:["fr",18],lineHeight:25.5,paddingBottom:14,paddingLeft:16,paddingRight:14,paddingTop:14,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06},textAlign:"left",width:"100%"},orderChev:{color:"$ink3",height:18,width:18},orderTop:{alignItems:"center",color:"$ink",columnGap:10,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,rowGap:4,textAlign:"left"},orderNo:{color:"$ink3",fontFamily:"mono",fontSize:12,letterSpacing:.48,lineHeight:18,textAlign:"left"},orderWhat:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20.8,marginTop:8,textAlign:"left"},orderMeta:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:19.6,marginTop:2,textAlign:"left"},orderPics:{color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:10,textAlign:"left"},orderPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,overflow:"hidden",textAlign:"left",width:40},orderPicImage:{height:"100%",width:"100%"},orderPicSvg:{height:20,width:20},pill:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$accent3",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:13,fontWeight:"800",gap:6,lineHeight:19.5,minHeight:26,paddingBottom:0,paddingLeft:10,paddingRight:10,paddingTop:0,textAlign:"left"},pillDone:{backgroundColor:"$clearBg",color:"$clearInk"},pillSub:{backgroundColor:"$linkWash",color:"$link"},cartItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:18,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},cartItem:{alignItems:"flex-start",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[64,"fr"],lineHeight:25.5},cartItemImage:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:14,color:"$link",fontFamily:"sans",fontSize:17,height:64,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:64},cartItemImageSvg:{height:28,width:28},cartItemTitle:{color:"$ink",fontFamily:"sans",fontSize:16.5,fontWeight:"800",lineHeight:20.63,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},cartItemPrice:{alignItems:"center",color:"$ink",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:3,rowGap:2},cartItemPriceValue:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:24},cartItemPriceWas:{color:"$ink3",fontFamily:"sans",fontSize:14,fontWeight:"600",lineHeight:21,textDecorationLine:"line-through"},cartItemPriceNote:{color:"$ink3",fontFamily:"sans",fontSize:14,lineHeight:21},cartItemActions:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:16,lineHeight:25.5,marginTop:8},stepper:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,30,40],height:40,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},stepperButton:{alignItems:"center",backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},stepperButtonDisabled:{opacity:.3},stepperButtonSvg:{height:16,width:16},stepperValue:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:23.25,textAlign:"center"},remove:{backgroundColor:"transparent",color:"$ink2",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"},mode:{color:"$ink",fontFamily:"sans",fontSize:17,gap:6,lineHeight:25.5,marginTop:8},modeButton:{alignItems:"center",backgroundColor:"$paper",borderRadius:12,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,fontWeight:"700",gap:10,justifyContent:"space-between",lineHeight:18.85,minHeight:44,paddingBottom:8,paddingLeft:12,paddingRight:12,paddingTop:8,textAlign:"left"},modeButtonOn:{backgroundColor:"$card",inner:{width:2,color:"$ink"}},modePrice:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:18.85,textAlign:"left"},every:{backgroundColor:"$card",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:4,grid:["fr","fr","fr"],inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5,marginTop:8,paddingBottom:4,paddingLeft:4,paddingRight:4,paddingTop:4},everyButton:{backgroundColor:"transparent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,minHeight:36,paddingBottom:0,paddingLeft:6,paddingRight:6,paddingTop:0,textAlign:"center"},everyButtonOn:{backgroundColor:"$primary",color:"$onPrimary"},summary:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},summaryRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:12,justifyContent:"space-between",lineHeight:22.5,minHeight:34},summaryLabel:{alignItems:"center",alignSelf:"flex-start",color:"$ink2",flexDirection:"row",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],gap:8,lineHeight:22.5},summaryTotal:{fontSize:17,fontWeight:"800",lineHeight:25.5,minHeight:42},summaryTotalLabel:{color:"$ink"},summaryRenew:{fontSize:14,lineHeight:21,marginTop:-6,minHeight:28},summaryTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,fontVariant:["tabular-nums"],letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},foot:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5},footFine:{color:"$ink3",fontFamily:"sans",fontSize:13,lineHeight:18.85,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},co:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginTop:2},coProduct:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr"],lineHeight:25.5},coProductImage:{alignItems:"center",backgroundColor:"$accent3",borderRadius:14,color:"$ink",fontFamily:"sans",fontSize:17,height:56,justifyContent:"center",lineHeight:25.5,overflow:"hidden",width:56},coProductImageSvg:{height:30,width:30},coProductTitle:{color:"$ink",fontFamily:"sans",fontSize:20,fontWeight:"800",lineHeight:24,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},coProductLine:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginBottom:0,marginLeft:0,marginRight:0,marginTop:2},coOptions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coOption:{borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:25.5},coOptionOn:{backgroundColor:"$accent4",inner:{width:2,color:"$ink"}},coOptionHit:{alignItems:"flex-start",backgroundColor:"transparent",borderRadius:16,color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[22,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:14,paddingRight:14,paddingTop:12,rowGap:2,textAlign:"left",width:"100%"},coOptionStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6,textAlign:"left"},coOptionSmall:{color:"$ink2",fontFamily:"sans",fontSize:13,lineHeight:18.2,textAlign:"left"},coOptionPrice:{color:"$ink",fontFamily:"sans",fontSize:16,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:21.6,textAlign:"right"},coOptionPriceWas:{color:"$riskInk",fontFamily:"sans",fontSize:13,fontVariant:["tabular-nums"],fontWeight:"600",lineHeight:17.55,textAlign:"right",textDecorationLine:"line-through"},coRadio:{alignItems:"center",borderRadius:11,height:22,inner:{width:2,color:"$n_BDB9B2"},justifyContent:"center",width:22},coRadioOn:{inner:{width:7,color:"$ink"}},coKicker:{color:"$ink3",fontFamily:"mono",fontSize:10.5,letterSpacing:.63,lineHeight:15.75,marginBottom:6,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},coWhen:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,paddingBottom:12,paddingLeft:48,paddingRight:14,paddingTop:0},coItems:{color:"$ink",fontFamily:"sans",fontSize:17,gap:10,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},coItem:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,gap:12,grid:[44,"fr","auto"],lineHeight:22.5},coItemPic:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:10,color:"$link",fontFamily:"sans",fontSize:15,height:44,justifyContent:"center",lineHeight:22.5,overflow:"hidden",width:44},coItemStrong:{color:"$ink",fontFamily:"sans",fontSize:15.5,fontWeight:"800",lineHeight:19.38},coItemSmall:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},coItemValue:{color:"$ink",fontFamily:"sans",fontSize:15,fontVariant:["tabular-nums"],fontWeight:"800",lineHeight:22.5},coRows:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:14,paddingRight:14,paddingTop:2},coRow:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:14.5,gap:10,grid:[20,73.6,"fr"],lineHeight:21.75,minHeight:40},coRowSvg:{color:"$ink2",height:20,width:20},coRowLabel:{color:"$ink3",fontFamily:"sans",fontSize:14.5,lineHeight:21.75},coRowValue:{color:"$ink",fontFamily:"sans",fontSize:14.5,fontWeight:"700",lineHeight:21.75},coRowsShop:{backgroundColor:"$card",shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},coFine:{color:"$ink3",fontFamily:"sans",fontSize:12.5,lineHeight:18.13,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textAlign:"center"},coSummary:{backgroundColor:"$paper",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:17,inner:null,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:6,paddingLeft:16,paddingRight:16,paddingTop:6,shadow:null},weightField:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,lineHeight:22.5,marginTop:14},weightInputWrap:{color:"$ink",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,position:"relative"},weightInput:{backgroundColor:"$card",borderRadius:16,color:"$ink",fontFamily:"sans",fontSize:24,fontVariant:["tabular-nums"],fontWeight:"800",height:58,inner:{width:1.5,color:"$n_DAD7D1"},lineHeight:36,paddingBottom:0,paddingLeft:18,paddingRight:56,paddingTop:0,width:"100%"},weightInputFocus:{inner:{width:2.5,color:"$ink"}},weightUnit:{color:"$ink3",fontFamily:"sans",fontSize:17,fontWeight:"700",lineHeight:25.5,position:"absolute",right:18,top:"50%"},weightError:{color:"$riskInk",fontFamily:"sans",fontSize:14,fontWeight:"700",lineHeight:21,marginBottom:0,marginLeft:0,marginRight:0,marginTop:6,minHeight:20},weightActions:{color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,marginTop:10},subCard:{alignItems:"center",backgroundColor:"$clearBg",borderRadius:22,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,gap:12,grid:[56,"fr","auto"],lineHeight:25.5,paddingBottom:12,paddingLeft:12,paddingRight:14,paddingTop:12},subCardImage:{backgroundColor:"$card",borderRadius:14,height:56,width:56},subCardStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:20},subCardSmall:{color:"$ink2",fontFamily:"sans",fontSize:14,lineHeight:18.9,marginTop:2},subCardButton:{backgroundColor:"$card",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:14,fontWeight:"800",inner:{width:1.5,color:"$ink"},lineHeight:21,minHeight:40,paddingBottom:0,paddingLeft:14,paddingRight:14,paddingTop:0},carrier:{alignItems:"center",color:"$ink",columnGap:12,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[40,"fr"],lineHeight:25.5,rowGap:4},carrierIcon:{alignItems:"center",backgroundColor:"$linkWash",borderRadius:11,color:"$link",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,width:40},carrierIconSvg:{height:21,width:21},carrierStrong:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"800",lineHeight:24},carrierSmall:{alignItems:"center",color:"$ink2",columnGap:8,flexDirection:"row",flexWrap:"wrap",fontFamily:"mono",fontSize:13,letterSpacing:.26,lineHeight:19.5,marginTop:1,rowGap:2},carrierButton:{alignItems:"center",alignSelf:"flex-start",backgroundColor:"transparent",borderRadius:999,color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:15,fontWeight:"700",gap:8,inner:{width:1.5,color:"$ink"},justifyContent:"center",lineHeight:22.5,marginTop:10,minHeight:40,paddingBottom:0,paddingLeft:16,paddingRight:16,paddingTop:0,textDecorationLine:"none"},carrierWait:{color:"$ink2",fontFamily:"sans",fontSize:14.5,lineHeight:20.3},carrierTag:{backgroundColor:"$ink",borderRadius:5,color:"$onInk",fontFamily:"mono",fontSize:10,letterSpacing:.6,lineHeight:15,paddingBottom:2,paddingLeft:6,paddingRight:6,paddingTop:2,textTransform:"uppercase"},toast:{backgroundColor:"$ink",borderRadius:16,color:"$onInk",fontFamily:"sans",fontSize:14.5,left:16,lineHeight:20.3,opacity:1,paddingBottom:12,paddingLeft:15,paddingRight:15,paddingTop:12,position:"absolute",right:16,top:62,zIndex:50},scrim:{backgroundColor:"$scrim",bottom:0,left:0,opacity:1,position:"absolute",right:0,top:0,zIndex:40},sheet:{backgroundColor:"$card",borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:28,borderTopRightRadius:28,bottom:0,color:"$ink",fontFamily:"sans",fontSize:17,left:0,lineHeight:25.5,maxHeight:"80%",paddingBottom:40,paddingLeft:20,paddingRight:20,paddingTop:10,position:"absolute",right:0,zIndex:41},sheetGrab:{backgroundColor:"$n_DAD7D1",borderRadius:3,height:5,marginBottom:10,marginLeft:"auto",marginRight:"auto",marginTop:0,width:40},sheetTop:{alignItems:"center",color:"$ink",flexDirection:"row",fontFamily:"sans",fontSize:17,justifyContent:"space-between",lineHeight:25.5},sheetKicker:{color:"$ink3",fontFamily:"mono",fontSize:11,letterSpacing:.88,lineHeight:16.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,textTransform:"uppercase"},sheetClose:{alignItems:"center",backgroundColor:"transparent",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,height:40,justifyContent:"center",lineHeight:25.5,marginRight:-8,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,position:"relative",width:40},sheetCloseSvg:{height:22,width:22},sheetTitle:{color:"$ink",fontFamily:"serif",fontSize:24,fontWeight:"800",letterSpacing:-.24,lineHeight:27.6,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0},sheetBody:{color:"$black",fontFamily:"sans",fontSize:16,gap:10,lineHeight:24,marginTop:12},blanksWrap:{color:"$ink",fontFamily:"sans",fontSize:17,lineHeight:25.5,marginTop:14},blanksCard:{backgroundColor:"$card",borderRadius:20,color:"$ink",fontFamily:"sans",fontSize:17,gap:8,lineHeight:25.5,paddingBottom:13,paddingLeft:12,paddingRight:12,paddingTop:12,shadow:{x:0,y:1,blur:3,color:"#262523",opacity:.06}},blanksHead:{alignItems:"center",color:"$ink3",flexDirection:"row",fontFamily:"sans",fontSize:12.5,fontWeight:"800",gap:10,justifyContent:"space-between",letterSpacing:.88,lineHeight:18.75,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:2,paddingLeft:2,paddingRight:2,paddingTop:0,textTransform:"uppercase"},blanksPill:{backgroundColor:"$accent",borderRadius:999,color:"$ink",fontFamily:"sans",fontSize:13,fontStyle:"normal",fontWeight:"800",letterSpacing:.13,lineHeight:19.5,paddingBottom:2,paddingLeft:10,paddingRight:10,paddingTop:2,textTransform:"none"},blanksPillFilled:{backgroundColor:"$clearBg",color:"$clearInk"},blanksList:{color:"$ink",fontFamily:"sans",fontSize:17,gap:7,lineHeight:25.5,marginBottom:0,marginLeft:0,marginRight:0,marginTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0},blanksRow:{alignItems:"center",backgroundColor:"$paper",borderRadius:15,color:"$ink",columnGap:11,flexDirection:"row",fontFamily:"sans",fontSize:17,grid:[34,"fr"],lineHeight:25.5,paddingBottom:9,paddingLeft:9,paddingRight:12,paddingTop:9},blanksNum:{alignItems:"center",backgroundColor:"$accentChip",borderRadius:11,color:"$ink",fontFamily:"serif",fontSize:22,fontWeight:"800",height:40,justifyContent:"center",lineHeight:33,width:34},blanksText:{color:"$ink",fontFamily:"sans",fontSize:16,fontWeight:"700",lineHeight:21.6},blanksSource:{color:"$ink3",fontFamily:"sans",fontSize:13.5,lineHeight:20.25},blank:{alignSelf:"flex-start",backgroundColor:"$accent4",borderRadius:6,color:"$ink",fontFamily:"sans",fontSize:16,fontStyle:"normal",fontWeight:"700",height:20,inner:{width:1.5,color:"$accent"},lineHeight:21.6,minWidth:36},blankS:{minWidth:24},blankL:{minWidth:64},blankFilled:{backgroundColor:"transparent",borderRadius:6,height:"auto",inner:null,marginBottom:0,marginLeft:-3,marginRight:-3,marginTop:0,minWidth:0,paddingBottom:0,paddingLeft:3,paddingRight:3,paddingTop:0,shadow:null},manageOrders:{backgroundColor:"transparent",color:"$link",fontFamily:"sans",fontSize:15,fontWeight:"700",lineHeight:22.5,minHeight:40,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,textDecorationLine:"underline"}}),DESIGN_RN_PLAN_ICONS=/* @__PURE__ */Object.freeze({shield:{strokes:[{width:1.8,cap:true,closed:true,points:[12,3,19,6,19,12,18.759,14.125,18.074,16,17,17.625,15.593,19,13.907,20.125,12,21,10.093,20.125,8.407,19,7,17.625,5.926,16,5.241,14.125,5,12,5,6]},{width:1.8,cap:true,closed:false,points:[9,12,11,14,15,10]}],boxes:[],triangles:[],seams:[]},arrow:{strokes:[{width:2,cap:true,closed:false,points:[4.5,12,19,12]},{width:2,cap:true,closed:false,points:[13.5,6.5,19,12,13.5,17.5]}],boxes:[],triangles:[],seams:[]},check:{strokes:[{width:2.4,cap:true,closed:false,points:[5,12.6,9.4,17,19,7.4]}],boxes:[],triangles:[],seams:[]},star:{strokes:[],boxes:[],triangles:[[12,16.9,6.8,19.6,7.8,13.8],[16.2,13.8,17.2,19.6,12,16.9],[7.8,13.8,3.5,9.7,9.4,8.8],[14.6,8.8,20.5,9.7,16.2,13.8],[9.4,8.8,12,3.5,14.6,8.8],[16.2,13.8,12,16.9,7.8,13.8],[14.6,8.8,16.2,13.8,7.8,13.8],[14.6,8.8,7.8,13.8,9.4,8.8]],seams:[[12,16.9,7.8,13.8,.245,.677],[12,16.9,16.2,13.8,.245,.677],[7.8,13.8,9.4,8.8,.69,.248],[14.6,8.8,16.2,13.8,.248,.243],[14.6,8.8,9.4,8.8,.68,.245],[16.2,13.8,7.8,13.8,.677,.68],[14.6,8.8,7.8,13.8,.68,.69]]},truck:{strokes:[{width:1.7,cap:false,closed:true,points:[2.8,6.5,14.2,6.5,14.2,16,2.8,16]},{width:1.7,cap:false,closed:false,points:[14.2,9.5,17.8,9.5,21.2,12.9,21.2,16,14.2,16]}],boxes:[{x:5,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7},{x:15.4,y:15.8,w:3.6,h:3.6,radius:1.8,width:1.7}],triangles:[],seams:[]},refresh:{strokes:[{width:1.7,cap:true,closed:false,points:[4,12,4.343,14.363,5.368,16.52,6.985,18.278,9.048,19.48,11.374,20.021,13.756,19.85,15.981,18.984,17.852,17.5,19.201,15.53,19.909,13.249,19.912,10.861,19.21,8.578,17.865,6.605,15.998,5.116,13.775,4.245,11.393,4.068,9.066,4.602,7,5.8]},{width:1.7,cap:true,closed:false,points:[4,4,4,8,8,8]}],boxes:[],triangles:[],seams:[]},card:{strokes:[{width:1.7,cap:true,closed:false,points:[3,9.5,21,9.5]},{width:1.7,cap:true,closed:false,points:[6.5,15,10.5,15]}],boxes:[{x:3,y:5.5,w:18,h:13,radius:2.2,width:1.7}],triangles:[],seams:[]},alert:{strokes:[{width:1.9,cap:true,closed:true,points:[12,3.5,21.5,20,2.5,20]},{width:1.9,cap:true,closed:false,points:[12,10,12,14.5]},{width:1.9,cap:true,closed:false,points:[12,17.2,12.01,17.2]}],boxes:[],triangles:[],seams:[]},x:{strokes:[{width:2,cap:true,closed:false,points:[6.5,6.5,17.5,17.5]},{width:2,cap:true,closed:false,points:[17.5,6.5,6.5,17.5]}],boxes:[],triangles:[],seams:[]},chat:{strokes:[{width:1.7,cap:false,closed:true,points:[5,5.2,19,5.2,19.8,5.414,20.386,6,20.6,6.8,20.6,15.4,20.386,16.2,19.8,16.786,19,17,10.3,17,5.5,20.6,5.5,17,5,17,4.2,16.786,3.614,16.2,3.4,15.4,3.4,6.8,3.614,6,4.2,5.414,5,5.2]}],boxes:[],triangles:[],seams:[]},repeat:{strokes:[{width:1.8,cap:true,closed:false,points:[4.5,11,4.824,8.824,5.766,6.837,7.244,5.208,9.131,4.077,11.264,3.543,13.461,3.65,15.533,4.391,17.3,5.7,19.5,8]},{width:1.8,cap:true,closed:false,points:[19.5,3.5,19.5,8,15,8]},{width:1.8,cap:true,closed:false,points:[19.5,13,19.176,15.176,18.234,17.163,16.756,18.792,14.869,19.923,12.736,20.457,10.539,20.35,8.467,19.609,6.7,18.3,4.5,16]},{width:1.8,cap:true,closed:false,points:[4.5,20.5,4.5,16,9,16]}],boxes:[],triangles:[],seams:[]},calendar:{strokes:[{width:1.8,cap:true,closed:false,points:[4,10,20,10]},{width:1.8,cap:true,closed:false,points:[8.5,3.5,8.5,7.5]},{width:1.8,cap:true,closed:false,points:[15.5,3.5,15.5,7.5]}],boxes:[{x:4,y:5.5,w:16,h:15,radius:2.5,width:1.8}],triangles:[],seams:[]},flame:{strokes:[],boxes:[],triangles:[[12.15,14.513,13.1,15.2,13.1,13.7],[11.5,13.3,12.15,14.513,13.1,13.7],[16.874,10.907,15.7,9.3,15.381,10.659],[14.7,16.7,16.838,18.516,17.693,16.84],[14.7,16.7,14.489,17.681,16.838,18.516],[18,14.9,14.507,15.633,17.693,16.84],[16.874,10.907,15.381,10.659,14.685,11.707],[17.693,12.759,16.874,10.907,14.685,11.707],[15.538,19.832,16.838,18.516,14.489,17.681],[14.685,11.707,13.959,14.633,17.693,12.759],[17.693,12.759,13.959,14.633,18,14.9],[13.891,20.692,13.055,19.006,12,21],[12,21,12,19.2,10.109,20.692],[8.462,19.832,10.109,20.692,10.659,18.863],[10.659,18.863,9.741,17.97,8.462,19.832],[6.307,16.84,9.602,15.677,6,14.9],[6.273,13.033,6,14.9,9.602,15.677],[9.602,15.677,10.113,14.812,6.273,13.033],[6.988,11.438,6.273,13.033,10.113,14.812],[13.525,7.088,12.856,5.017,12,3.5],[13.856,9.589,13.525,7.088,12,3.5],[13.7,12.4,13.856,9.589,12,3.5],[10.113,14.812,10.792,14.042,6.988,11.438],[14.7,16.7,17.693,16.84,14.507,15.633],[13.7,12.4,13.959,14.633,14.685,11.707],[14.507,15.633,18,14.9,13.959,14.633],[13.1,13.7,13.959,14.633,13.7,12.4],[11.5,13.3,13.1,13.7,13.7,12.4],[7.983,10.048,6.988,11.438,10.792,14.042],[10.792,14.042,11.5,13.3,7.983,10.048],[14.489,17.681,13.913,18.475,15.538,19.832],[13.891,20.692,15.538,19.832,13.913,18.475],[13.891,20.692,13.913,18.475,13.055,19.006],[12,19.2,12,21,13.055,19.006],[10.659,18.863,10.109,20.692,12,19.2],[7.162,18.516,8.462,19.832,9.741,17.97],[9.741,17.97,9.4,16.7,7.162,18.516],[6.307,16.84,7.162,18.516,9.4,16.7],[6.307,16.84,9.4,16.7,9.602,15.677],[9.1,8.8,7.983,10.048,11.5,13.3],[11.5,13.3,13.7,12.4,9.1,8.8],[10.054,7.77,9.1,8.8,13.7,12.4],[10.927,6.683,10.054,7.77,13.7,12.4],[11.613,5.481,10.927,6.683,13.7,12.4],[12.006,4.106,11.613,5.481,13.7,12.4],[12,2.5,12.006,4.106,13.7,12.4],[12,2.5,13.7,12.4,12,3.5]],seams:[[12.15,14.513,13.1,13.7,.121,.428],[11.5,13.3,13.1,13.7,.681,.356],[15.381,10.659,16.874,10.907,.033,.883],[14.7,16.7,16.838,18.516,.648,1.318],[14.7,16.7,17.693,16.84,.648,1.533],[14.489,17.681,16.838,18.516,.51,1.318],[14.507,15.633,18,14.9,.782,1.787],[14.507,15.633,17.693,16.84,.782,1.533],[14.685,11.707,16.874,10.907,.68,.883],[14.685,11.707,17.693,12.759,.61,.484],[14.489,17.681,15.538,19.832,.51,1.115],[13.959,14.633,14.685,11.707,1.333,.576],[13.959,14.633,17.693,12.759,.851,.484],[13.959,14.633,18,14.9,.851,1.787],[13.055,19.006,13.891,20.692,.36,.984],[12,21,13.055,19.006,.945,.395],[12,19.2,12,21,.394,.945],[10.109,20.692,12,19.2,.715,.394],[10.109,20.692,10.659,18.863,.715,.428],[10.659,18.863,8.462,19.832,.428,.809],[8.462,19.832,9.741,17.97,.809,.525],[6.307,16.84,9.602,15.677,1.65,.812],[6,14.9,9.602,15.677,.194,1.012],[6.273,13.033,9.602,15.677,2.068,1.012],[10.113,14.812,6.273,13.033,1.217,2.068],[10.113,14.812,6.988,11.438,1.217,2.2],[12,3.5,13.525,7.088,4.697,5.571],[12,3.5,13.856,9.589,4.697,3.017],[12,3.5,13.7,12.4,4.648,26.765],[10.792,14.042,6.988,11.438,1.339,2.2],[13.7,12.4,13.959,14.633,.819,1.333],[13.1,13.7,13.7,12.4,0,.819],[11.5,13.3,13.7,12.4,.681,.537],[10.792,14.042,7.983,10.048,1.339,2.328],[11.5,13.3,7.983,10.048,1.438,2.328],[13.913,18.475,15.538,19.832,.409,1.115],[13.891,20.692,13.913,18.475,.984,.409],[7.162,18.516,9.741,17.97,.977,.525],[7.162,18.516,9.4,16.7,.977,.677],[6.307,16.84,9.4,16.7,1.65,.677],[11.5,13.3,9.1,8.8,1.438,1.129],[13.7,12.4,9.1,8.8,2.046,1.129],[10.054,7.77,13.7,12.4,.079,2.285],[10.927,6.683,13.7,12.4,.237,3.126],[11.613,5.481,13.7,12.4,.475,5.451],[12.006,4.106,13.7,12.4,.961,15.892],[12,2.5,13.7,12.4,2.974,26.765]]},box:{strokes:[{width:1.7,cap:false,closed:true,points:[3.8,7.8,12,4,20.2,7.8,20.2,16.4,12,20,3.8,16.4]},{width:1.7,cap:false,closed:false,points:[3.8,7.8,12,11.6,20.2,7.8]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20]}],boxes:[],triangles:[],seams:[]},cart:{strokes:[{width:1.8,cap:true,closed:false,points:[2.8,4,5.4,4,7.7,14.6,8.203,15.401,9.1,15.7,17.3,15.7,18.197,15.401,18.7,14.6,20.4,7.6,6.3,7.6]}],boxes:[{x:8.3,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8},{x:15.8,y:18.3,w:2.6,h:2.6,radius:1.3,width:1.8}],triangles:[],seams:[]},minus:{strokes:[{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},plus:{strokes:[{width:2.2,cap:true,closed:false,points:[12,6,12,18]},{width:2.2,cap:true,closed:false,points:[6,12,18,12]}],boxes:[],triangles:[],seams:[]},chev:{strokes:[{width:2,cap:true,closed:false,points:[9,5.5,15.5,12,9,18.5]}],boxes:[],triangles:[],seams:[]},pulse:{strokes:[{width:1.8,cap:true,closed:false,points:[3,12.5,6.8,12.5,9.2,6.9,13.4,17.5,15.8,12.5,21,12.5]}],boxes:[],triangles:[],seams:[]},file:{strokes:[{width:1.7,cap:true,closed:true,points:[7,3.5,14.2,3.5,18.5,7.8,18.5,20,18.324,20.424,17.9,20.6,7,20.6,6.576,20.424,6.4,20,6.4,4.1,6.576,3.676,7,3.5]},{width:1.7,cap:true,closed:false,points:[14,3.6,14,8,18.4,8]},{width:1.7,cap:true,closed:false,points:[9.4,12.4,14.6,12.4]},{width:1.7,cap:true,closed:false,points:[9.4,15.8,14.6,15.8]}],boxes:[],triangles:[],seams:[]},kit:{strokes:[{width:1.7,cap:false,closed:true,points:[4,7.6,12,3.6,20,7.6,20,16.4,12,20.4,4,16.4]},{width:1.7,cap:false,closed:false,points:[4,7.6,12,11.6,20,7.6]},{width:1.7,cap:false,closed:false,points:[12,11.6,12,20.4]}],boxes:[],triangles:[],seams:[]},dna:{strokes:[{width:1.7,cap:true,closed:false,points:[7,3.5,7.28,4.645,8.04,5.594,9.16,6.394,10.52,7.097,12,7.75,13.48,8.403,14.84,9.106,15.96,9.906,16.72,10.855,17,12,16.72,13.145,15.96,14.094,14.84,14.894,13.48,15.597,12,16.25,10.52,16.903,9.16,17.606,8.04,18.406,7.28,19.355,7,20.5]},{width:1.7,cap:true,closed:false,points:[17,3.5,16.72,4.645,15.96,5.594,14.84,6.394,13.48,7.097,12,7.75,10.52,8.403,9.16,9.106,8.04,9.906,7.28,10.855,7,12,7.28,13.145,8.04,14.094,9.16,14.894,10.52,15.597,12,16.25,13.48,16.903,14.84,17.606,15.96,18.406,16.72,19.355,17,20.5]},{width:1.7,cap:true,closed:false,points:[8.6,6.3,15.4,6.3]},{width:1.7,cap:true,closed:false,points:[8.6,17.7,15.4,17.7]},{width:1.7,cap:true,closed:false,points:[10.4,9.6,13.6,9.6]},{width:1.7,cap:true,closed:false,points:[10.4,14.4,13.6,14.4]}],boxes:[],triangles:[],seams:[]},heart:{strokes:[{width:1.8,cap:false,closed:true,points:[12,20.2,11.739,20.035,11.041,19.559,10.03,18.804,8.831,17.799,7.569,16.575,6.37,15.163,5.359,13.593,4.661,11.895,4.4,10.1,4.833,8.454,5.87,7.105,7.349,6.264,9.039,6.062,10.675,6.532,12,7.6,13.325,6.532,14.961,6.062,16.651,6.264,18.13,7.105,19.167,8.454,19.6,10.1,19.339,11.895,18.641,13.593,17.63,15.163,16.431,16.575,15.169,17.799,13.97,18.804,12.959,19.559,12.261,20.035,12,20.2]}],boxes:[],triangles:[],seams:[]},bottle:{strokes:[{width:1.7,cap:false,closed:true,points:[7.2,6.2,16.8,6.2,17.507,6.493,17.8,7.2,17.8,19.5,17.572,20.35,16.95,20.972,16.1,21.2,7.9,21.2,7.05,20.972,6.428,20.35,6.2,19.5,6.2,7.2,6.493,6.493,7.2,6.2]},{width:1.7,cap:false,closed:true,points:[9,11,15,11,15,16,9,16]}],boxes:[{x:8,y:2.8,w:8,h:3.4,radius:1,width:1.7}],triangles:[],seams:[]},harness:{strokes:[{width:1.5,cap:true,closed:false,points:[7.5,4.5,7.728,6.82,8.364,8.708,9.336,10.116,10.572,10.996,12,11.3,13.428,10.996,14.664,10.116,15.636,8.708,16.272,6.82,16.5,4.5]},{width:1.5,cap:true,closed:true,points:[5,12.6,19,12.6,19,17.2,18.692,18.35,17.85,19.192,16.7,19.5,7.3,19.5,6.15,19.192,5.308,18.35,5,17.2]},{width:1.5,cap:true,closed:false,points:[8.2,15.3,15.8,15.3]}],boxes:[{x:10.7,y:8.9,w:2.6,h:2.6,radius:1.3,width:1.5}],triangles:[],seams:[]},ramp:{strokes:[{width:1.5,cap:true,closed:false,points:[2.5,19.5,21.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,19.5,3.5,16.5,8,16.5,8,13.5,12.5,13.5,12.5,10.5,17,10.5,17,7.5,20.5,7.5,20.5,19.5]},{width:1.5,cap:true,closed:false,points:[3.5,16.5,20.5,7.5],opacity:.35}],boxes:[],triangles:[],seams:[]}});var PLAN_LIGHT=/* @__PURE__ */Object.freeze({black:"#000000",onInk:"#FFFFFF",wash:"rgba(38, 37, 35, 0.06)",scrim:"rgba(38, 37, 35, 0.38)",riskChip:"#FFD8D6",clearChip:"#DDEFC4"});function rgb(color){let c=color.trim(),h=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(c);if(h!==null){let x=h[1].length===3?h[1].split("").map(d=>d+d).join(""):h[1];return[0,2,4].map(k2=>parseInt(x.slice(k2,k2+2),16))}let r=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(c);return r===null?null:[Number(r[1]),Number(r[2]),Number(r[3])]}function mixPlanColor(color,share,ground){let a=rgb(color),b=rgb(ground);if(a===null||b===null)return ground;let to=k2=>Math.round(a[k2]*share+b[k2]*(1-share)).toString(16).padStart(2,"0");return`#${to(0)}${to(1)}${to(2)}`.toUpperCase()}function clearOf(color){let c=rgb(color);return c===null?"transparent":`rgba(${c[0]}, ${c[1]}, ${c[2]}, 0)`}function planRoles(theme){let c=theme.color,v=v3Palette(theme),card=v.card,link=v.link;return{ink:v.ink,ink2:v.ink2,ink3:v.ink3,paper:v.paper,tile:v.tile,line:v.line,card:card,riskBg:v.riskBg,riskInk:v.riskInk,riskDot:v.riskDot,clearBg:v.clearBg,clearInk:v.clearInk,clearDot:v.clearDot,watchDot:v.watchDot,...v.dark?{black:c.text.primary,onInk:c.background,wash:mixPlanColor(c.text.primary,.08,c.surface),scrim:"rgba(0, 0, 0, 0.6)",riskChip:c.badgeBgCritical,clearChip:c.badgeBgPositive}:PLAN_LIGHT,primary:v.primary,onPrimary:v.onPrimary,accent:v.accent,accent4:mixPlanColor(c.accent,.17,card),accent3:mixPlanColor(c.accent,.25,card),accentChip:mixPlanColor(c.accent,.47,card),link:link,linkWash:(v.dark?void 0:theme.slots.planWash?.backgroundColor)??mixPlanColor(link,.12,card),linkChip:(v.dark?void 0:theme.slots.planChip?.backgroundColor)??mixPlanColor(link,.2,card)}}var TEXT_KEYS=/* @__PURE__ */new Set(["fontSize","fontWeight","fontFamily","fontStyle","letterSpacing","lineHeight","textTransform","color","textAlign","textDecorationLine","fontVariant"]),DROP=/* @__PURE__ */new Set(["justifyItems"]);function font(theme,family,weight){let w=Number(weight??400);if(family==="serif"){let h=headingFace(theme,"bold");return h.fontWeight===void 0?{fontFamily:h.fontFamily}:{fontFamily:h.fontFamily,fontWeight:String(w)}}let mono=family==="mono",key=w>=650?mono?"monoBold":"bold":w>=450?mono?"monoMedium":"medium":mono?"mono":"regular",f=face(theme,key);return theme.type.namedFaces[key]?{fontFamily:f.fontFamily}:{fontFamily:f.fontFamily,fontWeight:String(w)}}function paintPart(theme,roles,part,dark,line){let box={},text2={},colour=v=>{if(!v.startsWith("$"))return v;let name=v.slice(1);return name.startsWith("n_")?dark?line:`#${name.slice(2)}`:roles[name]??v},rings=[],inner;for(let[key,value]of Object.entries(part))if(!(value===void 0||DROP.has(key)||key==="grid"||key==="fontWeight"))if(key==="fontFamily")Object.assign(text2,font(theme,String(value),part.fontWeight));else if(key==="shadow"){if(value===null)Object.assign(box,{shadowOpacity:0,elevation:0});else if(!dark){let s=value;Object.assign(box,{shadowColor:colour(s.color),shadowOpacity:s.opacity,shadowRadius:s.blur,shadowOffset:{width:s.x,height:s.y},elevation:Math.max(1,Math.round(s.blur/2))})}}else if(key==="inner"){let r=value;inner=r===null?null:{position:"absolute",top:0,right:0,bottom:0,left:0,borderWidth:r.width,borderColor:colour(r.color),pointerEvents:"none"}}else if(key==="ring"){let list=value,radius=typeof part.borderRadius=="number"?part.borderRadius:0;rings=list.map((r,i)=>({borderWidth:r.width-(list[i-1]?.width??0),borderColor:colour(r.color),borderRadius:radius+r.width})).reverse()}else key==="color"||key.endsWith("Color")?(key==="color"?text2:box)[key]=colour(String(value)):(TEXT_KEYS.has(key)?text2:box)[key]=value;part.fontWeight!==void 0&&part.fontFamily===void 0&&Object.assign(text2,font(theme,"sans",part.fontWeight));let outer=rings[0];if(outer!==void 0){let w=part.ring.reduce((m,r)=>Math.max(m,r.width),0),place3={...outer};if(box.position==="absolute"){for(let k2 of["position","zIndex"])box[k2]!==void 0&&(place3[k2]=box[k2]);for(let k2 of["top","right","bottom","left"])typeof box[k2]=="number"&&(place3[k2]=box[k2]-w);for(let k2 of["position","zIndex","top","right","bottom","left"])delete box[k2]}else{for(let k2 of["marginTop","marginRight","marginBottom","marginLeft"])place3[k2]=(typeof box[k2]=="number"?box[k2]:0)-w,delete box[k2];box.alignSelf!==void 0&&(place3.alignSelf=box.alignSelf,delete box.alignSelf)}rings[0]=place3}return{box:box,text:text2,rings:rings,...inner===void 0?{}:{inner:inner},grid:part.grid??[]}}var cache4=/* @__PURE__ */new WeakMap;function planPaint(theme){let hit=cache4.get(theme);if(hit!==void 0)return hit;let roles=planRoles(theme),dark=theme.brightness==="dark",out={roles:roles};for(let[name,part]of Object.entries(DESIGN_RN_PLAN))out[name]=paintPart(theme,roles,part,dark,roles.line);let painted=out;return cache4.set(theme,painted),painted}function gridCell(p,i){let t=p.grid[i];return t===void 0?{}:t==="fr"?{flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0}:t==="auto"?{flexShrink:0}:typeof t=="number"?{width:t,flexShrink:0}:{}}var RADII=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],MARGINS=["margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical"],draws=/* @__PURE__ */new WeakMap;function planDraw(X){let hit=draws.get(X);if(hit!==void 0)return hit;let list=names=>names.filter(n=>typeof n=="string"),draw={bx:(...names)=>list(names).map(n=>X[n].box),im:(...names)=>list(names).map(n=>X[n].box),tx:(...names)=>list(names).map(n=>X[n].text),tb:(...names)=>list(names).flatMap(n=>[X[n].box,X[n].text]),ring:(name,node,place3)=>{let rings=X[name].rings;return rings.length===0?node:rings.reduceRight((child,style,i)=>react.createElement(reactNative.View,{key:i,style:i===0&&place3!==void 0?[style,place3]:style},child),node)},inner:(...names)=>{let ring=null,radius={};for(let n of list(names)){let p=X[n];p.inner!==void 0&&(ring=p.inner);for(let k2 of RADII)p.box[k2]!==void 0&&(radius={...radius,[k2]:p.box[k2]})}return ring===null?null:react.createElement(reactNative.View,{style:[ring,radius]})},ink:(name,fallback)=>typeof X[name].text.color=="string"?X[name].text.color:fallback,side:(name,fallback)=>typeof X[name].box.width=="number"?X[name].box.width:fallback,mod:(base3,kind)=>{if(kind===void 0||kind==="")return null;let name=`${base3}${kind.charAt(0).toUpperCase()}${kind.slice(1)}`;return name!=="roles"&&name in X?name:null},scroll:name=>{let place3={},content={};for(let[k2,v]of Object.entries(X[name].box))(MARGINS.includes(k2)?place3:content)[k2]=v;return{place:place3,content:content}},swipe:(name,inner)=>{let b=X[name].box,share=typeof b.flexBasis=="string"&&b.flexBasis.endsWith("%")?Number(b.flexBasis.slice(0,-1))/100:1,max=typeof b.maxWidth=="number"?b.maxWidth:1/0;return Math.round(Math.min(max,inner*share)*100)/100}};return draws.set(X,draw),draw}var PLAN_PRESS_SCALE=/* @__PURE__ */Object.freeze({button:.97,onButton:.96,jump:.98,opt:.98,add:.98,extraGo:.96,every:.96,askRow:.98,stepper:.9,mode:.98,order:.98,subCard:.96});function pressScale(style,scale,off){return off?style:({pressed:pressed})=>pressed?[style,{transform:[{scale:scale}]}]:style}var ORDER_STEPS=["ordered","shipped","out_for_delivery","delivered"],TRACK_STEP={ordered:0,shipped:1,delivered:3};function hostOrderView(o){let step=Math.max(0,ORDER_STEPS.indexOf(o.status));return{key:o.key,number:o.number??null,step:step,dates:o.dates??[],everfur:false,steps:[0,1,2,3],productId:null,items:o.items.map(x=>({title:x.title,quantity:x.quantity,price:x.price,imageUrl:x.imageUrl??null,icon:x.icon??null})),total:Math.round(o.items.reduce((n,x)=>n+x.price,0)*100)/100,currency:o.currency,subscriptionBox:o.subscriptionBox===true,carrier:o.carrier??null,trackingNumber:o.trackingNumber??null,trackingTag:o.trackingTag??null,trackingUrl:o.trackingUrl??null}}function everfurOrderView(o,items){let it=items.find(x=>x.productId===o.productId),t=o.tracking,quantity=o.quantity??1,total=o.total??Math.round(o.price*quantity*100)/100,step=t===void 0?0:TRACK_STEP[t.status];return{key:o.orderId,number:t?.orderNumber??null,step:step,dates:t===void 0?[o.createdAt??null]:[o.createdAt??null,t.shippedAt,null,step===3?null:t.estimatedDelivery],steps:t===void 0?[0]:[0,1,3],everfur:true,productId:o.productId,items:[{title:o.title??it?.title??"",quantity:quantity,price:total,imageUrl:it?.imageUrl??null,icon:null}],total:total,currency:o.currency,subscriptionBox:false,carrier:t?.carrier??null,trackingNumber:t?.trackingNumber??null,trackingTag:null,trackingUrl:t?.trackingUrl??null}}function formatShopDay(iso,locale,now=/* @__PURE__ */new Date){if(iso==null)return null;let dateOnly=/^\d{4}-\d{2}-\d{2}$/.test(iso),d=new Date(dateOnly?`${iso}T00:00:00Z`:iso);if(Number.isNaN(d.getTime()))return null;let tz=dateOnly?"UTC":void 0,year=Number(new Intl.DateTimeFormat("en-US",{year:"numeric",...tz?{timeZone:tz}:{}}).format(d));try{return new Intl.DateTimeFormat(locale??"en-US",year!==now.getFullYear()?{month:"short",day:"numeric",year:"numeric",...tz?{timeZone:tz}:{}}:{weekday:"short",month:"short",day:"numeric",...tz?{timeZone:tz}:{}}).format(d)}catch{return iso}}function andList(names){return names.length<=1?names[0]??"":`${names.slice(0,-1).join(", ")} and ${names[names.length-1]??""}`}var CENTER={justifyContent:"center"},SHRINK={flexShrink:1},FILL={width:"100%",height:"100%"},WRAP={flexWrap:"wrap"},FULL_ROW={width:"100%",alignSelf:"stretch"},HIT_44={top:2,bottom:2,left:2,right:2},IN_ROW={alignSelf:"auto"},SR_ONLY={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",borderWidth:0},inlineTag=(k2,label,part)=>/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",
|
|
48
77
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:k2.S.D.bx(part),children:/* @__PURE__ */jsxRuntime.jsx(Text,{style:k2.S.D.tx(part),children:label})})]});function shopButton(k2,label,onPress,opts={}){let{S:S}=k2,{bx:bx,tx:tx}=S.D,disabled=opts.disabled===true,part=opts.part??"button";/* @__PURE__ */
|
|
49
78
|
return jsxRuntime.jsx(reactNative.Pressable,{onPress:disabled?void 0:onPress,disabled:disabled,accessibilityRole:"button",accessibilityLabel:label,accessibilityState:{disabled:disabled},style:pressScale(opts.ghost?[S.buttonGhost,disabled?S.disabled:null]:bx(part,disabled&&"buttonDisabled"),PLAN_PRESS_SCALE.button,disabled),...opts.testID?{testID:opts.testID}:{},children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:opts.ghost?S.buttonGhostText:tx(part),children:label})})}function shopLink(k2,label,onPress,testID){let{bx:bx,tx:tx}=k2.S.D;/* @__PURE__ */
|
|
50
79
|
return jsxRuntime.jsx(reactNative.Pressable,{onPress:onPress,accessibilityRole:"button",accessibilityLabel:label,style:[...bx("shopLink"),CENTER],...testID?{testID:testID}:{},children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:tx("shopLink"),children:label})})}function shopRows(k2,rows,inShop=false){if(rows.length===0)return null;let{bx:bx,tx:tx,ink:ink,side:side}=k2.S.D,X=k2.S.X;/* @__PURE__ */
|
|
@@ -94,7 +123,7 @@ return jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>h.onEvery(x.key,d),acce
|
|
|
94
123
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("cartItemActions"),children:[x.subscription?null:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("stepper"),accessibilityLabel:copy.quantityLabel(x.name),children:[inner("stepper"),step(copy.fewer,"minus",x.quantity<=1,()=>h.onQuantity(x.key,-1),`health-plan-fewer-${x.key}`,0),
|
|
95
124
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("stepperValue"),gridCell(X.stepper,1)],accessibilityLiveRegion:"polite",children:String(x.quantity)}),step(copy.more,"plus",x.quantity>=x.maxQuantity,()=>h.onQuantity(x.key,1),`health-plan-more-${x.key}`,2)]}),
|
|
96
125
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.Pressable,{onPress:()=>h.onRemove(x.key),accessibilityRole:"button",accessibilityLabel:copy.remove,hitSlop:HIT_44,style:[...bx("remove"),CENTER],testID:`health-plan-remove-${x.key}`,children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:tx("remove"),children:copy.remove})})]})]})]},x.key))})}),shopSummary(k2,subtotal,{tag:true,renew:renew}),
|
|
97
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("shopActions"),children:shopLink(k2,copy.seeOrders,h.onOrders,"health-plan-cart-orders")})]})}function shopCartCheckout(k2,lines,lineTotal,rows,subtotal,renew,go,
|
|
126
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("shopActions"),children:shopLink(k2,copy.seeOrders,h.onOrders,"health-plan-cart-orders")})]})}function shopCartCheckout(k2,lines,lineTotal,rows,subtotal,renew,go,fine3){let{S:S,copy:copy}=k2,{bx:bx,tx:tx,tb:tb}=S.D,X=S.X;/* @__PURE__ */
|
|
98
127
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("co"),testID:"health-plan-cart-checkout-sheet",children:[
|
|
99
128
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:SR_ONLY,accessibilityRole:"header",testID:"health-plan-cart-checkout-title",children:copy.cartCheckoutTitle}),
|
|
100
129
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("coItems"),children:lines.map(x=>/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("coItem"),children:[
|
|
@@ -102,7 +131,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:bx("co"),testID:"health-plan-cart
|
|
|
102
131
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:gridCell(X.coItem,1),children:[
|
|
103
132
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("coItemStrong"),children:x.name}),
|
|
104
133
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("coItemSmall"),children:x.subscription?copy.cartItemSubscription(x.lp):copy.cartItemQuantity(x.quantity)})]}),
|
|
105
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("coItem","coItemValue"),gridCell(X.coItem,2)],children:lineTotal(x)??""})]},x.key))}),shopRows(k2,rows),shopSummary(k2,subtotal,{renew:renew,inCheckout:true}),shopButton(k2,go.label,go.onPress,{disabled:go.disabled,testID:"health-plan-place-order"}),
|
|
134
|
+
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("coItem","coItemValue"),gridCell(X.coItem,2)],children:lineTotal(x)??""})]},x.key))}),shopRows(k2,rows),shopSummary(k2,subtotal,{renew:renew,inCheckout:true}),shopButton(k2,go.label,go.onPress,{disabled:go.disabled,testID:"health-plan-place-order"}),fine3===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("coFine"),children:fine3})]})}function orderRow(k2,o,fmt,day,onOpen){let{S:S,copy:copy}=k2,{bx:bx,im:im,tx:tx,tb:tb,ink:ink,side:side}=S.D,X=S.X,done=o.step===3,last=o.dates[3]??null,lastDay=day(last),when=done?lastDay===null?null:copy.deliveredOn(lastDay):lastDay===null?null:copy.arrivesBy(lastDay),total=fmt(o.total,o.currency),what=andList(o.items.map(x=>x.title));/* @__PURE__ */
|
|
106
135
|
return jsxRuntime.jsxs(reactNative.Pressable,{onPress:()=>onOpen(o.key),accessibilityRole:"button",accessibilityLabel:what,style:pressScale(bx("order"),PLAN_PRESS_SCALE.order,false),testID:`health-plan-order-${o.key}`,children:[
|
|
107
136
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:gridCell(X.order,0),children:[
|
|
108
137
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("orderTop"),children:[
|
|
@@ -118,7 +147,7 @@ return jsxRuntime.jsxs(reactNative.Pressable,{onPress:()=>onOpen(o.key),accessib
|
|
|
118
147
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{onPress:s.onManage,accessibilityRole:"button",accessibilityLabel:copy.manage,hitSlop:HIT_44,style:pressScale([...bx("subCardButton"),gridCell(X.subCard,2),CENTER],PLAN_PRESS_SCALE.subCard,false),testID:"health-plan-orders-manage",children:[inner("subCardButton"),
|
|
119
148
|
/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"control",style:tx("subCardButton"),children:copy.manage})]})]})]}),a.orders.length>0?/* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[
|
|
120
149
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopKey"),children:copy.ordersHeading(s!==null)}),
|
|
121
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("orderList"),children:a.orders.map(o=>orderRow(k2,o,a.fmt,a.day,a.onOpen))}),a.more&©.moreOrders!==""?shopButton(k2,copy.moreOrders,a.more.onMore,{ghost:true,disabled:a.more.loading,testID:"health-plan-orders-more"}):null,copy.ordersFine===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopFine"),children:copy.ordersFine})]}):null]})}function shopOrderBody(k2,a){let{S:S,copy:copy}=k2,{bx:bx,tx:tx,tb:tb,inner:inner,ink:ink,side:side}=S.D,X=S.X,o=a.order,done=o.step===3,last=o.dates[3]??null,lastDay=a.day(last),sub2=done?lastDay===null?null:copy.deliveredOn(lastDay):lastDay===null?null:copy.arrivesBy(lastDay),steps=(o.steps??(o.everfur?[0,1,2,3].slice(0,o.step+1):[0,1,2,3])).flatMap(i=>{let title=copy.orderSteps[i];if(title===void 0)return[];let d=a.day(o.dates[i]??null);return[i<=o.step?{title:title,state:"done",...d===null?{}:{detail:d}}:{title:title,state:"next",...d===null?{}:{detail:copy.expected(d)}}]}),httpsLink=o.trackingUrl!==null&&/^https:\/\//i.test(o.trackingUrl)?o.trackingUrl:null,linkLabel=httpsLink===null?"":o.carrier!==null?copy.trackOn(o.carrier):copy.trackLink,total=a.fmt(o.total,o.currency)??"",
|
|
150
|
+
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("orderList"),children:a.orders.map(o=>orderRow(k2,o,a.fmt,a.day,a.onOpen))}),a.more&©.moreOrders!==""?shopButton(k2,copy.moreOrders,a.more.onMore,{ghost:true,disabled:a.more.loading,testID:"health-plan-orders-more"}):null,copy.ordersFine===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopFine"),children:copy.ordersFine})]}):null]})}function shopOrderBody(k2,a){let{S:S,copy:copy}=k2,{bx:bx,tx:tx,tb:tb,inner:inner,ink:ink,side:side}=S.D,X=S.X,o=a.order,done=o.step===3,last=o.dates[3]??null,lastDay=a.day(last),sub2=done?lastDay===null?null:copy.deliveredOn(lastDay):lastDay===null?null:copy.arrivesBy(lastDay),steps=(o.steps??(o.everfur?[0,1,2,3].slice(0,o.step+1):[0,1,2,3])).flatMap(i=>{let title=copy.orderSteps[i];if(title===void 0)return[];let d=a.day(o.dates[i]??null);return[i<=o.step?{title:title,state:"done",...d===null?{}:{detail:d}}:{title:title,state:"next",...d===null?{}:{detail:copy.expected(d)}}]}),httpsLink=o.trackingUrl!==null&&/^https:\/\//i.test(o.trackingUrl)?o.trackingUrl:null,linkLabel=httpsLink===null?"":o.carrier!==null?copy.trackOn(o.carrier):copy.trackLink,total=a.fmt(o.total,o.currency)??"",fine3=[copy.ordersFine,o.everfur?copy.orderNote:""].filter(x=>x!=="").join(" ");/* @__PURE__ */
|
|
122
151
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("shop"),testID:"health-plan-order",children:[
|
|
123
152
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopTitle"),accessibilityRole:"header",children:done?copy.orderSteps[3]:copy.orderSteps[0]}),sub2===null?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopSub"),children:sub2}),
|
|
124
153
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("shopCard"),children:shopTrack(k2,steps,copy.tracking)}),o.carrier===null&&o.trackingNumber===null?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("shopCard"),testID:"health-plan-carrier",children:/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[...bx("carrier"),WRAP],children:[
|
|
@@ -134,10 +163,10 @@ return jsxRuntime.jsxs(reactNative.View,{style:bx("shop"),testID:"health-plan-or
|
|
|
134
163
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("cartItemTitle"),children:x.title}),
|
|
135
164
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("cartItemPrice"),children:[
|
|
136
165
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("cartItemPriceValue"),children:a.fmt(x.price,o.currency)??""}),
|
|
137
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("cartItemPriceNote"),children:copy.orderItemLine(x.quantity,o.subscriptionBox)})]})]})]},x.title))})}),shopSummary(k2,total),shopRows(k2,a.rows,true),a.onBuyAgain===null?null:shopButton(k2,copy.buyAgain,a.onBuyAgain,{ghost:true,testID:"health-plan-buy-again"}),a.onHelp===null?null:shopLink(k2,copy.orderHelp,a.onHelp),
|
|
138
|
-
return jsxRuntime.jsx(HealthPlanScrollContext.Provider,{value:value,children:/* @__PURE__ */jsxRuntime.jsx(HealthPlanViewportContext.Provider,{value:viewport,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{ref:origin,style:style,collapsable:false,children:children})})})}function useHealthPlanScroll(){return react.useContext(HealthPlanScrollContext)}function useHealthPlanViewport(){return react.useContext(HealthPlanViewportContext)}var warned=false;function warnConnectedOutsideProvider(isDevelopment){if(warned||!isDevelopment)return;warned=true;let globalConsole=globalThis.console;try{globalConsole?.warn?.("[everfur] A ConnectedHealthPlan* block was drawn outside HealthPlanFocusProvider, so it draws nothing. Wrap it in HealthPlanFocusProvider (or HealthPlanFocus), or use the pure block with your own data.")}catch{}}function healthPlanPetWords(name,sex){let n=name?.trim()??"",named=n===""?"your pet":n,Named=n===""?"Your pet":n;return sex==="female"?{name:named,Name:Named,poss:"her",Poss:"Her",obj:"her"}:sex==="male"?{name:named,Name:Named,poss:"his",Poss:"His",obj:"him"}:{name:named,Name:Named,poss:`${named}'s`,Poss:`${Named}'s`,obj:named}}var cartRenewal=p=>p===null?"":`${p.productName} renews every ${p.intervalDays} days at ${p.box??""} until you cancel; skip or cancel anytime in the app.`,HEALTH_PLAN_NO_SHIP_DAY_COPY=/* @__PURE__ */Object.freeze({onceFine:"",cartFine:cartRenewal,startedWhat:()=>""});function healthPlanFocusCopyFor(pet){let w=healthPlanPetWords(pet.name,pet.sex),nameOf=p=>p.petName?.trim()||w.name,NameOf=p=>p.petName?.trim()||w.Name,copy=/* @__PURE__ */Object.freeze({jumpKicker:(p,subscribed)=>subscribed?`In ${w.poss} plan, every ${p.intervalDays} days`:p.offer?`${p.discountPercent}% off ${w.poss} first box`:p.intervalDays>0?`Ships every ${p.intervalDays} days`:copy.onceLine(p),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:p=>p.offer?`First box, then ${p.box??""}`:`${p.box??""} every ${p.intervalDays} days`,priceLine:p=>p.offer?`${p.discountPercent}% off the first box. Ships every ${p.intervalDays} days.`:p.intervalDays>0?`Ships every ${p.intervalDays} days.`:copy.onceOffer(p),once:"One box",onceLine:p=>p.onceDiscountPercent>0?`${p.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:p=>`Buy one box, ${p.once??p.box??""}`,subscribed:"Subscribed",subscribedLine:(p,next)=>next===null?`Every ${p.intervalDays} days`:`Every ${p.intervalDays} days · next box ${next}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:p=>`Checkout: ${p.productName}`,checkoutOffer:p=>`${p.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:n=>`${n} days`,buyOnceOption:"Buy once",checkoutGo:(_p,subscribe,today)=>`${subscribe?"Subscribe":"Buy now"} · ${today} today`,renews:p=>`Renews every ${p.intervalDays} days at ${p.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:p=>p.onceDiscountPercent>0?`${p.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:p=>`${NameOf(p)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:p=>`${p.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${w.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:q=>q===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${q}`,refill:`A text 3 days before ${w.poss} next box. Reply SKIP to skip it.`,nextBoxShips:p=>`${w.Poss} next box ships, ${p.box??""}.`,startedDone:`Back to ${w.poss} plan`,manageKicker:"Your subscription",manageTitle:p=>`Manage ${p.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(_p,next)=>next===null?"Skipped.":`Skipped. ${w.Poss} next box ships ${next}.`,cancelled:p=>`${p.productName} is cancelled. Restart it from ${w.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:n=>n>0?`Cart, ${n} item${n>1?"s":""}`:"Cart, empty",addToCart:price=>`Add to cart · ${price}`,viewCart:"View cart",addedToCart:(p,subscription)=>`${p.productName} is in your cart${subscription?", as a subscription":""}.`,removedFromCart:name=>`${name} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:p=>`${NameOf(p)}'s plan pick lands here when you add it.`,seeOrders:`See ${w.poss} orders`,quantityLabel:name=>`How many: ${name}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:p=>p.offer?`First box ${p.discountPercent}% off, then ${p.box??""} every ${p.intervalDays} days`:`Every ${p.intervalDays} days`,cartOnceLine:(p,subscribed)=>subscribed?`An extra box. ${w.Poss} plan keeps shipping.`:p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",cartModeLabel:name=>`How to buy ${name}`,cartModeSubscribe:p=>p.offer?`Subscribe, ${p.discountPercent}% off the first box`:"Subscribe",cartModeOnce:p=>p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:p=>`Then ${p.productName}`,renewsEvery:p=>`${p.box??""} every ${p.intervalDays} days`,checkoutCart:total=>`Checkout · ${total}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:p=>`Subscription, every ${p.intervalDays} days`,cartItemQuantity:n=>`Qty ${n}`,placeOrder:(total,subscribe)=>`${subscribe?"Place order and subscribe":"Place order"} · ${total}`,cartFine:p=>`${p===null?"":`${cartRenewal(p)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${w.Poss} subscription`,nextBox:day=>`Next box ${day}`,everyDays:n=>`Every ${n} days`,ordersHeading:afterSubscription=>afterSubscription?"Orders":`${w.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:p=>`The boxes from ${nameOf(p)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:n=>n===null?"Order":`Order ${n}`,arrivesBy:day=>`Arrives by ${day}`,deliveredOn:day=>`Delivered ${day}`,expected:day=>`Expected ${day}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:carrier=>`Track on ${carrier}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(n,box)=>`Qty ${n}${box?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${w.poss} weight to size ${w.poss} dose`,addWeightBody:`From a home scale or ${w.poss} last vet visit.`,connectRecordsTitle:`Connect ${w.poss} vet records`,connectRecordsBody:`${w.Poss} weight, visits and labs make ${w.poss} plan sharper.`,weightKicker:`${w.Poss} weight`,weightTitle:p=>`Add ${nameOf(p)}'s weight`,weightBody:`From a home scale or ${w.poss} last vet visit. ${w.Poss} plan uses it to size ${w.poss} dose.`,weightField:`${w.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${w.poss} weight in pounds, like 14.1.`,weightSave:`Save ${w.poss} weight`,weightSaved:lb=>`Saved: ${lb} lb. ${w.Poss} dose is sized for ${w.obj}.`,weightSavedKg:kg=>`Saved: ${kg} kg. ${w.Poss} dose is sized for ${w.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:vet=>`Built with ${vet}`,fromVet:shortName=>`From ${shortName}`,waitVetTips:vet=>`Free tips from ${vet}, built around that risk`,signalsFit:count=>`${count} of ${count} signals fit ${w.Name}`,signalsValue:count=>`${count}/${count}`,noPick:`No supplement for this one. ${w.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${w.poss} next checkup`,savedForCheckup:`Saved for ${w.poss} next checkup`,blanksLabel:`${w.Poss} three blanks`,blanksAsked:clinic=>`Asked ${clinic}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${w.poss} vet records`,blanksFilled:(filled2,total)=>`${filled2} of ${total} filled`,blanksWeight:`Keep ${w.obj} at `,blanksWeightSource:`From ${w.poss} vet visits`,blanksDose:(dose,product)=>`${dose} of ${product}`,blanksDoseSource:`Sized to ${w.poss} weight`,blanksShots:`${w.Poss} next shots are due `,blanksShotsSource:`From ${w.poss} clinic`,blankEmpty:"blank",recordsLanded:`${w.Poss} records are in. ${w.Poss} plan now uses ${w.poss} weight and ${w.poss} visits.`,todayLabel:`${w.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${w.poss} report`,askReport:"Ask about it",fullOpen:`See ${w.poss} full plan`,fullOpenLine:`${w.Poss} vet, reviews and ${w.poss} checkup`,fullClose:`Show ${w.poss} brief plan`,fullCloseLine:`${w.Poss} risk, tips, pick and signs`,hopeNoted:phrases=>`Noted. When ${w.poss} results land, we'll start with ${phrases}.`,productLink:product=>`${product}, see the product`,productPhotos:product=>`${product} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${w.name}`,ratingLine:count=>`· ${count} reviews`,productOffer:p=>`${p.discountPercent}% off ${w.poss} first box`,productEvery:p=>`Every ${p.intervalDays} days`,productOnce:p=>p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:p=>`On ${w.poss} plan, every ${p.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:count=>`${count} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:count=>`Read all ${count} reviews`,starsLabel:rating=>`${rating} out of 5 stars`,buyNow:"Buy now"});return copy}var HEALTH_PLAN_FOCUS_COPY=healthPlanFocusCopyFor({sex:"female"});function formatHealthPlanDay(iso,locale){if(iso===null||!/^\d{4}-\d{2}-\d{2}$/.test(iso))return null;let d=/* @__PURE__ */new Date(`${iso}T00:00:00Z`);if(Number.isNaN(d.getTime()))return null;try{return new Intl.DateTimeFormat(locale??"en-US",{month:"short",day:"numeric",timeZone:"UTC"}).format(d)}catch{return iso}}var HEALTH_PLAN_ORDERS_EMPTY=/* @__PURE__ */Object.freeze({loaded:false,orders:[],next:null,loading:false});function pushHealthPlanScreen(prev,screen){return[...prev.filter(x=>x.kind!==screen.kind),screen]}function healthPlanOverlayOf(sheet,started,top){return sheet!==null?sheet.kind:healthPlanUnderOf(started,top)}function healthPlanUnderOf(started,top){return started!==null?"started":top!==void 0?top.kind:null}function mergeHealthPlanOrders(recent,loaded){let seen=/* @__PURE__ */new Set;return[...recent,...loaded].filter(o=>seen.has(o.orderId)?false:(seen.add(o.orderId),true))}function addRecentHealthPlanOrders(prev,orders){return[...orders,...prev.filter(o=>!orders.some(x=>x.orderId===o.orderId))]}function appendHealthPlanOrderPage(prev,page){return{loaded:true,orders:[...prev.orders,...page.orders.filter(o=>!prev.orders.some(x=>x.orderId===o.orderId))],next:page.nextCursor,loading:false}}function healthPlanOrderNumber(key,everfurOrders,hostOrders){if(key===null)return null;let own=everfurOrders.find(o=>o.orderId===key);return own!==void 0?own.tracking?.orderNumber??null:hostOrders.find(o=>o.key===key)?.number??null}function editHealthPlanCartLine(prev,productId,f){return prev.flatMap(x=>x.productId!==productId?[x]:f(x)??[])}async function readHealthPlanOrders(repo,petRef,cursor){if(repo.listOneBoxOrderPage!==void 0)return repo.listOneBoxOrderPage(petRef,{limit:20,...cursor===null?{}:{cursor:cursor}});if(cursor!==null||repo.listOneBoxOrders===void 0)return{ok:true,value:{orders:[],nextCursor:null}};let res=await repo.listOneBoxOrders(petRef);return res.ok?{ok:true,value:{orders:res.value,nextCursor:null}}:res}function isHealthPlanInvalidCursor(error){if(error.httpStatus!==422)return false;let raw=error.raw!==null&&typeof error.raw=="object"?error.raw:null;return[error.reasonCode,error.wireMessage,raw?.detail,raw?.message].some(x=>x==="invalid_cursor")}var roundCents=n=>Math.round(n*100)/100;function useHealthPlanSubscriptionRepository(){let{runtime:runtime}=useEverfurContext();return react.useMemo(()=>createHealthPlanSubscriptionRepository(runtime),[runtime])}function useHealthPlanSubscription(options){let{userRef:userRef}=useEverfurContext(),own=useHealthPlanSubscriptionRepository(),repository=options.repository??own,enabled=options.enabled!==false&&userRef!==null&&options.petRef!==null&&options.productId!==null,{petRef:petRef,productId:productId}=options,[phase,setPhase]=react.useState("idle"),[quote,setQuote]=react.useState(null),[subscription,setSubscription]=react.useState(null),[busy,setBusy]=react.useState(false),[error,setError]=react.useState(null),[readyAt,setReadyAt]=react.useState(null),epoch=react.useRef(0),writes=react.useRef(0),quiet=react.useRef(0),busyRef=react.useRef(false),refreshAfterWrite=react.useRef(false),revalidateRef=react.useRef(()=>Promise.resolve()),load=react.useCallback(async()=>{let mine=++epoch.current;if(refreshAfterWrite.current=false,setReadyAt(null),!enabled||petRef===null||productId===null){setPhase("idle"),setQuote(null),setSubscription(null);return}setPhase("loading");let res=await repository.quote(petRef,productId);if(mine===epoch.current){if(!res.ok){setQuote(null),setSubscription(null),setError(res.error),setPhase(isHealthPlanSubscriptionUnavailable(res.error)?"unavailable":"failed");return}setError(null),setQuote(res.value),setSubscription(res.value.subscription),setPhase("ready"),setReadyAt(Date.now())}},[enabled,petRef,productId,repository]),ready=enabled&&phase==="ready",revalidate=react.useCallback(async()=>{if(!ready||busyRef.current||petRef===null||productId===null)return;let mine=epoch.current,wrote=writes.current,seq=++quiet.current,res=await repository.quote(petRef,productId);mine!==epoch.current||wrote!==writes.current||seq!==quiet.current||busyRef.current||!res.ok||(setQuote(res.value),setSubscription(res.value.subscription),setReadyAt(Date.now()))},[ready,petRef,productId,repository]);revalidateRef.current=revalidate;let refreshOnKey=()=>{if(!ready){load();return}if(busyRef.current){refreshAfterWrite.current=true;return}revalidate()};useHealthPlanRevalidation({lifecycle:options.lifecycle,refreshKey:options.refreshKey,readyAt:ready?readyAt:null,revalidate:()=>{revalidate()},refresh:refreshOnKey});let settleWrite=react.useCallback(()=>{refreshAfterWrite.current&&(refreshAfterWrite.current=false,revalidateRef.current())},[]);react.useEffect(()=>(load(),()=>{epoch.current+=1}),[load]);let write2=react.useCallback(async run2=>{let mine=epoch.current;writes.current+=1,busyRef.current=true,setBusy(true);let res=await run2();return busyRef.current=false,mine!==epoch.current?res:(setBusy(false),res.ok?(setError(null),setSubscription(res.value),settleWrite(),res):(setError(res.error),isHealthPlanSubscriptionUnavailable(res.error)?setPhase("unavailable"):settleWrite(),res))},[settleWrite]),buy=react.useCallback(async tapKey=>{let mine=epoch.current;writes.current+=1,busyRef.current=true,setBusy(true);let res=await repository.buyOneBox(petRef,productId,tapKey);return busyRef.current=false,mine!==epoch.current?res:(setBusy(false),res.ok?(setError(null),load(),res):(setError(res.error),isHealthPlanSubscriptionUnavailable(res.error)?setPhase("unavailable"):settleWrite(),res))},[repository,petRef,productId,load,settleWrite]);return react.useMemo(()=>{let p=petRef,sid=subscription?.subscriptionId??"",none=()=>Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false,wireMessage:"the subscription quote is not ready"})));return{phase:phase,quote:quote,subscription:subscription,busy:busy,error:error,subscribe:n=>ready&&productId!==null?write2(()=>repository.create(p,productId,n)):none(),changeInterval:n=>ready&&sid!==""?write2(()=>repository.changeInterval(p,sid,n)):none(),skip:()=>ready&&sid!==""?write2(()=>repository.skip(p,sid)):none(),cancel:()=>ready&&sid!==""?write2(()=>repository.cancel(p,sid)):none(),restart:n=>ready&&sid!==""?write2(()=>repository.restart(p,sid,n)):none(),buyOneBox:k2=>ready&&productId!==null?buy(k2):none(),refresh:load}},[phase,quote,subscription,busy,error,ready,petRef,productId,repository,write2,buy,load])}var LB_PER_KG=2.20462262;function healthPlanWeightForSave(entered,inKg){return{weightKg:inKg?entered:Math.round(entered/LB_PER_KG*100)/100,pounds:inKg?Math.round(entered*LB_PER_KG*10)/10:entered}}var SIGNALS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),signalHost=globalThis;function isSignalState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.landed instanceof Set&&v.noVet instanceof Set&&v.noVetByPet instanceof Map}var stored=signalHost[SIGNALS_SYMBOL],fresh=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),state=isSignalState(stored)?stored:signalHost[SIGNALS_SYMBOL]=fresh(),landedListeners=state.landed,noVetListeners=state.noVet,noVetByPet=state.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,source="host"){for(let listener of[...landedListeners])try{listener(petRef,source)}catch{}}function onHealthPlanRecordsLanded(listener){return landedListeners.add(listener),()=>{landedListeners.delete(listener)}}function setHealthPlanNoVet(petRef,noVet){if((noVetByPet.get(petRef)??false)!==noVet){noVet?noVetByPet.set(petRef,true):noVetByPet.delete(petRef);for(let listener of[...noVetListeners])try{listener(petRef,noVet)}catch{}}}function healthPlanNoVet(petRef){return noVetByPet.get(petRef)??false}function onHealthPlanNoVet(listener){return noVetListeners.add(listener),()=>{noVetListeners.delete(listener)}}function useHealthPlanBlanksLanding(options){let{petRef:petRef,noVet:noVetOverride,blanksFacts:blanksFacts,store:store,say:say,line:line}=options,[storeNoVet,setStoreNoVet]=react.useState(()=>healthPlanNoVet(petRef));react.useEffect(()=>(setStoreNoVet(healthPlanNoVet(petRef)),onHealthPlanNoVet((pet,none)=>{pet===petRef&&setStoreNoVet(none)})),[petRef]);let noVet=noVetOverride??storeNoVet,[flashKey,setFlashKey]=react.useState(null),hostSaid=react.useRef(false);react.useEffect(()=>(hostSaid.current=false,onHealthPlanRecordsLanded((pet,source)=>{pet===petRef&&source==="host"&&(hostSaid.current=true)})),[petRef]);let blanksPhase=blanksFacts?.phase??null,blanksId=blanksFacts?.requestId??null,landed=react.useRef({say:say,line:line});return landed.current={say:say,line:line},react.useEffect(()=>{if(blanksId===null)return;let live=true,run2=()=>{let memo=store.readBlanksMemo(petRef);if(blanksPhase==="wait"){memo.waited!==blanksId&&store.writeBlanksMemo(petRef,{...memo,waited:blanksId});return}!live||memo.flashed===blanksId||(store.writeBlanksMemo(petRef,{...memo,flashed:blanksId}),!(memo.waited!==blanksId&&!hostSaid.current)&&(hostSaid.current=false,setFlashKey(blanksId),landed.current.line!==""&&landed.current.say(landed.current.line),notifyHealthPlanRecordsLanded(petRef,"plan")))};return store.loadBlanksMemo===void 0?run2():store.loadBlanksMemo(petRef).then(run2),()=>{live=false}},[blanksPhase,blanksId,petRef,store]),{noVet:noVet,flashKey:flashKey}}function useHealthPlanOrdersList(options){let{shop:shop,ordersOpen:ordersOpen,subsRepo:subsRepo,petRef:petRef,everfurOrders:everfurOrders,setEverfurOrders:setEverfurOrders,say:say}=options,ordersLive=react.useRef(false),loadingMore=react.useRef(false),sayRef=react.useRef(say);return sayRef.current=say,react.useEffect(()=>{if(!shop||!ordersOpen)return;let live=true;return ordersLive.current=true,readHealthPlanOrders(subsRepo,petRef,null).then(res=>{live&&(res.ok?setEverfurOrders({loaded:true,orders:res.value.orders,next:res.value.nextCursor,loading:false}):(setEverfurOrders(prev=>({...prev,loaded:true,loading:false})),sayRef.current(res.error.displayMessage)))}),()=>{live=false,ordersLive.current=false}},[shop,ordersOpen,petRef,subsRepo]),{moreOrders:()=>{let cursor=everfurOrders.next;cursor===null||loadingMore.current||(loadingMore.current=true,setEverfurOrders(prev=>({...prev,loading:true})),readHealthPlanOrders(subsRepo,petRef,cursor).then(async res=>{let again=!res.ok&&isHealthPlanInvalidCursor(res.error)?await readHealthPlanOrders(subsRepo,petRef,null):null;if(loadingMore.current=false,!!ordersLive.current){if(again!==null){again.ok?setEverfurOrders({loaded:true,orders:again.value.orders,next:again.value.nextCursor,loading:false}):(setEverfurOrders(prev=>({...prev,next:null,loading:false})),sayRef.current(again.error.displayMessage));return}if(res.ok){let page=res.value;setEverfurOrders(prev=>appendHealthPlanOrderPage(prev,page))}else setEverfurOrders(prev=>({...prev,loading:false})),sayRef.current(res.error.displayMessage)}}))}}}var KG_MIN=.5,KG_MAX=90,LB_MIN=1,LB_MAX=200,TOAST_MS=2600,GLOBAL_CLOCK={setTimeout:(fn,ms)=>setTimeout(fn,ms),clearTimeout:handle=>clearTimeout(handle)};function useHealthPlanFocus(options,copy,ports,rules){let{design:design,item:item,petRef:petRef,petName:petName,locale:locale}=options,{store:store,callHost:callHost2}=ports,clock=ports.clock??GLOBAL_CLOCK,telemetry=useHealthPlanTelemetry(),{runtime:runtime}=useEverfurContext(),sub=useHealthPlanSubscription({petRef:petRef,productId:item.productId,enabled:options.subscriptions!==false&&design.pick.none!==true,...options.subscriptionRepository?{repository:options.subscriptionRepository}:{},...options.lifecycle!==void 0?{lifecycle:options.lifecycle}:{},...options.refreshKey!==void 0?{refreshKey:options.refreshKey}:{}}),[mode,setMode]=react.useState("sub"),[added,setAdded]=react.useState(false),[extras,setExtras]=react.useState(()=>/* @__PURE__ */new Set),[sheet,setSheet]=react.useState(null),[started,setStarted]=react.useState(null),tapKey=react.useRef(null),[toast,setToast]=react.useState(null),toastTimer=react.useRef(null),clockRef=react.useRef(clock);clockRef.current=clock,react.useEffect(()=>()=>{toastTimer.current!==null&&clockRef.current.clearTimeout(toastTimer.current)},[]);let withTracking=line=>[line,copy.trackingComesByText].filter(x=>x!=="").join(" "),say=line=>{rules.dropEmptyToast&&line===""||(setToast(line),toastTimer.current!==null&&clock.clearTimeout(toastTimer.current),toastTimer.current=clock.setTimeout(()=>setToast(null),TOAST_MS))},everfur=options.checkout==="everfur_stripe"&&rules.checkoutReachable,ownPages=useHealthPlanPageRepository(),pages=options.pageRepository??ownPages,checkoutTap=react.useRef(null),[redirecting,setRedirecting]=react.useState(false),shop=options.shop??everfur,[cart,setCartState]=react.useState(()=>shop?store.readCart(petRef):[]),cartRef=react.useRef(cart);react.useEffect(()=>{if(!shop||store.loadCart===void 0)return;let live=true;return store.loadCart(petRef).then(()=>{if(!live)return;let kept=store.readCart(petRef);cartRef.current.length===0&&kept.length>0&&(cartRef.current=kept,setCartState(kept))}),()=>{live=false}},[shop,store,petRef]);let setCart=react.useCallback(f=>{let next=f(cartRef.current);cartRef.current=next,store.writeCart(petRef,next),setCartState(next)},[petRef,store]),[screens,setScreens]=react.useState([]),ownSubs=useHealthPlanSubscriptionRepository(),subsRepo=options.subscriptionRepository??ownSubs,[everfurOrders,setEverfurOrders]=react.useState(HEALTH_PLAN_ORDERS_EMPTY),[cartOff,setCartOff]=react.useState(false),[weightSaved,setWeightSaved]=react.useState(false),[recent,setRecent]=react.useState([]),others=options.others??[],planItems=[item,...others],ownOrders=mergeHealthPlanOrders(recent,everfurOrders.orders),hostOrders=options.shopOrders??[],orderNumber=key=>healthPlanOrderNumber(key,ownOrders,hostOrders),push=react.useCallback(screen=>{setSheet(null),setScreens(prev=>pushHealthPlanScreen(prev,screen))},[]),top=screens.length>0?screens[screens.length-1]:void 0,overlay2=healthPlanOverlayOf(sheet,started,top),under=healthPlanUnderOf(started,top),closeOverlays=react.useCallback(()=>{setSheet(null),setStarted(null),setScreens([])},[]),back=react.useCallback(()=>{sheet!==null?setSheet(null):started!==null?setStarted(null):setScreens(prev=>prev.slice(0,-1))},[sheet,started]),title=(o=>{switch(o){case"started":return started?.kind==="once"?copy.placedHeader:copy.startedHeader;case"cart":return copy.cartTitle;case"placed":return copy.placedHeader;case"orders":return copy.orders;case"order":return copy.orderTitle(orderNumber(top?.kind==="order"?top.key:null));case"product":{let id=top?.kind==="product"?top.productId:null;return id===null?void 0:planItems.find(x=>x.productId===id)?.title}default:return}})(under),full=under==="started"||under==="cart"||under==="placed"||under==="product",onOverlayChange=options.onOverlayChange,callHostRef=react.useRef(callHost2);callHostRef.current=callHost2,react.useEffect(()=>{onOverlayChange!==void 0&&callHostRef.current(onOverlayChange,overlay2,{close:closeOverlays,back:back,...title===void 0?{}:{title:title},...full?{full:full}:{}})},[overlay2,onOverlayChange,closeOverlays,back,title,full]);let quote=sub.phase==="ready"?sub.quote:null,subscription=sub.subscription,active=subscription?.status==="active",pickPriced=(quote?.boxPrice??item.price)!==null,canSubscribe=quote!==null&&(!rules.subscribeNeedsPrice||pickPriced),offer=canSubscribe&"e.offerApplies&&subscription===null,every=active?subscription.intervalDays:canSubscribe?quote.defaultIntervalDays:0,fmt=(n,currency2)=>formatHealthPlanPriceWith(n,currency2,{dropZeroCents:false,...options.priceFormat,...locale?{locale:locale}:{}}),fmtWhole=(n,currency2)=>formatHealthPlanPriceWith(n,currency2,{dropZeroCents:true,...options.priceFormat,...locale?{locale:locale}:{}}),currency=quote?.currency??item.currency,boxPrice=quote?.boxPrice??item.price,oneBox=quote?.oneBox??null,prices=(days,productName=item.title)=>({petName:petName,productName:productName,first:fmt(offer&"e?quote.firstBoxPrice:boxPrice,currency),box:fmt(boxPrice,currency),once:fmt(oneBox?.price??boxPrice,currency),onceDiscountPercent:oneBox?.discountPercent??0,intervalDays:days,discountPercent:offer&"e?quote.firstBoxDiscountPercent:0,offer:offer}),pr=prices(every),priced=pr.box!==null,buyMode=canSubscribe?mode:"once",day=iso=>formatHealthPlanDay(iso,locale),nextBoxDay=s=>day(s.timeline.find(step=>step.step==="next_box_ships")?.on??s.nextBoxDate),buyOnce=(target=item)=>{options.onBuy?callHost2(options.onBuy,target):options.onCheckout&&callHost2(options.onCheckout,[target])},partnerBuys=options.onBuy!==void 0||options.onCheckout!==void 0,settle=res=>res.ok?(options.onSubscriptionChange&&callHost2(options.onSubscriptionChange,res.value),res.value):(say(res.error.displayMessage),null),redirect=async(purchase,intervalDays,target=item)=>{if(redirecting)return;let urls=ports.returnUrls();if(urls===null)return;let sig=`${target.productId}:${purchase}:${intervalDays??""}`;checkoutTap.current?.sig!==sig&&(checkoutTap.current={sig:sig,key:ports.mintKey()}),setRedirecting(true);let res=await pages.startCheckout(petRef,{productId:target.productId,purchase:purchase,...intervalDays===null?{}:{intervalDays:intervalDays},...urls},checkoutTap.current.key);if(setRedirecting(false),!res.ok){say(res.error.displayMessage);return}store.rememberCheckout(petRef,res.value.checkoutId),ports.openUrl(res.value.url)},itemOf2=productId=>planItems.find(x=>x.productId===productId),inCart=productId=>cart.find(x=>x.productId===productId),isPick=productId=>productId===item.productId,lineSub=x=>isPick(x.productId)&&canSubscribe&&!active&&x.mode==="sub",unitOf=x=>isPick(x.productId)?lineSub(x)?offer&"e?quote.firstBoxPrice:boxPrice:oneBox?.price??boxPrice:itemOf2(x.productId)?.price??null,lines=cart.filter(x=>itemOf2(x.productId)!==void 0),lineCount=lines.reduce((n,x)=>n+x.qty,0),cartTotal=roundCents(lines.reduce((n,x)=>n+(unitOf(x)??0)*x.qty,0)),subLine=lines.find(lineSub)??null,cartOn=everfur&&!cartOff&&pages.startCartCheckout!==void 0,hostLines=!everfur&&options.onCheckoutLines!==void 0,boxesOn=cartOn||hostLines,wasOf=(was,cur)=>{let m=/^[^\d]*(\d+(?:\.\d{1,2})?)[^\d]*$/.exec(was.replace(/,/g,""));return(m?fmt(Number(m[1]),cur??currency):null)??was},lineView=x=>{let it=itemOf2(x.productId)??item,subbed=lineSub(x),pick2=isPick(x.productId),ex=pick2||!rules.linesFromExtras?void 0:design.extras?.items.find(e=>e.productId===x.productId),lp=pick2?prices(x.every,it.title):{...prices(0,it.title),offer:false};return{key:x.productId,name:it.title,imageUrl:it.imageUrl??ex?.imageUrl??null,quantity:x.qty,subscription:subbed,price:fmt(unitOf(x),pick2?currency:it.currency),was:pick2?subbed?offer?lp.box:null:oneBox!==null&&boxPrice!==null&&oneBox.price<boxPrice?lp.box:null:ex?.was?wasOf(ex.was,it.currency):null,note:pick2?subbed?copy.cartSubLine(lp):copy.cartOnceLine(lp,active):null,...rules.linesFromExtras?{tag:ex?.tag??null}:{},modes:pick2&&canSubscribe&&!active?{label:copy.cartModeLabel(it.title),sub:{label:copy.cartModeSubscribe(lp),price:lp.first},once:{label:copy.cartModeOnce(lp),price:lp.once}}:null,every:subbed&"e!==null?{options:quote.intervalOptions,selected:x.every}:null,maxQuantity:boxesOn&&!subbed?5:1,lp:lp}},views=lines.map(lineView),renewPrices=subLine===null?null:prices(subLine.every),addToCart=(target,m,qty=1,quiet=false)=>{if(inCart(target.productId)){push({kind:"cart"});return}let subbing=isPick(target.productId)&&canSubscribe&&!active&&m==="sub",boxes=subbing?1:Math.max(1,Math.min(boxesOn?5:1,qty));setCart(prev=>[...prev,{productId:target.productId,mode:subbing?"sub":"once",every:quote?.defaultIntervalDays??0,qty:boxes}]),quiet||say(copy.addedToCart(isPick(target.productId)?pr:{...prices(0,target.title),offer:false},subbing))},showCart=()=>setScreens(prev=>{let at=prev.findIndex(x=>x.kind==="cart");return at>=0?prev.slice(0,at+1):[...prev,{kind:"cart"}]}),editLine=(productId,f)=>setCart(prev=>editHealthPlanCartLine(prev,productId,f)),stepQuantity=(productId,by)=>editLine(productId,x=>({...x,qty:Math.max(1,Math.min(boxesOn&&!lineSub(x)?5:1,x.qty+by))})),removeLine=productId=>{editLine(productId,()=>null),say(copy.removedFromCart(itemOf2(productId)?.title??""))},apart=cartOn&&subLine!==null&&lines.length>1,batch=apart?lines.filter(x=>!lineSub(x)):lines,batchTotal=roundCents(batch.reduce((n,x)=>n+(unitOf(x)??0)*x.qty,0)),batchSub=batch.find(lineSub)??null,batchRenew=batchSub===null?null:prices(batchSub.every),cartReady=lines.length>0&&lines.every(x=>unitOf(x)!==null)&&(lines.length===1&&(lines[0]?.qty??0)===1?true:cartOn?batch.length>0&&batch.length<=10:!everfur&&(options.onCheckout!==void 0||hostLines)&&lines.every(x=>!lineSub(x))),redirectCart=async batchLines=>{if(redirecting||pages.startCartCheckout===void 0)return;let urls=ports.returnUrls();if(urls===null)return;let sig=`cart:${batchLines.map(x=>`${x.productId}:${x.qty}:${lineSub(x)?x.every:""}`).join("|")}`;checkoutTap.current?.sig!==sig&&(checkoutTap.current={sig:sig,key:ports.mintKey()}),setRedirecting(true);let res=await pages.startCartCheckout(petRef,{items:batchLines.map(x=>{let subbing=lineSub(x);return{productId:x.productId,purchase:subbing?"subscription":"one_box",...subbing?{intervalDays:x.every}:{},quantity:subbing?1:x.qty}}),...urls},checkoutTap.current.key);if(setRedirecting(false),!res.ok){let why=healthPlanCheckoutRefusal(res.error);if(why==="cart_disabled"){setCartOff(true),setSheet(null),say(copy.cartOneAtATime===""?res.error.displayMessage:copy.cartOneAtATime);return}if(why==="cart_has_subscription"){setSheet(null),say(copy.cartSubscriptionApart===""?res.error.displayMessage:copy.cartSubscriptionApart);return}say(res.error.displayMessage);return}store.rememberCheckout(petRef,res.value.checkoutId),ports.openUrl(res.value.url)},orderOneBox=async()=>{tapKey.current===null&&(tapKey.current=ports.mintKey());let res=await sub.buyOneBox(tapKey.current);return res.ok?(tapKey.current=null,options.onOneBoxOrder&&callHost2(options.onOneBoxOrder,res.value),res.value):(say(res.error.displayMessage),null)},placeCart=async()=>{if(!cartReady)return;if(everfur&&cartOn&&!(batch.length===1&&(batch[0]?.qty??0)===1)){batch.map(x=>itemOf2(x.productId)).filter(x=>x!==void 0);trackCheckoutStarted(telemetry,petRef,{count:batch.reduce((n,x)=>n+x.qty,0),subtotal:batchTotal,currency:currency}),await redirectCart(batch);return}if(hostLines&&!(lines.length===1&&(lines[0]?.qty??0)===1)){let handed=lines.flatMap(x=>{let it=itemOf2(x.productId);return it===void 0?[]:[{item:it,quantity:x.qty}]});trackCheckoutStarted(telemetry,petRef,{items:handed.map(x=>x.item),count:handed.reduce((n,x)=>n+x.quantity,0),subtotal:cartTotal,currency:currency}),bought(lines.map(x=>x.productId)),setSheet(null),setScreens([]),options.onCheckoutLines&&callHost2(options.onCheckoutLines,handed);return}let only=batch.length===1?batch[0]:lines.length===1?lines[0]:void 0;if(only===void 0){options.onCheckout&&callHost2(options.onCheckout,lines.map(x=>itemOf2(x.productId)).filter(x=>x!==void 0));return}let target=itemOf2(only.productId)??item,subbing=lineSub(only);if(trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:unitOf(only),currency:isPick(only.productId)?currency:target.currency}),everfur){await redirect(subbing?"subscription":"one_box",subbing?only.every:null,target);return}if(subbing){let s=settle(await sub.subscribe(only.every));if(s===null)return;bought([s.productId]),setSheet(null),setScreens([]),setStarted({kind:"sub",sub:s});return}if(!isPick(only.productId)||oneBox===null){setSheet(null),hostLines&&(bought([only.productId]),setScreens([])),buyOnce(target);return}let o=await orderOneBox();o!==null&&(bought([o.productId]),placed([o]))},press=()=>{if(trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:item.price,currency:item.price===null?null:item.currency}),!canSubscribe){everfur?redirect("one_box",null):buyOnce();return}tapKey.current=null,setSheet({kind:"checkout",mode:buyMode,every:quote.defaultIntervalDays})},pressOther=target=>{trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:target.price,currency:target.price===null?null:target.currency}),everfur?redirect("one_box",null,target):buyOnce(target)},confirmCheckout=async()=>{if(sheet?.kind!=="checkout")return;let isSub=sheet.mode==="sub";if(everfur){await redirect(isSub?"subscription":"one_box",isSub?sheet.every:null);return}if(!isSub){if(oneBox===null){setSheet(null),buyOnce();return}let o=await orderOneBox();if(o===null)return;setSheet(null),placed([o]);return}let s=settle(await sub.subscribe(sheet.every));s!==null&&(setSheet(null),setStarted({kind:"sub",sub:s}))},changeInterval=d=>{subscription===null||d===subscription.intervalDays||sub.changeInterval(d).then(settle)},skip=async()=>{let s=settle(await sub.skip());s!==null&&say(copy.skipped(prices(s.intervalDays),nextBoxDay(s)))},cancel=async()=>{let mp=prices(subscription?.intervalDays??every);settle(await sub.cancel())!==null&&(setSheet(null),setMode("sub"),say(copy.cancelled(mp)))},seeOrdersFromManage=()=>{setSheet(null),top?.kind!=="orders"&&push({kind:"orders"})},toggleAdded=questions=>{let next=!added;setAdded(next),options.onAddToVisit&&callHost2(options.onAddToVisit,next,questions)},toggleExtra=(key,on)=>{let next=!on;setExtras(prev=>{let out=new Set(prev);return next?out.add(key):out.delete(key),out}),options.onExtra&&callHost2(options.onExtra,key,next)},pressExtra=(key,product,on)=>{if(product!==void 0){shop?addToCart(product,"once"):pressOther(product);return}toggleExtra(key,on)},ordersOpen=screens.some(x=>x.kind==="orders"||x.kind==="order"),{moreOrders:moreOrders}=useHealthPlanOrdersList({shop:shop,ordersOpen:ordersOpen,subsRepo:subsRepo,petRef:petRef,everfurOrders:everfurOrders,setEverfurOrders:setEverfurOrders,say:say}),weightKnown=options.weightKnown!==false||weightSaved,kg=options.weightUnit==="kg",[weightInput,setWeightInput]=react.useState(""),[weightError,setWeightError]=react.useState(""),[savingWeight,setSavingWeight]=react.useState(false),openWeight=()=>{setWeightError(""),setSheet({kind:"weight"})},saveWeight=async()=>{let n=Math.round(Number.parseFloat(weightInput.replace(",","."))*10)/10;if(!(kg?n>=KG_MIN&&n<=KG_MAX:n>=LB_MIN&&n<=LB_MAX)){setWeightError(kg?copy.weightErrorKg:copy.weightError);return}let{weightKg:weightKg,pounds:lb}=healthPlanWeightForSave(n,kg);setSavingWeight(true);let res=options.onSaveWeight?await options.onSaveWeight(weightKg,lb):await runtime.updatePet(petRef,{weightKg:weightKg});if(setSavingWeight(false),!res.ok){setWeightError(res.error.displayMessage);return}setWeightError(""),setWeightSaved(true),setSheet(null),say(kg?copy.weightSavedKg(String(n)):copy.weightSaved(String(lb))),options.onWeightSaved&&callHost2(options.onWeightSaved,weightKg)},{noVet:noVet,flashKey:flashKey}=useHealthPlanBlanksLanding({petRef:petRef,noVet:options.noVet,blanksFacts:options.blanksFacts,store:store,say:say,line:copy.recordsLanded}),placed=orders=>{let first=orders[0];if(first!==void 0){if(!shop){setStarted({kind:"once",order:first});return}setRecent(prev=>addRecentHealthPlanOrders(prev,orders)),setSheet(null),setScreens([{kind:"placed",orders:orders}])}},bought=productIds=>{let gone=new Set(productIds.filter(x=>x!==null));gone.size>0&&setCart(prev=>prev.filter(x=>!gone.has(x.productId)))};return{sub:sub,copy:copy,everfur:everfur,shop:shop,partnerBuys:partnerBuys,redirecting:redirecting,pages:pages,quote:quote,subscription:subscription,active:active,canSubscribe:canSubscribe,offer:offer,every:every,currency:currency,boxPrice:boxPrice,oneBox:oneBox,pr:pr,priced:priced,mode:mode,buyMode:buyMode,fmt:fmt,fmtWhole:fmtWhole,prices:prices,day:day,nextBoxDay:nextBoxDay,withTracking:withTracking,sheet:sheet,started:started,screens:screens,top:top,overlay:overlay2,under:under,title:title,full:full,toast:toast,added:added,extras:extras,planItems:planItems,cart:cart,lines:lines,lineCount:lineCount,cartTotal:cartTotal,subLine:subLine,cartOn:cartOn,hostLines:hostLines,boxesOn:boxesOn,wasOf:wasOf,views:views,renewPrices:renewPrices,apart:apart,batch:batch,batchTotal:batchTotal,batchSub:batchSub,batchRenew:batchRenew,cartReady:cartReady,itemOf:itemOf2,inCart:inCart,isPick:isPick,lineSub:lineSub,unitOf:unitOf,lineView:lineView,everfurOrders:everfurOrders,ownOrders:ownOrders,orderNumber:orderNumber,weightKnown:weightKnown,kg:kg,weightInput:weightInput,weightError:weightError,savingWeight:savingWeight,noVet:noVet,flashKey:flashKey,say:say,setMode:setMode,openSheet:setSheet,closeSheet:()=>setSheet(null),push:push,replaceScreens:setScreens,closeStarted:()=>setStarted(null),closeOverlays:closeOverlays,back:back,toggleAdded:toggleAdded,toggleExtra:toggleExtra,pressExtra:pressExtra,buyOnce:buyOnce,press:press,pressOther:pressOther,confirmCheckout:confirmCheckout,changeInterval:changeInterval,skip:skip,cancel:cancel,seeOrdersFromManage:seeOrdersFromManage,addToCart:addToCart,showCart:showCart,editLine:editLine,stepQuantity:stepQuantity,removeLine:removeLine,placeCart:placeCart,moreOrders:moreOrders,openWeight:openWeight,setWeightInput:setWeightInput,saveWeight:saveWeight,returnHandlers:{onPaid:state2=>{let run2=state2.subscription,orders=state2.orders??(state2.order===null?[]:[state2.order]);if(run2!==null)options.onSubscriptionChange&&callHost2(options.onSubscriptionChange,run2),rules.closeOnReturn&&(setSheet(null),setScreens([])),setStarted({kind:"sub",sub:run2});else if(orders.length>0){for(let o of orders)options.onOneBoxOrder&&callHost2(options.onOneBoxOrder,o);placed(orders)}bought([run2?.productId??null,...orders.map(o=>o.productId)]),sub.refresh()},onFailed:()=>{setSheet(null),shop&&(rules.closeOnReturn&&setStarted(null),setScreens([{kind:"cart"}])),copy.checkoutFailed!==""&&say(copy.checkoutFailed)},onCancel:()=>setRedirecting(false),onTimeout:()=>{shop&&(setSheet(null),rules.closeOnReturn&&setStarted(null),setScreens([{kind:"orders"}]))},onError:error=>say(error.displayMessage)}}}function useHealthPlanRecordsEmpty(reader,petRef){let[empty,setEmpty]=react.useState(null);return react.useEffect(()=>{if(reader===void 0)return;let live=true;return reader.getRecord(petRef).then(res=>{live&&setEmpty(res.ok?res.value.withheld!==true&&res.value.is_empty===true:null)}).catch(()=>{}),()=>{live=false}},[reader,petRef]),empty}var CLOSE_FALLBACK="Close",HEALTH_PLAN_TOP_CARD_COPY=/* @__PURE__ */Object.freeze({action:who=>who.possessive===null?null:`See ${who.possessive} Health Plan`,ask:"What does it mean?",askPrompt:(focus,ask)=>focus.risk?.lead?`${focus.risk.lead} ${ask}`:`${focus.title}: ${ask}`,close:who=>who.possessive===null?null:`Close ${who.possessive} focus`,resultsKicker:who=>who.possessive===null?null:`${capital(who.possessive)} results`,resultsClose:who=>who.possessive===null?null:`Close ${who.possessive} results`,resultsTopRisk:"Top risk"});function capital(word){return word.charAt(0).toUpperCase()+word.slice(1)}function healthPlanPossessive(pet){let sex=typeof pet.sex=="string"?pet.sex.trim().toLowerCase():null;if(sex==="female")return"her";if(sex==="male")return"his";let name=typeof pet.name=="string"?pet.name.trim():"";return name!==""?`${name}'s`:null}function healthPlanTopCard(page,options={}){let focus=page?.page?.focus;if(page===null||focus===void 0||focus.title.trim()===""||focus.kicker.trim()==="")return;let copy={...HEALTH_PLAN_TOP_CARD_COPY,...options.copy},who={pet:page.pet,possessive:healthPlanPossessive(page.pet)},badge=focus.sources?.find(source=>source.label.trim()!=="")?.label,onOpenPlan=options.onOpenPlan,action=onOpenPlan===void 0?null:copy.action(who),close=copy.close(who),ask=copy.ask.trim(),results=options.results!==void 0&&focus.report!==void 0?options.results:void 0;if(results!==void 0){let kicker=copy.resultsKicker(who)?.trim()||focus.kicker,shut=copy.resultsClose(who),onTop=results.onTopRisk??onOpenPlan,top={key:"top-risk",label:copy.resultsTopRisk,title:focus.title,...focus.risk?.lead?{line:focus.risk.lead}:{},tone:"risk",...onTop===void 0?{}:{onPress:onTop}};return{kicker:kicker,...badge===void 0?{}:{badge:badge},title:focus.title,results:[top,...results.rows??[]],...action===null||action.trim()===""||onOpenPlan===void 0?{}:{action:{label:action,onPress:onOpenPlan}},...ask===""?{}:{ask:{label:ask,prompt:copy.askPrompt(focus,ask)}},closeLabel:shut===null||shut.trim()===""?CLOSE_FALLBACK:shut,pill:kicker,...options.renderIcon===void 0?{}:{renderIcon:options.renderIcon}}}return{kicker:focus.kicker,...badge===void 0?{}:{badge:badge},title:focus.title,...focus.risk?.lead?{lead:focus.risk.lead}:{},...focus.risk?.body?{body:focus.risk.body}:{},...action===null||action.trim()===""||onOpenPlan===void 0?{}:{action:{label:action,onPress:onOpenPlan}},...ask===""?{}:{ask:{label:ask,prompt:copy.askPrompt(focus,ask)}},closeLabel:close===null||close.trim()===""?CLOSE_FALLBACK:close,pill:focus.kicker,...options.renderIcon===void 0?{}:{renderIcon:options.renderIcon}}}var HEALTH_PLAN_FOCUS_RN_COPY=/* @__PURE__ */Object.freeze({...HEALTH_PLAN_FOCUS_COPY,firstBoxShips:"Her first box ships.",placedShips:"It ships.",trackingComesByText:"",trackingByText:"",moreOrders:"Load more",checkoutFailed:"That didn't go through. Please try again.",back:"Back"}),cap=s=>s===""?s:`${s.charAt(0).toUpperCase()}${s.slice(1)}`;function healthPlanPetCopy(pet){let name=pet.name?.trim()??"",her=healthPlanPossessive(pet)??"your pet's",Her=cap(her),them=pet.sex==="female"?"her":pet.sex==="male"?"him":name!==""?name:"your pet",base3=HEALTH_PLAN_FOCUS_COPY,r5=healthPlanFocusCopyFor({name:pet.name,sex:pet.sex});return{jumpKicker:(p,subscribed)=>subscribed?`In ${her} plan, every ${p.intervalDays} days`:p.offer?`${p.discountPercent}% off ${her} first box`:base3.jumpKicker(p,false),firstBoxShips:pet.trackingTexts===true?`${Her} first box ships. Tracking comes by text.`:`${Her} first box ships.`,placedShips:base3.placedShips,trackingComesByText:pet.trackingTexts===true?base3.trackingComesByText:"",trackingByText:pet.trackingTexts===true?base3.trackingByText:"",refill:`A text 3 days before ${her} next box. Reply SKIP to skip it.`,nextBoxShips:p=>`${Her} next box ships, ${p.box??""}.`,startedDone:`Back to ${her} plan`,skipped:(_p,next)=>next===null?"Skipped.":`Skipped. ${Her} next box ships ${next}.`,cancelled:p=>`${p.productName} is cancelled. Restart it from ${her} plan anytime.`,seeOrders:`See ${her} orders`,cartOnceLine:(p,subscribed)=>subscribed?`An extra box. ${Her} plan keeps shipping.`:base3.cartOnceLine(p,false),herSubscription:`${Her} subscription`,ordersHeading:afterSubscription=>afterSubscription?"Orders":`${Her} orders`,addWeightTitle:`Add ${her} weight to size ${her} dose`,addWeightBody:`From a home scale or ${her} last vet visit.`,connectRecordsTitle:`Connect ${her} vet records`,connectRecordsBody:`${Her} weight, visits and labs make ${her} plan sharper.`,weightKicker:`${Her} weight`,weightBody:`From a home scale or ${her} last vet visit. ${Her} plan uses it to size ${her} dose.`,weightField:`${Her} weight`,weightError:`Enter ${her} weight in pounds, like 14.1.`,weightSave:`Save ${her} weight`,weightSaved:lb=>`Saved: ${lb} lb. ${Her} dose is sized for ${them}.`,weightErrorKg:r5.weightErrorKg,weightSavedKg:r5.weightSavedKg,signalsFit:r5.signalsFit,noPick:r5.noPick,saveForCheckup:r5.saveForCheckup,savedForCheckup:r5.savedForCheckup,blanksLabel:r5.blanksLabel,blanksFilledKicker:r5.blanksFilledKicker,blanksWeight:r5.blanksWeight,blanksWeightSource:r5.blanksWeightSource,blanksDoseSource:r5.blanksDoseSource,blanksShots:r5.blanksShots,blanksShotsSource:r5.blanksShotsSource,recordsLanded:r5.recordsLanded}}var BLANKS_MEMO_KV_PREFIX="everfur.healthPlan.blanks",NONE=/* @__PURE__ */Object.freeze({waited:null,flashed:null}),memos=/* @__PURE__ */new Map,loads=/* @__PURE__ */new Map,keyOf2=petRef=>`${BLANKS_MEMO_KV_PREFIX}:${petRef}`;function parse(raw){if(raw===null)return NONE;try{let o=JSON.parse(raw);if(o===null||typeof o!="object")return NONE;let r=o;return{waited:typeof r.waited=="string"?r.waited:null,flashed:typeof r.flashed=="string"?r.flashed:null}}catch{return NONE}}function loadBlanksMemo(kv,petRef){let own=memos.get(petRef);if(own!==void 0)return Promise.resolve(own);let load=loads.get(petRef);return load===void 0&&(load=(async()=>{let read=NONE;try{read=kv?parse(await kv.getItem(keyOf2(petRef))):NONE}catch{}let memo=memos.get(petRef)??read;return memos.set(petRef,memo),memo})(),loads.set(petRef,load)),load}function blanksMemo(petRef){return memos.get(petRef)??NONE}function setBlanksMemo(kv,petRef,memo){if(memos.set(petRef,memo),!!kv)try{kv.setItem(keyOf2(petRef),JSON.stringify(memo)).catch(()=>{})}catch{}}var CHECKOUT_PARAM="everfur_checkout",CHECKOUT_CANCEL_PARAM="everfur_checkout_cancel",STRIPE_SESSION_ID="{CHECKOUT_SESSION_ID}",CHECKOUT_POLL_MS=2e3,CHECKOUT_POLL_TRIES=30;function validReturnUrl(url){return typeof url!="string"?false:/^https:\/\/[^/?#\s]+[^\s]*$/i.test(url.trim())}var PARAM_RE=new RegExp(`([?&])(?:${CHECKOUT_PARAM}|${CHECKOUT_CANCEL_PARAM})=[^&#]*&?`,"g");function checkoutReturnUrl(base3,name,value){let hashAt=base3.indexOf("#"),hash=hashAt===-1?"":base3.slice(hashAt),head=hashAt===-1?base3:base3.slice(0,hashAt);head=head.replace(PARAM_RE,"$1").replace(/[?&]$/,"");let sep=head.includes("?")?"&":"?";return`${head}${sep}${name}=${value}${hash}`}function readCheckoutReturn(url,base3){let strip=u=>u.split(/[?#]/)[0]?.replace(/\/+$/,"").toLowerCase()??"";if(strip(url)!==strip(base3))return null;let query=url.split("#")[0]?.split("?")[1]??"",params=/* @__PURE__ */new Map;for(let pair of query.split("&")){if(pair==="")continue;let at=pair.indexOf("="),key=at===-1?pair:pair.slice(0,at),value=at===-1?"":pair.slice(at+1);try{value=decodeURIComponent(value)}catch{}params.set(key,value)}if(params.has(CHECKOUT_CANCEL_PARAM))return{kind:"cancel"};let id=params.get(CHECKOUT_PARAM);return id===void 0?null:{kind:"return",sessionId:id===""||id===STRIPE_SESSION_ID?null:id}}function mintTapKey(){let c=globalThis.crypto;return c?.randomUUID?c.randomUUID():`tap-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}var SHOP_CART_KV_PREFIX="everfur.healthPlan.cart",SHOP_CHECKOUT_KV_PREFIX="everfur.healthPlan.checkout",checkouts=/* @__PURE__ */new Map,carts=/* @__PURE__ */new Map,checkoutTouched=/* @__PURE__ */new Set,cartTouched=/* @__PURE__ */new Set,loads2=/* @__PURE__ */new WeakMap,DONE=Promise.resolve();function parseCart(raw){if(raw===null)return[];try{let o=JSON.parse(raw);return Array.isArray(o)?o.flatMap(x=>{if(x===null||typeof x!="object")return[];let r=x,productId=r.productId,mode=r.mode,every=r.every,qty=r.qty;return typeof productId!="string"||mode!=="sub"&&mode!=="once"||typeof every!="number"||typeof qty!="number"?[]:[{productId:productId,mode:mode,every:every,qty:Math.max(1,Math.min(mode==="sub"?1:5,Math.round(qty)))}]}):[]}catch{return[]}}function write(kv,key,value){if(kv)try{(value===null?kv.removeItem(key):kv.setItem(key,value)).catch(()=>{})}catch{}}function loadShopMemory(kv,petRef){if(!kv)return DONE;let perPet=loads2.get(kv);perPet===void 0&&(perPet=/* @__PURE__ */new Map,loads2.set(kv,perPet));let load=perPet.get(petRef);return load===void 0&&(load=(async()=>{let cart=[],checkout=null;try{let[rawCart,rawCheckout]=await Promise.all([kv.getItem(`${SHOP_CART_KV_PREFIX}:${petRef}`),kv.getItem(`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`)]);cart=parseCart(rawCart),checkout=typeof rawCheckout=="string"&&rawCheckout!==""?rawCheckout:null}catch{}!cartTouched.has(petRef)&&cart.length>0&&carts.set(petRef,cart),!checkoutTouched.has(petRef)&&checkout!==null&&checkouts.set(petRef,checkout)})(),perPet.set(petRef,load)),load}function rememberCheckout(petRef,checkoutId,kv){checkoutTouched.add(petRef),checkouts.set(petRef,checkoutId),write(kv,`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`,checkoutId)}function recallCheckout(petRef){return checkouts.get(petRef)??null}function forgetCheckout(petRef,kv){checkoutTouched.add(petRef),checkouts.delete(petRef),write(kv,`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`,null)}function readCart(petRef){return carts.get(petRef)??[]}function writeCart(petRef,lines,kv){cartTouched.add(petRef),lines.length===0?carts.delete(petRef):carts.set(petRef,lines),write(kv,`${SHOP_CART_KV_PREFIX}:${petRef}`,lines.length===0?null:JSON.stringify(lines))}function rnFocusStore(kv){return{readCart:readCart,writeCart:(petRef,lines)=>writeCart(petRef,lines,kv),loadCart:petRef=>loadShopMemory(kv,petRef),rememberCheckout:(petRef,checkoutId)=>rememberCheckout(petRef,checkoutId,kv),readBlanksMemo:blanksMemo,writeBlanksMemo:(petRef,memo)=>setBlanksMemo(kv,petRef,memo),loadBlanksMemo:petRef=>loadBlanksMemo(kv,petRef)}}var RN_RULES_BASE=/* @__PURE__ */Object.freeze({dropEmptyToast:true,subscribeNeedsPrice:false,closeOnReturn:true,linesFromExtras:false});var WAITING=/* @__PURE__ */new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review"]),VACCINE=/vaccin|rabies|dhpp|booster|bordetella|lepto|lyme|parvo|distemper/i,LB_PER_KG2=2.20462262;function dayMs(value){if(value==null||value.length===0)return null;let ms=Date.parse(/^\d{4}-\d{2}-\d{2}$/.test(value)?`${value}T00:00:00Z`:value);return Number.isNaN(ms)?null:ms}function kilograms(value,unit){return value===null||!Number.isFinite(value)||value<=0||unit===null?null:/^\s*kg|kilo/i.test(unit)?value:/^\s*(lb|lbs|pound)/i.test(unit)?value/LB_PER_KG2:null}function healthPlanRecordsWeightKg(record){if(record===null||record.isEmpty||record.withheld)return null;let readings=[];for(let series of record.entitySeries)if(series.key.startsWith("body_weight"))for(let point of series.points){if(point.origin==="owner_reported")continue;let at=dayMs(point.at),unit=point.display?.replace(/^[\d.,\s]+/,"")??null,kg=kilograms(point.value,unit);at!==null&&kg!==null&&readings.push({at:at,kg:kg})}for(let entity of record.entities){if(entity.category!=="body_weight"||entity.origin==="owner_reported")continue;let at=dayMs(entity.observedAt),kg=kilograms(entity.value===null?null:Number.parseFloat(entity.value),entity.unit);at!==null&&kg!==null&&readings.push({at:at,kg:kg})}return readings.length===0?null:(readings.sort((a,b)=>b.at-a.at),readings[0]?.kg??null)}function healthPlanNextShotsAt(record,today){if(record===null||record.isEmpty||record.withheld)return null;let next=null;for(let item of record.forwardLooking){if(!VACCINE.test(item.title))continue;let due=dayMs(item.dueAt);due===null||due<today||(next===null||due<next)&&(next=due)}return next}function latestClinicRequest(requests){return requests.filter(r=>r.source==="clinic_request").slice().sort((a,b)=>(dayMs(b.createdAt)??0)-(dayMs(a.createdAt)??0))[0]}function healthPlanRecordsHoldNoBlanks(input,now){let asked=latestClinicRequest(input.requests);if(asked===void 0||asked.status!=="published"||input.record===null||input.record.withheld)return false;let today=Math.floor(now/864e5)*864e5;return healthPlanRecordsWeightKg(input.record)===null&&healthPlanNextShotsAt(input.record,today)===null}function healthPlanBlanksFacts(input,now){let asked=latestClinicRequest(input.requests);if(asked===void 0)return null;let clinicName=asked.clinicName?.trim()?asked.clinicName.trim():null;if(WAITING.has(asked.status))return{phase:"wait",requestId:String(asked.id),clinicName:clinicName,weightKg:null,nextShotsAt:null};if(asked.status!=="published"||input.record===null||input.record.isEmpty||input.record.withheld)return null;let today=Math.floor(now/864e5)*864e5,weightKg=healthPlanRecordsWeightKg(input.record),nextShotsAt=healthPlanNextShotsAt(input.record,today);return weightKg===null&&nextShotsAt===null?null:{phase:"filled",requestId:String(asked.id),clinicName:clinicName,weightKg:weightKg,nextShotsAt:nextShotsAt}}var COARSE_NOW_TICK_MS=3600*1e3;function useCoarseNow(fixed,shown=true){let[now,setNow]=react.useState(()=>Date.now()),first=react.useRef(true);return react.useEffect(()=>{if(first.current){first.current=false;return}shown&&setNow(Date.now())},[fixed,shown]),react.useEffect(()=>{if(!shown)return;let tick=setInterval(()=>setNow(Date.now()),COARSE_NOW_TICK_MS),onVisible=()=>{document.visibilityState==="visible"&&setNow(Date.now())},doc=typeof document<"u"&&typeof document.addEventListener=="function"?document:null;return doc?.addEventListener("visibilitychange",onVisible),()=>{clearInterval(tick),doc?.removeEventListener("visibilitychange",onVisible)}},[fixed,shown]),now}function RecordsProbe(props){let{status:status,requests:requests,record:record,refresh:refresh}=records.useEverfurRecords({petRef:props.petRef}),{onRead:onRead,petRef:petRef}=props,now=useCoarseNow(),blanks=react.useMemo(()=>healthPlanBlanksFacts({requests:requests,record:record},now),[requests,record,now]),heldNone=react.useMemo(()=>healthPlanRecordsHoldNoBlanks({requests:requests,record:record},now),[requests,record,now]);react.useEffect(()=>{onRead({missing:status==="empty"||heldNone,blanks:blanks})},[status,heldNone,blanks,onRead]);let reread=react.useRef(refresh);return reread.current=refresh,react.useEffect(()=>onHealthPlanRecordsLanded((pet,source)=>{pet===petRef&&source==="host"&&reread.current()}),[petRef]),null}var initialRead=/* @__PURE__ */new Set;function useCheckoutReturn(options){let{enabled:enabled,petRef:petRef,pages:pages,returnUrl:returnUrl,lifecycle:lifecycle,kv:kv}=options,handlers=react.useRef(options);handlers.current=options,react.useEffect(()=>{if(!enabled||returnUrl===null)return;let live=true,polling=false,run2=0,timer=null,poll=async(checkoutId,tries,mine)=>{let res=await pages.getCheckout(petRef,checkoutId);if(!(!live||mine!==run2)){if(res.ok&&res.value.status==="paid"){polling=false,forgetCheckout(petRef,kv),handlers.current.onPaid(res.value);return}if(res.ok&&(res.value.status==="failed"||res.value.status==="expired")){polling=false,forgetCheckout(petRef,kv),handlers.current.onFailed();return}if(!res.ok&&!res.error.retryable){polling=false,forgetCheckout(petRef,kv),handlers.current.onError(res.error);return}if(tries<=1){polling=false,forgetCheckout(petRef,kv),handlers.current.onTimeout();return}timer=setTimeout(()=>{poll(checkoutId,tries-1,mine)},CHECKOUT_POLL_MS)}},start=checkoutId=>{polling||(polling=true,poll(checkoutId,CHECKOUT_POLL_TRIES,run2))},loaded=loadShopMemory(kv,petRef),onUrl=url=>{let back=readCheckoutReturn(url,returnUrl);if(back!==null){if(back.kind==="cancel"){run2+=1,polling=false,timer!==null&&clearTimeout(timer),timer=null,forgetCheckout(petRef,kv),handlers.current.onCancel();return}loaded.then(()=>{if(!live)return;let id=recallCheckout(petRef)??back.sessionId;id!==null&&start(id)})}},resume=()=>{loaded.then(()=>{if(!live)return;let id=recallCheckout(petRef);id!==null&&start(id)})},sub=reactNative.Linking.addEventListener("url",event=>onUrl(event.url));reactNative.Linking.getInitialURL().then(url=>{!live||url===null||url===void 0||initialRead.has(url)||readCheckoutReturn(url,returnUrl)!==null&&(initialRead.add(url),onUrl(url))}).catch(()=>{}).then(resume);let offForeground;if(lifecycle)offForeground=lifecycle.onForeground(resume);else{let app=reactNative.AppState.addEventListener("change",next=>{next==="active"&&resume()});offForeground=()=>app.remove()}return()=>{live=false,timer!==null&&clearTimeout(timer),sub.remove(),offForeground()}},[enabled,petRef,pages,returnUrl,lifecycle,kv])}var BOX=24,FINE=16,SEAM=.8,fine=dp=>Math.round(dp*FINE);function place(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE}]}}function strokePieces(icon,k2,out){for(let s of icon.strokes){let w=s.width*k2,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px2=(pts[i*2]??0)*k2,py=(pts[i*2+1]??0)*k2,dx=(pts[j*2]??0)*k2-px2,dy=(pts[j*2+1]??0)*k2-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place(px2+ux*along,py+uy*along,fine(len+e0+e1),fine(w),ux,uy),borderTopLeftRadius:e0>0?fine(w)/2:0,borderBottomLeftRadius:e0>0?fine(w)/2:0,borderTopRightRadius:e1>0?fine(w)/2:0,borderBottomRightRadius:e1>0?fine(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces(icon,k2,out){for(let b of icon.boxes){let w=(b.w+b.width)*k2,h=(b.h+b.width)*k2;out.push({paint:"borderColor",style:{...place((b.x-b.width/2)*k2+w/2,(b.y-b.width/2)*k2+h/2,fine(w),fine(h),1,0),borderWidth:fine(b.width*k2),borderRadius:(b.radius+b.width/2)*k2*FINE,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces(icon,k2,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k2,(t[i*2+1]??0)*k2]),base3=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base3=i)}if(len<=0)continue;let b0=p[base3]??[0,0],b1=p[(base3+1)%3]??[0,0],a=p[(base3+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine(along),br=fine(len)-bl,bh=fine(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k2,y0=(e[1]??0)*k2,dx=(e[2]??0)*k2-x0,dy=(e[3]??0)*k2-y0,d=Math.hypot(dx,dy),in0=SEAM*(e[4]??0),in1=SEAM*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place(x0+dx/d*mid,y0+dy/d*mid,fine(bar),fine(SEAM),dx/d,dy/d)})}}var cache4=/* @__PURE__ */new Map;function piecesOf(name,size){let key=`${name}:${size}`,hit=cache4.get(key);if(hit!==void 0)return hit;let icon=DESIGN_RN_PLAN_ICONS[name],out=[],k2=size/BOX;return boxPieces(icon,k2,out),strokePieces(icon,k2,out),trianglePieces(icon,k2,out),cache4.set(key,out),out}function FocusIcon({name:name,size:size=18,color:color}){let pieces=DESIGN_RN_PLAN_ICONS[name]===void 0?[]:piecesOf(name,size);/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("cartItemPriceNote"),children:copy.orderItemLine(x.quantity,o.subscriptionBox)})]})]})]},x.title))})}),shopSummary(k2,total),shopRows(k2,a.rows,true),a.onBuyAgain===null?null:shopButton(k2,copy.buyAgain,a.onBuyAgain,{ghost:true,testID:"health-plan-buy-again"}),a.onHelp===null?null:shopLink(k2,copy.orderHelp,a.onHelp),fine3===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("shopFine"),children:fine3})]})}var HealthPlanScrollContext=react.createContext(null),HealthPlanViewportContext=react.createContext(null);function HealthPlanScrollScope({scrollRef:scrollRef,children:children,style:style}){let origin=react.useRef(null),still=usePlanTheme().motion.reducedMotion,scrollTo=react.useCallback(node=>{let from=origin.current,scroller=scrollRef.current;if(!(node===null||from===null||scroller===null))try{node.measureLayout(from,(_x,y)=>scroller.scrollTo({y:Math.max(0,y),animated:!still}),()=>{})}catch{}},[scrollRef,still]),value=react.useMemo(()=>scrollTo,[scrollTo]),viewport=react.useMemo(()=>({measure:onFrame=>{let scroller=scrollRef.current;if(typeof scroller?.measureInWindow=="function")try{scroller.measureInWindow((_x,y,_w,height)=>{height>0&&onFrame({y:y,height:height})})}catch{}},top:node=>{let from=origin.current,scroller=scrollRef.current;if(!(node===null||from===null||scroller===null))try{node.measureLayout(from,(_x,y)=>scroller.scrollTo({y:Math.max(0,y),animated:!1}),()=>{})}catch{}}}),[scrollRef]);/* @__PURE__ */
|
|
167
|
+
return jsxRuntime.jsx(HealthPlanScrollContext.Provider,{value:value,children:/* @__PURE__ */jsxRuntime.jsx(HealthPlanViewportContext.Provider,{value:viewport,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{ref:origin,style:style,collapsable:false,children:children})})})}function useHealthPlanScroll(){return react.useContext(HealthPlanScrollContext)}function useHealthPlanViewport(){return react.useContext(HealthPlanViewportContext)}var warned=false;function warnConnectedOutsideProvider(isDevelopment){if(warned||!isDevelopment)return;warned=true;let globalConsole=globalThis.console;try{globalConsole?.warn?.("[everfur] A ConnectedHealthPlan* block was drawn outside HealthPlanFocusProvider, so it draws nothing. Wrap it in HealthPlanFocusProvider (or HealthPlanFocus), or use the pure block with your own data.")}catch{}}function healthPlanPetWords(name,sex){let n=name?.trim()??"",named=n===""?"your pet":n,Named=n===""?"Your pet":n;return sex==="female"?{name:named,Name:Named,poss:"her",Poss:"Her",obj:"her"}:sex==="male"?{name:named,Name:Named,poss:"his",Poss:"His",obj:"him"}:{name:named,Name:Named,poss:`${named}'s`,Poss:`${Named}'s`,obj:named}}var cartRenewal=p=>p===null?"":`${p.productName} renews every ${p.intervalDays} days at ${p.box??""} until you cancel; skip or cancel anytime in the app.`,HEALTH_PLAN_NO_SHIP_DAY_COPY=/* @__PURE__ */Object.freeze({onceFine:"",cartFine:cartRenewal,startedWhat:()=>""});function healthPlanFocusCopyFor(pet){let w=healthPlanPetWords(pet.name,pet.sex),nameOf=p=>p.petName?.trim()||w.name,NameOf=p=>p.petName?.trim()||w.Name,copy=/* @__PURE__ */Object.freeze({jumpKicker:(p,subscribed)=>subscribed?`In ${w.poss} plan, every ${p.intervalDays} days`:p.offer?`${p.discountPercent}% off ${w.poss} first box`:p.intervalDays>0?`Ships every ${p.intervalDays} days`:copy.onceLine(p),optionsLabel:"How to buy",subscribe:"Subscribe",bestValue:"Best value",subscribeLine:p=>p.offer?`First box, then ${p.box??""}`:`${p.box??""} every ${p.intervalDays} days`,priceLine:p=>p.offer?`${p.discountPercent}% off the first box. Ships every ${p.intervalDays} days.`:p.intervalDays>0?`Ships every ${p.intervalDays} days.`:copy.onceOffer(p),once:"One box",onceLine:p=>p.onceDiscountPercent>0?`${p.onceDiscountPercent}% off, ships once`:"Ships once",buyOnce:p=>`Buy one box, ${p.once??p.box??""}`,subscribed:"Subscribed",subscribedLine:(p,next)=>next===null?`Every ${p.intervalDays} days`:`Every ${p.intervalDays} days · next box ${next}`,manage:"Manage",checkoutKicker:"Checkout",checkoutTitle:p=>`Checkout: ${p.productName}`,checkoutOffer:p=>`${p.discountPercent}% off your first box.`,shipsEvery:"Ships every",days:n=>`${n} days`,buyOnceOption:"Buy once",checkoutGo:(_p,subscribe,today)=>`${subscribe?"Subscribe":"Buy now"} · ${today} today`,renews:p=>`Renews every ${p.intervalDays} days at ${p.box??""} until you cancel; skip or cancel anytime in the app.`,onceFine:"One box, ships tomorrow.",onceOffer:p=>p.onceDiscountPercent>0?`${p.onceDiscountPercent}% off, ships once.`:"Ships once.",checkoutNote:"",close:"Close",startedTitle:p=>`${NameOf(p)}'s plan has started.`,orderedTitle:()=>"Order placed.",startedWhat:p=>`${p.productName} ships tomorrow.`,startedNote:"",startedSteps:"What happens next",tomorrow:"Tomorrow",firstBoxShips:`${w.Poss} first box ships.`,trackingComesByText:"Tracking comes by text.",checkin:q=>q===null?"A 2-week check-in by text.":`A 2-week check-in by text: ${q}`,refill:`A text 3 days before ${w.poss} next box. Reply SKIP to skip it.`,nextBoxShips:p=>`${w.Poss} next box ships, ${p.box??""}.`,startedDone:`Back to ${w.poss} plan`,manageKicker:"Your subscription",manageTitle:p=>`Manage ${p.productName}`,skip:"Skip the next box",cancel:"Cancel subscription",skipped:(_p,next)=>next===null?"Skipped.":`Skipped. ${w.Poss} next box ships ${next}.`,cancelled:p=>`${p.productName} is cancelled. Restart it from ${w.poss} plan anytime.`,orders:"Orders",startedHeader:"Subscribed",placedHeader:"Order placed",cartCheckoutTitle:"Checkout",orderNote:"",cartLabel:n=>n>0?`Cart, ${n} item${n>1?"s":""}`:"Cart, empty",addToCart:price=>`Add to cart · ${price}`,viewCart:"View cart",addedToCart:(p,subscription)=>`${p.productName} is in your cart${subscription?", as a subscription":""}.`,removedFromCart:name=>`${name} is out of your cart.`,cartTitle:"Cart",cartEmptyTitle:"Your cart is empty",cartEmptyBody:p=>`${NameOf(p)}'s plan pick lands here when you add it.`,seeOrders:`See ${w.poss} orders`,quantityLabel:name=>`How many: ${name}`,fewer:"One fewer",more:"One more",remove:"Remove",cartSubLine:p=>p.offer?`First box ${p.discountPercent}% off, then ${p.box??""} every ${p.intervalDays} days`:`Every ${p.intervalDays} days`,cartOnceLine:(p,subscribed)=>subscribed?`An extra box. ${w.Poss} plan keeps shipping.`:p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",cartModeLabel:name=>`How to buy ${name}`,cartModeSubscribe:p=>p.offer?`Subscribe, ${p.discountPercent}% off the first box`:"Subscribe",cartModeOnce:p=>p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",subtotal:"Subtotal",shipping:"Shipping",shippingValue:"",shippingTag:"",total:"Total",dueToday:"Due today",thenRenews:p=>`Then ${p.productName}`,renewsEvery:p=>`${p.box??""} every ${p.intervalDays} days`,checkoutCart:total=>`Checkout · ${total}`,cartOneAtATime:"",cartSubscriptionApart:"",cartItemSubscription:p=>`Subscription, every ${p.intervalDays} days`,cartItemQuantity:n=>`Qty ${n}`,placeOrder:(total,subscribe)=>`${subscribe?"Place order and subscribe":"Place order"} · ${total}`,cartFine:p=>`${p===null?"":`${cartRenewal(p)} `}Ships tomorrow.`,placedSteps:"What's coming",placedShips:"It ships.",placedArrives:"It arrives at home.",viewOrder:"View order",herSubscription:`${w.Poss} subscription`,nextBox:day=>`Next box ${day}`,everyDays:n=>`Every ${n} days`,ordersHeading:afterSubscription=>afterSubscription?"Orders":`${w.Poss} orders`,ordersFine:"",ordersEmptyTitle:"No orders yet",ordersEmptyBody:p=>`The boxes from ${nameOf(p)}'s plan show up here.`,moreOrders:"",orderSteps:["Ordered","Shipped","Out for delivery","Delivered"],subscriptionBox:"Subscription box",orderTitle:n=>n===null?"Order":`Order ${n}`,arrivesBy:day=>`Arrives by ${day}`,deliveredOn:day=>`Delivered ${day}`,expected:day=>`Expected ${day}`,tracking:"Tracking",trackingByText:"The tracking number comes by text when it ships.",trackOn:carrier=>`Track on ${carrier}`,trackLink:"",inThisOrder:"In this order",orderItemLine:(n,box)=>`Qty ${n}${box?" · subscription box":""}`,paidWith:"Paid with",buyAgain:"Buy again",orderHelp:"Get help with this order",addWeightTitle:`Add ${w.poss} weight to size ${w.poss} dose`,addWeightBody:`From a home scale or ${w.poss} last vet visit.`,connectRecordsTitle:`Connect ${w.poss} vet records`,connectRecordsBody:`${w.Poss} weight, visits and labs make ${w.poss} plan sharper.`,weightKicker:`${w.Poss} weight`,weightTitle:p=>`Add ${nameOf(p)}'s weight`,weightBody:`From a home scale or ${w.poss} last vet visit. ${w.Poss} plan uses it to size ${w.poss} dose.`,weightField:`${w.Poss} weight`,weightUnit:"lb",weightUnitKg:"kg",weightErrorKg:"Enter your pet’s weight",weightError:`Enter ${w.poss} weight in pounds, like 14.1.`,weightSave:`Save ${w.poss} weight`,weightSaved:lb=>`Saved: ${lb} lb. ${w.Poss} dose is sized for ${w.obj}.`,weightSavedKg:kg=>`Saved: ${kg} kg. ${w.Poss} dose is sized for ${w.obj}.`,checkoutFailed:"That didn't go through. Please try again.",builtWith:vet=>`Built with ${vet}`,fromVet:shortName=>`From ${shortName}`,waitVetTips:vet=>`Free tips from ${vet}, built around that risk`,signalsFit:count=>`${count} of ${count} signals fit ${w.Name}`,signalsValue:count=>`${count}/${count}`,noPick:`No supplement for this one. ${w.Poss} vet comes first.`,callYourVet:"Call your vet today",callAVet:"Call a vet today",saveForCheckup:`Save for ${w.poss} next checkup`,savedForCheckup:`Saved for ${w.poss} next checkup`,blanksLabel:`${w.Poss} three blanks`,blanksAsked:clinic=>`Asked ${clinic}`,blanksAskedNoClinic:"",blanksWaitPill:"2 to 5 days",blanksFilledKicker:`From ${w.poss} vet records`,blanksFilled:(filled2,total)=>`${filled2} of ${total} filled`,blanksWeight:`Keep ${w.obj} at `,blanksWeightSource:`From ${w.poss} vet visits`,blanksDose:(dose,product)=>`${dose} of ${product}`,blanksDoseSource:`Sized to ${w.poss} weight`,blanksShots:`${w.Poss} next shots are due `,blanksShotsSource:`From ${w.poss} clinic`,blankEmpty:"blank",recordsLanded:`${w.Poss} records are in. ${w.Poss} plan now uses ${w.poss} weight and ${w.poss} visits.`,todayLabel:`${w.Poss} Health Plan`,poweredBy:"powered by",poweredByName:"Everfur",seeMore:"See more",seeLess:"See less",reportActions:"Actions to take",openReport:`Open it in ${w.poss} report`,askReport:"Ask about it",fullOpen:`See ${w.poss} full plan`,fullOpenLine:`${w.Poss} vet, reviews and ${w.poss} checkup`,fullClose:`Show ${w.poss} brief plan`,fullCloseLine:`${w.Poss} risk, tips, pick and signs`,hopeNoted:phrases=>`Noted. When ${w.poss} results land, we'll start with ${phrases}.`,productLink:product=>`${product}, see the product`,productPhotos:product=>`${product} photos, swipe for more`,shopAll:"Shop all",madeFor:`Made for ${w.name}`,ratingLine:count=>`· ${count} reviews`,productOffer:p=>`${p.discountPercent}% off ${w.poss} first box`,productEvery:p=>`Every ${p.intervalDays} days`,productOnce:p=>p.onceDiscountPercent>0?`One box, ${p.onceDiscountPercent}% off`:"One box",productExtraBox:"An extra box",productOnPlan:p=>`On ${w.poss} plan, every ${p.intervalDays} days. This adds one extra box.`,quantity:"Quantity",description:"Description",readMore:"Read more",readLess:"Read less",whatsInside:"What's inside",howMuch:"How much",reviewsTitle:"Reviews",reviewCount:count=>`${count} reviews`,reviewsSwipe:"Reviews, swipe for more",readAllReviews:count=>`Read all ${count} reviews`,starsLabel:rating=>`${rating} out of 5 stars`,buyNow:"Buy now"});return copy}var HEALTH_PLAN_FOCUS_COPY=healthPlanFocusCopyFor({sex:"female"});function formatHealthPlanDay(iso,locale){if(iso===null||!/^\d{4}-\d{2}-\d{2}$/.test(iso))return null;let d=/* @__PURE__ */new Date(`${iso}T00:00:00Z`);if(Number.isNaN(d.getTime()))return null;try{return new Intl.DateTimeFormat(locale??"en-US",{month:"short",day:"numeric",timeZone:"UTC"}).format(d)}catch{return iso}}var HEALTH_PLAN_ORDERS_EMPTY=/* @__PURE__ */Object.freeze({loaded:false,orders:[],next:null,loading:false});function pushHealthPlanScreen(prev,screen){return[...prev.filter(x=>x.kind!==screen.kind),screen]}function healthPlanOverlayOf(sheet,started,top){return sheet!==null?sheet.kind:healthPlanUnderOf(started,top)}function healthPlanUnderOf(started,top){return started!==null?"started":top!==void 0?top.kind:null}function mergeHealthPlanOrders(recent,loaded){let seen=/* @__PURE__ */new Set;return[...recent,...loaded].filter(o=>seen.has(o.orderId)?false:(seen.add(o.orderId),true))}function addRecentHealthPlanOrders(prev,orders){return[...orders,...prev.filter(o=>!orders.some(x=>x.orderId===o.orderId))]}function appendHealthPlanOrderPage(prev,page){return{loaded:true,orders:[...prev.orders,...page.orders.filter(o=>!prev.orders.some(x=>x.orderId===o.orderId))],next:page.nextCursor,loading:false}}function healthPlanOrderNumber(key,everfurOrders,hostOrders){if(key===null)return null;let own=everfurOrders.find(o=>o.orderId===key);return own!==void 0?own.tracking?.orderNumber??null:hostOrders.find(o=>o.key===key)?.number??null}function editHealthPlanCartLine(prev,productId,f){return prev.flatMap(x=>x.productId!==productId?[x]:f(x)??[])}async function readHealthPlanOrders(repo,petRef,cursor){if(repo.listOneBoxOrderPage!==void 0)return repo.listOneBoxOrderPage(petRef,{limit:20,...cursor===null?{}:{cursor:cursor}});if(cursor!==null||repo.listOneBoxOrders===void 0)return{ok:true,value:{orders:[],nextCursor:null}};let res=await repo.listOneBoxOrders(petRef);return res.ok?{ok:true,value:{orders:res.value,nextCursor:null}}:res}function isHealthPlanInvalidCursor(error){if(error.httpStatus!==422)return false;let raw=error.raw!==null&&typeof error.raw=="object"?error.raw:null;return[error.reasonCode,error.wireMessage,raw?.detail,raw?.message].some(x=>x==="invalid_cursor")}var roundCents=n=>Math.round(n*100)/100;function useHealthPlanSubscriptionRepository(){let{runtime:runtime}=useEverfurContext();return react.useMemo(()=>createHealthPlanSubscriptionRepository(runtime),[runtime])}function useHealthPlanSubscription(options){let{userRef:userRef}=useEverfurContext(),own=useHealthPlanSubscriptionRepository(),repository=options.repository??own,enabled=options.enabled!==false&&userRef!==null&&options.petRef!==null&&options.productId!==null,{petRef:petRef,productId:productId}=options,[phase,setPhase]=react.useState("idle"),[quote,setQuote]=react.useState(null),[subscription,setSubscription]=react.useState(null),[busy,setBusy]=react.useState(false),[error,setError]=react.useState(null),[readyAt,setReadyAt]=react.useState(null),epoch=react.useRef(0),writes=react.useRef(0),quiet=react.useRef(0),busyRef=react.useRef(false),refreshAfterWrite=react.useRef(false),revalidateRef=react.useRef(()=>Promise.resolve()),load=react.useCallback(async()=>{let mine=++epoch.current;if(refreshAfterWrite.current=false,setReadyAt(null),!enabled||petRef===null||productId===null){setPhase("idle"),setQuote(null),setSubscription(null);return}setPhase("loading");let res=await repository.quote(petRef,productId);if(mine===epoch.current){if(!res.ok){setQuote(null),setSubscription(null),setError(res.error),setPhase(isHealthPlanSubscriptionUnavailable(res.error)?"unavailable":"failed");return}setError(null),setQuote(res.value),setSubscription(res.value.subscription),setPhase("ready"),setReadyAt(Date.now())}},[enabled,petRef,productId,repository]),ready=enabled&&phase==="ready",revalidate=react.useCallback(async()=>{if(!ready||busyRef.current||petRef===null||productId===null)return;let mine=epoch.current,wrote=writes.current,seq=++quiet.current,res=await repository.quote(petRef,productId);mine!==epoch.current||wrote!==writes.current||seq!==quiet.current||busyRef.current||!res.ok||(setQuote(res.value),setSubscription(res.value.subscription),setReadyAt(Date.now()))},[ready,petRef,productId,repository]);revalidateRef.current=revalidate;let refreshOnKey=()=>{if(!ready){load();return}if(busyRef.current){refreshAfterWrite.current=true;return}revalidate()};useHealthPlanRevalidation({lifecycle:options.lifecycle,refreshKey:options.refreshKey,readyAt:ready?readyAt:null,revalidate:()=>{revalidate()},refresh:refreshOnKey});let settleWrite=react.useCallback(()=>{refreshAfterWrite.current&&(refreshAfterWrite.current=false,revalidateRef.current())},[]);react.useEffect(()=>(load(),()=>{epoch.current+=1}),[load]);let write2=react.useCallback(async run2=>{let mine=epoch.current;writes.current+=1,busyRef.current=true,setBusy(true);let res=await run2();return busyRef.current=false,mine!==epoch.current?res:(setBusy(false),res.ok?(setError(null),setSubscription(res.value),settleWrite(),res):(setError(res.error),isHealthPlanSubscriptionUnavailable(res.error)?setPhase("unavailable"):settleWrite(),res))},[settleWrite]),buy=react.useCallback(async tapKey=>{let mine=epoch.current;writes.current+=1,busyRef.current=true,setBusy(true);let res=await repository.buyOneBox(petRef,productId,tapKey);return busyRef.current=false,mine!==epoch.current?res:(setBusy(false),res.ok?(setError(null),load(),res):(setError(res.error),isHealthPlanSubscriptionUnavailable(res.error)?setPhase("unavailable"):settleWrite(),res))},[repository,petRef,productId,load,settleWrite]);return react.useMemo(()=>{let p=petRef,sid=subscription?.subscriptionId??"",none=()=>Promise.resolve(err(makeEverfurError("validationFailed",{retryable:false,wireMessage:"the subscription quote is not ready"})));return{phase:phase,quote:quote,subscription:subscription,busy:busy,error:error,subscribe:n=>ready&&productId!==null?write2(()=>repository.create(p,productId,n)):none(),changeInterval:n=>ready&&sid!==""?write2(()=>repository.changeInterval(p,sid,n)):none(),skip:()=>ready&&sid!==""?write2(()=>repository.skip(p,sid)):none(),cancel:()=>ready&&sid!==""?write2(()=>repository.cancel(p,sid)):none(),restart:n=>ready&&sid!==""?write2(()=>repository.restart(p,sid,n)):none(),buyOneBox:k2=>ready&&productId!==null?buy(k2):none(),refresh:load}},[phase,quote,subscription,busy,error,ready,petRef,productId,repository,write2,buy,load])}var LB_PER_KG=2.20462262;function healthPlanWeightForSave(entered,inKg){return{weightKg:inKg?entered:Math.round(entered/LB_PER_KG*100)/100,pounds:inKg?Math.round(entered*LB_PER_KG*10)/10:entered}}var SIGNALS_SYMBOL=/* @__PURE__ */Symbol.for("@everfur/sdk#HealthPlanSignals@v1"),signalHost=globalThis;function isSignalState(value){if(typeof value!="object"||value===null)return false;let v=value;return v.landed instanceof Set&&v.noVet instanceof Set&&v.noVetByPet instanceof Map}var stored=signalHost[SIGNALS_SYMBOL],fresh=()=>({landed:/* @__PURE__ */new Set,noVet:/* @__PURE__ */new Set,noVetByPet:/* @__PURE__ */new Map}),state=isSignalState(stored)?stored:signalHost[SIGNALS_SYMBOL]=fresh(),landedListeners=state.landed,noVetListeners=state.noVet,noVetByPet=state.noVetByPet;function notifyHealthPlanRecordsLanded(petRef,source="host"){for(let listener of[...landedListeners])try{listener(petRef,source)}catch{}}function onHealthPlanRecordsLanded(listener){return landedListeners.add(listener),()=>{landedListeners.delete(listener)}}function setHealthPlanNoVet(petRef,noVet){if((noVetByPet.get(petRef)??false)!==noVet){noVet?noVetByPet.set(petRef,true):noVetByPet.delete(petRef);for(let listener of[...noVetListeners])try{listener(petRef,noVet)}catch{}}}function healthPlanNoVet(petRef){return noVetByPet.get(petRef)??false}function onHealthPlanNoVet(listener){return noVetListeners.add(listener),()=>{noVetListeners.delete(listener)}}function useHealthPlanBlanksLanding(options){let{petRef:petRef,noVet:noVetOverride,blanksFacts:blanksFacts,store:store,say:say,line:line}=options,[storeNoVet,setStoreNoVet]=react.useState(()=>healthPlanNoVet(petRef));react.useEffect(()=>(setStoreNoVet(healthPlanNoVet(petRef)),onHealthPlanNoVet((pet,none)=>{pet===petRef&&setStoreNoVet(none)})),[petRef]);let noVet=noVetOverride??storeNoVet,[flashKey,setFlashKey]=react.useState(null),hostSaid=react.useRef(false);react.useEffect(()=>(hostSaid.current=false,onHealthPlanRecordsLanded((pet,source)=>{pet===petRef&&source==="host"&&(hostSaid.current=true)})),[petRef]);let blanksPhase=blanksFacts?.phase??null,blanksId=blanksFacts?.requestId??null,landed=react.useRef({say:say,line:line});return landed.current={say:say,line:line},react.useEffect(()=>{if(blanksId===null)return;let live=true,run2=()=>{let memo=store.readBlanksMemo(petRef);if(blanksPhase==="wait"){memo.waited!==blanksId&&store.writeBlanksMemo(petRef,{...memo,waited:blanksId});return}!live||memo.flashed===blanksId||(store.writeBlanksMemo(petRef,{...memo,flashed:blanksId}),!(memo.waited!==blanksId&&!hostSaid.current)&&(hostSaid.current=false,setFlashKey(blanksId),landed.current.line!==""&&landed.current.say(landed.current.line),notifyHealthPlanRecordsLanded(petRef,"plan")))};return store.loadBlanksMemo===void 0?run2():store.loadBlanksMemo(petRef).then(run2),()=>{live=false}},[blanksPhase,blanksId,petRef,store]),{noVet:noVet,flashKey:flashKey}}function useHealthPlanOrdersList(options){let{shop:shop,ordersOpen:ordersOpen,subsRepo:subsRepo,petRef:petRef,everfurOrders:everfurOrders,setEverfurOrders:setEverfurOrders,say:say}=options,ordersLive=react.useRef(false),loadingMore=react.useRef(false),sayRef=react.useRef(say);return sayRef.current=say,react.useEffect(()=>{if(!shop||!ordersOpen)return;let live=true;return ordersLive.current=true,readHealthPlanOrders(subsRepo,petRef,null).then(res=>{live&&(res.ok?setEverfurOrders({loaded:true,orders:res.value.orders,next:res.value.nextCursor,loading:false}):(setEverfurOrders(prev=>({...prev,loaded:true,loading:false})),sayRef.current(res.error.displayMessage)))}),()=>{live=false,ordersLive.current=false}},[shop,ordersOpen,petRef,subsRepo]),{moreOrders:()=>{let cursor=everfurOrders.next;cursor===null||loadingMore.current||(loadingMore.current=true,setEverfurOrders(prev=>({...prev,loading:true})),readHealthPlanOrders(subsRepo,petRef,cursor).then(async res=>{let again=!res.ok&&isHealthPlanInvalidCursor(res.error)?await readHealthPlanOrders(subsRepo,petRef,null):null;if(loadingMore.current=false,!!ordersLive.current){if(again!==null){again.ok?setEverfurOrders({loaded:true,orders:again.value.orders,next:again.value.nextCursor,loading:false}):(setEverfurOrders(prev=>({...prev,next:null,loading:false})),sayRef.current(again.error.displayMessage));return}if(res.ok){let page=res.value;setEverfurOrders(prev=>appendHealthPlanOrderPage(prev,page))}else setEverfurOrders(prev=>({...prev,loading:false})),sayRef.current(res.error.displayMessage)}}))}}}var KG_MIN=.5,KG_MAX=90,LB_MIN=1,LB_MAX=200,TOAST_MS=2600,GLOBAL_CLOCK={setTimeout:(fn,ms)=>setTimeout(fn,ms),clearTimeout:handle=>clearTimeout(handle)};function useHealthPlanFocus(options,copy,ports,rules){let{design:design,item:item,petRef:petRef,petName:petName,locale:locale}=options,{store:store,callHost:callHost2}=ports,clock=ports.clock??GLOBAL_CLOCK,telemetry=useHealthPlanTelemetry(),{runtime:runtime}=useEverfurContext(),sub=useHealthPlanSubscription({petRef:petRef,productId:item.productId,enabled:options.subscriptions!==false&&design.pick.none!==true,...options.subscriptionRepository?{repository:options.subscriptionRepository}:{},...options.lifecycle!==void 0?{lifecycle:options.lifecycle}:{},...options.refreshKey!==void 0?{refreshKey:options.refreshKey}:{}}),[mode,setMode]=react.useState("sub"),[added,setAdded]=react.useState(false),[extras,setExtras]=react.useState(()=>/* @__PURE__ */new Set),[sheet,setSheet]=react.useState(null),[started,setStarted]=react.useState(null),tapKey=react.useRef(null),[toast,setToast]=react.useState(null),toastTimer=react.useRef(null),clockRef=react.useRef(clock);clockRef.current=clock,react.useEffect(()=>()=>{toastTimer.current!==null&&clockRef.current.clearTimeout(toastTimer.current)},[]);let withTracking=line=>[line,copy.trackingComesByText].filter(x=>x!=="").join(" "),say=line=>{rules.dropEmptyToast&&line===""||(setToast(line),toastTimer.current!==null&&clock.clearTimeout(toastTimer.current),toastTimer.current=clock.setTimeout(()=>setToast(null),TOAST_MS))},everfur=options.checkout==="everfur_stripe"&&rules.checkoutReachable,ownPages=useHealthPlanPageRepository(),pages=options.pageRepository??ownPages,checkoutTap=react.useRef(null),[redirecting,setRedirecting]=react.useState(false),shop=options.shop??everfur,[cart,setCartState]=react.useState(()=>shop?store.readCart(petRef):[]),cartRef=react.useRef(cart);react.useEffect(()=>{if(!shop||store.loadCart===void 0)return;let live=true;return store.loadCart(petRef).then(()=>{if(!live)return;let kept=store.readCart(petRef);cartRef.current.length===0&&kept.length>0&&(cartRef.current=kept,setCartState(kept))}),()=>{live=false}},[shop,store,petRef]);let setCart=react.useCallback(f=>{let next=f(cartRef.current);cartRef.current=next,store.writeCart(petRef,next),setCartState(next)},[petRef,store]),[screens,setScreens]=react.useState([]),ownSubs=useHealthPlanSubscriptionRepository(),subsRepo=options.subscriptionRepository??ownSubs,[everfurOrders,setEverfurOrders]=react.useState(HEALTH_PLAN_ORDERS_EMPTY),[cartOff,setCartOff]=react.useState(false),[weightSaved,setWeightSaved]=react.useState(false),[recent,setRecent]=react.useState([]),others=options.others??[],planItems=[item,...others],ownOrders=mergeHealthPlanOrders(recent,everfurOrders.orders),hostOrders=options.shopOrders??[],orderNumber=key=>healthPlanOrderNumber(key,ownOrders,hostOrders),push=react.useCallback(screen=>{setSheet(null),setScreens(prev=>pushHealthPlanScreen(prev,screen))},[]),top=screens.length>0?screens[screens.length-1]:void 0,overlay2=healthPlanOverlayOf(sheet,started,top),under=healthPlanUnderOf(started,top),closeOverlays=react.useCallback(()=>{setSheet(null),setStarted(null),setScreens([])},[]),back=react.useCallback(()=>{sheet!==null?setSheet(null):started!==null?setStarted(null):setScreens(prev=>prev.slice(0,-1))},[sheet,started]),title=(o=>{switch(o){case"started":return started?.kind==="once"?copy.placedHeader:copy.startedHeader;case"cart":return copy.cartTitle;case"placed":return copy.placedHeader;case"orders":return copy.orders;case"order":return copy.orderTitle(orderNumber(top?.kind==="order"?top.key:null));case"product":{let id=top?.kind==="product"?top.productId:null;return id===null?void 0:planItems.find(x=>x.productId===id)?.title}default:return}})(under),full=under==="started"||under==="cart"||under==="placed"||under==="product",onOverlayChange=options.onOverlayChange,callHostRef=react.useRef(callHost2);callHostRef.current=callHost2,react.useEffect(()=>{onOverlayChange!==void 0&&callHostRef.current(onOverlayChange,overlay2,{close:closeOverlays,back:back,...title===void 0?{}:{title:title},...full?{full:full}:{}})},[overlay2,onOverlayChange,closeOverlays,back,title,full]);let quote=sub.phase==="ready"?sub.quote:null,subscription=sub.subscription,active=subscription?.status==="active",pickPriced=(quote?.boxPrice??item.price)!==null,canSubscribe=quote!==null&&(!rules.subscribeNeedsPrice||pickPriced),offer=canSubscribe&"e.offerApplies&&subscription===null,every=active?subscription.intervalDays:canSubscribe?quote.defaultIntervalDays:0,fmt=(n,currency2)=>formatHealthPlanPriceWith(n,currency2,{dropZeroCents:false,...options.priceFormat,...locale?{locale:locale}:{}}),fmtWhole=(n,currency2)=>formatHealthPlanPriceWith(n,currency2,{dropZeroCents:true,...options.priceFormat,...locale?{locale:locale}:{}}),currency=quote?.currency??item.currency,boxPrice=quote?.boxPrice??item.price,oneBox=quote?.oneBox??null,prices=(days,productName=item.title)=>({petName:petName,productName:productName,first:fmt(offer&"e?quote.firstBoxPrice:boxPrice,currency),box:fmt(boxPrice,currency),once:fmt(oneBox?.price??boxPrice,currency),onceDiscountPercent:oneBox?.discountPercent??0,intervalDays:days,discountPercent:offer&"e?quote.firstBoxDiscountPercent:0,offer:offer}),pr=prices(every),priced=pr.box!==null,buyMode=canSubscribe?mode:"once",day=iso=>formatHealthPlanDay(iso,locale),nextBoxDay=s=>day(s.timeline.find(step=>step.step==="next_box_ships")?.on??s.nextBoxDate),buyOnce=(target=item)=>{options.onBuy?callHost2(options.onBuy,target):options.onCheckout&&callHost2(options.onCheckout,[target])},partnerBuys=options.onBuy!==void 0||options.onCheckout!==void 0,settle=res=>res.ok?(options.onSubscriptionChange&&callHost2(options.onSubscriptionChange,res.value),res.value):(say(res.error.displayMessage),null),redirect=async(purchase,intervalDays,target=item)=>{if(redirecting)return;let urls=ports.returnUrls();if(urls===null)return;let sig=`${target.productId}:${purchase}:${intervalDays??""}`;checkoutTap.current?.sig!==sig&&(checkoutTap.current={sig:sig,key:ports.mintKey()}),setRedirecting(true);let res=await pages.startCheckout(petRef,{productId:target.productId,purchase:purchase,...intervalDays===null?{}:{intervalDays:intervalDays},...urls},checkoutTap.current.key);if(setRedirecting(false),!res.ok){say(res.error.displayMessage);return}store.rememberCheckout(petRef,res.value.checkoutId),ports.openUrl(res.value.url)},itemOf2=productId=>planItems.find(x=>x.productId===productId),inCart=productId=>cart.find(x=>x.productId===productId),isPick=productId=>productId===item.productId,lineSub=x=>isPick(x.productId)&&canSubscribe&&!active&&x.mode==="sub",unitOf=x=>isPick(x.productId)?lineSub(x)?offer&"e?quote.firstBoxPrice:boxPrice:oneBox?.price??boxPrice:itemOf2(x.productId)?.price??null,lines=cart.filter(x=>itemOf2(x.productId)!==void 0),lineCount=lines.reduce((n,x)=>n+x.qty,0),cartTotal=roundCents(lines.reduce((n,x)=>n+(unitOf(x)??0)*x.qty,0)),subLine=lines.find(lineSub)??null,cartOn=everfur&&!cartOff&&pages.startCartCheckout!==void 0,hostLines=!everfur&&options.onCheckoutLines!==void 0,boxesOn=cartOn||hostLines,wasOf=(was,cur)=>{let m=/^[^\d]*(\d+(?:\.\d{1,2})?)[^\d]*$/.exec(was.replace(/,/g,""));return(m?fmt(Number(m[1]),cur??currency):null)??was},lineView=x=>{let it=itemOf2(x.productId)??item,subbed=lineSub(x),pick2=isPick(x.productId),ex=pick2||!rules.linesFromExtras?void 0:design.extras?.items.find(e=>e.productId===x.productId),lp=pick2?prices(x.every,it.title):{...prices(0,it.title),offer:false};return{key:x.productId,name:it.title,imageUrl:it.imageUrl??ex?.imageUrl??null,quantity:x.qty,subscription:subbed,price:fmt(unitOf(x),pick2?currency:it.currency),was:pick2?subbed?offer?lp.box:null:oneBox!==null&&boxPrice!==null&&oneBox.price<boxPrice?lp.box:null:ex?.was?wasOf(ex.was,it.currency):null,note:pick2?subbed?copy.cartSubLine(lp):copy.cartOnceLine(lp,active):null,...rules.linesFromExtras?{tag:ex?.tag??null}:{},modes:pick2&&canSubscribe&&!active?{label:copy.cartModeLabel(it.title),sub:{label:copy.cartModeSubscribe(lp),price:lp.first},once:{label:copy.cartModeOnce(lp),price:lp.once}}:null,every:subbed&"e!==null?{options:quote.intervalOptions,selected:x.every}:null,maxQuantity:boxesOn&&!subbed?5:1,lp:lp}},views=lines.map(lineView),renewPrices=subLine===null?null:prices(subLine.every),addToCart=(target,m,qty=1,quiet=false)=>{if(inCart(target.productId)){push({kind:"cart"});return}let subbing=isPick(target.productId)&&canSubscribe&&!active&&m==="sub",boxes=subbing?1:Math.max(1,Math.min(boxesOn?5:1,qty));setCart(prev=>[...prev,{productId:target.productId,mode:subbing?"sub":"once",every:quote?.defaultIntervalDays??0,qty:boxes}]),quiet||say(copy.addedToCart(isPick(target.productId)?pr:{...prices(0,target.title),offer:false},subbing))},showCart=()=>setScreens(prev=>{let at=prev.findIndex(x=>x.kind==="cart");return at>=0?prev.slice(0,at+1):[...prev,{kind:"cart"}]}),editLine=(productId,f)=>setCart(prev=>editHealthPlanCartLine(prev,productId,f)),stepQuantity=(productId,by)=>editLine(productId,x=>({...x,qty:Math.max(1,Math.min(boxesOn&&!lineSub(x)?5:1,x.qty+by))})),removeLine=productId=>{editLine(productId,()=>null),say(copy.removedFromCart(itemOf2(productId)?.title??""))},apart=cartOn&&subLine!==null&&lines.length>1,batch=apart?lines.filter(x=>!lineSub(x)):lines,batchTotal=roundCents(batch.reduce((n,x)=>n+(unitOf(x)??0)*x.qty,0)),batchSub=batch.find(lineSub)??null,batchRenew=batchSub===null?null:prices(batchSub.every),cartReady=lines.length>0&&lines.every(x=>unitOf(x)!==null)&&(lines.length===1&&(lines[0]?.qty??0)===1?true:cartOn?batch.length>0&&batch.length<=10:!everfur&&(options.onCheckout!==void 0||hostLines)&&lines.every(x=>!lineSub(x))),redirectCart=async batchLines=>{if(redirecting||pages.startCartCheckout===void 0)return;let urls=ports.returnUrls();if(urls===null)return;let sig=`cart:${batchLines.map(x=>`${x.productId}:${x.qty}:${lineSub(x)?x.every:""}`).join("|")}`;checkoutTap.current?.sig!==sig&&(checkoutTap.current={sig:sig,key:ports.mintKey()}),setRedirecting(true);let res=await pages.startCartCheckout(petRef,{items:batchLines.map(x=>{let subbing=lineSub(x);return{productId:x.productId,purchase:subbing?"subscription":"one_box",...subbing?{intervalDays:x.every}:{},quantity:subbing?1:x.qty}}),...urls},checkoutTap.current.key);if(setRedirecting(false),!res.ok){let why=healthPlanCheckoutRefusal(res.error);if(why==="cart_disabled"){setCartOff(true),setSheet(null),say(copy.cartOneAtATime===""?res.error.displayMessage:copy.cartOneAtATime);return}if(why==="cart_has_subscription"){setSheet(null),say(copy.cartSubscriptionApart===""?res.error.displayMessage:copy.cartSubscriptionApart);return}say(res.error.displayMessage);return}store.rememberCheckout(petRef,res.value.checkoutId),ports.openUrl(res.value.url)},orderOneBox=async()=>{tapKey.current===null&&(tapKey.current=ports.mintKey());let res=await sub.buyOneBox(tapKey.current);return res.ok?(tapKey.current=null,options.onOneBoxOrder&&callHost2(options.onOneBoxOrder,res.value),res.value):(say(res.error.displayMessage),null)},placeCart=async()=>{if(!cartReady)return;if(everfur&&cartOn&&!(batch.length===1&&(batch[0]?.qty??0)===1)){batch.map(x=>itemOf2(x.productId)).filter(x=>x!==void 0);trackCheckoutStarted(telemetry,petRef,{count:batch.reduce((n,x)=>n+x.qty,0),subtotal:batchTotal,currency:currency}),await redirectCart(batch);return}if(hostLines&&!(lines.length===1&&(lines[0]?.qty??0)===1)){let handed=lines.flatMap(x=>{let it=itemOf2(x.productId);return it===void 0?[]:[{item:it,quantity:x.qty}]});trackCheckoutStarted(telemetry,petRef,{items:handed.map(x=>x.item),count:handed.reduce((n,x)=>n+x.quantity,0),subtotal:cartTotal,currency:currency}),bought(lines.map(x=>x.productId)),setSheet(null),setScreens([]),options.onCheckoutLines&&callHost2(options.onCheckoutLines,handed);return}let only=batch.length===1?batch[0]:lines.length===1?lines[0]:void 0;if(only===void 0){options.onCheckout&&callHost2(options.onCheckout,lines.map(x=>itemOf2(x.productId)).filter(x=>x!==void 0));return}let target=itemOf2(only.productId)??item,subbing=lineSub(only);if(trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:unitOf(only),currency:isPick(only.productId)?currency:target.currency}),everfur){await redirect(subbing?"subscription":"one_box",subbing?only.every:null,target);return}if(subbing){let s=settle(await sub.subscribe(only.every));if(s===null)return;bought([s.productId]),setSheet(null),setScreens([]),setStarted({kind:"sub",sub:s});return}if(!isPick(only.productId)||oneBox===null){setSheet(null),hostLines&&(bought([only.productId]),setScreens([])),buyOnce(target);return}let o=await orderOneBox();o!==null&&(bought([o.productId]),placed([o]))},press=()=>{if(trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:item.price,currency:item.price===null?null:item.currency}),!canSubscribe){everfur?redirect("one_box",null):buyOnce();return}tapKey.current=null,setSheet({kind:"checkout",mode:buyMode,every:quote.defaultIntervalDays})},pressOther=target=>{trackCheckoutStarted(telemetry,petRef,{count:1,subtotal:target.price,currency:target.price===null?null:target.currency}),everfur?redirect("one_box",null,target):buyOnce(target)},confirmCheckout=async()=>{if(sheet?.kind!=="checkout")return;let isSub=sheet.mode==="sub";if(everfur){await redirect(isSub?"subscription":"one_box",isSub?sheet.every:null);return}if(!isSub){if(oneBox===null){setSheet(null),buyOnce();return}let o=await orderOneBox();if(o===null)return;setSheet(null),placed([o]);return}let s=settle(await sub.subscribe(sheet.every));s!==null&&(setSheet(null),setStarted({kind:"sub",sub:s}))},changeInterval=d=>{subscription===null||d===subscription.intervalDays||sub.changeInterval(d).then(settle)},skip=async()=>{let s=settle(await sub.skip());s!==null&&say(copy.skipped(prices(s.intervalDays),nextBoxDay(s)))},cancel=async()=>{let mp=prices(subscription?.intervalDays??every);settle(await sub.cancel())!==null&&(setSheet(null),setMode("sub"),say(copy.cancelled(mp)))},seeOrdersFromManage=()=>{setSheet(null),top?.kind!=="orders"&&push({kind:"orders"})},toggleAdded=questions=>{let next=!added;setAdded(next),options.onAddToVisit&&callHost2(options.onAddToVisit,next,questions)},toggleExtra=(key,on)=>{let next=!on;setExtras(prev=>{let out=new Set(prev);return next?out.add(key):out.delete(key),out}),options.onExtra&&callHost2(options.onExtra,key,next)},pressExtra=(key,product,on)=>{if(product!==void 0){shop?addToCart(product,"once"):pressOther(product);return}toggleExtra(key,on)},ordersOpen=screens.some(x=>x.kind==="orders"||x.kind==="order"),{moreOrders:moreOrders}=useHealthPlanOrdersList({shop:shop,ordersOpen:ordersOpen,subsRepo:subsRepo,petRef:petRef,everfurOrders:everfurOrders,setEverfurOrders:setEverfurOrders,say:say}),weightKnown=options.weightKnown!==false||weightSaved,kg=options.weightUnit==="kg",[weightInput,setWeightInput]=react.useState(""),[weightError,setWeightError]=react.useState(""),[savingWeight,setSavingWeight]=react.useState(false),openWeight=()=>{setWeightError(""),setSheet({kind:"weight"})},saveWeight=async()=>{let n=Math.round(Number.parseFloat(weightInput.replace(",","."))*10)/10;if(!(kg?n>=KG_MIN&&n<=KG_MAX:n>=LB_MIN&&n<=LB_MAX)){setWeightError(kg?copy.weightErrorKg:copy.weightError);return}let{weightKg:weightKg,pounds:lb}=healthPlanWeightForSave(n,kg);setSavingWeight(true);let res=options.onSaveWeight?await options.onSaveWeight(weightKg,lb):await runtime.updatePet(petRef,{weightKg:weightKg});if(setSavingWeight(false),!res.ok){setWeightError(res.error.displayMessage);return}setWeightError(""),setWeightSaved(true),setSheet(null),say(kg?copy.weightSavedKg(String(n)):copy.weightSaved(String(lb))),options.onWeightSaved&&callHost2(options.onWeightSaved,weightKg)},{noVet:noVet,flashKey:flashKey}=useHealthPlanBlanksLanding({petRef:petRef,noVet:options.noVet,blanksFacts:options.blanksFacts,store:store,say:say,line:copy.recordsLanded}),placed=orders=>{let first=orders[0];if(first!==void 0){if(!shop){setStarted({kind:"once",order:first});return}setRecent(prev=>addRecentHealthPlanOrders(prev,orders)),setSheet(null),setScreens([{kind:"placed",orders:orders}])}},bought=productIds=>{let gone=new Set(productIds.filter(x=>x!==null));gone.size>0&&setCart(prev=>prev.filter(x=>!gone.has(x.productId)))};return{sub:sub,copy:copy,everfur:everfur,shop:shop,partnerBuys:partnerBuys,redirecting:redirecting,pages:pages,quote:quote,subscription:subscription,active:active,canSubscribe:canSubscribe,offer:offer,every:every,currency:currency,boxPrice:boxPrice,oneBox:oneBox,pr:pr,priced:priced,mode:mode,buyMode:buyMode,fmt:fmt,fmtWhole:fmtWhole,prices:prices,day:day,nextBoxDay:nextBoxDay,withTracking:withTracking,sheet:sheet,started:started,screens:screens,top:top,overlay:overlay2,under:under,title:title,full:full,toast:toast,added:added,extras:extras,planItems:planItems,cart:cart,lines:lines,lineCount:lineCount,cartTotal:cartTotal,subLine:subLine,cartOn:cartOn,hostLines:hostLines,boxesOn:boxesOn,wasOf:wasOf,views:views,renewPrices:renewPrices,apart:apart,batch:batch,batchTotal:batchTotal,batchSub:batchSub,batchRenew:batchRenew,cartReady:cartReady,itemOf:itemOf2,inCart:inCart,isPick:isPick,lineSub:lineSub,unitOf:unitOf,lineView:lineView,everfurOrders:everfurOrders,ownOrders:ownOrders,orderNumber:orderNumber,weightKnown:weightKnown,kg:kg,weightInput:weightInput,weightError:weightError,savingWeight:savingWeight,noVet:noVet,flashKey:flashKey,say:say,setMode:setMode,openSheet:setSheet,closeSheet:()=>setSheet(null),push:push,replaceScreens:setScreens,closeStarted:()=>setStarted(null),closeOverlays:closeOverlays,back:back,toggleAdded:toggleAdded,toggleExtra:toggleExtra,pressExtra:pressExtra,buyOnce:buyOnce,press:press,pressOther:pressOther,confirmCheckout:confirmCheckout,changeInterval:changeInterval,skip:skip,cancel:cancel,seeOrdersFromManage:seeOrdersFromManage,addToCart:addToCart,showCart:showCart,editLine:editLine,stepQuantity:stepQuantity,removeLine:removeLine,placeCart:placeCart,moreOrders:moreOrders,openWeight:openWeight,setWeightInput:setWeightInput,saveWeight:saveWeight,returnHandlers:{onPaid:state2=>{let run2=state2.subscription,orders=state2.orders??(state2.order===null?[]:[state2.order]);if(run2!==null)options.onSubscriptionChange&&callHost2(options.onSubscriptionChange,run2),rules.closeOnReturn&&(setSheet(null),setScreens([])),setStarted({kind:"sub",sub:run2});else if(orders.length>0){for(let o of orders)options.onOneBoxOrder&&callHost2(options.onOneBoxOrder,o);placed(orders)}bought([run2?.productId??null,...orders.map(o=>o.productId)]),sub.refresh()},onFailed:()=>{setSheet(null),shop&&(rules.closeOnReturn&&setStarted(null),setScreens([{kind:"cart"}])),copy.checkoutFailed!==""&&say(copy.checkoutFailed)},onCancel:()=>setRedirecting(false),onTimeout:()=>{shop&&(setSheet(null),rules.closeOnReturn&&setStarted(null),setScreens([{kind:"orders"}]))},onError:error=>say(error.displayMessage)}}}function useHealthPlanRecordsEmpty(reader,petRef){let[empty,setEmpty]=react.useState(null);return react.useEffect(()=>{if(reader===void 0)return;let live=true;return reader.getRecord(petRef).then(res=>{live&&setEmpty(res.ok?res.value.withheld!==true&&res.value.is_empty===true:null)}).catch(()=>{}),()=>{live=false}},[reader,petRef]),empty}var CLOSE_FALLBACK="Close",HEALTH_PLAN_TOP_CARD_COPY=/* @__PURE__ */Object.freeze({action:who=>who.possessive===null?null:`See ${who.possessive} Health Plan`,ask:"What does it mean?",askPrompt:(focus,ask)=>focus.risk?.lead?`${focus.risk.lead} ${ask}`:`${focus.title}: ${ask}`,close:who=>who.possessive===null?null:`Close ${who.possessive} focus`,resultsKicker:who=>who.possessive===null?null:`${capital(who.possessive)} results`,resultsClose:who=>who.possessive===null?null:`Close ${who.possessive} results`,resultsTopRisk:"Top risk"});function capital(word){return word.charAt(0).toUpperCase()+word.slice(1)}function healthPlanPossessive(pet){let sex=typeof pet.sex=="string"?pet.sex.trim().toLowerCase():null;if(sex==="female")return"her";if(sex==="male")return"his";let name=typeof pet.name=="string"?pet.name.trim():"";return name!==""?`${name}'s`:null}function healthPlanTopCard(page,options={}){let focus=page?.page?.focus;if(page===null||focus===void 0||focus.title.trim()===""||focus.kicker.trim()==="")return;let copy={...HEALTH_PLAN_TOP_CARD_COPY,...options.copy},who={pet:page.pet,possessive:healthPlanPossessive(page.pet)},badge=focus.sources?.find(source=>source.label.trim()!=="")?.label,onOpenPlan=options.onOpenPlan,action=onOpenPlan===void 0?null:copy.action(who),close=copy.close(who),ask=copy.ask.trim(),results=options.results!==void 0&&focus.report!==void 0?options.results:void 0;if(results!==void 0){let kicker=copy.resultsKicker(who)?.trim()||focus.kicker,shut=copy.resultsClose(who),onTop=results.onTopRisk??onOpenPlan,top={key:"top-risk",label:copy.resultsTopRisk,title:focus.title,...focus.risk?.lead?{line:focus.risk.lead}:{},tone:"risk",...onTop===void 0?{}:{onPress:onTop}};return{kicker:kicker,...badge===void 0?{}:{badge:badge},title:focus.title,results:[top,...results.rows??[]],...action===null||action.trim()===""||onOpenPlan===void 0?{}:{action:{label:action,onPress:onOpenPlan}},...ask===""?{}:{ask:{label:ask,prompt:copy.askPrompt(focus,ask)}},closeLabel:shut===null||shut.trim()===""?CLOSE_FALLBACK:shut,pill:kicker,...options.renderIcon===void 0?{}:{renderIcon:options.renderIcon}}}return{kicker:focus.kicker,...badge===void 0?{}:{badge:badge},title:focus.title,...focus.risk?.lead?{lead:focus.risk.lead}:{},...focus.risk?.body?{body:focus.risk.body}:{},...action===null||action.trim()===""||onOpenPlan===void 0?{}:{action:{label:action,onPress:onOpenPlan}},...ask===""?{}:{ask:{label:ask,prompt:copy.askPrompt(focus,ask)}},closeLabel:close===null||close.trim()===""?CLOSE_FALLBACK:close,pill:focus.kicker,...options.renderIcon===void 0?{}:{renderIcon:options.renderIcon}}}var HEALTH_PLAN_FOCUS_RN_COPY=/* @__PURE__ */Object.freeze({...HEALTH_PLAN_FOCUS_COPY,firstBoxShips:"Her first box ships.",placedShips:"It ships.",trackingComesByText:"",trackingByText:"",moreOrders:"Load more",checkoutFailed:"That didn't go through. Please try again.",back:"Back"}),cap=s=>s===""?s:`${s.charAt(0).toUpperCase()}${s.slice(1)}`;function healthPlanPetCopy(pet){let name=pet.name?.trim()??"",her=healthPlanPossessive(pet)??"your pet's",Her=cap(her),them=pet.sex==="female"?"her":pet.sex==="male"?"him":name!==""?name:"your pet",base3=HEALTH_PLAN_FOCUS_COPY,r5=healthPlanFocusCopyFor({name:pet.name,sex:pet.sex});return{jumpKicker:(p,subscribed)=>subscribed?`In ${her} plan, every ${p.intervalDays} days`:p.offer?`${p.discountPercent}% off ${her} first box`:base3.jumpKicker(p,false),firstBoxShips:pet.trackingTexts===true?`${Her} first box ships. Tracking comes by text.`:`${Her} first box ships.`,placedShips:base3.placedShips,trackingComesByText:pet.trackingTexts===true?base3.trackingComesByText:"",trackingByText:pet.trackingTexts===true?base3.trackingByText:"",refill:`A text 3 days before ${her} next box. Reply SKIP to skip it.`,nextBoxShips:p=>`${Her} next box ships, ${p.box??""}.`,startedDone:`Back to ${her} plan`,skipped:(_p,next)=>next===null?"Skipped.":`Skipped. ${Her} next box ships ${next}.`,cancelled:p=>`${p.productName} is cancelled. Restart it from ${her} plan anytime.`,seeOrders:`See ${her} orders`,cartOnceLine:(p,subscribed)=>subscribed?`An extra box. ${Her} plan keeps shipping.`:base3.cartOnceLine(p,false),herSubscription:`${Her} subscription`,ordersHeading:afterSubscription=>afterSubscription?"Orders":`${Her} orders`,addWeightTitle:`Add ${her} weight to size ${her} dose`,addWeightBody:`From a home scale or ${her} last vet visit.`,connectRecordsTitle:`Connect ${her} vet records`,connectRecordsBody:`${Her} weight, visits and labs make ${her} plan sharper.`,weightKicker:`${Her} weight`,weightBody:`From a home scale or ${her} last vet visit. ${Her} plan uses it to size ${her} dose.`,weightField:`${Her} weight`,weightError:`Enter ${her} weight in pounds, like 14.1.`,weightSave:`Save ${her} weight`,weightSaved:lb=>`Saved: ${lb} lb. ${Her} dose is sized for ${them}.`,weightErrorKg:r5.weightErrorKg,weightSavedKg:r5.weightSavedKg,signalsFit:r5.signalsFit,noPick:r5.noPick,saveForCheckup:r5.saveForCheckup,savedForCheckup:r5.savedForCheckup,blanksLabel:r5.blanksLabel,blanksFilledKicker:r5.blanksFilledKicker,blanksWeight:r5.blanksWeight,blanksWeightSource:r5.blanksWeightSource,blanksDoseSource:r5.blanksDoseSource,blanksShots:r5.blanksShots,blanksShotsSource:r5.blanksShotsSource,recordsLanded:r5.recordsLanded}}var BLANKS_MEMO_KV_PREFIX="everfur.healthPlan.blanks",NONE=/* @__PURE__ */Object.freeze({waited:null,flashed:null}),memos=/* @__PURE__ */new Map,loads=/* @__PURE__ */new Map,keyOf2=petRef=>`${BLANKS_MEMO_KV_PREFIX}:${petRef}`;function parse(raw){if(raw===null)return NONE;try{let o=JSON.parse(raw);if(o===null||typeof o!="object")return NONE;let r=o;return{waited:typeof r.waited=="string"?r.waited:null,flashed:typeof r.flashed=="string"?r.flashed:null}}catch{return NONE}}function loadBlanksMemo(kv,petRef){let own=memos.get(petRef);if(own!==void 0)return Promise.resolve(own);let load=loads.get(petRef);return load===void 0&&(load=(async()=>{let read=NONE;try{read=kv?parse(await kv.getItem(keyOf2(petRef))):NONE}catch{}let memo=memos.get(petRef)??read;return memos.set(petRef,memo),memo})(),loads.set(petRef,load)),load}function blanksMemo(petRef){return memos.get(petRef)??NONE}function setBlanksMemo(kv,petRef,memo){if(memos.set(petRef,memo),!!kv)try{kv.setItem(keyOf2(petRef),JSON.stringify(memo)).catch(()=>{})}catch{}}var CHECKOUT_PARAM="everfur_checkout",CHECKOUT_CANCEL_PARAM="everfur_checkout_cancel",STRIPE_SESSION_ID="{CHECKOUT_SESSION_ID}",CHECKOUT_POLL_MS=2e3,CHECKOUT_POLL_TRIES=30;function validReturnUrl(url){return typeof url!="string"?false:/^https:\/\/[^/?#\s]+[^\s]*$/i.test(url.trim())}var PARAM_RE=new RegExp(`([?&])(?:${CHECKOUT_PARAM}|${CHECKOUT_CANCEL_PARAM})=[^&#]*&?`,"g");function checkoutReturnUrl(base3,name,value){let hashAt=base3.indexOf("#"),hash=hashAt===-1?"":base3.slice(hashAt),head=hashAt===-1?base3:base3.slice(0,hashAt);head=head.replace(PARAM_RE,"$1").replace(/[?&]$/,"");let sep=head.includes("?")?"&":"?";return`${head}${sep}${name}=${value}${hash}`}function readCheckoutReturn(url,base3){let strip=u=>u.split(/[?#]/)[0]?.replace(/\/+$/,"").toLowerCase()??"";if(strip(url)!==strip(base3))return null;let query=url.split("#")[0]?.split("?")[1]??"",params=/* @__PURE__ */new Map;for(let pair of query.split("&")){if(pair==="")continue;let at=pair.indexOf("="),key=at===-1?pair:pair.slice(0,at),value=at===-1?"":pair.slice(at+1);try{value=decodeURIComponent(value)}catch{}params.set(key,value)}if(params.has(CHECKOUT_CANCEL_PARAM))return{kind:"cancel"};let id=params.get(CHECKOUT_PARAM);return id===void 0?null:{kind:"return",sessionId:id===""||id===STRIPE_SESSION_ID?null:id}}function mintTapKey(){let c=globalThis.crypto;return c?.randomUUID?c.randomUUID():`tap-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}var SHOP_CART_KV_PREFIX="everfur.healthPlan.cart",SHOP_CHECKOUT_KV_PREFIX="everfur.healthPlan.checkout",checkouts=/* @__PURE__ */new Map,carts=/* @__PURE__ */new Map,checkoutTouched=/* @__PURE__ */new Set,cartTouched=/* @__PURE__ */new Set,loads2=/* @__PURE__ */new WeakMap,DONE=Promise.resolve();function parseCart(raw){if(raw===null)return[];try{let o=JSON.parse(raw);return Array.isArray(o)?o.flatMap(x=>{if(x===null||typeof x!="object")return[];let r=x,productId=r.productId,mode=r.mode,every=r.every,qty=r.qty;return typeof productId!="string"||mode!=="sub"&&mode!=="once"||typeof every!="number"||typeof qty!="number"?[]:[{productId:productId,mode:mode,every:every,qty:Math.max(1,Math.min(mode==="sub"?1:5,Math.round(qty)))}]}):[]}catch{return[]}}function write(kv,key,value){if(kv)try{(value===null?kv.removeItem(key):kv.setItem(key,value)).catch(()=>{})}catch{}}function loadShopMemory(kv,petRef){if(!kv)return DONE;let perPet=loads2.get(kv);perPet===void 0&&(perPet=/* @__PURE__ */new Map,loads2.set(kv,perPet));let load=perPet.get(petRef);return load===void 0&&(load=(async()=>{let cart=[],checkout=null;try{let[rawCart,rawCheckout]=await Promise.all([kv.getItem(`${SHOP_CART_KV_PREFIX}:${petRef}`),kv.getItem(`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`)]);cart=parseCart(rawCart),checkout=typeof rawCheckout=="string"&&rawCheckout!==""?rawCheckout:null}catch{}!cartTouched.has(petRef)&&cart.length>0&&carts.set(petRef,cart),!checkoutTouched.has(petRef)&&checkout!==null&&checkouts.set(petRef,checkout)})(),perPet.set(petRef,load)),load}function rememberCheckout(petRef,checkoutId,kv){checkoutTouched.add(petRef),checkouts.set(petRef,checkoutId),write(kv,`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`,checkoutId)}function recallCheckout(petRef){return checkouts.get(petRef)??null}function forgetCheckout(petRef,kv){checkoutTouched.add(petRef),checkouts.delete(petRef),write(kv,`${SHOP_CHECKOUT_KV_PREFIX}:${petRef}`,null)}function readCart(petRef){return carts.get(petRef)??[]}function writeCart(petRef,lines,kv){cartTouched.add(petRef),lines.length===0?carts.delete(petRef):carts.set(petRef,lines),write(kv,`${SHOP_CART_KV_PREFIX}:${petRef}`,lines.length===0?null:JSON.stringify(lines))}function rnFocusStore(kv){return{readCart:readCart,writeCart:(petRef,lines)=>writeCart(petRef,lines,kv),loadCart:petRef=>loadShopMemory(kv,petRef),rememberCheckout:(petRef,checkoutId)=>rememberCheckout(petRef,checkoutId,kv),readBlanksMemo:blanksMemo,writeBlanksMemo:(petRef,memo)=>setBlanksMemo(kv,petRef,memo),loadBlanksMemo:petRef=>loadBlanksMemo(kv,petRef)}}var RN_RULES_BASE=/* @__PURE__ */Object.freeze({dropEmptyToast:true,subscribeNeedsPrice:false,closeOnReturn:true,linesFromExtras:false});var WAITING=/* @__PURE__ */new Set(["requested","awaiting_clinic","awaiting_upload","received","parsing","in_review"]),VACCINE=/vaccin|rabies|dhpp|booster|bordetella|lepto|lyme|parvo|distemper/i,LB_PER_KG2=2.20462262;function dayMs(value){if(value==null||value.length===0)return null;let ms=Date.parse(/^\d{4}-\d{2}-\d{2}$/.test(value)?`${value}T00:00:00Z`:value);return Number.isNaN(ms)?null:ms}function kilograms(value,unit){return value===null||!Number.isFinite(value)||value<=0||unit===null?null:/^\s*kg|kilo/i.test(unit)?value:/^\s*(lb|lbs|pound)/i.test(unit)?value/LB_PER_KG2:null}function healthPlanRecordsWeightKg(record){if(record===null||record.isEmpty||record.withheld)return null;let readings=[];for(let series of record.entitySeries)if(series.key.startsWith("body_weight"))for(let point of series.points){if(point.origin==="owner_reported")continue;let at=dayMs(point.at),unit=point.display?.replace(/^[\d.,\s]+/,"")??null,kg=kilograms(point.value,unit);at!==null&&kg!==null&&readings.push({at:at,kg:kg})}for(let entity of record.entities){if(entity.category!=="body_weight"||entity.origin==="owner_reported")continue;let at=dayMs(entity.observedAt),kg=kilograms(entity.value===null?null:Number.parseFloat(entity.value),entity.unit);at!==null&&kg!==null&&readings.push({at:at,kg:kg})}return readings.length===0?null:(readings.sort((a,b)=>b.at-a.at),readings[0]?.kg??null)}function healthPlanNextShotsAt(record,today){if(record===null||record.isEmpty||record.withheld)return null;let next=null;for(let item of record.forwardLooking){if(!VACCINE.test(item.title))continue;let due=dayMs(item.dueAt);due===null||due<today||(next===null||due<next)&&(next=due)}return next}function latestClinicRequest(requests){return requests.filter(r=>r.source==="clinic_request").slice().sort((a,b)=>(dayMs(b.createdAt)??0)-(dayMs(a.createdAt)??0))[0]}function healthPlanRecordsHoldNoBlanks(input,now){let asked=latestClinicRequest(input.requests);if(asked===void 0||asked.status!=="published"||input.record===null||input.record.withheld)return false;let today=Math.floor(now/864e5)*864e5;return healthPlanRecordsWeightKg(input.record)===null&&healthPlanNextShotsAt(input.record,today)===null}function healthPlanBlanksFacts(input,now){let asked=latestClinicRequest(input.requests);if(asked===void 0)return null;let clinicName=asked.clinicName?.trim()?asked.clinicName.trim():null;if(WAITING.has(asked.status))return{phase:"wait",requestId:String(asked.id),clinicName:clinicName,weightKg:null,nextShotsAt:null};if(asked.status!=="published"||input.record===null||input.record.isEmpty||input.record.withheld)return null;let today=Math.floor(now/864e5)*864e5,weightKg=healthPlanRecordsWeightKg(input.record),nextShotsAt=healthPlanNextShotsAt(input.record,today);return weightKg===null&&nextShotsAt===null?null:{phase:"filled",requestId:String(asked.id),clinicName:clinicName,weightKg:weightKg,nextShotsAt:nextShotsAt}}var COARSE_NOW_TICK_MS=3600*1e3;function useCoarseNow(fixed,shown=true){let[now,setNow]=react.useState(()=>Date.now()),first=react.useRef(true);return react.useEffect(()=>{if(first.current){first.current=false;return}shown&&setNow(Date.now())},[fixed,shown]),react.useEffect(()=>{if(!shown)return;let tick=setInterval(()=>setNow(Date.now()),COARSE_NOW_TICK_MS),onVisible=()=>{document.visibilityState==="visible"&&setNow(Date.now())},doc=typeof document<"u"&&typeof document.addEventListener=="function"?document:null;return doc?.addEventListener("visibilitychange",onVisible),()=>{clearInterval(tick),doc?.removeEventListener("visibilitychange",onVisible)}},[fixed,shown]),now}function RecordsProbe(props){let{status:status,requests:requests,record:record,refresh:refresh}=records.useEverfurRecords({petRef:props.petRef}),{onRead:onRead,petRef:petRef}=props,now=useCoarseNow(),blanks=react.useMemo(()=>healthPlanBlanksFacts({requests:requests,record:record},now),[requests,record,now]),heldNone=react.useMemo(()=>healthPlanRecordsHoldNoBlanks({requests:requests,record:record},now),[requests,record,now]);react.useEffect(()=>{onRead({missing:status==="empty"||heldNone,blanks:blanks})},[status,heldNone,blanks,onRead]);let reread=react.useRef(refresh);return reread.current=refresh,react.useEffect(()=>onHealthPlanRecordsLanded((pet,source)=>{pet===petRef&&source==="host"&&reread.current()}),[petRef]),null}var initialRead=/* @__PURE__ */new Set;function useCheckoutReturn(options){let{enabled:enabled,petRef:petRef,pages:pages,returnUrl:returnUrl,lifecycle:lifecycle,kv:kv}=options,handlers=react.useRef(options);handlers.current=options,react.useEffect(()=>{if(!enabled||returnUrl===null)return;let live=true,polling=false,run2=0,timer=null,poll=async(checkoutId,tries,mine)=>{let res=await pages.getCheckout(petRef,checkoutId);if(!(!live||mine!==run2)){if(res.ok&&res.value.status==="paid"){polling=false,forgetCheckout(petRef,kv),handlers.current.onPaid(res.value);return}if(res.ok&&(res.value.status==="failed"||res.value.status==="expired")){polling=false,forgetCheckout(petRef,kv),handlers.current.onFailed();return}if(!res.ok&&!res.error.retryable){polling=false,forgetCheckout(petRef,kv),handlers.current.onError(res.error);return}if(tries<=1){polling=false,forgetCheckout(petRef,kv),handlers.current.onTimeout();return}timer=setTimeout(()=>{poll(checkoutId,tries-1,mine)},CHECKOUT_POLL_MS)}},start=checkoutId=>{polling||(polling=true,poll(checkoutId,CHECKOUT_POLL_TRIES,run2))},loaded=loadShopMemory(kv,petRef),onUrl=url=>{let back=readCheckoutReturn(url,returnUrl);if(back!==null){if(back.kind==="cancel"){run2+=1,polling=false,timer!==null&&clearTimeout(timer),timer=null,forgetCheckout(petRef,kv),handlers.current.onCancel();return}loaded.then(()=>{if(!live)return;let id=recallCheckout(petRef)??back.sessionId;id!==null&&start(id)})}},resume=()=>{loaded.then(()=>{if(!live)return;let id=recallCheckout(petRef);id!==null&&start(id)})},sub=reactNative.Linking.addEventListener("url",event=>onUrl(event.url));reactNative.Linking.getInitialURL().then(url=>{!live||url===null||url===void 0||initialRead.has(url)||readCheckoutReturn(url,returnUrl)!==null&&(initialRead.add(url),onUrl(url))}).catch(()=>{}).then(resume);let offForeground;if(lifecycle)offForeground=lifecycle.onForeground(resume);else{let app=reactNative.AppState.addEventListener("change",next=>{next==="active"&&resume()});offForeground=()=>app.remove()}return()=>{live=false,timer!==null&&clearTimeout(timer),sub.remove(),offForeground()}},[enabled,petRef,pages,returnUrl,lifecycle,kv])}var BOX2=24,FINE2=16,SEAM2=.8,fine2=dp=>Math.round(dp*FINE2);function place2(cx,cy,W,H,ux,uy){let left=cx-W/2,top=cy-H/2,x=Math.round(left),y=Math.round(top);return{position:"absolute",left:x,top:y,width:W,height:H,transform:[{translateX:left-x},{translateY:top-y},{rotate:`${Math.atan2(uy,ux)*180/Math.PI}deg`},{scale:1/FINE2}]}}function strokePieces2(icon,k2,out){for(let s of icon.strokes){let w=s.width*k2,pts=s.points,n=pts.length/2,last=s.closed?n:n-1;for(let i=0;i<last;i+=1){let j=(i+1)%n,px2=(pts[i*2]??0)*k2,py=(pts[i*2+1]??0)*k2,dx=(pts[j*2]??0)*k2-px2,dy=(pts[j*2+1]??0)*k2-py,len=Math.hypot(dx,dy);if(len===0&&!(n===2&&s.cap))continue;let ux=len===0?1:dx/len,uy=len===0?0:dy/len,e0=s.closed||i>0||s.cap?w/2:0,e1=s.closed||j!==n-1||s.cap?w/2:0,along=(len+e1-e0)/2;out.push({paint:"backgroundColor",style:{...place2(px2+ux*along,py+uy*along,fine2(len+e0+e1),fine2(w),ux,uy),borderTopLeftRadius:e0>0?fine2(w)/2:0,borderBottomLeftRadius:e0>0?fine2(w)/2:0,borderTopRightRadius:e1>0?fine2(w)/2:0,borderBottomRightRadius:e1>0?fine2(w)/2:0,...s.opacity===void 0?{}:{opacity:s.opacity}}})}}}function boxPieces2(icon,k2,out){for(let b of icon.boxes){let w=(b.w+b.width)*k2,h=(b.h+b.width)*k2;out.push({paint:"borderColor",style:{...place2((b.x-b.width/2)*k2+w/2,(b.y-b.width/2)*k2+h/2,fine2(w),fine2(h),1,0),borderWidth:fine2(b.width*k2),borderRadius:(b.radius+b.width/2)*k2*FINE2,...b.opacity===void 0?{}:{opacity:b.opacity}}})}}function trianglePieces2(icon,k2,out){for(let t of icon.triangles){let p=[0,1,2].map(i=>[(t[i*2]??0)*k2,(t[i*2+1]??0)*k2]),base3=0,len=-1;for(let i=0;i<3;i+=1){let a2=p[i]??[0,0],b=p[(i+1)%3]??[0,0],d=Math.hypot(b[0]-a2[0],b[1]-a2[1]);d>len&&(len=d,base3=i)}if(len<=0)continue;let b0=p[base3]??[0,0],b1=p[(base3+1)%3]??[0,0],a=p[(base3+2)%3]??[0,0],ux=(b1[0]-b0[0])/len,uy=(b1[1]-b0[1])/len,along=(a[0]-b0[0])*ux+(a[1]-b0[1])*uy,across=(a[0]-b0[0])*-uy+(a[1]-b0[1])*ux,h=Math.abs(across),up=across<0,mid=up?-h/2:h/2,bl=fine2(along),br=fine2(len)-bl,bh=fine2(h);out.push({paint:up?"borderBottomColor":"borderTopColor",style:{...place2(b0[0]+ux*(len/2)-uy*mid,b0[1]+uy*(len/2)+ux*mid,bl+br,bh,ux,uy),width:0,height:0,borderLeftWidth:bl,borderRightWidth:br,borderLeftColor:"transparent",borderRightColor:"transparent",...up?{borderBottomWidth:bh}:{borderTopWidth:bh}}})}for(let e of icon.seams){let x0=(e[0]??0)*k2,y0=(e[1]??0)*k2,dx=(e[2]??0)*k2-x0,dy=(e[3]??0)*k2-y0,d=Math.hypot(dx,dy),in0=SEAM2*(e[4]??0),in1=SEAM2*(e[5]??0),bar=d-in0-in1;if(d===0||bar<=0)continue;let mid=in0+bar/2;out.push({paint:"backgroundColor",style:place2(x0+dx/d*mid,y0+dy/d*mid,fine2(bar),fine2(SEAM2),dx/d,dy/d)})}}var cache5=/* @__PURE__ */new Map;function piecesOf2(name,size){let key=`${name}:${size}`,hit=cache5.get(key);if(hit!==void 0)return hit;let icon=DESIGN_RN_PLAN_ICONS[name],out=[],k2=size/BOX2;return boxPieces2(icon,k2,out),strokePieces2(icon,k2,out),trianglePieces2(icon,k2,out),cache5.set(key,out),out}function FocusIcon({name:name,size:size=18,color:color}){let pieces=DESIGN_RN_PLAN_ICONS[name]===void 0?[]:piecesOf2(name,size);/* @__PURE__ */
|
|
139
168
|
return jsxRuntime.jsx(reactNative.View,{accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",testID:`health-plan-icon-${name}`,children:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:{width:size,height:size},children:pieces.map((piece,i)=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[piece.style,{[piece.paint]:color}]},i))})})}function focusPalette(theme){let c=theme.color;if(theme.brightness==="dark")return{ink:c.text.primary,ink2:c.text.secondary,ink3:c.text.muted,paper:c.surfaceSubtle,tile:c.badgeBgNeutral,line:c.brandBorder,card:c.surface,teal:c.brandInk,cyan:c.brandSofter,yellow:c.accent,riskDot:c.errorRed,riskBg:c.badgeBgCritical,riskInk:c.text.primary,clearDot:c.success,clearBg:c.badgeBgPositive,clearInk:c.text.primary,star:c.accent,button:c.primary,onButton:c.onPrimary,jump:c.surfaceSubtle,onJump:c.text.primary,jumpSmall:c.accent,tints:{y:c.badgeBgCaution,c:c.brandSofter,g:c.badgeBgPositive,r:c.badgeBgCritical},scrim:"rgba(0,0,0,0.6)"};let v=v3Palette(theme);return{ink:v.ink,ink2:v.ink2,ink3:v.ink3,paper:v.paper,tile:v.tile,line:v.line,card:v.card,teal:c.brandInk,cyan:c.brandSofter,yellow:v.accent,riskDot:v.riskDot,riskBg:v.riskBg,riskInk:v.riskInk,clearDot:v.clearDot,clearBg:v.clearBg,clearInk:v.clearInk,star:v.watchDot,button:v.primary,onButton:v.onPrimary,jump:v.ink,onJump:v.card,jumpSmall:v.accent,tints:{y:"#FFE7A1",c:"#C8F4F8",g:"#DDEFC4",r:"#FFD8D6"},scrim:"rgba(38,37,35,0.45)"}}function makeFocusStyles(theme){let P=focusPalette(theme),{space:space}=theme,t=(size,ink,weight="regular",ratio=1.35)=>({...face(theme,weight),fontSize:size,lineHeight:Math.round(size*ratio),color:ink}),s=reactNative.StyleSheet.create({shrink:{flexShrink:1,minWidth:0},toolLabel:t(14,P.ink,"bold"),mini:{...t(10.5,P.ink3,"mono"),textTransform:"uppercase",letterSpacing:.9},h3:{...t(19,P.ink,"bold",1.2),marginTop:space.sm},bold:face(theme,"bold"),noPick:{...t(15,P.ink2,"regular",1.45),marginTop:14},small:t(13,P.ink3,"regular",1.35),smallInk:t(13,P.ink2,"regular",1.35),buttonGhost:{minHeight:48,borderRadius:999,alignItems:"center",justifyContent:"center",paddingHorizontal:space.lg,borderWidth:2,borderColor:P.ink,marginTop:space.sm},buttonGhostText:{...t(15,P.ink,"bold",1.2),textAlign:"center"},disabled:{opacity:.5},fine:{...t(13,P.ink3,"regular",1.4),marginTop:space.sm},scrim:{flex:1,justifyContent:"flex-end",backgroundColor:P.scrim},sheet:{maxHeight:"92%",paddingHorizontal:space.lg,paddingTop:space.sm,paddingBottom:space.xl,borderTopLeftRadius:22,borderTopRightRadius:22,backgroundColor:P.card},sheetGrab:{alignSelf:"center",width:40,height:4,borderRadius:2,backgroundColor:P.line,marginBottom:space.sm},sheetTop:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},close:{width:44,height:44,alignItems:"center",justifyContent:"center"},screen:{paddingHorizontal:space.lg,paddingBottom:space.xl,gap:space.sm},back:{flexDirection:"row",alignItems:"center",gap:space.xs,minHeight:44,alignSelf:"flex-start"}}),X=planPaint(theme);return{...s,palette:P,X:X,D:planDraw(X),ds:rnPlanDsTheme(theme,X.roles)}}var KitContext=react.createContext(null);function HealthPlanRnKitScope(props){/* @__PURE__ */
|
|
140
|
-
return jsxRuntime.jsx(KitContext.Provider,{value:props.kit,children:props.children})}var DEFAULT_COPY={...HEALTH_PLAN_FOCUS_RN_COPY,...healthPlanPetCopy({name:null,sex:null,trackingTexts:false})},STYLES=/* @__PURE__ */new WeakMap;function stylesFor(theme){let s=STYLES.get(theme);return s===void 0&&(s=makeFocusStyles(theme),STYLES.set(theme,s)),s}function useBuildHealthPlanRnKit(copy,renderIcon){let theme=usePlanTheme(),S=stylesFor(theme),ink=S.palette.ink,still=theme.motion.reducedMotion;return react.useMemo(()=>({S:S,icon:(name,color,size)=>(renderIcon?callHost(renderIcon,name):void 0)??/* @__PURE__ */jsxRuntime.jsx(FocusIcon,{name:name,color:color??ink,...size===void 0?{}:{size:size}}),copy:copy,still:still}),[S,ink,copy,renderIcon,still])}function useHealthPlanRnKit(own={}){let shared=react.useContext(KitContext),fallback=useBuildHealthPlanRnKit(DEFAULT_COPY,void 0),base3=shared??fallback,{copy:copy,renderIcon:renderIcon}=own;return react.useMemo(()=>{if(copy===void 0&&renderIcon===void 0)return base3;let merged=copy===void 0?base3.copy:{...base3.copy,...copy},icon=renderIcon===void 0?base3.icon:(name,color,size)=>callHost(renderIcon,name)??base3.icon(name,color,size);return{...base3,copy:merged,icon:icon}},[base3,copy,renderIcon])}var SHRINK2={flexShrink:1},FR={flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0},KEEP={flexShrink:0},START={alignSelf:"flex-start"},CENTER2={justifyContent:"center"},COLUMN={flexDirection:"column"},
|
|
169
|
+
return jsxRuntime.jsx(KitContext.Provider,{value:props.kit,children:props.children})}var DEFAULT_COPY={...HEALTH_PLAN_FOCUS_RN_COPY,...healthPlanPetCopy({name:null,sex:null,trackingTexts:false})},STYLES=/* @__PURE__ */new WeakMap;function stylesFor(theme){let s=STYLES.get(theme);return s===void 0&&(s=makeFocusStyles(theme),STYLES.set(theme,s)),s}function useBuildHealthPlanRnKit(copy,renderIcon){let theme=usePlanTheme(),S=stylesFor(theme),ink=S.palette.ink,still=theme.motion.reducedMotion;return react.useMemo(()=>({S:S,icon:(name,color,size)=>(renderIcon?callHost(renderIcon,name):void 0)??/* @__PURE__ */jsxRuntime.jsx(FocusIcon,{name:name,color:color??ink,...size===void 0?{}:{size:size}}),copy:copy,still:still}),[S,ink,copy,renderIcon,still])}function useHealthPlanRnKit(own={}){let shared=react.useContext(KitContext),fallback=useBuildHealthPlanRnKit(DEFAULT_COPY,void 0),base3=shared??fallback,{copy:copy,renderIcon:renderIcon}=own;return react.useMemo(()=>{if(copy===void 0&&renderIcon===void 0)return base3;let merged=copy===void 0?base3.copy:{...base3.copy,...copy},icon=renderIcon===void 0?base3.icon:(name,color,size)=>callHost(renderIcon,name)??base3.icon(name,color,size);return{...base3,copy:merged,icon:icon}},[base3,copy,renderIcon])}var SHRINK2={flexShrink:1},FR={flexGrow:1,flexShrink:1,flexBasis:0,minWidth:0},KEEP={flexShrink:0},START={alignSelf:"flex-start"},CENTER2={justifyContent:"center"},COLUMN={flexDirection:"column"},FILL2={width:"100%",height:"100%"},MARKER={position:"absolute",right:"100%",textAlign:"right"},IN_PLACE={position:"relative",top:0,right:0},planImg=(src,style)=>src?/* @__PURE__ */jsxRuntime.jsx(reactNative.Image,{source:{uri:src},style:style,accessibilityIgnoresInvertColors:true}):null;function planTag(k2,label,part){let{bx:bx,tx:tx}=k2.S.D;return label===void 0||label===""?null:/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("tag",part),children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:tx("tag",part),children:label})})}function planNumber(k2,value,part){let{bx:bx,tx:tx}=k2.S.D;/* @__PURE__ */
|
|
141
170
|
return jsxRuntime.jsx(reactNative.View,{style:bx(part),accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"badge",style:tx(part),children:String(value)})})}function planSecHead(k2,value,label){let{bx:bx,tx:tx}=k2.S.D;/* @__PURE__ */
|
|
142
171
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("secTitle"),children:[planNumber(k2,value,"secN"),
|
|
143
172
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("secTitle"),SHRINK2],accessibilityRole:"header",children:label})]})}var warnedNoReturnUrl=false;function warnNoReturnUrl(){if(globalThis.__DEV__===false||warnedNoReturnUrl)return;warnedNoReturnUrl=true;let globalConsole=globalThis.console;try{globalConsole?.warn?.("[everfur] The Health Plan shop is on with Everfur checkout, but `focus.checkoutReturnUrl` is missing or not an https URL, so the member is never sent to Stripe: checkout keeps the in-app path (your onBuy / onCheckout). Pass the https App Link (Universal Link) your app opens as `checkoutReturnUrl`.")}catch{}}var isDogSpecies=s=>s!=null&&/^(dog|canine)$/i.test(s.trim()),ModelContext=react.createContext(null);function useHealthPlanFocusContext(){return react.useContext(ModelContext)}function useConnectedHealthPlanModel(){let m=react.useContext(ModelContext);return m===null&&warnConnectedOutsideProvider(globalThis.__DEV__!==false),m}function useHealthPlanFocusModel(props){let{design:design,item:item,petRef:petRef}=props,petName=props.petName?.trim()?props.petName.trim():null,{runtime:runtime}=useEverfurContext(),[pageWidth,setPageWidthState]=react.useState(null),setPageWidth=react.useCallback(w=>setPageWidthState(w),[]),sex=props.petSex??null,trackingTexts=props.trackingTexts===true,copy=react.useMemo(()=>({...HEALTH_PLAN_FOCUS_RN_COPY,...healthPlanPetCopy({name:petName,sex:sex,trackingTexts:trackingTexts}),...design.copy,...props.fromBackend===true?HEALTH_PLAN_NO_SHIP_DAY_COPY:{},...props.copy}),[petName,sex,trackingTexts,design.copy,props.copy,props.fromBackend]),kit=useBuildHealthPlanRnKit(copy,props.renderIcon),returnUrl=validReturnUrl(props.checkoutReturnUrl)?props.checkoutReturnUrl.trim():null,scrollScope=useHealthPlanScroll(),pickRef=react.useRef(null);react.useEffect(()=>{props.shop===true&&props.checkout==="everfur_stripe"&&returnUrl===null&&warnNoReturnUrl()},[props.shop,props.checkout,returnUrl]);let kv=runtime.registry.services.kv,store=react.useMemo(()=>rnFocusStore(kv),[kv]),navigate=props.navigate,recordsReader=props.recordsRepository,readEmpty=recordsReader!==void 0&&props.recordsMissing===void 0&&props.onConnectRecords!==void 0,recordsEmpty=useHealthPlanRecordsEmpty(readEmpty?recordsReader:void 0,petRef),probeRecords=recordsReader===void 0&&props.onConnectRecords!==void 0&&props.recordsMissing===void 0&&props.recordsBlanks===void 0,[recordsRead,setRecordsRead]=react.useState(null),onRecordsRead=react.useCallback(read=>setRecordsRead({pet:petRef,read:read}),[petRef]),probed=probeRecords&&recordsRead!==null&&recordsRead.pet===petRef?recordsRead.read:null,recordsProbe=probeRecords?/* @__PURE__ */jsxRuntime.jsx(RecordsProbe,{petRef:petRef,onRead:onRecordsRead},petRef):null,recordsMissing=props.recordsMissing??(recordsReader!==void 0?recordsEmpty===true:probed?.missing===true),blanksFacts=props.recordsBlanks!==void 0?props.recordsBlanks:probed?.blanks??null,{onOverlayChange:hostOverlay,...logicProps}=props,hp=useHealthPlanFocus({...logicProps,petName:petName,blanksFacts:blanksFacts,...hostOverlay===void 0?{}:{onOverlayChange:(o,c)=>o==="product"?void 0:hostOverlay(o,c)}},copy,{store:store,returnUrls:()=>returnUrl===null?null:{successUrl:checkoutReturnUrl(returnUrl,CHECKOUT_PARAM,STRIPE_SESSION_ID),cancelUrl:checkoutReturnUrl(returnUrl,CHECKOUT_CANCEL_PARAM,"1")},openUrl:url=>{navigate?callHost(navigate,url):reactNative.Linking.openURL(url).catch(()=>{})},callHost:callHost,mintKey:mintTapKey},{...RN_RULES_BASE,checkoutReachable:returnUrl!==null}),{shop:shop,everfur:everfur,partnerBuys:partnerBuys,itemOf:itemOf2,inCart:inCart,weightKnown:weightKnown,noVet:noVet,planItems:planItems}=hp,allOrders=[...hp.ownOrders.map(o=>everfurOrderView(o,planItems)),...(props.shopOrders??[]).map(hostOrderView)];useCheckoutReturn({enabled:everfur,petRef:petRef,pages:hp.pages,returnUrl:returnUrl,lifecycle:props.lifecycle??null,kv:kv,...hp.returnHandlers});let species=props.species??null,isDog=isDogSpecies(species),otherSpecies=species!==null&&species.trim()!==""&&!isDog,askWeight=!weightKnown&&isDog,pk=design.pick,waitNode=props.renderWait?callHost(props.renderWait)??null:null,waiting=waitNode!==null||design.wait!==void 0,rows=props.checkoutRows??(props.fromBackend?[]:design.checkoutRows??[]),trust=props.trust??(props.fromBackend?[]:pk.trust??[]),byline=design.byline!==void 0&&(props.fromBackend!==true||props.vetReviewed===true)?design.byline:void 0,vet=byline??null,noPick=pk.none===true,pickHidden=noPick&&pk.hidden===true,curated=design.extras?.items.some(x=>x.productId!==void 0)===true,vetSignTitle=title=>noVet?copy.callAVet:recordsMissing?copy.callYourVet:title,blanksShown=blanksFacts!==null&&!waiting,extraItems=(design.extras?.items??[]).filter(x=>x.owned!==true),extraProduct=x=>x.productId!==void 0&&(shop||everfur||partnerBuys)?itemOf2(x.productId):void 0,extrasShown=extraItems.some(x=>extraProduct(x)!==void 0||props.onExtra!==void 0),pickInCart=shop&&inCart(item.productId)!==void 0,onJump=props.onJump,jump=onJump?()=>{callHost(onJump)}:scrollScope?()=>scrollScope(pickRef.current):void 0,sec=1,numbers={};return design.routine&&!waiting&&(numbers.routine=sec++),!(waiting||pickHidden)&&!noPick&&(numbers.pick=sec++),!waiting&&design.signs?numbers.signs=sec++:!waiting&&design.checkup&&(numbers.checkup=sec++),{model:{props:props,hp:hp,kit:kit,copy:copy,petName:petName,returnUrl:returnUrl,blanksFacts:blanksFacts,recordsMissing:recordsMissing,waitNode:waitNode,waiting:waiting,blanksShown:blanksShown,rows:rows,trust:trust,byline:byline,vet:vet,noPick:noPick,pickHidden:pickHidden,curated:curated,otherSpecies:otherSpecies,askWeight:askWeight,pickInCart:pickInCart,jump:jump,pickRef:pickRef,pageWidth:pageWidth,setPageWidth:setPageWidth,numbers:numbers,allOrders:allOrders,extraProduct:extraProduct,extraItems:extraItems,extrasShown:extrasShown,vetSignTitle:vetSignTitle},recordsProbe:recordsProbe}}function HealthPlanFocusProvider(props){let{model:model,recordsProbe:recordsProbe}=useHealthPlanFocusModel(props);/* @__PURE__ */
|
|
@@ -149,7 +178,7 @@ return jsxRuntime.jsxs(reactNative.View,{style:bx("blanksRow"),testID:`health-pl
|
|
|
149
178
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[...bx("blanksNum"),gridCell(X.blanksRow,0)],accessibilityElementsHidden:true,importantForAccessibility:"no-hide-descendants",children:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blanksNum"),children:String(i+1)})}),
|
|
150
179
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:gridCell(X.blanksRow,1),children:[
|
|
151
180
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:LINE,children:[r.lead===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blanksText"),children:r.lead}),
|
|
152
|
-
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Animated.View,{style:[...bx("blank",width,filledLook&&"blankFilled"),!filledLook&&value!==null?HOLDS_VALUE:null,flashBg===null?null:{backgroundColor:flashBg}],...value===null?{accessible:true,accessibilityLabel:props.blankLabel}:{},testID:value===null?`health-plan-blank-${r.key}-empty`:`health-plan-blank-${r.key}-value`,children:[inner("blank",filledLook&&"blankFilled"),value===null?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blank"),children:value})]}),r.trail===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blanksText"),children:r.trail})]}),r.source===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("blanksSource"),children:r.source})]})]},r.key)})})]})}var CART_BUMP_MS=320;function swipeWidth(k2,pageWidth,card,around){let X=k2.S.X,padX=name=>Number(X[name].box.paddingLeft??0)+Number(X[name].box.paddingRight??0);return k2.S.D.swipe(card,around.reduce((w,part)=>w-padX(part),pageWidth))}function HealthPlanToolbar(props){let k2=useHealthPlanRnKit(props),{S:S,copy:copy,icon:icon}=k2,P=S.palette,X=S.X,{bx:bx,tx:tx,tb:tb,ring:ring,ink:ink,side:side}=S.D,lineCount=props.cartCount,cartBump=react.useRef(new reactNative.Animated.Value(1)).current,lastCount=react.useRef(lineCount);react.useEffect(()=>{let grew=lineCount>lastCount.current;if(lastCount.current=lineCount,!grew||k2.still)return;let easing=reactNative.Easing.bezier(.23,1,.32,1),run2=reactNative.Animated.sequence([reactNative.Animated.timing(cartBump,{toValue:1.25,duration:CART_BUMP_MS*.4,easing:easing,useNativeDriver:false}),reactNative.Animated.timing(cartBump,{toValue:1,duration:CART_BUMP_MS*.6,easing:easing,useNativeDriver:false})]);return run2.start(),()=>run2.stop()},[lineCount,k2.still,cartBump]);let badgeOuter=X.cartCount.rings[0]??X.cartCount.box,badgePlace={position:"absolute",top:badgeOuter.top,right:badgeOuter.right};/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Animated.View,{style:[...bx("blank",width,filledLook&&"blankFilled"),!filledLook&&value!==null?HOLDS_VALUE:null,flashBg===null?null:{backgroundColor:flashBg}],...value===null?{accessible:true,accessibilityLabel:props.blankLabel}:{},testID:value===null?`health-plan-blank-${r.key}-empty`:`health-plan-blank-${r.key}-value`,children:[inner("blank",filledLook&&"blankFilled"),value===null?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blank"),children:value})]}),r.trail===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("blanksText"),children:r.trail})]}),r.source===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("blanksSource"),children:r.source})]})]},r.key)})})]})}function BlockScope({children:children}){let input=useBlockThemeInput(rnBlockFonts);return react.createElement(ThemeProvider,{theme:input},children)}var CART_BUMP_MS=320;function swipeWidth(k2,pageWidth,card,around){let X=k2.S.X,padX=name=>Number(X[name].box.paddingLeft??0)+Number(X[name].box.paddingRight??0);return k2.S.D.swipe(card,around.reduce((w,part)=>w-padX(part),pageWidth))}function HealthPlanToolbar(props){let k2=useHealthPlanRnKit(props),{S:S,copy:copy,icon:icon}=k2,P=S.palette,X=S.X,{bx:bx,tx:tx,tb:tb,ring:ring,ink:ink,side:side}=S.D,lineCount=props.cartCount,cartBump=react.useRef(new reactNative.Animated.Value(1)).current,lastCount=react.useRef(lineCount);react.useEffect(()=>{let grew=lineCount>lastCount.current;if(lastCount.current=lineCount,!grew||k2.still)return;let easing=reactNative.Easing.bezier(.23,1,.32,1),run2=reactNative.Animated.sequence([reactNative.Animated.timing(cartBump,{toValue:1.25,duration:CART_BUMP_MS*.4,easing:easing,useNativeDriver:false}),reactNative.Animated.timing(cartBump,{toValue:1,duration:CART_BUMP_MS*.6,easing:easing,useNativeDriver:false})]);return run2.start(),()=>run2.stop()},[lineCount,k2.still,cartBump]);let badgeOuter=X.cartCount.rings[0]??X.cartCount.box,badgePlace={position:"absolute",top:badgeOuter.top,right:badgeOuter.right};/* @__PURE__ */
|
|
153
182
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("tools"),children:[props.eyebrow?/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tb("toolsEyebrow"),SHRINK2],children:props.eyebrow}):/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{}),
|
|
154
183
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("toolsEnd"),children:[
|
|
155
184
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.Pressable,{onPress:props.onOpenOrders,accessibilityRole:"button",accessibilityLabel:copy.orders,style:bx("orders"),testID:"health-plan-orders-button",children:[icon("box",ink("orders",P.ink),side("ordersIcon",21)),
|
|
@@ -167,29 +196,16 @@ return jsxRuntime.jsxs(reactNative.View,{style:bx("by"),testID:"health-plan-byli
|
|
|
167
196
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("saysSerif"),children:quote.text})]})}function HealthPlanJumpStrip(props){let k2=useHealthPlanRnKit(props),{bx:bx,tx:tx,im:im}=k2.S.D,jump=props.onJump;/* @__PURE__ */
|
|
168
197
|
return jsxRuntime.jsxs(reactNative.Pressable,{onPress:jump,disabled:jump===void 0,accessibilityRole:jump?"button":"text",style:pressScale(bx("jump",!props.imageUrl&&"jumpNoImage"),PLAN_PRESS_SCALE.jump,jump===void 0),testID:"health-plan-jump",children:[planImg(props.imageUrl,im("jumpImage")),
|
|
169
198
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:FR,children:[props.kicker===null?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("jumpSmall"),children:props.kicker}),
|
|
170
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("jumpStrong"),children:props.title})]}),jump?/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("jumpGo"),children:props.go}):null]})}function HealthPlanFocusCard(props){let k2=useHealthPlanRnKit(props),
|
|
171
|
-
return jsxRuntime.
|
|
172
|
-
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("needKicker"),children:[
|
|
173
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("needKicker"),SHRINK2],children:f.kicker}),f.sources&&f.sources.length>0?/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("sources"),children:f.sources.map(s=>/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:bx("source",mod("source",s.kind)),children:/* @__PURE__ */jsxRuntime.jsx(Text,{tier:"compact",style:tx("source",mod("source",s.kind)),children:s.label})},s.label))}):null]}),
|
|
174
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("needTitle"),accessibilityRole:"header",children:f.title}),f.risk?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("needRisk"),children:[
|
|
175
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[...bx("dot",mod("dot",f.risk.kind)),ON_BASELINE]}),
|
|
176
|
-
/* @__PURE__ */jsxRuntime.jsxs(Text,{style:[...tx("needRisk"),gridCell(X.needRisk,1)],children:[
|
|
177
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("needRiskLead"),children:f.risk.lead}),f.risk.body?` ${f.risk.body}`:""]})]}):null,f.odds?/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("odds"),children:[
|
|
178
|
-
/* @__PURE__ */jsxRuntime.jsxs(Text,{style:[...tb("oddsKicker"),SHRINK2],children:[f.odds.label,f.odds.tag?" ":null,planTag(k2,f.odds.tag,"oddsTag")]}),
|
|
179
|
-
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[...bx("oddsNumbers"),STACK_END],children:[
|
|
180
|
-
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[ROW_CENTER,{columnGap:X.oddsNumbers.box.columnGap}],children:[
|
|
181
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("oddsFrom"),children:f.odds.from}),icon("arrow",ink("oddsIcon",P.ink3),side("oddsIcon",16)),
|
|
182
|
-
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("oddsTo"),children:f.odds.to})]}),f.odds.toLabel?/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("oddsLabel"),children:f.odds.toLabel}):null]})]}):null,f.quote&&vet!==null?/* @__PURE__ */jsxRuntime.jsx(HealthPlanVetQuote,{quote:f.quote,vet:vet,copy:props.copy,renderIcon:props.renderIcon}):null,props.jump?/* @__PURE__ */jsxRuntime.jsx(HealthPlanJumpStrip,{...props.jump,copy:props.copy,renderIcon:props.renderIcon}):null]})}function HealthPlanTips(props){let k2=useHealthPlanRnKit(props),window=reactNative.useWindowDimensions(),{S:S,icon:icon}=k2,P=S.palette,{bx:bx,tx:tx,tb:tb,mod:mod,ink:ink,side:side,scroll:scroll}=S.D,routine=props.routine,tipWidth=swipeWidth(k2,props.pageWidth??window.width,"tip",["root","steps"]);/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("jumpStrong"),children:props.title})]}),jump?/* @__PURE__ */jsxRuntime.jsx(Text,{style:tx("jumpGo"),children:props.go}):null]})}function HealthPlanFocusCard(props){let k2=useHealthPlanRnKit(props),f=props.focus,vet=props.vet,jump=props.jump,kind=f.risk?.kind,tone=kind==="risk"||kind==="watch"||kind==="clear"?kind:void 0;/* @__PURE__ */
|
|
200
|
+
return jsxRuntime.jsx(reactNative.View,{testID:"health-plan-focus-card",children:/* @__PURE__ */jsxRuntime.jsx(BlockScope,{children:/* @__PURE__ */jsxRuntime.jsx(PlanNeedCard,{variant:"plan",testID:"health-plan",kicker:f.kicker,sources:f.sources?.map(s=>({label:s.label,kind:s.kind==="dna"?"dna":"records"})),title:f.title,signals:f.risk?[{key:"risk",lead:f.risk.lead,text:f.risk.body??"",tone:tone,dot:tone===void 0?"space":true}]:[],score:f.odds?{label:f.odds.label,tag:f.odds.tag,was:f.odds.from,now:f.odds.to,since:f.odds.toLabel,icon:({size:size,color:color})=>k2.icon("arrow",color,size)}:void 0,quote:f.quote&&vet!==null?{text:f.quote.text,by:vet.shortName??void 0,image:vet.imageUrl??null,tag:f.quote.tag}:void 0,jump:jump?{kicker:jump.kicker??"",title:jump.title,go:jump.onJump?jump.go:"",image:jump.imageUrl??null,onPress:jump.onJump}:void 0})})})}function HealthPlanTips(props){let k2=useHealthPlanRnKit(props),window=reactNative.useWindowDimensions(),{S:S,icon:icon}=k2,{bx:bx,tx:tx,tb:tb,scroll:scroll}=S.D,routine=props.routine,tipWidth=swipeWidth(k2,props.pageWidth??window.width,"tip",["root","steps"]);/* @__PURE__ */
|
|
183
201
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("steps"),testID:"health-plan-routine",children:[
|
|
184
202
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("stepsHead"),children:[
|
|
185
203
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:[...bx("stepsTitle"),SHRINK2],children:[planNumber(k2,props.number,"n"),
|
|
186
204
|
/* @__PURE__ */jsxRuntime.jsx(Text,{style:[...tx("stepsTitle"),SHRINK2],accessibilityRole:"header",children:routine.title})]}),routine.label?/* @__PURE__ */jsxRuntime.jsx(Text,{style:tb("stepsLabel"),children:routine.label}):null]}),
|
|
187
|
-
/* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,style:scroll("tips").place,contentContainerStyle:scroll("tips").content,children:routine.steps.map((s,i)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
return jsxRuntime.jsx(Text,{style:k2.S.D.tb("pageFine"),children:props.text})}function HealthPlanToast(props){let k2=useHealthPlanRnKit(props),toast=props.message,b=k2.S.X.toast.box,place2={position:b.position,top:b.top,left:b.left,right:b.right,zIndex:b.zIndex};/* @__PURE__ */
|
|
192
|
-
return jsxRuntime.jsx(PlanLinger,{motions:[TOAST_MOTION],draw:toast===null?null:([on])=>/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:[place2,{opacity:on},k2.still||on===void 0?null:{transform:[{translateY:on.interpolate({inputRange:[0,1],outputRange:[-8,0]})}]}],accessibilityLiveRegion:"polite",accessibilityRole:"alert",testID:"health-plan-toast",children:/* @__PURE__ */jsxRuntime.jsx(PlanDs,{theme:k2.S.ds,children:/* @__PURE__ */jsxRuntime.jsx(Toast,{variant:"card",message:toast})})})})}function HealthPlanProductPick(props){let k2=useHealthPlanRnKit(props),{S:S,icon:icon}=k2,P=S.palette,X=S.X,{bx:bx,tx:tx,tb:tb,ink:ink,side:side}=S.D,{item:item,pick:pk}=props,onMore=props.onMore;/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */jsxRuntime.jsx(BlockScope,{children:/* @__PURE__ */jsxRuntime.jsx(reactNative.ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,style:scroll("tips").place,contentContainerStyle:scroll("tips").content,children:routine.steps.map((s,i)=>{let tipIcon=s.icon,foot=s.fromVet?props.vetShortName?k2.copy.fromVet(props.vetShortName):void 0:s.source??void 0;/* @__PURE__ */
|
|
206
|
+
return jsxRuntime.jsx(TipCard,{variant:"plan",number:String(i+1),title:s.title,text:s.body||void 0,foot:foot,tone:s.tone??"y",icon:({size:size,color:color})=>tipIcon?icon(tipIcon,color,size):null,style:{width:tipWidth,flexBasis:"auto"}},s.title)})})})]})}function healthPlanReviewWidth(k2,pageWidth){return swipeWidth(k2,pageWidth,"review",["root","sec","pick"])}function HealthPlanNoPick(props){let k2=useHealthPlanRnKit(props);return props.text===""?null:/* @__PURE__ */jsxRuntime.jsx(Text,{style:k2.S.noPick,testID:"health-plan-no-pick",children:props.text})}function HealthPlanFine(props){let k2=useHealthPlanRnKit(props);/* @__PURE__ */
|
|
207
|
+
return jsxRuntime.jsx(Text,{style:k2.S.D.tb("pageFine"),children:props.text})}function HealthPlanToast(props){let k2=useHealthPlanRnKit(props),toast=props.message,b=k2.S.X.toast.box,place3={position:b.position,top:b.top,left:b.left,right:b.right,zIndex:b.zIndex};/* @__PURE__ */
|
|
208
|
+
return jsxRuntime.jsx(PlanLinger,{motions:[TOAST_MOTION],draw:toast===null?null:([on])=>/* @__PURE__ */jsxRuntime.jsx(reactNative.Animated.View,{style:[place3,{opacity:on},k2.still||on===void 0?null:{transform:[{translateY:on.interpolate({inputRange:[0,1],outputRange:[-8,0]})}]}],accessibilityLiveRegion:"polite",accessibilityRole:"alert",testID:"health-plan-toast",children:/* @__PURE__ */jsxRuntime.jsx(PlanDs,{theme:k2.S.ds,children:/* @__PURE__ */jsxRuntime.jsx(Toast,{variant:"card",message:toast})})})})}function HealthPlanProductPick(props){let k2=useHealthPlanRnKit(props),{S:S,icon:icon}=k2,P=S.palette,X=S.X,{bx:bx,tx:tx,tb:tb,ink:ink,side:side}=S.D,{item:item,pick:pk}=props,onMore=props.onMore;/* @__PURE__ */
|
|
193
209
|
return jsxRuntime.jsxs(reactNative.View,{ref:props.viewRef,style:bx("sec"),testID:"health-plan-pick",children:[planSecHead(k2,props.number,pk.title),
|
|
194
210
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("pick"),children:[
|
|
195
211
|
/* @__PURE__ */jsxRuntime.jsxs(reactNative.View,{style:bx("pickTop"),children:[
|
|
@@ -281,7 +297,7 @@ return jsxRuntime.jsx(HealthPlanAskRow,{icon:"file",title:copy.connectRecordsTit
|
|
|
281
297
|
return jsxRuntime.jsxs(HealthPlanSigns,{signs:design.signs,number:m.numbers.signs??1,callVetTitle:callVetTitle,children:[
|
|
282
298
|
/* @__PURE__ */jsxRuntime.jsx(ConnectedHealthPlanCheckup,{variant:"kicker"}),
|
|
283
299
|
/* @__PURE__ */jsxRuntime.jsx(ConnectedHealthPlanConnectRecords,{inSection:true})]})}return design.checkup?/* @__PURE__ */jsxRuntime.jsx(ConnectedHealthPlanCheckup,{variant:"section",children:/* @__PURE__ */jsxRuntime.jsx(ConnectedHealthPlanConnectRecords,{inSection:true})}):/* @__PURE__ */jsxRuntime.jsx(ConnectedHealthPlanConnectRecords,{})}function ConnectedHealthPlanExtras(){let m=useConnectedHealthPlanModel(),extras=m?.props.design.extras;if(m===null||!extras||!m.extrasShown)return null;let{hp:hp,copy:copy}=m,rows=[];for(let x of m.extraItems){let product=m.extraProduct(x);if(product===void 0&&m.props.onExtra===void 0)continue;let on=product!==void 0?hp.shop&&hp.inCart(product.productId)!==void 0:hp.extras.has(x.key),price=x.price??(product!==void 0?hp.fmtWhole(product.price,product.currency):null),label=product!==void 0&&on?copy.viewCart:on?x.added:x.action;rows.push({extra:x,price:price,on:on,label:label,onPress:()=>hp.pressExtra(x.key,product,on)})}/* @__PURE__ */
|
|
284
|
-
return jsxRuntime.jsx(HealthPlanExtras,{title:extras.title,items:rows})}function ConnectedHealthPlanFine(){let m=useConnectedHealthPlanModel(),
|
|
300
|
+
return jsxRuntime.jsx(HealthPlanExtras,{title:extras.title,items:rows})}function ConnectedHealthPlanFine(){let m=useConnectedHealthPlanModel(),fine3=m?.props.design.fine;return m===null||!fine3?null:/* @__PURE__ */jsxRuntime.jsx(HealthPlanFine,{text:fine3})}function blanksDay(ms,locale){let d=new Date(ms);try{return new Intl.DateTimeFormat(locale??"en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(d)}catch{return d.toISOString().slice(0,10)}}function nextIcon(k2,name){let{ink:ink,side:side}=k2.S.D;return k2.icon(name,ink("nextIcon",k2.S.X.roles.link??""),side("nextIconSvg",19))}function doneCheck(k2){let{bx:bx,ink:ink,side:side}=k2.S.D;/* @__PURE__ */
|
|
285
301
|
return jsxRuntime.jsx(reactNative.View,{style:bx("doneCheck"),children:k2.icon("check",ink("doneCheck",k2.S.palette.ink),side("doneCheckSvg",38))})}function nextRow(k2,r){let{bx:bx,tx:tx,tb:tb,im:im}=k2.S.D,X=k2.S.X,tile2=r.imageUrl?planImg(r.imageUrl,im("nextIconImage")):nextIcon(k2,r.icon);/* @__PURE__ */
|
|
286
302
|
return jsxRuntime.jsxs(reactNative.View,{style:bx("nextRow"),children:[
|
|
287
303
|
/* @__PURE__ */jsxRuntime.jsx(reactNative.View,{style:[...bx("nextIcon"),gridCell(X.nextRow,0),r.product===true?{overflow:"hidden"}:null],children:tile2}),
|