@happyvertical/smrt-planner 0.57.5 → 0.57.7
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/agents/assistant.md +29 -2
- package/agents/shell.md +13 -0
- package/app/404.html +27 -30
- package/app/_app/immutable/assets/0.BaRFeYGU.css +1 -0
- package/app/_app/immutable/assets/AppShell.BkKNrxND.css +1 -0
- package/app/_app/immutable/assets/{ModelPage.FEM0ZnPM.css → ModelPage.SIoeO-AU.css} +1 -1
- package/app/_app/immutable/assets/app.BHwMQ9Zv.css +1 -0
- package/app/_app/immutable/assets/{forms.DXOeP4wZ.css → forms.BRdbPdvs.css} +1 -1
- package/app/_app/immutable/assets/icons.BDx21rPt.css +1 -0
- package/app/_app/immutable/assets/labels.Dxa6EyRI.css +1 -0
- package/app/_app/immutable/assets/planner.DOQVfcOi.css +1 -0
- package/app/_app/immutable/assets/state.C0UZEhxS.css +1 -0
- package/app/_app/immutable/chunks/{C1VofLtR.js → B2uXaQfZ.js} +1 -1
- package/app/_app/immutable/chunks/{DuZeZzOA.js → BQLQsso4.js} +1 -1
- package/app/_app/immutable/chunks/BdOPgmQ_.js +11 -0
- package/app/_app/immutable/chunks/BeL8dJx9.js +4 -0
- package/app/_app/immutable/chunks/{Bal1oPZu.js → Bhd-3niN.js} +1 -1
- package/app/_app/immutable/chunks/{CTlMHIE6.js → BqEBz5Vq.js} +1 -1
- package/app/_app/immutable/chunks/{GdHEbDDH.js → BxyJ_Q7v.js} +1 -1
- package/app/_app/immutable/chunks/{C3sRGrYK.js → C2OYATC6.js} +1 -1
- package/app/_app/immutable/chunks/C6AANt9H.js +26 -0
- package/app/_app/immutable/chunks/{BybfWt-B.js → C8FX0hli.js} +6 -6
- package/app/_app/immutable/chunks/{BDbFl7UA.js → CYhwv6d2.js} +1 -1
- package/app/_app/immutable/chunks/CdKHckEF.js +1 -0
- package/app/_app/immutable/chunks/CsaWd8kG.js +2 -0
- package/app/_app/immutable/chunks/Cwz7QFS4.js +2 -0
- package/app/_app/immutable/chunks/{BG9Gz_25.js → D3lXu_rt.js} +25 -25
- package/app/_app/immutable/chunks/{YGONf0jr.js → D8MqcCKq.js} +1 -1
- package/app/_app/immutable/chunks/DF-0MxNw.js +1 -0
- package/app/_app/immutable/chunks/DGaFQflg.js +1 -0
- package/app/_app/immutable/chunks/DIE02RSm.js +1 -0
- package/app/_app/immutable/chunks/DIgo5ngo.js +1 -0
- package/app/_app/immutable/chunks/{5ukUzDcw.js → Db12RzZi.js} +1 -1
- package/app/_app/immutable/chunks/{Cga8zF3r.js → DfN2k_EX.js} +1 -1
- package/app/_app/immutable/chunks/DmHVTNcC.js +4 -0
- package/app/_app/immutable/chunks/{gCpxN2IC.js → DmdvNG82.js} +2 -2
- package/app/_app/immutable/chunks/{DjJovMrk.js → DwIRC3h5.js} +1 -1
- package/app/_app/immutable/chunks/{nphy1MQF.js → FeyhlLIZ.js} +1 -1
- package/app/_app/immutable/chunks/ICDFUCZL.js +2 -0
- package/app/_app/immutable/chunks/IDZmjRDr.js +1 -0
- package/app/_app/immutable/chunks/JqlEoPqZ.js +1 -0
- package/app/_app/immutable/chunks/{BiEOJeYb.js → TcjpRcdI.js} +1 -1
- package/app/_app/immutable/chunks/Vt9hDpHd.js +1 -0
- package/app/_app/immutable/chunks/ezs6CGyc.js +1 -0
- package/app/_app/immutable/chunks/lUJaueNM.js +16 -0
- package/app/_app/immutable/entry/app.C5bxPKCP.js +2 -0
- package/app/_app/immutable/entry/start.CZvO61qD.js +1 -0
- package/app/_app/immutable/nodes/0.DFJFBCCB.js +7 -0
- package/app/_app/immutable/nodes/{1.DKP901Gn.js → 1.D_79m87b.js} +1 -1
- package/app/_app/immutable/nodes/{10.DNN0cVai.js → 10.20u2-jxn.js} +1 -1
- package/app/_app/immutable/nodes/{11.DgbmegX3.js → 11.CvMq32jC.js} +1 -1
- package/app/_app/immutable/nodes/{12.D5MtnJoE.js → 12.Cd0cy1AC.js} +1 -1
- package/app/_app/immutable/nodes/{13._rY66Xa_.js → 13.DYYS3YVQ.js} +1 -1
- package/app/_app/immutable/nodes/14.BEf5BJDn.js +1 -0
- package/app/_app/immutable/nodes/2.C_kLkHNl.js +24 -0
- package/app/_app/immutable/nodes/{3.V5uGCpGb.js → 3.CZw3hv8O.js} +1 -1
- package/app/_app/immutable/nodes/{4.CCwzLrgu.js → 4.WMU9NDex.js} +1 -1
- package/app/_app/immutable/nodes/{5.CgHzwpns.js → 5.CuqxSfl4.js} +1 -1
- package/app/_app/immutable/nodes/{6.CvQHLh_u.js → 6.BXLQB7tR.js} +1 -1
- package/app/_app/immutable/nodes/{7.7EIrly34.js → 7.BZvxNeL2.js} +1 -1
- package/app/_app/immutable/nodes/{8.DyyRBuTw.js → 8.Bj2O4pyx.js} +1 -1
- package/app/_app/immutable/nodes/{9.DcURs0gN.js → 9.yeFzeUHj.js} +1 -1
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +34 -35
- package/app/ai/index.html +39 -40
- package/app/blueprint/index.html +29 -32
- package/app/cookbook/index.html +29 -32
- package/app/index.html +39 -42
- package/app/m/ads/AdDeliveryTier/index.html +36 -37
- package/app/m/ads/AdEvent/index.html +36 -37
- package/app/m/ads/AdFormat/index.html +36 -37
- package/app/m/ads/AdGroup/index.html +36 -37
- package/app/m/ads/AdVariation/index.html +36 -37
- package/app/m/analytics/AnalyticsDataStream/index.html +36 -37
- package/app/m/analytics/AnalyticsEvent/index.html +36 -37
- package/app/m/analytics/AnalyticsProperty/index.html +36 -37
- package/app/m/analytics/AnalyticsReport/index.html +36 -37
- package/app/m/approvals/ApprovalEvent/index.html +36 -37
- package/app/m/approvals/ApprovalPolicy/index.html +36 -37
- package/app/m/approvals/ApprovalRequest/index.html +36 -37
- package/app/m/assets/Asset/attachments/index.html +38 -39
- package/app/m/assets/Asset/index.html +36 -37
- package/app/m/assets/AssetAssociation/index.html +36 -37
- package/app/m/assets/AssetMetafield/index.html +36 -37
- package/app/m/assets/AssetStatus/index.html +36 -37
- package/app/m/assets/AssetType/index.html +36 -37
- package/app/m/assets/Folder/index.html +36 -37
- package/app/m/chat/AgentSession/index.html +36 -37
- package/app/m/chat/ChatMessage/index.html +36 -37
- package/app/m/chat/ChatParticipant/index.html +36 -37
- package/app/m/chat/ChatReaction/index.html +36 -37
- package/app/m/chat/ChatRoom/index.html +36 -37
- package/app/m/chat/ChatThread/index.html +36 -37
- package/app/m/chat/VoiceGatewayTurn/index.html +36 -37
- package/app/m/chat/VoiceSession/index.html +36 -37
- package/app/m/commerce/Agreement/index.html +36 -37
- package/app/m/commerce/Cart/index.html +36 -37
- package/app/m/commerce/Contract/index.html +36 -37
- package/app/m/commerce/ContractLineItem/index.html +36 -37
- package/app/m/commerce/Customer/index.html +36 -37
- package/app/m/commerce/DocumentTax/index.html +36 -37
- package/app/m/commerce/Estimate/index.html +36 -37
- package/app/m/commerce/Fulfillment/index.html +36 -37
- package/app/m/commerce/FulfillmentLineItem/index.html +36 -37
- package/app/m/commerce/HistoricalCustomerFunds/index.html +36 -37
- package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +36 -37
- package/app/m/commerce/HistoricalSalesLine/index.html +36 -37
- package/app/m/commerce/Invoice/index.html +36 -37
- package/app/m/commerce/InvoiceLineItem/index.html +36 -37
- package/app/m/commerce/Lease/index.html +36 -37
- package/app/m/commerce/LicenseSale/index.html +36 -37
- package/app/m/commerce/Order/index.html +36 -37
- package/app/m/commerce/Payment/index.html +36 -37
- package/app/m/commerce/PaymentAllocation/index.html +36 -37
- package/app/m/commerce/PaymentInstrument/index.html +36 -37
- package/app/m/commerce/PaymentIntent/index.html +36 -37
- package/app/m/commerce/Payout/index.html +36 -37
- package/app/m/commerce/ProductionOrder/index.html +36 -37
- package/app/m/commerce/PurchaseContract/index.html +36 -37
- package/app/m/commerce/PurchaseOrder/index.html +36 -37
- package/app/m/commerce/SalesContract/index.html +36 -37
- package/app/m/commerce/SupplierQuote/index.html +36 -37
- package/app/m/commerce/TaxCode/index.html +36 -37
- package/app/m/commerce/TaxComponent/index.html +36 -37
- package/app/m/commerce/TaxSettings/index.html +36 -37
- package/app/m/commerce/TaxSummaryReport/index.html +36 -37
- package/app/m/commerce/Vendor/index.html +36 -37
- package/app/m/commerce/WholesaleOrder/index.html +36 -37
- package/app/m/content/Content/index.html +36 -37
- package/app/m/content/ContentContribution/index.html +36 -37
- package/app/m/content/ContentContributionAttachment/index.html +36 -37
- package/app/m/content/ContentContributionRevision/index.html +36 -37
- package/app/m/content/ContentContributionType/index.html +36 -37
- package/app/m/content/ContentContributor/index.html +36 -37
- package/app/m/content/ContentCorrection/index.html +36 -37
- package/app/m/content/ContentFeedSource/index.html +36 -37
- package/app/m/content/ContentGovernanceAssignment/index.html +36 -37
- package/app/m/content/ContentGovernancePolicy/index.html +36 -37
- package/app/m/content/ContentGovernanceProfile/index.html +36 -37
- package/app/m/content/ContentReference/index.html +36 -37
- package/app/m/content/ContentReview/index.html +36 -37
- package/app/m/content/ContentVersion/index.html +36 -37
- package/app/m/events/Event/index.html +36 -37
- package/app/m/events/EventParticipant/index.html +36 -37
- package/app/m/events/EventSeries/index.html +36 -37
- package/app/m/events/EventType/index.html +36 -37
- package/app/m/expenses/Expense/index.html +36 -37
- package/app/m/facts/Fact/index.html +36 -37
- package/app/m/facts/FactContent/index.html +36 -37
- package/app/m/facts/FactEvidence/index.html +36 -37
- package/app/m/facts/FactSource/index.html +36 -37
- package/app/m/facts/FactSubject/index.html +36 -37
- package/app/m/facts/FactTag/index.html +36 -37
- package/app/m/fields/FieldPolicy/index.html +36 -37
- package/app/m/fields/FieldPolicySuggestion/index.html +36 -37
- package/app/m/fields/FieldUsageCounter/index.html +36 -37
- package/app/m/images/Image/index.html +36 -37
- package/app/m/inventory/InventoryLocation/index.html +36 -37
- package/app/m/inventory/StockLevel/index.html +36 -37
- package/app/m/inventory/StockMovement/index.html +36 -37
- package/app/m/ledgers/Account/index.html +36 -37
- package/app/m/ledgers/Journal/index.html +36 -37
- package/app/m/ledgers/JournalEntry/index.html +36 -37
- package/app/m/ledgers/Ledger/index.html +36 -37
- package/app/m/manufacturing/Assembly/index.html +36 -37
- package/app/m/manufacturing/BillOfMaterials/index.html +36 -37
- package/app/m/manufacturing/BomLine/index.html +36 -37
- package/app/m/manufacturing/Operation/index.html +36 -37
- package/app/m/manufacturing/ProductionRun/index.html +36 -37
- package/app/m/manufacturing/ProductionRunCompletion/index.html +36 -37
- package/app/m/manufacturing/RoutingStep/index.html +36 -37
- package/app/m/marketing/Campaign/index.html +36 -37
- package/app/m/marketing/CampaignChannel/index.html +36 -37
- package/app/m/marketing/CampaignMetricSnapshot/index.html +36 -37
- package/app/m/messages/Account/index.html +36 -37
- package/app/m/messages/Attachment/index.html +36 -37
- package/app/m/messages/Blacklist/index.html +36 -37
- package/app/m/messages/Email/failed-sends/index.html +38 -39
- package/app/m/messages/Email/index.html +36 -37
- package/app/m/messages/Email/mailbox/index.html +38 -39
- package/app/m/messages/EmailAccount/index.html +36 -37
- package/app/m/messages/EmailAttachment/index.html +36 -37
- package/app/m/messages/EmailFolder/index.html +36 -37
- package/app/m/messages/Message/index.html +36 -37
- package/app/m/messages/MessagingEndpoint/index.html +36 -37
- package/app/m/messages/PersonaMessageRoute/index.html +36 -37
- package/app/m/messages/SlackAccount/index.html +36 -37
- package/app/m/messages/SlackMessage/index.html +36 -37
- package/app/m/messages/TelegramAccount/index.html +36 -37
- package/app/m/messages/Tweet/index.html +36 -37
- package/app/m/messages/TwitterAccount/index.html +36 -37
- package/app/m/messages/Whitelist/index.html +36 -37
- package/app/m/messages/ZulipAccount/index.html +36 -37
- package/app/m/places/Place/index.html +36 -37
- package/app/m/places/PlaceType/index.html +36 -37
- package/app/m/products/Category/index.html +36 -37
- package/app/m/products/Material/index.html +36 -37
- package/app/m/products/Product/index.html +36 -37
- package/app/m/products/Product/ingredients/index.html +38 -39
- package/app/m/products/ProductVariant/index.html +36 -37
- package/app/m/products/Sku/index.html +36 -37
- package/app/m/profiles/ApiKey/index.html +36 -37
- package/app/m/profiles/Bot/index.html +36 -37
- package/app/m/profiles/MagicLinkToken/index.html +36 -37
- package/app/m/profiles/NostrIdentity/index.html +36 -37
- package/app/m/profiles/OidcIdentity/index.html +36 -37
- package/app/m/profiles/Organization/index.html +36 -37
- package/app/m/profiles/Person/index.html +36 -37
- package/app/m/profiles/Profile/index.html +36 -37
- package/app/m/profiles/ProfileMetadata/index.html +36 -37
- package/app/m/profiles/ProfileMetafield/index.html +36 -37
- package/app/m/profiles/ProfileRelationship/index.html +36 -37
- package/app/m/profiles/ProfileRelationshipTerm/index.html +36 -37
- package/app/m/profiles/ProfileRelationshipType/index.html +36 -37
- package/app/m/profiles/ProfileType/index.html +36 -37
- package/app/m/projects/Comment/index.html +36 -37
- package/app/m/projects/Issue/index.html +36 -37
- package/app/m/projects/Label/index.html +36 -37
- package/app/m/projects/Project/index.html +36 -37
- package/app/m/projects/ProjectIntegration/index.html +36 -37
- package/app/m/projects/PullRequest/index.html +36 -37
- package/app/m/projects/Repository/index.html +36 -37
- package/app/m/properties/Property/index.html +36 -37
- package/app/m/properties/Zone/index.html +36 -37
- package/app/m/reports/RuntimeReport/index.html +39 -37
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +36 -37
- package/app/m/reports/SmrtReportLock/index.html +36 -37
- package/app/m/reports/SmrtReportRefreshTask/index.html +36 -37
- package/app/m/reports/SmrtReportRun/index.html +36 -37
- package/app/m/reports/SmrtReportSchedule/index.html +36 -37
- package/app/m/reports/SmrtReportWatermark/index.html +36 -37
- package/app/m/sales/Agreement/index.html +36 -37
- package/app/m/sales/AttributionException/index.html +36 -37
- package/app/m/sales/AttributionPolicy/index.html +36 -37
- package/app/m/sales/Commission/index.html +36 -37
- package/app/m/sales/CommissionAdjustment/index.html +36 -37
- package/app/m/sales/CommissionPayout/index.html +36 -37
- package/app/m/sales/CommissionPlan/index.html +36 -37
- package/app/m/sales/Earner/index.html +36 -37
- package/app/m/sales/EarnerSourceAttribution/index.html +36 -37
- package/app/m/sales/EarningEvent/index.html +36 -37
- package/app/m/sales/ExecutedAgreement/index.html +36 -37
- package/app/m/sales/Lead/index.html +36 -37
- package/app/m/sales/Opportunity/index.html +36 -37
- package/app/m/sales/OpportunityConversion/index.html +36 -37
- package/app/m/sales/PipelineDefinition/index.html +36 -37
- package/app/m/sales/PipelineStage/index.html +36 -37
- package/app/m/sales/Referral/index.html +36 -37
- package/app/m/sales/ReferralAgreement/index.html +36 -37
- package/app/m/sales/ReferralLink/index.html +36 -37
- package/app/m/sales/ReferralProgram/index.html +36 -37
- package/app/m/sales/ReferralTermSnapshot/index.html +36 -37
- package/app/m/sales/ReferralTouch/index.html +36 -37
- package/app/m/sales/Referrer/index.html +36 -37
- package/app/m/sales/SalesActivity/index.html +36 -37
- package/app/m/sales/SalesRepresentative/index.html +36 -37
- package/app/m/sites/Site/index.html +36 -37
- package/app/m/sites/SiteAgentBinding/index.html +36 -37
- package/app/m/social/OAuthState/index.html +36 -37
- package/app/m/social/SocialAccount/index.html +36 -37
- package/app/m/social/SocialPost/index.html +36 -37
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +36 -37
- package/app/m/subscriptions/BillingAdjustment/index.html +36 -37
- package/app/m/subscriptions/ClientCharge/index.html +36 -37
- package/app/m/subscriptions/CreditGrant/index.html +36 -37
- package/app/m/subscriptions/PricingRule/index.html +36 -37
- package/app/m/subscriptions/RetailCharge/index.html +36 -37
- package/app/m/subscriptions/SpendingPolicy/index.html +36 -37
- package/app/m/subscriptions/SubscriptionPlan/index.html +36 -37
- package/app/m/subscriptions/TenantSubscription/index.html +36 -37
- package/app/m/subscriptions/TenantUsageMetric/index.html +36 -37
- package/app/m/support/ServiceTimeEntry/index.html +36 -37
- package/app/m/support/SupportAiRun/index.html +36 -37
- package/app/m/support/SupportAvailability/index.html +36 -37
- package/app/m/support/SupportCase/index.html +36 -37
- package/app/m/support/SupportCaseEvent/index.html +36 -37
- package/app/m/support/SupportChannelBinding/index.html +36 -37
- package/app/m/support/SupportCharge/index.html +36 -37
- package/app/m/support/SupportCompensation/index.html +36 -37
- package/app/m/support/SupportCompensationPlan/index.html +36 -37
- package/app/m/support/SupportEscalation/index.html +36 -37
- package/app/m/support/SupportInteraction/index.html +36 -37
- package/app/m/support/SupportPlan/index.html +36 -37
- package/app/m/support/SupportPolicy/index.html +36 -37
- package/app/m/support/SupportQualification/index.html +36 -37
- package/app/m/support/SupportServiceTarget/index.html +36 -37
- package/app/m/support/SupportSpecialist/index.html +36 -37
- package/app/m/support/SupportWorkLink/index.html +36 -37
- package/app/m/tags/Tag/index.html +36 -37
- package/app/m/tags/TagAlias/index.html +36 -37
- package/app/m/timesheets/AttendanceBreak/index.html +36 -37
- package/app/m/timesheets/AttendancePunch/index.html +36 -37
- package/app/m/timesheets/AttendanceSegment/index.html +36 -37
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +36 -37
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +36 -37
- package/app/m/timesheets/ServiceTimeEntry/index.html +36 -37
- package/app/m/users/Group/index.html +36 -37
- package/app/m/users/GroupMember/index.html +36 -37
- package/app/m/users/GroupRole/index.html +36 -37
- package/app/m/users/Membership/index.html +36 -37
- package/app/m/users/MembershipOverride/index.html +36 -37
- package/app/m/users/Permission/index.html +36 -37
- package/app/m/users/Role/index.html +36 -37
- package/app/m/users/RolePermission/index.html +36 -37
- package/app/m/users/Session/index.html +36 -37
- package/app/m/users/Tenant/index.html +36 -37
- package/app/m/users/TenantIntegration/index.html +36 -37
- package/app/m/users/TenantPermissionOverride/index.html +36 -37
- package/app/m/users/User/index.html +36 -37
- package/app/m/video/Character/index.html +36 -37
- package/app/m/video/CharacterAsset/index.html +36 -37
- package/app/m/video/CompositeJob/index.html +36 -37
- package/app/m/video/Performer/index.html +36 -37
- package/app/m/video/PerformerAsset/index.html +36 -37
- package/app/m/video/Scene/index.html +36 -37
- package/app/m/video/SceneAsset/index.html +36 -37
- package/app/m/video/VideoComposition/index.html +36 -37
- package/app/m/video/VideoCompositionAsset/index.html +36 -37
- package/app/m/video/VideoSequence/index.html +36 -37
- package/app/m/video/VideoSequenceAsset/index.html +36 -37
- package/app/m/video/VideoShot/index.html +36 -37
- package/app/m/video/VideoShotAsset/index.html +36 -37
- package/app/m/video/VideoShotCharacter/index.html +36 -37
- package/app/m/video/VideoWorkflow/index.html +36 -37
- package/app/m/voice/VoiceOutput/index.html +36 -37
- package/app/m/voice/VoiceProfile/index.html +36 -37
- package/app/m/voice/VoiceSample/index.html +36 -37
- package/app/mcp.html +2 -2
- package/app/packages/ads/index.html +30 -33
- package/app/packages/analytics/index.html +30 -33
- package/app/packages/approvals/index.html +30 -33
- package/app/packages/assets/index.html +30 -33
- package/app/packages/chat/index.html +30 -33
- package/app/packages/comments/index.html +30 -33
- package/app/packages/commerce/index.html +30 -33
- package/app/packages/content/index.html +30 -33
- package/app/packages/events/index.html +30 -33
- package/app/packages/expenses/index.html +30 -33
- package/app/packages/facts/index.html +30 -33
- package/app/packages/fields/index.html +30 -33
- package/app/packages/human-resources/index.html +30 -33
- package/app/packages/images/index.html +30 -33
- package/app/packages/index.html +30 -33
- package/app/packages/ingestion/index.html +30 -33
- package/app/packages/inventory/index.html +30 -33
- package/app/packages/ledgers/index.html +30 -33
- package/app/packages/manufacturing/index.html +30 -33
- package/app/packages/marketing/index.html +30 -33
- package/app/packages/messages/index.html +30 -33
- package/app/packages/places/index.html +30 -33
- package/app/packages/preferences/index.html +30 -33
- package/app/packages/products/index.html +30 -33
- package/app/packages/profiles/index.html +30 -33
- package/app/packages/projects/index.html +30 -33
- package/app/packages/properties/index.html +30 -33
- package/app/packages/reports/index.html +30 -33
- package/app/packages/sales/index.html +30 -33
- package/app/packages/sites/index.html +30 -33
- package/app/packages/social/index.html +30 -33
- package/app/packages/subscriptions/index.html +30 -33
- package/app/packages/support/index.html +30 -33
- package/app/packages/tags/index.html +30 -33
- package/app/packages/timesheets/index.html +30 -33
- package/app/packages/users/index.html +30 -33
- package/app/packages/video/index.html +30 -33
- package/app/packages/voice/index.html +30 -33
- package/app/packages/webhooks/index.html +30 -33
- package/app/recipes/account-access/help/index.html +32 -35
- package/app/recipes/account-access/index.html +36 -38
- package/app/recipes/activity/help/index.html +32 -35
- package/app/recipes/activity/index.html +36 -38
- package/app/recipes/agreements/help/index.html +32 -35
- package/app/recipes/agreements/index.html +36 -38
- package/app/recipes/analytics.reports/help/index.html +32 -35
- package/app/recipes/analytics.reports/index.html +36 -38
- package/app/recipes/assets/help/index.html +32 -35
- package/app/recipes/assets/index.html +36 -38
- package/app/recipes/billing/help/index.html +32 -35
- package/app/recipes/billing/index.html +36 -38
- package/app/recipes/chat.assistant/help/index.html +32 -35
- package/app/recipes/chat.assistant/index.html +36 -38
- package/app/recipes/comments/help/index.html +32 -35
- package/app/recipes/comments/index.html +36 -38
- package/app/recipes/commerce.customers/help/index.html +32 -35
- package/app/recipes/commerce.customers/index.html +36 -38
- package/app/recipes/commerce.estimates/help/index.html +32 -35
- package/app/recipes/commerce.estimates/index.html +36 -38
- package/app/recipes/commerce.purchases/help/index.html +32 -35
- package/app/recipes/commerce.purchases/index.html +36 -38
- package/app/recipes/commerce.sales/help/index.html +32 -35
- package/app/recipes/commerce.sales/index.html +36 -38
- package/app/recipes/commerce.vendors/help/index.html +32 -35
- package/app/recipes/commerce.vendors/index.html +36 -38
- package/app/recipes/commerce.wholesale/help/index.html +32 -35
- package/app/recipes/commerce.wholesale/index.html +36 -38
- package/app/recipes/events.calendar/help/index.html +32 -35
- package/app/recipes/events.calendar/index.html +36 -38
- package/app/recipes/expenses.tracking/help/index.html +32 -35
- package/app/recipes/expenses.tracking/index.html +36 -38
- package/app/recipes/fields.form-customization/help/index.html +32 -35
- package/app/recipes/fields.form-customization/index.html +36 -38
- package/app/recipes/ingestion/help/index.html +32 -35
- package/app/recipes/ingestion/index.html +36 -38
- package/app/recipes/integrations/help/index.html +32 -35
- package/app/recipes/integrations/index.html +36 -38
- package/app/recipes/inventory.stock/help/index.html +32 -35
- package/app/recipes/inventory.stock/index.html +36 -38
- package/app/recipes/ledgers.bookkeeping/help/index.html +32 -35
- package/app/recipes/ledgers.bookkeeping/index.html +36 -38
- package/app/recipes/messages/help/index.html +32 -35
- package/app/recipes/messages/index.html +36 -38
- package/app/recipes/products/help/index.html +32 -35
- package/app/recipes/products/index.html +36 -38
- package/app/recipes/projects.tracker/help/index.html +32 -35
- package/app/recipes/projects.tracker/index.html +36 -38
- package/app/recipes/reports.materialized/help/index.html +32 -35
- package/app/recipes/reports.materialized/index.html +36 -38
- package/app/recipes/reports.runtime/help/index.html +32 -35
- package/app/recipes/reports.runtime/index.html +37 -39
- package/app/recipes/sales.pipeline/help/index.html +32 -35
- package/app/recipes/sales.pipeline/index.html +36 -38
- package/app/recipes/tags.taxonomy/help/index.html +32 -35
- package/app/recipes/tags.taxonomy/index.html +36 -38
- package/app/recipes/team-collaboration/help/index.html +32 -35
- package/app/recipes/team-collaboration/index.html +36 -38
- package/app/recipes/timesheets.time-entries/help/index.html +32 -35
- package/app/recipes/timesheets.time-entries/index.html +36 -38
- package/app/s/custom-accounts/index.html +29 -32
- package/app/s/custom-appointments/index.html +29 -32
- package/app/s/custom-billing/index.html +29 -32
- package/app/s/custom-bookings/index.html +79 -0
- package/app/s/custom-buying/index.html +29 -32
- package/app/s/custom-checkout/index.html +29 -32
- package/app/s/custom-classes/index.html +29 -32
- package/app/s/custom-clients/index.html +29 -32
- package/app/s/custom-events/index.html +29 -32
- package/app/s/custom-fleet/index.html +29 -32
- package/app/s/custom-gigs/index.html +79 -0
- package/app/s/custom-giving/index.html +29 -32
- package/app/s/custom-instruments/index.html +79 -0
- package/app/s/custom-jobs/index.html +29 -32
- package/app/s/custom-kitchen/index.html +29 -32
- package/app/s/custom-lessons/index.html +79 -0
- package/app/s/custom-material/index.html +29 -32
- package/app/s/custom-meetings/index.html +29 -32
- package/app/s/custom-members/index.html +29 -32
- package/app/s/custom-merch/index.html +79 -0
- package/app/s/custom-money/index.html +79 -0
- package/app/s/custom-paint/index.html +29 -32
- package/app/s/custom-parts/index.html +29 -32
- package/app/s/custom-rentals/index.html +29 -32
- package/app/s/custom-roastery/index.html +29 -32
- package/app/s/custom-schedule/index.html +29 -32
- package/app/s/custom-shelf/index.html +29 -32
- package/app/s/custom-shop/index.html +29 -32
- package/app/s/custom-students/index.html +79 -0
- package/app/s/custom-wholesale/index.html +29 -32
- package/app/s/custom-work/index.html +29 -32
- package/app/s/custom-yard/index.html +29 -32
- package/app/s/section-access-control/index.html +29 -32
- package/app/s/section-account-security/index.html +29 -32
- package/app/s/section-accounting/index.html +29 -32
- package/app/s/section-activity/index.html +29 -32
- package/app/s/section-agreements/index.html +29 -32
- package/app/s/section-analytics/index.html +29 -32
- package/app/s/section-assets/index.html +29 -32
- package/app/s/section-billing/index.html +29 -32
- package/app/s/section-calendar/index.html +29 -32
- package/app/s/section-catalog/index.html +29 -32
- package/app/s/section-chat.assistant/index.html +29 -32
- package/app/s/section-comments/index.html +29 -32
- package/app/s/section-fields.form-customization/index.html +29 -32
- package/app/s/section-ingestion/index.html +29 -32
- package/app/s/section-integrations/index.html +29 -32
- package/app/s/section-messages/index.html +29 -32
- package/app/s/section-more/index.html +29 -32
- package/app/s/section-operations/index.html +29 -32
- package/app/s/section-projects/index.html +29 -32
- package/app/s/section-purchasing/index.html +29 -32
- package/app/s/section-reports.materialized/index.html +29 -32
- package/app/s/section-reports.runtime/index.html +29 -32
- package/app/s/section-sales/index.html +29 -32
- package/app/s/section-taxonomy/index.html +29 -32
- package/app/s/section-team/index.html +29 -32
- package/app/s/section-work/index.html +29 -32
- package/dist/assistant/change.d.ts +10 -1
- package/dist/assistant/change.d.ts.map +1 -1
- package/dist/assistant/change.js +6 -1
- package/dist/assistant/prompt.d.ts +10 -1
- package/dist/assistant/prompt.d.ts.map +1 -1
- package/dist/assistant/prompt.js +42 -7
- package/dist/assistant/session.svelte.d.ts +6 -0
- package/dist/assistant/session.svelte.d.ts.map +1 -1
- package/dist/assistant/session.svelte.js +6 -0
- package/dist/assistant/transport.d.ts +23 -3
- package/dist/assistant/transport.d.ts.map +1 -1
- package/dist/assistant/transport.js +356 -13
- package/dist/catalog/catalog.json +107 -41
- package/dist/components/BrowserAssistant.svelte +26 -0
- package/dist/components/BrowserAssistant.svelte.d.ts.map +1 -1
- package/dist/components/ModelPage.svelte +36 -4
- package/dist/components/ModelPage.svelte.d.ts.map +1 -1
- package/dist/components/PlannerReports.svelte +61 -0
- package/dist/components/PlannerReports.svelte.d.ts +10 -0
- package/dist/components/PlannerReports.svelte.d.ts.map +1 -0
- package/dist/components/PlannerSavedReportsWidget.svelte +38 -0
- package/dist/components/PlannerSavedReportsWidget.svelte.d.ts +9 -0
- package/dist/components/PlannerSavedReportsWidget.svelte.d.ts.map +1 -0
- package/dist/components/ReportProposalCard.svelte +63 -0
- package/dist/components/ReportProposalCard.svelte.d.ts +17 -0
- package/dist/components/ReportProposalCard.svelte.d.ts.map +1 -0
- package/dist/components/SectionOverview.svelte +22 -1
- package/dist/components/SectionOverview.svelte.d.ts.map +1 -1
- package/dist/components/ThemeBridge.svelte +2 -2
- package/dist/core/prompt.d.ts.map +1 -1
- package/dist/core/prompt.js +7 -1
- package/dist/core/reply.d.ts +6 -0
- package/dist/core/reply.d.ts.map +1 -1
- package/dist/core/reply.js +11 -0
- package/dist/data/packs.d.ts.map +1 -1
- package/dist/data/packs.js +415 -0
- package/dist/data/planner-source.d.ts.map +1 -1
- package/dist/data/planner-source.js +4 -1
- package/dist/library/icons.d.ts.map +1 -1
- package/dist/library/icons.js +10 -0
- package/dist/library/library.json +506 -0
- package/dist/overviews/definitions.d.ts.map +1 -1
- package/dist/overviews/definitions.js +6 -1
- package/dist/overviews/registry.d.ts.map +1 -1
- package/dist/overviews/registry.js +9 -5
- package/dist/planner/Planner.svelte +17 -0
- package/dist/planner/Planner.svelte.d.ts.map +1 -1
- package/dist/planner/instance.d.ts +6 -0
- package/dist/planner/instance.d.ts.map +1 -1
- package/dist/planner/shell.d.ts.map +1 -1
- package/dist/planner/shell.js +3 -1
- package/dist/reports/intent.d.ts +106 -0
- package/dist/reports/intent.d.ts.map +1 -0
- package/dist/reports/intent.js +667 -0
- package/dist/reports/planner.d.ts +33 -0
- package/dist/reports/planner.d.ts.map +1 -0
- package/dist/reports/planner.js +60 -0
- package/dist/reports/sources.d.ts +36 -0
- package/dist/reports/sources.d.ts.map +1 -0
- package/dist/reports/sources.js +125 -0
- package/dist/reports/store.d.ts +64 -0
- package/dist/reports/store.d.ts.map +1 -0
- package/dist/reports/store.js +214 -0
- package/dist/smrt-version.d.ts +1 -1
- package/dist/smrt-version.js +1 -1
- package/package.json +54 -54
- package/app/_app/immutable/assets/0.C8CwV4Fz.css +0 -1
- package/app/_app/immutable/assets/AppShell.Dnc9PAvY.css +0 -1
- package/app/_app/immutable/assets/app.4ScdTV_S.css +0 -1
- package/app/_app/immutable/assets/labels.DrQMsG17.css +0 -1
- package/app/_app/immutable/assets/state.CkVocVUJ.css +0 -1
- package/app/_app/immutable/chunks/9pRTae44.js +0 -1
- package/app/_app/immutable/chunks/BhU_yBI_.js +0 -1
- package/app/_app/immutable/chunks/Bsn3IIve.js +0 -4
- package/app/_app/immutable/chunks/C_3CJO_1.js +0 -1
- package/app/_app/immutable/chunks/Cr4byQts.js +0 -24
- package/app/_app/immutable/chunks/CtjBwCj8.js +0 -1
- package/app/_app/immutable/chunks/CyUSxz1P.js +0 -4
- package/app/_app/immutable/chunks/J9kOiFLO.js +0 -11
- package/app/_app/immutable/chunks/M-CuJzQN.js +0 -1
- package/app/_app/immutable/chunks/NppCG--v.js +0 -1
- package/app/_app/immutable/chunks/O8DAZ_le.js +0 -1
- package/app/_app/immutable/chunks/d_dqmeIr.js +0 -1
- package/app/_app/immutable/chunks/gMSmS-_y.js +0 -2
- package/app/_app/immutable/entry/app.B4gMiHwR.js +0 -2
- package/app/_app/immutable/entry/start.BXkBl20Z.js +0 -1
- package/app/_app/immutable/nodes/0.2MYMg80l.js +0 -9
- package/app/_app/immutable/nodes/14.B6TD25VU.js +0 -1
- package/app/_app/immutable/nodes/2.x9WyxQ1S.js +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./IDZmjRDr.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{$ as e,B as t,Ct as n,Dt as r,E as i,Et as a,F as o,Ft as s,G as c,H as l,I as u,K as d,L as f,Lt as p,Ot as m,Pt as h,U as g,W as _,X as v,Y as y,a as b,bt as x,ct as S,d as C,ft as w,gt as T,ht as E,k as ee,mt as D,pt as O,q as k,st as A,v as j,vt as M}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as N}from"./Bv5jGtB8.js";import"./YUSKx8_q.js";import{ft as P,lt as te,p as F,u as I,ut as ne}from"./D3lXu_rt.js";import"./DK8Blf1Y.js";import"./DF-0MxNw.js";import"./DfN2k_EX.js";y([`click`]),y([`click`,`keydown`]),y([`click`]);var L=new Map(Object.entries({menu:`M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z`,search:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z`,close:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z`,"chevron-right":`M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z`,"chevron-left":`M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z`,"chevron-down":`M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z`,check:`M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z`,add:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`,mic:`M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.04 6.43 5 7.07V21h4v-2.93c2.96-.64 5-3.54 5-7.07h-2z`,alert:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 5h2v6h-2zm0 8h2v2h-2z`,warning:`M1 21h22L12 2 1 21zm12-3h-2v-2h2zm0-4h-2v-4h2z`,info:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2zm0-8h-2V7h2z`,home:`M3 10 12 2 21 10v11h-6v-7H9v7H3z`,user:`M12 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM4 21v-2c0-4 16-4 16 0v2H4z`,settings:`M10 2h4l1 3 3-1 3 3-1 3 3 1v4l-3 1 1 3-3 3-3-1-1 3h-4l-1-3-3 1-3-3 1-3-3-1v-4l3-1-1-3 3-3 3 1 1-3zm2 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8z`,trash:`M7 3h10v2h4v2H3V5h4V3zm-2 6h14v12H5V9zm4 2v8h2v-8H9zm4 0v8h2v-8h-2z`,edit:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z`,calendar:`M7 2h2v2h6V2h2v2h4v18H3V4h4V2zm-2 8v10h14V10H5zm2 2h4v4H7v-4z`,clock:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 2h2v5.5l4 2.5-1 1.5-5-3V6z`,camera:`M9 3h6l2 3h4v15H3V6h4l2-3zm3 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6z`,upload:`M11 16V7l-4 4-1.5-1.5L12 3l6.5 6.5L17 11l-4-4v9h-2zM3 18h18v3H3v-3z`,download:`M11 3h2v9l4-4 1.5 1.5L12 16l-6.5-6.5L7 8l4 4V3zM3 18h18v3H3v-3z`})),R=x([]);function z(t){for(let n=e(R).length-1;n>=0;n--){let r=e(R)[n].paths.get(t);if(r!==void 0)return r}return L.get(t)}var B=d(`<svg xmlns="http://www.w3.org/2000/svg" data-smrt-component="Icon" class="svelte-em2a54"><path></path></svg>`);function V(t,i){m(i,!0);let a=b(i,`size`,3,24),o=b(i,`color`,3,`currentColor`),s=b(i,`viewBox`,3,`0 0 24 24`),c=n(()=>!!i[`aria-label`]),l=n(()=>i.path??(i.name?z(i.name):``)),u=n(()=>typeof a()==`number`?`${a()}px`:a());var d=B(),f=D(d);A(()=>{j(d,`width`,e(u)),j(d,`height`,e(u)),j(d,`viewBox`,s()),j(d,`fill`,o()),j(d,`aria-hidden`,!e(c)),j(d,`aria-label`,i[`aria-label`]),j(d,`role`,e(c)?`img`:void 0),j(f,`d`,e(l))}),g(t,d),r()}var re=c(`<p class="empty-description svelte-1x475nf"> </p>`),ie=c(`<a class="action-button svelte-1x475nf"> </a>`),ae=c(`<button type="button" class="action-button svelte-1x475nf"> </button>`),oe=c(`<div data-smrt-component="EmptyState"><div class="icon-container svelte-1x475nf"><!></div> <h3 class="empty-title svelte-1x475nf"> </h3> <!> <!></div>`);function se(e,n){let r=b(n,`icon`,3,`inbox`),a=b(n,`size`,3,`md`),c={document:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
2
|
+
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z"/>
|
|
3
|
+
<path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"/>
|
|
4
|
+
</svg>`,folder:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
5
|
+
<path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"/>
|
|
6
|
+
</svg>`,users:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
7
|
+
<path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/>
|
|
8
|
+
<circle cx="9" cy="7" r="4"/>
|
|
9
|
+
<path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"/>
|
|
10
|
+
</svg>`,search:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
11
|
+
<circle cx="11" cy="11" r="8"/>
|
|
12
|
+
<path d="M21 21l-4.35-4.35"/>
|
|
13
|
+
</svg>`,inbox:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
14
|
+
<path d="M22 12h-6l-2 3h-4l-2-3H2"/>
|
|
15
|
+
<path d="M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"/>
|
|
16
|
+
</svg>`};var d=oe();let f;var p=w(d),m=w(p),h=e=>{var t=_(),n=O(t);u(n,()=>c[r()]??c.inbox),g(e,t)},y=e=>{var t=_(),n=O(t);o(n,r),g(e,t)};t(m,e=>{typeof r()==`string`?e(h):e(y,-1)}),s(p);var x=E(p,2),S=D(x,!0),C=E(x,2),T=e=>{var t=re(),r=D(t,!0);A(()=>l(r,n.description)),g(e,t)};t(C,e=>{n.description&&e(T)});var k=E(C,2),M=e=>{var r=_(),i=O(r),a=e=>{var t=ie(),r=D(t,!0);ee(t,e=>N?.(e)),A(()=>{j(t,`href`,n.actionHref),l(r,n.actionLabel)}),g(e,t)},o=e=>{var t=ae(),r=D(t,!0);ee(t,e=>N?.(e)),A(()=>l(r,n.actionLabel)),v(`click`,t,function(...e){n.onaction?.apply(this,e)}),g(e,t)};t(i,e=>{n.actionHref?e(a):n.onaction&&e(o,1)}),g(e,r)};t(k,e=>{n.actionLabel&&e(M)}),s(d),A(()=>{f=i(d,1,`empty-state svelte-1x475nf`,null,f,{sm:a()===`sm`,lg:a()===`lg`}),l(S,n.title)}),g(e,d)}y([`click`]);var ce=Symbol.for(`smrt-ui.page-header`);function le(){return a(ce)??null}var ue=c(`<li class="svelte-1f2td7n"><a class="svelte-1f2td7n"> </a></li>`),de=c(`<nav class="page-crumbs svelte-1f2td7n" data-shell-breadcrumbs=""><ol class="svelte-1f2td7n"></ol></nav>`),fe=c(`<a class="back-link svelte-1f2td7n"><!> <span> </span></a>`),pe=c(`<h1 class="page-title page-title-field svelte-1f2td7n" data-page-title-field=""><!></h1>`),me=c(`<h1 class="page-title svelte-1f2td7n" data-shell-page-title=""> </h1>`),he=c(`<p class="page-subtitle svelte-1f2td7n"> </p>`),ge=c(`<div class="page-meta svelte-1f2td7n"><!></div>`),_e=c(`<div class="header-actions svelte-1f2td7n"><!></div>`),ve=c(`<div class="header-extra svelte-1f2td7n" data-page-header-extra=""><!></div>`),ye=c(`<header class="page-header svelte-1f2td7n" data-page-header="" data-smrt-component="PageHeader"><!> <div class="header-main svelte-1f2td7n"><div class="header-content svelte-1f2td7n"><!> <!> <!> <!></div> <!></div> <!></header>`);function be(i,a){m(a,!0);let c=b(a,`parents`,19,()=>[]),u=b(a,`crumbsLabel`,3,`Breadcrumb`),d=b(a,`backLabel`,3,`Back`),p=le(),h=n(()=>a.crumbs??(p?p.crumbs(c()):c()));S(()=>p?.report?.({title:a.shortTitle??a.title,parents:c()}));var _=ye(),v=w(_),y=t=>{var n=de(),r=w(n);f(r,23,()=>e(h),(e,t)=>`${t}:${e.href}`,(t,n)=>{var r=ue(),i=w(r),a=D(i,!0);s(r),A(()=>{j(i,`href`,e(n).href),l(a,e(n).label)}),g(t,r)}),s(r),s(n),A(()=>j(n,`aria-label`,u())),g(t,n)};t(v,t=>{e(h).length>0&&t(y)});var x=E(v,2),C=w(x),T=w(C),O=e=>{var t=fe(),n=w(t);V(n,{name:`chevron-left`,size:20});var r=E(n,2),i=D(r,!0);s(t),ee(t,e=>N?.(e)),A(()=>{j(t,`href`,a.backHref),l(i,d())}),g(e,t)};t(T,e=>{a.backHref&&e(O)});var k=E(T,2),M=e=>{var t=pe(),n=w(t);o(n,()=>a.titleField),s(t),g(e,t)},P=e=>{var t=me(),n=D(t,!0);A(()=>l(n,a.title)),g(e,t)};t(k,e=>{a.titleField?e(M):e(P,-1)});var te=E(k,2),F=e=>{var t=he(),n=D(t,!0);A(()=>l(n,a.subtitle)),g(e,t)};t(te,e=>{a.subtitle&&e(F)});var I=E(te,2),ne=e=>{var t=ge(),n=w(t);o(n,()=>a.meta),s(t),g(e,t)};t(I,e=>{a.meta&&e(ne)}),s(C);var L=E(C,2),R=e=>{var t=_e(),n=w(t);o(n,()=>a.actions),s(t),g(e,t)};t(L,e=>{a.actions&&e(R)}),s(x);var z=E(x,2),B=e=>{var t=ve(),n=w(t);o(n,()=>a.children),s(t),g(e,t)};t(z,e=>{a.children&&e(B)}),s(_),g(i,_),r()}y([`click`]),y([`click`]);function xe(e,t,n){if(!n||n<1||e.length<=n)return{visible:[...e],overflow:[]};let r=e.slice(0,n-1),i=e.slice(n-1),a=i.find(e=>e.id===t)??i[0];return{visible:a?[...r,a]:r,overflow:i.filter(e=>e!==a)}}var Se=c(`<span class="smrt-tabs__tab-count svelte-19k21oo" data-smrt-part="count"> </span>`),Ce=c(`<span class="smrt-tabs__tab-badge svelte-19k21oo" data-smrt-part="badge"> </span>`),we=c(`<a data-smrt-part="tab"><span data-smrt-part="label"> </span> <!> <!></a>`),Te=c(`<span class="smrt-tabs__tab-dot svelte-19k21oo" data-smrt-part="marker" aria-hidden="true"></span> <span class="smrt-tabs__visually-hidden svelte-19k21oo" data-smrt-part="description"> </span>`,1),Ee=c(`<details class="smrt-tabs__more svelte-19k21oo" data-smrt-part="overflow"><summary class="smrt-tabs__tab-link svelte-19k21oo" data-smrt-part="trigger"><span data-smrt-part="label"> </span> <!></summary> <div class="smrt-tabs__more-menu svelte-19k21oo" data-smrt-part="menu"></div></details>`),De=c(`<div class="smrt-tabs__tab-panel svelte-19k21oo" data-smrt-part="panel"><!></div>`),Oe=c(`<div class="smrt-tabs__container svelte-19k21oo" data-smrt-component="Tabs"><nav data-smrt-part="list" data-shell-tabs=""><div class="smrt-tabs__links-row svelte-19k21oo" data-smrt-part="row"></div> <!></nav> <!></div>`),ke=c(`<button type="button" data-smrt-part="tab" role="tab"><span class="smrt-tabs__tab-content-wrapper svelte-19k21oo" data-smrt-part="body"><span data-smrt-part="label"> </span> <!> <!></span> <div class="smrt-tabs__active-indicator svelte-19k21oo" data-smrt-part="indicator"></div></button>`),Ae=c(`<div class="smrt-tabs__tab-panel svelte-19k21oo" data-smrt-part="panel" role="tabpanel"><!></div>`),je=c(`<div class="smrt-tabs__container svelte-19k21oo" data-smrt-component="Tabs"><div data-smrt-part="list" role="tablist"></div> <!></div>`);function Me(a,c){let u=k();m(c,!0);let d=(r,a=p)=>{var o=we();let u;var d=w(o),f=D(d,!0),m=E(d,2),h=e=>{var t=Se(),n=D(t,!0);A(()=>l(n,a().count)),g(e,t)};t(m,e=>{a().count!==void 0&&e(h)});var _=E(m,2),y=e=>{var t=Ce(),n=D(t,!0);A(()=>l(n,a().badge)),g(e,t)},b=n(()=>z(a()));t(_,t=>{e(b)&&t(y)}),s(o),A(()=>{u=i(o,1,`smrt-tabs__tab-link svelte-19k21oo`,null,u,{"smrt-tabs__active":a().id===c.active}),j(o,`href`,a().disabled?void 0:a().href),j(o,`aria-current`,a().id===c.active?`page`:void 0),j(o,`aria-disabled`,a().disabled?`true`:void 0),j(o,`data-tab-id`,a().id),l(f,a().label)}),v(`click`,o,e=>{a().disabled?e.preventDefault():re(a().id)}),g(r,o)},y=b(c,`size`,3,`md`),T=b(c,`variant`,3,`primary`),P=b(c,`moreLabel`,3,`More`),te=b(c,`moreBadgeLabel`,3,`has updates`),F=n(()=>c.tabs.length>0&&c.tabs.every(e=>!!e.href)),I=n(()=>e(F)?xe(c.tabs,c.active,c.maxVisible):{visible:c.tabs,overflow:[]}),ne=n(()=>e(I).overflow.some(e=>z(e))),L=x(null),R=x(null);S(()=>{let t=c.active;e(F)&&e(R)&&(e(L)&&(e(L).open=!1),e(R).querySelector(`[data-tab-id="${CSS.escape(t)}"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`}))});function z(e){return e.badge!==void 0&&e.badge!==null&&e.badge!==``}let B=n(()=>c.tabs.filter(e=>!e.disabled)),V=x(null);function re(e){c.tabs.find(t=>t.id===e)?.disabled||e!==c.active&&c.onchange?.(e)}function ie(t,n){let r=e(B).findIndex(e=>e.id===n),i=null;switch(t.key){case`ArrowRight`:t.preventDefault(),i=(r+1)%e(B).length;break;case`ArrowLeft`:t.preventDefault(),i=(r-1+e(B).length)%e(B).length;break;case`Home`:t.preventDefault(),i=0;break;case`End`:t.preventDefault(),i=e(B).length-1}if(i!==null&&i!==r){let t=e(B)[i];t&&(c.onchange?.(t.id),requestAnimationFrame(()=>{(e(V)?.querySelector(`[data-tab-id="${CSS.escape(t.id)}"]`))?.focus()}))}}var ae=_(),oe=O(ae),se=n=>{var r=Oe(),a=w(r);let u;var p=w(a);f(p,21,()=>e(I).visible,e=>e.id,(t,n)=>{d(t,()=>e(n))}),s(p),C(p,e=>M(R,e),()=>e(R));var m=E(p,2),h=n=>{var r=Ee(),i=w(r),a=w(i),o=D(a,!0),c=E(a,2),u=e=>{var t=Te(),n=E(O(t),2),r=D(n);A(()=>l(r,`(${te()??``})`)),g(e,t)};t(c,t=>{e(ne)&&t(u)}),s(i);var p=E(i,2);f(p,21,()=>e(I).overflow,e=>e.id,(t,n)=>{d(t,()=>e(n))}),s(p),s(r),C(r,e=>M(L,e),()=>e(L)),A(()=>l(o,P())),g(n,r)};t(m,t=>{e(I).overflow.length>0&&t(h)}),s(a);var _=E(a,2),v=e=>{var t=De(),n=w(t);o(n,()=>c.children),s(t),g(e,t)};t(_,e=>{c.children&&e(v)}),s(r),A(()=>{u=i(a,1,`smrt-tabs__links svelte-19k21oo`,null,u,{"smrt-tabs__sm":y()===`sm`,"smrt-tabs__lg":y()===`lg`}),j(a,`aria-label`,c[`aria-label`])}),g(n,r)},ce=r=>{var a=je(),d=w(a);let p;f(d,21,()=>c.tabs,e=>e.id,(r,a)=>{var o=ke();let d;var f=w(o),p=w(f),m=D(p,!0),_=E(p,2),y=t=>{var n=Se(),r=D(n,!0);A(()=>l(r,e(a).count)),g(t,n)};t(_,t=>{e(a).count!==void 0&&t(y)});var b=E(_,2),x=t=>{var n=Ce(),r=D(n,!0);A(()=>l(r,e(a).badge)),g(t,n)},S=n(()=>z(e(a)));t(b,t=>{e(S)&&t(x)}),s(f),h(2),s(o),ee(o,e=>N?.(e)),A(()=>{d=i(o,1,`smrt-tabs__tab-button svelte-19k21oo`,null,d,{"smrt-tabs__active":e(a).id===c.active}),o.disabled=e(a).disabled,j(o,`id`,`tab-${u}-${e(a).id??``}`),j(o,`aria-selected`,e(a).id===c.active),j(o,`aria-controls`,`tab-panel-${u}`),j(o,`tabindex`,e(a).id===c.active?0:-1),j(o,`data-tab-id`,e(a).id),l(m,e(a).label)}),v(`click`,o,()=>re(e(a).id)),v(`keydown`,o,t=>ie(t,e(a).id)),g(r,o)}),s(d),C(d,e=>M(V,e),()=>e(V));var m=E(d,2),_=e=>{var t=Ae(),n=w(t);o(n,()=>c.children),s(t),A(()=>{j(t,`id`,`tab-panel-${u}`),j(t,`aria-labelledby`,`tab-${u}-${c.active??``}`)}),g(e,t)};t(m,e=>{c.children&&e(_)}),s(a),A(()=>{p=i(d,1,`smrt-tabs__nav svelte-19k21oo`,null,p,{"smrt-tabs__sm":y()===`sm`,"smrt-tabs__lg":y()===`lg`,"smrt-tabs__secondary":T()===`secondary`}),j(d,`aria-label`,c[`aria-label`])}),g(r,a)};t(oe,t=>{e(F)?t(se):t(ce,-1)}),g(a,ae),r()}y([`click`,`keydown`]),y([`click`,`keydown`]);function Ne(){let e=new Map,t=new Map,n=(e,t)=>`${e}:${t}`;return{register(t,r,i){e.set(n(t,r),i)},get(t,r){return e.get(n(t,r))},has(t,r){return e.has(n(t,r))},getSlots(t){let n=`${t}:`;return Array.from(e.keys()).filter(e=>e.startsWith(n)).map(e=>e.slice(n.length))},getModules(){return Array.from(t.keys())},getModuleMeta(e){return t.get(e)},registerModule(e){t.set(e.name,e)},unregister(t,r){return e.delete(n(t,r))},clear(){e.clear(),t.clear()}}}var Pe=Ne(),Fe=[`SmrtJunction`,`SmrtJunctionBase`,`SmrtPolymorphicAssociation`],Ie=[`Metafield`,`Metadata`,`Association`,`LineItem`,`Allocation`,`Revision`,`Attachment`,`Snapshot`,`Completion`,`Override`,`Alias`],Le=[`Status`,`Type`],Re={"@happyvertical/smrt-commerce:TaxComponent":`lookup`,"@happyvertical/smrt-commerce:TaxSettings":`settings`,"@happyvertical/smrt-commerce:DocumentTax":`snapshot`,"@happyvertical/smrt-commerce:TaxSummaryReport":`report`},H=new Set([`foreignKey`,`crossPackageRef`]);function ze(e){let t=e.id?Re[e.id]:void 0;if(t)return t;let n=e.extends?.split(`:`).pop();if(n&&Fe.includes(n))return`junction`;let r=e.fields.filter(e=>!e.system),i=r.filter(e=>H.has(e.type)).length;return i>=2&&r.length-i<=1?`link`:Ie.some(t=>e.name.endsWith(t))?`child`:r.length<=3&&Le.some(t=>e.name.endsWith(t))?`lookup`:null}function Be(e){return ze(e)!==null}var Ve=new Set([`junction`,`link`,`child`]);function U(e,t){return e.includes(`:`)?e:`${t.slice(0,t.lastIndexOf(`:`))}:${e}`}function W(e,t){let n=[],r=e.get(t);for(;r&&!n.includes(r.id);)n.push(r.id),r=r.extends?e.get(U(r.extends,r.id)):void 0;return n}function He(e,t){let n=e.packages.flatMap(e=>e.models),r=new Map(n.map(e=>[e.id,e])),i=new Set(W(r,t));return i.size?n.filter(e=>{if(i.has(e.id))return!1;let t=ze(e);return!t||!Ve.has(t)?!1:e.fields.some(t=>H.has(t.type)&&t.related&&i.has(U(t.related,e.id)))}):[]}function Ue(e,t){let n=e.fields.find(n=>H.has(n.type)&&n.related&&t.has(U(n.related,e.id)));return n?{model:e,fk:n.name}:void 0}function We(e,t,n){let r=e.packages.flatMap(e=>e.models),i=new Map(r.map(e=>[e.id,e])),a=new Set(W(i,n));if(!a.size)return[];let o=t.filter(e=>e.models.includes(n));if(!o.length)return He(e,n).flatMap(e=>{let t=Ue(e,a);return t?[t]:[]});let s=new Map;for(let e of o){let t=new Set(e.nav.map(e=>e.model));for(let n of e.models){let e=i.get(n);if(!e||t.has(n)||a.has(n)||s.has(n))continue;let r=Ue(e,a);r&&s.set(n,r)}}return[...s.values()]}function Ge(e,t){let n=e.packages.flatMap(e=>e.models),r=new Map(n.map(e=>[e.id,e])),i=new Set(W(r,t));if(!i.size)return[];let a=[];for(let e of n)if(!i.has(e.id))for(let t of e.fields)H.has(t.type)&&t.related&&i.has(U(t.related,e.id))&&a.push({model:e,fk:t.name});return a}function Ke(e,t){let n=e.packages.flatMap(e=>e.models),r=new Map(n.map(e=>[e.id,e])),i=r.get(t);return i?i.fields.flatMap(e=>{if(!H.has(e.type)||!e.related)return[];let t=r.get(U(e.related,i.id));return t?[{model:t,fk:e.name}]:[]}):[]}function qe(e,t){return e.some(e=>e.nav.some(e=>e.model===t))}function Je(e,t){let n=e;for(let e of t)if(n.length>e.length&&n.startsWith(e)){n=n.slice(e.length);break}let r=n.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).toLowerCase(),i=/[^aeiou]y$/.test(r)?`${r.slice(0,-1)}ies`:/(s|x|ch|sh)$/.test(r)?`${r}es`:`${r}s`;return i.charAt(0).toUpperCase()+i.slice(1)}function Ye(e,t){let n=e.packages.flatMap(e=>e.models),r=new Map(n.map(e=>[e.id,e]));return W(r,t).flatMap(e=>{let t=r.get(e);return t?[t.name]:[]})}function Xe(e,t,n){let r=Ye(e,t);return He(e,t).filter(e=>n(e)&&r.some(t=>e.name.startsWith(t)))}function G(e){return e.group?.id??e.id}function Ze(e){let t=new Map;for(let n of e){let e=G(n),r=t.get(e);r?r.recipes.push(n):t.set(e,{id:e,label:n.group?.label??n.label,recipes:[n]})}return[...t.values()]}function K(e){return e.section??{id:G(e),label:e.group?.label??e.label}}function Qe(e){let t=new Map;for(let n of e){let e=K(n),r=t.get(e.id);r?r.recipes.push(n):t.set(e.id,{...e,recipes:[n]})}return[...t.values()]}function $e(e){let t=new Set(e.map(e=>K(e).id)),n={};for(let r of e){let e=G(r),i=K(r).id;e!==i&&!t.has(e)&&(n[e]=i)}return n}function et(e,t,n){return`item:${e}:${t}${n?`:${n}`:``}`}function tt(e,t){return e?.trim()||t.description?.trim()||`Your ${nt(t.name)} records, all in one place.`}function nt(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).toLowerCase()}var rt={id:`more`,label:`More`,icon:`layers`,description:`Extra records you added one at a time.`},it=`fileText`;function at(e){let t=e.description?.trim();if(t)return t.split(/(?<=[.!?])\s/)[0]??t;let n=e.fields.filter(e=>!e.system).length;return`${n} ${n===1?`field`:`fields`}`}function ot(e,t){let n=new Set(t.flatMap(e=>e.models));return e.packages.flatMap(t=>ne(t).filter(e=>!n.has(e.id)).map(n=>({id:n.id,name:n.name,label:F(n.name),packageId:t.id,description:at(n),described:!!n.description?.trim(),plumbing:Be(n),fieldNames:n.fields.map(e=>e.name),includes:He(e,n.id).map(e=>F(e.name))})))}function st(e){return e.described?e.description:`${F(e.packageId)} · ${e.description}`}function ct(e,t){return t?[...e]:e.filter(e=>!e.plumbing)}function lt(e){return[...new Set(e.map(e=>e.packageId))]}function ut(e,t,n){let r=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(e=>{if(n&&e.packageId!==n)return!1;if(!r.length)return!0;let t=[e.name,e.label,e.description,e.packageId,...e.fieldNames].join(` `).toLowerCase();return r.every(e=>t.includes(e))})}function dt(e){return e.flatMap(e=>{let t=P(e);return t?.model.exposed?[{id:et(t.pkg.id,t.model.name),packageId:t.pkg.id,modelName:t.model.name,label:F(t.model.name),icon:it,description:tt(void 0,t.model)}]:[]})}var ft={"@happyvertical/smrt-commerce:Customer":{profileId:`Links this customer to their profile record, where their name and contact details are kept.`,creditLimit:`The most this customer may owe you at one time. Leave it empty or at zero if you do not set limits.`,paymentTerms:`How long the customer has to pay, written the way you would say it, for example "Net 30".`,taxExempt:`Turn this on if you do not charge this customer sales tax.`,taxId:`The customer's tax or VAT number, kept on file for tax-exempt sales.`,defaultShippingAddress:`Where you usually send this customer's goods, so you do not retype it on every order.`,defaultBillingAddress:`Where you send this customer's invoices.`,status:`Whether this is a current customer, for example active or inactive.`,customerType:`The kind of customer, for example an individual or a business.`,notes:`Anything worth remembering about this customer.`},"@happyvertical/smrt-commerce:Vendor":{profileId:`Links this vendor to their profile record, where their name and contact details are kept.`,leadTimeDays:`How many days the vendor usually takes between your order and delivery.`,minimumOrderAmount:`The smallest order the vendor will accept.`,paymentTerms:`How long you have to pay this vendor, written the way you would say it, for example "Net 30".`,currency:`The currency this vendor bills you in.`,defaultContactEmail:`The email address you normally use to reach this vendor.`,defaultContactPhone:`The phone number you normally use to reach this vendor.`,status:`Whether you still buy from this vendor, for example active or inactive.`,notes:`Anything worth remembering about this vendor.`,payoutAddresses:`Where payments to this vendor should be sent.`},"@happyvertical/smrt-commerce:Order":{status:`Where the order stands, for example draft, accepted or completed.`,customerId:`The customer this order is for.`,subtotal:`The order amount before tax.`,taxAmount:`The tax charged on the order.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the order's amounts.`,issueDate:`The date the order was placed.`,dueDate:`The date payment is expected. An order still open after this date counts as overdue.`,expiryDate:`The last day the order's price or offer is good for.`,reference:`Your own number or note for finding this order later, such as the customer's purchase order number.`,notes:`Anything worth remembering about this order.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the order came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:PurchaseOrder":{status:`Where the purchase stands, for example draft, accepted or completed.`,vendorId:`The vendor you are buying from.`,subtotal:`The order amount before tax.`,taxAmount:`The tax charged on the order.`,totalAmount:`What you pay in all, tax included.`,currency:`The currency of the order's amounts.`,issueDate:`The date you placed the order.`,dueDate:`The date the goods or the payment are due.`,expiryDate:`The last day the vendor's offer is good for.`,reference:`Your own number or note for finding this order later, such as the vendor's quote number.`,notes:`Anything worth remembering about this purchase.`,terms:`The conditions agreed with the vendor, such as payment or delivery conditions.`,channelId:`Where the order was placed, for example a vendor's website or a phone call.`},"@happyvertical/smrt-products:Product":{name:`What you call the product, as customers will see it.`,price:`What one costs, in dollars and cents.`,description:`A few words on what the product is and who it is for.`},"@happyvertical/smrt-products:ProductVariant":{productId:`The product this choice belongs to. Set for you when you save the product.`,axisName:`What the product varies by, for example size or color.`,allowedValues:`The values on offer for it, for example S, M and L.`},"@happyvertical/smrt-products:Sku":{productId:`The product this item is a version of. Set for you when you save the product.`,code:`The short code that identifies this exact size and color. Made for you from the product name.`,attributes:`Which size and color this item is. Set for you from the grid.`},"@happyvertical/smrt-inventory:StockLevel":{skuId:`The item being counted. Set for you when you save the product.`,locationId:`Where it is kept. New stock goes to the main warehouse.`,state:`Whether the count is available to sell. New stock starts as available.`,qty:`How many you have on hand.`},"@happyvertical/smrt-inventory:InventoryLocation":{code:`A short code for the place stock is kept, for example MAIN.`,name:`What you call the place, for example Main warehouse.`,kind:`What sort of place it is, for example a warehouse or a shop floor.`},"@happyvertical/smrt-commerce:Estimate":{status:`Where the estimate stands, for example draft, sent, accepted or completed.`,customerId:`The customer this estimate is for.`,subtotal:`The estimate amount before tax.`,taxAmount:`The tax charged on the estimate.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the estimate's amounts.`,issueDate:`The date the estimate was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the estimate is good for, or the day it ends.`,reference:`Your own number or note for finding this estimate later.`,notes:`Anything worth remembering about this estimate.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the estimate came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:WholesaleOrder":{status:`Where the wholesale order stands, for example draft, sent, accepted or completed.`,customerId:`The customer this wholesale order is for.`,subtotal:`The wholesale order amount before tax.`,taxAmount:`The tax charged on the wholesale order.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the wholesale order's amounts.`,issueDate:`The date the wholesale order was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the wholesale order is good for, or the day it ends.`,reference:`Your own number or note for finding this wholesale order later.`,notes:`Anything worth remembering about this wholesale order.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the wholesale order came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:Agreement":{status:`Where the agreement stands, for example draft, sent, accepted or completed.`,customerId:`The customer this agreement is for.`,subtotal:`The agreement amount before tax.`,taxAmount:`The tax charged on the agreement.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the agreement's amounts.`,issueDate:`The date the agreement was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the agreement is good for, or the day it ends.`,reference:`Your own number or note for finding this agreement later.`,notes:`Anything worth remembering about this agreement.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the agreement came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:Lease":{status:`Where the lease stands, for example draft, sent, accepted or completed.`,customerId:`The customer this lease is for.`,subtotal:`The lease amount before tax.`,taxAmount:`The tax charged on the lease.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the lease's amounts.`,issueDate:`The date the lease was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the lease is good for, or the day it ends.`,reference:`Your own number or note for finding this lease later.`,notes:`Anything worth remembering about this lease.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the lease came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:LicenseSale":{status:`Where the licence sale stands, for example draft, sent, accepted or completed.`,customerId:`The customer this licence sale is for.`,subtotal:`The licence sale amount before tax.`,taxAmount:`The tax charged on the licence sale.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the licence sale's amounts.`,issueDate:`The date the licence sale was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the licence sale is good for, or the day it ends.`,reference:`Your own number or note for finding this licence sale later.`,notes:`Anything worth remembering about this licence sale.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the licence sale came from, for example your shop or a marketplace.`},"@happyvertical/smrt-commerce:Contract":{status:`Where the contract stands, for example draft, sent, accepted or completed.`,subtotal:`The contract amount before tax.`,taxAmount:`The tax charged on the contract.`,totalAmount:`What the customer pays in all, tax included.`,currency:`The currency of the contract's amounts.`,issueDate:`The date the contract was issued or starts.`,dueDate:`The date payment is expected.`,expiryDate:`The last day the contract is good for, or the day it ends.`,reference:`Your own number or note for finding this contract later.`,notes:`Anything worth remembering about this contract.`,terms:`The conditions agreed with the customer, such as deposits, delivery or payment conditions.`,channelId:`Where the contract came from, for example your shop or a marketplace.`,contractType:`The kind of contract: order, estimate, lease, agreement and so on.`},"@happyvertical/smrt-commerce:ContractLineItem":{contractId:`The order, quote or agreement this line belongs to.`,description:`What is being sold or bought on this line.`,quantity:`How many.`,unitPrice:`The price of one, before tax.`,taxRate:`The tax rate for this line, as a percentage (5 means 5%).`,amount:`The line total.`,productId:`The product this line is for, if it is one you list.`},"@happyvertical/smrt-inventory:StockMovement":{skuId:`The item that moved.`,locationId:`The place it moved at.`,fromState:`What it was before, for example available or damaged.`,toState:`What it became.`,qty:`How many moved.`,reasonCode:`Why it moved, for example adjustment, sale or return.`,note:`Anything worth remembering about this movement.`,occurredAt:`When it happened.`},"@happyvertical/smrt-commerce:Invoice":{customerId:`The customer being billed.`,contractId:`The order or agreement this invoice bills for, if any.`,invoiceNumber:`The number printed on the invoice.`,issueDate:`The date the invoice was issued.`,dueDate:`The date payment is expected.`,paidDate:`The date it was paid in full.`,subtotal:`The amount before tax.`,taxAmount:`The tax charged.`,totalAmount:`What the customer owes in all, tax included.`,amountPaid:`How much of the total has been paid so far.`,currency:`The currency of the invoice.`,status:`Where the invoice stands: draft, sent, viewed, paid, overdue or cancelled.`,notes:`Private notes, not shown to the customer.`,customerNotes:`A message shown to the customer on the invoice.`,terms:`The payment conditions, such as Net 30.`},"@happyvertical/smrt-commerce:InvoiceLineItem":{invoiceId:`The invoice this line belongs to.`,description:`What is being billed on this line.`,quantity:`How many.`,unitPrice:`The price of one, before tax.`,taxRate:`The tax rate for this line, as a percentage (5 means 5%).`,amount:`The line total.`},"@happyvertical/smrt-commerce:Payment":{contractId:`The order or agreement this payment is for, if any.`,customerId:`The customer who paid.`,amount:`How much was paid.`,currency:`The currency of the payment.`,method:`How it was paid: cash, check, card, bank transfer or other.`,status:`Whether the payment is pending, completed, failed or refunded.`,reference:`Your own note, such as a check number.`,paidAt:`When the money was received.`,notes:`Anything worth remembering about this payment.`},"@happyvertical/smrt-commerce:PaymentAllocation":{paymentId:`The payment being applied.`,invoiceId:`The invoice it settles.`,amount:`How much of the payment goes to this invoice.`,allocatedAt:`When it was applied.`,notes:`Anything worth remembering about this allocation.`},"@happyvertical/smrt-commerce:Fulfillment":{contractId:`The order being fulfilled.`,fulfillmentType:`How it gets to the customer: shipment, delivery, pickup, digital or service.`,status:`Where it stands: pending, processing, shipped, delivered or cancelled.`,trackingNumber:`The carrier's tracking number.`,carrier:`The company carrying it.`,shippedAt:`When it left you.`,deliveredAt:`When it arrived.`,notes:`Anything worth remembering about this shipment.`},"@happyvertical/smrt-commerce:FulfillmentLineItem":{fulfillmentId:`The shipment this line belongs to.`,contractLineItemId:`The order line being sent.`,quantityFulfilled:`How many of that line are in this shipment.`},"@happyvertical/smrt-ledgers:Account":{number:`The account number in your chart of accounts.`,name:`What the account is called.`,description:`What the account is used for.`,type:`asset, liability, equity, revenue or expense.`,active:`Turn this off to stop using the account without deleting it.`},"@happyvertical/smrt-ledgers:Journal":{number:`The journal's reference number.`,date:`The date of the transaction.`,description:`What the transaction was.`,status:`draft while you work on it, posted once final, or voided.`,postedAt:`When it was posted.`},"@happyvertical/smrt-ledgers:JournalEntry":{journalId:`The journal this entry belongs to.`,accountId:`The account this entry changes.`,debit:`The amount debited. Leave zero on a credit.`,credit:`The amount credited. Leave zero on a debit.`,currency:`The currency of the amounts.`,memo:`A note on this entry.`},"@happyvertical/smrt-projects:Project":{title:`The project's name.`,description:`What the project is about.`,owner:`Who owns or runs the project.`,url:`A link to the project elsewhere.`},"@happyvertical/smrt-projects:Issue":{projectId:`The project this issue belongs to.`,title:`A short summary of the issue.`,body:`The full description.`,state:`open or closed.`,author:`Who raised the issue.`,labels:`The labels attached to the issue.`,assignees:`The people working on it.`},"@happyvertical/smrt-projects:Label":{projectId:`The project this label belongs to.`,name:`The label's name, for example bug.`,color:`The label's colour.`,description:`What the label means.`},"@happyvertical/smrt-projects:Comment":{issueId:`The issue this comment is on.`,body:`The comment text.`,author:`Who wrote it.`},"@happyvertical/smrt-events:Event":{name:`What the event is called.`,seriesId:`The series this event is part of, if any.`,typeId:`The kind of event.`,placeId:`Where it takes place.`,description:`What the event is about.`,startDate:`When it starts.`,endDate:`When it ends.`,allDay:`Turn this on for an event that lasts all day.`,status:`scheduled, in progress, completed, cancelled or postponed.`},"@happyvertical/smrt-events:EventType":{name:`What this kind of event is called, for example workshop.`,description:`What this kind of event is for.`},"@happyvertical/smrt-events:EventSeries":{name:`What the series is called.`,typeId:`The kind of event in this series.`,organizerId:`Who runs the series.`,description:`What the series is about.`,startDate:`When the series begins.`,endDate:`When the series ends.`,recurrence:`How often it repeats.`},"@happyvertical/smrt-events:EventParticipant":{eventId:`The event the person takes part in.`,profileId:`The person taking part.`,role:`What they do there, for example speaker or attendee.`},"@happyvertical/smrt-sales:Lead":{name:`What you call this lead.`,contactName:`The person to talk to.`,email:`Their email address.`,phone:`Their phone number.`,organizationName:`The company they are with.`,ownerRepId:`The sales representative who owns this lead.`,status:`Where the lead stands, for example new or qualified.`},"@happyvertical/smrt-sales:Opportunity":{name:`What you call this deal.`,leadId:`The lead it came from.`,ownerRepId:`The sales representative who owns this deal.`,pipelineId:`The pipeline it moves through.`,stageId:`The stage it is at now.`,expectedValueCents:`What you expect the deal to be worth, in cents.`,currency:`The currency of that value.`,probability:`How likely it is to close, as a decimal (0.5 is 50%).`,expectedCloseAt:`When you expect it to close.`,status:`open, won or lost.`},"@happyvertical/smrt-sales:PipelineDefinition":{key:`A short code for the pipeline.`,name:`What the pipeline is called.`,isDefault:`Turn this on to use it for new deals.`,status:`Whether the pipeline is in use.`,metadata:`Extra details kept with the pipeline.`},"@happyvertical/smrt-sales:PipelineStage":{pipelineId:`The pipeline this stage belongs to.`,key:`A short code for the stage.`,name:`What the stage is called.`,sortOrder:`Where it comes in the pipeline.`,probability:`How likely a deal at this stage is to close, as a decimal.`,isWon:`Turn this on for the stage that means the deal is won.`,isLost:`Turn this on for the stage that means the deal is lost.`},"@happyvertical/smrt-sales:SalesActivity":{subjectKind:`What the activity is about: a lead or an opportunity.`,subjectId:`The lead or opportunity it is about.`,activityKind:`The kind of activity, for example call, note or email.`,summary:`What happened or what needs doing.`,dueAt:`When it is due.`,completedAt:`When it was done.`}};function pt(e,t){let n=new Map(e.map(e=>[e.id,e])),r=[...Object.keys(t.recipes),...t.order].filter(e=>!n.has(e));if(r.length>0)throw Error(`Recipes only declared locally, not in a smrt package: ${[...new Set(r)].join(`, `)}`);let i=[...t.order,...e.map(e=>e.id).filter(e=>!t.order.includes(e))];return[...new Set(i)].map(e=>{let r=n.get(e),i=t.recipes[e];return i?{...r,...i}:r})}var mt={order:[`commerce.customers`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`inventory.stock`,`products.simple`,`products.clothing`,`products.ingredients`,`commerce.estimates`,`commerce.wholesale`,`commerce.invoicing`,`commerce.fulfillment`,`commerce.agreements`,`commerce.leases`,`commerce.licenses`,`ledgers.bookkeeping`,`projects.tracker`,`events.calendar`,`sales.pipeline`],recipes:{"commerce.customers":{forms:[{id:`customer.default`,kind:`field-map`,label:`Customer`,kindLabel:`Customer`,model:`@happyvertical/smrt-commerce:Customer`,records:[{as:`profileType`,model:`@happyvertical/smrt-profiles:ProfileType`,match:{name:`Customer`}},{as:`profile`,model:`@happyvertical/smrt-profiles:Profile`,match:{id:{ref:`customer`,field:`profileId`}},values:{typeId:{ref:`profileType`}}},{as:`customer`,model:`@happyvertical/smrt-commerce:Customer`,values:{profileId:{ref:`profile`}}}],fields:[{id:`name`,label:`Name`,to:`profile.name`,required:!0},{id:`email`,label:`Email`,to:`profile.email`},{id:`status`,label:`Status`,to:`customer.status`,default:`active`},{id:`customerType`,label:`Customer type`,to:`customer.customerType`,default:`dtc`},{id:`paymentTerms`,label:`Payment terms`,to:`customer.paymentTerms`},{id:`creditLimit`,label:`Credit limit`,to:`customer.creditLimit`},{id:`taxExempt`,label:`Tax exempt`,to:`customer.taxExempt`},{id:`taxId`,label:`Tax ID`,to:`customer.taxId`},{id:`shippingAddress`,label:`Shipping address`,to:`customer.defaultShippingAddress`},{id:`billingAddress`,label:`Billing address`,to:`customer.defaultBillingAddress`},{id:`notes`,label:`Notes`,to:`customer.notes`}]}]},"commerce.vendors":{forms:[{id:`vendor.default`,kind:`field-map`,label:`Vendor`,kindLabel:`Vendor`,model:`@happyvertical/smrt-commerce:Vendor`,records:[{as:`profileType`,model:`@happyvertical/smrt-profiles:ProfileType`,match:{name:`Vendor`}},{as:`profile`,model:`@happyvertical/smrt-profiles:Profile`,match:{id:{ref:`vendor`,field:`profileId`}},values:{typeId:{ref:`profileType`}}},{as:`vendor`,model:`@happyvertical/smrt-commerce:Vendor`,values:{profileId:{ref:`profile`}}}],fields:[{id:`name`,label:`Name`,to:`profile.name`,required:!0},{id:`email`,label:`Email`,to:`profile.email`},{id:`status`,label:`Status`,to:`vendor.status`,default:`active`},{id:`currency`,label:`Currency`,to:`vendor.currency`,default:`USD`},{id:`paymentTerms`,label:`Payment terms`,to:`vendor.paymentTerms`},{id:`leadTimeDays`,label:`Lead time (days)`,to:`vendor.leadTimeDays`},{id:`minimumOrderAmount`,label:`Minimum order`,to:`vendor.minimumOrderAmount`},{id:`contactEmail`,label:`Contact email`,to:`vendor.defaultContactEmail`},{id:`contactPhone`,label:`Contact phone`,to:`vendor.defaultContactPhone`},{id:`notes`,label:`Notes`,to:`vendor.notes`},{id:`payoutAddresses`,label:`Payout addresses`,to:`vendor.payoutAddresses`}]}]},"inventory.stock":{extends:[{form:`product.simple`,records:[{as:`sku`,model:`@happyvertical/smrt-products:Sku`,match:{productId:{ref:`product`}},values:{code:`{product.name|slug}`,name:`{product.name}`,attributes:`{}`,active:!0}},{as:`location`,model:`@happyvertical/smrt-inventory:InventoryLocation`,match:{code:`MAIN`},values:{name:`Main warehouse`,kind:`warehouse`}},{as:`stock`,model:`@happyvertical/smrt-inventory:StockLevel`,match:{skuId:{ref:`sku`},locationId:{ref:`location`},state:`available`}}],fields:[{id:`quantity`,label:`Quantity`,to:`stock.qty`,default:0}]},{form:`product.clothing`,records:[{as:`location`,model:`@happyvertical/smrt-inventory:InventoryLocation`,match:{code:`MAIN`},values:{name:`Main warehouse`,kind:`warehouse`}},{as:`stock`,model:`@happyvertical/smrt-inventory:StockLevel`,match:{skuId:{ref:`sku`},locationId:{ref:`location`},state:`available`}}],fields:[{id:`quantity`,label:`Quantity`,to:`stock.qty`,default:0}]}]},"products.simple":{forms:[{id:`product.simple`,kind:`field-map`,label:`Simple product`,kindLabel:`Simple`,model:`@happyvertical/smrt-products:Product`,records:[{as:`product`,model:`@happyvertical/smrt-products:Product`}],fields:[{id:`name`,label:`Name`,to:`product.name`,required:!0},{id:`price`,label:`Price`,to:`product.price`},{id:`description`,label:`Description`,to:`product.description`}]}]},"products.clothing":{forms:[{id:`product.clothing`,kind:`variant-grid`,label:`Clothing item`,kindLabel:`Clothing`,model:`@happyvertical/smrt-products:Product`,product:{as:`product`,model:`@happyvertical/smrt-products:Product`},fields:[{id:`name`,label:`Name`,to:`product.name`,required:!0},{id:`price`,label:`Price`,to:`product.price`}],axes:[{name:`size`,label:`Sizes`,values:[`XS`,`S`,`M`,`L`,`XL`]},{name:`color`,label:`Colors`,values:[]}],variants:`@happyvertical/smrt-products:ProductVariant`,skus:`@happyvertical/smrt-products:Sku`}]}}};function ht(e){return e.fields.filter(e=>!e.system)}var gt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toLowerCase();function _t(e,t){return/Type$/.test(t.name)&&Array.isArray(t.enum)&&t.enum.length>0&&!!e.extends&&t.enum.includes(gt(e.name))}function vt(e){return e.some(e=>e.ui?.basic===!0)}function yt(e){return e!=null&&e!==``}function bt(e){if(e==null)return null;try{return{value:JSON.parse(e)}}catch{return null}}function q(e,t,n=[]){let r=ht(e),i=vt(r),a=new Map(n.filter(t=>t.objectRef===e.id).map(e=>[e.fieldName,e]));return r.map((n,r)=>{let o=t?.fields?.[n.name]??{},s=_t(e,n),c=o.visibility??(s?`hidden`:!i||n.ui?.basic===!0?`basic`:`advanced`),l=o.label??I(n),u=o.help??null,d=o.order??n.ui?.order??r,f=o.locked??n.ui?.locked??s,p=gt(e.name),m=n.default===void 0?s&&n.enum?.includes(p)?p:void 0:n.default,h=`default`in o||m!==void 0,g=`default`in o?o.default:m,_=a.get(n.name);if(_&&(!f||_.locked===!1)){_.visibility&&(c=_.visibility),_.label&&(l=_.label),_.help!==void 0&&(u=_.help||null),typeof _.displayOrder==`number`&&(d=_.displayOrder);let e=bt(_.defaultValue);e&&(h=!0,g=e.value),typeof _.locked==`boolean`&&(f=_.locked)}let v,y=o.required??n.required;return y&&c!==`basic`&&!(h&&yt(g))&&(c=`basic`,v=!0),{field:n,visibility:c,label:l,help:u,order:d,group:n.ui?.group??null,locked:f,required:y,hasDefault:h,default:g,...v?{visibilityForced:v}:{}}}).map((e,t)=>({entry:e,index:t})).sort((e,t)=>e.entry.order-t.entry.order||e.index-t.index).map(({entry:e})=>e)}function xt(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===null?e:void 0}function St(e){return e.filter(e=>e.visibility===`basic`).map(e=>{let{default:t,...n}=e.field,r=e.hasDefault?xt(e.default):void 0;return{...n,required:e.required,...r===void 0?{}:{default:r},label:e.label,...e.help?{help:e.help}:{}}})}function Ct(e){let t={};for(let n of e)n.visibility!==`basic`&&n.hasDefault&&n.default!==void 0&&(t[n.field.name]=n.default);return t}var wt=[`api`,`mcp`,`cli`],Tt={api:`REST`,mcp:`MCP`,cli:`CLI`};function Et(e,t){return(t===`api`?e.rest.length:t===`mcp`?e.mcp.length:e.cli.length)>0}function J(e,t,n=[]){let r={};for(let i of wt){let a=Et(e,i),o=t?.exposure?.[i]===!1;r[i]={available:a,on:a&&!o&&!n.includes(i),locked:!a||o}}return r}function Dt(e,t){let n=t.mcp.on;return{...e,rest:t.api.on?e.rest:[],mcp:n?e.mcp:[],cli:t.cli.on?e.cli:[],methods:e.methods.map(e=>({...e,aiCallable:e.aiCallable&&n}))}}function Ot(e,t,n=[]){return q(e,t,n).filter(e=>t?.fields?.[e.field.name]?.visibility!==`hidden`)}function kt(e){return e.required||e.locked}function At(e,t,n,r){let i={};for(let r of Ot(e,t,n))i[r.field.name]={use:r.visibility===`basic`,label:r.label,help:r.help??``,default:r.hasDefault?r.default:null,order:r.order};let a=J(e,t,r);return{fields:i,exposure:{api:a.api.on,mcp:a.mcp.on,cli:a.cli.on}}}var jt=(e,t)=>JSON.stringify(e??null)===JSON.stringify(t??null);function Mt(e,t,n){let r=Ot(e,t),i=[];for(let t of r){let r=n.fields[t.field.name];if(!r||t.locked)continue;let a={objectRef:e.id,fieldName:t.field.name,scopeType:`app`},o=kt(t)?!0:r.use;o!==(t.visibility===`basic`)&&(a.visibility=o?`basic`:`hidden`),r.label.trim()&&r.label!==t.label&&(a.label=r.label.trim()),r.help!==(t.help??``)&&(a.help=r.help||null),jt(r.default,t.hasDefault?t.default:null)||(a.defaultValue=JSON.stringify(r.default??null)),r.order!==t.order&&(a.displayOrder=r.order),Object.keys(a).length>3&&i.push(a)}return i}function Nt(e,t,n){let r=J(e,t);return wt.filter(e=>r[e].on&&!n.exposure[e])}var Pt=ft,Y=pt(te.packages.flatMap(e=>e.recipes??[]),mt),Ft=new Map(Y.map(e=>[e.id,e]));function It(e){return Ft.get(e)}var X=Ft,Lt=Ze(Y);function Rt(e){return Lt.find(t=>t.id===e)}function zt(e){let t=e.models[0];return t?P(t)?.pkg:void 0}function Bt(e){return e.nav.flatMap(e=>{let t=P(e.model);return t?[{label:e.label,icon:e.icon??`fileText`,description:tt(e.description,t.model),...e.key?{key:e.key}:{},...e.noun?{noun:e.noun}:{},...e.filter?{filter:e.filter}:{},model:t.model,packageId:t.pkg.id}]:[]})}function Vt(e,t,n){return Y.some(r=>Bt(r).some(r=>r.key===n&&r.packageId===e&&r.model.name===t))}function Ht(e){return`/m/${e.packageId}/${e.model.name}/${e.key?`${e.key}/`:``}`}function Ut(e){return e.models.flatMap(e=>{let t=P(e);return t?[{model:t.model,packageId:t.pkg.id}]:[]})}function Wt(e,t=[]){let n=e.nav.length>0;return Ut(e).map(({model:r})=>({id:r.id,name:r.name,...n?{}:{glossary:!1},descriptions:{...Object.fromEntries(r.fields.flatMap(e=>e.description?[[e.name,e.description]]:[])),...Pt[r.id]},fields:q(r,e.options?.[r.id],t).map(e=>({name:e.field.name,label:e.label,help:e.help,visibility:e.visibility}))}))}function Gt(e){return[...new Set(e)].sort()}function Z(e,t){let n=new Set,r=e=>{let i=t.get(e);if(i&&!n.has(e)){n.add(e);for(let e of i.requires)r(e)}};for(let t of e)r(t);let i=!0;for(;i;){i=!1;for(let e of[...n])for(let a of t.get(e)?.requiresAny??[]){if(a.some(e=>n.has(e)))continue;let e=a.find(e=>t.has(e));e&&(r(e),i=!0)}}return Gt(n)}function Kt(e,t,n){let r=new Set(e),i=t.filter(e=>!r.has(e)),a=new Set(i);return i.filter(e=>{let t=n.get(e);return t?t.requires.some(e=>r.has(e))?!0:(t.requiresAny??[]).some(e=>e.some(e=>r.has(e))&&!e.some(e=>a.has(e))):!1})}function qt(e,t,n){return Kt([e],t,n)}function Jt(e,t){return Gt([...e].filter(e=>t.has(e)))}var Yt={currency:`USD`,taxRate:0,paymentTerms:``,pricesIncludeTax:!1,taxRounding:`line`},Q=`@happyvertical/smrt-commerce:`,$={currency:[`Order`,`PurchaseOrder`,`WholesaleOrder`,`Estimate`,`Invoice`,`Agreement`,`Lease`].map(e=>({model:`${Q}${e}`,field:`currency`})),taxRate:[`InvoiceLineItem`,`ContractLineItem`].map(e=>({model:`${Q}${e}`,field:`taxRate`})),paymentTerms:[...[`Order`,`WholesaleOrder`,`Estimate`,`Invoice`,`Agreement`,`Lease`].map(e=>({model:`${Q}${e}`,field:`terms`})),{model:`${Q}Customer`,field:`paymentTerms`}],pricesIncludeTax:[`Invoice`,`Contract`].map(e=>({model:`${Q}${e}`,field:`lineAmountType`})),taxRounding:[`Invoice`,`Contract`].map(e=>({model:`${Q}${e}`,field:`taxRoundingScope`}))};function Xt(e){return Object.values($).some(t=>t.some(t=>t.model===e.objectRef&&t.field===e.fieldName))}var Zt=Object.keys($);function Qt(e){if(e?.defaultValue!==void 0&&e.defaultValue!==null)try{return JSON.parse(e.defaultValue)}catch{return}}function $t(e,t,n){return e.find(e=>e.scopeType===`app`&&e.objectRef===t&&e.fieldName===n)}function en(e){let t={...Yt},n=(t,n)=>{for(let{model:r,field:i}of $[t]){let t=Qt($t(e.policies,r,i));if(typeof t===n)return t}},r=n(`currency`,`string`),i=n(`taxRate`,`number`),a=n(`paymentTerms`,`string`),o=n(`pricesIncludeTax`,`string`),s=n(`taxRounding`,`string`);return typeof r==`string`&&(t.currency=r),typeof i==`number`&&(t.taxRate=i),typeof a==`string`&&(t.paymentTerms=a),(o===`inclusive`||o===`exclusive`)&&(t.pricesIncludeTax=o===`inclusive`),(s===`line`||s===`document`)&&(t.taxRounding=s),t}function tn(e){return $.taxRate.some(({model:t,field:n})=>typeof Qt($t(e.policies,t,n))==`number`)}function nn(e,t,n){let r=P(t)?.model;if(!r)return;let i=q(r,e.recipes.map(e=>X.get(e)?.options?.[t]).find(Boolean),[]).find(e=>e.field.name===n);return i?.hasDefault?i.default:void 0}var rn=e=>e==null||e===``;function an(e,t){let n=e.policies.map(e=>({...e}));for(let r of Zt){let i=t[r],a=r===`paymentTerms`?String(i).trim():r===`currency`?String(i).trim().toUpperCase():r===`pricesIncludeTax`?i?`inclusive`:`exclusive`:i;for(let{model:t,field:i}of $[r]){let o=nn(e,t,i),s=!rn(a)&&!(!rn(o)&&o===a)&&!(rn(o)&&r===`taxRate`&&a===0),c=$t(n,t,i);if(s){let e=JSON.stringify(a);c?c.defaultValue=e:n.push({objectRef:t,fieldName:i,scopeType:`app`,defaultValue:e})}else c&&(delete c.defaultValue,Object.keys(c).length<=3&&(n=n.filter(e=>e!==c)))}}return{...e,policies:n}}function on(e){return{...Yt,...e}}var sn=()=>({ids:[],rows:[],narrowed:{},features:[],unavailableRecipes:[],unavailableFeatures:[]});function cn(e){let t=new Set([...e.ids.flatMap(e=>X.get(e)?.models??[]),...e.features]);return{...e,rows:e.rows.filter(e=>t.has(e.objectRef)||Xt(e)),narrowed:Object.fromEntries(Object.entries(e.narrowed).filter(([e])=>t.has(e)))}}var ln=(e,t)=>({...e,ids:Z([...e.ids,...t],X)});function un(e,t){let n=new Set(t),r=e.ids.filter(e=>!n.has(e));return cn({...e,ids:Z(r,X)})}var dn=(e,t)=>e.features.includes(t)?e:{...e,features:[...e.features,t].sort()},fn=(e,t)=>cn({...e,features:e.features.filter(e=>e!==t)}),pn=(e,t)=>qt(t,e.ids,X);function mn(e,t){for(let n of e.ids){let e=X.get(n)?.options?.[t];if(e)return e}}function hn(e,t,n,r){let i={...e.narrowed};return r.length?i[t]=[...r]:delete i[t],{...e,rows:[...e.rows.filter(e=>e.objectRef!==t),...n],narrowed:i}}function gn(e){let t=[...e.rows].sort((e,t)=>e.objectRef.localeCompare(t.objectRef)||e.fieldName.localeCompare(t.fieldName)),n=Object.fromEntries(Object.keys(e.narrowed).sort().filter(t=>e.narrowed[t].length).map(t=>[t,[...e.narrowed[t]].sort()])),r={recipes:[...e.ids,...e.unavailableRecipes].sort(),features:[...e.features,...e.unavailableFeatures].sort(),policies:t.map(e=>({...e}))};return Object.keys(n).length&&(r.exposure=n),r}function _n(e){let t=[...new Set(e.features)],n=e=>!!P(e)?.model.exposed;return cn({ids:Z(e.recipes,X),rows:e.policies.map(e=>({...e})),narrowed:Object.fromEntries(Object.entries(e.exposure??{}).map(([e,t])=>[e,[...t]])),features:t.filter(n).sort(),unavailableRecipes:[...new Set(e.recipes.filter(e=>!X.has(e)))].sort(),unavailableFeatures:t.filter(e=>!n(e)).sort()})}var vn=new class{#e=x(T([]));get ids(){return e(this.#e)}set ids(e){M(this.#e,e,!0)}#t=x(T([]));get rows(){return e(this.#t)}set rows(e){M(this.#t,e,!0)}#n=x(T({}));get narrowed(){return e(this.#n)}set narrowed(e){M(this.#n,e,!0)}#r=x(T([]));get features(){return e(this.#r)}set features(e){M(this.#r,e,!0)}#i=x(T([]));get unavailableRecipes(){return e(this.#i)}set unavailableRecipes(e){M(this.#i,e,!0)}#a=x(T([]));get unavailableFeatures(){return e(this.#a)}set unavailableFeatures(e){M(this.#a,e,!0)}get data(){return{ids:this.ids,rows:this.rows,narrowed:this.narrowed,features:this.features,unavailableRecipes:this.unavailableRecipes,unavailableFeatures:this.unavailableFeatures}}set(e){this.ids=e.ids,this.rows=e.rows,this.narrowed=e.narrowed,this.features=e.features,this.unavailableRecipes=e.unavailableRecipes,this.unavailableFeatures=e.unavailableFeatures}removeUnavailable(){this.unavailableRecipes=[],this.unavailableFeatures=[]}hasFeature(e){return this.features.includes(e)}addFeature(e){this.set(dn(this.data,e))}removeFeature(e){this.set(fn(this.data,e))}has(e){return this.ids.includes(e)}requiredBy(e){return pn(this.data,e)}add(...e){this.set(ln(this.data,e))}remove(...e){this.set(un(this.data,e))}toggle(e){this.has(e)?this.remove(e):this.add(e)}clear(){this.set(sn())}hintsFor(e){return mn(this,e)}apply(e){let t=this.hintsFor(e.id),n=q(e,t,this.rows);return{model:Dt(e,J(e,t,this.narrowed[e.id]??[])),resolved:n,fields:St(n),background:Ct(n)}}save(e,t,n){this.set(hn(this.data,e,t,n))}reset(e){this.save(e,[],[])}snapshot(){return gn(this.data)}load(e){this.set(_n(e))}};export{be as $,Mt as A,et as B,wt as C,kt as D,Ot as E,st as F,Ke as G,G as H,ut as I,Xe as J,qe as K,ct as L,ot as M,dt as N,Nt as O,lt as P,Me as Q,Qe as R,Lt as S,At as T,We as U,K as V,Je as W,Ge as X,Ye as Y,Pe as Z,Ut as _,Xt as a,Y as b,an as c,Z as d,se as et,It as f,Ht as g,Wt as h,tn as i,rt as j,J as k,Jt as l,Vt as m,gn as n,en as o,Rt as p,Be as q,$ as r,on as s,vn as t,V as tt,Kt as u,Bt as v,Tt as w,X as x,zt as y,$e as z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DFJFBCCB.js","../chunks/COiEfhsA.js","../chunks/DG3qFFTE.js","../chunks/IDZmjRDr.js","../chunks/Dt-HX3Vu.js","../chunks/xihTtKlq.js","../chunks/D3lXu_rt.js","../chunks/YUSKx8_q.js","../chunks/DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","../chunks/BeL8dJx9.js","../chunks/uBIymjUX.js","../chunks/Bv5jGtB8.js","../assets/feedback.qFktqYFY.css","../chunks/DF-0MxNw.js","../assets/SegmentedControl.DMqHG5fn.css","../chunks/DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","../chunks/DfN2k_EX.js","../assets/data.CVlX_W0i.css","../chunks/CUyVrfsu.js","../chunks/CsaWd8kG.js","../assets/forms.BRdbPdvs.css","../chunks/BYcBM-fh.js","../assets/AppShell.BkKNrxND.css","../chunks/BQLQsso4.js","../assets/workspace.C40zM0Mb.css","../chunks/C6AANt9H.js","../chunks/DmdvNG82.js","../chunks/C7zBd-pD.js","../chunks/D7hhQvDO.js","../chunks/CA-A9Ngs.js","../chunks/BxyJ_Q7v.js","../chunks/BQxY8kkL.js","../chunks/Cwz7QFS4.js","../chunks/DmHVTNcC.js","../chunks/lUJaueNM.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","../chunks/CdKHckEF.js","../chunks/FeyhlLIZ.js","../assets/icons.BDx21rPt.css","../chunks/DGaFQflg.js","../chunks/ezs6CGyc.js","../chunks/TcjpRcdI.js","../chunks/d934w91N.js","../chunks/ICDFUCZL.js","../chunks/DIgo5ngo.js","../assets/planner.DOQVfcOi.css","../chunks/D_U_DYjx.js","../chunks/Vt9hDpHd.js","../chunks/C2OYATC6.js","../chunks/BqEBz5Vq.js","../chunks/Bhd-3niN.js","../chunks/B2uXaQfZ.js","../assets/SectionIcons.BGFcFuOf.css","../assets/SectionActions.BE1CPmxk.css","../chunks/BMgzWMdF.js","../chunks/CgAkqYsL.js","../assets/0.BaRFeYGU.css","../nodes/1.D_79m87b.js","../nodes/2.C_kLkHNl.js","../chunks/BdOPgmQ_.js","../assets/AiSetup.CrvuNhMR.css","../chunks/Db12RzZi.js","../assets/percent.BGI-foAF.css","../chunks/CYhwv6d2.js","../assets/2.CdEXvRg0.css","../nodes/3.CZw3hv8O.js","../assets/3.D518dbB5.css","../nodes/4.WMU9NDex.js","../assets/4.B3vt1gMJ.css","../nodes/5.CuqxSfl4.js","../nodes/6.BXLQB7tR.js","../nodes/7.BZvxNeL2.js","../chunks/DRByVC-c.js","../chunks/C8FX0hli.js","../chunks/D8MqcCKq.js","../assets/FieldMapForm.C8SZ3t4N.css","../chunks/JBD5vUbP.js","../chunks/D71UrO5c.js","../assets/ModelPage.SIoeO-AU.css","../nodes/8.Bj2O4pyx.js","../nodes/9.yeFzeUHj.js","../nodes/10.20u2-jxn.js","../assets/10.CdYxvH4G.css","../nodes/11.CvMq32jC.js","../chunks/DwIRC3h5.js","../assets/ConnectTools.DTleL8YA.css","../assets/11.nOT5Z4Fv.css","../nodes/12.Cd0cy1AC.js","../assets/12.F7A7zP4J.css","../nodes/13.DYYS3YVQ.js","../assets/13.JoySu8W5.css","../nodes/14.BEf5BJDn.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/uBIymjUX.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.DFJFBCCB.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.D_79m87b.js`),__vite__mapDeps([61,2,1,5,45,3,4]),import.meta.url),()=>T(()=>import(`../nodes/2.C_kLkHNl.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.CZw3hv8O.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.WMU9NDex.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.CuqxSfl4.js`),__vite__mapDeps([73,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/6.BXLQB7tR.js`),__vite__mapDeps([74,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/7.BZvxNeL2.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,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/8.Bj2O4pyx.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,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/9.yeFzeUHj.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,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/10.20u2-jxn.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.CvMq32jC.js`),__vite__mapDeps([87,1,2,5,6,7,8,9,10,76,4,88,89,90]),import.meta.url),()=>T(()=>import(`../nodes/12.Cd0cy1AC.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,78,36,17,18,39,50,52,65,21,32,12,66,79,92]),import.meta.url),()=>T(()=>import(`../nodes/13.DYYS3YVQ.js`),__vite__mapDeps([93,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,55,56,76,4,80,88,89,94]),import.meta.url),()=>T(()=>import(`../nodes/14.BEf5BJDn.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,41,50,55,56,54,57,59,81,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/IDZmjRDr.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,B as n,Ct as r,Dt as i,F as a,Ft as o,G as s,H as c,J as l,L as u,Lt as d,Ot as f,Pt as p,R as m,T as h,U as g,W as _,X as v,Y as y,Z as b,a as x,b as S,bt as C,ct as w,d as T,dt as E,ft as D,gt as O,ht as k,l as A,mt as j,nt as M,ot as N,pt as P,r as F,s as ee,st as I,ut as te,v as L,vt as R,wt as z}from"../chunks/DG3qFFTE.js";import{a as ne,i as re,n as B,r as ie,t as ae,u as oe}from"../chunks/IDZmjRDr.js";import"../chunks/xihTtKlq.js";import{a as se,dt as ce,i as le,n as V,o as ue,p as de,pt as fe,s as pe,t as H,ut as me}from"../chunks/D3lXu_rt.js";import{n as U}from"../chunks/DK8Blf1Y.js";import{i as he,n as ge,t as _e}from"../chunks/BeL8dJx9.js";import{n as ve}from"../chunks/BQLQsso4.js";import{u as W}from"../chunks/DIE02RSm.js";import{c as ye,d as be,h as xe,s as Se}from"../chunks/DfN2k_EX.js";import{A as G,C as Ce,D as we,E as Te,S as Ee,b as De,i as K,j as Oe,n as ke,r as Ae,s as je,t as Me}from"../chunks/C6AANt9H.js";import"../chunks/DGaFQflg.js";import"../chunks/ezs6CGyc.js";import{t as q}from"../chunks/TcjpRcdI.js";import{D as Ne,O as Pe,m as Fe,n as J,o as Ie,t as Le}from"../chunks/Cwz7QFS4.js";import{B as Re,H as ze,N as Be,R as Ve,b as He,g as Ue,j as Y,s as We,t as X,tt as Ge,v as Ke}from"../chunks/lUJaueNM.js";import{g as Z,h as qe,v as Je}from"../chunks/CdKHckEF.js";import{n as Ye,t as Xe}from"../chunks/FeyhlLIZ.js";import"../chunks/d934w91N.js";import{a as Ze,n as Qe,s as $e,t as et,u as tt}from"../chunks/ICDFUCZL.js";import{r as nt,t as rt}from"../chunks/D_U_DYjx.js";import{a as it,c as at,d as ot,f as st,i as ct,l as lt,m as ut,n as dt,o as ft,r as Q,t as pt}from"../chunks/Vt9hDpHd.js";import{t as mt}from"../chunks/Bhd-3niN.js";import{a as ht,i as gt,n as _t,r as vt}from"../chunks/BMgzWMdF.js";import{n as $}from"../chunks/CgAkqYsL.js";var yt=e({prerender:()=>!0,trailingSlash:()=>bt}),bt=`always`,xt=`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`,St=s(`<a class="cap svelte-nioco2"><!></a>`),Ct=s(`<div class="ai-status svelte-nioco2" role="group" aria-label="AI models"></div>`);function wt(e,n){f(n,!1);let r={think:Ae,hear:Me,speak:ke};A();var a=Ct();u(a,5,()=>K.capabilities,e=>e.id,(e,n)=>{var i=St(),a=D(i);Ge(a,{get path(){return r[t(n).id]},size:20}),o(i),I(e=>{L(i,`href`,e),L(i,`data-state`,t(n).state),L(i,`aria-label`,t(n).label),L(i,`title`,t(n).label)},[()=>H(`/ai/`)]),g(e,i)}),o(a),g(e,a),i()}function Tt(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}var Et=s(`<div><!></div>`);function Dt(e,n){f(n,!0);let a=x(n,`answered`,3,null),s=Qe(nt()),c=r(()=>J.settings().currency),l=r(()=>s.fieldsFor(n.proposal.spec.source)),u=C(O(a())),d=C(null);function p(e){R(u,e,!0),n.onoutcome?.(e)}function m(e){p({status:`saved`,report:{id:e.id,title:e.title}}),et(t(d),e)}var h=Et(),_=D(h);tt(_,{get proposal(){return n.proposal},get confirm(){return s.save},reportHref:e=>H(Ze(e)),onsaved:m,ondecline:()=>p({status:`declined`}),get outcome(){return t(u)},get fields(){return t(l)},get currency(){return t(c)}}),o(h),T(h,e=>R(d,e),()=>t(d)),g(e,h),i()}var Ot=s(`<span role="status" aria-live="polite"> </span> <progress max="100" aria-label="Speech model download" class="svelte-w5gfst"> </progress>`,1),kt=s(`<span class="error svelte-w5gfst" role="alert"> </span>`),At=s(`<span>The speech model is already on this device. Turn on voice typing to
|
|
2
|
+
talk to the assistant?</span>`),jt=s(`<span> </span>`),Mt=s(`<button type="button">Cancel</button>`),Nt=s(`<button type="button"> </button> <button type="button">Not now</button>`,1),Pt=s(`<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 Ft(e,a){f(a,!0);let s=r(()=>Math.round(a.voice.size/1e6)),l=r(()=>Math.round(a.voice.progress*100)),u=r(()=>a.voice.status===`offer`||a.voice.status===`downloading`||a.voice.status===`error`);var d=_(),p=P(d),m=e=>{var r=Pt(),i=k(D(r),2),u=D(i),d=e=>{var n=Ot(),r=P(n),i=j(r),o=k(r,2),s=j(o);I(()=>{c(i,`${a.voice.cached?`Turning on voice typing`:`Downloading speech model`}
|
|
3
|
+
${t(l)??``}%`),S(o,t(l)),c(s,`${t(l)??``}%`)}),g(e,n)},f=e=>{var t=kt(),n=j(t);I(()=>c(n,`Voice typing could not start: ${a.voice.error??``}`)),g(e,t)},p=e=>{var t=At();g(e,t)},m=e=>{var n=jt(),r=j(n);I(e=>c(r,`Your browser can't do voice typing on its own. Download a ${e??``} speech model to talk to the assistant?`),[()=>Te(t(s))]),g(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)}),o(i);var h=k(i,2),_=D(h),y=e=>{var t=Mt();v(`click`,t,()=>a.voice.cancel()),g(e,t)},b=e=>{var t=Nt(),n=P(t),r=j(n,!0),i=k(n,2);I(()=>c(r,a.voice.status===`error`?`Try again`:a.voice.cached?`Turn on`:`Download`)),v(`click`,n,()=>void a.voice.enable()),v(`click`,i,()=>a.voice.dismiss()),g(e,t)};n(_,e=>{a.voice.status===`downloading`?e(y):e(b,-1)}),o(h),o(r),g(e,r)};n(p,e=>{t(u)&&e(m)}),g(e,d),i()}y([`click`]);var It=s(`<div class="offer svelte-12q53fs" role="group" aria-label="Theme change"><!></div>`),Lt=s(`<p class="offer-note svelte-12q53fs" role="status">Theme restored.</p>`),Rt=s(`<!> <!> <!>`,1),zt=s(`<li><b> </b> </li>`),Bt=s(`<ul class="offer-menu svelte-12q53fs"></ul>`),Vt=s(`<small class="svelte-12q53fs">Replaces your recipes, menu and sample records.</small>`),Ht=s(`<div class="offer svelte-12q53fs" role="group"><div class="offer-text svelte-12q53fs"><strong> </strong> <span class="svelte-12q53fs"> </span> <!></div> <!> <!> <!></div>`),Ut=s(`<p class="offer-note svelte-12q53fs" role="status"> </p>`),Wt=s(`<p class="offer-note svelte-12q53fs" role="alert"> </p>`),Gt=s(`<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
|
+
this browser does not offer it. Try a recent Chrome, Edge or Safari on a
|
|
5
|
+
computer. Nothing else changes: the cards on the Planner page add and
|
|
6
|
+
remove recipes without it.</p></div>`),Kt=s(`<div class="top svelte-12q53fs"><div class="bar svelte-12q53fs"><span class="model-name svelte-12q53fs"> </span> <a class="model-link svelte-12q53fs" aria-label="AI settings: change model or voice" title="AI settings"><svg viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><path d="M4 6h8M15 6h1M4 14h1M8 14h8" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><circle cx="13.5" cy="6" r="1.8" fill="none" stroke="currentColor" stroke-width="1.5"></circle><circle cx="6.5" cy="14" r="1.8" fill="none" stroke="currentColor" stroke-width="1.5"></circle></svg></a></div> <!></div> <div class="dock svelte-12q53fs"><!></div>`,1),qt=s(`<div class="panel svelte-12q53fs" role="status"><h2 class="svelte-12q53fs">Assistant</h2> <p class="svelte-12q53fs">The assistant is not set up.</p> <a>Set up the assistant</a></div>`),Jt=s(`<div class="assistant svelte-12q53fs"><!></div>`);function Yt(e,a){f(a,!0);let s=(e,i=d)=>{var a=_(),s=P(a),c=e=>{let a=r(()=>t(C).themeUndos.undos[i().undoId]);var s=_(),c=P(s),u=e=>{var n=It(),r=D(n);U(r,{variant:`secondary`,onclick:()=>t(C).themeUndos?.undo(t(a).id),children:(e,t)=>{p();var n=l(`Undo theme change`);g(e,n)},$$slots:{default:!0}}),o(n),g(e,n)},d=e=>{var t=Lt();g(e,t)};n(c,e=>{t(a)?.status===`available`?e(u):t(a)?.status===`undone`&&e(d,1)}),g(e,s)},u=r(()=>Ee(i())&&t(C).themeUndos);n(s,e=>{t(u)&&e(c)}),g(e,a)},h=(e,n=d)=>{var r=_(),i=P(r);u(i,17,()=>Array.isArray(n().toolCallData)?n().toolCallData:[n().toolCallData],m,(e,n)=>{var r=Rt(),i=P(r);y(i,()=>t(n));var a=k(i,2);s(a,()=>t(n));var o=k(a,2);v(o,()=>t(n)),g(e,r)}),g(e,r)},v=(e,i=d)=>{let a=r(()=>$e({toolCallData:i()}));var o=_(),s=P(o),c=e=>{{let n=r(()=>i().outcome??null);Dt(e,{get proposal(){return t(a)},get answered(){return t(n)},onoutcome:e=>t(C).transport.recordReportOutcome(t(a).specHash,e)})}};n(s,e=>{t(a)&&e(c)}),g(e,o)},y=(e,i=d)=>{var a=_(),s=P(a),f=e=>{let a=r(()=>t(C).offers.offers[i().offerId]),s=r(()=>t(a)?Xe(t(a).cookbookId):void 0);var d=_(),f=P(d),m=e=>{var i=_(),d=P(i),f=e=>{let i=r(()=>ot(t(s).document));var d=Ht(),f=D(d),m=D(f),h=j(m),_=k(m,2),v=j(_,!0),y=k(_,2),b=e=>{var n=Bt();u(n,21,()=>t(i),e=>e.id,(e,n)=>{var r=zt(),i=D(r),a=j(i,!0),s=k(i);o(r),I(e=>{c(a,t(n).label),c(s,`:
|
|
7
|
+
${e??``}`)},[()=>t(n).entries.map(e=>e.label).join(`, `)]),g(e,r)}),o(n),g(e,n)};n(y,e=>{t(i).length&&e(b)}),o(f);var x=k(f,2);U(x,{onclick:()=>t(C).offers.accept(t(a).id),children:(e,n)=>{p();var r=l();I(()=>c(r,`Add ${t(s).name??``} cookbook`)),g(e,r)},$$slots:{default:!0}});var S=k(x,2);U(S,{variant:`secondary`,onclick:()=>t(C).offers.decline(t(a).id),children:(e,t)=>{p();var n=l(`No thanks`);g(e,n)},$$slots:{default:!0}});var w=k(S,2),T=e=>{var t=Vt();g(e,t)},E=r(()=>ut(J));n(w,e=>{t(E)&&e(T)}),o(d),I(()=>{L(d,`aria-label`,`Add the ${t(s).name??``} cookbook`),c(h,`${t(s).name??``} cookbook`),c(v,t(s).summary)}),g(e,d)},m=e=>{var n=Ut(),r=j(n);I(()=>c(r,`${t(s).name??``} set up.`)),g(e,n)},h=e=>{var n=Wt(),r=j(n,!0);I(()=>c(r,t(a).error)),g(e,n)};n(d,e=>{t(a).status===`pending`?e(f):t(a).status===`applied`?e(m,1):t(a).status===`failed`&&e(h,2)}),g(e,i)};n(f,e=>{t(a)&&t(s)&&e(m)}),g(e,d)},m=r(()=>Ce(i()));n(s,e=>{t(m)&&e(f)}),g(e,a)},S=x(a,`settingsHref`,19,()=>H(`/ai/`)),C=r(()=>K.session),T=r(()=>K.voice),E=r(()=>we(t(C).prefs.modelId)),O=nt(),A=r(()=>t(C).mode===`manual`?`Off`:t(C).mode===`browser`?t(E)?G(t(E)):``:t(C).mode===`host`?`Server`:t(C).remoteLabel);w(()=>{let e=t(C).offers;return e.applier=e=>{let t=st(e,J,We(e.settings));return t.ok?(O.reset?.(),null):t.error},()=>{e.applier=null}}),w(()=>(t(C).reports=Qe(O),()=>{t(C).reports=null}));var M=Jt(),N=D(M),F=e=>{var t=Gt();g(e,t)},ee=e=>{var n=Kt(),i=P(n),s=D(i),l=D(s),u=j(l,!0),d=k(l,2);o(s),Ft(k(s,2),{get voice(){return t(T)}}),o(i);var f=k(i,2),p=D(f);{let e=r(()=>K.handsFreeActive?`hands-free`:`push`);De(p,{get transport(){return t(C).transport},get registry(){return a.registry},contextMode:`server`,conversations:`single`,composerPlaceholder:`I run a bakery…`,get toolCall(){return h},get dictation(){return t(T).dictation},get dictationMode(){return t(e)},get handsFreeCapture(){return Oe},get sendOnPause(){return K.sendOnPauseActive},get speaking(){return K.speaking}})}o(f),I(()=>{c(u,t(A)),L(d,`href`,S())}),b(`input`,f,e=>{Tt(e)&&K.cancelSpeech()},!0),b(`click`,f,e=>{Tt(e)&&K.cancelSpeech()},!0),g(e,n)},te=e=>{var t=qt(),n=k(D(t),4);o(t),I(()=>L(n,`href`,S())),g(e,t)};n(N,e=>{t(C).status===`unsupported`?e(F):t(C).status===`ready`?e(ee,1):e(te,-1)}),o(M),g(e,M),i()}var Xt=s(`<a class="header-link svelte-d0fjw8"><!></a>`);function Zt(e,n){let i=x(n,`current`,3,!1);var a=Xt();let s;var c=D(a);{let e=r(()=>n.path?void 0:n.icon);Ge(c,{get path(){return n.path},get name(){return t(e)},size:18})}o(a),I(()=>{L(a,`href`,n.href),L(a,`aria-label`,n.label),L(a,`title`,n.label),L(a,`aria-current`,i()?`page`:void 0),s=h(a,``,s,{"--smrt-header-icon-link-transition-name":n.transitionName})}),v(`click`,a,function(...e){n.onclick?.apply(this,e)}),g(e,a)}y([`click`]);function Qt(e,n){f(n,!0);let a=W(),o=null,s=!1,c=()=>q.route.id?.startsWith(`/s/`)===!0,l=r(()=>new URL(H(`/`),q.url).pathname);w(()=>{let e=a.editing;if(e===s)return;s=e;let n=q.url.pathname+q.url.search;if(e)q.url.pathname!==t(l)&&!c()&&(o=n,B(H(`/`)));else if(o){let e=o;o=null,B(e)}}),i()}function $t(e,t){return e===void 0?t:typeof e==`function`?e():e}function en(e,t,n,r){for(let i of e){let e=`nav:${i.id??i.href}`;r.has(e)||(r.add(e),n.push({id:e,title:i.label,subtitle:t,keywords:i.description?[i.description]:void 0,icon:i.icon,kind:`navigation`,href:i.href})),i.children?.length&&en(i.children,t??i.label,n,r)}}function tn(e={}){return{id:e.id??`navigation`,label:e.label??`Go to`,order:e.order??10,items(){let t=[],n=new Set;en($t(e.nav,[]),void 0,t,n);for(let r of $t(e.groups,[]))en(r.items,r.heading,t,n);return t}}}var nn=[{id:`cookbooks`,title:`Open Cookbooks`},{id:`recipes`,title:`Open Recipes`},{id:`features`,title:`Browse features`},{id:`layout`,title:`Open Layout`},{id:`settings`,title:`Open Settings`},{id:`export`,title:`Open Export`}];function rn(e){return[{id:`planner-tabs`,label:e.title??`Planner`,order:20,items:()=>nn.map(t=>({id:t.id,title:t.title,kind:`navigation`,href:e.href(t.id)}))},{id:`planner-features`,label:`Add a feature`,order:30,items:()=>e.recipes.filter(t=>!e.isOn(t.id)).map(t=>{let n=at(lt(t))?.label;return{id:t.id,title:`Add ${t.label}`,subtitle:n?`${n}: ${t.summary}`:t.summary,keywords:t.synonyms,kind:`command`,run:({navigate:n})=>(e.add(t.id),n(e.href(`features`)))}})}]}function an(e,t){f(t,!1);let n=W(),r=[tn({nav:()=>n.applied.nav,groups:()=>n.applied.groups}),...rn({recipes:He,isOn:e=>X.has(e),add:e=>X.add(e),href:e=>H(`/?tab=${e}`)})];A(),he(e,{get providers(){return r},navigate:e=>B(e),label:`Search`}),i()}var on=new Set;function sn(e,t){return`planner-brand-${e.slice(1)}${t?`-${t.toLowerCase().replace(/[^a-z0-9]/g,``)}`:``}`}function cn(e){let t=e?.colorScheme??`system`,n=e?.custom,r=e?.fontFamily??n?.fontFamily,i=r?Fe[r]:void 0;if(!n){let n=e?.preset??`glass`;if(!i)return{preset:n,colorScheme:t};let a=`planner-preset-${n}-${r?.toLowerCase().replace(/[^a-z0-9]/g,``)}`;if(!on.has(a)){let e=be(n),t=Object.fromEntries(Object.entries(e.typography).map(([e,t])=>[e,{...t,fontFamily:`var(--smrt-font-family)`}]));ye({...e,id:a,fontFamily:i,typography:t}),on.add(a)}return{preset:a,colorScheme:t}}let a=sn(n.primary,r);return on.has(a)||(ye(Se(n.primary,a,`Brand colour`,{...i?{fontFamily:i}:{}})),on.add(a)),{preset:a,colorScheme:t}}var ln=s(`<span hidden="" data-smrt-planner-anchor=""></span>`);function un(e,n){f(n,!0);let r=xe(),a=x(n,`deferInitial`,3,!1),o=C(!1);F(()=>{if(!a()){R(o,!0);return}let e=setTimeout(()=>{R(o,!0)},0);return()=>clearTimeout(e)});let s=null;w(()=>{if(!J.loaded||!t(o))return;let e=cn(J.theme);n.presetOverride&&(e.preset=n.presetOverride),(s?.preset!==e.preset||s.colorScheme!==e.colorScheme)&&(s=e,r.state.preset!==e.preset&&r.setPreset(e.preset),r.state.colorScheme!==e.colorScheme&&r.setColorScheme(e.colorScheme))}),w(()=>{if(!J.loaded||!t(o))return;let e=J.theme,n={borderRadius:e?.borderRadius??`md`,density:e?.density,contrast:e?.contrast??`auto`},{borderRadius:i,density:a,contrast:s}=r.state.config;(i!==n.borderRadius||a!==n.density||(s??`auto`)!==n.contrast)&&r.updateConfig(n)}),w(()=>{let{preset:e,colorScheme:t}=r.state;if(!s||!J.loaded)return;let n=s;e!==n.preset&&(s={...n,preset:e},J.setTheme({...J.theme,preset:e,fontFamily:J.theme?.fontFamily??J.theme?.custom?.fontFamily,custom:void 0})),t!==n.colorScheme&&(s={...s??n,colorScheme:t},J.setTheme({...J.theme,colorScheme:t}))});let c=C(null);w(()=>{if(typeof document>`u`||!J.loaded)return;let e=J.theme?.customCss;if(!e||gt(location.search)||!vt(e))return;let n=ht(t(c));if(!n)return;let r=_t(e,n);if(!r)return;let i=document.createElement(`style`);return i.dataset.smrtPlannerCustom=``,i.textContent=r,document.head.append(i),()=>i.remove()});var l=ln();T(l,e=>R(c,e),()=>t(c)),g(e,l),i()}var dn=/^[A-Za-z0-9._~-]{1,256}$/;function fn(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!t)return{present:!1,hash:``};let n,r=!1,i=[];for(let e of t.split(`&`)){let t=e.indexOf(`=`);if((t<0?e:e.slice(0,t))!==`kitchen`)i.push(e);else{if(!r&&t>=0){let r=e.slice(t+1);dn.test(r)&&(n=r)}r=!0}}let a=i.filter(e=>e!==``).join(`&`);return{...n?{token:n}:{},present:r,hash:a?`#${a}`:``}}var pn=!1;function mn(e){let n=C(null),r=C(!1),i=C(``),a=C(null),o=C(null),s=C(null),c=C(null),l=``,u=!1,d=e=>JSON.parse(JSON.stringify(e));function f(e){if(u)return;let r=e,o=r?.state?{planId:r.planId,...r.state}:e;if(!o||typeof o.planId!=`string`||!Number.isInteger(o.snapshot?.revision))throw Error(`Kitchen did not return a plan snapshot.`);if(t(n)&&o.planId!==t(n).planId)throw Error(`Kitchen returned a different plan.`);let c=Ie(o.cookbook);if(!c.ok)throw Error(c.error);t(n)&&o.snapshot.revision<t(n).snapshot.revision||t(n)&&o.snapshot.revision===t(n).snapshot.revision||(t(n)&&JSON.stringify(J.snapshot())!==l&&(R(s,t(s)??d(J.snapshot())),R(i,`Kitchen updated the plan while you were editing. Your draft is preserved; dismiss it to keep editing.`)),R(n,{...o,cookbook:d(c.cookbook)}),R(a,null),J.apply(t(n).cookbook),J.loaded=!0,l=JSON.stringify(J.snapshot()))}async function p(){if(!t(c)||t(r)||u)return;R(r,!0),R(i,``);let n=t(o);try{let r=await e(`run_commands`,t(c));if(u)return;if((r?.state||r?.snapshot&&r?.cookbook)&&f(r),!r?.ok)throw R(c,null),R(s,t(s)??(n?d(n):null)),Error(r?.error?.message??`Kitchen rejected this edit. Your draft is preserved below; dismiss it to keep editing.`);R(c,null),t(o)===n&&R(o,null)}catch(e){u||(t(c)||R(s,t(s)??(n?d(n):null)),R(i,e instanceof Error?e.message:String(e),!0))}finally{R(r,!1)}}return{get current(){return t(n)},get busy(){return t(r)},get error(){return t(i)},get pendingPlanId(){return t(a)},get draft(){return t(o)},get preservedDraft(){return t(s)},dismissPreservedDraft(){R(s,null),t(c)||R(i,``)},get retryable(){return t(c)!==null},get locked(){return t(r)||t(c)!==null||t(s)!==null},refresh:f,reportError(e){R(i,e instanceof Error?e.message:String(e),!0)},receive(e){if(u)return;let r=e?.planId;!t(n)&&typeof r==`string`&&R(a,r,!0);try{f(e),!t(c)&&!t(o)&&R(i,``)}catch(e){R(i,e instanceof Error?e.message:String(e),!0)}},async connect(n){try{let r=await e(`get_plan`,{planId:n});if(u)return;f(r),!t(c)&&!t(o)&&R(i,``)}catch(e){u||R(i,String(e),!0)}},retry:p,mount(){if(pn)throw Error(`Only one host-backed Planner may be mounted in this document.`);pn=!0;let e=N(()=>{w(()=>{let e=JSON.stringify(J.snapshot());M(()=>{t(n)&&e!==l&&!u&&(R(o,JSON.parse(e)),J.apply(t(n).cookbook),l=JSON.stringify(J.snapshot()),t(r)||t(c)?R(i,`An edit is already pending. Your additional draft is preserved.`):(R(c,{planId:t(n).planId,id:crypto.randomUUID(),expectedRevision:t(n).snapshot.revision,commands:[{name:`import_cookbook`,input:{document:t(o),replace:!0}}]}),p()))})})});return()=>{u=!0,e(),pn=!1}}}}async function hn(e,t,n){if(n.planId!==e.planId)throw Error(`Preview plan id changed.`);let r=`http://127.0.0.1:${e.port}/plans/${e.planId}`,i=t===`get_plan`?await fetch(r,{cache:`no-store`}):t===`run_commands`?await fetch(`${r}/commands`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}):null;if(!i)throw Error(`Preview tool ${t} is unavailable.`);if(!i.ok)throw Error(`Kitchen preview answered ${i.status}.`);return i.json()}var gn=s(`<p role="alert" class="bridge-error svelte-38390f"> </p>`),_n=s(`<details class="bridge-preserved svelte-38390f"><summary>Preserved edit</summary> <textarea readonly="" aria-label="Preserved cookbook edit" class="svelte-38390f"></textarea> <button type="button">Dismiss preserved edit</button></details>`),vn=s(`<label for="bridge-draft">Preserved cookbook edit</label> <textarea id="bridge-draft" readonly="" class="svelte-38390f"></textarea>`,1),yn=s(`<div class="bridge-backdrop svelte-38390f" aria-hidden="true"></div> <div class="bridge-recovery svelte-38390f" role="dialog" aria-modal="true" aria-labelledby="bridge-recovery-title"><h2 id="bridge-recovery-title" class="svelte-38390f">Kitchen edit needs attention</h2> <p class="svelte-38390f">The app is paused until this edit is retried. The same command will be sent so Kitchen can safely recognize a previous success.</p> <!> <button type="button">Retry same edit</button></div>`,1),bn=s(`<!> <!> <!>`,1);function xn(e,t){f(t,!0);let r=mn((e,n)=>hn(t.binding,e,n));w(()=>(t.onlock?.(r.locked),()=>t.onlock?.(!1))),F(()=>{let e=r.mount();r.connect(t.binding.planId);let n=setInterval(()=>{!r.busy&&!r.retryable&&document.visibilityState===`visible`&&r.connect(t.binding.planId)},1500);return()=>{clearInterval(n),e()}});var a=bn(),s=P(a),l=e=>{var t=gn(),n=j(t);I(()=>c(n,`Kitchen live preview: ${r.error??``}`)),g(e,t)};n(s,e=>{r.error&&e(l)});var u=k(s,2),d=e=>{var t=_n(),n=k(D(t),2);z(n);var i=k(n,2);o(t),I(e=>S(n,e),[()=>JSON.stringify(r.preservedDraft,null,2)]),v(`click`,i,()=>r.dismissPreservedDraft()),g(e,t)};n(u,e=>{r.preservedDraft&&!r.retryable&&e(d)});var p=k(u,2),m=e=>{var t=yn(),i=k(P(t),2),a=k(D(i),4),s=e=>{var t=vn(),n=k(P(t),2);z(n),I(e=>S(n,e),[()=>JSON.stringify(r.draft,null,2)]),g(e,t)};n(a,e=>{r.draft&&e(s)});var c=k(a,2);o(i),I(()=>c.disabled=r.busy),v(`click`,c,()=>r.retry()),g(e,t)};n(p,e=>{r.retryable&&e(m)}),g(e,a),i()}y([`click`]);var Sn=`M4 9.5a3.5 3.5 0 1 1 7 0a3.5 3.5 0 1 1-7 0zM13 9.5a3.5 3.5 0 1 1 7 0a3.5 3.5 0 1 1-7 0zM8 7a4 4 0 1 1 8 0a4 4 0 1 1-8 0zM6 9.5h12V15H6zM7 16.5h10a1 1 0 0 1 1 1V19a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-1.5a1 1 0 0 1 1-1z`,Cn=`download`,wn={left:!0},Tn={left:{initial:`expanded`},right:{initial:`collapsed`,rail:!1},bottom:{initial:`hidden`}};function En(e,t){return{tool:`assistant`,label:`Assistant`,labelNotReady:`Set up the assistant`,href:e,ready:t}}var Dn={id:`visitor`,slug:null,created_at:null,updated_at:null,profileId:`visitor`,email:``,status:`active`,lastLoginAt:null,name:`You`};function On(){return{edgeToggles:wn,config:Tn,hotkeys:!1,user:Dn,phoneTabBar:!0,phoneDock:`sheet`}}var kn=e=>{wt(e,{})},An=e=>{an(e,{})},jn=e=>{{let n=r(()=>H(`/`)),i=r(()=>q.route.id===`/`&&Z.active!==`export`);Zt(e,{get href(){return t(n)},label:`Plan the app`,get path(){return Sn},get current(){return t(i)},transitionName:`planner-customize`})}},Mn=e=>{{let n=r(()=>H(`/?tab=export`)),i=r(()=>q.route.id===`/`&&Z.active===`export`);Zt(e,{get href(){return t(n)},label:`Export the app`,get icon(){return Cn},get current(){return t(i)},transitionName:`planner-export`})}},Nn=s(`<p class="storage-notice svelte-12qhfyh" role="status">This browser is not saving your cookbook, so it is kept in memory only. Export it from the Planner's Export tab to keep a copy.</p>`),Pn=s(`<p class="storage-notice svelte-12qhfyh" role="status"> </p>`),Fn=s(`<p class="storage-notice svelte-12qhfyh" role="status"> <button type="button">Remove them</button></p>`),In=s(`<!> <!> <!> <!> <!> <!>`,1),Ln=s(`<!> <div class="shell-host svelte-12qhfyh"><!></div>`,1);function Rn(e,s){f(s,!0),Je.load();let l=r(pt),u=rt(ft());le(oe),qe.onReplaced=()=>u.reset?.(),qe.openSection=e=>{B(H($(e)))},qe.openPath=e=>B(H(e));let p=Ye.map(e=>e.id),m=()=>Z.active===`cookbooks`?Q.open:null;Q.navigator={open(e){let t=ct(pe(V(),`cookbooks`),e);re(`${location.pathname}${t}${location.hash}`,{...q.state,cookbook:e}),Q.set(e)},close(){q.state.cookbook?history.back():Q.set(null)}};function h(){let e=location.pathname.replace(/\/$/,``)===oe.replace(/\/$/,``);Q.set(e?dt(location.search,p):null,e)}let _=[],y=On(),x=r(()=>{let e=X.ids.flatMap(e=>{let t=He.find(t=>t.id===e);return t?[t]:[]});return Ve(e).flatMap(e=>{let t=new Set,n=[];for(let r of e.recipes){let e=H(`/recipes/${ze(r)}/`),i=`${r.group?.label??r.label} options`,a=!0;for(let o of Ke(r)){let r=Re(o.packageId,o.model.name,o.key);t.has(r)||(t.add(r),n.push({id:r,href:H(Ue(o)),label:o.label,icon:o.icon,description:o.description,...a?{action:{href:e,label:i,visibility:`active`}}:{}}),a=!1)}}if(n.length===0)return[];let r=`section:${e.id}`;return[{id:r,heading:e.label,icon:e.icon,href:H($(r)),items:n}]})}),S=r(()=>{let e=X.ids.flatMap(e=>{let t=He.find(t=>t.id===e);return t?[t]:[]}),t=new Map;for(let n of Ve(e)){let e=[];for(let t of n.recipes){let n=ze(t);e.some(e=>e.id===n)||e.push({id:n,label:t.group?.label??t.label})}t.set(`section:${n.id}`,e)}return t}),T=r(()=>{let e=Be(X.features).map(e=>({id:e.id,href:H(`/m/${e.packageId}/${e.modelName}/`),label:e.label,icon:e.icon,description:e.description}));return e.length?[{id:`section:${Y.id}`,heading:Y.label,icon:Y.icon,href:H($(`section:${Y.id}`)),items:e}]:[]}),O=r(()=>se.ids.flatMap(e=>{let t=fe(e);return t?[{id:`package:${t.id}`,heading:de(t.id),icon:`layers`,href:H(`/packages/${t.id}/`),items:[{id:`package:${t.id}:overview`,href:H(`/packages/${t.id}/`),label:`Overview`},...me(t).map(e=>({id:`package:${t.id}:${e.name}`,href:H(`/m/${t.id}/${e.name}/`),label:e.name}))]}]:[]})),A=r(()=>[...t(x),...t(T),...t(O)]),M=!1,N=!1,F=C(null),L=C(!1),z={present:!1,hash:``},U=()=>q.route.id===`/`;function he(e){let{package:t,model:n}=q.params,r=t&&n?ce(t,n):void 0,i=r?Pe(Ne(location.search,r)):``;return i?e?`${e}&${i}`:`?${i}`:e}function W(){if(J.keepLegacyUrl)return;let e=U()?ct(pe(V(),Z.active),m()):he(V());location.search!==e&&ne(`${location.pathname}${e}${location.hash}`,q.state)}ae(e=>{if(!N){N=!0,R(F,null,!0),t(F)?(J.hostManaged=!0,J.loaded=!0):J.hydrate(location.search),K.awaitConfig(),K.hydrate(!!(t(F)||X.ids.length||X.features.length)),z=fn(location.hash);let e=z.token;je(oe).then(t=>{K.configure(t),it.configure(t.kitchen,e)})}ue(location.search)&&se.fromSearch(location.search),U()&&(Z.fromSearch(location.search),Q.set(dt(location.search,p),!1));let n=async()=>{if(z.present){let e=`${location.pathname}${location.search}${z.hash}`;z={present:!1,hash:z.hash};try{await B(e,{replaceState:!0,noScroll:!0,keepFocus:!0})}catch{history.replaceState({...history.state,"sveltekit:pageurl":new URL(e,location.href).href},``,e)}}M=!0,W()};e.type===`enter`?queueMicrotask(n):n()}),ie(ge()),w(()=>{V(),J.keepLegacyUrl,Z.active,Q.open,q.route.id,M&&W()}),w(()=>{JSON.stringify(J.snapshot()),t(F)||J.scheduleSave()});function ye(){document.visibilityState===`hidden`&&!t(F)&&J.flush()}var be=Ln();b(`pagehide`,E,()=>!t(F)&&J.flush()),b(`popstate`,E,h),b(`visibilitychange`,te,ye);var xe=P(be),Se=e=>{xn(e,{get binding(){return t(F)},onlock:e=>R(L,e,!0)})};n(xe,e=>{t(F)&&e(Se)});var G=k(xe,2),Ce=D(G);{let e=(e,n)=>{let i=()=>(n?.()).sectionId,a=()=>(n?.()).label;{let n=r(()=>t(S).get(i())??[]);mt(e,{get label(){return a()},get groups(){return t(n)}})}},i=(e,t=d)=>{ve(e,{id:`assistant`,label:`Assistant`,render:e=>{Yt(e,{get registry(){return t()}})},$$slots:{render:!0}})},u=r(()=>H(`/`)),f=r(()=>q.url.pathname+V()),p=r(()=>J.layout??null),m=r(()=>[{id:`ai-status`,label:`AI status`,slot:`leftSidebar.footer`,render:kn},{id:`palette`,label:`Search`,slot:`header.center`,render:An},{id:`planner-customize`,label:`Plan the app`,slot:`header.end`,render:jn},{id:`planner-export`,label:`Export the app`,slot:`header.end`,render:Mn}]),h=r(()=>[En(H(`/ai/`),K.assistantReady)]),b=r(()=>J.theme?.borderRadius),x=r(()=>J.theme?.density),C=r(()=>J.theme?.contrast);_e(Ce,ee({get storageKey(){return Le},get title(){return t(l)},get logoSrc(){return xt},get homeHref(){return t(u)},get nav(){return _},get navGroups(){return t(A)},get currentHref(){return t(f)},environment:`static demo`,get layout(){return t(p)},onlayoutchange:e=>J.setLayout(e),get slotItems(){return t(m)},get dockToggles(){return t(h)},get borderRadius(){return t(b)},get density(){return t(x)},get contrast(){return t(C)}},()=>y,{layoutEditing:{slot:`header.start`},navMode:`sections-with-items`,sectionHref:e=>H($(e)),sectionActions:e,dock:i,children:(e,t)=>{var r=In(),i=P(r),l=e=>{var t=Nn();g(e,t)};n(i,e=>{J.persist===`memory`&&e(l)});var u=k(i,2),d=e=>{var t=Pn(),n=j(t,!0);I(()=>c(n,J.loadNotice)),g(e,t)};n(u,e=>{J.loadNotice&&e(d)});var f=k(u,2),p=e=>{var t=Fn(),n=D(t),r=k(n);o(t),I(()=>c(n,`${J.unavailableNotice??``} `)),v(`click`,r,()=>J.removeUnavailable()),g(e,t)};n(f,e=>{J.unavailableNotice&&e(p)});var m=k(f,2);Qt(m,{});var h=k(m,2);un(h,{});var _=k(h,2);a(_,()=>s.children),g(e,r)},$$slots:{sectionActions:!0,dock:!0,default:!0}}))}o(G),I(()=>G.inert=t(L)),g(e,be),i()}y([`click`]);export{Rn as component,yt as universal};
|
|
@@ -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/TcjpRcdI.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 d,Ot as f,Pt as p,U as m,X as h,Y as g,_,at as v,bt as y,ft as b,ht as x,mt as S,p as C,pt as w,st as T,ut as E,v as D,vt as O}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{a as k,ht as ee,lt as A,mt as j,p as M,t as N,ut 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 d,Ot as f,Pt as p,U as m,X as h,Y as g,_,at as v,bt as y,ft as b,ht as x,mt as S,p as C,pt as w,st as T,ut as E,v as D,vt as O}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{a as k,ht as ee,lt as A,mt as j,p as M,t as N,ut as P}from"../chunks/D3lXu_rt.js";import{p as F}from"../chunks/DIE02RSm.js";import{i as I}from"../chunks/CsaWd8kG.js";import{t as L}from"../chunks/CYhwv6d2.js";var R=s(`<p class="svelte-disfw2">Nothing selected yet. Choose a package below.</p>`),z=s(`<li><a class="svelte-disfw2"> </a></li>`),B=s(`<ul class="chips svelte-disfw2"></ul> <button type="button" class="secondary svelte-disfw2">Clear selection</button>`,1),te=s(`<p class="meta svelte-disfw2"> </p>`),ne=s(`<li><h3 class="svelte-disfw2"><a> </a></h3> <p class="description svelte-disfw2"> </p> <p class="meta svelte-disfw2"><!></p> <!> <!></li>`),re=s(`<li class="none svelte-disfw2"> </li>`),ie=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 V(s,g){f(g,!0);let V=y(``),H=y(``),U=r(()=>j(A.packages,e(V)));function ae(e){let t=new Set(k.ids),n=t.has(e);k.toggle(e);let r=k.ids.filter(n=>!t.has(n)&&n!==e);O(H,n?`Removed ${M(e)}.`:r.length?`Added ${M(e)} and the packages it needs: ${r.map(M).join(`, `)}.`:`Added ${M(e)}.`,!0)}var W=ie();t(`disfw2`,e=>{v(()=>{E.title=`All packages · smrt planner`})});var G=b(W),K=b(G),oe=b(K);p(),o(K),p(4),o(G);var q=x(G,2),J=x(b(q),2),se=e=>{var t=R();m(e,t)},ce=e=>{var t=B(),n=w(t);u(n,20,()=>k.ids,e=>e,(e,t)=>{var n=z(),r=b(n),i=S(r,!0);o(n),T((e,t)=>{D(r,`href`,e),c(i,t)},[()=>N(`/packages/${t}/`),()=>M(t)]),m(e,n)}),o(n);var r=x(n,2);h(`click`,r,()=>k.clear()),m(e,t)};n(J,e=>{k.ids.length===0?e(se):e(ce,-1)});var le=x(J,2),ue=S(le,!0);o(q);var Y=x(q,2),X=b(Y),de=x(b(X)),fe=S(de);o(X);var Z=x(X,2),Q=x(b(Z),2);_(Q),o(Z);var $=x(Z,2);u($,29,()=>e(U),e=>e.id,(t,i)=>{let s=r(()=>k.has(e(i).id)),u=r(()=>k.requiredBy(e(i).id));var f=ne();let p;var h=b(f),g=b(h),_=S(g,!0);o(h);var v=x(h,2),y=S(v,!0),C=x(v,2),w=b(C),E=t=>{var n=l();T((e,t)=>c(n,`${e??``} models · ${t??``} generated surfaces`),[()=>P(e(i)).length,()=>ee(e(i))]),m(t,n)},O=r(()=>P(e(i)).length),A=t=>{var n=l();T(()=>c(n,`${e(i).models.length??``} internal models · closed: no generated surfaces`)),m(t,n)};n(w,t=>{e(O)?t(E):t(A,-1)}),o(C);var j=x(C,2),R=t=>{var n=te(),r=S(n);T(e=>c(r,`Needs: ${e??``}`),[()=>e(i).dependencies.map(M).join(`, `)]),m(t,n)};n(j,t=>{e(i).dependencies.length&&t(R)});var z=x(j,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`);I(z,{get checked(){return e(s)},get disabled(){return e(t)},onchange:()=>ae(e(i).id),get"aria-label"(){return e(n)},get label(){return e(a)}})}o(f),T((t,n)=>{p=a(f,1,`svelte-disfw2`,null,p,{selected:e(s)}),D(g,`href`,t),c(_,n),c(y,e(i).description)},[()=>N(`/packages/${e(i).id}/`),()=>M(e(i).id)]),d(f,()=>F,()=>({duration:L(`medium2`,300)})),m(t,f)},t=>{var n=re(),r=S(n);T(()=>c(r,`No packages match "${e(V)??``}".`)),m(t,n)}),o($),o(Y),o(W),T(t=>{D(oe,`href`,t),c(ue,e(H)),c(fe,`${e(U).length??``} of ${A.packages.length??``}`)},[()=>N(`/`)]),C(Q,()=>e(V),e=>O(V,e)),m(s,W),i()}g([`click`]);export{V 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{lt as S,p as C,pt as w,t as T,ut 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{lt as S,p as C,pt as w,t as T,ut as E}from"../chunks/D3lXu_rt.js";import{t as D}from"../chunks/DRByVC-c.js";import{t as O}from"../chunks/DwIRC3h5.js";var k=e({entries:()=>A,load:()=>j}),A=()=>S.packages.map(e=>({id:e.id})),j=({params:e})=>(w(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(()=>w(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),w=_(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)},[()=>T(`/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,()=>E(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`)},[()=>T(`/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(w,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/D3lXu_rt.js";import{n as N}from"../chunks/DF-0MxNw.js";import{i as P}from"../chunks/CsaWd8kG.js";import{A as te,C as F,D as I,E as ne,H as L,O as re,S as R,T as ie,_ as ae,f as z,g as B,k as V,p as H,t as U,v as W,w as G,y as K}from"../chunks/lUJaueNM.js";import{t as q}from"../chunks/B2uXaQfZ.js";import{t as J}from"../chunks/DRByVC-c.js";import{n as Y}from"../chunks/D8MqcCKq.js";var X=e({entries:()=>Z,load:()=>Q}),Z=()=>R.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 ie(n.model,n.hints,U.rows,U.narrowed[n.model.id]??[])}let w=b(S(_())),k=b(``),ee=i(()=>ne(n.model,n.hints)),M=i(()=>V(n.model,n.hints)),L=i(()=>Object.entries(n.hints?.fields??{}).filter(([,e])=>e.visibility===`hidden`).map(([e])=>e));function R(e){e.preventDefault(),U.save(n.model.id,te(n.model,n.hints,t(w)),re(n.model,n.hints,t(w))),j(k,`Options saved. The views below use them.`)}function ae(){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(()=>I(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,R),g(`click`,ue,ae),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(()=>ae(n.recipe)),b=e=>z(e)?.label??e,S=e=>{let t=z(e);return M(`/recipes/${t?L(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),re=C(I);s(F);var R=C(F,2),ie=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(ie)});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(re,` · 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/D3lXu_rt.js";import{S as k,_ as A,h as j,p as M,t as N}from"../chunks/lUJaueNM.js";import{t as P}from"../chunks/B2uXaQfZ.js";import{t as F}from"../chunks/DRByVC-c.js";import{t as I}from"../chunks/JBD5vUbP.js";import{t as L}from"../chunks/DwIRC3h5.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};
|
|
@@ -0,0 +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,F as o,Ft as s,G as c,H as l,J as u,Lt as d,Ot as f,U as p,W as m,X as h,Y as g,a as _,bt as v,ct as y,ft as b,gt as x,ht as S,it as C,mt as w,n as T,nt as E,pt as D,st as O,ut as k,v as A,vt as j,z as ee}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{_ as M,dt as te,g as N,p as P,t as F,v as ne}from"../chunks/D3lXu_rt.js";import{d as I}from"../chunks/BeL8dJx9.js";import"../chunks/BQLQsso4.js";import{s as L,u as R}from"../chunks/DIE02RSm.js";import{t as z}from"../chunks/TcjpRcdI.js";import{M as B,P as V,R as H,k as U}from"../chunks/DmHVTNcC.js";import{A as re,C as W,S as ie,b as ae,n as G,x as K}from"../chunks/Cwz7QFS4.js";import{B as q,H as oe,N as se,R as J,_ as ce,b as Y,g as X,j as Z,t as Q,v as $,x as le}from"../chunks/lUJaueNM.js";import{n as ue}from"../chunks/FeyhlLIZ.js";import{r as de}from"../chunks/D_U_DYjx.js";import{t as fe}from"../chunks/B2uXaQfZ.js";import{t as pe}from"../chunks/Bhd-3niN.js";import{r as me,t as he}from"../chunks/CgAkqYsL.js";import{t as ge}from"../chunks/D71UrO5c.js";var _e=8e3,ve=262144,ye=class extends Error{};function be(e,t,n){let r=new AbortController,i=()=>r.abort();n?.addEventListener(`abort`,i,{once:!0}),n?.aborted&&r.abort();let a,o=new Promise((e,n)=>{a=setTimeout(()=>{r.abort(),n(new ye(`widget load timed out`))},t)});return Promise.race([Promise.resolve().then(()=>e(r.signal)),o]).finally(()=>{a!==void 0&&clearTimeout(a),n?.removeEventListener(`abort`,i)})}function xe(e,t){if(e===void 0)return!0;try{let n=JSON.stringify(e);return n!==void 0&&n.length<=t}catch{return!1}}async function Se(e,t,n,r,i={}){let a=H(e,{registry:n,definition:t}),o=i.timeoutMs??_e,s=i.maxDataLength??ve,c=await Promise.all(a.document.widgets.map(async e=>{let a=n.get(e.type),c={...e,status:`ready`};if(!a?.load)return c;let l=t=>({...e,status:`error`,error:{code:t}});try{let n=await be(n=>a.load?.(e.options,{...r,overviewId:t.id,signal:n}),o,r.signal);return xe(n,s)?n===void 0?c:{...c,data:n}:l(`invalid_data`)}catch(t){return i.onError?.({id:e.id,type:e.type},t),l(t instanceof ye?`timeout`:`load_failed`)}}));return{overviewId:t.id,widgets:c,issues:a.issues}}var Ce=e({entries:()=>we,load:()=>Te}),we=()=>{let e=[...J(Y).map(e=>`section:${e.id}`),`section:${Z.id}`,...ue.flatMap(e=>(e.document.layout?.customSections??[]).map(e=>e.id))];return[...new Set(e)].map(e=>({section:me(e)}))},Te=({params:e})=>({sectionId:he(e.section)});function Ee(e,t){let n=e.flatMap(e=>$(e)),r=new Map;for(let e of n){let t=q(e.packageId,e.model.name,e.key);if(r.has(t))continue;let i=W(e.model.id,e.key,n);r.set(t,{id:t,model:e.model,path:X(e),...e.noun?{noun:e.noun}:{},...i?{scope:i}:{}})}for(let e of se(t)){if(r.has(e.id))continue;let t=te(e.packageId,e.modelName);t&&r.set(e.id,{id:e.id,model:t,path:X({packageId:e.packageId,model:t})})}return r}function De(e,t){let n=new Set(e),r=[];for(let e of t){let t=$(e).some(e=>n.has(q(e.packageId,e.model.name,e.key))),i=oe(e);t&&!r.some(e=>e.id===i)&&r.push({id:i,label:e.group?.label??e.label})}return r}var Oe=new Map(J(Y).map(e=>[e.id,e])),ke=new Map(ue.flatMap(e=>Object.entries(e.sectionDescriptions??{})));function Ae(e){if(e===`section:${Z.id}`)return{icon:Z.icon,description:Z.description};if(e.startsWith(`section:`)){let t=Oe.get(e.slice(8));if(!t)return{};let n=t.recipes.find(e=>e.group?.summary)?.group?.summary;return{icon:t.icon,description:t.description??n}}let t=ke.get(e);return t?{description:t}:{}}function je(e,t=`Planner`){return e?.trim()||t}function Me(e,t){let n=new Set,r=[],i=(e,t)=>{n.has(e)||(n.add(e),r.push({value:e,label:M(P(t))}))};for(let t of e)for(let{model:e}of ce(t))i(e.id,e.name);for(let e of t.values())i(e.model.id,e.model.name);return r}var Ne=c(`<p class="svelte-2penap"> </p>`),Pe=c(`<header class="section-heading svelte-2penap"><span class="mark svelte-2penap"><!></span> <div class="heading svelte-2penap"><h1 class="svelte-2penap"> </h1> <!></div> <!></header>`);function Fe(e,t){var n=Pe(),i=b(n),a=b(i);L(a,{get name(){return t.icon},size:28}),s(i);var c=S(i,2),u=b(c),f=w(u,!0),m=S(u,2),h=e=>{var n=Ne(),r=w(n,!0);O(()=>l(r,t.description)),p(e,n)};r(m,e=>{t.description&&e(h)}),s(c);var g=S(c,2);o(g,()=>t.actions??d),s(n),O(()=>l(f,t.title)),p(e,n)}async function Ie(e,t,n,r){let i=(await Se({widgets:[n]},e,K,{...t,signal:r,locale:`en-US`})).widgets[0];if(!i||i.status===`error`)throw Error(i?.error?.code??`load_failed`);return i.data}function Le(e,t,n){let r=e.id;return B({definition:e,registry:K,override:()=>t.overview(r),onchange:e=>t.setOverview(r,e),...n?{loadWidget:(t,r)=>Ie(e,n(),t,r)}:{}})}var Re=(e,t=d,n=d)=>{var r=ze(),i=w(r,!0);O(()=>l(i,n())),p(e,r)},ze=c(`<span class="section-heading svelte-1qn3h3g"> </span>`);function Be(e,n){f(n,!0);let i=_(n,`presentation`,3,`plain`),o=_(n,`href`,3,F),s=R(),c=de(),l=Le(E(()=>n.definition),G,()=>({source:c,sections:s.sections,entryIndex:n.entries,href:o()})),u=v(void 0);y(()=>{let e=l.document.widgets.map(e=>e.type),t=!0;return V(e,K).then(e=>{t&&j(u,e,!0)}),()=>{t=!1}});function d(){for(let e of l.document.widgets)l.reload(e.id)}let h=!0;y(()=>{JSON.stringify(s.sections),n.entries,h?h=!1:E(d)}),y(()=>c.onReset?.(()=>d())),T(()=>l.destroy());var g=m(),b=D(g),x=e=>{U(e,{get controller(){return l},get models(){return n.models},get label(){return n.label},get presentation(){return i()},get heading(){return Re},get components(){return t(u)}})};r(b,e=>{t(u)&&e(x)}),p(e,g),a()}var Ve=c(`<section class="entries svelte-1jqhb2e" aria-labelledby="section-entries"><h2 id="section-entries" class="svelte-1jqhb2e">Menu entries</h2> <!></section>`),He=c(`<!> <!>`,1),Ue=c(`<h1>Section not found</h1> <p>This section is not in your app. <a>Back to the Planner</a></p>`,1),We=c(`<main class="section-view svelte-1jqhb2e"><!></main>`);function Ge(e,n){f(n,!0);let c=(e,n=d)=>{var a=m(),o=D(a),s=e=>{var r=u();O(e=>l(r,e),[()=>ne(t(V).get(n().id)??0)]),p(e,r)},c=i(()=>t(V).has(n().id));r(o,e=>{t(c)&&e(s)}),p(e,a)},h=_(n,`href`,3,F),g=R(),C=de(),w=re(),T=i(()=>g.sections.find(e=>e.id===n.sectionId)),E=i(()=>w?.shell.sections.find(e=>e.id===n.sectionId)),k=i(()=>je(t(T)?.heading||t(E)?.label)),M=i(()=>t(T)?.icon??t(E)?.icon??`folder`),te=i(()=>Ae(n.sectionId).description??t(E)?.description),N=i(()=>t(T)?.items.map(e=>e.id)??[]),P=i(()=>Q.ids.flatMap(e=>{let t=le.get(e);return t?[t]:[]})),L=i(()=>Ee(t(P),Q.features)),z=i(()=>ae(n.sectionId)),B=i(()=>Me(t(P),t(L))),V=v(x(new Map)),H=0;async function U(){let e=++H,n=new Map;await Promise.all(t(N).map(async e=>{let r=t(L).get(e);if(!r)return;let i=await C.list(r.model);n.set(e,i.filter(e=>ie(r.scope,e)).length)})),e===H&&j(V,n,!0)}y(()=>{t(N),t(L),U()}),y(()=>C.onReset?.(()=>void U()));var W=m(),K=D(W),q=e=>{var a=We(),l=b(a),u=e=>{var a=He(),l=D(a);Fe(l,{get icon(){return t(M)},get title(){return t(k)},get description(){return t(te)},actions:e=>{var r=m(),i=D(r);o(i,()=>n.headerActions??d,()=>({title:t(k),itemIds:t(N)})),p(e,r)},$$slots:{actions:!0}});var u=S(l,2),f=e=>{var a=He(),o=D(a);ee(o,()=>n.sectionId,e=>{{let n=i(()=>`${t(k)} overview`);Be(e,{get definition(){return t(z)},get entries(){return t(L)},get models(){return t(B)},get href(){return h()},get label(){return t(n)}})}});var l=S(o,2),u=e=>{var t=Ve(),r=S(b(t),2);I(r,{get sectionId(){return n.sectionId},get meta(){return c}}),s(t),p(e,t)};r(l,e=>{g.editing&&e(u)}),p(e,a)},_=e=>{I(e,{get sectionId(){return n.sectionId},layout:`cards`,get meta(){return c},get actions(){return n.menuActions}})};r(u,e=>{t(z)?e(f):e(_,-1)}),p(e,a)},f=e=>{var t=Ue(),n=S(D(t),2),r=S(b(n));s(n),O(e=>A(r,`href`,e),[()=>h()(`/`)]),p(e,t)};r(l,e=>{t(T)?e(u):e(f,-1)}),s(a),p(e,a)};r(K,e=>{G.loaded&&e(q)}),p(e,W),a()}var Ke=c(`<a class="new svelte-sp05yg"> </a>`);function qe(e,o){f(o,!0);let s=(e,n)=>{let a=()=>(n?.()).title,o=()=>(n?.()).itemIds,s=i(()=>De(o(),t(_)));var c=m(),l=D(c),u=e=>{fe(e,{get section(){return t(s)[0].id},get label(){return t(s)[0].label}})},d=e=>{pe(e,{get label(){return a()},get groups(){return t(s)}})};r(l,e=>{t(s).length===1?e(u):t(s).length>1&&e(d,1)}),p(e,c)},c=(e,n=d)=>{let a=i(()=>y(n()));var o=m(),s=D(o),c=e=>{var r=Ke(),i=w(r);O(()=>{A(r,`href`,n().href),l(i,`New ${t(a)??``}`)}),h(`click`,r,()=>b(n())),p(e,r)};r(s,e=>{t(a)&&e(c)}),p(e,o)},u=R(),g=i(()=>je(u.sections.find(e=>e.id===o.sectionId)?.heading)),_=i(()=>Q.ids.flatMap(e=>{let t=le.get(e);return t?[t]:[]})),v=i(()=>Ee(t(_),Q.features)),y=e=>{let n=t(v).get(e.id);return n?N(e.label,n.noun):void 0};function b(e){ge(new URL(e.href,z.url).pathname)}n(`sp05yg`,e=>{C(()=>{k.title=`${t(g)??``} · smrt planner`})}),Ge(e,{get sectionId(){return o.sectionId},get headerActions(){return s},get menuActions(){return c}}),a()}g([`click`]);function Je(e,t){f(t,!0),qe(e,{get sectionId(){return t.data.sectionId}}),a()}export{Je as component,Ce as universal};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,K as d,L as f,M as p,Mt as m,Ot as h,Pt as g,S as _,T as v,U as y,W as b,X as x,Y as S,Z as C,_ as w,a as T,b as E,bt as D,ct as O,d as k,dt as A,ft as j,gt as M,ht as N,it as P,lt as F,mt as I,nt as L,pt as R,r as z,st as B,tt as V,ut as H,v as U,vt as W}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{i as ee,o as G}from"../chunks/Bv5jGtB8.js";import{a as K}from"../chunks/YUSKx8_q.js";import{$ as te,Ct as ne,Q as re,St as ie,et as ae,i as oe,lt as se,p as q,t as ce,xt as le}from"../chunks/D3lXu_rt.js";import{n as ue}from"../chunks/DK8Blf1Y.js";import{a as de,m as fe,w as pe}from"../chunks/BeL8dJx9.js";import{n as me}from"../chunks/DF-0MxNw.js";import{t as he}from"../chunks/BQLQsso4.js";import{p as ge,u as _e}from"../chunks/DIE02RSm.js";import{f as ve,g as ye,o as be,p as xe}from"../chunks/DfN2k_EX.js";import{r as Se}from"../chunks/CUyVrfsu.js";import{a as Ce,b as we,i as J,n as Te,p as Ee,t as De,x as Y,y as X}from"../chunks/CsaWd8kG.js";import{a as Oe,d as ke,f as Ae,g as je,h as Me,i as Ne,m as Pe,o as Fe,p as Ie,u as Le,x as Re,y as ze}from"../chunks/C6AANt9H.js";import"../chunks/DmHVTNcC.js";import{_ as Be,a as Ve,m as He,n as Z,s as Ue}from"../chunks/Cwz7QFS4.js";import{F as We,I as Ge,L as Ke,M as qe,P as Je,Q as Ye,R as Xe,b as Ze,d as Qe,j as $e,s as et,t as Q,tt,u as nt,x as rt}from"../chunks/lUJaueNM.js";import{S as it,g as at,h as ot,m as st,v as ct}from"../chunks/CdKHckEF.js";import{n as lt,r as ut,t as dt}from"../chunks/FeyhlLIZ.js";import{n as ft,r as pt,t as mt}from"../chunks/D_U_DYjx.js";import{a as $,c as ht,d as gt,f as _t,l as vt,m as yt,o as bt,p as xt,r as St,s as Ct,t as wt,u as Tt}from"../chunks/Vt9hDpHd.js";import{r as Et}from"../chunks/BMgzWMdF.js";import{t as Dt}from"../chunks/BdOPgmQ_.js";import{n as Ot,s as kt,t as At}from"../chunks/Db12RzZi.js";import{t as jt}from"../chunks/CYhwv6d2.js";var Mt={bread:[`M7 3h10a4 4 0 0 1 2.4 7.2L20 19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2l.6-8.8A4 4 0 0 1 7 3z`,`M9 13l1 3`,`M14 13l1 3`],car:[`M5 17a2 2 0 1 0 4 0a2 2 0 1 0-4 0`,`M15 17a2 2 0 1 0 4 0a2 2 0 1 0-4 0`,`M5 17h-2v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0h-6m-6-6h15m-6 0v-5`],flame:[`M12 12c2-2.96 0-7-1-8 0 3.038-1.773 4.741-3 6-1.226 1.26-2 3.24-2 5a6 6 0 1 0 12 0c0-1.532-1.056-3.94-2-5-1.786 3-2.791 3-4 2z`],yoga:[`M11 4a1 1 0 1 0 2 0a1 1 0 1 0-2 0`,`M4 20h4l1.5-3`,`M17 20l-1-5h-5l1-7`,`M4 10l4-1l4-1l4 1.5l4 1.5`],leaf:[`M5 21c.5-4.5 2.5-8 7-10`,`M9 18c6.218 0 10.5-3.288 11-12v-2h-4.014c-9 0-11.986 4-12 9c0 1 0 3 2 5h3z`],scissors:[`M6 7m-3 0a3 3 0 1 0 6 0a3 3 0 1 0-6 0`,`M6 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0-6 0`,`M8.6 8.6l10.4 10.4`,`M8.6 15.4l10.4-10.4`],coffee:[`M3 14c.83.642 2.077 1.017 3.5 1c1.423.017 2.67-.358 3.5-1c.83-.642 2.077-1.017 3.5-1c1.423-.017 2.67.358 3.5 1`,`M8 3a2.4 2.4 0 0 0-1 2a2.4 2.4 0 0 0 1 2`,`M12 3a2.4 2.4 0 0 0-1 2a2.4 2.4 0 0 0 1 2`,`M3 10h14v5a6 6 0 0 1-6 6h-2a6 6 0 0 1-6-6v-5z`,`M16.746 16.726a3 3 0 1 0 .252-5.555`],forklift:[`M5 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0`,`M13 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0`,`M7 17h4`,`M3 17v-6h13v6`,`M5 11v-4h4`,`M9 11v-6h4l3 6`,`M22 15h-3v-10`,`M16 13h3`],heart:[`M19.5 12.572l-7.5 7.428l-7.5-7.428a5 5 0 1 1 7.5-6.566a5 5 0 1 1 7.5 6.572`],pencil:[`M4 20h4l10.5-10.5a2.828 2.828 0 1 0-4-4l-10.5 10.5v4`,`M13.5 6.5l4 4`],tool:[`M7 10h3v-3l-3.5-3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1-3 3l-6-6a6 6 0 0 1-8-8l3.5 3.5`],bolt:[`M13 3v7h6l-8 11v-7H5l8-11`],brush:[`M3 21v-4a4 4 0 1 1 4 4h-4`,`M21 3a16 16 0 0 0-12.8 10.2`,`M21 3a16 16 0 0 1-10.2 12.8`,`M10.6 9a9 9 0 0 1 4.4 4.4`],home:[`M5 12H3l9-9l9 9h-2`,`M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7`,`M9 21v-6a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v6`],music:[`M3 17a3 3 0 1 0 6 0a3 3 0 0 0-6 0`,`M13 17a3 3 0 1 0 6 0a3 3 0 0 0-6 0`,`M9 17v-13h10v13`,`M9 8h10`],microphone:[`M15 12.9a5 5 0 1 0-3.902-3.9`,`M15 12.9l-3.902-3.899l-7.513 8.584a2 2 0 1 0 2.827 2.83l8.588-7.515z`]};K({"ui.audit.history":`Record history`,"ui.audit.list":`Audit trail`,"ui.audit.empty":`No audit entries.`,"ui.audit.loading":`Loading audit entries…`,"ui.audit.person":`Person ID`,"ui.audit.record":`Record ID`,"ui.audit.from":`From date`,"ui.audit.to":`To date`,"ui.audit.filter":`Apply filters`,"ui.audit.reason":`Reason: {reason}`,"ui.audit.behalf":`On behalf of {actor}`,"ui.audit.change":`{field}: {before} → {after}`}),K({"ui.notification_bell.label":`Notifications`,"ui.notification_bell.unread":`{count} unread`,"ui.notification_bell.mark_all":`Mark all read`,"ui.notification_bell.mark_one":`Mark read`,"ui.notification_bell.loading":`Loading notifications`,"ui.notification_bell.empty":`No notifications.`,"ui.notification_bell.unavailable":`Notifications are unavailable.`,"ui.notification_bell.mark_error":`Could not mark notifications read.`,"ui.notification_bell.live_error":`Live notifications are unavailable.`}),S([`keydown`]);var Nt=c(`<option>Per line</option> <option>Once per document</option>`,1),Pt=c(`<option></option>`),Ft=c(`<li class="svelte-1adyoey"><span class="name"> </span> <span class="rates svelte-1adyoey"> </span></li>`),It=c(`<div class="settings svelte-1adyoey"><div class="field svelte-1adyoey"><!> <!></div> <div class="percent svelte-1adyoey"><!> <span class="percent-sign svelte-1adyoey" aria-hidden="true">%</span></div> <div class="field svelte-1adyoey"><!> <!></div> <div class="field switch svelte-1adyoey"><!> <small class="svelte-1adyoey"> </small></div> <div class="field svelte-1adyoey"><!> <!> <datalist></datalist></div></div> <section class="tax-codes svelte-1adyoey"><h3 class="svelte-1adyoey">Tax codes</h3> <p class="meta svelte-1adyoey">New documents use <strong> </strong> </p> <ul class="svelte-1adyoey"></ul> <p class="meta svelte-1adyoey">The country codes are smrt’s examples; check they apply before using one.</p></section>`,1);function Lt(t,n){h(n,!0);let r=T(n,`idPrefix`,3,`app-settings`),o=[`Due on receipt`,`Net 15`,`Net 30`,`Net 60`,`50% deposit, balance on completion`],c=e=>n.onchange({...n.value,...e}),u=i(()=>ae(n.value.taxRate)),d=i(()=>[...te,...re].filter(t=>t.id!==e(u).id)),p=e=>e.components.map(e=>e.name).join(` + `)||`No tax, reported as ${e.kind.replace(/-/g,` `)}`;var m=It(),_=R(m),v=j(_),b=j(v);Y(b,{get for(){return`${r()??``}-currency`},label:`Currency`});var x=N(b,2);X(x,{get id(){return`${r()??``}-currency`},get value(){return n.value.currency},onchange:e=>c({currency:e.currentTarget.value})}),s(v);var S=N(v,2),C=j(S);{let t=i(()=>At(n.value.taxRate));kt(C,{get name(){return`${r()??``}-tax-rate`},label:`Default tax rate`,min:0,step:.01,get value(){return e(t)},onchange:e=>c({taxRate:Ot(e)??0})})}g(2),s(S);var w=N(S,2),E=j(w);Y(E,{get for(){return`${r()??``}-rounding`},label:`Tax rounding`});var D=N(E,2);we(D,{get id(){return`${r()??``}-rounding`},get value(){return n.value.taxRounding},onchange:e=>c({taxRounding:e.currentTarget.value}),children:(e,t)=>{var n=Nt(),r=R(n);r.value=r.__value=`line`;var i=N(r,2);i.value=i.__value=`document`,y(e,n)},$$slots:{default:!0}}),s(w);var O=N(w,2),k=j(O);J(k,{get checked(){return n.value.pricesIncludeTax},onchange:e=>c({pricesIncludeTax:e.currentTarget.checked}),label:`Prices include tax`});var A=N(k,2),M=I(A,!0);s(O);var P=N(O,2),F=j(P);Y(F,{get for(){return`${r()??``}-terms`},label:`Default payment terms`});var L=N(F,2);me(L,{get id(){return`${r()??``}-terms`},type:`text`,get list(){return`${r()??``}-terms-options`},autocomplete:`off`,placeholder:`Not set`,get value(){return n.value.paymentTerms},oninput:e=>c({paymentTerms:e.currentTarget.value})});var z=N(L,2);f(z,20,()=>o,e=>e,(e,t)=>{var n=Pt(),r={};B(()=>{r!==(r=t)&&(n.value=(n.__value=r)??``)}),y(e,n)}),s(z),s(P),s(_);var V=N(_,2),H=j(V),W=N(H,2),ee=N(j(W)),G=I(ee,!0),K=N(ee);s(W);var ne=N(W,2);f(ne,21,()=>e(d),e=>e.id,(t,n)=>{var r=Ft(),i=j(r),a=I(i,!0),o=N(i,2),c=I(o,!0);s(r),B(t=>{U(r,`data-tax-code`,e(n).code),l(a,e(n).name),l(c,t)},[()=>p(e(n))]),y(t,r)}),s(ne),g(2),s(V),B(t=>{l(M,n.value.pricesIncludeTax?`A line’s amount is what the customer pays; tax is part of it.`:`Tax is added on top of each line’s amount.`),U(z,`id`,`${r()??``}-terms-options`),U(V,`aria-labelledby`,`${r()??``}-tax-codes`),U(H,`id`,`${r()??``}-tax-codes`),l(G,e(u).name),l(K,` (${t??``}),
|
|
2
|
+
from the default tax rate. A line can choose another code; an exempt
|
|
3
|
+
customer pays none.`)},[()=>p(e(u))]),y(t,m),a()}var Rt=d(`<path></path>`),zt=c(`<span class="badge svelte-mzas8k">In use</span>`),Bt=c(`<li><button type="button" class="card svelte-mzas8k"><span class="heading svelte-mzas8k"><svg class="icon svelte-mzas8k" viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"></svg> <span class="name svelte-mzas8k"> </span></span> <span class="summary svelte-mzas8k"> </span> <!></button></li>`),Vt=c(`<ul class="grid svelte-mzas8k" aria-label="Cookbooks"></ul>`),Ht=c(`<span aria-hidden="true">←</span> Back to cookbooks`,1),Ut=c(`<li class="svelte-mzas8k"> </li>`),Wt=c(`<li> </li>`),Gt=c(`<div><h4 class="svelte-mzas8k"> </h4> <ul class="svelte-mzas8k"></ul></div>`),Kt=c(`<section class="preview svelte-mzas8k" aria-labelledby="preview-heading"><div class="back svelte-mzas8k"><!></div> <h2 id="preview-heading" tabindex="-1" class="svelte-mzas8k"> </h2> <p class="summary svelte-mzas8k"> </p> <div class="block svelte-mzas8k"><h3 class="svelte-mzas8k">Recipes</h3> <ul class="chips svelte-mzas8k" aria-label="Recipes"></ul></div> <div class="block svelte-mzas8k"><h3 class="svelte-mzas8k">Menu</h3> <div class="menu svelte-mzas8k"></div></div> <div class="block svelte-mzas8k"><h3 class="svelte-mzas8k">Settings</h3> <!></div> <div class="actions svelte-mzas8k"><!> <span class="meta svelte-mzas8k">Replaces your current recipes, menu and sample records.</span></div></section>`),qt=c(`<div class="cookbooks svelte-mzas8k"><!> <p class="meta svelte-mzas8k">A cookbook is a ready-made starting point: the recipes, menu and settings a
|
|
4
|
+
kind of business usually needs. Pick one, look it over, then change
|
|
5
|
+
anything in the other tabs.</p> <div class="swap svelte-mzas8k"><!></div> <!></div> <!>`,1);function Jt(t,r){h(r,!0);let o=pt(),c=pe(),d=D(!1),p=D(``),_=D(``);z(()=>{ct.load()});let v=i(()=>lt.find(e=>e.id===St.open)),b=D(null),S=D(null),C;O(()=>{let t=e(v)?.id??null,n=C===void 0,r=C!==t;C=t,!n&&r&&V().then(()=>{if(t){e(S)?.scrollIntoView({block:`nearest`}),e(S)?.focus({preventScroll:!0});return}let n=e(b)?.querySelector(`[data-cookbook="${St.returnTo??``}"]`);n?.scrollIntoView({block:`nearest`}),n?.focus({preventScroll:!0})})});function w(e){W(_,``),W(p,``),St.show(e.id)}function T(){St.back()}function E(t){t.key!==`Escape`||t.defaultPrevented||e(d)||(t.preventDefault(),T())}let A=D(M(et(void 0)));O(()=>{W(A,et(e(v)?.settings),!0)});let P=e=>ct.active===e.id&&xt(e,{recipes:Q.ids,features:Q.features});function F(){e(v)&&(yt(Z)?W(d,!0):L())}function L(){if(W(d,!1),!e(v))return;let t=_t(e(v),Z,m(e(A)));if(t.ok){o.reset?.(),W(p,``);let t=gt(e(v).document).length;W(_,`${e(v).name} added ${t} menu sections. Explore them in the left sidebar.`),c?.setPanelState(`left`,`expanded`)}else W(p,t.error,!0),W(_,``)}var H=qt(),K=R(H),te=j(K),ne=t=>{G(t,{variant:`success`,title:`Cookbook applied`,children:(t,n)=>{g();var r=u();B(()=>l(r,e(_))),y(t,r)},$$slots:{default:!0}})};n(te,t=>{e(_)&&t(ne)});var re=N(te,4),ie=j(re),ae=t=>{var r=Vt();f(r,21,()=>lt,e=>e.id,(t,r)=>{let a=i(()=>P(e(r)));var o=Bt(),c=j(o),u=j(c),d=j(u);f(d,20,()=>Mt[e(r).icon]??[],e=>e,(e,t)=>{var n=Rt();B(()=>U(n,`d`,t)),y(e,n)}),s(d);var p=N(d,2),m=I(p,!0);s(u);var h=N(u,2),g=I(h,!0),_=N(h,2),v=e=>{var t=zt();y(e,t)};n(_,t=>{e(a)&&t(v)}),s(c),s(o),B(()=>{U(c,`data-cookbook`,e(r).id),l(m,e(r).name),l(g,e(r).summary)}),x(`click`,c,()=>w(e(r))),y(t,o)}),s(r),k(r,e=>W(b,e),()=>e(b)),y(t,r)},oe=t=>{let n=i(()=>gt(e(v).document));var r=Kt(),a=j(r),o=j(a);ue(o,{variant:`ghost`,onclick:T,children:(e,t)=>{var n=Ht();g(),y(e,n)},$$slots:{default:!0}}),s(a);var c=N(a,2),d=I(c,!0);k(c,e=>W(S,e),()=>e(S));var p=N(c,2),m=I(p,!0),h=N(p,2),_=N(j(h),2);f(_,20,()=>ut(e(v)),e=>e,(e,t)=>{var n=Ut(),r=I(n,!0);B(()=>l(r,t)),y(e,n)}),s(_),s(h);var b=N(h,2),C=N(j(b),2);f(C,21,()=>e(n),e=>e.id,(t,n)=>{var r=Gt(),i=j(r),a=I(i,!0),o=N(i,2);f(o,21,()=>e(n).entries,e=>e.id,(t,n)=>{var r=Wt(),i=I(r,!0);B(()=>l(i,e(n).label)),y(t,r)}),s(o),s(r),B(()=>l(a,e(n).label)),y(t,r)}),s(C),s(b);var w=N(b,2);Lt(N(j(w),2),{get value(){return e(A)},onchange:e=>W(A,e,!0),idPrefix:`cookbook-settings`}),s(w);var D=N(w,2),O=j(D);ue(O,{onclick:F,children:(e,t)=>{g();var n=u(`Use this cookbook`);y(e,n)},$$slots:{default:!0}}),g(2),s(D),s(r),B(()=>{U(r,`data-cookbook-detail`,e(v).id),l(d,e(v).name),l(m,e(v).summary)}),x(`keydown`,r,E),y(t,r)};n(ie,t=>{e(v)?t(oe,-1):t(ae)}),s(re);var se=N(re,2),q=t=>{G(t,{variant:`error`,title:`Could not use this cookbook`,children:(t,n)=>{g();var r=u();B(()=>l(r,e(p))),y(t,r)},$$slots:{default:!0}})};n(se,t=>{e(p)&&t(q)}),s(K);var ce=N(K,2);{let t=i(()=>e(v)?`Use the ${e(v).name} cookbook?`:`Use this cookbook?`);ee(ce,{get open(){return e(d)},get title(){return e(t)},message:`Replaces your current recipes, menu and sample records.`,confirmLabel:`Replace`,destructive:!0,onconfirm:L,oncancel:()=>W(d,!1)})}y(t,H),a()}S([`click`,`keydown`]);var Yt=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,Xt=new Map(Xe(Ze).map(e=>[e.id,e.label]));function Zt(e){return q(e.slice(e.lastIndexOf(`:`)+1))}function Qt(e){let t=new Map;for(let n of e){let e=Zt(n.objectRef),r=t.get(e)??[],i=q(n.fieldName).toLowerCase();r.includes(i)||r.push(i),t.set(e,r)}return[...t].map(([e,t])=>`${e}: ${t.join(`, `)}`)}function $t(e){let t=[];e.custom?t.push(`brand colour ${e.custom.primary}`):e.preset&&e.preset!==`glass`&&t.push(`${xe(e.preset)?ve(e.preset):e.preset} preset`),e.colorScheme&&e.colorScheme!==`system`&&t.push(`${e.colorScheme} scheme`);let n=e.fontFamily??e.custom?.fontFamily;return n&&t.push(`${n} font`),e.borderRadius&&t.push(`${e.borderRadius} corners`),e.density===`touch`&&t.push(`touch density`),e.contrast&&e.contrast!==`auto`&&t.push(`${e.contrast} contrast`),e.customCss?.trim()&&t.push(`custom CSS`),t}function en(e){let t=[],n=e.customSections??[];if(n.length){let e=n.map(e=>e.label).filter(Boolean);t.push(`${Yt(n.length,`custom section`)}${e.length&&e.length<=4?` (${e.join(`, `)})`:``}`)}let r=e.hidden?.length??0;r&&t.push(`${r} hidden`);let i=Object.values(e.items??{}).filter(e=>e.label).length+Object.values(e.sections??{}).filter(e=>e.label||e.icon||e.showTitle===!1).length;i&&t.push(`${i} renamed or restyled`);let a=Object.keys(e.moved??{}).length;a&&t.push(`${a} moved`),(e.sectionOrder?.length||Object.keys(e.itemOrder??{}).length)&&t.push(`reordered`);let o=Object.keys(e.placements??{}).length;return o&&t.push(`${Yt(o,`shell item`)} placed`),Object.keys(e.panels??{}).length&&t.push(`panel settings`),t}function tn(e,t){if(e===`section:${$e.id}`)return $e.label;if(e.startsWith(`section:`)){let n=e.slice(8);return t?.sections?.[e]?.label??Xt.get(n)??q(n)}if(e.startsWith(`custom:`))return t?.customSections?.find(t=>t.id===e)?.label??q(e.slice(7));if(e.startsWith(`detail:`)){let t=e.slice(e.lastIndexOf(`.`)+1);return`${q(t)} record`}return q(e)}function nn(e){let t=[];e.recipes.length&&t.push({id:`recipes`,label:Yt(e.recipes.length,`recipe`),chips:e.recipes.map(e=>rt.get(e)?.label??e)}),e.features.length&&t.push({id:`features`,label:Yt(e.features.length,`feature`),chips:e.features.map(Zt)}),e.policies.length&&t.push({id:`options`,label:Yt(e.policies.length,`saved option`),chips:Qt(e.policies)});let n=Object.entries(e.exposure??{}).filter(([,e])=>e.length);n.length&&t.push({id:`exposure`,label:`Surfaces switched off`,chips:n.map(([e,t])=>`${Zt(e)}: ${t.join(`, `)}`)});let r=e.theme?$t(e.theme):[];r.length&&t.push({id:`theme`,label:`Theme`,text:r.join(`, `)});let i=e.layout?en(e.layout):[];i.length&&t.push({id:`layout`,label:`Layout`,text:i.join(`, `)});let a=Object.keys(e.overviews??{});return a.length&&t.push({id:`pages`,label:Yt(a.length,`customised page`),chips:a.map(t=>tn(t,e.layout))}),t}function rn(e){let t=nn(e);if(!t.length)return`an empty cookbook`;let n=t.map(e=>e.id===`theme`?`a theme`:e.id===`layout`?`a layout`:e.id===`exposure`?`narrowed surfaces`:e.label);return n.length===1?n[0]:`${n.slice(0,-1).join(`, `)} and ${n.at(-1)}`}var an=`0.57.7`,on=`Node 26 or newer`,sn=`pnpm 11`,cn=`cookbook.json`,ln=`COOKBOOK_EOF`;function un(e=an){return`npx -y @happyvertical/smrt-cli@${e}`}function dn(e,t){return Me(e.name)||Me(t)||`my-app`}function fn(e,t,n=an){return`${un(n)} cookbook apply ${e} ${t}`}function pn(e,t=ln){let n=new Set(e.split(`
|
|
6
|
+
`)),r=t;for(let e=1;n.has(r);e++)r=`${t}_${e}`;return r}function mn(e,t={}){let n=t.version??`0.57.7`,r=dn(e,t.fallbackName),i=JSON.stringify(e),a=pn(i),o=un(n),s=[`Create a new s-m-r-t app from the cookbook below. Work in a new, empty directory outside any existing project, run the steps in order, and when you finish report what you ran and what happened, including anything that failed.`,``,`1. Prerequisites: ${on} (\`node --version\`), git, and ${sn} or newer (\`npm install -g pnpm\` if missing).`,``,`2. Write the cookbook exactly as given, without reformatting or editing it:`,``,`cat > ${cn} <<'${a}'\n${i}\n${a}`,``,`3. Validate it, then create the app in ./${r}:`,``,`${o} cookbook validate ${cn}`,`${o} cookbook apply ${cn} ${r}`,``,`4. Set it up (in a subshell, so the commands below still run from this directory):`,``,`(cd ${r} && pnpm exec smrt app install)`,``,`If any step fails, run \`pnpm exec smrt app doctor\` inside ${r} and include its findings in your report. Do not hand-edit the app's smrt.cookbook.json: change ${cn} and run \`${o} cookbook apply ${cn} --into ${r}\` instead.`,``].join(`
|
|
7
|
+
`);return{text:s,bytes:new TextEncoder().encode(s).length,appName:r,version:n,delimiter:a}}function hn(t,n){h(n,!0);let r=T(n,`copiedLabel`,3,`Copied`),i=T(n,`variant`,3,`primary`),o=T(n,`confirmFor`,3,2e3),s=D(!1),c;async function d(){let e=typeof n.text==`function`?n.text():n.text,t=n.write??(typeof navigator<`u`&&navigator.clipboard?e=>navigator.clipboard.writeText(e):void 0);try{if(!t)throw Error(`no clipboard`);await t(e)}catch{W(s,!1),n.onfail?.();return}W(s,!0),n.oncopied?.(),clearTimeout(c),c=setTimeout(()=>W(s,!1),o())}ue(t,{get variant(){return i()},onclick:d,"aria-live":`polite`,get"aria-describedby"(){return n[`aria-describedby`]},children:(t,i)=>{g();var a=u();B(()=>l(a,e(s)?r():n.label)),y(t,a)},$$slots:{default:!0}}),a()}var gn=c(`<li><!></li>`),_n=c(`<ul class="chips svelte-17nkvtk"></ul>`),vn=c(`<dt class="svelte-17nkvtk"> </dt> <dd class="svelte-17nkvtk"><!></dd>`,1),yn=c(`<dl class="summary svelte-17nkvtk"></dl>`),bn=c(`<p class="quiet svelte-17nkvtk">Nothing customised yet. Add recipes or apply a cookbook first.</p>`),xn=c(`<pre class="json svelte-17nkvtk"> </pre>`),Sn=c(`The kitchen is running, but this page was opened without its one-time
|
|
8
|
+
token. Open the address <code class="svelte-17nkvtk">smrt kitchen</code> printed (it ends in <code class="svelte-17nkvtk">#kitchen=…</code>), or download the cookbook and run <code class="svelte-17nkvtk">smrt cookbook apply</code> on the file.`,1),Cn=c(`This version of <code class="svelte-17nkvtk">smrt kitchen</code> puts its one-time token in a
|
|
9
|
+
file other programs on this computer can read, so the planner does not
|
|
10
|
+
use it. Update the <code class="svelte-17nkvtk">smrt</code> CLI, or download the cookbook and run <code class="svelte-17nkvtk">smrt cookbook apply</code> on the file.`,1),wn=c(`<li><code class="svelte-17nkvtk"> </code></li>`),Tn=c(`Next, in your terminal: <ul></ul>`,1),En=c(` <!>`,1),Dn=c(`<li> </li>`),On=c(`<ul></ul>`),kn=c(`<div class="kitchen" role="status" aria-live="polite"><!></div>`),An=c(`<div class="export svelte-17nkvtk"><p class="meta svelte-17nkvtk">Your recipes, their options, the theme, the layout and customised pages,
|
|
11
|
+
kept together in this browser as one cookbook. Sample records are not part
|
|
12
|
+
of it.</p> <section class="block svelte-17nkvtk" aria-labelledby="summary-heading" data-export-section="summary"><h2 id="summary-heading" class="svelte-17nkvtk">In this cookbook</h2> <!></section> <section class="block svelte-17nkvtk" aria-labelledby="prompt-heading" data-export-section="prompt"><h2 id="prompt-heading" class="svelte-17nkvtk">Copy prompt for your coding agent</h2> <p class="meta svelte-17nkvtk" id="prompt-note">Paste it into Claude Code, Codex or another coding agent. The prompt
|
|
13
|
+
carries the cookbook, creates the app <code class="svelte-17nkvtk"> </code> </p> <!> <div class="actions svelte-17nkvtk" data-export-actions="primary"><!> <!> <!></div> <p class="notice svelte-17nkvtk" role="status" aria-live="polite"> </p></section> <section class="block svelte-17nkvtk" aria-labelledby="file-heading" data-export-section="file"><h2 id="file-heading" class="svelte-17nkvtk">The downloaded file</h2> <p class="meta svelte-17nkvtk">Download writes <code class="svelte-17nkvtk"> </code> </p> <div class="command svelte-17nkvtk"><code data-export-command="" class="svelte-17nkvtk"> </code> <!></div> <!></section> <!> <!> <!> <section class="block replace svelte-17nkvtk" aria-labelledby="replace-heading" data-export-section="replace"><h2 id="replace-heading" class="svelte-17nkvtk">Replace or start over</h2> <p class="meta svelte-17nkvtk">Both replace everything listed above; download a copy first to keep it.</p> <div class="actions svelte-17nkvtk" data-export-actions="replace"><!> <!></div> <p class="meta svelte-17nkvtk">Import swaps this cookbook for one from a file. Reset empties it and
|
|
14
|
+
removes the sample records you added or changed.</p> <input type="file" accept="application/json,.json" hidden="" aria-label="Cookbook file"/> <!> <p class="notice svelte-17nkvtk" role="status" aria-live="polite"> </p></section></div> <!> <!>`,1);function jn(t,r){h(r,!0);let o=D(void 0),c=D(void 0),d=D(void 0),p=D(null),m=D(M([])),_=D(``),v=D(``),b=D(``),S=D(!1),C=i(()=>dt(ct.active??``)?.name),w=i(()=>Z.snapshot()),T=i(()=>nn(e(w))),E=i(()=>ke(e(w).name??e(C))),O=i(()=>Ie(Ae(e(w)))),A=i(()=>dn(e(w),e(C))),P=i(()=>mn(e(w),{fallbackName:e(C)})),F=i(()=>fn(e(E),e(A))),L=`Copying is not available here. The text is selected: press Ctrl+C (Cmd+C on a Mac) to copy it.`;function z(){let t=e(c)?.getElement();t?.focus(),t?.select(),W(b,L)}function V(){if(e(d)){let t=window.getSelection();t?.removeAllRanges(),t?.selectAllChildren(e(d))}W(b,L)}async function H(e){let t=e.currentTarget,n=t.files?.[0];if(W(_,``),W(v,``),n){try{let e=Ue(await n.text());e.ok?(W(p,e.cookbook,!0),W(m,e.dropped??[],!0)):W(_,e.error,!0)}catch{W(_,`The file could not be read.`)}t.value=``}}function U(){e(p)&&(Z.replace(e(p)),W(v,`Imported ${rn(e(p))}.${e(m).length?` Not imported: ${e(m).join(` `)}`:``}`)),W(p,null),W(m,[],!0)}let K=pt();function te(){Z.reset(),K.reset?.(),W(S,!1),Z.flush(),location.reload()}var ne=An(),re=R(ne),ae=N(j(re),2),oe=N(j(ae),2),se=t=>{var r=yn();f(r,21,()=>e(T),e=>e.id,(t,r)=>{var i=vn(),a=R(i),o=I(a,!0),c=N(a,2),d=j(c),p=t=>{var n=_n();f(n,23,()=>e(r).chips,(e,t)=>`${e}:${t}`,(t,n)=>{var r=gn(),i=j(r);ie(i,{get label(){return e(n)},size:`sm`}),s(r),y(t,r)}),s(n),y(t,n)},m=t=>{var n=u();B(()=>l(n,e(r).text)),y(t,n)};n(d,t=>{e(r).chips?t(p):t(m,-1)}),s(c),B(()=>l(o,e(r).label)),y(t,i)}),s(r),y(t,r)},q=e=>{var t=bn();y(e,t)};n(oe,t=>{e(T).length?t(se):t(q,-1)}),s(ae);var ce=N(ae,2),de=N(j(ce),2),fe=N(j(de)),pe=I(fe,!0),me=N(fe);s(de);var he=N(de,2);k(Te(he,{class:`prompt`,get value(){return e(P).text},readonly:!0,rows:10,spellcheck:!1,wrap:`soft`,"aria-label":`Prompt for your coding agent`,"aria-describedby":`prompt-note`,interaction:!1}),e=>W(c,e,!0),()=>e(c));var ge=N(he,2),_e=j(ge);hn(_e,{text:()=>e(P).text,label:`Copy prompt`,get write(){return r.write},oncopied:()=>W(b,`Prompt copied.`),onfail:z});var ve=N(_e,2),ye=t=>{{let n=i(()=>$.status===`sending`);ue(t,{variant:`secondary`,get disabled(){return e(n)},onclick:()=>$.send(Z.snapshot()),children:(e,t)=>{g();var n=u();B(()=>l(n,$.status===`sending`?`Sending to kitchen…`:`Send to kitchen`)),y(e,n)},$$slots:{default:!0}})}};n(ve,e=>{$.config&&e(ye)});var be=N(ve,2);ue(be,{variant:`secondary`,onclick:()=>Le(e(w),e(w).name??e(C)),children:(e,t)=>{g();var n=u(`Download cookbook`);y(e,n)},$$slots:{default:!0}}),s(ge);var xe=N(ge,2),Se=I(xe,!0);s(ce);var Ce=N(ce,2),we=N(j(Ce),2),J=N(j(we)),Ee=I(J,!0),De=N(J);s(we);var Y=N(we,2),X=j(Y),Oe=I(X,!0);k(X,e=>W(d,e),()=>e(d)),hn(N(X,2),{text:()=>e(F),label:`Copy command`,variant:`secondary`,get write(){return r.write},oncopied:()=>W(b,`Command copied.`),onfail:V}),s(Y);var je=N(Y,2);le(je,{title:`Preview JSON`,children:(t,n)=>{var r=xn(),i=I(r,!0);B(e=>l(i,e),[()=>Pe(e(w))]),y(t,r)},$$slots:{default:!0}}),s(Ce);var Me=N(Ce,2),Ne=e=>{G(e,{variant:`info`,title:`Send to kitchen needs its link`,children:(e,t)=>{g();var n=Sn();g(6),y(e,n)},$$slots:{default:!0}})};n(Me,e=>{$.needsLink&&e(Ne)});var Fe=N(Me,2),Re=e=>{G(e,{variant:`warning`,title:`Send to kitchen is off`,children:(e,t)=>{g();var n=Cn();g(6),y(e,n)},$$slots:{default:!0}})};n(Fe,e=>{$.tokenInConfig&&e(Re)});var ze=N(Fe,2),Be=e=>{var t=kn(),r=j(t),i=e=>{G(e,{variant:`success`,title:`Sent to the kitchen`,children:(e,t)=>{g();var r=En(),i=R(r),a=N(i),o=e=>{var t=Tn(),n=N(R(t));f(n,20,()=>$.outcome.result.nextSteps,e=>e,(e,t)=>{var n=wn(),r=j(n),i=I(r,!0);s(n),B(()=>l(i,t)),y(e,n)}),s(n),y(e,t)};n(a,e=>{$.outcome.result.nextSteps.length&&e(o)}),B(()=>l(i,`${$.outcome.result.mode===`update`?`Updated`:`Created`} the project${$.outcome.result.dir?` in ${$.outcome.result.dir}`:``}. `)),y(e,r)},$$slots:{default:!0}})},a=e=>{G(e,{variant:`error`,title:`The kitchen could not use this cookbook`,children:(e,t)=>{var n=On();f(n,20,()=>$.outcome.errors,e=>e,(e,t)=>{var n=Dn(),r=I(n,!0);B(()=>l(r,t)),y(e,n)}),s(n),y(e,n)},$$slots:{default:!0}})};n(r,e=>{$.outcome.ok?e(i):e(a,-1)}),s(t),y(e,t)};n(ze,e=>{$.outcome&&e(Be)});var Ve=N(ze,2),He=N(j(Ve),4),We=j(He);ue(We,{variant:`secondary`,onclick:()=>e(o)?.click(),children:(e,t)=>{g();var n=u(`Import cookbook…`);y(e,n)},$$slots:{default:!0}});var Ge=N(We,2);ue(Ge,{variant:`ghost`,onclick:()=>W(S,!0),children:(e,t)=>{g();var n=u(`Reset`);y(e,n)},$$slots:{default:!0}}),s(He);var Ke=N(He,4);k(Ke,e=>W(o,e),()=>e(o));var qe=N(Ke,2),Je=t=>{G(t,{variant:`error`,title:`Import failed`,children:(t,n)=>{g();var r=u();B(()=>l(r,e(_))),y(t,r)},$$slots:{default:!0}})};n(qe,t=>{e(_)&&t(Je)});var Ye=N(qe,2),Xe=I(Ye,!0);s(Ve),s(re);var Ze=N(re,2);{let t=i(()=>e(p)!==null),n=i(()=>e(p)?`Importing replaces ${rn(e(w))} with ${rn(e(p))}.`:``);ee(Ze,{get open(){return e(t)},title:`Replace the current cookbook?`,get message(){return e(n)},confirmLabel:`Replace`,destructive:!0,onconfirm:U,oncancel:()=>W(p,null)})}var Qe=N(Ze,2);ee(Qe,{get open(){return e(S)},title:`Reset the cookbook?`,message:`This removes every recipe, saved option, theme and layout change, and the sample records you added or changed. Download a copy first to keep it.`,confirmLabel:`Reset`,destructive:!0,onconfirm:te,oncancel:()=>W(S,!1)}),B(t=>{l(pe,e(A)),l(me,` with the smrt CLI ${e(P).version??``} and
|
|
15
|
+
starts it. About ${t??``}.`),l(Se,e(b)),l(Ee,e(E)),l(De,` (${e(O)??``}). To make the app from
|
|
16
|
+
it yourself, run this where the file is:`),l(Oe,e(F)),l(Xe,e(v))},[()=>Ie(e(P).bytes)]),x(`change`,Ke,H),y(t,ne),a()}S([`change`]);var Mn={"header.start":`header, left side`,"header.center":`header, middle`,"header.end":`header, right side`,"footer.start":`footer, left side`,"footer.center":`footer, middle`,"footer.end":`footer, right side`,"leftSidebar.header":`left sidebar, top`,"leftSidebar.footer":`left sidebar, bottom`,"rightSidebar.header":`right sidebar, top`,"rightSidebar.footer":`right sidebar, bottom`},Nn={llm:`Language model`,email:`Email`,oauth:`Sign-in (OAuth)`,storage:`File storage`,sms:`Text messages`,payments:`Payments`},Pn={openai:`OpenAI`,anthropic:`Anthropic`,gemini:`Gemini`,webllm:`WebLLM`,bitgpu:`BitGPU`,smtp:`SMTP`,imap:`IMAP`,s3:`S3`,github:`GitHub`};function Fn(e){return Pn[e]??q(e)}function In(e,t=`or`){let n=e.map(Fn);return n.length<=1?n.join(``):n.length===2?`${n[0]} ${t} ${n[1]}`:`${n.slice(0,-1).join(`, `)} ${t} ${n[n.length-1]}`}function Ln(e){switch(e.kind){case`shell-widget`:return{kind:e.kind,kindLabel:`Shell widget`,label:e.label,where:Mn[e.slot]??q(e.slot)};case`route`:return{kind:e.kind,kindLabel:`Page`,label:e.label,where:e.path};case`settings-panel`:return{kind:e.kind,kindLabel:`Settings panel`,label:e.label};case`playground`:return{kind:e.kind,kindLabel:`Playground`,label:e.label??`Try it`};case`widget`:return{kind:e.kind,kindLabel:`Overview widget`,label:e.label}}}function Rn(e){return{id:e.id,kind:e.kind,kindLabel:Nn[e.kind]??q(e.kind),required:e.required,options:e.options,browserOptions:e.browserOptions??[],secrets:e.secrets??[]}}function zn(e){let t=e.nav.map(e=>({kind:`menu`,kindLabel:`List and form`,label:e.label})),n=(e.surfaces??[]).map(Ln),r=[...t,...n];return r.length>0?r:[{kind:`data`,kindLabel:`Records only`,label:`${e.models.length} ${e.models.length===1?`model`:`models`}, no screens of their own`}]}function Bn(e,t){return e.group?{id:`group:${e.group.id}`,label:e.group.label,...e.group.summary?{summary:e.group.summary}:{}}:{id:`package:${t}`,label:q(t)}}function Vn(e,t){let n=new Map;for(let e of t)for(let t of e.recipes??[])n.set(t.id,e);let r=e=>n.get(e.id)??t.find(t=>t.models.some(t=>t.id===e.models[0]));return e.map(e=>{let t=r(e),n=t?.id??e.id.split(`.`)[0],i=vt(e),a=ht(i);return{recipe:e,id:e.id,label:e.label,summary:e.summary,group:Bn(e,n),packageId:n,demo:a,ownMode:e.demo&&i&&e.demo.mode!==i.mode?e.demo.mode:void 0,packageNote:Ct(t?.browser),providers:(e.providers??[]).map(Rn),gets:zn(e),requires:e.requires,runtime:e.runtime}})}function Hn(e){let t=new Map;for(let n of e){let e=t.get(n.group.id);e?!e.summary&&n.group.summary&&t.set(n.group.id,{...e,summary:n.group.summary}):t.set(n.group.id,n.group)}return[...t.values()].sort((e,t)=>e.label.localeCompare(t.label))}function Un(e,t,n){let r=t.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(e=>{if(n&&e.group.id!==n)return!1;if(r.length===0)return!0;let t=[e.label,e.summary,e.id,e.group.label,e.packageId,...e.recipe.synonyms,...e.gets.flatMap(e=>[e.kindLabel,e.label,e.where??``]),...e.providers.flatMap(e=>[e.kindLabel,...e.options]),e.demo?.label??``].join(` `).toLowerCase();return r.every(e=>t.includes(e))})}function Wn(e){return Hn(e).map(t=>({group:t,cards:e.filter(e=>e.group.id===t.id)}))}function Gn(e,t,n){let r=new Set(Qe(t,n));return Qe([...t,e],n).filter(t=>t!==e&&!r.has(t))}var Kn=c(`<span class="meta where svelte-1tvhds4"> </span>`),qn=c(`<li><span class="kind svelte-1tvhds4"> </span> <!></li>`),Jn=c(`<span class="meta svelte-1tvhds4"> </span>`),Yn=c(`<code class="svelte-1tvhds4"> </code> `,1),Xn=c(`<p class="meta svelte-1tvhds4">Secrets (names only): <!></p>`),Zn=c(`<h4 class="svelte-1tvhds4">Needs</h4> <ul class="plain svelte-1tvhds4"></ul> <!>`,1),Qn=c(`<p class="meta svelte-1tvhds4"> </p>`),$n=c(`<li> </li>`),er=c(`<ul class="plain reasons svelte-1tvhds4"></ul>`),tr=c(`<!> <!> <!>`,1),nr=c(`<li><div class="head svelte-1tvhds4"><h3 class="svelte-1tvhds4"> </h3> <!></div> <p class="summary svelte-1tvhds4"> </p> <p class="meta svelte-1tvhds4"><!></p> <h4 class="svelte-1tvhds4">You get</h4> <ul class="plain svelte-1tvhds4"></ul> <!> <!> <!> <div class="foot svelte-1tvhds4"><!> <!></div></li>`);function rr(t,r){h(r,!0);let c=i(()=>r.card.demo),d=i(()=>(e(c)?.reasons.length??0)>0||r.card.ownMode!==void 0||r.card.packageNote!==void 0),p=i(()=>[...new Set(r.card.providers.flatMap(e=>e.secrets))]),m=i(()=>`feature-${r.card.id}`);var _=nr();let v;var b=j(_),x=j(b),S=I(x,!0),C=N(x,2),w=t=>{ne(t,{get variant(){return e(c).variant},size:`sm`,get title(){return e(c).meaning},children:(t,n)=>{g();var r=u();B(()=>l(r,e(c).label)),y(t,r)},$$slots:{default:!0}})};n(C,t=>{e(c)&&t(w)}),s(b);var T=N(b,2),E=I(T,!0),D=N(T,2),O=j(D),k=t=>{var n=u();B(()=>l(n,e(c).meaning)),y(t,n)},A=e=>{var t=u(`Demo status not reported for this feature.`);y(e,t)};n(O,t=>{e(c)?t(k):t(A,-1)}),s(D);var M=N(D,4);f(M,21,()=>r.card.gets,e=>`${e.kind}:${e.label}`,(t,r)=>{var i=qn(),a=j(i),o=I(a,!0),c=N(a),u=N(c),d=t=>{var n=Kn(),i=I(n);B(()=>l(i,`(${e(r).where??``})`)),y(t,n)};n(u,t=>{e(r).where&&t(d)}),s(i),B(()=>{l(o,e(r).kindLabel),l(c,` ${e(r).label??``}`)}),y(t,i)}),s(M);var P=N(M,2),F=t=>{var i=Zn(),a=N(R(i),2);f(a,21,()=>r.card.providers,e=>e.id,(t,r)=>{var i=qn(),a=j(i),o=I(a,!0),c=N(a),u=N(c),d=t=>{var n=Jn(),i=I(n);B(t=>l(i,`${t??``}
|
|
17
|
+
${e(r).browserOptions.length===1?`runs`:`run`} in the
|
|
18
|
+
browser with no key.`),[()=>In(e(r).browserOptions,`and`)]),y(t,n)};n(u,t=>{e(r).browserOptions.length&&t(d)}),s(i),B(t=>{l(o,e(r).kindLabel),l(c,` ${e(r).required?`Required`:`Optional`}: ${t??``}. `)},[()=>In(e(r).options)]),y(t,i)}),s(a);var o=N(a,2),c=t=>{var n=Xn(),r=N(j(n));f(r,18,()=>e(p),e=>e,(t,n,r)=>{var i=Yn(),a=R(i),o=I(a,!0),s=N(a,1,!0);B(()=>{l(o,n),l(s,e(r)<e(p).length-1?`, `:``)}),y(t,i)}),s(n),y(t,n)};n(o,t=>{e(p).length&&t(c)}),B(()=>U(a,`aria-label`,`${r.card.label}: providers`)),y(t,i)};n(P,e=>{r.card.providers.length&&e(F)});var L=N(P,2),z=e=>{var t=Qn(),n=I(t);B(e=>l(n,`Also adds ${e??``}.`),[()=>r.alsoAdds.join(`, `)]),y(e,t)};n(L,e=>{!r.on&&r.alsoAdds.length&&e(z)});var V=N(L,2),H=t=>{{let a=i(()=>e(c)?`Why ${e(c).label}?`:`Details`);le(t,{get title(){return e(a)},children:(t,i)=>{var a=tr(),o=R(a),u=t=>{var n=er();f(n,20,()=>e(c).reasons,e=>e,(e,t)=>{var n=$n(),r=I(n,!0);B(()=>l(r,t)),y(e,n)}),s(n),B(()=>U(n,`aria-label`,`${r.card.label}: reasons`)),y(t,n)};n(o,t=>{e(c)?.reasons.length&&t(u)});var d=N(o,2),p=t=>{var n=Qn(),i=I(n);B(()=>l(i,`On its own it would be ${r.card.ownMode??``}; what it needs sets ${e(c).label??``}.`)),y(t,n)};n(d,t=>{r.card.ownMode&&e(c)&&t(p)});var m=N(d,2),h=e=>{var t=Qn(),n=I(t,!0);B(()=>l(n,r.card.packageNote)),y(e,t)};n(m,e=>{r.card.packageNote&&e(h)}),y(t,a)},$$slots:{default:!0}})}};n(V,t=>{e(d)&&t(H)});var W=N(V,2),ee=j(W);{let t=i(()=>r.lockedBy.length>0),n=i(()=>`${e(m)}-summary${r.lockedBy.length?` ${e(m)}-locked`:``}`);J(ee,{get label(){return r.card.label},get checked(){return r.on},get disabled(){return e(t)},get"aria-describedby"(){return e(n)},onchange:e=>r.onchange(e.currentTarget.checked)})}var G=N(ee,2),K=t=>{var n=Qn(),i=I(n);B(t=>{U(n,`id`,`${e(m)}-locked`),l(i,`Stays on while ${t??``} needs it.`)},[()=>r.lockedBy.join(`, `)]),y(t,n)};n(G,e=>{r.lockedBy.length&&e(K)}),s(W),s(_),B(()=>{v=o(_,1,`card svelte-1tvhds4`,null,v,{selected:r.on}),l(S,r.card.label),U(T,`id`,`${e(m)}-summary`),l(E,r.card.summary),U(M,`aria-label`,`${r.card.label}: what you get`)}),y(t,_),a()}var ir=c(`<div class="chips svelte-7kphei" role="group" aria-label="Filter by package"><!> <!></div>`),ar=c(`<span class="tag svelte-7kphei">plumbing</span>`),or=c(`<span class="includes svelte-7kphei"> </span>`),sr=c(`<li><span class="icon svelte-7kphei" aria-hidden="true"><!></span> <div class="text svelte-7kphei"><span class="name svelte-7kphei"><a class="svelte-7kphei"> </a> <!></span> <span class="meta svelte-7kphei"> </span> <!></div> <!></li>`),cr=c(`<ul class="rows svelte-7kphei" aria-label="Features"></ul>`),lr=c(`<p class="empty svelte-7kphei"> </p>`),ur=c(`<div class="features svelte-7kphei"><p class="meta svelte-7kphei">Models no recipe covers. Add one to give it a list and a form of its own
|
|
19
|
+
under More in the menu.</p> <!> <!> <div class="bar svelte-7kphei"><h2 class="count svelte-7kphei"> </h2> <!></div> <!> <p class="notice svelte-7kphei" role="status" aria-live="polite"> </p></div>`);function dr(t,r){h(r,!0);let c=qe(se,Ze),d=D(``),m=D(null),_=D(!1),v=D(``),b=i(()=>Ke(c,e(_))),x=i(()=>Je(Ge(e(b),e(d)))),S=i(()=>e(m)&&e(x).includes(e(m))?e(m):null),C=i(()=>Ge(e(b),e(d),e(S))),w=i(()=>e(_)?0:Ge(c,e(d),e(S)).length-e(C).length);function T(e,t){t?Q.addFeature(e.id):Q.removeFeature(e.id),W(v,t?`Added ${e.label} to the menu.`:`Removed ${e.label} from the menu.`,!0)}var E=ur(),O=N(j(E),2);Ce(O,{get value(){return e(d)},onsearch:e=>{W(d,e,!0)},label:`Search features`,placeholder:`Search models, packages and fields`,debounceMs:0});var k=N(O,2),A=t=>{var n=ir(),r=j(n);{let t=i(()=>e(S)===null);De(r,{get pressed(){return e(t)},onclick:()=>W(m,null),children:(e,t)=>{g();var n=u(`All`);y(e,n)},$$slots:{default:!0}})}var a=N(r,2);f(a,16,()=>e(x),e=>e,(t,n)=>{{let r=i(()=>e(S)===n);De(t,{get pressed(){return e(r)},onclick:()=>W(m,e(S)===n?null:n,!0),children:(e,t)=>{g();var r=u();B(e=>l(r,e),[()=>q(n)]),y(e,r)},$$slots:{default:!0}})}}),s(n),y(t,n)};n(k,t=>{e(x).length>1&&t(A)});var M=N(k,2),P=j(M),F=I(P),L=N(P,2);J(L,{get checked(){return e(_)},label:`Show all`,onchange:e=>{W(_,e.currentTarget.checked,!0)}}),s(M);var R=N(M,2),z=t=>{var r=cr();f(r,29,()=>e(C),e=>e.id,(t,r)=>{let a=i(()=>Q.hasFeature(e(r).id));var c=sr();let u;var d=j(c),f=j(d);tt(f,{path:`M12 3C7.58 3 4 4.79 4 7v10c0 2.21 3.59 4 8 4s8-1.79 8-4V7c0-2.21-3.58-4-8-4zm6 14c0 .5-2.13 2-6 2s-6-1.5-6-2v-2.23c1.61.78 3.72 1.23 6 1.23s4.39-.45 6-1.23V17zm0-4.55c-1.3.95-3.58 1.55-6 1.55s-4.7-.6-6-1.55V9.64c1.47.83 3.61 1.36 6 1.36s4.53-.53 6-1.36v2.81zM12 9C8.13 9 6 7.5 6 7s2.13-2 6-2 6 1.5 6 2-2.13 2-6 2z`,size:22}),s(d);var m=N(d,2),h=j(m),g=j(h),_=I(g,!0),v=N(g,2),b=e=>{var t=ar();y(e,t)};n(v,t=>{e(r).plumbing&&t(b)}),s(h);var x=N(h,2),S=I(x,!0),C=N(x,2),w=t=>{var n=or(),i=I(n);B(e=>l(i,`+ ${e??``}`),[()=>e(r).includes.join(`, `)]),y(t,n)};n(C,t=>{e(r).includes.length&&t(w)}),s(m);var E=N(m,2);{let t=i(()=>`${e(a)?`Remove`:`Add`} ${e(r).label} feature`);J(E,{get checked(){return e(a)},get"aria-label"(){return e(t)},onchange:t=>T(e(r),t.currentTarget.checked)})}s(c),B((t,n)=>{u=o(c,1,`svelte-7kphei`,null,u,{selected:e(a)}),U(g,`href`,t),l(_,e(r).label),l(S,n)},[()=>ce(`/packages/${e(r).packageId}/`),()=>We(e(r))]),p(c,()=>ge,()=>({duration:jt(`medium2`,300)})),y(t,c)}),s(r),y(t,r)},V=t=>{var n=lr(),r=I(n);B(()=>l(r,`No features match "${e(d)??``}".`)),y(t,n)};n(R,t=>{e(C).length?t(z):t(V,-1)});var H=N(R,2),ee=I(H,!0);s(E),B(()=>{l(F,`${e(C).length??``} ${e(C).length===1?`feature`:`features`}${e(w)?` (${e(w)} hidden)`:``}`),l(ee,e(v))}),y(t,E),a()}var fr=c(`<div class="chips svelte-q9yl1j" role="group" aria-label="Browse by group"><!> <!></div>`),pr=c(`<p class="meta svelte-q9yl1j"> </p>`),mr=c(`<section class="svelte-q9yl1j"><h2 class="svelte-q9yl1j"> </h2> <!> <ul class="cards svelte-q9yl1j"></ul></section>`),hr=c(`<div class="features svelte-q9yl1j"><p class="meta svelte-q9yl1j">Everything s-m-r-t can add to your app. Switch a feature on to add it, with
|
|
20
|
+
what it needs, to your cookbook. Each label says how far it runs in this
|
|
21
|
+
browser-only demo; menu entries appear in the sidebar, while widgets, pages
|
|
22
|
+
and panels are listed for the real app and are not mounted here.</p> <!> <!> <p class="count svelte-q9yl1j" aria-live="polite"> </p> <!> <p class="notice meta svelte-q9yl1j" role="status" aria-live="polite"> </p> <!></div>`);function gr(t,r){h(r,!0);let o=Vn(Ze,se.packages),c=Hn(o),d=D(``),p=D(null),m=D(``),_=i(()=>Un(o,e(d),e(p))),v=i(()=>Wn(e(_))),b=e=>rt.get(e)?.label??e;function x(e,t){let n=new Set(Q.ids);t?Q.add(e):Q.remove(e);let r=new Set(Q.ids),i=Q.ids.filter(e=>!n.has(e)),a=[...n].filter(e=>!r.has(e)),o=[];i.length&&o.push(`Added ${i.map(b).join(`, `)}.`),a.length&&o.push(`Removed ${a.map(b).join(`, `)}.`),W(m,o.join(` `),!0)}var S=hr(),C=N(j(S),2);Ce(C,{get value(){return e(d)},onsearch:e=>{W(d,e,!0)},label:`Search features`,placeholder:`Search features`,debounceMs:0});var w=N(C,2),T=t=>{var n=fr(),r=j(n);{let t=i(()=>e(p)===null);De(r,{get pressed(){return e(t)},onclick:()=>W(p,null),children:(e,t)=>{g();var n=u(`All`);y(e,n)},$$slots:{default:!0}})}var a=N(r,2);f(a,17,()=>c,e=>e.id,(t,n)=>{{let r=i(()=>e(p)===e(n).id);De(t,{get pressed(){return e(r)},onclick:()=>W(p,e(p)===e(n).id?null:e(n).id,!0),children:(t,r)=>{g();var i=u();B(()=>l(i,e(n).label)),y(t,i)},$$slots:{default:!0}})}}),s(n),y(t,n)};n(w,e=>{c.length>1&&e(T)});var E=N(w,2),O=I(E),k=N(E,2);f(k,17,()=>e(v),e=>e.group.id,(t,r)=>{var a=mr(),o=j(a),c=I(o,!0),u=N(o,2),d=t=>{var n=pr(),i=I(n,!0);B(()=>l(i,e(r).group.summary)),y(t,n)};n(u,t=>{e(r).group.summary&&t(d)});var p=N(u,2);f(p,21,()=>e(r).cards,e=>e.id,(t,n)=>{{let r=i(()=>Q.has(e(n).id)),a=i(()=>nt([e(n).id],Q.ids,rt).map(b)),o=i(()=>Gn(e(n).id,Q.ids,rt).map(b));rr(t,{get card(){return e(n)},get on(){return e(r)},get lockedBy(){return e(a)},get alsoAdds(){return e(o)},onchange:t=>x(e(n).id,t)})}}),s(p),s(a),B(()=>{U(a,`aria-labelledby`,`group-${e(r).group.id}`),U(o,`id`,`group-${e(r).group.id}`),l(c,e(r).group.label),U(p,`aria-label`,`${e(r).group.label} features`)}),y(t,a)},t=>{var n=pr(),r=I(n);B(()=>l(r,`No features match "${e(d)??``}".`)),y(t,n)});var A=N(k,2),M=I(A,!0),P=N(A,2);le(P,{title:`Single records`,children:(e,t)=>{dr(e,{})},$$slots:{default:!0}}),s(S),B(()=>{l(O,`${e(_).length??``} ${e(_).length===1?`feature`:`features`}`),l(M,e(m))}),y(t,S),a()}function _r(e){let t=new Map;for(let n of e){let e=n.group?.id??n.id,r=t.get(e);r?(r.recipes.push(n),r.hasSubSwitches=!0):t.set(e,{id:e,label:n.group?.label??n.label,summary:n.group?.summary??n.summary,recipes:[n],hasSubSwitches:!1})}return[...t.values()].sort((e,t)=>e.label.localeCompare(t.label))}function vr(e,t){return e.recipes.some(e=>t.includes(e.id))}function yr(e,t,n){if(n){let n=e.recipes[0];return{add:n&&!vr(e,t)?[n.id]:[],remove:[]}}return{add:[],remove:e.recipes.map(e=>e.id)}}function br(e,t){return t?{add:[e],remove:[]}:{add:[],remove:[e]}}function xr(e,t,n){let r=e.recipes.filter(e=>t.includes(e.id)),i={};if(e.hasSubSwitches)for(let e of r){let r=nt([e.id],t,n);r.length&&(i[e.id]=r)}return{main:r.length?nt(e.recipes.map(e=>e.id),t,n):[],subs:i}}function Sr(e,t){let n=t.join(`, `);return e.hasSubSwitches?`${e.label} stays on while ${n} needs at least one ${e.label} recipe.`:`${e.label} stays on while ${n} needs it.`}function Cr(e,t,n){return`${t} is the last ${e.label} recipe on, and ${n.join(`, `)} needs one.`}var wr=c(`<p class="meta svelte-1d5gge1"> </p>`),Tr=c(`<div class="sub svelte-1d5gge1"><!> <p class="meta svelte-1d5gge1"> </p> <!></div>`),Er=c(`<li><h2 class="svelte-1d5gge1"> </h2> <p class="description svelte-1d5gge1"> </p> <!> <!> <!> <!></li>`),Dr=c(`<ul class="cards svelte-1d5gge1" aria-label="Recipes"></ul> <p class="notice svelte-1d5gge1" role="status" aria-live="polite"> </p>`,1);function Or(t,r){h(r,!0);let c=_r(Ze),u=D(``),d=e=>rt.get(e)?.label??e,p=e=>e.map(d).join(`, `);function m(e){let t=new Set(Q.ids);e.add.length&&Q.add(...e.add),e.remove.length&&Q.remove(...e.remove);let n=new Set(Q.ids),r=Q.ids.filter(e=>!t.has(e)),i=[...t].filter(e=>!n.has(e)),a=[];r.length&&a.push(`Added ${p(r)} to the menu.`),i.length&&a.push(`Removed ${p(i)} from the menu.`),W(u,a.join(` `),!0)}function g(e){let t=e.recipes[0];return!t||e.hasSubSwitches?``:[...t.requires.map(d),...(t.requiresAny??[]).map(e=>`one of ${p(e)}`)].join(`, `)}let _=e=>vr(e,Q.ids);var v=Dr(),x=R(v);f(x,21,()=>c,e=>e.id,(t,r)=>{let a=i(()=>_(e(r))),c=i(()=>xr(e(r),Q.ids,rt)),u=i(()=>e(c).main);var p=Er();let h;var v=j(p),x=I(v,!0),S=N(v,2),C=I(S,!0),w=N(S,2);{let t=i(()=>e(u).length>0),n=i(()=>`card-${e(r).id}-summary${e(u).length?` card-${e(r).id}-needed`:``}`);J(w,{get label(){return e(r).label},get checked(){return e(a)},get disabled(){return e(t)},get"aria-describedby"(){return e(n)},onchange:t=>m(yr(e(r),Q.ids,t.currentTarget.checked))})}var T=N(w,2),E=t=>{var n=wr(),i=I(n,!0);B(t=>{U(n,`id`,`card-${e(r).id}-needed`),l(i,t)},[()=>Sr(e(r),e(u).map(d))]),y(t,n)};n(T,t=>{e(u).length&&t(E)});var D=N(T,2),O=t=>{{let a=i(()=>`${e(r).label} recipes`);Ee(t,{get legend(){return e(a)},stack:!0,class:`subs`,children:(t,a)=>{var o=b(),u=R(o);f(u,17,()=>e(r).recipes,e=>e.id,(t,a)=>{let o=i(()=>Q.has(e(a).id)),u=i(()=>e(c).subs[e(a).id]??[]);var f=Tr(),p=j(f);{let t=i(()=>e(u).length>0),n=i(()=>`sub-${e(a).id}-summary${e(u).length?` sub-${e(a).id}-needed`:``}`);J(p,{get label(){return e(a).label},size:`sm`,get checked(){return e(o)},get disabled(){return e(t)},get"aria-describedby"(){return e(n)},onchange:t=>m(br(e(a).id,t.currentTarget.checked))})}var h=N(p,2),g=I(h,!0),_=N(h,2),v=t=>{var n=wr(),i=I(n,!0);B(t=>{U(n,`id`,`sub-${e(a).id}-needed`),l(i,t)},[()=>Cr(e(r),e(a).label,e(u).map(d))]),y(t,n)};n(_,t=>{e(u).length&&t(v)}),s(f),B(()=>{U(h,`id`,`sub-${e(a).id}-summary`),l(g,e(a).summary)}),y(t,f)}),y(t,o)},$$slots:{default:!0}})}};n(D,t=>{e(r).hasSubSwitches&&t(O)});var k=N(D,2),A=t=>{var n=wr(),i=I(n);B(e=>l(i,`Needs ${e??``}.`),[()=>g(e(r))]),y(t,n)},M=i(()=>!e(a)&&g(e(r)));n(k,t=>{e(M)&&t(A)}),s(p),B(()=>{h=o(p,1,`svelte-1d5gge1`,null,h,{selected:e(a)}),U(v,`id`,`card-${e(r).id}`),l(x,e(r).label),U(S,`id`,`card-${e(r).id}-summary`),l(C,e(r).summary)}),y(t,p)}),s(x);var S=N(x,2),C=I(S,!0);B(()=>l(C,e(u))),y(t,v),a()}var kr=c(`<div class="pane svelte-d580bl"><p class="meta svelte-d580bl">Defaults for this app. They apply to new records only; existing records
|
|
23
|
+
keep their values.</p> <!></div>`);function Ar(t,n){h(n,!0);let r=D(M(Z.settings())),i;function o(e){W(r,e,!0),clearTimeout(i),i=setTimeout(c,300)}function c(){clearTimeout(i),i=void 0,Z.setSettings(e(r))}O(()=>{let e=Z.settings();i===void 0&&W(r,e,!0)});var l=kr();C(`pagehide`,A,c),Lt(N(j(l),2),{get value(){return e(r)},onchange:o,idPrefix:`app-settings-tab`}),s(l),y(t,l),a()}var jr=c(`<button type="button"><span class="choice-name svelte-18m8le4"><span class="choice-icon svelte-18m8le4" aria-hidden="true"> </span> </span> <span class="preview svelte-18m8le4" aria-hidden="true"><span class="preview-sidebar svelte-18m8le4"><span class="svelte-18m8le4"></span><span class="svelte-18m8le4"></span><span class="svelte-18m8le4"></span></span> <span class="preview-main svelte-18m8le4"><span class="preview-title svelte-18m8le4"></span><span class="preview-body svelte-18m8le4"><span class="svelte-18m8le4"></span><span class="svelte-18m8le4"></span></span></span></span></button>`),Mr=c(`<button type="button"><span class="choice-name svelte-18m8le4"><span class="choice-icon svelte-18m8le4" aria-hidden="true"> </span> </span> <span class="choice-hint svelte-18m8le4"> </span></button>`),Nr=c(`<div class="cards svelte-18m8le4" role="group" aria-label="Theme look"></div> <div class="cards schemes svelte-18m8le4" role="group" aria-label="Appearance"></div>`,1),Pr=c(`<option> </option>`),Fr=c(`<p class="error svelte-18m8le4" role="alert">Use a hex colour like #c2410c.</p>`),Ir=c(`<section class="theme svelte-18m8le4" aria-label="Theme settings"><!> <div class="shape svelte-18m8le4" role="group" aria-label="Shape and contrast"><div class="field svelte-18m8le4"><!> <select id="theme-radius" class="svelte-18m8le4"></select></div> <div class="field svelte-18m8le4"><!> <select id="theme-density" class="svelte-18m8le4"></select></div> <div class="field svelte-18m8le4"><!> <select id="theme-contrast" class="svelte-18m8le4"></select></div></div> <div class="brand svelte-18m8le4"><div class="field svelte-18m8le4"><!> <div class="pick svelte-18m8le4"><span class="wheel svelte-18m8le4"><input id="theme-brand-colour" type="color" aria-label="Choose brand colour" class="svelte-18m8le4"/></span> <!></div></div> <div class="field font-field svelte-18m8le4"><!> <select id="theme-brand-font" class="svelte-18m8le4"><option>Theme default</option><!></select></div> <!></div> <!> <a class="advanced svelte-18m8le4"><span class="advanced-icon svelte-18m8le4" aria-hidden="true"></span> <span><strong class="svelte-18m8le4">Advanced Styles</strong><small class="svelte-18m8le4"> </small></span> <span class="arrow svelte-18m8le4" aria-hidden="true">→</span></a></section>`);function Lr(t,c){h(c,!0);let d=T(c,`provider`,3,!0),p=T(c,`advancedStylesHref`,3,`#/advanced-styles/`),m=ye(),b=i(()=>Z.theme?.custom),S=D(``),C=D(!1);O(()=>{W(S,e(b)?.primary??``,!0),W(C,!1)});let k={material:`◆`,glass:`◇`,studio:`▣`,smrt:`✦`,happyvertical:`⬡`},A=[{id:`light`,label:`Light`,icon:`☀`,hint:`Bright all the time`},{id:`dark`,label:`Dark`,icon:`☾`,hint:`Dim all the time`},{id:`system`,label:`Auto`,icon:`◐`,hint:`Follow this device`}],M=[{id:`none`,label:`None`},{id:`sm`,label:`Small`},{id:`md`,label:`Medium`},{id:`lg`,label:`Large`},{id:`xl`,label:`Extra large`},{id:`full`,label:`Full`}],P=[{id:`comfortable`,label:`Comfortable`},{id:`touch`,label:`Touch`}],F=[{id:`auto`,label:`Auto`},{id:`standard`,label:`Standard`},{id:`more`,label:`More`}],L={borderRadius:`md`,density:`comfortable`,contrast:`auto`};function z(e,t){Z.setTheme({...Z.theme,[e]:t===L[e]?void 0:t})}function V(t){let n=Be(t);W(C,!n),n&&Z.setTheme({...Z.theme,fontFamily:Z.theme?.fontFamily??e(b)?.fontFamily,custom:{primary:n}})}function H(t){let n=e(b)?{primary:e(b).primary}:void 0;Z.setTheme({...Z.theme,fontFamily:t||void 0,custom:n})}function ee(){Z.setTheme({...Z.theme,fontFamily:Z.theme?.fontFamily??e(b)?.fontFamily,custom:void 0})}let G=i(()=>{let e=Z.theme?.customCss;return!!e&&!Et(e??``)});var K=Ir(),te=j(K),ne=t=>{var n=Nr(),r=R(n);f(r,21,()=>be,e=>e.id,(t,n)=>{let r=i(()=>m.state.resolvedScheme===`dark`?e(n).dark:e(n).light);var a=jr();let c,u;var d=j(a),f=j(d),p=I(f,!0),h=N(f,1,!0);s(d),g(2),s(a),B(()=>{c=o(a,1,`choice preset svelte-18m8le4`,null,c,{selected:!e(b)&&(Z.theme?.preset??`glass`)===e(n).id}),U(a,`aria-pressed`,!e(b)&&(Z.theme?.preset??`glass`)===e(n).id),u=v(a,``,u,{"--smrt-planner-preview-bg":e(r).background,"--smrt-planner-preview-surface":e(r).surface,"--smrt-planner-preview-primary":e(r).primary,"--smrt-planner-preview-ink":e(r).onSurface}),l(p,k[e(n).id]),l(h,e(n).label)}),x(`click`,a,()=>m?.setPreset(e(n).id)),y(t,a)}),s(r);var a=N(r,2);f(a,21,()=>A,e=>e.id,(t,n)=>{var r=Mr();let i;var a=j(r),c=j(a),u=I(c,!0),d=N(c,1,!0);s(a);var f=N(a,2),p=I(f,!0);s(r),B(()=>{i=o(r,1,`choice scheme svelte-18m8le4`,null,i,{selected:m.state.colorScheme===e(n).id}),U(r,`aria-pressed`,m.state.colorScheme===e(n).id),l(u,e(n).icon),l(d,e(n).label),l(p,e(n).hint)}),x(`click`,r,()=>m?.setColorScheme(e(n).id)),y(t,r)}),s(a),y(t,n)};n(te,e=>{d()&&m&&e(ne)});var re=N(te,2),ie=j(re),ae=j(ie);Y(ae,{for:`theme-radius`,label:`Corner radius`});var oe=N(ae,2);f(oe,21,()=>M,e=>e.id,(t,n)=>{var r=Pr(),i=I(r,!0),a={};B(()=>{l(i,e(n).label),a!==(a=e(n).id)&&(r.value=(r.__value=a)??``)}),y(t,r)}),s(oe);var se;_(oe),s(ie);var q=N(ie,2),ce=j(q);Y(ce,{for:`theme-density`,label:`Density`});var le=N(ce,2);f(le,21,()=>P,e=>e.id,(t,n)=>{var r=Pr(),i=I(r,!0),a={};B(()=>{l(i,e(n).label),a!==(a=e(n).id)&&(r.value=(r.__value=a)??``)}),y(t,r)}),s(le);var de;_(le),s(q);var fe=N(q,2),pe=j(fe);Y(pe,{for:`theme-contrast`,label:`Contrast`});var he=N(pe,2);f(he,21,()=>F,e=>e.id,(t,n)=>{var r=Pr(),i=I(r,!0),a={};B(()=>{l(i,e(n).label),a!==(a=e(n).id)&&(r.value=(r.__value=a)??``)}),y(t,r)}),s(he);var ge;_(he),s(fe),s(re);var _e=N(re,2),ve=j(_e),xe=j(ve);Y(xe,{for:`theme-brand-colour`,label:`Brand colour`});var Se=N(xe,2),Ce=j(Se);let we;var J=j(Ce);w(J),s(Ce);var Te=N(Ce,2);me(Te,{type:`text`,"aria-label":`Brand colour hex`,placeholder:`#c2410c`,autocomplete:`off`,spellcheck:`false`,get value(){return e(S)},get"aria-invalid"(){return e(C)},oninput:t=>{W(S,t.currentTarget.value,!0),e(S).trim()&&V(e(S))}}),s(Se),s(ve);var Ee=N(ve,2),De=j(Ee);Y(De,{for:`theme-brand-font`,label:`Font`});var X=N(De,2),Oe=j(X);Oe.value=Oe.__value=``;var ke=N(Oe);f(ke,16,()=>Object.keys(He),e=>e,(e,t)=>{var n=Pr(),r=I(n,!0),i={};B(()=>{l(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),y(e,n)}),s(X);var Ae;_(X),s(Ee);var je=N(Ee,2),Me=e=>{ue(e,{variant:`secondary`,onclick:ee,children:(e,t)=>{g();var n=u(`Reset brand colour`);y(e,n)},$$slots:{default:!0}})};n(je,t=>{e(b)&&t(Me)}),s(_e);var Ne=N(_e,2),Pe=e=>{var t=Fr();y(e,t)};n(Ne,t=>{e(C)&&t(Pe)});var Fe=N(Ne,2),Ie=j(Fe);Ie.textContent=`{}`;var Le=N(Ie,2),Re=N(j(Le)),ze=I(Re,!0);s(Le),g(2),s(Fe),s(K),B(()=>{se!==(se=Z.theme?.borderRadius??L.borderRadius)&&(oe.value=(oe.__value=se)??``,r(oe,se)),de!==(de=Z.theme?.density??L.density)&&(le.value=(le.__value=de)??``,r(le,de)),ge!==(ge=Z.theme?.contrast??L.contrast)&&(he.value=(he.__value=ge)??``,r(he,ge)),we=v(Ce,``,we,{"--smrt-planner-picked-color":e(b)?.primary??`#e68a00`}),E(J,e(b)?.primary??`#e68a00`),Ae!==(Ae=Z.theme?.fontFamily??e(b)?.fontFamily??``)&&(X.value=(X.__value=Ae)??``,r(X,Ae)),U(Fe,`href`,p()),l(ze,e(G)?`This cookbook has custom CSS waiting for your approval`:`Edit custom CSS for your app`)}),x(`change`,oe,e=>z(`borderRadius`,e.currentTarget.value)),x(`change`,le,e=>z(`density`,e.currentTarget.value)),x(`change`,he,e=>z(`contrast`,e.currentTarget.value)),x(`input`,J,e=>V(e.currentTarget.value)),x(`change`,X,e=>H(e.currentTarget.value)),y(t,K),a()}S([`click`,`change`,`input`]);function Rr(e){return{get ids(){return e.snapshot().recipes.map(e=>e.id)},add:(...t)=>void e.run({name:`add_recipes`,input:{ids:t}}),remove:(...t)=>void e.run({name:`remove_recipes`,input:{ids:t}})}}function zr(e){return{read:()=>{let{currency:t,taxRate:n,paymentTerms:r,pricesIncludeTax:i,taxRounding:a}=e.snapshot().settings;return{currency:t,taxRate:Number((n/100).toFixed(6)),paymentTerms:r,pricesIncludeTax:i,taxRounding:a}},write:t=>{e.run({name:`set_settings`,input:{currency:t.currency,taxRate:Number((t.taxRate*100).toFixed(4)),...t.paymentTerms?{paymentTerms:t.paymentTerms}:{},pricesIncludeTax:t.pricesIncludeTax,taxRounding:t.taxRounding}})}}}function Br(e){return{read:()=>{let t=e.snapshot().theme,{preset:n,primary:r,colorScheme:i}=t,a={};return n&&(a.preset=n),r&&(a.custom={primary:r}),i!==`system`&&(a.colorScheme=i),t.borderRadius&&(a.borderRadius=t.borderRadius),t.density&&(a.density=t.density),t.contrast&&(a.contrast=t.contrast),Object.keys(a).length?a:void 0},write:t=>{t?(e.run({name:`reset_theme`,input:{}}),e.run({name:`set_theme`,input:{...t.preset?{preset:t.preset}:{},...t.custom?{primary:t.custom.primary}:{},...t.colorScheme?{colorScheme:t.colorScheme}:{},...t.borderRadius?{borderRadius:t.borderRadius}:{},...t.density?{density:t.density}:{},...t.contrast?{contrast:t.contrast}:{}}})):e.run({name:`reset_theme`,input:{}})}}}function Vr(e,t){let n=Br(e),r=`browser`,i,a=()=>null;if(`chat`in t){let e=t.chat;a=()=>typeof e==`function`?e():e}else{let n=Fe(t);if(i=n.notice,r=n.config.mode,n.config.mode===`host`&&n.config.host){let t=Oe({endpoint:n.config.host.endpoint,snapshot:()=>e.snapshot()});a=()=>t}else if(n.config.mode===`byo`){let e=n.config.byo?.presets;a=()=>je(Ve(),e,void 0,n.config.credentialPersistence)}}let o=new Re(n,e);return{transport:ze({model:a,acceptCommands:r===`host`,unavailable:r===`byo`?`Connect your model on the AI page first, then I can help.`:`No model is connected yet, so I cannot help. The planner works without one.`,store:Rr(e),recipes:Ze,cookbooks:[],settings:zr(e),theme:n,themeUndos:o,controller:e,onReply:t.onReply,menu:()=>e===st&&ot.openSection?e.snapshot().sections.filter(e=>!e.hidden).map(({id:e,label:t})=>({id:e,label:t})):[]}),themeUndos:o,mode:r,...i?{notice:i}:{}}}function Hr(e,t){h(t,!0);let n=T(t,`controller`,3,st),r=T(t,`persistence`,3,`self`),i=T(t,`links`,3,`path`),o=ft()??mt(bt());F(()=>{(t.basePath!==void 0||i()!==`path`)&&oe(t.basePath??``,i())}),z(()=>{let e=ot.onReplaced;ot.onReplaced=()=>o.reset?.(),r()===`self`&&!Z.loaded&&(ct.load(),Z.hydrate(``,Ve()));let i=t.inference?Vr(n(),t.inference):void 0;return t.inference&&(`chat`in t.inference?Ne.useChat(t.inference.chat,`Host model`):Ne.configure(Fe(t.inference)),Ne.hydrate(Q.ids.length>0||Q.features.length>0)),t.onready?.({controller:n(),...i?{assistant:i}:{}}),()=>{ot.onReplaced=e}}),O(()=>{r()===`self`&&(JSON.stringify(Z.snapshot()),Z.scheduleSave())}),C(`pagehide`,A,()=>r()===`self`&&Z.flush()),a()}var Ur=c(`<div><!></div>`),Wr=c(`<div class="pane svelte-zuxcuo"><p class="meta svelte-zuxcuo">Reorder, move or hide navigation entries and choose which panels show.
|
|
24
|
+
The layout is saved with the cookbook.</p> <!></div>`),Gr=c(`<!> <!> <!> <!> <!> <!> <!>`,1),Kr=c(`<div class="planner svelte-zuxcuo"><!></div>`),qr=c(`<!> <!>`,1);function Jr(t,r){h(r,!0);let o=t=>{var a=Kr(),o=j(a);Ye(o,{get tabs(){return e(S)},get active(){return e(C)},onchange:M,"aria-label":`Planner`,children:(t,a)=>{var o=Gr(),c=R(o),l=t=>{var n=Ur();Jt(j(n),{}),s(n),B(()=>U(n,`hidden`,e(C)!==`cookbooks`)),y(t,n)},u=i(()=>e(x).includes(`cookbooks`));n(c,t=>{e(u)&&t(l)});var d=N(c,2),f=t=>{var n=Ur();Or(j(n),{}),s(n),B(()=>U(n,`hidden`,e(C)!==`recipes`)),y(t,n)},m=i(()=>e(x).includes(`recipes`));n(d,t=>{e(m)&&t(f)});var h=N(d,2),g=t=>{var n=Ur();gr(j(n),{}),s(n),B(()=>U(n,`hidden`,e(C)!==`features`)),y(t,n)},_=i(()=>e(x).includes(`features`));n(h,t=>{e(_)&&t(g)});var v=N(h,2),b=t=>{var n=Wr(),r=N(j(n),2);{let t=i(()=>E??A??void 0);he(r,{get controller(){return e(t)}})}s(n),B(()=>U(n,`hidden`,e(C)!==`layout`)),y(t,n)},S=i(()=>e(x).includes(`layout`));n(v,t=>{e(S)&&t(b)});var w=N(v,2),T=t=>{var n=Ur();Lr(j(n),{get provider(){return p()},get advancedStylesHref(){return r.advancedStylesHref}}),s(n),B(()=>U(n,`hidden`,e(C)!==`theme`)),y(t,n)},D=i(()=>e(x).includes(`theme`));n(w,t=>{e(D)&&t(T)});var O=N(w,2),k=t=>{var n=Ur();Ar(j(n),{}),s(n),B(()=>U(n,`hidden`,e(C)!==`settings`)),y(t,n)},M=i(()=>e(x).includes(`settings`));n(O,t=>{e(M)&&t(k)});var P=N(O,2),F=t=>{var n=Ur();jn(j(n),{}),s(n),B(()=>U(n,`hidden`,e(C)!==`export`)),y(t,n)},I=i(()=>e(x).includes(`export`));n(P,t=>{e(I)&&t(F)}),y(t,o)},$$slots:{default:!0}}),s(a),k(a,e=>W(P,e),()=>e(P)),y(t,a)},c=[`cookbooks`,`recipes`,`theme`,`settings`,`export`],l=[`features`,`layout`],u=T(r,`controller`,3,st),d=T(r,`layout`,3,`own`),f=T(r,`persistence`,3,`self`),p=T(r,`themeControls`,3,!1),m=T(r,`tabs`,3,c),g=T(r,`managedByParent`,3,!1);ft()||mt(bt());let _=Se()!==null,v={cookbooks:`Cookbooks`,recipes:`Recipes`,features:`Features`,layout:`Layout`,theme:`Theme`,settings:`Settings`,export:`Export`},b=i(()=>m().filter(e=>it.includes(e))),x=i(()=>m()===c?[...e(b),...l]:e(b)),S=i(()=>e(b).map(e=>({id:e,label:v[e]}))),C=i(()=>e(x).includes(at.active)?at.active:e(b)[0]??`recipes`),w=L(()=>d()),E=w===`own`?new fe({nav:()=>[],groups:()=>Tt({recipes:Q.ids,features:Q.features}),panels:()=>void 0,layout:()=>Z.layout,editable:()=>!0,commit:e=>Z.setLayout(e)}):null,A=w===`shell`?_e():null,M=e=>{let t=it.find(t=>t===e);t&&(at.active=t)};z(()=>u().subscribe(e=>{let t=e.focus.tab;t&&t!==at.active&&(at.active=t)}));let P=D(null),F;O(()=>{let t=e(C);F===void 0||F===t?F=t:(F=t,V().then(()=>{e(P)?.querySelector(`[role="tablist"]`)?.scrollIntoView({block:`nearest`})}))}),O(()=>{let e=at.active;L(()=>{u().snapshot().focus.tab!==e&&u().run({name:`focus`,input:{tab:e}})})});var I=qr(),H=R(I),ee=e=>{Hr(e,{get controller(){return u()},get basePath(){return r.basePath},get inference(){return r.inference},get persistence(){return f()},get onready(){return r.onready}})};n(H,e=>{g()||e(ee)});var G=N(H,2),K=e=>{o(e)},te=e=>{de(e,{children:(e,t)=>{o(e)},$$slots:{default:!0}})};n(G,e=>{_?e(K):e(te,-1)}),y(t,I),a()}var Yr=c(`<section class="first-run svelte-1uha8ag" aria-labelledby="first-run-title"><h1 id="first-run-title" class="svelte-1uha8ag">Set up your assistant</h1> <p class="meta svelte-1uha8ag"> </p> <!> <div class="actions svelte-1uha8ag"><!> <!></div></section>`),Xr=c(`<main class="svelte-1uha8ag"><!></main>`);function Zr(r,o){h(o,!0);let c=i(wt);var d=Xr();t(`1uha8ag`,t=>{P(()=>{H.title=`${e(c)??``} · smrt planner`})});var f=j(d),p=e=>{var t=Yr(),n=N(j(t),2),r=I(n,!0),i=N(n,2);Dt(i,{});var a=N(i,2),o=j(a);ue(o,{onclick:()=>Ne.continueFirstRun(),children:(e,t)=>{g();var n=u(`Continue`);y(e,n)},$$slots:{default:!0}});var c=N(o,2);ue(c,{variant:`secondary`,onclick:()=>Ne.dismissFirstRun(),children:(e,t)=>{g();var n=u(`I don't need AI, let's just build`);y(e,n)},$$slots:{default:!0}}),s(a),s(t),B(()=>l(r,Ne.privacyNote)),y(e,t)},m=t=>{{let n=i(()=>ce(`/advanced-styles/`));Jr(t,{layout:`shell`,persistence:`host`,themeControls:!0,get advancedStylesHref(){return e(n)}})}};n(f,e=>{Ne.firstRun?e(p):e(m,-1)}),s(d),y(r,d),a()}export{Zr as component};
|