@happyvertical/smrt-planner 0.57.19 → 0.57.20
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/app/404.html +18 -18
- package/app/_app/immutable/chunks/{DBfU27Yr.js → -2dfZP6X.js} +1 -1
- package/app/_app/immutable/chunks/{D95Ltrhv.js → 5I4x_KS6.js} +1 -1
- package/app/_app/immutable/chunks/{0GttNSaG.js → 7y8ldvJX.js} +2 -2
- package/app/_app/immutable/chunks/{B81CeftJ.js → B1Pf2l_R.js} +21 -21
- package/app/_app/immutable/chunks/{G8JeRda5.js → BE4TZ3aw.js} +1 -1
- package/app/_app/immutable/chunks/{Cptq9dTD.js → BL2JRgxi.js} +1 -1
- package/app/_app/immutable/chunks/{glUGUrBl.js → BdMHVrP7.js} +1 -1
- package/app/_app/immutable/chunks/{OH7CqE-U.js → Bns8l-x1.js} +1 -1
- package/app/_app/immutable/chunks/{CGILVblc.js → CLySd19b.js} +1 -1
- package/app/_app/immutable/chunks/{BL-j01wI.js → CM3HdjYi.js} +1 -1
- package/app/_app/immutable/chunks/{CSvhNT33.js → CRGGx5Lw.js} +1 -1
- package/app/_app/immutable/chunks/{BgDByODt.js → CYCgPm88.js} +1 -1
- package/app/_app/immutable/chunks/CeUbBJTD.js +1 -0
- package/app/_app/immutable/chunks/{B58ycq6u.js → CgE1Gcro.js} +1 -1
- package/app/_app/immutable/chunks/{3nInxoCv.js → CmAUvRQx.js} +1 -1
- package/app/_app/immutable/chunks/{B3xHH6q-.js → CpP-dbYB.js} +1 -1
- package/app/_app/immutable/chunks/{BBYjYdwL.js → Cw26E4UG.js} +1 -1
- package/app/_app/immutable/chunks/{DV8QsFnv.js → Cy7yT1On.js} +3 -3
- package/app/_app/immutable/chunks/{Cn8IkTI5.js → D7WLtlpw.js} +1 -1
- package/app/_app/immutable/chunks/{DbPr-Y_R.js → DADOPup4.js} +1 -1
- package/app/_app/immutable/chunks/{DmWCr2ul.js → DC203NCO.js} +1 -1
- package/app/_app/immutable/chunks/{CTz6b8sX.js → DDIQ8W6V.js} +1 -1
- package/app/_app/immutable/chunks/{CF-iy4N9.js → DKgADWce.js} +1 -1
- package/app/_app/immutable/chunks/{K9O-e-XY.js → DNpuZXha.js} +1 -1
- package/app/_app/immutable/chunks/{Cne67d4c.js → DYS_WKPd.js} +1 -1
- package/app/_app/immutable/chunks/DYku8Hqx.js +1 -0
- package/app/_app/immutable/chunks/{D_tBQk4S.js → DfD9dv_l.js} +1 -1
- package/app/_app/immutable/chunks/{Cv3FXeyB.js → agvanIM7.js} +1 -1
- package/app/_app/immutable/chunks/{BQbkHzk8.js → juz5EBPL.js} +1 -1
- package/app/_app/immutable/entry/{app.CtiuMMEF.js → app.UfGUpLlK.js} +2 -2
- package/app/_app/immutable/entry/start.BAb-NXu1.js +1 -0
- package/app/_app/immutable/nodes/{0.CoxJIO4G.js → 0.CVYFDYxr.js} +1 -1
- package/app/_app/immutable/nodes/{1.BvqpKwaf.js → 1.CJEHWdw8.js} +1 -1
- package/app/_app/immutable/nodes/{10.CEltwRBa.js → 10._eiewXMR.js} +1 -1
- package/app/_app/immutable/nodes/{11.DJ3womq-.js → 11.Dp8fmXsX.js} +1 -1
- package/app/_app/immutable/nodes/{12.1DKCRq9W.js → 12.bKzQ9OLN.js} +1 -1
- package/app/_app/immutable/nodes/{13.Bm9LIH2r.js → 13.DaudqCzg.js} +1 -1
- package/app/_app/immutable/nodes/{14.B0zmE2Ph.js → 14.ZMVp9EbO.js} +1 -1
- package/app/_app/immutable/nodes/{2.BlDb4AmE.js → 2.BEaYX5kW.js} +3 -3
- package/app/_app/immutable/nodes/{3.ct99VOlW.js → 3.XnNGal1u.js} +1 -1
- package/app/_app/immutable/nodes/{4.C-cw-lFZ.js → 4.CczBNlYL.js} +1 -1
- package/app/_app/immutable/nodes/{5.DY71Ssxa.js → 5.D0-S4wqa.js} +1 -1
- package/app/_app/immutable/nodes/{6.Dy6iU6zE.js → 6.DiqKNjHf.js} +1 -1
- package/app/_app/immutable/nodes/{7.69phJC5H.js → 7.CzhUZRpM.js} +1 -1
- package/app/_app/immutable/nodes/{8.CjTHnpj3.js → 8.BwuGOj43.js} +1 -1
- package/app/_app/immutable/nodes/{9.uRTCr8p2.js → 9.C9C4Mx7X.js} +1 -1
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +21 -21
- package/app/ai/index.html +24 -24
- package/app/blueprint/index.html +19 -19
- package/app/cookbook/index.html +19 -19
- package/app/index.html +27 -27
- package/app/m/ads/AdDeliveryTier/index.html +23 -23
- package/app/m/ads/AdEvent/index.html +23 -23
- package/app/m/ads/AdFormat/index.html +23 -23
- package/app/m/ads/AdGroup/index.html +23 -23
- package/app/m/ads/AdVariation/index.html +23 -23
- package/app/m/analytics/AnalyticsDataStream/index.html +23 -23
- package/app/m/analytics/AnalyticsEvent/index.html +23 -23
- package/app/m/analytics/AnalyticsProperty/index.html +23 -23
- package/app/m/analytics/AnalyticsReport/index.html +23 -23
- package/app/m/approvals/ApprovalEvent/index.html +23 -23
- package/app/m/approvals/ApprovalPolicy/index.html +23 -23
- package/app/m/approvals/ApprovalRequest/index.html +23 -23
- package/app/m/assets/Asset/attachments/index.html +24 -24
- package/app/m/assets/Asset/index.html +23 -23
- package/app/m/assets/AssetAssociation/index.html +23 -23
- package/app/m/assets/AssetMetafield/index.html +23 -23
- package/app/m/assets/AssetStatus/index.html +23 -23
- package/app/m/assets/AssetType/index.html +23 -23
- package/app/m/assets/Folder/index.html +23 -23
- package/app/m/chat/AgentSession/index.html +23 -23
- package/app/m/chat/ChatMessage/index.html +23 -23
- package/app/m/chat/ChatParticipant/index.html +23 -23
- package/app/m/chat/ChatReaction/index.html +23 -23
- package/app/m/chat/ChatRoom/index.html +23 -23
- package/app/m/chat/ChatThread/index.html +23 -23
- package/app/m/chat/VoiceGatewayTurn/index.html +23 -23
- package/app/m/chat/VoiceSession/index.html +23 -23
- package/app/m/commerce/Agreement/index.html +23 -23
- package/app/m/commerce/Cart/index.html +23 -23
- package/app/m/commerce/Contract/index.html +23 -23
- package/app/m/commerce/ContractLineItem/index.html +23 -23
- package/app/m/commerce/Customer/index.html +23 -23
- package/app/m/commerce/DocumentTax/index.html +23 -23
- package/app/m/commerce/Estimate/index.html +23 -23
- package/app/m/commerce/Fulfillment/index.html +23 -23
- package/app/m/commerce/FulfillmentLineItem/index.html +23 -23
- package/app/m/commerce/HistoricalCustomerFunds/index.html +23 -23
- package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +23 -23
- package/app/m/commerce/HistoricalSalesLine/index.html +23 -23
- package/app/m/commerce/Invoice/index.html +23 -23
- package/app/m/commerce/InvoiceLineItem/index.html +23 -23
- package/app/m/commerce/Lease/index.html +23 -23
- package/app/m/commerce/LicenseSale/index.html +23 -23
- package/app/m/commerce/Order/index.html +23 -23
- package/app/m/commerce/Payment/index.html +23 -23
- package/app/m/commerce/PaymentAllocation/index.html +23 -23
- package/app/m/commerce/PaymentInstrument/index.html +23 -23
- package/app/m/commerce/PaymentIntent/index.html +23 -23
- package/app/m/commerce/Payout/index.html +23 -23
- package/app/m/commerce/ProductionOrder/index.html +23 -23
- package/app/m/commerce/PurchaseContract/index.html +23 -23
- package/app/m/commerce/PurchaseOrder/index.html +23 -23
- package/app/m/commerce/SalesContract/index.html +23 -23
- package/app/m/commerce/SupplierQuote/index.html +23 -23
- package/app/m/commerce/TaxCode/index.html +23 -23
- package/app/m/commerce/TaxComponent/index.html +23 -23
- package/app/m/commerce/TaxSettings/index.html +23 -23
- package/app/m/commerce/TaxSummaryReport/index.html +23 -23
- package/app/m/commerce/TenantPaymentAccount/index.html +23 -23
- package/app/m/commerce/Vendor/index.html +23 -23
- package/app/m/commerce/WholesaleOrder/index.html +23 -23
- package/app/m/content/Content/index.html +23 -23
- package/app/m/content/ContentContribution/index.html +23 -23
- package/app/m/content/ContentContributionAttachment/index.html +23 -23
- package/app/m/content/ContentContributionRevision/index.html +23 -23
- package/app/m/content/ContentContributionType/index.html +23 -23
- package/app/m/content/ContentContributor/index.html +23 -23
- package/app/m/content/ContentCorrection/index.html +23 -23
- package/app/m/content/ContentFeedSource/index.html +23 -23
- package/app/m/content/ContentGovernanceAssignment/index.html +23 -23
- package/app/m/content/ContentGovernancePolicy/index.html +23 -23
- package/app/m/content/ContentGovernanceProfile/index.html +23 -23
- package/app/m/content/ContentReference/index.html +23 -23
- package/app/m/content/ContentReview/index.html +23 -23
- package/app/m/content/ContentVersion/index.html +23 -23
- package/app/m/events/Event/index.html +23 -23
- package/app/m/events/EventParticipant/index.html +23 -23
- package/app/m/events/EventSeries/index.html +23 -23
- package/app/m/events/EventType/index.html +23 -23
- package/app/m/expenses/Expense/index.html +23 -23
- package/app/m/facts/Fact/index.html +23 -23
- package/app/m/facts/FactContent/index.html +23 -23
- package/app/m/facts/FactEvidence/index.html +23 -23
- package/app/m/facts/FactSource/index.html +23 -23
- package/app/m/facts/FactSubject/index.html +23 -23
- package/app/m/facts/FactTag/index.html +23 -23
- package/app/m/fields/FieldPolicy/index.html +23 -23
- package/app/m/fields/FieldPolicySuggestion/index.html +23 -23
- package/app/m/fields/FieldUsageCounter/index.html +23 -23
- package/app/m/images/Image/index.html +23 -23
- package/app/m/inventory/InventoryLocation/index.html +23 -23
- package/app/m/inventory/Lot/index.html +23 -23
- package/app/m/inventory/LotCorrection/index.html +23 -23
- package/app/m/inventory/LotDocument/index.html +23 -23
- package/app/m/inventory/LotStockLevel/index.html +23 -23
- package/app/m/inventory/LotUsage/index.html +23 -23
- package/app/m/inventory/StockLevel/index.html +23 -23
- package/app/m/inventory/StockMovement/index.html +23 -23
- package/app/m/ledgers/Account/index.html +23 -23
- package/app/m/ledgers/Journal/index.html +23 -23
- package/app/m/ledgers/JournalEntry/index.html +23 -23
- package/app/m/ledgers/Ledger/index.html +23 -23
- package/app/m/manufacturing/Assembly/index.html +23 -23
- package/app/m/manufacturing/BillOfMaterials/index.html +23 -23
- package/app/m/manufacturing/BomLine/index.html +23 -23
- package/app/m/manufacturing/Operation/index.html +23 -23
- package/app/m/manufacturing/ProductionRun/index.html +23 -23
- package/app/m/manufacturing/ProductionRunCompletion/index.html +23 -23
- package/app/m/manufacturing/RoutingStep/index.html +23 -23
- package/app/m/marketing/Campaign/index.html +23 -23
- package/app/m/marketing/CampaignChannel/index.html +23 -23
- package/app/m/marketing/CampaignMetricSnapshot/index.html +23 -23
- package/app/m/messages/Account/index.html +23 -23
- package/app/m/messages/Attachment/index.html +23 -23
- package/app/m/messages/Blacklist/index.html +23 -23
- package/app/m/messages/Email/failed-sends/index.html +24 -24
- package/app/m/messages/Email/index.html +23 -23
- package/app/m/messages/Email/mailbox/index.html +24 -24
- package/app/m/messages/EmailAccount/index.html +23 -23
- package/app/m/messages/EmailAttachment/index.html +23 -23
- package/app/m/messages/EmailFolder/index.html +23 -23
- package/app/m/messages/Message/index.html +23 -23
- package/app/m/messages/MessagingEndpoint/index.html +23 -23
- package/app/m/messages/PersonaMessageRoute/index.html +23 -23
- package/app/m/messages/SlackAccount/index.html +23 -23
- package/app/m/messages/SlackMessage/index.html +23 -23
- package/app/m/messages/TelegramAccount/index.html +23 -23
- package/app/m/messages/Tweet/index.html +23 -23
- package/app/m/messages/TwitterAccount/index.html +23 -23
- package/app/m/messages/Whitelist/index.html +23 -23
- package/app/m/messages/ZulipAccount/index.html +23 -23
- package/app/m/places/Place/index.html +23 -23
- package/app/m/places/PlaceType/index.html +23 -23
- package/app/m/products/Category/index.html +23 -23
- package/app/m/products/Material/index.html +23 -23
- package/app/m/products/Product/index.html +23 -23
- package/app/m/products/Product/ingredients/index.html +24 -24
- package/app/m/products/ProductVariant/index.html +23 -23
- package/app/m/products/Sku/index.html +23 -23
- package/app/m/profiles/ApiKey/index.html +23 -23
- package/app/m/profiles/Bot/index.html +23 -23
- package/app/m/profiles/MagicLinkToken/index.html +23 -23
- package/app/m/profiles/NostrIdentity/index.html +23 -23
- package/app/m/profiles/OidcIdentity/index.html +23 -23
- package/app/m/profiles/Organization/index.html +23 -23
- package/app/m/profiles/Person/index.html +23 -23
- package/app/m/profiles/Profile/index.html +23 -23
- package/app/m/profiles/ProfileMetadata/index.html +23 -23
- package/app/m/profiles/ProfileMetafield/index.html +23 -23
- package/app/m/profiles/ProfileRelationship/index.html +23 -23
- package/app/m/profiles/ProfileRelationshipTerm/index.html +23 -23
- package/app/m/profiles/ProfileRelationshipType/index.html +23 -23
- package/app/m/profiles/ProfileType/index.html +23 -23
- package/app/m/projects/Comment/index.html +23 -23
- package/app/m/projects/Issue/index.html +23 -23
- package/app/m/projects/Label/index.html +23 -23
- package/app/m/projects/Project/index.html +23 -23
- package/app/m/projects/ProjectIntegration/index.html +23 -23
- package/app/m/projects/PullRequest/index.html +23 -23
- package/app/m/projects/Repository/index.html +23 -23
- package/app/m/properties/Property/index.html +23 -23
- package/app/m/properties/Zone/index.html +23 -23
- package/app/m/reports/RuntimeReport/index.html +23 -23
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +23 -23
- package/app/m/reports/SmrtReportLock/index.html +23 -23
- package/app/m/reports/SmrtReportRefreshTask/index.html +23 -23
- package/app/m/reports/SmrtReportRun/index.html +23 -23
- package/app/m/reports/SmrtReportSchedule/index.html +23 -23
- package/app/m/reports/SmrtReportWatermark/index.html +23 -23
- package/app/m/sales/Agreement/index.html +23 -23
- package/app/m/sales/AttributionException/index.html +23 -23
- package/app/m/sales/AttributionPolicy/index.html +23 -23
- package/app/m/sales/Commission/index.html +23 -23
- package/app/m/sales/CommissionAdjustment/index.html +23 -23
- package/app/m/sales/CommissionPayout/index.html +23 -23
- package/app/m/sales/CommissionPlan/index.html +23 -23
- package/app/m/sales/Earner/index.html +23 -23
- package/app/m/sales/EarnerSourceAttribution/index.html +23 -23
- package/app/m/sales/EarningEvent/index.html +23 -23
- package/app/m/sales/ExecutedAgreement/index.html +23 -23
- package/app/m/sales/Lead/index.html +23 -23
- package/app/m/sales/Opportunity/index.html +23 -23
- package/app/m/sales/OpportunityConversion/index.html +23 -23
- package/app/m/sales/PipelineDefinition/index.html +23 -23
- package/app/m/sales/PipelineStage/index.html +23 -23
- package/app/m/sales/Referral/index.html +23 -23
- package/app/m/sales/ReferralAgreement/index.html +23 -23
- package/app/m/sales/ReferralLink/index.html +23 -23
- package/app/m/sales/ReferralProgram/index.html +23 -23
- package/app/m/sales/ReferralTermSnapshot/index.html +23 -23
- package/app/m/sales/ReferralTouch/index.html +23 -23
- package/app/m/sales/Referrer/index.html +23 -23
- package/app/m/sales/SalesActivity/index.html +23 -23
- package/app/m/sales/SalesRepresentative/index.html +23 -23
- package/app/m/sites/Site/index.html +23 -23
- package/app/m/sites/SiteAgentBinding/index.html +23 -23
- package/app/m/social/OAuthState/index.html +23 -23
- package/app/m/social/SocialAccount/index.html +23 -23
- package/app/m/social/SocialPost/index.html +23 -23
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +23 -23
- package/app/m/subscriptions/BillingAdjustment/index.html +23 -23
- package/app/m/subscriptions/ClientCharge/index.html +23 -23
- package/app/m/subscriptions/CreditGrant/index.html +23 -23
- package/app/m/subscriptions/PricingRule/index.html +23 -23
- package/app/m/subscriptions/RetailCharge/index.html +23 -23
- package/app/m/subscriptions/SpendingPolicy/index.html +23 -23
- package/app/m/subscriptions/SubscriptionPlan/index.html +23 -23
- package/app/m/subscriptions/SubscriptionPlanVersion/index.html +23 -23
- package/app/m/subscriptions/TenantSubscription/index.html +23 -23
- package/app/m/subscriptions/TenantUsageMetric/index.html +23 -23
- package/app/m/support/ServiceTimeEntry/index.html +23 -23
- package/app/m/support/SupportAiRun/index.html +23 -23
- package/app/m/support/SupportAvailability/index.html +23 -23
- package/app/m/support/SupportCase/index.html +23 -23
- package/app/m/support/SupportCaseEvent/index.html +23 -23
- package/app/m/support/SupportChannelBinding/index.html +23 -23
- package/app/m/support/SupportCharge/index.html +23 -23
- package/app/m/support/SupportCompensation/index.html +23 -23
- package/app/m/support/SupportCompensationPlan/index.html +23 -23
- package/app/m/support/SupportEscalation/index.html +23 -23
- package/app/m/support/SupportInteraction/index.html +23 -23
- package/app/m/support/SupportPlan/index.html +23 -23
- package/app/m/support/SupportPolicy/index.html +23 -23
- package/app/m/support/SupportQualification/index.html +23 -23
- package/app/m/support/SupportServiceTarget/index.html +23 -23
- package/app/m/support/SupportSpecialist/index.html +23 -23
- package/app/m/support/SupportWorkLink/index.html +23 -23
- package/app/m/tags/Tag/index.html +23 -23
- package/app/m/tags/TagAlias/index.html +23 -23
- package/app/m/timesheets/AttendanceBreak/index.html +23 -23
- package/app/m/timesheets/AttendancePunch/index.html +23 -23
- package/app/m/timesheets/AttendanceSegment/index.html +23 -23
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +23 -23
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +23 -23
- package/app/m/timesheets/ServiceTimeEntry/index.html +23 -23
- package/app/m/users/Group/index.html +23 -23
- package/app/m/users/GroupMember/index.html +23 -23
- package/app/m/users/GroupRole/index.html +23 -23
- package/app/m/users/Membership/index.html +23 -23
- package/app/m/users/MembershipOverride/index.html +23 -23
- package/app/m/users/Permission/index.html +23 -23
- package/app/m/users/Role/index.html +23 -23
- package/app/m/users/RolePermission/index.html +23 -23
- package/app/m/users/Session/index.html +23 -23
- package/app/m/users/Tenant/index.html +23 -23
- package/app/m/users/TenantIntegration/index.html +23 -23
- package/app/m/users/TenantPermissionOverride/index.html +23 -23
- package/app/m/users/User/index.html +23 -23
- package/app/m/video/Character/index.html +23 -23
- package/app/m/video/CharacterAsset/index.html +23 -23
- package/app/m/video/CompositeJob/index.html +23 -23
- package/app/m/video/Performer/index.html +23 -23
- package/app/m/video/PerformerAsset/index.html +23 -23
- package/app/m/video/Scene/index.html +23 -23
- package/app/m/video/SceneAsset/index.html +23 -23
- package/app/m/video/VideoComposition/index.html +23 -23
- package/app/m/video/VideoCompositionAsset/index.html +23 -23
- package/app/m/video/VideoSequence/index.html +23 -23
- package/app/m/video/VideoSequenceAsset/index.html +23 -23
- package/app/m/video/VideoShot/index.html +23 -23
- package/app/m/video/VideoShotAsset/index.html +23 -23
- package/app/m/video/VideoShotCharacter/index.html +23 -23
- package/app/m/video/VideoWorkflow/index.html +23 -23
- package/app/m/voice/VoiceOutput/index.html +23 -23
- package/app/m/voice/VoiceProfile/index.html +23 -23
- package/app/m/voice/VoiceSample/index.html +23 -23
- package/app/mcp.html +2 -2
- package/app/packages/ads/index.html +21 -21
- package/app/packages/analytics/index.html +21 -21
- package/app/packages/approvals/index.html +21 -21
- package/app/packages/assets/index.html +21 -21
- package/app/packages/chat/index.html +21 -21
- package/app/packages/comments/index.html +21 -21
- package/app/packages/commerce/index.html +21 -21
- package/app/packages/content/index.html +21 -21
- package/app/packages/events/index.html +21 -21
- package/app/packages/expenses/index.html +21 -21
- package/app/packages/facts/index.html +21 -21
- package/app/packages/fields/index.html +21 -21
- package/app/packages/human-resources/index.html +21 -21
- package/app/packages/images/index.html +21 -21
- package/app/packages/index.html +20 -20
- package/app/packages/ingestion/index.html +21 -21
- package/app/packages/inventory/index.html +21 -21
- package/app/packages/ledgers/index.html +21 -21
- package/app/packages/manufacturing/index.html +21 -21
- package/app/packages/marketing/index.html +21 -21
- package/app/packages/messages/index.html +21 -21
- package/app/packages/places/index.html +21 -21
- package/app/packages/preferences/index.html +21 -21
- package/app/packages/products/index.html +21 -21
- package/app/packages/profiles/index.html +21 -21
- package/app/packages/projects/index.html +21 -21
- package/app/packages/properties/index.html +21 -21
- package/app/packages/reports/index.html +21 -21
- package/app/packages/sales/index.html +21 -21
- package/app/packages/sites/index.html +21 -21
- package/app/packages/social/index.html +21 -21
- package/app/packages/subscriptions/index.html +21 -21
- package/app/packages/support/index.html +21 -21
- package/app/packages/tags/index.html +21 -21
- package/app/packages/timesheets/index.html +21 -21
- package/app/packages/users/index.html +21 -21
- package/app/packages/video/index.html +21 -21
- package/app/packages/voice/index.html +21 -21
- package/app/packages/webhooks/index.html +21 -21
- package/app/recipes/account-access/help/index.html +21 -21
- package/app/recipes/account-access/index.html +23 -23
- package/app/recipes/activity/help/index.html +21 -21
- package/app/recipes/activity/index.html +23 -23
- package/app/recipes/agreements/help/index.html +21 -21
- package/app/recipes/agreements/index.html +23 -23
- package/app/recipes/analytics.reports/help/index.html +21 -21
- package/app/recipes/analytics.reports/index.html +23 -23
- package/app/recipes/assets/help/index.html +21 -21
- package/app/recipes/assets/index.html +23 -23
- package/app/recipes/billing/help/index.html +21 -21
- package/app/recipes/billing/index.html +23 -23
- package/app/recipes/chat.assistant/help/index.html +21 -21
- package/app/recipes/chat.assistant/index.html +23 -23
- package/app/recipes/comments/help/index.html +21 -21
- package/app/recipes/comments/index.html +23 -23
- package/app/recipes/commerce.customers/help/index.html +21 -21
- package/app/recipes/commerce.customers/index.html +23 -23
- package/app/recipes/commerce.estimates/help/index.html +21 -21
- package/app/recipes/commerce.estimates/index.html +23 -23
- package/app/recipes/commerce.purchases/help/index.html +21 -21
- package/app/recipes/commerce.purchases/index.html +23 -23
- package/app/recipes/commerce.sales/help/index.html +21 -21
- package/app/recipes/commerce.sales/index.html +23 -23
- package/app/recipes/commerce.vendors/help/index.html +21 -21
- package/app/recipes/commerce.vendors/index.html +23 -23
- package/app/recipes/commerce.wholesale/help/index.html +21 -21
- package/app/recipes/commerce.wholesale/index.html +23 -23
- package/app/recipes/events.calendar/help/index.html +21 -21
- package/app/recipes/events.calendar/index.html +23 -23
- package/app/recipes/expenses.tracking/help/index.html +21 -21
- package/app/recipes/expenses.tracking/index.html +23 -23
- package/app/recipes/fields.form-customization/help/index.html +21 -21
- package/app/recipes/fields.form-customization/index.html +23 -23
- package/app/recipes/ingestion/help/index.html +21 -21
- package/app/recipes/ingestion/index.html +23 -23
- package/app/recipes/integrations/help/index.html +21 -21
- package/app/recipes/integrations/index.html +23 -23
- package/app/recipes/inventory.stock/help/index.html +21 -21
- package/app/recipes/inventory.stock/index.html +23 -23
- package/app/recipes/ledgers.bookkeeping/help/index.html +21 -21
- package/app/recipes/ledgers.bookkeeping/index.html +23 -23
- package/app/recipes/messages/help/index.html +21 -21
- package/app/recipes/messages/index.html +23 -23
- package/app/recipes/products/help/index.html +21 -21
- package/app/recipes/products/index.html +23 -23
- package/app/recipes/projects.tracker/help/index.html +21 -21
- package/app/recipes/projects.tracker/index.html +23 -23
- package/app/recipes/reports.materialized/help/index.html +21 -21
- package/app/recipes/reports.materialized/index.html +23 -23
- package/app/recipes/reports.runtime/help/index.html +21 -21
- package/app/recipes/reports.runtime/index.html +23 -23
- package/app/recipes/sales.pipeline/help/index.html +21 -21
- package/app/recipes/sales.pipeline/index.html +23 -23
- package/app/recipes/tags.taxonomy/help/index.html +21 -21
- package/app/recipes/tags.taxonomy/index.html +23 -23
- package/app/recipes/team-collaboration/help/index.html +21 -21
- package/app/recipes/team-collaboration/index.html +23 -23
- package/app/recipes/timesheets.time-entries/help/index.html +21 -21
- package/app/recipes/timesheets.time-entries/index.html +23 -23
- package/app/s/custom-accounts/index.html +19 -19
- package/app/s/custom-appointments/index.html +19 -19
- package/app/s/custom-billing/index.html +19 -19
- package/app/s/custom-bookings/index.html +19 -19
- package/app/s/custom-buying/index.html +19 -19
- package/app/s/custom-checkout/index.html +19 -19
- package/app/s/custom-classes/index.html +19 -19
- package/app/s/custom-clients/index.html +19 -19
- package/app/s/custom-events/index.html +19 -19
- package/app/s/custom-fleet/index.html +19 -19
- package/app/s/custom-gigs/index.html +19 -19
- package/app/s/custom-giving/index.html +19 -19
- package/app/s/custom-instruments/index.html +19 -19
- package/app/s/custom-jobs/index.html +19 -19
- package/app/s/custom-kitchen/index.html +19 -19
- package/app/s/custom-lessons/index.html +19 -19
- package/app/s/custom-material/index.html +19 -19
- package/app/s/custom-meetings/index.html +19 -19
- package/app/s/custom-members/index.html +19 -19
- package/app/s/custom-merch/index.html +19 -19
- package/app/s/custom-money/index.html +19 -19
- package/app/s/custom-paint/index.html +19 -19
- package/app/s/custom-parts/index.html +19 -19
- package/app/s/custom-rentals/index.html +19 -19
- package/app/s/custom-roastery/index.html +19 -19
- package/app/s/custom-schedule/index.html +19 -19
- package/app/s/custom-shelf/index.html +19 -19
- package/app/s/custom-shop/index.html +19 -19
- package/app/s/custom-students/index.html +19 -19
- package/app/s/custom-wholesale/index.html +19 -19
- package/app/s/custom-work/index.html +19 -19
- package/app/s/custom-yard/index.html +19 -19
- package/app/s/section-access-control/index.html +19 -19
- package/app/s/section-account-security/index.html +19 -19
- package/app/s/section-accounting/index.html +19 -19
- package/app/s/section-activity/index.html +19 -19
- package/app/s/section-agreements/index.html +19 -19
- package/app/s/section-analytics/index.html +19 -19
- package/app/s/section-assets/index.html +19 -19
- package/app/s/section-billing/index.html +19 -19
- package/app/s/section-calendar/index.html +19 -19
- package/app/s/section-catalog/index.html +19 -19
- package/app/s/section-chat.assistant/index.html +19 -19
- package/app/s/section-comments/index.html +19 -19
- package/app/s/section-fields.form-customization/index.html +19 -19
- package/app/s/section-ingestion/index.html +19 -19
- package/app/s/section-integrations/index.html +19 -19
- package/app/s/section-messages/index.html +19 -19
- package/app/s/section-more/index.html +19 -19
- package/app/s/section-operations/index.html +19 -19
- package/app/s/section-projects/index.html +19 -19
- package/app/s/section-purchasing/index.html +19 -19
- package/app/s/section-reports.materialized/index.html +19 -19
- package/app/s/section-reports.runtime/index.html +19 -19
- package/app/s/section-sales/index.html +19 -19
- package/app/s/section-taxonomy/index.html +19 -19
- package/app/s/section-team/index.html +19 -19
- package/app/s/section-work/index.html +19 -19
- package/dist/catalog/catalog.json +634 -39
- package/dist/planner/instance.d.ts +1 -1
- package/dist/smrt-version.d.ts +1 -1
- package/dist/smrt-version.js +1 -1
- package/package.json +54 -54
- package/app/_app/immutable/chunks/BoTniyTY.js +0 -1
- package/app/_app/immutable/chunks/DjWoxxBo.js +0 -1
- package/app/_app/immutable/entry/start.DZqoRv5o.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,B as t,C as n,Ct as r,Dt as i,E as a,Et as o,Ft as s,G as c,H as l,J as u,K as d,L as f,Ot as ee,Pt as p,S as m,Tt as h,U as g,X as _,Y as v,Z as y,_ as b,a as x,b as te,bt as S,ct as ne,d as C,ft as w,gt as T,ht as E,k as D,kt as O,mt as k,n as A,nt as j,pt as M,q as re,st as N,v as P,vt as F,w as I,wt as L}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as R}from"./Bv5jGtB8.js";import{a as z,t as ie}from"./YUSKx8_q.js";import"./B2aomX_k.js";import{i as B}from"./DIE02RSm.js";import{t as V}from"./CUyVrfsu.js";import{x as ae}from"./Qxx7HWld.js";import{t as oe}from"./D042ejzG.js";import"./CTz6b8sX.js";import{nt as se}from"./CGILVblc.js";function ce(){return V()}var H=z({"ui.address_input.street_placeholder":`123 Main Street`,"ui.address_input.city_placeholder":`City`,"ui.address_input.postal_code_placeholder":`A1A 1A1`,"ui.date_range_input.mic_aria_label":`Hold to speak date range`,"ui.date_range_input.parsing":`Parsing dates...`,"ui.date_range_input.end_after_start":`End date must be after start date`,"ui.date_time_input.mic_aria_label":`Hold to speak`,"ui.date_time_input.parsing":`Parsing date...`,"ui.file_upload.remove_file":`Remove {name}`,"ui.file_upload.required":`Select a file to upload`,"ui.file_upload.rejected_type":`{count} file(s) rejected: type not allowed`,"ui.file_upload.exceeds_max_size":`{count} file(s) exceed the maximum size of {size}`,"ui.form.extracting":`Extracting form fields…`,"ui.form.listening_status":`Listening. Say "done" to finish.`,"ui.form.listening_button":`Listening... (say "done" to finish)`,"ui.form.speak_all_fields":`Speak all fields`,"ui.form.you_said":`You said:`,"ui.form_mic_button.tooltip":`Speak to fill all fields. Click again to stop.`,"ui.measurement_input.value_at_least":`Value must be at least {min} {unit}`,"ui.measurement_input.value_at_most":`Value must be at most {max} {unit}`,"ui.money_input.value_at_least":`Value must be at least {min}`,"ui.money_input.value_at_most":`Value must be at most {max}`,"ui.number_input.value_at_least":`Value must be at least {min}`,"ui.number_input.value_at_most":`Value must be at most {max}`,"ui.phone_input.mic_aria_label":`Hold to speak`,"ui.phone_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.phone_input.invalid":`Invalid phone number`,"ui.search_input.clear_aria_label":`Clear search`,"ui.text_input.mic_aria_label":`Hold to speak`,"ui.text_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.text_input.invalid_email":`Invalid email address`,"ui.textarea_input.mic_aria_label":`Hold to speak`,"ui.textarea_input.downloading_model":`Downloading Whisper model... {progress}%`}),U=Symbol(`smrt-form`),W=new WeakMap;function G(e){let t=new Map;return{get mode(){return e.mode},registerField(n){let r=n.name,i=e.registerField(n),a=typeof i==`function`?i:()=>e.unregisterField(r),o=!0,s=()=>{if(!o)return;o=!1;let e=t.get(r);e?.delete(s),e?.size===0&&t.delete(r),a()},c=t.get(r)??new Set;return c.add(s),t.set(r,c),s},unregisterField(e){let n=t.get(e)?.values().next().value;n?.()},getFieldSchema:()=>e.getFieldSchema(),get isFormListening(){return e.isFormListening},get isExtracting(){return e.isExtracting},toggleListening:()=>e.toggleListening(),get interactionRegistry(){return e.interactionRegistry},get formId(){return e.formId}}}function K(e){let t=h(),n=W.get(t);if(n)return n;let r=o(U);if(!r){if(!e)return null;throw Error(`Form context not found. Make sure to wrap your inputs with <SMRTForm>`)}let i=G(r);return W.set(t,i),O(U,i),i}function le(){return K(!1)}function ue(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);throw Error(`staged_value_invalid`)}function de(){throw Error(`staged_value_invalid`)}var fe=c(`<div class="field-row full-width svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),q=c(`<div class="field-row flex-2 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),J=c(`<option> </option>`),pe=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <select><option>Select...</option><!></select></div>`),me=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),he=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <select></select></div>`),ge=c(`<div class="validation-error svelte-5rbjmj" role="alert"> </div>`),_e=c(`<div class="smrt-address svelte-5rbjmj" data-smrt-component="AddressInput"><!> <div><!> <div class="field-row-group svelte-5rbjmj"><!> <!></div> <div class="field-row-group svelte-5rbjmj"><!> <!></div></div> <!></div>`);function Y(o,c){let u=re();ee(c,!0);let{t:d}=ie(),p=[{value:`CA`,label:`Canada`},{value:`US`,label:`United States`}],h=[{value:`AB`,label:`Alberta`},{value:`BC`,label:`British Columbia`},{value:`MB`,label:`Manitoba`},{value:`NB`,label:`New Brunswick`},{value:`NL`,label:`Newfoundland and Labrador`},{value:`NS`,label:`Nova Scotia`},{value:`NT`,label:`Northwest Territories`},{value:`NU`,label:`Nunavut`},{value:`ON`,label:`Ontario`},{value:`PE`,label:`Prince Edward Island`},{value:`QC`,label:`Quebec`},{value:`SK`,label:`Saskatchewan`},{value:`YT`,label:`Yukon`},{value:`US-CA`,label:`California`},{value:`US-NY`,label:`New York`},{value:`US-TX`,label:`Texas`},{value:`US-FL`,label:`Florida`},{value:`US-WA`,label:`Washington`}],v=x(c,`value`,31,()=>T({})),y=x(c,`fields`,19,()=>[`street`,`city`,`province`,`postalCode`,`country`]),C=x(c,`disabled`,3,!1),D=x(c,`required`,3,!1),O=x(c,`countries`,3,p),A=x(c,`provinces`,3,h);function M(){return[...new Set(O().map(e=>e.value))]}function I(){return[...new Set([...D()?[]:[``],...A().map(e=>e.value)])]}function L(e){return e===`country`?{type:`string`,enum:M()}:e===`province`?{type:`string`,enum:I()}:{type:`string`}}function R(e){if(typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!(![Object.prototype,null].includes(Object.getPrototypeOf(t))||!Object.keys(t).every(e=>y().includes(e))||!y().every(e=>!Object.hasOwn(t,e)||typeof t[e]==`string`)||Object.hasOwn(t,`country`)&&!M().includes(t.country)||Object.hasOwn(t,`province`)&&!I().includes(t.province))}function z(e){if(e==null)return!D();if(!R(e))return!1;if(!D())return!0;let t=e;return y().every(e=>typeof t[e]==`string`&&t[e].trim().length>0)}let B=ce(),V=le(),oe=`smrt-rich-field-${u}`,se=r(()=>B.state.mode===`smrt`),U=S(T(v().street??``)),W=S(T(v().city??``)),G=S(T(v().province??``)),K=S(T(v().postalCode??``)),Y=S(T(v().country??j(()=>O()[0]?.value??``)));ne(()=>{v().street!==void 0&&v().street!==e(U)&&F(U,v().street,!0),v().city!==void 0&&v().city!==e(W)&&F(W,v().city,!0),v().province!==void 0&&v().province!==e(G)&&F(G,v().province,!0),v().postalCode!==void 0&&v().postalCode!==e(K)&&F(K,v().postalCode,!0),v().country!==void 0&&v().country!==e(Y)&&F(Y,v().country,!0)});function ve(){let t={};return y().includes(`street`)&&(t.street=e(U)),y().includes(`city`)&&(t.city=e(W)),y().includes(`province`)&&(t.province=e(G)),y().includes(`postalCode`)&&(t.postalCode=e(K)),y().includes(`country`)&&(t.country=e(Y)),t}function X(){let e=ve();v(e),c.onchange?.(e)}function ye(e){let t={},n=e.toLowerCase().trim(),r=n.match(/([a-z]\d[a-z]\s?\d[a-z]\d)|(\d{5}(-\d{4})?)/i);r&&(t.postalCode=r[0].toUpperCase().replace(/\s+/g,` `));for(let e of A())if(RegExp(`\\b${e.label.toLowerCase()}\\b|\\b${e.value.toLowerCase()}\\b`,`i`).test(n)){t.province=e.value;break}for(let e of O())if([e.label,e.value].some(e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\W)${t}(?=$|\\W)`,`i`).test(n)})){t.country=e.value;break}for(let e of[/(?:city\s+(?:of\s+)?|in\s+)([a-z\s]+?)(?:\s*,|\s+(?:ab|bc|mb|on|qc|sk|alberta|british columbia|ontario|quebec)|\s*$)/i]){let r=n.match(e);if(r){t.city=r[1].trim().replace(/\b\w/g,e=>e.toUpperCase());break}}let i=n.match(/(\d+\s+[a-z\s]+(?:street|st|avenue|ave|road|rd|drive|dr|boulevard|blvd|way|lane|ln|crescent|cres|place|pl|court|ct))/i);return i&&(t.street=i[1].replace(/\b\w/g,e=>e.toUpperCase())),t}let be={street:`Street Address`,city:`City`,province:`Province/State`,postalCode:`Postal/ZIP Code`,country:`Country`},xe=r(()=>{let e=y()[0]??`street`;switch(e){case`postalCode`:return`${c.name}_postal`;default:return`${c.name}_${e}`}});ne(()=>{if(V){let e={name:c.name,ownerToken:oe,type:`address`,get label(){return c.label},get description(){return c.description||`A mailing address with street, city, province, postal code, and country`},setValue:e=>{if(e==null){F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X();return}if(R(e)){let t=e;t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X();return}let t=Object.fromEntries(Object.entries(ye(String(e))).filter(([e])=>y().includes(e)));Object.keys(t).length>0&&R(t)&&(t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X())},getValue:ve,prepareValue:e=>{if(e==null)return Object.fromEntries(y().map(e=>[e,e===`country`?O()[0]?.value??``:``]));if(typeof e==`object`&&!Array.isArray(e))return e;let t=ye(ue(e)),n=Object.fromEntries(Object.entries(t).filter(([e])=>y().includes(e)));return Object.keys(n).length>0?{...ve(),...n}:de()},clear:()=>(F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X(),!0),getState:()=>({disabled:C()}),get constraints(){return{required:D()}},get webMcpSchema(){return{type:`object`,additionalProperties:!1,properties:Object.fromEntries(y().map(e=>[e,L(e)])),...D()?{required:[...y()]}:{}}},validateValue:z,validate:()=>z(ve())};return V.registerField(e)}});function Se(e){F(U,e.target.value,!0),X()}function Z(e){F(W,e.target.value,!0),X()}function Ce(e){F(G,e.target.value,!0),X()}function we(e){F(K,e.target.value,!0),X()}function Q(e){F(Y,e.target.value,!0),X()}var Te=_e(),Ee=w(Te),De=t=>{ae(t,{get for(){return e(xe)},get label(){return c.label},get required(){return D()}})};t(Ee,e=>{c.label&&e(De)});var Oe=E(Ee,2);let $;var ke=w(Oe),Ae=t=>{var n=fe(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_street`),l(i,be.street),P(o,`id`,`${c.name??``}_street`),P(o,`name`,`${c.name??``}[street]`),P(o,`placeholder`,t),te(o,e(U)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.street_placeholder`]),()=>D()&&y().includes(`street`)]),_(`input`,o,Se),g(t,n)},je=r(()=>y().includes(`street`));t(ke,t=>{e(je)&&t(Ae)});var Me=E(ke,2),Ne=w(Me),Pe=t=>{var n=q(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_city`),l(i,be.city),P(o,`id`,`${c.name??``}_city`),P(o,`name`,`${c.name??``}[city]`),P(o,`placeholder`,t),te(o,e(W)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.city_placeholder`]),()=>D()&&y().includes(`city`)]),_(`input`,o,Z),g(t,n)},Fe=r(()=>y().includes(`city`));t(Ne,t=>{e(Fe)&&t(Pe)});var Ie=E(Ne,2),Le=t=>{var r=pe(),i=w(r),o=k(i,!0),u=E(i,2);let d;var ee=w(u);ee.value=ee.__value=``;var p=E(ee);f(p,17,A,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var h;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_province`),l(o,be.province),P(u,`id`,`${c.name??``}_province`),P(u,`name`,`${c.name??``}[province]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-input smrt-select svelte-5rbjmj`,null,d,{invalid:!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),h!==(h=e(G))&&(u.value=(u.__value=h)??``,n(u,h))},[()=>D()&&y().includes(`province`)]),_(`change`,u,Ce),g(t,r)},Re=r(()=>y().includes(`province`));t(Ie,t=>{e(Re)&&t(Le)}),s(Me);var ze=E(Me,2),Be=w(ze),Ve=t=>{var n=me(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_postal`),l(i,be.postalCode),P(o,`id`,`${c.name??``}_postal`),P(o,`name`,`${c.name??``}[postalCode]`),P(o,`placeholder`,t),te(o,e(K)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.postal_code_placeholder`]),()=>D()&&y().includes(`postalCode`)]),_(`input`,o,we),g(t,n)},He=r(()=>y().includes(`postalCode`));t(Be,t=>{e(He)&&t(Ve)});var Ue=E(Be,2),We=t=>{var r=he(),i=w(r),o=k(i,!0),u=E(i,2);let d;f(u,21,O,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var ee;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_country`),l(o,be.country),P(u,`id`,`${c.name??``}_country`),P(u,`name`,`${c.name??``}[country]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-input smrt-select svelte-5rbjmj`,null,d,{invalid:!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),ee!==(ee=e(Y))&&(u.value=(u.__value=ee)??``,n(u,ee))},[()=>D()&&y().includes(`country`)]),_(`change`,u,Q),g(t,r)},Ge=r(()=>y().includes(`country`));t(Ue,t=>{e(Ge)&&t(We)}),s(ze),s(Oe);var Ke=E(Oe,2),qe=e=>{var t=ge(),n=k(t,!0);N(()=>{P(t,`id`,`${c.name}-error`),l(n,c.error)}),g(e,t)};t(Ke,e=>{c.error&&e(qe)}),s(Te),N(()=>{P(Te,`data-smrt-field-owner`,oe),$=a(Oe,1,`address-fields svelte-5rbjmj`,null,$,{"smrt-mode":e(se)})}),g(o,Te),i()}v([`input`,`change`]);function ve(e){return e.toLowerCase().replace(/\s+at\s+/gi,`@`).replace(/\bat\b/gi,`@`).replace(/\s+dot\s+/gi,`.`).replace(/\bdot\b/gi,`.`).replace(/\s+/g,``).trim()}function X(e){return e.replace(/^(my name is|i am|i'm|it's|this is|the name is)\s*/i,``).replace(/\b(um|uh|like|so|well)\b\s*/gi,``).trim()}function ye(e,t){let n=e.toLowerCase().trim();for(let e of t)if(e.value.toLowerCase()===n||e.label.toLowerCase()===n)return e.value;for(let e of t)if(e.label.toLowerCase().includes(n)||n.includes(e.label.toLowerCase()))return e.value;return null}v([`change`]);function be(e={}){let t=V(),n=!1;return e.autoInit&&t.initializeSTT().catch(()=>{}),A(()=>{n&&t.state.ai.stt.isListening&&t.stopListening().catch(()=>{}),n=!1}),{start:async r=>{n=!0;try{await t.startListening({...e.defaultOptions,...r})}catch(e){throw n=!1,e}},stop:async()=>{n=!1,await t.stopListening()},initialize:async e=>{await t.initializeSTT(e)},get isListening(){return t.state.ai.stt.isListening},get isReady(){return t.state.ai.stt.initState===`ready`},get isInitializing(){return t.state.ai.stt.initState===`initializing`},get lastResult(){return t.state.ai.stt.lastResult},get interimResult(){return t.state.ai.stt.interimResult},get currentResult(){let{isListening:e,interimResult:n,lastResult:r}=t.state.ai.stt;return e&&n?n:r},get error(){return t.state.ai.stt.error},get downloadProgress(){return t.state.ai.stt.downloadProgress?.percent??0},get adapterType(){return t.state.ai.stt.adapter?.type??null}}}v([`keydown`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`change`]);var xe=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="spinner svelte-rsri1g"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12" class="svelte-rsri1g"></circle></svg>`),Se=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-rsri1g"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-rsri1g"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-rsri1g"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-rsri1g"></line></svg>`),Z=c(`<input type="text" class="smrt-input smrt-mode svelte-rsri1g" readonly=""/> <button type="button"><!></button>`,1),Ce=c(`<input class="smrt-input svelte-rsri1g"/>`),we=c(`<div class="listening-indicator svelte-rsri1g">Recording...</div>`),Q=c(`<div class="parsing-indicator svelte-rsri1g"> </div>`),Te=c(`<div class="error-indicator svelte-rsri1g" role="alert"> </div>`),Ee=c(`<div data-smrt-component="DateTimeInput"><!> <div class="input-wrapper svelte-rsri1g"><!></div> <!></div>`);function De(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`includeTime`,3,!0),f=x(o,`placeholder`,19,()=>d()?`e.g., next Tuesday at 3pm`:`e.g., March 15, 1990`),p=x(o,`value`,15,``),m=x(o,`disabled`,3,!1),h=x(o,`required`,3,!1),v=`${c}-label`,T=ce(),D=be(),O=le(),A=S(null),j=S(``),I=S(!1),L=S(!1),R=S(null),z=0,V=r(()=>T.state.mode===`smrt`);function se(e){p(e),o.onchange?.(p())}function U(e){if(!e)return``;try{if(!d()&&/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r).toLocaleDateString(void 0,{dateStyle:`medium`})}let t=new Date(e);return Number.isNaN(t.getTime())?e:d()?t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):t.toLocaleDateString(void 0,{dateStyle:`medium`})}catch{return e}}function W(e){if(typeof e!=`string`)return!1;if(e===``)return!h();let t=d()?/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?$/.exec(e):/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return!1;let[,n,r,i,a=`0`,o=`0`,s=`0`]=t,c=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(a),Number(o),Number(s)));return c.getUTCFullYear()===Number(n)&&c.getUTCMonth()===Number(r)-1&&c.getUTCDate()===Number(i)&&c.getUTCHours()===Number(a)&&c.getUTCMinutes()===Number(o)&&c.getUTCSeconds()===Number(s)}ne(()=>{F(j,U(p()),!0)}),ne(()=>{if(O){let e={name:o.name,type:`datetime`,get label(){return o.label},get description(){return o.description??(d()?`Date and time`:`Date`)},setValue:e=>{se(String(e??``))},getValue:()=>p(),prepareValue:ue,getState:()=>({disabled:m()}),get constraints(){return{required:h()}},validateValue:W,validate:()=>W(p())};return O.registerField(e)}});async function G(e){let t;try{t=await oe(`chrono-node`)}catch{throw Error(`Natural-language date parsing requires the optional dependency "chrono-node". Install it with: pnpm add chrono-node`)}let n=t.parse(e);if(n.length===0)throw Error(`Could not parse date from speech`);let r=n[0].start.date();if(Number.isNaN(r.getTime()))throw Error(`Invalid date`);let i=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,`0`),o=String(r.getDate()).padStart(2,`0`);return d()?`${i}-${a}-${o}T${String(r.getHours()).padStart(2,`0`)}:${String(r.getMinutes()).padStart(2,`0`)}`:`${i}-${a}-${o}`}async function K(){if(!(!e(V)||m()||e(L))){F(R,null),z=Date.now(),F(I,!0);try{(!D.isReady||D.adapterType!==`whisper-wasm`)&&await D.initialize({type:`whisper-wasm`}),await D.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(R,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`DateTimeInput: failed to start voice recording`,{field:o.name,error:e})}}}async function de(){if(!e(I))return;let t=Date.now()-z;if(F(I,!1),await D.stop(),t<500)return;let n=Date.now();for(;D.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=D.lastResult?.trim()||``;if(!r||r.length<2)F(R,`No speech detected. Hold longer and speak clearly.`);else{F(L,!0),F(R,null);try{se(await G(r))}catch(e){F(R,e instanceof Error?e.message:`Failed to parse date`,!0)}finally{F(L,!1)}}}function fe(e){e.button===0&&K()}function q(){de()}function J(){de()}function pe(e){e.preventDefault(),K()}function me(){de()}function he(e){e.preventDefault(),e.stopPropagation()}function ge(e){e.stopPropagation(),e.button===0&&K()}function _e(e){e.stopPropagation(),e.preventDefault(),K()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e(I)?de():K())}function ve(e){let t=e.target;se(t.value)}var X=Ee();let ye;var De=w(X),Oe=e=>{ae(e,{get id(){return v},get for(){return o.name},get label(){return o.label},get required(){return h()}})};t(De,e=>{o.label&&e(Oe)});var $=E(De,2),ke=w($),Ae=n=>{var r=Z(),i=M(r);b(i),C(i,e=>F(A,e),()=>e(A));var c=E(i,2);let l;var d=w(c),ee=e=>{var t=xe();g(e,t)},p=e=>{var t=Se();g(e,t)};t(d,t=>{e(L)?t(ee):t(p,-1)}),s(c),N(t=>{P(i,`id`,o.name),P(i,`aria-labelledby`,o.label?v:void 0),P(i,`name`,o.name),P(i,`placeholder`,f()),te(i,e(j)),i.disabled=m()||e(L),i.required=h(),P(i,`aria-invalid`,e(R)?`true`:void 0),P(i,`aria-describedby`,e(R)?`${o.name}-error`:void 0),l=a(c,1,`mic-btn svelte-rsri1g`,null,l,{active:e(I)}),c.disabled=m()||e(L),P(c,`aria-label`,t)},[()=>u(H[`ui.date_time_input.mic_aria_label`])]),_(`mousedown`,i,fe),_(`mouseup`,i,q),y(`mouseleave`,i,J),_(`touchstart`,i,pe,void 0,!0),_(`touchend`,i,me),_(`click`,c,he),_(`keydown`,c,Y),_(`mousedown`,c,ge),_(`mouseup`,c,q),y(`mouseleave`,c,J),_(`touchstart`,c,_e,void 0,!0),_(`touchend`,c,me),g(n,r)},je=t=>{var n=Ce();b(n),C(n,e=>F(A,e),()=>e(A)),N(()=>{P(n,`id`,o.name),P(n,`aria-labelledby`,o.label?v:void 0),P(n,`name`,o.name),P(n,`type`,d()?`datetime-local`:`date`),te(n,p()),n.disabled=m(),n.required=h(),P(n,`aria-invalid`,e(R)?`true`:void 0),P(n,`aria-describedby`,e(R)?`${o.name}-error`:void 0)}),_(`change`,n,ve),g(t,n)};t(ke,t=>{e(V)?t(Ae):t(je,-1)}),s($);var Me=E($,2),Ne=e=>{var t=we();g(e,t)},Pe=e=>{var t=Q(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.date_time_input.parsing`])]),g(e,t)},Fe=t=>{var n=Te(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-error`),l(r,e(R))}),g(t,n)};t(Me,t=>{e(I)?t(Ne):e(L)?t(Pe,1):e(R)&&t(Fe,2)}),s(X),N(()=>ye=a(X,1,`smrt-datetime svelte-rsri1g`,null,ye,{listening:e(I),parsing:e(L)})),g(n,X),i()}v([`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`,`change`]),v([`click`,`keydown`,`change`]),v([`click`]),v([`click`,`keydown`]),v([`input`,`change`]);var Oe=c(`<div class="validation-error svelte-e6jjj7" role="alert"> </div>`),$=c(`<div class="validation-error svelte-e6jjj7" role="alert"><!></div>`),ke=c(`<div class="smrt-money svelte-e6jjj7" data-smrt-component="MoneyInput"><!> <div class="input-wrapper svelte-e6jjj7"><input type="text" inputmode="decimal"/> <span class="currency-code svelte-e6jjj7"> </span></div> <input type="hidden"/> <!></div>`);function Ae(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,`0.00`),p=x(o,`value`,15,null),m=x(o,`currency`,3,`CAD`),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),C=`${c}-label`,D=ce(),O=le(),A=r(()=>D.state.mode===`smrt`);function j(e){return e===null?``:(e/100).toFixed(2)}function M(e){let t=e.replace(/[$,\s]/g,``);if(t===``)return null;let n=parseFloat(t);return Number.isNaN(n)?null:Math.round(n*100)}let I=S(T(j(p())));ne(()=>{let t=j(p());e(I)!==t&&!e(L)&&F(I,t,!0)});let L=S(!1),R=r(()=>m()===`USD`?`US$`:`CA$`),z=r(()=>p()===null||!(o.min!==void 0&&p()<o.min||o.max!==void 0&&p()>o.max)),B=r(()=>p()!==null&&!e(z)||!!o.error);function V(e){p(e),o.onchange?.(p())}function oe(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=/dollar|buck|cad|usd/i.test(t),i=/cent/i.test(t),a=t.replace(/\$|dollar[s]?|buck[s]?|cad|usd|cent[s]?/gi,``).trim(),o=a.match(/[\d,.]+/);if(o){let e=parseFloat(o[0].replace(/,/g,``));if(!Number.isNaN(e))return Math.round(i&&!r?e:e*100)}let s=a.split(/[\s-]+/).filter(Boolean),c=0,l=0,u=0,d=!1;for(let e=0;e<s.length;e++){let t=s[e],r=n[t];t===`and`||t===`point`?(d=!0,c+=u,u=0):r!==void 0&&(r>=100?(u=u===0?r:u*r,r>=1e3&&(d?l+=u:c+=u,u=0)):u+=r)}d?(l+=u,l>99&&(c+=Math.floor(l/100),l%=100)):c+=u;let f=c*100+l;return f>0?f:null}ne(()=>{if(O){let t={name:o.name,type:`money`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between $${(o.min/100).toFixed(2)} and $${(o.max/100).toFixed(2)})`:o.min===void 0?o.max!==void 0&&(e=` (maximum $${(o.max/100).toFixed(2)})`):e=` (minimum $${(o.min/100).toFixed(2)})`,(o.description||`A monetary amount in dollars`)+e},setValue:e=>{if(e==null||e===``){V(null),F(I,``);return}if(typeof e==`number`){V(e),F(I,j(e),!0);return}let t=oe(String(e));t!==null&&(V(t),F(I,j(t),!0))},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?oe(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max}},validateValue:e=>e===null&&!v()||typeof e==`number`&&Number.isSafeInteger(e)&&(o.min===void 0||e>=o.min)&&(o.max===void 0||e<=o.max),validate:()=>p()===null?!v():Number.isSafeInteger(p())&&e(z)};return O.registerField(t)}});function se(e){let t=e.target;F(I,t.value,!0),V(M(t.value))}function U(){F(L,!0)}function W(){F(L,!1),F(I,j(p()),!0)}var G=ke(),K=w(G),ue=e=>{ae(e,{get id(){return C},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(K,e=>{o.label&&e(ue)});var fe=E(K,2),q=w(fe);b(q);let J;var pe=E(q,2),me=k(pe,!0);s(fe);var he=E(fe,2);b(he);var ge=E(he,2),_e=e=>{var t=Oe(),n=k(t,!0);N(()=>{P(t,`id`,`${o.name}-error`),l(n,o.error)}),g(e,t)},Y=n=>{var r=$(),i=w(r),a=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_least`],{min:`${e(R)}${(o.min/100).toFixed(2)}`})]),g(t,n)},c=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_most`],{max:`${e(R)}${(o.max/100).toFixed(2)}`})]),g(t,n)};t(i,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(a):o.max!==void 0&&p()!==null&&p()>o.max&&e(c,1)}),s(r),N(()=>P(r,`id`,`${o.name}-error`)),g(n,r)};t(ge,t=>{o.error?t(_e):e(B)&&!e(z)&&t(Y,1)}),s(G),N(()=>{P(q,`id`,o.name),P(q,`aria-labelledby`,o.label?C:void 0),P(q,`name`,o.name),P(q,`placeholder`,f()),te(q,e(I)),q.disabled=h(),q.required=v(),J=a(q,1,`smrt-input svelte-e6jjj7`,null,J,{"smrt-mode":e(A),invalid:e(B)}),P(q,`aria-invalid`,e(B)?`true`:void 0),P(q,`aria-describedby`,e(B)?`${o.name}-error`:void 0),l(me,m()),P(he,`name`,`${o.name??``}_cents`),te(he,p()??``)}),_(`input`,q,se),y(`focus`,q,U),y(`blur`,q,W),g(n,G),i()}v([`input`]);var je=c(`<div class="validation-error svelte-1pebtso" role="alert"><!></div>`),Me=c(`<div class="smrt-number svelte-1pebtso" data-smrt-component="NumberInput"><!> <div class="input-wrapper svelte-1pebtso"><input type="number"/></div> <!></div>`);function Ne(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,``),p=x(o,`value`,15,null),m=x(o,`step`,3,1),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),y=`${c}-label`,S=ce(),C=le(),T=r(()=>S.state.mode===`smrt`);function D(e){return e===null||!(o.min!==void 0&&e<o.min||o.max!==void 0&&e>o.max)}function O(e){if(!Number.isFinite(m())||m()<=0)return!0;let t=(e-(o.min??0))/m();return Math.abs(t-Math.round(t))<=1e-9}let k=r(()=>D(p())),A=r(()=>p()!==null&&!e(k));function j(e){p(e),o.onchange?.(p())}function M(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=parseFloat(t.replace(/[,$]/g,``));if(!Number.isNaN(r))return r;if(n[t]!==void 0)return n[t];let i=t.split(/[\s-]+/),a=0,o=0;for(let e of i){let t=n[e];t!==void 0&&(t>=100?(o=o===0?t:o*t,t>=1e3&&(a+=o,o=0)):o+=t)}return a+=o,a>0?a:null}ne(()=>{if(C){let t={name:o.name,type:`number`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between ${o.min} and ${o.max})`:o.min===void 0?o.max!==void 0&&(e=` (maximum ${o.max})`):e=` (minimum ${o.min})`,(o.description||`A number`)+e},setValue:e=>{if(e==null||e===``){j(null);return}if(typeof e==`number`){j(e);return}let t=M(String(e));t!==null&&j(t)},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?M(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max,step:m()}},validateValue:e=>{if(e==null||e===``)return!v();let t=typeof e==`number`?e:M(String(e));return t!==null&&Number.isFinite(t)&&D(t)&&O(t)},validate:()=>p()===null?!v():Number.isFinite(p())&&e(k)};return C.registerField(t)}});function F(e){let t=e.target;j(t.value===``?null:parseFloat(t.value))}var I=Me(),L=w(I),R=e=>{ae(e,{get id(){return y},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(L,e=>{o.label&&e(R)});var z=E(L,2),B=w(z);b(B);let V;s(z);var oe=E(z,2),se=e=>{var n=je(),r=w(n),i=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_least`],{min:o.min})]),g(e,t)},a=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_most`],{max:o.max})]),g(e,t)};t(r,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(i):o.max!==void 0&&p()!==null&&p()>o.max&&e(a,1)}),s(n),N(()=>P(n,`id`,`${o.name}-error`)),g(e,n)};t(oe,t=>{e(A)&&t(se)}),s(I),N(()=>{P(B,`id`,o.name),P(B,`aria-labelledby`,o.label?y:void 0),P(B,`name`,o.name),P(B,`placeholder`,f()),te(B,p()??``),P(B,`min`,o.min),P(B,`max`,o.max),P(B,`step`,m()),B.disabled=h(),B.required=v(),V=a(B,1,`smrt-input svelte-1pebtso`,null,V,{"smrt-mode":e(T),invalid:e(A)}),P(B,`aria-invalid`,e(A)?`true`:void 0),P(B,`aria-describedby`,e(A)?`${o.name}-error`:void 0)}),_(`input`,B,F),g(n,I),i()}v([`input`]);var Pe=c(`<button type="button"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1vixtb7"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-1vixtb7"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-1vixtb7"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-1vixtb7"></line></svg></button>`),Fe=c(`<div class="downloading-indicator svelte-1vixtb7"><span class="processing-spinner svelte-1vixtb7"></span> <span class="svelte-1vixtb7"> </span></div>`),Ie=c(`<div class="listening-indicator svelte-1vixtb7"><span class="listening-dot svelte-1vixtb7"></span> <span class="svelte-1vixtb7">Recording...</span></div>`),Le=c(`<div class="processing-indicator svelte-1vixtb7"><span class="processing-spinner svelte-1vixtb7"></span> <span class="svelte-1vixtb7">Processing...</span></div>`),Re=c(`<div class="error-message svelte-1vixtb7" role="alert"> </div>`),ze=c(`<div class="validation-error svelte-1vixtb7" role="alert"> </div>`),Be=c(`<div data-smrt-component="PhoneInput"><!> <div class="input-wrapper svelte-1vixtb7"><input type="tel"/> <!></div> <!> <!> <!></div>`);function Ve(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,`(555) 555-5555`),f=x(o,`value`,15,``),p=x(o,`disabled`,3,!1),m=x(o,`required`,3,!1),h=`${c}-label`,v=ce(),T=be(),D=le(),O=S(null),A=S(!1),j=S(!1),M=S(null),I=0,L=r(()=>v.state.mode===`smrt`),R=r(()=>T.isInitializing),z=r(()=>T.downloadProgress);function V(e){if(typeof e!=`string`)return!1;if(!e)return!m();let t=e.replace(/\D/g,``);return t.length===10||t.length===11&&t[0]===`1`}let oe=r(()=>V(f())),se=r(()=>f()&&!e(oe));function U(e){f(e),o.onchange?.(f())}function W(e){let t=e.replace(/\D/g,``);return t.length===0?``:t.length<=3?`(${t}`:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length<=10?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:t.length===11&&t[0]===`1`?`+1 (${t.slice(1,4)}) ${t.slice(4,7)}-${t.slice(7)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6,10)}`}function G(e){let t={zero:`0`,oh:`0`,one:`1`,two:`2`,to:`2`,too:`2`,three:`3`,four:`4`,for:`4`,five:`5`,six:`6`,seven:`7`,eight:`8`,nine:`9`,niner:`9`},n=e.toLowerCase().replace(/^(my phone number is|my number is|phone number|number is|call me at)\s*/i,``).replace(/\b(area code|extension|ext)\b/gi,``).trim();for(let[e,r]of Object.entries(t))n=n.replace(RegExp(`\\b${e}\\b`,`gi`),r);return n=n.replace(/\bdouble\s*(\d)/gi,`$1$1`),n=n.replace(/\btriple\s*(\d)/gi,`$1$1$1`),n.replace(/\D/g,``)}function K(e){return W(G(e))}ne(()=>{if(D){let e={name:o.name,type:`phone`,get label(){return o.label},get description(){return o.description||`Phone number`},setValue:e=>{U(K(String(e??``)))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);if(t===``)return``;let n=G(t);return n.length!==10&&(n.length!==11||n[0]!==`1`)?t:W(n)||de()},getState:()=>({disabled:p()}),get constraints(){return{required:m()}},validateValue:e=>{if(typeof e!=`string`)return!1;if(e===``)return!m();let t=G(e);return t.length===10||t.length===11&&t[0]===`1`},validate:()=>V(f())};return D.registerField(e)}});async function fe(){if(!(!e(L)||p()||e(j))){F(M,null),I=Date.now(),F(A,!0);try{(!T.isReady||T.adapterType!==`whisper-wasm`)&&await T.initialize({type:`whisper-wasm`}),await T.start({continuous:!0,interimResults:!1})}catch(e){F(A,!1),F(M,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`PhoneInput: failed to start voice recording`,{field:o.name,error:e})}}}async function q(){if(!e(A))return;let t=Date.now()-I;if(F(A,!1),await T.stop(),t<500)return;let n=Date.now();for(;T.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=T.lastResult?.trim()||``;if(!r||r.length<2)F(M,`No speech detected. Hold longer and speak clearly.`);else{F(j,!0),F(M,null);try{U(K(r))}catch(e){F(M,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(j,!1)}}}function J(e){e.button===0&&fe()}function pe(){q()}function me(){q()}function he(e){e.preventDefault(),fe()}function ge(){q()}function _e(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(A)?q():fe())}function Y(e){let t=e.target;U(W(t.value))}var ve=Be();let X;var ye=w(ve),xe=e=>{ae(e,{get id(){return h},get for(){return o.name},get label(){return o.label},get required(){return m()}})};t(ye,e=>{o.label&&e(xe)});var Se=E(ye,2),Z=w(Se);b(Z);let Ce;C(Z,e=>F(O,e),()=>e(O));var we=E(Z,2),Q=t=>{var n=Pe();let r;N(t=>{r=a(n,1,`mic-btn svelte-1vixtb7`,null,r,{active:e(A)}),n.disabled=p(),P(n,`aria-label`,t)},[()=>u(H[`ui.phone_input.mic_aria_label`])]),_(`keydown`,n,_e),_(`mousedown`,n,J),_(`mouseup`,n,pe),y(`mouseleave`,n,me),_(`touchstart`,n,he,void 0,!0),_(`touchend`,n,ge),g(t,n)};t(we,t=>{e(L)&&t(Q)}),s(Se);var Te=E(Se,2),Ee=t=>{var n=Fe(),r=E(w(n),2),i=k(r,!0);s(n),N(e=>l(i,e),[()=>u(H[`ui.phone_input.downloading_model`],{progress:e(z)})]),g(t,n)},De=e=>{var t=Ie();g(e,t)},Oe=e=>{var t=Le();g(e,t)};t(Te,t=>{e(R)?t(Ee):e(A)?t(De,1):e(j)&&t(Oe,2)});var $=E(Te,2),ke=t=>{var n=Re(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-stt-error`),l(r,e(M))}),g(t,n)};t($,t=>{e(M)&&t(ke)});var Ae=E($,2),je=e=>{var t=ze(),n=k(t,!0);N(e=>{P(t,`id`,`${o.name}-error`),l(n,e)},[()=>u(H[`ui.phone_input.invalid`])]),g(e,t)};t(Ae,t=>{e(se)&&t(je)}),s(ve),N(()=>{X=a(ve,1,`smrt-phone svelte-1vixtb7`,null,X,{listening:e(A)}),P(Z,`id`,o.name),P(Z,`aria-labelledby`,o.label?h:void 0),P(Z,`name`,o.name),P(Z,`placeholder`,d()),te(Z,f()),Z.disabled=p()||e(j),Z.required=m(),Ce=a(Z,1,`smrt-input svelte-1vixtb7`,null,Ce,{"smrt-mode":e(L),invalid:e(se),processing:e(j)}),P(Z,`aria-invalid`,e(se)?`true`:void 0),P(Z,`aria-describedby`,e(se)?`${o.name}-error`:e(M)?`${o.name}-stt-error`:void 0)}),_(`input`,Z,Y),_(`mousedown`,Z,function(...t){(e(L)?J:void 0)?.apply(this,t)}),_(`mouseup`,Z,function(...t){(e(L)?pe:void 0)?.apply(this,t)}),y(`mouseleave`,Z,function(...t){(e(L)?me:void 0)?.apply(this,t)}),_(`touchstart`,Z,function(...t){(e(L)?he:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Z,function(...t){(e(L)?ge:void 0)?.apply(this,t)}),g(n,ve),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]),v([`input`,`keydown`,`click`]);var He=c(`<option disabled=""> </option>`),Ue=c(`<option> </option>`),We=c(`<span class="info svelte-17ub3c7"> </span>`),Ge=c(`<div data-smrt-component="SelectInput"><!> <div class="container svelte-17ub3c7"><div class="content svelte-17ub3c7"><select class="input svelte-17ub3c7"><!><!></select></div> <div class="trailing-icon svelte-17ub3c7"><!></div> <div class="active-indicator svelte-17ub3c7"></div></div> <div class="supporting-text svelte-17ub3c7" aria-live="polite"><!></div></div>`);function Ke(o,c){let u=re();ee(c,!0);let d=x(c,`placeholder`,3,`Select an option...`),h=x(c,`value`,15,``),v=x(c,`disabled`,3,!1),b=x(c,`required`,3,!1),te=`${u}-label`,C=ce(),T=le(),D=S(!1),O=r(()=>c.options.some(e=>e.value===``)),A=r(()=>c.options.filter((e,t)=>c.options.findIndex(t=>t.value===e.value)===t)),j=r(()=>C.state.mode===`smrt`);function M(e){h(e),c.onchange?.(h())}ne(()=>{if(T){let e={name:c.name,type:`select`,get label(){return c.label},get description(){let e=c.options.map(e=>e.label).join(`, `);return c.description?`${c.description}. Options: ${e}`:`Options: ${e}`},setValue:e=>{let t=String(e??``),n=ye(t,c.options);n?M(n):c.options.some(e=>e.value===t)&&M(t)},getValue:()=>h(),prepareValue:e=>{let t=ue(e);return t.trim()===``?t:ye(t,c.options)??t},clear:()=>(M(``),!0),getState:()=>({disabled:v()}),get constraints(){return{required:b()}},get options(){return c.options.map(e=>({value:e.value,label:e.label}))},validateValue:e=>{let t=String(e??``);return t===``?!b():c.options.some(e=>e.value===t)},validate:()=>!b()||h().trim().length>0};return T.registerField(e)}});function L(e){let t=e.target;M(t.value)}var R=Ge();let z;var ie=w(R),B=e=>{ae(e,{get id(){return te},get for(){return c.name},get label(){return c.label},get required(){return b()}})};t(ie,e=>{c.label&&e(B)});var V=E(ie,2),oe=w(V),H=w(oe),U=w(H),W=e=>{var t=He(),n=k(t,!0);t.value=t.__value=``,N(()=>{I(t,!h()),l(n,d())}),g(e,t)};t(U,t=>{e(O)||t(W)});var G=E(U);f(G,17,()=>e(A),e=>e.value,(t,n)=>{var r=Ue(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(H);var K;m(H),s(oe);var de=E(oe,2),fe=w(de);se(fe,{name:`chevron-down`,size:24}),s(de),p(2),s(V);var q=E(V,2),J=w(q),pe=e=>{var t=We(),n=k(t,!0);N(()=>l(n,c.description)),g(e,t)};t(J,t=>{c.description&&e(D)&&t(pe)}),s(q),s(R),N(()=>{z=a(R,1,`smrt-select-field svelte-17ub3c7`,null,z,{"smrt-mode":e(j),focused:e(D),disabled:v(),"has-value":!!h()}),P(H,`id`,c.name),P(H,`aria-labelledby`,c.label?te:void 0),P(H,`name`,c.name),H.disabled=v(),H.required=b(),P(H,`aria-describedby`,`${c.name}-supporting`),K!==(K=h())&&(H.value=(H.__value=K)??``,n(H,K)),P(q,`id`,`${c.name}-supporting`)}),_(`change`,H,L),y(`focus`,H,()=>F(D,!0)),y(`blur`,H,()=>F(D,!1)),g(o,R),i()}v([`change`]);var qe=c(`<button type="button"><!></button>`),Je=c(`<span class="info svelte-1wen309"> </span>`),Ye=c(`<span class="success svelte-1wen309">Recording...</span>`),Xe=c(`<span class="info svelte-1wen309">Processing...</span>`),Ze=c(`<span class="error svelte-1wen309"> </span>`),Qe=c(`<div data-smrt-component="TextareaInput"><!> <div class="container svelte-1wen309"><div class="content svelte-1wen309"><textarea class="input svelte-1wen309"></textarea></div> <!> <div class="active-indicator svelte-1wen309"></div></div> <div class="supporting-text svelte-1wen309" aria-live="polite"><!></div></div>`);function $e(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,``),f=x(o,`value`,15,``),m=x(o,`rows`,3,4),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),b=x(o,`appendMode`,3,!1),T=`${c}-label`,O=ce(),A=be(),j=le(),M=S(null),I=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>O.state.mode===`smrt`),K=r(()=>A.isInitializing),de=r(()=>A.downloadProgress);function fe(e){f(e),o.onchange?.(f())}ne(()=>{if(j){let e={name:o.name,type:`textarea`,get label(){return o.label},get description(){return o.description},setValue:e=>{fe(String(e??``))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);return b()&&f()?`${f()}\n${t}`:t},prepareReviewedValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>!v()||String(e??``).trim().length>0,validate:()=>!v()||f().trim().length>0};return j.registerField(e)}});async function q(){if(!(!e(G)||h()||e(z))){oe=f(),F(U,null),W=Date.now(),F(I,!0);try{(!A.isReady||A.adapterType!==`whisper-wasm`)&&await A.initialize({type:`whisper-wasm`}),await A.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextareaInput: failed to start voice recording`,{field:o.name,error:e})}}}async function J(){if(!e(I))return;let t=Date.now()-W;if(F(I,!1),await A.stop(),t<500)return;let n=Date.now();for(;A.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=A.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=X(r);b()&&oe?fe(`${oe}\n${e}`):fe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function pe(e){e.button===0&&q()}function me(){J()}function he(){J()}function ge(e){e.preventDefault(),q()}function _e(){J()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(I)?J():q())}function ve(e){let t=e.target;fe(t.value)}var ye=Qe();let xe;var Se=w(ye),Z=e=>{ae(e,{get id(){return T},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Se,e=>{o.label&&e(Z)});var Ce=E(Se,2),we=w(Ce),Q=w(we);L(Q),C(Q,e=>F(M,e),()=>e(M)),s(we);var Te=E(we,2),Ee=t=>{var n=qe();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`mic-btn svelte-1wen309`,null,r,{active:e(I)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.textarea_input.mic_aria_label`])]),_(`keydown`,n,Y),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&q()}),_(`mouseup`,n,me),y(`mouseleave`,n,he),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),q()},void 0,!0),_(`touchend`,n,_e),g(t,n)};t(Te,t=>{e(G)&&t(Ee)}),p(2),s(Ce);var De=E(Ce,2),Oe=w(De),$=t=>{var n=Je(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.textarea_input.downloading_model`],{progress:e(de)})]),g(t,n)},ke=e=>{var t=Ye();g(e,t)},Ae=e=>{var t=Xe();g(e,t)},je=t=>{var n=Ze(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Me=e=>{var t=Je(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Oe,t=>{e(K)?t($):e(I)?t(ke,1):e(z)?t(Ae,2):e(U)?t(je,3):o.description&&e(V)&&t(Me,4)}),s(De),s(ye),N(()=>{xe=a(ye,1,`smrt-text-field multiline svelte-1wen309`,null,xe,{"smrt-mode":e(G),focused:e(V),disabled:h(),"has-value":!!f(),listening:e(I)}),P(Q,`id`,o.name),P(Q,`aria-labelledby`,o.label?T:void 0),P(Q,`name`,o.name),P(Q,`placeholder`,e(V)?d():``),te(Q,f()),P(Q,`rows`,m()),Q.disabled=h()||e(z),Q.required=v(),P(Q,`aria-invalid`,e(U)?`true`:void 0),P(Q,`aria-describedby`,`${o.name}-supporting`),P(De,`id`,`${o.name}-supporting`)}),_(`input`,Q,ve),y(`focus`,Q,()=>F(V,!0)),y(`blur`,Q,()=>F(V,!1)),_(`mousedown`,Q,function(...t){(e(G)?pe:void 0)?.apply(this,t)}),_(`mouseup`,Q,function(...t){(e(G)?me:void 0)?.apply(this,t)}),y(`mouseleave`,Q,function(...t){(e(G)?he:void 0)?.apply(this,t)}),_(`touchstart`,Q,function(...t){(e(G)?ge:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Q,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),g(n,ye),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]);var et=c(`<button type="button"><!></button>`),tt=c(`<span class="info svelte-q632gy"> </span>`),nt=c(`<span class="success svelte-q632gy">Recording...</span>`),rt=c(`<span class="info svelte-q632gy">Processing...</span>`),it=c(`<span class="error svelte-q632gy"> </span>`),at=c(`<div data-smrt-component="TextInput"><!> <div class="container svelte-q632gy"><div class="content svelte-q632gy"><input class="input svelte-q632gy"/></div> <!> <div class="active-indicator svelte-q632gy"></div></div> <div class="supporting-text svelte-q632gy" aria-live="polite"><!></div></div>`);function ot(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`type`,3,`text`),f=x(o,`placeholder`,3,``),m=x(o,`value`,15,``),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),T=x(o,`appendMode`,3,!1),O=`${c}-label`,A=ce(),j=be(),M=le(),I=S(null),L=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>A.state.mode===`smrt`),K=r(()=>j.isInitializing),de=r(()=>j.downloadProgress);function fe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}let q=r(()=>d()!==`email`||!m()||fe(m())),J=r(()=>d()===`email`&&m()&&!e(q));function pe(e){m(e),o.onchange?.(m())}ne(()=>{if(M){let t={name:o.name,get type(){return d()===`email`?`email`:`text`},get label(){return o.label},get description(){return o.description},setValue:e=>{pe(String(e??``))},getValue:()=>m(),prepareValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>{let t=String(e??``);return(!v()||t.trim().length>0)&&(d()!==`email`||t.length===0||fe(t))},validate:()=>(!v()||m().trim().length>0)&&(d()!==`email`||m().length===0||e(q))};return M.registerField(t)}});async function me(){if(!(!e(G)||h()||e(z))){oe=m(),F(U,null),W=Date.now(),F(L,!0);try{(!j.isReady||j.adapterType!==`whisper-wasm`)&&await j.initialize({type:`whisper-wasm`}),await j.start({continuous:!0,interimResults:!1})}catch(e){F(L,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextInput: failed to start voice recording`,{field:o.name,error:e})}}}async function he(){if(!e(L))return;let t=Date.now()-W;if(F(L,!1),await j.stop(),t<500)return;let n=Date.now();for(;j.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=j.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=d()===`email`?ve(r):X(r);T()&&oe?pe(`${oe} ${e}`):pe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function ge(e){e.button===0&&me()}function _e(){he()}function Y(){he()}function ye(e){e.preventDefault(),me()}function xe(){he()}function Se(e){e.preventDefault(),e.stopPropagation()}function Z(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(L)?he():me())}function Ce(e){let t=e.target;pe(t.value)}var we=at();let Q;var Te=w(we),Ee=e=>{ae(e,{get id(){return O},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Te,e=>{o.label&&e(Ee)});var De=E(Te,2),Oe=w(De),$=w(Oe);b($),C($,e=>F(I,e),()=>e(I)),s(Oe);var ke=E(Oe,2),Ae=t=>{var n=et();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`mic-btn svelte-q632gy`,null,r,{active:e(L)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.text_input.mic_aria_label`])]),_(`click`,n,Se),_(`keydown`,n,Z),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&me()}),_(`mouseup`,n,_e),y(`mouseleave`,n,Y),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),me()},void 0,!0),_(`touchend`,n,xe),g(t,n)};t(ke,t=>{e(G)&&t(Ae)}),p(2),s(De);var je=E(De,2),Me=w(je),Ne=t=>{var n=tt(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.text_input.downloading_model`],{progress:e(de)})]),g(t,n)},Pe=e=>{var t=nt();g(e,t)},Fe=e=>{var t=rt();g(e,t)},Ie=t=>{var n=it(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Le=e=>{var t=it(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.text_input.invalid_email`])]),g(e,t)},Re=e=>{var t=tt(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Me,t=>{e(K)?t(Ne):e(L)?t(Pe,1):e(z)?t(Fe,2):e(U)?t(Ie,3):e(J)?t(Le,4):o.description&&e(V)&&t(Re,5)}),s(je),s(we),N(()=>{Q=a(we,1,`smrt-text-field svelte-q632gy`,null,Q,{"smrt-mode":e(G),focused:e(V),invalid:e(J),disabled:h(),"has-value":!!m(),listening:e(L)}),P($,`id`,o.name),P($,`aria-labelledby`,o.label?O:void 0),P($,`name`,o.name),P($,`type`,d()),P($,`placeholder`,e(V)?f():``),te($,m()),$.disabled=h()||e(z),$.required=v(),P($,`aria-invalid`,e(J)?`true`:void 0),P($,`aria-describedby`,`${o.name}-supporting`),P(je,`id`,`${o.name}-supporting`)}),_(`input`,$,Ce),y(`focus`,$,()=>F(V,!0)),y(`blur`,$,()=>F(V,!1)),_(`mousedown`,$,function(...t){(e(G)?ge:void 0)?.apply(this,t)}),_(`mouseup`,$,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),y(`mouseleave`,$,function(...t){(e(G)?Y:void 0)?.apply(this,t)}),_(`touchstart`,$,function(...t){(e(G)?ye:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,$,function(...t){(e(G)?xe:void 0)?.apply(this,t)}),g(n,we),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`]);function st(e){return typeof e!=`number`||!Number.isFinite(e)?null:Number((e*100).toFixed(4))}function ct(e){return e===null||!Number.isFinite(e)?null:Number((e/100).toFixed(6))}export{Ke as a,Ae as c,$e as i,De as l,ct as n,Ve as o,ot as r,Ne as s,st as t,Y as u};
|
|
1
|
+
import{$ as e,B as t,C as n,Ct as r,Dt as i,E as a,Et as o,Ft as s,G as c,H as l,J as u,K as d,L as f,Ot as ee,Pt as p,S as m,Tt as h,U as g,X as _,Y as v,Z as y,_ as b,a as x,b as te,bt as S,ct as ne,d as C,ft as w,gt as T,ht as E,k as D,kt as O,mt as k,n as A,nt as j,pt as M,q as re,st as N,v as P,vt as F,w as I,wt as L}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as R}from"./Bv5jGtB8.js";import{a as z,t as ie}from"./YUSKx8_q.js";import"./B2aomX_k.js";import{i as B}from"./DIE02RSm.js";import{t as V}from"./CUyVrfsu.js";import{x as ae}from"./Qxx7HWld.js";import{t as oe}from"./D042ejzG.js";import"./DDIQ8W6V.js";import{nt as se}from"./CLySd19b.js";function ce(){return V()}var H=z({"ui.address_input.street_placeholder":`123 Main Street`,"ui.address_input.city_placeholder":`City`,"ui.address_input.postal_code_placeholder":`A1A 1A1`,"ui.date_range_input.mic_aria_label":`Hold to speak date range`,"ui.date_range_input.parsing":`Parsing dates...`,"ui.date_range_input.end_after_start":`End date must be after start date`,"ui.date_time_input.mic_aria_label":`Hold to speak`,"ui.date_time_input.parsing":`Parsing date...`,"ui.file_upload.remove_file":`Remove {name}`,"ui.file_upload.required":`Select a file to upload`,"ui.file_upload.rejected_type":`{count} file(s) rejected: type not allowed`,"ui.file_upload.exceeds_max_size":`{count} file(s) exceed the maximum size of {size}`,"ui.form.extracting":`Extracting form fields…`,"ui.form.listening_status":`Listening. Say "done" to finish.`,"ui.form.listening_button":`Listening... (say "done" to finish)`,"ui.form.speak_all_fields":`Speak all fields`,"ui.form.you_said":`You said:`,"ui.form_mic_button.tooltip":`Speak to fill all fields. Click again to stop.`,"ui.measurement_input.value_at_least":`Value must be at least {min} {unit}`,"ui.measurement_input.value_at_most":`Value must be at most {max} {unit}`,"ui.money_input.value_at_least":`Value must be at least {min}`,"ui.money_input.value_at_most":`Value must be at most {max}`,"ui.number_input.value_at_least":`Value must be at least {min}`,"ui.number_input.value_at_most":`Value must be at most {max}`,"ui.phone_input.mic_aria_label":`Hold to speak`,"ui.phone_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.phone_input.invalid":`Invalid phone number`,"ui.search_input.clear_aria_label":`Clear search`,"ui.text_input.mic_aria_label":`Hold to speak`,"ui.text_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.text_input.invalid_email":`Invalid email address`,"ui.textarea_input.mic_aria_label":`Hold to speak`,"ui.textarea_input.downloading_model":`Downloading Whisper model... {progress}%`}),U=Symbol(`smrt-form`),W=new WeakMap;function G(e){let t=new Map;return{get mode(){return e.mode},registerField(n){let r=n.name,i=e.registerField(n),a=typeof i==`function`?i:()=>e.unregisterField(r),o=!0,s=()=>{if(!o)return;o=!1;let e=t.get(r);e?.delete(s),e?.size===0&&t.delete(r),a()},c=t.get(r)??new Set;return c.add(s),t.set(r,c),s},unregisterField(e){let n=t.get(e)?.values().next().value;n?.()},getFieldSchema:()=>e.getFieldSchema(),get isFormListening(){return e.isFormListening},get isExtracting(){return e.isExtracting},toggleListening:()=>e.toggleListening(),get interactionRegistry(){return e.interactionRegistry},get formId(){return e.formId}}}function K(e){let t=h(),n=W.get(t);if(n)return n;let r=o(U);if(!r){if(!e)return null;throw Error(`Form context not found. Make sure to wrap your inputs with <SMRTForm>`)}let i=G(r);return W.set(t,i),O(U,i),i}function le(){return K(!1)}function ue(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);throw Error(`staged_value_invalid`)}function de(){throw Error(`staged_value_invalid`)}var fe=c(`<div class="field-row full-width svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),q=c(`<div class="field-row flex-2 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),J=c(`<option> </option>`),pe=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <select><option>Select...</option><!></select></div>`),me=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <input type="text"/></div>`),he=c(`<div class="field-row flex-1 svelte-5rbjmj"><label class="field-label svelte-5rbjmj"> </label> <select></select></div>`),ge=c(`<div class="validation-error svelte-5rbjmj" role="alert"> </div>`),_e=c(`<div class="smrt-address svelte-5rbjmj" data-smrt-component="AddressInput"><!> <div><!> <div class="field-row-group svelte-5rbjmj"><!> <!></div> <div class="field-row-group svelte-5rbjmj"><!> <!></div></div> <!></div>`);function Y(o,c){let u=re();ee(c,!0);let{t:d}=ie(),p=[{value:`CA`,label:`Canada`},{value:`US`,label:`United States`}],h=[{value:`AB`,label:`Alberta`},{value:`BC`,label:`British Columbia`},{value:`MB`,label:`Manitoba`},{value:`NB`,label:`New Brunswick`},{value:`NL`,label:`Newfoundland and Labrador`},{value:`NS`,label:`Nova Scotia`},{value:`NT`,label:`Northwest Territories`},{value:`NU`,label:`Nunavut`},{value:`ON`,label:`Ontario`},{value:`PE`,label:`Prince Edward Island`},{value:`QC`,label:`Quebec`},{value:`SK`,label:`Saskatchewan`},{value:`YT`,label:`Yukon`},{value:`US-CA`,label:`California`},{value:`US-NY`,label:`New York`},{value:`US-TX`,label:`Texas`},{value:`US-FL`,label:`Florida`},{value:`US-WA`,label:`Washington`}],v=x(c,`value`,31,()=>T({})),y=x(c,`fields`,19,()=>[`street`,`city`,`province`,`postalCode`,`country`]),C=x(c,`disabled`,3,!1),D=x(c,`required`,3,!1),O=x(c,`countries`,3,p),A=x(c,`provinces`,3,h);function M(){return[...new Set(O().map(e=>e.value))]}function I(){return[...new Set([...D()?[]:[``],...A().map(e=>e.value)])]}function L(e){return e===`country`?{type:`string`,enum:M()}:e===`province`?{type:`string`,enum:I()}:{type:`string`}}function R(e){if(typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!(![Object.prototype,null].includes(Object.getPrototypeOf(t))||!Object.keys(t).every(e=>y().includes(e))||!y().every(e=>!Object.hasOwn(t,e)||typeof t[e]==`string`)||Object.hasOwn(t,`country`)&&!M().includes(t.country)||Object.hasOwn(t,`province`)&&!I().includes(t.province))}function z(e){if(e==null)return!D();if(!R(e))return!1;if(!D())return!0;let t=e;return y().every(e=>typeof t[e]==`string`&&t[e].trim().length>0)}let B=ce(),V=le(),oe=`smrt-rich-field-${u}`,se=r(()=>B.state.mode===`smrt`),U=S(T(v().street??``)),W=S(T(v().city??``)),G=S(T(v().province??``)),K=S(T(v().postalCode??``)),Y=S(T(v().country??j(()=>O()[0]?.value??``)));ne(()=>{v().street!==void 0&&v().street!==e(U)&&F(U,v().street,!0),v().city!==void 0&&v().city!==e(W)&&F(W,v().city,!0),v().province!==void 0&&v().province!==e(G)&&F(G,v().province,!0),v().postalCode!==void 0&&v().postalCode!==e(K)&&F(K,v().postalCode,!0),v().country!==void 0&&v().country!==e(Y)&&F(Y,v().country,!0)});function ve(){let t={};return y().includes(`street`)&&(t.street=e(U)),y().includes(`city`)&&(t.city=e(W)),y().includes(`province`)&&(t.province=e(G)),y().includes(`postalCode`)&&(t.postalCode=e(K)),y().includes(`country`)&&(t.country=e(Y)),t}function X(){let e=ve();v(e),c.onchange?.(e)}function ye(e){let t={},n=e.toLowerCase().trim(),r=n.match(/([a-z]\d[a-z]\s?\d[a-z]\d)|(\d{5}(-\d{4})?)/i);r&&(t.postalCode=r[0].toUpperCase().replace(/\s+/g,` `));for(let e of A())if(RegExp(`\\b${e.label.toLowerCase()}\\b|\\b${e.value.toLowerCase()}\\b`,`i`).test(n)){t.province=e.value;break}for(let e of O())if([e.label,e.value].some(e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\W)${t}(?=$|\\W)`,`i`).test(n)})){t.country=e.value;break}for(let e of[/(?:city\s+(?:of\s+)?|in\s+)([a-z\s]+?)(?:\s*,|\s+(?:ab|bc|mb|on|qc|sk|alberta|british columbia|ontario|quebec)|\s*$)/i]){let r=n.match(e);if(r){t.city=r[1].trim().replace(/\b\w/g,e=>e.toUpperCase());break}}let i=n.match(/(\d+\s+[a-z\s]+(?:street|st|avenue|ave|road|rd|drive|dr|boulevard|blvd|way|lane|ln|crescent|cres|place|pl|court|ct))/i);return i&&(t.street=i[1].replace(/\b\w/g,e=>e.toUpperCase())),t}let be={street:`Street Address`,city:`City`,province:`Province/State`,postalCode:`Postal/ZIP Code`,country:`Country`},xe=r(()=>{let e=y()[0]??`street`;switch(e){case`postalCode`:return`${c.name}_postal`;default:return`${c.name}_${e}`}});ne(()=>{if(V){let e={name:c.name,ownerToken:oe,type:`address`,get label(){return c.label},get description(){return c.description||`A mailing address with street, city, province, postal code, and country`},setValue:e=>{if(e==null){F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X();return}if(R(e)){let t=e;t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X();return}let t=Object.fromEntries(Object.entries(ye(String(e))).filter(([e])=>y().includes(e)));Object.keys(t).length>0&&R(t)&&(t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X())},getValue:ve,prepareValue:e=>{if(e==null)return Object.fromEntries(y().map(e=>[e,e===`country`?O()[0]?.value??``:``]));if(typeof e==`object`&&!Array.isArray(e))return e;let t=ye(ue(e)),n=Object.fromEntries(Object.entries(t).filter(([e])=>y().includes(e)));return Object.keys(n).length>0?{...ve(),...n}:de()},clear:()=>(F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X(),!0),getState:()=>({disabled:C()}),get constraints(){return{required:D()}},get webMcpSchema(){return{type:`object`,additionalProperties:!1,properties:Object.fromEntries(y().map(e=>[e,L(e)])),...D()?{required:[...y()]}:{}}},validateValue:z,validate:()=>z(ve())};return V.registerField(e)}});function Se(e){F(U,e.target.value,!0),X()}function Z(e){F(W,e.target.value,!0),X()}function Ce(e){F(G,e.target.value,!0),X()}function we(e){F(K,e.target.value,!0),X()}function Q(e){F(Y,e.target.value,!0),X()}var Te=_e(),Ee=w(Te),De=t=>{ae(t,{get for(){return e(xe)},get label(){return c.label},get required(){return D()}})};t(Ee,e=>{c.label&&e(De)});var Oe=E(Ee,2);let $;var ke=w(Oe),Ae=t=>{var n=fe(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_street`),l(i,be.street),P(o,`id`,`${c.name??``}_street`),P(o,`name`,`${c.name??``}[street]`),P(o,`placeholder`,t),te(o,e(U)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.street_placeholder`]),()=>D()&&y().includes(`street`)]),_(`input`,o,Se),g(t,n)},je=r(()=>y().includes(`street`));t(ke,t=>{e(je)&&t(Ae)});var Me=E(ke,2),Ne=w(Me),Pe=t=>{var n=q(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_city`),l(i,be.city),P(o,`id`,`${c.name??``}_city`),P(o,`name`,`${c.name??``}[city]`),P(o,`placeholder`,t),te(o,e(W)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.city_placeholder`]),()=>D()&&y().includes(`city`)]),_(`input`,o,Z),g(t,n)},Fe=r(()=>y().includes(`city`));t(Ne,t=>{e(Fe)&&t(Pe)});var Ie=E(Ne,2),Le=t=>{var r=pe(),i=w(r),o=k(i,!0),u=E(i,2);let d;var ee=w(u);ee.value=ee.__value=``;var p=E(ee);f(p,17,A,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var h;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_province`),l(o,be.province),P(u,`id`,`${c.name??``}_province`),P(u,`name`,`${c.name??``}[province]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-input smrt-select svelte-5rbjmj`,null,d,{invalid:!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),h!==(h=e(G))&&(u.value=(u.__value=h)??``,n(u,h))},[()=>D()&&y().includes(`province`)]),_(`change`,u,Ce),g(t,r)},Re=r(()=>y().includes(`province`));t(Ie,t=>{e(Re)&&t(Le)}),s(Me);var ze=E(Me,2),Be=w(ze),Ve=t=>{var n=me(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_postal`),l(i,be.postalCode),P(o,`id`,`${c.name??``}_postal`),P(o,`name`,`${c.name??``}[postalCode]`),P(o,`placeholder`,t),te(o,e(K)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-input svelte-5rbjmj`,null,u,{invalid:!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.postal_code_placeholder`]),()=>D()&&y().includes(`postalCode`)]),_(`input`,o,we),g(t,n)},He=r(()=>y().includes(`postalCode`));t(Be,t=>{e(He)&&t(Ve)});var Ue=E(Be,2),We=t=>{var r=he(),i=w(r),o=k(i,!0),u=E(i,2);let d;f(u,21,O,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var ee;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_country`),l(o,be.country),P(u,`id`,`${c.name??``}_country`),P(u,`name`,`${c.name??``}[country]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-input smrt-select svelte-5rbjmj`,null,d,{invalid:!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),ee!==(ee=e(Y))&&(u.value=(u.__value=ee)??``,n(u,ee))},[()=>D()&&y().includes(`country`)]),_(`change`,u,Q),g(t,r)},Ge=r(()=>y().includes(`country`));t(Ue,t=>{e(Ge)&&t(We)}),s(ze),s(Oe);var Ke=E(Oe,2),qe=e=>{var t=ge(),n=k(t,!0);N(()=>{P(t,`id`,`${c.name}-error`),l(n,c.error)}),g(e,t)};t(Ke,e=>{c.error&&e(qe)}),s(Te),N(()=>{P(Te,`data-smrt-field-owner`,oe),$=a(Oe,1,`address-fields svelte-5rbjmj`,null,$,{"smrt-mode":e(se)})}),g(o,Te),i()}v([`input`,`change`]);function ve(e){return e.toLowerCase().replace(/\s+at\s+/gi,`@`).replace(/\bat\b/gi,`@`).replace(/\s+dot\s+/gi,`.`).replace(/\bdot\b/gi,`.`).replace(/\s+/g,``).trim()}function X(e){return e.replace(/^(my name is|i am|i'm|it's|this is|the name is)\s*/i,``).replace(/\b(um|uh|like|so|well)\b\s*/gi,``).trim()}function ye(e,t){let n=e.toLowerCase().trim();for(let e of t)if(e.value.toLowerCase()===n||e.label.toLowerCase()===n)return e.value;for(let e of t)if(e.label.toLowerCase().includes(n)||n.includes(e.label.toLowerCase()))return e.value;return null}v([`change`]);function be(e={}){let t=V(),n=!1;return e.autoInit&&t.initializeSTT().catch(()=>{}),A(()=>{n&&t.state.ai.stt.isListening&&t.stopListening().catch(()=>{}),n=!1}),{start:async r=>{n=!0;try{await t.startListening({...e.defaultOptions,...r})}catch(e){throw n=!1,e}},stop:async()=>{n=!1,await t.stopListening()},initialize:async e=>{await t.initializeSTT(e)},get isListening(){return t.state.ai.stt.isListening},get isReady(){return t.state.ai.stt.initState===`ready`},get isInitializing(){return t.state.ai.stt.initState===`initializing`},get lastResult(){return t.state.ai.stt.lastResult},get interimResult(){return t.state.ai.stt.interimResult},get currentResult(){let{isListening:e,interimResult:n,lastResult:r}=t.state.ai.stt;return e&&n?n:r},get error(){return t.state.ai.stt.error},get downloadProgress(){return t.state.ai.stt.downloadProgress?.percent??0},get adapterType(){return t.state.ai.stt.adapter?.type??null}}}v([`keydown`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`change`]);var xe=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="spinner svelte-rsri1g"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12" class="svelte-rsri1g"></circle></svg>`),Se=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-rsri1g"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-rsri1g"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-rsri1g"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-rsri1g"></line></svg>`),Z=c(`<input type="text" class="smrt-input smrt-mode svelte-rsri1g" readonly=""/> <button type="button"><!></button>`,1),Ce=c(`<input class="smrt-input svelte-rsri1g"/>`),we=c(`<div class="listening-indicator svelte-rsri1g">Recording...</div>`),Q=c(`<div class="parsing-indicator svelte-rsri1g"> </div>`),Te=c(`<div class="error-indicator svelte-rsri1g" role="alert"> </div>`),Ee=c(`<div data-smrt-component="DateTimeInput"><!> <div class="input-wrapper svelte-rsri1g"><!></div> <!></div>`);function De(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`includeTime`,3,!0),f=x(o,`placeholder`,19,()=>d()?`e.g., next Tuesday at 3pm`:`e.g., March 15, 1990`),p=x(o,`value`,15,``),m=x(o,`disabled`,3,!1),h=x(o,`required`,3,!1),v=`${c}-label`,T=ce(),D=be(),O=le(),A=S(null),j=S(``),I=S(!1),L=S(!1),R=S(null),z=0,V=r(()=>T.state.mode===`smrt`);function se(e){p(e),o.onchange?.(p())}function U(e){if(!e)return``;try{if(!d()&&/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r).toLocaleDateString(void 0,{dateStyle:`medium`})}let t=new Date(e);return Number.isNaN(t.getTime())?e:d()?t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):t.toLocaleDateString(void 0,{dateStyle:`medium`})}catch{return e}}function W(e){if(typeof e!=`string`)return!1;if(e===``)return!h();let t=d()?/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?$/.exec(e):/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return!1;let[,n,r,i,a=`0`,o=`0`,s=`0`]=t,c=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(a),Number(o),Number(s)));return c.getUTCFullYear()===Number(n)&&c.getUTCMonth()===Number(r)-1&&c.getUTCDate()===Number(i)&&c.getUTCHours()===Number(a)&&c.getUTCMinutes()===Number(o)&&c.getUTCSeconds()===Number(s)}ne(()=>{F(j,U(p()),!0)}),ne(()=>{if(O){let e={name:o.name,type:`datetime`,get label(){return o.label},get description(){return o.description??(d()?`Date and time`:`Date`)},setValue:e=>{se(String(e??``))},getValue:()=>p(),prepareValue:ue,getState:()=>({disabled:m()}),get constraints(){return{required:h()}},validateValue:W,validate:()=>W(p())};return O.registerField(e)}});async function G(e){let t;try{t=await oe(`chrono-node`)}catch{throw Error(`Natural-language date parsing requires the optional dependency "chrono-node". Install it with: pnpm add chrono-node`)}let n=t.parse(e);if(n.length===0)throw Error(`Could not parse date from speech`);let r=n[0].start.date();if(Number.isNaN(r.getTime()))throw Error(`Invalid date`);let i=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,`0`),o=String(r.getDate()).padStart(2,`0`);return d()?`${i}-${a}-${o}T${String(r.getHours()).padStart(2,`0`)}:${String(r.getMinutes()).padStart(2,`0`)}`:`${i}-${a}-${o}`}async function K(){if(!(!e(V)||m()||e(L))){F(R,null),z=Date.now(),F(I,!0);try{(!D.isReady||D.adapterType!==`whisper-wasm`)&&await D.initialize({type:`whisper-wasm`}),await D.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(R,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`DateTimeInput: failed to start voice recording`,{field:o.name,error:e})}}}async function de(){if(!e(I))return;let t=Date.now()-z;if(F(I,!1),await D.stop(),t<500)return;let n=Date.now();for(;D.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=D.lastResult?.trim()||``;if(!r||r.length<2)F(R,`No speech detected. Hold longer and speak clearly.`);else{F(L,!0),F(R,null);try{se(await G(r))}catch(e){F(R,e instanceof Error?e.message:`Failed to parse date`,!0)}finally{F(L,!1)}}}function fe(e){e.button===0&&K()}function q(){de()}function J(){de()}function pe(e){e.preventDefault(),K()}function me(){de()}function he(e){e.preventDefault(),e.stopPropagation()}function ge(e){e.stopPropagation(),e.button===0&&K()}function _e(e){e.stopPropagation(),e.preventDefault(),K()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e(I)?de():K())}function ve(e){let t=e.target;se(t.value)}var X=Ee();let ye;var De=w(X),Oe=e=>{ae(e,{get id(){return v},get for(){return o.name},get label(){return o.label},get required(){return h()}})};t(De,e=>{o.label&&e(Oe)});var $=E(De,2),ke=w($),Ae=n=>{var r=Z(),i=M(r);b(i),C(i,e=>F(A,e),()=>e(A));var c=E(i,2);let l;var d=w(c),ee=e=>{var t=xe();g(e,t)},p=e=>{var t=Se();g(e,t)};t(d,t=>{e(L)?t(ee):t(p,-1)}),s(c),N(t=>{P(i,`id`,o.name),P(i,`aria-labelledby`,o.label?v:void 0),P(i,`name`,o.name),P(i,`placeholder`,f()),te(i,e(j)),i.disabled=m()||e(L),i.required=h(),P(i,`aria-invalid`,e(R)?`true`:void 0),P(i,`aria-describedby`,e(R)?`${o.name}-error`:void 0),l=a(c,1,`mic-btn svelte-rsri1g`,null,l,{active:e(I)}),c.disabled=m()||e(L),P(c,`aria-label`,t)},[()=>u(H[`ui.date_time_input.mic_aria_label`])]),_(`mousedown`,i,fe),_(`mouseup`,i,q),y(`mouseleave`,i,J),_(`touchstart`,i,pe,void 0,!0),_(`touchend`,i,me),_(`click`,c,he),_(`keydown`,c,Y),_(`mousedown`,c,ge),_(`mouseup`,c,q),y(`mouseleave`,c,J),_(`touchstart`,c,_e,void 0,!0),_(`touchend`,c,me),g(n,r)},je=t=>{var n=Ce();b(n),C(n,e=>F(A,e),()=>e(A)),N(()=>{P(n,`id`,o.name),P(n,`aria-labelledby`,o.label?v:void 0),P(n,`name`,o.name),P(n,`type`,d()?`datetime-local`:`date`),te(n,p()),n.disabled=m(),n.required=h(),P(n,`aria-invalid`,e(R)?`true`:void 0),P(n,`aria-describedby`,e(R)?`${o.name}-error`:void 0)}),_(`change`,n,ve),g(t,n)};t(ke,t=>{e(V)?t(Ae):t(je,-1)}),s($);var Me=E($,2),Ne=e=>{var t=we();g(e,t)},Pe=e=>{var t=Q(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.date_time_input.parsing`])]),g(e,t)},Fe=t=>{var n=Te(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-error`),l(r,e(R))}),g(t,n)};t(Me,t=>{e(I)?t(Ne):e(L)?t(Pe,1):e(R)&&t(Fe,2)}),s(X),N(()=>ye=a(X,1,`smrt-datetime svelte-rsri1g`,null,ye,{listening:e(I),parsing:e(L)})),g(n,X),i()}v([`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`,`change`]),v([`click`,`keydown`,`change`]),v([`click`]),v([`click`,`keydown`]),v([`input`,`change`]);var Oe=c(`<div class="validation-error svelte-e6jjj7" role="alert"> </div>`),$=c(`<div class="validation-error svelte-e6jjj7" role="alert"><!></div>`),ke=c(`<div class="smrt-money svelte-e6jjj7" data-smrt-component="MoneyInput"><!> <div class="input-wrapper svelte-e6jjj7"><input type="text" inputmode="decimal"/> <span class="currency-code svelte-e6jjj7"> </span></div> <input type="hidden"/> <!></div>`);function Ae(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,`0.00`),p=x(o,`value`,15,null),m=x(o,`currency`,3,`CAD`),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),C=`${c}-label`,D=ce(),O=le(),A=r(()=>D.state.mode===`smrt`);function j(e){return e===null?``:(e/100).toFixed(2)}function M(e){let t=e.replace(/[$,\s]/g,``);if(t===``)return null;let n=parseFloat(t);return Number.isNaN(n)?null:Math.round(n*100)}let I=S(T(j(p())));ne(()=>{let t=j(p());e(I)!==t&&!e(L)&&F(I,t,!0)});let L=S(!1),R=r(()=>m()===`USD`?`US$`:`CA$`),z=r(()=>p()===null||!(o.min!==void 0&&p()<o.min||o.max!==void 0&&p()>o.max)),B=r(()=>p()!==null&&!e(z)||!!o.error);function V(e){p(e),o.onchange?.(p())}function oe(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=/dollar|buck|cad|usd/i.test(t),i=/cent/i.test(t),a=t.replace(/\$|dollar[s]?|buck[s]?|cad|usd|cent[s]?/gi,``).trim(),o=a.match(/[\d,.]+/);if(o){let e=parseFloat(o[0].replace(/,/g,``));if(!Number.isNaN(e))return Math.round(i&&!r?e:e*100)}let s=a.split(/[\s-]+/).filter(Boolean),c=0,l=0,u=0,d=!1;for(let e=0;e<s.length;e++){let t=s[e],r=n[t];t===`and`||t===`point`?(d=!0,c+=u,u=0):r!==void 0&&(r>=100?(u=u===0?r:u*r,r>=1e3&&(d?l+=u:c+=u,u=0)):u+=r)}d?(l+=u,l>99&&(c+=Math.floor(l/100),l%=100)):c+=u;let f=c*100+l;return f>0?f:null}ne(()=>{if(O){let t={name:o.name,type:`money`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between $${(o.min/100).toFixed(2)} and $${(o.max/100).toFixed(2)})`:o.min===void 0?o.max!==void 0&&(e=` (maximum $${(o.max/100).toFixed(2)})`):e=` (minimum $${(o.min/100).toFixed(2)})`,(o.description||`A monetary amount in dollars`)+e},setValue:e=>{if(e==null||e===``){V(null),F(I,``);return}if(typeof e==`number`){V(e),F(I,j(e),!0);return}let t=oe(String(e));t!==null&&(V(t),F(I,j(t),!0))},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?oe(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max}},validateValue:e=>e===null&&!v()||typeof e==`number`&&Number.isSafeInteger(e)&&(o.min===void 0||e>=o.min)&&(o.max===void 0||e<=o.max),validate:()=>p()===null?!v():Number.isSafeInteger(p())&&e(z)};return O.registerField(t)}});function se(e){let t=e.target;F(I,t.value,!0),V(M(t.value))}function U(){F(L,!0)}function W(){F(L,!1),F(I,j(p()),!0)}var G=ke(),K=w(G),ue=e=>{ae(e,{get id(){return C},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(K,e=>{o.label&&e(ue)});var fe=E(K,2),q=w(fe);b(q);let J;var pe=E(q,2),me=k(pe,!0);s(fe);var he=E(fe,2);b(he);var ge=E(he,2),_e=e=>{var t=Oe(),n=k(t,!0);N(()=>{P(t,`id`,`${o.name}-error`),l(n,o.error)}),g(e,t)},Y=n=>{var r=$(),i=w(r),a=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_least`],{min:`${e(R)}${(o.min/100).toFixed(2)}`})]),g(t,n)},c=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_most`],{max:`${e(R)}${(o.max/100).toFixed(2)}`})]),g(t,n)};t(i,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(a):o.max!==void 0&&p()!==null&&p()>o.max&&e(c,1)}),s(r),N(()=>P(r,`id`,`${o.name}-error`)),g(n,r)};t(ge,t=>{o.error?t(_e):e(B)&&!e(z)&&t(Y,1)}),s(G),N(()=>{P(q,`id`,o.name),P(q,`aria-labelledby`,o.label?C:void 0),P(q,`name`,o.name),P(q,`placeholder`,f()),te(q,e(I)),q.disabled=h(),q.required=v(),J=a(q,1,`smrt-input svelte-e6jjj7`,null,J,{"smrt-mode":e(A),invalid:e(B)}),P(q,`aria-invalid`,e(B)?`true`:void 0),P(q,`aria-describedby`,e(B)?`${o.name}-error`:void 0),l(me,m()),P(he,`name`,`${o.name??``}_cents`),te(he,p()??``)}),_(`input`,q,se),y(`focus`,q,U),y(`blur`,q,W),g(n,G),i()}v([`input`]);var je=c(`<div class="validation-error svelte-1pebtso" role="alert"><!></div>`),Me=c(`<div class="smrt-number svelte-1pebtso" data-smrt-component="NumberInput"><!> <div class="input-wrapper svelte-1pebtso"><input type="number"/></div> <!></div>`);function Ne(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,``),p=x(o,`value`,15,null),m=x(o,`step`,3,1),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),y=`${c}-label`,S=ce(),C=le(),T=r(()=>S.state.mode===`smrt`);function D(e){return e===null||!(o.min!==void 0&&e<o.min||o.max!==void 0&&e>o.max)}function O(e){if(!Number.isFinite(m())||m()<=0)return!0;let t=(e-(o.min??0))/m();return Math.abs(t-Math.round(t))<=1e-9}let k=r(()=>D(p())),A=r(()=>p()!==null&&!e(k));function j(e){p(e),o.onchange?.(p())}function M(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=parseFloat(t.replace(/[,$]/g,``));if(!Number.isNaN(r))return r;if(n[t]!==void 0)return n[t];let i=t.split(/[\s-]+/),a=0,o=0;for(let e of i){let t=n[e];t!==void 0&&(t>=100?(o=o===0?t:o*t,t>=1e3&&(a+=o,o=0)):o+=t)}return a+=o,a>0?a:null}ne(()=>{if(C){let t={name:o.name,type:`number`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between ${o.min} and ${o.max})`:o.min===void 0?o.max!==void 0&&(e=` (maximum ${o.max})`):e=` (minimum ${o.min})`,(o.description||`A number`)+e},setValue:e=>{if(e==null||e===``){j(null);return}if(typeof e==`number`){j(e);return}let t=M(String(e));t!==null&&j(t)},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?M(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max,step:m()}},validateValue:e=>{if(e==null||e===``)return!v();let t=typeof e==`number`?e:M(String(e));return t!==null&&Number.isFinite(t)&&D(t)&&O(t)},validate:()=>p()===null?!v():Number.isFinite(p())&&e(k)};return C.registerField(t)}});function F(e){let t=e.target;j(t.value===``?null:parseFloat(t.value))}var I=Me(),L=w(I),R=e=>{ae(e,{get id(){return y},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(L,e=>{o.label&&e(R)});var z=E(L,2),B=w(z);b(B);let V;s(z);var oe=E(z,2),se=e=>{var n=je(),r=w(n),i=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_least`],{min:o.min})]),g(e,t)},a=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_most`],{max:o.max})]),g(e,t)};t(r,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(i):o.max!==void 0&&p()!==null&&p()>o.max&&e(a,1)}),s(n),N(()=>P(n,`id`,`${o.name}-error`)),g(e,n)};t(oe,t=>{e(A)&&t(se)}),s(I),N(()=>{P(B,`id`,o.name),P(B,`aria-labelledby`,o.label?y:void 0),P(B,`name`,o.name),P(B,`placeholder`,f()),te(B,p()??``),P(B,`min`,o.min),P(B,`max`,o.max),P(B,`step`,m()),B.disabled=h(),B.required=v(),V=a(B,1,`smrt-input svelte-1pebtso`,null,V,{"smrt-mode":e(T),invalid:e(A)}),P(B,`aria-invalid`,e(A)?`true`:void 0),P(B,`aria-describedby`,e(A)?`${o.name}-error`:void 0)}),_(`input`,B,F),g(n,I),i()}v([`input`]);var Pe=c(`<button type="button"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1vixtb7"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-1vixtb7"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-1vixtb7"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-1vixtb7"></line></svg></button>`),Fe=c(`<div class="downloading-indicator svelte-1vixtb7"><span class="processing-spinner svelte-1vixtb7"></span> <span class="svelte-1vixtb7"> </span></div>`),Ie=c(`<div class="listening-indicator svelte-1vixtb7"><span class="listening-dot svelte-1vixtb7"></span> <span class="svelte-1vixtb7">Recording...</span></div>`),Le=c(`<div class="processing-indicator svelte-1vixtb7"><span class="processing-spinner svelte-1vixtb7"></span> <span class="svelte-1vixtb7">Processing...</span></div>`),Re=c(`<div class="error-message svelte-1vixtb7" role="alert"> </div>`),ze=c(`<div class="validation-error svelte-1vixtb7" role="alert"> </div>`),Be=c(`<div data-smrt-component="PhoneInput"><!> <div class="input-wrapper svelte-1vixtb7"><input type="tel"/> <!></div> <!> <!> <!></div>`);function Ve(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,`(555) 555-5555`),f=x(o,`value`,15,``),p=x(o,`disabled`,3,!1),m=x(o,`required`,3,!1),h=`${c}-label`,v=ce(),T=be(),D=le(),O=S(null),A=S(!1),j=S(!1),M=S(null),I=0,L=r(()=>v.state.mode===`smrt`),R=r(()=>T.isInitializing),z=r(()=>T.downloadProgress);function V(e){if(typeof e!=`string`)return!1;if(!e)return!m();let t=e.replace(/\D/g,``);return t.length===10||t.length===11&&t[0]===`1`}let oe=r(()=>V(f())),se=r(()=>f()&&!e(oe));function U(e){f(e),o.onchange?.(f())}function W(e){let t=e.replace(/\D/g,``);return t.length===0?``:t.length<=3?`(${t}`:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length<=10?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:t.length===11&&t[0]===`1`?`+1 (${t.slice(1,4)}) ${t.slice(4,7)}-${t.slice(7)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6,10)}`}function G(e){let t={zero:`0`,oh:`0`,one:`1`,two:`2`,to:`2`,too:`2`,three:`3`,four:`4`,for:`4`,five:`5`,six:`6`,seven:`7`,eight:`8`,nine:`9`,niner:`9`},n=e.toLowerCase().replace(/^(my phone number is|my number is|phone number|number is|call me at)\s*/i,``).replace(/\b(area code|extension|ext)\b/gi,``).trim();for(let[e,r]of Object.entries(t))n=n.replace(RegExp(`\\b${e}\\b`,`gi`),r);return n=n.replace(/\bdouble\s*(\d)/gi,`$1$1`),n=n.replace(/\btriple\s*(\d)/gi,`$1$1$1`),n.replace(/\D/g,``)}function K(e){return W(G(e))}ne(()=>{if(D){let e={name:o.name,type:`phone`,get label(){return o.label},get description(){return o.description||`Phone number`},setValue:e=>{U(K(String(e??``)))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);if(t===``)return``;let n=G(t);return n.length!==10&&(n.length!==11||n[0]!==`1`)?t:W(n)||de()},getState:()=>({disabled:p()}),get constraints(){return{required:m()}},validateValue:e=>{if(typeof e!=`string`)return!1;if(e===``)return!m();let t=G(e);return t.length===10||t.length===11&&t[0]===`1`},validate:()=>V(f())};return D.registerField(e)}});async function fe(){if(!(!e(L)||p()||e(j))){F(M,null),I=Date.now(),F(A,!0);try{(!T.isReady||T.adapterType!==`whisper-wasm`)&&await T.initialize({type:`whisper-wasm`}),await T.start({continuous:!0,interimResults:!1})}catch(e){F(A,!1),F(M,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`PhoneInput: failed to start voice recording`,{field:o.name,error:e})}}}async function q(){if(!e(A))return;let t=Date.now()-I;if(F(A,!1),await T.stop(),t<500)return;let n=Date.now();for(;T.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=T.lastResult?.trim()||``;if(!r||r.length<2)F(M,`No speech detected. Hold longer and speak clearly.`);else{F(j,!0),F(M,null);try{U(K(r))}catch(e){F(M,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(j,!1)}}}function J(e){e.button===0&&fe()}function pe(){q()}function me(){q()}function he(e){e.preventDefault(),fe()}function ge(){q()}function _e(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(A)?q():fe())}function Y(e){let t=e.target;U(W(t.value))}var ve=Be();let X;var ye=w(ve),xe=e=>{ae(e,{get id(){return h},get for(){return o.name},get label(){return o.label},get required(){return m()}})};t(ye,e=>{o.label&&e(xe)});var Se=E(ye,2),Z=w(Se);b(Z);let Ce;C(Z,e=>F(O,e),()=>e(O));var we=E(Z,2),Q=t=>{var n=Pe();let r;N(t=>{r=a(n,1,`mic-btn svelte-1vixtb7`,null,r,{active:e(A)}),n.disabled=p(),P(n,`aria-label`,t)},[()=>u(H[`ui.phone_input.mic_aria_label`])]),_(`keydown`,n,_e),_(`mousedown`,n,J),_(`mouseup`,n,pe),y(`mouseleave`,n,me),_(`touchstart`,n,he,void 0,!0),_(`touchend`,n,ge),g(t,n)};t(we,t=>{e(L)&&t(Q)}),s(Se);var Te=E(Se,2),Ee=t=>{var n=Fe(),r=E(w(n),2),i=k(r,!0);s(n),N(e=>l(i,e),[()=>u(H[`ui.phone_input.downloading_model`],{progress:e(z)})]),g(t,n)},De=e=>{var t=Ie();g(e,t)},Oe=e=>{var t=Le();g(e,t)};t(Te,t=>{e(R)?t(Ee):e(A)?t(De,1):e(j)&&t(Oe,2)});var $=E(Te,2),ke=t=>{var n=Re(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-stt-error`),l(r,e(M))}),g(t,n)};t($,t=>{e(M)&&t(ke)});var Ae=E($,2),je=e=>{var t=ze(),n=k(t,!0);N(e=>{P(t,`id`,`${o.name}-error`),l(n,e)},[()=>u(H[`ui.phone_input.invalid`])]),g(e,t)};t(Ae,t=>{e(se)&&t(je)}),s(ve),N(()=>{X=a(ve,1,`smrt-phone svelte-1vixtb7`,null,X,{listening:e(A)}),P(Z,`id`,o.name),P(Z,`aria-labelledby`,o.label?h:void 0),P(Z,`name`,o.name),P(Z,`placeholder`,d()),te(Z,f()),Z.disabled=p()||e(j),Z.required=m(),Ce=a(Z,1,`smrt-input svelte-1vixtb7`,null,Ce,{"smrt-mode":e(L),invalid:e(se),processing:e(j)}),P(Z,`aria-invalid`,e(se)?`true`:void 0),P(Z,`aria-describedby`,e(se)?`${o.name}-error`:e(M)?`${o.name}-stt-error`:void 0)}),_(`input`,Z,Y),_(`mousedown`,Z,function(...t){(e(L)?J:void 0)?.apply(this,t)}),_(`mouseup`,Z,function(...t){(e(L)?pe:void 0)?.apply(this,t)}),y(`mouseleave`,Z,function(...t){(e(L)?me:void 0)?.apply(this,t)}),_(`touchstart`,Z,function(...t){(e(L)?he:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Z,function(...t){(e(L)?ge:void 0)?.apply(this,t)}),g(n,ve),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]),v([`input`,`keydown`,`click`]);var He=c(`<option disabled=""> </option>`),Ue=c(`<option> </option>`),We=c(`<span class="info svelte-17ub3c7"> </span>`),Ge=c(`<div data-smrt-component="SelectInput"><!> <div class="container svelte-17ub3c7"><div class="content svelte-17ub3c7"><select class="input svelte-17ub3c7"><!><!></select></div> <div class="trailing-icon svelte-17ub3c7"><!></div> <div class="active-indicator svelte-17ub3c7"></div></div> <div class="supporting-text svelte-17ub3c7" aria-live="polite"><!></div></div>`);function Ke(o,c){let u=re();ee(c,!0);let d=x(c,`placeholder`,3,`Select an option...`),h=x(c,`value`,15,``),v=x(c,`disabled`,3,!1),b=x(c,`required`,3,!1),te=`${u}-label`,C=ce(),T=le(),D=S(!1),O=r(()=>c.options.some(e=>e.value===``)),A=r(()=>c.options.filter((e,t)=>c.options.findIndex(t=>t.value===e.value)===t)),j=r(()=>C.state.mode===`smrt`);function M(e){h(e),c.onchange?.(h())}ne(()=>{if(T){let e={name:c.name,type:`select`,get label(){return c.label},get description(){let e=c.options.map(e=>e.label).join(`, `);return c.description?`${c.description}. Options: ${e}`:`Options: ${e}`},setValue:e=>{let t=String(e??``),n=ye(t,c.options);n?M(n):c.options.some(e=>e.value===t)&&M(t)},getValue:()=>h(),prepareValue:e=>{let t=ue(e);return t.trim()===``?t:ye(t,c.options)??t},clear:()=>(M(``),!0),getState:()=>({disabled:v()}),get constraints(){return{required:b()}},get options(){return c.options.map(e=>({value:e.value,label:e.label}))},validateValue:e=>{let t=String(e??``);return t===``?!b():c.options.some(e=>e.value===t)},validate:()=>!b()||h().trim().length>0};return T.registerField(e)}});function L(e){let t=e.target;M(t.value)}var R=Ge();let z;var ie=w(R),B=e=>{ae(e,{get id(){return te},get for(){return c.name},get label(){return c.label},get required(){return b()}})};t(ie,e=>{c.label&&e(B)});var V=E(ie,2),oe=w(V),H=w(oe),U=w(H),W=e=>{var t=He(),n=k(t,!0);t.value=t.__value=``,N(()=>{I(t,!h()),l(n,d())}),g(e,t)};t(U,t=>{e(O)||t(W)});var G=E(U);f(G,17,()=>e(A),e=>e.value,(t,n)=>{var r=Ue(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(H);var K;m(H),s(oe);var de=E(oe,2),fe=w(de);se(fe,{name:`chevron-down`,size:24}),s(de),p(2),s(V);var q=E(V,2),J=w(q),pe=e=>{var t=We(),n=k(t,!0);N(()=>l(n,c.description)),g(e,t)};t(J,t=>{c.description&&e(D)&&t(pe)}),s(q),s(R),N(()=>{z=a(R,1,`smrt-select-field svelte-17ub3c7`,null,z,{"smrt-mode":e(j),focused:e(D),disabled:v(),"has-value":!!h()}),P(H,`id`,c.name),P(H,`aria-labelledby`,c.label?te:void 0),P(H,`name`,c.name),H.disabled=v(),H.required=b(),P(H,`aria-describedby`,`${c.name}-supporting`),K!==(K=h())&&(H.value=(H.__value=K)??``,n(H,K)),P(q,`id`,`${c.name}-supporting`)}),_(`change`,H,L),y(`focus`,H,()=>F(D,!0)),y(`blur`,H,()=>F(D,!1)),g(o,R),i()}v([`change`]);var qe=c(`<button type="button"><!></button>`),Je=c(`<span class="info svelte-1wen309"> </span>`),Ye=c(`<span class="success svelte-1wen309">Recording...</span>`),Xe=c(`<span class="info svelte-1wen309">Processing...</span>`),Ze=c(`<span class="error svelte-1wen309"> </span>`),Qe=c(`<div data-smrt-component="TextareaInput"><!> <div class="container svelte-1wen309"><div class="content svelte-1wen309"><textarea class="input svelte-1wen309"></textarea></div> <!> <div class="active-indicator svelte-1wen309"></div></div> <div class="supporting-text svelte-1wen309" aria-live="polite"><!></div></div>`);function $e(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,``),f=x(o,`value`,15,``),m=x(o,`rows`,3,4),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),b=x(o,`appendMode`,3,!1),T=`${c}-label`,O=ce(),A=be(),j=le(),M=S(null),I=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>O.state.mode===`smrt`),K=r(()=>A.isInitializing),de=r(()=>A.downloadProgress);function fe(e){f(e),o.onchange?.(f())}ne(()=>{if(j){let e={name:o.name,type:`textarea`,get label(){return o.label},get description(){return o.description},setValue:e=>{fe(String(e??``))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);return b()&&f()?`${f()}\n${t}`:t},prepareReviewedValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>!v()||String(e??``).trim().length>0,validate:()=>!v()||f().trim().length>0};return j.registerField(e)}});async function q(){if(!(!e(G)||h()||e(z))){oe=f(),F(U,null),W=Date.now(),F(I,!0);try{(!A.isReady||A.adapterType!==`whisper-wasm`)&&await A.initialize({type:`whisper-wasm`}),await A.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextareaInput: failed to start voice recording`,{field:o.name,error:e})}}}async function J(){if(!e(I))return;let t=Date.now()-W;if(F(I,!1),await A.stop(),t<500)return;let n=Date.now();for(;A.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=A.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=X(r);b()&&oe?fe(`${oe}\n${e}`):fe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function pe(e){e.button===0&&q()}function me(){J()}function he(){J()}function ge(e){e.preventDefault(),q()}function _e(){J()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(I)?J():q())}function ve(e){let t=e.target;fe(t.value)}var ye=Qe();let xe;var Se=w(ye),Z=e=>{ae(e,{get id(){return T},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Se,e=>{o.label&&e(Z)});var Ce=E(Se,2),we=w(Ce),Q=w(we);L(Q),C(Q,e=>F(M,e),()=>e(M)),s(we);var Te=E(we,2),Ee=t=>{var n=qe();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`mic-btn svelte-1wen309`,null,r,{active:e(I)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.textarea_input.mic_aria_label`])]),_(`keydown`,n,Y),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&q()}),_(`mouseup`,n,me),y(`mouseleave`,n,he),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),q()},void 0,!0),_(`touchend`,n,_e),g(t,n)};t(Te,t=>{e(G)&&t(Ee)}),p(2),s(Ce);var De=E(Ce,2),Oe=w(De),$=t=>{var n=Je(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.textarea_input.downloading_model`],{progress:e(de)})]),g(t,n)},ke=e=>{var t=Ye();g(e,t)},Ae=e=>{var t=Xe();g(e,t)},je=t=>{var n=Ze(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Me=e=>{var t=Je(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Oe,t=>{e(K)?t($):e(I)?t(ke,1):e(z)?t(Ae,2):e(U)?t(je,3):o.description&&e(V)&&t(Me,4)}),s(De),s(ye),N(()=>{xe=a(ye,1,`smrt-text-field multiline svelte-1wen309`,null,xe,{"smrt-mode":e(G),focused:e(V),disabled:h(),"has-value":!!f(),listening:e(I)}),P(Q,`id`,o.name),P(Q,`aria-labelledby`,o.label?T:void 0),P(Q,`name`,o.name),P(Q,`placeholder`,e(V)?d():``),te(Q,f()),P(Q,`rows`,m()),Q.disabled=h()||e(z),Q.required=v(),P(Q,`aria-invalid`,e(U)?`true`:void 0),P(Q,`aria-describedby`,`${o.name}-supporting`),P(De,`id`,`${o.name}-supporting`)}),_(`input`,Q,ve),y(`focus`,Q,()=>F(V,!0)),y(`blur`,Q,()=>F(V,!1)),_(`mousedown`,Q,function(...t){(e(G)?pe:void 0)?.apply(this,t)}),_(`mouseup`,Q,function(...t){(e(G)?me:void 0)?.apply(this,t)}),y(`mouseleave`,Q,function(...t){(e(G)?he:void 0)?.apply(this,t)}),_(`touchstart`,Q,function(...t){(e(G)?ge:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Q,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),g(n,ye),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]);var et=c(`<button type="button"><!></button>`),tt=c(`<span class="info svelte-q632gy"> </span>`),nt=c(`<span class="success svelte-q632gy">Recording...</span>`),rt=c(`<span class="info svelte-q632gy">Processing...</span>`),it=c(`<span class="error svelte-q632gy"> </span>`),at=c(`<div data-smrt-component="TextInput"><!> <div class="container svelte-q632gy"><div class="content svelte-q632gy"><input class="input svelte-q632gy"/></div> <!> <div class="active-indicator svelte-q632gy"></div></div> <div class="supporting-text svelte-q632gy" aria-live="polite"><!></div></div>`);function ot(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`type`,3,`text`),f=x(o,`placeholder`,3,``),m=x(o,`value`,15,``),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),T=x(o,`appendMode`,3,!1),O=`${c}-label`,A=ce(),j=be(),M=le(),I=S(null),L=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>A.state.mode===`smrt`),K=r(()=>j.isInitializing),de=r(()=>j.downloadProgress);function fe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}let q=r(()=>d()!==`email`||!m()||fe(m())),J=r(()=>d()===`email`&&m()&&!e(q));function pe(e){m(e),o.onchange?.(m())}ne(()=>{if(M){let t={name:o.name,get type(){return d()===`email`?`email`:`text`},get label(){return o.label},get description(){return o.description},setValue:e=>{pe(String(e??``))},getValue:()=>m(),prepareValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>{let t=String(e??``);return(!v()||t.trim().length>0)&&(d()!==`email`||t.length===0||fe(t))},validate:()=>(!v()||m().trim().length>0)&&(d()!==`email`||m().length===0||e(q))};return M.registerField(t)}});async function me(){if(!(!e(G)||h()||e(z))){oe=m(),F(U,null),W=Date.now(),F(L,!0);try{(!j.isReady||j.adapterType!==`whisper-wasm`)&&await j.initialize({type:`whisper-wasm`}),await j.start({continuous:!0,interimResults:!1})}catch(e){F(L,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextInput: failed to start voice recording`,{field:o.name,error:e})}}}async function he(){if(!e(L))return;let t=Date.now()-W;if(F(L,!1),await j.stop(),t<500)return;let n=Date.now();for(;j.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=j.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=d()===`email`?ve(r):X(r);T()&&oe?pe(`${oe} ${e}`):pe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function ge(e){e.button===0&&me()}function _e(){he()}function Y(){he()}function ye(e){e.preventDefault(),me()}function xe(){he()}function Se(e){e.preventDefault(),e.stopPropagation()}function Z(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(L)?he():me())}function Ce(e){let t=e.target;pe(t.value)}var we=at();let Q;var Te=w(we),Ee=e=>{ae(e,{get id(){return O},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Te,e=>{o.label&&e(Ee)});var De=E(Te,2),Oe=w(De),$=w(Oe);b($),C($,e=>F(I,e),()=>e(I)),s(Oe);var ke=E(Oe,2),Ae=t=>{var n=et();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`mic-btn svelte-q632gy`,null,r,{active:e(L)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.text_input.mic_aria_label`])]),_(`click`,n,Se),_(`keydown`,n,Z),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&me()}),_(`mouseup`,n,_e),y(`mouseleave`,n,Y),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),me()},void 0,!0),_(`touchend`,n,xe),g(t,n)};t(ke,t=>{e(G)&&t(Ae)}),p(2),s(De);var je=E(De,2),Me=w(je),Ne=t=>{var n=tt(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.text_input.downloading_model`],{progress:e(de)})]),g(t,n)},Pe=e=>{var t=nt();g(e,t)},Fe=e=>{var t=rt();g(e,t)},Ie=t=>{var n=it(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Le=e=>{var t=it(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.text_input.invalid_email`])]),g(e,t)},Re=e=>{var t=tt(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Me,t=>{e(K)?t(Ne):e(L)?t(Pe,1):e(z)?t(Fe,2):e(U)?t(Ie,3):e(J)?t(Le,4):o.description&&e(V)&&t(Re,5)}),s(je),s(we),N(()=>{Q=a(we,1,`smrt-text-field svelte-q632gy`,null,Q,{"smrt-mode":e(G),focused:e(V),invalid:e(J),disabled:h(),"has-value":!!m(),listening:e(L)}),P($,`id`,o.name),P($,`aria-labelledby`,o.label?O:void 0),P($,`name`,o.name),P($,`type`,d()),P($,`placeholder`,e(V)?f():``),te($,m()),$.disabled=h()||e(z),$.required=v(),P($,`aria-invalid`,e(J)?`true`:void 0),P($,`aria-describedby`,`${o.name}-supporting`),P(je,`id`,`${o.name}-supporting`)}),_(`input`,$,Ce),y(`focus`,$,()=>F(V,!0)),y(`blur`,$,()=>F(V,!1)),_(`mousedown`,$,function(...t){(e(G)?ge:void 0)?.apply(this,t)}),_(`mouseup`,$,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),y(`mouseleave`,$,function(...t){(e(G)?Y:void 0)?.apply(this,t)}),_(`touchstart`,$,function(...t){(e(G)?ye:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,$,function(...t){(e(G)?xe:void 0)?.apply(this,t)}),g(n,we),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`]);function st(e){return typeof e!=`number`||!Number.isFinite(e)?null:Number((e*100).toFixed(4))}function ct(e){return e===null||!Number.isFinite(e)?null:Number((e/100).toFixed(6))}export{Ke as a,Ae as c,$e as i,De as l,ct as n,Ve as o,ot as r,Ne as s,st as t,Y as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CMrsF8nJ.js","./C7zBd-pD.js","./D042ejzG.js","./BaNbYf_w.js","./BBmlFBgo.js","./COiEfhsA.js","./BiGt7FLz.js","./1Uq1awDD.js","./Qxx7HWld.js","./DG3qFFTE.js","./xihTtKlq.js","./YUSKx8_q.js","./DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","./B2aomX_k.js","../assets/SegmentedControl.DMqHG5fn.css","../assets/forms.BRdbPdvs.css","./Dbjm4OuC.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e}from"./COiEfhsA.js";import{t}from"./BaNbYf_w.js";import{c as n,l as r,o as i,s as a,u as o}from"./
|
|
2
|
+
import{n as e}from"./COiEfhsA.js";import{t}from"./BaNbYf_w.js";import{c as n,l as r,o as i,s as a,u as o}from"./Cy7yT1On.js";import{M as s}from"./DKgADWce.js";import{a as c,i as l,n as u,o as d,r as f,s as p,t as m}from"./C7zBd-pD.js";import{t as h}from"./CMrsF8nJ.js";import"./1Uq1awDD.js";function g(e){return!e.type||e.type===`webllm`}function _(e){return e.type===`transformers-llm`}async function v(e={}){if(g(e)){let{WebLLMAdapter:n}=await t(async()=>{let{WebLLMAdapter:e}=await import(`./CMrsF8nJ.js`);return{WebLLMAdapter:e}},__vite__mapDeps([0,1,2,3]),import.meta.url);return new n(e)}throw _(e)?new p(`transformers-llm`,[`webllm`]):new p(String(e.type),[`webllm`,`transformers-llm`])}function y(e){return!e.type||e.type===`browser-speech`}function b(e){return e.type===`whisper-local`||e.type===`whisper-wasm`||e.type===`moonshine`}function x(e){return e.type===`whisper-cpp`}async function S(e={}){if(y(e)){let{BrowserSpeechSTTAdapter:n}=await t(async()=>{let{BrowserSpeechSTTAdapter:e}=await import(`./BBmlFBgo.js`).then(e=>e.t);return{BrowserSpeechSTTAdapter:e}},__vite__mapDeps([4,5,1]),import.meta.url);return new n(e)}if(x(e)){let{WhisperCppSTTAdapter:n}=await t(async()=>{let{WhisperCppSTTAdapter:e}=await import(`./BiGt7FLz.js`).then(e=>e.t);return{WhisperCppSTTAdapter:e}},__vite__mapDeps([6,5,1,2,3]),import.meta.url);return new n(e)}if(b(e)){let{LocalSpeechSTTAdapter:n}=await t(async()=>{let{LocalSpeechSTTAdapter:e}=await import(`./1Uq1awDD.js`).then(e=>e.t);return{LocalSpeechSTTAdapter:e}},__vite__mapDeps([7,5,8,9,10,11,12,13,14,15,16,1,2,3]),import.meta.url);return new n(e)}throw new p(String(e.type),[`browser-speech`,`whisper-cpp`,`whisper-local`,`whisper-wasm`,`moonshine`])}function C(e={type:`browser-speech`}){let t=null;return()=>(t??=(async()=>{let t=await S(e);return t.getCapabilities().requiresDownload||await t.ensureInitialized(),t})().catch(e=>{throw t=null,e}),t)}function w(e){return!e.type||e.type===`browser-synthesis`}function T(e){return e.type===`transformers`}async function E(e={}){if(w(e)){let{BrowserSynthesisTTSAdapter:n}=await t(async()=>{let{BrowserSynthesisTTSAdapter:e}=await import(`./Dbjm4OuC.js`);return{BrowserSynthesisTTSAdapter:e}},__vite__mapDeps([17,1]),import.meta.url);return new n(e)}throw T(e)?new p(`transformers`,[`browser-synthesis`]):new p(String(e.type),[`browser-synthesis`])}var D=e({BrowserAIError:()=>m,CapabilityNotAvailableError:()=>u,InitializationError:()=>f,ModelLoadError:()=>l,ModelNotDownloadedError:()=>c,PermissionDeniedError:()=>d,RECOMMENDED_MODELS:()=>h,UnsupportedAdapterError:()=>p,WHISPER_LOCAL_DEFAULT_MODEL:()=>WHISPER_LOCAL_DEFAULT_MODEL,WHISPER_LOCAL_DEFAULT_SIZE_BYTES:()=>WHISPER_LOCAL_DEFAULT_SIZE_BYTES,canEnableSmrtMode:()=>i,detectCapabilities:()=>a,getLLM:()=>v,getSTT:()=>S,getTTS:()=>E,hasLLM:()=>n,hasSTT:()=>r,hasTTS:()=>o,probeBrowserSpeech:()=>s});export{C as n,D as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,bt as t,tt as n,vt as r,xt as i}from"./DG3qFFTE.js";import{F as a,G as o,H as s,N as c,P as ee,U as te,V as l,W as u,_t as d,ct as f,ft as p,pt as m,w as h,z as ne}from"./
|
|
1
|
+
import{$ as e,bt as t,tt as n,vt as r,xt as i}from"./DG3qFFTE.js";import{F as a,G as o,H as s,N as c,P as ee,U as te,V as l,W as u,_t as d,ct as f,ft as p,pt as m,w as h,z as ne}from"./B1Pf2l_R.js";import{_ as re,r as ie}from"./Cy7yT1On.js";import{c as ae}from"./DKgADWce.js";import"./CeUbBJTD.js";import{i as oe,n as g,o as _,r as v,s as y}from"./7y8ldvJX.js";import{M as b,P as x,V as S,W as C,b as w,t as T,v as E,x as D,z as O}from"./CLySd19b.js";import{b as k,v as A,x as j,y as M}from"./5I4x_KS6.js";import{n as N}from"./CgE1Gcro.js";import{t as P}from"./BdMHVrP7.js";import{r as F,t as I}from"./BE4TZ3aw.js";import{a as L,c as R,d as z,l as B,n as V}from"./DYS_WKPd.js";function H(e,t=A.appliedWork){return j(e.snapshot(),t)}function U(e,t,n){let r=M(e,_,n);if(r.ok){let n=t.theme,i=r.cookbook.theme,o=i?i.colorScheme||!n?.colorScheme?void 0:{...i,colorScheme:n.colorScheme}:n;t.replace(r.cookbook),o&&(t.theme=o),a(e.id),A.select(e.id,k(t.snapshot()))}return r}function W(e,t){return e.document.recipes.every(e=>t.recipes.includes(e))&&e.document.features.every(e=>t.features.includes(e))}function G(e){let t=e.recipes.flatMap(e=>{let t=D.get(e);return t?[t]:[]}),n=O(t).map(e=>{let t=new Set,n=[];for(let r of e.recipes)for(let e of E(r)){let r=S(e.packageId,e.model.name,e.key);t.has(r)||(t.add(r),n.push({id:r,href:`#`,label:e.label,icon:e.icon,description:e.description}))}return{id:`section:${e.id}`,heading:e.label,items:n}}).filter(e=>e.items.length>0),r=x(e.features).map(e=>({id:e.id,href:`#`,label:e.label,icon:e.icon,description:e.description}));return r.length&&n.push({id:`section:${b.id}`,heading:b.label,items:r}),n}function K(e){let t=e.layout;return re([],G(e),void 0,t).groups.map(e=>({id:e.id??String(e.heading),label:e.heading??``,entries:e.items.map(e=>({id:e.id??e.href,label:t?.items?.[e.id??e.href]?.label?.trim()||e.label}))}))}var q={live:`Live`,mock:`Mock`,sample:`Sample`,server:`Server`},se={live:`Runs for real in your browser.`,mock:`Runs in your browser, but a provider is faked.`,sample:`Shows sample data only; it cannot reach what it needs.`,server:`Needs a server, which this browser-only demo does not have.`},ce={live:`success`,mock:`info`,sample:`warning`,server:`default`};function le(e){return e.effectiveDemo??e.demo}function ue(e){if(e)return{mode:e.mode,label:q[e.mode],meaning:se[e.mode],variant:ce[e.mode],reasons:e.reasons,mocked:e.mocked??[]}}function de(e){if(!e)return;if(e.status===`browser-safe`)return`Its package builds for a browser.`;let t=[`Its package does not build for a browser yet`];return e.reason&&t.push(`(${e.reason})`),e.issues?.length&&t.push(`and is tracked in ${e.issues.join(`, `)}`),`${t.join(` `)}.`}var J=`@happyvertical/smrt-commerce:`,fe=`${J}TaxCode`,pe=`${J}TaxComponent`,Y=`${J}TaxSettings`,me=`${J}DocumentTax`;function X(){let e=ee()??.05;return{codes:p(e),fallback:f(e)}}function he(e){try{let t=e?.getItem(oe);if(!t)return;let n=y(t,{dropUnknownRecipes:!0});n.ok&&v(n.cookbook)}catch{}}function ge(){return he(u()),I({storage:u(),defaults:e=>T.apply(e).background,empty:[L,V,me,P],samples:{[fe]:{from:[],make:()=>X().codes.map(e=>({id:e.id,code:e.code,name:e.name,kind:e.kind,appliesTo:e.appliesTo,active:e.active,componentsJson:JSON.stringify(e.components.map(e=>({taxComponentId:e.id,compound:!1})))}))},[pe]:{from:[],make:()=>m(X().codes).map(e=>({id:e.id,name:e.name,percent:e.percent,liabilityAccountId:null,recoverable:e.recoverable,active:!0}))},[Y]:{from:[],make:()=>{let{fallback:e}=X(),t=c();return[{id:h(`${Y}:sample`),defaultSalesTaxCodeId:e.id,defaultPurchaseTaxCodeId:e.id,defaultLineAmountType:t.pricesIncludeTax?`inclusive`:`exclusive`,taxRoundingScope:t.taxRounding}]}},...R(F),[B]:{from:[F(`@happyvertical/smrt-products:Product`)],make:([e])=>(e??[]).map((e,t)=>({id:h(`${B}:sample:${e.id}`),name:`${String(e.name??`Product`)} image`,sourceUri:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240"><rect width="240" height="240" fill="hsl(${t*47%360} 40% 82%)"/><circle cx="120" cy="94" r="46" fill="hsl(${(t*47+30)%360} 35% 58%)"/><path d="M44 214c20-55 132-55 152 0" fill="hsl(${(t*47+10)%360} 30% 46%)"/><text x="120" y="224" text-anchor="middle" font-family="sans-serif" font-size="14" fill="white">${String(e.name??``).replace(/[<&>]/g,``)}</text></svg>`)}`,mimeType:`image/svg+xml`,description:`Sample image for ${String(e.name??`this product`)}.`,sourceType:`browser-demo`}))},[z]:{from:[F(`@happyvertical/smrt-products:Product`),F(B)],make:([e,t])=>(e??[]).flatMap((e,n)=>{let r=t?.[n];return r?[{id:h(`${z}:sample:${e.id}`),productId:e.id,assetId:r.id,relationship:`gallery`,sortOrder:0}]:[]})}},children:{models:d.packages.flatMap(e=>e.models),links:e=>C(d,w,e)}})}var _e=new class{#e=t(void 0);get endpoint(){return e(this.#e)}set endpoint(e){r(this.#e,e,!0)}#t=t(!1);get tokenInConfig(){return e(this.#t)}set tokenInConfig(e){r(this.#t,e,!0)}#n=t(void 0);get token(){return e(this.#n)}set token(e){r(this.#n,e,!0)}#r=t(`idle`);get status(){return e(this.#r)}set status(e){r(this.#r,e,!0)}#i=t(void 0);get outcome(){return e(this.#i)}set outcome(e){r(this.#i,e,!0)}get config(){return this.endpoint&&this.token&&!this.tokenInConfig?{endpoint:this.endpoint,token:this.token}:void 0}get needsLink(){return!!this.endpoint&&!this.token&&!this.tokenInConfig}configure(e,t){this.endpoint=e?.endpoint,this.tokenInConfig=e?.tokenInConfig===!0,this.token=e?t:void 0,this.status=`idle`,this.outcome=void 0}async send(e,t){let n=this.config;if(!n||this.status===`sending`)return;this.status=`sending`,this.outcome=void 0;let r=await ae(n,e,t);this.outcome=r,this.status=r.ok?`sent`:`failed`}},Z=`cookbook`,ve=new class{#e=t(null);get open(){return e(this.#e)}set open(e){r(this.#e,e,!0)}#t=t(null);get returnTo(){return e(this.#t)}set returnTo(e){r(this.#t,e,!0)}navigator=null;show(e){this.returnTo=e,this.navigator?this.navigator.open(e):this.set(e)}back(){this.open&&(this.returnTo=this.open),this.navigator?this.navigator.close():this.set(null)}async set(e,t=!0){this.open!==e&&(t?await ie(async()=>{this.open=e,await n()}):this.open=e)}};function ye(e,t){let n=new URLSearchParams(e).get(Z);return n&&t.includes(n)?n:null}function be(e,t){let n=new URLSearchParams(e);t?n.set(Z,t):n.delete(Z);let r=n.toString().replace(/%2C/gi,`,`);return r?`?${r}`:``}var xe=`Planner`;function Q(e,t,n=N,r=xe){let i=e.name?.trim();if(i)return i;let a=t?n.find(e=>e.id===t):void 0;return a&&W(a,e)?a.name:r}function Se(e){return Q(g.snapshot(),A.active,void 0,e)}var Ce=Symbol(`planner-project-persistence-owner`),$=t(0),we={get remembering(){return e($),l()},get recoveryAvailable(){return e($),o().recoveryAvailable()},setRemember(e){let t=te(e);return i($),t},recover(){let e=o().recover();return i($),e},discardRecovery(){let e=o().discardRecovery();return i($),e}};function Te(e){if(!s())return!1;try{e.nativeAssistant?.reset(),g.reset({preserveTheme:!0}),A.active=null,A.appliedWork=null,ne(),a(null),e.dataSource.reset?.(),e.controller.resetWorkspace?.()}finally{i($),e.onreset?.()}return!0}export{H as _,ye as a,_e as c,ue as d,le as f,W as g,U as h,Se as i,ge as l,K as m,Te as n,ve as o,G as p,we as r,be as s,Ce as t,de as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,J as s,Ot as c,P as l,U as u,W as d,a as f,bt as p,ct as m,d as h,ft as g,ht as _,i as v,lt as y,pt as b,r as x,st as S,tt as C,vt as w}from"../chunks/DG3qFFTE.js";import{t as T}from"../chunks/BaNbYf_w.js";import"../chunks/xihTtKlq.js";var E={},D=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=a(`<!> <!>`,1);function k(a,v){c(v,!0);let T=f(v,`components`,23,()=>[]),E=f(v,`data_0`,3,null),k=f(v,`data_1`,3,null);y(()=>v.stores.page.set(v.page)),m(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),k(),v.stores.page.notify()});let A=p(!1),j=p(!1),M=p(null);x(()=>{let t=v.stores.page.subscribe(()=>{e(A)&&(w(j,!0),C().then(()=>{w(M,document.title||`untitled page`,!0)}))});return w(A,!0),t});let N=n(()=>v.constructors[1]);var P=O(),F=b(P),I=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(t,n)=>{h(n(t,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(t,n)=>{var r=d(),i=b(r);l(i,()=>e(N),(e,t)=>{h(t(e,{get data(){return k()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),u(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)},L=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(e,t)=>{h(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)};t(F,e=>{v.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=n=>{var r=D(),a=g(r),c=t=>{var n=s();S(()=>o(n,e(M))),u(t,n)};t(a,t=>{e(j)&&t(c)}),i(r),u(n,r)};t(R,t=>{e(A)&&t(z)}),u(a,P),r()}var A=v(k),j=[()=>T(()=>import(`../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CVYFDYxr.js","../chunks/COiEfhsA.js","../chunks/DG3qFFTE.js","../chunks/Cw26E4UG.js","../chunks/Dt-HX3Vu.js","../chunks/xihTtKlq.js","../chunks/B1Pf2l_R.js","../chunks/YUSKx8_q.js","../chunks/DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","../chunks/Cy7yT1On.js","../chunks/BaNbYf_w.js","../chunks/Bv5jGtB8.js","../assets/feedback.qFktqYFY.css","../chunks/B2aomX_k.js","../assets/SegmentedControl.DMqHG5fn.css","../chunks/DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","../chunks/-2dfZP6X.js","../assets/data.CVlX_W0i.css","../chunks/CUyVrfsu.js","../chunks/Qxx7HWld.js","../assets/forms.BRdbPdvs.css","../chunks/BYcBM-fh.js","../assets/AppShell.Y0ysizZK.css","../chunks/Bns8l-x1.js","../assets/workspace.C40zM0Mb.css","../chunks/DKgADWce.js","../chunks/agvanIM7.js","../chunks/C7zBd-pD.js","../chunks/CMrsF8nJ.js","../chunks/D042ejzG.js","../chunks/1Uq1awDD.js","../chunks/BQxY8kkL.js","../chunks/7y8ldvJX.js","../chunks/DDIQ8W6V.js","../chunks/CLySd19b.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","../chunks/5I4x_KS6.js","../chunks/CgE1Gcro.js","../assets/icons.DFiHs25V.css","../chunks/CeUbBJTD.js","../chunks/DYku8Hqx.js","../chunks/DNpuZXha.js","../chunks/d934w91N.js","../chunks/CmAUvRQx.js","../chunks/BdMHVrP7.js","../assets/planner.DOQVfcOi.css","../chunks/D_U_DYjx.js","../chunks/juz5EBPL.js","../chunks/BE4TZ3aw.js","../chunks/DYS_WKPd.js","../chunks/D7WLtlpw.js","../chunks/CYCgPm88.js","../assets/SectionIcons.BGFcFuOf.css","../assets/SectionActions.BE1CPmxk.css","../chunks/BMgzWMdF.js","../chunks/CgAkqYsL.js","../assets/0.BwSv64V0.css","../nodes/1.CJEHWdw8.js","../nodes/2.BEaYX5kW.js","../chunks/DADOPup4.js","../assets/AiSetup.CrvuNhMR.css","../chunks/DfD9dv_l.js","../assets/percent.BGI-foAF.css","../chunks/BL2JRgxi.js","../assets/2.BSQtjEJf.css","../nodes/3.XnNGal1u.js","../assets/3.D518dbB5.css","../nodes/4.CczBNlYL.js","../assets/4.B3vt1gMJ.css","../nodes/5.D0-S4wqa.js","../nodes/6.DiqKNjHf.js","../nodes/7.CzhUZRpM.js","../chunks/DRByVC-c.js","../chunks/CpP-dbYB.js","../chunks/CO-Ek-HE.js","../chunks/CM3HdjYi.js","../assets/FieldMapForm.C8SZ3t4N.css","../chunks/JBD5vUbP.js","../assets/ModelPage.SIoeO-AU.css","../nodes/8.BwuGOj43.js","../nodes/9.C9C4Mx7X.js","../nodes/10._eiewXMR.js","../assets/10.CdYxvH4G.css","../nodes/11.Dp8fmXsX.js","../chunks/DC203NCO.js","../assets/ConnectTools.DTleL8YA.css","../assets/11.nOT5Z4Fv.css","../nodes/12.bKzQ9OLN.js","../assets/12.F7A7zP4J.css","../nodes/13.DaudqCzg.js","../assets/13.JoySu8W5.css","../nodes/14.ZMVp9EbO.js","../assets/14.VAFbAoxW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,J as s,Ot as c,P as l,U as u,W as d,a as f,bt as p,ct as m,d as h,ft as g,ht as _,i as v,lt as y,pt as b,r as x,st as S,tt as C,vt as w}from"../chunks/DG3qFFTE.js";import{t as T}from"../chunks/BaNbYf_w.js";import"../chunks/xihTtKlq.js";var E={},D=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=a(`<!> <!>`,1);function k(a,v){c(v,!0);let T=f(v,`components`,23,()=>[]),E=f(v,`data_0`,3,null),k=f(v,`data_1`,3,null);y(()=>v.stores.page.set(v.page)),m(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),k(),v.stores.page.notify()});let A=p(!1),j=p(!1),M=p(null);x(()=>{let t=v.stores.page.subscribe(()=>{e(A)&&(w(j,!0),C().then(()=>{w(M,document.title||`untitled page`,!0)}))});return w(A,!0),t});let N=n(()=>v.constructors[1]);var P=O(),F=b(P),I=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(t,n)=>{h(n(t,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(t,n)=>{var r=d(),i=b(r);l(i,()=>e(N),(e,t)=>{h(t(e,{get data(){return k()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),u(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)},L=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(e,t)=>{h(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)};t(F,e=>{v.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=n=>{var r=D(),a=g(r),c=t=>{var n=s();S(()=>o(n,e(M))),u(t,n)};t(a,t=>{e(j)&&t(c)}),i(r),u(n,r)};t(R,t=>{e(A)&&t(z)}),u(a,P),r()}var A=v(k),j=[()=>T(()=>import(`../nodes/0.CVYFDYxr.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]),import.meta.url),()=>T(()=>import(`../nodes/1.CJEHWdw8.js`),__vite__mapDeps([61,2,1,5,45,3,4]),import.meta.url),()=>T(()=>import(`../nodes/2.BEaYX5kW.js`),__vite__mapDeps([62,2,1,5,13,7,14,6,8,9,10,11,12,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,50,51,43,48,52,53,58,63,64,65,66,67,68]),import.meta.url),()=>T(()=>import(`../nodes/3.XnNGal1u.js`),__vite__mapDeps([69,2,1,5,6,7,8,9,10,35,12,11,13,14,15,16,17,18,19,20,21,22,23,24,25,36,37,38,39,46,58,70]),import.meta.url),()=>T(()=>import(`../nodes/4.CczBNlYL.js`),__vite__mapDeps([71,2,1,5,6,7,8,9,10,28,12,13,14,11,15,16,17,18,19,20,21,22,23,24,25,29,30,31,32,33,34,35,36,37,38,39,40,41,42,46,63,64,72]),import.meta.url),()=>T(()=>import(`../nodes/5.D0-S4wqa.js`),__vite__mapDeps([73,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/6.DiqKNjHf.js`),__vite__mapDeps([74,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/7.CzhUZRpM.js`),__vite__mapDeps([75,1,2,5,6,7,8,9,10,76,4,77,3,13,14,15,16,26,11,12,17,18,19,20,21,22,23,24,25,27,44,45,36,37,38,39,35,78,47,40,41,48,49,50,55,56,52,53,59,79,65,32,66,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/8.BwuGOj43.js`),__vite__mapDeps([83,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,76,4,77,3,26,11,12,17,18,21,22,23,24,25,27,44,45,36,39,35,78,47,40,41,48,49,50,55,56,52,53,59,79,65,32,66,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/9.C9C4Mx7X.js`),__vite__mapDeps([84,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,76,4,77,3,26,11,12,17,18,21,22,23,24,25,27,44,45,36,39,35,78,47,40,41,48,49,50,55,56,52,53,59,79,65,32,66,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/10._eiewXMR.js`),__vite__mapDeps([85,2,1,5,6,7,8,9,10,17,18,22,15,16,23,67,43,11,12,13,14,19,20,21,24,25,26,27,86]),import.meta.url),()=>T(()=>import(`../nodes/11.Dp8fmXsX.js`),__vite__mapDeps([87,1,2,5,6,7,8,9,10,76,4,88,89,90]),import.meta.url),()=>T(()=>import(`../nodes/12.bKzQ9OLN.js`),__vite__mapDeps([91,1,2,5,6,7,8,9,10,15,16,22,23,37,13,14,19,20,38,55,56,76,4,79,36,17,18,39,50,52,65,21,32,12,66,80,92]),import.meta.url),()=>T(()=>import(`../nodes/13.DaudqCzg.js`),__vite__mapDeps([93,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,55,56,76,4,81,88,89,94]),import.meta.url),()=>T(()=>import(`../nodes/14.ZMVp9EbO.js`),__vite__mapDeps([95,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,45,3,4,36,37,38,39,35,78,41,50,55,56,54,57,59,96]),import.meta.url)],M=[],N={"/":[2],"/advanced-styles":[3],"/ai":[4],"/blueprint":[5],"/cookbook":[6],"/m/[package]/[model]":[7],"/m/[package]/[model]/[view]":[8],"/m/[package]/[model]/[view]/edit":[9],"/packages":[10],"/packages/[id]":[11],"/recipes/[id]":[12],"/recipes/[id]/help":[13],"/s/[section]":[14]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{l as load_css,o as start}from"../chunks/Cw26E4UG.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,B as n,Ct as r,Dt as i,E as a,F as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,T as g,U as _,W as v,X as y,Y as b,Z as x,a as S,b as C,bt as w,ct as T,d as E,dt as D,ft as O,gt as k,ht as A,k as j,kt as ee,l as M,mt as N,nt as P,ot as F,pt as I,r as L,s as te,st as R,ut as ne,v as z,vt as B,wt as re,z as ie}from"../chunks/DG3qFFTE.js";import{a as ae,i as oe,n as V,r as se,t as ce,u as le}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,B as n,Ct as r,Dt as i,E as a,F as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,T as g,U as _,W as v,X as y,Y as b,Z as x,a as S,b as C,bt as w,ct as T,d as E,dt as D,ft as O,gt as k,ht as A,k as j,kt as ee,l as M,mt as N,nt as P,ot as F,pt as I,r as L,s as te,st as R,ut as ne,v as z,vt as B,wt as re,z as ie}from"../chunks/DG3qFFTE.js";import{a as ae,i as oe,n as V,r as se,t as ce,u as le}from"../chunks/Cw26E4UG.js";import"../chunks/xihTtKlq.js";import{a as ue,i as de,n as H,o as fe,p as pe,s as me,t as U,vt as he,xt as ge,yt as _e}from"../chunks/B1Pf2l_R.js";import{n as W}from"../chunks/DK8Blf1Y.js";import{i as ve,m as ye,n as be,p as xe,t as Se}from"../chunks/Cy7yT1On.js";import{n as Ce}from"../chunks/Bns8l-x1.js";import{u as G}from"../chunks/DIE02RSm.js";import{c as we,d as Te,h as Ee,s as De}from"../chunks/-2dfZP6X.js";import{A as Oe,C as ke,D as Ae,E as je,S as Me,b as Ne,i as K,j as Pe,n as Fe,r as Ie,s as Le,t as Re}from"../chunks/DKgADWce.js";import"../chunks/CeUbBJTD.js";import"../chunks/DYku8Hqx.js";import{t as q}from"../chunks/DNpuZXha.js";import{T as ze,m as Be,n as J,o as Ve,t as He,w as Ue}from"../chunks/7y8ldvJX.js";import{M as Y,P as We,U as Ge,V as Ke,b as qe,g as Je,nt as Ye,t as X,u as Xe,v as Ze,z as Qe}from"../chunks/CLySd19b.js";import{g as Z,h as $e,v as et}from"../chunks/5I4x_KS6.js";import{n as tt,t as nt}from"../chunks/CgE1Gcro.js";import"../chunks/d934w91N.js";import{a as rt,n as it,s as at,t as ot,u as st}from"../chunks/CmAUvRQx.js";import{r as ct,t as lt}from"../chunks/D_U_DYjx.js";import{_ as ut,a as dt,c as ft,d as pt,f as mt,h as ht,i as gt,l as _t,m as vt,o as Q,r as yt,s as bt,t as xt}from"../chunks/juz5EBPL.js";import{n as St}from"../chunks/BdMHVrP7.js";import{t as Ct}from"../chunks/D7WLtlpw.js";import{a as wt,i as Tt,n as Et,r as Dt}from"../chunks/BMgzWMdF.js";import{n as Ot}from"../chunks/CgAkqYsL.js";var kt=e({prerender:()=>!0,trailingSlash:()=>At}),At=`always`,jt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%20role='img'%3e%3cdefs%3e%3clinearGradient%20id='flame'%20x1='26'%20y1='16'%20x2='101'%20y2='112'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23f05b2b'/%3e%3cstop%20offset='1'%20stop-color='%23c9381e'/%3e%3c/linearGradient%3e%3clinearGradient%20id='heat'%20x1='51'%20y1='49'%20x2='72'%20y2='111'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ffd33d'/%3e%3cstop%20offset='1'%20stop-color='%23f2a817'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='url(%23flame)'%20d='M64%205c-3%2018-15%2026-13%2043-9-5-13-13-13-22C20%2043%2015%2062%2022%2082c7%2022%2023%2037%2042%2041%2022-4%2039-21%2043-43%203-17-3-32-18-45%202%2011%200%2018-6%2025C84%2036%2075%2019%2064%205Z'%20/%3e%3cpath%20fill='url(%23heat)'%20d='M64%2045c-2%2015-14%2022-13%2038-5-4-8-9-9-15-7%2010-8%2020-4%2030%205%2012%2014%2020%2026%2023%2013-3%2023-12%2027-25%203-11%200-20-8-29%200%207-2%2012-6%2016%201-16-5-27-13-38Z'%20/%3e%3c!--%20The%20glasses%20render%20as%20two%20stacked%20stroke%20groups:%20a%20pale%20warm%20casing%20under%20a%20dark%20warm-charcoal%20stroke.%20The%20casing%20keeps%20the%20dark%20strokes%20legible%20where%20they%20leave%20the%20flame%20body%20(temple%20tips,%20lower%20rims)%20on%20dark%20backgrounds,%20and%20reads%20as%20a%20rim%20light%20against%20the%20flame%20on%20light%20ones.%20--%3e%3cg%20fill='none'%20stroke='%23ffe3ae'%20stroke-opacity='0.85'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20stroke-width='14'%20d='M7%2063c12-4%2027-5%2043-1M78%2062c16-4%2031-3%2043%201'/%3e%3crect%20x='12'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='14'/%3e%3crect%20x='70'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='14'/%3e%3cpath%20stroke-width='13'%20d='M57%2066c5-4%209-4%2014%200'/%3e%3c/g%3e%3cg%20fill='none'%20stroke='%2333221b'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20stroke-width='8'%20d='M7%2063c12-4%2027-5%2043-1M78%2062c16-4%2031-3%2043%201'/%3e%3crect%20x='12'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='8'/%3e%3crect%20x='70'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='8'/%3e%3cpath%20stroke-width='7'%20d='M57%2066c5-4%209-4%2014%200'/%3e%3c/g%3e%3c/svg%3e`,Mt=c(`<a class="cap svelte-nioco2"><!></a>`),Nt=c(`<div class="ai-status svelte-nioco2" role="group" aria-label="AI models"></div>`);function Pt(e,n){p(n,!1);let r={think:Ie,hear:Re,speak:Fe};M();var a=Nt();d(a,5,()=>K.capabilities,e=>e.id,(e,n)=>{var i=Mt(),a=O(i);Ye(a,{get path(){return r[t(n).id]},size:20}),s(i),R(e=>{z(i,`href`,e),z(i,`data-state`,t(n).state),z(i,`aria-label`,t(n).label),z(i,`title`,t(n).label)},[()=>U(`/ai/`)]),_(e,i)}),s(a),_(e,a),i()}function Ft(e){let t=e.target;return!t||typeof t.closest!=`function`?!1:e.type===`input`?t.matches(`textarea, input[type="text"], input:not([type])`):e.type===`click`&&t.closest(`.smrt-dictation-button`)!==null}function It(e){let t=[{label:`Help me plan my app`,prompt:`Help me plan my app. Ask me what my business needs before adding recipes.`}],n=e[0];return n?(t.push({label:`Report on ${n.label}`,prompt:`Create a runtime report counting ${n.label} in the sample data.`}),n.dateField&&t.push({label:`${n.label} by month`,prompt:`Create a runtime report counting ${n.label} by month using ${n.dateField} in the sample data.`}),n.amountField&&t.push({label:`${n.label} totals`,prompt:`Create a runtime report showing the total ${n.amountField} for ${n.label} in the sample data.`}),t):[...t,{label:`What should my app track?`,prompt:`Help me work out what my business app should track. Ask about my business first.`}]}var Lt=c(`<div><!></div>`);function Rt(e,n){p(n,!0);let a=S(n,`answered`,3,null),o=it(ct()),c=r(()=>J.settings().currency),l=r(()=>o.fieldsFor(n.proposal.spec.source)),u=w(k(a())),d=w(null);function f(e){B(u,e,!0),n.onoutcome?.(e)}function m(e){f({status:`saved`,report:{id:e.id,title:e.title}}),ot(t(d),e)}var h=Lt(),g=O(h);st(g,{get proposal(){return n.proposal},get confirm(){return o.save},reportHref:e=>U(rt(e)),onsaved:m,ondecline:()=>f({status:`declined`}),get outcome(){return t(u)},get fields(){return t(l)},get currency(){return t(c)}}),s(h),E(h,e=>B(d,e),()=>t(d)),_(e,h),i()}var zt=c(`<span role="status" aria-live="polite"> </span> <progress max="100" aria-label="Speech model download" class="svelte-w5gfst"> </progress>`,1),Bt=c(`<span class="error svelte-w5gfst" role="alert"> </span>`),Vt=c(`<span>The speech model is already on this device. Turn on voice typing to
|
|
2
2
|
talk to the assistant?</span>`),Ht=c(`<span> </span>`),Ut=c(`<button type="button">Cancel</button>`),Wt=c(`<button type="button"> </button> <button type="button">Not now</button>`,1),Gt=c(`<div class="voice svelte-w5gfst" role="group" aria-label="Voice typing"><svg class="icon svelte-w5gfst" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V22h2v-3.08A7 7 0 0 0 19 12h-2Z"></path></svg> <div class="text svelte-w5gfst"><!></div> <div class="actions svelte-w5gfst"><!></div></div>`);function Kt(e,a){p(a,!0);let o=r(()=>Math.round(a.voice.size/1e6)),c=r(()=>Math.round(a.voice.progress*100)),u=r(()=>a.voice.status===`offer`||a.voice.status===`downloading`||a.voice.status===`error`);var d=v(),f=I(d),m=e=>{var r=Gt(),i=A(O(r),2),u=O(i),d=e=>{var n=zt(),r=I(n),i=N(r),o=A(r,2),s=N(o);R(()=>{l(i,`${a.voice.cached?`Turning on voice typing`:`Downloading speech model`}
|
|
3
3
|
${t(c)??``}%`),C(o,t(c)),l(s,`${t(c)??``}%`)}),_(e,n)},f=e=>{var t=Bt(),n=N(t);R(()=>l(n,`Voice typing could not start: ${a.voice.error??``}`)),_(e,t)},p=e=>{var t=Vt();_(e,t)},m=e=>{var n=Ht(),r=N(n);R(e=>l(r,`Your browser can't do voice typing on its own. Download a ${e??``} speech model to talk to the assistant?`),[()=>je(t(o))]),_(e,n)};n(u,e=>{a.voice.status===`downloading`?e(d):a.voice.status===`error`?e(f,1):a.voice.cached?e(p,2):e(m,-1)}),s(i);var h=A(i,2),g=O(h),v=e=>{var t=Ut();y(`click`,t,()=>a.voice.cancel()),_(e,t)},b=e=>{var t=Wt(),n=I(t),r=N(n,!0),i=A(n,2);R(()=>l(r,a.voice.status===`error`?`Try again`:a.voice.cached?`Turn on`:`Download`)),y(`click`,n,()=>void a.voice.enable()),y(`click`,i,()=>a.voice.dismiss()),_(e,t)};n(g,e=>{a.voice.status===`downloading`?e(v):e(b,-1)}),s(h),s(r),_(e,r)};n(f,e=>{t(u)&&e(m)}),_(e,d),i()}b([`click`]);var qt=c(`<div class="offer svelte-12q53fs" role="group" aria-label="Theme change"><!></div>`),Jt=c(`<p class="offer-note svelte-12q53fs" role="status">Theme restored.</p>`),Yt=c(`<!> <!> <!>`,1),Xt=c(`<li><b> </b> </li>`),Zt=c(`<ul class="offer-menu svelte-12q53fs"></ul>`),Qt=c(`<small class="svelte-12q53fs">Replaces your recipes, menu and sample records.</small>`),$t=c(`<div class="offer svelte-12q53fs" role="group"><div class="offer-text svelte-12q53fs"><strong> </strong> <span class="svelte-12q53fs"> </span> <!></div> <!> <!> <!></div>`),en=c(`<p class="offer-note svelte-12q53fs" role="status"> </p>`),tn=c(`<p class="offer-note svelte-12q53fs" role="alert"> </p>`),nn=c(`<div class="panel svelte-12q53fs" role="status"><h2 class="svelte-12q53fs">Assistant unavailable</h2> <p class="svelte-12q53fs">The assistant runs a small model on your graphics card using WebGPU, and
|
|
4
4
|
this browser does not offer it. Try a recent Chrome, Edge or Safari on a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dt as e,G as t,H as n,Ot as r,U as i,ht as a,mt as o,pt as s,st as c}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/
|
|
1
|
+
import{Dt as e,G as t,H as n,Ot as r,U as i,ht as a,mt as o,pt as s,st as c}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/DNpuZXha.js";var u=t(`<h1> </h1> <p> </p>`,1);function d(t,d){r(d,!0);var f=u(),p=s(f),m=o(p,!0),h=a(p,2),g=o(h,!0);c(()=>{n(m,l.status),n(g,l.error?.message)}),i(t,f),e()}export{d as component};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,Ct as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,M as ee,Ot as d,Pt as f,U as p,X as m,Y as h,_ as g,at as _,bt as v,ft as y,ht as b,mt as x,p as S,pt as C,st as w,ut as T,v as E,vt as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{Ct as O,St as k,_t as A,a as j,p as M,t as N,vt as P}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,B as n,Ct as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,M as ee,Ot as d,Pt as f,U as p,X as m,Y as h,_ as g,at as _,bt as v,ft as y,ht as b,mt as x,p as S,pt as C,st as w,ut as T,v as E,vt as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{Ct as O,St as k,_t as A,a as j,p as M,t as N,vt as P}from"../chunks/B1Pf2l_R.js";import{p as te}from"../chunks/DIE02RSm.js";import{i as F}from"../chunks/Qxx7HWld.js";import{t as ne}from"../chunks/BL2JRgxi.js";var I=s(`<p class="svelte-disfw2">Nothing selected yet. Choose a package below.</p>`),L=s(`<li><a class="svelte-disfw2"> </a></li>`),R=s(`<ul class="chips svelte-disfw2"></ul> <button type="button" class="secondary svelte-disfw2">Clear selection</button>`,1),re=s(`<p class="meta svelte-disfw2"> </p>`),ie=s(`<li><h3 class="svelte-disfw2"><a> </a></h3> <p class="description svelte-disfw2"> </p> <p class="meta svelte-disfw2"><!></p> <!> <!></li>`),ae=s(`<li class="none svelte-disfw2"> </li>`),oe=s(`<main class="svelte-disfw2"><header class="svelte-disfw2"><p class="meta svelte-disfw2"><a>Planner</a> / All packages</p> <h1 class="svelte-disfw2">All packages</h1> <p class="svelte-disfw2">The whole catalog, a package at a time. Recipes on the Planner page are
|
|
2
2
|
the smaller way in: they add one section of an app, not every model in a
|
|
3
3
|
package. Your picks live in the URL, so you can share the mock-up.</p></header> <section aria-label="Your selection" class="selection svelte-disfw2"><h2 class="svelte-disfw2">Your app</h2> <!> <p class="notice svelte-disfw2" role="status" aria-live="polite"> </p></section> <section aria-label="Package catalog"><h2 class="svelte-disfw2">Packages <small class="svelte-disfw2"> </small></h2> <label class="search svelte-disfw2"><span class="visually-hidden svelte-disfw2">Search packages</span> <input type="search" placeholder="Search packages, models and fields" class="svelte-disfw2"/></label> <ul class="cards svelte-disfw2"></ul></section></main>`);function z(s,h){d(h,!0);let z=v(``),B=v(``),V=r(()=>k(A.packages,e(z)));function se(e){let t=new Set(j.ids),n=t.has(e);j.toggle(e);let r=j.ids.filter(n=>!t.has(n)&&n!==e);D(B,n?`Removed ${M(e)}.`:r.length?`Added ${M(e)} and the packages it needs: ${r.map(M).join(`, `)}.`:`Added ${M(e)}.`,!0)}var H=oe();t(`disfw2`,e=>{_(()=>{T.title=`All packages · smrt planner`})});var U=y(H),W=y(U),G=y(W);f(),o(W),f(4),o(U);var K=b(U,2),q=b(y(K),2),ce=e=>{var t=I();p(e,t)},le=e=>{var t=R(),n=C(t);u(n,20,()=>j.ids,e=>e,(e,t)=>{var n=L(),r=y(n),i=x(r,!0);o(n),w((e,t)=>{E(r,`href`,e),c(i,t)},[()=>N(`/packages/${t}/`),()=>M(t)]),p(e,n)}),o(n);var r=b(n,2);m(`click`,r,()=>j.clear()),p(e,t)};n(q,e=>{j.ids.length===0?e(ce):e(le,-1)});var ue=b(q,2),de=x(ue,!0);o(K);var J=b(K,2),Y=y(J),X=b(y(Y)),fe=x(X);o(Y);var Z=b(Y,2),Q=b(y(Z),2);g(Q),o(Z);var $=b(Z,2);u($,29,()=>e(V),e=>e.id,(t,i)=>{let s=r(()=>j.has(e(i).id)),u=r(()=>j.requiredBy(e(i).id));var d=ie();let f;var m=y(d),h=y(m),g=x(h,!0);o(m);var _=b(m,2),v=x(_,!0),S=b(_,2),C=y(S),T=t=>{var n=l();w((e,t)=>c(n,`${e??``} models · ${t??``} generated surfaces`),[()=>P(e(i)).length,()=>O(e(i))]),p(t,n)},D=r(()=>P(e(i)).length),k=t=>{var n=l();w(()=>c(n,`${e(i).models.length??``} internal models · closed: no generated surfaces`)),p(t,n)};n(C,t=>{e(D)?t(T):t(k,-1)}),o(S);var A=b(S,2),I=t=>{var n=re(),r=x(n);w(e=>c(r,`Needs: ${e??``}`),[()=>e(i).dependencies.map(M).join(`, `)]),p(t,n)};n(A,t=>{e(i).dependencies.length&&t(I)});var L=b(A,2);{let t=r(()=>e(s)&&e(u).length>0),n=r(()=>`Include ${M(e(i).id)} in my app`),a=r(()=>e(s)&&e(u).length>0?`In your app (needed by ${e(u).map(M).join(`, `)})`:e(s)?`In your app`:`Add to my app`);F(L,{get checked(){return e(s)},get disabled(){return e(t)},onchange:()=>se(e(i).id),get"aria-label"(){return e(n)},get label(){return e(a)}})}o(d),w((t,n)=>{f=a(d,1,`svelte-disfw2`,null,f,{selected:e(s)}),E(h,`href`,t),c(g,n),c(v,e(i).description)},[()=>N(`/packages/${e(i).id}/`),()=>M(e(i).id)]),ee(d,()=>te,()=>({duration:ne(`medium2`,300)})),p(t,d)},t=>{var n=ae(),r=x(n);w(()=>c(r,`No packages match "${e(z)??``}".`)),p(t,n)}),o($),o(J),o(H),w(t=>{E(G,`href`,t),c(de,e(B)),c(fe,`${e(V).length??``} of ${A.packages.length??``}`)},[()=>N(`/`)]),S(Q,()=>e(z),e=>D(z,e)),p(s,H),i()}h([`click`]);export{z as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,U as f,W as p,ft as m,ht as h,it as g,mt as _,pt as v,st as y,ut as b,v as x}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{_t as S,p as C,t as w,vt as T,xt as E}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,U as f,W as p,ft as m,ht as h,it as g,mt as _,pt as v,st as y,ut as b,v as x}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{_t as S,p as C,t as w,vt as T,xt as E}from"../chunks/B1Pf2l_R.js";import{t as D}from"../chunks/DRByVC-c.js";import{t as O}from"../chunks/DC203NCO.js";var k=e({entries:()=>A,load:()=>j}),A=()=>S.packages.map(e=>({id:e.id})),j=({params:e})=>(E(e.id)||D(404,`Unknown package ${e.id}`),{id:e.id}),M=s(`<!><a> </a>`,1),N=s(`<p class="meta svelte-1md22of">Needs: <!></p>`),P=s(`<li><a> </a> <span class="meta svelte-1md22of"> </span></li>`),F=s(`<main class="svelte-1md22of"><header class="svelte-1md22of"><h1 class="svelte-1md22of"> </h1> <p class="meta svelte-1md22of"><code> </code></p> <p class="svelte-1md22of"> </p> <!></header> <section class="svelte-1md22of"><h2 class="svelte-1md22of">Models</h2> <ul class="svelte-1md22of"></ul></section> <!></main>`),I=s(`<a>Back to the Planner</a>`),L=s(`<main class="svelte-1md22of"><h1 class="svelte-1md22of">Unknown package</h1> <p class="svelte-1md22of">No package is called <code> </code>.<!></p></main>`);function R(e,n){d(n,!0);let s=i(()=>E(n.id));var g=p(),b=v(g),S=e=>{var n=F(),i=m(n),a=m(i),d=_(a,!0),p=h(a,2),g=m(p),b=_(g);o(p);var S=h(p,2),E=_(S,!0),D=h(S,2),k=e=>{var n=N(),i=h(m(n));u(i,18,()=>t(s).dependencies,e=>e,(e,n,i)=>{var a=M(),o=v(a),s=e=>{var t=l(`,`);f(e,t)};r(o,e=>{t(i)>0&&e(s)});var u=h(o),d=_(u,!0);y((e,t)=>{x(u,`href`,e),c(d,t)},[()=>w(`/packages/${n}/`),()=>C(n)]),f(e,a)}),o(n),f(e,n)};r(D,e=>{t(s).dependencies.length&&e(k)}),o(i);var A=h(i,2),j=h(m(A),2);u(j,21,()=>T(t(s)),e=>e.id,(e,n)=>{var r=P(),i=m(r),a=_(i,!0),l=h(i,2),u=_(l);o(r),y((e,r)=>{x(i,`href`,e),c(a,t(n).name),c(u,`${r??``} fields`)},[()=>w(`/m/${t(s).id}/${t(n).name}/`),()=>t(n).fields.filter(e=>!e.system).length]),f(e,r)}),o(j),o(A);var I=h(A,2);O(I,{get models(){return t(s).models}}),o(n),y(e=>{c(d,e),c(b,`${t(s).packageName??``}@${t(s).version??``}`),c(E,t(s).description)},[()=>C(t(s).id)]),f(e,n)},D=e=>{var t=L(),i=h(m(t),2),a=h(m(i)),s=_(a,!0),l=h(a,2),u=e=>{var t=I();y(()=>x(t,`href`,n.backHref)),f(e,t)};r(l,e=>{n.backHref&&e(u)}),o(i),o(t),y(()=>c(s,n.id)),f(e,t)};r(b,e=>{t(s)?e(S):e(D,-1)}),f(e,g),a()}function z(e,t){d(t,!0),n(`88mplm`,e=>{g(e=>{b.title=`${e??``} · smrt planner`},[()=>C(t.data.id)])}),R(e,{get id(){return t.data.id}}),a()}export{z as component,k as universal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Ot as f,Pt as p,U as m,W as h,X as g,Y as _,Z as v,a as y,bt as b,ft as x,gt as S,ht as C,it as w,j as T,mt as E,pt as D,st as O,ut as k,v as A,vt as j}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{p as ee,t as M}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Ot as f,Pt as p,U as m,W as h,X as g,Y as _,Z as v,a as y,bt as b,ft as x,gt as S,ht as C,it as w,j as T,mt as E,pt as D,st as O,ut as k,v as A,vt as j}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{p as ee,t as M}from"../chunks/B1Pf2l_R.js";import{n as N}from"../chunks/B2aomX_k.js";import{i as P}from"../chunks/Qxx7HWld.js";import{A as te,C as F,E as I,O as ne,S as L,T as R,U as re,_ as ie,f as z,g as B,j as ae,k as V,p as H,t as U,v as W,w as G,y as K}from"../chunks/CLySd19b.js";import{t as q}from"../chunks/CYCgPm88.js";import{t as J}from"../chunks/DRByVC-c.js";import{n as Y}from"../chunks/CM3HdjYi.js";var X=e({entries:()=>Z,load:()=>Q}),Z=()=>L.map(e=>({id:e.id})),Q=({params:e})=>(H(e.id)||J(404,`Unknown recipe section ${e.id}`),{id:e.id}),oe=c(`<fieldset class="field svelte-nbkntr"><legend><code> </code> <span class="type svelte-nbkntr"> </span></legend> <!> <div class="controls svelte-nbkntr"><label class="svelte-nbkntr"><span>Label</span> <!></label> <label class="svelte-nbkntr"><span>Help text</span> <!></label> <fieldset class="default svelte-nbkntr"><!></fieldset> <label class="svelte-nbkntr"><span>Order</span> <!></label></div></fieldset>`),se=c(`<p class="hint svelte-nbkntr"> </p>`),ce=c(`<form class="options svelte-nbkntr"><!> <p class="hint svelte-nbkntr">Stored in the <code> </code> table. Switch fields on or
|
|
2
2
|
off and set their label, help, default and order. Saved as field policies.</p> <fieldset class="svelte-nbkntr"><legend>Exposure (can only be narrowed)</legend> <div class="surfaces svelte-nbkntr"></div></fieldset> <!> <!> <div class="actions svelte-nbkntr"><button type="submit" class="svelte-nbkntr">Save options</button> <button type="button" class="secondary svelte-nbkntr">Reset to recipe defaults</button></div> <p class="status svelte-nbkntr" role="status" aria-live="polite"> </p></form>`);function le(e,n){f(n,!0);let c=y(n,`headingLevel`,3,3);function _(){return R(n.model,n.hints,U.rows,U.narrowed[n.model.id]??[])}let w=b(S(_())),k=b(``),ee=i(()=>I(n.model,n.hints)),M=i(()=>te(n.model,n.hints)),L=i(()=>Object.entries(n.hints?.fields??{}).filter(([,e])=>e.visibility===`hidden`).map(([e])=>e));function re(e){e.preventDefault(),U.save(n.model.id,ae(n.model,n.hints,t(w)),V(n.model,n.hints,t(w))),j(k,`Options saved. The views below use them.`)}function ie(){U.reset(n.model.id),j(w,_(),!0),j(k,`Options reset to the recipe defaults.`)}function z(e,n){let r=Number(n);n.trim()!==``&&Number.isFinite(r)&&(t(w).fields[e].order=r)}var B=ce(),H=x(B);T(H,()=>`h${Math.min(c(),6)}`,!1,(e,t)=>{o(e,0,`svelte-nbkntr`);var r=u();O(()=>l(r,`${n.model.name??``} options`)),m(t,r)});var W=C(H,2),K=C(x(W)),q=E(K,!0);p(),s(W);var J=C(W,2),X=C(x(J),2);d(X,20,()=>F,e=>e,(e,r)=>{{let a=i(()=>`Expose ${n.model.name} over ${G[r]}${t(M)[r].available?``:` (none declared)`}`);P(e,{get checked(){return t(w).exposure[r]},get disabled(){return t(M)[r].locked},onchange:e=>t(w).exposure[r]=e.currentTarget.checked,get label(){return t(a)}})}}),s(X),s(J);var Z=C(J,2);d(Z,17,()=>t(ee),e=>e.field.name,(e,a)=>{let o=i(()=>t(a).field.name),c=i(()=>ne(t(a))),u=i(()=>t(a).locked);var d=h(),f=D(d),p=e=>{var r=oe(),d=x(r),f=x(d),p=E(f,!0),h=C(f,2),g=E(h,!0);s(d);var _=C(d,2);{let e=i(()=>`Use field ${t(o)}${t(a).required?` (required)`:t(u)?` (locked)`:``}`);P(_,{get checked(){return t(w).fields[t(o)].use},get disabled(){return t(c)},onchange:e=>t(w).fields[t(o)].use=e.currentTarget.checked,get label(){return t(e)}})}var v=C(_,2),y=x(v),b=C(x(y),2);{let e=i(()=>`Label for ${t(o)}`);N(b,{get disabled(){return t(u)},get"aria-label"(){return t(e)},get value(){return t(w).fields[t(o)].label},set value(e){t(w).fields[t(o)].label=e}})}s(y);var S=C(y,2),T=C(x(S),2);{let e=i(()=>`Help text for ${t(o)}`);N(T,{get disabled(){return t(u)},get"aria-label"(){return t(e)},get value(){return t(w).fields[t(o)].help},set value(e){t(w).fields[t(o)].help=e}})}s(S);var D=C(S,2),k=x(D);{let e=i(()=>({...t(a).field,required:!1})),r=i(()=>`Default value for ${t(o)}`),s=i(()=>`default-${n.model.name}`);Y(k,{get field(){return t(e)},get modelId(){return n.model.id},creatable:!1,get label(){return t(r)},get idPrefix(){return t(s)},get value(){return t(w).fields[t(o)].default},onchange:e=>{t(w).fields[t(o)].default=e}})}s(D);var A=C(D,2),j=C(x(A),2);{let e=i(()=>`Order of ${t(o)}`);N(j,{type:`number`,get value(){return t(w).fields[t(o)].order},get disabled(){return t(u)},oninput:e=>z(t(o),e.currentTarget.value),get"aria-label"(){return t(e)}})}s(A),s(v),s(r),O(()=>{l(p,t(o)),l(g,t(a).field.type),D.disabled=t(u)}),m(e,r)};r(f,e=>{t(w).fields[t(o)]&&e(p)}),m(e,d)});var Q=C(Z,2),le=e=>{var n=se(),r=E(n);O(e=>l(r,`Hidden by the recipe: ${e??``}.`),[()=>t(L).join(`, `)]),m(e,n)};r(Q,e=>{t(L).length&&e(le)});var $=C(Q,2),ue=C(x($),2);s($);var de=C($,2),fe=E(de,!0);s(B),O(()=>{A(B,`aria-label`,`Options for ${n.model.name}`),l(q,n.model.collection),l(fe,t(k))}),v(`submit`,B,re),g(`click`,ue,ie),m(e,B),a()}_([`click`]);var $=c(`<h2 class="svelte-1e5i8ao"> </h2>`),ue=c(`<!><a> </a>`,1),de=c(`<p class="meta svelte-1e5i8ao">Needs: <!></p>`),fe=c(`<a> </a>`),pe=c(`<li><!> <span class="meta svelte-1e5i8ao"> </span></li>`),me=c(`<div class="options svelte-1e5i8ao"><!> <p class="meta svelte-1e5i8ao"> </p> <!></div>`),he=c(`<p class="meta svelte-1e5i8ao">Add this recipe to set its options.</p>`),ge=c(`<section class="recipe svelte-1e5i8ao"><header class="svelte-1e5i8ao"><!> <p class="svelte-1e5i8ao"> </p> <p class="meta svelte-1e5i8ao"><code> </code> </p> <!> <div class="actions"><button type="button"> </button></div></header> <div class="adds svelte-1e5i8ao"><!> <ul class="svelte-1e5i8ao"></ul></div> <!></section>`);function _e(e,n){f(n,!0);let c=y(n,`titled`,3,!1),p=i(()=>c()?`h3`:`h2`),h=i(()=>U.has(n.recipe.id)),_=i(()=>U.requiredBy(n.recipe.id)),v=i(()=>ie(n.recipe)),b=e=>z(e)?.label??e,S=e=>{let t=z(e);return M(`/recipes/${t?re(t):e}/`)};var w=ge(),k=x(w),j=x(k),N=e=>{var t=$(),r=E(t,!0);O(()=>l(r,n.recipe.label)),m(e,t)};r(j,e=>{c()&&e(N)});var P=C(j,2),te=E(P,!0),F=C(P,2),I=x(F),ne=E(I,!0),L=C(I);s(F);var R=C(F,2),ae=e=>{var i=de(),a=C(x(i));d(a,18,()=>n.recipe.requires,e=>e,(e,n,i)=>{var a=ue(),o=D(a),s=e=>{var t=u(`,`);m(e,t)};r(o,e=>{t(i)>0&&e(s)});var c=C(o),d=E(c,!0);O((e,t)=>{A(c,`href`,e),l(d,t)},[()=>S(n),()=>b(n)]),m(e,a)}),s(i),m(e,i)};r(R,e=>{n.recipe.requires.length&&e(ae)});var V=C(R,2),H=x(V);let G;var q=E(H,!0);s(V),s(k);var J=C(k,2),Y=x(J);T(Y,()=>t(p),!1,(e,t)=>{o(e,0,`svelte-1e5i8ao`);var n=u(`What it adds`);m(t,n)});var X=C(Y,2);d(X,21,()=>W(n.recipe),e=>e.model.id,(e,n)=>{var i=pe(),a=x(i),o=e=>{var r=fe(),i=E(r,!0);O(e=>{A(r,`href`,e),l(i,t(n).label)},[()=>M(B(t(n)))]),m(e,r)},c=e=>{var r=u();O(()=>l(r,t(n).label)),m(e,r)};r(a,e=>{t(h)?e(o):e(c,-1)});var d=C(a,2),f=E(d);s(i),O(()=>l(f,`list, create, edit and delete views for ${t(n).model.name??``}`)),m(e,i)}),s(X),s(J);var Z=C(J,2),Q=e=>{var r=me(),a=x(r);T(a,()=>t(p),!1,(e,t)=>{o(e,0,`svelte-1e5i8ao`);var n=u(`Options`);m(t,n)});var f=C(a,2),h=E(f),g=C(f,2);d(g,17,()=>t(v),({model:e})=>e.id,(e,r)=>{let a=()=>t(r).model;{let r=i(()=>n.recipe.options?.[a().id]),o=i(()=>c()?4:3);le(e,{get model(){return a()},get hints(){return t(r)},get headingLevel(){return t(o)}})}}),s(r),O(()=>l(h,`Generated from the parameters ${n.recipe.label??``}'s models declare. Saving
|
|
3
3
|
writes field policies, held in memory for now.`)),m(e,r)},oe=e=>{var t=he();m(e,t)};r(Z,e=>{t(h)?e(Q):e(oe,-1)}),s(w),O((e,r)=>{A(w,`aria-label`,n.recipe.label),l(te,n.recipe.summary),l(ne,n.recipe.id),l(L,` · from
|
|
4
4
|
${e??``}`),H.disabled=t(_).length>0,G=o(H,1,`svelte-1e5i8ao`,null,G,{secondary:t(h)}),l(q,r)},[()=>K(n.recipe)?ee(K(n.recipe)?.id??``):`unknown package`,()=>t(_).length?`Remove ${n.recipe.label} (needed by ${t(_).map(b).join(`, `)})`:t(h)?`Remove ${n.recipe.label} from my app`:`Add ${n.recipe.label} to my app`]),g(`click`,H,()=>t(h)?U.remove(n.recipe.id):U.add(n.recipe.id)),m(e,w),a()}_([`click`]);var ve=c(`<main class="svelte-1r2e3yg"><header class="svelte-1r2e3yg"><div class="bar svelte-1r2e3yg"><p class="meta svelte-1r2e3yg"><a>Planner</a> </p> <!></div> <h1 class="svelte-1r2e3yg"> </h1></header> <!></main>`);function ye(e,o){f(o,!0);let c=i(()=>H(o.data.id));var u=h();n(`1r2e3yg`,e=>{w(()=>{k.title=`${t(c)?.label??o.data.id??``} options · smrt planner`})});var p=D(u),g=e=>{var n=ve(),r=x(n),a=x(r),o=x(a),u=x(o),f=C(u);s(o);var p=C(o,2);q(p,{get section(){return t(c).id},get label(){return t(c).label},current:`options`}),s(a);var h=C(a,2),g=E(h);s(r);var _=C(r,2);d(_,17,()=>t(c).recipes,e=>e.id,(e,n)=>{{let r=i(()=>t(c).recipes.length>1);_e(e,{get recipe(){return t(n)},get titled(){return t(r)}})}}),s(n),O(e=>{A(u,`href`,e),l(f,` / ${t(c).label??``} options`),l(g,`${t(c).label??``} options`)},[()=>M(`/`)]),m(e,n)};r(p,e=>{t(c)&&e(g)}),m(e,u),a()}export{ye as component,X as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,U as g,W as _,a as v,ft as y,ht as b,it as x,j as S,mt as C,pt as w,st as T,ut as E,v as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as O}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,U as g,W as _,a as v,ft as y,ht as b,it as x,j as S,mt as C,pt as w,st as T,ut as E,v as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as O}from"../chunks/B1Pf2l_R.js";import{S as k,_ as A,h as j,p as M,t as N}from"../chunks/CLySd19b.js";import{t as P}from"../chunks/CYCgPm88.js";import{t as F}from"../chunks/DRByVC-c.js";import{t as I}from"../chunks/JBD5vUbP.js";import{t as L}from"../chunks/DC203NCO.js";var R=e({entries:()=>z,load:()=>B}),z=()=>k.map(e=>({id:e.id})),B=({params:e})=>(M(e.id)||F(404,`Unknown recipe section ${e.id}`),{id:e.id}),V=(e,n=f)=>{var i=_(),a=w(i);d(a,17,n,h,(e,n)=>{var i=_(),a=w(i),o=e=>{var r=H();V(y(r),()=>t(n).children),s(r),g(e,r)},c=e=>{var r=U();V(y(r),()=>t(n).children),s(r),g(e,r)},d=e=>{var r=W(),i=C(r,!0);T(()=>l(i,t(n).text)),g(e,r)},f=e=>{var r=u();T(()=>l(r,t(n).text)),g(e,r)};r(a,e=>{t(n).type===`strong`?e(o):t(n).type===`em`?e(c,1):t(n).type===`code`?e(d,2):t(n).type===`text`&&e(f,3)}),g(e,i)}),g(e,i)},H=c(`<strong><!></strong>`),U=c(`<em><!></em>`),W=c(`<code> </code>`),G=c(`<p class="svelte-cw30hy"><!></p>`),K=c(`<li><!></li>`),q=c(`<ol class="svelte-cw30hy"></ol>`),J=c(`<ul class="svelte-cw30hy"></ul>`),Y=c(`<dt class="svelte-cw30hy"> </dt> <dd class="svelte-cw30hy"> </dd>`,1),X=c(`<section class="svelte-cw30hy"><!> <dl class="svelte-cw30hy"></dl></section>`),Z=c(`<section aria-label="Fields" class="svelte-cw30hy"><!> <!></section>`),Q=c(`<article class="help svelte-cw30hy"><!> <!></article>`);function $(e,n){p(n,!0);let c=v(n,`idPrefix`,3,``),f=v(n,`startLevel`,3,2),m=e=>Math.min(f()+e,6),x=i(()=>[...new Set(n.glossary.map(e=>e.model))].map(e=>({model:e,entries:n.glossary.filter(t=>t.model===e)})));var E=Q(),O=y(E);d(O,17,()=>n.blocks,h,(e,n)=>{var i=_(),a=w(i),c=e=>{var r=_(),i=w(r);S(i,()=>`h${m(t(n).level-2)}`,!1,(e,r)=>{o(e,0,`svelte-cw30hy`),V(r,()=>t(n).inlines)}),g(e,r)},l=e=>{var r=G();V(y(r),()=>t(n).inlines),s(r),g(e,r)},u=e=>{var r=q();d(r,21,()=>t(n).items,h,(e,n)=>{var r=K();V(y(r),()=>t(n).inlines),s(r),g(e,r)}),s(r),g(e,r)},f=e=>{var r=J();d(r,21,()=>t(n).items,h,(e,n)=>{var r=K();V(y(r),()=>t(n).inlines),s(r),g(e,r)}),s(r),g(e,r)};r(a,e=>{t(n).type===`heading`?e(c):t(n).type===`paragraph`?e(l,1):t(n).ordered?e(u,2):e(f,-1)}),g(e,i)});var k=b(O,2),A=e=>{var n=Z(),i=y(n);S(i,()=>`h${m(0)}`,!1,(e,t)=>{o(e,0,`svelte-cw30hy`);var n=u(`Fields`);g(t,n)});var a=b(i,2);d(a,17,()=>t(x),e=>e.model,(e,n)=>{var i=X(),a=y(i),f=e=>{var r=_(),i=w(r);S(i,()=>`h${m(1)}`,!1,(e,r)=>{o(e,0,`svelte-cw30hy`);var i=u();T(()=>l(i,t(n).model)),g(r,i)}),g(e,r)};r(a,e=>{t(x).length>1&&e(f)});var p=b(a,2);d(p,21,()=>t(n).entries,e=>e.name,(e,n)=>{var r=Y(),i=w(r),a=C(i,!0),o=b(i,2),s=C(o,!0);T(()=>{l(a,t(n).label),l(s,t(n).text)}),g(e,r)}),s(p),s(i),T(()=>{D(i,`id`,`${c()}fields-${t(n).model}`),D(i,`aria-label`,`${t(n).model} fields`)}),g(e,i)}),s(n),g(e,n)};r(k,e=>{t(x).length&&e(A)}),s(E),g(e,E),a()}var ee=c(`<h2 class="svelte-1o06wj"> </h2> <p class="meta svelte-1o06wj"> </p>`,1),te=c(`<p class="svelte-1o06wj"> </p>`),ne=c(`<section class="svelte-1o06wj"><!> <!></section>`);function re(e,n){p(n,!0);let o=v(n,`titled`,3,!1),c=i(()=>j(n.recipe,N.rows)),u=i(()=>n.recipe.help?I(n.recipe.help,t(c)):void 0);var d=ne(),f=y(d),m=e=>{var t=ee(),r=w(t),i=C(r,!0),a=b(r,2),o=C(a,!0);T(()=>{D(r,`id`,`help-${n.recipe.id}`),l(i,n.recipe.label),l(o,n.recipe.summary)}),g(e,t)};r(f,e=>{o()&&e(m)});var h=b(f,2),_=e=>{{let r=i(()=>`${n.recipe.id}-`),a=i(()=>o()?3:2);$(e,{get blocks(){return t(u).blocks},get glossary(){return t(u).glossary},get idPrefix(){return t(r)},get startLevel(){return t(a)}})}},x=e=>{var t=te(),r=C(t);T(()=>l(r,`There is no help for ${n.recipe.label??``} yet.`)),g(e,t)};r(h,e=>{t(u)?e(_):e(x,-1)}),s(d),T(()=>D(d,`aria-label`,n.recipe.label)),g(e,d),a()}var ie=c(`<main class="svelte-1nuwlgo"><header class="svelte-1nuwlgo"><div class="bar svelte-1nuwlgo"><p class="meta svelte-1nuwlgo"><a>Planner</a> / <a> </a> / Help</p> <!></div> <h1 class="svelte-1nuwlgo"> </h1></header> <!> <!></main>`);function ae(e,o){p(o,!0);let c=i(()=>M(o.data.id)),u=i(()=>{let e=new Set;return(t(c)?.recipes??[]).flatMap(t=>A(t).flatMap(({model:t})=>e.has(t.id)?[]:(e.add(t.id),[N.apply(t).model])))});var f=_();n(`1nuwlgo`,e=>{x(()=>{E.title=`${t(c)?.label??o.data.id??``} help · smrt planner`})});var h=w(f),v=e=>{var n=ie(),r=y(n),a=y(r),o=y(a),f=y(o),p=b(f,2),h=C(p,!0);m(),s(o);var _=b(o,2);P(_,{get section(){return t(c).id},get label(){return t(c).label},current:`help`}),s(a);var v=b(a,2),x=C(v);s(r);var S=b(r,2);d(S,17,()=>t(c).recipes,e=>e.id,(e,n)=>{{let r=i(()=>t(c).recipes.length>1);re(e,{get recipe(){return t(n)},get titled(){return t(r)}})}});var w=b(S,2);L(w,{get models(){return t(u)}}),s(n),T((e,n)=>{D(f,`href`,e),D(p,`href`,n),l(h,t(c).label),l(x,`${t(c).label??``} help`)},[()=>O(`/`),()=>O(`/recipes/${t(c).id}/`)]),g(e,n)};r(h,e=>{t(c)&&e(v)}),g(e,f),a()}export{ae as component,R as universal};
|