@happyvertical/smrt-planner 0.57.8 → 0.57.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (478) hide show
  1. package/app/404.html +18 -18
  2. package/app/_app/immutable/chunks/{B45qMR8U.js → 181pofES.js} +21 -21
  3. package/app/_app/immutable/chunks/{COQVmnKJ.js → B3hYhkYV.js} +1 -1
  4. package/app/_app/immutable/chunks/B53CwELp.js +1 -0
  5. package/app/_app/immutable/chunks/{C7boms_S.js → BIoR0hZt.js} +1 -1
  6. package/app/_app/immutable/chunks/{DqrQeG8L.js → BPckYchm.js} +1 -1
  7. package/app/_app/immutable/chunks/{CiNYyHrL.js → BiFuvGxR.js} +1 -1
  8. package/app/_app/immutable/chunks/{BWd9iJf7.js → Bm3rKxox.js} +1 -1
  9. package/app/_app/immutable/chunks/{DWeCJh9N.js → BohhHb_e.js} +1 -1
  10. package/app/_app/immutable/chunks/{CTlovRev.js → BtowvSCA.js} +1 -1
  11. package/app/_app/immutable/chunks/{ptmcJq5j.js → C1NxBQaE.js} +1 -1
  12. package/app/_app/immutable/chunks/{BlJ-05MM.js → C6XmYxTW.js} +1 -1
  13. package/app/_app/immutable/chunks/{Cmh0yR4f.js → C7IhEh2q.js} +1 -1
  14. package/app/_app/immutable/chunks/CAqvk2IB.js +1 -0
  15. package/app/_app/immutable/chunks/{DziaAoFY.js → CE4bn0-6.js} +1 -1
  16. package/app/_app/immutable/chunks/{QJX7BlhI.js → CLd6ylMC.js} +1 -1
  17. package/app/_app/immutable/chunks/{DKi2uwTq.js → CxTGWFx4.js} +1 -1
  18. package/app/_app/immutable/chunks/{DmvHEN1v.js → DH61ZkSq.js} +1 -1
  19. package/app/_app/immutable/chunks/{Ywu-998J.js → DOkn8C67.js} +2 -2
  20. package/app/_app/immutable/chunks/{nB-x9BEp.js → DUwAL-1A.js} +1 -1
  21. package/app/_app/immutable/chunks/{C6HSENij.js → DVUoNtbx.js} +1 -1
  22. package/app/_app/immutable/chunks/{CaiMTXlW.js → DYiyikup.js} +1 -1
  23. package/app/_app/immutable/chunks/{Ct5r3XV1.js → Dxmrd4l9.js} +1 -1
  24. package/app/_app/immutable/chunks/{DoGeTgSe.js → KTvSuL9k.js} +1 -1
  25. package/app/_app/immutable/chunks/{BU0vd8nA.js → K_Eb6Nei.js} +1 -1
  26. package/app/_app/immutable/chunks/L9bkC5PQ.js +1 -0
  27. package/app/_app/immutable/chunks/{D_xoWitl.js → Nwzk4hDB.js} +1 -1
  28. package/app/_app/immutable/chunks/{BfeotTF9.js → QgvgSIl1.js} +3 -3
  29. package/app/_app/immutable/chunks/{D0m3WNVh.js → dggLG4_7.js} +1 -1
  30. package/app/_app/immutable/chunks/{C8kJ-wTn.js → w7gJm5x8.js} +1 -1
  31. package/app/_app/immutable/entry/{app.g4Bu04a3.js → app.TPLqdveB.js} +2 -2
  32. package/app/_app/immutable/entry/start.DZ9KcjZ1.js +1 -0
  33. package/app/_app/immutable/nodes/{0.C6N6B83E.js → 0.CJBw99gi.js} +1 -1
  34. package/app/_app/immutable/nodes/{1.9pTjyJp5.js → 1.D7cBnefl.js} +1 -1
  35. package/app/_app/immutable/nodes/{10.BkbBDSaP.js → 10.CFkowCqD.js} +1 -1
  36. package/app/_app/immutable/nodes/{11.BcVi4XqZ.js → 11.DoNoZpx5.js} +1 -1
  37. package/app/_app/immutable/nodes/{12.j9PkVob2.js → 12.BWn8ggfg.js} +1 -1
  38. package/app/_app/immutable/nodes/{13.BOUYEx8n.js → 13.DZOKpuwM.js} +1 -1
  39. package/app/_app/immutable/nodes/{14.CuMuuCU7.js → 14.ByqCSsNX.js} +1 -1
  40. package/app/_app/immutable/nodes/{2.BHCkcrHF.js → 2.DtE7b-Hp.js} +3 -3
  41. package/app/_app/immutable/nodes/{3.D6l9gEJu.js → 3.BdYyZYSL.js} +1 -1
  42. package/app/_app/immutable/nodes/{4.BUHWJvB3.js → 4.BMAU11zH.js} +1 -1
  43. package/app/_app/immutable/nodes/{5.C1jfy8Yg.js → 5.CFopDcY8.js} +1 -1
  44. package/app/_app/immutable/nodes/{6.LSyNtBLJ.js → 6.Cflfdg2v.js} +1 -1
  45. package/app/_app/immutable/nodes/{7.CC7rRIn7.js → 7.Dg0lAhiN.js} +1 -1
  46. package/app/_app/immutable/nodes/{8.S9H6LDRX.js → 8.jgOv7VYZ.js} +1 -1
  47. package/app/_app/immutable/nodes/{9.BPt57fDH.js → 9.D76pJ13W.js} +1 -1
  48. package/app/_app/version.json +1 -1
  49. package/app/advanced-styles/index.html +21 -21
  50. package/app/ai/index.html +24 -24
  51. package/app/blueprint/index.html +19 -19
  52. package/app/cookbook/index.html +19 -19
  53. package/app/index.html +27 -27
  54. package/app/m/ads/AdDeliveryTier/index.html +23 -23
  55. package/app/m/ads/AdEvent/index.html +23 -23
  56. package/app/m/ads/AdFormat/index.html +23 -23
  57. package/app/m/ads/AdGroup/index.html +23 -23
  58. package/app/m/ads/AdVariation/index.html +23 -23
  59. package/app/m/analytics/AnalyticsDataStream/index.html +23 -23
  60. package/app/m/analytics/AnalyticsEvent/index.html +23 -23
  61. package/app/m/analytics/AnalyticsProperty/index.html +23 -23
  62. package/app/m/analytics/AnalyticsReport/index.html +23 -23
  63. package/app/m/approvals/ApprovalEvent/index.html +23 -23
  64. package/app/m/approvals/ApprovalPolicy/index.html +23 -23
  65. package/app/m/approvals/ApprovalRequest/index.html +23 -23
  66. package/app/m/assets/Asset/attachments/index.html +24 -24
  67. package/app/m/assets/Asset/index.html +23 -23
  68. package/app/m/assets/AssetAssociation/index.html +23 -23
  69. package/app/m/assets/AssetMetafield/index.html +23 -23
  70. package/app/m/assets/AssetStatus/index.html +23 -23
  71. package/app/m/assets/AssetType/index.html +23 -23
  72. package/app/m/assets/Folder/index.html +23 -23
  73. package/app/m/chat/AgentSession/index.html +23 -23
  74. package/app/m/chat/ChatMessage/index.html +23 -23
  75. package/app/m/chat/ChatParticipant/index.html +23 -23
  76. package/app/m/chat/ChatReaction/index.html +23 -23
  77. package/app/m/chat/ChatRoom/index.html +23 -23
  78. package/app/m/chat/ChatThread/index.html +23 -23
  79. package/app/m/chat/VoiceGatewayTurn/index.html +23 -23
  80. package/app/m/chat/VoiceSession/index.html +23 -23
  81. package/app/m/commerce/Agreement/index.html +23 -23
  82. package/app/m/commerce/Cart/index.html +23 -23
  83. package/app/m/commerce/Contract/index.html +23 -23
  84. package/app/m/commerce/ContractLineItem/index.html +23 -23
  85. package/app/m/commerce/Customer/index.html +23 -23
  86. package/app/m/commerce/DocumentTax/index.html +23 -23
  87. package/app/m/commerce/Estimate/index.html +23 -23
  88. package/app/m/commerce/Fulfillment/index.html +23 -23
  89. package/app/m/commerce/FulfillmentLineItem/index.html +23 -23
  90. package/app/m/commerce/HistoricalCustomerFunds/index.html +23 -23
  91. package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +23 -23
  92. package/app/m/commerce/HistoricalSalesLine/index.html +23 -23
  93. package/app/m/commerce/Invoice/index.html +23 -23
  94. package/app/m/commerce/InvoiceLineItem/index.html +23 -23
  95. package/app/m/commerce/Lease/index.html +23 -23
  96. package/app/m/commerce/LicenseSale/index.html +23 -23
  97. package/app/m/commerce/Order/index.html +23 -23
  98. package/app/m/commerce/Payment/index.html +23 -23
  99. package/app/m/commerce/PaymentAllocation/index.html +23 -23
  100. package/app/m/commerce/PaymentInstrument/index.html +23 -23
  101. package/app/m/commerce/PaymentIntent/index.html +23 -23
  102. package/app/m/commerce/Payout/index.html +23 -23
  103. package/app/m/commerce/ProductionOrder/index.html +23 -23
  104. package/app/m/commerce/PurchaseContract/index.html +23 -23
  105. package/app/m/commerce/PurchaseOrder/index.html +23 -23
  106. package/app/m/commerce/SalesContract/index.html +23 -23
  107. package/app/m/commerce/SupplierQuote/index.html +23 -23
  108. package/app/m/commerce/TaxCode/index.html +23 -23
  109. package/app/m/commerce/TaxComponent/index.html +23 -23
  110. package/app/m/commerce/TaxSettings/index.html +23 -23
  111. package/app/m/commerce/TaxSummaryReport/index.html +23 -23
  112. package/app/m/commerce/Vendor/index.html +23 -23
  113. package/app/m/commerce/WholesaleOrder/index.html +23 -23
  114. package/app/m/content/Content/index.html +23 -23
  115. package/app/m/content/ContentContribution/index.html +23 -23
  116. package/app/m/content/ContentContributionAttachment/index.html +23 -23
  117. package/app/m/content/ContentContributionRevision/index.html +23 -23
  118. package/app/m/content/ContentContributionType/index.html +23 -23
  119. package/app/m/content/ContentContributor/index.html +23 -23
  120. package/app/m/content/ContentCorrection/index.html +23 -23
  121. package/app/m/content/ContentFeedSource/index.html +23 -23
  122. package/app/m/content/ContentGovernanceAssignment/index.html +23 -23
  123. package/app/m/content/ContentGovernancePolicy/index.html +23 -23
  124. package/app/m/content/ContentGovernanceProfile/index.html +23 -23
  125. package/app/m/content/ContentReference/index.html +23 -23
  126. package/app/m/content/ContentReview/index.html +23 -23
  127. package/app/m/content/ContentVersion/index.html +23 -23
  128. package/app/m/events/Event/index.html +23 -23
  129. package/app/m/events/EventParticipant/index.html +23 -23
  130. package/app/m/events/EventSeries/index.html +23 -23
  131. package/app/m/events/EventType/index.html +23 -23
  132. package/app/m/expenses/Expense/index.html +23 -23
  133. package/app/m/facts/Fact/index.html +23 -23
  134. package/app/m/facts/FactContent/index.html +23 -23
  135. package/app/m/facts/FactEvidence/index.html +23 -23
  136. package/app/m/facts/FactSource/index.html +23 -23
  137. package/app/m/facts/FactSubject/index.html +23 -23
  138. package/app/m/facts/FactTag/index.html +23 -23
  139. package/app/m/fields/FieldPolicy/index.html +23 -23
  140. package/app/m/fields/FieldPolicySuggestion/index.html +23 -23
  141. package/app/m/fields/FieldUsageCounter/index.html +23 -23
  142. package/app/m/images/Image/index.html +23 -23
  143. package/app/m/inventory/InventoryLocation/index.html +23 -23
  144. package/app/m/inventory/StockLevel/index.html +23 -23
  145. package/app/m/inventory/StockMovement/index.html +23 -23
  146. package/app/m/ledgers/Account/index.html +23 -23
  147. package/app/m/ledgers/Journal/index.html +23 -23
  148. package/app/m/ledgers/JournalEntry/index.html +23 -23
  149. package/app/m/ledgers/Ledger/index.html +23 -23
  150. package/app/m/manufacturing/Assembly/index.html +23 -23
  151. package/app/m/manufacturing/BillOfMaterials/index.html +23 -23
  152. package/app/m/manufacturing/BomLine/index.html +23 -23
  153. package/app/m/manufacturing/Operation/index.html +23 -23
  154. package/app/m/manufacturing/ProductionRun/index.html +23 -23
  155. package/app/m/manufacturing/ProductionRunCompletion/index.html +23 -23
  156. package/app/m/manufacturing/RoutingStep/index.html +23 -23
  157. package/app/m/marketing/Campaign/index.html +23 -23
  158. package/app/m/marketing/CampaignChannel/index.html +23 -23
  159. package/app/m/marketing/CampaignMetricSnapshot/index.html +23 -23
  160. package/app/m/messages/Account/index.html +23 -23
  161. package/app/m/messages/Attachment/index.html +23 -23
  162. package/app/m/messages/Blacklist/index.html +23 -23
  163. package/app/m/messages/Email/failed-sends/index.html +24 -24
  164. package/app/m/messages/Email/index.html +23 -23
  165. package/app/m/messages/Email/mailbox/index.html +24 -24
  166. package/app/m/messages/EmailAccount/index.html +23 -23
  167. package/app/m/messages/EmailAttachment/index.html +23 -23
  168. package/app/m/messages/EmailFolder/index.html +23 -23
  169. package/app/m/messages/Message/index.html +23 -23
  170. package/app/m/messages/MessagingEndpoint/index.html +23 -23
  171. package/app/m/messages/PersonaMessageRoute/index.html +23 -23
  172. package/app/m/messages/SlackAccount/index.html +23 -23
  173. package/app/m/messages/SlackMessage/index.html +23 -23
  174. package/app/m/messages/TelegramAccount/index.html +23 -23
  175. package/app/m/messages/Tweet/index.html +23 -23
  176. package/app/m/messages/TwitterAccount/index.html +23 -23
  177. package/app/m/messages/Whitelist/index.html +23 -23
  178. package/app/m/messages/ZulipAccount/index.html +23 -23
  179. package/app/m/places/Place/index.html +23 -23
  180. package/app/m/places/PlaceType/index.html +23 -23
  181. package/app/m/products/Category/index.html +23 -23
  182. package/app/m/products/Material/index.html +23 -23
  183. package/app/m/products/Product/index.html +23 -23
  184. package/app/m/products/Product/ingredients/index.html +24 -24
  185. package/app/m/products/ProductVariant/index.html +23 -23
  186. package/app/m/products/Sku/index.html +23 -23
  187. package/app/m/profiles/ApiKey/index.html +23 -23
  188. package/app/m/profiles/Bot/index.html +23 -23
  189. package/app/m/profiles/MagicLinkToken/index.html +23 -23
  190. package/app/m/profiles/NostrIdentity/index.html +23 -23
  191. package/app/m/profiles/OidcIdentity/index.html +23 -23
  192. package/app/m/profiles/Organization/index.html +23 -23
  193. package/app/m/profiles/Person/index.html +23 -23
  194. package/app/m/profiles/Profile/index.html +23 -23
  195. package/app/m/profiles/ProfileMetadata/index.html +23 -23
  196. package/app/m/profiles/ProfileMetafield/index.html +23 -23
  197. package/app/m/profiles/ProfileRelationship/index.html +23 -23
  198. package/app/m/profiles/ProfileRelationshipTerm/index.html +23 -23
  199. package/app/m/profiles/ProfileRelationshipType/index.html +23 -23
  200. package/app/m/profiles/ProfileType/index.html +23 -23
  201. package/app/m/projects/Comment/index.html +23 -23
  202. package/app/m/projects/Issue/index.html +23 -23
  203. package/app/m/projects/Label/index.html +23 -23
  204. package/app/m/projects/Project/index.html +23 -23
  205. package/app/m/projects/ProjectIntegration/index.html +23 -23
  206. package/app/m/projects/PullRequest/index.html +23 -23
  207. package/app/m/projects/Repository/index.html +23 -23
  208. package/app/m/properties/Property/index.html +23 -23
  209. package/app/m/properties/Zone/index.html +23 -23
  210. package/app/m/reports/RuntimeReport/index.html +23 -23
  211. package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +23 -23
  212. package/app/m/reports/SmrtReportLock/index.html +23 -23
  213. package/app/m/reports/SmrtReportRefreshTask/index.html +23 -23
  214. package/app/m/reports/SmrtReportRun/index.html +23 -23
  215. package/app/m/reports/SmrtReportSchedule/index.html +23 -23
  216. package/app/m/reports/SmrtReportWatermark/index.html +23 -23
  217. package/app/m/sales/Agreement/index.html +23 -23
  218. package/app/m/sales/AttributionException/index.html +23 -23
  219. package/app/m/sales/AttributionPolicy/index.html +23 -23
  220. package/app/m/sales/Commission/index.html +23 -23
  221. package/app/m/sales/CommissionAdjustment/index.html +23 -23
  222. package/app/m/sales/CommissionPayout/index.html +23 -23
  223. package/app/m/sales/CommissionPlan/index.html +23 -23
  224. package/app/m/sales/Earner/index.html +23 -23
  225. package/app/m/sales/EarnerSourceAttribution/index.html +23 -23
  226. package/app/m/sales/EarningEvent/index.html +23 -23
  227. package/app/m/sales/ExecutedAgreement/index.html +23 -23
  228. package/app/m/sales/Lead/index.html +23 -23
  229. package/app/m/sales/Opportunity/index.html +23 -23
  230. package/app/m/sales/OpportunityConversion/index.html +23 -23
  231. package/app/m/sales/PipelineDefinition/index.html +23 -23
  232. package/app/m/sales/PipelineStage/index.html +23 -23
  233. package/app/m/sales/Referral/index.html +23 -23
  234. package/app/m/sales/ReferralAgreement/index.html +23 -23
  235. package/app/m/sales/ReferralLink/index.html +23 -23
  236. package/app/m/sales/ReferralProgram/index.html +23 -23
  237. package/app/m/sales/ReferralTermSnapshot/index.html +23 -23
  238. package/app/m/sales/ReferralTouch/index.html +23 -23
  239. package/app/m/sales/Referrer/index.html +23 -23
  240. package/app/m/sales/SalesActivity/index.html +23 -23
  241. package/app/m/sales/SalesRepresentative/index.html +23 -23
  242. package/app/m/sites/Site/index.html +23 -23
  243. package/app/m/sites/SiteAgentBinding/index.html +23 -23
  244. package/app/m/social/OAuthState/index.html +23 -23
  245. package/app/m/social/SocialAccount/index.html +23 -23
  246. package/app/m/social/SocialPost/index.html +23 -23
  247. package/app/m/social/SocialPostAnalyticsSnapshot/index.html +23 -23
  248. package/app/m/subscriptions/BillingAdjustment/index.html +23 -23
  249. package/app/m/subscriptions/ClientCharge/index.html +23 -23
  250. package/app/m/subscriptions/CreditGrant/index.html +23 -23
  251. package/app/m/subscriptions/PricingRule/index.html +23 -23
  252. package/app/m/subscriptions/RetailCharge/index.html +23 -23
  253. package/app/m/subscriptions/SpendingPolicy/index.html +23 -23
  254. package/app/m/subscriptions/SubscriptionPlan/index.html +23 -23
  255. package/app/m/subscriptions/TenantSubscription/index.html +23 -23
  256. package/app/m/subscriptions/TenantUsageMetric/index.html +23 -23
  257. package/app/m/support/ServiceTimeEntry/index.html +23 -23
  258. package/app/m/support/SupportAiRun/index.html +23 -23
  259. package/app/m/support/SupportAvailability/index.html +23 -23
  260. package/app/m/support/SupportCase/index.html +23 -23
  261. package/app/m/support/SupportCaseEvent/index.html +23 -23
  262. package/app/m/support/SupportChannelBinding/index.html +23 -23
  263. package/app/m/support/SupportCharge/index.html +23 -23
  264. package/app/m/support/SupportCompensation/index.html +23 -23
  265. package/app/m/support/SupportCompensationPlan/index.html +23 -23
  266. package/app/m/support/SupportEscalation/index.html +23 -23
  267. package/app/m/support/SupportInteraction/index.html +23 -23
  268. package/app/m/support/SupportPlan/index.html +23 -23
  269. package/app/m/support/SupportPolicy/index.html +23 -23
  270. package/app/m/support/SupportQualification/index.html +23 -23
  271. package/app/m/support/SupportServiceTarget/index.html +23 -23
  272. package/app/m/support/SupportSpecialist/index.html +23 -23
  273. package/app/m/support/SupportWorkLink/index.html +23 -23
  274. package/app/m/tags/Tag/index.html +23 -23
  275. package/app/m/tags/TagAlias/index.html +23 -23
  276. package/app/m/timesheets/AttendanceBreak/index.html +23 -23
  277. package/app/m/timesheets/AttendancePunch/index.html +23 -23
  278. package/app/m/timesheets/AttendanceSegment/index.html +23 -23
  279. package/app/m/timesheets/ServiceChargeSnapshot/index.html +23 -23
  280. package/app/m/timesheets/ServiceCompensationSnapshot/index.html +23 -23
  281. package/app/m/timesheets/ServiceTimeEntry/index.html +23 -23
  282. package/app/m/users/Group/index.html +23 -23
  283. package/app/m/users/GroupMember/index.html +23 -23
  284. package/app/m/users/GroupRole/index.html +23 -23
  285. package/app/m/users/Membership/index.html +23 -23
  286. package/app/m/users/MembershipOverride/index.html +23 -23
  287. package/app/m/users/Permission/index.html +23 -23
  288. package/app/m/users/Role/index.html +23 -23
  289. package/app/m/users/RolePermission/index.html +23 -23
  290. package/app/m/users/Session/index.html +23 -23
  291. package/app/m/users/Tenant/index.html +23 -23
  292. package/app/m/users/TenantIntegration/index.html +23 -23
  293. package/app/m/users/TenantPermissionOverride/index.html +23 -23
  294. package/app/m/users/User/index.html +23 -23
  295. package/app/m/video/Character/index.html +23 -23
  296. package/app/m/video/CharacterAsset/index.html +23 -23
  297. package/app/m/video/CompositeJob/index.html +23 -23
  298. package/app/m/video/Performer/index.html +23 -23
  299. package/app/m/video/PerformerAsset/index.html +23 -23
  300. package/app/m/video/Scene/index.html +23 -23
  301. package/app/m/video/SceneAsset/index.html +23 -23
  302. package/app/m/video/VideoComposition/index.html +23 -23
  303. package/app/m/video/VideoCompositionAsset/index.html +23 -23
  304. package/app/m/video/VideoSequence/index.html +23 -23
  305. package/app/m/video/VideoSequenceAsset/index.html +23 -23
  306. package/app/m/video/VideoShot/index.html +23 -23
  307. package/app/m/video/VideoShotAsset/index.html +23 -23
  308. package/app/m/video/VideoShotCharacter/index.html +23 -23
  309. package/app/m/video/VideoWorkflow/index.html +23 -23
  310. package/app/m/voice/VoiceOutput/index.html +23 -23
  311. package/app/m/voice/VoiceProfile/index.html +23 -23
  312. package/app/m/voice/VoiceSample/index.html +23 -23
  313. package/app/mcp.html +1 -1
  314. package/app/packages/ads/index.html +21 -21
  315. package/app/packages/analytics/index.html +21 -21
  316. package/app/packages/approvals/index.html +21 -21
  317. package/app/packages/assets/index.html +21 -21
  318. package/app/packages/chat/index.html +21 -21
  319. package/app/packages/comments/index.html +21 -21
  320. package/app/packages/commerce/index.html +21 -21
  321. package/app/packages/content/index.html +21 -21
  322. package/app/packages/events/index.html +21 -21
  323. package/app/packages/expenses/index.html +21 -21
  324. package/app/packages/facts/index.html +21 -21
  325. package/app/packages/fields/index.html +21 -21
  326. package/app/packages/human-resources/index.html +21 -21
  327. package/app/packages/images/index.html +21 -21
  328. package/app/packages/index.html +20 -20
  329. package/app/packages/ingestion/index.html +21 -21
  330. package/app/packages/inventory/index.html +21 -21
  331. package/app/packages/ledgers/index.html +21 -21
  332. package/app/packages/manufacturing/index.html +21 -21
  333. package/app/packages/marketing/index.html +21 -21
  334. package/app/packages/messages/index.html +21 -21
  335. package/app/packages/places/index.html +21 -21
  336. package/app/packages/preferences/index.html +21 -21
  337. package/app/packages/products/index.html +21 -21
  338. package/app/packages/profiles/index.html +21 -21
  339. package/app/packages/projects/index.html +21 -21
  340. package/app/packages/properties/index.html +21 -21
  341. package/app/packages/reports/index.html +21 -21
  342. package/app/packages/sales/index.html +21 -21
  343. package/app/packages/sites/index.html +21 -21
  344. package/app/packages/social/index.html +21 -21
  345. package/app/packages/subscriptions/index.html +21 -21
  346. package/app/packages/support/index.html +21 -21
  347. package/app/packages/tags/index.html +21 -21
  348. package/app/packages/timesheets/index.html +21 -21
  349. package/app/packages/users/index.html +21 -21
  350. package/app/packages/video/index.html +21 -21
  351. package/app/packages/voice/index.html +21 -21
  352. package/app/packages/webhooks/index.html +21 -21
  353. package/app/recipes/account-access/help/index.html +21 -21
  354. package/app/recipes/account-access/index.html +23 -23
  355. package/app/recipes/activity/help/index.html +21 -21
  356. package/app/recipes/activity/index.html +23 -23
  357. package/app/recipes/agreements/help/index.html +21 -21
  358. package/app/recipes/agreements/index.html +23 -23
  359. package/app/recipes/analytics.reports/help/index.html +21 -21
  360. package/app/recipes/analytics.reports/index.html +23 -23
  361. package/app/recipes/assets/help/index.html +21 -21
  362. package/app/recipes/assets/index.html +23 -23
  363. package/app/recipes/billing/help/index.html +21 -21
  364. package/app/recipes/billing/index.html +23 -23
  365. package/app/recipes/chat.assistant/help/index.html +21 -21
  366. package/app/recipes/chat.assistant/index.html +23 -23
  367. package/app/recipes/comments/help/index.html +21 -21
  368. package/app/recipes/comments/index.html +23 -23
  369. package/app/recipes/commerce.customers/help/index.html +21 -21
  370. package/app/recipes/commerce.customers/index.html +23 -23
  371. package/app/recipes/commerce.estimates/help/index.html +21 -21
  372. package/app/recipes/commerce.estimates/index.html +23 -23
  373. package/app/recipes/commerce.purchases/help/index.html +21 -21
  374. package/app/recipes/commerce.purchases/index.html +23 -23
  375. package/app/recipes/commerce.sales/help/index.html +21 -21
  376. package/app/recipes/commerce.sales/index.html +23 -23
  377. package/app/recipes/commerce.vendors/help/index.html +21 -21
  378. package/app/recipes/commerce.vendors/index.html +23 -23
  379. package/app/recipes/commerce.wholesale/help/index.html +21 -21
  380. package/app/recipes/commerce.wholesale/index.html +23 -23
  381. package/app/recipes/events.calendar/help/index.html +21 -21
  382. package/app/recipes/events.calendar/index.html +23 -23
  383. package/app/recipes/expenses.tracking/help/index.html +21 -21
  384. package/app/recipes/expenses.tracking/index.html +23 -23
  385. package/app/recipes/fields.form-customization/help/index.html +21 -21
  386. package/app/recipes/fields.form-customization/index.html +23 -23
  387. package/app/recipes/ingestion/help/index.html +21 -21
  388. package/app/recipes/ingestion/index.html +23 -23
  389. package/app/recipes/integrations/help/index.html +21 -21
  390. package/app/recipes/integrations/index.html +23 -23
  391. package/app/recipes/inventory.stock/help/index.html +21 -21
  392. package/app/recipes/inventory.stock/index.html +23 -23
  393. package/app/recipes/ledgers.bookkeeping/help/index.html +21 -21
  394. package/app/recipes/ledgers.bookkeeping/index.html +23 -23
  395. package/app/recipes/messages/help/index.html +21 -21
  396. package/app/recipes/messages/index.html +23 -23
  397. package/app/recipes/products/help/index.html +21 -21
  398. package/app/recipes/products/index.html +23 -23
  399. package/app/recipes/projects.tracker/help/index.html +21 -21
  400. package/app/recipes/projects.tracker/index.html +23 -23
  401. package/app/recipes/reports.materialized/help/index.html +21 -21
  402. package/app/recipes/reports.materialized/index.html +23 -23
  403. package/app/recipes/reports.runtime/help/index.html +21 -21
  404. package/app/recipes/reports.runtime/index.html +23 -23
  405. package/app/recipes/sales.pipeline/help/index.html +21 -21
  406. package/app/recipes/sales.pipeline/index.html +23 -23
  407. package/app/recipes/tags.taxonomy/help/index.html +21 -21
  408. package/app/recipes/tags.taxonomy/index.html +23 -23
  409. package/app/recipes/team-collaboration/help/index.html +21 -21
  410. package/app/recipes/team-collaboration/index.html +23 -23
  411. package/app/recipes/timesheets.time-entries/help/index.html +21 -21
  412. package/app/recipes/timesheets.time-entries/index.html +23 -23
  413. package/app/s/custom-accounts/index.html +19 -19
  414. package/app/s/custom-appointments/index.html +19 -19
  415. package/app/s/custom-billing/index.html +19 -19
  416. package/app/s/custom-bookings/index.html +19 -19
  417. package/app/s/custom-buying/index.html +19 -19
  418. package/app/s/custom-checkout/index.html +19 -19
  419. package/app/s/custom-classes/index.html +19 -19
  420. package/app/s/custom-clients/index.html +19 -19
  421. package/app/s/custom-events/index.html +19 -19
  422. package/app/s/custom-fleet/index.html +19 -19
  423. package/app/s/custom-gigs/index.html +19 -19
  424. package/app/s/custom-giving/index.html +19 -19
  425. package/app/s/custom-instruments/index.html +19 -19
  426. package/app/s/custom-jobs/index.html +19 -19
  427. package/app/s/custom-kitchen/index.html +19 -19
  428. package/app/s/custom-lessons/index.html +19 -19
  429. package/app/s/custom-material/index.html +19 -19
  430. package/app/s/custom-meetings/index.html +19 -19
  431. package/app/s/custom-members/index.html +19 -19
  432. package/app/s/custom-merch/index.html +19 -19
  433. package/app/s/custom-money/index.html +19 -19
  434. package/app/s/custom-paint/index.html +19 -19
  435. package/app/s/custom-parts/index.html +19 -19
  436. package/app/s/custom-rentals/index.html +19 -19
  437. package/app/s/custom-roastery/index.html +19 -19
  438. package/app/s/custom-schedule/index.html +19 -19
  439. package/app/s/custom-shelf/index.html +19 -19
  440. package/app/s/custom-shop/index.html +19 -19
  441. package/app/s/custom-students/index.html +19 -19
  442. package/app/s/custom-wholesale/index.html +19 -19
  443. package/app/s/custom-work/index.html +19 -19
  444. package/app/s/custom-yard/index.html +19 -19
  445. package/app/s/section-access-control/index.html +19 -19
  446. package/app/s/section-account-security/index.html +19 -19
  447. package/app/s/section-accounting/index.html +19 -19
  448. package/app/s/section-activity/index.html +19 -19
  449. package/app/s/section-agreements/index.html +19 -19
  450. package/app/s/section-analytics/index.html +19 -19
  451. package/app/s/section-assets/index.html +19 -19
  452. package/app/s/section-billing/index.html +19 -19
  453. package/app/s/section-calendar/index.html +19 -19
  454. package/app/s/section-catalog/index.html +19 -19
  455. package/app/s/section-chat.assistant/index.html +19 -19
  456. package/app/s/section-comments/index.html +19 -19
  457. package/app/s/section-fields.form-customization/index.html +19 -19
  458. package/app/s/section-ingestion/index.html +19 -19
  459. package/app/s/section-integrations/index.html +19 -19
  460. package/app/s/section-messages/index.html +19 -19
  461. package/app/s/section-more/index.html +19 -19
  462. package/app/s/section-operations/index.html +19 -19
  463. package/app/s/section-projects/index.html +19 -19
  464. package/app/s/section-purchasing/index.html +19 -19
  465. package/app/s/section-reports.materialized/index.html +19 -19
  466. package/app/s/section-reports.runtime/index.html +19 -19
  467. package/app/s/section-sales/index.html +19 -19
  468. package/app/s/section-taxonomy/index.html +19 -19
  469. package/app/s/section-team/index.html +19 -19
  470. package/app/s/section-work/index.html +19 -19
  471. package/dist/catalog/catalog.json +38 -38
  472. package/dist/smrt-version.d.ts +1 -1
  473. package/dist/smrt-version.js +1 -1
  474. package/package.json +54 -54
  475. package/app/_app/immutable/chunks/BeJxxDXZ.js +0 -1
  476. package/app/_app/immutable/chunks/CKd9O-eU.js +0 -1
  477. package/app/_app/immutable/chunks/Dg4KRWOz.js +0 -1
  478. package/app/_app/immutable/entry/start.C4bzxGdW.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CaiMTXlW.js","./COiEfhsA.js","./uBIymjUX.js","./DqrQeG8L.js","./DG3qFFTE.js","./xihTtKlq.js","./Bv5jGtB8.js","./YUSKx8_q.js","../assets/feedback.qFktqYFY.css","./B45qMR8U.js","./DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","./DF-0MxNw.js","../assets/SegmentedControl.DMqHG5fn.css","./DoGeTgSe.js","../assets/data.CVlX_W0i.css","./CsaWd8kG.js","../assets/forms.BRdbPdvs.css","./BxyJ_Q7v.js","./C7zBd-pD.js","./CA-A9Ngs.js","./BQxY8kkL.js","./Ywu-998J.js","./DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","./C7boms_S.js","./nB-x9BEp.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","./D0m3WNVh.js","./QJX7BlhI.js","../assets/icons.BDx21rPt.css","./D7hhQvDO.js","./Cn2mA3wh.js","./BYcBM-fh.js","./DTWraE40.js","./CUyVrfsu.js"])))=>i.map(i=>d[i]);
2
- 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,It as u,J as d,K as f,L as p,Lt as m,M as h,N as g,Ot as _,P as v,Pt as y,R as b,St as x,T as S,U as C,V as w,W as T,X as E,Y as D,Z as O,a as k,bt as A,ct as j,d as M,dt as ee,ft as N,gt as P,ht as F,k as I,kt as te,mt as L,n as R,nt as z,pt as B,q as ne,r as re,st as V,tt as ie,v as H,vt as U,z as ae}from"./DG3qFFTE.js";import{t as W}from"./uBIymjUX.js";import"./xihTtKlq.js";import{r as oe,s as G}from"./Bv5jGtB8.js";import{a as se,i as ce,n as le,r as ue,t as de}from"./YUSKx8_q.js";import{Ct as fe,wt as pe}from"./B45qMR8U.js";import{n as me}from"./DK8Blf1Y.js";import{n as he}from"./DF-0MxNw.js";import{_ as ge,a as K,c as q,d as _e,f as ve,g as ye,h as be,i as xe,l as Se,n as Ce,o as we,r as Te,s as Ee,t as De,u as Oe,v as ke,y as Ae}from"./DIE02RSm.js";import{a as je,h as J,l as Y,m as Me,r as X}from"./DoGeTgSe.js";import{n as Ne,t as Pe}from"./CUyVrfsu.js";import{v as Fe}from"./CsaWd8kG.js";import{a as Ie,i as Le,t as Re}from"./BYcBM-fh.js";var ze=Symbol(`smrt-admin-shell`);function Be(e){return te(ze,e),e}function Ve(){let e=a(ze);if(!e)throw Error(`[useAdminShell] No AdminShell state found on Svelte context.`);return e}function He(){return a(ze)??null}function Ue(i,a){_(a,!0);let o=k(a,`label`,3,`Running activities`),s=Ve(),c=n(()=>s.activityBadge(a.edge));var u=T(),f=B(u),p=t=>{{let r=n(()=>e(c).hasFailed?`error`:`primary`),i=n(()=>`${o()}: ${e(c).count}`);fe(t,{get variant(){return e(r)},size:`sm`,get title(){return o()},get"aria-label"(){return e(i)},children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(c).progress===null?e(c).count:`${Math.round(e(c).progress)}%`]),C(t,r)},$$slots:{default:!0}})}};t(f,t=>{(e(c).count>0||e(c).hasFailed)&&t(p)}),C(i,u),r()}var Z=se({"ui.stt_test.heading":`STT Adapter Test`,"ui.stt_test.adapter_browser":`Browser (Web Speech API)`,"ui.stt_test.adapter_whisper_wasm":`Whisper WASM (v2)`,"ui.stt_test.adapter_whisper_cpp":`Whisper CPP`,"ui.stt_test.status_initializing":`Initializing...`,"ui.stt_test.status_ready":`Ready`,"ui.stt_test.status_not_initialized":`Not initialized`,"ui.workspace_shell.close_navigation":`Close navigation`,"ui.workspace_shell.close_inspector":`Close inspector`,"ui.workspace_shell.primary_navigation":`Primary navigation`,"ui.workspace_shell.workspace_navigation":`Workspace navigation`,"ui.workspace_shell.inspector_tools":`Inspector tools`,"ui.tools_dock.no_tools_available":`No tools available`,"ui.tools_dock.no_tools_context":`No tools are available for the current context.`,"ui.tools_dock.select_tool":`Select a tool to begin.`,"ui.tools_dock.workspace_tools":`Workspace tools`,"ui.admin_shell.no_focus_tools":`No focus tools`,"ui.admin_shell.focus_tools":`Focus tools`,"ui.admin_shell.no_app_panel":`No app panel`,"ui.admin_shell.no_system_panel":`No system panel`,"ui.admin_shell.shell_shortcuts":`Shell shortcuts`,"ui.admin_shell.close_shortcuts":`Close shortcuts`,"ui.admin_shell.shortcuts":`Shortcuts`,"ui.admin_shell.close":`Close`,"ui.admin_shell.home":`Home`,"ui.admin_shell.menu":`Menu`,"ui.admin_shell.close_menu":`Close menu`,"ui.admin_shell.tools":`Tools`,"ui.admin_shell.close_tools":`Close tools`,"ui.admin_shell.expand_sidebar":`Expand sidebar`,"ui.admin_shell.collapse_sidebar":`Collapse sidebar`,"ui.admin_shell.close_sidebar":`Close sidebar`,"ui.admin_shell.expand_panel":`Expand {panel}`,"ui.admin_shell.collapse_panel":`Collapse {panel}`,"ui.admin_shell.close_panel":`Close {label}`,"ui.admin_shell.open_panel":`Open {label}`,"ui.admin_shell.resize_panel":`Resize {label}`,"ui.shell_nav_toggle.collapse":`Collapse {label}`,"ui.shell_nav_toggle.expand":`Expand {label}`,"ui.shell_nav_toggle.navigation":`navigation`,"ui.phone_top_bar.back":`Back to {label}`,"ui.phone_bottom_bar.label":`Main`,"ui.phone_bottom_bar.unread":`{count} unread`,"ui.phone_bottom_bar.new":`new`,"ui.activity_toasts.dismiss":`Dismiss activity notification`,"ui.activity_toasts.dismiss_action":`Dismiss`,"ui.activity_item.view":`View`,"ui.activity_item.cancel":`Cancel`,"ui.activity_list.empty":`No activities`,"ui.activity_ticker.label":`Running processes`,"ui.activity_ticker.empty":`No active processes`,"ui.activity_ticker.pause":`Pause scrolling activities`,"ui.activity_ticker.resume":`Resume scrolling activities`,"ui.activity_ticker.queued":`Queued`,"ui.app_scope_panel.app_scope":`App scope`,"ui.app_shell.settings_link":`Shell settings`,"ui.app_shell.navigation":`Application navigation`,"ui.app_shell.slot_content":`{slot} content`,"ui.shell_slot.header_start":`Header, left`,"ui.shell_slot.header_center":`Header, middle`,"ui.shell_slot.header_end":`Header, right`,"ui.shell_slot.footer_start":`Footer, left`,"ui.shell_slot.footer_center":`Footer, middle`,"ui.shell_slot.footer_end":`Footer, right`,"ui.shell_slot.left_sidebar_header":`Left sidebar, header`,"ui.shell_slot.left_sidebar_footer":`Left sidebar, footer`,"ui.shell_slot.right_sidebar_header":`Right sidebar, header`,"ui.shell_slot.right_sidebar_footer":`Right sidebar, footer`,"ui.shell_slot.short_header_start":`Left`,"ui.shell_slot.short_header_center":`Middle`,"ui.shell_slot.short_header_end":`Right`,"ui.shell_slot.short_footer_start":`Left`,"ui.shell_slot.short_footer_center":`Middle`,"ui.shell_slot.short_footer_end":`Right`,"ui.shell_slot.short_sidebar_header":`Header`,"ui.shell_slot.short_sidebar_footer":`Footer`,"ui.owner_setup.heading":`Set up your local application`,"ui.owner_setup.unavailable":`Local owner setup is unavailable or has already been completed.`,"ui.owner_setup.intro":`Create the real local owner account. This invitation works once and stays on this device.`,"ui.owner_setup.name":`Name`,"ui.owner_setup.email":`Email`,"ui.owner_setup.tenant_name":`Workspace name (optional)`,"ui.owner_setup.submit":`Create owner`,"ui.shell_settings_page.heading":`Settings`,"ui.shell_settings_page.description":`Adjust appearance, your account, and the workspace layout.`,"ui.hotkey_input.capture_title":`Press a key to capture it`,"ui.hotkey_input.conflicts_with":`Conflicts with`,"ui.shell_settings_panel.shell_settings":`Shell settings`,"ui.shell_settings_panel.description":`Show or hide the workspace areas and reset the layout.`,"ui.shell_settings_panel.disable_hotkeys":`Disable hotkeys`,"ui.shell_settings_panel.enable_hotkeys":`Enable hotkeys`,"ui.shell_settings_panel.collapse":`Collapse`,"ui.shell_settings_panel.expand":`Expand`,"ui.owner_setup.link_missing_heading":`This setup link is missing or has expired`,"ui.owner_setup.link_missing_body":`Setup links work once and only for a short time. Run one of these in the terminal where the app runs.`,"ui.owner_setup.recovery_open":`Open a fresh setup link`,"ui.owner_setup.recovery_recover":`Recover the setup invitation`,"ui.shell_settings.appearance":`Appearance`,"ui.shell_settings.theme":`Theme`,"ui.shell_settings.color_scheme":`Color scheme`,"ui.shell_settings.account":`Account`,"ui.shell_settings.account_name":`Name`,"ui.shell_settings.account_email":`Email`,"ui.shell_settings.account_signed_out":`You are not signed in.`,"ui.shell_settings.sign_out":`Sign out`,"ui.shell_settings.sign_out_failed":`Couldn't sign out. Try again.`,"ui.shell_settings.layout":`Layout`,"ui.shell_settings.hide":`Hide`,"ui.shell_settings.show":`Show`,"ui.shell_settings.edit_layout_on":`Editing layout`,"ui.shell_settings.edit_layout_off":`Edit layout`,"ui.shell_settings.reset_layout":`Reset layout`,"ui.shell_settings.panels":`Shown areas`,"ui.shell_settings.show_region":`Show {region}`,"ui.shell_settings.hide_region":`Hide {region}`,"ui.shell_settings.region_shown":`Shown`,"ui.shell_settings.region_hidden":`Hidden`,"ui.shell_settings.shortcuts":`Keyboard shortcuts`,"ui.shell_layout_editor.heading":`Shell layout`,"ui.shell_layout_editor.description":`Choose which panels appear and arrange the navigation. Drag a handle, or focus it, press Space, and use the arrow keys.`,"ui.shell_layout_editor.reset":`Reset to defaults`,"ui.shell_layout_editor.panels":`Panels`,"ui.shell_layout_editor.show_panel":`Show {panel} panel`,"ui.shell_layout_editor.start_expanded":`Start {panel} panel expanded`,"ui.shell_layout_editor.panel_unavailable":`The {panel} panel is not available in this app.`,"ui.shell_layout_editor.navigation":`Navigation`,"ui.shell_layout_editor.top_level":`Top level`,"ui.shell_layout_editor.show_entry":`Show {label} in navigation`,"ui.shell_layout_editor.new_section":`New section`,"ui.shell_layout_editor.new_section_label":`New section`,"ui.shell_layout_editor.section_name":`Name of section {label}`,"ui.shell_layout_editor.rename_item":`Rename {label}`,"ui.shell_layout_editor.item_name":`Name of item {label}`,"ui.shell_layout_editor.reset_item":`Reset {label} to {original}`,"ui.shell_layout_editor.section_icon":`Icon of {label}`,"ui.shell_layout_editor.icon_option":`Use {icon} icon`,"ui.section_menu.label":`{label} entries`,"ui.section_menu.empty":`No entries in this section.`,"ui.shell_layout_editor.show_title_for":`Show title of {label}`,"ui.shell_layout_editor.delete":`Delete`,"ui.shell_layout_editor.delete_section":`Delete section {label}`,"ui.shell_layout_editor.delete_confirm":`Delete {label}? Its items return to their default sections.`,"ui.shell_layout_editor.preview":`Preview`,"ui.shell_layout_editor.preview_label":`Navigation preview`,"ui.shell_layout_editor.sortable_label":`Navigation sections and items`,"ui.layout_edit.toggle":`Edit layout`,"ui.layout_edit.announce_on":`Layout editing on. Drag items between zones, or focus a grip, press Space, and use the arrow keys.`,"ui.layout_edit.announce_off":`Layout editing off.`,"ui.layout_edit.zone":`{region} · {slot}`,"ui.layout_edit.region_hidden":`{region} · hidden`,"ui.layout_edit.show_region":`Show {region}`,"ui.layout_edit.hide_region":`Hide {region}`,"ui.layout_edit.hide_last_region":`Cannot hide {region}: at least one region must stay visible`,"ui.app_shell.brand_item":`App title`,"ui.layout_edit.section_options":`Options for section {label}`,"ui.layout_edit.edit_section":`Edit section {label}`,"ui.shell_region.header":`Header`,"ui.shell_region.left_sidebar":`Left sidebar`,"ui.shell_region.right_sidebar":`Right sidebar`,"ui.shell_region.footer":`Footer`,"ui.shortcuts_overlay.open_shortcuts":`Open shortcuts`,"ui.shortcuts_overlay.close_drawer":`Close drawer`,"ui.shortcuts_overlay.close":`Close`,"ui.shortcuts_overlay.escape":`Esc`,"ui.system_scope_panel.system_scope":`System scope`,"ui.system_scope_panel.activities":`Activities`,"ui.system_scope_panel.no_running_work":`No running work`,"ui.system_status_chips.system_status":`System status`,"ui.tenant_nav.tenant_navigation":`Tenant navigation`,"ui.tenant_nav.needs_attention":`Needs attention`,"ui.workspace_account_menu.open":`Open account menu`,"ui.workspace_account_menu.current_tenant":`{tenant} — current`,"ui.workspace_account_menu.sign_out":`Sign out`,"ui.activity_feed.title":`Live activity feed`,"ui.activity_feed.description":`A smrt-web live collection reconciled into the shell activity registry.`,"ui.activity_feed.enqueue_job":`Enqueue job`,"ui.activity_feed.advance_job":`Advance job`,"ui.activity_feed.complete_job":`Complete job`,"ui.activity_feed.fail_job":`Fail job`,"ui.activity_feed.clear_finished":`Clear finished`,"ui.activity_feed.rows_heading":`Backing collection rows`,"ui.activity_feed.no_rows":`No rows yet`,"ui.activity_feed.job_label":`Render job`,"ui.system_feed.title":`System feed`,"ui.system_feed.description":`Polls an app-provided status endpoint and maps it into the system-scope panels and status chips.`,"ui.system_feed.pause":`Pause polling`,"ui.system_feed.resume":`Resume polling`,"ui.system_feed.refresh":`Refresh now`,"ui.system_feed.fail_next":`Fail next fetch`,"ui.system_feed.status_label":`Feed status`,"ui.system_feed.tick_label":`Ticks`,"ui.system_feed.error_label":`Last error`,"ui.system_feed.jobs_panel":`Jobs`,"ui.system_feed.schedules_panel":`Schedules`,"ui.system_feed.dispatch_panel":`Dispatch`,"ui.system_feed.chip_workers":`Workers`,"ui.system_feed.chip_running":`Running`,"ui.system_feed.chip_queued":`Queued`,"ui.system_feed.chip_failed":`Failed`,"ui.phone_tab_bar.label":`Main`,"ui.phone_tab_bar.more":`More`,"ui.app_shell.account_item":`Account menu`,"ui.app_shell.color_scheme_item":`Color scheme`,"ui.app_shell.color_scheme_dark":`Dark mode`,"ui.app_shell.color_scheme_to_dark":`Switch to dark mode`,"ui.app_shell.color_scheme_to_light":`Switch to light mode`,"ui.app_shell.command_palette_item":`Search`,"ui.app_shell.account_settings":`Settings`,"ui.dock_toggles.set_up":`Set up {label}`}),We=`smrt-assistant-request`;function Ge(e,t){let n=new CustomEvent(We,{bubbles:!0,composed:!0,cancelable:!0,detail:t});return e.dispatchEvent(n),n.defaultPrevented}var Ke=c(`<time class="bubble__time svelte-2p843q"> </time>`),qe=c(`<div class="bubble__header svelte-2p843q"><span class="bubble__author svelte-2p843q"> </span> <!></div>`),Je=c(`<p class="bubble__content svelte-2p843q"> </p>`),Ye=c(`<div class="bubble__reactions svelte-2p843q"><!></div>`),Xe=c(`<div class="bubble__actions svelte-2p843q"><!></div>`),Ze=c(`<div data-smrt-component="MessageBubble"><!> <div class="bubble__body svelte-2p843q"><!></div> <!> <!></div>`);function Qe(a,c){_(c,!0);let u=k(c,`role`,3,`user`),d={user:`You`,agent:`Assistant`,system:`System`},f=n(()=>c.variant??(u()===`agent`?`agent`:u()===`system`?`system`:`default`)),p=n(()=>c.own??u()===`user`),m=n(()=>c.variant!==void 0||c.own!==void 0),h=n(()=>c.author??d[u()]),g=n(()=>c.author!==void 0||!e(m)),v=n(()=>`${e(h)} (${u()})`),y=n(()=>c.timestamp?c.timestamp.toISOString():void 0),b=n(()=>c.timestampLabel??c.timestamp?.toLocaleTimeString()??``);var x=Ze();let S;var w=N(x),E=n=>{var r=qe(),i=N(r),a=L(i,!0),o=F(i,2),c=t=>{var n=Ke(),r=L(n,!0);V(()=>{H(n,`datetime`,e(y)),l(r,e(b))}),C(t,n)};t(o,t=>{e(b)&&t(c)}),s(r),V(()=>l(a,e(h))),C(n,r)};t(w,t=>{e(g)&&t(E)});var D=F(w,2),O=N(D),A=e=>{var t=T(),n=B(t);o(n,()=>c.children),C(e,t)},j=e=>{var t=Je(),n=L(t,!0);V(()=>l(n,c.content)),C(e,t)};t(O,e=>{c.children?e(A):c.content!==void 0&&e(j,1)}),s(D);var M=F(D,2),ee=e=>{var t=Ye(),n=N(t);o(n,()=>c.reactions),s(t),C(e,t)};t(M,e=>{c.reactions&&e(ee)});var P=F(M,2),I=e=>{var t=Xe(),n=N(t);o(n,()=>c.actions),s(t),C(e,t)};t(P,e=>{c.actions&&e(I)}),s(x),V(()=>{S=i(x,1,`bubble bubble--${e(f)??``}`,`svelte-2p843q`,S,{"bubble--own":e(p)}),H(x,`role`,e(g)?`group`:void 0),H(x,`aria-label`,e(g)?e(v):void 0)}),C(a,x),r()}var $e=c(`<button type="button" class="reactions__btn svelte-1fg95t8"><span aria-hidden="true"> </span></button>`),et=c(`<div class="reactions svelte-1fg95t8" role="group" data-smrt-component="ReactionPicker"></div>`);function tt(i,a){_(a,!0);let o=[`👍`,`❤️`,`😂`,`🎉`,`😮`,`😢`],c={"👍":`Thumbs up`,"❤️":`Heart`,"😂":`Laugh`,"🎉":`Celebrate`,"😮":`Surprised`,"😢":`Sad`},u=k(a,`emojis`,3,o),d=k(a,`isOpen`,3,!0),{t:f}=de(),m=n(()=>a.label??f(ce[`ui.reaction_picker.label`]));function h(e){return a.emojiLabel?.(e)??c[e]??f(ce[`ui.reaction_picker.react_with`],{emoji:e})}var g=T(),v=B(g),y=t=>{var n=et();p(n,20,u,e=>e,(e,t)=>{var n=$e(),r=N(n),i=L(r,!0);s(n),V(e=>{H(n,`aria-label`,e),l(i,t)},[()=>h(t)]),E(`click`,n,()=>a.onpick?.(t)),C(e,n)}),s(n),V(()=>H(n,`aria-label`,e(m))),C(t,n)};t(v,e=>{d()&&e(y)}),C(i,g),r()}D([`click`]);var nt=c(`<div class="typing svelte-x9akf9" role="status" aria-live="polite" data-smrt-component="TypingIndicator"><span class="typing__text svelte-x9akf9"> </span> <span class="typing__dots svelte-x9akf9" aria-hidden="true"><span class="typing__dot svelte-x9akf9"></span> <span class="typing__dot svelte-x9akf9"></span> <span class="typing__dot svelte-x9akf9"></span></span></div>`);function rt(i,a){_(a,!0);let o=n(()=>a.names!==void 0),c=n(()=>!e(o)||(a.names?.length??0)>0),u=n(()=>a.label?a.label:a.names&&a.names.length>0?a.names.length===1?`${a.names[0]} is typing`:a.names.length===2?`${a.names[0]} and ${a.names[1]} are typing`:`${a.names[0]} and ${a.names.length-1} others are typing`:a.name?`${a.name} is typing`:`Typing`);var d=T(),f=B(d),p=t=>{var n=nt(),r=N(n),i=L(r,!0);y(2),s(n),V(()=>l(i,e(u))),C(t,n)};t(f,t=>{e(c)&&t(p)}),C(i,d),r()}var it=`smrt-shell-navigated`;function at(e,t={}){e.dispatchEvent(new CustomEvent(it,{bubbles:!0,composed:!0,detail:t}))}function ot(e,t,n=3e3,{skipExisting:r=!0}={}){let i=Date.now(),a=new Set(r?e.querySelectorAll(t):[]),o=null,s=()=>{let r=[...e.querySelectorAll(t)].find(e=>!a.has(e));r?(!r.hasAttribute(`tabindex`)&&r.tabIndex<0&&r.setAttribute(`tabindex`,`-1`),r.focus({preventScroll:!1})):Date.now()-i<n&&(o=setTimeout(s,50))};return o=setTimeout(s,0),()=>{o&&clearTimeout(o)}}var st=c(`<img class="smrt-admin-shell__logo svelte-r3uxsf"/>`),ct=c(`<span aria-hidden="true" class="svelte-r3uxsf"> </span>`),lt=c(`<span class="svelte-r3uxsf"> </span>`),ut=c(`<div><strong class="svelte-r3uxsf"> </strong><!></div>`),dt=c(`<!> <!>`,1),ft=c(`<a><!></a>`),pt=c(`<div><!></div>`);function mt(e,n){_(n,!0);let a=e=>{var r=T(),a=B(r),p=e=>{var t=T(),r=B(t);o(r,()=>n.brand,()=>({compact:f()})),C(e,t)},m=e=>{var r=dt(),a=B(r),o=e=>{var t=st();V(()=>{H(t,`src`,n.logoSrc),H(t,`alt`,d())}),C(e,t)};t(a,e=>{n.logoSrc&&e(o)});var p=F(a,2),m=e=>{var r=T(),i=B(r),a=e=>{var t=ct(),n=L(t,!0);V(e=>l(n,e),[()=>c().charAt(0)]),C(e,t)};t(i,e=>{n.logoSrc||e(a)}),C(e,r)},h=e=>{var r=ut();let a;var o=N(r),d=L(o,!0),f=F(o),p=e=>{var t=lt(),n=L(t,!0);V(()=>l(n,u())),C(e,t)};t(f,e=>{u()&&e(p)}),s(r),V(e=>{a=i(r,1,`smrt-admin-shell__brand-text svelte-r3uxsf`,null,a,{wordmark:e}),l(d,c())},[()=>!!n.logoSrc&&!u()]),C(e,r)};t(p,e=>{f()?e(m):e(h,-1)}),C(e,r)};t(a,e=>{n.brand?e(p):e(m,-1)}),C(e,r)},c=k(n,`title`,3,`SMRT`),u=k(n,`subtitle`,3,``),d=k(n,`logoAlt`,3,``),f=k(n,`compact`,3,!1),{t:p}=de();var m=T(),h=B(m),g=e=>{var t=ft();let r;var o=N(t);a(o),s(t),V(e=>{r=i(t,1,`smrt-admin-shell__brand smrt-admin-shell__brand-link svelte-r3uxsf`,null,r,{compact:f()}),H(t,`href`,n.homeHref),H(t,`aria-label`,e)},[()=>c()||p(Z[`ui.admin_shell.home`])]),C(e,t)},v=e=>{var t=pt();let n;var r=N(t);a(r),s(t),V(()=>n=i(t,1,`smrt-admin-shell__brand svelte-r3uxsf`,null,n,{compact:f()})),C(e,t)};t(h,e=>{n.homeHref?e(g):e(v,-1)}),C(e,m),r()}var ht=[`header.start`,`header.center`,`header.end`,`footer.start`,`footer.center`,`footer.end`,`leftSidebar.header`,`leftSidebar.footer`,`rightSidebar.header`,`rightSidebar.footer`];function gt(e){return e.split(`.`)[0]}function _t(e){let[t,n]=e.split(`.`);switch(t){case`header`:return[`leftSidebar.header`,`rightSidebar.header`,`footer.${n}`];case`footer`:return[`leftSidebar.footer`,`rightSidebar.footer`,`header.${n}`];case`leftSidebar`:return n===`header`?[`header.start`,`rightSidebar.header`,`footer.start`]:[`footer.start`,`header.start`,`rightSidebar.footer`];case`rightSidebar`:return n===`header`?[`header.end`,`leftSidebar.header`,`footer.end`]:[`footer.end`,`header.end`,`leftSidebar.footer`]}}function vt(e,t){for(let n of[e,..._t(e)])if(t(gt(n)))return n;return null}var yt=`dock:`,bt=`slot:`;function xt(e){return`${yt}${e}`}function St(e){return`${bt}${e}`}function Ct(e){return typeof e==`string`&&ht.includes(e)}var wt=`@root`,Tt=[`top`,`left`,`right`,`bottom`],Et=`custom:`;function Dt(){return{version:1}}function Ot(e){return!e||!e.sectionOrder?.length&&!Q(e.itemOrder)&&!e.hidden?.length&&!Q(e.moved)&&!Q(e.sections)&&!Q(e.items)&&!e.customSections?.length&&!Q(e.panels)&&!Q(e.placements)}function Q(e){return typeof e==`object`&&!!e&&Object.keys(e).length>0}function kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function At(e){if(!Array.isArray(e))return;let t=new Set;for(let n of e)typeof n==`string`&&n!==``&&t.add(n);return t.size>0?[...t]:void 0}function jt(e){if(typeof e!=`string`)return;let t=e.trim();return t===``?void 0:t}function Mt(e){if(!kt(e))return;let t={},n=jt(e.label);n&&(t.label=n),typeof e.showTitle==`boolean`&&(t.showTitle=e.showTitle);let r=jt(e.icon);return r&&(t.icon=r),Q(t)?t:void 0}function Nt(e){if(!kt(e))return;let t={},n=jt(e.label);n&&(t.label=n);let r=jt(e.description);return r&&(t.description=r),Q(t)?t:void 0}function Pt(e){if(!kt(e))return;let t={};for(let[n,r]of Object.entries(e)){let e=n===``?void 0:Nt(r);e&&(t[n]=e)}return Q(t)?t:void 0}function Ft(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(!kt(r)||typeof r.id!=`string`)continue;let e=jt(r.label);r.id.startsWith(`custom:`)&&e&&(t.has(r.id)||(t.add(r.id),n.push({id:r.id,label:e})))}return n}function It(e){let t=Dt();if(!kt(e)||e.version!==1)return t;let n=At(e.sectionOrder);if(n&&(t.sectionOrder=n),kt(e.itemOrder)){let n={};for(let[t,r]of Object.entries(e.itemOrder)){let e=At(r);e&&(n[t]=e)}Q(n)&&(t.itemOrder=n)}let r=At(e.hidden);if(r&&(t.hidden=r),kt(e.moved)){let n={};for(let[t,r]of Object.entries(e.moved))typeof r==`string`&&r!==``&&(n[t]=r);Q(n)&&(t.moved=n)}if(kt(e.sections)){let n={};for(let[t,r]of Object.entries(e.sections)){let e=Mt(r);e&&(n[t]=e)}Q(n)&&(t.sections=n)}let i=Pt(e.items);i&&(t.items=i);let a=Ft(e.customSections);if(a.length>0&&(t.customSections=a),kt(e.panels)){let n={};for(let t of Tt){let r=e.panels[t];if(!kt(r))continue;let i={};typeof r.visible==`boolean`&&(i.visible=r.visible),(r.initial===`collapsed`||r.initial===`expanded`)&&(i.initial=r.initial),Q(i)&&(n[t]=i)}Q(n)&&(t.panels=n)}let o=sn(e.placements);return o&&(t.placements=o),t}function Lt(e){return e.id??e.heading}function Rt(e){return e.id??e.href}function $(e,t){if(!t||t.length===0)return[...e];let n=new Set(e),r=[],i=new Set;for(let e of t)n.has(e)&&!i.has(e)&&(i.add(e),r.push(e));if(r.length===0)return[...e];let a=0;return e.map(e=>i.has(e)?r[a++]:e)}function zt(e=[],t=[],n){let r=new Set([wt]),i=e=>{let t=e;for(let n=2;r.has(t);n+=1)t=`${e}#${n}`;return r.add(t),t},a=[{id:wt,group:null,items:e.map(e=>({id:i(Rt(e)),item:e}))}];for(let e of t){let t=i(Lt(e));a.push({id:t,group:e,items:e.items.map(e=>({id:i(Rt(e)),item:e}))})}for(let e of Ft(n?.customSections))r.has(e.id)||(r.add(e.id),a.push({id:e.id,group:{id:e.id,heading:e.label,items:[]},items:[],custom:!0}));let o=kt(n?.sections)?n.sections:{},s=Pt(n?.items)??{},c=new Set(At(n?.hidden)??[]),l=kt(n?.moved)?n?.moved:{},u=new Set(a.map(e=>e.id)),d=new Set(a.flatMap(e=>e.items.map(e=>e.id))),f=(e,t)=>{let n=d.has(e)?l[e]:void 0;return typeof n==`string`&&u.has(n)?n:t},p=$(a.slice(1).map(e=>e.id),At(n?.sectionOrder)),m=new Map(a.map(e=>[e.id,e])),h=[a[0],...p.map(e=>m.get(e))],g=kt(n?.itemOrder)?n?.itemOrder:{};return h.map(e=>{let t=[];for(let n of a)for(let r of n.items)f(r.id,n.id)===e.id&&t.push({id:r.id,item:s[r.id]?.description?{...r.item,description:s[r.id]?.description}:r.item,nativeSectionId:n.id,sectionId:e.id,hidden:c.has(r.id),label:s[r.id]?.label??r.item.label,defaultLabel:r.item.label});t.sort((t,n)=>Number(t.nativeSectionId!==e.id)-Number(n.nativeSectionId!==e.id));let n=new Map(t.map(e=>[e.id,e])),r=$(t.map(e=>e.id),At(g[e.id])),i=e.group?Mt(o[e.id]):void 0,l=e.custom===!0;return{id:e.id,group:e.group,heading:e.group?(l?void 0:i?.label)??e.group.heading:null,defaultHeading:e.group&&!l?e.group.heading:null,custom:l,titleVisible:e.group?i?.showTitle??e.group.showTitle!==!1:!1,icon:e.group?i?.icon??e.group.icon??null:null,defaultIcon:e.group?.icon??null,hidden:e.group?c.has(e.id):!1,items:r.map(e=>n.get(e))}})}function Bt(e,t){return!t||e===!1||e?.initial===`hidden`?e:t.visible===!1?!1:t.initial===`collapsed`||t.initial===`expanded`?{...e,initial:t.initial}:e}function Vt(e,t,n,r){let i=n??{};if(Ot(r))return{nav:e,groups:t,panels:i};let a=zt(e,t,r),o=e=>e.hidden?[]:e.items.filter(e=>!e.hidden).map(e=>e.label===e.defaultLabel?e.item:{...e.item,label:e.label,defaultLabel:e.defaultLabel}),[s,...c]=a,l=[];for(let e of c){let t=o(e),n=e.group;if(e.hidden||t.length===0&&(e.custom||n.items.length>0))continue;let r={...n,items:t};e.heading!==n.heading&&(r.id=Lt(n),r.heading=e.heading),e.titleVisible?delete r.showTitle:r.showTitle=!1,e.icon&&(r.icon=e.icon),l.push(r)}let u={...i},d=kt(r?.panels)?r?.panels:void 0;for(let e of Tt){let t=d?.[e];if(!kt(t))continue;let n=Bt(i[e],t);n!==void 0&&(u[e]=n)}return{nav:o(s),groups:l,panels:u}}function Ht(e){let t={version:1};return e.sectionOrder?.length&&(t.sectionOrder=e.sectionOrder),Q(e.itemOrder)&&(t.itemOrder=e.itemOrder),e.hidden?.length&&(t.hidden=e.hidden),Q(e.moved)&&(t.moved=e.moved),Q(e.sections)&&(t.sections=e.sections),Q(e.items)&&(t.items=e.items),e.customSections?.length&&(t.customSections=e.customSections),Q(e.panels)&&(t.panels=e.panels),Q(e.placements)&&(t.placements=e.placements),t}function Ut(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Wt(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.trunc(e),t)):t}function Gt(e,t,n,r,i){let a=It(n??Dt()),o=zt(e,t,a).slice(1).map(e=>e.id);if(!o.includes(r))return a;let s=o.filter(e=>e!==r);s.splice(Wt(i,s.length),0,r);let c=Ut(s,zt(e,t,{version:1,customSections:a.customSections}).slice(1).map(e=>e.id))?void 0:s;return Ht({...a,sectionOrder:c})}function Kt(e,t,n,r,i,a){let o=It(n??Dt()),s=zt(e,t,o),c=s.find(e=>e.items.some(e=>e.id===r)),l=s.find(e=>e.id===i);if(!c||!l)return o;let u=c.items.find(e=>e.id===r);if(!u)return o;let d=new Map(s.map(e=>[e.id,e.items.map(e=>e.id)]));d.set(c.id,(d.get(c.id)??[]).filter(e=>e!==r));let f=[...d.get(l.id)??[]];f.splice(Wt(a??f.length,f.length),0,r),d.set(l.id,f);let p={...o.moved??{}};l.id===u.nativeSectionId?delete p[r]:p[r]=l.id;let m={...o,moved:p},h=zt(e,t,{version:1,moved:p,sectionOrder:o.sectionOrder,customSections:o.customSections}),g={...o.itemOrder??{}};for(let e of new Set([c.id,l.id])){let t=h.find(t=>t.id===e)?.items.map(e=>e.id),n=d.get(e)??[];t&&Ut(n,t)?delete g[e]:g[e]=n}return Ht({...m,itemOrder:g})}function qt(e,t,n,r){let i=It(n??Dt());return!Yt(e,t,i,r)||i.hidden?.includes(r)?i:Ht({...i,hidden:[...i.hidden??[],r]})}function Jt(e,t){let n=It(e??Dt());return n.hidden?.includes(t)?Ht({...n,hidden:n.hidden.filter(e=>e!==t)}):n}function Yt(e,t,n,r){return zt(e,t,{version:1,customSections:n.customSections}).some(e=>e.group!==null&&e.id===r||e.items.some(e=>e.id===r))}function Xt(e,t,n,r){let i=It(e??Dt());if(!Tt.includes(t))return i;let a={...i.panels?.[t]??{}};`visible`in n&&(n.visible===!1?a.visible=!1:delete a.visible),`initial`in n&&(n.initial===`collapsed`||n.initial===`expanded`?a.initial=n.initial:delete a.initial);let o=r?.[t];a.initial!==void 0&&o!==!1&&a.initial===(o?.initial??`collapsed`)&&delete a.initial;let s={...i.panels??{}};return Q(a)?s[t]=a:delete s[t],Ht({...i,panels:s})}function Zt(e,t,n){let r={...e.sections??{}},i={...r[t]??{},...n};return i.label===void 0&&delete i.label,i.showTitle===void 0&&delete i.showTitle,i.icon===void 0&&delete i.icon,Q(i)?r[t]=i:delete r[t],Ht({...e,sections:r})}function Qt(e,t,n,r){return zt(e,t,n).find(e=>e.group!==null&&e.id===r)}function $t(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);if(!o)return a;let s=jt(i);return o.custom?s?Ht({...a,customSections:a.customSections?.map(e=>e.id===r?{...e,label:s}:e)}):a:Zt(a,r,{label:!s||s===o.defaultHeading?void 0:s})}function en(e,t,n,r,i){let a=It(n??Dt()),o=zt(e,t,a).flatMap(e=>e.items).find(e=>e.id===r);if(!o)return a;let s=jt(i),c={...a.items??{}},l=c[r]?.description,u={...s&&s!==o.defaultLabel?{label:s}:{},...l?{description:l}:{}};return Q(u)?c[r]=u:delete c[r],Ht({...a,items:c})}function tn(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);return o?Zt(a,r,{showTitle:i===(o.custom?!0:o.group?.showTitle!==!1)?void 0:i}):a}function nn(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);if(!o)return a;let s=jt(i);return Zt(a,r,{icon:!s||s===o.defaultIcon?void 0:s})}function rn(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`}function an(e,t,n,r){let i=It(n??Dt()),a=jt(r);if(!a)return i;let o=new Set(zt(e,t,i).flatMap(e=>[e.id,...e.items.map(e=>e.id)])),s=`${Et}${rn(a)}`,c=s;for(let e=2;o.has(c);e+=1)c=`${s}-${e}`;return Ht({...i,customSections:[...i.customSections??[],{id:c,label:a}]})}function on(e,t){let n=It(e??Dt());if(!n.customSections?.some(e=>e.id===t))return n;let r=e=>{if(!e)return;let n={...e};return delete n[t],n},i=Object.fromEntries(Object.entries(n.moved??{}).filter(([,e])=>e!==t));return Ht({...n,customSections:n.customSections.filter(e=>e.id!==t),sectionOrder:n.sectionOrder?.filter(e=>e!==t),itemOrder:r(n.itemOrder),hidden:n.hidden?.filter(e=>e!==t),sections:r(n.sections),moved:i})}function sn(e){if(!kt(e))return;let t={};for(let[n,r]of Object.entries(e))n!==``&&Ct(r)&&(t[n]=r);return Q(t)?t:void 0}function cn(e,t){let n=Object.fromEntries(ht.map(e=>[e,[]])),r=sn(t?.placements)??{},i=new Set;for(let t of e)i.has(t.id)||(i.add(t.id),r[t.id]===void 0&&n[t.slot]?.push(t.id));for(let[e,t]of Object.entries(r))i.has(e)&&n[t].push(e);return n}function ln(e,t,n,r){let i=It(e??Dt());if(t===``||!Ct(n))return i;let a={...i.placements??{}};return delete a[t],n!==r&&(a[t]=n),Ht({...i,placements:a})}function un(e,t){let n=It(e??Dt());if(!n.placements||!(t in n.placements))return n;let r={...n.placements};return delete r[t],Ht({...n,placements:r})}var dn=[`top`,`left`,`right`,`bottom`],fn={top:`app`,left:`tenant`,right:`focus`,bottom:`system`},pn={app:`top`,tenant:`left`,focus:`right`,system:`bottom`},mn={top:{code:`KeyW`},left:{code:`KeyA`},bottom:{code:`KeyS`},right:{code:`KeyD`}},hn={top:{edge:`top`,scope:`app`,label:`Header`,initial:`collapsed`,presentation:`overlay`,hotkey:mn.top,collapsedSize:`3.5rem`,expandedSize:`18rem`},left:{edge:`left`,scope:`tenant`,label:`Left sidebar`,initial:`collapsed`,presentation:`push`,hotkey:mn.left,collapsedSize:`4.25rem`,expandedSize:`16rem`},right:{edge:`right`,scope:`focus`,label:`Right sidebar`,initial:`collapsed`,presentation:`push`,overlayMedia:`(max-width: 79.9375rem)`,closeOnNavigate:!0,hotkey:mn.right,collapsedSize:`4.25rem`,expandedSize:`20rem`},bottom:{edge:`bottom`,scope:`system`,label:`Footer`,initial:`collapsed`,presentation:`overlay`,hotkey:mn.bottom,collapsedSize:`2.75rem`,expandedSize:`18rem`}};function gn(e={}){return{panels:Object.fromEntries(dn.map(t=>{let n=e[t];return n===!1?[t,{...hn[t],initial:`hidden`,hotkey:null}]:[t,{...hn[t],...n,edge:t,scope:n?.scope??fn[t]}]}))}}function _n(e,t,n={},r,i){return t.initial===`hidden`||i?.visible===!1?`hidden`:n.panels?.[e]??(r?t.viewportDefaults?.[r]:void 0)??i?.initial??t.initial}var vn={min:240,max:720,step:16};function yn(e,t){if(e!==`left`&&e!==`right`||!t.resizable||t.initial===`hidden`)return null;let n=t.resizable===!0?{}:t.resizable,r=Math.max(0,n.min??vn.min);return{min:r,max:Math.max(r,n.max??vn.max),step:Math.max(1,n.step??vn.step)}}function bn(e,t){return Math.round(Math.min(t.max,Math.max(t.min,e)))}function xn(e,t){if(t===`state`&&e.viewportDefaults)return!1;let n=e.persist??!0;return typeof n==`boolean`?n:n[t]??!0}function Sn(e,t){let n={...e};for(let r of[`panels`,`sizes`]){let i=e[r];if(!i)continue;let a={};for(let e of dn)e in i&&xn(t.panels[e],r===`panels`?`state`:`size`)&&(a[e]=i[e]);Object.keys(a).length>0?n[r]=a:delete n[r]}return n}function Cn(e,t,n={}){return t.initial===`hidden`?null:n.keymap&&e in n.keymap?n.keymap[e]??null:t.hotkey}function wn(e,t){return{...e,...t,keymap:e.keymap||t.keymap?{...e.keymap??{},...t.keymap??{}}:void 0,panels:e.panels||t.panels?{...e.panels??{},...t.panels??{}}:void 0,sizes:e.sizes||t.sizes?{...e.sizes??{},...t.sizes??{}}:void 0}}function Tn(e){let t={};if(e.hotkeysEnabled!==void 0&&(t.hotkeysEnabled=e.hotkeysEnabled),e.activeFocusToolId!==void 0&&(t.activeFocusToolId=e.activeFocusToolId),e.layout!==void 0){let n=It(e.layout);Ot(n)||(t.layout=n)}if(e.keymap&&Object.keys(e.keymap).length>0&&(t.keymap=e.keymap),e.panels&&Object.keys(e.panels).length>0&&(t.panels=e.panels),e.sizes){let n=Object.fromEntries(Object.entries(e.sizes).filter(([,e])=>typeof e==`number`&&Number.isFinite(e)));Object.keys(n).length>0&&(t.sizes=n)}return t}var En=class{key;constructor(e){this.key=e}read(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(this.key);return e?JSON.parse(e):null}catch{return null}}write(e){typeof window<`u`&&window.localStorage.setItem(this.key,JSON.stringify(Tn(e)))}};function Dn(e,t,n={}){if(On(e,n))return null;if(An(e))return{type:`show-shortcuts`};for(let r of dn){let i=Cn(r,t[r],n);if(i&&kn(i,e))return{type:`toggle-panel`,edge:r}}return null}function On(e,t={}){return t.hotkeysEnabled===!1||e.isComposing||jn(e.target)?!0:e.altKey||e.ctrlKey||e.metaKey||e.shiftKey?!An(e):!1}function kn(e,t){return e.code===t.code&&!!e.altKey===t.altKey&&!!e.ctrlKey===t.ctrlKey&&!!e.metaKey===t.metaKey&&!!e.shiftKey===t.shiftKey}function An(e){return e.key===`?`||e.code===`Slash`&&e.shiftKey}function jn(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?!0:!!e.closest(`[contenteditable="true"]`)}function Mn(e){return e?[e.ctrlKey?`Ctrl`:``,e.altKey?`Alt`:``,e.shiftKey?`Shift`:``,e.metaKey?`Meta`:``,e.code.replace(/^Key/,``).replace(/^Digit/,``)].filter(Boolean).join(`+`):`Off`}function Nn(e){return e.phone?`phone`:e.desktop?`desktop`:`tablet`}var Pn=class{hidden=!1;#e=0;#t=0;#n;#r;#i;constructor(e={}){this.#n=e.revealWithin??56,this.#r=e.hideAfter??12,this.#i=e.showAfter??4}update(e){let t=e.maxY??1/0,n=Math.min(Math.max(e.y,0),Math.max(t,0));if(e.pinned||n<=this.#n)return this.hidden=!1,this.#e=n,this.#t=0,this.hidden;let r=n-this.#e;return this.#e=n,r===0||(this.#t=Math.sign(r)===Math.sign(this.#t)?this.#t+r:r,this.#t>=this.#r?this.hidden=!0:-this.#t>=this.#i&&(this.hidden=!1)),this.hidden}reset(){this.hidden=!1,this.#e=0,this.#t=0}};function Fn(e){let t=e.visualHeight*(e.scale??1);return e.layoutHeight-t>(e.threshold??150)}function In(e){return e.keyboardOpen?`none`:e.formActions?`form`:`nav`}var Ln=`[data-form-action-bar]`,Rn=`(max-width: 48rem)`,zn=`(min-width: 64rem)`;function Bn(){return typeof window>`u`||typeof window.matchMedia!=`function`?`desktop`:window.matchMedia(`(max-width: 48rem)`).matches?`phone`:window.matchMedia(`(min-width: 64rem)`).matches?`desktop`:`tablet`}var Vn=class{config;adapter;#e=A(P({}));get settings(){return e(this.#e)}set settings(e){U(this.#e,e,!0)}revealed=new Set;#t=A(P({top:`collapsed`,left:`collapsed`,right:`collapsed`,bottom:`collapsed`}));get panels(){return e(this.#t)}set panels(e){U(this.#t,e,!0)}#n=A(`desktop`);get viewport(){return e(this.#n)}set viewport(e){U(this.#n,e,!0)}#r=A(P([]));get focusTools(){return e(this.#r)}set focusTools(e){U(this.#r,e,!0)}#i=A(null);get activeFocusToolId(){return e(this.#i)}set activeFocusToolId(e){U(this.#i,e,!0)}#a=A(0);get dockFocusRequest(){return e(this.#a)}set dockFocusRequest(e){U(this.#a,e,!0)}dockReturnFocus=null;#o=A(P([]));get activities(){return e(this.#o)}set activities(e){U(this.#o,e,!0)}#s=A(P({}));get overlayMatches(){return e(this.#s)}set overlayMatches(e){U(this.#s,e,!0)}#c=A(P({}));get layoutPanels(){return e(this.#c)}set layoutPanels(e){U(this.#c,e,!0)}#l=A(P({}));get inlineEdges(){return e(this.#l)}set inlineEdges(e){U(this.#l,e,!0)}#u=A(!1);get hotkeysAvailable(){return e(this.#u)}set hotkeysAvailable(e){U(this.#u,e,!0)}#d=A(P({top:!0,left:!0,right:!0,bottom:!0}));get regionsRendered(){return e(this.#d)}set regionsRendered(e){U(this.#d,e,!0)}activityListeners=new Set;constructor(e={}){this.config=gn(e.config),this.adapter=e.settingsAdapter??(e.storageKey?new En(e.storageKey):null),this.viewport=e.viewport??Bn(),this.layoutPanels={...e.layoutPanels??{}},this.applySettings(e.settings??{},{persist:!1})}async hydrate(){if(!this.adapter)return;let e=await this.adapter.read();e&&this.applySettings(Sn(e,this.config),{persist:!1})}setViewport(e){z(()=>{if(e===this.viewport)return;this.viewport=e;let t=!1,n={...this.settings.panels??{}};for(let r of dn){let i=this.config.panels[r],a=i.viewportDefaults?.[e];a&&i.initial!==`hidden`&&this.layoutPanels[r]?.visible!==!1&&(delete n[r],t=!0,a===`expanded`&&this.closeExclusivePeers(r),this.panels[r]=a)}t&&(this.settings={...this.settings,panels:n}),e===`phone`&&this.inlineEdges.left&&this.panels.left===`expanded`&&(this.panels.left=`collapsed`),this.applyInline()})}phonePresentation(e){return this.config.panels[e].phone??`drawer`}presentationFor(e){let t=this.config.panels[e];return this.isInline(e)?t.presentation:(e===`left`||e===`right`)&&this.viewport!==`phone`&&t.overlayMedia&&this.overlayMatches[e]?`overlay`:t.presentation}closeOverlaidEdges(){z(()=>{for(let e of[`left`,`right`])this.panels[e]===`expanded`&&this.presentationFor(e)===`overlay`&&(this.panels[e]=`collapsed`)})}isInline(e){return e===`right`||!this.inlineEdges[e]?!1:e!==`left`||this.viewport!==`phone`}setInlineEdges(e){z(()=>{dn.every(t=>!!this.inlineEdges[t]==!!e[t])||(this.inlineEdges={...e},this.applyInline())})}applyInline(){this.isInline(`left`)&&this.panels.left===`collapsed`&&(this.panels.left=`expanded`);for(let e of[`top`,`bottom`])this.isInline(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)}setOverlayMatch(e,t){z(()=>{!!this.overlayMatches[e]!==t&&(this.overlayMatches={...this.overlayMatches,[e]:t})})}isEdgeShown(e){return this.panels[e]===`hidden`?!1:this.viewport!==`phone`||this.phonePresentation(e)!==`hidden`}isRegionVisible(e){switch(e){case`header`:return this.panels.top!==`hidden`;case`footer`:return this.panels.bottom!==`hidden`;case`leftSidebar`:return this.isEdgeShown(`left`)&&this.panels.left===`expanded`;case`rightSidebar`:return this.isEdgeShown(`right`)&&this.panels.right===`expanded`}}resizeLimits(e){return yn(e,this.config.panels[e])}panelSize(e){if(!this.resizeLimits(e))return null;let t=this.settings.sizes?.[e];return typeof t==`number`&&Number.isFinite(t)?t:null}setPanelSize(e,t,n={}){z(()=>{let r=this.resizeLimits(e);if(!r)return;let i=t===null||!Number.isFinite(t)?null:bn(t,r);this.settings=wn(this.settings,{sizes:{[e]:i}}),n.persist!==!1&&this.persistSettings()})}snapshot(){return{panels:{...this.panels},viewport:this.viewport,activeFocusToolId:this.activeFocusToolId,settings:{...this.settings,keymap:this.settings.keymap?{...this.settings.keymap}:void 0,panels:this.settings.panels?{...this.settings.panels}:void 0,sizes:this.settings.sizes?{...this.settings.sizes}:void 0}}}applySettings(e,t={}){let n=Kn(e),r=t.persist;z(()=>{this.settings=wn(this.settings,n);for(let e of dn)this.revealed.delete(e),this.panels[e]=_n(e,this.config.panels[e],this.settings,this.viewport,this.layoutPanels[e]);this.applyInline(),this.activeFocusToolId=this.settings.activeFocusToolId??this.activeFocusToolId,r!==!1&&this.persistSettings()})}setLayoutPanels(e={}){z(()=>{let t=this.layoutPanels;this.layoutPanels={...e};for(let n of dn){let r=t[n],i=e[n];if(r?.visible===i?.visible&&r?.initial===i?.initial)continue;let a=this.config.panels[n];a.initial!==`hidden`&&(this.revealed.delete(n),this.panels[n]=_n(n,a,this.settings,this.viewport,i),this.panels[n]===`expanded`&&this.closeExclusivePeers(n))}this.applyInline()})}setPanelStart(e,t){z(()=>{let n=this.config.panels[e];if(!(n.initial===`hidden`||n.viewportDefaults||this.layoutPanels[e]?.visible===!1)){if(this.settings.panels&&e in this.settings.panels){let{[e]:t,...n}=this.settings.panels;this.settings={...this.settings,panels:n}}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.applyInline(),this.persistSettings()}})}setLayout(e){z(()=>{let{layout:t,...n}=this.settings;this.settings=e&&!Ot(e)?{...n,layout:e}:n,this.persistSettings()})}setHotkeysEnabled(e){z(()=>this.applySettings({hotkeysEnabled:e}))}setHotkey(e,t){z(()=>{this.applySettings({keymap:{[e]:t?{code:t}:null}})})}setPanel(e,t){this.setPanelState(e,t)}setPanelState(e,t){dn.includes(e)&&[`hidden`,`collapsed`,`expanded`].includes(t)&&z(()=>{if(this.config.panels[e].initial===`hidden`||this.layoutPanels[e]?.visible===!1)this.panels[e]=`hidden`;else{if(this.isInline(e)){let n=e===`left`;n&&t===`collapsed`&&(t=`expanded`),!n&&t===`expanded`&&(t=`collapsed`)}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.settings=wn(this.settings,{panels:{[e]:t}}),this.persistSettings()}})}revealPanelTemporarily(e){return z(()=>!this.isEdgeShown(e)||this.panels[e]!==`collapsed`?!1:(this.panels[e]=`expanded`,this.revealed.add(e),!0))}endTemporaryReveal(e){z(()=>{this.revealed.delete(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)})}togglePanel(e){z(()=>{this.panels[e]!==`hidden`&&this.setPanel(e,this.panels[e]===`expanded`?`collapsed`:`expanded`)})}expandPanel(e){z(()=>this.setPanel(e,`expanded`))}collapsePanel(e){z(()=>this.setPanel(e,`collapsed`))}closeTopmostExpanded(){return z(()=>{for(let e of[...dn].reverse())if(!this.isInline(e)&&this.panels[e]===`expanded`&&this.isEdgeShown(e))return this.collapsePanel(e),!0;return!1})}registerFocusTool(e){let t=Jn(e);return z(()=>(this.focusTools=[...this.focusTools.filter(e=>e.id!==t.id),t].sort((e,t)=>(e.order??0)-(t.order??0)),this.activeFocusToolId||=t.id,()=>this.unregisterFocusTool(t.id)))}unregisterFocusTool(e){z(()=>{this.focusTools=this.focusTools.filter(t=>t.id!==e),this.activeFocusToolId===e&&(this.activeFocusToolId=this.focusTools[0]?.id??null)})}openFocusTool(e){z(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId=e,this.settings=wn(this.settings,{activeFocusToolId:e}),this.expandPanel(`right`),this.persistSettings())})}toggleFocusTool(e){z(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId===e&&this.panels.right===`expanded`?this.collapsePanel(`right`):this.openFocusTool(e))})}get openFocusToolId(){return this.panels.right===`expanded`&&this.isEdgeShown(`right`)?this.activeFocusToolId:null}get dockAvailable(){return this.config.panels.right.initial!==`hidden`&&this.layoutPanels.right?.visible!==!1&&(this.viewport!==`phone`||this.phonePresentation(`right`)!==`hidden`)}closeFocusTool(){this.collapsePanel(`right`)}openDockTool(e,t={}){return z(()=>{if(!this.focusTools.some(t=>t.id===e)||!this.dockAvailable)return!1;if(this.openFocusTool(e),t.focus===!1)return!0;let n=typeof document>`u`?null:document.activeElement;return this.dockReturnFocus=t.returnFocus??(n instanceof HTMLElement&&n!==document.body?n:null),this.dockFocusRequest+=1,!0})}toggleDockTool(e,t={}){return z(()=>!this.focusTools.some(t=>t.id===e)||!this.dockAvailable?!1:this.openFocusToolId===e?(this.closeFocusTool(),!0):this.openDockTool(e,t))}upsertActivity(e){let t=Yn(e);z(()=>{let e=new Date().toISOString(),n={...t,edge:t.edge??this.homeEdgeForScope(t.scope),createdAt:t.createdAt??e,updatedAt:t.updatedAt??e},r=this.activities.find(e=>e.id===t.id);this.activities=[...this.activities.filter(e=>e.id!==t.id),n],this.emitActivity({type:r&&r.status!==n.status?`transition`:`upsert`,activity:n,previous:r})})}updateActivity(e,t){let n=Xn(t);z(()=>{let t=this.activities.find(t=>t.id===e);t&&this.upsertActivity({...t,...n,id:e,updatedAt:new Date().toISOString()})})}removeActivity(e){z(()=>{let t=this.activities.find(t=>t.id===e);t&&(this.activities=this.activities.filter(t=>t.id!==e),this.emitActivity({type:`remove`,activity:t}))})}watchActivities(e){return this.activityListeners.add(e),()=>this.activityListeners.delete(e)}listActivities(e={}){return this.activities.map(e=>({...e,edge:e.edge??this.homeEdgeForScope(e.scope)})).filter(t=>Un(t,e))}activityBadge(e){let t=this.listActivities({edge:e}).filter(e=>Gn(e.status)),n=t.map(e=>e.progress).filter(e=>typeof e==`number`);return{count:t.length,running:t.filter(e=>e.status===`running`).length,hasFailed:this.listActivities({edge:e}).some(e=>e.status===`failed`),progress:n.length===0?null:n.reduce((e,t)=>e+t,0)/n.length}}homeEdgeForScope(e){let t=pn[e];return this.panels[t]===`hidden`?this.panels.bottom===`hidden`?dn.find(e=>this.panels[e]!==`hidden`)??t:`bottom`:t}closeExclusivePeers(e){if(this.viewport===`phone`&&(e===`left`||e===`right`)){let t=e===`left`?`right`:`left`;this.panels[t]===`expanded`&&this.isEdgeShown(t)&&(this.panels[t]=`collapsed`)}let t=this.config.panels[e].exclusiveGroup;if(t)for(let n of dn)n!==e&&this.config.panels[n].exclusiveGroup===t&&this.panels[n]===`expanded`&&(this.panels[n]=`collapsed`,this.settings=wn(this.settings,{panels:{[n]:`collapsed`}}))}async persistSettings(){this.adapter&&await this.adapter.write(Sn(this.settings,this.config))}emitActivity(e){for(let t of this.activityListeners)t(e)}};function Hn(e={}){return new Vn(e)}function Un(e,t){return t.edge&&e.edge!==t.edge||t.scope&&e.scope!==t.scope||t.kind&&!Wn(e.kind,t.kind)||t.status&&!Wn(e.status,t.status)?!1:!t.subject||e.subject?.type===t.subject.type&&e.subject.id===t.subject.id}function Wn(e,t){return Array.isArray(t)?t.includes(e):e===t}function Gn(e){return e===`queued`||e===`running`}function Kn(e){let t={...e};return`keymap`in e&&(t.keymap=qn(e.keymap)),`panels`in e&&(t.panels=e.panels?{...e.panels}:e.panels),`sizes`in e&&(t.sizes=e.sizes?{...e.sizes}:e.sizes),t}function qn(e){if(!e)return e;let t={};for(let n of dn)if(n in e){let r=e[n];t[n]=r&&{...r}}return t}function Jn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),`activityKinds`in e&&(t.activityKinds=e.activityKinds?[...e.activityKinds]:e.activityKinds),t}function Yn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Xn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Zn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Rn),n=window.matchMedia(zn),r=()=>e.setViewport(Nn({phone:t.matches,desktop:n.matches}));return r(),t.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}}function Qn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=[];for(let n of[`left`,`right`]){let r=e.config.panels[n].overlayMedia;if(!r)continue;let i=window.matchMedia(r),a=()=>e.setOverlayMatch(n,i.matches);a(),i.addEventListener(`change`,a),t.push(()=>i.removeEventListener(`change`,a))}return()=>{for(let e of t)e()}}function $n(e,t){let n=new Pn(t.tuning),r=0,i=!1;function a(){r=0;let a=n.update({y:e.scrollTop,maxY:e.scrollHeight-e.clientHeight,pinned:t.isPinned()});a!==i&&(i=a,t.onChange(a))}function o(){r||=requestAnimationFrame(a)}return e.addEventListener(`scroll`,o,{passive:!0}),{recheck:a,reset(){n.reset(),i&&(i=!1,t.onChange(!1))},destroy(){r&&cancelAnimationFrame(r),e.removeEventListener(`scroll`,o)}}}function er(e){if(typeof window>`u`||!window.visualViewport)return()=>{};let t=window.visualViewport,n=!1;function r(){let r=Fn({layoutHeight:window.innerHeight,visualHeight:t.height,scale:t.scale});if(r===n)return;n=r,n?document.documentElement.dataset.keyboardOpen=``:delete document.documentElement.dataset.keyboardOpen,e(n);let i=document.activeElement;n&&i instanceof HTMLElement&&jn(i)&&i.scrollIntoView({block:`center`})}return t.addEventListener(`resize`,r),()=>{t.removeEventListener(`resize`,r),delete document.documentElement.dataset.keyboardOpen}}function tr(e,t){let n=!!e.querySelector(Ln);if(t(n),typeof MutationObserver>`u`)return()=>{};let r=new MutationObserver(()=>{let r=!!e.querySelector(Ln);r!==n&&(n=r,t(n))});return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function nr(e,t){let n=e.panelSize(t);return n===null?e.config.panels[t].expandedSize:`${n}px`}function rr(e,t){let n=e.panels[t];return n===`hidden`?`0rem`:n===`collapsed`||e.presentationFor(t)===`overlay`?ir(e,t):nr(e,t)}function ir(e,t){if(e.panels[t]===`hidden`)return`0rem`;let n=e.config.panels[t];return n.rail===!1?`0rem`:n.collapsedSize}function ar(e){return[`--smrt-admin-shell-left-track: ${rr(e,`left`)}`,`--smrt-admin-shell-right-track: ${rr(e,`right`)}`,`--smrt-admin-shell-top-track: ${rr(e,`top`)}`,`--smrt-admin-shell-bottom-track: ${rr(e,`bottom`)}`,`--smrt-admin-shell-left-collapsed: ${ir(e,`left`)}`,`--smrt-admin-shell-right-collapsed: ${ir(e,`right`)}`,`--smrt-admin-shell-left-expanded: ${nr(e,`left`)}`,`--smrt-admin-shell-right-expanded: ${nr(e,`right`)}`,`--smrt-admin-shell-top-expanded: ${nr(e,`top`)}`,`--smrt-admin-shell-bottom-expanded: ${nr(e,`bottom`)}`].join(`; `)}var or=f(`<svg class="smrt-admin-shell__edge-toggle-chevron" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg><!>`,1),sr=c(`<kbd class="smrt-admin-shell__edge-toggle-kbd svelte-1ifuk0b"> </kbd>`),cr=c(`<span class="svelte-1ifuk0b"> </span> <!> <!>`,1),lr=c(`<div class="smrt-admin-shell__tenant-utilities svelte-1ifuk0b" data-smrt-part="utilities"><!> <!></div>`),ur=c(`<button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-left-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),dr=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__tools-opener svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-right-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),fr=c(`<div role="separator" aria-orientation="vertical" tabindex="0"></div>`),pr=c(`<p class="smrt-admin-shell__empty svelte-1ifuk0b"> </p>`),mr=c(`<div><!></div>`),hr=c(`<div></div>`),gr=c(`<div class="smrt-admin-shell__region-edit svelte-1ifuk0b"><!></div>`),_r=c(`<div id="smrt-admin-shell-header" class="smrt-admin-shell__header svelte-1ifuk0b" data-testid="admin-shell-header"><!></div>`),vr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-left svelte-1ifuk0b"><!></div>`),yr=c(`<!> <!>`,1),br=c(`<div class="smrt-admin-shell__account svelte-1ifuk0b"><!></div>`),xr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-right svelte-1ifuk0b"><!></div>`),Sr=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--top svelte-1ifuk0b"><!></section>`),Cr=c(`<header id="smrt-admin-shell-top-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--top svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--top svelte-1ifuk0b"><!> <!> <!> <!> <!> <!> <!> <!></div> <!> <!></header>`),wr=c(`<div class="smrt-admin-shell__drawer-head svelte-1ifuk0b" data-smrt-part="header"><div class="smrt-admin-shell__drawer-title svelte-1ifuk0b"><!></div> <button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button></div>`),Tr=c(`<div class="smrt-admin-shell__tenant-footer svelte-1ifuk0b"><!></div>`),Er=c(`<div class="smrt-admin-shell__tenant-stack svelte-1ifuk0b"><!> <div class="smrt-admin-shell__tenant-content svelte-1ifuk0b"><!></div> <!> <!> <!></div>`),Dr=c(`<div class="smrt-admin-shell__tenant-rail-footer svelte-1ifuk0b"><!></div>`),Or=c(`<div class="smrt-admin-shell__tenant-rail-stack svelte-1ifuk0b"><div class="smrt-admin-shell__tenant-rail-content svelte-1ifuk0b"><!></div> <!> <!></div>`),kr=c(`<aside id="smrt-admin-shell-left-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--left svelte-1ifuk0b"><!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!> <!> <!></div></aside>`),Ar=c(`<span class="smrt-admin-shell__phone-default-end svelte-1ifuk0b"><!></span>`),jr=c(`<div class="smrt-admin-shell__phone-default-top svelte-1ifuk0b"><!> <!></div>`),Mr=c(`<div class="smrt-admin-shell__phone-top svelte-1ifuk0b" data-testid="admin-shell-phone-top"><!></div>`),Nr=c(`<button type="button" class="smrt-admin-shell__scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-scrim"></button>`),Pr=c(`<button type="button" class="smrt-admin-shell__overlay-scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-overlay-scrim"></button>`),Fr=c(`<div class="smrt-admin-shell__sheet-grabber svelte-1ifuk0b" aria-hidden="true"><span class="svelte-1ifuk0b"></span></div>`),Ir=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__rail-close svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),Lr=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),Rr=c(`<span class="smrt-admin-shell__focus-tool-badge svelte-1ifuk0b"> </span>`),zr=c(`<button type="button"><!> <!></button>`),Br=c(`<nav class="smrt-admin-shell__focus-rail svelte-1ifuk0b"></nav>`),Vr=c(`<div class="smrt-admin-shell__panel smrt-admin-shell__panel--right svelte-1ifuk0b" tabindex="-1"><!> <!> <!></div>`),Hr=c(`<aside id="smrt-admin-shell-right-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--right svelte-1ifuk0b"><!> <!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!></div> <!></aside>`),Ur=c(`<button type="button" class="smrt-admin-shell__edit-indicator svelte-1ifuk0b" data-edit-indicator="right" aria-expanded="false" aria-controls="smrt-admin-shell-right-panel"><!> <span class="smrt-admin-shell__edit-indicator-label"> </span></button>`),Wr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-left svelte-1ifuk0b"><!></div>`),Gr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-right svelte-1ifuk0b"><!></div>`),Kr=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--bottom svelte-1ifuk0b"><!></section>`),qr=c(`<footer id="smrt-admin-shell-bottom-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--bottom svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--bottom svelte-1ifuk0b"><!> <!> <!> <!> <!> <!></div> <!> <!></footer>`),Jr=c(`<div class="smrt-admin-shell__overlays svelte-1ifuk0b"><!></div>`),Yr=c(`<div class="smrt-admin-shell__phone-bar svelte-1ifuk0b" data-testid="admin-shell-phone-bar"><!></div>`),Xr=c(`<div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b"> </dd></div>`),Zr=c(`<header class="svelte-1ifuk0b"><h2 class="svelte-1ifuk0b"> </h2> <!></header> <dl class="svelte-1ifuk0b"><!> <div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b">?</dd></div></dl>`,1),Qr=c(`<div class="smrt-admin-shell__shortcuts svelte-1ifuk0b" role="dialog" aria-modal="true" tabindex="-1"><div class="smrt-admin-shell__shortcuts-panel svelte-1ifuk0b"><!></div></div>`),$r=c(`<div class="smrt-admin-shell svelte-1ifuk0b" data-smrt-component="AdminShell"><!> <!> <!> <!> <!> <main id="smrt-admin-shell-main" class="smrt-admin-shell__main svelte-1ifuk0b"><!></main> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div>`);function ei(a,c){_(c,!0);let f=(r,i=m)=>{var a=T(),o=B(a),s=t=>{let r=n(Gt);{let i=n(()=>$t(`left`)?`${e(r)} (${Jt(`left`)})`:e(r)),a=n(()=>$(`left`));me(t,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle smrt-admin-shell__edge-toggle--left`,get"aria-label"(){return e(r)},get title(){return e(i)},get"aria-expanded"(){return e(a)},"aria-controls":`smrt-admin-shell-left-panel`,onclick:()=>q.togglePanel(`left`),children:(e,t)=>{var n=or(),r=B(n),i=L(r);Ue(F(r),{edge:`left`}),V(()=>H(i,`d`,ye.chevronRight)),C(e,n)},$$slots:{default:!0}})}},c=r=>{{let a=n(()=>$(i())),o=n(()=>`smrt-admin-shell-${i()}-panel`);me(r,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle`,get"aria-expanded"(){return e(a)},get"aria-controls"(){return e(o)},onclick:()=>q.togglePanel(i()),children:(r,a)=>{var o=cr(),s=B(o),c=L(s,!0),u=F(s,2),d=e=>{var t=sr(),n=L(t,!0);V(e=>l(n,e),[()=>Jt(i())]),C(e,t)},f=n(()=>$t(i()));t(u,t=>{e(f)&&t(d)}),Ue(F(u,2),{get edge(){return i()}}),V(e=>l(c,e),[()=>Wt(i())]),C(r,o)},$$slots:{default:!0}})}};t(o,e=>{i()===`left`?e(s):e(c,-1)}),C(r,a)},h=r=>{var i=lr(),a=N(i),l=e=>{var t=T(),n=B(t);o(n,()=>c.tenantUtilities),C(e,t)};t(a,e=>{c.tenantUtilities&&e(l)});var u=F(a,2),d=e=>{f(e,()=>`left`)},p=n(()=>Xt(`left`));t(u,t=>{e(p)&&t(d)}),s(i),C(r,i)},g=e=>{var t=ur(),n=N(t),r=L(n);s(t),V((e,n,i)=>{H(t,`aria-label`,e),H(t,`title`,n),H(t,`aria-expanded`,i),H(r,`d`,ye.menu)},[()=>K(Z[`ui.admin_shell.menu`]),()=>K(Z[`ui.admin_shell.menu`]),()=>$(`left`)]),E(`click`,t,Kt),C(e,t)},w=e=>{var t=dr(),n=N(t),r=L(n);s(t),V((e,n,i)=>{H(t,`aria-label`,e),H(t,`title`,n),H(t,`aria-expanded`,i),H(r,`d`,ye[be])},[()=>K(Z[`ui.admin_shell.tools`]),()=>K(Z[`ui.admin_shell.tools`]),()=>$(`right`)]),E(`click`,t,qt),C(e,t)},D=(r,a=m)=>{var o=T(),s=B(o),c=t=>{let r=n(()=>q.resizeLimits(a()));var o=fr();V((t,n)=>{i(o,1,`smrt-admin-shell__resizer smrt-admin-shell__resizer--${a()??``}`,`svelte-1ifuk0b`),H(o,`aria-controls`,`smrt-admin-shell-${a()}-panel`),H(o,`aria-label`,t),H(o,`aria-valuemin`,e(r)?.min),H(o,`aria-valuemax`,e(r)?.max),H(o,`aria-valuenow`,n),H(o,`data-testid`,`admin-shell-resizer-${a()}`)},[()=>K(Z[`ui.admin_shell.resize_panel`],{label:Wt(a())}),()=>pt(a())]),E(`pointerdown`,o,e=>bt(e,a())),E(`keydown`,o,e=>_t(e,a())),E(`dblclick`,o,()=>q.setPanelSize(a(),null)),C(t,o)},l=n(()=>ht(a()));t(s,t=>{e(l)&&t(c)}),C(r,o)},ee=(r,i=m)=>{var a=T(),s=B(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.focusPanel,()=>({tool:i()})),C(e,t)},d=e=>{var t=T(),n=B(t);o(n,()=>i().render,()=>({tool:i()})),C(e,t)},f=t=>{let r=n(()=>i().component);var a=T(),o=B(a);v(o,()=>e(r),(e,t)=>{t(e,{get tool(){return i()},get shell(){return q}})}),C(t,a)},p=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_focus_tools`])]),C(e,t)};t(s,e=>{c.focusPanel?e(u):i()?.render?e(d,1):i()?.component?e(f,2):e(p,-1)}),C(r,a)},te=(t,n)=>{let r=x(()=>u(n?.(),!1));mt(t,{get title(){return oe()},get subtitle(){return ue()},get homeHref(){return c.homeHref},get logoSrc(){return c.logoSrc},get logoAlt(){return le()},get brand(){return c.brand},get compact(){return e(r)}})},R=(r,a=m)=>{var l=T(),u=B(l),d=r=>{var l=T(),u=B(l),d=e=>{var t=mr(),n=N(t);o(n,()=>c.layoutEdit.zone,a),s(t),V(e=>{i(t,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``} smrt-admin-shell__slot--editing`,`svelte-1ifuk0b`),H(t,`data-slot`,a()),H(t,`data-smrt-edit-zone`,a()),H(t,`data-drop-target`,c.layoutEdit.highlight===a()?``:void 0)},[()=>a().replace(`.`,`-`)]),C(e,t)},f=n(()=>St(gt(a())));t(u,t=>{e(f)&&t(d)}),C(r,l)},f=t=>{var n=hr();p(n,21,()=>e(wt)[a()]??[],b,(t,n)=>{var r=T(),i=B(r);o(i,()=>e(n)),C(t,r)}),s(n),V(e=>{i(n,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``}`,`svelte-1ifuk0b`),H(n,`data-slot`,a())},[()=>a().replace(`.`,`-`)]),C(t,n)};t(u,t=>{c.layoutEdit?.active?t(d):e(wt)[a()]?.length&&t(f,1)}),C(r,l)},ne=(r,i=m)=>{var a=T(),l=B(a),u=e=>{var t=gr(),n=N(t);o(n,()=>c.layoutEdit.regionControl,i),s(t),V(()=>H(t,`data-region-edit`,i())),C(e,t)},d=n(()=>c.layoutEdit?.active&&c.layoutEdit.regionControl&&Ct(i()));t(l,t=>{e(d)&&t(u)}),C(r,a)},W=(r,a=m)=>{var l=T(),u=B(l),d=e=>{var t=mr(),n=N(t);o(n,()=>c.layoutEdit?.strip??m,a),s(t),V(()=>{i(t,1,`smrt-admin-shell__strip smrt-admin-shell__strip--${a()??``}`,`svelte-1ifuk0b`),H(t,`data-region-strip`,a())}),C(e,t)},f=n(()=>e(Et).includes(a()));t(u,t=>{e(f)&&t(d)}),C(r,l)},oe=k(c,`title`,3,`SMRT`),se=k(c,`edgeToggles`,3,!1),ce=k(c,`brandInSlot`,3,!1),le=k(c,`logoAlt`,3,``),ue=k(c,`subtitle`,3,``),fe=k(c,`storageKey`,3,`smrt-admin-shell`),pe=k(c,`rootElement`,15),he=k(c,`phoneDockOpener`,3,!0),ge=k(c,`pinChrome`,3,!1),{t:K}=de(),q=z(()=>c.state??Hn({config:c.config,settings:c.settings,settingsAdapter:c.settingsAdapter,storageKey:fe()}));Be(q);let _e=A(!1);function xe(){return q.focusTools.find(e=>e.id===q.activeFocusToolId)??q.focusTools[0]??null}let Se=[`top`,`left`,`bottom`,`right`],Ce=[`left`,`right`],we=A(void 0),Te=A(!1),Ee=A(!1),De=A(!1),Oe=A(null),ke=A(!1),Ae=P({}),je=null,J=n(()=>q.viewport),Y=n(()=>e(J)===`phone`),Me=n(()=>q.viewport===`phone`);j(()=>{let t=Ae.left;if(!e(Me)||!$(`left`)||!t)return;let n=document.activeElement instanceof HTMLElement?document.activeElement:null,r=!1;return ie().then(async()=>{let n=t.getAnimations?.({subtree:!0})??[];await Promise.all(n.filter(e=>e.playState!==`paused`&&Number.isFinite(e.effect?.getComputedTiming().endTime??0)).map(e=>e.finished.catch(()=>{}))),!r&&e(Me)&&$(`left`)&&t.isConnected&&t.querySelector(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)?.focus()}),()=>{r=!0,queueMicrotask(()=>{n?.isConnected&&n.focus()})}});let X=n(()=>c.phone?.scrim!==!1),Ne=n(()=>c.phone?.swipeToClose!==!1),Pe=n(()=>e(Y)&&he()&&q.isEdgeShown(`right`)&&(q.focusTools.length>0||!!c.focusRail)),Fe=n(()=>e(Y)&&q.isEdgeShown(`left`)&&q.phonePresentation(`left`)!==`hidden`),Ie=n(()=>!!c.header&&!(e(Y)&&c.phoneTopBar)),Le=n(()=>e(Y)&&c.phoneBottomBar?In({formActions:e(Ee),keyboardOpen:e(Te)}):`none`),Re=n(()=>e(Y)&&Ce.some(e=>Rt(e)===`expanded`&&q.isEdgeShown(e))),ze=!1;j(()=>{let e=!!c.layoutEdit?.active;z(()=>{e&&!ze&&q.viewport===`phone`&&lt(),ze=e})});let Ve=n(()=>[`--smrt-shell-floating-reserve-inline: ${c.floatingReserve?.inline??`0px`}`,`--smrt-shell-floating-reserve-block: ${c.floatingReserve?.block??`0px`}`,`--smrt-shell-floating-reserve-main: ${c.floatingReserve?.main??`0px`}`].join(`; `)),He=n(()=>[`--smrt-admin-shell-header-track: ${e(Ie)?`var(--smrt-admin-shell-header-size)`:`0rem`}`,`--smrt-admin-shell-phone-bar-track: ${e(Le)===`nav`?`var(--smrt-admin-shell-phone-bar-size)`:`0rem`}`].join(`; `));function Ke(t){let n=pe();if(!n||!(t.target instanceof Node)||!n.contains(t.target))return;let r=t.detail??{},i=Ae.right,a=$(`right`)&&(e(Y)||q.presentationFor(`right`)===`overlay`);i?.contains(t.target)&&a&&q.config.panels.right.closeOnNavigate!==!1&&(q.dockReturnFocus=null,Xe=null,q.collapsePanel(`right`));let o=n.querySelector(`.smrt-admin-shell__main`)??n;qe?.(),qe=ot(o,r.focus??`h1, h2`,3e3,{skipExisting:!r.focus})}let qe=null;j(()=>{if(typeof document<`u`)return document.addEventListener(it,Ke),()=>{document.removeEventListener(it,Ke),qe?.()}});async function Je(e){let t=pe(),n=e.target;if(e.defaultPrevented||!t||!(n instanceof Element)||Ae.right?.contains(n)||!q.dockAvailable)return;let r=q.focusTools,i=r.find(e=>e.id===`assistant`)??r.find(e=>e.id===q.activeFocusToolId)??r[0];if(!i&&!c.focusPanel)return;let a=e.detail;if(typeof a?.prompt!=`string`)return;e.preventDefault(),e.stopPropagation();let o=n instanceof HTMLElement?n:null;i?q.openDockTool(i.id,{focus:!1,returnFocus:o}):(q.expandPanel(`right`),q.dockReturnFocus=o),await ie(),await new Promise(e=>setTimeout(e,0));let s=Ae.right;s?.isConnected&&Ge(s,{prompt:a.prompt})}j(()=>{let e=pe();if(!e)return;let t=e=>void Je(e);return e.addEventListener(We,t),()=>e.removeEventListener(We,t)});let Ye=n(()=>e(Y)?null:Ce.find(e=>Rt(e)===`expanded`&&q.isEdgeShown(e)&&q.presentationFor(e)===`overlay`)??null),Xe=null,Ze=null,Qe=A(null),$e=null;function et(){$e&&clearTimeout($e),$e=null,U(Qe,null)}function tt(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function nt(t){return $(t)||e(Qe)===t}j(()=>{let t=e(Ye);z(()=>{if(t===Ze)return;let n=Ze;if(Ze=t,typeof document>`u`)return;if(t){et();let e=document.activeElement;Xe=e instanceof HTMLElement&&e!==document.body?e:null;let n=Ae[t];n&&!n.contains(document.activeElement)&&n.focus({preventScroll:!0});return}let r=n?Ae[n]:void 0,i=document.activeElement;(!i||i===document.body||r?.contains(i))&&Xe?.isConnected&&Xe.focus({preventScroll:!0}),Xe=null,n&&Rt(n)!==`expanded`&&q.presentationFor(n)===`overlay`&&!e(Y)&&!tt()&&(et(),U(Qe,n,!0),$e=setTimeout(et,600))})});let rt=0;j(()=>{let e=q.dockFocusRequest;z(()=>{e!==rt&&(rt=e,ie().then(at))})});function at(){let e=Ae.right?.querySelector(`.smrt-admin-shell__panel--right`);e&&!e.hidden&&$(`right`)&&(e.contains(document.activeElement)||(e.querySelector(`a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])`)??e).focus({preventScroll:!0}))}let st=!1;j(()=>{let e=$(`right`);z(()=>{let t=st;if(st=e,!t||e)return;let n=q.dockReturnFocus;if(q.dockReturnFocus=null,!n?.isConnected||typeof document>`u`)return;let r=document.activeElement;(!r||r===document.body||Ae.right?.contains(r))&&n.focus({preventScroll:!0})})});function ct(t,n){e(Qe)===n&&t.target===t.currentTarget&&et()}function lt(){for(let e of Ce)Rt(e)===`expanded`&&q.isEdgeShown(e)&&q.collapsePanel(e)}re(()=>{let t=Zn(q),n=Qn(q),r=q.hydrate().then(()=>q.closeOverlaidEdges()),i=!1,a=0,o=null,s=null;function l(){let e=pe();if(!e||typeof MutationObserver>`u`)return;let t=e.closest(`[data-color-scheme]`)??document.documentElement;o=new MutationObserver(()=>{tt()||(e.setAttribute(`data-smrt-theme-changing`,``),s&&clearTimeout(s),s=setTimeout(()=>e.removeAttribute(`data-smrt-theme-changing`),ve(`--smrt-duration-medium1`,e)+100))}),o.observe(t,{attributes:!0,attributeFilter:[`data-color-scheme`,`class`]})}r.then(()=>{a=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{i||(U(ke,!0),l())})})});let u=c.phoneBottomBar?er(e=>U(Te,e,!0)):()=>{},d=c.phoneBottomBar&&e(we)?tr(e(we),e=>U(Ee,e,!0)):()=>{};je=c.phoneTopBar&&c.phone?.hideOnScroll!==!1&&e(we)?$n(e(we),{onChange:e=>U(De,e,!0),isPinned:()=>ge()||e(Re)||q.viewport!==`phone`}):null;function f(t){if(t.key===`Escape`){if(e(_e)){U(_e,!1),t.preventDefault();return}if(c.layoutEdit?.active)return;q.closeTopmostExpanded()&&t.preventDefault();return}let n=Dn(t,q.config.panels,q.settings);if(n){if(n.type===`show-shortcuts`){if(!Se.some(Qt))return;t.preventDefault(),U(_e,!0)}else{if(!Qt(n.edge))return;t.preventDefault(),q.togglePanel(n.edge)}}}return window.addEventListener(`keydown`,f),()=>{window.removeEventListener(`keydown`,f),i=!0,cancelAnimationFrame(a),o?.disconnect(),s&&clearTimeout(s),t(),n(),$e&&clearTimeout($e),u(),d(),je?.destroy(),je=null}}),j(()=>{(ge()||e(Re)||!e(Y))&&U(De,!1)});let ut;j(()=>{let e=c.path;z(()=>{ut!==void 0&&e!==ut&&(q.viewport===`phone`&&lt(),je?.reset(),U(De,!1)),ut=e})});function dt(){if(typeof window>`u`)return 16;let e=Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)&&e>0?e:16}function ft(e){let t=/^\s*(-?\d*\.?\d+)(px|rem|em)?\s*$/.exec(e);if(!t)return null;let n=Number.parseFloat(t[1]);return t[2]===`rem`||t[2]===`em`?n*dt():n}function pt(e){let t=q.resizeLimits(e),n=q.panelSize(e);if(n!==null)return n;let r=ft(q.config.panels[e].expandedSize)??Ae[e]?.getBoundingClientRect().width??0;return t?bn(r,t):Math.round(r)}function ht(t){return!e(Y)&&$(t)&&q.presentationFor(t)===`push`&&q.resizeLimits(t)!==null}function _t(e,t){let n=q.resizeLimits(t);if(!n)return;let r=n.step*(e.shiftKey?4:1),i=t===`left`?`ArrowRight`:`ArrowLeft`,a=t===`left`?`ArrowLeft`:`ArrowRight`,o;if(e.key===i)o=pt(t)+r;else if(e.key===a)o=pt(t)-r;else if(e.key===`Home`)o=n.min;else if(e.key===`End`)o=n.max;else if(e.key===`Enter`)o=null;else return;e.preventDefault(),q.setPanelSize(t,o)}let yt=null;j(()=>()=>yt?.(!1));function bt(e,t){if(e.button!==0||!q.resizeLimits(t))return;e.preventDefault(),yt?.(!0);let n=e.currentTarget,r=e.pointerId;r!==void 0&&n.setPointerCapture?.(r);let i=e.clientX,a=pt(t),o=a;U(Oe,t,!0);function s(e){let n=e.clientX-i;o=a+(t===`left`?n:-n),q.setPanelSize(t,o,{persist:!1})}function c(e){yt===c&&(yt=null,n.removeEventListener(`pointermove`,s),n.removeEventListener(`pointerup`,l),n.removeEventListener(`pointercancel`,l),n.removeEventListener(`lostpointercapture`,l),r!==void 0&&n.hasPointerCapture?.(r)&&n.releasePointerCapture(r),U(Oe,null),e&&o!==a&&q.setPanelSize(t,o))}function l(){c(!0)}yt=c,n.addEventListener(`pointermove`,s),n.addEventListener(`pointerup`,l),n.addEventListener(`pointercancel`,l),n.addEventListener(`lostpointercapture`,l)}let xt=n(()=>!c.account&&!!c.tenantFooter&&(!q.isEdgeShown(`left`)||!$(`left`)&&!c.tenantRailFooter));function St(e){return q.isRegionVisible(e)}function Ct(e){return e===`leftSidebar`?q.isEdgeShown(`left`):e===`rightSidebar`?q.isEdgeShown(`right`):St(e)}let wt=n(()=>{let e={};for(let[t,n]of Object.entries(c.slots??{})){if(!n)continue;let r=vt(t,St);r&&(e[r]??=[]).push(n)}return e}),Tt={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},Et=n(()=>c.layoutEdit?.active&&c.layoutEdit.strip?c.layoutEdit.hiddenRegions??[]:[]);function Dt(...t){return t.some(t=>(e(wt)[t]?.length??0)>0)}let Ot=n(()=>!!c.layoutEdit?.active),Q=n(()=>!(e(Ot)&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`)&&(e(Y)||Rt(`left`)===`hidden`)),kt=n(()=>Rt(`top`)!==`hidden`&&(e(Ot)||!!c.appBar||!ce()||Xt(`top`)||e(Q)||e(Pe)||!!c.account||e(xt)||!!c.topLeftCorner||!!c.topRightCorner||Dt(`header.start`,`header.center`,`header.end`)||Ut(`top`))),At=n(()=>Rt(`bottom`)!==`hidden`&&(e(Ot)||!!c.systemBar||!!c.bottomLeftCorner||!!c.bottomRightCorner||Xt(`bottom`)&&!(!c.systemPanel&&c.systemBar)||Dt(`footer.start`,`footer.center`,`footer.end`)||Ut(`bottom`))),jt=n(()=>q.isEdgeShown(`right`)&&(e(Ot)||q.focusTools.length>0||!!c.focusRail||!!c.focusPanel||Xt(`right`)||Dt(`rightSidebar.header`,`rightSidebar.footer`)||Ut(`right`))),Mt=n(()=>e(Y)&&!c.phoneTopBar&&!e(kt)&&(e(Fe)||e(Pe))),Nt=n(()=>e(Y)&&(!!c.phoneTopBar||e(Mt))),Pt=n(()=>[ar(q),...e(kt)?[]:[`--smrt-admin-shell-top-track: 0rem`],...e(At)?[]:[`--smrt-admin-shell-bottom-track: 0rem`],...e(jt)?[]:[`--smrt-admin-shell-right-track: 0rem`],...e(Et).map(e=>`--smrt-admin-shell-${Tt[e]}-track: 1.75rem`)].join(`; `));function Ft(e,t){return`${e?`var(--smrt-admin-shell-left-collapsed)`:`0px`} minmax(0, 1fr) ${t?`var(--smrt-admin-shell-right-collapsed)`:`0px`}`}let It=n(()=>Ft(c.topLeftCorner,c.topRightCorner)),Lt=n(()=>Ft(c.bottomLeftCorner,c.bottomRightCorner));function Rt(e){return q.panels[e]}function $(e){return Rt(e)===`expanded`}function zt(e){return Rt(e)===`collapsed`&&q.config.panels[e].keepMounted===!0&&(e!==`top`&&e!==`bottom`||!q.isInline(e))}let Bt=n(()=>c.layoutEdit?.active&&!e(Y)&&q.config.panels.right.rail===!1&&q.isEdgeShown(`right`)&&Rt(`right`)===`collapsed`&&q.focusTools.length>0?q.focusTools:null),Vt=!1;function Ht(){let e=q.focusTools;if(e.length===0)return;let t=e.find(e=>e.id===q.activeFocusToolId)??e[0];q.openFocusTool(t.id),Vt=!0}j(()=>{c.layoutEdit?.active||z(()=>{Vt&&q.panels.right===`expanded`&&q.collapsePanel(`right`),Vt=!1})});function Ut(e){return nt(e)||zt(e)}function Wt(e){return q.config.panels[e].label}function Gt(){let e=Wt(`left`),t=$(`left`);return e&&e!==hn.left.label?K(Z[t?`ui.admin_shell.collapse_panel`:`ui.admin_shell.expand_panel`],{panel:e}):K(Z[t?`ui.admin_shell.collapse_sidebar`:`ui.admin_shell.expand_sidebar`])}function Kt(){q.setPanelState(`left`,$(`left`)?`collapsed`:`expanded`)}function qt(){if($(`right`)){q.collapsePanel(`right`);return}let e=xe();e?q.openFocusTool(e.id):q.expandPanel(`right`)}function Jt(e){return Mn(Cn(e,q.config.panels[e],q.settings))}function Yt(e){return typeof se()==`boolean`?se():se()[e]===!0}function Xt(e){let t=Yt(e);return e===`left`&&(c.showTenantToggle===!1?t=!1:c.showTenantToggle===!0&&(t=!0)),t}let Zt=n(()=>({top:Xt(`top`)||Yt(`top`)||c.hotkeys===!0,left:Xt(`left`)||Yt(`left`)||c.hotkeys===!0,right:Xt(`right`)||Yt(`right`)||c.hotkeys===!0,bottom:Xt(`bottom`)||Yt(`bottom`)||c.hotkeys===!0}));q.setInlineEdges(z(()=>({top:!e(Zt).top,left:!e(Zt).left,right:!e(Zt).right,bottom:!e(Zt).bottom}))),j(()=>{let t=e(Zt);q.setInlineEdges({top:!t.top,left:!t.left,right:!t.right,bottom:!t.bottom})});function Qt(e){return c.hotkeys===void 0?Yt(e)||Xt(e):c.hotkeys}j(()=>{let t={top:e(kt),left:q.isEdgeShown(`left`),right:e(jt),bottom:e(At)},n=z(()=>q.regionsRendered);Object.keys(t).some(e=>t[e]!==n[e])&&(q.regionsRendered=t)}),j(()=>{q.hotkeysAvailable=[`top`,`left`,`right`,`bottom`].some(Qt)});function $t(e){return Qt(e)&&q.settings.hotkeysEnabled!==!1&&Cn(e,q.config.panels[e],q.settings)!==null}function en(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=()=>Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>e.offsetParent!==null);(n()[0]??e).focus();function r(t){if(t.key!==`Tab`)return;let r=n();if(r.length===0){t.preventDefault(),e.focus();return}let i=r[0],a=r[r.length-1];t.shiftKey&&document.activeElement===i?(t.preventDefault(),a.focus()):!t.shiftKey&&document.activeElement===a&&(t.preventDefault(),i.focus())}return e.addEventListener(`keydown`,r),{destroy(){e.removeEventListener(`keydown`,r),t?.focus()}}}var tn=$r(),nn=N(tn),rn=t=>{var n=_r(),r=N(n);o(r,()=>c.header??m,()=>({viewport:e(J)})),s(n),C(t,n)};t(nn,t=>{e(Ie)&&t(rn)});var an=F(nn,2);W(an,()=>`header`);var on=F(an,2),sn=r=>{var a=Cr();let u;var d=N(a),p=e=>{var t=vr(),n=N(t);o(n,()=>c.topLeftCorner),s(t),C(e,t)};t(d,e=>{c.topLeftCorner&&e(p)});var m=F(d,2);S(m,``,{},{"--smrt-admin-shell-band-column":2});var h=N(m),_=e=>{var t=T(),n=B(t);o(n,()=>c.appBar),C(e,t)},v=r=>{var i=yr(),a=B(i),o=e=>{te(e)};t(a,e=>{ce()||e(o)});var s=F(a,2),c=e=>{f(e,()=>`top`)},l=n(()=>Xt(`top`));t(s,t=>{e(l)&&t(c)}),C(r,i)};t(h,e=>{c.appBar?e(_):e(v,-1)});var y=F(h,2),b=e=>{var t=mr();let n;var r=N(t);g(r),s(t),V(e=>n=i(t,1,`smrt-admin-shell__tenant-opener svelte-1ifuk0b`,null,n,{"restore-hidden":e}),[()=>Rt(`left`)===`hidden`]),C(e,t)},x=n(()=>!(c.layoutEdit?.active&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`));t(y,t=>{e(x)&&t(b)});var E=F(y,2);R(E,()=>`header.start`);var D=F(E,2);R(D,()=>`header.center`);var O=F(D,2),k=e=>{var n=br(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.account),C(e,t)},a=e=>{var t=T(),n=B(t);o(n,()=>c.tenantFooter),C(e,t)};t(r,e=>{c.account?e(i):c.tenantFooter&&e(a,1)}),s(n),C(e,n)};t(O,t=>{(c.account||e(xt))&&t(k)});var A=F(O,2);R(A,()=>`header.end`);var j=F(A,2),M=e=>{w(e)};t(j,t=>{e(Pe)&&t(M)});var ee=F(j,2);ne(ee,()=>`header`),s(m);var P=F(m,2),I=e=>{var t=xr(),n=N(t);o(n,()=>c.topRightCorner),s(t),C(e,t)};t(P,e=>{c.topRightCorner&&e(I)});var z=F(P,2),re=e=>{var n=Sr(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.appPanel),C(e,t)},a=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_app_panel`])]),C(e,t)};t(r,e=>{c.appPanel?e(i):e(a,-1)}),s(n),V((e,t)=>{H(n,`aria-label`,e),H(n,`hidden`,t)},[()=>Wt(`top`),()=>!$(`top`)]),C(e,n)},ie=n(()=>Ut(`top`));t(z,t=>{e(ie)&&t(re)}),s(a),V(t=>{H(a,`data-state`,t),H(a,`data-presentation`,q.config.panels.top.presentation),u=S(a,``,u,{"--smrt-admin-shell-edge-columns":e(It)})},[()=>Rt(`top`)]),C(r,a)};t(on,t=>{e(kt)&&t(sn)});var cn=F(on,2);W(cn,()=>`leftSidebar`);var ln=F(cn,2),un=r=>{var i=kr(),a=N(i);D(a,()=>`left`);var l=F(a,2),u=N(l);ne(u,()=>`leftSidebar`);var d=F(u,2),p=e=>{var t=wr(),n=N(t),r=N(n);te(r),s(n);var i=F(n,2),a=N(i),o=L(a);s(i),s(t),V((e,t)=>{H(i,`aria-label`,e),H(i,`title`,t),H(o,`d`,ye.close)},[()=>K(Z[`ui.admin_shell.close_menu`]),()=>K(Z[`ui.admin_shell.close_menu`])]),E(`click`,i,()=>q.collapsePanel(`left`)),C(e,t)},m=t=>{{let r=n(()=>!$(`left`));te(t,()=>e(r))}};t(d,t=>{e(Y)?t(p):!e(kt)&&(c.homeHref||c.logoSrc||c.brand)&&t(m,1)});var g=F(d,2),_=r=>{var i=Er(),a=N(i);R(a,()=>`leftSidebar.header`);var l=F(a,2),u=N(l),d=e=>{var t=T(),n=B(t);o(n,()=>c.tenantPanel),C(e,t)},f=e=>{var t=T(),n=B(t);o(n,()=>c.tenantRail),C(e,t)};t(u,e=>{c.tenantPanel?e(d):c.tenantRail&&e(f,1)}),s(l);var p=F(l,2),m=e=>{h(e)},g=n(()=>nt(`left`)&&!e(Y)&&(c.tenantUtilities||Xt(`left`)));t(p,t=>{e(g)&&t(m)});var _=F(p,2),v=e=>{var t=Tr(),n=N(t);o(n,()=>c.tenantFooter),s(t),C(e,t)};t(_,t=>{c.tenantFooter&&!e(xt)&&t(v)});var y=F(_,2);R(y,()=>`leftSidebar.footer`),s(i),V(e=>H(i,`hidden`,e),[()=>!nt(`left`)]),C(r,i)},v=n(()=>nt(`left`)||c.tenantPanel&&zt(`left`));t(g,t=>{e(v)&&t(_)});var y=F(g,2),b=r=>{var i=Or(),a=N(i),l=N(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.tenantRail),C(e,t)};t(l,e=>{c.tenantRail&&e(u)}),s(a);var d=F(a,2),f=e=>{h(e)},p=n(()=>!e(Y)&&(c.tenantUtilities||Xt(`left`)));t(d,t=>{e(p)&&t(f)});var m=F(d,2),g=e=>{var t=Dr(),n=N(t);o(n,()=>c.tenantRailFooter),s(t),C(e,t)};t(m,e=>{c.tenantRailFooter&&e(g)}),s(i),C(r,i)},x=n(()=>!nt(`left`)&&(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(y,t=>{e(x)&&t(b)});var S=F(y,2),w=e=>{f(e,()=>`left`)},k=n(()=>Xt(`left`)&&!e(Y)&&!nt(`left`)&&!(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(S,t=>{e(k)&&t(w)}),s(l),s(i),M(i,e=>Ae.left=e,()=>Ae?.left),I(i,(e,t)=>G?.(e,t),()=>({direction:`left`,onDismiss:()=>q.collapsePanel(`left`),enabled:e(Y)&&e(Ne)&&$(`left`)})),V((t,n,r,a)=>{H(i,`data-state`,t),H(i,`data-closing`,e(Qe)===`left`?``:void 0),H(i,`data-presentation`,n),H(i,`aria-label`,r),H(i,`tabindex`,e(Ye)===`left`?-1:void 0),i.inert=a},[()=>e(Qe)===`left`?`expanded`:Rt(`left`),()=>q.presentationFor(`left`),()=>Wt(`left`),()=>e(Y)&&!$(`left`)||e(Ye)===`right`||e(Qe)===`left`]),O(`animationend`,i,e=>ct(e,`left`)),C(r,i)},dn=n(()=>q.isEdgeShown(`left`));t(ln,t=>{e(dn)&&t(un)});var fn=F(ln,2),pn=N(fn);o(pn,()=>c.children),s(fn),M(fn,e=>U(we,e),()=>e(we));var mn=F(fn,2),gn=n=>{var r=Mr(),i=N(r),a=t=>{var n=T(),r=B(n);o(r,()=>c.phoneTopBar,()=>({hidden:e(De)})),C(t,n)},l=n=>{var r=jr(),i=N(r),a=e=>{g(e)};t(i,t=>{e(Fe)&&t(a)});var o=F(i,2),c=e=>{var t=Ar(),n=N(t);w(n),s(t),C(e,t)};t(o,t=>{e(Pe)&&t(c)}),s(r),C(n,r)};t(i,t=>{c.phoneTopBar?t(a):e(Mt)&&t(l,1)}),s(r),C(n,r)};t(mn,t=>{e(Nt)&&t(gn)});var _n=F(mn,2),vn=e=>{var t=Nr();V(e=>H(t,`aria-label`,e),[()=>K(Z[$(`left`)&&q.isEdgeShown(`left`)?`ui.admin_shell.close_menu`:`ui.admin_shell.close_tools`])]),E(`click`,t,lt),C(e,t)};t(_n,t=>{e(Y)&&e(X)&&e(Re)&&t(vn)});var yn=F(_n,2),xn=t=>{let r=n(()=>e(Ye)??e(Qe));var i=Pr();V(t=>{H(i,`aria-label`,t),H(i,`data-closing`,e(Ye)?void 0:``)},[()=>K(Z[e(r)===`left`?`ui.admin_shell.close_sidebar`:`ui.admin_shell.close_tools`])]),E(`click`,i,()=>{e(Ye)&&q.collapsePanel(e(r))}),C(t,i)};t(yn,t=>{(e(Ye)||e(Qe))&&t(xn)});var Sn=F(yn,2);W(Sn,()=>`rightSidebar`);var wn=F(Sn,2),Tn=r=>{let a=n(()=>e(Y)?q.phonePresentation(`right`):void 0);var u=Hr(),d=N(u);D(d,()=>`right`);var m=F(d,2),h=e=>{var t=Fr();I(t,(e,t)=>G?.(e,t),()=>({direction:`down`,onDismiss:()=>q.collapsePanel(`right`),enabled:$(`right`)})),C(e,t)};t(m,t=>{e(a)===`sheet`&&t(h)});var g=F(m,2),_=N(g);ne(_,()=>`rightSidebar`);var y=F(_,2),b=e=>{var t=Ir(),n=N(t),r=L(n);s(t),V((e,n)=>{H(t,`aria-label`,e),H(t,`title`,n),H(r,`d`,ye.close)},[()=>K(Z[`ui.admin_shell.close_tools`]),()=>K(Z[`ui.admin_shell.close_tools`])]),E(`click`,t,()=>q.collapsePanel(`right`)),C(e,t)};t(y,t=>{e(a)===`drawer`&&t(b)});var x=F(y,2),S=e=>{},w=e=>{var t=T(),n=B(t);o(n,()=>c.focusRail),C(e,t)},k=n=>{var r=Br();p(r,21,()=>q.focusTools,e=>e.id,(n,r)=>{var a=zr();let o;var c=N(a),u=t=>{var n=T(),i=B(n);v(i,()=>e(r).icon,(e,t)=>{t(e,{})}),C(t,n)},d=e=>{var t=Lr(),n=L(t);V(()=>H(n,`d`,ye[be])),C(e,t)};t(c,t=>{e(r).icon?t(u):t(d,-1)});var f=F(c,2),p=t=>{var n=Rr(),i=L(n,!0);V(()=>l(i,e(r).badge)),C(t,n)};t(f,t=>{e(r).badge!=null&&t(p)}),s(a),V((t,n)=>{o=i(a,1,`smrt-admin-shell__focus-tool svelte-1ifuk0b`,null,o,{active:t}),H(a,`aria-pressed`,n),H(a,`aria-label`,e(r).label),H(a,`title`,e(r).label)},[()=>q.activeFocusToolId===e(r).id&&$(`right`),()=>q.activeFocusToolId===e(r).id&&$(`right`)]),E(`click`,a,()=>q.toggleFocusTool(e(r).id)),C(n,a)}),s(r),V(e=>H(r,`aria-label`,e),[()=>K(Z[`ui.admin_shell.focus_tools`])]),C(n,r)},A=e=>{f(e,()=>`right`)},j=n(()=>Xt(`right`));t(x,t=>{q.config.panels.right.rail===!1?t(S):c.focusRail?t(w,1):q.focusTools.length>0?t(k,2):e(j)&&t(A,3)}),s(g);var P=F(g,2),te=t=>{var r=Vr(),i=N(r);R(i,()=>`rightSidebar.header`);var a=F(i,2);ae(a,()=>q.activeFocusToolId,t=>{{let r=n(xe);ee(t,()=>e(r))}});var o=F(a,2);R(o,()=>`rightSidebar.footer`),s(r),V(e=>H(r,`hidden`,e),[()=>!nt(`right`)]),C(t,r)},z=n(()=>Ut(`right`));t(P,t=>{e(z)&&t(te)}),s(u),M(u,e=>Ae.right=e,()=>Ae?.right),I(u,(e,t)=>G?.(e,t),()=>({direction:`right`,onDismiss:()=>q.collapsePanel(`right`),enabled:e(a)===`drawer`&&e(Ne)&&$(`right`)})),V((t,n,r,i)=>{H(u,`data-state`,t),H(u,`data-closing`,e(Qe)===`right`?``:void 0),H(u,`data-presentation`,n),H(u,`data-phone`,e(a)),H(u,`aria-label`,r),H(u,`tabindex`,e(Ye)===`right`?-1:void 0),u.inert=i},[()=>e(Qe)===`right`?`expanded`:Rt(`right`),()=>q.presentationFor(`right`),()=>Wt(`right`),()=>e(Y)&&!$(`right`)||e(Ye)===`left`||e(Qe)===`right`]),O(`animationend`,u,e=>ct(e,`right`)),C(r,u)};t(wn,t=>{e(jt)&&t(Tn)});var En=F(wn,2),On=r=>{var i=Ur(),a=N(i),o=t=>{let r=n(()=>e(Bt)[0].icon);var i=T(),a=B(i);v(a,()=>e(r),(e,t)=>{t(e,{})}),C(t,i)};t(a,t=>{e(Bt)[0].icon&&t(o)});var c=F(a,2),u=L(c,!0);s(i),V((e,t)=>{H(i,`aria-label`,e),l(u,t)},[()=>K(Z[`ui.admin_shell.open_panel`],{label:e(Bt).map(e=>e.label).join(`, `)}),()=>e(Bt).map(e=>e.label).join(`, `)]),E(`click`,i,Ht),C(r,i)};t(En,t=>{e(Bt)&&t(On)});var kn=F(En,2);W(kn,()=>`footer`);var An=F(kn,2),jn=r=>{var i=qr();let a;var u=N(i),d=e=>{var t=Wr(),n=N(t);o(n,()=>c.bottomLeftCorner),s(t),C(e,t)};t(u,e=>{c.bottomLeftCorner&&e(d)});var p=F(u,2);S(p,``,{},{"--smrt-admin-shell-band-column":2});var m=N(p);R(m,()=>`footer.start`);var h=F(m,2);R(h,()=>`footer.center`);var g=F(h,2),_=e=>{var t=T(),n=B(t);o(n,()=>c.systemBar),C(e,t)};t(g,e=>{c.systemBar&&e(_)});var v=F(g,2);R(v,()=>`footer.end`);var y=F(v,2);ne(y,()=>`footer`);var b=F(y,2),x=e=>{f(e,()=>`bottom`)},w=n(()=>Xt(`bottom`)&&(c.systemPanel||!c.systemBar));t(b,t=>{e(w)&&t(x)}),s(p);var E=F(p,2),D=e=>{var t=Gr(),n=N(t);o(n,()=>c.bottomRightCorner),s(t),C(e,t)};t(E,e=>{c.bottomRightCorner&&e(D)});var O=F(E,2),k=e=>{var n=Kr(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.systemPanel),C(e,t)},a=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_system_panel`])]),C(e,t)};t(r,e=>{c.systemPanel?e(i):e(a,-1)}),s(n),V((e,t)=>{H(n,`aria-label`,e),H(n,`hidden`,t)},[()=>Wt(`bottom`),()=>!$(`bottom`)]),C(e,n)},A=n(()=>Ut(`bottom`));t(O,t=>{e(A)&&t(k)}),s(i),V(t=>{H(i,`data-state`,t),H(i,`data-presentation`,q.config.panels.bottom.presentation),a=S(i,``,a,{"--smrt-admin-shell-edge-columns":e(Lt)})},[()=>Rt(`bottom`)]),C(r,i)};t(An,t=>{e(At)&&t(jn)});var Nn=F(An,2),Pn=t=>{var n=Jr(),r=N(n);o(r,()=>c.overlays,()=>({viewport:e(J),bottomBar:e(Le)})),s(n),C(t,n)};t(Nn,e=>{c.overlays&&e(Pn)});var Fn=F(Nn,2),Ln=e=>{var t=Yr(),n=N(t);o(n,()=>c.phoneBottomBar??m),s(t),C(e,t)};t(Fn,t=>{e(Le)===`nav`&&t(Ln)});var Rn=F(Fn,2),zn=r=>{var i=Qr(),a=N(i),u=N(a),f=e=>{var t=T(),n=B(t);o(n,()=>c.shortcutsOverlay),C(e,t)},m=t=>{var r=Zr(),i=B(r),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>K(Z[`ui.admin_shell.close_shortcuts`]));me(c,{variant:`ghost`,size:`sm`,get"aria-label"(){return e(t)},onclick:()=>U(_e,!1),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.close`])]),C(e,n)},$$slots:{default:!0}})}s(i);var u=F(i,2),f=N(u);p(f,17,()=>Se,b,(t,n)=>{var r=Xr(),i=N(r),a=L(i,!0),o=F(i,2),c=L(o,!0);s(r),V((e,t)=>{l(a,e),l(c,t)},[()=>Wt(e(n)),()=>Jt(e(n))]),C(t,r)});var m=F(f,2),h=N(m),g=L(h,!0);y(2),s(m),s(u),V((e,t)=>{l(o,e),l(g,t)},[()=>K(Z[`ui.admin_shell.shell_shortcuts`]),()=>K(Z[`ui.admin_shell.shortcuts`])]),C(t,r)};t(u,e=>{c.shortcutsOverlay?e(f):e(m,-1)}),s(a),s(i),I(i,e=>en?.(e)),V(e=>H(i,`aria-label`,e),[()=>K(Z[`ui.admin_shell.shell_shortcuts`])]),C(r,i)};t(Rn,t=>{e(_e)&&t(zn)}),s(tn),M(tn,e=>pe(e),()=>pe()),V((t,n,r,i)=>{H(tn,`data-top-state`,t),H(tn,`data-left-state`,n),H(tn,`data-right-state`,r),H(tn,`data-bottom-state`,i),H(tn,`data-viewport`,e(J)),H(tn,`data-bottom-bar`,e(Le)),H(tn,`data-phone-top`,e(Nt)?``:void 0),H(tn,`data-chrome-hidden`,e(De)?``:void 0),H(tn,`data-resizing`,e(Oe)??void 0),H(tn,`data-motion`,e(ke)?``:void 0),S(tn,`${e(Pt)}; ${e(He)}; ${e(Ve)}`),fn.inert=e(Ye)!==null},[()=>Rt(`top`),()=>Rt(`left`),()=>Rt(`right`),()=>Rt(`bottom`)]),C(a,tn),r()}D([`click`,`pointerdown`,`keydown`,`dblclick`]);function ti(){let e=Pe();return{get user(){return e.state.session.user},get isAuthenticated(){return e.state.session.isAuthenticated},get permissions(){return e.state.session.permissions},hasPermission:t=>e.hasPermission(t),hasAllPermissions:t=>e.hasAllPermissions(t),hasAnyPermission:t=>e.hasAnyPermission(t)}}var ni=c(`<span class="smrt-hotkey-input__conflict svelte-98l5qo"> </span>`),ri=c(`<div class="smrt-hotkey-input svelte-98l5qo" data-smrt-component="HotkeyInput"><!> <!></div>`);function ii(i,a){_(a,!0);let o=k(a,`value`,3,null),c=k(a,`disabled`,3,!1),u=k(a,`conflictsWith`,3,null),{t:f}=de();function p(e){c()||e.key!==`Tab`&&(e.preventDefault(),e.key===`Backspace`||e.key===`Delete`?a.oncapture?.(null):e.code&&a.oncapture?.({code:e.code,altKey:e.altKey||void 0,ctrlKey:e.ctrlKey||void 0,metaKey:e.metaKey||void 0,shiftKey:e.shiftKey||void 0}))}var m=ri(),h=N(m);{let t=n(()=>f(Z[`ui.hotkey_input.capture_title`]));me(h,{variant:`secondary`,size:`sm`,get disabled(){return c()},onkeydown:p,get title(){return e(t)},children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>Mn(o())]),C(e,n)},$$slots:{default:!0}})}var g=F(h,2),v=e=>{var t=ni(),n=L(t);V(e=>l(n,`${e??``} ${u()??``}`),[()=>f(Z[`ui.hotkey_input.conflicts_with`])]),C(e,t)};t(g,e=>{u()&&e(v)}),s(m),C(i,m),r()}var ai={"header.start":Z[`ui.shell_slot.header_start`],"header.center":Z[`ui.shell_slot.header_center`],"header.end":Z[`ui.shell_slot.header_end`],"footer.start":Z[`ui.shell_slot.footer_start`],"footer.center":Z[`ui.shell_slot.footer_center`],"footer.end":Z[`ui.shell_slot.footer_end`],"leftSidebar.header":Z[`ui.shell_slot.left_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.left_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.right_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.right_sidebar_footer`]},oi={"header.start":Z[`ui.shell_slot.short_header_start`],"header.center":Z[`ui.shell_slot.short_header_center`],"header.end":Z[`ui.shell_slot.short_header_end`],"footer.start":Z[`ui.shell_slot.short_footer_start`],"footer.center":Z[`ui.shell_slot.short_footer_center`],"footer.end":Z[`ui.shell_slot.short_footer_end`],"leftSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`]},si={header:Z[`ui.shell_region.header`],leftSidebar:Z[`ui.shell_region.left_sidebar`],rightSidebar:Z[`ui.shell_region.right_sidebar`],footer:Z[`ui.shell_region.footer`]},ci=c(`<section data-smrt-part="appearance" aria-labelledby="smrt-shell-settings-appearance" class="svelte-qs6iav"><h3 id="smrt-shell-settings-appearance" class="svelte-qs6iav"> </h3> <div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div></section>`),li=c(`<dt> </dt> <dd class="svelte-qs6iav"> </dd>`,1),ui=c(`<dl class="svelte-qs6iav"><!> <dt> </dt> <dd class="svelte-qs6iav"> </dd></dl>`),di=c(`<p class="svelte-qs6iav"> </p>`),fi=c(`<p role="alert" data-smrt-part="error" class="svelte-qs6iav"> </p>`),pi=c(`<!> <!>`,1),mi=c(`<section data-smrt-part="account" aria-labelledby="smrt-shell-settings-account" class="svelte-qs6iav"><h3 id="smrt-shell-settings-account" class="svelte-qs6iav"> </h3> <!> <!></section>`),hi=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div>`),gi=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!></div>`),_i=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><div class="svelte-qs6iav"><strong> </strong> <span class="svelte-qs6iav"> </span></div> <div class="smrt-shell-settings-panel__actions svelte-qs6iav"><!> <!></div></div>`),vi=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><strong> </strong> <!></div>`),yi=c(`<section data-smrt-part="shortcuts" aria-labelledby="smrt-shell-settings-shortcuts" class="svelte-qs6iav"><header class="svelte-qs6iav"><h3 id="smrt-shell-settings-shortcuts" class="svelte-qs6iav"> </h3> <!></header> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section>`),bi=c(`<section class="smrt-shell-settings-panel svelte-qs6iav" data-smrt-component="ShellSettingsPanel"><!> <!> <section data-smrt-part="layout" aria-labelledby="smrt-shell-settings-layout" class="svelte-qs6iav"><h3 id="smrt-shell-settings-layout" class="svelte-qs6iav"> </h3> <p class="svelte-qs6iav"> </p> <!> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section> <!></section>`);function xi(i,a){_(a,!0);let o=k(a,`appearance`,3,!1),c=k(a,`account`,3,!1),{t:u}=de(),f=Ve(),m=Se(),h=c()?ti():null,g=[`top`,`left`,`bottom`,`right`],v=n(()=>{let e=h?.user?.name;return typeof e==`string`&&e?e:null}),b={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},x=e=>u(si[b[e]]),S=n(()=>m?m.panels.filter(e=>e.available&&(!e.visible||f.regionsRendered[e.edge])).map(e=>({edge:e.edge,visible:e.visible})):g.filter(e=>f.panels[e]!==`hidden`&&f.regionsRendered[e]).map(e=>({edge:e,visible:!0}))),w=n(()=>m?m.panels.filter(e=>e.available&&e.visible).length:e(S).length),E=n(()=>e(S).filter(e=>e.visible)),D=A(!1),O=A(!1);async function j(){if(!e(D)&&a.onSignOut){U(D,!0),U(O,!1);try{await a.onSignOut()}catch{U(O,!0)}finally{U(D,!1)}}}let M=n(()=>!!(a.signOutHref||a.onSignOut)),ee=n(()=>f.settings.hotkeysEnabled!==!1);function P(e){return Cn(e,f.config.panels[e],f.settings)}function I(e){let t=P(e);if(!t)return null;let n=g.find(n=>n!==e&&P(n)?.code===t.code&&P(n)?.altKey===t.altKey&&P(n)?.ctrlKey===t.ctrlKey&&P(n)?.metaKey===t.metaKey&&P(n)?.shiftKey===t.shiftKey);return n?f.config.panels[n].label:null}var te=bi(),R=N(te),z=t=>{var r=ci(),i=N(r),a=L(i,!0),o=F(i,2),c=N(o);{let t=n(()=>u(Z[`ui.shell_settings.theme`]));Y(c,{get label(){return e(t)}})}var d=F(c,2);{let t=n(()=>u(Z[`ui.shell_settings.color_scheme`]));Me(d,{get ariaLabel(){return e(t)}})}s(o),s(r),V(e=>l(a,e),[()=>u(Z[`ui.shell_settings.appearance`])]),C(t,r)};t(R,e=>{o()&&e(z)});var ne=F(R,2),re=n=>{var r=mi(),i=N(r),o=L(i,!0),c=F(i,2),f=n=>{var r=ui(),i=N(r),a=t=>{var n=li(),r=B(n),i=L(r,!0),a=F(r,2),o=L(a,!0);V(t=>{l(i,t),l(o,e(v))},[()=>u(Z[`ui.shell_settings.account_name`])]),C(t,n)};t(i,t=>{e(v)&&t(a)});var o=F(i,2),c=L(o,!0),d=F(o,2),f=L(d,!0);s(r),V(e=>{l(c,e),l(f,h.user.email)},[()=>u(Z[`ui.shell_settings.account_email`])]),C(n,r)},p=e=>{var t=di(),n=L(t,!0);V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.account_signed_out`])]),C(e,t)};t(c,e=>{h.user?e(f):e(p,-1)});var m=F(c,2),g=n=>{var r=T(),i=B(r),o=n=>{var r=pi(),i=B(r);me(i,{variant:`secondary`,size:`sm`,get loading(){return e(D)},onclick:j,children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}});var a=F(i,2),o=e=>{var t=fi(),n=L(t,!0);V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(a,t=>{e(O)&&t(o)}),C(n,r)},s=e=>{me(e,{variant:`secondary`,size:`sm`,get href(){return a.signOutHref},children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}})};t(i,e=>{a.onSignOut?e(o):e(s,-1)}),C(n,r)};t(m,t=>{e(M)&&t(g)}),s(r),V(e=>l(o,e),[()=>u(Z[`ui.shell_settings.account`])]),C(n,r)};t(ne,e=>{h&&e(re)});var ie=F(ne,2),ae=N(ie),W=L(ae,!0),oe=F(ae,2),G=L(oe,!0),se=F(oe,2),ce=t=>{var r=hi(),i=N(r);{let t=n(()=>m.editing?`primary`:`secondary`);me(i,{get variant(){return e(t)},size:`sm`,get"aria-pressed"(){return m.editing},onclick:()=>m.setEditing(!m.editing),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>m.editing?u(Z[`ui.shell_settings.edit_layout_on`]):u(Z[`ui.shell_settings.edit_layout_off`])]),C(e,n)},$$slots:{default:!0}})}var a=F(i,2);{let t=n(()=>!m.customized);me(a,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)},le=t=>{var r=gi(),i=N(r);{let t=n(()=>!m.customized);me(i,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)};t(se,e=>{m?.editable?e(ce):m&&e(le,1)});var ue=F(se,2);p(ue,21,()=>e(S),e=>e.edge,(r,i)=>{let a=n(()=>x(e(i).edge));var o=_i(),c=N(o),p=N(c),h=L(p,!0),g=F(p,2),_=L(g,!0);s(c);var v=F(c,2),b=N(v),S=t=>{{let r=n(()=>e(i).visible&&e(w)<=1),o=n(()=>e(i).visible?u(Z[`ui.shell_settings.hide_region`],{region:e(a)}):u(Z[`ui.shell_settings.show_region`],{region:e(a)}));me(t,{variant:`ghost`,size:`sm`,get disabled(){return e(r)},get"aria-label"(){return e(o)},onclick:()=>m.setPanel(e(i).edge,{visible:!e(i).visible}),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(i).visible?u(Z[`ui.shell_settings.hide`]):u(Z[`ui.shell_settings.show`])]),C(t,r)},$$slots:{default:!0}})}};t(b,e=>{m&&e(S)});var T=F(b,2),E=t=>{me(t,{variant:`ghost`,size:`sm`,onclick:()=>f.setPanel(e(i).edge,f.panels[e(i).edge]===`expanded`?`collapsed`:`expanded`),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>f.panels[e(i).edge]===`expanded`?u(Z[`ui.shell_settings_panel.collapse`]):u(Z[`ui.shell_settings_panel.expand`])]),C(t,r)},$$slots:{default:!0}})},D=n(()=>e(i).visible&&!f.isInline(e(i).edge));t(T,t=>{e(D)&&t(E)}),s(v),s(o),V(t=>{H(o,`data-edge`,e(i).edge),l(h,e(a)),l(_,t)},[()=>e(i).visible?u(Z[`ui.shell_settings.region_shown`]):u(Z[`ui.shell_settings.region_hidden`])]),C(r,o)}),s(ue),s(ie);var fe=F(ie,2),pe=t=>{var r=yi(),i=N(r),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>e(ee)?`secondary`:`primary`);me(c,{get variant(){return e(t)},size:`sm`,onclick:()=>f.setHotkeysEnabled(!e(ee)),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(ee)?u(Z[`ui.shell_settings_panel.disable_hotkeys`]):u(Z[`ui.shell_settings_panel.enable_hotkeys`])]),C(t,r)},$$slots:{default:!0}})}s(i);var m=F(i,2);p(m,21,()=>e(E),e=>e.edge,(t,r)=>{var i=vi(),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>P(e(r).edge)),i=n(()=>!e(ee)),a=n(()=>I(e(r).edge));ii(c,{get value(){return e(t)},get disabled(){return e(i)},get conflictsWith(){return e(a)},oncapture:t=>f.setHotkey(e(r).edge,t?.code??null)})}s(i),V(t=>{H(i,`data-edge`,e(r).edge),l(o,t)},[()=>x(e(r).edge)]),C(t,i)}),s(m),s(r),V(e=>l(o,e),[()=>u(Z[`ui.shell_settings.shortcuts`])]),C(t,r)};t(fe,e=>{f.hotkeysAvailable&&e(pe)}),s(te),V((e,t,n)=>{H(te,`aria-label`,e),l(W,t),l(G,n)},[()=>u(Z[`ui.shell_settings_panel.shell_settings`]),()=>u(Z[`ui.shell_settings.layout`]),()=>u(Z[`ui.shell_settings_panel.description`])]),C(i,te),r()}var Si=c(`<p class="svelte-upgvjj"> </p>`),Ci=c(`<span class="smrt-app-scope-panel__environment svelte-upgvjj"> </span>`),wi=c(`<div class="smrt-app-scope-panel__section svelte-upgvjj"><!></div>`),Ti=c(`<section class="smrt-app-scope-panel svelte-upgvjj" data-smrt-component="AppScopePanel"><header class="svelte-upgvjj"><div class="svelte-upgvjj"><h2 class="svelte-upgvjj"> </h2> <!></div> <!></header> <!> <!> <!> <!></section>`);function Ei(e,n){_(n,!0);let i=k(n,`tenantName`,3,``),a=k(n,`environment`,3,``),c=k(n,`showSettings`,3,!0),{t:u}=de();var d=Ti(),f=N(d),p=N(f),m=N(p),h=L(m,!0),g=F(m,2),v=e=>{var t=Si(),n=L(t,!0);V(()=>l(n,i())),C(e,t)};t(g,e=>{i()&&e(v)}),s(p);var y=F(p,2),b=e=>{fe(e,{variant:`info`,size:`sm`,children:(e,t)=>{var n=Ci(),r=L(n,!0);V(()=>l(r,a())),C(e,n)},$$slots:{default:!0}})};t(y,e=>{a()&&e(b)}),s(f);var x=F(f,2),S=e=>{var t=wi(),r=N(t);o(r,()=>n.switcher),s(t),C(e,t)};t(x,e=>{n.switcher&&e(S)});var w=F(x,2),T=e=>{var t=wi(),r=N(t);o(r,()=>n.search),s(t),C(e,t)};t(w,e=>{n.search&&e(T)});var E=F(w,2),D=e=>{var t=wi(),r=N(t);o(r,()=>n.docs),s(t),C(e,t)};t(E,e=>{n.docs&&e(D)});var O=F(E,2),A=e=>{xi(e,{})};t(O,e=>{c()&&e(A)}),s(d),V(e=>{H(d,`aria-label`,e),l(h,n.appName)},[()=>u(Z[`ui.app_scope_panel.app_scope`])]),C(e,d),r()}function Di(){let e=Ve();return{get active(){return e.openFocusToolId},get tools(){return e.focusTools.map(e=>e.id)},get available(){return e.dockAvailable},has:t=>e.focusTools.some(e=>e.id===t),isOpen:t=>e.openFocusToolId===t,open:(t,n)=>e.openDockTool(t,n),close:()=>e.closeFocusTool(),toggle:(t,n)=>e.toggleDockTool(t,n)}}var Oi={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},ki=class{options;#e=A(!1);get editingState(){return e(this.#e)}set editingState(e){U(this.#e,e,!0)}constructor(e){this.options=e}get editable(){return this.options.editable?.()??!1}get editing(){return this.editable&&this.editingState}setEditing(e){return e&&!this.editable||this.editingState===e?!1:(this.editingState=e,!0)}get layout(){return It(this.options.layout()??{version:1})}get sections(){return zt(this.options.nav(),this.options.groups(),this.layout)}get applied(){let{nav:e,groups:t}=Vt(this.options.nav(),this.options.groups(),this.options.panels(),this.layout);return{nav:e,groups:t}}get panels(){let e=gn(this.options.panels()).panels,t=this.layout;return dn.map(n=>{let r=e[n],i=t.panels?.[n];return{edge:n,label:r.label,available:r.initial!==`hidden`,visible:r.initial!==`hidden`&&i?.visible!==!1,initial:i?.initial??(r.initial===`expanded`?`expanded`:`collapsed`)}})}get placementItems(){let e=this.options.items?.()??[],t=cn(e,this.layout),n=new Map;for(let[e,r]of Object.entries(t))for(let t of r)n.set(t,e);let r=new Set,i=[];for(let t of e){if(r.has(t.id))continue;r.add(t.id);let e=n.get(t.id)??t.slot;i.push({id:t.id,label:t.label,defaultSlot:t.slot,slot:e,moved:e!==t.slot})}return i}get placements(){let e=new Map(this.placementItems.map(e=>[e.id,e])),t=cn(this.options.items?.()??[],this.layout);return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,n.flatMap(t=>e.get(t)??[])]))}isRegionVisible(e){let t=Oi[e];return this.panels.find(e=>e.edge===t)?.visible??!1}get customized(){return!Ot(this.layout)}isHidden(e){return this.layout.hidden?.includes(e)??!1}apply(e){let t=this.layout;return JSON.stringify(e)!==JSON.stringify(t)&&(this.options.commit(e),!0)}moveSection(e,t){return this.apply(Gt(this.options.nav(),this.options.groups(),this.layout,e,t))}moveItem(e,t,n){return this.apply(Kt(this.options.nav(),this.options.groups(),this.layout,e,t,n))}hide(e){return this.apply(qt(this.options.nav(),this.options.groups(),this.layout,e))}show(e){return this.apply(Jt(this.layout,e))}setPanel(e,t){return this.panels.find(t=>t.edge===e)?.available?this.apply(Xt(this.layout,e,t,this.options.panels())):!1}renameSection(e,t){return this.apply($t(this.options.nav(),this.options.groups(),this.layout,e,t))}renameItem(e,t){return this.apply(en(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionIcon(e,t){return this.apply(nn(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionTitleVisible(e,t){return this.apply(tn(this.options.nav(),this.options.groups(),this.layout,e,t))}createSection(e){let t=this.layout.customSections?.length??0,n=an(this.options.nav(),this.options.groups(),this.layout,e);if(!this.apply(n))return null;let r=n.customSections??[];return r.length>t?r[r.length-1]?.id??null:null}deleteSection(e){return this.apply(on(this.layout,e))}placeItem(e,t){if(!Ct(t))return!1;let n=this.placementItems.find(t=>t.id===e);return!n||n.slot===t?!1:this.apply(ln(this.layout,e,t,n.defaultSlot))}resetItem(e){return this.apply(un(this.layout,e))}reset(){return this.apply({version:1})}},Ai=c(`<span class="smrt-phone-bottom-bar__badge svelte-zvfnw6"> </span>`),ji=c(`<span class="smrt-phone-bottom-bar__dot svelte-zvfnw6"></span>`),Mi=c(`<span class="smrt-phone-bottom-bar__icon svelte-zvfnw6" aria-hidden="true"><!> <!></span> <span class="smrt-phone-bottom-bar__label svelte-zvfnw6" aria-hidden="true"> </span>`,1),Ni=c(`<a><!></a>`),Pi=c(`<button type="button"><!></button>`),Fi=c(`<nav class="smrt-phone-bottom-bar svelte-zvfnw6" data-testid="phone-bottom-bar" data-smrt-component="PhoneBottomBar"></nav>`);function Ii(a,o){_(o,!0);let c=(r,i=m)=>{var a=Mi(),c=B(a),u=N(c),d=e=>{var t=T(),n=B(t);v(n,()=>i().icon,(e,t)=>{t(e,{size:22})}),C(e,t)},f=t=>{{let r=n(()=>i().iconName??`placeholder`);Ee(t,{get name(){return e(r)},size:22,get iconComponent(){return o.iconComponent}})}};t(u,e=>{i().icon?e(d):e(f,-1)});var p=F(u,2),h=e=>{var t=Ai(),n=L(t,!0);V(()=>l(n,i().badge>9?`9+`:i().badge)),C(e,t)},g=e=>{var t=ji();C(e,t)};t(p,e=>{i().badge?e(h):i().dot&&e(g,1)}),s(c);var _=F(c,2),y=L(_,!0);V(()=>l(y,i().label)),C(r,a)},{t:u}=de();function d(e){let t=[e.label];return e.badge&&t.push(u(Z[`ui.phone_bottom_bar.unread`],{count:String(e.badge)})),e.dot&&t.push(e.dotLabel??u(Z[`ui.phone_bottom_bar.new`])),t.join(`, `)}var f=Fi();p(f,21,()=>o.items,e=>e.id,(n,r)=>{var a=T(),o=B(a),l=t=>{var n=Ni();let a;var o=N(n);c(o,()=>e(r)),s(n),V(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),H(n,`href`,e(r).href),H(n,`aria-label`,t),H(n,`aria-current`,e(r).active?`page`:void 0),H(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)},u=t=>{var n=Pi();let a;var o=N(n);c(o,()=>e(r)),s(n),V(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),H(n,`aria-label`,t),H(n,`aria-expanded`,e(r).expanded),H(n,`aria-controls`,e(r).controls),H(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)};t(o,t=>{e(r).href?t(l):t(u,-1)}),C(n,a)}),s(f),V(e=>H(f,`aria-label`,e),[()=>o.label??u(Z[`ui.phone_bottom_bar.label`])]),C(a,f),r()}D([`click`]);var Li=se({"ui.sortable.label":`Sortable list`,"ui.sortable.move":`Move {item}`,"ui.sortable.group":`{label}, {count} items`,"ui.sortable.empty":`No items in {container}.`,"ui.sortable.pickup":`Picked up {item}. Available destinations: {destinations}. Use the up and down arrow keys to choose a position, then Space or Enter to drop. Escape cancels.`,"ui.sortable.position":`{item}, position {position} of {count} in {container}.`,"ui.sortable.drop":`Moved {item} to {container}, position {position} of {count}.`,"ui.sortable.failed":`Could not move {item}. The list was restored.`,"ui.sortable.cancel":`Cancelled moving {item}.`,"ui.sortable.unavailable":`{container} is unavailable.`});function Ri(e,t){switch(t.type){case`pickup`:return e(Li[`ui.sortable.pickup`],{item:t.item,destinations:t.destinations.join(`, `)});case`position`:return e(Li[`ui.sortable.position`],{item:t.item,container:t.container,position:t.position,count:t.count});case`drop`:return e(Li[`ui.sortable.drop`],{item:t.item,container:t.container,position:t.position,count:t.count});case`unavailable`:return e(Li[`ui.sortable.unavailable`],{container:t.container});case`failed`:return e(Li[`ui.sortable.failed`],{item:t.item});case`cancel`:return e(Li[`ui.sortable.cancel`],{item:t.item})}}var zi=c(`<div class="smrt-sortable__marker smrt-sortable__marker--before svelte-1tr29x6" aria-hidden="true"></div>`),Bi=c(`<div role="listitem"><!> <button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="item"><span aria-hidden="true">⠿</span></button> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></div>`),Vi=c(`<div role="listitem" class="smrt-sortable__empty svelte-1tr29x6"> </div>`),Hi=c(`<div class="smrt-sortable__marker svelte-1tr29x6" aria-hidden="true"></div>`),Ui=c(`<div class="smrt-sortable__items svelte-1tr29x6" role="list"><!> <!></div>`),Wi=c(`<button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="container"><span aria-hidden="true">⠿</span></button>`),Gi=c(`<strong> </strong>`),Ki=c(`<section><header class="smrt-sortable__header svelte-1tr29x6"><!> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></header> <!></section>`),qi=c(`<!> <div role="listitem" class="smrt-sortable__container-slot"><!></div>`,1),Ji=c(`<div class="smrt-sortable__containers svelte-1tr29x6" role="list"><!> <!></div>`),Yi=c(`<div class="smrt-sortable svelte-1tr29x6" role="group" data-smrt-component="Sortable"><!> <!> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div></div>`);function Xi(a,c){let u=ne();_(c,!0);let d=(r,a=m)=>{let u=n(()=>e(ee).get(a().id)??[]),d=n(()=>R.drag?.itemId),f=n(()=>e(u).length);var g=Ui(),_=N(g);p(_,27,()=>e(u),e=>e.id,(r,l,f)=>{var p=Bi();let m;var g=N(p),_=e=>{var t=zi();C(e,t)},v=n(()=>re(a().id,ie(e(u),e(f)))&&e(l).id!==e(d));t(g,t=>{e(v)&&t(_)});var x=F(g,2),S=F(x,2),w=N(S);o(w,()=>c.item,()=>({item:e(l),container:a(),index:e(f),isDragging:e(d)===e(l).id})),s(S),s(p),V(t=>{m=i(p,1,`smrt-sortable__item svelte-1tr29x6`,null,m,{"smrt-sortable__item--dragging":e(d)===e(l).id}),H(p,`data-smrt-sortable-item-id`,e(l).id),H(x,`draggable`,R.nativeDraggable),H(x,`aria-label`,t),H(x,`aria-pressed`,e(d)===e(l).id),H(x,`aria-describedby`,e(d)===e(l).id?b:void 0)},[()=>y(Li[`ui.sortable.move`],{item:e(l).label})]),O(`dragover`,p,e=>e.preventDefault()),O(`drop`,p,t=>{R.drag&&(t.stopPropagation(),R.dropOnItem(t,a().id,e(f)))}),E(`click`,x,()=>R.consumeClick(e(l).id)),E(`keydown`,x,t=>R.keydown(t,e(l).id)),O(`blur`,x,t=>R.blur(t,e(l).id)),E(`pointerdown`,x,t=>R.pointerDown(t,e(l).id)),E(`pointermove`,x,e=>R.pointerMove(e)),E(`pointerup`,x,e=>R.pointerUp(e)),O(`pointercancel`,x,e=>R.pointerCancel(e)),O(`dragstart`,x,t=>R.dragStart(t,e(l).id)),O(`dragend`,x,()=>R.dragEnd()),h(p,()=>_e,null),C(r,p)},e=>{var t=Vi(),n=L(t,!0);V(e=>l(n,e),[()=>y(Li[`ui.sortable.empty`],{container:a().label})]),C(e,t)});var v=F(_,2),x=e=>{var t=Hi();C(e,t)},S=n(()=>re(a().id,e(u).filter(t=>t.id!==e(d)).length));t(v,t=>{e(S)&&t(x)}),s(g),V(e=>H(g,`aria-label`,e),[()=>y(Li[`ui.sortable.group`],{label:a().label,count:e(f)})]),C(r,g)},f=(r,a=m,u=m)=>{let f=n(()=>(e(ee).get(a().id)??[]).length),p=n(()=>z.drag?.itemId===a().id);var h=Ki();let g;var _=N(h),v=N(_),b=t=>{var n=Wi();V(t=>{H(n,`draggable`,z.nativeDraggable),H(n,`aria-label`,t),H(n,`aria-pressed`,e(p)),H(n,`aria-describedby`,e(p)?x:void 0)},[()=>y(Li[`ui.sortable.move`],{item:a().label})]),E(`click`,n,()=>z.consumeClick(a().id)),E(`keydown`,n,e=>z.keydown(e,a().id)),O(`blur`,n,e=>z.blur(e,a().id)),E(`pointerdown`,n,e=>z.pointerDown(e,a().id)),E(`pointermove`,n,e=>z.pointerMove(e)),E(`pointerup`,n,e=>z.pointerUp(e)),O(`pointercancel`,n,e=>z.pointerCancel(e)),O(`dragstart`,n,e=>z.dragStart(e,a().id)),O(`dragend`,n,()=>z.dragEnd()),C(t,n)};t(v,e=>{u()&&e(b)});var w=F(v,2),D=N(w),k=t=>{var n=T(),r=B(n);o(r,()=>c.containerHeader,()=>({container:a(),count:e(f),isDragging:e(p)})),C(t,n)},j=e=>{var t=Gi(),n=L(t,!0);V(()=>l(n,a().label)),C(e,t)};t(D,e=>{c.containerHeader?e(k):e(j,-1)}),s(w),s(_);var M=F(_,2);d(M,a),s(h),V(()=>{g=i(h,1,`smrt-sortable__container svelte-1tr29x6`,null,g,{"smrt-sortable__container--disabled":a().disabled,"smrt-sortable__container--dragging":e(p)}),H(h,`data-smrt-sortable-container-id`,a().id),H(h,`data-smrt-sortable-container-item`,u()?a().id:void 0),H(h,`aria-label`,a().label)}),O(`dragover`,h,e=>e.preventDefault()),O(`drop`,h,t=>{R.drag?R.dropOnContainer(t,a().id):u()&&z.dropOnItem(t,S,e(A).findIndex(e=>e.id===a().id))}),C(r,h)},g=k(c,`reorderContainers`,3,!1),v=k(c,`allowSameContainerReorder`,3,!0),{t:y}=de(),b=`${u}-item-live`,x=`${u}-container-live`,S=`__smrt-sortable-containers__`,w,D=n(()=>g()?c.containers.filter(e=>e.fixed):[]),A=n(()=>g()?c.containers.filter(e=>!e.fixed):c.containers),j=n(()=>[...e(D),...e(A)]),ee=n(()=>{let e=new Map;for(let t of c.containers)e.set(t.id,[]);for(let t of c.items)e.get(t.containerId)?.push(t);return e}),P=n(()=>new Map(c.items.map(e=>[e.id,e]))),I=n(()=>new Map(c.containers.map(e=>[e.id,e])));function te(e){return Ri(y,e)}let R=K({root:()=>w,selectors:{container:`[data-smrt-sortable-container-id]`,containerKey:`smrtSortableContainerId`,item:`[data-smrt-sortable-item-id]`,itemKey:`smrtSortableItemId`},containers:()=>e(j),itemIds:t=>(e(ee).get(t)??[]).map(e=>e.id),itemLabel:t=>e(P).get(t)?.label,allowSameContainerReorder:()=>v(),enabled:()=>c.onmove!==void 0,orientation:()=>`vertical`,announce:te,focusTarget:e=>e.querySelector(`[data-smrt-sortable-handle="item"]`),async commit(t){let n=e(P).get(t.itemId),r=e(I).get(t.source.containerId),i=e(I).get(t.target.containerId);n&&r&&i&&await c.onmove?.({item:n,source:t.source,target:t.target,sourceContainer:r,targetContainer:i})}}),z=K({root:()=>w,selectors:{container:`[data-smrt-sortable-container-list]`,containerKey:`smrtSortableContainerList`,item:`[data-smrt-sortable-container-item]`,itemKey:`smrtSortableContainerItem`},containers:()=>[{id:S,label:c.label??y(Li[`ui.sortable.label`])}],itemIds:()=>e(A).map(e=>e.id),itemLabel:t=>e(I).get(t)?.label,allowSameContainerReorder:()=>!0,enabled:()=>g()&&c.oncontainermove!==void 0,orientation:()=>`vertical`,announce:te,focusTarget:e=>Array.from(e.children).find(e=>e.tagName===`HEADER`)?.querySelector(`[data-smrt-sortable-handle="container"]`)??null,async commit(t){let n=e(I).get(t.itemId);n&&await c.oncontainermove?.({container:n,source:t.source.index,target:t.target.index})}});function re(e,t){let n=R.drag?.target;return n?.containerId===e&&n.index===t}function ie(e,t){let n=R.drag?.itemId,r=0;for(let i=0;i<t;i+=1)e[i].id!==n&&(r+=1);return r}function U(e){return z.drag?.target.index===e}function ae(t){let n=z.drag?.itemId,r=0;for(let i of e(A)){if(i.id===t)break;i.id!==n&&(r+=1)}return r}var W=Yi(),oe=N(W);p(oe,17,()=>e(D),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)});var G=F(oe,2),se=r=>{var i=Ji();H(i,`data-smrt-sortable-container-list`,S);var a=N(i);p(a,17,()=>e(A),e=>e.id,(r,i)=>{var a=qi(),o=B(a),c=e=>{var t=Hi();C(e,t)},l=n(()=>U(ae(e(i).id))&&z.drag?.itemId!==e(i).id);t(o,t=>{e(l)&&t(c)});var u=F(o,2),d=N(u);f(d,()=>e(i),()=>!0),s(u),C(r,a)});var o=F(a,2),c=e=>{var t=Hi();C(e,t)},l=n(()=>U(e(A).filter(e=>e.id!==z.drag?.itemId).length));t(o,t=>{e(l)&&t(c)}),s(i),C(r,i)},ce=t=>{var n=T(),r=B(n);p(r,17,()=>e(A),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)}),C(t,n)};t(G,e=>{g()?e(se):e(ce,-1)});var le=F(G,2),ue=L(le,!0),fe=F(le,2),pe=L(fe,!0);s(W),M(W,e=>w=e,()=>w),V(e=>{H(W,`aria-label`,e),H(le,`id`,b),l(ue,R.announcement),H(fe,`id`,x),l(pe,z.announcement)},[()=>c.label??y(Li[`ui.sortable.label`])]),C(a,W),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);function Zi(e){let t=e-1;return t*t*t+1}function Qi(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function $i(e,{delay:t=0,duration:n=400,easing:r=Zi,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Qi(i),[p,m]=Qi(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DYiyikup.js","./COiEfhsA.js","./uBIymjUX.js","./BPckYchm.js","./DG3qFFTE.js","./xihTtKlq.js","./Bv5jGtB8.js","./YUSKx8_q.js","../assets/feedback.qFktqYFY.css","./181pofES.js","./DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","./DF-0MxNw.js","../assets/SegmentedControl.DMqHG5fn.css","./KTvSuL9k.js","../assets/data.CVlX_W0i.css","./CsaWd8kG.js","../assets/forms.BRdbPdvs.css","./BxyJ_Q7v.js","./C7zBd-pD.js","./CA-A9Ngs.js","./BQxY8kkL.js","./DOkn8C67.js","./DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","./BIoR0hZt.js","./DUwAL-1A.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","./dggLG4_7.js","./CLd6ylMC.js","../assets/icons.BDx21rPt.css","./D7hhQvDO.js","./Cn2mA3wh.js","./BYcBM-fh.js","./DTWraE40.js","./CUyVrfsu.js"])))=>i.map(i=>d[i]);
2
+ 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,It as u,J as d,K as f,L as p,Lt as m,M as h,N as g,Ot as _,P as v,Pt as y,R as b,St as x,T as S,U as C,V as w,W as T,X as E,Y as D,Z as O,a as k,bt as A,ct as j,d as M,dt as ee,ft as N,gt as P,ht as F,k as I,kt as te,mt as L,n as R,nt as z,pt as B,q as ne,r as re,st as V,tt as ie,v as H,vt as U,z as ae}from"./DG3qFFTE.js";import{t as W}from"./uBIymjUX.js";import"./xihTtKlq.js";import{r as oe,s as G}from"./Bv5jGtB8.js";import{a as se,i as ce,n as le,r as ue,t as de}from"./YUSKx8_q.js";import{Ct as fe,wt as pe}from"./181pofES.js";import{n as me}from"./DK8Blf1Y.js";import{n as he}from"./DF-0MxNw.js";import{_ as ge,a as K,c as q,d as _e,f as ve,g as ye,h as be,i as xe,l as Se,n as Ce,o as we,r as Te,s as Ee,t as De,u as Oe,v as ke,y as Ae}from"./DIE02RSm.js";import{a as je,h as J,l as Y,m as Me,r as X}from"./KTvSuL9k.js";import{n as Ne,t as Pe}from"./CUyVrfsu.js";import{v as Fe}from"./CsaWd8kG.js";import{a as Ie,i as Le,t as Re}from"./BYcBM-fh.js";var ze=Symbol(`smrt-admin-shell`);function Be(e){return te(ze,e),e}function Ve(){let e=a(ze);if(!e)throw Error(`[useAdminShell] No AdminShell state found on Svelte context.`);return e}function He(){return a(ze)??null}function Ue(i,a){_(a,!0);let o=k(a,`label`,3,`Running activities`),s=Ve(),c=n(()=>s.activityBadge(a.edge));var u=T(),f=B(u),p=t=>{{let r=n(()=>e(c).hasFailed?`error`:`primary`),i=n(()=>`${o()}: ${e(c).count}`);fe(t,{get variant(){return e(r)},size:`sm`,get title(){return o()},get"aria-label"(){return e(i)},children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(c).progress===null?e(c).count:`${Math.round(e(c).progress)}%`]),C(t,r)},$$slots:{default:!0}})}};t(f,t=>{(e(c).count>0||e(c).hasFailed)&&t(p)}),C(i,u),r()}var Z=se({"ui.stt_test.heading":`STT Adapter Test`,"ui.stt_test.adapter_browser":`Browser (Web Speech API)`,"ui.stt_test.adapter_whisper_wasm":`Whisper WASM (v2)`,"ui.stt_test.adapter_whisper_cpp":`Whisper CPP`,"ui.stt_test.status_initializing":`Initializing...`,"ui.stt_test.status_ready":`Ready`,"ui.stt_test.status_not_initialized":`Not initialized`,"ui.workspace_shell.close_navigation":`Close navigation`,"ui.workspace_shell.close_inspector":`Close inspector`,"ui.workspace_shell.primary_navigation":`Primary navigation`,"ui.workspace_shell.workspace_navigation":`Workspace navigation`,"ui.workspace_shell.inspector_tools":`Inspector tools`,"ui.tools_dock.no_tools_available":`No tools available`,"ui.tools_dock.no_tools_context":`No tools are available for the current context.`,"ui.tools_dock.select_tool":`Select a tool to begin.`,"ui.tools_dock.workspace_tools":`Workspace tools`,"ui.admin_shell.no_focus_tools":`No focus tools`,"ui.admin_shell.focus_tools":`Focus tools`,"ui.admin_shell.no_app_panel":`No app panel`,"ui.admin_shell.no_system_panel":`No system panel`,"ui.admin_shell.shell_shortcuts":`Shell shortcuts`,"ui.admin_shell.close_shortcuts":`Close shortcuts`,"ui.admin_shell.shortcuts":`Shortcuts`,"ui.admin_shell.close":`Close`,"ui.admin_shell.home":`Home`,"ui.admin_shell.menu":`Menu`,"ui.admin_shell.close_menu":`Close menu`,"ui.admin_shell.tools":`Tools`,"ui.admin_shell.close_tools":`Close tools`,"ui.admin_shell.expand_sidebar":`Expand sidebar`,"ui.admin_shell.collapse_sidebar":`Collapse sidebar`,"ui.admin_shell.close_sidebar":`Close sidebar`,"ui.admin_shell.expand_panel":`Expand {panel}`,"ui.admin_shell.collapse_panel":`Collapse {panel}`,"ui.admin_shell.close_panel":`Close {label}`,"ui.admin_shell.open_panel":`Open {label}`,"ui.admin_shell.resize_panel":`Resize {label}`,"ui.shell_nav_toggle.collapse":`Collapse {label}`,"ui.shell_nav_toggle.expand":`Expand {label}`,"ui.shell_nav_toggle.navigation":`navigation`,"ui.phone_top_bar.back":`Back to {label}`,"ui.phone_bottom_bar.label":`Main`,"ui.phone_bottom_bar.unread":`{count} unread`,"ui.phone_bottom_bar.new":`new`,"ui.activity_toasts.dismiss":`Dismiss activity notification`,"ui.activity_toasts.dismiss_action":`Dismiss`,"ui.activity_item.view":`View`,"ui.activity_item.cancel":`Cancel`,"ui.activity_list.empty":`No activities`,"ui.activity_ticker.label":`Running processes`,"ui.activity_ticker.empty":`No active processes`,"ui.activity_ticker.pause":`Pause scrolling activities`,"ui.activity_ticker.resume":`Resume scrolling activities`,"ui.activity_ticker.queued":`Queued`,"ui.app_scope_panel.app_scope":`App scope`,"ui.app_shell.settings_link":`Shell settings`,"ui.app_shell.navigation":`Application navigation`,"ui.app_shell.slot_content":`{slot} content`,"ui.shell_slot.header_start":`Header, left`,"ui.shell_slot.header_center":`Header, middle`,"ui.shell_slot.header_end":`Header, right`,"ui.shell_slot.footer_start":`Footer, left`,"ui.shell_slot.footer_center":`Footer, middle`,"ui.shell_slot.footer_end":`Footer, right`,"ui.shell_slot.left_sidebar_header":`Left sidebar, header`,"ui.shell_slot.left_sidebar_footer":`Left sidebar, footer`,"ui.shell_slot.right_sidebar_header":`Right sidebar, header`,"ui.shell_slot.right_sidebar_footer":`Right sidebar, footer`,"ui.shell_slot.short_header_start":`Left`,"ui.shell_slot.short_header_center":`Middle`,"ui.shell_slot.short_header_end":`Right`,"ui.shell_slot.short_footer_start":`Left`,"ui.shell_slot.short_footer_center":`Middle`,"ui.shell_slot.short_footer_end":`Right`,"ui.shell_slot.short_sidebar_header":`Header`,"ui.shell_slot.short_sidebar_footer":`Footer`,"ui.owner_setup.heading":`Set up your local application`,"ui.owner_setup.unavailable":`Local owner setup is unavailable or has already been completed.`,"ui.owner_setup.intro":`Create the real local owner account. This invitation works once and stays on this device.`,"ui.owner_setup.name":`Name`,"ui.owner_setup.email":`Email`,"ui.owner_setup.tenant_name":`Workspace name (optional)`,"ui.owner_setup.submit":`Create owner`,"ui.shell_settings_page.heading":`Settings`,"ui.shell_settings_page.description":`Adjust appearance, your account, and the workspace layout.`,"ui.hotkey_input.capture_title":`Press a key to capture it`,"ui.hotkey_input.conflicts_with":`Conflicts with`,"ui.shell_settings_panel.shell_settings":`Shell settings`,"ui.shell_settings_panel.description":`Show or hide the workspace areas and reset the layout.`,"ui.shell_settings_panel.disable_hotkeys":`Disable hotkeys`,"ui.shell_settings_panel.enable_hotkeys":`Enable hotkeys`,"ui.shell_settings_panel.collapse":`Collapse`,"ui.shell_settings_panel.expand":`Expand`,"ui.owner_setup.link_missing_heading":`This setup link is missing or has expired`,"ui.owner_setup.link_missing_body":`Setup links work once and only for a short time. Run one of these in the terminal where the app runs.`,"ui.owner_setup.recovery_open":`Open a fresh setup link`,"ui.owner_setup.recovery_recover":`Recover the setup invitation`,"ui.shell_settings.appearance":`Appearance`,"ui.shell_settings.theme":`Theme`,"ui.shell_settings.color_scheme":`Color scheme`,"ui.shell_settings.account":`Account`,"ui.shell_settings.account_name":`Name`,"ui.shell_settings.account_email":`Email`,"ui.shell_settings.account_signed_out":`You are not signed in.`,"ui.shell_settings.sign_out":`Sign out`,"ui.shell_settings.sign_out_failed":`Couldn't sign out. Try again.`,"ui.shell_settings.layout":`Layout`,"ui.shell_settings.hide":`Hide`,"ui.shell_settings.show":`Show`,"ui.shell_settings.edit_layout_on":`Editing layout`,"ui.shell_settings.edit_layout_off":`Edit layout`,"ui.shell_settings.reset_layout":`Reset layout`,"ui.shell_settings.panels":`Shown areas`,"ui.shell_settings.show_region":`Show {region}`,"ui.shell_settings.hide_region":`Hide {region}`,"ui.shell_settings.region_shown":`Shown`,"ui.shell_settings.region_hidden":`Hidden`,"ui.shell_settings.shortcuts":`Keyboard shortcuts`,"ui.shell_layout_editor.heading":`Shell layout`,"ui.shell_layout_editor.description":`Choose which panels appear and arrange the navigation. Drag a handle, or focus it, press Space, and use the arrow keys.`,"ui.shell_layout_editor.reset":`Reset to defaults`,"ui.shell_layout_editor.panels":`Panels`,"ui.shell_layout_editor.show_panel":`Show {panel} panel`,"ui.shell_layout_editor.start_expanded":`Start {panel} panel expanded`,"ui.shell_layout_editor.panel_unavailable":`The {panel} panel is not available in this app.`,"ui.shell_layout_editor.navigation":`Navigation`,"ui.shell_layout_editor.top_level":`Top level`,"ui.shell_layout_editor.show_entry":`Show {label} in navigation`,"ui.shell_layout_editor.new_section":`New section`,"ui.shell_layout_editor.new_section_label":`New section`,"ui.shell_layout_editor.section_name":`Name of section {label}`,"ui.shell_layout_editor.rename_item":`Rename {label}`,"ui.shell_layout_editor.item_name":`Name of item {label}`,"ui.shell_layout_editor.reset_item":`Reset {label} to {original}`,"ui.shell_layout_editor.section_icon":`Icon of {label}`,"ui.shell_layout_editor.icon_option":`Use {icon} icon`,"ui.section_menu.label":`{label} entries`,"ui.section_menu.empty":`No entries in this section.`,"ui.shell_layout_editor.show_title_for":`Show title of {label}`,"ui.shell_layout_editor.delete":`Delete`,"ui.shell_layout_editor.delete_section":`Delete section {label}`,"ui.shell_layout_editor.delete_confirm":`Delete {label}? Its items return to their default sections.`,"ui.shell_layout_editor.preview":`Preview`,"ui.shell_layout_editor.preview_label":`Navigation preview`,"ui.shell_layout_editor.sortable_label":`Navigation sections and items`,"ui.layout_edit.toggle":`Edit layout`,"ui.layout_edit.announce_on":`Layout editing on. Drag items between zones, or focus a grip, press Space, and use the arrow keys.`,"ui.layout_edit.announce_off":`Layout editing off.`,"ui.layout_edit.zone":`{region} · {slot}`,"ui.layout_edit.region_hidden":`{region} · hidden`,"ui.layout_edit.show_region":`Show {region}`,"ui.layout_edit.hide_region":`Hide {region}`,"ui.layout_edit.hide_last_region":`Cannot hide {region}: at least one region must stay visible`,"ui.app_shell.brand_item":`App title`,"ui.layout_edit.section_options":`Options for section {label}`,"ui.layout_edit.edit_section":`Edit section {label}`,"ui.shell_region.header":`Header`,"ui.shell_region.left_sidebar":`Left sidebar`,"ui.shell_region.right_sidebar":`Right sidebar`,"ui.shell_region.footer":`Footer`,"ui.shortcuts_overlay.open_shortcuts":`Open shortcuts`,"ui.shortcuts_overlay.close_drawer":`Close drawer`,"ui.shortcuts_overlay.close":`Close`,"ui.shortcuts_overlay.escape":`Esc`,"ui.system_scope_panel.system_scope":`System scope`,"ui.system_scope_panel.activities":`Activities`,"ui.system_scope_panel.no_running_work":`No running work`,"ui.system_status_chips.system_status":`System status`,"ui.tenant_nav.tenant_navigation":`Tenant navigation`,"ui.tenant_nav.needs_attention":`Needs attention`,"ui.workspace_account_menu.open":`Open account menu`,"ui.workspace_account_menu.current_tenant":`{tenant} — current`,"ui.workspace_account_menu.sign_out":`Sign out`,"ui.activity_feed.title":`Live activity feed`,"ui.activity_feed.description":`A smrt-web live collection reconciled into the shell activity registry.`,"ui.activity_feed.enqueue_job":`Enqueue job`,"ui.activity_feed.advance_job":`Advance job`,"ui.activity_feed.complete_job":`Complete job`,"ui.activity_feed.fail_job":`Fail job`,"ui.activity_feed.clear_finished":`Clear finished`,"ui.activity_feed.rows_heading":`Backing collection rows`,"ui.activity_feed.no_rows":`No rows yet`,"ui.activity_feed.job_label":`Render job`,"ui.system_feed.title":`System feed`,"ui.system_feed.description":`Polls an app-provided status endpoint and maps it into the system-scope panels and status chips.`,"ui.system_feed.pause":`Pause polling`,"ui.system_feed.resume":`Resume polling`,"ui.system_feed.refresh":`Refresh now`,"ui.system_feed.fail_next":`Fail next fetch`,"ui.system_feed.status_label":`Feed status`,"ui.system_feed.tick_label":`Ticks`,"ui.system_feed.error_label":`Last error`,"ui.system_feed.jobs_panel":`Jobs`,"ui.system_feed.schedules_panel":`Schedules`,"ui.system_feed.dispatch_panel":`Dispatch`,"ui.system_feed.chip_workers":`Workers`,"ui.system_feed.chip_running":`Running`,"ui.system_feed.chip_queued":`Queued`,"ui.system_feed.chip_failed":`Failed`,"ui.phone_tab_bar.label":`Main`,"ui.phone_tab_bar.more":`More`,"ui.app_shell.account_item":`Account menu`,"ui.app_shell.color_scheme_item":`Color scheme`,"ui.app_shell.color_scheme_dark":`Dark mode`,"ui.app_shell.color_scheme_to_dark":`Switch to dark mode`,"ui.app_shell.color_scheme_to_light":`Switch to light mode`,"ui.app_shell.command_palette_item":`Search`,"ui.app_shell.account_settings":`Settings`,"ui.dock_toggles.set_up":`Set up {label}`}),We=`smrt-assistant-request`;function Ge(e,t){let n=new CustomEvent(We,{bubbles:!0,composed:!0,cancelable:!0,detail:t});return e.dispatchEvent(n),n.defaultPrevented}var Ke=c(`<time class="bubble__time svelte-2p843q"> </time>`),qe=c(`<div class="bubble__header svelte-2p843q"><span class="bubble__author svelte-2p843q"> </span> <!></div>`),Je=c(`<p class="bubble__content svelte-2p843q"> </p>`),Ye=c(`<div class="bubble__reactions svelte-2p843q"><!></div>`),Xe=c(`<div class="bubble__actions svelte-2p843q"><!></div>`),Ze=c(`<div data-smrt-component="MessageBubble"><!> <div class="bubble__body svelte-2p843q"><!></div> <!> <!></div>`);function Qe(a,c){_(c,!0);let u=k(c,`role`,3,`user`),d={user:`You`,agent:`Assistant`,system:`System`},f=n(()=>c.variant??(u()===`agent`?`agent`:u()===`system`?`system`:`default`)),p=n(()=>c.own??u()===`user`),m=n(()=>c.variant!==void 0||c.own!==void 0),h=n(()=>c.author??d[u()]),g=n(()=>c.author!==void 0||!e(m)),v=n(()=>`${e(h)} (${u()})`),y=n(()=>c.timestamp?c.timestamp.toISOString():void 0),b=n(()=>c.timestampLabel??c.timestamp?.toLocaleTimeString()??``);var x=Ze();let S;var w=N(x),E=n=>{var r=qe(),i=N(r),a=L(i,!0),o=F(i,2),c=t=>{var n=Ke(),r=L(n,!0);V(()=>{H(n,`datetime`,e(y)),l(r,e(b))}),C(t,n)};t(o,t=>{e(b)&&t(c)}),s(r),V(()=>l(a,e(h))),C(n,r)};t(w,t=>{e(g)&&t(E)});var D=F(w,2),O=N(D),A=e=>{var t=T(),n=B(t);o(n,()=>c.children),C(e,t)},j=e=>{var t=Je(),n=L(t,!0);V(()=>l(n,c.content)),C(e,t)};t(O,e=>{c.children?e(A):c.content!==void 0&&e(j,1)}),s(D);var M=F(D,2),ee=e=>{var t=Ye(),n=N(t);o(n,()=>c.reactions),s(t),C(e,t)};t(M,e=>{c.reactions&&e(ee)});var P=F(M,2),I=e=>{var t=Xe(),n=N(t);o(n,()=>c.actions),s(t),C(e,t)};t(P,e=>{c.actions&&e(I)}),s(x),V(()=>{S=i(x,1,`bubble bubble--${e(f)??``}`,`svelte-2p843q`,S,{"bubble--own":e(p)}),H(x,`role`,e(g)?`group`:void 0),H(x,`aria-label`,e(g)?e(v):void 0)}),C(a,x),r()}var $e=c(`<button type="button" class="reactions__btn svelte-1fg95t8"><span aria-hidden="true"> </span></button>`),et=c(`<div class="reactions svelte-1fg95t8" role="group" data-smrt-component="ReactionPicker"></div>`);function tt(i,a){_(a,!0);let o=[`👍`,`❤️`,`😂`,`🎉`,`😮`,`😢`],c={"👍":`Thumbs up`,"❤️":`Heart`,"😂":`Laugh`,"🎉":`Celebrate`,"😮":`Surprised`,"😢":`Sad`},u=k(a,`emojis`,3,o),d=k(a,`isOpen`,3,!0),{t:f}=de(),m=n(()=>a.label??f(ce[`ui.reaction_picker.label`]));function h(e){return a.emojiLabel?.(e)??c[e]??f(ce[`ui.reaction_picker.react_with`],{emoji:e})}var g=T(),v=B(g),y=t=>{var n=et();p(n,20,u,e=>e,(e,t)=>{var n=$e(),r=N(n),i=L(r,!0);s(n),V(e=>{H(n,`aria-label`,e),l(i,t)},[()=>h(t)]),E(`click`,n,()=>a.onpick?.(t)),C(e,n)}),s(n),V(()=>H(n,`aria-label`,e(m))),C(t,n)};t(v,e=>{d()&&e(y)}),C(i,g),r()}D([`click`]);var nt=c(`<div class="typing svelte-x9akf9" role="status" aria-live="polite" data-smrt-component="TypingIndicator"><span class="typing__text svelte-x9akf9"> </span> <span class="typing__dots svelte-x9akf9" aria-hidden="true"><span class="typing__dot svelte-x9akf9"></span> <span class="typing__dot svelte-x9akf9"></span> <span class="typing__dot svelte-x9akf9"></span></span></div>`);function rt(i,a){_(a,!0);let o=n(()=>a.names!==void 0),c=n(()=>!e(o)||(a.names?.length??0)>0),u=n(()=>a.label?a.label:a.names&&a.names.length>0?a.names.length===1?`${a.names[0]} is typing`:a.names.length===2?`${a.names[0]} and ${a.names[1]} are typing`:`${a.names[0]} and ${a.names.length-1} others are typing`:a.name?`${a.name} is typing`:`Typing`);var d=T(),f=B(d),p=t=>{var n=nt(),r=N(n),i=L(r,!0);y(2),s(n),V(()=>l(i,e(u))),C(t,n)};t(f,t=>{e(c)&&t(p)}),C(i,d),r()}var it=`smrt-shell-navigated`;function at(e,t={}){e.dispatchEvent(new CustomEvent(it,{bubbles:!0,composed:!0,detail:t}))}function ot(e,t,n=3e3,{skipExisting:r=!0}={}){let i=Date.now(),a=new Set(r?e.querySelectorAll(t):[]),o=null,s=()=>{let r=[...e.querySelectorAll(t)].find(e=>!a.has(e));r?(!r.hasAttribute(`tabindex`)&&r.tabIndex<0&&r.setAttribute(`tabindex`,`-1`),r.focus({preventScroll:!1})):Date.now()-i<n&&(o=setTimeout(s,50))};return o=setTimeout(s,0),()=>{o&&clearTimeout(o)}}var st=c(`<img class="smrt-admin-shell__logo svelte-r3uxsf"/>`),ct=c(`<span aria-hidden="true" class="svelte-r3uxsf"> </span>`),lt=c(`<span class="svelte-r3uxsf"> </span>`),ut=c(`<div><strong class="svelte-r3uxsf"> </strong><!></div>`),dt=c(`<!> <!>`,1),ft=c(`<a><!></a>`),pt=c(`<div><!></div>`);function mt(e,n){_(n,!0);let a=e=>{var r=T(),a=B(r),p=e=>{var t=T(),r=B(t);o(r,()=>n.brand,()=>({compact:f()})),C(e,t)},m=e=>{var r=dt(),a=B(r),o=e=>{var t=st();V(()=>{H(t,`src`,n.logoSrc),H(t,`alt`,d())}),C(e,t)};t(a,e=>{n.logoSrc&&e(o)});var p=F(a,2),m=e=>{var r=T(),i=B(r),a=e=>{var t=ct(),n=L(t,!0);V(e=>l(n,e),[()=>c().charAt(0)]),C(e,t)};t(i,e=>{n.logoSrc||e(a)}),C(e,r)},h=e=>{var r=ut();let a;var o=N(r),d=L(o,!0),f=F(o),p=e=>{var t=lt(),n=L(t,!0);V(()=>l(n,u())),C(e,t)};t(f,e=>{u()&&e(p)}),s(r),V(e=>{a=i(r,1,`smrt-admin-shell__brand-text svelte-r3uxsf`,null,a,{wordmark:e}),l(d,c())},[()=>!!n.logoSrc&&!u()]),C(e,r)};t(p,e=>{f()?e(m):e(h,-1)}),C(e,r)};t(a,e=>{n.brand?e(p):e(m,-1)}),C(e,r)},c=k(n,`title`,3,`SMRT`),u=k(n,`subtitle`,3,``),d=k(n,`logoAlt`,3,``),f=k(n,`compact`,3,!1),{t:p}=de();var m=T(),h=B(m),g=e=>{var t=ft();let r;var o=N(t);a(o),s(t),V(e=>{r=i(t,1,`smrt-admin-shell__brand smrt-admin-shell__brand-link svelte-r3uxsf`,null,r,{compact:f()}),H(t,`href`,n.homeHref),H(t,`aria-label`,e)},[()=>c()||p(Z[`ui.admin_shell.home`])]),C(e,t)},v=e=>{var t=pt();let n;var r=N(t);a(r),s(t),V(()=>n=i(t,1,`smrt-admin-shell__brand svelte-r3uxsf`,null,n,{compact:f()})),C(e,t)};t(h,e=>{n.homeHref?e(g):e(v,-1)}),C(e,m),r()}var ht=[`header.start`,`header.center`,`header.end`,`footer.start`,`footer.center`,`footer.end`,`leftSidebar.header`,`leftSidebar.footer`,`rightSidebar.header`,`rightSidebar.footer`];function gt(e){return e.split(`.`)[0]}function _t(e){let[t,n]=e.split(`.`);switch(t){case`header`:return[`leftSidebar.header`,`rightSidebar.header`,`footer.${n}`];case`footer`:return[`leftSidebar.footer`,`rightSidebar.footer`,`header.${n}`];case`leftSidebar`:return n===`header`?[`header.start`,`rightSidebar.header`,`footer.start`]:[`footer.start`,`header.start`,`rightSidebar.footer`];case`rightSidebar`:return n===`header`?[`header.end`,`leftSidebar.header`,`footer.end`]:[`footer.end`,`header.end`,`leftSidebar.footer`]}}function vt(e,t){for(let n of[e,..._t(e)])if(t(gt(n)))return n;return null}var yt=`dock:`,bt=`slot:`;function xt(e){return`${yt}${e}`}function St(e){return`${bt}${e}`}function Ct(e){return typeof e==`string`&&ht.includes(e)}var wt=`@root`,Tt=[`top`,`left`,`right`,`bottom`],Et=`custom:`;function Dt(){return{version:1}}function Ot(e){return!e||!e.sectionOrder?.length&&!Q(e.itemOrder)&&!e.hidden?.length&&!Q(e.moved)&&!Q(e.sections)&&!Q(e.items)&&!e.customSections?.length&&!Q(e.panels)&&!Q(e.placements)}function Q(e){return typeof e==`object`&&!!e&&Object.keys(e).length>0}function kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function At(e){if(!Array.isArray(e))return;let t=new Set;for(let n of e)typeof n==`string`&&n!==``&&t.add(n);return t.size>0?[...t]:void 0}function jt(e){if(typeof e!=`string`)return;let t=e.trim();return t===``?void 0:t}function Mt(e){if(!kt(e))return;let t={},n=jt(e.label);n&&(t.label=n),typeof e.showTitle==`boolean`&&(t.showTitle=e.showTitle);let r=jt(e.icon);return r&&(t.icon=r),Q(t)?t:void 0}function Nt(e){if(!kt(e))return;let t={},n=jt(e.label);n&&(t.label=n);let r=jt(e.description);return r&&(t.description=r),Q(t)?t:void 0}function Pt(e){if(!kt(e))return;let t={};for(let[n,r]of Object.entries(e)){let e=n===``?void 0:Nt(r);e&&(t[n]=e)}return Q(t)?t:void 0}function Ft(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(!kt(r)||typeof r.id!=`string`)continue;let e=jt(r.label);r.id.startsWith(`custom:`)&&e&&(t.has(r.id)||(t.add(r.id),n.push({id:r.id,label:e})))}return n}function It(e){let t=Dt();if(!kt(e)||e.version!==1)return t;let n=At(e.sectionOrder);if(n&&(t.sectionOrder=n),kt(e.itemOrder)){let n={};for(let[t,r]of Object.entries(e.itemOrder)){let e=At(r);e&&(n[t]=e)}Q(n)&&(t.itemOrder=n)}let r=At(e.hidden);if(r&&(t.hidden=r),kt(e.moved)){let n={};for(let[t,r]of Object.entries(e.moved))typeof r==`string`&&r!==``&&(n[t]=r);Q(n)&&(t.moved=n)}if(kt(e.sections)){let n={};for(let[t,r]of Object.entries(e.sections)){let e=Mt(r);e&&(n[t]=e)}Q(n)&&(t.sections=n)}let i=Pt(e.items);i&&(t.items=i);let a=Ft(e.customSections);if(a.length>0&&(t.customSections=a),kt(e.panels)){let n={};for(let t of Tt){let r=e.panels[t];if(!kt(r))continue;let i={};typeof r.visible==`boolean`&&(i.visible=r.visible),(r.initial===`collapsed`||r.initial===`expanded`)&&(i.initial=r.initial),Q(i)&&(n[t]=i)}Q(n)&&(t.panels=n)}let o=sn(e.placements);return o&&(t.placements=o),t}function Lt(e){return e.id??e.heading}function Rt(e){return e.id??e.href}function $(e,t){if(!t||t.length===0)return[...e];let n=new Set(e),r=[],i=new Set;for(let e of t)n.has(e)&&!i.has(e)&&(i.add(e),r.push(e));if(r.length===0)return[...e];let a=0;return e.map(e=>i.has(e)?r[a++]:e)}function zt(e=[],t=[],n){let r=new Set([wt]),i=e=>{let t=e;for(let n=2;r.has(t);n+=1)t=`${e}#${n}`;return r.add(t),t},a=[{id:wt,group:null,items:e.map(e=>({id:i(Rt(e)),item:e}))}];for(let e of t){let t=i(Lt(e));a.push({id:t,group:e,items:e.items.map(e=>({id:i(Rt(e)),item:e}))})}for(let e of Ft(n?.customSections))r.has(e.id)||(r.add(e.id),a.push({id:e.id,group:{id:e.id,heading:e.label,items:[]},items:[],custom:!0}));let o=kt(n?.sections)?n.sections:{},s=Pt(n?.items)??{},c=new Set(At(n?.hidden)??[]),l=kt(n?.moved)?n?.moved:{},u=new Set(a.map(e=>e.id)),d=new Set(a.flatMap(e=>e.items.map(e=>e.id))),f=(e,t)=>{let n=d.has(e)?l[e]:void 0;return typeof n==`string`&&u.has(n)?n:t},p=$(a.slice(1).map(e=>e.id),At(n?.sectionOrder)),m=new Map(a.map(e=>[e.id,e])),h=[a[0],...p.map(e=>m.get(e))],g=kt(n?.itemOrder)?n?.itemOrder:{};return h.map(e=>{let t=[];for(let n of a)for(let r of n.items)f(r.id,n.id)===e.id&&t.push({id:r.id,item:s[r.id]?.description?{...r.item,description:s[r.id]?.description}:r.item,nativeSectionId:n.id,sectionId:e.id,hidden:c.has(r.id),label:s[r.id]?.label??r.item.label,defaultLabel:r.item.label});t.sort((t,n)=>Number(t.nativeSectionId!==e.id)-Number(n.nativeSectionId!==e.id));let n=new Map(t.map(e=>[e.id,e])),r=$(t.map(e=>e.id),At(g[e.id])),i=e.group?Mt(o[e.id]):void 0,l=e.custom===!0;return{id:e.id,group:e.group,heading:e.group?(l?void 0:i?.label)??e.group.heading:null,defaultHeading:e.group&&!l?e.group.heading:null,custom:l,titleVisible:e.group?i?.showTitle??e.group.showTitle!==!1:!1,icon:e.group?i?.icon??e.group.icon??null:null,defaultIcon:e.group?.icon??null,hidden:e.group?c.has(e.id):!1,items:r.map(e=>n.get(e))}})}function Bt(e,t){return!t||e===!1||e?.initial===`hidden`?e:t.visible===!1?!1:t.initial===`collapsed`||t.initial===`expanded`?{...e,initial:t.initial}:e}function Vt(e,t,n,r){let i=n??{};if(Ot(r))return{nav:e,groups:t,panels:i};let a=zt(e,t,r),o=e=>e.hidden?[]:e.items.filter(e=>!e.hidden).map(e=>e.label===e.defaultLabel?e.item:{...e.item,label:e.label,defaultLabel:e.defaultLabel}),[s,...c]=a,l=[];for(let e of c){let t=o(e),n=e.group;if(e.hidden||t.length===0&&(e.custom||n.items.length>0))continue;let r={...n,items:t};e.heading!==n.heading&&(r.id=Lt(n),r.heading=e.heading),e.titleVisible?delete r.showTitle:r.showTitle=!1,e.icon&&(r.icon=e.icon),l.push(r)}let u={...i},d=kt(r?.panels)?r?.panels:void 0;for(let e of Tt){let t=d?.[e];if(!kt(t))continue;let n=Bt(i[e],t);n!==void 0&&(u[e]=n)}return{nav:o(s),groups:l,panels:u}}function Ht(e){let t={version:1};return e.sectionOrder?.length&&(t.sectionOrder=e.sectionOrder),Q(e.itemOrder)&&(t.itemOrder=e.itemOrder),e.hidden?.length&&(t.hidden=e.hidden),Q(e.moved)&&(t.moved=e.moved),Q(e.sections)&&(t.sections=e.sections),Q(e.items)&&(t.items=e.items),e.customSections?.length&&(t.customSections=e.customSections),Q(e.panels)&&(t.panels=e.panels),Q(e.placements)&&(t.placements=e.placements),t}function Ut(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Wt(e,t){return Number.isFinite(e)?Math.max(0,Math.min(Math.trunc(e),t)):t}function Gt(e,t,n,r,i){let a=It(n??Dt()),o=zt(e,t,a).slice(1).map(e=>e.id);if(!o.includes(r))return a;let s=o.filter(e=>e!==r);s.splice(Wt(i,s.length),0,r);let c=Ut(s,zt(e,t,{version:1,customSections:a.customSections}).slice(1).map(e=>e.id))?void 0:s;return Ht({...a,sectionOrder:c})}function Kt(e,t,n,r,i,a){let o=It(n??Dt()),s=zt(e,t,o),c=s.find(e=>e.items.some(e=>e.id===r)),l=s.find(e=>e.id===i);if(!c||!l)return o;let u=c.items.find(e=>e.id===r);if(!u)return o;let d=new Map(s.map(e=>[e.id,e.items.map(e=>e.id)]));d.set(c.id,(d.get(c.id)??[]).filter(e=>e!==r));let f=[...d.get(l.id)??[]];f.splice(Wt(a??f.length,f.length),0,r),d.set(l.id,f);let p={...o.moved??{}};l.id===u.nativeSectionId?delete p[r]:p[r]=l.id;let m={...o,moved:p},h=zt(e,t,{version:1,moved:p,sectionOrder:o.sectionOrder,customSections:o.customSections}),g={...o.itemOrder??{}};for(let e of new Set([c.id,l.id])){let t=h.find(t=>t.id===e)?.items.map(e=>e.id),n=d.get(e)??[];t&&Ut(n,t)?delete g[e]:g[e]=n}return Ht({...m,itemOrder:g})}function qt(e,t,n,r){let i=It(n??Dt());return!Yt(e,t,i,r)||i.hidden?.includes(r)?i:Ht({...i,hidden:[...i.hidden??[],r]})}function Jt(e,t){let n=It(e??Dt());return n.hidden?.includes(t)?Ht({...n,hidden:n.hidden.filter(e=>e!==t)}):n}function Yt(e,t,n,r){return zt(e,t,{version:1,customSections:n.customSections}).some(e=>e.group!==null&&e.id===r||e.items.some(e=>e.id===r))}function Xt(e,t,n,r){let i=It(e??Dt());if(!Tt.includes(t))return i;let a={...i.panels?.[t]??{}};`visible`in n&&(n.visible===!1?a.visible=!1:delete a.visible),`initial`in n&&(n.initial===`collapsed`||n.initial===`expanded`?a.initial=n.initial:delete a.initial);let o=r?.[t];a.initial!==void 0&&o!==!1&&a.initial===(o?.initial??`collapsed`)&&delete a.initial;let s={...i.panels??{}};return Q(a)?s[t]=a:delete s[t],Ht({...i,panels:s})}function Zt(e,t,n){let r={...e.sections??{}},i={...r[t]??{},...n};return i.label===void 0&&delete i.label,i.showTitle===void 0&&delete i.showTitle,i.icon===void 0&&delete i.icon,Q(i)?r[t]=i:delete r[t],Ht({...e,sections:r})}function Qt(e,t,n,r){return zt(e,t,n).find(e=>e.group!==null&&e.id===r)}function $t(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);if(!o)return a;let s=jt(i);return o.custom?s?Ht({...a,customSections:a.customSections?.map(e=>e.id===r?{...e,label:s}:e)}):a:Zt(a,r,{label:!s||s===o.defaultHeading?void 0:s})}function en(e,t,n,r,i){let a=It(n??Dt()),o=zt(e,t,a).flatMap(e=>e.items).find(e=>e.id===r);if(!o)return a;let s=jt(i),c={...a.items??{}},l=c[r]?.description,u={...s&&s!==o.defaultLabel?{label:s}:{},...l?{description:l}:{}};return Q(u)?c[r]=u:delete c[r],Ht({...a,items:c})}function tn(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);return o?Zt(a,r,{showTitle:i===(o.custom?!0:o.group?.showTitle!==!1)?void 0:i}):a}function nn(e,t,n,r,i){let a=It(n??Dt()),o=Qt(e,t,a,r);if(!o)return a;let s=jt(i);return Zt(a,r,{icon:!s||s===o.defaultIcon?void 0:s})}function rn(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`}function an(e,t,n,r){let i=It(n??Dt()),a=jt(r);if(!a)return i;let o=new Set(zt(e,t,i).flatMap(e=>[e.id,...e.items.map(e=>e.id)])),s=`${Et}${rn(a)}`,c=s;for(let e=2;o.has(c);e+=1)c=`${s}-${e}`;return Ht({...i,customSections:[...i.customSections??[],{id:c,label:a}]})}function on(e,t){let n=It(e??Dt());if(!n.customSections?.some(e=>e.id===t))return n;let r=e=>{if(!e)return;let n={...e};return delete n[t],n},i=Object.fromEntries(Object.entries(n.moved??{}).filter(([,e])=>e!==t));return Ht({...n,customSections:n.customSections.filter(e=>e.id!==t),sectionOrder:n.sectionOrder?.filter(e=>e!==t),itemOrder:r(n.itemOrder),hidden:n.hidden?.filter(e=>e!==t),sections:r(n.sections),moved:i})}function sn(e){if(!kt(e))return;let t={};for(let[n,r]of Object.entries(e))n!==``&&Ct(r)&&(t[n]=r);return Q(t)?t:void 0}function cn(e,t){let n=Object.fromEntries(ht.map(e=>[e,[]])),r=sn(t?.placements)??{},i=new Set;for(let t of e)i.has(t.id)||(i.add(t.id),r[t.id]===void 0&&n[t.slot]?.push(t.id));for(let[e,t]of Object.entries(r))i.has(e)&&n[t].push(e);return n}function ln(e,t,n,r){let i=It(e??Dt());if(t===``||!Ct(n))return i;let a={...i.placements??{}};return delete a[t],n!==r&&(a[t]=n),Ht({...i,placements:a})}function un(e,t){let n=It(e??Dt());if(!n.placements||!(t in n.placements))return n;let r={...n.placements};return delete r[t],Ht({...n,placements:r})}var dn=[`top`,`left`,`right`,`bottom`],fn={top:`app`,left:`tenant`,right:`focus`,bottom:`system`},pn={app:`top`,tenant:`left`,focus:`right`,system:`bottom`},mn={top:{code:`KeyW`},left:{code:`KeyA`},bottom:{code:`KeyS`},right:{code:`KeyD`}},hn={top:{edge:`top`,scope:`app`,label:`Header`,initial:`collapsed`,presentation:`overlay`,hotkey:mn.top,collapsedSize:`3.5rem`,expandedSize:`18rem`},left:{edge:`left`,scope:`tenant`,label:`Left sidebar`,initial:`collapsed`,presentation:`push`,hotkey:mn.left,collapsedSize:`4.25rem`,expandedSize:`16rem`},right:{edge:`right`,scope:`focus`,label:`Right sidebar`,initial:`collapsed`,presentation:`push`,overlayMedia:`(max-width: 79.9375rem)`,closeOnNavigate:!0,hotkey:mn.right,collapsedSize:`4.25rem`,expandedSize:`20rem`},bottom:{edge:`bottom`,scope:`system`,label:`Footer`,initial:`collapsed`,presentation:`overlay`,hotkey:mn.bottom,collapsedSize:`2.75rem`,expandedSize:`18rem`}};function gn(e={}){return{panels:Object.fromEntries(dn.map(t=>{let n=e[t];return n===!1?[t,{...hn[t],initial:`hidden`,hotkey:null}]:[t,{...hn[t],...n,edge:t,scope:n?.scope??fn[t]}]}))}}function _n(e,t,n={},r,i){return t.initial===`hidden`||i?.visible===!1?`hidden`:n.panels?.[e]??(r?t.viewportDefaults?.[r]:void 0)??i?.initial??t.initial}var vn={min:240,max:720,step:16};function yn(e,t){if(e!==`left`&&e!==`right`||!t.resizable||t.initial===`hidden`)return null;let n=t.resizable===!0?{}:t.resizable,r=Math.max(0,n.min??vn.min);return{min:r,max:Math.max(r,n.max??vn.max),step:Math.max(1,n.step??vn.step)}}function bn(e,t){return Math.round(Math.min(t.max,Math.max(t.min,e)))}function xn(e,t){if(t===`state`&&e.viewportDefaults)return!1;let n=e.persist??!0;return typeof n==`boolean`?n:n[t]??!0}function Sn(e,t){let n={...e};for(let r of[`panels`,`sizes`]){let i=e[r];if(!i)continue;let a={};for(let e of dn)e in i&&xn(t.panels[e],r===`panels`?`state`:`size`)&&(a[e]=i[e]);Object.keys(a).length>0?n[r]=a:delete n[r]}return n}function Cn(e,t,n={}){return t.initial===`hidden`?null:n.keymap&&e in n.keymap?n.keymap[e]??null:t.hotkey}function wn(e,t){return{...e,...t,keymap:e.keymap||t.keymap?{...e.keymap??{},...t.keymap??{}}:void 0,panels:e.panels||t.panels?{...e.panels??{},...t.panels??{}}:void 0,sizes:e.sizes||t.sizes?{...e.sizes??{},...t.sizes??{}}:void 0}}function Tn(e){let t={};if(e.hotkeysEnabled!==void 0&&(t.hotkeysEnabled=e.hotkeysEnabled),e.activeFocusToolId!==void 0&&(t.activeFocusToolId=e.activeFocusToolId),e.layout!==void 0){let n=It(e.layout);Ot(n)||(t.layout=n)}if(e.keymap&&Object.keys(e.keymap).length>0&&(t.keymap=e.keymap),e.panels&&Object.keys(e.panels).length>0&&(t.panels=e.panels),e.sizes){let n=Object.fromEntries(Object.entries(e.sizes).filter(([,e])=>typeof e==`number`&&Number.isFinite(e)));Object.keys(n).length>0&&(t.sizes=n)}return t}var En=class{key;constructor(e){this.key=e}read(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(this.key);return e?JSON.parse(e):null}catch{return null}}write(e){typeof window<`u`&&window.localStorage.setItem(this.key,JSON.stringify(Tn(e)))}};function Dn(e,t,n={}){if(On(e,n))return null;if(An(e))return{type:`show-shortcuts`};for(let r of dn){let i=Cn(r,t[r],n);if(i&&kn(i,e))return{type:`toggle-panel`,edge:r}}return null}function On(e,t={}){return t.hotkeysEnabled===!1||e.isComposing||jn(e.target)?!0:e.altKey||e.ctrlKey||e.metaKey||e.shiftKey?!An(e):!1}function kn(e,t){return e.code===t.code&&!!e.altKey===t.altKey&&!!e.ctrlKey===t.ctrlKey&&!!e.metaKey===t.metaKey&&!!e.shiftKey===t.shiftKey}function An(e){return e.key===`?`||e.code===`Slash`&&e.shiftKey}function jn(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||e.isContentEditable?!0:!!e.closest(`[contenteditable="true"]`)}function Mn(e){return e?[e.ctrlKey?`Ctrl`:``,e.altKey?`Alt`:``,e.shiftKey?`Shift`:``,e.metaKey?`Meta`:``,e.code.replace(/^Key/,``).replace(/^Digit/,``)].filter(Boolean).join(`+`):`Off`}function Nn(e){return e.phone?`phone`:e.desktop?`desktop`:`tablet`}var Pn=class{hidden=!1;#e=0;#t=0;#n;#r;#i;constructor(e={}){this.#n=e.revealWithin??56,this.#r=e.hideAfter??12,this.#i=e.showAfter??4}update(e){let t=e.maxY??1/0,n=Math.min(Math.max(e.y,0),Math.max(t,0));if(e.pinned||n<=this.#n)return this.hidden=!1,this.#e=n,this.#t=0,this.hidden;let r=n-this.#e;return this.#e=n,r===0||(this.#t=Math.sign(r)===Math.sign(this.#t)?this.#t+r:r,this.#t>=this.#r?this.hidden=!0:-this.#t>=this.#i&&(this.hidden=!1)),this.hidden}reset(){this.hidden=!1,this.#e=0,this.#t=0}};function Fn(e){let t=e.visualHeight*(e.scale??1);return e.layoutHeight-t>(e.threshold??150)}function In(e){return e.keyboardOpen?`none`:e.formActions?`form`:`nav`}var Ln=`[data-form-action-bar]`,Rn=`(max-width: 48rem)`,zn=`(min-width: 64rem)`;function Bn(){return typeof window>`u`||typeof window.matchMedia!=`function`?`desktop`:window.matchMedia(`(max-width: 48rem)`).matches?`phone`:window.matchMedia(`(min-width: 64rem)`).matches?`desktop`:`tablet`}var Vn=class{config;adapter;#e=A(P({}));get settings(){return e(this.#e)}set settings(e){U(this.#e,e,!0)}revealed=new Set;#t=A(P({top:`collapsed`,left:`collapsed`,right:`collapsed`,bottom:`collapsed`}));get panels(){return e(this.#t)}set panels(e){U(this.#t,e,!0)}#n=A(`desktop`);get viewport(){return e(this.#n)}set viewport(e){U(this.#n,e,!0)}#r=A(P([]));get focusTools(){return e(this.#r)}set focusTools(e){U(this.#r,e,!0)}#i=A(null);get activeFocusToolId(){return e(this.#i)}set activeFocusToolId(e){U(this.#i,e,!0)}#a=A(0);get dockFocusRequest(){return e(this.#a)}set dockFocusRequest(e){U(this.#a,e,!0)}dockReturnFocus=null;#o=A(P([]));get activities(){return e(this.#o)}set activities(e){U(this.#o,e,!0)}#s=A(P({}));get overlayMatches(){return e(this.#s)}set overlayMatches(e){U(this.#s,e,!0)}#c=A(P({}));get layoutPanels(){return e(this.#c)}set layoutPanels(e){U(this.#c,e,!0)}#l=A(P({}));get inlineEdges(){return e(this.#l)}set inlineEdges(e){U(this.#l,e,!0)}#u=A(!1);get hotkeysAvailable(){return e(this.#u)}set hotkeysAvailable(e){U(this.#u,e,!0)}#d=A(P({top:!0,left:!0,right:!0,bottom:!0}));get regionsRendered(){return e(this.#d)}set regionsRendered(e){U(this.#d,e,!0)}activityListeners=new Set;constructor(e={}){this.config=gn(e.config),this.adapter=e.settingsAdapter??(e.storageKey?new En(e.storageKey):null),this.viewport=e.viewport??Bn(),this.layoutPanels={...e.layoutPanels??{}},this.applySettings(e.settings??{},{persist:!1})}async hydrate(){if(!this.adapter)return;let e=await this.adapter.read();e&&this.applySettings(Sn(e,this.config),{persist:!1})}setViewport(e){z(()=>{if(e===this.viewport)return;this.viewport=e;let t=!1,n={...this.settings.panels??{}};for(let r of dn){let i=this.config.panels[r],a=i.viewportDefaults?.[e];a&&i.initial!==`hidden`&&this.layoutPanels[r]?.visible!==!1&&(delete n[r],t=!0,a===`expanded`&&this.closeExclusivePeers(r),this.panels[r]=a)}t&&(this.settings={...this.settings,panels:n}),e===`phone`&&this.inlineEdges.left&&this.panels.left===`expanded`&&(this.panels.left=`collapsed`),this.applyInline()})}phonePresentation(e){return this.config.panels[e].phone??`drawer`}presentationFor(e){let t=this.config.panels[e];return this.isInline(e)?t.presentation:(e===`left`||e===`right`)&&this.viewport!==`phone`&&t.overlayMedia&&this.overlayMatches[e]?`overlay`:t.presentation}closeOverlaidEdges(){z(()=>{for(let e of[`left`,`right`])this.panels[e]===`expanded`&&this.presentationFor(e)===`overlay`&&(this.panels[e]=`collapsed`)})}isInline(e){return e===`right`||!this.inlineEdges[e]?!1:e!==`left`||this.viewport!==`phone`}setInlineEdges(e){z(()=>{dn.every(t=>!!this.inlineEdges[t]==!!e[t])||(this.inlineEdges={...e},this.applyInline())})}applyInline(){this.isInline(`left`)&&this.panels.left===`collapsed`&&(this.panels.left=`expanded`);for(let e of[`top`,`bottom`])this.isInline(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)}setOverlayMatch(e,t){z(()=>{!!this.overlayMatches[e]!==t&&(this.overlayMatches={...this.overlayMatches,[e]:t})})}isEdgeShown(e){return this.panels[e]===`hidden`?!1:this.viewport!==`phone`||this.phonePresentation(e)!==`hidden`}isRegionVisible(e){switch(e){case`header`:return this.panels.top!==`hidden`;case`footer`:return this.panels.bottom!==`hidden`;case`leftSidebar`:return this.isEdgeShown(`left`)&&this.panels.left===`expanded`;case`rightSidebar`:return this.isEdgeShown(`right`)&&this.panels.right===`expanded`}}resizeLimits(e){return yn(e,this.config.panels[e])}panelSize(e){if(!this.resizeLimits(e))return null;let t=this.settings.sizes?.[e];return typeof t==`number`&&Number.isFinite(t)?t:null}setPanelSize(e,t,n={}){z(()=>{let r=this.resizeLimits(e);if(!r)return;let i=t===null||!Number.isFinite(t)?null:bn(t,r);this.settings=wn(this.settings,{sizes:{[e]:i}}),n.persist!==!1&&this.persistSettings()})}snapshot(){return{panels:{...this.panels},viewport:this.viewport,activeFocusToolId:this.activeFocusToolId,settings:{...this.settings,keymap:this.settings.keymap?{...this.settings.keymap}:void 0,panels:this.settings.panels?{...this.settings.panels}:void 0,sizes:this.settings.sizes?{...this.settings.sizes}:void 0}}}applySettings(e,t={}){let n=Kn(e),r=t.persist;z(()=>{this.settings=wn(this.settings,n);for(let e of dn)this.revealed.delete(e),this.panels[e]=_n(e,this.config.panels[e],this.settings,this.viewport,this.layoutPanels[e]);this.applyInline(),this.activeFocusToolId=this.settings.activeFocusToolId??this.activeFocusToolId,r!==!1&&this.persistSettings()})}setLayoutPanels(e={}){z(()=>{let t=this.layoutPanels;this.layoutPanels={...e};for(let n of dn){let r=t[n],i=e[n];if(r?.visible===i?.visible&&r?.initial===i?.initial)continue;let a=this.config.panels[n];a.initial!==`hidden`&&(this.revealed.delete(n),this.panels[n]=_n(n,a,this.settings,this.viewport,i),this.panels[n]===`expanded`&&this.closeExclusivePeers(n))}this.applyInline()})}setPanelStart(e,t){z(()=>{let n=this.config.panels[e];if(!(n.initial===`hidden`||n.viewportDefaults||this.layoutPanels[e]?.visible===!1)){if(this.settings.panels&&e in this.settings.panels){let{[e]:t,...n}=this.settings.panels;this.settings={...this.settings,panels:n}}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.applyInline(),this.persistSettings()}})}setLayout(e){z(()=>{let{layout:t,...n}=this.settings;this.settings=e&&!Ot(e)?{...n,layout:e}:n,this.persistSettings()})}setHotkeysEnabled(e){z(()=>this.applySettings({hotkeysEnabled:e}))}setHotkey(e,t){z(()=>{this.applySettings({keymap:{[e]:t?{code:t}:null}})})}setPanel(e,t){this.setPanelState(e,t)}setPanelState(e,t){dn.includes(e)&&[`hidden`,`collapsed`,`expanded`].includes(t)&&z(()=>{if(this.config.panels[e].initial===`hidden`||this.layoutPanels[e]?.visible===!1)this.panels[e]=`hidden`;else{if(this.isInline(e)){let n=e===`left`;n&&t===`collapsed`&&(t=`expanded`),!n&&t===`expanded`&&(t=`collapsed`)}t===`expanded`&&this.closeExclusivePeers(e),this.revealed.delete(e),this.panels[e]=t,this.settings=wn(this.settings,{panels:{[e]:t}}),this.persistSettings()}})}revealPanelTemporarily(e){return z(()=>!this.isEdgeShown(e)||this.panels[e]!==`collapsed`?!1:(this.panels[e]=`expanded`,this.revealed.add(e),!0))}endTemporaryReveal(e){z(()=>{this.revealed.delete(e)&&this.panels[e]===`expanded`&&(this.panels[e]=`collapsed`)})}togglePanel(e){z(()=>{this.panels[e]!==`hidden`&&this.setPanel(e,this.panels[e]===`expanded`?`collapsed`:`expanded`)})}expandPanel(e){z(()=>this.setPanel(e,`expanded`))}collapsePanel(e){z(()=>this.setPanel(e,`collapsed`))}closeTopmostExpanded(){return z(()=>{for(let e of[...dn].reverse())if(!this.isInline(e)&&this.panels[e]===`expanded`&&this.isEdgeShown(e))return this.collapsePanel(e),!0;return!1})}registerFocusTool(e){let t=Jn(e);return z(()=>(this.focusTools=[...this.focusTools.filter(e=>e.id!==t.id),t].sort((e,t)=>(e.order??0)-(t.order??0)),this.activeFocusToolId||=t.id,()=>this.unregisterFocusTool(t.id)))}unregisterFocusTool(e){z(()=>{this.focusTools=this.focusTools.filter(t=>t.id!==e),this.activeFocusToolId===e&&(this.activeFocusToolId=this.focusTools[0]?.id??null)})}openFocusTool(e){z(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId=e,this.settings=wn(this.settings,{activeFocusToolId:e}),this.expandPanel(`right`),this.persistSettings())})}toggleFocusTool(e){z(()=>{this.focusTools.some(t=>t.id===e)&&(this.activeFocusToolId===e&&this.panels.right===`expanded`?this.collapsePanel(`right`):this.openFocusTool(e))})}get openFocusToolId(){return this.panels.right===`expanded`&&this.isEdgeShown(`right`)?this.activeFocusToolId:null}get dockAvailable(){return this.config.panels.right.initial!==`hidden`&&this.layoutPanels.right?.visible!==!1&&(this.viewport!==`phone`||this.phonePresentation(`right`)!==`hidden`)}closeFocusTool(){this.collapsePanel(`right`)}openDockTool(e,t={}){return z(()=>{if(!this.focusTools.some(t=>t.id===e)||!this.dockAvailable)return!1;if(this.openFocusTool(e),t.focus===!1)return!0;let n=typeof document>`u`?null:document.activeElement;return this.dockReturnFocus=t.returnFocus??(n instanceof HTMLElement&&n!==document.body?n:null),this.dockFocusRequest+=1,!0})}toggleDockTool(e,t={}){return z(()=>!this.focusTools.some(t=>t.id===e)||!this.dockAvailable?!1:this.openFocusToolId===e?(this.closeFocusTool(),!0):this.openDockTool(e,t))}upsertActivity(e){let t=Yn(e);z(()=>{let e=new Date().toISOString(),n={...t,edge:t.edge??this.homeEdgeForScope(t.scope),createdAt:t.createdAt??e,updatedAt:t.updatedAt??e},r=this.activities.find(e=>e.id===t.id);this.activities=[...this.activities.filter(e=>e.id!==t.id),n],this.emitActivity({type:r&&r.status!==n.status?`transition`:`upsert`,activity:n,previous:r})})}updateActivity(e,t){let n=Xn(t);z(()=>{let t=this.activities.find(t=>t.id===e);t&&this.upsertActivity({...t,...n,id:e,updatedAt:new Date().toISOString()})})}removeActivity(e){z(()=>{let t=this.activities.find(t=>t.id===e);t&&(this.activities=this.activities.filter(t=>t.id!==e),this.emitActivity({type:`remove`,activity:t}))})}watchActivities(e){return this.activityListeners.add(e),()=>this.activityListeners.delete(e)}listActivities(e={}){return this.activities.map(e=>({...e,edge:e.edge??this.homeEdgeForScope(e.scope)})).filter(t=>Un(t,e))}activityBadge(e){let t=this.listActivities({edge:e}).filter(e=>Gn(e.status)),n=t.map(e=>e.progress).filter(e=>typeof e==`number`);return{count:t.length,running:t.filter(e=>e.status===`running`).length,hasFailed:this.listActivities({edge:e}).some(e=>e.status===`failed`),progress:n.length===0?null:n.reduce((e,t)=>e+t,0)/n.length}}homeEdgeForScope(e){let t=pn[e];return this.panels[t]===`hidden`?this.panels.bottom===`hidden`?dn.find(e=>this.panels[e]!==`hidden`)??t:`bottom`:t}closeExclusivePeers(e){if(this.viewport===`phone`&&(e===`left`||e===`right`)){let t=e===`left`?`right`:`left`;this.panels[t]===`expanded`&&this.isEdgeShown(t)&&(this.panels[t]=`collapsed`)}let t=this.config.panels[e].exclusiveGroup;if(t)for(let n of dn)n!==e&&this.config.panels[n].exclusiveGroup===t&&this.panels[n]===`expanded`&&(this.panels[n]=`collapsed`,this.settings=wn(this.settings,{panels:{[n]:`collapsed`}}))}async persistSettings(){this.adapter&&await this.adapter.write(Sn(this.settings,this.config))}emitActivity(e){for(let t of this.activityListeners)t(e)}};function Hn(e={}){return new Vn(e)}function Un(e,t){return t.edge&&e.edge!==t.edge||t.scope&&e.scope!==t.scope||t.kind&&!Wn(e.kind,t.kind)||t.status&&!Wn(e.status,t.status)?!1:!t.subject||e.subject?.type===t.subject.type&&e.subject.id===t.subject.id}function Wn(e,t){return Array.isArray(t)?t.includes(e):e===t}function Gn(e){return e===`queued`||e===`running`}function Kn(e){let t={...e};return`keymap`in e&&(t.keymap=qn(e.keymap)),`panels`in e&&(t.panels=e.panels?{...e.panels}:e.panels),`sizes`in e&&(t.sizes=e.sizes?{...e.sizes}:e.sizes),t}function qn(e){if(!e)return e;let t={};for(let n of dn)if(n in e){let r=e[n];t[n]=r&&{...r}}return t}function Jn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),`activityKinds`in e&&(t.activityKinds=e.activityKinds?[...e.activityKinds]:e.activityKinds),t}function Yn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Xn(e){let t={...e};return`subject`in e&&(t.subject=e.subject?{...e.subject}:e.subject),t}function Zn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(Rn),n=window.matchMedia(zn),r=()=>e.setViewport(Nn({phone:t.matches,desktop:n.matches}));return r(),t.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{t.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}}function Qn(e){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=[];for(let n of[`left`,`right`]){let r=e.config.panels[n].overlayMedia;if(!r)continue;let i=window.matchMedia(r),a=()=>e.setOverlayMatch(n,i.matches);a(),i.addEventListener(`change`,a),t.push(()=>i.removeEventListener(`change`,a))}return()=>{for(let e of t)e()}}function $n(e,t){let n=new Pn(t.tuning),r=0,i=!1;function a(){r=0;let a=n.update({y:e.scrollTop,maxY:e.scrollHeight-e.clientHeight,pinned:t.isPinned()});a!==i&&(i=a,t.onChange(a))}function o(){r||=requestAnimationFrame(a)}return e.addEventListener(`scroll`,o,{passive:!0}),{recheck:a,reset(){n.reset(),i&&(i=!1,t.onChange(!1))},destroy(){r&&cancelAnimationFrame(r),e.removeEventListener(`scroll`,o)}}}function er(e){if(typeof window>`u`||!window.visualViewport)return()=>{};let t=window.visualViewport,n=!1;function r(){let r=Fn({layoutHeight:window.innerHeight,visualHeight:t.height,scale:t.scale});if(r===n)return;n=r,n?document.documentElement.dataset.keyboardOpen=``:delete document.documentElement.dataset.keyboardOpen,e(n);let i=document.activeElement;n&&i instanceof HTMLElement&&jn(i)&&i.scrollIntoView({block:`center`})}return t.addEventListener(`resize`,r),()=>{t.removeEventListener(`resize`,r),delete document.documentElement.dataset.keyboardOpen}}function tr(e,t){let n=!!e.querySelector(Ln);if(t(n),typeof MutationObserver>`u`)return()=>{};let r=new MutationObserver(()=>{let r=!!e.querySelector(Ln);r!==n&&(n=r,t(n))});return r.observe(e,{childList:!0,subtree:!0}),()=>r.disconnect()}function nr(e,t){let n=e.panelSize(t);return n===null?e.config.panels[t].expandedSize:`${n}px`}function rr(e,t){let n=e.panels[t];return n===`hidden`?`0rem`:n===`collapsed`||e.presentationFor(t)===`overlay`?ir(e,t):nr(e,t)}function ir(e,t){if(e.panels[t]===`hidden`)return`0rem`;let n=e.config.panels[t];return n.rail===!1?`0rem`:n.collapsedSize}function ar(e){return[`--smrt-admin-shell-left-track: ${rr(e,`left`)}`,`--smrt-admin-shell-right-track: ${rr(e,`right`)}`,`--smrt-admin-shell-top-track: ${rr(e,`top`)}`,`--smrt-admin-shell-bottom-track: ${rr(e,`bottom`)}`,`--smrt-admin-shell-left-collapsed: ${ir(e,`left`)}`,`--smrt-admin-shell-right-collapsed: ${ir(e,`right`)}`,`--smrt-admin-shell-left-expanded: ${nr(e,`left`)}`,`--smrt-admin-shell-right-expanded: ${nr(e,`right`)}`,`--smrt-admin-shell-top-expanded: ${nr(e,`top`)}`,`--smrt-admin-shell-bottom-expanded: ${nr(e,`bottom`)}`].join(`; `)}var or=f(`<svg class="smrt-admin-shell__edge-toggle-chevron" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg><!>`,1),sr=c(`<kbd class="smrt-admin-shell__edge-toggle-kbd svelte-1ifuk0b"> </kbd>`),cr=c(`<span class="svelte-1ifuk0b"> </span> <!> <!>`,1),lr=c(`<div class="smrt-admin-shell__tenant-utilities svelte-1ifuk0b" data-smrt-part="utilities"><!> <!></div>`),ur=c(`<button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-left-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),dr=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__tools-opener svelte-1ifuk0b" data-smrt-part="trigger" aria-controls="smrt-admin-shell-right-panel"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),fr=c(`<div role="separator" aria-orientation="vertical" tabindex="0"></div>`),pr=c(`<p class="smrt-admin-shell__empty svelte-1ifuk0b"> </p>`),mr=c(`<div><!></div>`),hr=c(`<div></div>`),gr=c(`<div class="smrt-admin-shell__region-edit svelte-1ifuk0b"><!></div>`),_r=c(`<div id="smrt-admin-shell-header" class="smrt-admin-shell__header svelte-1ifuk0b" data-testid="admin-shell-header"><!></div>`),vr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-left svelte-1ifuk0b"><!></div>`),yr=c(`<!> <!>`,1),br=c(`<div class="smrt-admin-shell__account svelte-1ifuk0b"><!></div>`),xr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--top-right svelte-1ifuk0b"><!></div>`),Sr=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--top svelte-1ifuk0b"><!></section>`),Cr=c(`<header id="smrt-admin-shell-top-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--top svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--top svelte-1ifuk0b"><!> <!> <!> <!> <!> <!> <!> <!></div> <!> <!></header>`),wr=c(`<div class="smrt-admin-shell__drawer-head svelte-1ifuk0b" data-smrt-part="header"><div class="smrt-admin-shell__drawer-title svelte-1ifuk0b"><!></div> <button type="button" class="smrt-admin-shell__chrome-button svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button></div>`),Tr=c(`<div class="smrt-admin-shell__tenant-footer svelte-1ifuk0b"><!></div>`),Er=c(`<div class="smrt-admin-shell__tenant-stack svelte-1ifuk0b"><!> <div class="smrt-admin-shell__tenant-content svelte-1ifuk0b"><!></div> <!> <!> <!></div>`),Dr=c(`<div class="smrt-admin-shell__tenant-rail-footer svelte-1ifuk0b"><!></div>`),Or=c(`<div class="smrt-admin-shell__tenant-rail-stack svelte-1ifuk0b"><div class="smrt-admin-shell__tenant-rail-content svelte-1ifuk0b"><!></div> <!> <!></div>`),kr=c(`<aside id="smrt-admin-shell-left-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--left svelte-1ifuk0b"><!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!> <!> <!></div></aside>`),Ar=c(`<span class="smrt-admin-shell__phone-default-end svelte-1ifuk0b"><!></span>`),jr=c(`<div class="smrt-admin-shell__phone-default-top svelte-1ifuk0b"><!> <!></div>`),Mr=c(`<div class="smrt-admin-shell__phone-top svelte-1ifuk0b" data-testid="admin-shell-phone-top"><!></div>`),Nr=c(`<button type="button" class="smrt-admin-shell__scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-scrim"></button>`),Pr=c(`<button type="button" class="smrt-admin-shell__overlay-scrim svelte-1ifuk0b" tabindex="-1" data-testid="admin-shell-overlay-scrim"></button>`),Fr=c(`<div class="smrt-admin-shell__sheet-grabber svelte-1ifuk0b" aria-hidden="true"><span class="svelte-1ifuk0b"></span></div>`),Ir=c(`<button type="button" class="smrt-admin-shell__chrome-button smrt-admin-shell__rail-close svelte-1ifuk0b" data-smrt-part="close"><svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></button>`),Lr=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),Rr=c(`<span class="smrt-admin-shell__focus-tool-badge svelte-1ifuk0b"> </span>`),zr=c(`<button type="button"><!> <!></button>`),Br=c(`<nav class="smrt-admin-shell__focus-rail svelte-1ifuk0b"></nav>`),Vr=c(`<div class="smrt-admin-shell__panel smrt-admin-shell__panel--right svelte-1ifuk0b" tabindex="-1"><!> <!> <!></div>`),Hr=c(`<aside id="smrt-admin-shell-right-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--right svelte-1ifuk0b"><!> <!> <div class="smrt-admin-shell__rail svelte-1ifuk0b"><!> <!> <!></div> <!></aside>`),Ur=c(`<button type="button" class="smrt-admin-shell__edit-indicator svelte-1ifuk0b" data-edit-indicator="right" aria-expanded="false" aria-controls="smrt-admin-shell-right-panel"><!> <span class="smrt-admin-shell__edit-indicator-label"> </span></button>`),Wr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-left svelte-1ifuk0b"><!></div>`),Gr=c(`<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-right svelte-1ifuk0b"><!></div>`),Kr=c(`<section class="smrt-admin-shell__drawer smrt-admin-shell__drawer--bottom svelte-1ifuk0b"><!></section>`),qr=c(`<footer id="smrt-admin-shell-bottom-panel" class="smrt-admin-shell__edge smrt-admin-shell__edge--bottom svelte-1ifuk0b"><!> <div class="smrt-admin-shell__band smrt-admin-shell__band--bottom svelte-1ifuk0b"><!> <!> <!> <!> <!> <!></div> <!> <!></footer>`),Jr=c(`<div class="smrt-admin-shell__overlays svelte-1ifuk0b"><!></div>`),Yr=c(`<div class="smrt-admin-shell__phone-bar svelte-1ifuk0b" data-testid="admin-shell-phone-bar"><!></div>`),Xr=c(`<div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b"> </dd></div>`),Zr=c(`<header class="svelte-1ifuk0b"><h2 class="svelte-1ifuk0b"> </h2> <!></header> <dl class="svelte-1ifuk0b"><!> <div class="svelte-1ifuk0b"><dt> </dt> <dd class="svelte-1ifuk0b">?</dd></div></dl>`,1),Qr=c(`<div class="smrt-admin-shell__shortcuts svelte-1ifuk0b" role="dialog" aria-modal="true" tabindex="-1"><div class="smrt-admin-shell__shortcuts-panel svelte-1ifuk0b"><!></div></div>`),$r=c(`<div class="smrt-admin-shell svelte-1ifuk0b" data-smrt-component="AdminShell"><!> <!> <!> <!> <!> <main id="smrt-admin-shell-main" class="smrt-admin-shell__main svelte-1ifuk0b"><!></main> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div>`);function ei(a,c){_(c,!0);let f=(r,i=m)=>{var a=T(),o=B(a),s=t=>{let r=n(Gt);{let i=n(()=>$t(`left`)?`${e(r)} (${Jt(`left`)})`:e(r)),a=n(()=>$(`left`));me(t,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle smrt-admin-shell__edge-toggle--left`,get"aria-label"(){return e(r)},get title(){return e(i)},get"aria-expanded"(){return e(a)},"aria-controls":`smrt-admin-shell-left-panel`,onclick:()=>q.togglePanel(`left`),children:(e,t)=>{var n=or(),r=B(n),i=L(r);Ue(F(r),{edge:`left`}),V(()=>H(i,`d`,ye.chevronRight)),C(e,n)},$$slots:{default:!0}})}},c=r=>{{let a=n(()=>$(i())),o=n(()=>`smrt-admin-shell-${i()}-panel`);me(r,{variant:`ghost`,size:`sm`,class:`smrt-admin-shell__edge-toggle`,get"aria-expanded"(){return e(a)},get"aria-controls"(){return e(o)},onclick:()=>q.togglePanel(i()),children:(r,a)=>{var o=cr(),s=B(o),c=L(s,!0),u=F(s,2),d=e=>{var t=sr(),n=L(t,!0);V(e=>l(n,e),[()=>Jt(i())]),C(e,t)},f=n(()=>$t(i()));t(u,t=>{e(f)&&t(d)}),Ue(F(u,2),{get edge(){return i()}}),V(e=>l(c,e),[()=>Wt(i())]),C(r,o)},$$slots:{default:!0}})}};t(o,e=>{i()===`left`?e(s):e(c,-1)}),C(r,a)},h=r=>{var i=lr(),a=N(i),l=e=>{var t=T(),n=B(t);o(n,()=>c.tenantUtilities),C(e,t)};t(a,e=>{c.tenantUtilities&&e(l)});var u=F(a,2),d=e=>{f(e,()=>`left`)},p=n(()=>Xt(`left`));t(u,t=>{e(p)&&t(d)}),s(i),C(r,i)},g=e=>{var t=ur(),n=N(t),r=L(n);s(t),V((e,n,i)=>{H(t,`aria-label`,e),H(t,`title`,n),H(t,`aria-expanded`,i),H(r,`d`,ye.menu)},[()=>K(Z[`ui.admin_shell.menu`]),()=>K(Z[`ui.admin_shell.menu`]),()=>$(`left`)]),E(`click`,t,Kt),C(e,t)},w=e=>{var t=dr(),n=N(t),r=L(n);s(t),V((e,n,i)=>{H(t,`aria-label`,e),H(t,`title`,n),H(t,`aria-expanded`,i),H(r,`d`,ye[be])},[()=>K(Z[`ui.admin_shell.tools`]),()=>K(Z[`ui.admin_shell.tools`]),()=>$(`right`)]),E(`click`,t,qt),C(e,t)},D=(r,a=m)=>{var o=T(),s=B(o),c=t=>{let r=n(()=>q.resizeLimits(a()));var o=fr();V((t,n)=>{i(o,1,`smrt-admin-shell__resizer smrt-admin-shell__resizer--${a()??``}`,`svelte-1ifuk0b`),H(o,`aria-controls`,`smrt-admin-shell-${a()}-panel`),H(o,`aria-label`,t),H(o,`aria-valuemin`,e(r)?.min),H(o,`aria-valuemax`,e(r)?.max),H(o,`aria-valuenow`,n),H(o,`data-testid`,`admin-shell-resizer-${a()}`)},[()=>K(Z[`ui.admin_shell.resize_panel`],{label:Wt(a())}),()=>pt(a())]),E(`pointerdown`,o,e=>bt(e,a())),E(`keydown`,o,e=>_t(e,a())),E(`dblclick`,o,()=>q.setPanelSize(a(),null)),C(t,o)},l=n(()=>ht(a()));t(s,t=>{e(l)&&t(c)}),C(r,o)},ee=(r,i=m)=>{var a=T(),s=B(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.focusPanel,()=>({tool:i()})),C(e,t)},d=e=>{var t=T(),n=B(t);o(n,()=>i().render,()=>({tool:i()})),C(e,t)},f=t=>{let r=n(()=>i().component);var a=T(),o=B(a);v(o,()=>e(r),(e,t)=>{t(e,{get tool(){return i()},get shell(){return q}})}),C(t,a)},p=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_focus_tools`])]),C(e,t)};t(s,e=>{c.focusPanel?e(u):i()?.render?e(d,1):i()?.component?e(f,2):e(p,-1)}),C(r,a)},te=(t,n)=>{let r=x(()=>u(n?.(),!1));mt(t,{get title(){return oe()},get subtitle(){return ue()},get homeHref(){return c.homeHref},get logoSrc(){return c.logoSrc},get logoAlt(){return le()},get brand(){return c.brand},get compact(){return e(r)}})},R=(r,a=m)=>{var l=T(),u=B(l),d=r=>{var l=T(),u=B(l),d=e=>{var t=mr(),n=N(t);o(n,()=>c.layoutEdit.zone,a),s(t),V(e=>{i(t,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``} smrt-admin-shell__slot--editing`,`svelte-1ifuk0b`),H(t,`data-slot`,a()),H(t,`data-smrt-edit-zone`,a()),H(t,`data-drop-target`,c.layoutEdit.highlight===a()?``:void 0)},[()=>a().replace(`.`,`-`)]),C(e,t)},f=n(()=>St(gt(a())));t(u,t=>{e(f)&&t(d)}),C(r,l)},f=t=>{var n=hr();p(n,21,()=>e(wt)[a()]??[],b,(t,n)=>{var r=T(),i=B(r);o(i,()=>e(n)),C(t,r)}),s(n),V(e=>{i(n,1,`smrt-admin-shell__slot smrt-admin-shell__slot--${e??``}`,`svelte-1ifuk0b`),H(n,`data-slot`,a())},[()=>a().replace(`.`,`-`)]),C(t,n)};t(u,t=>{c.layoutEdit?.active?t(d):e(wt)[a()]?.length&&t(f,1)}),C(r,l)},ne=(r,i=m)=>{var a=T(),l=B(a),u=e=>{var t=gr(),n=N(t);o(n,()=>c.layoutEdit.regionControl,i),s(t),V(()=>H(t,`data-region-edit`,i())),C(e,t)},d=n(()=>c.layoutEdit?.active&&c.layoutEdit.regionControl&&Ct(i()));t(l,t=>{e(d)&&t(u)}),C(r,a)},W=(r,a=m)=>{var l=T(),u=B(l),d=e=>{var t=mr(),n=N(t);o(n,()=>c.layoutEdit?.strip??m,a),s(t),V(()=>{i(t,1,`smrt-admin-shell__strip smrt-admin-shell__strip--${a()??``}`,`svelte-1ifuk0b`),H(t,`data-region-strip`,a())}),C(e,t)},f=n(()=>e(Et).includes(a()));t(u,t=>{e(f)&&t(d)}),C(r,l)},oe=k(c,`title`,3,`SMRT`),se=k(c,`edgeToggles`,3,!1),ce=k(c,`brandInSlot`,3,!1),le=k(c,`logoAlt`,3,``),ue=k(c,`subtitle`,3,``),fe=k(c,`storageKey`,3,`smrt-admin-shell`),pe=k(c,`rootElement`,15),he=k(c,`phoneDockOpener`,3,!0),ge=k(c,`pinChrome`,3,!1),{t:K}=de(),q=z(()=>c.state??Hn({config:c.config,settings:c.settings,settingsAdapter:c.settingsAdapter,storageKey:fe()}));Be(q);let _e=A(!1);function xe(){return q.focusTools.find(e=>e.id===q.activeFocusToolId)??q.focusTools[0]??null}let Se=[`top`,`left`,`bottom`,`right`],Ce=[`left`,`right`],we=A(void 0),Te=A(!1),Ee=A(!1),De=A(!1),Oe=A(null),ke=A(!1),Ae=P({}),je=null,J=n(()=>q.viewport),Y=n(()=>e(J)===`phone`),Me=n(()=>q.viewport===`phone`);j(()=>{let t=Ae.left;if(!e(Me)||!$(`left`)||!t)return;let n=document.activeElement instanceof HTMLElement?document.activeElement:null,r=!1;return ie().then(async()=>{let n=t.getAnimations?.({subtree:!0})??[];await Promise.all(n.filter(e=>e.playState!==`paused`&&Number.isFinite(e.effect?.getComputedTiming().endTime??0)).map(e=>e.finished.catch(()=>{}))),!r&&e(Me)&&$(`left`)&&t.isConnected&&t.querySelector(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)?.focus()}),()=>{r=!0,queueMicrotask(()=>{n?.isConnected&&n.focus()})}});let X=n(()=>c.phone?.scrim!==!1),Ne=n(()=>c.phone?.swipeToClose!==!1),Pe=n(()=>e(Y)&&he()&&q.isEdgeShown(`right`)&&(q.focusTools.length>0||!!c.focusRail)),Fe=n(()=>e(Y)&&q.isEdgeShown(`left`)&&q.phonePresentation(`left`)!==`hidden`),Ie=n(()=>!!c.header&&!(e(Y)&&c.phoneTopBar)),Le=n(()=>e(Y)&&c.phoneBottomBar?In({formActions:e(Ee),keyboardOpen:e(Te)}):`none`),Re=n(()=>e(Y)&&Ce.some(e=>Rt(e)===`expanded`&&q.isEdgeShown(e))),ze=!1;j(()=>{let e=!!c.layoutEdit?.active;z(()=>{e&&!ze&&q.viewport===`phone`&&lt(),ze=e})});let Ve=n(()=>[`--smrt-shell-floating-reserve-inline: ${c.floatingReserve?.inline??`0px`}`,`--smrt-shell-floating-reserve-block: ${c.floatingReserve?.block??`0px`}`,`--smrt-shell-floating-reserve-main: ${c.floatingReserve?.main??`0px`}`].join(`; `)),He=n(()=>[`--smrt-admin-shell-header-track: ${e(Ie)?`var(--smrt-admin-shell-header-size)`:`0rem`}`,`--smrt-admin-shell-phone-bar-track: ${e(Le)===`nav`?`var(--smrt-admin-shell-phone-bar-size)`:`0rem`}`].join(`; `));function Ke(t){let n=pe();if(!n||!(t.target instanceof Node)||!n.contains(t.target))return;let r=t.detail??{},i=Ae.right,a=$(`right`)&&(e(Y)||q.presentationFor(`right`)===`overlay`);i?.contains(t.target)&&a&&q.config.panels.right.closeOnNavigate!==!1&&(q.dockReturnFocus=null,Xe=null,q.collapsePanel(`right`));let o=n.querySelector(`.smrt-admin-shell__main`)??n;qe?.(),qe=ot(o,r.focus??`h1, h2`,3e3,{skipExisting:!r.focus})}let qe=null;j(()=>{if(typeof document<`u`)return document.addEventListener(it,Ke),()=>{document.removeEventListener(it,Ke),qe?.()}});async function Je(e){let t=pe(),n=e.target;if(e.defaultPrevented||!t||!(n instanceof Element)||Ae.right?.contains(n)||!q.dockAvailable)return;let r=q.focusTools,i=r.find(e=>e.id===`assistant`)??r.find(e=>e.id===q.activeFocusToolId)??r[0];if(!i&&!c.focusPanel)return;let a=e.detail;if(typeof a?.prompt!=`string`)return;e.preventDefault(),e.stopPropagation();let o=n instanceof HTMLElement?n:null;i?q.openDockTool(i.id,{focus:!1,returnFocus:o}):(q.expandPanel(`right`),q.dockReturnFocus=o),await ie(),await new Promise(e=>setTimeout(e,0));let s=Ae.right;s?.isConnected&&Ge(s,{prompt:a.prompt})}j(()=>{let e=pe();if(!e)return;let t=e=>void Je(e);return e.addEventListener(We,t),()=>e.removeEventListener(We,t)});let Ye=n(()=>e(Y)?null:Ce.find(e=>Rt(e)===`expanded`&&q.isEdgeShown(e)&&q.presentationFor(e)===`overlay`)??null),Xe=null,Ze=null,Qe=A(null),$e=null;function et(){$e&&clearTimeout($e),$e=null,U(Qe,null)}function tt(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function nt(t){return $(t)||e(Qe)===t}j(()=>{let t=e(Ye);z(()=>{if(t===Ze)return;let n=Ze;if(Ze=t,typeof document>`u`)return;if(t){et();let e=document.activeElement;Xe=e instanceof HTMLElement&&e!==document.body?e:null;let n=Ae[t];n&&!n.contains(document.activeElement)&&n.focus({preventScroll:!0});return}let r=n?Ae[n]:void 0,i=document.activeElement;(!i||i===document.body||r?.contains(i))&&Xe?.isConnected&&Xe.focus({preventScroll:!0}),Xe=null,n&&Rt(n)!==`expanded`&&q.presentationFor(n)===`overlay`&&!e(Y)&&!tt()&&(et(),U(Qe,n,!0),$e=setTimeout(et,600))})});let rt=0;j(()=>{let e=q.dockFocusRequest;z(()=>{e!==rt&&(rt=e,ie().then(at))})});function at(){let e=Ae.right?.querySelector(`.smrt-admin-shell__panel--right`);e&&!e.hidden&&$(`right`)&&(e.contains(document.activeElement)||(e.querySelector(`a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])`)??e).focus({preventScroll:!0}))}let st=!1;j(()=>{let e=$(`right`);z(()=>{let t=st;if(st=e,!t||e)return;let n=q.dockReturnFocus;if(q.dockReturnFocus=null,!n?.isConnected||typeof document>`u`)return;let r=document.activeElement;(!r||r===document.body||Ae.right?.contains(r))&&n.focus({preventScroll:!0})})});function ct(t,n){e(Qe)===n&&t.target===t.currentTarget&&et()}function lt(){for(let e of Ce)Rt(e)===`expanded`&&q.isEdgeShown(e)&&q.collapsePanel(e)}re(()=>{let t=Zn(q),n=Qn(q),r=q.hydrate().then(()=>q.closeOverlaidEdges()),i=!1,a=0,o=null,s=null;function l(){let e=pe();if(!e||typeof MutationObserver>`u`)return;let t=e.closest(`[data-color-scheme]`)??document.documentElement;o=new MutationObserver(()=>{tt()||(e.setAttribute(`data-smrt-theme-changing`,``),s&&clearTimeout(s),s=setTimeout(()=>e.removeAttribute(`data-smrt-theme-changing`),ve(`--smrt-duration-medium1`,e)+100))}),o.observe(t,{attributes:!0,attributeFilter:[`data-color-scheme`,`class`]})}r.then(()=>{a=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{i||(U(ke,!0),l())})})});let u=c.phoneBottomBar?er(e=>U(Te,e,!0)):()=>{},d=c.phoneBottomBar&&e(we)?tr(e(we),e=>U(Ee,e,!0)):()=>{};je=c.phoneTopBar&&c.phone?.hideOnScroll!==!1&&e(we)?$n(e(we),{onChange:e=>U(De,e,!0),isPinned:()=>ge()||e(Re)||q.viewport!==`phone`}):null;function f(t){if(t.key===`Escape`){if(e(_e)){U(_e,!1),t.preventDefault();return}if(c.layoutEdit?.active)return;q.closeTopmostExpanded()&&t.preventDefault();return}let n=Dn(t,q.config.panels,q.settings);if(n){if(n.type===`show-shortcuts`){if(!Se.some(Qt))return;t.preventDefault(),U(_e,!0)}else{if(!Qt(n.edge))return;t.preventDefault(),q.togglePanel(n.edge)}}}return window.addEventListener(`keydown`,f),()=>{window.removeEventListener(`keydown`,f),i=!0,cancelAnimationFrame(a),o?.disconnect(),s&&clearTimeout(s),t(),n(),$e&&clearTimeout($e),u(),d(),je?.destroy(),je=null}}),j(()=>{(ge()||e(Re)||!e(Y))&&U(De,!1)});let ut;j(()=>{let e=c.path;z(()=>{ut!==void 0&&e!==ut&&(q.viewport===`phone`&&lt(),je?.reset(),U(De,!1)),ut=e})});function dt(){if(typeof window>`u`)return 16;let e=Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize);return Number.isFinite(e)&&e>0?e:16}function ft(e){let t=/^\s*(-?\d*\.?\d+)(px|rem|em)?\s*$/.exec(e);if(!t)return null;let n=Number.parseFloat(t[1]);return t[2]===`rem`||t[2]===`em`?n*dt():n}function pt(e){let t=q.resizeLimits(e),n=q.panelSize(e);if(n!==null)return n;let r=ft(q.config.panels[e].expandedSize)??Ae[e]?.getBoundingClientRect().width??0;return t?bn(r,t):Math.round(r)}function ht(t){return!e(Y)&&$(t)&&q.presentationFor(t)===`push`&&q.resizeLimits(t)!==null}function _t(e,t){let n=q.resizeLimits(t);if(!n)return;let r=n.step*(e.shiftKey?4:1),i=t===`left`?`ArrowRight`:`ArrowLeft`,a=t===`left`?`ArrowLeft`:`ArrowRight`,o;if(e.key===i)o=pt(t)+r;else if(e.key===a)o=pt(t)-r;else if(e.key===`Home`)o=n.min;else if(e.key===`End`)o=n.max;else if(e.key===`Enter`)o=null;else return;e.preventDefault(),q.setPanelSize(t,o)}let yt=null;j(()=>()=>yt?.(!1));function bt(e,t){if(e.button!==0||!q.resizeLimits(t))return;e.preventDefault(),yt?.(!0);let n=e.currentTarget,r=e.pointerId;r!==void 0&&n.setPointerCapture?.(r);let i=e.clientX,a=pt(t),o=a;U(Oe,t,!0);function s(e){let n=e.clientX-i;o=a+(t===`left`?n:-n),q.setPanelSize(t,o,{persist:!1})}function c(e){yt===c&&(yt=null,n.removeEventListener(`pointermove`,s),n.removeEventListener(`pointerup`,l),n.removeEventListener(`pointercancel`,l),n.removeEventListener(`lostpointercapture`,l),r!==void 0&&n.hasPointerCapture?.(r)&&n.releasePointerCapture(r),U(Oe,null),e&&o!==a&&q.setPanelSize(t,o))}function l(){c(!0)}yt=c,n.addEventListener(`pointermove`,s),n.addEventListener(`pointerup`,l),n.addEventListener(`pointercancel`,l),n.addEventListener(`lostpointercapture`,l)}let xt=n(()=>!c.account&&!!c.tenantFooter&&(!q.isEdgeShown(`left`)||!$(`left`)&&!c.tenantRailFooter));function St(e){return q.isRegionVisible(e)}function Ct(e){return e===`leftSidebar`?q.isEdgeShown(`left`):e===`rightSidebar`?q.isEdgeShown(`right`):St(e)}let wt=n(()=>{let e={};for(let[t,n]of Object.entries(c.slots??{})){if(!n)continue;let r=vt(t,St);r&&(e[r]??=[]).push(n)}return e}),Tt={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},Et=n(()=>c.layoutEdit?.active&&c.layoutEdit.strip?c.layoutEdit.hiddenRegions??[]:[]);function Dt(...t){return t.some(t=>(e(wt)[t]?.length??0)>0)}let Ot=n(()=>!!c.layoutEdit?.active),Q=n(()=>!(e(Ot)&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`)&&(e(Y)||Rt(`left`)===`hidden`)),kt=n(()=>Rt(`top`)!==`hidden`&&(e(Ot)||!!c.appBar||!ce()||Xt(`top`)||e(Q)||e(Pe)||!!c.account||e(xt)||!!c.topLeftCorner||!!c.topRightCorner||Dt(`header.start`,`header.center`,`header.end`)||Ut(`top`))),At=n(()=>Rt(`bottom`)!==`hidden`&&(e(Ot)||!!c.systemBar||!!c.bottomLeftCorner||!!c.bottomRightCorner||Xt(`bottom`)&&!(!c.systemPanel&&c.systemBar)||Dt(`footer.start`,`footer.center`,`footer.end`)||Ut(`bottom`))),jt=n(()=>q.isEdgeShown(`right`)&&(e(Ot)||q.focusTools.length>0||!!c.focusRail||!!c.focusPanel||Xt(`right`)||Dt(`rightSidebar.header`,`rightSidebar.footer`)||Ut(`right`))),Mt=n(()=>e(Y)&&!c.phoneTopBar&&!e(kt)&&(e(Fe)||e(Pe))),Nt=n(()=>e(Y)&&(!!c.phoneTopBar||e(Mt))),Pt=n(()=>[ar(q),...e(kt)?[]:[`--smrt-admin-shell-top-track: 0rem`],...e(At)?[]:[`--smrt-admin-shell-bottom-track: 0rem`],...e(jt)?[]:[`--smrt-admin-shell-right-track: 0rem`],...e(Et).map(e=>`--smrt-admin-shell-${Tt[e]}-track: 1.75rem`)].join(`; `));function Ft(e,t){return`${e?`var(--smrt-admin-shell-left-collapsed)`:`0px`} minmax(0, 1fr) ${t?`var(--smrt-admin-shell-right-collapsed)`:`0px`}`}let It=n(()=>Ft(c.topLeftCorner,c.topRightCorner)),Lt=n(()=>Ft(c.bottomLeftCorner,c.bottomRightCorner));function Rt(e){return q.panels[e]}function $(e){return Rt(e)===`expanded`}function zt(e){return Rt(e)===`collapsed`&&q.config.panels[e].keepMounted===!0&&(e!==`top`&&e!==`bottom`||!q.isInline(e))}let Bt=n(()=>c.layoutEdit?.active&&!e(Y)&&q.config.panels.right.rail===!1&&q.isEdgeShown(`right`)&&Rt(`right`)===`collapsed`&&q.focusTools.length>0?q.focusTools:null),Vt=!1;function Ht(){let e=q.focusTools;if(e.length===0)return;let t=e.find(e=>e.id===q.activeFocusToolId)??e[0];q.openFocusTool(t.id),Vt=!0}j(()=>{c.layoutEdit?.active||z(()=>{Vt&&q.panels.right===`expanded`&&q.collapsePanel(`right`),Vt=!1})});function Ut(e){return nt(e)||zt(e)}function Wt(e){return q.config.panels[e].label}function Gt(){let e=Wt(`left`),t=$(`left`);return e&&e!==hn.left.label?K(Z[t?`ui.admin_shell.collapse_panel`:`ui.admin_shell.expand_panel`],{panel:e}):K(Z[t?`ui.admin_shell.collapse_sidebar`:`ui.admin_shell.expand_sidebar`])}function Kt(){q.setPanelState(`left`,$(`left`)?`collapsed`:`expanded`)}function qt(){if($(`right`)){q.collapsePanel(`right`);return}let e=xe();e?q.openFocusTool(e.id):q.expandPanel(`right`)}function Jt(e){return Mn(Cn(e,q.config.panels[e],q.settings))}function Yt(e){return typeof se()==`boolean`?se():se()[e]===!0}function Xt(e){let t=Yt(e);return e===`left`&&(c.showTenantToggle===!1?t=!1:c.showTenantToggle===!0&&(t=!0)),t}let Zt=n(()=>({top:Xt(`top`)||Yt(`top`)||c.hotkeys===!0,left:Xt(`left`)||Yt(`left`)||c.hotkeys===!0,right:Xt(`right`)||Yt(`right`)||c.hotkeys===!0,bottom:Xt(`bottom`)||Yt(`bottom`)||c.hotkeys===!0}));q.setInlineEdges(z(()=>({top:!e(Zt).top,left:!e(Zt).left,right:!e(Zt).right,bottom:!e(Zt).bottom}))),j(()=>{let t=e(Zt);q.setInlineEdges({top:!t.top,left:!t.left,right:!t.right,bottom:!t.bottom})});function Qt(e){return c.hotkeys===void 0?Yt(e)||Xt(e):c.hotkeys}j(()=>{let t={top:e(kt),left:q.isEdgeShown(`left`),right:e(jt),bottom:e(At)},n=z(()=>q.regionsRendered);Object.keys(t).some(e=>t[e]!==n[e])&&(q.regionsRendered=t)}),j(()=>{q.hotkeysAvailable=[`top`,`left`,`right`,`bottom`].some(Qt)});function $t(e){return Qt(e)&&q.settings.hotkeysEnabled!==!1&&Cn(e,q.config.panels[e],q.settings)!==null}function en(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=()=>Array.from(e.querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>e.offsetParent!==null);(n()[0]??e).focus();function r(t){if(t.key!==`Tab`)return;let r=n();if(r.length===0){t.preventDefault(),e.focus();return}let i=r[0],a=r[r.length-1];t.shiftKey&&document.activeElement===i?(t.preventDefault(),a.focus()):!t.shiftKey&&document.activeElement===a&&(t.preventDefault(),i.focus())}return e.addEventListener(`keydown`,r),{destroy(){e.removeEventListener(`keydown`,r),t?.focus()}}}var tn=$r(),nn=N(tn),rn=t=>{var n=_r(),r=N(n);o(r,()=>c.header??m,()=>({viewport:e(J)})),s(n),C(t,n)};t(nn,t=>{e(Ie)&&t(rn)});var an=F(nn,2);W(an,()=>`header`);var on=F(an,2),sn=r=>{var a=Cr();let u;var d=N(a),p=e=>{var t=vr(),n=N(t);o(n,()=>c.topLeftCorner),s(t),C(e,t)};t(d,e=>{c.topLeftCorner&&e(p)});var m=F(d,2);S(m,``,{},{"--smrt-admin-shell-band-column":2});var h=N(m),_=e=>{var t=T(),n=B(t);o(n,()=>c.appBar),C(e,t)},v=r=>{var i=yr(),a=B(i),o=e=>{te(e)};t(a,e=>{ce()||e(o)});var s=F(a,2),c=e=>{f(e,()=>`top`)},l=n(()=>Xt(`top`));t(s,t=>{e(l)&&t(c)}),C(r,i)};t(h,e=>{c.appBar?e(_):e(v,-1)});var y=F(h,2),b=e=>{var t=mr();let n;var r=N(t);g(r),s(t),V(e=>n=i(t,1,`smrt-admin-shell__tenant-opener svelte-1ifuk0b`,null,n,{"restore-hidden":e}),[()=>Rt(`left`)===`hidden`]),C(e,t)},x=n(()=>!(c.layoutEdit?.active&&!e(Y))&&q.config.panels.left.initial!==`hidden`&&q.layoutPanels.left?.visible!==!1&&(!e(Y)||q.phonePresentation(`left`)!==`hidden`));t(y,t=>{e(x)&&t(b)});var E=F(y,2);R(E,()=>`header.start`);var D=F(E,2);R(D,()=>`header.center`);var O=F(D,2),k=e=>{var n=br(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.account),C(e,t)},a=e=>{var t=T(),n=B(t);o(n,()=>c.tenantFooter),C(e,t)};t(r,e=>{c.account?e(i):c.tenantFooter&&e(a,1)}),s(n),C(e,n)};t(O,t=>{(c.account||e(xt))&&t(k)});var A=F(O,2);R(A,()=>`header.end`);var j=F(A,2),M=e=>{w(e)};t(j,t=>{e(Pe)&&t(M)});var ee=F(j,2);ne(ee,()=>`header`),s(m);var P=F(m,2),I=e=>{var t=xr(),n=N(t);o(n,()=>c.topRightCorner),s(t),C(e,t)};t(P,e=>{c.topRightCorner&&e(I)});var z=F(P,2),re=e=>{var n=Sr(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.appPanel),C(e,t)},a=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_app_panel`])]),C(e,t)};t(r,e=>{c.appPanel?e(i):e(a,-1)}),s(n),V((e,t)=>{H(n,`aria-label`,e),H(n,`hidden`,t)},[()=>Wt(`top`),()=>!$(`top`)]),C(e,n)},ie=n(()=>Ut(`top`));t(z,t=>{e(ie)&&t(re)}),s(a),V(t=>{H(a,`data-state`,t),H(a,`data-presentation`,q.config.panels.top.presentation),u=S(a,``,u,{"--smrt-admin-shell-edge-columns":e(It)})},[()=>Rt(`top`)]),C(r,a)};t(on,t=>{e(kt)&&t(sn)});var cn=F(on,2);W(cn,()=>`leftSidebar`);var ln=F(cn,2),un=r=>{var i=kr(),a=N(i);D(a,()=>`left`);var l=F(a,2),u=N(l);ne(u,()=>`leftSidebar`);var d=F(u,2),p=e=>{var t=wr(),n=N(t),r=N(n);te(r),s(n);var i=F(n,2),a=N(i),o=L(a);s(i),s(t),V((e,t)=>{H(i,`aria-label`,e),H(i,`title`,t),H(o,`d`,ye.close)},[()=>K(Z[`ui.admin_shell.close_menu`]),()=>K(Z[`ui.admin_shell.close_menu`])]),E(`click`,i,()=>q.collapsePanel(`left`)),C(e,t)},m=t=>{{let r=n(()=>!$(`left`));te(t,()=>e(r))}};t(d,t=>{e(Y)?t(p):!e(kt)&&(c.homeHref||c.logoSrc||c.brand)&&t(m,1)});var g=F(d,2),_=r=>{var i=Er(),a=N(i);R(a,()=>`leftSidebar.header`);var l=F(a,2),u=N(l),d=e=>{var t=T(),n=B(t);o(n,()=>c.tenantPanel),C(e,t)},f=e=>{var t=T(),n=B(t);o(n,()=>c.tenantRail),C(e,t)};t(u,e=>{c.tenantPanel?e(d):c.tenantRail&&e(f,1)}),s(l);var p=F(l,2),m=e=>{h(e)},g=n(()=>nt(`left`)&&!e(Y)&&(c.tenantUtilities||Xt(`left`)));t(p,t=>{e(g)&&t(m)});var _=F(p,2),v=e=>{var t=Tr(),n=N(t);o(n,()=>c.tenantFooter),s(t),C(e,t)};t(_,t=>{c.tenantFooter&&!e(xt)&&t(v)});var y=F(_,2);R(y,()=>`leftSidebar.footer`),s(i),V(e=>H(i,`hidden`,e),[()=>!nt(`left`)]),C(r,i)},v=n(()=>nt(`left`)||c.tenantPanel&&zt(`left`));t(g,t=>{e(v)&&t(_)});var y=F(g,2),b=r=>{var i=Or(),a=N(i),l=N(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.tenantRail),C(e,t)};t(l,e=>{c.tenantRail&&e(u)}),s(a);var d=F(a,2),f=e=>{h(e)},p=n(()=>!e(Y)&&(c.tenantUtilities||Xt(`left`)));t(d,t=>{e(p)&&t(f)});var m=F(d,2),g=e=>{var t=Dr(),n=N(t);o(n,()=>c.tenantRailFooter),s(t),C(e,t)};t(m,e=>{c.tenantRailFooter&&e(g)}),s(i),C(r,i)},x=n(()=>!nt(`left`)&&(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(y,t=>{e(x)&&t(b)});var S=F(y,2),w=e=>{f(e,()=>`left`)},k=n(()=>Xt(`left`)&&!e(Y)&&!nt(`left`)&&!(c.tenantRail||c.tenantRailFooter||c.tenantUtilities));t(S,t=>{e(k)&&t(w)}),s(l),s(i),M(i,e=>Ae.left=e,()=>Ae?.left),I(i,(e,t)=>G?.(e,t),()=>({direction:`left`,onDismiss:()=>q.collapsePanel(`left`),enabled:e(Y)&&e(Ne)&&$(`left`)})),V((t,n,r,a)=>{H(i,`data-state`,t),H(i,`data-closing`,e(Qe)===`left`?``:void 0),H(i,`data-presentation`,n),H(i,`aria-label`,r),H(i,`tabindex`,e(Ye)===`left`?-1:void 0),i.inert=a},[()=>e(Qe)===`left`?`expanded`:Rt(`left`),()=>q.presentationFor(`left`),()=>Wt(`left`),()=>e(Y)&&!$(`left`)||e(Ye)===`right`||e(Qe)===`left`]),O(`animationend`,i,e=>ct(e,`left`)),C(r,i)},dn=n(()=>q.isEdgeShown(`left`));t(ln,t=>{e(dn)&&t(un)});var fn=F(ln,2),pn=N(fn);o(pn,()=>c.children),s(fn),M(fn,e=>U(we,e),()=>e(we));var mn=F(fn,2),gn=n=>{var r=Mr(),i=N(r),a=t=>{var n=T(),r=B(n);o(r,()=>c.phoneTopBar,()=>({hidden:e(De)})),C(t,n)},l=n=>{var r=jr(),i=N(r),a=e=>{g(e)};t(i,t=>{e(Fe)&&t(a)});var o=F(i,2),c=e=>{var t=Ar(),n=N(t);w(n),s(t),C(e,t)};t(o,t=>{e(Pe)&&t(c)}),s(r),C(n,r)};t(i,t=>{c.phoneTopBar?t(a):e(Mt)&&t(l,1)}),s(r),C(n,r)};t(mn,t=>{e(Nt)&&t(gn)});var _n=F(mn,2),vn=e=>{var t=Nr();V(e=>H(t,`aria-label`,e),[()=>K(Z[$(`left`)&&q.isEdgeShown(`left`)?`ui.admin_shell.close_menu`:`ui.admin_shell.close_tools`])]),E(`click`,t,lt),C(e,t)};t(_n,t=>{e(Y)&&e(X)&&e(Re)&&t(vn)});var yn=F(_n,2),xn=t=>{let r=n(()=>e(Ye)??e(Qe));var i=Pr();V(t=>{H(i,`aria-label`,t),H(i,`data-closing`,e(Ye)?void 0:``)},[()=>K(Z[e(r)===`left`?`ui.admin_shell.close_sidebar`:`ui.admin_shell.close_tools`])]),E(`click`,i,()=>{e(Ye)&&q.collapsePanel(e(r))}),C(t,i)};t(yn,t=>{(e(Ye)||e(Qe))&&t(xn)});var Sn=F(yn,2);W(Sn,()=>`rightSidebar`);var wn=F(Sn,2),Tn=r=>{let a=n(()=>e(Y)?q.phonePresentation(`right`):void 0);var u=Hr(),d=N(u);D(d,()=>`right`);var m=F(d,2),h=e=>{var t=Fr();I(t,(e,t)=>G?.(e,t),()=>({direction:`down`,onDismiss:()=>q.collapsePanel(`right`),enabled:$(`right`)})),C(e,t)};t(m,t=>{e(a)===`sheet`&&t(h)});var g=F(m,2),_=N(g);ne(_,()=>`rightSidebar`);var y=F(_,2),b=e=>{var t=Ir(),n=N(t),r=L(n);s(t),V((e,n)=>{H(t,`aria-label`,e),H(t,`title`,n),H(r,`d`,ye.close)},[()=>K(Z[`ui.admin_shell.close_tools`]),()=>K(Z[`ui.admin_shell.close_tools`])]),E(`click`,t,()=>q.collapsePanel(`right`)),C(e,t)};t(y,t=>{e(a)===`drawer`&&t(b)});var x=F(y,2),S=e=>{},w=e=>{var t=T(),n=B(t);o(n,()=>c.focusRail),C(e,t)},k=n=>{var r=Br();p(r,21,()=>q.focusTools,e=>e.id,(n,r)=>{var a=zr();let o;var c=N(a),u=t=>{var n=T(),i=B(n);v(i,()=>e(r).icon,(e,t)=>{t(e,{})}),C(t,n)},d=e=>{var t=Lr(),n=L(t);V(()=>H(n,`d`,ye[be])),C(e,t)};t(c,t=>{e(r).icon?t(u):t(d,-1)});var f=F(c,2),p=t=>{var n=Rr(),i=L(n,!0);V(()=>l(i,e(r).badge)),C(t,n)};t(f,t=>{e(r).badge!=null&&t(p)}),s(a),V((t,n)=>{o=i(a,1,`smrt-admin-shell__focus-tool svelte-1ifuk0b`,null,o,{active:t}),H(a,`aria-pressed`,n),H(a,`aria-label`,e(r).label),H(a,`title`,e(r).label)},[()=>q.activeFocusToolId===e(r).id&&$(`right`),()=>q.activeFocusToolId===e(r).id&&$(`right`)]),E(`click`,a,()=>q.toggleFocusTool(e(r).id)),C(n,a)}),s(r),V(e=>H(r,`aria-label`,e),[()=>K(Z[`ui.admin_shell.focus_tools`])]),C(n,r)},A=e=>{f(e,()=>`right`)},j=n(()=>Xt(`right`));t(x,t=>{q.config.panels.right.rail===!1?t(S):c.focusRail?t(w,1):q.focusTools.length>0?t(k,2):e(j)&&t(A,3)}),s(g);var P=F(g,2),te=t=>{var r=Vr(),i=N(r);R(i,()=>`rightSidebar.header`);var a=F(i,2);ae(a,()=>q.activeFocusToolId,t=>{{let r=n(xe);ee(t,()=>e(r))}});var o=F(a,2);R(o,()=>`rightSidebar.footer`),s(r),V(e=>H(r,`hidden`,e),[()=>!nt(`right`)]),C(t,r)},z=n(()=>Ut(`right`));t(P,t=>{e(z)&&t(te)}),s(u),M(u,e=>Ae.right=e,()=>Ae?.right),I(u,(e,t)=>G?.(e,t),()=>({direction:`right`,onDismiss:()=>q.collapsePanel(`right`),enabled:e(a)===`drawer`&&e(Ne)&&$(`right`)})),V((t,n,r,i)=>{H(u,`data-state`,t),H(u,`data-closing`,e(Qe)===`right`?``:void 0),H(u,`data-presentation`,n),H(u,`data-phone`,e(a)),H(u,`aria-label`,r),H(u,`tabindex`,e(Ye)===`right`?-1:void 0),u.inert=i},[()=>e(Qe)===`right`?`expanded`:Rt(`right`),()=>q.presentationFor(`right`),()=>Wt(`right`),()=>e(Y)&&!$(`right`)||e(Ye)===`left`||e(Qe)===`right`]),O(`animationend`,u,e=>ct(e,`right`)),C(r,u)};t(wn,t=>{e(jt)&&t(Tn)});var En=F(wn,2),On=r=>{var i=Ur(),a=N(i),o=t=>{let r=n(()=>e(Bt)[0].icon);var i=T(),a=B(i);v(a,()=>e(r),(e,t)=>{t(e,{})}),C(t,i)};t(a,t=>{e(Bt)[0].icon&&t(o)});var c=F(a,2),u=L(c,!0);s(i),V((e,t)=>{H(i,`aria-label`,e),l(u,t)},[()=>K(Z[`ui.admin_shell.open_panel`],{label:e(Bt).map(e=>e.label).join(`, `)}),()=>e(Bt).map(e=>e.label).join(`, `)]),E(`click`,i,Ht),C(r,i)};t(En,t=>{e(Bt)&&t(On)});var kn=F(En,2);W(kn,()=>`footer`);var An=F(kn,2),jn=r=>{var i=qr();let a;var u=N(i),d=e=>{var t=Wr(),n=N(t);o(n,()=>c.bottomLeftCorner),s(t),C(e,t)};t(u,e=>{c.bottomLeftCorner&&e(d)});var p=F(u,2);S(p,``,{},{"--smrt-admin-shell-band-column":2});var m=N(p);R(m,()=>`footer.start`);var h=F(m,2);R(h,()=>`footer.center`);var g=F(h,2),_=e=>{var t=T(),n=B(t);o(n,()=>c.systemBar),C(e,t)};t(g,e=>{c.systemBar&&e(_)});var v=F(g,2);R(v,()=>`footer.end`);var y=F(v,2);ne(y,()=>`footer`);var b=F(y,2),x=e=>{f(e,()=>`bottom`)},w=n(()=>Xt(`bottom`)&&(c.systemPanel||!c.systemBar));t(b,t=>{e(w)&&t(x)}),s(p);var E=F(p,2),D=e=>{var t=Gr(),n=N(t);o(n,()=>c.bottomRightCorner),s(t),C(e,t)};t(E,e=>{c.bottomRightCorner&&e(D)});var O=F(E,2),k=e=>{var n=Kr(),r=N(n),i=e=>{var t=T(),n=B(t);o(n,()=>c.systemPanel),C(e,t)},a=e=>{var t=pr(),n=L(t,!0);V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.no_system_panel`])]),C(e,t)};t(r,e=>{c.systemPanel?e(i):e(a,-1)}),s(n),V((e,t)=>{H(n,`aria-label`,e),H(n,`hidden`,t)},[()=>Wt(`bottom`),()=>!$(`bottom`)]),C(e,n)},A=n(()=>Ut(`bottom`));t(O,t=>{e(A)&&t(k)}),s(i),V(t=>{H(i,`data-state`,t),H(i,`data-presentation`,q.config.panels.bottom.presentation),a=S(i,``,a,{"--smrt-admin-shell-edge-columns":e(Lt)})},[()=>Rt(`bottom`)]),C(r,i)};t(An,t=>{e(At)&&t(jn)});var Nn=F(An,2),Pn=t=>{var n=Jr(),r=N(n);o(r,()=>c.overlays,()=>({viewport:e(J),bottomBar:e(Le)})),s(n),C(t,n)};t(Nn,e=>{c.overlays&&e(Pn)});var Fn=F(Nn,2),Ln=e=>{var t=Yr(),n=N(t);o(n,()=>c.phoneBottomBar??m),s(t),C(e,t)};t(Fn,t=>{e(Le)===`nav`&&t(Ln)});var Rn=F(Fn,2),zn=r=>{var i=Qr(),a=N(i),u=N(a),f=e=>{var t=T(),n=B(t);o(n,()=>c.shortcutsOverlay),C(e,t)},m=t=>{var r=Zr(),i=B(r),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>K(Z[`ui.admin_shell.close_shortcuts`]));me(c,{variant:`ghost`,size:`sm`,get"aria-label"(){return e(t)},onclick:()=>U(_e,!1),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>K(Z[`ui.admin_shell.close`])]),C(e,n)},$$slots:{default:!0}})}s(i);var u=F(i,2),f=N(u);p(f,17,()=>Se,b,(t,n)=>{var r=Xr(),i=N(r),a=L(i,!0),o=F(i,2),c=L(o,!0);s(r),V((e,t)=>{l(a,e),l(c,t)},[()=>Wt(e(n)),()=>Jt(e(n))]),C(t,r)});var m=F(f,2),h=N(m),g=L(h,!0);y(2),s(m),s(u),V((e,t)=>{l(o,e),l(g,t)},[()=>K(Z[`ui.admin_shell.shell_shortcuts`]),()=>K(Z[`ui.admin_shell.shortcuts`])]),C(t,r)};t(u,e=>{c.shortcutsOverlay?e(f):e(m,-1)}),s(a),s(i),I(i,e=>en?.(e)),V(e=>H(i,`aria-label`,e),[()=>K(Z[`ui.admin_shell.shell_shortcuts`])]),C(r,i)};t(Rn,t=>{e(_e)&&t(zn)}),s(tn),M(tn,e=>pe(e),()=>pe()),V((t,n,r,i)=>{H(tn,`data-top-state`,t),H(tn,`data-left-state`,n),H(tn,`data-right-state`,r),H(tn,`data-bottom-state`,i),H(tn,`data-viewport`,e(J)),H(tn,`data-bottom-bar`,e(Le)),H(tn,`data-phone-top`,e(Nt)?``:void 0),H(tn,`data-chrome-hidden`,e(De)?``:void 0),H(tn,`data-resizing`,e(Oe)??void 0),H(tn,`data-motion`,e(ke)?``:void 0),S(tn,`${e(Pt)}; ${e(He)}; ${e(Ve)}`),fn.inert=e(Ye)!==null},[()=>Rt(`top`),()=>Rt(`left`),()=>Rt(`right`),()=>Rt(`bottom`)]),C(a,tn),r()}D([`click`,`pointerdown`,`keydown`,`dblclick`]);function ti(){let e=Pe();return{get user(){return e.state.session.user},get isAuthenticated(){return e.state.session.isAuthenticated},get permissions(){return e.state.session.permissions},hasPermission:t=>e.hasPermission(t),hasAllPermissions:t=>e.hasAllPermissions(t),hasAnyPermission:t=>e.hasAnyPermission(t)}}var ni=c(`<span class="smrt-hotkey-input__conflict svelte-98l5qo"> </span>`),ri=c(`<div class="smrt-hotkey-input svelte-98l5qo" data-smrt-component="HotkeyInput"><!> <!></div>`);function ii(i,a){_(a,!0);let o=k(a,`value`,3,null),c=k(a,`disabled`,3,!1),u=k(a,`conflictsWith`,3,null),{t:f}=de();function p(e){c()||e.key!==`Tab`&&(e.preventDefault(),e.key===`Backspace`||e.key===`Delete`?a.oncapture?.(null):e.code&&a.oncapture?.({code:e.code,altKey:e.altKey||void 0,ctrlKey:e.ctrlKey||void 0,metaKey:e.metaKey||void 0,shiftKey:e.shiftKey||void 0}))}var m=ri(),h=N(m);{let t=n(()=>f(Z[`ui.hotkey_input.capture_title`]));me(h,{variant:`secondary`,size:`sm`,get disabled(){return c()},onkeydown:p,get title(){return e(t)},children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>Mn(o())]),C(e,n)},$$slots:{default:!0}})}var g=F(h,2),v=e=>{var t=ni(),n=L(t);V(e=>l(n,`${e??``} ${u()??``}`),[()=>f(Z[`ui.hotkey_input.conflicts_with`])]),C(e,t)};t(g,e=>{u()&&e(v)}),s(m),C(i,m),r()}var ai={"header.start":Z[`ui.shell_slot.header_start`],"header.center":Z[`ui.shell_slot.header_center`],"header.end":Z[`ui.shell_slot.header_end`],"footer.start":Z[`ui.shell_slot.footer_start`],"footer.center":Z[`ui.shell_slot.footer_center`],"footer.end":Z[`ui.shell_slot.footer_end`],"leftSidebar.header":Z[`ui.shell_slot.left_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.left_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.right_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.right_sidebar_footer`]},oi={"header.start":Z[`ui.shell_slot.short_header_start`],"header.center":Z[`ui.shell_slot.short_header_center`],"header.end":Z[`ui.shell_slot.short_header_end`],"footer.start":Z[`ui.shell_slot.short_footer_start`],"footer.center":Z[`ui.shell_slot.short_footer_center`],"footer.end":Z[`ui.shell_slot.short_footer_end`],"leftSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"leftSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`],"rightSidebar.header":Z[`ui.shell_slot.short_sidebar_header`],"rightSidebar.footer":Z[`ui.shell_slot.short_sidebar_footer`]},si={header:Z[`ui.shell_region.header`],leftSidebar:Z[`ui.shell_region.left_sidebar`],rightSidebar:Z[`ui.shell_region.right_sidebar`],footer:Z[`ui.shell_region.footer`]},ci=c(`<section data-smrt-part="appearance" aria-labelledby="smrt-shell-settings-appearance" class="svelte-qs6iav"><h3 id="smrt-shell-settings-appearance" class="svelte-qs6iav"> </h3> <div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div></section>`),li=c(`<dt> </dt> <dd class="svelte-qs6iav"> </dd>`,1),ui=c(`<dl class="svelte-qs6iav"><!> <dt> </dt> <dd class="svelte-qs6iav"> </dd></dl>`),di=c(`<p class="svelte-qs6iav"> </p>`),fi=c(`<p role="alert" data-smrt-part="error" class="svelte-qs6iav"> </p>`),pi=c(`<!> <!>`,1),mi=c(`<section data-smrt-part="account" aria-labelledby="smrt-shell-settings-account" class="svelte-qs6iav"><h3 id="smrt-shell-settings-account" class="svelte-qs6iav"> </h3> <!> <!></section>`),hi=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!> <!></div>`),gi=c(`<div class="smrt-shell-settings-panel__controls svelte-qs6iav"><!></div>`),_i=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><div class="svelte-qs6iav"><strong> </strong> <span class="svelte-qs6iav"> </span></div> <div class="smrt-shell-settings-panel__actions svelte-qs6iav"><!> <!></div></div>`),vi=c(`<div class="smrt-shell-settings-panel__row svelte-qs6iav"><strong> </strong> <!></div>`),yi=c(`<section data-smrt-part="shortcuts" aria-labelledby="smrt-shell-settings-shortcuts" class="svelte-qs6iav"><header class="svelte-qs6iav"><h3 id="smrt-shell-settings-shortcuts" class="svelte-qs6iav"> </h3> <!></header> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section>`),bi=c(`<section class="smrt-shell-settings-panel svelte-qs6iav" data-smrt-component="ShellSettingsPanel"><!> <!> <section data-smrt-part="layout" aria-labelledby="smrt-shell-settings-layout" class="svelte-qs6iav"><h3 id="smrt-shell-settings-layout" class="svelte-qs6iav"> </h3> <p class="svelte-qs6iav"> </p> <!> <div class="smrt-shell-settings-panel__grid svelte-qs6iav"></div></section> <!></section>`);function xi(i,a){_(a,!0);let o=k(a,`appearance`,3,!1),c=k(a,`account`,3,!1),{t:u}=de(),f=Ve(),m=Se(),h=c()?ti():null,g=[`top`,`left`,`bottom`,`right`],v=n(()=>{let e=h?.user?.name;return typeof e==`string`&&e?e:null}),b={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},x=e=>u(si[b[e]]),S=n(()=>m?m.panels.filter(e=>e.available&&(!e.visible||f.regionsRendered[e.edge])).map(e=>({edge:e.edge,visible:e.visible})):g.filter(e=>f.panels[e]!==`hidden`&&f.regionsRendered[e]).map(e=>({edge:e,visible:!0}))),w=n(()=>m?m.panels.filter(e=>e.available&&e.visible).length:e(S).length),E=n(()=>e(S).filter(e=>e.visible)),D=A(!1),O=A(!1);async function j(){if(!e(D)&&a.onSignOut){U(D,!0),U(O,!1);try{await a.onSignOut()}catch{U(O,!0)}finally{U(D,!1)}}}let M=n(()=>!!(a.signOutHref||a.onSignOut)),ee=n(()=>f.settings.hotkeysEnabled!==!1);function P(e){return Cn(e,f.config.panels[e],f.settings)}function I(e){let t=P(e);if(!t)return null;let n=g.find(n=>n!==e&&P(n)?.code===t.code&&P(n)?.altKey===t.altKey&&P(n)?.ctrlKey===t.ctrlKey&&P(n)?.metaKey===t.metaKey&&P(n)?.shiftKey===t.shiftKey);return n?f.config.panels[n].label:null}var te=bi(),R=N(te),z=t=>{var r=ci(),i=N(r),a=L(i,!0),o=F(i,2),c=N(o);{let t=n(()=>u(Z[`ui.shell_settings.theme`]));Y(c,{get label(){return e(t)}})}var d=F(c,2);{let t=n(()=>u(Z[`ui.shell_settings.color_scheme`]));Me(d,{get ariaLabel(){return e(t)}})}s(o),s(r),V(e=>l(a,e),[()=>u(Z[`ui.shell_settings.appearance`])]),C(t,r)};t(R,e=>{o()&&e(z)});var ne=F(R,2),re=n=>{var r=mi(),i=N(r),o=L(i,!0),c=F(i,2),f=n=>{var r=ui(),i=N(r),a=t=>{var n=li(),r=B(n),i=L(r,!0),a=F(r,2),o=L(a,!0);V(t=>{l(i,t),l(o,e(v))},[()=>u(Z[`ui.shell_settings.account_name`])]),C(t,n)};t(i,t=>{e(v)&&t(a)});var o=F(i,2),c=L(o,!0),d=F(o,2),f=L(d,!0);s(r),V(e=>{l(c,e),l(f,h.user.email)},[()=>u(Z[`ui.shell_settings.account_email`])]),C(n,r)},p=e=>{var t=di(),n=L(t,!0);V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.account_signed_out`])]),C(e,t)};t(c,e=>{h.user?e(f):e(p,-1)});var m=F(c,2),g=n=>{var r=T(),i=B(r),o=n=>{var r=pi(),i=B(r);me(i,{variant:`secondary`,size:`sm`,get loading(){return e(D)},onclick:j,children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}});var a=F(i,2),o=e=>{var t=fi(),n=L(t,!0);V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(a,t=>{e(O)&&t(o)}),C(n,r)},s=e=>{me(e,{variant:`secondary`,size:`sm`,get href(){return a.signOutHref},children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.sign_out`])]),C(e,n)},$$slots:{default:!0}})};t(i,e=>{a.onSignOut?e(o):e(s,-1)}),C(n,r)};t(m,t=>{e(M)&&t(g)}),s(r),V(e=>l(o,e),[()=>u(Z[`ui.shell_settings.account`])]),C(n,r)};t(ne,e=>{h&&e(re)});var ie=F(ne,2),ae=N(ie),W=L(ae,!0),oe=F(ae,2),G=L(oe,!0),se=F(oe,2),ce=t=>{var r=hi(),i=N(r);{let t=n(()=>m.editing?`primary`:`secondary`);me(i,{get variant(){return e(t)},size:`sm`,get"aria-pressed"(){return m.editing},onclick:()=>m.setEditing(!m.editing),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>m.editing?u(Z[`ui.shell_settings.edit_layout_on`]):u(Z[`ui.shell_settings.edit_layout_off`])]),C(e,n)},$$slots:{default:!0}})}var a=F(i,2);{let t=n(()=>!m.customized);me(a,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)},le=t=>{var r=gi(),i=N(r);{let t=n(()=>!m.customized);me(i,{variant:`ghost`,size:`sm`,get disabled(){return e(t)},onclick:()=>m.reset(),children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>u(Z[`ui.shell_settings.reset_layout`])]),C(e,n)},$$slots:{default:!0}})}s(r),C(t,r)};t(se,e=>{m?.editable?e(ce):m&&e(le,1)});var ue=F(se,2);p(ue,21,()=>e(S),e=>e.edge,(r,i)=>{let a=n(()=>x(e(i).edge));var o=_i(),c=N(o),p=N(c),h=L(p,!0),g=F(p,2),_=L(g,!0);s(c);var v=F(c,2),b=N(v),S=t=>{{let r=n(()=>e(i).visible&&e(w)<=1),o=n(()=>e(i).visible?u(Z[`ui.shell_settings.hide_region`],{region:e(a)}):u(Z[`ui.shell_settings.show_region`],{region:e(a)}));me(t,{variant:`ghost`,size:`sm`,get disabled(){return e(r)},get"aria-label"(){return e(o)},onclick:()=>m.setPanel(e(i).edge,{visible:!e(i).visible}),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(i).visible?u(Z[`ui.shell_settings.hide`]):u(Z[`ui.shell_settings.show`])]),C(t,r)},$$slots:{default:!0}})}};t(b,e=>{m&&e(S)});var T=F(b,2),E=t=>{me(t,{variant:`ghost`,size:`sm`,onclick:()=>f.setPanel(e(i).edge,f.panels[e(i).edge]===`expanded`?`collapsed`:`expanded`),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>f.panels[e(i).edge]===`expanded`?u(Z[`ui.shell_settings_panel.collapse`]):u(Z[`ui.shell_settings_panel.expand`])]),C(t,r)},$$slots:{default:!0}})},D=n(()=>e(i).visible&&!f.isInline(e(i).edge));t(T,t=>{e(D)&&t(E)}),s(v),s(o),V(t=>{H(o,`data-edge`,e(i).edge),l(h,e(a)),l(_,t)},[()=>e(i).visible?u(Z[`ui.shell_settings.region_shown`]):u(Z[`ui.shell_settings.region_hidden`])]),C(r,o)}),s(ue),s(ie);var fe=F(ie,2),pe=t=>{var r=yi(),i=N(r),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>e(ee)?`secondary`:`primary`);me(c,{get variant(){return e(t)},size:`sm`,onclick:()=>f.setHotkeysEnabled(!e(ee)),children:(t,n)=>{y();var r=d();V(e=>l(r,e),[()=>e(ee)?u(Z[`ui.shell_settings_panel.disable_hotkeys`]):u(Z[`ui.shell_settings_panel.enable_hotkeys`])]),C(t,r)},$$slots:{default:!0}})}s(i);var m=F(i,2);p(m,21,()=>e(E),e=>e.edge,(t,r)=>{var i=vi(),a=N(i),o=L(a,!0),c=F(a,2);{let t=n(()=>P(e(r).edge)),i=n(()=>!e(ee)),a=n(()=>I(e(r).edge));ii(c,{get value(){return e(t)},get disabled(){return e(i)},get conflictsWith(){return e(a)},oncapture:t=>f.setHotkey(e(r).edge,t?.code??null)})}s(i),V(t=>{H(i,`data-edge`,e(r).edge),l(o,t)},[()=>x(e(r).edge)]),C(t,i)}),s(m),s(r),V(e=>l(o,e),[()=>u(Z[`ui.shell_settings.shortcuts`])]),C(t,r)};t(fe,e=>{f.hotkeysAvailable&&e(pe)}),s(te),V((e,t,n)=>{H(te,`aria-label`,e),l(W,t),l(G,n)},[()=>u(Z[`ui.shell_settings_panel.shell_settings`]),()=>u(Z[`ui.shell_settings.layout`]),()=>u(Z[`ui.shell_settings_panel.description`])]),C(i,te),r()}var Si=c(`<p class="svelte-upgvjj"> </p>`),Ci=c(`<span class="smrt-app-scope-panel__environment svelte-upgvjj"> </span>`),wi=c(`<div class="smrt-app-scope-panel__section svelte-upgvjj"><!></div>`),Ti=c(`<section class="smrt-app-scope-panel svelte-upgvjj" data-smrt-component="AppScopePanel"><header class="svelte-upgvjj"><div class="svelte-upgvjj"><h2 class="svelte-upgvjj"> </h2> <!></div> <!></header> <!> <!> <!> <!></section>`);function Ei(e,n){_(n,!0);let i=k(n,`tenantName`,3,``),a=k(n,`environment`,3,``),c=k(n,`showSettings`,3,!0),{t:u}=de();var d=Ti(),f=N(d),p=N(f),m=N(p),h=L(m,!0),g=F(m,2),v=e=>{var t=Si(),n=L(t,!0);V(()=>l(n,i())),C(e,t)};t(g,e=>{i()&&e(v)}),s(p);var y=F(p,2),b=e=>{fe(e,{variant:`info`,size:`sm`,children:(e,t)=>{var n=Ci(),r=L(n,!0);V(()=>l(r,a())),C(e,n)},$$slots:{default:!0}})};t(y,e=>{a()&&e(b)}),s(f);var x=F(f,2),S=e=>{var t=wi(),r=N(t);o(r,()=>n.switcher),s(t),C(e,t)};t(x,e=>{n.switcher&&e(S)});var w=F(x,2),T=e=>{var t=wi(),r=N(t);o(r,()=>n.search),s(t),C(e,t)};t(w,e=>{n.search&&e(T)});var E=F(w,2),D=e=>{var t=wi(),r=N(t);o(r,()=>n.docs),s(t),C(e,t)};t(E,e=>{n.docs&&e(D)});var O=F(E,2),A=e=>{xi(e,{})};t(O,e=>{c()&&e(A)}),s(d),V(e=>{H(d,`aria-label`,e),l(h,n.appName)},[()=>u(Z[`ui.app_scope_panel.app_scope`])]),C(e,d),r()}function Di(){let e=Ve();return{get active(){return e.openFocusToolId},get tools(){return e.focusTools.map(e=>e.id)},get available(){return e.dockAvailable},has:t=>e.focusTools.some(e=>e.id===t),isOpen:t=>e.openFocusToolId===t,open:(t,n)=>e.openDockTool(t,n),close:()=>e.closeFocusTool(),toggle:(t,n)=>e.toggleDockTool(t,n)}}var Oi={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`},ki=class{options;#e=A(!1);get editingState(){return e(this.#e)}set editingState(e){U(this.#e,e,!0)}constructor(e){this.options=e}get editable(){return this.options.editable?.()??!1}get editing(){return this.editable&&this.editingState}setEditing(e){return e&&!this.editable||this.editingState===e?!1:(this.editingState=e,!0)}get layout(){return It(this.options.layout()??{version:1})}get sections(){return zt(this.options.nav(),this.options.groups(),this.layout)}get applied(){let{nav:e,groups:t}=Vt(this.options.nav(),this.options.groups(),this.options.panels(),this.layout);return{nav:e,groups:t}}get panels(){let e=gn(this.options.panels()).panels,t=this.layout;return dn.map(n=>{let r=e[n],i=t.panels?.[n];return{edge:n,label:r.label,available:r.initial!==`hidden`,visible:r.initial!==`hidden`&&i?.visible!==!1,initial:i?.initial??(r.initial===`expanded`?`expanded`:`collapsed`)}})}get placementItems(){let e=this.options.items?.()??[],t=cn(e,this.layout),n=new Map;for(let[e,r]of Object.entries(t))for(let t of r)n.set(t,e);let r=new Set,i=[];for(let t of e){if(r.has(t.id))continue;r.add(t.id);let e=n.get(t.id)??t.slot;i.push({id:t.id,label:t.label,defaultSlot:t.slot,slot:e,moved:e!==t.slot})}return i}get placements(){let e=new Map(this.placementItems.map(e=>[e.id,e])),t=cn(this.options.items?.()??[],this.layout);return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,n.flatMap(t=>e.get(t)??[])]))}isRegionVisible(e){let t=Oi[e];return this.panels.find(e=>e.edge===t)?.visible??!1}get customized(){return!Ot(this.layout)}isHidden(e){return this.layout.hidden?.includes(e)??!1}apply(e){let t=this.layout;return JSON.stringify(e)!==JSON.stringify(t)&&(this.options.commit(e),!0)}moveSection(e,t){return this.apply(Gt(this.options.nav(),this.options.groups(),this.layout,e,t))}moveItem(e,t,n){return this.apply(Kt(this.options.nav(),this.options.groups(),this.layout,e,t,n))}hide(e){return this.apply(qt(this.options.nav(),this.options.groups(),this.layout,e))}show(e){return this.apply(Jt(this.layout,e))}setPanel(e,t){return this.panels.find(t=>t.edge===e)?.available?this.apply(Xt(this.layout,e,t,this.options.panels())):!1}renameSection(e,t){return this.apply($t(this.options.nav(),this.options.groups(),this.layout,e,t))}renameItem(e,t){return this.apply(en(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionIcon(e,t){return this.apply(nn(this.options.nav(),this.options.groups(),this.layout,e,t))}setSectionTitleVisible(e,t){return this.apply(tn(this.options.nav(),this.options.groups(),this.layout,e,t))}createSection(e){let t=this.layout.customSections?.length??0,n=an(this.options.nav(),this.options.groups(),this.layout,e);if(!this.apply(n))return null;let r=n.customSections??[];return r.length>t?r[r.length-1]?.id??null:null}deleteSection(e){return this.apply(on(this.layout,e))}placeItem(e,t){if(!Ct(t))return!1;let n=this.placementItems.find(t=>t.id===e);return!n||n.slot===t?!1:this.apply(ln(this.layout,e,t,n.defaultSlot))}resetItem(e){return this.apply(un(this.layout,e))}reset(){return this.apply({version:1})}},Ai=c(`<span class="smrt-phone-bottom-bar__badge svelte-zvfnw6"> </span>`),ji=c(`<span class="smrt-phone-bottom-bar__dot svelte-zvfnw6"></span>`),Mi=c(`<span class="smrt-phone-bottom-bar__icon svelte-zvfnw6" aria-hidden="true"><!> <!></span> <span class="smrt-phone-bottom-bar__label svelte-zvfnw6" aria-hidden="true"> </span>`,1),Ni=c(`<a><!></a>`),Pi=c(`<button type="button"><!></button>`),Fi=c(`<nav class="smrt-phone-bottom-bar svelte-zvfnw6" data-testid="phone-bottom-bar" data-smrt-component="PhoneBottomBar"></nav>`);function Ii(a,o){_(o,!0);let c=(r,i=m)=>{var a=Mi(),c=B(a),u=N(c),d=e=>{var t=T(),n=B(t);v(n,()=>i().icon,(e,t)=>{t(e,{size:22})}),C(e,t)},f=t=>{{let r=n(()=>i().iconName??`placeholder`);Ee(t,{get name(){return e(r)},size:22,get iconComponent(){return o.iconComponent}})}};t(u,e=>{i().icon?e(d):e(f,-1)});var p=F(u,2),h=e=>{var t=Ai(),n=L(t,!0);V(()=>l(n,i().badge>9?`9+`:i().badge)),C(e,t)},g=e=>{var t=ji();C(e,t)};t(p,e=>{i().badge?e(h):i().dot&&e(g,1)}),s(c);var _=F(c,2),y=L(_,!0);V(()=>l(y,i().label)),C(r,a)},{t:u}=de();function d(e){let t=[e.label];return e.badge&&t.push(u(Z[`ui.phone_bottom_bar.unread`],{count:String(e.badge)})),e.dot&&t.push(e.dotLabel??u(Z[`ui.phone_bottom_bar.new`])),t.join(`, `)}var f=Fi();p(f,21,()=>o.items,e=>e.id,(n,r)=>{var a=T(),o=B(a),l=t=>{var n=Ni();let a;var o=N(n);c(o,()=>e(r)),s(n),V(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),H(n,`href`,e(r).href),H(n,`aria-label`,t),H(n,`aria-current`,e(r).active?`page`:void 0),H(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)},u=t=>{var n=Pi();let a;var o=N(n);c(o,()=>e(r)),s(n),V(t=>{a=i(n,1,`smrt-phone-bottom-bar__item svelte-zvfnw6`,null,a,{active:e(r).active}),H(n,`aria-label`,t),H(n,`aria-expanded`,e(r).expanded),H(n,`aria-controls`,e(r).controls),H(n,`data-item`,e(r).id)},[()=>d(e(r))]),E(`click`,n,function(...t){e(r).onclick?.apply(this,t)}),C(t,n)};t(o,t=>{e(r).href?t(l):t(u,-1)}),C(n,a)}),s(f),V(e=>H(f,`aria-label`,e),[()=>o.label??u(Z[`ui.phone_bottom_bar.label`])]),C(a,f),r()}D([`click`]);var Li=se({"ui.sortable.label":`Sortable list`,"ui.sortable.move":`Move {item}`,"ui.sortable.group":`{label}, {count} items`,"ui.sortable.empty":`No items in {container}.`,"ui.sortable.pickup":`Picked up {item}. Available destinations: {destinations}. Use the up and down arrow keys to choose a position, then Space or Enter to drop. Escape cancels.`,"ui.sortable.position":`{item}, position {position} of {count} in {container}.`,"ui.sortable.drop":`Moved {item} to {container}, position {position} of {count}.`,"ui.sortable.failed":`Could not move {item}. The list was restored.`,"ui.sortable.cancel":`Cancelled moving {item}.`,"ui.sortable.unavailable":`{container} is unavailable.`});function Ri(e,t){switch(t.type){case`pickup`:return e(Li[`ui.sortable.pickup`],{item:t.item,destinations:t.destinations.join(`, `)});case`position`:return e(Li[`ui.sortable.position`],{item:t.item,container:t.container,position:t.position,count:t.count});case`drop`:return e(Li[`ui.sortable.drop`],{item:t.item,container:t.container,position:t.position,count:t.count});case`unavailable`:return e(Li[`ui.sortable.unavailable`],{container:t.container});case`failed`:return e(Li[`ui.sortable.failed`],{item:t.item});case`cancel`:return e(Li[`ui.sortable.cancel`],{item:t.item})}}var zi=c(`<div class="smrt-sortable__marker smrt-sortable__marker--before svelte-1tr29x6" aria-hidden="true"></div>`),Bi=c(`<div role="listitem"><!> <button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="item"><span aria-hidden="true">⠿</span></button> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></div>`),Vi=c(`<div role="listitem" class="smrt-sortable__empty svelte-1tr29x6"> </div>`),Hi=c(`<div class="smrt-sortable__marker svelte-1tr29x6" aria-hidden="true"></div>`),Ui=c(`<div class="smrt-sortable__items svelte-1tr29x6" role="list"><!> <!></div>`),Wi=c(`<button type="button" class="smrt-sortable__handle svelte-1tr29x6" data-smrt-sortable-handle="container"><span aria-hidden="true">⠿</span></button>`),Gi=c(`<strong> </strong>`),Ki=c(`<section><header class="smrt-sortable__header svelte-1tr29x6"><!> <div class="smrt-sortable__content svelte-1tr29x6"><!></div></header> <!></section>`),qi=c(`<!> <div role="listitem" class="smrt-sortable__container-slot"><!></div>`,1),Ji=c(`<div class="smrt-sortable__containers svelte-1tr29x6" role="list"><!> <!></div>`),Yi=c(`<div class="smrt-sortable svelte-1tr29x6" role="group" data-smrt-component="Sortable"><!> <!> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div> <div class="smrt-sortable__live svelte-1tr29x6" aria-live="assertive" aria-atomic="true"> </div></div>`);function Xi(a,c){let u=ne();_(c,!0);let d=(r,a=m)=>{let u=n(()=>e(ee).get(a().id)??[]),d=n(()=>R.drag?.itemId),f=n(()=>e(u).length);var g=Ui(),_=N(g);p(_,27,()=>e(u),e=>e.id,(r,l,f)=>{var p=Bi();let m;var g=N(p),_=e=>{var t=zi();C(e,t)},v=n(()=>re(a().id,ie(e(u),e(f)))&&e(l).id!==e(d));t(g,t=>{e(v)&&t(_)});var x=F(g,2),S=F(x,2),w=N(S);o(w,()=>c.item,()=>({item:e(l),container:a(),index:e(f),isDragging:e(d)===e(l).id})),s(S),s(p),V(t=>{m=i(p,1,`smrt-sortable__item svelte-1tr29x6`,null,m,{"smrt-sortable__item--dragging":e(d)===e(l).id}),H(p,`data-smrt-sortable-item-id`,e(l).id),H(x,`draggable`,R.nativeDraggable),H(x,`aria-label`,t),H(x,`aria-pressed`,e(d)===e(l).id),H(x,`aria-describedby`,e(d)===e(l).id?b:void 0)},[()=>y(Li[`ui.sortable.move`],{item:e(l).label})]),O(`dragover`,p,e=>e.preventDefault()),O(`drop`,p,t=>{R.drag&&(t.stopPropagation(),R.dropOnItem(t,a().id,e(f)))}),E(`click`,x,()=>R.consumeClick(e(l).id)),E(`keydown`,x,t=>R.keydown(t,e(l).id)),O(`blur`,x,t=>R.blur(t,e(l).id)),E(`pointerdown`,x,t=>R.pointerDown(t,e(l).id)),E(`pointermove`,x,e=>R.pointerMove(e)),E(`pointerup`,x,e=>R.pointerUp(e)),O(`pointercancel`,x,e=>R.pointerCancel(e)),O(`dragstart`,x,t=>R.dragStart(t,e(l).id)),O(`dragend`,x,()=>R.dragEnd()),h(p,()=>_e,null),C(r,p)},e=>{var t=Vi(),n=L(t,!0);V(e=>l(n,e),[()=>y(Li[`ui.sortable.empty`],{container:a().label})]),C(e,t)});var v=F(_,2),x=e=>{var t=Hi();C(e,t)},S=n(()=>re(a().id,e(u).filter(t=>t.id!==e(d)).length));t(v,t=>{e(S)&&t(x)}),s(g),V(e=>H(g,`aria-label`,e),[()=>y(Li[`ui.sortable.group`],{label:a().label,count:e(f)})]),C(r,g)},f=(r,a=m,u=m)=>{let f=n(()=>(e(ee).get(a().id)??[]).length),p=n(()=>z.drag?.itemId===a().id);var h=Ki();let g;var _=N(h),v=N(_),b=t=>{var n=Wi();V(t=>{H(n,`draggable`,z.nativeDraggable),H(n,`aria-label`,t),H(n,`aria-pressed`,e(p)),H(n,`aria-describedby`,e(p)?x:void 0)},[()=>y(Li[`ui.sortable.move`],{item:a().label})]),E(`click`,n,()=>z.consumeClick(a().id)),E(`keydown`,n,e=>z.keydown(e,a().id)),O(`blur`,n,e=>z.blur(e,a().id)),E(`pointerdown`,n,e=>z.pointerDown(e,a().id)),E(`pointermove`,n,e=>z.pointerMove(e)),E(`pointerup`,n,e=>z.pointerUp(e)),O(`pointercancel`,n,e=>z.pointerCancel(e)),O(`dragstart`,n,e=>z.dragStart(e,a().id)),O(`dragend`,n,()=>z.dragEnd()),C(t,n)};t(v,e=>{u()&&e(b)});var w=F(v,2),D=N(w),k=t=>{var n=T(),r=B(n);o(r,()=>c.containerHeader,()=>({container:a(),count:e(f),isDragging:e(p)})),C(t,n)},j=e=>{var t=Gi(),n=L(t,!0);V(()=>l(n,a().label)),C(e,t)};t(D,e=>{c.containerHeader?e(k):e(j,-1)}),s(w),s(_);var M=F(_,2);d(M,a),s(h),V(()=>{g=i(h,1,`smrt-sortable__container svelte-1tr29x6`,null,g,{"smrt-sortable__container--disabled":a().disabled,"smrt-sortable__container--dragging":e(p)}),H(h,`data-smrt-sortable-container-id`,a().id),H(h,`data-smrt-sortable-container-item`,u()?a().id:void 0),H(h,`aria-label`,a().label)}),O(`dragover`,h,e=>e.preventDefault()),O(`drop`,h,t=>{R.drag?R.dropOnContainer(t,a().id):u()&&z.dropOnItem(t,S,e(A).findIndex(e=>e.id===a().id))}),C(r,h)},g=k(c,`reorderContainers`,3,!1),v=k(c,`allowSameContainerReorder`,3,!0),{t:y}=de(),b=`${u}-item-live`,x=`${u}-container-live`,S=`__smrt-sortable-containers__`,w,D=n(()=>g()?c.containers.filter(e=>e.fixed):[]),A=n(()=>g()?c.containers.filter(e=>!e.fixed):c.containers),j=n(()=>[...e(D),...e(A)]),ee=n(()=>{let e=new Map;for(let t of c.containers)e.set(t.id,[]);for(let t of c.items)e.get(t.containerId)?.push(t);return e}),P=n(()=>new Map(c.items.map(e=>[e.id,e]))),I=n(()=>new Map(c.containers.map(e=>[e.id,e])));function te(e){return Ri(y,e)}let R=K({root:()=>w,selectors:{container:`[data-smrt-sortable-container-id]`,containerKey:`smrtSortableContainerId`,item:`[data-smrt-sortable-item-id]`,itemKey:`smrtSortableItemId`},containers:()=>e(j),itemIds:t=>(e(ee).get(t)??[]).map(e=>e.id),itemLabel:t=>e(P).get(t)?.label,allowSameContainerReorder:()=>v(),enabled:()=>c.onmove!==void 0,orientation:()=>`vertical`,announce:te,focusTarget:e=>e.querySelector(`[data-smrt-sortable-handle="item"]`),async commit(t){let n=e(P).get(t.itemId),r=e(I).get(t.source.containerId),i=e(I).get(t.target.containerId);n&&r&&i&&await c.onmove?.({item:n,source:t.source,target:t.target,sourceContainer:r,targetContainer:i})}}),z=K({root:()=>w,selectors:{container:`[data-smrt-sortable-container-list]`,containerKey:`smrtSortableContainerList`,item:`[data-smrt-sortable-container-item]`,itemKey:`smrtSortableContainerItem`},containers:()=>[{id:S,label:c.label??y(Li[`ui.sortable.label`])}],itemIds:()=>e(A).map(e=>e.id),itemLabel:t=>e(I).get(t)?.label,allowSameContainerReorder:()=>!0,enabled:()=>g()&&c.oncontainermove!==void 0,orientation:()=>`vertical`,announce:te,focusTarget:e=>Array.from(e.children).find(e=>e.tagName===`HEADER`)?.querySelector(`[data-smrt-sortable-handle="container"]`)??null,async commit(t){let n=e(I).get(t.itemId);n&&await c.oncontainermove?.({container:n,source:t.source.index,target:t.target.index})}});function re(e,t){let n=R.drag?.target;return n?.containerId===e&&n.index===t}function ie(e,t){let n=R.drag?.itemId,r=0;for(let i=0;i<t;i+=1)e[i].id!==n&&(r+=1);return r}function U(e){return z.drag?.target.index===e}function ae(t){let n=z.drag?.itemId,r=0;for(let i of e(A)){if(i.id===t)break;i.id!==n&&(r+=1)}return r}var W=Yi(),oe=N(W);p(oe,17,()=>e(D),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)});var G=F(oe,2),se=r=>{var i=Ji();H(i,`data-smrt-sortable-container-list`,S);var a=N(i);p(a,17,()=>e(A),e=>e.id,(r,i)=>{var a=qi(),o=B(a),c=e=>{var t=Hi();C(e,t)},l=n(()=>U(ae(e(i).id))&&z.drag?.itemId!==e(i).id);t(o,t=>{e(l)&&t(c)});var u=F(o,2),d=N(u);f(d,()=>e(i),()=>!0),s(u),C(r,a)});var o=F(a,2),c=e=>{var t=Hi();C(e,t)},l=n(()=>U(e(A).filter(e=>e.id!==z.drag?.itemId).length));t(o,t=>{e(l)&&t(c)}),s(i),C(r,i)},ce=t=>{var n=T(),r=B(n);p(r,17,()=>e(A),e=>e.id,(t,n)=>{f(t,()=>e(n),()=>!1)}),C(t,n)};t(G,e=>{g()?e(se):e(ce,-1)});var le=F(G,2),ue=L(le,!0),fe=F(le,2),pe=L(fe,!0);s(W),M(W,e=>w=e,()=>w),V(e=>{H(W,`aria-label`,e),H(le,`id`,b),l(ue,R.announcement),H(fe,`id`,x),l(pe,z.announcement)},[()=>c.label??y(Li[`ui.sortable.label`])]),C(a,W),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);function Zi(e){let t=e-1;return t*t*t+1}function Qi(e){let t=typeof e==`string`&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||`px`]:[e,`px`]}function $i(e,{delay:t=0,duration:n=400,easing:r=Zi,x:i=0,y:a=0,opacity:o=0}={}){let s=getComputedStyle(e),c=+s.opacity,l=s.transform===`none`?``:s.transform,u=c*(1-o),[d,f]=Qi(i),[p,m]=Qi(a);return{delay:t,duration:n,easing:r,css:(e,t)=>`
3
3
  transform: ${l} translate(${(1-e)*d}${f}, ${(1-e)*p}${m});
4
- opacity: ${c-u*t}`}}var ea=c(`<span class="smrt-tenant-nav__attention svelte-jpnndf" data-attention="" aria-hidden="true"></span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),ta=c(`<span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span>`),na=c(`<span class="smrt-tenant-nav__icon smrt-tenant-nav__icon--placeholder svelte-jpnndf" aria-hidden="true"><!></span>`),ra=c(`<span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`),ia=c(`<small class="svelte-jpnndf"> </small>`),aa=c(`<strong class="svelte-jpnndf"> </strong> <!>`,1),oa=c(`<a class="smrt-tenant-nav__action svelte-jpnndf"><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span></a>`),sa=c(`<a class="svelte-jpnndf"><!> <span class="svelte-jpnndf"> </span> <!> <!></a>`),ca=c(`<div class="smrt-tenant-nav__children svelte-jpnndf"></div>`),la=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><!> <!> <!></a> <!></div> <!></div>`),ua=c(`<strong class="svelte-jpnndf"> </strong>`),da=c(`<div class="smrt-tenant-nav__subnav svelte-jpnndf"><!></div>`),fa=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span> <!></a></div> <!></div>`),pa=c(`<div class="smrt-tenant-nav__group smrt-tenant-nav__group--flat" role="group"><div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></div>`),ma=c(`<span aria-hidden="true" class="svelte-jpnndf"> </span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),ha=c(`<span class="svelte-jpnndf"> </span>`),ga=c(`<details class="smrt-tenant-nav__group" open=""><summary class="smrt-tenant-nav__heading svelte-jpnndf"><!></summary> <div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></details>`),_a=c(`<nav data-smrt-component="TenantNav"><!> <!></nav>`);function va(a,o){_(o,!0);let c=(e,n=m,r=m)=>{var i=T(),a=B(i),s=e=>{var t=T(),i=B(t);v(i,()=>o.iconComponent,(e,t)=>{t(e,{get name(){return n()},get size(){return r()}})}),C(e,t)},c=e=>{Ee(e,{get name(){return n()},get size(){return r()}})};t(a,e=>{o.iconComponent?e(s):e(c,-1)}),C(e,i)},u=(r,i=m)=>{let a=n(()=>ie(i()));var o=T(),s=B(o),c=t=>{var n=ea(),r=F(B(n),2),i=L(r);V(()=>l(i,`(${e(a)??``})`)),C(t,n)};t(s,t=>{e(a)&&t(c)}),C(r,o)},d=(r,a=m,d=m)=>{var _=T(),v=B(_);p(v,25,a,e=>e.href,(r,a)=>{let m=n(()=>z(e(a),d()??ee(e(a)))?e(a).action:void 0);var _=la(),v=N(_),y=N(v);let b;var x=N(y),w=t=>{var n=ta(),r=N(n);c(r,()=>e(a).icon,()=>18),s(n),C(t,n)},T=e=>{var t=na(),n=N(t);Ee(n,{get name(){return ge},size:18}),s(t),C(e,t)};t(x,t=>{e(a).icon?t(w):S()&&t(T,1)});var D=F(x,2),O=t=>{var n=ra(),r=L(n,!0);V(()=>l(r,e(a).label)),C(t,n)},k=n=>{var r=aa(),i=B(r),o=L(i,!0),s=F(i,2),c=t=>{var n=ia(),r=L(n,!0);V(()=>l(r,e(a).badge)),C(t,n)};t(s,t=>{e(a).badge!==null&&e(a).badge!==void 0&&t(c)}),V(()=>l(o,e(a).label)),C(n,r)};t(D,e=>{S()?e(O):e(k,-1)});var A=F(D,2);u(A,()=>e(a)),s(y);var P=F(y,2),I=t=>{var n=oa(),r=N(n),i=N(r);c(i,()=>e(m).icon??f,()=>16),s(r),s(n),V(t=>{H(n,`href`,e(m).href),H(n,`aria-label`,e(m).label),H(n,`aria-current`,t),H(n,`title`,e(m).label)},[()=>M(e(m))?`page`:void 0]),E(`click`,n,function(...e){o.onNavigate?.apply(this,e)}),C(t,n)};t(P,t=>{e(m)&&t(I)}),s(v);var te=F(v,2),R=n=>{var r=ca();p(r,21,()=>e(a).children,e=>e.href,(n,r)=>{var i=sa(),a=N(i),d=t=>{var n=ta(),i=N(n);c(i,()=>e(r).icon,()=>16),s(n),C(t,n)};t(a,t=>{e(r).icon&&t(d)});var f=F(a,2),p=L(f,!0),m=F(f,2),h=t=>{var n=ia(),i=L(n,!0);V(()=>l(i,e(r).badge)),C(t,n)};t(m,t=>{e(r).badge!==null&&e(r).badge!==void 0&&t(h)});var g=F(m,2);u(g,()=>e(r)),s(i),V(t=>{H(i,`href`,e(r).href),H(i,`aria-current`,t),l(p,e(r).label)},[()=>M(e(r))?`page`:void 0]),E(`click`,i,function(...e){o.onNavigate?.apply(this,e)}),C(n,i)}),s(r),C(n,r)};t(te,t=>{e(a).children?.length&&!S()&&t(R)}),s(_),V((t,n)=>{H(y,`href`,e(a).href),H(y,`aria-current`,t),H(y,`title`,S()?e(a).label:e(a).description),b=i(y,1,`svelte-jpnndf`,null,b,{"smrt-tenant-nav__link--visible-active":n})},[()=>M(e(a))?`page`:void 0,()=>ne(e(a))]),E(`click`,y,function(...e){o.onNavigate?.apply(this,e)}),g(1,_,()=>$i,j),h(_,()=>_e,null),C(r,_)}),C(r,_)},f=`settings`,y=k(o,`items`,19,()=>[]),b=k(o,`groups`,19,()=>[]),x=k(o,`currentHref`,3,``),S=k(o,`collapsed`,3,!1),w=k(o,`navMode`,3,`items`),{t:D}=de(),O=A(!1);re(()=>{U(O,!0)});function j(){let t=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,n=typeof Element<`u`&&typeof Element.prototype.animate==`function`;return{x:12,duration:e(O)&&!t&&n?260:0}}function M(e){return e.href===x()||x().startsWith(`${e.href}/`)}function ee(e){return M(e)||!!e.children?.some(e=>M(e))||!!e.action&&M(e.action)}function P(e){return e.items.some(ee)}function I(e){return e.id??e.heading}function te(e){return e.href??o.sectionHref?.(I(e))??e.items[0]?.href}function R(e){let t=te(e);return!!t&&(t===x()||x().startsWith(`${t}/`))||P(e)}function z(e,t){return S()||!e.action?!1:e.action.visibility!==`active`||t}function ne(e){return M(e)?!0:S()&&ee(e)}function ie(e){return e.attention?typeof e.attention==`string`&&e.attention.trim()?e.attention.trim():D(Z[`ui.tenant_nav.needs_attention`]):null}function ae(e){return e.trim().charAt(0).toLocaleUpperCase()||`?`}var W=_a();let oe;var G=N(W);d(G,y);var se=F(G,2);p(se,17,b,e=>I(e),(r,a)=>{var c=T(),u=B(c),f=r=>{let c=n(()=>te(e(a)));var u=T(),f=B(u),p=r=>{var u=fa(),f=N(u),p=N(f);let m;var h=N(p),_=N(h);{let t=n(()=>e(a).icon??`folder`);Ee(_,{get name(){return e(t)},size:18,get iconComponent(){return o.iconComponent}})}s(h);var v=F(h,2),y=t=>{var n=ra(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)},b=t=>{var n=ua(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)};t(v,e=>{S()?e(y):e(b,-1)}),s(p),s(f);var T=F(f,2),D=t=>{var r=da(),i=N(r);{let t=n(()=>P(e(a)));d(i,()=>e(a).items,()=>e(t))}s(r),C(t,r)};t(T,t=>{w()===`sections-with-items`&&!S()&&e(a).items.length&&t(D)}),s(u),V((t,n,r)=>{H(u,`data-nav-section`,t),H(p,`href`,e(c)),m=i(p,1,`smrt-tenant-nav__section-link svelte-jpnndf`,null,m,{"smrt-tenant-nav__link--visible-active":n}),H(p,`aria-current`,r),H(p,`title`,S()?e(a).heading:void 0)},[()=>I(e(a)),()=>R(e(a)),()=>e(c)===x()?`page`:R(e(a))?`true`:void 0]),E(`click`,p,function(...e){o.onNavigate?.apply(this,e)}),g(1,u,()=>$i,j),C(r,u)};t(f,t=>{e(c)&&t(p)}),C(r,u)},p=t=>{var r=pa(),i=N(r),o=N(i);{let t=n(()=>P(e(a)));d(o,()=>e(a).items,()=>e(t))}s(i),s(r),V(()=>H(r,`aria-label`,e(a).heading)),C(t,r)},m=r=>{var i=ga(),o=N(i),c=N(o),u=t=>{var n=ma(),r=B(n),i=L(r,!0),o=F(r,2),s=L(o,!0);V(t=>{l(i,t),l(s,e(a).heading)},[()=>ae(e(a).heading)]),C(t,n)},f=t=>{var n=ha(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)};t(c,e=>{S()?e(u):e(f,-1)}),s(o);var p=F(o,2),m=N(p);{let t=n(()=>P(e(a)));d(m,()=>e(a).items,()=>e(t))}s(p),s(i),V(()=>H(i,`aria-label`,e(a).heading)),C(r,i)};t(u,t=>{w()===`sections`||w()===`sections-with-items`?t(f):e(a).showTitle===!1?t(p,1):t(m,-1)}),C(r,c)}),s(W),V(e=>{oe=i(W,1,`smrt-tenant-nav svelte-jpnndf`,null,oe,{"smrt-tenant-nav--collapsed":S()}),H(W,`data-density`,o.density),H(W,`aria-label`,e)},[()=>o[`aria-label`]||D(Z[`ui.tenant_nav.tenant_navigation`])]),C(a,W),r()}D([`click`]);var ya=c(`<!> <!>`,1),ba=c(`<strong class="svelte-vi5c2s"> </strong>`),xa=c(`<span class="smrt-nav-editor__top svelte-vi5c2s"> </span>`),Sa=c(`<span class="smrt-nav-editor__section-icon svelte-vi5c2s"><!></span>`),Ca=c(`<div class="smrt-nav-editor__icons svelte-vi5c2s" role="group"></div>`),wa=c(`<div class="smrt-nav-editor__toolbar svelte-vi5c2s" role="group" data-testid="section-toolbar"><!> <!> <!> <!> <!> <!></div>`),Ta=c(`<div class="smrt-nav-editor__head svelte-vi5c2s"><button type="button" data-section-title="" aria-haspopup="true"><!> </button> <span class="smrt-nav-editor__overlay svelte-vi5c2s"><!> <!></span> <!></div>`),Ea=c(`<span class="smrt-nav-editor__icon svelte-vi5c2s" aria-hidden="true"><!></span>`),Da=c(`<span><!> <!></span> <!> <!> <!>`,1),Oa=c(`<nav class="smrt-nav-editor svelte-vi5c2s" data-layout-editing="" data-smrt-component="ShellNavEditor"><!> <!></nav>`);function ka(a,c){_(c,!0);let u=(r,i=m)=>{var a=ya(),o=B(a);{let t=n(()=>i().hidden?`eyeOff`:`eye`),r=n(()=>!i().hidden),a=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:i().label}));we(o,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(a)},onclick:()=>K(i().id,i().hidden)})}var s=F(o,2),c=t=>{{let r=n(()=>i().titleVisible?`heading`:`headingOff`),a=n(()=>g(Z[`ui.shell_layout_editor.show_title_for`],{label:i().label}));we(t,{get icon(){return e(r)},get pressed(){return i().titleVisible},get label(){return e(a)},onclick:()=>b.setSectionTitleVisible(i().id,!i().titleVisible)})}};t(s,e=>{h()!==`sections`&&e(c)}),C(r,a)},f=(e,t=m)=>{var n=T(),r=B(n);o(r,()=>c.sectionActions??m,()=>({sectionId:t().id,label:t().label,custom:t().custom,editing:!0})),C(e,n)},h=k(c,`navMode`,3,`items`),{t:g}=de(),b=z(()=>c.controller??Oe()),x=n(()=>b.sections),S=n(()=>e(x).map(e=>({id:e.id,label:e.heading??g(Z[`ui.shell_layout_editor.top_level`]),fixed:e.group===null,root:e.group===null,hidden:e.hidden,custom:e.custom,titleVisible:e.titleVisible,count:e.items.length,icon:e.icon??`folder`}))),w=n(()=>(h()===`sections`?[]:e(x)).flatMap(e=>e.items.map(t=>({id:t.id,containerId:e.id,label:t.label})))),D=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.defaultLabel])))),ee=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.item.icon])))),P=A(void 0),I=A(null);function te(){return typeof window<`u`&&window.matchMedia?.(`(hover: hover) and (pointer: fine)`).matches===!0}function R(t){return e(P)?.querySelector(`[data-nav-section="${CSS.escape(t)}"]`)??null}function ne(t,n){n.pointerType!==`touch`&&te()&&(e(I)?.pinned||U(I,{id:t,pinned:!1},!0))}async function re(t){if(e(I)?.id===t&&e(I).pinned){U(I,null);return}U(I,{id:t,pinned:!0},!0),await ie();let n=R(t)?.querySelector(`input[data-section-name]`);n?.focus(),n?.select()}function ae(t){e(I)?.id===t&&!e(I).pinned&&U(I,null)}function W(t,n){n.key===`Escape`&&e(I)?.id===t&&(n.preventDefault(),n.stopPropagation(),e(G)===t?(U(G,null),se(t)?.focus()):(U(I,null),R(t)?.querySelector(`button[data-section-title]`)?.focus()))}function oe(t,n){if(e(I)?.id!==t||!e(I).pinned)return;let r=n.relatedTarget;r instanceof Node&&!R(t)?.contains(r)&&U(I,null)}j(()=>{let t=e(I);if(!t?.pinned||typeof document>`u`)return;let n=e=>{e.target instanceof Node&&!R(t.id)?.contains(e.target)&&U(I,null)};return document.addEventListener(`pointerdown`,n,!0),()=>document.removeEventListener(`pointerdown`,n,!0)});let G=A(null);function se(e){return R(e)?.querySelector(`button[data-section-icon]`)??null}function ce(e,t){b.setSectionIcon(e,t),U(G,null),se(e)?.focus()}j(()=>{e(G)!==null&&e(I)?.id!==e(G)&&U(G,null)});function le(e){return e.replace(/([A-Z])/g,` $1`).toLowerCase()}let ue=A(null);async function fe(t){U(ue,t,!0),await ie();let n=e(P)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function pe(t,n){e(ue)===t&&(U(ue,null),b.renameItem(t,n))}function ge(t){U(ue,null),e(P)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function K(e,t){t?b.show(e):b.hide(e)}function q(t,n){b.renameSection(t,n.value),n.value=e(S).find(e=>e.id===t)?.label??``}async function _e(){let e=b.createSection(g(Z[`ui.shell_layout_editor.new_section_label`]));e&&(await ie(),await re(e))}function ve(e,t,n){n>0&&!globalThis.confirm?.(g(Z[`ui.shell_layout_editor.delete_confirm`],{label:t}))||(U(I,null),b.deleteSection(e))}function ye(e){b.moveItem(e.item.id,e.target.containerId,e.target.index)}function be(e){b.moveSection(e.container.id,e.target)}var xe=Oa(),Se=N(xe);{let r=(r,a)=>{let o=()=>(a?.()).container,d=n(()=>e(S).find(e=>e.id===o().id));var m=T(),_=B(m),v=e=>{var t=ba(),n=L(t,!0);V(()=>l(n,o().label)),C(e,t)},y=e=>{var t=xa(),n=L(t,!0);V(()=>l(n,o().label)),C(e,t)},b=r=>{var a=Ta(),o=N(a);let m;var _=N(o),v=t=>{var n=Sa(),r=N(n);Ee(r,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}}),s(n),C(t,n)};t(_,e=>{h()!==`items`&&e(v)});var y=F(_,1,!0);s(o);var b=F(o,2),x=N(b);u(x,()=>e(d));var S=F(x,2);f(S,()=>e(d)),s(b);var w=F(b,2),T=r=>{var i=wa(),a=N(i);{let t=n(()=>g(Z[`ui.shell_layout_editor.section_name`],{label:e(d).label}));he(a,{class:`smrt-nav-editor__name`,interaction:!1,get"data-section-name"(){return e(d).id},get"aria-label"(){return e(t)},get value(){return e(d).label},onchange:t=>q(e(d).id,t.currentTarget),onkeydown:t=>{t.key===`Enter`&&(t.preventDefault(),q(e(d).id,t.currentTarget))}})}var o=F(a,2);u(o,()=>e(d));var l=F(o,2),m=t=>{{let r=n(()=>e(G)===e(d).id),i=n(()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label}));we(t,{get"data-section-icon"(){return e(d).id},"aria-haspopup":`true`,get"aria-expanded"(){return e(r)},get label(){return e(i)},onclick:()=>U(G,e(G)===e(d).id?null:e(d).id,!0),children:(t,n)=>{Ee(t,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}})},$$slots:{default:!0}})}};t(l,e=>{h()!==`items`&&e(m)});var _=F(l,2),v=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.delete_section`],{label:e(d).label}));we(t,{icon:`trash`,get label(){return e(r)},onclick:()=>ve(e(d).id,e(d).label,e(d).count)})}};t(_,t=>{e(d).custom&&t(v)});var y=F(_,2);f(y,()=>e(d));var b=F(y,2),x=t=>{var r=Ca();p(r,20,()=>ke,e=>e,(t,r)=>{{let i=n(()=>e(d).icon===r),a=n(()=>g(Z[`ui.shell_layout_editor.icon_option`],{icon:le(r)}));we(t,{get"data-icon-option"(){return r},get pressed(){return e(i)},get label(){return e(a)},onclick:()=>ce(e(d).id,r),children:(e,t)=>{Ee(e,{get name(){return r}})},$$slots:{default:!0}})}}),s(r),V(e=>H(r,`aria-label`,e),[()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label})]),C(t,r)};t(b,t=>{h()!==`items`&&e(G)===e(d).id&&t(x)}),s(i),V(e=>H(i,`aria-label`,e),[()=>g(Z[`ui.layout_edit.section_options`],{label:e(d).label})]),C(r,i)};t(w,t=>{e(I)?.id===e(d).id&&t(T)}),s(a),V(t=>{H(a,`data-nav-section`,e(d).id),H(a,`data-toolbar-open`,e(I)?.id===e(d).id?``:void 0),m=i(o,1,`smrt-nav-editor__title svelte-vi5c2s`,null,m,{"smrt-nav-editor__title--off":!e(d).titleVisible,"smrt-nav-editor__title--hidden":e(d).hidden}),H(o,`aria-expanded`,e(I)?.id===e(d).id),H(o,`aria-label`,t),l(y,e(d).label)},[()=>g(Z[`ui.layout_edit.edit_section`],{label:e(d).label})]),O(`pointerleave`,a,()=>ae(e(d).id)),E(`keydown`,a,t=>W(e(d).id,t)),E(`focusout`,a,t=>oe(e(d).id,t)),O(`pointerenter`,o,t=>ne(e(d).id,t)),E(`click`,o,()=>re(e(d).id)),C(r,a)};t(_,t=>{e(d)?e(d).root?t(y,1):t(b,-1):t(v)}),C(r,m)},a=(r,a)=>{let o=()=>(a?.()).item,u=()=>(a?.()).container,d=n(()=>b.isHidden(o().id)),f=n(()=>e(ee).get(o().id)),p=n(()=>e(D).get(o().id));var m=Da(),h=B(m);let _;var y=N(h),x=n=>{var r=Ea(),i=N(r),a=t=>{var n=T(),r=B(n);v(r,()=>c.iconComponent,(t,n)=>{n(t,{get name(){return e(f)},size:18})}),C(t,n)},o=t=>{Ee(t,{get name(){return e(f)},size:18})};t(i,e=>{c.iconComponent?e(a):e(o,-1)}),s(r),C(n,r)};t(y,t=>{e(f)&&t(x)});var S=F(y,2),w=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.item_name`],{label:o().label}));he(t,{class:`smrt-nav-editor__item-name`,interaction:!1,get"data-item-name"(){return o().id},get"aria-label"(){return e(r)},get value(){return o().label},onblur:e=>pe(o().id,e.currentTarget.value),onkeydown:e=>{if(e.key===`Enter`){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.value;pe(o().id,t),ge(o().id)}else e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),ge(o().id))}})}},E=t=>{var n=ba(),r=L(n,!0);V(()=>{H(n,`title`,e(p)===o().label?void 0:e(p)),l(r,o().label)}),C(t,n)};t(S,t=>{e(ue)===o().id?t(w):t(E,-1)}),s(h);var O=F(h,2);{let t=n(()=>g(Z[`ui.shell_layout_editor.rename_item`],{label:o().label}));we(O,{icon:`edit`,get"data-item-rename"(){return o().id},get label(){return e(t)},onclick:()=>fe(o().id)})}var k=F(O,2),A=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.reset_item`],{label:o().label,original:e(p)}));we(t,{icon:`undo`,get label(){return e(r)},onclick:()=>b.renameItem(o().id,null)})}};t(k,t=>{e(p)!==void 0&&e(p)!==o().label&&t(A)});var j=F(k,2);{let t=n(()=>e(d)?`eyeOff`:`eye`),r=n(()=>!e(d)),i=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:o().label}));we(j,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>K(o().id,e(d))})}V(e=>_=i(h,1,`smrt-nav-editor__row svelte-vi5c2s`,null,_,{"smrt-nav-editor__row--muted":e}),[()=>e(d)||b.isHidden(u().id)]),C(r,m)},o=n(()=>g(Z[`ui.shell_layout_editor.sortable_label`]));Xi(Se,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(o)},reorderContainers:!0,onmove:ye,oncontainermove:be,containerHeader:r,item:a,$$slots:{containerHeader:!0,item:!0}})}var Ce=F(Se,2);me(Ce,{variant:`secondary`,size:`sm`,class:`smrt-nav-editor__new`,onclick:_e,children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>g(Z[`ui.shell_layout_editor.new_section`])]),C(e,n)},$$slots:{default:!0}}),s(xe),M(xe,e=>U(P,e),()=>e(P)),V(e=>{H(xe,`data-nav-mode`,h()),H(xe,`aria-label`,e)},[()=>c[`aria-label`]||g(Z[`ui.shell_layout_editor.sortable_label`])]),C(a,xe),r()}D([`keydown`,`focusout`,`click`]);var Aa=c(`<strong class="svelte-nwjioo"> </strong>`),ja=c(`<span class="smrt-section-menu__desc svelte-nwjioo"> </span>`),Ma=c(`<span><!> <!> <!> <!></span> <!> <!> <!>`,1),Na=c(`<p class="smrt-section-menu__empty svelte-nwjioo"> </p>`),Pa=c(`<span class="smrt-section-menu__meta svelte-nwjioo"><!></span>`),Fa=c(`<span class="smrt-section-menu__actions svelte-nwjioo"><!></span>`),Ia=c(`<div class="smrt-section-menu__card-foot svelte-nwjioo"><!> <!></div>`),La=c(`<li class="smrt-section-menu__card svelte-nwjioo"><a class="smrt-section-menu__card-link svelte-nwjioo"><span class="smrt-section-menu__card-heading svelte-nwjioo"><span class="smrt-section-menu__card-icon svelte-nwjioo"><!></span> <span class="smrt-section-menu__card-title svelte-nwjioo"> </span></span> <!></a> <!></li>`),Ra=c(`<ul class="smrt-section-menu__cards svelte-nwjioo"></ul>`),za=c(`<li class="smrt-section-menu__item svelte-nwjioo"><a class="smrt-section-menu__link svelte-nwjioo"><!> <span class="smrt-section-menu__label svelte-nwjioo"> </span></a> <!> <!> <svg class="smrt-section-menu__chevron svelte-nwjioo" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></li>`),Ba=c(`<ul class="smrt-section-menu__list svelte-nwjioo"></ul>`),Va=c(`<div data-smrt-component="ShellSectionMenu"><!></div>`);function Ha(a,c){_(c,!0);let u=k(c,`layout`,3,`list`),{t:d}=de(),f=z(()=>c.controller??Oe()),g=n(()=>f.sections.find(e=>e.id===c.sectionId)),v=n(()=>f.editing),y=n(()=>e(g)?.heading??c.sectionId),b=n(()=>(e(g)?.items??[]).filter(t=>e(v)||!t.hidden).map(e=>({id:e.id,href:e.item.href,label:e.label,defaultLabel:e.defaultLabel,icon:e.item.icon,hidden:e.hidden,item:e.item}))),x=n(()=>c[`aria-label`]||d(Z[`ui.section_menu.label`],{label:e(y)})),S=n(()=>[{id:c.sectionId,label:e(x)}]),w=n(()=>e(b).map(e=>({id:e.id,containerId:c.sectionId,label:e.label}))),D=n(()=>new Map(e(b).map(e=>[e.id,e]))),O=A(void 0),j=A(null);async function ee(t){U(j,t,!0),await ie();let n=e(O)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function P(t,n){e(j)===t&&(U(j,null),f.renameItem(t,n))}function I(t){U(j,null),e(O)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function te(e,t){t?f.show(e):f.hide(e)}function R(e){f.moveItem(e.item.id,c.sectionId,e.target.index)}var ne=Va();let re;var ae=N(ne),W=r=>{Xi(r,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(x)},onmove:R,item:(r,a)=>{let p=()=>(a?.()).item,h=n(()=>e(D).get(p().id));var g=T(),_=B(g),v=r=>{var a=Ma(),p=B(a);let g;var _=N(p),v=t=>{Ee(t,{get name(){return e(h).icon},get iconComponent(){return c.iconComponent}})};t(_,t=>{e(h).icon&&t(v)});var y=F(_,2),b=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.item_name`],{label:e(h).label}));he(t,{class:`smrt-section-menu__name`,interaction:!1,get"data-item-name"(){return e(h).id},get"aria-label"(){return e(r)},get value(){return e(h).label},onblur:t=>P(e(h).id,t.currentTarget.value),onkeydown:t=>{if(t.key===`Enter`){t.preventDefault(),t.stopPropagation();let n=t.currentTarget.value;P(e(h).id,n),I(e(h).id)}else t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),I(e(h).id))}})}},x=t=>{var n=Aa(),r=L(n,!0);V(()=>{H(n,`title`,e(h).defaultLabel===e(h).label?void 0:e(h).defaultLabel),l(r,e(h).label)}),C(t,n)};t(y,t=>{e(j)===e(h).id?t(b):t(x,-1)});var S=F(y,2);o(S,()=>c.meta??m,()=>e(h));var w=F(S,2),T=t=>{var n=ja(),r=L(n,!0);V(()=>l(r,e(h).item.description)),C(t,n)};t(w,t=>{u()===`cards`&&e(h).item.description&&t(T)}),s(p);var E=F(p,2);{let t=n(()=>d(Z[`ui.shell_layout_editor.rename_item`],{label:e(h).label}));we(E,{icon:`edit`,get"data-item-rename"(){return e(h).id},get label(){return e(t)},onclick:()=>ee(e(h).id)})}var D=F(E,2),O=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.reset_item`],{label:e(h).label,original:e(h).defaultLabel}));we(t,{icon:`undo`,get label(){return e(r)},onclick:()=>f.renameItem(e(h).id,null)})}};t(D,t=>{e(h).defaultLabel!==e(h).label&&t(O)});var k=F(D,2);{let t=n(()=>e(h).hidden?`eyeOff`:`eye`),r=n(()=>!e(h).hidden),i=n(()=>d(Z[`ui.shell_layout_editor.show_entry`],{label:e(h).label}));we(k,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>te(e(h).id,e(h).hidden)})}V(()=>g=i(p,1,`smrt-section-menu__row svelte-nwjioo`,null,g,{"smrt-section-menu__row--muted":e(h).hidden})),C(r,a)};t(_,t=>{e(h)&&t(v)}),C(r,g)},$$slots:{item:!0}})},oe=e=>{var t=Na(),n=L(t,!0);V(e=>l(n,e),[()=>d(Z[`ui.section_menu.empty`])]),C(e,t)},G=r=>{var i=Ra();p(i,29,()=>e(b),e=>e.id,(r,i)=>{var a=La(),u=N(a),d=N(u),f=N(d),p=N(f);{let t=n(()=>e(i).icon??`folder`);Ee(p,{get name(){return e(t)},size:28,get iconComponent(){return c.iconComponent}})}s(f);var m=F(f,2),g=L(m,!0);s(d);var _=F(d,2),v=t=>{var n=ja(),r=L(n,!0);V(()=>l(r,e(i).item.description)),C(t,n)};t(_,t=>{e(i).item.description&&t(v)}),s(u);var y=F(u,2),b=n=>{var r=Ia(),a=N(r),l=t=>{var n=Pa(),r=N(n);o(r,()=>c.meta,()=>e(i)),s(n),C(t,n)};t(a,e=>{c.meta&&e(l)});var u=F(a,2),d=t=>{var n=Fa(),r=N(n);o(r,()=>c.actions,()=>e(i)),s(n),C(t,n)};t(u,e=>{c.actions&&e(d)}),s(r),C(n,r)};t(y,e=>{(c.meta||c.actions)&&e(b)}),s(a),V(()=>{H(u,`href`,e(i).href),l(g,e(i).label)}),E(`click`,u,function(...e){c.onNavigate?.apply(this,e)}),h(a,()=>_e,null),C(r,a)}),s(i),V(()=>H(i,`aria-label`,e(x))),C(r,i)},se=n=>{var r=Ba();p(r,29,()=>e(b),e=>e.id,(n,r)=>{var i=za(),a=N(i),u=N(a),d=t=>{Ee(t,{get name(){return e(r).icon},get iconComponent(){return c.iconComponent}})};t(u,t=>{e(r).icon&&t(d)});var f=F(u,2),p=L(f,!0);s(a);var m=F(a,2),g=t=>{var n=Pa(),i=N(n);o(i,()=>c.meta,()=>e(r)),s(n),C(t,n)};t(m,e=>{c.meta&&e(g)});var _=F(m,2),v=t=>{var n=Fa(),i=N(n);o(i,()=>c.actions,()=>e(r)),s(n),C(t,n)};t(_,e=>{c.actions&&e(v)});var y=F(_,2),b=L(y);s(i),V(()=>{H(a,`href`,e(r).href),l(p,e(r).label),H(b,`d`,ye.chevronRight)}),E(`click`,a,function(...e){c.onNavigate?.apply(this,e)}),h(i,()=>_e,null),C(n,i)}),s(r),V(()=>H(r,`aria-label`,e(x))),C(n,r)};t(ae,t=>{e(v)?t(W):e(b).length===0?t(oe,1):u()===`cards`?t(G,2):t(se,-1)}),s(ne),M(ne,e=>U(O,e),()=>e(O)),V(()=>{re=i(ne,1,`smrt-section-menu svelte-nwjioo`,null,re,{"smrt-section-menu--cards":u()===`cards`}),H(ne,`data-editing`,e(v)?``:void 0)}),C(a,ne),r()}D([`click`]);var Ua=c(`<span class="smrt-workspace-account-menu__context svelte-1703h4r"> </span>`),Wa=c(`<span class="smrt-workspace-account-menu__email svelte-1703h4r"> </span>`),Ga=c(`<div class="smrt-workspace-account-menu__header svelte-1703h4r"><span class="smrt-workspace-account-menu__name svelte-1703h4r"> </span> <!></div>`),Ka=c(`<a role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </a>`),qa=c(`<button type="button" role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </button>`),Ja=c(`<p class="smrt-workspace-account-menu__error svelte-1703h4r" role="alert" data-smrt-part="error"> </p>`),Ya=c(`<div data-smrt-part="panel"><!> <div role="menu" tabindex="-1" class="smrt-workspace-account-menu__menu svelte-1703h4r"><!> <!></div></div>`),Xa=c(`<div class="smrt-workspace-account-menu svelte-1703h4r" data-smrt-component="WorkspaceAccountMenu"><button type="button" class="smrt-workspace-account-menu__trigger svelte-1703h4r" data-smrt-part="trigger" aria-haspopup="menu"><span class="smrt-workspace-account-menu__open svelte-1703h4r"> </span> <!> <span class="smrt-workspace-account-menu__identity svelte-1703h4r"><span class="smrt-workspace-account-menu__summary svelte-1703h4r"> </span> <!></span> <span class="smrt-workspace-account-menu__indicator svelte-1703h4r" aria-hidden="true">•••</span></button> <!></div>`);function Za(a,o){let c=ne();_(o,!0);let u=`workspace-account:sign-out`,d=`workspace-account:tenant:`,f=k(o,`compact`,3,!1),m=k(o,`userLabel`,3,``),h=k(o,`email`,3,``),g=k(o,`tenantLabel`,3,``),v=k(o,`roleLabel`,3,``),b=k(o,`tenants`,19,()=>[]),x=k(o,`currentTenantId`,3,null),S=k(o,`placement`,3,`top-start`),w=k(o,`disabled`,3,!1),{t:D}=de(),O=`smrt-account-menu-${c}`,ee=n(()=>m()||o.userName),I=n(()=>g()||b().find(e=>e.id===x())?.label||``),te=n(()=>[e(I),v()].filter(Boolean).join(` · `)),R=n(()=>[e(ee),e(I),v()].filter(Boolean).join(` · `)),z=n(()=>!!h()&&h()!==e(ee)),re=n(()=>{let e=[];if(b().length>1&&o.onTenantSelect)for(let t of b()){let n=t.id===x(),r=t.roleLabel?` — ${t.roleLabel}`:``;e.push({id:`${d}${t.id}`,label:n?`${D(Z[`ui.workspace_account_menu.current_tenant`],{tenant:t.label})}${r}`:`${t.label}${r}`,disabled:t.disabled||n})}return o.settingsHref&&e.push({id:`workspace-account:settings`,label:D(Z[`ui.app_shell.account_settings`]),href:o.settingsHref}),(o.onSignOut||o.signOutHref)&&e.push({id:u,label:D(Z[`ui.workspace_account_menu.sign_out`]),href:o.onSignOut?void 0:o.signOutHref}),e}),ae=A(!1),W=A(!1),oe=A(!1),G=A(null),se=A(null),ce=P([]),le=n(()=>e(re).map((e,t)=>e.disabled?-1:t).filter(e=>e>=0));async function ue(t=!1){U(ae,!0),await ie();let n=t?e(le)[e(le).length-1]:e(le)[0];n!=null&&ce[n]?.focus()}function fe(t=!0){U(ae,!1),t&&e(se)?.focus()}async function me(){if(!e(W)&&o.onSignOut){U(W,!0),U(oe,!1);try{let e=o.onSignOut();typeof e==`object`&&e&&typeof e.then==`function`&&await e}catch{U(oe,!0),U(W,!1);return}U(W,!1),fe()}}function he(e){e.disabled||(e.id===u&&o.onSignOut?me():(e.id.startsWith(d)&&o.onTenantSelect?.(e.id.slice(25)),fe(!e.href)))}function ge(t){if(e(le).length===0)return;let n=ce.indexOf(document.activeElement),r=e(le).indexOf(n);ce[e(le)[(r+t+e(le).length)%e(le).length]]?.focus()}function K(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),ue(e.key===`ArrowUp`))}function q(t){switch(t.key){case`ArrowDown`:t.preventDefault(),ge(1);break;case`ArrowUp`:t.preventDefault(),ge(-1);break;case`Home`:t.preventDefault(),ce[e(le)[0]]?.focus();break;case`End`:t.preventDefault(),ce[e(le)[e(le).length-1]]?.focus();break;case`Escape`:t.preventDefault(),t.stopPropagation(),fe();break;case`Tab`:fe(!1)}}j(()=>{if(!e(ae))return;let t=t=>{e(G)&&!e(G).contains(t.target)&&fe(!1)};return document.addEventListener(`click`,t,!0),()=>document.removeEventListener(`click`,t,!0)});var _e=Xa(),ve=N(_e),ye=N(ve),be=L(ye,!0),xe=F(ye,2);pe(xe,{get src(){return o.avatarUrl},get name(){return o.userName},size:`sm`,"aria-hidden":`true`});var Se=F(xe,2),Ce=N(Se),we=L(Ce,!0),Te=F(Ce,2),Ee=t=>{var n=Ua(),r=L(n,!0);V(()=>l(r,e(te))),C(t,n)};t(Te,t=>{e(te)&&t(Ee)}),s(Se),y(2),s(ve),M(ve,e=>U(se,e),()=>e(se));var De=F(ve,2),Oe=n=>{var r=Ya(),a=N(r),o=n=>{var r=Ga(),i=N(r),a=L(i,!0),o=F(i,2),c=e=>{var t=Wa(),n=L(t,!0);V(()=>l(n,h())),C(e,t)};t(o,t=>{e(z)&&t(c)}),s(r),V(()=>l(a,e(ee))),C(n,r)};t(a,t=>{(e(ee)||e(z))&&t(o)});var c=F(a,2),d=N(c);p(d,19,()=>e(re),e=>e.id,(n,r,i)=>{var a=T(),o=B(a),s=t=>{var n=Ka(),a=L(n,!0);M(n,(e,t)=>ce[t]=e,e=>ce?.[e],()=>[e(i)]),V(()=>{H(n,`href`,e(r).href),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)},c=t=>{var n=qa(),a=L(n,!0);M(n,(e,t)=>ce[t]=e,e=>ce?.[e],()=>[e(i)]),V(()=>{n.disabled=e(r).disabled||e(r).id===u&&e(W),H(n,`aria-busy`,e(r).id===u&&e(W)?`true`:void 0),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)};t(o,t=>{e(r).href?t(s):t(c,-1)}),C(n,a)});var f=F(d,2),m=e=>{var t=Ja(),n=L(t,!0);V(e=>l(n,e),[()=>D(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(f,t=>{e(oe)&&t(m)}),s(c),s(r),V(e=>{i(r,1,`smrt-workspace-account-menu__popover smrt-workspace-account-menu__popover--${S()??``}`,`svelte-1703h4r`),H(c,`id`,O),H(c,`aria-label`,e)},[()=>D(Z[`ui.app_shell.account_item`])]),E(`keydown`,c,q),C(n,r)};t(De,t=>{e(ae)&&t(Oe)}),s(_e),M(_e,e=>U(G,e),()=>e(G)),V((t,n)=>{H(_e,`data-density`,o.density),H(_e,`data-compact`,f()?``:void 0),H(_e,`title`,e(R)),H(ve,`aria-label`,t),H(ve,`aria-expanded`,e(ae)),H(ve,`aria-controls`,e(ae)?O:void 0),ve.disabled=w()||e(re).length===0,l(be,n),l(we,e(ee))},[()=>f()?`${D(Z[`ui.workspace_account_menu.open`])} ${e(R)}`:void 0,()=>D(Z[`ui.workspace_account_menu.open`])]),E(`click`,ve,()=>e(ae)?fe(!1):ue()),E(`keydown`,ve,K),C(a,_e),r()}D([`click`,`keydown`]);function Qa(){let e=$a();return{stt:to(e),tts:no(e),llm:ro(e),browser:e}}function $a(){return typeof window>`u`?{sharedArrayBuffer:!1,webWorkers:!1,indexedDB:!1,wasmSupport:!1,wasmSimd:!1}:{sharedArrayBuffer:typeof SharedArrayBuffer<`u`,webWorkers:typeof Worker<`u`,indexedDB:typeof indexedDB<`u`,wasmSupport:typeof WebAssembly<`u`,wasmSimd:eo()}}function eo(){if(typeof WebAssembly>`u`)return!1;try{let e=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]);return WebAssembly.validate(e)}catch{return!1}}function to(e){return{browserSpeechAPI:typeof window<`u`&&(`SpeechRecognition`in window||`webkitSpeechRecognition`in window),whisperWasm:e.wasmSupport}}function no(e){return{browserSynthesisAPI:typeof window<`u`&&`speechSynthesis`in window,transformersTTS:e.wasmSupport}}function ro(e){let t=typeof window<`u`&&`gpu`in navigator;return{webllm:t||e.wasmSupport,transformersLLM:e.wasmSupport,webgpu:t}}function io(e){return e.stt.browserSpeechAPI||e.stt.whisperWasm}function ao(e){return e.tts.browserSynthesisAPI||e.tts.transformersTTS}function oo(e){return e.llm.webllm||e.llm.transformersLLM}function so(e){return io(e)||ao(e)||oo(e)}function co(){return{mode:`default`,modeSource:`auto`,session:{user:null,isAuthenticated:!1,permissions:[],preferences:{}},capabilities:null,ai:{stt:{adapter:null,initState:`uninitialized`,downloadProgress:null,isListening:!1,lastResult:``,interimResult:``,error:null},tts:{adapter:null,initState:`uninitialized`,downloadProgress:null,isSpeaking:!1,isPaused:!1,error:null},llm:{adapter:null,initState:`uninitialized`,downloadProgress:null,currentModel:null,isGenerating:!1,error:null}},aiLoading:{phase:`idle`,currentAdapter:null,overallProgress:0,message:``,loaded:[],failed:[],error:null},socket:{status:`disconnected`,reconnectAttempts:0,lastError:null},error:null,initialized:!1}}var lo=new Map,uo=new Map,fo=new Map;function po(e){return lo.get(e)}function mo(e,t,n=`ready`,r=null){lo.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function ho(e,t){let n=lo.get(e);n&&Object.assign(n,t)}function go(e){return uo.get(e)}function _o(e,t,n=`ready`,r=null){uo.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function vo(e,t){let n=uo.get(e);n&&Object.assign(n,t)}function yo(e,t){let n=t?`${e}:${t}`:e;return fo.get(n)}function bo(e,t,n,r=`ready`,i=null){let a=n?`${e}:${n}`:e;fo.set(a,{adapter:t,cachedAt:Date.now(),initState:r,downloadProgress:null,error:i,type:e})}function xo(e,t,n){let r=t?`${e}:${t}`:e,i=fo.get(r);i&&Object.assign(i,n)}var So=new WeakMap,Co=new WeakMap;function wo(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}var To=class{#e=A(P(co()));get _state(){return e(this.#e)}set _state(e){U(this.#e,e,!0)}options;_aiConfig=null;_preloadScheduled=!1;_idleCallbackId=null;_preloadInFlight=!1;_socket=null;_socketConfig=null;_reconnectTimeout=null;_sttSubscriptions=new Map;_ttsSubscriptions=new Map;constructor(e={}){this.options=e,this._aiConfig=e.ai??null}get socketConfig(){return this._socketConfig}get state(){return this._state}get aiConfig(){return this._aiConfig}get aiLoading(){return this._state.aiLoading}async initialize(){if(this._state.initialized)return;if(typeof window>`u`){this._state.initialized=!0;return}let e=Qa();this._state.capabilities=e,this.options.onCapabilitiesDetected?.(e),this.options.session&&(this._state.session={...this._state.session,...this.options.session}),this.options.initialMode?(this._state.mode=this.options.initialMode,this._state.modeSource=`explicit`):(this._state.session.preferences.autoEnableSmrt??!1)&&so(e)&&(this._state.mode=`smrt`,this._state.modeSource=`auto`),this._state.initialized=!0,this.schedulePreload()}setAIConfig(e){this._aiConfig&&wo(this._aiConfig,e)?this._aiConfig=e:(this._aiConfig=e,this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadScheduled=!1,this.schedulePreload())}schedulePreload(){if(!this._aiConfig||this._preloadScheduled)return;let e=this._aiConfig.preload??`idle`;e!==`none`&&(e===`eager`?(this._preloadScheduled=!0,this.executePreload()):e===`idle`&&(this._preloadScheduled=!0,typeof requestIdleCallback<`u`?this._idleCallbackId=requestIdleCallback(()=>this.executePreload(),{timeout:5e3}):setTimeout(()=>this.executePreload(),100)))}triggerPreload(){this._aiConfig&&!this._preloadScheduled&&this._aiConfig.preload===`on-visible`&&(this._preloadScheduled=!0,this.executePreload())}async executePreload(){if(this._aiConfig&&!this._preloadInFlight){this._preloadInFlight=!0;try{await this.runPreload()}finally{this._preloadInFlight=!1}}}async runPreload(){if(!this._aiConfig)return;let e=[];if(this._aiConfig.stt?.enabled!==!1&&this._aiConfig.stt?.type&&e.push(`stt:${this._aiConfig.stt.type}`),this._aiConfig.tts?.enabled!==!1&&this._aiConfig.tts?.type&&e.push(`tts:${this._aiConfig.tts.type}`),this._aiConfig.llm?.enabled!==!1&&this._aiConfig.llm?.type){let t=this._aiConfig.llm.model?`${this._aiConfig.llm.type}:${this._aiConfig.llm.model}`:this._aiConfig.llm.type;e.push(`llm:${t}`)}if(e.length===0){this.updateLoadingState({phase:`idle`,loaded:[],failed:[]});return}this.updateLoadingState({phase:`checking`,message:`Checking AI capabilities...`,loaded:[],failed:[]});for(let t of e){let[e,n]=t.split(`:`);this.updateLoadingState({phase:`downloading`,currentAdapter:n,message:`Loading ${n}...`});try{if(e===`stt`){let e=this._aiConfig.stt;await this.initializeSTT({type:n,allowLocalModels:e?.allowLocalModels})}else if(e===`tts`)await this.initializeTTS({type:n});else if(e===`llm`){let e=this._aiConfig.llm;e&&await this.initializeLLM(e.model,{type:e.type})}this.updateLoadingState({loaded:[...this._state.aiLoading.loaded,n]})}catch(e){console.error(`Failed to preload ${n}:`,e),this.updateLoadingState({failed:[...this._state.aiLoading.failed,n]})}}let t=this._state.aiLoading.failed.length>0;this._state.aiLoading.loaded.length===e.length?this.updateLoadingState({phase:`ready`,currentAdapter:null,overallProgress:100,message:`AI ready`}):t&&this._state.aiLoading.loaded.length===0?this.updateLoadingState({phase:`error`,currentAdapter:null,message:`Failed to load AI models`,error:Error(`All AI adapters failed to load`)}):this.updateLoadingState({phase:`ready`,currentAdapter:null,message:`Loaded with ${this._state.aiLoading.failed.length} failure(s)`}),this.options.onAILoadingChange?.(this._state.aiLoading)}updateLoadingState(e){this._state.aiLoading={...this._state.aiLoading,...e}}setMode(e,t=`toggled`){this._state.mode!==e&&(this._state.mode=e,this._state.modeSource=t,this.options.onModeChange?.(e,t),e===`smrt`&&this.initializeSTT({type:`whisper-cpp`,allowLocalModels:this._aiConfig?.stt?.allowLocalModels}).catch(()=>{}))}toggleMode(){let e=this._state.mode==="default"?`smrt`:`default`;this.setMode(e,`toggled`)}updateSession(e){this._state.session={...this._state.session,...e}}setPermissions(e){this._state.session.permissions=e}hasPermission(e){return this._state.session.permissions.includes(e)}hasAllPermissions(e){return e.every(e=>this._state.session.permissions.includes(e))}hasAnyPermission(e){return e.some(e=>this._state.session.permissions.includes(e))}setUser(e,t=[]){this._state.session.user=e,this._state.session.isAuthenticated=e!==null,this._state.session.permissions=t}connectSocket(e){this.disconnectSocket(),this._socketConfig=e,this._state.socket.status=`connecting`,this._state.socket.lastError=null;try{this._socket=new WebSocket(e.url),this._socket.onopen=()=>{this._state.socket.status=`connected`,this._state.socket.reconnectAttempts=0,e.onOpen?.()},this._socket.onmessage=t=>{try{let n=JSON.parse(t.data);e.onMessage?.(n)}catch{e.onMessage?.(t.data)}},this._socket.onclose=t=>{this._state.socket.status=`disconnected`,e.onClose?.(t),!t.wasClean&&e.reconnect?.enabled!==!1&&this.scheduleReconnect()},this._socket.onerror=t=>{this._state.socket.lastError=t,e.onError?.(t)}}catch(e){this._state.socket.status=`disconnected`,this._state.socket.lastError=e}}disconnectSocket(){this._reconnectTimeout&&=(clearTimeout(this._reconnectTimeout),null),this._socket&&=(this._socket.close(),null),this._state.socket.status=`disconnected`}sendMessage(e){this._socket?.readyState===WebSocket.OPEN?this._socket.send(JSON.stringify(e)):console.warn(`[Socket] Cannot send message - socket not connected`)}scheduleReconnect(){if(!this._socketConfig)return;let{reconnect:e}=this._socketConfig,t=e?.maxAttempts??5,n=e?.baseDelay??1e3;if(this._state.socket.reconnectAttempts>=t){console.warn(`[Socket] Max reconnection attempts reached`);return}this._state.socket.status=`reconnecting`,this._state.socket.reconnectAttempts++;let r=Math.min(n*2**(this._state.socket.reconnectAttempts-1),3e4);console.log(`[Socket] Reconnecting in ${r}ms (attempt ${this._state.socket.reconnectAttempts}/${t})`),this._reconnectTimeout=setTimeout(()=>{this._socketConfig&&this.connectSocket(this._socketConfig)},r)}async initializeSTT(e){let t=e?.type??`browser-speech`,n=po(t);if(n&&n.initState===`ready`)return this._state.ai.stt.adapter=n.adapter,this._state.ai.stt.initState=`ready`,this._state.ai.stt.error=null,this.subscribeToSTTEvents(n.adapter),n.adapter;let r=this._state.ai.stt.adapter;if(r&&this._state.ai.stt.initState===`ready`){if(r.type===t)return r;console.log(`[STT] Switching adapter from ${r.type} to ${t}`),await r.dispose?.()}this._state.ai.stt.initState=`initializing`,this._state.ai.stt.error=null,ho(t,{initState:`initializing`});let i=e=>{this._state.ai.stt.downloadProgress=e,ho(t,{downloadProgress:e}),e.percent>0&&this.updateLoadingState({overallProgress:e.percent})};try{let{getSTT:n}=await W(async()=>{let{getSTT:e}=await import(`./CaiMTXlW.js`).then(e=>e.t);return{getSTT:e}},__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]),import.meta.url),r=await n(e);return await r.ensureInitialized(i),mo(t,r,`ready`),this._state.ai.stt.adapter=r,this._state.ai.stt.initState=`ready`,this._state.ai.stt.downloadProgress=null,this.subscribeToSTTEvents(r),r}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.stt.initState=`error`,this._state.ai.stt.error=n,ho(t,{initState:`error`,error:n}),e}}subscribeToSTTEvents(e){if(this._sttSubscriptions.has(e))return;So.get(e)?.();let t=[e.onResult(e=>{if(e.isFinal){let t=this._state.ai.stt.lastResult;t?this._state.ai.stt.lastResult=`${t} ${e.text}`:this._state.ai.stt.lastResult=e.text,this._state.ai.stt.interimResult=``}else this._state.ai.stt.interimResult=e.text}),e.onStart(()=>{this._state.ai.stt.isListening=!0}),e.onEnd(()=>{this._state.ai.stt.isListening=!1}),e.onError(e=>{this._state.ai.stt.error=e})],n=()=>{for(let e of t)e();this._sttSubscriptions.delete(e),So.get(e)===n&&So.delete(e)};this._sttSubscriptions.set(e,n),So.set(e,n)}async startListening(e){let t=await this.initializeSTT();this._state.ai.stt.lastResult=``,this._state.ai.stt.interimResult=``,await t.start(e)}async stopListening(){await this._state.ai.stt.adapter?.stop(),this._state.ai.stt.interimResult=``}async initializeTTS(e){let t=e?.type??`browser-synthesis`,n=go(t);if(n&&n.initState===`ready`)return this._state.ai.tts.adapter=n.adapter,this._state.ai.tts.initState=`ready`,this._state.ai.tts.error=null,this.subscribeToTTSEvents(n.adapter),n.adapter;if(this._state.ai.tts.adapter&&this._state.ai.tts.initState===`ready`)return this._state.ai.tts.adapter;this._state.ai.tts.initState=`initializing`,this._state.ai.tts.error=null,vo(t,{initState:`initializing`});let r=e=>{this._state.ai.tts.downloadProgress=e,vo(t,{downloadProgress:e})};try{let{getTTS:n}=await W(async()=>{let{getTTS:e}=await import(`./CaiMTXlW.js`).then(e=>e.t);return{getTTS:e}},__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]),import.meta.url),i=await n(e);return await i.ensureInitialized(r),_o(t,i,`ready`),this._state.ai.tts.adapter=i,this._state.ai.tts.initState=`ready`,this._state.ai.tts.downloadProgress=null,this.subscribeToTTSEvents(i),i}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.tts.initState=`error`,this._state.ai.tts.error=n,vo(t,{initState:`error`,error:n}),e}}subscribeToTTSEvents(e){if(this._ttsSubscriptions.has(e))return;Co.get(e)?.();let t=[e.onStart(()=>{this._state.ai.tts.isSpeaking=!0,this._state.ai.tts.isPaused=!1}),e.onEnd(()=>{this._state.ai.tts.isSpeaking=!1,this._state.ai.tts.isPaused=!1}),e.onError(e=>{this._state.ai.tts.error=e,this._state.ai.tts.isSpeaking=!1})],n=()=>{for(let e of t)e();this._ttsSubscriptions.delete(e),Co.get(e)===n&&Co.delete(e)};this._ttsSubscriptions.set(e,n),Co.set(e,n)}async speak(e,t){await(await this.initializeTTS()).speak(e,t)}stopSpeaking(){this._state.ai.tts.adapter?.stop()}pauseSpeaking(){this._state.ai.tts.adapter?.pause(),this._state.ai.tts.isSpeaking&&(this._state.ai.tts.isPaused=!0)}resumeSpeaking(){this._state.ai.tts.adapter?.resume(),this._state.ai.tts.isPaused&&(this._state.ai.tts.isPaused=!1)}getTTSVoices(){return this._state.ai.tts.adapter?.getVoices()??[]}async initializeLLM(e,t){let n=t?.type??`webllm`,r=yo(n,e);if(r&&r.initState===`ready`)return this._state.ai.llm.adapter=r.adapter,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=r.adapter.currentModel,this._state.ai.llm.error=null,r.adapter;if(this._state.ai.llm.adapter&&this._state.ai.llm.initState===`ready`&&(!e||this._state.ai.llm.currentModel===e))return this._state.ai.llm.adapter;this._state.ai.llm.initState=`initializing`,this._state.ai.llm.error=null,xo(n,e,{initState:`initializing`});let i=t=>{this._state.ai.llm.downloadProgress=t,xo(n,e,{downloadProgress:t}),t.percent>0&&this.updateLoadingState({overallProgress:t.percent})};try{let{getLLM:r}=await W(async()=>{let{getLLM:e}=await import(`./CaiMTXlW.js`).then(e=>e.t);return{getLLM:e}},__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]),import.meta.url),a=await r(t);return await a.ensureInitialized(e,i),bo(n,a,e,`ready`),this._state.ai.llm.adapter=a,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=a.currentModel,this._state.ai.llm.downloadProgress=null,a}catch(t){let r=t instanceof Error?t:Error(String(t));throw this._state.ai.llm.initState=`error`,this._state.ai.llm.error=r,xo(n,e,{initState:`error`,error:r}),t}}async chat(e,t){let n=await this.initializeLLM();this._state.ai.llm.isGenerating=!0;try{return await n.message(e,{systemPrompt:t?.systemPrompt,onToken:t?.onToken})}finally{this._state.ai.llm.isGenerating=!1}}async unloadLLM(){let e=this._state.ai.llm.adapter,t=e?.currentModel??void 0;await e?.unloadModel(),e&&xo(e.type,t,{initState:`uninitialized`,downloadProgress:null,error:null}),this._state.ai.llm.adapter=null,this._state.ai.llm.initState=`uninitialized`,this._state.ai.llm.currentModel=null}unsubscribeAllAdapterEvents(){for(let e of[...this._sttSubscriptions.values()])e();for(let e of[...this._ttsSubscriptions.values()])e();this._sttSubscriptions.clear(),this._ttsSubscriptions.clear()}async dispose(){this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadInFlight=!1,this.disconnectSocket(),this.unsubscribeAllAdapterEvents();let e=this._state.ai.stt.adapter;e&&!po(e.type)&&await e.dispose?.();let t=this._state.ai.tts.adapter;t&&!go(t.type)&&await t.dispose?.();let n=this._state.ai.llm.adapter;n&&!yo(n.type,n.currentModel??void 0)&&await n.dispose?.(),this._state=co()}get isAIReady(){return this._state.aiLoading.phase===`ready`||this._state.aiLoading.phase===`idle`}get isAILoading(){return this._state.aiLoading.phase===`checking`||this._state.aiLoading.phase===`downloading`||this._state.aiLoading.phase===`initializing`}};function Eo(e){return new To(e)}var Do=new Set([`focus`,`reveal`,`highlight`,`explain`,`validate`,`stage`,`apply`,`clear`,`undo`]),Oo=`smrt_ui_`,ko=/^[A-Za-z][A-Za-z0-9_-]{0,63}$/,Ao=new Set([`invalid_request`,`invalid_identifier`,`limit_exceeded`,`not_found`]),jo=new Set([`not_found`,`consent_required`,`human_confirmation_required`,`sensitive_control`,`control_not_writable`,`control_not_editable`,`nothing_to_undo`,`denied`]),Mo=new WeakMap,No=class extends Error{reason;details;constructor(e,t){super(e),this.reason=e,this.details=t}};function Po(e,t){return new No(e,t)}function Fo(e){return JSON.stringify({ok:!0,result:e})}function Io(e,t){return JSON.stringify({ok:!1,reason:e,...t?{details:t}:{}})}function Lo(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}function Ro(e){if(Lo(e)>1e5)throw Po(`limit_exceeded`)}function zo(e,t,n=256){if(typeof e!=`string`||e.length===0||e.length>n||Array.from(e).some(e=>{let t=e.charCodeAt(0);return t<32||t===127}))throw Po(`invalid_identifier`,t);return e}function Bo(e,t){return e===void 0?void 0:zo(e,t)}function Vo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Po(`invalid_request`);return e}function Ho(e){let t=Vo(e),n=t.subject,r=n===void 0?void 0:(()=>{let e=Vo(n);return{type:zo(e.type,`subject.type`),id:zo(e.id,`subject.id`),...e.label===void 0?{}:{label:zo(e.label,`subject.label`)}}})();return{formId:zo(t.formId,`formId`),controlId:zo(t.controlId,`controlId`),...r?{subject:r}:{}}}function Uo(e){let t=Vo(e),n=t.kind;if(![`table`,`list`,`report`,`custom`].includes(String(n)))throw Po(`invalid_request`,`identity.kind`);let r=t.subject,i=r===void 0?void 0:(()=>{let e=Vo(r);return{type:zo(e.type,`subject.type`),id:zo(e.id,`subject.id`),...e.label===void 0?{}:{label:zo(e.label,`subject.label`)}}})();return{surfaceId:zo(t.surfaceId,`surfaceId`),kind:n,...i?{subject:i}:{}}}function Wo(e){let t=e.metadata.sensitivity===`sensitive`||e.metadata.sensitivity===`secret`,n=t||e.state.valueRedacted,r=t||e.state.stagedValueRedacted||e.state.staged?.valueRedacted===!0,i=e.state.staged?{...e.state.staged,...r?{value:void 0,valueRedacted:!0}:{},validationMessage:void 0}:void 0;return{...e,identity:{...e.identity},metadata:{...e.metadata,constraints:e.metadata.constraints?{...e.metadata.constraints}:void 0,options:e.metadata.options?.map(e=>({...e}))},state:{...e.state,...n?{value:void 0,valueRedacted:!0}:{},...r?{stagedValue:void 0,stagedValueRedacted:!0}:{},...i?{staged:i}:{},validationMessage:void 0}}}function Go(e){let t=e.reason?jo.has(e.reason)?e.reason:`execution_failed`:void 0;return{ok:e.ok,action:e.action,identity:{...e.identity},...t?{reason:t}:{},...e.snapshot?{snapshot:Wo(e.snapshot)}:{}}}function Ko(e,t,n,r){if(Array.isArray(e))return e.filter(e=>r!==`columnOrder`||typeof e!=`string`||!t.has(e)).map(e=>Ko(e,t,n,r)).filter(e=>e!==void 0);if(!e||typeof e!=`object`)return e;let i=e;if(!(typeof i.columnId==`string`&&t.has(i.columnId)))return Object.fromEntries(Object.entries(i).flatMap(([e,r])=>{if(t.has(e)||n&&(e===`selection`||e===`selectedRowIds`||e===`expandedRowIds`))return[];let i=Ko(r,t,n,e);return i===void 0?[]:[[e,i]]}))}function qo(e){let t=e.columns.filter(e=>e.visibility!==`hidden`),n=new Set(t.map(e=>e.id)),{rowKey:r,...i}=e;return{...i,identity:{...e.identity},...n.has(r)?{rowKey:r}:{},columns:t,query:{...e.query,projectableColumnIds:e.query.projectableColumnIds.filter(e=>n.has(e)),searchableColumnIds:e.query.searchableColumnIds?.filter(e=>n.has(e)),filterableColumnIds:e.query.filterableColumnIds?.filter(e=>n.has(e)),sortableColumnIds:e.query.sortableColumnIds?.filter(e=>n.has(e))},actions:e.actions.filter(e=>(e.columnIds??[]).every(e=>n.has(e)))}}function Jo(e){let t=new Set(e.descriptor.columns.filter(e=>e.visibility===`hidden`).map(e=>e.id)),n=t.has(e.descriptor.rowKey),r=Ko(e.state,t,n);return{...e,descriptor:qo(e.descriptor),state:r,selection:n?null:e.selection}}function Yo(e){return Promise.resolve().then(e).then(Fo).catch(e=>e instanceof No&&Ao.has(e.reason)?Io(e.reason,e.details):Io(`execution_failed`))}function Xo(e,t,n,r){return{name:e,description:t,inputSchema:n,annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:r}}function Zo(e,t,n){let r={type:`object`,required:[`formId`,`controlId`],additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256},controlId:{type:`string`,minLength:1,maxLength:256},subject:{type:`object`}}},i={type:`object`,required:[`surfaceId`,`kind`],additionalProperties:!1,properties:{surfaceId:{type:`string`,minLength:1,maxLength:256},kind:{type:`string`,enum:[`table`,`list`,`report`,`custom`]},subject:{type:`object`}}};return[Xo(`${e}list_form_controls`,`List the controls currently mounted in SMRT forms.`,{type:`object`,additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256}}},e=>Yo(()=>{Ro(e);let n=Bo(Vo(e).formId,`formId`);return t.list(n).map(Wo)})),Xo(`${e}inspect_form_control`,`Inspect one currently mounted SMRT form control.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:r}},e=>Yo(()=>{Ro(e);let n=Vo(e),r=t.get(Ho(n.identity));if(!r)throw Po(`not_found`);return Wo(r)})),{name:`${e}execute_form_control`,description:"Execute an allowed command on a mounted SMRT form control. Agent mutations are consent-gated. An agent never moves keyboard focus: `focus` scrolls the control into view and highlights it.",inputSchema:{type:`object`,required:[`action`,`identity`],additionalProperties:!1,properties:{action:{type:`string`,enum:[...Do]},identity:r,value:{},durationMs:{type:`number`,minimum:0,maximum:6e4}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>Yo(async()=>{Ro(e);let n=Vo(e);if(`confirmed`in n)throw Po(`invalid_request`,`confirmed`);if(!Do.has(n.action))throw Po(`invalid_request`,`action`);let r=n.action,i=Ho(n.identity),a;if(r===`stage`){if(!(`value`in n))throw Po(`invalid_request`,`value`);a={action:r,identity:i,value:n.value}}else if(r===`apply`)a=`value`in n?{action:r,identity:i,value:n.value}:{action:r,identity:i};else if(r===`highlight`){if(n.durationMs!==void 0&&(typeof n.durationMs!=`number`||n.durationMs<0||n.durationMs>6e4))throw Po(`invalid_request`,`durationMs`);a={action:r,identity:i,durationMs:n.durationMs}}else a={action:r,identity:i};return Go(await t.execute(a,{source:`agent`}))})},Xo(`${e}list_data_surfaces`,`List the data surfaces currently mounted in this SMRT Provider.`,{type:`object`,additionalProperties:!1,properties:{}},e=>Yo(()=>(Ro(e),Vo(e),n.list().map(qo)))),Xo(`${e}inspect_data_surface`,`Inspect one currently mounted SMRT data surface.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:i}},e=>Yo(()=>{Ro(e);let t=Vo(e),r=n.inspect(Uo(t.identity));if(!r)throw Po(`not_found`);return Jo(r)})),{name:`${e}execute_data_surface_control`,description:`Execute a bounded visible-state command on a mounted SMRT data surface.`,inputSchema:{type:`object`,required:[`version`,`commandId`,`identity`,`expectedRevision`,`controlId`],additionalProperties:!1,properties:{version:{type:`number`,const:1},commandId:{type:`string`,minLength:1,maxLength:256},identity:i,expectedRevision:{type:`number`,minimum:0},controlId:{type:`string`,minLength:1,maxLength:256},payload:{}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>Yo(async()=>{Ro(e);let t=Vo(e);if(t.version!==1)throw Po(`invalid_request`,`version`);if(typeof t.expectedRevision!=`number`||!Number.isSafeInteger(t.expectedRevision)||t.expectedRevision<0)throw Po(`invalid_request`,`expectedRevision`);let r={version:1,commandId:zo(t.commandId,`commandId`),identity:Uo(t.identity),expectedRevision:t.expectedRevision,controlId:zo(t.controlId,`controlId`),...`payload`in t?{payload:t.payload}:{}},i=await n.execute(r);return i.snapshot?{...i,snapshot:Jo(i.snapshot)}:i})}]}function Qo(e){let t=e.prefix??Oo;if(!ko.test(t))throw TypeError(`Invalid WebMCP UI tool prefix`);let n=e.document??globalThis.document,r=n?.modelContext;if(!r||typeof r.registerTool!=`function`)return()=>{};let i=Mo.get(n),a;if(i&&i.modelContext===r?a=i.prefixes:(a=new Set,Mo.set(n,{modelContext:r,prefixes:a})),a.has(t))throw Error(`WebMCP UI prefix is already registered: ${t}`);a.add(t);let o=Zo(t,e.controlRegistry,e.dataSurfaceRegistry),s;try{s=Ie(o.map(e=>e.name),`ui`,{document:n})}catch(e){throw a.delete(t),e}let c=new AbortController,l=!1,u=()=>{l||(l=!0,c.abort(),a.delete(t),s.release())};try{for(let e of o){let t=Object.assign({[Re]:e.annotations?.readOnlyHint?`read`:`write`},e,{execute:Le(e.execute)}),n=r.registerTool(t,{signal:c.signal});n&&Promise.resolve(n).catch(u)}}catch(e){throw u(),e}return u}var $o=c(`<!> <!>`,1);function es(i,a){_(a,!0);let s=k(a,`autoEnableSmrt`,3,!1),c=k(a,`user`,3,null),l=k(a,`permissions`,19,()=>[]),u=n(()=>a.ai?.showLoadingOverlay??!0),d=z(()=>Eo({initialMode:a.mode,session:{preferences:{autoEnableSmrt:s()}},onCapabilitiesDetected:()=>{a.onReady?.()},onModeChange:e=>{a.onModeChange?.(e)},onAILoadingChange:e=>{a.onAILoadingChange?.(e)}})),f=Fe(),p=X(),m=n(()=>typeof a.webmcp==`object`?a.webmcp:void 0),h=n(()=>a.webmcp===!0?{}:typeof e(m)?.ui==`object`?e(m).ui:void 0),g=n(()=>e(h)?.controlRegistry??f),y=n(()=>e(h)?.dataSurfaceRegistry??p);De({get enabled(){return e(h)!==void 0},get controlRegistry(){return e(g)},get dataSurfaceRegistry(){return e(y)}}),Te({get effects(){return e(m)?.effects}}),j(()=>{let e=z(()=>d.state.session.preferences);e.autoEnableSmrt!==s()&&d.updateSession({preferences:{...e,autoEnableSmrt:s()}})}),j(()=>{if(typeof window<`u`&&a.webmcp&&e(h))try{return Qo({controlRegistry:e(g),dataSurfaceRegistry:e(y),...e(h).prefix?{prefix:e(h).prefix}:{}})}catch(e){xe.warn(`Provider: WebMCP UI tool registration rejected`,{error:e})}}),j(()=>{if(typeof window>`u`||!a.webmcp)return;let e=typeof a.webmcp==`object`?a.webmcp:{},t=!1,n=()=>{};return W(async()=>{let{registerWebMcpTools:e}=await import(`./Cn2mA3wh.js`).then(e=>e.t);return{registerWebMcpTools:e}},__vite__mapDeps([34,1,35]),import.meta.url).then(({registerWebMcpTools:r})=>{if(t)return;let i=r(e.definitions??[],{client:e.client,basePath:e.basePath,fetchFn:e.fetchFn,scope:e.scope,filter:e.filter,filterTool:e.filterTool,resolveFetchers:e.resolveFetchers,resolveToolFetchers:e.resolveToolFetchers,effects:e.effects,namespace:e.namespace,maxTools:e.maxTools});n=i,i.ready.catch(e=>{t||xe.warn(`Provider: WebMCP data tool registration rejected`,{error:e})})}).catch(e=>{t||xe.warn(`Provider: WebMCP data tool registration rejected`,{error:e})}),()=>{t=!0,n()}}),j(()=>{a.mode&&d.setMode(a.mode,`explicit`)}),Ne(d);let b=z(()=>le(a.i18n));ue(b),j(()=>{a.i18n&&(b.snapshot=a.i18n)}),j(()=>{typeof window<`u`&&z(()=>{d.initialize()})}),j(()=>{d.setUser(c(),l())}),j(()=>{if(typeof window<`u`&&a.socket)return d.connectSocket(a.socket),()=>{d.disconnectSocket()}}),j(()=>{typeof window<`u`&&a.ai&&z(()=>{d.setAIConfig(a.ai)})}),R(()=>{d.dispose().catch(e=>{xe.error(`AppState dispose failed during Provider teardown`,{error:e})})});var x=$o(),S=B(x),E=t=>{var n=T(),r=B(n);w(r,()=>W(()=>import(`./DTWraE40.js`),__vite__mapDeps([36,4,1,5,6,7,8,37]),import.meta.url),null,(t,n)=>{var r=T(),i=B(r);v(i,()=>e(n).default,(e,t)=>{t(e,{get message(){return a.ai.loadingMessage},dismissible:!0})}),C(t,r)}),C(t,n)};t(S,t=>{a.ai&&e(u)&&t(E)});var D=F(S,2);o(D,()=>a.children),C(i,x),r()}var ts=se({"ui.command_palette.title":`Command palette`,"ui.command_palette.input_label":`Search or run a command`,"ui.command_palette.placeholder":`Search or run a command`,"ui.command_palette.results":`Results`,"ui.command_palette.trigger":`Search`,"ui.command_palette.empty":`No results for "{query}".`,"ui.command_palette.nothing":`Nothing to show yet.`,"ui.command_palette.searching":`Searching`,"ui.command_palette.partial":`Some results could not be loaded.`,"ui.command_palette.status_one":`1 result. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.status_many":`{count} results. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.unavailable":`Unavailable`,"ui.command_palette.hint_move":`to move`,"ui.command_palette.hint_select":`to select`,"ui.command_palette.hint_close":`to close`}),ns=Symbol(`smrt-command-palette`);function rs(){return a(ns)??null}function is(e){let t=rs();return()=>{let n=e()??t;if(!n)throw Error("[command palette] Pass a `palette` prop or call setCommandPalette() in a parent layout.");return n}}var as=[`Mod+K`];function os(e){let t=e.split(`+`).map(e=>e.trim()).filter(e=>e.length>0),n=t.pop();if(!n)return null;let r={key:n.toLowerCase(),mod:!1,ctrl:!1,meta:!1,alt:!1,shift:!1};for(let e of t)switch(e.toLowerCase()){case`mod`:r.mod=!0;break;case`ctrl`:case`control`:r.ctrl=!0;break;case`meta`:case`cmd`:case`command`:r.meta=!0;break;case`alt`:case`option`:r.alt=!0;break;case`shift`:r.shift=!0;break;default:return null}return r}function ss(e,t){return t.key.toLowerCase()===e.key||/^[a-z]$/.test(e.key)&&t.code===`Key${e.key.toUpperCase()}`}function cs(e,t){if(!ss(e,t))return!1;if(e.mod){if(!(t.ctrlKey||t.metaKey))return!1}else if(t.ctrlKey!==e.ctrl||t.metaKey!==e.meta)return!1;if(t.altKey!==e.alt)return!1;let n=!/^[a-z0-9]$/.test(e.key),r=e.mod||e.ctrl||e.meta||e.alt;return n&&!r&&!e.shift?!0:t.shiftKey===e.shift}function ls(e,t){if(e.isComposing||e.defaultPrevented||e.repeat)return!1;for(let n of t)if(cs(n,e)&&(n.mod||n.ctrl||n.meta||n.alt||!jn(e.target)))return!0;return!1}function us(){if(typeof navigator>`u`)return!1;let e=navigator,t=e.userAgentData?.platform??e.platform??``;return/mac|iphone|ipad|ipod/i.test(t)}function ds(e,t=us()){let n=typeof e==`string`?os(e):e;if(!n)return typeof e==`string`?e:``;let r=n.key.length===1?n.key.toUpperCase():n.key;return t?(n.ctrl?`⌃`:``)+(n.alt?`⌥`:``)+(n.shift?`⇧`:``)+(n.mod||n.meta?`⌘`:``)+r:[n.mod||n.ctrl?`Ctrl`:``,n.meta?`Meta`:``,n.alt?`Alt`:``,n.shift?`Shift`:``,r].filter(Boolean).join(`+`)}function fs(e){let t=[];for(let n of e){let e=os(n);if(!e)continue;let r=e.key.length===1?e.key.toUpperCase():e.key,i=[e.alt?`Alt`:``,e.shift?`Shift`:``].filter(Boolean);e.mod?(t.push([...i,`Control`,r].join(`+`)),t.push([...i,`Meta`,r].join(`+`))):t.push([e.ctrl?`Control`:``,e.meta?`Meta`:``,...i,r].filter(Boolean).join(`+`))}return t.length>0?t.join(` `):void 0}var ps=/\p{M}/gu;function ms(e){return e.normalize(`NFD`).replace(ps,``).toLowerCase()}function hs(e){let t=``,n=[],r=[],i=0;for(let a of e){let e=ms(a);for(let t=0;t<e.length;t+=1)n.push(i),r.push(i+a.length);t+=e,i+=a.length}return{text:t,origin:n,originEnd:r}}function gs(e){return hs(e).text}function _s(e){let t=gs(e).split(/\s+/).filter(e=>e.length>0);return[...new Set(t)]}var vs=/[\p{L}\p{N}]/u;function ys(e){return e!==void 0&&vs.test(e)}function bs(e,t){let n=null,r=t.indexOf(e);for(;r!==-1;){let i=r===0||!ys(t[r-1])?r===0?150:100:60;(!n||i>n.score)&&(n={score:i,ranges:[[r,r+e.length]]}),r=t.indexOf(e,r+1)}if(n)return n;if(e.length<2)return null;let i=[],a=0;for(let n of e){let e=t.indexOf(n,a);if(e===-1)return null;i.push(e),a=e+1}let o=i[i.length-1]-i[0]+1;if(o>e.length*4)return null;let s=[];for(let e of i){let t=s[s.length-1];t&&t[1]===e?t[1]=e+1:s.push([e,e+1])}let c=i[0]===0||!ys(t[i[0]-1]);return{score:Math.max(5,30-(o-e.length)+(c?10:0)),ranges:s}}function xs(e){let t=[...e].sort((e,t)=>e[0]-t[0]||e[1]-t[1]),n=[];for(let e of t){let t=n[n.length-1];t&&e[0]<=t[1]?t[1]=Math.max(t[1],e[1]):n.push([e[0],e[1]])}return n}function Ss(e,t){return xs(t.map(([t,n])=>[e.origin[t],e.originEnd[n-1]]))}function Cs(e,t){let n=_s(e);if(n.length===0)return{score:0,ranges:[]};let r=hs(t),i=0,a=[];for(let e of n){let t=bs(e,r.text);if(!t)return null;i+=t.score,a.push(...t.ranges)}let o=gs(e).trim();return r.text===o?i+=200:r.text.startsWith(o)&&(i+=50),i-=Math.min(r.text.length,100)*.1,{score:i,ranges:Ss(r,a)}}function ws(e,t){let n=_s(e);if(n.length===0)return{score:0,titleRanges:[]};let r=hs(t.title),i=gs([t.subtitle??``,...t.keywords??[]].join(` `)),a=0,o=[];for(let e of n){let t=bs(e,r.text);if(t){a+=t.score,o.push(...t.ranges);continue}let n=bs(e,i);if(!n)return null;a+=n.score*.5}let s=gs(e).trim();return r.text===s?a+=200:r.text.startsWith(s)&&(a+=50),a-=Math.min(r.text.length,100)*.1,{score:a,titleRanges:Ss(r,o)}}function Ts(e,t){let n=[],r=0;for(let[i,a]of t)i>r&&n.push({text:e.slice(r,i),match:!1}),a>i&&n.push({text:e.slice(i,a),match:!0}),r=Math.max(r,a);return r<e.length&&n.push({text:e.slice(r),match:!1}),n}var Es=f(`<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" focusable="false"><path></path></svg>`),Ds=c(`<mark class="svelte-c516pr"> </mark>`),Os=c(`<span class="smrt-command-palette__subtitle svelte-c516pr"> </span>`),ks=c(`<span class="smrt-command-palette__note svelte-c516pr"> </span>`),As=c(`<kbd class="smrt-command-palette__shortcut svelte-c516pr"> </kbd>`),js=c(`<div class="smrt-command-palette__option svelte-c516pr" role="option" tabindex="-1"><span class="smrt-command-palette__icon svelte-c516pr" aria-hidden="true"><!></span> <span class="smrt-command-palette__text svelte-c516pr"><span class="smrt-command-palette__title svelte-c516pr"></span> <!></span> <!></div>`),Ms=c(`<div class="smrt-command-palette__group" role="group"><div class="smrt-command-palette__heading svelte-c516pr"> </div> <!></div>`),Ns=c(`<p class="smrt-command-palette__empty svelte-c516pr"> </p>`),Ps=c(`<div class="smrt-command-palette svelte-c516pr"><div class="smrt-command-palette__field svelte-c516pr"><svg class="smrt-command-palette__search-icon svelte-c516pr" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!></div> <div class="smrt-command-palette__list svelte-c516pr" role="listbox"></div> <!> <div class="smrt-command-palette__hints svelte-c516pr" aria-hidden="true"><span><kbd class="svelte-c516pr">↑</kbd><kbd class="svelte-c516pr">↓</kbd> </span> <span><kbd class="svelte-c516pr">↵</kbd> </span> <span><kbd class="svelte-c516pr">Esc</kbd> </span></div> <div class="smrt-command-palette__live svelte-c516pr" role="status" aria-live="polite"> </div></div>`);function Fs(i,a){let o=ne();_(a,!0);let c=k(a,`hotkeys`,3,as),{t:u}=de(),f=is(()=>a.palette),m=n(f),h=`smrt-palette-list-${o}`,g=e=>`smrt-palette-opt-${o}-${e.key.replace(/[^a-zA-Z0-9_-]/g,`_`)}`,v=n(()=>c()===!1?[]:c().flatMap(e=>{let t=os(e);return t?[t]:[]})),y=A(!1);re(()=>{U(y,us(),!0)});let x=A(void 0);function S(t){ls(t,e(v))&&(t.preventDefault(),e(m).toggle())}j(()=>{e(m).isOpen&&ie().then(()=>e(x)?.focus())});let w=n(()=>e(m).active),D=n(()=>e(m).results.length>0);j(()=>{if(!e(w)||typeof document>`u`)return;let t=document.getElementById(g(e(w)));t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})});function P(t){if(!t.isComposing)switch(t.key){case`ArrowDown`:t.preventDefault(),e(m).moveActive(1);break;case`ArrowUp`:t.preventDefault(),e(m).moveActive(-1);break;case`Enter`:t.preventDefault(),e(m).activate();break;case`PageDown`:t.preventDefault(),e(m).moveActive(5);break;case`PageUp`:t.preventDefault(),e(m).moveActive(-5)}}let I=n(()=>{if(!e(m).isOpen)return``;let t=e(m).query.trim();if(e(m).busy&&!e(D))return u(ts[`ui.command_palette.searching`]);if(!e(D))return t?u(ts[`ui.command_palette.empty`],{query:t}):u(ts[`ui.command_palette.nothing`]);let n=e(m).results.length,r=n===1?u(ts[`ui.command_palette.status_one`]):u(ts[`ui.command_palette.status_many`],{count:n});return e(m).failedProviders.size>0?`${r} ${u(ts[`ui.command_palette.partial`])}`:r});function te(e){return e&&Ae(e)?ye[e]:null}let R=n(()=>a.label??u(ts[`ui.command_palette.input_label`]));O(`keydown`,ee,S);var z=()=>e(m).isOpen,ae=t=>{t||e(m).close()};{let r=n(()=>a.label??u(ts[`ui.command_palette.title`]));oe(i,{get open(){return z()},set open(e){ae(e)},get ariaLabel(){return e(r)},showClose:!1,size:`md`,children:(r,i)=>{var o=Ps(),c=N(o),f=F(N(c),2),_=()=>e(m).query,v=t=>e(m).setQuery(String(t));{let t=n(()=>e(w)?g(e(w)):void 0),r=n(()=>a.placeholder??u(ts[`ui.command_palette.placeholder`]));M(he(f,{type:`text`,role:`combobox`,get"aria-label"(){return e(R)},get"aria-expanded"(){return e(D)},get"aria-controls"(){return h},"aria-autocomplete":`list`,get"aria-activedescendant"(){return e(t)},autocomplete:`off`,autocapitalize:`off`,spellcheck:!1,enterkeyhint:`go`,get placeholder(){return e(r)},interaction:!1,class:`smrt-command-palette__input`,get value(){return _()},set value(e){v(e)},onkeydown:P}),e=>U(x,e,!0),()=>e(x))}s(c);var S=F(c,2);p(S,23,()=>e(m).sections,e=>e.id,(r,i,a)=>{var o=Ms(),c=N(o),f=L(c,!0),_=F(c,2);p(_,17,()=>e(i).results,e=>e.key,(r,i)=>{let a=n(()=>te(e(i).item.icon)),o=n(()=>e(i).item.shortcut?ds(e(i).item.shortcut,e(y)):``);var c=js(),f=N(c),h=N(f),_=t=>{var n=Es(),r=L(n);V(()=>H(r,`d`,e(a))),C(t,n)};t(h,t=>{e(a)&&t(_)}),s(f);var v=F(f,2),x=N(v);p(x,21,()=>Ts(e(i).item.title,e(i).titleRanges),b,(n,r)=>{var i=T(),a=B(i),o=t=>{var n=Ds(),i=L(n,!0);V(()=>l(i,e(r).text)),C(t,n)},s=t=>{var n=d();V(()=>l(n,e(r).text)),C(t,n)};t(a,t=>{e(r).match?t(o):t(s,-1)}),C(n,i)}),s(x);var S=F(x,2),D=t=>{var n=Os(),r=L(n,!0);V(()=>l(r,e(i).item.subtitle)),C(t,n)};t(S,t=>{e(i).item.subtitle&&t(D)}),s(v);var O=F(v,2),k=e=>{var t=ks(),n=L(t,!0);V(e=>l(n,e),[()=>u(ts[`ui.command_palette.unavailable`])]),C(e,t)},A=t=>{var n=As(),r=L(n,!0);V(()=>l(r,e(o))),C(t,n)};t(O,t=>{typeof e(i).item.disabled==`string`?t(k):e(o)&&t(A,1)}),s(c),V(t=>{H(c,`id`,t),H(c,`aria-selected`,e(w)?.key===e(i).key),H(c,`aria-disabled`,!e(i).selectable||void 0),H(c,`data-kind`,e(i).item.kind),H(c,`data-active`,e(w)?.key===e(i).key?``:void 0),H(c,`title`,typeof e(i).item.disabled==`string`?e(i).item.disabled:void 0)},[()=>g(e(i))]),E(`mousedown`,c,e=>e.preventDefault()),E(`pointermove`,c,()=>e(m).setActive(e(i).key)),E(`click`,c,()=>void e(m).activate(e(i))),C(r,c)}),s(o),V(()=>{H(o,`aria-labelledby`,`${h}-g${e(a)}`),H(c,`id`,`${h}-g${e(a)}`),l(f,e(i).label)}),C(r,o)}),s(S);var O=F(S,2),k=t=>{var n=Ns(),r=L(n,!0);V(()=>l(r,e(I))),C(t,n)};t(O,t=>{e(D)||t(k)});var A=F(O,2),j=N(A),ee=F(N(j),2);s(j);var z=F(j,2),ne=F(N(z));s(z);var re=F(z,2),ie=F(N(re));s(re),s(A);var ae=F(A,2),W=L(ae,!0);s(o),V((t,n,r,i)=>{H(S,`id`,h),H(S,`aria-label`,t),H(S,`aria-busy`,e(m).busy),l(ee,` ${n??``}`),l(ne,` ${r??``}`),l(ie,` ${i??``}`),l(W,e(I))},[()=>u(ts[`ui.command_palette.results`]),()=>u(ts[`ui.command_palette.hint_move`]),()=>u(ts[`ui.command_palette.hint_select`]),()=>u(ts[`ui.command_palette.hint_close`])]),C(r,o)},$$slots:{default:!0}})}r()}D([`mousedown`,`pointermove`,`click`]);var Is=c(`<kbd class="smrt-command-palette-trigger__hint svelte-122kczf"> </kbd>`),Ls=c(`<span class="smrt-command-palette-trigger__label svelte-122kczf"> </span> <!>`,1),Rs=c(`<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!>`,1);function zs(i,a){_(a,!0);let o=k(a,`hotkeys`,3,as),s=k(a,`compact`,3,!1),c=k(a,`class`,3,``),{t:u}=de(),d=is(()=>a.palette),f=n(d),p=n(()=>a.label??u(ts[`ui.command_palette.trigger`])),m=A(!1);re(()=>{U(m,us(),!0)});let h=n(()=>o()[0]?ds(o()[0],e(m)):``);{let r=n(()=>`smrt-command-palette-trigger ${c()}`),a=n(()=>fs(o()));me(i,{variant:`ghost`,size:`sm`,get class(){return e(r)},get"aria-label"(){return e(p)},"aria-haspopup":`dialog`,get"aria-expanded"(){return e(f).isOpen},get"aria-keyshortcuts"(){return e(a)},onclick:()=>e(f).open(),children:(n,r)=>{var i=Rs(),a=F(B(i),2),o=n=>{var r=Ls(),i=B(r),a=L(i,!0),o=F(i,2),s=t=>{var n=Is(),r=L(n,!0);V(()=>l(r,e(h))),C(t,n)};t(o,t=>{e(h)&&t(s)}),V(()=>l(a,e(p))),C(n,r)};t(a,e=>{s()||e(o)}),C(n,i)},$$slots:{default:!0}})}r()}function Bs(e,t,n,r){return{key:`${e.id}:${t.id}`,providerId:e.id,group:t.group??e.label,item:t,score:n,titleRanges:r,selectable:!t.disabled}}function Vs(e){return e.map((e,t)=>({provider:e,index:t})).sort((e,t)=>(e.provider.order??0)-(t.provider.order??0)||e.index-t.index).map(({provider:e})=>e)}function Hs(e){let t=e.query.trim(),n=e.maxPerGroup??8,r=[],i=e=>{let t=r.find(t=>t.id===e);return t||(t={id:e,label:e,results:[]},r.push(t)),t},a=new Set;for(let r of Vs(e.providers)){let o=r.limit??n,s=[];for(let n of e.local[r.id]??[]){let e=ws(t,n);e&&s.push(Bs(r,n,e.score+(n.boost??0),e.titleRanges))}s.sort((e,t)=>t.score-e.score);let c=[];if(t.length>0)for(let n of e.remote[r.id]??[])c.push(Bs(r,n,n.boost??0,Cs(t,n.title)?.ranges??[]));let l=0;for(let e of[...s,...c]){if(l>=o)break;a.has(e.key)||(a.add(e.key),i(e.group).results.push(e),l+=1)}}return r.filter(e=>e.results.length>0)}function Us(e){return e.flatMap(e=>[...e.results])}function Ws(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Gs=class{#e;#t=A([]);#n=A({});#r=A({});#i=A(new Set);#a=A(0);#o=A(0);#s=0;#c=A(null);#l=A(!1);#u=A(``);#d=null;#f=null;#p=null;#m=0;constructor(e={}){this.#e=e,U(this.#t,[...e.providers??[]])}get isOpen(){return e(this.#l)}get query(){return e(this.#u)}get providers(){return e(this.#t)}get busy(){return e(this.#a)+e(this.#o)>0}get failedProviders(){return e(this.#i)}#h=n(()=>Hs({providers:e(this.#t),local:e(this.#n),remote:e(this.#r),query:e(this.#u),maxPerGroup:this.#e.maxPerGroup}));get sections(){return e(this.#h)}set sections(e){U(this.#h,e)}#g=n(()=>Us(this.sections));get results(){return e(this.#g)}set results(e){U(this.#g,e)}#_=n(()=>this.results.find(t=>t.key===e(this.#c)&&t.selectable)??this.results.find(e=>e.selectable)??null);get active(){return e(this.#_)}set active(e){U(this.#_,e)}registerProvider(t){let n=e(this.#t).findIndex(e=>e.id===t.id);if(n===-1)U(this.#t,[...e(this.#t),t]);else{let r=e(this.#t)[n];U(this.#t,e(this.#t).map((e,r)=>r===n?t:e)),U(this.#n,Ks(e(this.#n),r.id)),U(this.#r,Ks(e(this.#r),r.id)),this.#b(r.id,!1)}return e(this.#l)&&(this.#x(t,this.#v()),e(this.#u).trim()&&this.#C(0)),()=>{e(this.#t).includes(t)&&(U(this.#t,e(this.#t).filter(e=>e!==t)),U(this.#n,Ks(e(this.#n),t.id)),U(this.#r,Ks(e(this.#r),t.id)))}}open(){if(!e(this.#l)){U(this.#l,!0),U(this.#u,``),U(this.#c,null),U(this.#r,{}),U(this.#i,new Set),this.#m+=1,this.#d?.abort(),this.#d=new AbortController;for(let t of Vs(e(this.#t)))this.#x(t,this.#d.signal)}}close(){e(this.#l)&&(U(this.#l,!1),U(this.#u,``),U(this.#c,null),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null,U(this.#a,0),U(this.#o,0),U(this.#r,{}))}toggle(){e(this.#l)?this.close():this.open()}setQuery(t){t!==e(this.#u)&&(U(this.#u,t,!0),U(this.#c,null),this.#C(this.#e.searchDebounceMs??150))}moveActive(e){let t=this.results.filter(e=>e.selectable);if(t.length===0)return;let n=this.active?t.findIndex(e=>e.key===this.active?.key):-1,r=n===-1?e>0?0:t.length-1:((n+e)%t.length+t.length)%t.length;U(this.#c,t[r].key,!0)}moveActiveTo(e){let t=this.results.filter(e=>e.selectable);t.length!==0&&U(this.#c,(e===`first`?t[0]:t[t.length-1]).key,!0)}setActive(e){this.results.find(t=>t.key===e)?.selectable&&U(this.#c,e,!0)}async activate(t=this.active){if(!t?.selectable)return;let{item:n,providerId:r}=t,i=e(this.#u);this.close();try{n.run?await n.run({query:i,providerId:r,navigate:e=>this.navigate(e,n)}):n.href&&await this.navigate(n.href,n)}catch(e){this.#y(e,{providerId:r,phase:`run`,item:n})}}navigate(e,t){if(this.#e.navigate)return this.#e.navigate(e,t);typeof window<`u`&&window.location.assign(e)}destroy(){U(this.#l,!1),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null}#v(){return this.#d||=new AbortController,this.#d.signal}#y(e,t){this.#e.onError?this.#e.onError(e,t):xe.warn(`[smrt-svelte] command palette provider failed`,{...t,item:t.item?.id,error:e instanceof Error?e.message:String(e)})}#b(t,n){if(e(this.#i).has(t)===n)return;let r=new Set(e(this.#i));n?r.add(t):r.delete(t),U(this.#i,r)}#x(t,n){if(!t.items)return Promise.resolve();let r=this.#m,i=()=>r===this.#m&&!n.aborted&&e(this.#t).includes(t),a=n=>{i()&&(U(this.#n,{...e(this.#n),[t.id]:n}),this.#b(t.id,!1))},o;try{o=t.items({signal:n})}catch(e){return this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}),Promise.resolve()}if(!Ws(o))return a(o),Promise.resolve();U(this.#a,e(this.#a)+1);let s=()=>{r===this.#m&&U(this.#a,Math.max(0,e(this.#a)-1),!0)};return Promise.resolve(o).then(e=>{s(),a(e)},e=>{s(),i()&&(this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}))})}#S(){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,U(this.#o,0)}#C(t){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,U(this.#o,0);let n=e(this.#u).trim();n.length===0?U(this.#r,{}):e(this.#l)&&(this.#p=setTimeout(()=>{this.#p=null,this.#w(n)},t))}#w(t){let n=this.#m,r=new AbortController;this.#f=r;let i=++this.#s;U(this.#o,0);let a=t=>n!==this.#m||r.signal.aborted||!e(this.#t).includes(t),o=()=>{i===this.#s&&U(this.#o,Math.max(0,e(this.#o)-1),!0)};for(let n of e(this.#t)){if(!n.search)continue;if(t.length<(n.minQueryLength??2)){e(this.#r)[n.id]&&U(this.#r,Ks(e(this.#r),n.id));continue}let i=n.limit??this.#e.maxPerGroup??8,s;try{s=n.search(t,{signal:r.signal,limit:i})}catch(e){this.#b(n.id,!0),this.#y(e,{providerId:n.id,phase:`search`});continue}U(this.#o,e(this.#o)+1),Promise.resolve(s).then(t=>{o(),!a(n)&&(U(this.#r,{...e(this.#r),[n.id]:t}),this.#b(n.id,!1))},t=>{o(),!a(n)&&(U(this.#r,Ks(e(this.#r),n.id)),this.#b(n.id,!0),this.#y(t,{providerId:n.id,phase:`search`}))})}}};function Ks(e,t){if(!(t in e))return e;let{[t]:n,...r}=e;return r}var qs=c(`<!> <!>`,1);function Js(i,a){_(a,!0);let o=k(a,`providers`,19,()=>[]),s=k(a,`hotkeys`,3,as),c=k(a,`compact`,3,!1),l=k(a,`hideTrigger`,3,!1),u=rs(),d=z(()=>a.palette||u?null:new Gs({providers:o(),navigate:a.navigate}));R(()=>d?.destroy());let f=n(()=>a.palette??u??d);var p=qs(),m=B(p),h=t=>{{let r=n(()=>s()===!1?[]:s());zs(t,{get palette(){return e(f)},get label(){return a.label},get compact(){return c()},get hotkeys(){return e(r)}})}};t(m,e=>{l()||e(h)}),Fs(F(m,2),{get palette(){return e(f)},get hotkeys(){return s()},get label(){return a.label},get placeholder(){return a.placeholder}}),C(i,p),r()}function Ys(i,a){_(a,!0);let s=Ce(),c=n(()=>s?.dataSurfaceRegistry);var l=T(),u=B(l),d=t=>{var n=T(),r=B(n);o(r,()=>a.dock,()=>e(c)),C(t,n)};t(u,t=>{e(c)&&t(d)}),C(i,l),r()}function Xs(e,t){let n=e.ready!==!1,r=t&&n?`toggle`:e.href?`link`:`inert`;return{mode:r,registered:t,ready:n,notReady:!n||r===`link`}}function Zs(e,t,n){return e.onpress?.(t,{registered:n.registered,ready:n.ready})===!1||t.defaultPrevented?(t.preventDefault(),!1):!0}var Qs=(r,i=m)=>{var a=T(),o=B(a),s=e=>{var t=$s();C(e,t)},c=e=>{var t=ec(),n=L(t);V(()=>H(n,`d`,ye[i()===void 0?be:i()])),C(e,t)},u=n(()=>i()===void 0||Ae(i())),d=e=>{var t=tc(),n=L(t,!0);V(()=>l(n,i())),C(e,t)};t(o,t=>{i()===`chat`?t(s):e(u)?t(c,1):t(d,-1)}),C(r,a)},$s=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.5L3 20.5l1.6-5A8.5 8.5 0 1 1 21 11.5z"></path></svg>`),ec=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),tc=c(`<span aria-hidden="true"> </span>`),nc=c(`<a class="smrt-dock-toggles__button svelte-1u9e85z"><!></a>`),rc=c(`<button type="button" aria-controls="smrt-admin-shell-right-panel"><!></button>`),ic=c(`<div class="smrt-dock-toggles svelte-1u9e85z" data-testid="dock-toggles"></div>`);function ac(a,o){_(o,!0);let c=Di(),{t:l}=de();function u(e){return e.icon??(e.tool===`assistant`?`chat`:void 0)}function d(e){return Xs(e,c.has(e.tool)&&c.available)}function f(e,t){return t?e.labelNotReady??l(Z[`ui.dock_toggles.set_up`],{label:e.label}):e.label}function m(e,t){let n=d(t);Zs(t,e,n)&&n.mode===`toggle`&&c.toggle(t.tool,{returnFocus:e.currentTarget})}var h=ic();p(h,21,()=>o.toggles,e=>e.tool,(r,a)=>{let o=n(()=>d(e(a))),l=n(()=>e(o).mode===`toggle`),p=n(()=>e(l)&&c.isOpen(e(a).tool)),h=n(()=>u(e(a))),g=n(()=>f(e(a),e(o).notReady));var _=T(),v=B(_),y=t=>{var n=nc();Qs(N(n),()=>e(h)),s(n),V(()=>{H(n,`href`,e(a).href),H(n,`data-dock-tool`,e(a).tool),H(n,`aria-label`,e(g)),H(n,`title`,e(g))}),E(`click`,n,t=>m(t,e(a))),C(t,n)},b=t=>{var n=rc();let r;Qs(N(n),()=>e(h)),s(n),V(()=>{r=i(n,1,`smrt-dock-toggles__button svelte-1u9e85z`,null,r,{active:e(p)}),H(n,`data-dock-tool`,e(a).tool),H(n,`aria-label`,e(g)),H(n,`title`,e(g)),H(n,`aria-pressed`,e(p)),H(n,`aria-expanded`,e(p)),H(n,`aria-disabled`,!e(l)||void 0)}),E(`click`,n,t=>m(t,e(a))),C(t,n)};t(v,t=>{e(o).mode===`link`?t(y):t(b,-1)}),C(r,_)}),s(h),C(a,h),r()}D([`click`]);function oc(e){if(!e)return null;let t=typeof e==`object`?e.items:void 0;return{items:Math.max(1,Number.isFinite(t)?Math.floor(t):4)}}function sc(e,t,n=`items`,r){let i=[],a=e=>{i.some(t=>t.id===e.id)||i.push(e)};for(let t of e)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});for(let e of t){if(n===`items`){for(let t of e.items)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});continue}let t=e.id??e.heading,i=e.href??r?.(t)??e.items[0]?.href;i&&a({id:t,label:e.heading,href:i,icon:e.icon})}return i}function cc(e,t,n){let r=Math.max(0,t-+!!n);return{nav:e.slice(0,r),more:e.length>r}}function lc(e,t){return e===t||t.startsWith(`${e}/`)}function uc(t,i){_(i,!0);let a=k(i,`currentHref`,3,``),{t:o}=de(),s=Ve(),c=Di(),l=n(()=>!i.dockToggle&&s.isEdgeShown(`right`)&&s.focusTools.length>0),u=n(()=>!!i.dockToggle||e(l)),d=n(()=>cc(i.entries,i.budget,e(u)));function f(e){let t=e.icon??(e.tool===`assistant`?`chat`:void 0);return t&&(Ae(t)||i.iconComponent)?t:be}function p(){if(s.panels.right===`expanded`){s.collapsePanel(`right`);return}let e=s.focusTools.find(e=>e.id===s.activeFocusToolId)??s.focusTools[0];e?s.openFocusTool(e.id):s.expandPanel(`right`)}function m(){s.setPanelState(`left`,s.panels.left===`expanded`?`collapsed`:`expanded`)}let h=n(()=>{let t=e(d).nav.map(e=>({id:e.id,label:e.label,href:e.href,iconName:e.icon??`placeholder`,active:lc(e.href,a())}));if(i.dockToggle){let e=i.dockToggle.tool,n=Xs(i.dockToggle,c.has(e)&&c.available),r=n.mode===`toggle`,a=n.notReady?i.dockToggle.labelNotReady??o(Z[`ui.dock_toggles.set_up`],{label:i.dockToggle.label}):i.dockToggle.label,s=t=>{Zs(i.dockToggle,t,n)&&r&&c.toggle(e)};t.push(n.mode===`link`?{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),href:i.dockToggle.href,onclick:s}:{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),active:r&&c.isOpen(e),expanded:r?c.isOpen(e):void 0,controls:r?`smrt-admin-shell-right-panel`:void 0,onclick:s})}else e(l)&&t.push({id:`tools`,label:o(Z[`ui.admin_shell.tools`]),iconName:be,active:s.panels.right===`expanded`,expanded:s.panels.right===`expanded`,controls:`smrt-admin-shell-right-panel`,onclick:p});return e(d).more&&t.push({id:`more`,label:o(Z[`ui.phone_tab_bar.more`]),iconName:`more`,expanded:s.panels.left===`expanded`,controls:`smrt-admin-shell-left-panel`,onclick:m}),t});{let r=n(()=>o(Z[`ui.phone_tab_bar.label`]));Ii(t,{get items(){return e(h)},get iconComponent(){return i.iconComponent},get label(){return e(r)}})}r()}var dc=`smrt.runtime.diagnostics.read`,fc=`/api/_runtime/diagnostics`;function pc(e={}){let t=e.modelContext??globalThis.document?.modelContext;if(!t||typeof t.registerTool!=`function`)return null;let n=new AbortController,r=mc(e.fetchFn??fetch,e.endpoint);try{let e=t.registerTool(r,{signal:n.signal});Promise.resolve(e).catch(()=>n.abort())}catch{n.abort()}return Object.freeze({dispose:()=>n.abort()})}function mc(e,t=fc){return Object.freeze({name:dc,description:`Read the authenticated, redacted application runtime diagnostics.`,inputSchema:Object.freeze({type:`object`,properties:Object.freeze({}),additionalProperties:!1}),annotations:Object.freeze({readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}),async execute(){let n;try{n=await e(t,{method:`GET`,credentials:`same-origin`,headers:{accept:`application/json`}})}catch{return hc(`diagnostics_unavailable`)}if(!n.ok)return hc(n.status===401?`authentication_required`:n.status===403?`authorization_denied`:`diagnostics_unavailable`);try{return JSON.stringify(await n.json())}catch{return hc(`diagnostics_unavailable`)}}})}function hc(e){return JSON.stringify({ok:!1,error:{code:e}})}function gc(e,t){_(t,!0);let n=k(t,`enabled`,3,!0);j(()=>{if(!n())return;let e=pc({endpoint:t.endpoint});return()=>e?.dispose()}),r()}var _c=c(`<span class="smrt-app-shell-color-scheme svelte-1dzfp19" data-smrt-component="ShellColorSchemeToggle"><!></span>`);function vc(t,i){_(i,!0);let a=J(),{t:o}=de(),c=n(()=>a.state.isDark);var l=_c(),u=N(l);{let t=n(()=>e(c)?`lightMode`:`darkMode`),r=n(()=>o(Z[`ui.app_shell.color_scheme_dark`])),i=n(()=>o(e(c)?Z[`ui.app_shell.color_scheme_to_light`]:Z[`ui.app_shell.color_scheme_to_dark`]));we(u,{get icon(){return e(t)},get label(){return e(r)},get pressed(){return e(c)},get tooltip(){return e(i)},onclick:()=>a.toggleColorScheme()})}s(l),C(t,l),r()}var yc=`data-smrt-view-transition`,bc=0;function xc(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}async function Sc(e,t={}){let n=typeof document>`u`?void 0:document,r=n?.startViewTransition;if(!n||t.skip||typeof r!=`function`||xc()){await e();return}let i;bc+=1,n.documentElement.setAttribute(yc,``);let a=()=>{bc=Math.max(0,bc-1),bc===0&&n.documentElement.removeAttribute(yc)};try{i=r.call(n,e)}catch{a(),await e();return}i.ready?.catch(()=>{}),Promise.resolve(i.finished).then(a,a),await i.updateCallbackDone}function Cc(e={}){return t=>{if(!(t.willUnload||t.type===`leave`))return new Promise(n=>{Sc(async()=>{n(),await t.complete},e).then(n,n)})}}var wc=(r,i=m)=>{var a=T(),s=B(a),c=t=>{{let r=n(()=>[i().toggle]);ac(t,{get toggles(){return e(r)}})}},l=e=>{var t=T(),n=B(t);o(n,()=>i().render),C(e,t)};t(s,e=>{i().toggle?e(c):i().render&&e(l,1)}),C(r,a)},Tc=e=>{vc(e,{})},Ec=c(`<span data-testid="layout-edit-toggle"><!></span>`),Dc=c(`<span><button type="button" class="smrt-edit-item__grip svelte-1pgtgoi" data-smrt-edit-handle=""><span aria-hidden="true">⠿</span></button> <span class="smrt-edit-item__body svelte-1pgtgoi" inert=""><!></span></span>`),Oc=c(`<span class="smrt-edit-zone__label svelte-1pgtgoi"> </span> <!>`,1),kc=c(`<span class="smrt-app-shell-palette svelte-1pgtgoi"><!></span>`),Ac=c(`<span> </span> <!>`,1),jc=c(`<a class="svelte-1pgtgoi"> </a>`),Mc=c(`<!> <!>`,1),Nc=c(`<div class="smrt-layout-live svelte-1pgtgoi" aria-live="assertive" aria-atomic="true"> </div>`),Pc=c(`<div class="smrt-layout-live svelte-1pgtgoi" role="status" aria-live="polite"> </div> <!> <!> <!> <!>`,1);function Fc(a,c){_(c,!0);let u=(r,i=m)=>{var a=T(),s=B(a);p(s,17,()=>Ue(i()),e=>e.id,(r,i)=>{var a=T(),s=B(a),c=r=>{var a=T(),o=B(a),s=t=>{{let r=n(()=>[e(i).toggle]);ac(t,{get toggles(){return e(r)}})}};t(o,t=>{(e(Ve)?.tool!==e(i).toggle.tool||X.viewport!==`phone`)&&t(s)}),C(r,a)},l=t=>{var n=T(),r=B(n);o(r,()=>e(i).render),C(t,n)};t(s,t=>{e(i).toggle?t(c):e(i).render&&t(l,1)}),C(r,a)}),C(r,a)},d=e=>{u(e,()=>`header.start`)},f=e=>{u(e,()=>`header.center`)},h=e=>{u(e,()=>`header.end`)},g=e=>{u(e,()=>`footer.start`)},v=e=>{u(e,()=>`footer.center`)},y=e=>{u(e,()=>`footer.end`)},b=e=>{u(e,()=>`leftSidebar.header`)},x=e=>{u(e,()=>`leftSidebar.footer`)},S=e=>{u(e,()=>`rightSidebar.header`)},w=e=>{u(e,()=>`rightSidebar.footer`)},D=t=>{var r=Ec();let a;var o=N(r);{let t=n(()=>J(Z[`ui.layout_edit.toggle`])),r=n(()=>J(Z[`ui.layout_edit.toggle`]));we(o,{icon:`edit`,get pressed(){return e(Je)},get label(){return e(t)},get tooltip(){return e(r)},onclick:wt})}s(r),V(()=>a=i(r,1,`smrt-layout-toggle svelte-1pgtgoi`,null,a,{"smrt-layout-toggle--floating":e(Ae)})),C(t,r)},M=(r,a=m)=>{var o=Oc(),c=B(o),u=L(c,!0),d=F(c,2);p(d,17,()=>ut(a()),e=>e.id,(r,a)=>{var o=T(),c=B(o),l=t=>{wc(t,()=>e(a))},u=t=>{let r=n(()=>ft.drag?.itemId===e(a).id);var o=Dc();let c;var l=N(o),u=F(l,2);wc(N(u),()=>e(a)),s(u),s(o),V((t,n)=>{c=i(o,1,`smrt-edit-item svelte-1pgtgoi`,null,c,{"smrt-edit-item--dragging":e(r)}),H(o,`data-smrt-edit-item`,e(a).id),H(l,`draggable`,ft.nativeDraggable),H(l,`aria-label`,t),H(l,`title`,n),H(l,`aria-pressed`,e(r))},[()=>J(Li[`ui.sortable.move`],{item:e(a).label}),()=>J(Li[`ui.sortable.move`],{item:e(a).label})]),E(`click`,l,()=>ft.consumeClick(e(a).id)),E(`keydown`,l,t=>ft.keydown(t,e(a).id)),O(`blur`,l,t=>ft.blur(t,e(a).id)),E(`pointerdown`,l,t=>ft.pointerDown(t,e(a).id)),E(`pointermove`,l,e=>ft.pointerMove(e)),E(`pointerup`,l,e=>ft.pointerUp(e)),O(`pointercancel`,l,e=>ft.pointerCancel(e)),O(`dragstart`,l,t=>ft.dragStart(t,e(a).id)),O(`dragend`,l,()=>ft.dragEnd()),C(t,o)};t(c,t=>{e(a).fixed?t(l):t(u,-1)}),C(r,o)}),V(e=>l(u,e),[()=>lt(a())]),C(r,o)},ee=(t,r=m,i=m)=>{{let a=n(()=>e(tt).name||e(tt).email),o=n(()=>et(e(Xe),i()));Za(t,{get userName(){return e(a)},get email(){return e(tt).email},get avatarUrl(){return e(tt).avatarUrl},get compact(){return r()},get tenantLabel(){return le()},get onSignOut(){return c.onSignOut},get signOutHref(){return c.signOutHref},get settingsHref(){return c.settingsHref},get placement(){return e(o)}})}},P=t=>{ee(t,()=>e($e),()=>!1)},I=n=>{var r=T(),i=B(r),a=e=>{ee(e,()=>!0,()=>!0)};t(i,t=>{e(Ze)&&t(a)}),C(n,r)},te=r=>{var i=T(),a=B(i),o=t=>{var r=kc(),i=N(r);{let t=n(()=>X.viewport===`phone`);Js(i,{get providers(){return c.commandPalette.providers},get placeholder(){return c.commandPalette.placeholder},get compact(){return e(t)}})}s(r),V(()=>H(r,`data-search`,X.viewport===`phone`?void 0:``)),C(t,r)};t(a,e=>{c.commandPalette&&e(o)}),C(r,i)},R=e=>{mt(e,{get title(){return W()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref}})},ne=(t,r=m)=>{let i=n(()=>J(si[r()])),a=n(()=>e(bt)<=1);{let o=n(()=>J(Z[`ui.layout_edit.hide_region`],{region:e(i)})),s=n(()=>e(a)?J(Z[`ui.layout_edit.hide_last_region`],{region:e(i)}):J(Z[`ui.layout_edit.hide_region`],{region:e(i)}));we(t,{icon:`eyeOff`,size:16,get disabled(){return e(a)},get label(){return e(o)},get tooltip(){return e(s)},onclick:()=>qe.setPanel(Tt[r()],{visible:!1})})}},re=(t,r=m)=>{let i=n(()=>J(si[r()]));var a=Ac(),o=B(a),s=L(o,!0),c=F(o,2);{let t=n(()=>J(Z[`ui.layout_edit.show_region`],{region:e(i)}));we(c,{icon:`eye`,size:16,get label(){return e(t)},onclick:()=>qe.setPanel(Tt[r()],{visible:!0})})}V(e=>l(s,e),[()=>J(Z[`ui.layout_edit.region_hidden`],{region:e(i)})]),C(t,a)},ae=t=>{uc(t,{get entries(){return e(ze)},get currentHref(){return ce()},get budget(){return e(Re)},get dockToggle(){return e(Ve)},get iconComponent(){return c.iconComponent}})},W=k(c,`title`,3,`SMRT`),oe=k(c,`storageKey`,3,`smrt-app-shell`),G=k(c,`nav`,19,()=>[]),se=k(c,`navGroups`,19,()=>[]),ce=k(c,`currentHref`,3,``),le=k(c,`tenantLabel`,3,``),ue=k(c,`environment`,3,`local`),fe=k(c,`accountMenu`,3,!0),pe=k(c,`colorSchemeToggle`,3,!0),me=k(c,`webmcp`,3,!1),he=k(c,`user`,3,null),ge=k(c,`permissions`,19,()=>[]),_e=k(c,`runtimeDiagnostics`,3,!1),ve=k(c,`preset`,3,`smrt`),ye=k(c,`colorScheme`,3,`system`),be=k(c,`dockToggles`,19,()=>[]),xe=k(c,`slotItems`,19,()=>[]),Se=k(c,`layoutEditing`,3,!1),Ce=k(c,`navMode`,3,`items`),Te=k(c,`edgeToggles`,3,!1),Ee=k(c,`phoneTabBar`,3,!1),De=k(c,`chrome`,3,!0),Oe=`item:account`,ke=`item:color-scheme`,Ae=n(()=>typeof Se()==`object`&&Se().floating===!0),{t:J}=de(),Y=n(()=>{let t=[],n=new Set,r=e=>{n.has(e.id)||(n.add(e.id),t.push(e))};r({id:`item:brand`,label:J(Z[`ui.app_shell.brand_item`]),slot:`header.start`,render:R});for(let e of ht){let t=c.slots?.[e];t&&r({id:St(e),label:J(Z[`ui.app_shell.slot_content`],{slot:J(ai[e])}),slot:e,render:t})}for(let e of xe())r({...e});for(let e of be())r({id:xt(e.tool),label:e.label,slot:e.slot??`header.end`,toggle:e});return Se()&&!e(Ae)&&r({id:`item:layout-edit`,label:J(Z[`ui.layout_edit.toggle`]),slot:typeof Se()==`object`?Se().slot??`header.end`:`header.end`,render:D,fixed:!0}),pe()!==!1&&r({id:ke,label:J(Z[`ui.app_shell.color_scheme_item`]),slot:(typeof pe()==`object`?pe().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:Tc}),c.commandPalette&&r({id:`item:command-palette`,label:J(Z[`ui.app_shell.command_palette_item`]),slot:`header.center`,render:te}),he()&&fe()!==!1&&r({id:Oe,label:J(Z[`ui.app_shell.account_item`]),slot:(typeof fe()==`object`?fe().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:P}),t});function Me(e){let t=c.phoneDock??(oc(Ee())?`sheet`:void 0),n=e?.right;return!t||n===!1||!c.phoneDock&&n?.phone!==void 0?e:{...e,right:{...n,phone:t}}}let X=z(()=>Hn({config:Me(c.config),storageKey:oe(),layoutPanels:It(c.layout).panels})),Ne=A(void 0),Pe=n(()=>c.layout!==void 0),Fe=n(()=>It(e(Pe)?c.layout:c.onlayoutchange?e(Ne):X.settings.layout)),Ie=n(()=>Vt(G(),se(),c.config,e(Fe))),Le=n(()=>e(Ie).nav.length>0||e(Ie).groups.length>0),Re=n(()=>oc(Ee())?.items??0),ze=n(()=>sc(e(Ie).nav,e(Ie).groups,Ce(),c.sectionHref)),Be=n(()=>e(Re)>0&&(e(ze).length>0||be().length>0)),Ve=n(()=>e(Be)?be()[0]:void 0),He=n(()=>cn(e(Y),e(Fe))),Ue=t=>{let n=new Map(e(Y).map(e=>[e.id,e]));return e(He)[t].flatMap(t=>t===Oe&&e(Ze)||t===ke&&e(Qe)?[]:n.get(t)??[])},We={"header.start":d,"header.center":f,"header.end":h,"footer.start":g,"footer.center":v,"footer.end":y,"leftSidebar.header":b,"leftSidebar.footer":x,"rightSidebar.header":S,"rightSidebar.footer":w},Ge=n(()=>{let e={};for(let t of ht)Ue(t).length>0&&(e[t]=We[t]);return e}),Ke=new Map;j(()=>{let t=e(Fe).panels??{};X.setLayoutPanels(t);for(let[e,n]of Ke)(t[e]?.initial??gn(c.config).panels[e].initial)===n&&X.setPanelStart(e,n);Ke.clear()});let qe=new ki({editable:()=>!!Se(),nav:()=>G(),groups:()=>se(),panels:()=>c.config,layout:()=>e(Fe),items:()=>e(Y).map(({id:e,label:t,slot:n})=>({id:e,label:t,slot:n})),commit(t){for(let n of dn){let r=e(Fe).panels?.[n]?.initial,i=t.panels?.[n]?.initial;if(r===i)continue;let a=i??gn(c.config).panels[n].initial;(a===`collapsed`||a===`expanded`)&&Ke.set(n,a)}e(Pe)||(c.onlayoutchange?U(Ne,t,!0):X.setLayout(t)),c.onlayoutchange?.(t)}});q(qe);let Je=n(()=>qe.editing),Ye=A(void 0),Xe=n(()=>ht.find(t=>e(He)[t].includes(Oe))),Ze=n(()=>e(Xe)===`leftSidebar.footer`&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)&&X.panels.left===`collapsed`),Qe=n(()=>e(He)[`leftSidebar.footer`].includes(ke)&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)),$e=n(()=>{if(X.viewport===`phone`||!e(Xe))return!0;let t=gt(e(Xe));return t!==`leftSidebar`&&t!==`rightSidebar`||!X.isRegionVisible(t)});function et(e,t){if(t)return`inline-end`;if(!e)return`bottom-end`;let n=vt(e,e=>X.isRegionVisible(e))??e,r=gt(n),i=r===`footer`||n.endsWith(`.footer`),a=n.endsWith(`.start`)||r===`leftSidebar`;return i?a?`top-start`:`top-end`:a?`bottom-start`:`bottom-end`}let tt=n(()=>{let e=he()??{};return{name:typeof e.name==`string`?e.name.trim():``,email:typeof e.email==`string`?e.email.trim():``,avatarUrl:typeof e.avatarUrl==`string`&&e.avatarUrl?e.avatarUrl:void 0}}),nt=n(he),rt=n(()=>{if(!e(Ae))return;let t=`calc(2.75rem + var(--smrt-spacing-3))`,n=X.isRegionVisible(`header`),r=X.isEdgeShown(`right`);return{inline:n?t:`0px`,block:!n&&r?t:`0px`,main:!n&&!r?t:`0px`}}),it=A(``),at=!1;j(()=>{let t=e(Je);t!==at&&(at=t,U(it,J(t?Z[`ui.layout_edit.announce_on`]:Z[`ui.layout_edit.announce_off`]),!0))});let ot=[`header.start`,`header.center`,`header.end`,`leftSidebar.header`,`rightSidebar.header`,`leftSidebar.footer`,`rightSidebar.footer`,`footer.start`,`footer.center`,`footer.end`],st=e=>X.isRegionVisible(e),ct=n(()=>ot.filter(e=>st(gt(e))));function lt(e){return J(Z[`ui.layout_edit.zone`],{region:J(si[gt(e)]),slot:J(oi[e])})}function ut(e){let t=Ue(e),n=ht.filter(t=>t!==e&&vt(t,st)===e).flatMap(e=>Ue(e));return[...t,...n]}let dt=e=>ut(e).filter(e=>!e.fixed),ft=K({root:()=>e(Ye),selectors:{container:`[data-smrt-edit-zone]`,containerKey:`smrtEditZone`,item:`[data-smrt-edit-item]`,itemKey:`smrtEditItem`},containers:()=>e(ct).map(e=>({id:e,label:lt(e)})),itemIds:e=>dt(e).map(e=>e.id),itemLabel:t=>e(Y).find(e=>e.id===t&&!e.fixed)?.label,allowSameContainerReorder:()=>!1,enabled:()=>e(Je),orientation:()=>`vertical`,announce:e=>Ri(J,e),focusTarget:e=>e.querySelector(`[data-smrt-edit-handle]`),commit(e){qe.placeItem(e.itemId,e.target.containerId)}});j(()=>{let t=e(Ye);if(!t||!e(Je))return;let n=e=>{ft.drag&&e.preventDefault()},r=e=>{if(!ft.drag||!(e.target instanceof Element))return;let t=e.target.closest(`[data-smrt-edit-zone]`);t?.dataset.smrtEditZone&&ft.dropOnContainer(e,t.dataset.smrtEditZone)};return t.addEventListener(`dragover`,n),t.addEventListener(`drop`,r),()=>{t.removeEventListener(`dragover`,n),t.removeEventListener(`drop`,r)}});let pt={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},_t=n(()=>qe.panels.filter(e=>e.available&&!e.visible).map(e=>pt[e.edge])),yt=n(()=>({active:e(Je),highlight:ft.drag?.target.containerId??null,zone:M,hiddenRegions:e(_t),strip:re,regionControl:ne})),bt=n(()=>qe.panels.filter(e=>e.available&&e.visible).length),Ct=[];j(()=>{e(Je)?z(()=>{if(X.viewport!==`phone`)for(let e of[`left`,`right`])X.config.panels[e].rail!==!1&&X.revealPanelTemporarily(e)&&Ct.push(e)}):z(()=>{for(let e of Ct)X.endTemporaryReveal(e);Ct=[]})}),j(()=>{if(!e(Je))return;let t=t=>{t.key!==`Escape`||t.defaultPrevented||ft.drag||e(Ye)?.querySelector(`[data-toolbar-open]`)||qe.setEditing(!1)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)});async function wt(){await Sc(async()=>{qe.setEditing(!qe.editing),await ie()})}let Tt={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`};es(a,{get webmcp(){return me()},get user(){return e(nt)},get permissions(){return ge()},children:(r,i)=>{var a=Mc(),s=B(a);gc(s,{get enabled(){return _e()}});var u=F(s,2);je(u,{get preset(){return ve()},get colorScheme(){return ye()},get borderRadius(){return c.borderRadius},get density(){return c.density},get contrast(){return c.contrast},persist:!0,children:(r,i)=>{var a=T(),s=B(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.children),C(e,t)},d=r=>{{let i=e=>{Ei(e,{get appName(){return W()},get tenantName(){return le()},get environment(){return ue()},showSettings:!1,docs:e=>{var n=Mc(),r=B(n);o(r,()=>c.appPanelDocs??m);var i=F(r,2),a=e=>{var t=jc(),n=L(t,!0);V(e=>{H(t,`href`,c.settingsHref),l(n,e)},[()=>J(Z[`ui.app_shell.settings_link`])]),C(e,t)};t(i,e=>{c.settingsHref&&e(a)}),C(e,n)},$$slots:{docs:!0}})},a=r=>{var i=T(),a=B(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));va(t,{collapsed:!0,get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return ce()},get navMode(){return Ce()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{!e(Je)&&e(Le)&&t(o)}),C(r,i)},s=r=>{var i=T(),a=B(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));ka(t,{get"aria-label"(){return e(r)},get sectionActions(){return c.sectionActions},get navMode(){return Ce()},get iconComponent(){return c.iconComponent}})}},s=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));va(t,{get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return ce()},get navMode(){return Ce()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{e(Je)?t(o):e(Le)&&t(s,1)}),C(r,i)},u=n(()=>be().length===0&&!e(Be)),d=n(()=>e(Be)?ae:void 0),f=n(()=>e(Ze)?I:void 0),p=n(()=>e(Qe)?Tc:void 0);ei(r,{get title(){return W()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref},get state(){return X},get path(){return ce()},get slots(){return e(Ge)},get layoutEdit(){return e(yt)},get edgeToggles(){return Te()},get hotkeys(){return c.hotkeys},brandInSlot:!0,get phoneDockOpener(){return e(u)},get phoneBottomBar(){return e(d)},get tenantRailFooter(){return e(f)},get tenantUtilities(){return e(p)},get floatingReserve(){return e(rt)},get rootElement(){return e(Ye)},set rootElement(e){U(Ye,e,!0)},appPanel:i,tenantRail:a,tenantPanel:s,children:(n,r)=>{var i=Pc(),a=B(i),s=L(a,!0),u=F(a,2),d=e=>{var t=Nc(),n=L(t,!0);V(()=>l(n,ft.announcement)),C(e,t)};t(u,t=>{e(Je)&&t(d)});var f=F(u,2),p=e=>{D(e)};t(f,t=>{e(Ae)&&t(p)});var m=F(f,2),h=e=>{Ys(e,{get dock(){return c.dock}})};t(m,e=>{c.dock&&e(h)});var g=F(m,2);o(g,()=>c.children),V(()=>l(s,e(it))),C(n,i)},$$slots:{appPanel:!0,tenantRail:!0,tenantPanel:!0,default:!0}})}};t(s,e=>{De()?e(d,-1):e(u)}),C(r,a)},$$slots:{default:!0}}),C(r,a)},$$slots:{default:!0}}),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{Z as C,Ge as S,Ve as T,at as _,es as a,Qe as b,oo as c,Ha as d,va as f,Ot as g,Vt as h,Js as i,io as l,ki as m,Cc as n,so as o,Xi as p,Sc as r,Qa as s,Fc as t,ao as u,rt as v,He as w,We as x,tt as y};
4
+ opacity: ${c-u*t}`}}var ea=c(`<span class="smrt-tenant-nav__attention svelte-jpnndf" data-attention="" aria-hidden="true"></span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),ta=c(`<span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span>`),na=c(`<span class="smrt-tenant-nav__icon smrt-tenant-nav__icon--placeholder svelte-jpnndf" aria-hidden="true"><!></span>`),ra=c(`<span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`),ia=c(`<small class="svelte-jpnndf"> </small>`),aa=c(`<strong class="svelte-jpnndf"> </strong> <!>`,1),oa=c(`<a class="smrt-tenant-nav__action svelte-jpnndf"><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span></a>`),sa=c(`<a class="svelte-jpnndf"><!> <span class="svelte-jpnndf"> </span> <!> <!></a>`),ca=c(`<div class="smrt-tenant-nav__children svelte-jpnndf"></div>`),la=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><!> <!> <!></a> <!></div> <!></div>`),ua=c(`<strong class="svelte-jpnndf"> </strong>`),da=c(`<div class="smrt-tenant-nav__subnav svelte-jpnndf"><!></div>`),fa=c(`<div class="smrt-tenant-nav__section svelte-jpnndf"><div class="smrt-tenant-nav__row svelte-jpnndf"><a><span class="smrt-tenant-nav__icon svelte-jpnndf" aria-hidden="true"><!></span> <!></a></div> <!></div>`),pa=c(`<div class="smrt-tenant-nav__group smrt-tenant-nav__group--flat" role="group"><div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></div>`),ma=c(`<span aria-hidden="true" class="svelte-jpnndf"> </span> <span class="smrt-tenant-nav__sr-only svelte-jpnndf"> </span>`,1),ha=c(`<span class="svelte-jpnndf"> </span>`),ga=c(`<details class="smrt-tenant-nav__group" open=""><summary class="smrt-tenant-nav__heading svelte-jpnndf"><!></summary> <div class="smrt-tenant-nav__group-items svelte-jpnndf"><!></div></details>`),_a=c(`<nav data-smrt-component="TenantNav"><!> <!></nav>`);function va(a,o){_(o,!0);let c=(e,n=m,r=m)=>{var i=T(),a=B(i),s=e=>{var t=T(),i=B(t);v(i,()=>o.iconComponent,(e,t)=>{t(e,{get name(){return n()},get size(){return r()}})}),C(e,t)},c=e=>{Ee(e,{get name(){return n()},get size(){return r()}})};t(a,e=>{o.iconComponent?e(s):e(c,-1)}),C(e,i)},u=(r,i=m)=>{let a=n(()=>ie(i()));var o=T(),s=B(o),c=t=>{var n=ea(),r=F(B(n),2),i=L(r);V(()=>l(i,`(${e(a)??``})`)),C(t,n)};t(s,t=>{e(a)&&t(c)}),C(r,o)},d=(r,a=m,d=m)=>{var _=T(),v=B(_);p(v,25,a,e=>e.href,(r,a)=>{let m=n(()=>z(e(a),d()??ee(e(a)))?e(a).action:void 0);var _=la(),v=N(_),y=N(v);let b;var x=N(y),w=t=>{var n=ta(),r=N(n);c(r,()=>e(a).icon,()=>18),s(n),C(t,n)},T=e=>{var t=na(),n=N(t);Ee(n,{get name(){return ge},size:18}),s(t),C(e,t)};t(x,t=>{e(a).icon?t(w):S()&&t(T,1)});var D=F(x,2),O=t=>{var n=ra(),r=L(n,!0);V(()=>l(r,e(a).label)),C(t,n)},k=n=>{var r=aa(),i=B(r),o=L(i,!0),s=F(i,2),c=t=>{var n=ia(),r=L(n,!0);V(()=>l(r,e(a).badge)),C(t,n)};t(s,t=>{e(a).badge!==null&&e(a).badge!==void 0&&t(c)}),V(()=>l(o,e(a).label)),C(n,r)};t(D,e=>{S()?e(O):e(k,-1)});var A=F(D,2);u(A,()=>e(a)),s(y);var P=F(y,2),I=t=>{var n=oa(),r=N(n),i=N(r);c(i,()=>e(m).icon??f,()=>16),s(r),s(n),V(t=>{H(n,`href`,e(m).href),H(n,`aria-label`,e(m).label),H(n,`aria-current`,t),H(n,`title`,e(m).label)},[()=>M(e(m))?`page`:void 0]),E(`click`,n,function(...e){o.onNavigate?.apply(this,e)}),C(t,n)};t(P,t=>{e(m)&&t(I)}),s(v);var te=F(v,2),R=n=>{var r=ca();p(r,21,()=>e(a).children,e=>e.href,(n,r)=>{var i=sa(),a=N(i),d=t=>{var n=ta(),i=N(n);c(i,()=>e(r).icon,()=>16),s(n),C(t,n)};t(a,t=>{e(r).icon&&t(d)});var f=F(a,2),p=L(f,!0),m=F(f,2),h=t=>{var n=ia(),i=L(n,!0);V(()=>l(i,e(r).badge)),C(t,n)};t(m,t=>{e(r).badge!==null&&e(r).badge!==void 0&&t(h)});var g=F(m,2);u(g,()=>e(r)),s(i),V(t=>{H(i,`href`,e(r).href),H(i,`aria-current`,t),l(p,e(r).label)},[()=>M(e(r))?`page`:void 0]),E(`click`,i,function(...e){o.onNavigate?.apply(this,e)}),C(n,i)}),s(r),C(n,r)};t(te,t=>{e(a).children?.length&&!S()&&t(R)}),s(_),V((t,n)=>{H(y,`href`,e(a).href),H(y,`aria-current`,t),H(y,`title`,S()?e(a).label:e(a).description),b=i(y,1,`svelte-jpnndf`,null,b,{"smrt-tenant-nav__link--visible-active":n})},[()=>M(e(a))?`page`:void 0,()=>ne(e(a))]),E(`click`,y,function(...e){o.onNavigate?.apply(this,e)}),g(1,_,()=>$i,j),h(_,()=>_e,null),C(r,_)}),C(r,_)},f=`settings`,y=k(o,`items`,19,()=>[]),b=k(o,`groups`,19,()=>[]),x=k(o,`currentHref`,3,``),S=k(o,`collapsed`,3,!1),w=k(o,`navMode`,3,`items`),{t:D}=de(),O=A(!1);re(()=>{U(O,!0)});function j(){let t=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,n=typeof Element<`u`&&typeof Element.prototype.animate==`function`;return{x:12,duration:e(O)&&!t&&n?260:0}}function M(e){return e.href===x()||x().startsWith(`${e.href}/`)}function ee(e){return M(e)||!!e.children?.some(e=>M(e))||!!e.action&&M(e.action)}function P(e){return e.items.some(ee)}function I(e){return e.id??e.heading}function te(e){return e.href??o.sectionHref?.(I(e))??e.items[0]?.href}function R(e){let t=te(e);return!!t&&(t===x()||x().startsWith(`${t}/`))||P(e)}function z(e,t){return S()||!e.action?!1:e.action.visibility!==`active`||t}function ne(e){return M(e)?!0:S()&&ee(e)}function ie(e){return e.attention?typeof e.attention==`string`&&e.attention.trim()?e.attention.trim():D(Z[`ui.tenant_nav.needs_attention`]):null}function ae(e){return e.trim().charAt(0).toLocaleUpperCase()||`?`}var W=_a();let oe;var G=N(W);d(G,y);var se=F(G,2);p(se,17,b,e=>I(e),(r,a)=>{var c=T(),u=B(c),f=r=>{let c=n(()=>te(e(a)));var u=T(),f=B(u),p=r=>{var u=fa(),f=N(u),p=N(f);let m;var h=N(p),_=N(h);{let t=n(()=>e(a).icon??`folder`);Ee(_,{get name(){return e(t)},size:18,get iconComponent(){return o.iconComponent}})}s(h);var v=F(h,2),y=t=>{var n=ra(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)},b=t=>{var n=ua(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)};t(v,e=>{S()?e(y):e(b,-1)}),s(p),s(f);var T=F(f,2),D=t=>{var r=da(),i=N(r);{let t=n(()=>P(e(a)));d(i,()=>e(a).items,()=>e(t))}s(r),C(t,r)};t(T,t=>{w()===`sections-with-items`&&!S()&&e(a).items.length&&t(D)}),s(u),V((t,n,r)=>{H(u,`data-nav-section`,t),H(p,`href`,e(c)),m=i(p,1,`smrt-tenant-nav__section-link svelte-jpnndf`,null,m,{"smrt-tenant-nav__link--visible-active":n}),H(p,`aria-current`,r),H(p,`title`,S()?e(a).heading:void 0)},[()=>I(e(a)),()=>R(e(a)),()=>e(c)===x()?`page`:R(e(a))?`true`:void 0]),E(`click`,p,function(...e){o.onNavigate?.apply(this,e)}),g(1,u,()=>$i,j),C(r,u)};t(f,t=>{e(c)&&t(p)}),C(r,u)},p=t=>{var r=pa(),i=N(r),o=N(i);{let t=n(()=>P(e(a)));d(o,()=>e(a).items,()=>e(t))}s(i),s(r),V(()=>H(r,`aria-label`,e(a).heading)),C(t,r)},m=r=>{var i=ga(),o=N(i),c=N(o),u=t=>{var n=ma(),r=B(n),i=L(r,!0),o=F(r,2),s=L(o,!0);V(t=>{l(i,t),l(s,e(a).heading)},[()=>ae(e(a).heading)]),C(t,n)},f=t=>{var n=ha(),r=L(n,!0);V(()=>l(r,e(a).heading)),C(t,n)};t(c,e=>{S()?e(u):e(f,-1)}),s(o);var p=F(o,2),m=N(p);{let t=n(()=>P(e(a)));d(m,()=>e(a).items,()=>e(t))}s(p),s(i),V(()=>H(i,`aria-label`,e(a).heading)),C(r,i)};t(u,t=>{w()===`sections`||w()===`sections-with-items`?t(f):e(a).showTitle===!1?t(p,1):t(m,-1)}),C(r,c)}),s(W),V(e=>{oe=i(W,1,`smrt-tenant-nav svelte-jpnndf`,null,oe,{"smrt-tenant-nav--collapsed":S()}),H(W,`data-density`,o.density),H(W,`aria-label`,e)},[()=>o[`aria-label`]||D(Z[`ui.tenant_nav.tenant_navigation`])]),C(a,W),r()}D([`click`]);var ya=c(`<!> <!>`,1),ba=c(`<strong class="svelte-vi5c2s"> </strong>`),xa=c(`<span class="smrt-nav-editor__top svelte-vi5c2s"> </span>`),Sa=c(`<span class="smrt-nav-editor__section-icon svelte-vi5c2s"><!></span>`),Ca=c(`<div class="smrt-nav-editor__icons svelte-vi5c2s" role="group"></div>`),wa=c(`<div class="smrt-nav-editor__toolbar svelte-vi5c2s" role="group" data-testid="section-toolbar"><!> <!> <!> <!> <!> <!></div>`),Ta=c(`<div class="smrt-nav-editor__head svelte-vi5c2s"><button type="button" data-section-title="" aria-haspopup="true"><!> </button> <span class="smrt-nav-editor__overlay svelte-vi5c2s"><!> <!></span> <!></div>`),Ea=c(`<span class="smrt-nav-editor__icon svelte-vi5c2s" aria-hidden="true"><!></span>`),Da=c(`<span><!> <!></span> <!> <!> <!>`,1),Oa=c(`<nav class="smrt-nav-editor svelte-vi5c2s" data-layout-editing="" data-smrt-component="ShellNavEditor"><!> <!></nav>`);function ka(a,c){_(c,!0);let u=(r,i=m)=>{var a=ya(),o=B(a);{let t=n(()=>i().hidden?`eyeOff`:`eye`),r=n(()=>!i().hidden),a=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:i().label}));we(o,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(a)},onclick:()=>K(i().id,i().hidden)})}var s=F(o,2),c=t=>{{let r=n(()=>i().titleVisible?`heading`:`headingOff`),a=n(()=>g(Z[`ui.shell_layout_editor.show_title_for`],{label:i().label}));we(t,{get icon(){return e(r)},get pressed(){return i().titleVisible},get label(){return e(a)},onclick:()=>b.setSectionTitleVisible(i().id,!i().titleVisible)})}};t(s,e=>{h()!==`sections`&&e(c)}),C(r,a)},f=(e,t=m)=>{var n=T(),r=B(n);o(r,()=>c.sectionActions??m,()=>({sectionId:t().id,label:t().label,custom:t().custom,editing:!0})),C(e,n)},h=k(c,`navMode`,3,`items`),{t:g}=de(),b=z(()=>c.controller??Oe()),x=n(()=>b.sections),S=n(()=>e(x).map(e=>({id:e.id,label:e.heading??g(Z[`ui.shell_layout_editor.top_level`]),fixed:e.group===null,root:e.group===null,hidden:e.hidden,custom:e.custom,titleVisible:e.titleVisible,count:e.items.length,icon:e.icon??`folder`}))),w=n(()=>(h()===`sections`?[]:e(x)).flatMap(e=>e.items.map(t=>({id:t.id,containerId:e.id,label:t.label})))),D=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.defaultLabel])))),ee=n(()=>new Map(e(x).flatMap(e=>e.items.map(e=>[e.id,e.item.icon])))),P=A(void 0),I=A(null);function te(){return typeof window<`u`&&window.matchMedia?.(`(hover: hover) and (pointer: fine)`).matches===!0}function R(t){return e(P)?.querySelector(`[data-nav-section="${CSS.escape(t)}"]`)??null}function ne(t,n){n.pointerType!==`touch`&&te()&&(e(I)?.pinned||U(I,{id:t,pinned:!1},!0))}async function re(t){if(e(I)?.id===t&&e(I).pinned){U(I,null);return}U(I,{id:t,pinned:!0},!0),await ie();let n=R(t)?.querySelector(`input[data-section-name]`);n?.focus(),n?.select()}function ae(t){e(I)?.id===t&&!e(I).pinned&&U(I,null)}function W(t,n){n.key===`Escape`&&e(I)?.id===t&&(n.preventDefault(),n.stopPropagation(),e(G)===t?(U(G,null),se(t)?.focus()):(U(I,null),R(t)?.querySelector(`button[data-section-title]`)?.focus()))}function oe(t,n){if(e(I)?.id!==t||!e(I).pinned)return;let r=n.relatedTarget;r instanceof Node&&!R(t)?.contains(r)&&U(I,null)}j(()=>{let t=e(I);if(!t?.pinned||typeof document>`u`)return;let n=e=>{e.target instanceof Node&&!R(t.id)?.contains(e.target)&&U(I,null)};return document.addEventListener(`pointerdown`,n,!0),()=>document.removeEventListener(`pointerdown`,n,!0)});let G=A(null);function se(e){return R(e)?.querySelector(`button[data-section-icon]`)??null}function ce(e,t){b.setSectionIcon(e,t),U(G,null),se(e)?.focus()}j(()=>{e(G)!==null&&e(I)?.id!==e(G)&&U(G,null)});function le(e){return e.replace(/([A-Z])/g,` $1`).toLowerCase()}let ue=A(null);async function fe(t){U(ue,t,!0),await ie();let n=e(P)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function pe(t,n){e(ue)===t&&(U(ue,null),b.renameItem(t,n))}function ge(t){U(ue,null),e(P)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function K(e,t){t?b.show(e):b.hide(e)}function q(t,n){b.renameSection(t,n.value),n.value=e(S).find(e=>e.id===t)?.label??``}async function _e(){let e=b.createSection(g(Z[`ui.shell_layout_editor.new_section_label`]));e&&(await ie(),await re(e))}function ve(e,t,n){n>0&&!globalThis.confirm?.(g(Z[`ui.shell_layout_editor.delete_confirm`],{label:t}))||(U(I,null),b.deleteSection(e))}function ye(e){b.moveItem(e.item.id,e.target.containerId,e.target.index)}function be(e){b.moveSection(e.container.id,e.target)}var xe=Oa(),Se=N(xe);{let r=(r,a)=>{let o=()=>(a?.()).container,d=n(()=>e(S).find(e=>e.id===o().id));var m=T(),_=B(m),v=e=>{var t=ba(),n=L(t,!0);V(()=>l(n,o().label)),C(e,t)},y=e=>{var t=xa(),n=L(t,!0);V(()=>l(n,o().label)),C(e,t)},b=r=>{var a=Ta(),o=N(a);let m;var _=N(o),v=t=>{var n=Sa(),r=N(n);Ee(r,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}}),s(n),C(t,n)};t(_,e=>{h()!==`items`&&e(v)});var y=F(_,1,!0);s(o);var b=F(o,2),x=N(b);u(x,()=>e(d));var S=F(x,2);f(S,()=>e(d)),s(b);var w=F(b,2),T=r=>{var i=wa(),a=N(i);{let t=n(()=>g(Z[`ui.shell_layout_editor.section_name`],{label:e(d).label}));he(a,{class:`smrt-nav-editor__name`,interaction:!1,get"data-section-name"(){return e(d).id},get"aria-label"(){return e(t)},get value(){return e(d).label},onchange:t=>q(e(d).id,t.currentTarget),onkeydown:t=>{t.key===`Enter`&&(t.preventDefault(),q(e(d).id,t.currentTarget))}})}var o=F(a,2);u(o,()=>e(d));var l=F(o,2),m=t=>{{let r=n(()=>e(G)===e(d).id),i=n(()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label}));we(t,{get"data-section-icon"(){return e(d).id},"aria-haspopup":`true`,get"aria-expanded"(){return e(r)},get label(){return e(i)},onclick:()=>U(G,e(G)===e(d).id?null:e(d).id,!0),children:(t,n)=>{Ee(t,{get name(){return e(d).icon},get iconComponent(){return c.iconComponent}})},$$slots:{default:!0}})}};t(l,e=>{h()!==`items`&&e(m)});var _=F(l,2),v=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.delete_section`],{label:e(d).label}));we(t,{icon:`trash`,get label(){return e(r)},onclick:()=>ve(e(d).id,e(d).label,e(d).count)})}};t(_,t=>{e(d).custom&&t(v)});var y=F(_,2);f(y,()=>e(d));var b=F(y,2),x=t=>{var r=Ca();p(r,20,()=>ke,e=>e,(t,r)=>{{let i=n(()=>e(d).icon===r),a=n(()=>g(Z[`ui.shell_layout_editor.icon_option`],{icon:le(r)}));we(t,{get"data-icon-option"(){return r},get pressed(){return e(i)},get label(){return e(a)},onclick:()=>ce(e(d).id,r),children:(e,t)=>{Ee(e,{get name(){return r}})},$$slots:{default:!0}})}}),s(r),V(e=>H(r,`aria-label`,e),[()=>g(Z[`ui.shell_layout_editor.section_icon`],{label:e(d).label})]),C(t,r)};t(b,t=>{h()!==`items`&&e(G)===e(d).id&&t(x)}),s(i),V(e=>H(i,`aria-label`,e),[()=>g(Z[`ui.layout_edit.section_options`],{label:e(d).label})]),C(r,i)};t(w,t=>{e(I)?.id===e(d).id&&t(T)}),s(a),V(t=>{H(a,`data-nav-section`,e(d).id),H(a,`data-toolbar-open`,e(I)?.id===e(d).id?``:void 0),m=i(o,1,`smrt-nav-editor__title svelte-vi5c2s`,null,m,{"smrt-nav-editor__title--off":!e(d).titleVisible,"smrt-nav-editor__title--hidden":e(d).hidden}),H(o,`aria-expanded`,e(I)?.id===e(d).id),H(o,`aria-label`,t),l(y,e(d).label)},[()=>g(Z[`ui.layout_edit.edit_section`],{label:e(d).label})]),O(`pointerleave`,a,()=>ae(e(d).id)),E(`keydown`,a,t=>W(e(d).id,t)),E(`focusout`,a,t=>oe(e(d).id,t)),O(`pointerenter`,o,t=>ne(e(d).id,t)),E(`click`,o,()=>re(e(d).id)),C(r,a)};t(_,t=>{e(d)?e(d).root?t(y,1):t(b,-1):t(v)}),C(r,m)},a=(r,a)=>{let o=()=>(a?.()).item,u=()=>(a?.()).container,d=n(()=>b.isHidden(o().id)),f=n(()=>e(ee).get(o().id)),p=n(()=>e(D).get(o().id));var m=Da(),h=B(m);let _;var y=N(h),x=n=>{var r=Ea(),i=N(r),a=t=>{var n=T(),r=B(n);v(r,()=>c.iconComponent,(t,n)=>{n(t,{get name(){return e(f)},size:18})}),C(t,n)},o=t=>{Ee(t,{get name(){return e(f)},size:18})};t(i,e=>{c.iconComponent?e(a):e(o,-1)}),s(r),C(n,r)};t(y,t=>{e(f)&&t(x)});var S=F(y,2),w=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.item_name`],{label:o().label}));he(t,{class:`smrt-nav-editor__item-name`,interaction:!1,get"data-item-name"(){return o().id},get"aria-label"(){return e(r)},get value(){return o().label},onblur:e=>pe(o().id,e.currentTarget.value),onkeydown:e=>{if(e.key===`Enter`){e.preventDefault(),e.stopPropagation();let t=e.currentTarget.value;pe(o().id,t),ge(o().id)}else e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),ge(o().id))}})}},E=t=>{var n=ba(),r=L(n,!0);V(()=>{H(n,`title`,e(p)===o().label?void 0:e(p)),l(r,o().label)}),C(t,n)};t(S,t=>{e(ue)===o().id?t(w):t(E,-1)}),s(h);var O=F(h,2);{let t=n(()=>g(Z[`ui.shell_layout_editor.rename_item`],{label:o().label}));we(O,{icon:`edit`,get"data-item-rename"(){return o().id},get label(){return e(t)},onclick:()=>fe(o().id)})}var k=F(O,2),A=t=>{{let r=n(()=>g(Z[`ui.shell_layout_editor.reset_item`],{label:o().label,original:e(p)}));we(t,{icon:`undo`,get label(){return e(r)},onclick:()=>b.renameItem(o().id,null)})}};t(k,t=>{e(p)!==void 0&&e(p)!==o().label&&t(A)});var j=F(k,2);{let t=n(()=>e(d)?`eyeOff`:`eye`),r=n(()=>!e(d)),i=n(()=>g(Z[`ui.shell_layout_editor.show_entry`],{label:o().label}));we(j,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>K(o().id,e(d))})}V(e=>_=i(h,1,`smrt-nav-editor__row svelte-vi5c2s`,null,_,{"smrt-nav-editor__row--muted":e}),[()=>e(d)||b.isHidden(u().id)]),C(r,m)},o=n(()=>g(Z[`ui.shell_layout_editor.sortable_label`]));Xi(Se,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(o)},reorderContainers:!0,onmove:ye,oncontainermove:be,containerHeader:r,item:a,$$slots:{containerHeader:!0,item:!0}})}var Ce=F(Se,2);me(Ce,{variant:`secondary`,size:`sm`,class:`smrt-nav-editor__new`,onclick:_e,children:(e,t)=>{y();var n=d();V(e=>l(n,e),[()=>g(Z[`ui.shell_layout_editor.new_section`])]),C(e,n)},$$slots:{default:!0}}),s(xe),M(xe,e=>U(P,e),()=>e(P)),V(e=>{H(xe,`data-nav-mode`,h()),H(xe,`aria-label`,e)},[()=>c[`aria-label`]||g(Z[`ui.shell_layout_editor.sortable_label`])]),C(a,xe),r()}D([`keydown`,`focusout`,`click`]);var Aa=c(`<strong class="svelte-nwjioo"> </strong>`),ja=c(`<span class="smrt-section-menu__desc svelte-nwjioo"> </span>`),Ma=c(`<span><!> <!> <!> <!></span> <!> <!> <!>`,1),Na=c(`<p class="smrt-section-menu__empty svelte-nwjioo"> </p>`),Pa=c(`<span class="smrt-section-menu__meta svelte-nwjioo"><!></span>`),Fa=c(`<span class="smrt-section-menu__actions svelte-nwjioo"><!></span>`),Ia=c(`<div class="smrt-section-menu__card-foot svelte-nwjioo"><!> <!></div>`),La=c(`<li class="smrt-section-menu__card svelte-nwjioo"><a class="smrt-section-menu__card-link svelte-nwjioo"><span class="smrt-section-menu__card-heading svelte-nwjioo"><span class="smrt-section-menu__card-icon svelte-nwjioo"><!></span> <span class="smrt-section-menu__card-title svelte-nwjioo"> </span></span> <!></a> <!></li>`),Ra=c(`<ul class="smrt-section-menu__cards svelte-nwjioo"></ul>`),za=c(`<li class="smrt-section-menu__item svelte-nwjioo"><a class="smrt-section-menu__link svelte-nwjioo"><!> <span class="smrt-section-menu__label svelte-nwjioo"> </span></a> <!> <!> <svg class="smrt-section-menu__chevron svelte-nwjioo" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg></li>`),Ba=c(`<ul class="smrt-section-menu__list svelte-nwjioo"></ul>`),Va=c(`<div data-smrt-component="ShellSectionMenu"><!></div>`);function Ha(a,c){_(c,!0);let u=k(c,`layout`,3,`list`),{t:d}=de(),f=z(()=>c.controller??Oe()),g=n(()=>f.sections.find(e=>e.id===c.sectionId)),v=n(()=>f.editing),y=n(()=>e(g)?.heading??c.sectionId),b=n(()=>(e(g)?.items??[]).filter(t=>e(v)||!t.hidden).map(e=>({id:e.id,href:e.item.href,label:e.label,defaultLabel:e.defaultLabel,icon:e.item.icon,hidden:e.hidden,item:e.item}))),x=n(()=>c[`aria-label`]||d(Z[`ui.section_menu.label`],{label:e(y)})),S=n(()=>[{id:c.sectionId,label:e(x)}]),w=n(()=>e(b).map(e=>({id:e.id,containerId:c.sectionId,label:e.label}))),D=n(()=>new Map(e(b).map(e=>[e.id,e]))),O=A(void 0),j=A(null);async function ee(t){U(j,t,!0),await ie();let n=e(O)?.querySelector(`input[data-item-name="${CSS.escape(t)}"]`);n?.focus(),n?.select()}function P(t,n){e(j)===t&&(U(j,null),f.renameItem(t,n))}function I(t){U(j,null),e(O)?.querySelector(`button[data-item-rename="${CSS.escape(t)}"]`)?.focus()}function te(e,t){t?f.show(e):f.hide(e)}function R(e){f.moveItem(e.item.id,c.sectionId,e.target.index)}var ne=Va();let re;var ae=N(ne),W=r=>{Xi(r,{get containers(){return e(S)},get items(){return e(w)},get label(){return e(x)},onmove:R,item:(r,a)=>{let p=()=>(a?.()).item,h=n(()=>e(D).get(p().id));var g=T(),_=B(g),v=r=>{var a=Ma(),p=B(a);let g;var _=N(p),v=t=>{Ee(t,{get name(){return e(h).icon},get iconComponent(){return c.iconComponent}})};t(_,t=>{e(h).icon&&t(v)});var y=F(_,2),b=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.item_name`],{label:e(h).label}));he(t,{class:`smrt-section-menu__name`,interaction:!1,get"data-item-name"(){return e(h).id},get"aria-label"(){return e(r)},get value(){return e(h).label},onblur:t=>P(e(h).id,t.currentTarget.value),onkeydown:t=>{if(t.key===`Enter`){t.preventDefault(),t.stopPropagation();let n=t.currentTarget.value;P(e(h).id,n),I(e(h).id)}else t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),I(e(h).id))}})}},x=t=>{var n=Aa(),r=L(n,!0);V(()=>{H(n,`title`,e(h).defaultLabel===e(h).label?void 0:e(h).defaultLabel),l(r,e(h).label)}),C(t,n)};t(y,t=>{e(j)===e(h).id?t(b):t(x,-1)});var S=F(y,2);o(S,()=>c.meta??m,()=>e(h));var w=F(S,2),T=t=>{var n=ja(),r=L(n,!0);V(()=>l(r,e(h).item.description)),C(t,n)};t(w,t=>{u()===`cards`&&e(h).item.description&&t(T)}),s(p);var E=F(p,2);{let t=n(()=>d(Z[`ui.shell_layout_editor.rename_item`],{label:e(h).label}));we(E,{icon:`edit`,get"data-item-rename"(){return e(h).id},get label(){return e(t)},onclick:()=>ee(e(h).id)})}var D=F(E,2),O=t=>{{let r=n(()=>d(Z[`ui.shell_layout_editor.reset_item`],{label:e(h).label,original:e(h).defaultLabel}));we(t,{icon:`undo`,get label(){return e(r)},onclick:()=>f.renameItem(e(h).id,null)})}};t(D,t=>{e(h).defaultLabel!==e(h).label&&t(O)});var k=F(D,2);{let t=n(()=>e(h).hidden?`eyeOff`:`eye`),r=n(()=>!e(h).hidden),i=n(()=>d(Z[`ui.shell_layout_editor.show_entry`],{label:e(h).label}));we(k,{get icon(){return e(t)},get pressed(){return e(r)},get label(){return e(i)},onclick:()=>te(e(h).id,e(h).hidden)})}V(()=>g=i(p,1,`smrt-section-menu__row svelte-nwjioo`,null,g,{"smrt-section-menu__row--muted":e(h).hidden})),C(r,a)};t(_,t=>{e(h)&&t(v)}),C(r,g)},$$slots:{item:!0}})},oe=e=>{var t=Na(),n=L(t,!0);V(e=>l(n,e),[()=>d(Z[`ui.section_menu.empty`])]),C(e,t)},G=r=>{var i=Ra();p(i,29,()=>e(b),e=>e.id,(r,i)=>{var a=La(),u=N(a),d=N(u),f=N(d),p=N(f);{let t=n(()=>e(i).icon??`folder`);Ee(p,{get name(){return e(t)},size:28,get iconComponent(){return c.iconComponent}})}s(f);var m=F(f,2),g=L(m,!0);s(d);var _=F(d,2),v=t=>{var n=ja(),r=L(n,!0);V(()=>l(r,e(i).item.description)),C(t,n)};t(_,t=>{e(i).item.description&&t(v)}),s(u);var y=F(u,2),b=n=>{var r=Ia(),a=N(r),l=t=>{var n=Pa(),r=N(n);o(r,()=>c.meta,()=>e(i)),s(n),C(t,n)};t(a,e=>{c.meta&&e(l)});var u=F(a,2),d=t=>{var n=Fa(),r=N(n);o(r,()=>c.actions,()=>e(i)),s(n),C(t,n)};t(u,e=>{c.actions&&e(d)}),s(r),C(n,r)};t(y,e=>{(c.meta||c.actions)&&e(b)}),s(a),V(()=>{H(u,`href`,e(i).href),l(g,e(i).label)}),E(`click`,u,function(...e){c.onNavigate?.apply(this,e)}),h(a,()=>_e,null),C(r,a)}),s(i),V(()=>H(i,`aria-label`,e(x))),C(r,i)},se=n=>{var r=Ba();p(r,29,()=>e(b),e=>e.id,(n,r)=>{var i=za(),a=N(i),u=N(a),d=t=>{Ee(t,{get name(){return e(r).icon},get iconComponent(){return c.iconComponent}})};t(u,t=>{e(r).icon&&t(d)});var f=F(u,2),p=L(f,!0);s(a);var m=F(a,2),g=t=>{var n=Pa(),i=N(n);o(i,()=>c.meta,()=>e(r)),s(n),C(t,n)};t(m,e=>{c.meta&&e(g)});var _=F(m,2),v=t=>{var n=Fa(),i=N(n);o(i,()=>c.actions,()=>e(r)),s(n),C(t,n)};t(_,e=>{c.actions&&e(v)});var y=F(_,2),b=L(y);s(i),V(()=>{H(a,`href`,e(r).href),l(p,e(r).label),H(b,`d`,ye.chevronRight)}),E(`click`,a,function(...e){c.onNavigate?.apply(this,e)}),h(i,()=>_e,null),C(n,i)}),s(r),V(()=>H(r,`aria-label`,e(x))),C(n,r)};t(ae,t=>{e(v)?t(W):e(b).length===0?t(oe,1):u()===`cards`?t(G,2):t(se,-1)}),s(ne),M(ne,e=>U(O,e),()=>e(O)),V(()=>{re=i(ne,1,`smrt-section-menu svelte-nwjioo`,null,re,{"smrt-section-menu--cards":u()===`cards`}),H(ne,`data-editing`,e(v)?``:void 0)}),C(a,ne),r()}D([`click`]);var Ua=c(`<span class="smrt-workspace-account-menu__context svelte-1703h4r"> </span>`),Wa=c(`<span class="smrt-workspace-account-menu__email svelte-1703h4r"> </span>`),Ga=c(`<div class="smrt-workspace-account-menu__header svelte-1703h4r"><span class="smrt-workspace-account-menu__name svelte-1703h4r"> </span> <!></div>`),Ka=c(`<a role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </a>`),qa=c(`<button type="button" role="menuitem" class="smrt-workspace-account-menu__item svelte-1703h4r" tabindex="-1"> </button>`),Ja=c(`<p class="smrt-workspace-account-menu__error svelte-1703h4r" role="alert" data-smrt-part="error"> </p>`),Ya=c(`<div data-smrt-part="panel"><!> <div role="menu" tabindex="-1" class="smrt-workspace-account-menu__menu svelte-1703h4r"><!> <!></div></div>`),Xa=c(`<div class="smrt-workspace-account-menu svelte-1703h4r" data-smrt-component="WorkspaceAccountMenu"><button type="button" class="smrt-workspace-account-menu__trigger svelte-1703h4r" data-smrt-part="trigger" aria-haspopup="menu"><span class="smrt-workspace-account-menu__open svelte-1703h4r"> </span> <!> <span class="smrt-workspace-account-menu__identity svelte-1703h4r"><span class="smrt-workspace-account-menu__summary svelte-1703h4r"> </span> <!></span> <span class="smrt-workspace-account-menu__indicator svelte-1703h4r" aria-hidden="true">•••</span></button> <!></div>`);function Za(a,o){let c=ne();_(o,!0);let u=`workspace-account:sign-out`,d=`workspace-account:tenant:`,f=k(o,`compact`,3,!1),m=k(o,`userLabel`,3,``),h=k(o,`email`,3,``),g=k(o,`tenantLabel`,3,``),v=k(o,`roleLabel`,3,``),b=k(o,`tenants`,19,()=>[]),x=k(o,`currentTenantId`,3,null),S=k(o,`placement`,3,`top-start`),w=k(o,`disabled`,3,!1),{t:D}=de(),O=`smrt-account-menu-${c}`,ee=n(()=>m()||o.userName),I=n(()=>g()||b().find(e=>e.id===x())?.label||``),te=n(()=>[e(I),v()].filter(Boolean).join(` · `)),R=n(()=>[e(ee),e(I),v()].filter(Boolean).join(` · `)),z=n(()=>!!h()&&h()!==e(ee)),re=n(()=>{let e=[];if(b().length>1&&o.onTenantSelect)for(let t of b()){let n=t.id===x(),r=t.roleLabel?` — ${t.roleLabel}`:``;e.push({id:`${d}${t.id}`,label:n?`${D(Z[`ui.workspace_account_menu.current_tenant`],{tenant:t.label})}${r}`:`${t.label}${r}`,disabled:t.disabled||n})}return o.settingsHref&&e.push({id:`workspace-account:settings`,label:D(Z[`ui.app_shell.account_settings`]),href:o.settingsHref}),(o.onSignOut||o.signOutHref)&&e.push({id:u,label:D(Z[`ui.workspace_account_menu.sign_out`]),href:o.onSignOut?void 0:o.signOutHref}),e}),ae=A(!1),W=A(!1),oe=A(!1),G=A(null),se=A(null),ce=P([]),le=n(()=>e(re).map((e,t)=>e.disabled?-1:t).filter(e=>e>=0));async function ue(t=!1){U(ae,!0),await ie();let n=t?e(le)[e(le).length-1]:e(le)[0];n!=null&&ce[n]?.focus()}function fe(t=!0){U(ae,!1),t&&e(se)?.focus()}async function me(){if(!e(W)&&o.onSignOut){U(W,!0),U(oe,!1);try{let e=o.onSignOut();typeof e==`object`&&e&&typeof e.then==`function`&&await e}catch{U(oe,!0),U(W,!1);return}U(W,!1),fe()}}function he(e){e.disabled||(e.id===u&&o.onSignOut?me():(e.id.startsWith(d)&&o.onTenantSelect?.(e.id.slice(25)),fe(!e.href)))}function ge(t){if(e(le).length===0)return;let n=ce.indexOf(document.activeElement),r=e(le).indexOf(n);ce[e(le)[(r+t+e(le).length)%e(le).length]]?.focus()}function K(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),ue(e.key===`ArrowUp`))}function q(t){switch(t.key){case`ArrowDown`:t.preventDefault(),ge(1);break;case`ArrowUp`:t.preventDefault(),ge(-1);break;case`Home`:t.preventDefault(),ce[e(le)[0]]?.focus();break;case`End`:t.preventDefault(),ce[e(le)[e(le).length-1]]?.focus();break;case`Escape`:t.preventDefault(),t.stopPropagation(),fe();break;case`Tab`:fe(!1)}}j(()=>{if(!e(ae))return;let t=t=>{e(G)&&!e(G).contains(t.target)&&fe(!1)};return document.addEventListener(`click`,t,!0),()=>document.removeEventListener(`click`,t,!0)});var _e=Xa(),ve=N(_e),ye=N(ve),be=L(ye,!0),xe=F(ye,2);pe(xe,{get src(){return o.avatarUrl},get name(){return o.userName},size:`sm`,"aria-hidden":`true`});var Se=F(xe,2),Ce=N(Se),we=L(Ce,!0),Te=F(Ce,2),Ee=t=>{var n=Ua(),r=L(n,!0);V(()=>l(r,e(te))),C(t,n)};t(Te,t=>{e(te)&&t(Ee)}),s(Se),y(2),s(ve),M(ve,e=>U(se,e),()=>e(se));var De=F(ve,2),Oe=n=>{var r=Ya(),a=N(r),o=n=>{var r=Ga(),i=N(r),a=L(i,!0),o=F(i,2),c=e=>{var t=Wa(),n=L(t,!0);V(()=>l(n,h())),C(e,t)};t(o,t=>{e(z)&&t(c)}),s(r),V(()=>l(a,e(ee))),C(n,r)};t(a,t=>{(e(ee)||e(z))&&t(o)});var c=F(a,2),d=N(c);p(d,19,()=>e(re),e=>e.id,(n,r,i)=>{var a=T(),o=B(a),s=t=>{var n=Ka(),a=L(n,!0);M(n,(e,t)=>ce[t]=e,e=>ce?.[e],()=>[e(i)]),V(()=>{H(n,`href`,e(r).href),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)},c=t=>{var n=qa(),a=L(n,!0);M(n,(e,t)=>ce[t]=e,e=>ce?.[e],()=>[e(i)]),V(()=>{n.disabled=e(r).disabled||e(r).id===u&&e(W),H(n,`aria-busy`,e(r).id===u&&e(W)?`true`:void 0),l(a,e(r).label)}),E(`click`,n,()=>he(e(r))),C(t,n)};t(o,t=>{e(r).href?t(s):t(c,-1)}),C(n,a)});var f=F(d,2),m=e=>{var t=Ja(),n=L(t,!0);V(e=>l(n,e),[()=>D(Z[`ui.shell_settings.sign_out_failed`])]),C(e,t)};t(f,t=>{e(oe)&&t(m)}),s(c),s(r),V(e=>{i(r,1,`smrt-workspace-account-menu__popover smrt-workspace-account-menu__popover--${S()??``}`,`svelte-1703h4r`),H(c,`id`,O),H(c,`aria-label`,e)},[()=>D(Z[`ui.app_shell.account_item`])]),E(`keydown`,c,q),C(n,r)};t(De,t=>{e(ae)&&t(Oe)}),s(_e),M(_e,e=>U(G,e),()=>e(G)),V((t,n)=>{H(_e,`data-density`,o.density),H(_e,`data-compact`,f()?``:void 0),H(_e,`title`,e(R)),H(ve,`aria-label`,t),H(ve,`aria-expanded`,e(ae)),H(ve,`aria-controls`,e(ae)?O:void 0),ve.disabled=w()||e(re).length===0,l(be,n),l(we,e(ee))},[()=>f()?`${D(Z[`ui.workspace_account_menu.open`])} ${e(R)}`:void 0,()=>D(Z[`ui.workspace_account_menu.open`])]),E(`click`,ve,()=>e(ae)?fe(!1):ue()),E(`keydown`,ve,K),C(a,_e),r()}D([`click`,`keydown`]);function Qa(){let e=$a();return{stt:to(e),tts:no(e),llm:ro(e),browser:e}}function $a(){return typeof window>`u`?{sharedArrayBuffer:!1,webWorkers:!1,indexedDB:!1,wasmSupport:!1,wasmSimd:!1}:{sharedArrayBuffer:typeof SharedArrayBuffer<`u`,webWorkers:typeof Worker<`u`,indexedDB:typeof indexedDB<`u`,wasmSupport:typeof WebAssembly<`u`,wasmSimd:eo()}}function eo(){if(typeof WebAssembly>`u`)return!1;try{let e=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,253,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]);return WebAssembly.validate(e)}catch{return!1}}function to(e){return{browserSpeechAPI:typeof window<`u`&&(`SpeechRecognition`in window||`webkitSpeechRecognition`in window),whisperWasm:e.wasmSupport}}function no(e){return{browserSynthesisAPI:typeof window<`u`&&`speechSynthesis`in window,transformersTTS:e.wasmSupport}}function ro(e){let t=typeof window<`u`&&`gpu`in navigator;return{webllm:t||e.wasmSupport,transformersLLM:e.wasmSupport,webgpu:t}}function io(e){return e.stt.browserSpeechAPI||e.stt.whisperWasm}function ao(e){return e.tts.browserSynthesisAPI||e.tts.transformersTTS}function oo(e){return e.llm.webllm||e.llm.transformersLLM}function so(e){return io(e)||ao(e)||oo(e)}function co(){return{mode:`default`,modeSource:`auto`,session:{user:null,isAuthenticated:!1,permissions:[],preferences:{}},capabilities:null,ai:{stt:{adapter:null,initState:`uninitialized`,downloadProgress:null,isListening:!1,lastResult:``,interimResult:``,error:null},tts:{adapter:null,initState:`uninitialized`,downloadProgress:null,isSpeaking:!1,isPaused:!1,error:null},llm:{adapter:null,initState:`uninitialized`,downloadProgress:null,currentModel:null,isGenerating:!1,error:null}},aiLoading:{phase:`idle`,currentAdapter:null,overallProgress:0,message:``,loaded:[],failed:[],error:null},socket:{status:`disconnected`,reconnectAttempts:0,lastError:null},error:null,initialized:!1}}var lo=new Map,uo=new Map,fo=new Map;function po(e){return lo.get(e)}function mo(e,t,n=`ready`,r=null){lo.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function ho(e,t){let n=lo.get(e);n&&Object.assign(n,t)}function go(e){return uo.get(e)}function _o(e,t,n=`ready`,r=null){uo.set(e,{adapter:t,cachedAt:Date.now(),initState:n,downloadProgress:null,error:r,type:e})}function vo(e,t){let n=uo.get(e);n&&Object.assign(n,t)}function yo(e,t){let n=t?`${e}:${t}`:e;return fo.get(n)}function bo(e,t,n,r=`ready`,i=null){let a=n?`${e}:${n}`:e;fo.set(a,{adapter:t,cachedAt:Date.now(),initState:r,downloadProgress:null,error:i,type:e})}function xo(e,t,n){let r=t?`${e}:${t}`:e,i=fo.get(r);i&&Object.assign(i,n)}var So=new WeakMap,Co=new WeakMap;function wo(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}var To=class{#e=A(P(co()));get _state(){return e(this.#e)}set _state(e){U(this.#e,e,!0)}options;_aiConfig=null;_preloadScheduled=!1;_idleCallbackId=null;_preloadInFlight=!1;_socket=null;_socketConfig=null;_reconnectTimeout=null;_sttSubscriptions=new Map;_ttsSubscriptions=new Map;constructor(e={}){this.options=e,this._aiConfig=e.ai??null}get socketConfig(){return this._socketConfig}get state(){return this._state}get aiConfig(){return this._aiConfig}get aiLoading(){return this._state.aiLoading}async initialize(){if(this._state.initialized)return;if(typeof window>`u`){this._state.initialized=!0;return}let e=Qa();this._state.capabilities=e,this.options.onCapabilitiesDetected?.(e),this.options.session&&(this._state.session={...this._state.session,...this.options.session}),this.options.initialMode?(this._state.mode=this.options.initialMode,this._state.modeSource=`explicit`):(this._state.session.preferences.autoEnableSmrt??!1)&&so(e)&&(this._state.mode=`smrt`,this._state.modeSource=`auto`),this._state.initialized=!0,this.schedulePreload()}setAIConfig(e){this._aiConfig&&wo(this._aiConfig,e)?this._aiConfig=e:(this._aiConfig=e,this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadScheduled=!1,this.schedulePreload())}schedulePreload(){if(!this._aiConfig||this._preloadScheduled)return;let e=this._aiConfig.preload??`idle`;e!==`none`&&(e===`eager`?(this._preloadScheduled=!0,this.executePreload()):e===`idle`&&(this._preloadScheduled=!0,typeof requestIdleCallback<`u`?this._idleCallbackId=requestIdleCallback(()=>this.executePreload(),{timeout:5e3}):setTimeout(()=>this.executePreload(),100)))}triggerPreload(){this._aiConfig&&!this._preloadScheduled&&this._aiConfig.preload===`on-visible`&&(this._preloadScheduled=!0,this.executePreload())}async executePreload(){if(this._aiConfig&&!this._preloadInFlight){this._preloadInFlight=!0;try{await this.runPreload()}finally{this._preloadInFlight=!1}}}async runPreload(){if(!this._aiConfig)return;let e=[];if(this._aiConfig.stt?.enabled!==!1&&this._aiConfig.stt?.type&&e.push(`stt:${this._aiConfig.stt.type}`),this._aiConfig.tts?.enabled!==!1&&this._aiConfig.tts?.type&&e.push(`tts:${this._aiConfig.tts.type}`),this._aiConfig.llm?.enabled!==!1&&this._aiConfig.llm?.type){let t=this._aiConfig.llm.model?`${this._aiConfig.llm.type}:${this._aiConfig.llm.model}`:this._aiConfig.llm.type;e.push(`llm:${t}`)}if(e.length===0){this.updateLoadingState({phase:`idle`,loaded:[],failed:[]});return}this.updateLoadingState({phase:`checking`,message:`Checking AI capabilities...`,loaded:[],failed:[]});for(let t of e){let[e,n]=t.split(`:`);this.updateLoadingState({phase:`downloading`,currentAdapter:n,message:`Loading ${n}...`});try{if(e===`stt`){let e=this._aiConfig.stt;await this.initializeSTT({type:n,allowLocalModels:e?.allowLocalModels})}else if(e===`tts`)await this.initializeTTS({type:n});else if(e===`llm`){let e=this._aiConfig.llm;e&&await this.initializeLLM(e.model,{type:e.type})}this.updateLoadingState({loaded:[...this._state.aiLoading.loaded,n]})}catch(e){console.error(`Failed to preload ${n}:`,e),this.updateLoadingState({failed:[...this._state.aiLoading.failed,n]})}}let t=this._state.aiLoading.failed.length>0;this._state.aiLoading.loaded.length===e.length?this.updateLoadingState({phase:`ready`,currentAdapter:null,overallProgress:100,message:`AI ready`}):t&&this._state.aiLoading.loaded.length===0?this.updateLoadingState({phase:`error`,currentAdapter:null,message:`Failed to load AI models`,error:Error(`All AI adapters failed to load`)}):this.updateLoadingState({phase:`ready`,currentAdapter:null,message:`Loaded with ${this._state.aiLoading.failed.length} failure(s)`}),this.options.onAILoadingChange?.(this._state.aiLoading)}updateLoadingState(e){this._state.aiLoading={...this._state.aiLoading,...e}}setMode(e,t=`toggled`){this._state.mode!==e&&(this._state.mode=e,this._state.modeSource=t,this.options.onModeChange?.(e,t),e===`smrt`&&this.initializeSTT({type:`whisper-cpp`,allowLocalModels:this._aiConfig?.stt?.allowLocalModels}).catch(()=>{}))}toggleMode(){let e=this._state.mode==="default"?`smrt`:`default`;this.setMode(e,`toggled`)}updateSession(e){this._state.session={...this._state.session,...e}}setPermissions(e){this._state.session.permissions=e}hasPermission(e){return this._state.session.permissions.includes(e)}hasAllPermissions(e){return e.every(e=>this._state.session.permissions.includes(e))}hasAnyPermission(e){return e.some(e=>this._state.session.permissions.includes(e))}setUser(e,t=[]){this._state.session.user=e,this._state.session.isAuthenticated=e!==null,this._state.session.permissions=t}connectSocket(e){this.disconnectSocket(),this._socketConfig=e,this._state.socket.status=`connecting`,this._state.socket.lastError=null;try{this._socket=new WebSocket(e.url),this._socket.onopen=()=>{this._state.socket.status=`connected`,this._state.socket.reconnectAttempts=0,e.onOpen?.()},this._socket.onmessage=t=>{try{let n=JSON.parse(t.data);e.onMessage?.(n)}catch{e.onMessage?.(t.data)}},this._socket.onclose=t=>{this._state.socket.status=`disconnected`,e.onClose?.(t),!t.wasClean&&e.reconnect?.enabled!==!1&&this.scheduleReconnect()},this._socket.onerror=t=>{this._state.socket.lastError=t,e.onError?.(t)}}catch(e){this._state.socket.status=`disconnected`,this._state.socket.lastError=e}}disconnectSocket(){this._reconnectTimeout&&=(clearTimeout(this._reconnectTimeout),null),this._socket&&=(this._socket.close(),null),this._state.socket.status=`disconnected`}sendMessage(e){this._socket?.readyState===WebSocket.OPEN?this._socket.send(JSON.stringify(e)):console.warn(`[Socket] Cannot send message - socket not connected`)}scheduleReconnect(){if(!this._socketConfig)return;let{reconnect:e}=this._socketConfig,t=e?.maxAttempts??5,n=e?.baseDelay??1e3;if(this._state.socket.reconnectAttempts>=t){console.warn(`[Socket] Max reconnection attempts reached`);return}this._state.socket.status=`reconnecting`,this._state.socket.reconnectAttempts++;let r=Math.min(n*2**(this._state.socket.reconnectAttempts-1),3e4);console.log(`[Socket] Reconnecting in ${r}ms (attempt ${this._state.socket.reconnectAttempts}/${t})`),this._reconnectTimeout=setTimeout(()=>{this._socketConfig&&this.connectSocket(this._socketConfig)},r)}async initializeSTT(e){let t=e?.type??`browser-speech`,n=po(t);if(n&&n.initState===`ready`)return this._state.ai.stt.adapter=n.adapter,this._state.ai.stt.initState=`ready`,this._state.ai.stt.error=null,this.subscribeToSTTEvents(n.adapter),n.adapter;let r=this._state.ai.stt.adapter;if(r&&this._state.ai.stt.initState===`ready`){if(r.type===t)return r;console.log(`[STT] Switching adapter from ${r.type} to ${t}`),await r.dispose?.()}this._state.ai.stt.initState=`initializing`,this._state.ai.stt.error=null,ho(t,{initState:`initializing`});let i=e=>{this._state.ai.stt.downloadProgress=e,ho(t,{downloadProgress:e}),e.percent>0&&this.updateLoadingState({overallProgress:e.percent})};try{let{getSTT:n}=await W(async()=>{let{getSTT:e}=await import(`./DYiyikup.js`).then(e=>e.t);return{getSTT:e}},__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]),import.meta.url),r=await n(e);return await r.ensureInitialized(i),mo(t,r,`ready`),this._state.ai.stt.adapter=r,this._state.ai.stt.initState=`ready`,this._state.ai.stt.downloadProgress=null,this.subscribeToSTTEvents(r),r}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.stt.initState=`error`,this._state.ai.stt.error=n,ho(t,{initState:`error`,error:n}),e}}subscribeToSTTEvents(e){if(this._sttSubscriptions.has(e))return;So.get(e)?.();let t=[e.onResult(e=>{if(e.isFinal){let t=this._state.ai.stt.lastResult;t?this._state.ai.stt.lastResult=`${t} ${e.text}`:this._state.ai.stt.lastResult=e.text,this._state.ai.stt.interimResult=``}else this._state.ai.stt.interimResult=e.text}),e.onStart(()=>{this._state.ai.stt.isListening=!0}),e.onEnd(()=>{this._state.ai.stt.isListening=!1}),e.onError(e=>{this._state.ai.stt.error=e})],n=()=>{for(let e of t)e();this._sttSubscriptions.delete(e),So.get(e)===n&&So.delete(e)};this._sttSubscriptions.set(e,n),So.set(e,n)}async startListening(e){let t=await this.initializeSTT();this._state.ai.stt.lastResult=``,this._state.ai.stt.interimResult=``,await t.start(e)}async stopListening(){await this._state.ai.stt.adapter?.stop(),this._state.ai.stt.interimResult=``}async initializeTTS(e){let t=e?.type??`browser-synthesis`,n=go(t);if(n&&n.initState===`ready`)return this._state.ai.tts.adapter=n.adapter,this._state.ai.tts.initState=`ready`,this._state.ai.tts.error=null,this.subscribeToTTSEvents(n.adapter),n.adapter;if(this._state.ai.tts.adapter&&this._state.ai.tts.initState===`ready`)return this._state.ai.tts.adapter;this._state.ai.tts.initState=`initializing`,this._state.ai.tts.error=null,vo(t,{initState:`initializing`});let r=e=>{this._state.ai.tts.downloadProgress=e,vo(t,{downloadProgress:e})};try{let{getTTS:n}=await W(async()=>{let{getTTS:e}=await import(`./DYiyikup.js`).then(e=>e.t);return{getTTS:e}},__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]),import.meta.url),i=await n(e);return await i.ensureInitialized(r),_o(t,i,`ready`),this._state.ai.tts.adapter=i,this._state.ai.tts.initState=`ready`,this._state.ai.tts.downloadProgress=null,this.subscribeToTTSEvents(i),i}catch(e){let n=e instanceof Error?e:Error(String(e));throw this._state.ai.tts.initState=`error`,this._state.ai.tts.error=n,vo(t,{initState:`error`,error:n}),e}}subscribeToTTSEvents(e){if(this._ttsSubscriptions.has(e))return;Co.get(e)?.();let t=[e.onStart(()=>{this._state.ai.tts.isSpeaking=!0,this._state.ai.tts.isPaused=!1}),e.onEnd(()=>{this._state.ai.tts.isSpeaking=!1,this._state.ai.tts.isPaused=!1}),e.onError(e=>{this._state.ai.tts.error=e,this._state.ai.tts.isSpeaking=!1})],n=()=>{for(let e of t)e();this._ttsSubscriptions.delete(e),Co.get(e)===n&&Co.delete(e)};this._ttsSubscriptions.set(e,n),Co.set(e,n)}async speak(e,t){await(await this.initializeTTS()).speak(e,t)}stopSpeaking(){this._state.ai.tts.adapter?.stop()}pauseSpeaking(){this._state.ai.tts.adapter?.pause(),this._state.ai.tts.isSpeaking&&(this._state.ai.tts.isPaused=!0)}resumeSpeaking(){this._state.ai.tts.adapter?.resume(),this._state.ai.tts.isPaused&&(this._state.ai.tts.isPaused=!1)}getTTSVoices(){return this._state.ai.tts.adapter?.getVoices()??[]}async initializeLLM(e,t){let n=t?.type??`webllm`,r=yo(n,e);if(r&&r.initState===`ready`)return this._state.ai.llm.adapter=r.adapter,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=r.adapter.currentModel,this._state.ai.llm.error=null,r.adapter;if(this._state.ai.llm.adapter&&this._state.ai.llm.initState===`ready`&&(!e||this._state.ai.llm.currentModel===e))return this._state.ai.llm.adapter;this._state.ai.llm.initState=`initializing`,this._state.ai.llm.error=null,xo(n,e,{initState:`initializing`});let i=t=>{this._state.ai.llm.downloadProgress=t,xo(n,e,{downloadProgress:t}),t.percent>0&&this.updateLoadingState({overallProgress:t.percent})};try{let{getLLM:r}=await W(async()=>{let{getLLM:e}=await import(`./DYiyikup.js`).then(e=>e.t);return{getLLM:e}},__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]),import.meta.url),a=await r(t);return await a.ensureInitialized(e,i),bo(n,a,e,`ready`),this._state.ai.llm.adapter=a,this._state.ai.llm.initState=`ready`,this._state.ai.llm.currentModel=a.currentModel,this._state.ai.llm.downloadProgress=null,a}catch(t){let r=t instanceof Error?t:Error(String(t));throw this._state.ai.llm.initState=`error`,this._state.ai.llm.error=r,xo(n,e,{initState:`error`,error:r}),t}}async chat(e,t){let n=await this.initializeLLM();this._state.ai.llm.isGenerating=!0;try{return await n.message(e,{systemPrompt:t?.systemPrompt,onToken:t?.onToken})}finally{this._state.ai.llm.isGenerating=!1}}async unloadLLM(){let e=this._state.ai.llm.adapter,t=e?.currentModel??void 0;await e?.unloadModel(),e&&xo(e.type,t,{initState:`uninitialized`,downloadProgress:null,error:null}),this._state.ai.llm.adapter=null,this._state.ai.llm.initState=`uninitialized`,this._state.ai.llm.currentModel=null}unsubscribeAllAdapterEvents(){for(let e of[...this._sttSubscriptions.values()])e();for(let e of[...this._ttsSubscriptions.values()])e();this._sttSubscriptions.clear(),this._ttsSubscriptions.clear()}async dispose(){this._idleCallbackId!==null&&typeof cancelIdleCallback<`u`&&(cancelIdleCallback(this._idleCallbackId),this._idleCallbackId=null),this._preloadInFlight=!1,this.disconnectSocket(),this.unsubscribeAllAdapterEvents();let e=this._state.ai.stt.adapter;e&&!po(e.type)&&await e.dispose?.();let t=this._state.ai.tts.adapter;t&&!go(t.type)&&await t.dispose?.();let n=this._state.ai.llm.adapter;n&&!yo(n.type,n.currentModel??void 0)&&await n.dispose?.(),this._state=co()}get isAIReady(){return this._state.aiLoading.phase===`ready`||this._state.aiLoading.phase===`idle`}get isAILoading(){return this._state.aiLoading.phase===`checking`||this._state.aiLoading.phase===`downloading`||this._state.aiLoading.phase===`initializing`}};function Eo(e){return new To(e)}var Do=new Set([`focus`,`reveal`,`highlight`,`explain`,`validate`,`stage`,`apply`,`clear`,`undo`]),Oo=`smrt_ui_`,ko=/^[A-Za-z][A-Za-z0-9_-]{0,63}$/,Ao=new Set([`invalid_request`,`invalid_identifier`,`limit_exceeded`,`not_found`]),jo=new Set([`not_found`,`consent_required`,`human_confirmation_required`,`sensitive_control`,`control_not_writable`,`control_not_editable`,`nothing_to_undo`,`denied`]),Mo=new WeakMap,No=class extends Error{reason;details;constructor(e,t){super(e),this.reason=e,this.details=t}};function Po(e,t){return new No(e,t)}function Fo(e){return JSON.stringify({ok:!0,result:e})}function Io(e,t){return JSON.stringify({ok:!1,reason:e,...t?{details:t}:{}})}function Lo(e){return new TextEncoder().encode(JSON.stringify(e)).byteLength}function Ro(e){if(Lo(e)>1e5)throw Po(`limit_exceeded`)}function zo(e,t,n=256){if(typeof e!=`string`||e.length===0||e.length>n||Array.from(e).some(e=>{let t=e.charCodeAt(0);return t<32||t===127}))throw Po(`invalid_identifier`,t);return e}function Bo(e,t){return e===void 0?void 0:zo(e,t)}function Vo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Po(`invalid_request`);return e}function Ho(e){let t=Vo(e),n=t.subject,r=n===void 0?void 0:(()=>{let e=Vo(n);return{type:zo(e.type,`subject.type`),id:zo(e.id,`subject.id`),...e.label===void 0?{}:{label:zo(e.label,`subject.label`)}}})();return{formId:zo(t.formId,`formId`),controlId:zo(t.controlId,`controlId`),...r?{subject:r}:{}}}function Uo(e){let t=Vo(e),n=t.kind;if(![`table`,`list`,`report`,`custom`].includes(String(n)))throw Po(`invalid_request`,`identity.kind`);let r=t.subject,i=r===void 0?void 0:(()=>{let e=Vo(r);return{type:zo(e.type,`subject.type`),id:zo(e.id,`subject.id`),...e.label===void 0?{}:{label:zo(e.label,`subject.label`)}}})();return{surfaceId:zo(t.surfaceId,`surfaceId`),kind:n,...i?{subject:i}:{}}}function Wo(e){let t=e.metadata.sensitivity===`sensitive`||e.metadata.sensitivity===`secret`,n=t||e.state.valueRedacted,r=t||e.state.stagedValueRedacted||e.state.staged?.valueRedacted===!0,i=e.state.staged?{...e.state.staged,...r?{value:void 0,valueRedacted:!0}:{},validationMessage:void 0}:void 0;return{...e,identity:{...e.identity},metadata:{...e.metadata,constraints:e.metadata.constraints?{...e.metadata.constraints}:void 0,options:e.metadata.options?.map(e=>({...e}))},state:{...e.state,...n?{value:void 0,valueRedacted:!0}:{},...r?{stagedValue:void 0,stagedValueRedacted:!0}:{},...i?{staged:i}:{},validationMessage:void 0}}}function Go(e){let t=e.reason?jo.has(e.reason)?e.reason:`execution_failed`:void 0;return{ok:e.ok,action:e.action,identity:{...e.identity},...t?{reason:t}:{},...e.snapshot?{snapshot:Wo(e.snapshot)}:{}}}function Ko(e,t,n,r){if(Array.isArray(e))return e.filter(e=>r!==`columnOrder`||typeof e!=`string`||!t.has(e)).map(e=>Ko(e,t,n,r)).filter(e=>e!==void 0);if(!e||typeof e!=`object`)return e;let i=e;if(!(typeof i.columnId==`string`&&t.has(i.columnId)))return Object.fromEntries(Object.entries(i).flatMap(([e,r])=>{if(t.has(e)||n&&(e===`selection`||e===`selectedRowIds`||e===`expandedRowIds`))return[];let i=Ko(r,t,n,e);return i===void 0?[]:[[e,i]]}))}function qo(e){let t=e.columns.filter(e=>e.visibility!==`hidden`),n=new Set(t.map(e=>e.id)),{rowKey:r,...i}=e;return{...i,identity:{...e.identity},...n.has(r)?{rowKey:r}:{},columns:t,query:{...e.query,projectableColumnIds:e.query.projectableColumnIds.filter(e=>n.has(e)),searchableColumnIds:e.query.searchableColumnIds?.filter(e=>n.has(e)),filterableColumnIds:e.query.filterableColumnIds?.filter(e=>n.has(e)),sortableColumnIds:e.query.sortableColumnIds?.filter(e=>n.has(e))},actions:e.actions.filter(e=>(e.columnIds??[]).every(e=>n.has(e)))}}function Jo(e){let t=new Set(e.descriptor.columns.filter(e=>e.visibility===`hidden`).map(e=>e.id)),n=t.has(e.descriptor.rowKey),r=Ko(e.state,t,n);return{...e,descriptor:qo(e.descriptor),state:r,selection:n?null:e.selection}}function Yo(e){return Promise.resolve().then(e).then(Fo).catch(e=>e instanceof No&&Ao.has(e.reason)?Io(e.reason,e.details):Io(`execution_failed`))}function Xo(e,t,n,r){return{name:e,description:t,inputSchema:n,annotations:{readOnlyHint:!0,untrustedContentHint:!0},execute:r}}function Zo(e,t,n){let r={type:`object`,required:[`formId`,`controlId`],additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256},controlId:{type:`string`,minLength:1,maxLength:256},subject:{type:`object`}}},i={type:`object`,required:[`surfaceId`,`kind`],additionalProperties:!1,properties:{surfaceId:{type:`string`,minLength:1,maxLength:256},kind:{type:`string`,enum:[`table`,`list`,`report`,`custom`]},subject:{type:`object`}}};return[Xo(`${e}list_form_controls`,`List the controls currently mounted in SMRT forms.`,{type:`object`,additionalProperties:!1,properties:{formId:{type:`string`,minLength:1,maxLength:256}}},e=>Yo(()=>{Ro(e);let n=Bo(Vo(e).formId,`formId`);return t.list(n).map(Wo)})),Xo(`${e}inspect_form_control`,`Inspect one currently mounted SMRT form control.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:r}},e=>Yo(()=>{Ro(e);let n=Vo(e),r=t.get(Ho(n.identity));if(!r)throw Po(`not_found`);return Wo(r)})),{name:`${e}execute_form_control`,description:"Execute an allowed command on a mounted SMRT form control. Agent mutations are consent-gated. An agent never moves keyboard focus: `focus` scrolls the control into view and highlights it.",inputSchema:{type:`object`,required:[`action`,`identity`],additionalProperties:!1,properties:{action:{type:`string`,enum:[...Do]},identity:r,value:{},durationMs:{type:`number`,minimum:0,maximum:6e4}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>Yo(async()=>{Ro(e);let n=Vo(e);if(`confirmed`in n)throw Po(`invalid_request`,`confirmed`);if(!Do.has(n.action))throw Po(`invalid_request`,`action`);let r=n.action,i=Ho(n.identity),a;if(r===`stage`){if(!(`value`in n))throw Po(`invalid_request`,`value`);a={action:r,identity:i,value:n.value}}else if(r===`apply`)a=`value`in n?{action:r,identity:i,value:n.value}:{action:r,identity:i};else if(r===`highlight`){if(n.durationMs!==void 0&&(typeof n.durationMs!=`number`||n.durationMs<0||n.durationMs>6e4))throw Po(`invalid_request`,`durationMs`);a={action:r,identity:i,durationMs:n.durationMs}}else a={action:r,identity:i};return Go(await t.execute(a,{source:`agent`}))})},Xo(`${e}list_data_surfaces`,`List the data surfaces currently mounted in this SMRT Provider.`,{type:`object`,additionalProperties:!1,properties:{}},e=>Yo(()=>(Ro(e),Vo(e),n.list().map(qo)))),Xo(`${e}inspect_data_surface`,`Inspect one currently mounted SMRT data surface.`,{type:`object`,required:[`identity`],additionalProperties:!1,properties:{identity:i}},e=>Yo(()=>{Ro(e);let t=Vo(e),r=n.inspect(Uo(t.identity));if(!r)throw Po(`not_found`);return Jo(r)})),{name:`${e}execute_data_surface_control`,description:`Execute a bounded visible-state command on a mounted SMRT data surface.`,inputSchema:{type:`object`,required:[`version`,`commandId`,`identity`,`expectedRevision`,`controlId`],additionalProperties:!1,properties:{version:{type:`number`,const:1},commandId:{type:`string`,minLength:1,maxLength:256},identity:i,expectedRevision:{type:`number`,minimum:0},controlId:{type:`string`,minLength:1,maxLength:256},payload:{}}},annotations:{readOnlyHint:!1,untrustedContentHint:!0},execute:e=>Yo(async()=>{Ro(e);let t=Vo(e);if(t.version!==1)throw Po(`invalid_request`,`version`);if(typeof t.expectedRevision!=`number`||!Number.isSafeInteger(t.expectedRevision)||t.expectedRevision<0)throw Po(`invalid_request`,`expectedRevision`);let r={version:1,commandId:zo(t.commandId,`commandId`),identity:Uo(t.identity),expectedRevision:t.expectedRevision,controlId:zo(t.controlId,`controlId`),...`payload`in t?{payload:t.payload}:{}},i=await n.execute(r);return i.snapshot?{...i,snapshot:Jo(i.snapshot)}:i})}]}function Qo(e){let t=e.prefix??Oo;if(!ko.test(t))throw TypeError(`Invalid WebMCP UI tool prefix`);let n=e.document??globalThis.document,r=n?.modelContext;if(!r||typeof r.registerTool!=`function`)return()=>{};let i=Mo.get(n),a;if(i&&i.modelContext===r?a=i.prefixes:(a=new Set,Mo.set(n,{modelContext:r,prefixes:a})),a.has(t))throw Error(`WebMCP UI prefix is already registered: ${t}`);a.add(t);let o=Zo(t,e.controlRegistry,e.dataSurfaceRegistry),s;try{s=Ie(o.map(e=>e.name),`ui`,{document:n})}catch(e){throw a.delete(t),e}let c=new AbortController,l=!1,u=()=>{l||(l=!0,c.abort(),a.delete(t),s.release())};try{for(let e of o){let t=Object.assign({[Re]:e.annotations?.readOnlyHint?`read`:`write`},e,{execute:Le(e.execute)}),n=r.registerTool(t,{signal:c.signal});n&&Promise.resolve(n).catch(u)}}catch(e){throw u(),e}return u}var $o=c(`<!> <!>`,1);function es(i,a){_(a,!0);let s=k(a,`autoEnableSmrt`,3,!1),c=k(a,`user`,3,null),l=k(a,`permissions`,19,()=>[]),u=n(()=>a.ai?.showLoadingOverlay??!0),d=z(()=>Eo({initialMode:a.mode,session:{preferences:{autoEnableSmrt:s()}},onCapabilitiesDetected:()=>{a.onReady?.()},onModeChange:e=>{a.onModeChange?.(e)},onAILoadingChange:e=>{a.onAILoadingChange?.(e)}})),f=Fe(),p=X(),m=n(()=>typeof a.webmcp==`object`?a.webmcp:void 0),h=n(()=>a.webmcp===!0?{}:typeof e(m)?.ui==`object`?e(m).ui:void 0),g=n(()=>e(h)?.controlRegistry??f),y=n(()=>e(h)?.dataSurfaceRegistry??p);De({get enabled(){return e(h)!==void 0},get controlRegistry(){return e(g)},get dataSurfaceRegistry(){return e(y)}}),Te({get effects(){return e(m)?.effects}}),j(()=>{let e=z(()=>d.state.session.preferences);e.autoEnableSmrt!==s()&&d.updateSession({preferences:{...e,autoEnableSmrt:s()}})}),j(()=>{if(typeof window<`u`&&a.webmcp&&e(h))try{return Qo({controlRegistry:e(g),dataSurfaceRegistry:e(y),...e(h).prefix?{prefix:e(h).prefix}:{}})}catch(e){xe.warn(`Provider: WebMCP UI tool registration rejected`,{error:e})}}),j(()=>{if(typeof window>`u`||!a.webmcp)return;let e=typeof a.webmcp==`object`?a.webmcp:{},t=!1,n=()=>{};return W(async()=>{let{registerWebMcpTools:e}=await import(`./Cn2mA3wh.js`).then(e=>e.t);return{registerWebMcpTools:e}},__vite__mapDeps([34,1,35]),import.meta.url).then(({registerWebMcpTools:r})=>{if(t)return;let i=r(e.definitions??[],{client:e.client,basePath:e.basePath,fetchFn:e.fetchFn,scope:e.scope,filter:e.filter,filterTool:e.filterTool,resolveFetchers:e.resolveFetchers,resolveToolFetchers:e.resolveToolFetchers,effects:e.effects,namespace:e.namespace,maxTools:e.maxTools});n=i,i.ready.catch(e=>{t||xe.warn(`Provider: WebMCP data tool registration rejected`,{error:e})})}).catch(e=>{t||xe.warn(`Provider: WebMCP data tool registration rejected`,{error:e})}),()=>{t=!0,n()}}),j(()=>{a.mode&&d.setMode(a.mode,`explicit`)}),Ne(d);let b=z(()=>le(a.i18n));ue(b),j(()=>{a.i18n&&(b.snapshot=a.i18n)}),j(()=>{typeof window<`u`&&z(()=>{d.initialize()})}),j(()=>{d.setUser(c(),l())}),j(()=>{if(typeof window<`u`&&a.socket)return d.connectSocket(a.socket),()=>{d.disconnectSocket()}}),j(()=>{typeof window<`u`&&a.ai&&z(()=>{d.setAIConfig(a.ai)})}),R(()=>{d.dispose().catch(e=>{xe.error(`AppState dispose failed during Provider teardown`,{error:e})})});var x=$o(),S=B(x),E=t=>{var n=T(),r=B(n);w(r,()=>W(()=>import(`./DTWraE40.js`),__vite__mapDeps([36,4,1,5,6,7,8,37]),import.meta.url),null,(t,n)=>{var r=T(),i=B(r);v(i,()=>e(n).default,(e,t)=>{t(e,{get message(){return a.ai.loadingMessage},dismissible:!0})}),C(t,r)}),C(t,n)};t(S,t=>{a.ai&&e(u)&&t(E)});var D=F(S,2);o(D,()=>a.children),C(i,x),r()}var ts=se({"ui.command_palette.title":`Command palette`,"ui.command_palette.input_label":`Search or run a command`,"ui.command_palette.placeholder":`Search or run a command`,"ui.command_palette.results":`Results`,"ui.command_palette.trigger":`Search`,"ui.command_palette.empty":`No results for "{query}".`,"ui.command_palette.nothing":`Nothing to show yet.`,"ui.command_palette.searching":`Searching`,"ui.command_palette.partial":`Some results could not be loaded.`,"ui.command_palette.status_one":`1 result. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.status_many":`{count} results. Use the up and down arrow keys to choose, Enter to select.`,"ui.command_palette.unavailable":`Unavailable`,"ui.command_palette.hint_move":`to move`,"ui.command_palette.hint_select":`to select`,"ui.command_palette.hint_close":`to close`}),ns=Symbol(`smrt-command-palette`);function rs(){return a(ns)??null}function is(e){let t=rs();return()=>{let n=e()??t;if(!n)throw Error("[command palette] Pass a `palette` prop or call setCommandPalette() in a parent layout.");return n}}var as=[`Mod+K`];function os(e){let t=e.split(`+`).map(e=>e.trim()).filter(e=>e.length>0),n=t.pop();if(!n)return null;let r={key:n.toLowerCase(),mod:!1,ctrl:!1,meta:!1,alt:!1,shift:!1};for(let e of t)switch(e.toLowerCase()){case`mod`:r.mod=!0;break;case`ctrl`:case`control`:r.ctrl=!0;break;case`meta`:case`cmd`:case`command`:r.meta=!0;break;case`alt`:case`option`:r.alt=!0;break;case`shift`:r.shift=!0;break;default:return null}return r}function ss(e,t){return t.key.toLowerCase()===e.key||/^[a-z]$/.test(e.key)&&t.code===`Key${e.key.toUpperCase()}`}function cs(e,t){if(!ss(e,t))return!1;if(e.mod){if(!(t.ctrlKey||t.metaKey))return!1}else if(t.ctrlKey!==e.ctrl||t.metaKey!==e.meta)return!1;if(t.altKey!==e.alt)return!1;let n=!/^[a-z0-9]$/.test(e.key),r=e.mod||e.ctrl||e.meta||e.alt;return n&&!r&&!e.shift?!0:t.shiftKey===e.shift}function ls(e,t){if(e.isComposing||e.defaultPrevented||e.repeat)return!1;for(let n of t)if(cs(n,e)&&(n.mod||n.ctrl||n.meta||n.alt||!jn(e.target)))return!0;return!1}function us(){if(typeof navigator>`u`)return!1;let e=navigator,t=e.userAgentData?.platform??e.platform??``;return/mac|iphone|ipad|ipod/i.test(t)}function ds(e,t=us()){let n=typeof e==`string`?os(e):e;if(!n)return typeof e==`string`?e:``;let r=n.key.length===1?n.key.toUpperCase():n.key;return t?(n.ctrl?`⌃`:``)+(n.alt?`⌥`:``)+(n.shift?`⇧`:``)+(n.mod||n.meta?`⌘`:``)+r:[n.mod||n.ctrl?`Ctrl`:``,n.meta?`Meta`:``,n.alt?`Alt`:``,n.shift?`Shift`:``,r].filter(Boolean).join(`+`)}function fs(e){let t=[];for(let n of e){let e=os(n);if(!e)continue;let r=e.key.length===1?e.key.toUpperCase():e.key,i=[e.alt?`Alt`:``,e.shift?`Shift`:``].filter(Boolean);e.mod?(t.push([...i,`Control`,r].join(`+`)),t.push([...i,`Meta`,r].join(`+`))):t.push([e.ctrl?`Control`:``,e.meta?`Meta`:``,...i,r].filter(Boolean).join(`+`))}return t.length>0?t.join(` `):void 0}var ps=/\p{M}/gu;function ms(e){return e.normalize(`NFD`).replace(ps,``).toLowerCase()}function hs(e){let t=``,n=[],r=[],i=0;for(let a of e){let e=ms(a);for(let t=0;t<e.length;t+=1)n.push(i),r.push(i+a.length);t+=e,i+=a.length}return{text:t,origin:n,originEnd:r}}function gs(e){return hs(e).text}function _s(e){let t=gs(e).split(/\s+/).filter(e=>e.length>0);return[...new Set(t)]}var vs=/[\p{L}\p{N}]/u;function ys(e){return e!==void 0&&vs.test(e)}function bs(e,t){let n=null,r=t.indexOf(e);for(;r!==-1;){let i=r===0||!ys(t[r-1])?r===0?150:100:60;(!n||i>n.score)&&(n={score:i,ranges:[[r,r+e.length]]}),r=t.indexOf(e,r+1)}if(n)return n;if(e.length<2)return null;let i=[],a=0;for(let n of e){let e=t.indexOf(n,a);if(e===-1)return null;i.push(e),a=e+1}let o=i[i.length-1]-i[0]+1;if(o>e.length*4)return null;let s=[];for(let e of i){let t=s[s.length-1];t&&t[1]===e?t[1]=e+1:s.push([e,e+1])}let c=i[0]===0||!ys(t[i[0]-1]);return{score:Math.max(5,30-(o-e.length)+(c?10:0)),ranges:s}}function xs(e){let t=[...e].sort((e,t)=>e[0]-t[0]||e[1]-t[1]),n=[];for(let e of t){let t=n[n.length-1];t&&e[0]<=t[1]?t[1]=Math.max(t[1],e[1]):n.push([e[0],e[1]])}return n}function Ss(e,t){return xs(t.map(([t,n])=>[e.origin[t],e.originEnd[n-1]]))}function Cs(e,t){let n=_s(e);if(n.length===0)return{score:0,ranges:[]};let r=hs(t),i=0,a=[];for(let e of n){let t=bs(e,r.text);if(!t)return null;i+=t.score,a.push(...t.ranges)}let o=gs(e).trim();return r.text===o?i+=200:r.text.startsWith(o)&&(i+=50),i-=Math.min(r.text.length,100)*.1,{score:i,ranges:Ss(r,a)}}function ws(e,t){let n=_s(e);if(n.length===0)return{score:0,titleRanges:[]};let r=hs(t.title),i=gs([t.subtitle??``,...t.keywords??[]].join(` `)),a=0,o=[];for(let e of n){let t=bs(e,r.text);if(t){a+=t.score,o.push(...t.ranges);continue}let n=bs(e,i);if(!n)return null;a+=n.score*.5}let s=gs(e).trim();return r.text===s?a+=200:r.text.startsWith(s)&&(a+=50),a-=Math.min(r.text.length,100)*.1,{score:a,titleRanges:Ss(r,o)}}function Ts(e,t){let n=[],r=0;for(let[i,a]of t)i>r&&n.push({text:e.slice(r,i),match:!1}),a>i&&n.push({text:e.slice(i,a),match:!0}),r=Math.max(r,a);return r<e.length&&n.push({text:e.slice(r),match:!1}),n}var Es=f(`<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" focusable="false"><path></path></svg>`),Ds=c(`<mark class="svelte-c516pr"> </mark>`),Os=c(`<span class="smrt-command-palette__subtitle svelte-c516pr"> </span>`),ks=c(`<span class="smrt-command-palette__note svelte-c516pr"> </span>`),As=c(`<kbd class="smrt-command-palette__shortcut svelte-c516pr"> </kbd>`),js=c(`<div class="smrt-command-palette__option svelte-c516pr" role="option" tabindex="-1"><span class="smrt-command-palette__icon svelte-c516pr" aria-hidden="true"><!></span> <span class="smrt-command-palette__text svelte-c516pr"><span class="smrt-command-palette__title svelte-c516pr"></span> <!></span> <!></div>`),Ms=c(`<div class="smrt-command-palette__group" role="group"><div class="smrt-command-palette__heading svelte-c516pr"> </div> <!></div>`),Ns=c(`<p class="smrt-command-palette__empty svelte-c516pr"> </p>`),Ps=c(`<div class="smrt-command-palette svelte-c516pr"><div class="smrt-command-palette__field svelte-c516pr"><svg class="smrt-command-palette__search-icon svelte-c516pr" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!></div> <div class="smrt-command-palette__list svelte-c516pr" role="listbox"></div> <!> <div class="smrt-command-palette__hints svelte-c516pr" aria-hidden="true"><span><kbd class="svelte-c516pr">↑</kbd><kbd class="svelte-c516pr">↓</kbd> </span> <span><kbd class="svelte-c516pr">↵</kbd> </span> <span><kbd class="svelte-c516pr">Esc</kbd> </span></div> <div class="smrt-command-palette__live svelte-c516pr" role="status" aria-live="polite"> </div></div>`);function Fs(i,a){let o=ne();_(a,!0);let c=k(a,`hotkeys`,3,as),{t:u}=de(),f=is(()=>a.palette),m=n(f),h=`smrt-palette-list-${o}`,g=e=>`smrt-palette-opt-${o}-${e.key.replace(/[^a-zA-Z0-9_-]/g,`_`)}`,v=n(()=>c()===!1?[]:c().flatMap(e=>{let t=os(e);return t?[t]:[]})),y=A(!1);re(()=>{U(y,us(),!0)});let x=A(void 0);function S(t){ls(t,e(v))&&(t.preventDefault(),e(m).toggle())}j(()=>{e(m).isOpen&&ie().then(()=>e(x)?.focus())});let w=n(()=>e(m).active),D=n(()=>e(m).results.length>0);j(()=>{if(!e(w)||typeof document>`u`)return;let t=document.getElementById(g(e(w)));t&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})});function P(t){if(!t.isComposing)switch(t.key){case`ArrowDown`:t.preventDefault(),e(m).moveActive(1);break;case`ArrowUp`:t.preventDefault(),e(m).moveActive(-1);break;case`Enter`:t.preventDefault(),e(m).activate();break;case`PageDown`:t.preventDefault(),e(m).moveActive(5);break;case`PageUp`:t.preventDefault(),e(m).moveActive(-5)}}let I=n(()=>{if(!e(m).isOpen)return``;let t=e(m).query.trim();if(e(m).busy&&!e(D))return u(ts[`ui.command_palette.searching`]);if(!e(D))return t?u(ts[`ui.command_palette.empty`],{query:t}):u(ts[`ui.command_palette.nothing`]);let n=e(m).results.length,r=n===1?u(ts[`ui.command_palette.status_one`]):u(ts[`ui.command_palette.status_many`],{count:n});return e(m).failedProviders.size>0?`${r} ${u(ts[`ui.command_palette.partial`])}`:r});function te(e){return e&&Ae(e)?ye[e]:null}let R=n(()=>a.label??u(ts[`ui.command_palette.input_label`]));O(`keydown`,ee,S);var z=()=>e(m).isOpen,ae=t=>{t||e(m).close()};{let r=n(()=>a.label??u(ts[`ui.command_palette.title`]));oe(i,{get open(){return z()},set open(e){ae(e)},get ariaLabel(){return e(r)},showClose:!1,size:`md`,children:(r,i)=>{var o=Ps(),c=N(o),f=F(N(c),2),_=()=>e(m).query,v=t=>e(m).setQuery(String(t));{let t=n(()=>e(w)?g(e(w)):void 0),r=n(()=>a.placeholder??u(ts[`ui.command_palette.placeholder`]));M(he(f,{type:`text`,role:`combobox`,get"aria-label"(){return e(R)},get"aria-expanded"(){return e(D)},get"aria-controls"(){return h},"aria-autocomplete":`list`,get"aria-activedescendant"(){return e(t)},autocomplete:`off`,autocapitalize:`off`,spellcheck:!1,enterkeyhint:`go`,get placeholder(){return e(r)},interaction:!1,class:`smrt-command-palette__input`,get value(){return _()},set value(e){v(e)},onkeydown:P}),e=>U(x,e,!0),()=>e(x))}s(c);var S=F(c,2);p(S,23,()=>e(m).sections,e=>e.id,(r,i,a)=>{var o=Ms(),c=N(o),f=L(c,!0),_=F(c,2);p(_,17,()=>e(i).results,e=>e.key,(r,i)=>{let a=n(()=>te(e(i).item.icon)),o=n(()=>e(i).item.shortcut?ds(e(i).item.shortcut,e(y)):``);var c=js(),f=N(c),h=N(f),_=t=>{var n=Es(),r=L(n);V(()=>H(r,`d`,e(a))),C(t,n)};t(h,t=>{e(a)&&t(_)}),s(f);var v=F(f,2),x=N(v);p(x,21,()=>Ts(e(i).item.title,e(i).titleRanges),b,(n,r)=>{var i=T(),a=B(i),o=t=>{var n=Ds(),i=L(n,!0);V(()=>l(i,e(r).text)),C(t,n)},s=t=>{var n=d();V(()=>l(n,e(r).text)),C(t,n)};t(a,t=>{e(r).match?t(o):t(s,-1)}),C(n,i)}),s(x);var S=F(x,2),D=t=>{var n=Os(),r=L(n,!0);V(()=>l(r,e(i).item.subtitle)),C(t,n)};t(S,t=>{e(i).item.subtitle&&t(D)}),s(v);var O=F(v,2),k=e=>{var t=ks(),n=L(t,!0);V(e=>l(n,e),[()=>u(ts[`ui.command_palette.unavailable`])]),C(e,t)},A=t=>{var n=As(),r=L(n,!0);V(()=>l(r,e(o))),C(t,n)};t(O,t=>{typeof e(i).item.disabled==`string`?t(k):e(o)&&t(A,1)}),s(c),V(t=>{H(c,`id`,t),H(c,`aria-selected`,e(w)?.key===e(i).key),H(c,`aria-disabled`,!e(i).selectable||void 0),H(c,`data-kind`,e(i).item.kind),H(c,`data-active`,e(w)?.key===e(i).key?``:void 0),H(c,`title`,typeof e(i).item.disabled==`string`?e(i).item.disabled:void 0)},[()=>g(e(i))]),E(`mousedown`,c,e=>e.preventDefault()),E(`pointermove`,c,()=>e(m).setActive(e(i).key)),E(`click`,c,()=>void e(m).activate(e(i))),C(r,c)}),s(o),V(()=>{H(o,`aria-labelledby`,`${h}-g${e(a)}`),H(c,`id`,`${h}-g${e(a)}`),l(f,e(i).label)}),C(r,o)}),s(S);var O=F(S,2),k=t=>{var n=Ns(),r=L(n,!0);V(()=>l(r,e(I))),C(t,n)};t(O,t=>{e(D)||t(k)});var A=F(O,2),j=N(A),ee=F(N(j),2);s(j);var z=F(j,2),ne=F(N(z));s(z);var re=F(z,2),ie=F(N(re));s(re),s(A);var ae=F(A,2),W=L(ae,!0);s(o),V((t,n,r,i)=>{H(S,`id`,h),H(S,`aria-label`,t),H(S,`aria-busy`,e(m).busy),l(ee,` ${n??``}`),l(ne,` ${r??``}`),l(ie,` ${i??``}`),l(W,e(I))},[()=>u(ts[`ui.command_palette.results`]),()=>u(ts[`ui.command_palette.hint_move`]),()=>u(ts[`ui.command_palette.hint_select`]),()=>u(ts[`ui.command_palette.hint_close`])]),C(r,o)},$$slots:{default:!0}})}r()}D([`mousedown`,`pointermove`,`click`]);var Is=c(`<kbd class="smrt-command-palette-trigger__hint svelte-122kczf"> </kbd>`),Ls=c(`<span class="smrt-command-palette-trigger__label svelte-122kczf"> </span> <!>`,1),Rs=c(`<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.5-3.5"></path></svg> <!>`,1);function zs(i,a){_(a,!0);let o=k(a,`hotkeys`,3,as),s=k(a,`compact`,3,!1),c=k(a,`class`,3,``),{t:u}=de(),d=is(()=>a.palette),f=n(d),p=n(()=>a.label??u(ts[`ui.command_palette.trigger`])),m=A(!1);re(()=>{U(m,us(),!0)});let h=n(()=>o()[0]?ds(o()[0],e(m)):``);{let r=n(()=>`smrt-command-palette-trigger ${c()}`),a=n(()=>fs(o()));me(i,{variant:`ghost`,size:`sm`,get class(){return e(r)},get"aria-label"(){return e(p)},"aria-haspopup":`dialog`,get"aria-expanded"(){return e(f).isOpen},get"aria-keyshortcuts"(){return e(a)},onclick:()=>e(f).open(),children:(n,r)=>{var i=Rs(),a=F(B(i),2),o=n=>{var r=Ls(),i=B(r),a=L(i,!0),o=F(i,2),s=t=>{var n=Is(),r=L(n,!0);V(()=>l(r,e(h))),C(t,n)};t(o,t=>{e(h)&&t(s)}),V(()=>l(a,e(p))),C(n,r)};t(a,e=>{s()||e(o)}),C(n,i)},$$slots:{default:!0}})}r()}function Bs(e,t,n,r){return{key:`${e.id}:${t.id}`,providerId:e.id,group:t.group??e.label,item:t,score:n,titleRanges:r,selectable:!t.disabled}}function Vs(e){return e.map((e,t)=>({provider:e,index:t})).sort((e,t)=>(e.provider.order??0)-(t.provider.order??0)||e.index-t.index).map(({provider:e})=>e)}function Hs(e){let t=e.query.trim(),n=e.maxPerGroup??8,r=[],i=e=>{let t=r.find(t=>t.id===e);return t||(t={id:e,label:e,results:[]},r.push(t)),t},a=new Set;for(let r of Vs(e.providers)){let o=r.limit??n,s=[];for(let n of e.local[r.id]??[]){let e=ws(t,n);e&&s.push(Bs(r,n,e.score+(n.boost??0),e.titleRanges))}s.sort((e,t)=>t.score-e.score);let c=[];if(t.length>0)for(let n of e.remote[r.id]??[])c.push(Bs(r,n,n.boost??0,Cs(t,n.title)?.ranges??[]));let l=0;for(let e of[...s,...c]){if(l>=o)break;a.has(e.key)||(a.add(e.key),i(e.group).results.push(e),l+=1)}}return r.filter(e=>e.results.length>0)}function Us(e){return e.flatMap(e=>[...e.results])}function Ws(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}var Gs=class{#e;#t=A([]);#n=A({});#r=A({});#i=A(new Set);#a=A(0);#o=A(0);#s=0;#c=A(null);#l=A(!1);#u=A(``);#d=null;#f=null;#p=null;#m=0;constructor(e={}){this.#e=e,U(this.#t,[...e.providers??[]])}get isOpen(){return e(this.#l)}get query(){return e(this.#u)}get providers(){return e(this.#t)}get busy(){return e(this.#a)+e(this.#o)>0}get failedProviders(){return e(this.#i)}#h=n(()=>Hs({providers:e(this.#t),local:e(this.#n),remote:e(this.#r),query:e(this.#u),maxPerGroup:this.#e.maxPerGroup}));get sections(){return e(this.#h)}set sections(e){U(this.#h,e)}#g=n(()=>Us(this.sections));get results(){return e(this.#g)}set results(e){U(this.#g,e)}#_=n(()=>this.results.find(t=>t.key===e(this.#c)&&t.selectable)??this.results.find(e=>e.selectable)??null);get active(){return e(this.#_)}set active(e){U(this.#_,e)}registerProvider(t){let n=e(this.#t).findIndex(e=>e.id===t.id);if(n===-1)U(this.#t,[...e(this.#t),t]);else{let r=e(this.#t)[n];U(this.#t,e(this.#t).map((e,r)=>r===n?t:e)),U(this.#n,Ks(e(this.#n),r.id)),U(this.#r,Ks(e(this.#r),r.id)),this.#b(r.id,!1)}return e(this.#l)&&(this.#x(t,this.#v()),e(this.#u).trim()&&this.#C(0)),()=>{e(this.#t).includes(t)&&(U(this.#t,e(this.#t).filter(e=>e!==t)),U(this.#n,Ks(e(this.#n),t.id)),U(this.#r,Ks(e(this.#r),t.id)))}}open(){if(!e(this.#l)){U(this.#l,!0),U(this.#u,``),U(this.#c,null),U(this.#r,{}),U(this.#i,new Set),this.#m+=1,this.#d?.abort(),this.#d=new AbortController;for(let t of Vs(e(this.#t)))this.#x(t,this.#d.signal)}}close(){e(this.#l)&&(U(this.#l,!1),U(this.#u,``),U(this.#c,null),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null,U(this.#a,0),U(this.#o,0),U(this.#r,{}))}toggle(){e(this.#l)?this.close():this.open()}setQuery(t){t!==e(this.#u)&&(U(this.#u,t,!0),U(this.#c,null),this.#C(this.#e.searchDebounceMs??150))}moveActive(e){let t=this.results.filter(e=>e.selectable);if(t.length===0)return;let n=this.active?t.findIndex(e=>e.key===this.active?.key):-1,r=n===-1?e>0?0:t.length-1:((n+e)%t.length+t.length)%t.length;U(this.#c,t[r].key,!0)}moveActiveTo(e){let t=this.results.filter(e=>e.selectable);t.length!==0&&U(this.#c,(e===`first`?t[0]:t[t.length-1]).key,!0)}setActive(e){this.results.find(t=>t.key===e)?.selectable&&U(this.#c,e,!0)}async activate(t=this.active){if(!t?.selectable)return;let{item:n,providerId:r}=t,i=e(this.#u);this.close();try{n.run?await n.run({query:i,providerId:r,navigate:e=>this.navigate(e,n)}):n.href&&await this.navigate(n.href,n)}catch(e){this.#y(e,{providerId:r,phase:`run`,item:n})}}navigate(e,t){if(this.#e.navigate)return this.#e.navigate(e,t);typeof window<`u`&&window.location.assign(e)}destroy(){U(this.#l,!1),this.#m+=1,this.#S(),this.#d?.abort(),this.#d=null}#v(){return this.#d||=new AbortController,this.#d.signal}#y(e,t){this.#e.onError?this.#e.onError(e,t):xe.warn(`[smrt-svelte] command palette provider failed`,{...t,item:t.item?.id,error:e instanceof Error?e.message:String(e)})}#b(t,n){if(e(this.#i).has(t)===n)return;let r=new Set(e(this.#i));n?r.add(t):r.delete(t),U(this.#i,r)}#x(t,n){if(!t.items)return Promise.resolve();let r=this.#m,i=()=>r===this.#m&&!n.aborted&&e(this.#t).includes(t),a=n=>{i()&&(U(this.#n,{...e(this.#n),[t.id]:n}),this.#b(t.id,!1))},o;try{o=t.items({signal:n})}catch(e){return this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}),Promise.resolve()}if(!Ws(o))return a(o),Promise.resolve();U(this.#a,e(this.#a)+1);let s=()=>{r===this.#m&&U(this.#a,Math.max(0,e(this.#a)-1),!0)};return Promise.resolve(o).then(e=>{s(),a(e)},e=>{s(),i()&&(this.#b(t.id,!0),this.#y(e,{providerId:t.id,phase:`items`}))})}#S(){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,U(this.#o,0)}#C(t){this.#p&&clearTimeout(this.#p),this.#p=null,this.#f?.abort(),this.#f=null,this.#s+=1,U(this.#o,0);let n=e(this.#u).trim();n.length===0?U(this.#r,{}):e(this.#l)&&(this.#p=setTimeout(()=>{this.#p=null,this.#w(n)},t))}#w(t){let n=this.#m,r=new AbortController;this.#f=r;let i=++this.#s;U(this.#o,0);let a=t=>n!==this.#m||r.signal.aborted||!e(this.#t).includes(t),o=()=>{i===this.#s&&U(this.#o,Math.max(0,e(this.#o)-1),!0)};for(let n of e(this.#t)){if(!n.search)continue;if(t.length<(n.minQueryLength??2)){e(this.#r)[n.id]&&U(this.#r,Ks(e(this.#r),n.id));continue}let i=n.limit??this.#e.maxPerGroup??8,s;try{s=n.search(t,{signal:r.signal,limit:i})}catch(e){this.#b(n.id,!0),this.#y(e,{providerId:n.id,phase:`search`});continue}U(this.#o,e(this.#o)+1),Promise.resolve(s).then(t=>{o(),!a(n)&&(U(this.#r,{...e(this.#r),[n.id]:t}),this.#b(n.id,!1))},t=>{o(),!a(n)&&(U(this.#r,Ks(e(this.#r),n.id)),this.#b(n.id,!0),this.#y(t,{providerId:n.id,phase:`search`}))})}}};function Ks(e,t){if(!(t in e))return e;let{[t]:n,...r}=e;return r}var qs=c(`<!> <!>`,1);function Js(i,a){_(a,!0);let o=k(a,`providers`,19,()=>[]),s=k(a,`hotkeys`,3,as),c=k(a,`compact`,3,!1),l=k(a,`hideTrigger`,3,!1),u=rs(),d=z(()=>a.palette||u?null:new Gs({providers:o(),navigate:a.navigate}));R(()=>d?.destroy());let f=n(()=>a.palette??u??d);var p=qs(),m=B(p),h=t=>{{let r=n(()=>s()===!1?[]:s());zs(t,{get palette(){return e(f)},get label(){return a.label},get compact(){return c()},get hotkeys(){return e(r)}})}};t(m,e=>{l()||e(h)}),Fs(F(m,2),{get palette(){return e(f)},get hotkeys(){return s()},get label(){return a.label},get placeholder(){return a.placeholder}}),C(i,p),r()}function Ys(i,a){_(a,!0);let s=Ce(),c=n(()=>s?.dataSurfaceRegistry);var l=T(),u=B(l),d=t=>{var n=T(),r=B(n);o(r,()=>a.dock,()=>e(c)),C(t,n)};t(u,t=>{e(c)&&t(d)}),C(i,l),r()}function Xs(e,t){let n=e.ready!==!1,r=t&&n?`toggle`:e.href?`link`:`inert`;return{mode:r,registered:t,ready:n,notReady:!n||r===`link`}}function Zs(e,t,n){return e.onpress?.(t,{registered:n.registered,ready:n.ready})===!1||t.defaultPrevented?(t.preventDefault(),!1):!0}var Qs=(r,i=m)=>{var a=T(),o=B(a),s=e=>{var t=$s();C(e,t)},c=e=>{var t=ec(),n=L(t);V(()=>H(n,`d`,ye[i()===void 0?be:i()])),C(e,t)},u=n(()=>i()===void 0||Ae(i())),d=e=>{var t=tc(),n=L(t,!0);V(()=>l(n,i())),C(e,t)};t(o,t=>{i()===`chat`?t(s):e(u)?t(c,1):t(d,-1)}),C(r,a)},$s=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.5L3 20.5l1.6-5A8.5 8.5 0 1 1 21 11.5z"></path></svg>`),ec=f(`<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path></path></svg>`),tc=c(`<span aria-hidden="true"> </span>`),nc=c(`<a class="smrt-dock-toggles__button svelte-1u9e85z"><!></a>`),rc=c(`<button type="button" aria-controls="smrt-admin-shell-right-panel"><!></button>`),ic=c(`<div class="smrt-dock-toggles svelte-1u9e85z" data-testid="dock-toggles"></div>`);function ac(a,o){_(o,!0);let c=Di(),{t:l}=de();function u(e){return e.icon??(e.tool===`assistant`?`chat`:void 0)}function d(e){return Xs(e,c.has(e.tool)&&c.available)}function f(e,t){return t?e.labelNotReady??l(Z[`ui.dock_toggles.set_up`],{label:e.label}):e.label}function m(e,t){let n=d(t);Zs(t,e,n)&&n.mode===`toggle`&&c.toggle(t.tool,{returnFocus:e.currentTarget})}var h=ic();p(h,21,()=>o.toggles,e=>e.tool,(r,a)=>{let o=n(()=>d(e(a))),l=n(()=>e(o).mode===`toggle`),p=n(()=>e(l)&&c.isOpen(e(a).tool)),h=n(()=>u(e(a))),g=n(()=>f(e(a),e(o).notReady));var _=T(),v=B(_),y=t=>{var n=nc();Qs(N(n),()=>e(h)),s(n),V(()=>{H(n,`href`,e(a).href),H(n,`data-dock-tool`,e(a).tool),H(n,`aria-label`,e(g)),H(n,`title`,e(g))}),E(`click`,n,t=>m(t,e(a))),C(t,n)},b=t=>{var n=rc();let r;Qs(N(n),()=>e(h)),s(n),V(()=>{r=i(n,1,`smrt-dock-toggles__button svelte-1u9e85z`,null,r,{active:e(p)}),H(n,`data-dock-tool`,e(a).tool),H(n,`aria-label`,e(g)),H(n,`title`,e(g)),H(n,`aria-pressed`,e(p)),H(n,`aria-expanded`,e(p)),H(n,`aria-disabled`,!e(l)||void 0)}),E(`click`,n,t=>m(t,e(a))),C(t,n)};t(v,t=>{e(o).mode===`link`?t(y):t(b,-1)}),C(r,_)}),s(h),C(a,h),r()}D([`click`]);function oc(e){if(!e)return null;let t=typeof e==`object`?e.items:void 0;return{items:Math.max(1,Number.isFinite(t)?Math.floor(t):4)}}function sc(e,t,n=`items`,r){let i=[],a=e=>{i.some(t=>t.id===e.id)||i.push(e)};for(let t of e)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});for(let e of t){if(n===`items`){for(let t of e.items)a({id:t.id??t.href,label:t.label,href:t.href,icon:t.icon});continue}let t=e.id??e.heading,i=e.href??r?.(t)??e.items[0]?.href;i&&a({id:t,label:e.heading,href:i,icon:e.icon})}return i}function cc(e,t,n){let r=Math.max(0,t-+!!n);return{nav:e.slice(0,r),more:e.length>r}}function lc(e,t){return e===t||t.startsWith(`${e}/`)}function uc(t,i){_(i,!0);let a=k(i,`currentHref`,3,``),{t:o}=de(),s=Ve(),c=Di(),l=n(()=>!i.dockToggle&&s.isEdgeShown(`right`)&&s.focusTools.length>0),u=n(()=>!!i.dockToggle||e(l)),d=n(()=>cc(i.entries,i.budget,e(u)));function f(e){let t=e.icon??(e.tool===`assistant`?`chat`:void 0);return t&&(Ae(t)||i.iconComponent)?t:be}function p(){if(s.panels.right===`expanded`){s.collapsePanel(`right`);return}let e=s.focusTools.find(e=>e.id===s.activeFocusToolId)??s.focusTools[0];e?s.openFocusTool(e.id):s.expandPanel(`right`)}function m(){s.setPanelState(`left`,s.panels.left===`expanded`?`collapsed`:`expanded`)}let h=n(()=>{let t=e(d).nav.map(e=>({id:e.id,label:e.label,href:e.href,iconName:e.icon??`placeholder`,active:lc(e.href,a())}));if(i.dockToggle){let e=i.dockToggle.tool,n=Xs(i.dockToggle,c.has(e)&&c.available),r=n.mode===`toggle`,a=n.notReady?i.dockToggle.labelNotReady??o(Z[`ui.dock_toggles.set_up`],{label:i.dockToggle.label}):i.dockToggle.label,s=t=>{Zs(i.dockToggle,t,n)&&r&&c.toggle(e)};t.push(n.mode===`link`?{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),href:i.dockToggle.href,onclick:s}:{id:`dock:${e}`,label:a,iconName:f(i.dockToggle),active:r&&c.isOpen(e),expanded:r?c.isOpen(e):void 0,controls:r?`smrt-admin-shell-right-panel`:void 0,onclick:s})}else e(l)&&t.push({id:`tools`,label:o(Z[`ui.admin_shell.tools`]),iconName:be,active:s.panels.right===`expanded`,expanded:s.panels.right===`expanded`,controls:`smrt-admin-shell-right-panel`,onclick:p});return e(d).more&&t.push({id:`more`,label:o(Z[`ui.phone_tab_bar.more`]),iconName:`more`,expanded:s.panels.left===`expanded`,controls:`smrt-admin-shell-left-panel`,onclick:m}),t});{let r=n(()=>o(Z[`ui.phone_tab_bar.label`]));Ii(t,{get items(){return e(h)},get iconComponent(){return i.iconComponent},get label(){return e(r)}})}r()}var dc=`smrt.runtime.diagnostics.read`,fc=`/api/_runtime/diagnostics`;function pc(e={}){let t=e.modelContext??globalThis.document?.modelContext;if(!t||typeof t.registerTool!=`function`)return null;let n=new AbortController,r=mc(e.fetchFn??fetch,e.endpoint);try{let e=t.registerTool(r,{signal:n.signal});Promise.resolve(e).catch(()=>n.abort())}catch{n.abort()}return Object.freeze({dispose:()=>n.abort()})}function mc(e,t=fc){return Object.freeze({name:dc,description:`Read the authenticated, redacted application runtime diagnostics.`,inputSchema:Object.freeze({type:`object`,properties:Object.freeze({}),additionalProperties:!1}),annotations:Object.freeze({readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}),async execute(){let n;try{n=await e(t,{method:`GET`,credentials:`same-origin`,headers:{accept:`application/json`}})}catch{return hc(`diagnostics_unavailable`)}if(!n.ok)return hc(n.status===401?`authentication_required`:n.status===403?`authorization_denied`:`diagnostics_unavailable`);try{return JSON.stringify(await n.json())}catch{return hc(`diagnostics_unavailable`)}}})}function hc(e){return JSON.stringify({ok:!1,error:{code:e}})}function gc(e,t){_(t,!0);let n=k(t,`enabled`,3,!0);j(()=>{if(!n())return;let e=pc({endpoint:t.endpoint});return()=>e?.dispose()}),r()}var _c=c(`<span class="smrt-app-shell-color-scheme svelte-1dzfp19" data-smrt-component="ShellColorSchemeToggle"><!></span>`);function vc(t,i){_(i,!0);let a=J(),{t:o}=de(),c=n(()=>a.state.isDark);var l=_c(),u=N(l);{let t=n(()=>e(c)?`lightMode`:`darkMode`),r=n(()=>o(Z[`ui.app_shell.color_scheme_dark`])),i=n(()=>o(e(c)?Z[`ui.app_shell.color_scheme_to_light`]:Z[`ui.app_shell.color_scheme_to_dark`]));we(u,{get icon(){return e(t)},get label(){return e(r)},get pressed(){return e(c)},get tooltip(){return e(i)},onclick:()=>a.toggleColorScheme()})}s(l),C(t,l),r()}var yc=`data-smrt-view-transition`,bc=0;function xc(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}async function Sc(e,t={}){let n=typeof document>`u`?void 0:document,r=n?.startViewTransition;if(!n||t.skip||typeof r!=`function`||xc()){await e();return}let i;bc+=1,n.documentElement.setAttribute(yc,``);let a=()=>{bc=Math.max(0,bc-1),bc===0&&n.documentElement.removeAttribute(yc)};try{i=r.call(n,e)}catch{a(),await e();return}i.ready?.catch(()=>{}),Promise.resolve(i.finished).then(a,a),await i.updateCallbackDone}function Cc(e={}){return t=>{if(!(t.willUnload||t.type===`leave`))return new Promise(n=>{Sc(async()=>{n(),await t.complete},e).then(n,n)})}}var wc=(r,i=m)=>{var a=T(),s=B(a),c=t=>{{let r=n(()=>[i().toggle]);ac(t,{get toggles(){return e(r)}})}},l=e=>{var t=T(),n=B(t);o(n,()=>i().render),C(e,t)};t(s,e=>{i().toggle?e(c):i().render&&e(l,1)}),C(r,a)},Tc=e=>{vc(e,{})},Ec=c(`<span data-testid="layout-edit-toggle"><!></span>`),Dc=c(`<span><button type="button" class="smrt-edit-item__grip svelte-1pgtgoi" data-smrt-edit-handle=""><span aria-hidden="true">⠿</span></button> <span class="smrt-edit-item__body svelte-1pgtgoi" inert=""><!></span></span>`),Oc=c(`<span class="smrt-edit-zone__label svelte-1pgtgoi"> </span> <!>`,1),kc=c(`<span class="smrt-app-shell-palette svelte-1pgtgoi"><!></span>`),Ac=c(`<span> </span> <!>`,1),jc=c(`<a class="svelte-1pgtgoi"> </a>`),Mc=c(`<!> <!>`,1),Nc=c(`<div class="smrt-layout-live svelte-1pgtgoi" aria-live="assertive" aria-atomic="true"> </div>`),Pc=c(`<div class="smrt-layout-live svelte-1pgtgoi" role="status" aria-live="polite"> </div> <!> <!> <!> <!>`,1);function Fc(a,c){_(c,!0);let u=(r,i=m)=>{var a=T(),s=B(a);p(s,17,()=>Ue(i()),e=>e.id,(r,i)=>{var a=T(),s=B(a),c=r=>{var a=T(),o=B(a),s=t=>{{let r=n(()=>[e(i).toggle]);ac(t,{get toggles(){return e(r)}})}};t(o,t=>{(e(Ve)?.tool!==e(i).toggle.tool||X.viewport!==`phone`)&&t(s)}),C(r,a)},l=t=>{var n=T(),r=B(n);o(r,()=>e(i).render),C(t,n)};t(s,t=>{e(i).toggle?t(c):e(i).render&&t(l,1)}),C(r,a)}),C(r,a)},d=e=>{u(e,()=>`header.start`)},f=e=>{u(e,()=>`header.center`)},h=e=>{u(e,()=>`header.end`)},g=e=>{u(e,()=>`footer.start`)},v=e=>{u(e,()=>`footer.center`)},y=e=>{u(e,()=>`footer.end`)},b=e=>{u(e,()=>`leftSidebar.header`)},x=e=>{u(e,()=>`leftSidebar.footer`)},S=e=>{u(e,()=>`rightSidebar.header`)},w=e=>{u(e,()=>`rightSidebar.footer`)},D=t=>{var r=Ec();let a;var o=N(r);{let t=n(()=>J(Z[`ui.layout_edit.toggle`])),r=n(()=>J(Z[`ui.layout_edit.toggle`]));we(o,{icon:`edit`,get pressed(){return e(Je)},get label(){return e(t)},get tooltip(){return e(r)},onclick:wt})}s(r),V(()=>a=i(r,1,`smrt-layout-toggle svelte-1pgtgoi`,null,a,{"smrt-layout-toggle--floating":e(Ae)})),C(t,r)},M=(r,a=m)=>{var o=Oc(),c=B(o),u=L(c,!0),d=F(c,2);p(d,17,()=>ut(a()),e=>e.id,(r,a)=>{var o=T(),c=B(o),l=t=>{wc(t,()=>e(a))},u=t=>{let r=n(()=>ft.drag?.itemId===e(a).id);var o=Dc();let c;var l=N(o),u=F(l,2);wc(N(u),()=>e(a)),s(u),s(o),V((t,n)=>{c=i(o,1,`smrt-edit-item svelte-1pgtgoi`,null,c,{"smrt-edit-item--dragging":e(r)}),H(o,`data-smrt-edit-item`,e(a).id),H(l,`draggable`,ft.nativeDraggable),H(l,`aria-label`,t),H(l,`title`,n),H(l,`aria-pressed`,e(r))},[()=>J(Li[`ui.sortable.move`],{item:e(a).label}),()=>J(Li[`ui.sortable.move`],{item:e(a).label})]),E(`click`,l,()=>ft.consumeClick(e(a).id)),E(`keydown`,l,t=>ft.keydown(t,e(a).id)),O(`blur`,l,t=>ft.blur(t,e(a).id)),E(`pointerdown`,l,t=>ft.pointerDown(t,e(a).id)),E(`pointermove`,l,e=>ft.pointerMove(e)),E(`pointerup`,l,e=>ft.pointerUp(e)),O(`pointercancel`,l,e=>ft.pointerCancel(e)),O(`dragstart`,l,t=>ft.dragStart(t,e(a).id)),O(`dragend`,l,()=>ft.dragEnd()),C(t,o)};t(c,t=>{e(a).fixed?t(l):t(u,-1)}),C(r,o)}),V(e=>l(u,e),[()=>lt(a())]),C(r,o)},ee=(t,r=m,i=m)=>{{let a=n(()=>e(tt).name||e(tt).email),o=n(()=>et(e(Xe),i()));Za(t,{get userName(){return e(a)},get email(){return e(tt).email},get avatarUrl(){return e(tt).avatarUrl},get compact(){return r()},get tenantLabel(){return le()},get onSignOut(){return c.onSignOut},get signOutHref(){return c.signOutHref},get settingsHref(){return c.settingsHref},get placement(){return e(o)}})}},P=t=>{ee(t,()=>e($e),()=>!1)},I=n=>{var r=T(),i=B(r),a=e=>{ee(e,()=>!0,()=>!0)};t(i,t=>{e(Ze)&&t(a)}),C(n,r)},te=r=>{var i=T(),a=B(i),o=t=>{var r=kc(),i=N(r);{let t=n(()=>X.viewport===`phone`);Js(i,{get providers(){return c.commandPalette.providers},get placeholder(){return c.commandPalette.placeholder},get compact(){return e(t)}})}s(r),V(()=>H(r,`data-search`,X.viewport===`phone`?void 0:``)),C(t,r)};t(a,e=>{c.commandPalette&&e(o)}),C(r,i)},R=e=>{mt(e,{get title(){return W()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref}})},ne=(t,r=m)=>{let i=n(()=>J(si[r()])),a=n(()=>e(bt)<=1);{let o=n(()=>J(Z[`ui.layout_edit.hide_region`],{region:e(i)})),s=n(()=>e(a)?J(Z[`ui.layout_edit.hide_last_region`],{region:e(i)}):J(Z[`ui.layout_edit.hide_region`],{region:e(i)}));we(t,{icon:`eyeOff`,size:16,get disabled(){return e(a)},get label(){return e(o)},get tooltip(){return e(s)},onclick:()=>qe.setPanel(Tt[r()],{visible:!1})})}},re=(t,r=m)=>{let i=n(()=>J(si[r()]));var a=Ac(),o=B(a),s=L(o,!0),c=F(o,2);{let t=n(()=>J(Z[`ui.layout_edit.show_region`],{region:e(i)}));we(c,{icon:`eye`,size:16,get label(){return e(t)},onclick:()=>qe.setPanel(Tt[r()],{visible:!0})})}V(e=>l(s,e),[()=>J(Z[`ui.layout_edit.region_hidden`],{region:e(i)})]),C(t,a)},ae=t=>{uc(t,{get entries(){return e(ze)},get currentHref(){return ce()},get budget(){return e(Re)},get dockToggle(){return e(Ve)},get iconComponent(){return c.iconComponent}})},W=k(c,`title`,3,`SMRT`),oe=k(c,`storageKey`,3,`smrt-app-shell`),G=k(c,`nav`,19,()=>[]),se=k(c,`navGroups`,19,()=>[]),ce=k(c,`currentHref`,3,``),le=k(c,`tenantLabel`,3,``),ue=k(c,`environment`,3,`local`),fe=k(c,`accountMenu`,3,!0),pe=k(c,`colorSchemeToggle`,3,!0),me=k(c,`webmcp`,3,!1),he=k(c,`user`,3,null),ge=k(c,`permissions`,19,()=>[]),_e=k(c,`runtimeDiagnostics`,3,!1),ve=k(c,`preset`,3,`smrt`),ye=k(c,`colorScheme`,3,`system`),be=k(c,`dockToggles`,19,()=>[]),xe=k(c,`slotItems`,19,()=>[]),Se=k(c,`layoutEditing`,3,!1),Ce=k(c,`navMode`,3,`items`),Te=k(c,`edgeToggles`,3,!1),Ee=k(c,`phoneTabBar`,3,!1),De=k(c,`chrome`,3,!0),Oe=`item:account`,ke=`item:color-scheme`,Ae=n(()=>typeof Se()==`object`&&Se().floating===!0),{t:J}=de(),Y=n(()=>{let t=[],n=new Set,r=e=>{n.has(e.id)||(n.add(e.id),t.push(e))};r({id:`item:brand`,label:J(Z[`ui.app_shell.brand_item`]),slot:`header.start`,render:R});for(let e of ht){let t=c.slots?.[e];t&&r({id:St(e),label:J(Z[`ui.app_shell.slot_content`],{slot:J(ai[e])}),slot:e,render:t})}for(let e of xe())r({...e});for(let e of be())r({id:xt(e.tool),label:e.label,slot:e.slot??`header.end`,toggle:e});return Se()&&!e(Ae)&&r({id:`item:layout-edit`,label:J(Z[`ui.layout_edit.toggle`]),slot:typeof Se()==`object`?Se().slot??`header.end`:`header.end`,render:D,fixed:!0}),pe()!==!1&&r({id:ke,label:J(Z[`ui.app_shell.color_scheme_item`]),slot:(typeof pe()==`object`?pe().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:Tc}),c.commandPalette&&r({id:`item:command-palette`,label:J(Z[`ui.app_shell.command_palette_item`]),slot:`header.center`,render:te}),he()&&fe()!==!1&&r({id:Oe,label:J(Z[`ui.app_shell.account_item`]),slot:(typeof fe()==`object`?fe().slot:void 0)??(X.viewport===`phone`?`header.end`:`leftSidebar.footer`),render:P}),t});function Me(e){let t=c.phoneDock??(oc(Ee())?`sheet`:void 0),n=e?.right;return!t||n===!1||!c.phoneDock&&n?.phone!==void 0?e:{...e,right:{...n,phone:t}}}let X=z(()=>Hn({config:Me(c.config),storageKey:oe(),layoutPanels:It(c.layout).panels})),Ne=A(void 0),Pe=n(()=>c.layout!==void 0),Fe=n(()=>It(e(Pe)?c.layout:c.onlayoutchange?e(Ne):X.settings.layout)),Ie=n(()=>Vt(G(),se(),c.config,e(Fe))),Le=n(()=>e(Ie).nav.length>0||e(Ie).groups.length>0),Re=n(()=>oc(Ee())?.items??0),ze=n(()=>sc(e(Ie).nav,e(Ie).groups,Ce(),c.sectionHref)),Be=n(()=>e(Re)>0&&(e(ze).length>0||be().length>0)),Ve=n(()=>e(Be)?be()[0]:void 0),He=n(()=>cn(e(Y),e(Fe))),Ue=t=>{let n=new Map(e(Y).map(e=>[e.id,e]));return e(He)[t].flatMap(t=>t===Oe&&e(Ze)||t===ke&&e(Qe)?[]:n.get(t)??[])},We={"header.start":d,"header.center":f,"header.end":h,"footer.start":g,"footer.center":v,"footer.end":y,"leftSidebar.header":b,"leftSidebar.footer":x,"rightSidebar.header":S,"rightSidebar.footer":w},Ge=n(()=>{let e={};for(let t of ht)Ue(t).length>0&&(e[t]=We[t]);return e}),Ke=new Map;j(()=>{let t=e(Fe).panels??{};X.setLayoutPanels(t);for(let[e,n]of Ke)(t[e]?.initial??gn(c.config).panels[e].initial)===n&&X.setPanelStart(e,n);Ke.clear()});let qe=new ki({editable:()=>!!Se(),nav:()=>G(),groups:()=>se(),panels:()=>c.config,layout:()=>e(Fe),items:()=>e(Y).map(({id:e,label:t,slot:n})=>({id:e,label:t,slot:n})),commit(t){for(let n of dn){let r=e(Fe).panels?.[n]?.initial,i=t.panels?.[n]?.initial;if(r===i)continue;let a=i??gn(c.config).panels[n].initial;(a===`collapsed`||a===`expanded`)&&Ke.set(n,a)}e(Pe)||(c.onlayoutchange?U(Ne,t,!0):X.setLayout(t)),c.onlayoutchange?.(t)}});q(qe);let Je=n(()=>qe.editing),Ye=A(void 0),Xe=n(()=>ht.find(t=>e(He)[t].includes(Oe))),Ze=n(()=>e(Xe)===`leftSidebar.footer`&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)&&X.panels.left===`collapsed`),Qe=n(()=>e(He)[`leftSidebar.footer`].includes(ke)&&!e(Je)&&X.viewport!==`phone`&&X.isEdgeShown(`left`)),$e=n(()=>{if(X.viewport===`phone`||!e(Xe))return!0;let t=gt(e(Xe));return t!==`leftSidebar`&&t!==`rightSidebar`||!X.isRegionVisible(t)});function et(e,t){if(t)return`inline-end`;if(!e)return`bottom-end`;let n=vt(e,e=>X.isRegionVisible(e))??e,r=gt(n),i=r===`footer`||n.endsWith(`.footer`),a=n.endsWith(`.start`)||r===`leftSidebar`;return i?a?`top-start`:`top-end`:a?`bottom-start`:`bottom-end`}let tt=n(()=>{let e=he()??{};return{name:typeof e.name==`string`?e.name.trim():``,email:typeof e.email==`string`?e.email.trim():``,avatarUrl:typeof e.avatarUrl==`string`&&e.avatarUrl?e.avatarUrl:void 0}}),nt=n(he),rt=n(()=>{if(!e(Ae))return;let t=`calc(2.75rem + var(--smrt-spacing-3))`,n=X.isRegionVisible(`header`),r=X.isEdgeShown(`right`);return{inline:n?t:`0px`,block:!n&&r?t:`0px`,main:!n&&!r?t:`0px`}}),it=A(``),at=!1;j(()=>{let t=e(Je);t!==at&&(at=t,U(it,J(t?Z[`ui.layout_edit.announce_on`]:Z[`ui.layout_edit.announce_off`]),!0))});let ot=[`header.start`,`header.center`,`header.end`,`leftSidebar.header`,`rightSidebar.header`,`leftSidebar.footer`,`rightSidebar.footer`,`footer.start`,`footer.center`,`footer.end`],st=e=>X.isRegionVisible(e),ct=n(()=>ot.filter(e=>st(gt(e))));function lt(e){return J(Z[`ui.layout_edit.zone`],{region:J(si[gt(e)]),slot:J(oi[e])})}function ut(e){let t=Ue(e),n=ht.filter(t=>t!==e&&vt(t,st)===e).flatMap(e=>Ue(e));return[...t,...n]}let dt=e=>ut(e).filter(e=>!e.fixed),ft=K({root:()=>e(Ye),selectors:{container:`[data-smrt-edit-zone]`,containerKey:`smrtEditZone`,item:`[data-smrt-edit-item]`,itemKey:`smrtEditItem`},containers:()=>e(ct).map(e=>({id:e,label:lt(e)})),itemIds:e=>dt(e).map(e=>e.id),itemLabel:t=>e(Y).find(e=>e.id===t&&!e.fixed)?.label,allowSameContainerReorder:()=>!1,enabled:()=>e(Je),orientation:()=>`vertical`,announce:e=>Ri(J,e),focusTarget:e=>e.querySelector(`[data-smrt-edit-handle]`),commit(e){qe.placeItem(e.itemId,e.target.containerId)}});j(()=>{let t=e(Ye);if(!t||!e(Je))return;let n=e=>{ft.drag&&e.preventDefault()},r=e=>{if(!ft.drag||!(e.target instanceof Element))return;let t=e.target.closest(`[data-smrt-edit-zone]`);t?.dataset.smrtEditZone&&ft.dropOnContainer(e,t.dataset.smrtEditZone)};return t.addEventListener(`dragover`,n),t.addEventListener(`drop`,r),()=>{t.removeEventListener(`dragover`,n),t.removeEventListener(`drop`,r)}});let pt={top:`header`,bottom:`footer`,left:`leftSidebar`,right:`rightSidebar`},_t=n(()=>qe.panels.filter(e=>e.available&&!e.visible).map(e=>pt[e.edge])),yt=n(()=>({active:e(Je),highlight:ft.drag?.target.containerId??null,zone:M,hiddenRegions:e(_t),strip:re,regionControl:ne})),bt=n(()=>qe.panels.filter(e=>e.available&&e.visible).length),Ct=[];j(()=>{e(Je)?z(()=>{if(X.viewport!==`phone`)for(let e of[`left`,`right`])X.config.panels[e].rail!==!1&&X.revealPanelTemporarily(e)&&Ct.push(e)}):z(()=>{for(let e of Ct)X.endTemporaryReveal(e);Ct=[]})}),j(()=>{if(!e(Je))return;let t=t=>{t.key!==`Escape`||t.defaultPrevented||ft.drag||e(Ye)?.querySelector(`[data-toolbar-open]`)||qe.setEditing(!1)};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)});async function wt(){await Sc(async()=>{qe.setEditing(!qe.editing),await ie()})}let Tt={header:`top`,footer:`bottom`,leftSidebar:`left`,rightSidebar:`right`};es(a,{get webmcp(){return me()},get user(){return e(nt)},get permissions(){return ge()},children:(r,i)=>{var a=Mc(),s=B(a);gc(s,{get enabled(){return _e()}});var u=F(s,2);je(u,{get preset(){return ve()},get colorScheme(){return ye()},get borderRadius(){return c.borderRadius},get density(){return c.density},get contrast(){return c.contrast},persist:!0,children:(r,i)=>{var a=T(),s=B(a),u=e=>{var t=T(),n=B(t);o(n,()=>c.children),C(e,t)},d=r=>{{let i=e=>{Ei(e,{get appName(){return W()},get tenantName(){return le()},get environment(){return ue()},showSettings:!1,docs:e=>{var n=Mc(),r=B(n);o(r,()=>c.appPanelDocs??m);var i=F(r,2),a=e=>{var t=jc(),n=L(t,!0);V(e=>{H(t,`href`,c.settingsHref),l(n,e)},[()=>J(Z[`ui.app_shell.settings_link`])]),C(e,t)};t(i,e=>{c.settingsHref&&e(a)}),C(e,n)},$$slots:{docs:!0}})},a=r=>{var i=T(),a=B(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));va(t,{collapsed:!0,get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return ce()},get navMode(){return Ce()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{!e(Je)&&e(Le)&&t(o)}),C(r,i)},s=r=>{var i=T(),a=B(i),o=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));ka(t,{get"aria-label"(){return e(r)},get sectionActions(){return c.sectionActions},get navMode(){return Ce()},get iconComponent(){return c.iconComponent}})}},s=t=>{{let r=n(()=>J(Z[`ui.app_shell.navigation`]));va(t,{get items(){return e(Ie).nav},get groups(){return e(Ie).groups},get currentHref(){return ce()},get navMode(){return Ce()},get sectionHref(){return c.sectionHref},get iconComponent(){return c.iconComponent},get"aria-label"(){return e(r)}})}};t(a,t=>{e(Je)?t(o):e(Le)&&t(s,1)}),C(r,i)},u=n(()=>be().length===0&&!e(Be)),d=n(()=>e(Be)?ae:void 0),f=n(()=>e(Ze)?I:void 0),p=n(()=>e(Qe)?Tc:void 0);ei(r,{get title(){return W()},get subtitle(){return c.subtitle},get logoSrc(){return c.logoSrc},get logoAlt(){return c.logoAlt},get homeHref(){return c.homeHref},get state(){return X},get path(){return ce()},get slots(){return e(Ge)},get layoutEdit(){return e(yt)},get edgeToggles(){return Te()},get hotkeys(){return c.hotkeys},brandInSlot:!0,get phoneDockOpener(){return e(u)},get phoneBottomBar(){return e(d)},get tenantRailFooter(){return e(f)},get tenantUtilities(){return e(p)},get floatingReserve(){return e(rt)},get rootElement(){return e(Ye)},set rootElement(e){U(Ye,e,!0)},appPanel:i,tenantRail:a,tenantPanel:s,children:(n,r)=>{var i=Pc(),a=B(i),s=L(a,!0),u=F(a,2),d=e=>{var t=Nc(),n=L(t,!0);V(()=>l(n,ft.announcement)),C(e,t)};t(u,t=>{e(Je)&&t(d)});var f=F(u,2),p=e=>{D(e)};t(f,t=>{e(Ae)&&t(p)});var m=F(f,2),h=e=>{Ys(e,{get dock(){return c.dock}})};t(m,e=>{c.dock&&e(h)});var g=F(m,2);o(g,()=>c.children),V(()=>l(s,e(it))),C(n,i)},$$slots:{appPanel:!0,tenantRail:!0,tenantPanel:!0,default:!0}})}};t(s,e=>{De()?e(d,-1):e(u)}),C(r,a)},$$slots:{default:!0}}),C(r,a)},$$slots:{default:!0}}),r()}D([`click`,`keydown`,`pointerdown`,`pointermove`,`pointerup`]);export{Z as C,Ge as S,Ve as T,at as _,es as a,Qe as b,oo as c,Ha as d,va as f,Ot as g,Vt as h,Js as i,io as l,ki as m,Cc as n,so as o,Xi as p,Sc as r,Qa as s,Fc as t,ao as u,rt as v,He as w,We as x,tt as y};