n8n-editor-ui 2.47.1 → 2.47.3

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 (450) hide show
  1. package/dist/assets/{AddDataTableModal-DdBqID-j.js → AddDataTableModal-DbJ4hS4t.js} +1 -1
  2. package/dist/assets/{AgentApprovalSelector-DXbsRpbo.js → AgentApprovalSelector-ADKHUuuF.js} +1 -1
  3. package/dist/assets/AgentBuilderView-4PYOHFOw.js +9 -0
  4. package/dist/assets/{AgentBuilderView-TWMyEu4_.js → AgentBuilderView-C1Czl-bY.js} +1 -1
  5. package/dist/assets/AgentChatPanel-nywJ1kC5.js +16 -0
  6. package/dist/assets/AgentConfirmationModal-Ch1N9jsF.js +1 -0
  7. package/dist/assets/{AgentDescriptionModal-DvYuCWQI.js → AgentDescriptionModal-CyKzzk5U.js} +1 -1
  8. package/dist/assets/{AgentDuplicateModal-BdUBqqoH.js → AgentDuplicateModal-Bke_Ff4D.js} +1 -1
  9. package/dist/assets/AgentEditorModal-CtUNQ9Fa.js +1 -0
  10. package/dist/assets/{AgentFormSettingRow-C795WgG7.js → AgentFormSettingRow-Cv52TnaA.js} +1 -1
  11. package/dist/assets/{AgentJsonImportModal-liouL3SB.js → AgentJsonImportModal-DFBNV2Vi.js} +1 -1
  12. package/dist/assets/{AgentModal-D_Fnne98.js → AgentModal-BIVM0y7V.js} +1 -1
  13. package/dist/assets/{AgentModalMultiStep-DS3NR79c.js → AgentModalMultiStep-BUlEZsVW.js} +1 -1
  14. package/dist/assets/AgentN8nChatView-pYFNSJ1d.js +1 -0
  15. package/dist/assets/{AgentPublishedModal-D4cNV41_.js → AgentPublishedModal-DIUY29vm.js} +1 -1
  16. package/dist/assets/AgentSessionTimelineView-TPUZLIy6.js +2 -0
  17. package/dist/assets/{AgentSessionsListView-Cuw980m-.js → AgentSessionsListView-AUy6OSOZ.js} +1 -1
  18. package/dist/assets/{AgentSessionsListView-D2od8oIE.js → AgentSessionsListView-Be02Kxdh.js} +1 -1
  19. package/dist/assets/AgentSkillModal-DIIkwm0s.js +5 -0
  20. package/dist/assets/{AgentSkillViewer-VLZvMeO3.js → AgentSkillViewer-BDwJUv65.js} +1 -1
  21. package/dist/assets/{AgentSubAgentsModal-dXLLy4Jr.js → AgentSubAgentsModal-ClioEw7g.js} +1 -1
  22. package/dist/assets/{AgentTaskModal-DU5wZT8H.js → AgentTaskModal-C96nUrdb.js} +1 -1
  23. package/dist/assets/{AgentTemplateList-DJSTTDMS.js → AgentTemplateList-DlKxNckf.js} +1 -1
  24. package/dist/assets/AgentTestButton-TycwqSoI.js +3 -0
  25. package/dist/assets/{AgentToolConfigModal-ByowwZUI.js → AgentToolConfigModal-DBg-f0sN.js} +1 -1
  26. package/dist/assets/AgentToolConfigTitleIcon-Dd8BeaWa.js +1 -0
  27. package/dist/assets/{AgentToolsConnectionModalWrapper-D9gIK111.js → AgentToolsConnectionModalWrapper-kRq5hCsH.js} +1 -1
  28. package/dist/assets/{AgentUnpublishedWorkflowsModal-B0Z7JBkY.js → AgentUnpublishedWorkflowsModal-Dz1f-hpj.js} +1 -1
  29. package/dist/assets/AgentVectorStoresModal-Bbf-nJC6.js +1 -0
  30. package/dist/assets/{AgentVersionMetadataModal-uk8ueJn4.js → AgentVersionMetadataModal-qFYkb8dt.js} +1 -1
  31. package/dist/assets/{AgentView-BfA4ecUA.js → AgentView-CDR0Lz60.js} +1 -1
  32. package/dist/assets/AgentsListView-pdlUtrMi.js +1 -0
  33. package/dist/assets/{AnimatedSpinner-BMq0G8sM.js → AnimatedSpinner-Wj5FxnVj.js} +1 -1
  34. package/dist/assets/{AnnotationTagsDropdown.ee-09Peh3XB.js → AnnotationTagsDropdown.ee-BHoV4Wgq.js} +1 -1
  35. package/dist/assets/AppActions-B7gDVkS9.js +1 -0
  36. package/dist/assets/{AppDetailView-BJfUwazc.js → AppDetailView-BqO0V-BQ.js} +1 -1
  37. package/dist/assets/AppSidebar-Bwm_GTTg.js +1 -0
  38. package/dist/assets/AppView-DyzcHE5a.js +1 -0
  39. package/dist/assets/{AppView-PmPHfWec.js → AppView-HkibKrxj.js} +1 -1
  40. package/dist/assets/ApprovalCard-CdoRshOl.js +1 -0
  41. package/dist/assets/{AppsListView-ZCtZ_vg7.js → AppsListView-Q18RMDhW.js} +1 -1
  42. package/dist/assets/{AssistantConfirmationCard-Dl-CAccl.js → AssistantConfirmationCard-FQKuwIWb.js} +1 -1
  43. package/dist/assets/{AssistantInstanceContextHostEvent-gWrx33sx.js → AssistantInstanceContextHostEvent-DA6mYOgq.js} +1 -1
  44. package/dist/assets/{AssistantStatusHostEvent-qjQLYO7A.js → AssistantStatusHostEvent-C2mWjHep.js} +1 -1
  45. package/dist/assets/AuthLayout-DbL2RM_j.js +1 -0
  46. package/dist/assets/{AuthView-DKrl6D5p.js → AuthView-CB6lh_WH.js} +1 -1
  47. package/dist/assets/AuthenticationBackLink-5fdCPDgA.js +1 -0
  48. package/dist/assets/{BrowserUseSetupContent-Dw23Mq5C.js → BrowserUseSetupContent-DRnoDWWb.js} +1 -1
  49. package/dist/assets/{BrowserUseSetupModal-BOLoqiav.js → BrowserUseSetupModal-mZJuvp7J.js} +1 -1
  50. package/dist/assets/ChangePasswordModal-QAbTOIiW.js +1 -0
  51. package/dist/assets/{ChangePasswordView-rOweqlHj.js → ChangePasswordView-Bx1VAO1c.js} +1 -1
  52. package/dist/assets/{ChatAgentAvatar-CENR6pPu.js → ChatAgentAvatar-PXBHYEMY.js} +1 -1
  53. package/dist/assets/{ChatAgentSearchSort-bnlXyxRw.js → ChatAgentSearchSort-CExSG9sS.js} +1 -1
  54. package/dist/assets/{ChatFile-SkwJIHUn.js → ChatFile-BAyidZul.js} +1 -1
  55. package/dist/assets/{ChatGreetings-Dv7TlZtg.js → ChatGreetings-BOZpURPe.js} +2 -2
  56. package/dist/assets/ChatHistoryDropdownTrigger-CfhNSTaj.js +1 -0
  57. package/dist/assets/ChatLayout-C_lSkS_h.js +1 -0
  58. package/dist/assets/{ChatLayout-BcWhzg40.js → ChatLayout-DKz5blbF.js} +1 -1
  59. package/dist/assets/ChatMarkdownChunk-Cfn6VoDd.js +269 -0
  60. package/dist/assets/{ChatPersonalAgentsView-BBau8RhF.js → ChatPersonalAgentsView-D82mKu7Y.js} +1 -1
  61. package/dist/assets/ChatView-poH_1fhk.js +1 -0
  62. package/dist/assets/{ChatWorkflowAgentsView-d43ZjMtE.js → ChatWorkflowAgentsView-CLJvtfmt.js} +1 -1
  63. package/dist/assets/{CollectionParameter-DI8KQItm.js → CollectionParameter-DeqKA9Q9.js} +1 -1
  64. package/dist/assets/CompareCollectionView-jO3EmmMK.js +1 -0
  65. package/dist/assets/{ConfirmEmailChangeView-BHIVbclI.js → ConfirmEmailChangeView-CVal8ciw.js} +1 -1
  66. package/dist/assets/{ConfirmPasswordModal-GrefR2cw.js → ConfirmPasswordModal-pyXXag-o.js} +1 -1
  67. package/dist/assets/{ConnectionTracker-CYI6sdI9.js → ConnectionTracker-BWWUj0-M.js} +1 -1
  68. package/dist/assets/{CredentialSelectorModal-Cbma9zg8.js → CredentialSelectorModal-DnNJYdGB.js} +1 -1
  69. package/dist/assets/CredentialsView-DE2SBMBJ.js +1 -0
  70. package/dist/assets/{DataTableActions-QnderhWV.js → DataTableActions-DObiwNfR.js} +1 -1
  71. package/dist/assets/{DataTableDetailsView-BwBa9sW0.js → DataTableDetailsView-6Fytymn8.js} +1 -1
  72. package/dist/assets/{DataTableTable-woyOV53t.js → DataTableTable-byjngUEZ.js} +2 -2
  73. package/dist/assets/DataTableView-Dfl8bFD6.js +1 -0
  74. package/dist/assets/DefaultLayout-Dhx-7udN.js +1 -0
  75. package/dist/assets/{DeleteInstanceRoleModal-BZIypZkd.js → DeleteInstanceRoleModal-DLF4MUNb.js} +1 -1
  76. package/dist/assets/{DemoDiffView-Ro9aFADK.js → DemoDiffView-CH134bRE.js} +1 -1
  77. package/dist/assets/{DemoLayout-D0g9hQIq.js → DemoLayout-Bq_RQxQx.js} +1 -1
  78. package/dist/assets/{DependencyPill-DEA8QdXf.js → DependencyPill-DZvpESxc.js} +1 -1
  79. package/dist/assets/{EmptySharedSectionActionBox-bnvHTIj5.js → EmptySharedSectionActionBox-B65MXw5S.js} +1 -1
  80. package/dist/assets/{EntityNotFound-CUqj1YaU.js → EntityNotFound-DKz9dZV5.js} +1 -1
  81. package/dist/assets/{EntityUnAuthorised-DjoSjJrp.js → EntityUnAuthorised-C_J78fif.js} +1 -1
  82. package/dist/assets/ErrorView-DexTZ8I9.js +1 -0
  83. package/dist/assets/EvalCollectionsListView-CDpubK0-.js +1 -0
  84. package/dist/assets/EvaluationsListSwitcher-B-vMp6Ao.js +2 -0
  85. package/dist/assets/EvaluationsPaywall-Cakvb95d.js +1 -0
  86. package/dist/assets/EvaluationsRootView-CmyoCoR2.js +9 -0
  87. package/dist/assets/{EventDestinationSettingsModalAdapter-PNZboNne.js → EventDestinationSettingsModalAdapter-DcU7i2_o.js} +1 -1
  88. package/dist/assets/ExecutionsTime-SJ_ibX5_.js +2 -0
  89. package/dist/assets/ExecutionsView-C3LvUe5Y.js +1 -0
  90. package/dist/assets/{ExposeAllWorkflowsToMcpModal-jyHIfNcr.js → ExposeAllWorkflowsToMcpModal-CW7hZSJB.js} +1 -1
  91. package/dist/assets/FixedCollectionParameter-CUxEH8Ke.js +1 -0
  92. package/dist/assets/{FolderBreadcrumbs-DqDkyLbf.js → FolderBreadcrumbs-BsjDaOM5.js} +1 -1
  93. package/dist/assets/{ForgotMyPasswordView-DbizkxpS.js → ForgotMyPasswordView-De4JS7ds.js} +1 -1
  94. package/dist/assets/{GroupedMetricChart-CjVVwoLc.js → GroupedMetricChart-giclR_nP.js} +1 -1
  95. package/dist/assets/ImpactTag-CWh_Xe1Q.js +1 -0
  96. package/dist/assets/{InboxView-wGud9wN-.js → InboxView-D2MNmlx9.js} +1 -1
  97. package/dist/assets/{InsightsChartAverageRuntime-DQWErGXc.js → InsightsChartAverageRuntime-Dsk7OxTp.js} +1 -1
  98. package/dist/assets/{InsightsChartFailed-YerwlFC5.js → InsightsChartFailed-BumVbNOL.js} +1 -1
  99. package/dist/assets/{InsightsChartFailureRate-Dx_DK4Jm.js → InsightsChartFailureRate-CwXYXyZO.js} +1 -1
  100. package/dist/assets/{InsightsChartTimeSaved-CTZIhpps.js → InsightsChartTimeSaved-xadgm9r8.js} +1 -1
  101. package/dist/assets/{InsightsChartTotal-BTf_J_jr.js → InsightsChartTotal-TEbnOGwS.js} +1 -1
  102. package/dist/assets/InsightsDashboard-c6ggEK4y.js +2 -0
  103. package/dist/assets/InsightsPaywall-CYLvDjuK.js +1 -0
  104. package/dist/assets/{InsightsSummary-BQXXgWAu.js → InsightsSummary-B6VQW6B4.js} +1 -1
  105. package/dist/assets/{InsightsSummarySlot-CanHo8KJ.js → InsightsSummarySlot-DfWHMtaH.js} +1 -1
  106. package/dist/assets/{InsightsTableWorkflows-0S4TyIPY.js → InsightsTableWorkflows-BkzWt1An.js} +2 -2
  107. package/dist/assets/InstanceAiEmptyView-BMwUxbLD.js +1 -0
  108. package/dist/assets/{InstanceAiLayout-B8xbL5Hq.js → InstanceAiLayout-WJvMiMJE.js} +1 -1
  109. package/dist/assets/{InstanceAiThreadRouteView-Dd9iUkig.js → InstanceAiThreadRouteView-BqI7nAYe.js} +2 -2
  110. package/dist/assets/InstanceAiThreadsView-DvANbzf5.js +1 -0
  111. package/dist/assets/{InstanceAiToolsConnectionModalWrapper-UDX2yjIO.js → InstanceAiToolsConnectionModalWrapper-i6Vy29pL.js} +1 -1
  112. package/dist/assets/{InstanceAiView-D36VbMSi.js → InstanceAiView-CeFMUrnV.js} +1 -1
  113. package/dist/assets/InstanceAiWorkflowSetup-ie-6RnBk.js +7 -0
  114. package/dist/assets/InstanceRoleView-CreYirKs.js +1 -0
  115. package/dist/assets/LimitedModeNotice-Cvlwbuoi.js +1 -0
  116. package/dist/assets/LogStreamingPaywall-DHVJOtNF.js +1 -0
  117. package/dist/assets/LogStreamingPlaceholderView-gdAcQ-4X.js +1 -0
  118. package/dist/assets/{MCPOnboardingModal-BX0nDCt_.js → MCPOnboardingModal-5_WG5Lxd.js} +1 -1
  119. package/dist/assets/MainHeader-CIYaM_fy.js +1 -0
  120. package/dist/assets/{MainSidebarHeader-Cn79m6e3.js → MainSidebarHeader-DuEu7GpW.js} +1 -1
  121. package/dist/assets/{McpJsonNudgeModal-CRvsOA9H.js → McpJsonNudgeModal-BviS8khk.js} +1 -1
  122. package/dist/assets/{McpRegistrySuggestionFooter-B6XrrKYM.js → McpRegistrySuggestionFooter-C06WHjQo.js} +1 -1
  123. package/dist/assets/{McpToolPermissionsEditor-dbu_Z8DH.js → McpToolPermissionsEditor-D-bTt4rc.js} +1 -1
  124. package/dist/assets/MfaSetupModal-CdiBbDsO.js +3 -0
  125. package/dist/assets/MigrationRuleDetail-B1lT4VTA.js +1 -0
  126. package/dist/assets/MigrationRuleDetail-CiBa58YY.css +1 -0
  127. package/dist/assets/MigrationRules-CeESiMeu.js +1 -0
  128. package/dist/assets/ModelByIdSelectorModal-D1q4WUjR.js +1 -0
  129. package/dist/assets/{N8nChatAgentGrid-DdG_jKaK.js → N8nChatAgentGrid-DtI7ssFf.js} +1 -1
  130. package/dist/assets/{N8nChatAgentLibraryView-CzPmzaEg.js → N8nChatAgentLibraryView-C6CWEqvg.js} +1 -1
  131. package/dist/assets/{N8nChatHintPopover-CJKyDNLT.js → N8nChatHintPopover-4qGWMEHu.js} +1 -1
  132. package/dist/assets/{N8nChatPageLayout-Bf5rvZq0.js → N8nChatPageLayout-QqWj_ltk.js} +1 -1
  133. package/dist/assets/NodeCreation-DMAGP-_l.js +2 -0
  134. package/dist/assets/NodeCreator-B2G00jdv.js +1 -0
  135. package/dist/assets/NodeDetailsView-C6GPn3iS.js +1 -0
  136. package/dist/assets/{NodeToolSettingsContent-Bebu98iR.js → NodeToolSettingsContent-Dvz7C5jh.js} +1 -1
  137. package/dist/assets/NodeView-BL3ixHHB.js +2 -0
  138. package/dist/assets/{NodeView-CTeBe8Fp.js → NodeView-BdL9pi7g.js} +1 -1
  139. package/dist/assets/OAuthConsentView-C_DtMHXd.js +1 -0
  140. package/dist/assets/{PageViewLayout-Bjq7pA0N.js → PageViewLayout-5rHXVB5X.js} +1 -1
  141. package/dist/assets/{PersonalSelfHealingView-CMTjzRhY.js → PersonalSelfHealingView-BwPythvJ.js} +1 -1
  142. package/dist/assets/{ProjectBreadcrumb-CU7sYI-s.js → ProjectBreadcrumb-C_rg6lxr.js} +1 -1
  143. package/dist/assets/{ProjectFilter-bQzEdchO.js → ProjectFilter-CLLzw6UE.js} +1 -1
  144. package/dist/assets/ProjectHeader-CZTYDLA_.js +1 -0
  145. package/dist/assets/{ProjectHeader-CrOjpxeF.js → ProjectHeader-DDLFpi0U.js} +1 -1
  146. package/dist/assets/ProjectRoleView-zTewSHJf.js +1 -0
  147. package/dist/assets/ProjectSettings-D1Yuk4tE.js +1 -0
  148. package/dist/assets/{ProjectVariables-J7dodLCL.js → ProjectVariables-D7ad_3Bw.js} +1 -1
  149. package/dist/assets/{PromotionCommitMessageField-pB63iYQs.js → PromotionCommitMessageField-BzY9ixHf.js} +1 -1
  150. package/dist/assets/PromotionEnvironmentView-B2Dy_Vjz.js +1 -0
  151. package/dist/assets/PromotionPreviewView-CGf8O96n.js +1 -0
  152. package/dist/assets/{PromotionResourceTree-F1CM8kOK.js → PromotionResourceTree-BHjL3RPm.js} +2 -2
  153. package/dist/assets/PromotionReviewChanges-BYytLEmR.js +1 -0
  154. package/dist/assets/{PromotionWorkflowDiff-BPxc0WlI.js → PromotionWorkflowDiff-DhzCVL61.js} +1 -1
  155. package/dist/assets/{PromotionWorkflowSideLabel-Dy4wcytn.js → PromotionWorkflowSideLabel-CQ0d9QLW.js} +1 -1
  156. package/dist/assets/PromotionsSettingsView-DncdE9n9.js +1 -0
  157. package/dist/assets/{PromptMfaCodeModal-GDI4wrPG.js → PromptMfaCodeModal-Cxo_-ro3.js} +1 -1
  158. package/dist/assets/{ProviderSettingsModal-Caba2V4X.js → ProviderSettingsModal-CXoEL4LB.js} +1 -1
  159. package/dist/assets/{PublicationIndicator-CsyzV4f4.js → PublicationIndicator-C1XkcRWi.js} +1 -1
  160. package/dist/assets/{RecentChatIcon-BWEklH_l.js → RecentChatIcon-CN-LZPea.js} +1 -1
  161. package/dist/assets/{ResolversView-By--Q6Sz.js → ResolversView-CnEP8bUr.js} +1 -1
  162. package/dist/assets/ResourceCenterView-BScoAQ9b.js +1 -0
  163. package/dist/assets/{ResourceFiltersDropdown-DG_51Q69.js → ResourceFiltersDropdown-C7xWmdIb.js} +1 -1
  164. package/dist/assets/{ResourcesListEmptyState-Cg2DQUgI.js → ResourcesListEmptyState-FqY4_jTf.js} +1 -1
  165. package/dist/assets/{ResourcesListLayout-CU6Sl1zA.js → ResourcesListLayout-B6lWH0PK.js} +1 -1
  166. package/dist/assets/{ResourcesListLayout--eO1jcf6.js → ResourcesListLayout-MGElancP.js} +1 -1
  167. package/dist/assets/{ResourcesListSkeleton-B-G1oGq_.js → ResourcesListSkeleton-CLd6-ohk.js} +1 -1
  168. package/dist/assets/{RoleSelectDropdown-DIyww12p.js → RoleSelectDropdown-DwL7CBAO.js} +1 -1
  169. package/dist/assets/{RolesView-D4DAfZdC.js → RolesView-DvV7FDuN.js} +1 -1
  170. package/dist/assets/{RunDataJson-DVuDCcQK.js → RunDataJson-BNDbY7eb.js} +2 -2
  171. package/dist/assets/{RunDataJsonActions-BPZQXHfw.js → RunDataJsonActions-jyRq3WAO.js} +2 -2
  172. package/dist/assets/{RunDataParsedAiContent-B39HoGRn.js → RunDataParsedAiContent-BhbLC0Xv.js} +1 -1
  173. package/dist/assets/{RunDataParsedAiContent-B-8b8Y3y.js → RunDataParsedAiContent-Di4OmeJu.js} +2 -2
  174. package/dist/assets/{RunDataSearch-DtT6ZgHB.js → RunDataSearch-AC2jc1i3.js} +1 -1
  175. package/dist/assets/RunDataTable-tEL3NrEN.js +1 -0
  176. package/dist/assets/{SamlOnboarding-B8eaKPwV.js → SamlOnboarding-Bos-_Nye.js} +1 -1
  177. package/dist/assets/{SandboxSettingsRow-BDKvwPaK.js → SandboxSettingsRow-BUfQh3vi.js} +1 -1
  178. package/dist/assets/SecuritySettings-DDeAioeF.js +1 -0
  179. package/dist/assets/{SecuritySettings-DRYU-5YI.css → SecuritySettings-XvjNnprU.css} +1 -1
  180. package/dist/assets/{SettingsAIView-2nVq2Hy7.js → SettingsAIView-z0sbndJn.js} +1 -1
  181. package/dist/assets/SettingsAgentsView-DUvvadSD.js +1 -0
  182. package/dist/assets/{SettingsAiGatewayView-rOnq3fVk.js → SettingsAiGatewayView-BwXm5t0N.js} +1 -1
  183. package/dist/assets/SettingsApiView-Dj2UqUy0.js +1 -0
  184. package/dist/assets/SettingsAuthenticationView-Ds8xS7Ru.js +1 -0
  185. package/dist/assets/SettingsChatHubView-J_yVXM6j.js +1 -0
  186. package/dist/assets/{SettingsCommunityNodesView-DggzIvT3.js → SettingsCommunityNodesView-BkVESnDY.js} +1 -1
  187. package/dist/assets/SettingsContextView-DoH9K7pg.js +1 -0
  188. package/dist/assets/{SettingsEncryptionKeys-BmMajRAd.js → SettingsEncryptionKeys-B0aJrymn.js} +1 -1
  189. package/dist/assets/{SettingsExternalSecrets-B_DHKIxI.js → SettingsExternalSecrets-GYkFA7e8.js} +1 -1
  190. package/dist/assets/SettingsInstanceAiView-BDegPLou.js +1 -0
  191. package/dist/assets/{SettingsLayout-DGrDZtNe.js → SettingsLayout-CURB_A_m.js} +1 -1
  192. package/dist/assets/{SettingsLdapView-CG7NthsW.js → SettingsLdapView-BZX6V3Ta.js} +2 -2
  193. package/dist/assets/SettingsLogStreamingView-CdrafS4r.js +1 -0
  194. package/dist/assets/SettingsMCPAgentsView-Bf-RDx-t.js +1 -0
  195. package/dist/assets/SettingsMCPClientsView-BFtnW7j_.js +1 -0
  196. package/dist/assets/SettingsMCPView-_kDB9Gjx.js +11 -0
  197. package/dist/assets/SettingsMCPWorkflowsView-BBJisgv4.js +1 -0
  198. package/dist/assets/SettingsOpenTelemetryView-PxKzsjuB.js +1 -0
  199. package/dist/assets/SettingsPersonalView-DRQMk0U8.js +1 -0
  200. package/dist/assets/SettingsPreferencesView-DrFSUjZ-.js +1 -0
  201. package/dist/assets/SettingsSecretsProviders.ee--6-Q6S1h.js +1 -0
  202. package/dist/assets/SettingsSkillsView-BjQHSttp.js +1 -0
  203. package/dist/assets/SettingsSourceControl-BLsHpSMd.js +1 -0
  204. package/dist/assets/SettingsSso-BUnSWbRj.js +3 -0
  205. package/dist/assets/{SettingsUsageAndPlan-BoZGSnKT.js → SettingsUsageAndPlan-BUlid_h2.js} +1 -1
  206. package/dist/assets/SettingsUsersView-CNN0PLXp.js +1 -0
  207. package/dist/assets/{SetupView-gR3G68f1.js → SetupView-BiUUDU5g.js} +1 -1
  208. package/dist/assets/{SetupWorkflowCredentialsButton-DFCr_Cor.js → SetupWorkflowCredentialsButton-BBuohxUS.js} +1 -1
  209. package/dist/assets/{SetupWorkflowFromTemplateView-DaFaiWIZ.js → SetupWorkflowFromTemplateView-osSph2m5.js} +1 -1
  210. package/dist/assets/{SigninView-DfvRV0V_.js → SigninView-BpkPKIOL.js} +1 -1
  211. package/dist/assets/SignoutView-CXVZ_LaQ.js +1 -0
  212. package/dist/assets/{SignupView-hYxubEZB.js → SignupView-DTSjIeop.js} +1 -1
  213. package/dist/assets/{SkeletonAgentCard-DNA8-kRA.js → SkeletonAgentCard-D1XzogIn.js} +1 -1
  214. package/dist/assets/{SkillScopeBadge-Be1z1y8k.js → SkillScopeBadge-CKsb6PIP.js} +1 -1
  215. package/dist/assets/{TemplateList-B3Q2mGBV.js → TemplateList-CuOiWrQN.js} +1 -1
  216. package/dist/assets/TemplatesCollectionView-CmgW71NK.js +1 -0
  217. package/dist/assets/{TemplatesSearchView-DdeYBaw1.js → TemplatesSearchView-cFjypMQb.js} +1 -1
  218. package/dist/assets/{TemplatesView-Digb2l4S.js → TemplatesView-cdbBrxt4.js} +1 -1
  219. package/dist/assets/{TemplatesWorkflowView-CVdui8q5.js → TemplatesWorkflowView-BVpsHOaH.js} +1 -1
  220. package/dist/assets/TestRunDetailView-VQ6tqHGa.js +1 -0
  221. package/dist/assets/ToolCredentialPicker-NGIvQBhO.js +1 -0
  222. package/dist/assets/{ToolIcon-C56l462Q.js → ToolIcon-D2mPGe0n.js} +1 -1
  223. package/dist/assets/{ToolSettingsModal-3T8-XGGI.js → ToolSettingsModal-Ca4hafbe.js} +1 -1
  224. package/dist/assets/ToolsConnectionModal-CPvv__v4.js +1 -0
  225. package/dist/assets/ToolsManagerModal-DUjWUH8m.js +1 -0
  226. package/dist/assets/{ToolsSelector-j76UahX1.js → ToolsSelector-BBXeprdE.js} +1 -1
  227. package/dist/assets/TrialIntroModal-DEri1Jv7.js +1 -0
  228. package/dist/assets/{VirtualSchema-BIJAaZiu.js → VirtualSchema-DrrT8IPB.js} +1 -1
  229. package/dist/assets/{WorkerView-CxlzObZR.js → WorkerView-BZ_2cbSc.js} +1 -1
  230. package/dist/assets/{WorkflowDiffSlot-Gq8eSWLk.js → WorkflowDiffSlot-qMQ0cjBQ.js} +1 -1
  231. package/dist/assets/{WorkflowExecutionsInfoAccordion-k81A9SRn.js → WorkflowExecutionsInfoAccordion-DIT_74Gy.js} +1 -1
  232. package/dist/assets/{WorkflowExecutionsLandingPage-DbKXS8zS.js → WorkflowExecutionsLandingPage-BNIYwc9W.js} +1 -1
  233. package/dist/assets/WorkflowExecutionsPreview-JkROu2Nn.js +1 -0
  234. package/dist/assets/WorkflowExecutionsView-PRcgq5Sh.js +1 -0
  235. package/dist/assets/WorkflowHistory-DJi0ZxCc.js +1 -0
  236. package/dist/assets/WorkflowLayout-DU2e20_t.js +1 -0
  237. package/dist/assets/{WorkflowOnboardingView-DKLbwpoF.js → WorkflowOnboardingView-BSn_mzPi.js} +1 -1
  238. package/dist/assets/{WorkflowPreviewHost-B4ZMWBJM.js → WorkflowPreviewHost-BYknAQKL.js} +1 -1
  239. package/dist/assets/WorkflowsView-ND6ZHDwm.js +1 -0
  240. package/dist/assets/{aiTemplatesStarterCollection.store-CGyHElvp.js → aiTemplatesStarterCollection.store-C15OQRVs.js} +2 -2
  241. package/dist/assets/{app-DPqAJq5O.js → app-CLvVIuPO.js} +128 -121
  242. package/dist/assets/assistantHostEvents-e0dZNXZ8.js +2 -0
  243. package/dist/assets/auth.eventBus-D0oP-5b1.js +1 -0
  244. package/dist/assets/{context.store-BvYkb7nc.js → context.store-BWIF876p.js} +1 -1
  245. package/dist/assets/{dist-CmA7z25w.js → dist-ojUZEtMf.js} +1 -1
  246. package/dist/assets/en-BeKUJ_yy.js +1 -0
  247. package/dist/assets/expression-runtime-stub-BymapCgz.js +1 -0
  248. package/dist/assets/{index-cIz6wDOk.js → index-CbOEVYee.js} +1 -1
  249. package/dist/assets/{insights.store-aPClW7cL.js → insights.store-Bmw76IMX.js} +1 -1
  250. package/dist/assets/{insights.store-Cei7J7i5.js → insights.store-Rhank1FX.js} +1 -1
  251. package/dist/assets/{insights.utils-HTAuktGM.js → insights.utils-C2hlZlaD.js} +1 -1
  252. package/dist/assets/{instanceAi.store-C40M-zaz.js → instanceAi.store-Ce3ZAABb.js} +1 -1
  253. package/dist/assets/{instanceAiMcp.store-s3gRvVQc.js → instanceAiMcp.store-Ihq50EN5.js} +1 -1
  254. package/dist/assets/{instanceAiMcp.store-Zc_uSTAy.js → instanceAiMcp.store-usVmlMk8.js} +1 -1
  255. package/dist/assets/{instanceAiSetup.telemetry-s0R5UpV-.js → instanceAiSetup.telemetry-DXyY2RI-.js} +1 -1
  256. package/dist/assets/{instanceContextLabels-DJAQKj2P.js → instanceContextLabels-BqvWdK49.js} +1 -1
  257. package/dist/assets/{instanceRoleScopes-CZbpZnzd.js → instanceRoleScopes-D7n3FqKk.js} +1 -1
  258. package/dist/assets/{logStreaming.store-CELdqzmv.js → logStreaming.store-C3CMaDDY.js} +1 -1
  259. package/dist/assets/{mcpRegistry.api-B9OpSDS8.js → mcpRegistry.api-Dwb7ClxM.js} +1 -1
  260. package/dist/assets/{mergeRecentChats-BDLrB6Eb.js → mergeRecentChats-CdGPb3Bk.js} +1 -1
  261. package/dist/assets/{postMessageUtils-D0xnpMUz.js → postMessageUtils-llF-KX3d.js} +1 -1
  262. package/dist/assets/{projectRoleScopes-p0oN7HRx.js → projectRoleScopes-C40KAU7_.js} +1 -1
  263. package/dist/assets/{projects.utils-DvIjTyfM.js → projects.utils-B5IzlkBW.js} +1 -1
  264. package/dist/assets/{promotionPreview.selection-CORXOPIH.js → promotionPreview.selection-BxlHMm53.js} +1 -1
  265. package/dist/assets/promotions.eventBus-DfWAea55.js +1 -0
  266. package/dist/assets/{promotionsSettings.utils-CnIJ-smj.js → promotionsSettings.utils-CoBhbcD6.js} +1 -1
  267. package/dist/assets/{pushConnection.store-BZ3QN_Cm.js → pushConnection.store-CsTEBgGu.js} +1 -1
  268. package/dist/assets/{readyToRun.store-ExqgCvnN.js → readyToRun.store-CfVDAPWC.js} +3 -3
  269. package/dist/assets/{readyToRunWorkflows.store-B4WQfj0m.js → readyToRunWorkflows.store-CXY4wfcW.js} +2 -2
  270. package/dist/assets/{resourceCenter.store-CvH2s1zN.js → resourceCenter.store-ao-pxhzH.js} +1 -1
  271. package/dist/assets/{runtime.iife-C4JMTNJZ.js → runtime.iife-C6ic5H2m.js} +17 -17
  272. package/dist/assets/settings.store-BI9OPoFX.js +1 -0
  273. package/dist/assets/{skills.store-kRJIY8JV.js → skills.store-6CczU2-_.js} +1 -1
  274. package/dist/assets/src-Bch8n3fE.js +1 -0
  275. package/dist/assets/{src-BZowssLG.js → src-CI23y8En.js} +1 -1
  276. package/dist/assets/{src-BJYAK6tJ.js → src-C_ecaZjZ.js} +1 -1
  277. package/dist/assets/{src-DVIIyO35.js → src-CzhGooCU.js} +1 -1
  278. package/dist/assets/{surfaceMcpToNewCloudUsers.store-D_B8K6tJ.js → surfaceMcpToNewCloudUsers.store-DjD1l-Dr.js} +1 -1
  279. package/dist/assets/templateActions-rJJA0m1h.js +1 -0
  280. package/dist/assets/{typescript.worker-KKrbtmBS.js → typescript.worker-5-fnKsjq.js} +104 -104
  281. package/dist/assets/{useActivityDetection-FXk3yTgP.js → useActivityDetection-DQ99p5uQ.js} +1 -1
  282. package/dist/assets/useAgentConfirmationModal-U0vSIqsQ.js +1 -0
  283. package/dist/assets/{useAgentSessionStop-BPJAgAaY.js → useAgentSessionStop-DSGq8l3_.js} +1 -1
  284. package/dist/assets/{useAgentSessionUsage-CtVDoq3i.js → useAgentSessionUsage-C-gxnhN9.js} +1 -1
  285. package/dist/assets/{useApprovalCardLabels-D32FeshG.js → useApprovalCardLabels-Bh1oHZas.js} +1 -1
  286. package/dist/assets/{useBrowserUseConnection-CdOAdTVW.js → useBrowserUseConnection-PWS2HK9i.js} +1 -1
  287. package/dist/assets/{useBuilderStreamingGuard-B7ep2FJm.js → useBuilderStreamingGuard-C-2NJVSu.js} +1 -1
  288. package/dist/assets/{useCustomAgent-BuDQGUpY.js → useCustomAgent-CgFDXGE1.js} +1 -1
  289. package/dist/assets/{useDependencyMenu-D0CDja0D.js → useDependencyMenu-BXsP6W0n.js} +1 -1
  290. package/dist/assets/{useEnvironmentsVersionSwitch-SDITJd10.js → useEnvironmentsVersionSwitch-BbHiY1Ix.js} +1 -1
  291. package/dist/assets/useEvalCollectionsFlag-aGivd5O6.js +1 -0
  292. package/dist/assets/{useEvaluationsLicense-iyrjjpcN.js → useEvaluationsLicense-DUsbma-v.js} +1 -1
  293. package/dist/assets/{useExecutionData-Bczj9lya.js → useExecutionData-BYXEMbHs.js} +1 -1
  294. package/dist/assets/useExecutionDebugging-CzQ-hI1X.js +2 -0
  295. package/dist/assets/{useExposeAllWorkflowsToMcpOffer-xIEqoYRI.js → useExposeAllWorkflowsToMcpOffer-B3nc1VJL.js} +1 -1
  296. package/dist/assets/{useExtensionDirectConnect-CiQ3jkrO.js → useExtensionDirectConnect-CUl3yxOs.js} +1 -1
  297. package/dist/assets/{useFileDrop-BJWB_qcn.js → useFileDrop-g9903bbF.js} +1 -1
  298. package/dist/assets/{useImportCurlCommand-C3rlxi_Q.js → useImportCurlCommand-CylGGW8W.js} +1 -1
  299. package/dist/assets/useInstanceAiConfiguration-6XPHQZPX.js +1 -0
  300. package/dist/assets/{useInstancePromotionConnection-8BqQdpKN.js → useInstancePromotionConnection-qjY-ijYq.js} +1 -1
  301. package/dist/assets/useIsAssistantAtMentionsEnabled-C_F_2sJH.js +1 -0
  302. package/dist/assets/useLogsTreeExpand-chB-QJzg.js +1 -0
  303. package/dist/assets/{useMcpJsonNudgeEligibility-C3jI4UKz.js → useMcpJsonNudgeEligibility-DggtAmJq.js} +1 -1
  304. package/dist/assets/useMcpJsonNudgeTrigger-C8eNEQK7.js +1 -0
  305. package/dist/assets/{useMcpServerConnect-DNPtonyv.js → useMcpServerConnect-lZ0P9KlY.js} +1 -1
  306. package/dist/assets/useMergedChatHistory-BCQIvDw6.js +1 -0
  307. package/dist/assets/{useN8nAssistantIdentity-C8S2Hcxe.js → useN8nAssistantIdentity-_euJz5PM.js} +1 -1
  308. package/dist/assets/{useOAuthClientRevoke-CF4mMIs2.js → useOAuthClientRevoke-jquidROz.js} +1 -1
  309. package/dist/assets/{usePagedN8nChatThreads-DFxVAXKU.js → usePagedN8nChatThreads-C4cYaiSy.js} +1 -1
  310. package/dist/assets/{usePostMessageHandler-BQAKWyYM.js → usePostMessageHandler-DqJ12KGa.js} +2 -2
  311. package/dist/assets/{useProjectPages-Dz-_d14R.js → useProjectPages-CfLYdKxz.js} +1 -1
  312. package/dist/assets/usePromotionCheckout-DbkQq0Qq.js +1 -0
  313. package/dist/assets/{usePromotionPreviewLabels-D74QL635.js → usePromotionPreviewLabels-DXD1Bzfg.js} +1 -1
  314. package/dist/assets/usePushConnection-BubKc9RV.js +1 -0
  315. package/dist/assets/{usePushConnection-BzBLk9KA.js → usePushConnection-D1OcKMSN.js} +1 -1
  316. package/dist/assets/{useRoleEditorForm-D3p756JK.js → useRoleEditorForm-BVwK09FC.js} +1 -1
  317. package/dist/assets/{useSecretsProvidersList.ee-Cvmf5nbI.js → useSecretsProvidersList.ee-DPEV4CCc.js} +1 -1
  318. package/dist/assets/{useSettingsItems-DgvZGa-V.js → useSettingsItems-DZrYlCiW.js} +1 -1
  319. package/dist/assets/{useSidebarLayout-D9v28sy4.js → useSidebarLayout-Buyyh3d4.js} +1 -1
  320. package/dist/assets/{useUserHelpers-CK5dwxES.js → useUserHelpers-BpEFBT7Y.js} +1 -1
  321. package/dist/assets/{useWorkflowEvaluationState-CYfxC__x.js → useWorkflowEvaluationState-DgExW_PM.js} +1 -1
  322. package/dist/assets/useWorkflowInitialization-CvA7DpPQ.js +1 -0
  323. package/dist/assets/{useWorkflowReviewsFeature-CvmtRRMi.js → useWorkflowReviewsFeature-DK4tpAqw.js} +1 -1
  324. package/dist/assets/useWorkflowsEmptyState-CpOXv1UF.js +1 -0
  325. package/dist/assets/{userRoleProvisioning.store-C8Lx7_oM.js → userRoleProvisioning.store-wcWFW7Jw.js} +1 -1
  326. package/dist/assets/{utils-DOtFBWH5.js → utils-DlaXP-0l.js} +1 -1
  327. package/dist/assets/{vector-stores-BmfVCW2H.js → vector-stores-B9rRyBVa.js} +1 -1
  328. package/dist/assets/{worker-D3iMsyYx.js → worker-BvldJQtj.js} +2 -2
  329. package/dist/assets/{workers-BJtnLLLb.js → workers-0O-nPpyp.js} +1 -1
  330. package/dist/assets/{workflowDiff.utils-B6QsKODZ.js → workflowDiff.utils-BKb889AB.js} +1 -1
  331. package/dist/index.html +2 -2
  332. package/package.json +1 -1
  333. package/vite/expression-runtime-stub.test.ts +120 -0
  334. package/vite/expression-runtime-stub.ts +1 -0
  335. package/dist/assets/AgentBuilderView-ckzqXVha.js +0 -9
  336. package/dist/assets/AgentChatPanel-CgKjAvKt.js +0 -16
  337. package/dist/assets/AgentConfirmationModal-DQVQalnZ.js +0 -1
  338. package/dist/assets/AgentEditorModal-DVUZ997V.js +0 -1
  339. package/dist/assets/AgentN8nChatView-CWuDlxA8.js +0 -1
  340. package/dist/assets/AgentSessionTimelineView-DdJAFfA5.js +0 -2
  341. package/dist/assets/AgentSkillModal-Brvzs1tC.js +0 -5
  342. package/dist/assets/AgentTestButton-CLJaRUWu.js +0 -3
  343. package/dist/assets/AgentToolConfigTitleIcon-AsJiKKSP.js +0 -1
  344. package/dist/assets/AgentVectorStoresModal-CCEBWLr0.js +0 -1
  345. package/dist/assets/AgentsListView-C9BS8eK-.js +0 -1
  346. package/dist/assets/AppActions-D76SZMKu.js +0 -1
  347. package/dist/assets/AppSidebar-fUN2OBZL.js +0 -1
  348. package/dist/assets/AppView-Ww9KdVqr.js +0 -1
  349. package/dist/assets/ApprovalCard-DTWej5mC.js +0 -1
  350. package/dist/assets/AuthLayout-CdcW4FlM.js +0 -1
  351. package/dist/assets/AuthenticationBackLink-CEpDk6eY.js +0 -1
  352. package/dist/assets/ChangePasswordModal-ZdlaiHsb.js +0 -1
  353. package/dist/assets/ChatHistoryDropdownTrigger-rYggkJgZ.js +0 -1
  354. package/dist/assets/ChatLayout-gR2WVjAv.js +0 -1
  355. package/dist/assets/ChatMarkdownChunk-ClFpP1ds.js +0 -269
  356. package/dist/assets/ChatView-KkZtfFfu.js +0 -1
  357. package/dist/assets/CompareCollectionView-Diamlar4.js +0 -1
  358. package/dist/assets/CredentialsView-DZTWQdKi.js +0 -1
  359. package/dist/assets/DataTableView-DrsEUi-o.js +0 -1
  360. package/dist/assets/DefaultLayout-Bhcyzt4a.js +0 -1
  361. package/dist/assets/ErrorView-DC6rlb2K.js +0 -1
  362. package/dist/assets/EvalCollectionsListView-CMMJJ3Ri.js +0 -1
  363. package/dist/assets/EvaluationsListSwitcher-Cj0rbvF0.js +0 -2
  364. package/dist/assets/EvaluationsPaywall-6pY75vpc.js +0 -1
  365. package/dist/assets/EvaluationsRootView-DnRZWkYv.js +0 -9
  366. package/dist/assets/ExecutionsTime-CeMY67Py.js +0 -2
  367. package/dist/assets/ExecutionsView-C4_4BxTP.js +0 -1
  368. package/dist/assets/FixedCollectionParameter-Bsyl0zvR.js +0 -1
  369. package/dist/assets/ImpactTag-Bvg2E0Bl.js +0 -1
  370. package/dist/assets/InsightsDashboard-BHRsIsYn.js +0 -2
  371. package/dist/assets/InsightsPaywall-DOay3QNp.js +0 -1
  372. package/dist/assets/InstanceAiEmptyView-C_l7eZ-g.js +0 -1
  373. package/dist/assets/InstanceAiThreadsView-Ds5tIEE2.js +0 -1
  374. package/dist/assets/InstanceAiWorkflowSetup-3L6DeHHz.js +0 -7
  375. package/dist/assets/InstanceRoleView-Baz9C0j0.js +0 -1
  376. package/dist/assets/LimitedModeNotice-Cqio23gL.js +0 -1
  377. package/dist/assets/LogStreamingPaywall-CnkUrMlw.js +0 -1
  378. package/dist/assets/LogStreamingPlaceholderView-CSPU8eRz.js +0 -1
  379. package/dist/assets/MainHeader-BVqe6J4k.js +0 -1
  380. package/dist/assets/MfaSetupModal-ImazKLP8.js +0 -3
  381. package/dist/assets/MigrationRuleDetail-BQStadv9.js +0 -1
  382. package/dist/assets/MigrationRuleDetail-DajqhAB1.css +0 -1
  383. package/dist/assets/MigrationRules-0l4fNMXf.js +0 -1
  384. package/dist/assets/ModelByIdSelectorModal-DZBYjjWq.js +0 -1
  385. package/dist/assets/NodeCreation-CICqm2Ew.js +0 -2
  386. package/dist/assets/NodeCreator-BbJa8Tmd.js +0 -1
  387. package/dist/assets/NodeDetailsView-Cz6aqIqh.js +0 -1
  388. package/dist/assets/NodeView-DjnJBedV.js +0 -2
  389. package/dist/assets/OAuthConsentView-epsFfGjl.js +0 -1
  390. package/dist/assets/ProjectHeader-7oeF_blc.js +0 -1
  391. package/dist/assets/ProjectRoleView-C_yVF7Hk.js +0 -1
  392. package/dist/assets/ProjectSettings-DJW1DOBL.js +0 -1
  393. package/dist/assets/PromotionEnvironmentView-CMMb9C7M.js +0 -1
  394. package/dist/assets/PromotionPreviewView-3bx3CYA4.js +0 -1
  395. package/dist/assets/PromotionReviewChanges-DaBKwVKx.js +0 -1
  396. package/dist/assets/PromotionsSettingsView-ClENBmaZ.js +0 -1
  397. package/dist/assets/ResourceCenterView-VPyRvF4V.js +0 -1
  398. package/dist/assets/RunDataTable-4maiELP2.js +0 -1
  399. package/dist/assets/SecuritySettings-Cokym94X.js +0 -1
  400. package/dist/assets/SettingsAgentsView-Cu0FuReX.js +0 -1
  401. package/dist/assets/SettingsApiView-DRtjHQxQ.js +0 -1
  402. package/dist/assets/SettingsAuthenticationView-DUevtvCU.js +0 -1
  403. package/dist/assets/SettingsChatHubView-DqKq88xV.js +0 -1
  404. package/dist/assets/SettingsContextView-DNIX8rPb.js +0 -1
  405. package/dist/assets/SettingsInstanceAiView-BLGekB0o.js +0 -1
  406. package/dist/assets/SettingsLogStreamingView-B73ubzen.js +0 -1
  407. package/dist/assets/SettingsMCPAgentsView-92xU7P_k.js +0 -1
  408. package/dist/assets/SettingsMCPClientsView-drrCN3v_.js +0 -1
  409. package/dist/assets/SettingsMCPView-WWtO1W5E.js +0 -11
  410. package/dist/assets/SettingsMCPWorkflowsView-DW8e9ifE.js +0 -1
  411. package/dist/assets/SettingsOpenTelemetryView-Bqf3xGC7.js +0 -1
  412. package/dist/assets/SettingsPersonalView-ChRvZBVL.js +0 -1
  413. package/dist/assets/SettingsPreferencesView-BhEvu_BK.js +0 -1
  414. package/dist/assets/SettingsSecretsProviders.ee-D7k9zcyP.js +0 -1
  415. package/dist/assets/SettingsSkillsView-9xfAI09Q.js +0 -1
  416. package/dist/assets/SettingsSourceControl-C0ghXEct.js +0 -1
  417. package/dist/assets/SettingsSso-BvCnRRst.js +0 -3
  418. package/dist/assets/SettingsUsersView-BWjBAMog.js +0 -1
  419. package/dist/assets/SignoutView-CVmH10D6.js +0 -1
  420. package/dist/assets/TemplatesCollectionView-B299Apdx.js +0 -1
  421. package/dist/assets/TestRunDetailView-4wkcDvYs.js +0 -1
  422. package/dist/assets/ToolCredentialPicker-sM4op1eB.js +0 -1
  423. package/dist/assets/ToolsConnectionModal-Bo0mQoEI.js +0 -1
  424. package/dist/assets/ToolsManagerModal-BsVNAoS2.js +0 -1
  425. package/dist/assets/TrialIntroModal-CgMURrXI.js +0 -1
  426. package/dist/assets/WorkflowExecutionsPreview-yaMbbl2A.js +0 -1
  427. package/dist/assets/WorkflowExecutionsView-BfRF51m0.js +0 -1
  428. package/dist/assets/WorkflowHistory-z6KMITR5.js +0 -1
  429. package/dist/assets/WorkflowLayout-CZKrTCF9.js +0 -1
  430. package/dist/assets/WorkflowsView-C_YPyEt9.js +0 -1
  431. package/dist/assets/assistantHostEvents-DB21JZ-e.js +0 -2
  432. package/dist/assets/auth.eventBus-DjVw24wQ.js +0 -1
  433. package/dist/assets/en-CduO6jJe.js +0 -1
  434. package/dist/assets/expression-runtime-stub-CiR8mV0s.js +0 -1
  435. package/dist/assets/promotions.eventBus-CgrSAUjW.js +0 -1
  436. package/dist/assets/settings.store-BFleaWwS.js +0 -1
  437. package/dist/assets/src-BhFJRUVp.js +0 -1
  438. package/dist/assets/templateActions-CeKmnQVv.js +0 -1
  439. package/dist/assets/useAgentConfirmationModal-B3rCAAcE.js +0 -1
  440. package/dist/assets/useEvalCollectionsFlag-B0FjPdUA.js +0 -1
  441. package/dist/assets/useExecutionDebugging-CuzzBpJR.js +0 -2
  442. package/dist/assets/useInstanceAiConfiguration-BD5sA7i5.js +0 -1
  443. package/dist/assets/useIsAssistantAtMentionsEnabled-DrNuPBw-.js +0 -1
  444. package/dist/assets/useLogsTreeExpand-BwbyKyPR.js +0 -1
  445. package/dist/assets/useMcpJsonNudgeTrigger-CBn-oGMT.js +0 -1
  446. package/dist/assets/useMergedChatHistory-DO3At3XT.js +0 -1
  447. package/dist/assets/usePromotionCheckout-CHV9jYjv.js +0 -1
  448. package/dist/assets/usePushConnection-1aauoEKN.js +0 -1
  449. package/dist/assets/useWorkflowInitialization-CY9DrwSr.js +0 -1
  450. package/dist/assets/useWorkflowsEmptyState-1wuKurDa.js +0 -1
@@ -1 +1 @@
1
- try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`e2d75bd6-dc0e-416a-9c3c-47180c8d963b`,e._sentryDebugIdIdentifier=`sentry-dbid-e2d75bd6-dc0e-416a-9c3c-47180c8d963b`)})()}catch{}import{$d as e,Bd as t,Ef as n,Fd as r,Gd as i,Hd as a,Jd as o,Jf as s,Kd as c,Rd as l,Ud as ee,Vd as u,bp as d,cf as te,df as f,hp as p,jf as m,np as h,pf as g,wf as ne,zd as _,zf as v}from"./vendor-Byl1K1cb.js";import{AO as re,BO as y,FD as ie,GO as ae,ID as b,IO as x,LD as S,LO as C,OO as w,PO as oe,cl as se,cu as ce,iE as le,mw as ue,nx as de,rl as fe,s_ as pe,tx as me,zC as he}from"./app-DPqAJq5O.js";import{t as ge}from"./AgentModal-D_Fnne98.js";import{a as _e,c as T,i as ve,l as ye,o as be,r as E,s as xe,t as Se,u as Ce}from"./AgentTestButton-CLJaRUWu.js";e(),m(),h();var we=[`aria-label`],D=y(o({__name:`AgentTaskModal`,props:{modalName:{},data:{}},setup(e){let o=e,m=ae(),h=de(),y=me(),D=pe(),Te=l(()=>D.modalsById[o.modalName]?.open===!0),O=l(()=>o.data.task??null),k=l(()=>!!O.value),A=v(k.value),Ee=l(()=>k.value&&o.data.isPublished),De=o.data.taskState?.enabled??!0,j=v(!1),M=v(``),N=v(``),P=v(E.frequency),F=v(E.minute),I=v(E.hour),L=v(E.dayOfWeek),R=v(E.dayOfMonth),z=v(``),B=v(J()),V=v([]),H=v(!1),U=v(!1),W=v(``),G=v(!1),K=v(!1),q=v(!0);function J(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return ue.safeParse(e).success?e:h.timezone}let Y=l(()=>{let e=P.value;return e===`custom`?z.value.trim():ve({frequency:e,minute:F.value,hour:I.value,dayOfWeek:L.value,dayOfMonth:R.value})});function Oe(){let e=O.value;M.value=e?.name??m.baseText(`agents.builder.tasks.defaultName`),N.value=e?.objective??``,H.value=e!==null&&!e.timezone,B.value=e?e.timezone??h.timezone:J();let t=e?ye(e.cronExpression):{...E};t?(P.value=t.frequency,F.value=t.minute,I.value=t.hour,L.value=t.dayOfWeek,R.value=t.dayOfMonth,z.value=``):(P.value=`custom`,z.value=e?.cronExpression??``)}Oe();let ke=k.value&&!N.value.trim(),Ae=k.value&&!T(Y.value,B.value),je={validate:e=>!T(typeof e==`string`?e:``,B.value)&&{message:m.baseText(`agents.builder.tasks.validation.cronInvalid`)}};ne(P,e=>{e!==`custom`&&(q.value=!0)});let Me=l(()=>[{value:`hourly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.hourly`)},{value:`daily`,label:m.baseText(`agents.builder.tasks.schedule.frequency.daily`)},{value:`weekly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.weekly`)},{value:`monthly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.monthly`)},{value:`custom`,label:m.baseText(`agents.builder.tasks.schedule.frequency.custom`)}]);function Ne(e){let t=Me.value.find(t=>t.value===e);t&&(P.value=t.value,A.value=!0)}let Pe=l(()=>Array.from({length:7},(e,t)=>({value:t,label:Ce(t)}))),Fe=l(()=>Array.from({length:31},(e,t)=>({value:t+1,label:String(t+1)}))),Ie=l(()=>[`daily`,`weekly`,`monthly`].includes(P.value)),X=l({get:()=>I.value*60+F.value,set:e=>{I.value=Math.floor(e/60),F.value=e%60,A.value=!0}}),Le=l(()=>{let e=Array.from({length:48},(e,t)=>t*30);return(e.includes(X.value)?e:[...e,X.value].sort((e,t)=>e-t)).map(e=>({value:e,label:xe(Math.floor(e/60),e%60)}))});function Re(e){let t=Number(e);F.value=Number.isFinite(t)?Math.min(59,Math.max(0,Math.trunc(t))):0,A.value=!0}function ze(e){L.value=Number(e),A.value=!0}function Be(e){R.value=Number(e),A.value=!0}let Ve=l(()=>{let e=V.value;return e.some(e=>e.value===B.value)?e:[{value:B.value,label:B.value},...e]});te(async()=>{try{let e=await y.getTimezones();V.value=Object.entries(e).map(([e,t])=>({value:e,label:typeof t==`string`?t:e}))}catch{}});let Z=l(()=>{if(!A.value)return``;let e=T(Y.value,B.value);return e?be(e,B.value):``}),He=l(()=>P.value!==`custom`||!Z.value?``:_e(Y.value)??``),Ue=l(()=>!De&&k.value?m.baseText(`agents.builder.capabilities.deactivated`):Z.value?m.baseText(`agents.builder.tasks.schedule.nextOccurrence`,{interpolate:{occurrence:Z.value}}):``),We=l(()=>He.value?m.baseText(`agents.builder.tasks.schedule.summary`,{interpolate:{description:He.value,execution:Ue.value}}):Ue.value),Q=l(()=>N.value.trim()?N.value.trim().length>1e4?m.baseText(`agents.builder.tasks.validation.objectiveMaxLength`,{interpolate:{max:String(he)}}):``:m.baseText(`agents.builder.tasks.validation.objectiveRequired`)),Ge=l(()=>G.value||ke||K.value?Q.value:``),Ke=l(()=>M.value.trim()?M.value.trim().length>128?m.baseText(`agents.builder.tasks.validation.nameMaxLength`,{interpolate:{max:`128`}}):``:m.baseText(`agents.builder.tasks.validation.nameRequired`)),qe=l(()=>G.value?Ke.value:``),Je=l(()=>!Ke.value&&!Q.value&&q.value&&!U.value);function Ye(e){N.value=e,K.value=!0}function Xe(e){z.value=typeof e==`string`?e:``,A.value=!0}function Ze(e){B.value=String(e),H.value=!1,A.value=!0}function $(){D.closeModal(o.modalName)}function Qe(){K.value=!0,!(Q.value||!o.data.onPreview||o.data.getPreviewDisabledReason?.())&&($(),o.data.onPreview(N.value.trim()))}async function $e(){let e=O.value;if(e&&!j.value){j.value=!0,W.value=``;try{await se(h.restApiContext,o.data.projectId,o.data.agentId,e.id),o.data.onSaved(),$()}catch(e){W.value=e instanceof Error&&e.message?e.message:m.baseText(`agents.builder.tasks.removeError`)}finally{j.value=!1}}}async function et(){if(G.value=!0,!Je.value)return;U.value=!0,W.value=``;let e={name:M.value.trim(),objective:N.value.trim(),cronExpression:Y.value,timezone:H.value?null:B.value};try{O.value?await ce(h.restApiContext,o.data.projectId,o.data.agentId,O.value.id,e):(await o.data.ensureAgentPersisted?.(),await fe(h.restApiContext,o.data.projectId,o.data.agentId,{...e,enabled:!0})),o.data.onSaved(),$()}catch(e){W.value=e instanceof Error&&e.message?e.message:m.baseText(`agents.builder.tasks.saveError`)}finally{U.value=!1}}return(e,l)=>(f(),t(ge,{open:Te.value,title:M.value,"title-placeholder":s(m).baseText(`agents.builder.tasks.name.placeholder`),"title-max-length":s(128),"title-error":qe.value,busy:U.value||j.value,"editable-title":``,"data-testid":`agent-task-modal`,"onUpdate:open":l[2]||=e=>!e&&$(),"onUpdate:title":l[3]||=e=>M.value=e},ee({footerBeforeCancel:n(()=>[c(Se,{"disabled-reason":o.data.getPreviewDisabledReason?.(),"is-runnable":o.data.isRunnable===!0,"validation-issues":o.data.validationIssues??[],variant:`ghost`,"test-id":`agent-task-preview`,onOpenPreview:Qe},null,8,[`disabled-reason`,`is-runnable`,`validation-issues`])]),footerActions:n(()=>[c(s(x),{variant:`solid`,disabled:U.value,loading:U.value,"data-testid":`agent-task-save`,onClick:et},{default:n(()=>[i(d(s(m).baseText(`generic.save`)),1)]),_:1},8,[`disabled`,`loading`])]),default:n(()=>[_(`div`,{class:p(e.$style.content)},[_(`div`,{class:p(e.$style.field)},[c(s(w),{size:`small`,bold:``},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.objective.label`))+` `,1),c(s(w),{color:`primary`,bold:``,size:`small`},{default:n(()=>[...l[4]||=[i(`*`,-1)]]),_:1})]),_:1}),c(s(le),{class:p(e.$style.objectiveEditor),"model-value":N.value,placeholder:s(m).baseText(`agents.builder.tasks.objective.placeholder`),"show-toolbar":`floating`,"max-height":`100%`,"data-testid":`agent-task-objective-input`,"onUpdate:modelValue":Ye},null,8,[`class`,`model-value`,`placeholder`]),Ge.value?(f(),t(s(w),{key:0,class:p(e.$style.error),size:`small`},{default:n(()=>[i(d(Ge.value),1)]),_:1},8,[`class`])):u(``,!0)],2),_(`div`,{class:p(e.$style.field)},[c(s(w),{size:`small`,bold:``},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.label`))+` `,1),c(s(w),{color:`primary`,bold:``,size:`small`},{default:n(()=>[...l[5]||=[i(`*`,-1)]]),_:1})]),_:1}),_(`div`,{class:p(e.$style.scheduleRow)},[c(s(b),{"model-value":P.value,class:p(e.$style.frequencySelect),"data-testid":`agent-task-frequency`,"onUpdate:modelValue":Ne},{default:n(()=>[(f(!0),a(r,null,g(Me.value,e=>(f(),t(s(S),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`]),P.value===`weekly`?(f(),a(r,{key:0},[c(s(w),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.on`)),1)]),_:1}),c(s(b),{"model-value":L.value,class:p(e.$style.daySelect),"data-testid":`agent-task-day-of-week`,"onUpdate:modelValue":ze},{default:n(()=>[(f(!0),a(r,null,g(Pe.value,e=>(f(),t(s(S),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),P.value===`monthly`?(f(),a(r,{key:1},[c(s(w),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.onDay`)),1)]),_:1}),c(s(b),{"model-value":R.value,class:p(e.$style.daySelect),"data-testid":`agent-task-day-of-month`,"onUpdate:modelValue":Be},{default:n(()=>[(f(!0),a(r,null,g(Fe.value,e=>(f(),t(s(S),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),Ie.value?(f(),a(r,{key:2},[c(s(w),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.at`)),1)]),_:1}),c(s(b),{"model-value":X.value,class:p(e.$style.timeSelect),"data-testid":`agent-task-time`,"onUpdate:modelValue":l[0]||=e=>X.value=Number(e)},{default:n(()=>[(f(!0),a(r,null,g(Le.value,e=>(f(),t(s(S),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),P.value===`hourly`?(f(),a(r,{key:3},[c(s(w),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.minuteLabel`)),1)]),_:1}),c(s(oe),{type:`number`,"model-value":String(F.value),class:p(e.$style.minuteInput),"data-testid":`agent-task-minute`,"onUpdate:modelValue":Re},null,8,[`model-value`,`class`])],64)):u(``,!0),P.value===`custom`?(f(),t(s(ie),{key:4,"model-value":z.value,label:``,name:`task-cron`,required:``,placeholder:s(m).baseText(`agents.builder.tasks.schedule.cron.placeholder`),validators:{VALID_CRON:je},"validation-rules":[{name:`VALID_CRON`}],"show-validation-warnings":G.value||s(Ae),class:p(e.$style.cronInput),"data-testid":`agent-task-schedule-cron`,"onUpdate:modelValue":Xe,onValidate:l[1]||=e=>q.value=e},null,8,[`model-value`,`placeholder`,`validators`,`show-validation-warnings`,`class`])):u(``,!0),c(s(w),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.in`)),1)]),_:1}),c(s(b),{"model-value":B.value,class:p(e.$style.timezoneSelect),placeholder:s(m).baseText(`agents.builder.tasks.schedule.timezone.placeholder`),filterable:``,"limit-popper-width":!0,"data-testid":`agent-task-timezone`,"onUpdate:modelValue":Ze},{default:n(()=>[(f(!0),a(r,null,g(Ve.value,e=>(f(),t(s(S),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`,`placeholder`])],2),We.value?(f(),a(`div`,{key:0,class:p(e.$style.scheduleSummary)},[c(s(w),{class:p(e.$style.help),size:`small`},{default:n(()=>[i(d(We.value),1)]),_:1},8,[`class`]),Ee.value?(f(),t(s(re),{key:0,content:s(m).baseText(`agents.builder.tasks.republishHint`),placement:`top`},{default:n(()=>[_(`span`,{class:p(e.$style.infoIcon),"aria-label":s(m).baseText(`agents.builder.tasks.republishHint`),tabindex:`0`},[c(s(C),{icon:`info`,size:`small`})],10,we)]),_:1},8,[`content`])):u(``,!0)],2)):u(``,!0)],2),W.value?(f(),t(s(w),{key:0,class:p(e.$style.error),size:`small`},{default:n(()=>[i(d(W.value),1)]),_:1},8,[`class`])):u(``,!0)],2)]),_:2},[k.value?{name:`footerLeft`,fn:n(()=>[c(s(x),{variant:`ghost`,loading:j.value,"data-testid":`agent-task-delete`,onClick:$e},{icon:n(()=>[c(s(C),{icon:`trash-2`,size:16})]),default:n(()=>[i(` `+d(s(m).baseText(`agents.builder.tasks.delete`)),1)]),_:1},8,[`loading`])]),key:`0`}:void 0]),1032,[`open`,`title`,`title-placeholder`,`title-max-length`,`title-error`,`busy`]))}}),[[`__cssModules`,{$style:{content:`_content_5s8up_2`,field:`_field_5s8up_8`,objectiveEditor:`_objectiveEditor_5s8up_14`,scheduleRow:`_scheduleRow_5s8up_18`,frequencySelect:`_frequencySelect_5s8up_25`,daySelect:`_daySelect_5s8up_29`,minuteInput:`_minuteInput_5s8up_33`,cronInput:`_cronInput_5s8up_37`,timeSelect:`_timeSelect_5s8up_42`,timezoneSelect:`_timezoneSelect_5s8up_46`,scheduleSummary:`_scheduleSummary_5s8up_50`,infoIcon:`_infoIcon_5s8up_56`,help:`_help_5s8up_62`,error:`_error_5s8up_66`}}]]);export{D as default};
1
+ try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`53896ded-50a3-4f66-89ab-53c11610178a`,e._sentryDebugIdIdentifier=`sentry-dbid-53896ded-50a3-4f66-89ab-53c11610178a`)})()}catch{}import{$d as e,Bd as t,Ef as n,Fd as r,Gd as i,Hd as a,Jd as o,Jf as s,Kd as c,Rd as l,Ud as ee,Vd as u,bp as d,cf as te,df as f,hp as p,jf as m,np as h,pf as g,wf as ne,zd as _,zf as v}from"./vendor-Byl1K1cb.js";import{AO as y,BC as re,HO as b,IO as ie,LD as ae,MO as oe,RD as x,RO as S,cl as se,cu as ce,hw as le,nx as ue,oE as de,qO as fe,rl as pe,rx as me,s_ as he,zD as C,zO as w}from"./app-CLvVIuPO.js";import{t as ge}from"./AgentModal-BIVM0y7V.js";import{a as _e,c as T,i as ve,l as ye,o as be,r as E,s as xe,t as Se,u as Ce}from"./AgentTestButton-TycwqSoI.js";e(),m(),h();var we=[`aria-label`],D=b(o({__name:`AgentTaskModal`,props:{modalName:{},data:{}},setup(e){let o=e,m=fe(),h=me(),b=ue(),D=he(),Te=l(()=>D.modalsById[o.modalName]?.open===!0),O=l(()=>o.data.task??null),k=l(()=>!!O.value),A=v(k.value),Ee=l(()=>k.value&&o.data.isPublished),De=o.data.taskState?.enabled??!0,j=v(!1),M=v(``),N=v(``),P=v(E.frequency),F=v(E.minute),I=v(E.hour),L=v(E.dayOfWeek),R=v(E.dayOfMonth),z=v(``),B=v(J()),V=v([]),H=v(!1),U=v(!1),W=v(``),G=v(!1),K=v(!1),q=v(!0);function J(){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;return le.safeParse(e).success?e:h.timezone}let Y=l(()=>{let e=P.value;return e===`custom`?z.value.trim():ve({frequency:e,minute:F.value,hour:I.value,dayOfWeek:L.value,dayOfMonth:R.value})});function Oe(){let e=O.value;M.value=e?.name??m.baseText(`agents.builder.tasks.defaultName`),N.value=e?.objective??``,H.value=e!==null&&!e.timezone,B.value=e?e.timezone??h.timezone:J();let t=e?ye(e.cronExpression):{...E};t?(P.value=t.frequency,F.value=t.minute,I.value=t.hour,L.value=t.dayOfWeek,R.value=t.dayOfMonth,z.value=``):(P.value=`custom`,z.value=e?.cronExpression??``)}Oe();let ke=k.value&&!N.value.trim(),Ae=k.value&&!T(Y.value,B.value),je={validate:e=>!T(typeof e==`string`?e:``,B.value)&&{message:m.baseText(`agents.builder.tasks.validation.cronInvalid`)}};ne(P,e=>{e!==`custom`&&(q.value=!0)});let Me=l(()=>[{value:`hourly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.hourly`)},{value:`daily`,label:m.baseText(`agents.builder.tasks.schedule.frequency.daily`)},{value:`weekly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.weekly`)},{value:`monthly`,label:m.baseText(`agents.builder.tasks.schedule.frequency.monthly`)},{value:`custom`,label:m.baseText(`agents.builder.tasks.schedule.frequency.custom`)}]);function Ne(e){let t=Me.value.find(t=>t.value===e);t&&(P.value=t.value,A.value=!0)}let Pe=l(()=>Array.from({length:7},(e,t)=>({value:t,label:Ce(t)}))),Fe=l(()=>Array.from({length:31},(e,t)=>({value:t+1,label:String(t+1)}))),Ie=l(()=>[`daily`,`weekly`,`monthly`].includes(P.value)),X=l({get:()=>I.value*60+F.value,set:e=>{I.value=Math.floor(e/60),F.value=e%60,A.value=!0}}),Le=l(()=>{let e=Array.from({length:48},(e,t)=>t*30);return(e.includes(X.value)?e:[...e,X.value].sort((e,t)=>e-t)).map(e=>({value:e,label:xe(Math.floor(e/60),e%60)}))});function Re(e){let t=Number(e);F.value=Number.isFinite(t)?Math.min(59,Math.max(0,Math.trunc(t))):0,A.value=!0}function ze(e){L.value=Number(e),A.value=!0}function Be(e){R.value=Number(e),A.value=!0}let Ve=l(()=>{let e=V.value;return e.some(e=>e.value===B.value)?e:[{value:B.value,label:B.value},...e]});te(async()=>{try{let e=await b.getTimezones();V.value=Object.entries(e).map(([e,t])=>({value:e,label:typeof t==`string`?t:e}))}catch{}});let Z=l(()=>{if(!A.value)return``;let e=T(Y.value,B.value);return e?be(e,B.value):``}),He=l(()=>P.value!==`custom`||!Z.value?``:_e(Y.value)??``),Ue=l(()=>!De&&k.value?m.baseText(`agents.builder.capabilities.deactivated`):Z.value?m.baseText(`agents.builder.tasks.schedule.nextOccurrence`,{interpolate:{occurrence:Z.value}}):``),We=l(()=>He.value?m.baseText(`agents.builder.tasks.schedule.summary`,{interpolate:{description:He.value,execution:Ue.value}}):Ue.value),Q=l(()=>N.value.trim()?N.value.trim().length>1e4?m.baseText(`agents.builder.tasks.validation.objectiveMaxLength`,{interpolate:{max:String(re)}}):``:m.baseText(`agents.builder.tasks.validation.objectiveRequired`)),Ge=l(()=>G.value||ke||K.value?Q.value:``),Ke=l(()=>M.value.trim()?M.value.trim().length>128?m.baseText(`agents.builder.tasks.validation.nameMaxLength`,{interpolate:{max:`128`}}):``:m.baseText(`agents.builder.tasks.validation.nameRequired`)),qe=l(()=>G.value?Ke.value:``),Je=l(()=>!Ke.value&&!Q.value&&q.value&&!U.value);function Ye(e){N.value=e,K.value=!0}function Xe(e){z.value=typeof e==`string`?e:``,A.value=!0}function Ze(e){B.value=String(e),H.value=!1,A.value=!0}function $(){D.closeModal(o.modalName)}function Qe(){K.value=!0,!(Q.value||!o.data.onPreview||o.data.getPreviewDisabledReason?.())&&($(),o.data.onPreview(N.value.trim()))}async function $e(){let e=O.value;if(e&&!j.value){j.value=!0,W.value=``;try{await se(h.restApiContext,o.data.projectId,o.data.agentId,e.id),o.data.onSaved(),$()}catch(e){W.value=e instanceof Error&&e.message?e.message:m.baseText(`agents.builder.tasks.removeError`)}finally{j.value=!1}}}async function et(){if(G.value=!0,!Je.value)return;U.value=!0,W.value=``;let e={name:M.value.trim(),objective:N.value.trim(),cronExpression:Y.value,timezone:H.value?null:B.value};try{O.value?await ce(h.restApiContext,o.data.projectId,o.data.agentId,O.value.id,e):(await o.data.ensureAgentPersisted?.(),await pe(h.restApiContext,o.data.projectId,o.data.agentId,{...e,enabled:!0})),o.data.onSaved(),$()}catch(e){W.value=e instanceof Error&&e.message?e.message:m.baseText(`agents.builder.tasks.saveError`)}finally{U.value=!1}}return(e,l)=>(f(),t(ge,{open:Te.value,title:M.value,"title-placeholder":s(m).baseText(`agents.builder.tasks.name.placeholder`),"title-max-length":s(128),"title-error":qe.value,busy:U.value||j.value,"editable-title":``,"data-testid":`agent-task-modal`,"onUpdate:open":l[2]||=e=>!e&&$(),"onUpdate:title":l[3]||=e=>M.value=e},ee({footerBeforeCancel:n(()=>[c(Se,{"disabled-reason":o.data.getPreviewDisabledReason?.(),"is-runnable":o.data.isRunnable===!0,"validation-issues":o.data.validationIssues??[],variant:`ghost`,"test-id":`agent-task-preview`,onOpenPreview:Qe},null,8,[`disabled-reason`,`is-runnable`,`validation-issues`])]),footerActions:n(()=>[c(s(S),{variant:`solid`,disabled:U.value,loading:U.value,"data-testid":`agent-task-save`,onClick:et},{default:n(()=>[i(d(s(m).baseText(`generic.save`)),1)]),_:1},8,[`disabled`,`loading`])]),default:n(()=>[_(`div`,{class:p(e.$style.content)},[_(`div`,{class:p(e.$style.field)},[c(s(y),{size:`small`,bold:``},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.objective.label`))+` `,1),c(s(y),{color:`primary`,bold:``,size:`small`},{default:n(()=>[...l[4]||=[i(`*`,-1)]]),_:1})]),_:1}),c(s(de),{class:p(e.$style.objectiveEditor),"model-value":N.value,placeholder:s(m).baseText(`agents.builder.tasks.objective.placeholder`),"show-toolbar":`floating`,"max-height":`100%`,"data-testid":`agent-task-objective-input`,"onUpdate:modelValue":Ye},null,8,[`class`,`model-value`,`placeholder`]),Ge.value?(f(),t(s(y),{key:0,class:p(e.$style.error),size:`small`},{default:n(()=>[i(d(Ge.value),1)]),_:1},8,[`class`])):u(``,!0)],2),_(`div`,{class:p(e.$style.field)},[c(s(y),{size:`small`,bold:``},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.label`))+` `,1),c(s(y),{color:`primary`,bold:``,size:`small`},{default:n(()=>[...l[5]||=[i(`*`,-1)]]),_:1})]),_:1}),_(`div`,{class:p(e.$style.scheduleRow)},[c(s(x),{"model-value":P.value,class:p(e.$style.frequencySelect),"data-testid":`agent-task-frequency`,"onUpdate:modelValue":Ne},{default:n(()=>[(f(!0),a(r,null,g(Me.value,e=>(f(),t(s(C),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`]),P.value===`weekly`?(f(),a(r,{key:0},[c(s(y),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.on`)),1)]),_:1}),c(s(x),{"model-value":L.value,class:p(e.$style.daySelect),"data-testid":`agent-task-day-of-week`,"onUpdate:modelValue":ze},{default:n(()=>[(f(!0),a(r,null,g(Pe.value,e=>(f(),t(s(C),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),P.value===`monthly`?(f(),a(r,{key:1},[c(s(y),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.onDay`)),1)]),_:1}),c(s(x),{"model-value":R.value,class:p(e.$style.daySelect),"data-testid":`agent-task-day-of-month`,"onUpdate:modelValue":Be},{default:n(()=>[(f(!0),a(r,null,g(Fe.value,e=>(f(),t(s(C),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),Ie.value?(f(),a(r,{key:2},[c(s(y),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.at`)),1)]),_:1}),c(s(x),{"model-value":X.value,class:p(e.$style.timeSelect),"data-testid":`agent-task-time`,"onUpdate:modelValue":l[0]||=e=>X.value=Number(e)},{default:n(()=>[(f(!0),a(r,null,g(Le.value,e=>(f(),t(s(C),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`])],64)):u(``,!0),P.value===`hourly`?(f(),a(r,{key:3},[c(s(y),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.minuteLabel`)),1)]),_:1}),c(s(ie),{type:`number`,"model-value":String(F.value),class:p(e.$style.minuteInput),"data-testid":`agent-task-minute`,"onUpdate:modelValue":Re},null,8,[`model-value`,`class`])],64)):u(``,!0),P.value===`custom`?(f(),t(s(ae),{key:4,"model-value":z.value,label:``,name:`task-cron`,required:``,placeholder:s(m).baseText(`agents.builder.tasks.schedule.cron.placeholder`),validators:{VALID_CRON:je},"validation-rules":[{name:`VALID_CRON`}],"show-validation-warnings":G.value||s(Ae),class:p(e.$style.cronInput),"data-testid":`agent-task-schedule-cron`,"onUpdate:modelValue":Xe,onValidate:l[1]||=e=>q.value=e},null,8,[`model-value`,`placeholder`,`validators`,`show-validation-warnings`,`class`])):u(``,!0),c(s(y),{size:`small`,color:`text-light`},{default:n(()=>[i(d(s(m).baseText(`agents.builder.tasks.schedule.in`)),1)]),_:1}),c(s(x),{"model-value":B.value,class:p(e.$style.timezoneSelect),placeholder:s(m).baseText(`agents.builder.tasks.schedule.timezone.placeholder`),filterable:``,"limit-popper-width":!0,"data-testid":`agent-task-timezone`,"onUpdate:modelValue":Ze},{default:n(()=>[(f(!0),a(r,null,g(Ve.value,e=>(f(),t(s(C),{key:e.value,value:e.value,label:e.label},null,8,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`,`placeholder`])],2),We.value?(f(),a(`div`,{key:0,class:p(e.$style.scheduleSummary)},[c(s(y),{class:p(e.$style.help),size:`small`},{default:n(()=>[i(d(We.value),1)]),_:1},8,[`class`]),Ee.value?(f(),t(s(oe),{key:0,content:s(m).baseText(`agents.builder.tasks.republishHint`),placement:`top`},{default:n(()=>[_(`span`,{class:p(e.$style.infoIcon),"aria-label":s(m).baseText(`agents.builder.tasks.republishHint`),tabindex:`0`},[c(s(w),{icon:`info`,size:`small`})],10,we)]),_:1},8,[`content`])):u(``,!0)],2)):u(``,!0)],2),W.value?(f(),t(s(y),{key:0,class:p(e.$style.error),size:`small`},{default:n(()=>[i(d(W.value),1)]),_:1},8,[`class`])):u(``,!0)],2)]),_:2},[k.value?{name:`footerLeft`,fn:n(()=>[c(s(S),{variant:`ghost`,loading:j.value,"data-testid":`agent-task-delete`,onClick:$e},{icon:n(()=>[c(s(w),{icon:`trash-2`,size:16})]),default:n(()=>[i(` `+d(s(m).baseText(`agents.builder.tasks.delete`)),1)]),_:1},8,[`loading`])]),key:`0`}:void 0]),1032,[`open`,`title`,`title-placeholder`,`title-max-length`,`title-error`,`busy`]))}}),[[`__cssModules`,{$style:{content:`_content_5s8up_2`,field:`_field_5s8up_8`,objectiveEditor:`_objectiveEditor_5s8up_14`,scheduleRow:`_scheduleRow_5s8up_18`,frequencySelect:`_frequencySelect_5s8up_25`,daySelect:`_daySelect_5s8up_29`,minuteInput:`_minuteInput_5s8up_33`,cronInput:`_cronInput_5s8up_37`,timeSelect:`_timeSelect_5s8up_42`,timezoneSelect:`_timezoneSelect_5s8up_46`,scheduleSummary:`_scheduleSummary_5s8up_50`,infoIcon:`_infoIcon_5s8up_56`,help:`_help_5s8up_62`,error:`_error_5s8up_66`}}]]);export{D as default};
@@ -1 +1 @@
1
- try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d162644e-88bf-422c-8623-c156444b18c1`,e._sentryDebugIdIdentifier=`sentry-dbid-d162644e-88bf-422c-8623-c156444b18c1`)})()}catch{}import{$d as e,Ef as t,Fd as n,Gd as r,Hd as i,If as a,Jd as o,Jf as s,Kd as c,_p as l,bp as u,df as d,hp as f,jf as p,np as m,pf as h,wf as g,zd as _,zf as v}from"./vendor-Byl1K1cb.js";import{$l as y,BO as b,Bi as x,Cl as S,GO as C,IC as w,Jb as T,Jl as E,LO as D,OO as O,Wi as k,Xb as A,Xr as j,iu as M,ng as N,nx as P,pl as F,s_ as I,sg as L,zi as R}from"./app-DPqAJq5O.js";import{t as z}from"./useAgentConfirmationModal-B3rCAAcE.js";var B=`agent-templates-v1`;function V(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`prompt`?typeof t.text==`string`&&t.text.trim()!==``:t.kind===`template`&&typeof t.templateId==`string`&&t.templateId!==``}var H=[{id:`morning-news-brief`,labelKey:`agents.builder.templates.morningNewsBrief.label`,descriptionKey:`agents.builder.templates.morningNewsBrief.description`,icon:`sun`,gradient:{from:`#F5A524`,to:`#FF5A1F`,angle:160,fromStop:8,toStop:92},config:{name:`Morning News Brief`,instructions:`You are a news brief agent. Every morning at 9am, search the web for today’s top headlines and compile a concise summary. For each story include a headline, a one-sentence summary, and a source link. Limit the brief to five stories.`,config:{webSearch:{enabled:!0,provider:`native`}}},tasks:[{name:`Morning news brief`,objective:`Search the web for today’s top headlines and compile a concise summary. For each story include a headline, a one-sentence summary, and a source link. Limit the brief to five stories.`,cronExpression:`0 9 * * *`}]},{id:`process-incoming-emails`,labelKey:`agents.builder.templates.processIncomingEmails.label`,descriptionKey:`agents.builder.templates.processIncomingEmails.description`,icon:`mail`,gradient:{from:`#2563EB`,to:`#7C3AED`,angle:135,fromStop:0,toStop:100},config:{name:`Process Incoming Emails`,instructions:`You are an email processing agent. Read new emails from Gmail, identify action items, and update the user’s Google Calendar with any meetings, deadlines, or follow-ups mentioned. Summarize each email and flag urgent items.`,tools:[{type:`node`,name:`Gmail`,description:`Read and send emails through Gmail.`,node:{nodeType:`n8n-nodes-base.gmail`,nodeTypeVersion:2,nodeParameters:{resource:`message`,operation:`getAll`},credentials:{gmailOAuth2:{id:``,name:`gmailOAuth2`}}}},{type:`node`,name:`Google Calendar`,description:`Create and update calendar events.`,node:{nodeType:`n8n-nodes-base.googleCalendar`,nodeTypeVersion:1,nodeParameters:{resource:`event`,operation:`create`,start:`={{ $fromAI('start', 'Event start time', 'string') }}`,end:`={{ $fromAI('end', 'Event end time', 'string') }}`},credentials:{googleCalendarOAuth2Api:{id:``,name:`googleCalendarOAuth2Api`}}}}]}},{id:`qualify-new-leads`,labelKey:`agents.builder.templates.qualifyNewLeads.label`,descriptionKey:`agents.builder.templates.qualifyNewLeads.description`,icon:`users`,gradient:{from:`#059669`,to:`#84CC16`,angle:120,fromStop:4,toStop:88},config:{name:`Qualify New Leads`,instructions:`You are a lead qualification agent. Score new leads from the CRM based on their profile, activity, and engagement. Route high-scoring leads to sales for immediate follow-up, and nurture low-scoring leads with relevant content.`}},{id:`propose-meeting-times`,labelKey:`agents.builder.templates.proposeMeetingTimes.label`,descriptionKey:`agents.builder.templates.proposeMeetingTimes.description`,icon:`calendar`,gradient:{from:`#0F766E`,to:`#2DD4BF`,angle:150,fromStop:4,toStop:96},config:{name:`Propose Meeting Times`,instructions:`You are a scheduling agent. Find open slots on the user’s Google Calendar and suggest a few meeting times. Match the requested duration and time window. Do not book a meeting until the user confirms a time.`,tools:[{type:`node`,name:`Google Calendar`,description:`Find open slots on Google Calendar.`,node:{nodeType:`n8n-nodes-base.googleCalendar`,nodeTypeVersion:1.3,nodeParameters:{resource:`calendar`,operation:`availability`,timeMin:`={{ $fromAI('timeMin', 'Start of the interval to check', 'string') }}`,timeMax:`={{ $fromAI('timeMax', 'End of the interval to check', 'string') }}`},credentials:{googleCalendarOAuth2Api:{id:``,name:`googleCalendarOAuth2Api`}}}}]}}],U=e=>e.type===w;function W(e){return e.instructions.trim()===``&&(e.tools?.length??0)===0&&(e.integrations??[]).every(U)}function G(e,t,n){return W(e)?{...e,name:e.name===n?t.config.name:e.name,instructions:t.config.instructions,tools:t.config.tools??[],integrations:[...(e.integrations??[]).filter(U),...(t.config.integrations??[]).filter(e=>!U(e))],config:{...e.config,...t.config.config},personalisation:{icon:t.icon,gradient:{...t.gradient}}}:null}p(),e();function K(){let e=I(),t,n=!1;a(()=>{n=!0,t?.()},!0);async function r({isCurrent:r=()=>!0,...i}){return n||!r()?!1:(t?.(),await new Promise(n=>{let a=!1,o=g(r,e=>{e||t?.()},{flush:`sync`}),s=e=>{a||(a=!0,o(),t=void 0,n(e))};t=()=>{e.closeModal(L),s(!1)},e.openModalWithData({name:L,data:{...i,onSubmit:async e=>{if(a||!r())return!1;let t=await i.onSubmit(e);return!a&&t},onClose:s}})}))}return{openVersionMetadata:r}}p();function q(e){if(A(`N8N_HIDE_AGENT_PUBLISHED_CONFIRMATION`).value===`true`)return;let t=x().value&&(e.activeVersion?.schema?.integrations??[]).some(({type:e})=>e===`n8n_chat`);I().openModalWithData({name:N,data:{agentId:e.id,projectId:e.projectId,n8nChatLive:t}})}function J(){let e=P(),t=C(),{showMessage:n,showError:r}=T(),{openAgentConfirmationModal:i}=z(),{trackRevertedChangesOnAgent:a}=R(),o=v(!1),{openVersionMetadata:s}=K();async function c(i,a,c,l=()=>!0){if(o.value)return null;o.value=!0;try{let o=c??(await F(e.restApiContext,i,a)).versionId;if(!o)return null;let u=await S(e.restApiContext,i,a,o);if(!l())return null;let d=null;return await s({mode:`publish`,isCurrent:l,name:u.name,description:u.description,onSubmit:async s=>{try{return d=await E(e.restApiContext,i,a,o,s),k(i,d),n({title:t.baseText(`agents.publish.toast.published`),type:`success`}),!0}catch(e){return r(e,t.baseText(`agents.publish.error.publish`)),!1}}})&&d&&l()&&q(d),d}catch(e){return r(e,t.baseText(`agents.publish.error.publish`)),null}finally{o.value=!1}}async function l(a,s,c){if(o.value||await i({title:t.baseText(`agents.unpublish.modal.title`,{interpolate:{name:c??``}}),description:t.baseText(`agents.unpublish.modal.description`),confirmButtonText:t.baseText(`agents.unpublish.modal.button.unpublish`),cancelButtonText:t.baseText(`generic.cancel`)})!==`confirm`)return null;o.value=!0;try{let r=await M(e.restApiContext,a,s);return k(a,r),n({title:t.baseText(`agents.publish.toast.unpublished`),type:`success`}),r}catch(e){return r(e,t.baseText(`agents.publish.error.unpublish`)),null}finally{o.value=!1}}async function u(s,c){if(o.value||await i({title:t.baseText(`agents.revertToPublished.modal.title`),description:t.baseText(`agents.revertToPublished.modal.description`),confirmButtonText:t.baseText(`agents.revertToPublished.modal.button.revert`),cancelButtonText:t.baseText(`generic.cancel`)})!==`confirm`)return null;o.value=!0;try{let r=await y(e.restApiContext,s,c);return a({agentId:c}),k(s,r),n({title:t.baseText(`agents.publish.toast.reverted`),type:`success`}),r}catch(e){return r(e,t.baseText(`agents.publish.error.revert`)),null}finally{o.value=!1}}return{publish:c,unpublish:l,revertToPublished:u,publishing:o}}e(),p(),m();var Y=[`data-test-id`],X=[`onClick`],Z=[`data-test-id`],Q=b(o({__name:`AgentTemplateList`,emits:[`select`],setup(e,{emit:a}){let o=a,p=C();return(e,a)=>(d(),i(`ul`,{class:f(e.$style.examples)},[(d(!0),i(n,null,h(s(H),(n,a)=>(d(),i(`li`,{key:n.id,class:f(e.$style.example),style:l({"--intro-index":a+1}),"data-test-id":`agent-template-${n.id}`},[_(`button`,{type:`button`,class:f(e.$style.exampleButton),onClick:e=>o(`select`,n)},[_(`span`,{class:f(e.$style.exampleIcon),"data-test-id":`agent-template-icon-${n.id}`},[c(j,{personalisation:{icon:n.icon,gradient:n.gradient},size:40},null,8,[`personalisation`])],10,Z),_(`span`,{class:f(e.$style.exampleText)},[c(s(O),{class:f(e.$style.exampleLabel)},{default:t(()=>[r(u(s(p).baseText(n.labelKey)),1)]),_:2},1032,[`class`]),c(s(O),{color:`text-light`,class:f(e.$style.exampleDescription),title:s(p).baseText(n.descriptionKey)},{default:t(()=>[r(u(s(p).baseText(n.descriptionKey)),1)]),_:2},1032,[`class`,`title`])],2),c(s(D),{icon:`arrow-right`,color:`text-light`,size:`medium`,class:f(e.$style.exampleArrow)},null,8,[`class`])],10,X)],14,Y))),128))],2))}}),[[`__cssModules`,{$style:{examples:`_examples_1g82h_452`,example:`_example_1g82h_452`,fadeInUp:`_fadeInUp_1g82h_1`,exampleButton:`_exampleButton_1g82h_474`,exampleArrow:`_exampleArrow_1g82h_493`,exampleIcon:`_exampleIcon_1g82h_502`,exampleText:`_exampleText_1g82h_507`,exampleLabel:`_exampleLabel_1g82h_514`,exampleDescription:`_exampleDescription_1g82h_518`,shimmer:`_shimmer_1g82h_1`,spin:`_spin_1g82h_1`,"skeleton-pulse":`_skeleton-pulse_1g82h_1`,opacityPulse:`_opacityPulse_1g82h_1`,popoverIn:`_popoverIn_1g82h_1`,fadeIn:`_fadeIn_1g82h_1`,collapsibleSlideDown:`_collapsibleSlideDown_1g82h_1`,collapsibleSlideUp:`_collapsibleSlideUp_1g82h_1`,collapsibleSlideDownBlurred:`_collapsibleSlideDownBlurred_1g82h_1`,collapsibleSlideUpBlurred:`_collapsibleSlideUpBlurred_1g82h_1`,blurSwapIn:`_blurSwapIn_1g82h_1`,blurSwapOut:`_blurSwapOut_1g82h_1`,pulse:`_pulse_1g82h_1`,pulseGlow:`_pulseGlow_1g82h_1`,pulseGlowDelayed:`_pulseGlowDelayed_1g82h_1`,fade:`_fade_1g82h_1`,fadeInDown:`_fadeInDown_1g82h_1`,fadeInLeft:`_fadeInLeft_1g82h_1`,fadeInRight:`_fadeInRight_1g82h_1`,fadeOut:`_fadeOut_1g82h_1`,fadeOutDown:`_fadeOutDown_1g82h_1`,fadeOutUp:`_fadeOutUp_1g82h_1`,fadeOutLeft:`_fadeOutLeft_1g82h_1`,fadeOutRight:`_fadeOutRight_1g82h_1`,ping:`_ping_1g82h_1`,blinkBackground:`_blinkBackground_1g82h_1`,typingBlink:`_typingBlink_1g82h_1`}}]]);export{B as a,V as c,H as i,J as n,G as o,K as r,W as s,Q as t};
1
+ try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`373b7dbd-d057-4eb6-a261-2de1243305f9`,e._sentryDebugIdIdentifier=`sentry-dbid-373b7dbd-d057-4eb6-a261-2de1243305f9`)})()}catch{}import{$d as e,Ef as t,Fd as n,Gd as r,Hd as i,If as a,Jd as o,Jf as s,Kd as c,_p as l,bp as u,df as d,hp as f,jf as p,np as m,pf as h,wf as g,zd as _,zf as v}from"./vendor-Byl1K1cb.js";import{$l as y,AO as b,Bi as x,Cl as S,HO as C,Jl as w,LC as T,Wi as E,Xr as D,Yb as O,Zb as k,iu as A,ng as j,pl as M,qO as N,rx as P,s_ as F,sg as I,zO as L,zi as R}from"./app-CLvVIuPO.js";import{t as z}from"./useAgentConfirmationModal-U0vSIqsQ.js";var B=`agent-templates-v1`;function V(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.kind===`prompt`?typeof t.text==`string`&&t.text.trim()!==``:t.kind===`template`&&typeof t.templateId==`string`&&t.templateId!==``}var H=[{id:`morning-news-brief`,labelKey:`agents.builder.templates.morningNewsBrief.label`,descriptionKey:`agents.builder.templates.morningNewsBrief.description`,icon:`sun`,gradient:{from:`#F5A524`,to:`#FF5A1F`,angle:160,fromStop:8,toStop:92},config:{name:`Morning News Brief`,instructions:`You are a news brief agent. Every morning at 9am, search the web for today’s top headlines and compile a concise summary. For each story include a headline, a one-sentence summary, and a source link. Limit the brief to five stories.`,config:{webSearch:{enabled:!0,provider:`native`}}},tasks:[{name:`Morning news brief`,objective:`Search the web for today’s top headlines and compile a concise summary. For each story include a headline, a one-sentence summary, and a source link. Limit the brief to five stories.`,cronExpression:`0 9 * * *`}]},{id:`process-incoming-emails`,labelKey:`agents.builder.templates.processIncomingEmails.label`,descriptionKey:`agents.builder.templates.processIncomingEmails.description`,icon:`mail`,gradient:{from:`#2563EB`,to:`#7C3AED`,angle:135,fromStop:0,toStop:100},config:{name:`Process Incoming Emails`,instructions:`You are an email processing agent. Read new emails from Gmail, identify action items, and update the user’s Google Calendar with any meetings, deadlines, or follow-ups mentioned. Summarize each email and flag urgent items.`,tools:[{type:`node`,name:`Gmail`,description:`Read and send emails through Gmail.`,node:{nodeType:`n8n-nodes-base.gmail`,nodeTypeVersion:2,nodeParameters:{resource:`message`,operation:`getAll`},credentials:{gmailOAuth2:{id:``,name:`gmailOAuth2`}}}},{type:`node`,name:`Google Calendar`,description:`Create and update calendar events.`,node:{nodeType:`n8n-nodes-base.googleCalendar`,nodeTypeVersion:1,nodeParameters:{resource:`event`,operation:`create`,start:`={{ $fromAI('start', 'Event start time', 'string') }}`,end:`={{ $fromAI('end', 'Event end time', 'string') }}`},credentials:{googleCalendarOAuth2Api:{id:``,name:`googleCalendarOAuth2Api`}}}}]}},{id:`qualify-new-leads`,labelKey:`agents.builder.templates.qualifyNewLeads.label`,descriptionKey:`agents.builder.templates.qualifyNewLeads.description`,icon:`users`,gradient:{from:`#059669`,to:`#84CC16`,angle:120,fromStop:4,toStop:88},config:{name:`Qualify New Leads`,instructions:`You are a lead qualification agent. Score new leads from the CRM based on their profile, activity, and engagement. Route high-scoring leads to sales for immediate follow-up, and nurture low-scoring leads with relevant content.`}},{id:`propose-meeting-times`,labelKey:`agents.builder.templates.proposeMeetingTimes.label`,descriptionKey:`agents.builder.templates.proposeMeetingTimes.description`,icon:`calendar`,gradient:{from:`#0F766E`,to:`#2DD4BF`,angle:150,fromStop:4,toStop:96},config:{name:`Propose Meeting Times`,instructions:`You are a scheduling agent. Find open slots on the user’s Google Calendar and suggest a few meeting times. Match the requested duration and time window. Do not book a meeting until the user confirms a time.`,tools:[{type:`node`,name:`Google Calendar`,description:`Find open slots on Google Calendar.`,node:{nodeType:`n8n-nodes-base.googleCalendar`,nodeTypeVersion:1.3,nodeParameters:{resource:`calendar`,operation:`availability`,timeMin:`={{ $fromAI('timeMin', 'Start of the interval to check', 'string') }}`,timeMax:`={{ $fromAI('timeMax', 'End of the interval to check', 'string') }}`},credentials:{googleCalendarOAuth2Api:{id:``,name:`googleCalendarOAuth2Api`}}}}]}}],U=e=>e.type===T;function W(e){return e.instructions.trim()===``&&(e.tools?.length??0)===0&&(e.integrations??[]).every(U)}function G(e,t,n){return W(e)?{...e,name:e.name===n?t.config.name:e.name,instructions:t.config.instructions,tools:t.config.tools??[],integrations:[...(e.integrations??[]).filter(U),...(t.config.integrations??[]).filter(e=>!U(e))],config:{...e.config,...t.config.config},personalisation:{icon:t.icon,gradient:{...t.gradient}}}:null}p(),e();function K(){let e=F(),t,n=!1;a(()=>{n=!0,t?.()},!0);async function r({isCurrent:r=()=>!0,...i}){return n||!r()?!1:(t?.(),await new Promise(n=>{let a=!1,o=g(r,e=>{e||t?.()},{flush:`sync`}),s=e=>{a||(a=!0,o(),t=void 0,n(e))};t=()=>{e.closeModal(I),s(!1)},e.openModalWithData({name:I,data:{...i,onSubmit:async e=>{if(a||!r())return!1;let t=await i.onSubmit(e);return!a&&t},onClose:s}})}))}return{openVersionMetadata:r}}p();function q(e){if(k(`N8N_HIDE_AGENT_PUBLISHED_CONFIRMATION`).value===`true`)return;let t=x().value&&(e.activeVersion?.schema?.integrations??[]).some(({type:e})=>e===`n8n_chat`);F().openModalWithData({name:j,data:{agentId:e.id,projectId:e.projectId,n8nChatLive:t}})}function J(){let e=P(),t=N(),{showMessage:n,showError:r}=O(),{openAgentConfirmationModal:i}=z(),{trackRevertedChangesOnAgent:a}=R(),o=v(!1),{openVersionMetadata:s}=K();async function c(i,a,c,l=()=>!0){if(o.value)return null;o.value=!0;try{let o=c??(await M(e.restApiContext,i,a)).versionId;if(!o)return null;let u=await S(e.restApiContext,i,a,o);if(!l())return null;let d=null;return await s({mode:`publish`,isCurrent:l,name:u.name,description:u.description,onSubmit:async s=>{try{return d=await w(e.restApiContext,i,a,o,s),E(i,d),n({title:t.baseText(`agents.publish.toast.published`),type:`success`}),!0}catch(e){return r(e,t.baseText(`agents.publish.error.publish`)),!1}}})&&d&&l()&&q(d),d}catch(e){return r(e,t.baseText(`agents.publish.error.publish`)),null}finally{o.value=!1}}async function l(a,s,c){if(o.value||await i({title:t.baseText(`agents.unpublish.modal.title`,{interpolate:{name:c??``}}),description:t.baseText(`agents.unpublish.modal.description`),confirmButtonText:t.baseText(`agents.unpublish.modal.button.unpublish`),cancelButtonText:t.baseText(`generic.cancel`)})!==`confirm`)return null;o.value=!0;try{let r=await A(e.restApiContext,a,s);return E(a,r),n({title:t.baseText(`agents.publish.toast.unpublished`),type:`success`}),r}catch(e){return r(e,t.baseText(`agents.publish.error.unpublish`)),null}finally{o.value=!1}}async function u(s,c){if(o.value||await i({title:t.baseText(`agents.revertToPublished.modal.title`),description:t.baseText(`agents.revertToPublished.modal.description`),confirmButtonText:t.baseText(`agents.revertToPublished.modal.button.revert`),cancelButtonText:t.baseText(`generic.cancel`)})!==`confirm`)return null;o.value=!0;try{let r=await y(e.restApiContext,s,c);return a({agentId:c}),E(s,r),n({title:t.baseText(`agents.publish.toast.reverted`),type:`success`}),r}catch(e){return r(e,t.baseText(`agents.publish.error.revert`)),null}finally{o.value=!1}}return{publish:c,unpublish:l,revertToPublished:u,publishing:o}}e(),p(),m();var Y=[`data-test-id`],X=[`onClick`],Z=[`data-test-id`],Q=C(o({__name:`AgentTemplateList`,emits:[`select`],setup(e,{emit:a}){let o=a,p=N();return(e,a)=>(d(),i(`ul`,{class:f(e.$style.examples)},[(d(!0),i(n,null,h(s(H),(n,a)=>(d(),i(`li`,{key:n.id,class:f(e.$style.example),style:l({"--intro-index":a+1}),"data-test-id":`agent-template-${n.id}`},[_(`button`,{type:`button`,class:f(e.$style.exampleButton),onClick:e=>o(`select`,n)},[_(`span`,{class:f(e.$style.exampleIcon),"data-test-id":`agent-template-icon-${n.id}`},[c(D,{personalisation:{icon:n.icon,gradient:n.gradient},size:40},null,8,[`personalisation`])],10,Z),_(`span`,{class:f(e.$style.exampleText)},[c(s(b),{class:f(e.$style.exampleLabel)},{default:t(()=>[r(u(s(p).baseText(n.labelKey)),1)]),_:2},1032,[`class`]),c(s(b),{color:`text-light`,class:f(e.$style.exampleDescription),title:s(p).baseText(n.descriptionKey)},{default:t(()=>[r(u(s(p).baseText(n.descriptionKey)),1)]),_:2},1032,[`class`,`title`])],2),c(s(L),{icon:`arrow-right`,color:`text-light`,size:`medium`,class:f(e.$style.exampleArrow)},null,8,[`class`])],10,X)],14,Y))),128))],2))}}),[[`__cssModules`,{$style:{examples:`_examples_1g82h_452`,example:`_example_1g82h_452`,fadeInUp:`_fadeInUp_1g82h_1`,exampleButton:`_exampleButton_1g82h_474`,exampleArrow:`_exampleArrow_1g82h_493`,exampleIcon:`_exampleIcon_1g82h_502`,exampleText:`_exampleText_1g82h_507`,exampleLabel:`_exampleLabel_1g82h_514`,exampleDescription:`_exampleDescription_1g82h_518`,shimmer:`_shimmer_1g82h_1`,spin:`_spin_1g82h_1`,"skeleton-pulse":`_skeleton-pulse_1g82h_1`,opacityPulse:`_opacityPulse_1g82h_1`,popoverIn:`_popoverIn_1g82h_1`,fadeIn:`_fadeIn_1g82h_1`,collapsibleSlideDown:`_collapsibleSlideDown_1g82h_1`,collapsibleSlideUp:`_collapsibleSlideUp_1g82h_1`,collapsibleSlideDownBlurred:`_collapsibleSlideDownBlurred_1g82h_1`,collapsibleSlideUpBlurred:`_collapsibleSlideUpBlurred_1g82h_1`,blurSwapIn:`_blurSwapIn_1g82h_1`,blurSwapOut:`_blurSwapOut_1g82h_1`,pulse:`_pulse_1g82h_1`,pulseGlow:`_pulseGlow_1g82h_1`,pulseGlowDelayed:`_pulseGlowDelayed_1g82h_1`,fade:`_fade_1g82h_1`,fadeInDown:`_fadeInDown_1g82h_1`,fadeInLeft:`_fadeInLeft_1g82h_1`,fadeInRight:`_fadeInRight_1g82h_1`,fadeOut:`_fadeOut_1g82h_1`,fadeOutDown:`_fadeOutDown_1g82h_1`,fadeOutUp:`_fadeOutUp_1g82h_1`,fadeOutLeft:`_fadeOutLeft_1g82h_1`,fadeOutRight:`_fadeOutRight_1g82h_1`,ping:`_ping_1g82h_1`,blinkBackground:`_blinkBackground_1g82h_1`,typingBlink:`_typingBlink_1g82h_1`}}]]);export{B as a,V as c,H as i,J as n,G as o,K as r,W as s,Q as t};
@@ -0,0 +1,3 @@
1
+ try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d09f9083-d942-4d35-bfc9-e8f587f6b1f5`,e._sentryDebugIdIdentifier=`sentry-dbid-d09f9083-d942-4d35-bfc9-e8f587f6b1f5`)})()}catch{}import{o as e,t}from"./rolldown-runtime-Cnm24cU6.js";import{$d as n,Bd as r,Ef as i,Fd as a,Hd as o,Jd as s,Jf as c,Rd as l,Vd as u,bp as d,df as f,ef as p,hp as m,jf as h,mf as g,ms as _,np as v,pf as y,zd as b}from"./vendor-Byl1K1cb.js";import{Fi as ee,HO as te,Ii as ne,MO as x,RE as re,RO as ie,Si as ae,qO as oe}from"./app-CLvVIuPO.js";import{t as se}from"./agentBuilderInjectionKeys-CicexZsO.js";var ce=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},h={year:l,month:d,day:l},g={year:l,month:d,day:l,weekday:d},_={hour:l,minute:l},v={hour:l,minute:l,second:l},y={hour:l,minute:l,second:l,timeZoneName:u},b={hour:l,minute:l,second:l,timeZoneName:d},ee={hour:l,minute:l,hourCycle:`h23`},te={hour:l,minute:l,second:l,hourCycle:`h23`},ne={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},x={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},re={year:l,month:l,day:l,hour:l,minute:l},ie={year:l,month:l,day:l,hour:l,minute:l,second:l},ae={year:l,month:u,day:l,hour:l,minute:l},oe={year:l,month:u,day:l,hour:l,minute:l,second:l},se={year:l,month:u,day:l,weekday:u,hour:l,minute:l},ce={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},le={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},ue={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},S={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},C=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},de=null,fe=class e extends C{static get instance(){return de===null&&(de=new e),de}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Nt(e,t,n)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},pe=new Map;function me(e){let t=pe.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),pe.set(e,t)),t}var w={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function T(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=w[t];t===`era`?r[a]=i:R(a)||(r[a]=parseInt(i,10))}return r}var E=new Map,D=class e extends C{static create(t){let n=E.get(t);return n===void 0&&E.set(t,n=new e(t)),n}static resetCache(){E.clear(),pe.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Nt(e,t,n,this.name)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=me(this.name),[r,i,a,o,s,c,l]=n.formatToParts?T(n,t):he(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=kt({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/6e4}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},ge={};function _e(e,t={}){let n=JSON.stringify([e,t]),r=ge[n];return r||(r=new Intl.ListFormat(e,t),ge[n]=r),r}var O=new Map;function k(e,t={}){let n=JSON.stringify([e,t]),r=O.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),O.set(n,r)),r}var ve=new Map;function ye(e,t={}){let n=JSON.stringify([e,t]),r=ve.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),ve.set(n,r)),r}var be=new Map;function xe(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=be.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),be.set(i,a)),a}var A=null;function Se(){return A||(A=new Intl.DateTimeFormat().resolvedOptions().locale,A)}var Ce=new Map;function we(e){let t=Ce.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Ce.set(e,t)),t}var Te=new Map;function Ee(e){let t=Te.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Ie,...t}),Te.set(e,t)}return t}function De(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=k(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=k(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Oe(e,t,n){return(n||t)&&(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function ke(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Ae(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function je(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function Me(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||we(e.locale).numberingSystem===`latn`}var Ne=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=ye(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}return H(this.floor?Math.floor(e):Tt(e,3),this.padTo)}},Pe=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&D.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=k(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Fe=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&_t()&&(this.rtf=xe(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):nn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Ie={firstDay:1,minimalDays:4,weekend:[6,7]},j=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||F.defaultLocale,s=o||(a?`en-US`:Se()),c=n||F.defaultNumberingSystem,l=r||F.defaultOutputCalendar,u=St(i)||F.defaultWeekSettings;return new e(s,c,l,u,o)}static resetCache(){A=null,O.clear(),ve.clear(),be.clear(),Ce.clear(),Te.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=De(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Oe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=Me(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,St(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return je(this,e,Ht,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=ke(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return je(this,e,Kt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Ae(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return je(this,void 0,()=>qt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return je(this,e,Zt,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Ne(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Pe(e,this.intl,t)}relFormatter(e={}){return new Fe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return _e(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||we(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:vt()?Ee(this.locale):Ie}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Le=null,M=class e extends C{static get utcInstance(){return Le===null&&(Le=new e(0)),Le}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(Pt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Lt(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Lt(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Re=class extends C{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function N(e,t){if(R(e)||e===null)return t;if(e instanceof C)return e;if(ht(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?fe.instance:n===`utc`||n===`gmt`?M.utcInstance:M.parseSpecifier(n)||D.create(e)}return z(e)?M.instance(e):typeof e==`object`&&`offset`in e&&typeof e.offset==`function`?e:new Re(e)}var ze={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},Be={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ve=ze.hanidec.replace(/[\[|\]]/g,``).split(``);function He(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(ze.hanidec)!==-1)t+=Ve.indexOf(e[n]);else for(let e in Be){let[n,i]=Be[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}var Ue=new Map;function We(){Ue.clear()}function P({numberingSystem:e},t=``){let n=e||`latn`,r=Ue.get(n);r===void 0&&(r=new Map,Ue.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${ze[n]}${t}`),r.set(t,i)),i}var Ge=()=>Date.now(),Ke=`system`,qe=null,Je=null,Ye=null,Xe=60,Ze,Qe=null,F=class{static get now(){return Ge}static set now(e){Ge=e}static set defaultZone(e){Ke=e}static get defaultZone(){return N(Ke,fe.instance)}static get defaultLocale(){return qe}static set defaultLocale(e){qe=e}static get defaultNumberingSystem(){return Je}static set defaultNumberingSystem(e){Je=e}static get defaultOutputCalendar(){return Ye}static set defaultOutputCalendar(e){Ye=e}static get defaultWeekSettings(){return Qe}static set defaultWeekSettings(e){Qe=St(e)}static get twoDigitCutoffYear(){return Xe}static set twoDigitCutoffYear(e){Xe=e%100}static get throwOnInvalid(){return Ze}static set throwOnInvalid(e){Ze=e}static resetCaches(){j.resetCache(),D.resetCache(),$.resetCache(),We()}},I=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},$e=[0,31,59,90,120,151,181,212,243,273,304,334],et=[0,31,60,91,121,152,182,213,244,274,305,335];function L(e,t){return new I(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function tt(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function nt(e,t,n){return n+(Et(e)?et:$e)[t-1]}function rt(e,t){let n=Et(e)?et:$e,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function it(e,t){return(e-t+7)%7+1}function at(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=nt(r,i,a),s=it(tt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=jt(l,t,n)):c>jt(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Rt(e)}}function ot(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=it(tt(r,1,t),n),s=Dt(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=Dt(l)):c>s?(l=r+1,c-=Dt(r)):l=r;let{month:u,day:d}=rt(l,c);return{year:l,month:u,day:d,...Rt(e)}}function st(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:nt(t,n,r),...Rt(e)}}function ct(e){let{year:t,ordinal:n}=e,{month:r,day:i}=rt(t,n);return{year:t,month:r,day:i,...Rt(e)}}function lt(e,t){if(!R(e.localWeekday)||!R(e.localWeekNumber)||!R(e.localWeekYear)){if(!R(e.weekday)||!R(e.weekNumber)||!R(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return R(e.localWeekday)||(e.weekday=e.localWeekday),R(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),R(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function ut(e,t=4,n=1){let r=mt(e.weekYear),i=V(e.weekNumber,1,jt(e.weekYear,t,n)),a=V(e.weekday,1,7);return r?i?!a&&L(`weekday`,e.weekday):L(`week`,e.weekNumber):L(`weekYear`,e.weekYear)}function dt(e){let t=mt(e.year),n=V(e.ordinal,1,Dt(e.year));return t?!n&&L(`ordinal`,e.ordinal):L(`year`,e.year)}function ft(e){let t=mt(e.year),n=V(e.month,1,12),r=V(e.day,1,Ot(e.year,e.month));return t?n?!r&&L(`day`,e.day):L(`month`,e.month):L(`year`,e.year)}function pt(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=V(t,0,23)||t===24&&n===0&&r===0&&i===0,o=V(n,0,59),s=V(r,0,59),c=V(i,0,999);return a?o?s?!c&&L(`millisecond`,i):L(`second`,r):L(`minute`,n):L(`hour`,t)}function R(e){return e===void 0}function z(e){return typeof e==`number`}function mt(e){return typeof e==`number`&&e%1==0}function ht(e){return typeof e==`string`}function gt(e){return Object.prototype.toString.call(e)===`[object Date]`}function _t(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function vt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function yt(e){return Array.isArray(e)?e:[e]}function bt(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function xt(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function St(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!V(e.firstDay,1,7)||!V(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!V(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function V(e,t,n){return mt(e)&&e>=t&&e<=n}function Ct(e,t){return e-t*Math.floor(e/t)}function H(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function U(e){if(!(R(e)||e===null||e===``))return parseInt(e,10)}function W(e){if(!(R(e)||e===null||e===``))return parseFloat(e)}function wt(e){if(!(R(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function Tt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function Et(e){return e%4==0&&(e%100!=0||e%400==0)}function Dt(e){return Et(e)?366:365}function Ot(e,t){let n=Ct(t-1,12)+1,r=e+(t-n)/12;return n===2?Et(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function kt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function At(e,t,n){return-it(tt(e,1,t),n)+t-1}function jt(e,t=4,n=1){let r=At(e,t,n),i=At(e+1,t,n);return(Dt(e)-r+i)/7}function Mt(e){return e>99?e:e>F.twoDigitCutoffYear?1900+e:2e3+e}function Nt(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function Pt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Ft(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function It(e,t){let n={};for(let r in e)if(B(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Ft(i)}return n}function Lt(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${H(n,2)}:${H(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${H(n,2)}${H(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Rt(e){return xt(e,[`hour`,`minute`,`second`,`millisecond`])}var zt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Bt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Vt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Ht(e){switch(e){case`narrow`:return[...Vt];case`short`:return[...Bt];case`long`:return[...zt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Ut=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Wt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Gt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Kt(e){switch(e){case`narrow`:return[...Gt];case`short`:return[...Wt];case`long`:return[...Ut];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var qt=[`AM`,`PM`],Jt=[`Before Christ`,`Anno Domini`],Yt=[`BC`,`AD`],Xt=[`B`,`A`];function Zt(e){switch(e){case`narrow`:return[...Xt];case`short`:return[...Yt];case`long`:return[...Jt];default:return null}}function Qt(e){return qt[e.hour<12?0:1]}function $t(e,t){return Kt(t)[e.weekday-1]}function en(e,t){return Ht(t)[e.month-1]}function tn(e,t){return Zt(t)[e.year<0?0:1]}function nn(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function rn(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var an={D:f,DD:p,DDD:h,DDDD:g,t:_,tt:v,ttt:y,tttt:b,T:ee,TT:te,TTT:ne,TTTT:x,f:re,ff:ae,fff:ce,ffff:ue,F:ie,FF:oe,FFF:le,FFFF:S},G=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return an[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return H(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?Qt(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?en(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?$t(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?tn(t,e):a({era:e},`era`);return rn(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return rn(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},on=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function sn(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function cn(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function ln(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function un(...e){return(t,n)=>{let r={},i=0;for(;i<e.length;i++)r[e[i]]=U(t[n+i]);return[r,null,n+i]}}var dn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,fn=`(?:${dn.source}?(?:\\[(${on.source})\\])?)?`,pn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,mn=RegExp(`${pn.source}${fn}`),hn=RegExp(`(?:[Tt]${mn.source})?`),gn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,_n=/(\d{4})-?W(\d\d)(?:-?(\d))?/,vn=/(\d{4})-?(\d{3})/,yn=un(`weekYear`,`weekNumber`,`weekDay`),bn=un(`year`,`ordinal`),xn=/(\d{4})-(\d\d)-(\d\d)/,Sn=RegExp(`${pn.source} ?(?:${dn.source}|(${on.source}))?`),Cn=RegExp(`(?: ${Sn.source})?`);function wn(e,t,n){let r=e[t];return R(r)?n:U(r)}function Tn(e,t){return[{year:wn(e,t),month:wn(e,t+1,1),day:wn(e,t+2,1)},null,t+3]}function En(e,t){return[{hours:wn(e,t,0),minutes:wn(e,t+1,0),seconds:wn(e,t+2,0),milliseconds:wt(e[t+3])},null,t+4]}function Dn(e,t){let n=!e[t]&&!e[t+1],r=Pt(e[t+1],e[t+2]);return[{},n?null:M.instance(r),t+3]}function On(e,t){return[{},e[t]?D.create(e[t]):null,t+1]}var kn=RegExp(`^T?${pn.source}$`),An=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function jn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(W(n)),months:f(W(r)),weeks:f(W(i)),days:f(W(a)),hours:f(W(o)),minutes:f(W(s)),seconds:f(W(c),c===`-0`),milliseconds:f(wt(l),d)}]}var Mn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nn(e,t,n,r,i,a,o){let s={year:t.length===2?Mt(U(t)):U(t),month:Bt.indexOf(n)+1,day:U(r),hour:U(i),minute:U(a)};return o&&(s.second=U(o)),e&&(s.weekday=e.length>3?Ut.indexOf(e)+1:Wt.indexOf(e)+1),s}var Pn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Fn(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=Nn(t,i,r,n,a,o,s),p;return p=c?Mn[c]:l?0:Pt(u,d),[f,new M(p)]}function In(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Ln=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Rn=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,zn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Bn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,i,r,n,a,o,s),M.utcInstance]}function Vn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,s,n,r,i,a,o),M.utcInstance]}var Hn=sn(gn,hn),Un=sn(_n,hn),Wn=sn(vn,hn),Gn=sn(mn),Kn=cn(Tn,En,Dn,On),qn=cn(yn,En,Dn,On),Jn=cn(bn,En,Dn,On),Yn=cn(En,Dn,On);function Xn(e){return ln(e,[Hn,Kn],[Un,qn],[Wn,Jn],[Gn,Yn])}function Zn(e){return ln(In(e),[Pn,Fn])}function Qn(e){return ln(e,[Ln,Bn],[Rn,Bn],[zn,Vn])}function $n(e){return ln(e,[An,jn])}var er=cn(En);function tr(e){return ln(e,[kn,er])}var nr=sn(xn,Cn),rr=sn(Sn),ir=cn(En,Dn,On);function ar(e){return ln(e,[nr,Kn],[rr,ir])}var or=`Invalid Duration`,sr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},cr={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...sr},K=146097/400,lr=146097/4800,ur={years:{quarters:4,months:12,weeks:K/7,days:K,hours:K*24,minutes:K*24*60,seconds:K*24*60*60,milliseconds:K*24*60*60*1e3},quarters:{months:3,weeks:K/28,days:K/4,hours:K*24/4,minutes:K*24*60/4,seconds:K*24*60*60/4,milliseconds:K*24*60*60*1e3/4},months:{weeks:lr/7,days:lr,hours:lr*24,minutes:lr*24*60,seconds:lr*24*60*60,milliseconds:lr*24*60*60*1e3},...sr},q=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],dr=q.slice(0).reverse();function J(e,t,n=!1){return new Y({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function fr(e,t){let n=t.milliseconds??0;for(let r of dr.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function pr(e,t){let n=fr(e,t)<0?-1:1;q.reduceRight((r,i)=>{if(R(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),q.reduce((n,r)=>{if(R(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function mr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var Y=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?ur:cr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||j.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:It(t,e.normalizeUnit),loc:j.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(z(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=$n(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=tr(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof I?t:new I(t,n);if(F.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?G.create(this.loc,n).formatDurationFromString(this,e):or}toHuman(e={}){if(!this.isValid)return or;let t=e.showZeros!==!1,n=q.map(n=>{let r=this.values[n];return R(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=Tt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?fr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of q)(B(n.values,e)||B(this.values,e))&&(r[e]=n.get(e)+this.get(e));return J(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Ft(e(this.values[n],n));return J(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...It(t,e.normalizeUnit)};return J(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return J(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return pr(this.matrix,e),J(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=mr(this.normalize().shiftToAll().toObject());return J(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of q)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;z(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else z(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return pr(this.matrix,n),J(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return J(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=mr(this.values);return J(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of q)if(!t(this.values[n],e.values[n]))return!1;return!0}},hr=`Invalid Interval`;function gr(e,t){return!e||!e.isValid?_r.invalid(`missing or invalid start`):!t||!t.isValid?_r.invalid(`missing or invalid end`):t<e?_r.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var _r=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof I?t:new I(t,n);if(F.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return gr(r,i)??new e({start:r,end:i})}static after(t,n){let r=Y.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=Y.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=Y.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=Y.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=Y.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:hr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?G.create(this.s.loc.clone(t),e).formatInterval(this):hr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:hr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Y.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},vr=class{static hasDST(e=F.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return D.isValidZone(e)}static normalizeZone(e){return N(e,F.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||j.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||j.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||j.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||j.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||j.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||j.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||j.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return j.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return j.create(t,null,`gregory`).eras(e)}static features(){return{relative:_t(),localeWeek:vt()}}};function yr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(Y.fromMillis(r).as(`days`))}function br(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=yr(e,t);return(n-n%7)/7}],[`days`,yr]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function xr(e,t,n,r){let[i,a,o,s]=br(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=Y.fromObject(a,r);return l.length>0?Y.fromMillis(c,r).shiftTo(...l).plus(u):u}var Sr=`missing Intl.DateTimeFormat.formatToParts support`;function X(e,t=e=>e){return{regex:e,deser:([e])=>t(He(e))}}var Cr=`[ \xA0]`,wr=new RegExp(Cr,`g`);function Tr(e){return e.replace(/\./g,`\\.?`).replace(wr,Cr)}function Er(e){return e.replace(/\./g,``).replace(wr,` `).toLowerCase()}function Z(e,t){return e===null?null:{regex:RegExp(e.map(Tr).join(`|`)),deser:([n])=>e.findIndex(e=>Er(n)===Er(e))+t}}function Dr(e,t){return{regex:e,deser:([,e,t])=>Pt(e,t),groups:t}}function Or(e){return{regex:e,deser:([e])=>e}}function kr(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function Ar(e,t){let n=P(t),r=P(t,`{2}`),i=P(t,`{3}`),a=P(t,`{4}`),o=P(t,`{6}`),s=P(t,`{1,2}`),c=P(t,`{1,3}`),l=P(t,`{1,6}`),u=P(t,`{1,9}`),d=P(t,`{2,4}`),f=P(t,`{4,6}`),p=e=>({regex:RegExp(kr(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Z(t.eras(`short`),0);case`GG`:return Z(t.eras(`long`),0);case`y`:return X(l);case`yy`:return X(d,Mt);case`yyyy`:return X(a);case`yyyyy`:return X(f);case`yyyyyy`:return X(o);case`M`:return X(s);case`MM`:return X(r);case`MMM`:return Z(t.months(`short`,!0),1);case`MMMM`:return Z(t.months(`long`,!0),1);case`L`:return X(s);case`LL`:return X(r);case`LLL`:return Z(t.months(`short`,!1),1);case`LLLL`:return Z(t.months(`long`,!1),1);case`d`:return X(s);case`dd`:return X(r);case`o`:return X(c);case`ooo`:return X(i);case`HH`:return X(r);case`H`:return X(s);case`hh`:return X(r);case`h`:return X(s);case`mm`:return X(r);case`m`:return X(s);case`q`:return X(s);case`qq`:return X(r);case`s`:return X(s);case`ss`:return X(r);case`S`:return X(c);case`SSS`:return X(i);case`u`:return Or(u);case`uu`:return Or(s);case`uuu`:return X(n);case`a`:return Z(t.meridiems(),0);case`kkkk`:return X(a);case`kk`:return X(d,Mt);case`W`:return X(s);case`WW`:return X(r);case`E`:case`c`:return X(n);case`EEE`:return Z(t.weekdays(`short`,!1),1);case`EEEE`:return Z(t.weekdays(`long`,!1),1);case`ccc`:return Z(t.weekdays(`short`,!0),1);case`cccc`:return Z(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Dr(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Dr(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Or(/[a-z_+-/]{1,256}?/i);case` `:return Or(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:Sr};return m.token=e,m}var jr={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function Mr(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=jr[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Nr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Pr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(B(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}function Fr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return R(e.z)||(n=D.create(e.z)),R(e.Z)||(n||=new M(e.Z),r=e.Z),R(e.q)||(e.M=(e.q-1)*3+1),R(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),R(e.u)||(e.S=wt(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Ir=null;function Lr(){return Ir||=$.fromMillis(1555555555555),Ir}function Rr(e,t){if(e.literal)return e;let n=Ur(G.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function zr(e,t){return Array.prototype.concat(...e.map(e=>Rr(e,t)))}var Br=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zr(G.parseFormat(t),e),this.units=this.tokens.map(t=>Ar(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Nr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Pr(e,this.regex,this.handlers),[r,i,o]=n?Fr(n):[null,null,void 0];if(B(n,`a`)&&B(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Vr(e,t,n){return new Br(e,n).explainFromTokens(t)}function Hr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Vr(e,t,n);return[r,i,a,o]}function Ur(e,t){if(!e)return null;let n=G.create(t,e).dtFormatter(Lr()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>Mr(t,e,i))}var Wr=`Invalid DateTime`,Gr=864e13;function Kr(e){return new I(`unsupported zone`,`the zone "${e.name}" is not supported`)}function qr(e){return e.weekData===null&&(e.weekData=at(e.c)),e.weekData}function Jr(e){return e.localWeekData===null&&(e.localWeekData=at(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Q(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Yr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Xr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Zr(e,t,n){return Yr(kt(e),t,n)}function Qr(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,Ot(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Y.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Yr(kt(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function $r(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}return $.invalid(new I(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?G.create(j.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=H(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=H(e.c.month),n===`month`)return i;i+=`-`}else if(i+=H(e.c.month),n===`month`)return i;return i+=H(e.c.day),i}function ni(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=H(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=H(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=H(e.c.second))}else{if(c+=H(e.c.minute),o===`minute`)break;s&&(c+=H(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=H(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=H(Math.trunc(-e.o/60)),c+=`:`,c+=H(Math.trunc(-e.o%60))):(c+=`+`,c+=H(Math.trunc(e.o/60)),c+=`:`,c+=H(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=F.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=N(t.zone,F.defaultZone);if(!n.isValid)return $.invalid(Kr(n));let r=j.fromObject(t),i,a;if(R(e.year))i=F.now();else{for(let t of oi)R(e[t])&&(e[t]=ri[t]);let t=ft(e)||pt(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Zr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=R(n.round)?!0:n.round,i=R(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=Tt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function mi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var hi,gi=new Map,$=class e{constructor(e){let t=e.zone||F.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new I(`invalid input`):null)||(t.isValid?null:Kr(t));this.ts=R(e.ts)?F.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=z(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xr(this.ts,a),n=Number.isNaN(r.year)?new I(`invalid input`):null,r=n?null:r,i=n?null:a}}this._zone=t,this.loc=e.loc||j.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=M.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=gt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=N(n.zone,F.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:j.fromObject(n)}):e.invalid(Kr(i))}static fromMillis(t,n={}){if(!z(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Gr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:N(n.zone,F.defaultZone),loc:j.fromObject(n)})}static fromSeconds(t,n={}){if(z(t))return new e({ts:t*1e3,zone:N(n.zone,F.defaultZone),loc:j.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=N(n.zone,F.defaultZone);if(!r.isValid)return e.invalid(Kr(r));let i=j.fromObject(n),o=It(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=lt(o,i),l=F.now(),u=R(n.specificOffset)?r.offset(l):n.specificOffset,d=!R(o.ordinal),f=!R(o.year),p=!R(o.month)||!R(o.day),m=f||p,h=o.weekYear||o.weekNumber;if((m||d)&&h)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let g=h||o.weekday&&!m,_,v,y=Xr(l,u);g?(_=si,v=ii,y=at(y,s,c)):d?(_=ci,v=ai,y=st(y)):(_=oi,v=ri);let b=!1;for(let e of _){let t=o[e];R(t)?o[e]=b?v[e]:y[e]:b=!0}let ee=(g?ut(o,s,c):d?dt(o):ft(o))||pt(o);if(ee)return e.invalid(ee);let[te,ne]=Zr(g?ot(o,s,c):d?ct(o):o,u,r),x=new e({ts:te,zone:r,o:ne,loc:i});return o.weekday&&m&&t.weekday!==x.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${x.toISO()}`):x.isValid?x:e.invalid(x.invalid)}static fromISO(e,t={}){let[n,r]=Xn(e);return $r(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Zn(e);return $r(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=Qn(e);return $r(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(R(t)||R(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Hr(j.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):$r(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=ar(e);return $r(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof I?t:new I(t,r);if(F.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Ur(e,j.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return zr(G.parseFormat(e),j.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?qr(this).weekYear:NaN}get weekNumber(){return this.isValid?qr(this).weekNumber:NaN}get weekday(){return this.isValid?qr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Jr(this).weekday:NaN}get localWeekNumber(){return this.isValid?Jr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Jr(this).weekYear:NaN}get ordinal(){return this.isValid?st(this.c).ordinal:NaN}get monthShort(){return this.isValid?vr.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vr.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vr.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vr.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=kt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Xr(s,a),u=Xr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Q(this,{ts:s}),Q(this,{ts:c})]:[this]}get isInLeapYear(){return Et(this.year)}get daysInMonth(){return Ot(this.year,this.month)}get daysInYear(){return this.isValid?Dt(this.year):NaN}get weeksInWeekYear(){return this.isValid?jt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?jt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=G.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(M.instance(e),t)}toLocal(){return this.setZone(F.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=N(t,F.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Zr(r,n,t)}return Q(this,{ts:e,zone:t})}return e.invalid(Kr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Q(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=It(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=lt(t,this.loc),i=!R(t.weekYear)||!R(t.weekNumber)||!R(t.weekday),o=!R(t.ordinal),s=!R(t.year),c=!R(t.month)||!R(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=ot({...at(this.c,n,r),...t},n,r):R(t.ordinal)?(d={...this.toObject(),...t},R(t.day)&&(d.day=Math.min(Ot(d.year,d.month),d.day))):d=ct({...st(this.c),...t});let[f,p]=Zr(d,this.o,this.zone);return Q(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=Y.fromDurationLike(e);return Q(this,Qr(this,t))}minus(e){if(!this.isValid)return this;let t=Y.fromDurationLike(e).negate();return Q(this,Qr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=Y.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0}if(r===`weeks`){if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1}return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?G.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Wr}toLocaleString(e=f,t={}){return this.isValid?G.create(this.loc.clone(t),e).formatDateTime(this):Wr}toLocaleParts(e={}){return this.isValid?G.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Wr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return Y.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=yt(t).map(Y.normalizeUnit),a=e.valueOf()>this.valueOf(),o=xr(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?_r.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return bt(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return bt(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Vr(j.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new Br(j.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(R(t)||R(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=j.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):$r(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return h}static get DATE_HUGE(){return g}static get TIME_SIMPLE(){return _}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return y}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return te}static get TIME_24_WITH_SHORT_OFFSET(){return ne}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return re}static get DATETIME_SHORT_WITH_SECONDS(){return ie}static get DATETIME_MED(){return ae}static get DATETIME_MED_WITH_SECONDS(){return oe}static get DATETIME_MED_WITH_WEEKDAY(){return se}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return le}static get DATETIME_HUGE(){return ue}static get DATETIME_HUGE_WITH_SECONDS(){return S}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&z(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=Y,e.FixedOffsetZone=M,e.IANAZone=D,e.Info=vr,e.Interval=_r,e.InvalidZone=Re,e.Settings=F,e.SystemZone=fe,e.VERSION=`3.7.2`,e.Zone=C})),le=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RE_RANGE=e.RE_WILDCARDS=e.PRESETS=e.TIME_UNITS_LEN=e.TIME_UNITS=e.TIME_UNITS_MAP=e.ALIASES=e.PARSE_DEFAULTS=e.CONSTRAINTS=void 0,e.CONSTRAINTS=Object.freeze({second:[0,59],minute:[0,59],hour:[0,23],dayOfMonth:[1,31],month:[1,12],dayOfWeek:[0,7]}),e.PARSE_DEFAULTS=Object.freeze({second:`0`,minute:`*`,hour:`*`,dayOfMonth:`*`,month:`*`,dayOfWeek:`*`}),e.ALIASES=Object.freeze({jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12,sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}),e.TIME_UNITS_MAP=Object.freeze({SECOND:`second`,MINUTE:`minute`,HOUR:`hour`,DAY_OF_MONTH:`dayOfMonth`,MONTH:`month`,DAY_OF_WEEK:`dayOfWeek`}),e.TIME_UNITS=Object.freeze(Object.values(e.TIME_UNITS_MAP)),e.TIME_UNITS_LEN=e.TIME_UNITS.length,e.PRESETS=Object.freeze({"@yearly":`0 0 0 1 1 *`,"@monthly":`0 0 0 1 * *`,"@weekly":`0 0 0 * * 0`,"@daily":`0 0 0 * * *`,"@hourly":`0 0 * * * *`,"@minutely":`0 * * * * *`,"@secondly":`* * * * * *`,"@weekdays":`0 0 0 * * 1-5`,"@weekends":`0 0 0 * * 0,6`}),e.RE_WILDCARDS=/\*/g,e.RE_RANGE=/^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g})),ue=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExclusiveParametersError=e.CronError=void 0;var t=class extends Error{};e.CronError=t,e.ExclusiveParametersError=class extends t{constructor(e,t){super(`You can't specify both ${e} and ${t}`)}}})),S=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronTime=void 0;var t=ce(),n=le(),r=ue();e.CronTime=class e{constructor(e,n,i){if(this.realDate=!1,this.second={},this.minute={},this.hour={},this.dayOfMonth={},this.month={},this.dayOfWeek={},n!=null&&i!=null)throw new r.ExclusiveParametersError(`timeZone`,`utcOffset`);if(n){if(!t.DateTime.fromObject({},{zone:n}).isValid)throw new r.CronError(`Invalid timezone.`);this.timeZone=n}if(i!=null&&(this.utcOffset=i),n==null&&i==null){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone=e}e instanceof Date||e instanceof t.DateTime?(this.source=e instanceof Date?t.DateTime.fromJSDate(e):e,this.realDate=!0):(this.source=e,this._parse(this.source))}static validateCronExpression(t){try{return new e(t),{valid:!0}}catch(e){return{valid:!1,error:e}}}_getWeekDay(e){return e.weekday===7?0:e.weekday}sendAt(e){let n=this.realDate&&this.source instanceof t.DateTime?this.source:t.DateTime.utc();if(this.timeZone&&(n=n.setZone(this.timeZone)),this.utcOffset!==void 0){let e=this.utcOffset<0?`-`:`+`,t=Math.trunc(this.utcOffset/60),i=String(Math.abs(t)).padStart(2,`0`),a=Math.abs(this.utcOffset-t*60),o=`UTC${e}${i}:${String(a).padStart(2,`0`)}`;if(n=n.setZone(o),!n.isValid)throw new r.CronError(`ERROR: You specified an invalid UTC offset.`)}if(this.realDate){if(t.DateTime.local()>n)throw new r.CronError(`WARNING: Date in past. Will never be fired.`);return n}if(e===void 0||isNaN(e)||e<0)return this.getNextDateFrom(n);{let t=[];for(;e>0;e--)n=this.getNextDateFrom(n),t.push(n);return t}}getTimeout(){return this.sendAt().toMillis()-t.DateTime.local().toMillis()}toString(){return this.toJSON().join(` `)}toJSON(){return n.TIME_UNITS.map(e=>this._wcOrAll(e))}getNextDateFrom(e,n){e instanceof Date&&(e=t.DateTime.fromJSDate(e)),n?e=e.setZone(n):n=e.zone.zoneName??e.zone.fixed;let i=t.DateTime.fromFormat(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`,`yyyy-M-d H:m:s`,{zone:`UTC`}),a=i.toMillis();if(this.realDate||i.millisecond>0&&(i=i.set({millisecond:0,second:i.second+1})),!i.isValid)throw new r.CronError(`ERROR: You specified an invalid date.`);let o=t.DateTime.now().plus({years:8});for(;;){if(i>o)throw new r.CronError(`Something went wrong. No execution date was found in the next 8 years.
2
+ Please provide the following string if you would like to help debug:
3
+ Time Zone: ${n?.toString()??`""`} - Cron String: ${this.source.toString()} - UTC offset: ${i.offset} - current Date: ${t.DateTime.local().toString()}`);if(!(i.month in this.month)&&Object.keys(this.month).length!==12)i=i.plus({month:1}),i=i.set({day:1,hour:0,minute:0,second:0});else if(!(i.day in this.dayOfMonth)&&Object.keys(this.dayOfMonth).length!==31&&!(this._getWeekDay(i)in this.dayOfWeek&&Object.keys(this.dayOfWeek).length!==7)||!(this._getWeekDay(i)in this.dayOfWeek)&&Object.keys(this.dayOfWeek).length!==7&&!(i.day in this.dayOfMonth&&Object.keys(this.dayOfMonth).length!==31))i=i.plus({days:1}),i=i.set({hour:0,minute:0,second:0});else if(!(i.hour in this.hour)&&Object.keys(this.hour).length!==24)i=i.plus({hour:1}),i=i.set({minute:0,second:0});else if(!(i.minute in this.minute)&&Object.keys(this.minute).length!==60)i=i.plus({minute:1}),i=i.set({second:0});else if(i.toMillis()===a||!(i.second in this.second)&&Object.keys(this.second).length!==60)i=i.plus({second:1});else break}let s=i.hour,c=i.minute;i=t.DateTime.fromFormat(`${i.year}-${i.month}-${i.day} ${i.hour}:${i.minute}:${i.second}`,`yyyy-M-d H:m:s`,{zone:n});let l=t.DateTime.fromFormat(`${i.year}-1-1 0:0:0`,`yyyy-M-d H:m:s`,{zone:n});if((s!==i.hour||c!==i.minute)&&l.offset!==i.offset){for(;i.minus({minute:1}).offset!==l.offset;)i=i.minus({minute:1});return i}let u=i.minus({hour:1}),d=i.minus({hour:2});(u.hour===i.hour||d.hour===u.hour)&&u>e&&(i=u);let f=i.minus({minute:30});return(f.minute===i.minute||u.minute===f.minute)&&f>e&&(i=f),i}_wcOrAll(e){if(this._hasAll(e))return`*`;let t=[];for(let n in this[e])t.push(n);return t.join(`,`)}_hasAll(e){let t=n.CONSTRAINTS[e],r=t[0],i=e===n.TIME_UNITS_MAP.DAY_OF_WEEK?t[1]-1:t[1];for(let t=r,n=i;t<n;t++)if(!(t in this[e]))return!1;return!0}_parse(e){e=e.toLowerCase(),Object.keys(n.PRESETS).includes(e)&&(e=n.PRESETS[e]),e=e.replace(/[a-z]{1,3}/gi,e=>{if(Object.keys(n.ALIASES).includes(e))return n.ALIASES[e].toString();throw new r.CronError(`Unknown alias: ${e}`)});let t=e.trim().split(/\s+/);if(t.length<n.TIME_UNITS_LEN-1)throw new r.CronError(`Too few fields`);if(t.length>n.TIME_UNITS_LEN)throw new r.CronError(`Too many fields`);let i=t.length;for(let e of n.TIME_UNITS){let r=t[n.TIME_UNITS.indexOf(e)-(n.TIME_UNITS_LEN-i)]??n.PARSE_DEFAULTS[e];this._parseField(r,e)}}_parseField(e,t){let i=this[t],a,o=n.CONSTRAINTS[t],s=o[0],c=o[1];e.split(`,`).forEach(e=>{let t=e.indexOf(`*`);if(t!==-1&&t!==0)throw new r.CronError(`Field (${e}) has an invalid wildcard expression`)}),e=e.replace(n.RE_WILDCARDS,`${s}-${c}`);let l=e.split(`,`);for(let o of l){let l=[...o.matchAll(n.RE_RANGE)][0];if(l?.[1]!==void 0){let[,n,o,u]=l,d=parseInt(n,10),f=o===void 0?void 0:parseInt(o,10),p=u!==void 0,m=parseInt(u??`1`,10);if(m===0)throw new r.CronError(`Field (${t}) has a step of zero`);if(f!==void 0&&d>f)throw new r.CronError(`Field (${t}) has an invalid range`);if(d<s||f!==void 0&&f>c||f===void 0&&d>c)throw new r.CronError(`Field value (${e}) is out of range`);d=Math.min(Math.max(s,~~Math.abs(d)),c),f=f===void 0?p?c:d:Math.min(c,~~Math.abs(f)),a=d;do i[a]=!0,a+=m;while(a<=f);t===`dayOfWeek`&&(!i[0]&&i[7]&&(i[0]=i[7]),delete i[7])}else throw new r.CronError(`Field (${t}) cannot be parsed`)}}}})),C=t(((e,t,n)=>{var r=n&&n.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.CronJob=void 0;var i=_(),a=ue(),o=S();e.CronJob=class e{get isActive(){return this._isActive}get isCallbackRunning(){return this._isCallbackRunning}constructor(e,t,n,r,i,s,c,l,u,d,f,p,m){if(this.unrefTimeout=!1,this.lastExecution=null,this.runOnce=!1,this.waitForCompletion=!1,this.threshold=250,this._isActive=!1,this._isCallbackRunning=!1,this._callbacks=[],this.context=s??this,this.waitForCompletion=!!d,this.errorHandler=f,i!=null&&l!=null)throw new a.ExclusiveParametersError(`timeZone`,`utcOffset`);this.cronTime=i==null?l==null?new o.CronTime(e,i,l):new o.CronTime(e,null,l):new o.CronTime(e,i,null),u!=null&&(this.unrefTimeout=u),n!=null&&(this.onComplete=this._fnWrap(n)),m!=null&&(this.threshold=Math.abs(m)),p!=null&&(this.name=p),this.cronTime.realDate&&(this.runOnce=!0),this.addCallback(this._fnWrap(t)),c&&(this.lastExecution=new Date,this.fireOnTick()),r&&this.start()}static from(t){if(t.timeZone!=null&&t.utcOffset!=null)throw new a.ExclusiveParametersError(`timeZone`,`utcOffset`);return t.timeZone==null?t.utcOffset==null?new e(t.cronTime,t.onTick,t.onComplete,t.start,t.timeZone,t.context,t.runOnInit,t.utcOffset,t.unrefTimeout,t.waitForCompletion,t.errorHandler,t.name,t.threshold):new e(t.cronTime,t.onTick,t.onComplete,t.start,null,t.context,t.runOnInit,t.utcOffset,t.unrefTimeout,t.waitForCompletion,t.errorHandler,t.name,t.threshold):new e(t.cronTime,t.onTick,t.onComplete,t.start,t.timeZone,t.context,t.runOnInit,t.utcOffset,t.unrefTimeout,t.waitForCompletion,t.errorHandler,t.name,t.threshold)}_fnWrap(e){switch(typeof e){case`function`:return e;case`string`:{let[t,...n]=e.split(` `);return i.spawn.bind(void 0,t??e,n,{})}case`object`:return i.spawn.bind(void 0,e.command,e.args??[],e.options??{})}}addCallback(e){typeof e==`function`&&this._callbacks.push(e)}setTime(e){if(!(e instanceof o.CronTime))throw new a.CronError(`time must be an instance of CronTime.`);let t=this._isActive;this.stop(),this.cronTime=e,e.realDate&&(this.runOnce=!0),t&&this.start()}nextDate(){return this.cronTime.sendAt()}fireOnTick(){return r(this,void 0,void 0,function*(){if(!(this.waitForCompletion&&this._isCallbackRunning)){this._isCallbackRunning=!0;try{for(let e of this._callbacks){let t=e.call(this.context,this.onComplete);t&&typeof t==`object`&&typeof t.then==`function`&&(this.waitForCompletion?yield t:t.catch(e=>{this.errorHandler==null?console.error(`[Cron] error in callback`,e):this.errorHandler(e)}))}}catch(e){this.errorHandler==null?console.error(`[Cron] error in callback`,e):this.errorHandler(e)}finally{this._isCallbackRunning=!1}}})}nextDates(e){return this.cronTime.sendAt(e??0)}start(){if(this._isActive)return;this._isActive=!0;let e=2147483647,t=this.cronTime.getTimeout(),n=0,r,i=e=>{r=Date.now(),this._timeout=setTimeout(a,Math.max(e,1)),this.unrefTimeout&&typeof this._timeout.unref==`function`&&this._timeout.unref()},a=()=>{let a=r+t-Date.now();if(a>0){let e=this.cronTime.getTimeout();e>a&&(e=a),n+=e}n?(n>e?(n-=e,t=e):(t=n,n=0),i(t)):(this.lastExecution=new Date,this._isActive=!1,this.runOnce||this.start(),this.fireOnTick())};if(t>=0)t>e&&(n=t-e,t=e),i(t);else{let e=Math.abs(t),n=`[Cron] Missed execution deadline by ${e}ms for job${this.name?` "${this.name}"`:``} with cron expression '${String(this.cronTime.source)}'`;e<=this.threshold?(console.warn(`${n}. Executing immediately.`),this.lastExecution=new Date,this.fireOnTick()):console.warn(`${n}. Skipping execution as it exceeds threshold (${this.threshold}ms).`),t=this.cronTime.getTimeout(),i(t)}}lastDate(){return this.lastExecution}_executeOnComplete(){return r(this,void 0,void 0,function*(){if(typeof this.onComplete==`function`)try{yield this.onComplete.call(this.context)}catch(e){console.error(`[Cron] error in onComplete callback:`,e)}})}_waitForJobCompletion(){return r(this,void 0,void 0,function*(){for(;this._isCallbackRunning;)yield new Promise(e=>setTimeout(e,100))})}stop(){if(this._timeout&&clearTimeout(this._timeout),this._isActive=!1,!this.waitForCompletion)this._executeOnComplete();else return Promise.resolve().then(()=>r(this,void 0,void 0,function*(){yield this._waitForJobCompletion(),yield this._executeOnComplete()}))}}})),de=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateCronExpression=e.timeout=e.sendAt=e.CronTime=e.CronJob=void 0;var t=S(),n=C();Object.defineProperty(e,"CronJob",{enumerable:!0,get:function(){return n.CronJob}});var r=S();Object.defineProperty(e,"CronTime",{enumerable:!0,get:function(){return r.CronTime}}),e.sendAt=e=>new t.CronTime(e).sendAt(),e.timeout=e=>new t.CronTime(e).getTimeout(),e.validateCronExpression=t.CronTime.validateCronExpression})),fe=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={6949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(9515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},8333(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var r=n(1823),i=n(6949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0||i,o=r.verbose,s=o!==void 0&&o,c=r.dayOfWeekStartIndexZero,l=c===void 0||c,u=r.monthStartIndexZero,d=u!==void 0&&u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p!==void 0&&p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields,v={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_!==void 0&&_};return v.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,v).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{var n=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var r=this.getTimeOfDayDescription(),a=this.getDayOfMonthDescription(),o=this.getMonthDescription(),s=this.getDayOfWeekDescription(),c=this.getYearDescription();t+=r+a+s+o+c,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a&&(a+=` `),a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)},{min:0,max:59})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}},{min:0,max:59})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()},{min:0,max:23})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l)}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}if(n==`*`&&this.expressionParts[5]!=`*`)return``;t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)})}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o,s){var c=null,l=e.indexOf(`/`)>-1,u=e.indexOf(`-`)>-1,d=e.indexOf(`,`)>-1;if(!e)c=``;else if(e===`*`)c=t;else if(!l&&!u&&!d)c=r.StringUtilities.format(o(e),n(e));else if(d){for(var f=e.split(`,`),p=``,m=this.i18n.spaceAnd(),h=0;h<f.length;h++)if(h>0&&f.length>2&&(p+=`,`,h<f.length-1&&(p+=` `)),h>0&&f.length>1&&(h==f.length-1||f.length==2)&&(p+=m==`,`&&f.length>2?` `:`${m} `),f[h].indexOf(`/`)>-1||f[h].indexOf(`-`)>-1){var g=f[h].indexOf(`-`)>-1&&f[h].indexOf(`/`)==-1,_=this.getSegmentDescription(f[h],t,n,i,g?this.i18n.commaX0ThroughX1:a,o);g&&(_=_.replace(`, `,``)),p+=_}else if(!l)p+=n(f[h]);else{var v=this.getSegmentDescription(f[h],t,n,i,a,o);v&&v.startsWith(`, `)&&(v=v.substring(2)),p+=v}c=l?p:r.StringUtilities.format(o(e),p)}else if(l){var f=e.split(`/`);if(c=r.StringUtilities.format(i(f[1]),f[1]),f[0].indexOf(`-`)>-1){var y=this.generateRangeSegmentDescription(f[0],a,n);y.indexOf(`, `)!=0&&(c+=`, `),c+=y}else if(f[0].indexOf(`*`)==-1){var b=r.StringUtilities.format(o(f[0]),n(f[0]));b=b.replace(`, `,``),c+=r.StringUtilities.format(this.i18n.commaStartingX0(),b)}c+=this.getWrappingIncrementDescription(e,s,t,n,i,a,o)}else u&&(c=this.generateRangeSegmentDescription(e,a,n));return c},e.prototype.getWrappingIncrementDescription=function(e,t,n,r,i,a,o){if(!this.options.verbose||!t)return``;var s=e.split(`/`),c=s[0],l=s[1],u=parseInt(l),d=t.max-t.min+1,f=c===`*`,p=Number.isInteger(u)&&u>1,m=p&&d%u===0;if(!f||!p||m)return``;for(var h=[],g=t.min;g<=t.max;g+=u)h.push(g);if(h.length<2)return``;var _=this.getSegmentDescription(h.join(`,`),n,r,i,a,o);return _?`, ${_}`:``},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;n&&(l=`:${(`00`+n).substring(n.length)}`);var u=a.toString(),d=(`00`+u).substring(u.length),f=o.toString(),p=(`00`+f).substring(f.length),m=this.options.trimHoursLeadingZero?u:d;return`${c?s:``}${m}:${p}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},3747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(9486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},9486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},9515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},1823(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.toString=void 0;var t=n(8333),i=n(3747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())})),pe=de(),me=e(fe(),1),w={frequency:`daily`,minute:0,hour:9,dayOfWeek:1,dayOfMonth:1};function he(e){let{minute:t,hour:n,dayOfWeek:r,dayOfMonth:i,frequency:a}=e;switch(a){case`hourly`:return`${t} * * * *`;case`daily`:return`${t} ${n} * * *`;case`weekly`:return`${t} ${n} * * ${r}`;case`monthly`:return`${t} ${n} ${i} * *`}}function T(e,t,n){if(!/^\d+$/.test(e))return null;let r=Number(e);return r>=t&&r<=n?r:null}function E(e){let t=e.trim().split(/\s+/);if(t.length!==5)return null;let[n,r,i,a,o]=t;if(a!==`*`)return null;let s=T(n,0,59);if(s===null)return null;if(r===`*`&&i===`*`&&o===`*`)return{...w,frequency:`hourly`,minute:s};let c=T(r,0,23);if(c===null)return null;if(i===`*`&&o===`*`)return{...w,frequency:`daily`,minute:s,hour:c};if(i===`*`){let e=T(o,0,7);return e===null?null:{...w,frequency:`weekly`,minute:s,hour:c,dayOfWeek:e===7?0:e}}if(o===`*`){let e=T(i,1,31);return e===null?null:{...w,frequency:`monthly`,minute:s,hour:c,dayOfMonth:e}}return null}function D(e,t){if(!e.trim())return null;try{return new pe.CronTime(e,t).sendAt().toJSDate()}catch{return null}}function ge(e){try{return me.default.toString(e,{throwExceptionOnParseError:!0,use24HourTimeFormat:!0})}catch{return null}}function _e(e,t=`long`){return new Intl.DateTimeFormat(void 0,{weekday:t,timeZone:`UTC`}).format(new Date(Date.UTC(2024,0,7+e)))}function O(e,t){return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(2024,0,1,e,t))}function k(e,t){return new Intl.DateTimeFormat(void 0,{timeZone:t,weekday:`short`,day:`numeric`,month:`short`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`}).format(e)}n(),v(),h();var ve={key:2},ye={key:0},be={key:1},xe=5,A=te(s({__name:`AgentValidationTooltip`,props:{disabled:{type:Boolean},fallback:{},action:{},issues:{default:()=>[]}},setup(e){let t=e,n=p(se,!1),s=oe(),h={incompatible_nodes:`agents.builder.preview.issue.tool.workflow.incompatibleNodes`,no_supported_trigger:`agents.builder.preview.issue.tool.workflow.noSupportedTrigger`,restricted_by_inline_tool:`agents.builder.preview.issue.restrictedByInlineTool`},_={incompatible_nodes:`agents.publish.issue.tool.workflow.incompatibleNodes`,no_supported_trigger:`agents.publish.issue.tool.workflow.noSupportedTrigger`,not_published:`agents.publish.issue.tool.workflow.notPublished`,azure_classic_endpoint:`agents.publish.issue.agent.credential.azureClassicEndpoint`,restricted_by_inline_tool:`agents.publish.issue.restrictedByInlineTool`},v={instructions:`agents.chat.misconfigured.missing.instructions`,model:`agents.chat.misconfigured.missing.model`,credential:`agents.chat.misconfigured.missing.credential`},te={"agent.instructions.missing_required":`agents.builder.preview.issue.agent.instructions.missingRequired`,"agent.model.missing_required":`agents.builder.preview.issue.agent.model.missingRequired`,"agent.credential.missing_credential":`agents.builder.preview.issue.agent.credential.missingCredential`,"agent.model.invalid_value":`agents.builder.preview.issue.agent.model.invalidValue`,"agent.credential.invalid_credential":`agents.builder.preview.issue.agent.credential.invalidCredential`,"agent.credential.incompatible_credential":`agents.builder.preview.issue.agent.credential.incompatibleCredential`,"mcpServer.url.missing_required":`agents.builder.preview.issue.mcpServer.missingRequired`},re={"agent.instructions.missing_required":`agents.publish.issue.agent.instructions.missingRequired`,"agent.model.missing_required":`agents.publish.issue.agent.model.missingRequired`,"agent.model.invalid_value":`agents.publish.issue.agent.model.invalidValue`,"agent.credential.missing_credential":`agents.publish.issue.agent.credential.missingCredential`,"agent.credential.invalid_credential":`agents.publish.issue.agent.credential.invalidCredential`,"agent.credential.incompatible_credential":`agents.publish.issue.agent.credential.incompatibleCredential`,"mcpServer.url.missing_required":`agents.publish.issue.mcpServer.missingRequired`,"tool.node.url.invalid_value":`agents.publish.issue.tool.node.url.invalidValue`},ie={"subAgent.missing_reference":`agents.builder.preview.issue.subAgent.missingReference`,"subAgent.incompatible_reference":`agents.builder.preview.issue.subAgent.incompatibleReference`,"skill.missing_reference":`agents.builder.preview.issue.skill.missingReference`,"tool.workflow.missing_reference":`agents.builder.preview.issue.tool.workflow.missingReference`,"tool.workflow.incompatible_reference":`agents.builder.preview.issue.tool.workflow.incompatibleReference`,"tool.custom.missing_reference":`agents.builder.preview.issue.tool.custom.missingReference`,"tool.node.missing_reference":`agents.builder.preview.issue.tool.node.missingReference`,"tool.node.missing_credential":`agents.builder.preview.issue.tool.node.missingCredential`,"tool.node.invalid_credential":`agents.builder.preview.issue.tool.node.invalidCredential`,"mcpServer.missing_credential":`agents.builder.preview.issue.mcpServer.missingCredential`,"mcpServer.invalid_credential":`agents.builder.preview.issue.mcpServer.invalidCredential`,"mcpServer.incompatible_credential":`agents.builder.preview.issue.mcpServer.incompatibleCredential`,"vectorStore.invalid_value":`agents.builder.preview.issue.vectorStore.invalidValue`,"tool.node.restricted_node_type":`agents.builder.preview.issue.restrictedNodeType`,"mcpServer.restricted_node_type":`agents.builder.preview.issue.restrictedNodeType`},ce={"channel.missing_credential":`agents.publish.issue.channel.missingCredential`,"channel.invalid_credential":`agents.publish.issue.channel.invalidCredential`,"channel.incompatible_credential":`agents.publish.issue.channel.incompatibleCredential`,"subAgent.missing_reference":`agents.publish.issue.subAgent.missingReference`,"subAgent.incompatible_reference":`agents.publish.issue.subAgent.incompatibleReference`,"skill.missing_reference":`agents.publish.issue.skill.missingReference`,"task.missing_reference":`agents.publish.issue.task.missingReference`,"task.invalid_value":`agents.publish.issue.task.invalidValue`,"tool.workflow.missing_reference":`agents.publish.issue.tool.workflow.missingReference`,"tool.workflow.incompatible_reference":`agents.publish.issue.tool.workflow.incompatibleReference`,"tool.custom.missing_reference":`agents.publish.issue.tool.custom.missingReference`,"tool.node.missing_reference":`agents.publish.issue.tool.node.missingReference`,"tool.node.missing_credential":`agents.publish.issue.tool.node.missingCredential`,"tool.node.invalid_credential":`agents.publish.issue.tool.node.invalidCredential`,"mcpServer.missing_credential":`agents.publish.issue.mcpServer.missingCredential`,"mcpServer.invalid_credential":`agents.publish.issue.mcpServer.invalidCredential`,"mcpServer.incompatible_credential":`agents.publish.issue.mcpServer.incompatibleCredential`,"vectorStore.invalid_value":`agents.publish.issue.vectorStore.invalidValue`,"tool.node.restricted_node_type":`agents.publish.issue.restrictedNodeType`,"mcpServer.restricted_node_type":`agents.publish.issue.restrictedNodeType`},le={agent:`agents.chat.misconfigured.missing.agent`,channel:`agents.builder.triggers.title`,tool:`agents.chat.misconfigured.missing.tools`,mcpServer:`agents.chat.misconfigured.missing.mcpServers`,skill:`agents.builder.sections.skills`,task:`agents.builder.tasks.title`,subAgent:`agents.chat.misconfigured.missing.subAgents.agents`,vectorStore:`agents.builder.vectorStores.panel.title`};function ue(e){return e.capability.kind===`channel`||e.capability.kind===`task`||ae(e)?!1:!(e.code===`invalid_value`&&e.path.endsWith(`.node.nodeParameters.url`))}function S(e){let t=e.capability.kind===`agent`?v[e.path]:void 0;return s.baseText(t??le[e.capability.kind])}function C(e){if(e.capability.kind===`agent`)return`agent.${e.path}.${e.code}`;if(e.capability.kind===`mcpServer`&&e.path.endsWith(`.url`))return`mcpServer.url.${e.code}`;if(e.capability.kind===`tool`&&e.capability.toolType===`node`&&e.path.endsWith(`.node.nodeParameters.url`))return`tool.node.url.${e.code}`}function de(e){let t=s.baseText(ne(e),{interpolate:ee(e)});return`${S(e)}: ${t}`}function fe(e){return e.capability.kind===`agent`&&!!v[e.path]&&(e.code===`missing_required`||e.code===`missing_credential`)}function pe(e){return n&&fe(e)?S(e):w(e,h,te,ie)}function me(e){return w(e,_,re,ce)}function w(e,t,n,r){let{kind:i,toolType:a}=e.capability,o=C(e),c=(e.reason?t[e.reason]:void 0)??(o?n[o]:void 0)??(i===`tool`&&a?r[`tool.${a}.${e.code}`]:void 0)??r[`${i}.${e.code}`];return c?s.baseText(c,{interpolate:ee(e)}):de(e)}let he=l(()=>t.action===`preview`),T=l(()=>{let e=he.value?t.issues.filter(ue):t.issues;return[...new Set(e.map(e=>he.value?pe(e):me(e)))]}),E=l(()=>T.value.slice(0,xe)),D=l(()=>new Set(t.issues.filter(fe).map(S))),ge=l(()=>E.value.filter(e=>D.value.has(e))),_e=l(()=>E.value.filter(e=>!D.value.has(e))),O=l(()=>Math.max(T.value.length-xe,0)),k=l(()=>O.value>0?s.baseText(`agents.validationTooltip.more`,{interpolate:{count:O.value}}):``);return(e,l)=>(f(),r(c(x),{disabled:t.disabled,content:t.fallback,"content-class":e.$style.tooltip},{content:i(()=>[T.value.length>0?(f(),o(`div`,{key:0,class:m(e.$style.content)},[b(`div`,{class:m(e.$style.heading)},d(t.fallback),3),he.value&&c(n)?(f(),o(a,{key:0},[ge.value.length>0?(f(),o(a,{key:0},[b(`div`,null,d(c(s).baseText(`agents.validationTooltip.add`)),1),b(`ul`,{class:m(e.$style.issueList)},[(f(!0),o(a,null,y(ge.value,e=>(f(),o(`li`,{key:e},d(e),1))),128))],2)],64)):u(``,!0),_e.value.length>0?(f(),o(a,{key:1},[b(`div`,null,d(c(s).baseText(`agents.validationTooltip.fix`)),1),b(`ul`,{class:m(e.$style.issueList)},[(f(!0),o(a,null,y(_e.value,e=>(f(),o(`li`,{key:e},d(e),1))),128))],2)],64)):u(``,!0),O.value>0?(f(),o(`div`,ve,d(k.value),1)):u(``,!0)],64)):(f(),o(`div`,{key:1,class:m(e.$style.previewDetails)},[(f(!0),o(a,null,y(E.value,e=>(f(),o(`div`,{key:e},d(e),1))),128)),O.value>0?(f(),o(`div`,ye,d(k.value),1)):u(``,!0)],2))],2)):(f(),o(`span`,be,d(t.fallback),1))]),default:i(()=>[g(e.$slots,`default`)]),_:3},8,[`disabled`,`content`,`content-class`]))}}),[[`__cssModules`,{$style:{tooltip:`_tooltip_74i0m_1`,content:`_content_74i0m_7`,heading:`_heading_74i0m_13`,issueList:`_issueList_74i0m_17`,previewDetails:`_previewDetails_74i0m_26`}}]]);n(),h();var Se=s({__name:`AgentTestButton`,props:{isRunnable:{type:Boolean},isPreviewOpen:{type:Boolean,default:!1},disabledReason:{},iconOnly:{type:Boolean,default:!1},variant:{default:`outline`},validationIssues:{default:()=>[]},testId:{default:void 0}},emits:[`open-preview`,`close-preview`],setup(e,{emit:t}){let n=e,a=t,o=oe(),s=l(()=>!n.isPreviewOpen&&(!n.isRunnable||!!n.disabledReason)),u=l(()=>n.isPreviewOpen?o.baseText(`agents.builder.preview.close.ariaLabel`):o.baseText(`agents.builder.preview.button`)),d=l(()=>n.disabledReason??o.baseText(`agents.builder.preview.disabledTooltip`));function p(){n.isPreviewOpen?a(`close-preview`):s.value||a(`open-preview`)}return(e,t)=>(f(),r(A,{disabled:!s.value,fallback:d.value,action:`preview`,issues:n.disabledReason?[]:n.validationIssues},{default:i(()=>[n.iconOnly?(f(),r(c(re),{key:0,"model-value":n.isPreviewOpen,variant:`outline`,size:`medium`,icon:`flask-conical`,label:u.value,disabled:s.value,"data-testid":n.testId,onClick:p},null,8,[`model-value`,`label`,`disabled`,`data-testid`])):(f(),r(c(ie),{key:1,variant:n.variant,size:`medium`,icon:`flask-conical`,label:u.value,disabled:s.value,"data-testid":n.testId,onClick:p},null,8,[`variant`,`label`,`disabled`,`data-testid`]))]),_:1},8,[`disabled`,`fallback`,`issues`]))}});export{ge as a,D as c,he as i,E as l,A as n,k as o,w as r,O as s,Se as t,_e as u};
@@ -1 +1 @@
1
- try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0fe94bf2-a434-41bb-8745-32ac39fddb99`,e._sentryDebugIdIdentifier=`sentry-dbid-0fe94bf2-a434-41bb-8745-32ac39fddb99`)})()}catch{}import{$d as e,Bd as t,Ef as n,Gd as r,Jd as i,Jf as a,Kd as o,Rd as s,Ud as c,Vd as l,bp as u,df as d,jf as f,np as p,zf as m}from"./vendor-Byl1K1cb.js";import{GO as h,IO as g,LO as _,N_ as v,Vm as y,dm as b,ji as x,s_ as S}from"./app-DPqAJq5O.js";import{t as C}from"./AgentModal-D_Fnne98.js";import{n as w,r as T,t as E}from"./AgentToolConfigTitleIcon-AsJiKKSP.js";e(),f(),p();var D=i({inheritAttrs:!1,__name:`AgentToolConfigModal`,props:{modalName:{},data:{}},setup(e){let i=e,f=h(),p=S(),D=b();y(()=>i.data.projectId);let O=m(null),k=m(null),A=m(L()),j=m(!1),M=s(()=>p.modalsById[i.modalName]?.open===!0),N=s(()=>i.data.kind!==`mcpServer`&&i.data.kind!==`registryMcpServer`&&i.data.toolRef.type===`custom`),P=s(()=>p.modalsById[v]?.open===!0),F=s(()=>P.value||j.value||i.data.kind===`registryMcpServer`&&(O.value?.saveDisabled??!0)),I=s(()=>i.data.kind===`registryMcpServer`?!0:i.data.kind===`mcpServer`?!!i.data.initialNode:i.data.toolRef.type===`custom`||i.data.toolRef.type===`workflow`||x(i.data.toolRef)!==null);D.loadNodeTypesIfNotLoaded();function L(){return i.data.kind===`mcpServer`||i.data.kind===`registryMcpServer`?i.data.mcpServer.name:i.data.toolRef.type===`custom`?i.data.customTool?.descriptor.name??i.data.toolRef.id:i.data.toolRef.name??``}function R(){p.closeModal(i.modalName)}function z(e){e||R()}function B(e){P.value&&e.preventDefault()}function V(e){A.value=e,O.value?.changeTitle(e)}function H(){O.value?.confirm()&&R()}async function U(){await O.value?.remove()&&R()}return(i,s)=>I.value?(d(),t(C,{key:0,open:M.value,title:A.value,"title-error":O.value?.titleError,"editable-title":!N.value&&!j.value,"stable-height":``,"trap-focus":!P.value,"disable-outside-pointer-events":!P.value,"data-testid":`agent-tool-config-modal`,onInteractOutside:B,"onUpdate:open":z,"onUpdate:title":V},c({titlePrefix:n(()=>[o(E,{data:e.data},null,8,[`data`])]),footerActions:n(()=>[o(a(g),{variant:`solid`,disabled:F.value,"data-testid":`agent-tool-config-save`,onClick:H},{default:n(()=>[r(u(a(f).baseText(`generic.save`)),1)]),_:1},8,[`disabled`])]),default:n(()=>[M.value?(d(),t(T,{key:0,ref_key:`content`,ref:O,data:e.data,onCredentialDeleted:R,"onUpdate:title":s[1]||=e=>A.value=e,"onUpdate:restricted":s[2]||=e=>j.value=e,onRequestCredentialPicker:s[3]||=e=>k.value?.open()},null,8,[`data`])):l(``,!0)]),_:2},[O.value?.headerItem?.credentials?.length?{name:`headerActions`,fn:n(()=>[o(w,{ref_key:`credentialPicker`,ref:k,item:O.value.headerItem,adapter:O.value.credentialAdapter,"show-connected-icon":!!e.data.onRemove,onSelectCredential:s[0]||=(e,t)=>O.value?.selectCredential(e,t)},null,8,[`item`,`adapter`,`show-connected-icon`])]),key:`0`}:void 0,e.data.onRemove?{name:`footerLeft`,fn:n(()=>[o(a(g),{variant:`ghost`,"data-testid":`agent-tool-config-remove`,onClick:U},{icon:n(()=>[o(a(_),{icon:`trash-2`,size:16})]),default:n(()=>[r(` `+u(a(f).baseText(`agents.builder.tools.remove`)),1)]),_:1})]),key:`1`}:void 0]),1032,[`open`,`title`,`title-error`,`editable-title`,`trap-focus`,`disable-outside-pointer-events`])):l(``,!0)}});export{D as default};
1
+ try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`8c37e18b-f680-4205-8f36-7c9211345986`,e._sentryDebugIdIdentifier=`sentry-dbid-8c37e18b-f680-4205-8f36-7c9211345986`)})()}catch{}import{$d as e,Bd as t,Ef as n,Gd as r,Jd as i,Jf as a,Kd as o,Rd as s,Ud as c,Vd as l,bp as u,df as d,jf as f,np as p,zf as m}from"./vendor-Byl1K1cb.js";import{N_ as h,RO as g,Vm as _,dm as v,ji as y,qO as b,s_ as x,zO as S}from"./app-CLvVIuPO.js";import{t as C}from"./AgentModal-BIVM0y7V.js";import{n as w,r as T,t as E}from"./AgentToolConfigTitleIcon-Dd8BeaWa.js";e(),f(),p();var D=i({inheritAttrs:!1,__name:`AgentToolConfigModal`,props:{modalName:{},data:{}},setup(e){let i=e,f=b(),p=x(),D=v();_(()=>i.data.projectId);let O=m(null),k=m(null),A=m(L()),j=m(!1),M=s(()=>p.modalsById[i.modalName]?.open===!0),N=s(()=>i.data.kind!==`mcpServer`&&i.data.kind!==`registryMcpServer`&&i.data.toolRef.type===`custom`),P=s(()=>p.modalsById[h]?.open===!0),F=s(()=>P.value||j.value||i.data.kind===`registryMcpServer`&&(O.value?.saveDisabled??!0)),I=s(()=>i.data.kind===`registryMcpServer`?!0:i.data.kind===`mcpServer`?!!i.data.initialNode:i.data.toolRef.type===`custom`||i.data.toolRef.type===`workflow`||y(i.data.toolRef)!==null);D.loadNodeTypesIfNotLoaded();function L(){return i.data.kind===`mcpServer`||i.data.kind===`registryMcpServer`?i.data.mcpServer.name:i.data.toolRef.type===`custom`?i.data.customTool?.descriptor.name??i.data.toolRef.id:i.data.toolRef.name??``}function R(){p.closeModal(i.modalName)}function z(e){e||R()}function B(e){P.value&&e.preventDefault()}function V(e){A.value=e,O.value?.changeTitle(e)}function H(){O.value?.confirm()&&R()}async function U(){await O.value?.remove()&&R()}return(i,s)=>I.value?(d(),t(C,{key:0,open:M.value,title:A.value,"title-error":O.value?.titleError,"editable-title":!N.value&&!j.value,"stable-height":``,"trap-focus":!P.value,"disable-outside-pointer-events":!P.value,"data-testid":`agent-tool-config-modal`,onInteractOutside:B,"onUpdate:open":z,"onUpdate:title":V},c({titlePrefix:n(()=>[o(E,{data:e.data},null,8,[`data`])]),footerActions:n(()=>[o(a(g),{variant:`solid`,disabled:F.value,"data-testid":`agent-tool-config-save`,onClick:H},{default:n(()=>[r(u(a(f).baseText(`generic.save`)),1)]),_:1},8,[`disabled`])]),default:n(()=>[M.value?(d(),t(T,{key:0,ref_key:`content`,ref:O,data:e.data,onCredentialDeleted:R,"onUpdate:title":s[1]||=e=>A.value=e,"onUpdate:restricted":s[2]||=e=>j.value=e,onRequestCredentialPicker:s[3]||=e=>k.value?.open()},null,8,[`data`])):l(``,!0)]),_:2},[O.value?.headerItem?.credentials?.length?{name:`headerActions`,fn:n(()=>[o(w,{ref_key:`credentialPicker`,ref:k,item:O.value.headerItem,adapter:O.value.credentialAdapter,"show-connected-icon":!!e.data.onRemove,onSelectCredential:s[0]||=(e,t)=>O.value?.selectCredential(e,t)},null,8,[`item`,`adapter`,`show-connected-icon`])]),key:`0`}:void 0,e.data.onRemove?{name:`footerLeft`,fn:n(()=>[o(a(g),{variant:`ghost`,"data-testid":`agent-tool-config-remove`,onClick:U},{icon:n(()=>[o(a(S),{icon:`trash-2`,size:16})]),default:n(()=>[r(` `+u(a(f).baseText(`agents.builder.tools.remove`)),1)]),_:1})]),key:`1`}:void 0]),1032,[`open`,`title`,`title-error`,`editable-title`,`trap-focus`,`disable-outside-pointer-events`])):l(``,!0)}});export{D as default};
@@ -0,0 +1 @@
1
+ try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`85e86556-93ba-4d67-b5c8-332deff85f43`,e._sentryDebugIdIdentifier=`sentry-dbid-85e86556-93ba-4d67-b5c8-332deff85f43`)})()}catch{}import{o as e}from"./rolldown-runtime-Cnm24cU6.js";import{$d as t,Bd as n,Df as r,Dr as i,Ed as a,Ef as o,Fd as s,Gd as c,Go as l,Hd as u,If as d,Jd as f,Jf as p,Kd as m,Kf as h,Md as g,Nd as _,Nr as v,Rd as y,Uf as b,Vd as x,bf as S,bp as C,cf as w,df as T,ff as E,hp as D,jf as O,kf as k,mf as A,mt as j,nf as M,np as N,ns as P,of as F,pf as ee,vr as I,wf as L,yf as R,zd as z,zf as B}from"./vendor-Byl1K1cb.js";import{$T as V,$m as te,$y as H,AO as U,AT as ne,Dw as W,HO as G,IO as re,IS as ie,Ju as ae,Km as K,Kp as oe,LO as q,Li as se,Lm as J,MO as Y,Mi as ce,Ni as le,PT as ue,Qp as de,RC as X,RD as fe,RO as pe,Wp as me,Xb as he,ZE as ge,_u as Z,cO as _e,dm as Q,eh as ve,em as ye,gd as be,ib as xe,im as Se,ji as Ce,kT as we,li as Te,mS as Ee,o_ as De,ob as Oe,of as ke,oh as Ae,qO as $,rb as je,rx as Me,s_ as Ne,sh as Pe,si as Fe,tD as Ie,uC as Le,uh as Re,xf as ze,xi as Be,xv as Ve,zC as He,zD as Ue,zO as We}from"./app-CLvVIuPO.js";import{t as Ge}from"./useLatestFetch-DJ2t2AJ5.js";import{t as Ke}from"./ToolCredentialPicker-NGIvQBhO.js";import{t as qe}from"./useAgentConfirmationModal-U0vSIqsQ.js";import{n as Je,r as Ye,t as Xe}from"./McpToolPermissionsEditor-D-bTt4rc.js";import{t as Ze}from"./mcpRegistryIcon-D1kj901a.js";import{n as Qe,t as $e}from"./mcpRegistry.api-Dwb7ClxM.js";import{t as et}from"./AgentFormSettingRow-Cv52TnaA.js";import{t as tt}from"./AgentApprovalSelector-ADKHUuuF.js";import{t as nt}from"./NodeToolSettingsContent-Dvz7C5jh.js";O();function rt(e){let t=Me(),n=Ne(),r=ve(),{canOAuthCredentialQuickConnect:i,createAndAuthorize:a}=be();async function o(){return await Qe(t.restApiContext)}async function s(e){return await $e(t.restApiContext,e)}async function c(){let t=h(e);await Promise.all([r.fetchCredentialTypes(!1),r.fetchUsableCredentials({projectId:t})])}function l(e){return{id:e.slug,name:e.slug,type:e.nodeTypeName,typeVersion:1,position:[0,0],parameters:{}}}function u(t,o){return{getCredentialsByType:t=>{let n={projectId:h(e)};return r.hasUsableCredentialsForScope(n)?r.getUsableCredentialByType(t).map(e=>({id:e.id,name:e.name,type:e.type})):[]},openExistingCredential:e=>n.openExistingCredential(e),openNewCredential:(s,c,u)=>{let d=h(e);if(c.kind!==`mcp-server`){n.openNewCredential(s,!1,!1,d);return}let f=t(c);if(!f){n.openNewCredential(s,!1,!1,d);return}let p=u??[s];if(p.length===1&&i(s)){a(s,void 0,{projectId:d}).then(e=>{e&&o({authType:e.type,credentialId:e.id,item:c})});return}let m=null,g=k(!0);g.run(()=>{te({store:r,onCredentialCreated:e=>{p.includes(e.type)&&(m=e.id)}}),De({store:n,onModalClosed:e=>{e===`editCredential`&&(g.stop(),m&&o({authType:r.getCredentialById(m)?.type??s,credentialId:m,item:c}))}})});try{if(p.length>1){let e=l(f);n.openNewCredential(s,!0,!1,d,void 0,e.name,e)}else n.openNewCredential(s,!1,!1,d)}catch(e){throw g.stop(),e}}}}return{createCredentialAdapter:u,discoverRegistry:s,fetchCatalog:o,preloadCredentials:c}}function it(e){return!!e.metadata?.nodeTypeName&&e.credential===`__AI_GATEWAY_MANAGED__`}function at(e,t){return{authentication:t===`__AI_GATEWAY_MANAGED__`?`none`:e,credential:t}}function ot(e,t){let n=e.credentials.map(({credentialType:e,name:n})=>{let r={authType:e,displayName:n,required:!0};if(!W(e)){let n=t?.authentication===e?t.credential:void 0;return{...r,credentialId:n}}let i=t!==void 0&&it(t);return{...r,credentialId:i?Le:void 0,aiGateway:!0}});return[...n.filter(e=>e.aiGateway),...n.filter(e=>!e.aiGateway)]}t(),O();var st=1e3,ct=6e4,lt=12e4;function ut(e){return{id:e.name,name:e.name,...e.description||e.title?{description:e.description??e.title}:{},...e.category?{category:e.category}:{}}}function dt(e,t){return{...e,url:t.url,transport:t.transport,authentication:t.authentication,...t.credentialId?{credential:t.credentialId}:{},metadata:{...e.metadata,...t.metadata}}}function ft(e,t,n){return t&&it(t)?{slug:e,aiGateway:!0}:n?{slug:e,credentialId:n}:void 0}function pt(e){return{categories:{read:e.categories.read===`require_approval`?`always_allow`:e.categories.read,write:e.categories.write===`require_approval`?`always_allow`:e.categories.write},...e.tools?{tools:Object.fromEntries(Object.entries(e.tools).map(([e,t])=>[e,t===`require_approval`?`always_allow`:t]))}:{}}}function mt(e,t){let n=Ne(),r=ve(),{createCredentialAdapter:i,discoverRegistry:a,fetchCatalog:o,preloadCredentials:s}=rt(()=>e.value.projectId),c=B(null),l=B(null),u=B(null),f=B(null),{invalidate:p,next:m}=Ge(),h=y(()=>l.value?.name??e.value?.mcpServer.name??``),g=y(()=>h.value.trim()),_=y(()=>e.value?.existingToolNames?.includes(g.value)===!0),v=y(()=>f.value?.status===`connected`),b=y(()=>v.value&&g.value.length>0&&!_.value),x=y(()=>{let e=c.value,t=l.value;if(!e||!t)return null;let r={...t.toolPermissions??{categories:{read:`always_allow`,write:`always_allow`}},connectionTimeoutMs:t.connectionTimeoutMs??6e4},i=f.value?.status===`connected`?f.value.tools:[],a=f.value?.status===`connecting`?`connecting`:f.value?.status===`disconnected`?`disconnected`:`connected`;return{id:`registry-config:${e.slug}`,kind:`mcp-server`,category:`mcp`,title:e.title,description:e.tagline,longDescription:e.description,status:a,...f.value?.status===`disconnected`?{connectionFailureReason:f.value.failureReason}:{},iconSource:Ze(e.icons,n.appliedTheme),credentials:ot(e,t),availableTools:i.map(ut),isOfficial:e.isOfficial,settings:r,publisher:e.isOfficial||e.websiteUrl?{name:e.title,url:e.websiteUrl}:void 0,version:e.version}});async function S(e=l.value?.credential){let t=c.value,n=t&&ft(t.slug,l.value,e);if(!n){f.value={status:`disconnected`,failureReason:`authentication`,tools:[]};return}let r=m();f.value={status:`connecting`};let i=await a(n).catch(()=>({status:`disconnected`,failureReason:`unknown`,tools:[]}));r()&&(f.value=i)}async function C(e){let t=m();l.value={...e.mcpServer},u.value=e.isNew?null:{...e.mcpServer},f.value={status:`connecting`};let[n]=await Promise.all([o(),s()]);t()&&(c.value=n.find(t=>t.nodeTypeName===e.mcpServer.metadata?.nodeTypeName)??null,await S())}L(e,e=>{e?C(e):(p(),c.value=null,l.value=null,u.value=null,f.value=null)},{immediate:!0});let w=i(()=>c.value??void 0,({authType:e,credentialId:t})=>{T(e,t)});async function T(e,t){l.value&&(l.value={...l.value,...at(e,t)},await S(t))}function E(t){let n=f.value,{connectionTimeoutMs:r,...i}=t;if(!l.value||!b.value||n?.status!==`connected`||r===void 0||!Number.isInteger(r)||r<1e3||r>12e4)return!1;let a=dt(l.value,n.connection),o=e.value?.supportsToolApproval===!1?pt(i):i;return e.value?.onConfirm({...a,name:g.value,toolPermissions:o,connectionTimeoutMs:r}),!0}function D(e){l.value&&={...l.value,name:e}}let O=k(!0);return O.run(()=>{te({store:r,onCredentialDeleted:n=>{if(l.value?.credential!==n)return;let r=u.value;r?.credential&&r.credential!==n?(l.value.credential=r.credential,S(r.credential)):(e.value?.onRemove?.(),t())}}),De({store:n,onModalClosed:e=>{e===`editCredential`&&l.value?.credential&&S()}})}),d(()=>O.stop()),{canSave:b,changeTitle:D,credentialAdapter:w,discover:S,item:x,save:E,selectCredential:T,title:h}}t(),O(),N();var ht=G(f({__name:`AgentRegistryMcpConfigForm`,props:{data:{}},emits:[`credential-deleted`,`request-credential-picker`,`update:title`],setup(e,{expose:t,emit:r}){let i=e,a=r,s=$(),{openAgentConfirmationModal:l}=qe(),d=mt(y(()=>i.data),()=>a(`credential-deleted`)),f=d.item,h=d.title,g=B(!1),_=i.data.mcpServer.connectionTimeoutMs??6e4,v=B({categories:{read:`always_allow`,write:`always_allow`},connectionTimeoutMs:_}),b=y({get:()=>v.value,set:e=>{v.value={...e,connectionTimeoutMs:v.value.connectionTimeoutMs}}}),S=y({get:()=>v.value.connectionTimeoutMs===void 0?``:String(v.value.connectionTimeoutMs/1e3),set:e=>{v.value={...v.value,connectionTimeoutMs:e.trim()?Number(e)*1e3:void 0}}});L(()=>d.item.value?.id,()=>{let e=d.item.value?.settings;e&&(v.value={...e,connectionTimeoutMs:e.connectionTimeoutMs??_})},{immediate:!0}),L(h,e=>a(`update:title`,e),{immediate:!0});let w=y(()=>h.value.trim()),E=y(()=>g.value?w.value?i.data.existingToolNames?.includes(w.value)?s.baseText(`agents.toolConfig.name.validation.duplicate`):``:s.baseText(`agents.toolConfig.name.validation.required`):``),O=y(()=>{let e=v.value.connectionTimeoutMs;return e!==void 0&&Number.isInteger(e)&&e%1e3==0&&e>=1e3&&e<=12e4?e:null}),k=y(()=>g.value&&O.value===null?s.baseText(`agents.toolConfig.mcp.timeout.validation`,{interpolate:{min:st/1e3,max:lt/1e3}}):``),A=y(()=>f.value?.status!==`connected`);function j(){return g.value=!0,O.value!==null&&d.save(v.value)}async function M(){return!i.data.onRemove||await l({title:s.baseText(`tools.connection.settings.removeConfirm.title`,{interpolate:{name:h.value}}),description:s.baseText(`tools.connection.settings.removeConfirm.description`,{interpolate:{item:`tool`,service:h.value}}),isDestructive:!0,confirmButtonText:s.baseText(`tools.connection.settings.removeConfirm.confirmButton`,{interpolate:{item:`tool`}}),cancelButtonText:s.baseText(`generic.cancel`)})!==`confirm`?!1:(i.data.onRemove(),!0)}function N(e){d.changeTitle(e)}return t({changeTitle:N,confirm:j,credentialAdapter:d.credentialAdapter,headerItem:f,remove:M,saveDisabled:A,selectCredential:d.selectCredential,title:h,titleError:E}),(t,r)=>p(f)?(T(),u(`div`,{key:1,class:D(t.$style.content)},[m(Je,{item:p(f)},null,8,[`item`]),p(f).status===`disconnected`?(T(),n(Ye,{key:0,"failure-reason":p(f).connectionFailureReason,onReconnect:r[0]||=e=>a(`request-credential-picker`),onRetry:r[1]||=e=>p(d).discover()},null,8,[`failure-reason`])):x(``,!0),z(`div`,{class:D(t.$style.settings)},[m(Xe,{modelValue:b.value,"onUpdate:modelValue":r[2]||=e=>b.value=e,actor:`agent`,"available-tools":p(f).availableTools,"server-title":p(h),status:p(f).status,"exclude-permissions":e.data.supportsToolApproval===!1?[`require_approval`]:[]},null,8,[`modelValue`,`available-tools`,`server-title`,`status`,`exclude-permissions`]),z(`div`,{class:D(t.$style.timeoutSection)},[m(p(U),{tag:`label`,for:`agent-mcp-connection-timeout`,size:`medium`,bold:``},{default:o(()=>[c(C(p(s).baseText(`agents.toolConfig.mcp.timeout.label`)),1)]),_:1}),m(p(re),{id:`agent-mcp-connection-timeout`,"model-value":S.value,type:`number`,min:p(st)/1e3,max:p(lt)/1e3,step:1,disabled:p(f).status!==`connected`,"aria-invalid":!!k.value,"aria-describedby":k.value?`agent-mcp-connection-timeout-help agent-mcp-connection-timeout-error`:`agent-mcp-connection-timeout-help`,"data-testid":`agent-mcp-connection-timeout`,"onUpdate:modelValue":r[3]||=e=>S.value=e},{suffix:o(()=>[m(p(U),{size:`small`,color:`text-light`},{default:o(()=>[c(C(p(s).baseText(`agents.toolConfig.mcp.timeout.unit`)),1)]),_:1})]),_:1},8,[`model-value`,`min`,`max`,`disabled`,`aria-invalid`,`aria-describedby`]),m(p(U),{id:`agent-mcp-connection-timeout-help`,size:`small`,color:`text-light`},{default:o(()=>[c(C(p(s).baseText(`agents.toolConfig.mcp.timeout.help`)),1)]),_:1}),k.value?(T(),n(p(U),{key:0,id:`agent-mcp-connection-timeout-error`,size:`small`,color:`danger`,"data-testid":`agent-mcp-timeout-error`},{default:o(()=>[c(C(k.value),1)]),_:1})):x(``,!0)],2)],2)],2)):(T(),u(`div`,{key:0,class:D(t.$style.loading)},[m(p(Ie))],2))}}),[[`__cssModules`,{$style:{loading:`_loading_zz9y8_1`,content:`_content_zz9y8_8`,settings:`_settings_zz9y8_16`,timeoutSection:`_timeoutSection_zz9y8_17`}}]]);t(),O();var gt=f({__name:`AgentToolConfigApprovalSetting`,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let r=t,i=$();return(t,a)=>(T(),n(et,{"control-id":`agent-tool-approval-toggle`,title:p(i).baseText(`agents.toolConfig.approval.label`),description:p(i).baseText(`agents.toolConfig.approval.hint`)},{default:o(()=>[m(p(ge),{id:`agent-tool-approval-toggle`,"model-value":e.modelValue,disabled:e.disabled,"aria-label":p(i).baseText(`agents.toolConfig.approval.label`),"data-test-id":`agent-tool-approval-toggle`,"onUpdate:modelValue":a[0]||=e=>r(`update:modelValue`,e)},null,8,[`model-value`,`disabled`,`aria-label`])]),_:1},8,[`title`,`description`]))}});t(),N(),O();var _t=G(f({__name:`AgentCustomToolViewer`,props:{code:{}},setup(e){let t=e,n=B(),r=null;function a(e){n.value&&(r=new I({state:v.create({doc:e,extensions:[j({typescript:!0}),i(),I.lineWrapping,v.readOnly.of(!0),I.editable.of(!1),ze({isReadOnly:!0,maxHeight:`100%`})]}),parent:n.value}))}return w(()=>a(t.code??``)),F(()=>{r?.destroy(),r=null}),L(()=>t.code,e=>{if(!r)return;let t=e??``;r.state.doc.toString()!==t&&r.dispatch({changes:{from:0,to:r.state.doc.length,insert:t}})}),(e,t)=>(T(),u(`div`,{class:D(e.$style.wrapper),"data-test-id":`agent-custom-tool-viewer`},[z(`div`,{ref_key:`container`,ref:n,class:D(e.$style.editor)},null,2)],2))}}),[[`__cssModules`,{$style:{wrapper:`_wrapper_1dag9_1`,editor:`_editor_1dag9_8`}}]]);t();var vt=f({__name:`AgentToolConfigCustomContent`,props:{code:{}},setup(e){return(t,r)=>(T(),n(_t,{code:e.code},null,8,[`code`]))}});t(),O();var yt=f({__name:`AgentToolConfigMcpApprovalSetting`,props:{modelValue:{},node:{},projectId:{},disabled:{type:Boolean}},emits:[`update:modelValue`,`update:valid`],setup(e,{emit:t}){let r=e,i=t,a=$(),s=Q(),c=B([]),l=B(!1),u=B(null),d=y(()=>{let e=c.value.map(e=>String(e.value)),t=r.node.parameters.include,n=_(r.node.parameters.includeTools),i=new Set(_(r.node.parameters.excludeTools));if(t===`selected`&&n.length>0){let t=new Set(n);return e.filter(e=>t.has(e))}return t===`except`?e.filter(e=>!i.has(e)):e}),f=B(!1),h=y(()=>{let{categories:e,tools:t}=r.modelValue;if(e.read===`require_approval`&&e.write===`require_approval`)return{mode:`global`};let n=Object.entries(t??{}).flatMap(([e,t])=>t===`require_approval`?[e]:[]);if(n.length>0||f.value)return{mode:`selected`,tools:n}}),g=y(()=>{let e=new Set(d.value);return c.value.filter(t=>e.has(String(t.value))).map(e=>({label:e.name,value:String(e.value)}))});w(()=>{(r.node.parameters.endpointUrl||r.node.parameters.sseEndpoint)&&v()});function _(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}async function v(){l.value=!0,u.value=null;try{c.value=await s.getNodeParameterOptions({nodeTypeAndVersion:{name:r.node.type,version:r.node.typeVersion},path:`parameters.includeTools`,methodName:`getTools`,currentNodeParameters:r.node.parameters,credentials:r.node.credentials,projectId:r.projectId})}catch(e){u.value=e instanceof Error?e.message:String(e)}finally{l.value=!1}}function b(e){f.value=e===`selected`,e===`selected`&&c.value.length===0&&!l.value&&v()}function S(e){if(e?.mode===`global`)return{categories:{read:`require_approval`,write:`require_approval`}};let t={read:`always_allow`,write:`always_allow`};return e?.mode!==`selected`||e.tools.length===0?{categories:t}:{categories:t,tools:Object.fromEntries(e.tools.map(e=>[e,`require_approval`]))}}return(e,t)=>(T(),n(tt,{"model-value":h.value,options:g.value,label:p(a).baseText(`agents.toolConfig.mcpApproval.label`),hint:p(a).baseText(`agents.toolConfig.mcpApproval.hint`),placeholder:p(a).baseText(`agents.toolConfig.mcpApproval.tools.placeholder`),loading:l.value,disabled:r.disabled,error:u.value?p(a).baseText(`agents.toolConfig.mcpApproval.loadError`):null,"test-id-prefix":`agent-mcp-approval`,"onUpdate:modelValue":t[0]||=e=>i(`update:modelValue`,S(e)),"onUpdate:valid":t[1]||=e=>i(`update:valid`,e),"onUpdate:mode":b},{controls:o(({mode:e})=>[e===`selected`?(T(),n(p(Y),{key:0,content:p(a).baseText(`agents.toolConfig.mcpApproval.refresh.hint`)},{default:o(()=>[m(p(pe),{variant:`outline`,size:`small`,"icon-only":``,disabled:r.disabled,loading:l.value,"aria-label":p(a).baseText(`agents.toolConfig.mcpApproval.refresh`),"data-test-id":`agent-mcp-approval-refresh`,onClick:v},{icon:o(()=>[m(p(We),{icon:`refresh-cw`,size:14})]),_:1},8,[`disabled`,`loading`,`aria-label`])]),_:1},8,[`content`])):x(``,!0)]),_:1},8,[`model-value`,`options`,`label`,`hint`,`placeholder`,`loading`,`disabled`,`error`]))}});t(),O();var bt=f({__name:`AgentToolConfigNodeContent`,props:{initialNode:{},existingToolNames:{},projectId:{},contentTestId:{},hiddenParameters:{},parameterIssues:{},fromAiDisabledParameters:{},readOnly:{type:Boolean}},emits:[`update:valid`,`update:node-name`,`update:node`],setup(e,{expose:t,emit:r}){let i=[...ie,Ve],a=e,o=r,s=B(null);E(xe,!1),E(je,!0);function c(e){s.value?.handleChangeName(e)}function l(){return s.value?.node??null}function u(){return s.value?.nodeTypeDescription??null}return t({getNode:l,getNodeTypeDescription:u,handleChangeName:c}),(e,t)=>(T(),n(nt,{ref_key:`contentRef`,ref:s,"initial-node":a.initialNode,"existing-tool-names":a.existingToolNames,"project-id":a.projectId,"for-agent":``,"hidden-operations":i,"hidden-parameters":a.hiddenParameters,"parameter-issues":a.parameterIssues,"from-ai-disabled-parameters":a.fromAiDisabledParameters,"read-only":a.readOnly,"sync-node-to-ndv":!0,"data-test-id":a.contentTestId,"onUpdate:valid":t[0]||=e=>o(`update:valid`,e),"onUpdate:nodeName":t[1]||=e=>o(`update:node-name`,e),"onUpdate:node":t[2]||=e=>o(`update:node`,e)},null,8,[`initial-node`,`existing-tool-names`,`project-id`,`hidden-parameters`,`parameter-issues`,`from-ai-disabled-parameters`,`read-only`,`data-test-id`]))}}),xt=e(l(),1);t(),O();var St=new Map(ke.map(e=>[e.id,e.popularity])),Ct=new Set(Ee);function wt(e){let{inputs:t}=e;return!Array.isArray(t)||t.length>0}function Tt(e){return Ct.has(e.name)}function Et(e){return He(e)===null}function Dt(e){return ue(e.name)?`app-action`:Fe(e.name)?`mcp`:`app-action`}var Ot=[`mcp`,`app-action`];function kt(e){return Ot.indexOf(Dt(e))}function At(){let e=Q(),t=Ae(),n=B([]);function r(t){return e.getNodeType(t)??e.communityNodeType(t)?.nodeDescription??null}let i=y(()=>{let t=e.visibleNodeTypesByOutputConnectionTypeNames[we.AiTool]??[];return[...new Set(t)].map(e=>r(e)).filter(e=>e!==null&&!e.hidden&&!Tt(e)&&!wt(e)).sort((e,t)=>{let n=kt(e)-kt(t);if(n!==0)return n;let r=St.get(e.name)??0;return(St.get(t.name)??0)-r})}),a=y(()=>n.value.filter(e=>!e.isArchived&&Et(e)));async function o(e){try{return n.value=await t.searchWorkflows({projectId:e,select:[`id`,`name`,`description`,`isArchived`,`activeVersionId`,`nodes`,`connections`,`updatedAt`]}),!0}catch(e){return console.warn(`[useAgentToolCatalog] failed to load workflows for project`,e),!1}}return{availableToolTypes:i,availableWorkflows:a,projectWorkflows:n,loadWorkflows:o,resolveToolNodeType:r}}var jt=new Set(X);function Mt(e){if(e)return(e.nodes??[]).find(e=>jt.has(e.type))}function Nt(e){if(!e)return[];let t=Mt(e);if(!t||t.type!==`n8n-nodes-base.executeWorkflowTrigger`)return[];let n=t.parameters??{},r=t.typeVersion>=1.1?`workflowInputs`:`passthrough`,i=typeof n.inputSource==`string`?n.inputSource:r;if(i===`passthrough`)return[];if(i===`jsonExample`){let e=n.jsonExample;if(!e)return[];let t;try{t=JSON.parse(e)}catch{return[]}return typeof t!=`object`||!t||Array.isArray(t)?[]:Object.entries(t).map(([e,t])=>({name:e,type:t===null?`any`:Array.isArray(t)?`array`:typeof t}))}return(n.workflowInputs?.values??[]).filter(e=>typeof e.name==`string`&&e.name.length>0)}function Pt(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function Ft(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`?!0:Array.isArray(e)?e.every(Ft):typeof e==`object`&&Object.values(e).every(Ft)}function It(e,t){if(t===`string`||t===void 0)return e;let n=e.trim();if(n===``)return null;switch(t){case`number`:{let t=Number(n);return Number.isFinite(t)?t:e}case`boolean`:{let t=n.toLowerCase();return t===`true`||t!==`false`&&e}case`array`:case`object`:try{let r=JSON.parse(n);if(!Ft(r))return e;if(t===`array`&&Array.isArray(r)||t===`object`&&typeof r==`object`&&r&&!Array.isArray(r))return r}catch{}return e;case`any`:try{let e=JSON.parse(n);if(Ft(e))return e}catch{}return e;default:return e}}t(),O(),N();var Lt=[`data-test-id`,`aria-label`],Rt=[`for`],zt=G(f({__name:`WorkflowToolInputs`,props:M({fields:{},toolName:{},submitted:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:M([`update:valid`],[`update:modelValue`]),setup(e,{emit:t}){let r=e,i=S(e,`modelValue`),a=t,l=$(),d=R(),f=B({}),h=de(`workflow-tool-inputs-${d}`),g=Se(h),_=Re(h),v=oe(h);E(Oe,y(()=>g)),E(H,y(()=>({localResolve:!0,nodeName:r.toolName,additionalKeys:{}}))),L(()=>r.toolName,e=>{g.setNodes([{id:d,name:e,type:V,typeVersion:2.2,position:[0,0],parameters:{}}]),_.setActiveNodeName(e,`other`)},{immediate:!0}),F(()=>{Pe(_),me(v),ye(g)});function w(e){let t=b(i.value);return Object.hasOwn(t,e)?t[e]:{mode:`ai`}}function O(e){let t=w(e);return t.mode===`ai`?t.description??``:``}function k(e){let t=`string`;return(e.type===`number`||e.type===`boolean`)&&(t=e.type),[`array`,`object`,`any`].includes(e.type??``)&&(t=`json`),{displayName:`${e.name} (${e.type??`string`})`,name:e.name,type:t,default:``,typeOptions:{rows:3}}}function A(e){let t=w(e.name);if(t.mode===`ai`)return``;if(t.mode===`expression`)return t.value;if(e.type===`boolean`)return t.value===!0;let n=b(f.value);return Object.hasOwn(n,e.name)?n[e.name]:e.type===`any`?JSON.stringify(t.value):Pt(t.value)}function j(e,t){let n={...b(i.value)};delete f.value[e.name],t===`ai`?delete n[e.name]:n=t===`expression`?{...n,[e.name]:{mode:t,value:`=`}}:{...n,[e.name]:{mode:t,value:e.type!==`boolean`&&It(``,e.type)}},i.value=n}function M(e,t){let n=Pt(t.value),r=w(e.name).mode;if(r===`ai`)return;r===`fixed`&&(f.value={...b(f.value),[e.name]:n});let a=r===`expression`?{mode:r,value:n}:{mode:r,value:It(n,e.type)};i.value={...b(i.value),[e.name]:a}}function N(e,t){let n={...b(i.value)};t.trim()?n={...n,[e]:{mode:`ai`,description:t}}:delete n[e],i.value=n}function P(e){let t=w(e.name);if(t.mode===`ai`)return;if(t.mode===`expression`)return t.value.slice(1).trim()?void 0:l.baseText(`agents.toolConfig.workflow.inputs.expression.empty`);let n=It(Pt(t.value),e.type);if(n===null)return;let r=!0;switch(e.type){case`number`:r=typeof n==`number`&&Number.isFinite(n);break;case`boolean`:r=typeof n==`boolean`;break;case`array`:r=Array.isArray(n);break;case`object`:r=typeof n==`object`&&!Array.isArray(n);break;case`any`:try{JSON.parse(String(A(e)))}catch{r=!1}}return r?void 0:l.baseText(`agents.toolConfig.workflow.inputs.value.invalid`,{interpolate:{type:e.type??`string`}})}let I=y(()=>r.fields.filter(e=>P(e)));return L(I,e=>a(`update:valid`,e.length===0),{immediate:!0}),(t,r)=>(T(),u(`div`,{class:D(t.$style.fields),"data-test-id":`agent-workflow-tool-inputs`},[(T(!0),u(s,null,ee(e.fields,(r,i)=>(T(),u(`div`,{key:r.name,class:D(t.$style.field),"data-test-id":`agent-workflow-tool-input-${encodeURIComponent(r.name)}`,role:`group`,"aria-label":r.name},[m(Z,{parameter:k(r),value:A(r),"input-mode":w(r.name).mode,path:`inputs.${r.name}`,rows:3,"display-options":!0,"options-overrides":{hideFocusPanelButton:!0},"external-issues":e.submitted&&P(r)?[P(r)]:[],onUpdate:e=>M(r,e),onTextInput:e=>M(r,e),"onUpdate:inputMode":e=>j(r,e)},null,8,[`parameter`,`value`,`input-mode`,`path`,`external-issues`,`onUpdate`,`onTextInput`,`onUpdate:inputMode`]),w(r.name).mode===`ai`?(T(),u(s,{key:0},[z(`label`,{for:`${p(d)}-${i}-description`,class:D(t.$style.descriptionLabel)},C(p(l).baseText(`agents.toolConfig.workflow.inputs.description`)),11,Rt),m(p(re),{id:`${p(d)}-${i}-description`,"model-value":O(r.name),type:`textarea`,rows:2,placeholder:p(l).baseText(`agents.toolConfig.workflow.inputs.description.placeholder`),"onUpdate:modelValue":e=>N(r.name,String(e))},null,8,[`id`,`model-value`,`placeholder`,`onUpdate:modelValue`])],64)):x(``,!0),e.submitted&&P(r)?(T(),n(p(U),{key:1,size:`xsmall`,color:`danger`,role:`alert`},{default:o(()=>[c(C(P(r)),1)]),_:2},1024)):x(``,!0)],10,Lt))),128))],2))}}),[[`__cssModules`,{$style:{fields:`_fields_1mm2d_1`,field:`_field_1mm2d_1`,descriptionLabel:`_descriptionLabel_1mm2d_14`}}]]);t(),O(),N(),a();var Bt=[`aria-expanded`],Vt=G(f({__name:`WorkflowToolConfigContent`,props:{initialRef:{},projectId:{},submitCount:{}},emits:[`update:valid`,`update:node-name`],setup(e,{expose:t,emit:i}){let a=e,l=i,d=$(),f=se(),h=P(),{availableWorkflows:v,projectWorkflows:S,loadWorkflows:E}=At(),O=B(a.initialRef.name??a.initialRef.workflow??``),k=B(a.initialRef.description??``),j=y(()=>(a.submitCount??0)>0&&k.value.trim().length===0),M=B(a.initialRef.allOutputs??!1),N=B(a.initialRef.workflow??``),F=B(a.initialRef.workflowId),I=B({...b(a.initialRef.inputs??{})}),R=B(!0),V=B(!1),te=B(!0),H=B(!1),ne=B(`list`),W=B(``),G=B(!1);async function ie(){R.value=!0,V.value=await E(a.projectId),R.value=!1}w(ie),L(()=>a.initialRef,e=>{O.value=e.name??e.workflow??``,k.value=e.description??``,M.value=e.allOutputs??!1,N.value=e.workflow??``,F.value=e.workflowId,I.value={...b(e.inputs??{})},ne.value=`list`,W.value=``,G.value=!1});function ae(e){return F.value===void 0?e.name===N.value:e.id===F.value}let K=y(()=>S.value.filter(ae)),oe=y(()=>v.value.filter(ae)),J=y(()=>F.value===void 0?K.value.length===1?K.value[0]:void 0:K.value[0]),Y=y(()=>V.value&&!R.value&&N.value.length>0&&K.value.length===0),ce=y(()=>V.value&&!R.value&&!Y.value&&N.value.length>0&&oe.value.length===0),le=y(()=>F.value===void 0&&K.value.length>1),ue=y(()=>V.value&&!R.value&&!ce.value&&J.value?.activeVersionId===null),de=y(()=>[...v.value].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,name:e.name,meta:[(0,xt.default)(e.updatedAt,`d mmm yyyy, HH:MM`),e.description].filter(Boolean).join(` · `)}))),X=y(()=>J.value?.id??F.value),me=y(()=>X.value??F.value??N.value),Z=y(()=>Nt(J.value)),Q=y(()=>V.value&&!R.value&&Array.isArray(J.value?.nodes)),ve=y(()=>Q.value&&Z.value.length>0&&!te.value);L([O,k,N,ve],([e,t,n])=>{l(`update:valid`,e.trim().length>0&&t.trim().length>0&&n.trim().length>0&&!ve.value),l(`update:node-name`,e)},{immediate:!0}),L([()=>a.submitCount,ve],([e,t])=>{e&&t&&(H.value=!0)});function ye(e){O.value=e}function be(e){e.id===F.value||F.value===void 0&&e.name===N.value?F.value=e.id:(O.value===N.value&&(O.value=e.name),F.value=e.id,N.value=e.name,k.value=``,I.value={})}function xe(e){let t=de.value.find(t=>t.id===e);t&&be(t)}function Se(){if(!X.value)return;let{href:e}=h.resolve({name:he.WORKFLOW,params:{workflowId:X.value}});window.open(e,`_blank`)}function Ce(e){ne.value=e,G.value=!1,W.value=X.value??``}function we(e){let t=e.trim();if(!t)return;let n=v.value.find(e=>e.id===t);G.value=!n,n&&be(n)}function Te(){return J.value?.name??N.value}function Ee(){return X.value}function De(){let e=b(I.value);if(Object.keys(e).length===0)return;if(!Q.value)return e;let t=new Set(Z.value.map(e=>e.name)),n={};for(let[r,i]of Object.entries(e))t.has(r)&&(n[r]=i);return Object.keys(n).length>0?n:void 0}return t({name:O,description:k,allOutputs:M,getWorkflow:Te,getWorkflowId:Ee,getInputs:De,handleChangeName:ye,nodeTypeDescription:null}),(t,i)=>(T(),u(`div`,{class:D(t.$style.container)},[z(`div`,{class:D(t.$style.field)},[z(`label`,{class:D(t.$style.label),for:`workflow-tool-description`},[c(C(p(d).baseText(`agents.toolConfig.workflow.description`))+` `,1),m(p(U),{color:`primary`,size:`small`,bold:``},{default:o(()=>[...i[8]||=[c(`*`,-1)]]),_:1})],2),m(p(re),{id:`workflow-tool-description`,modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,class:D({[t.$style.invalidDescription]:j.value}),type:`textarea`,rows:4,"aria-required":`true`,"aria-invalid":j.value,placeholder:p(d).baseText(`agents.toolConfig.workflow.description.placeholder`),"data-test-id":`agent-workflow-tool-description`},null,8,[`modelValue`,`class`,`aria-invalid`,`placeholder`]),m(p(U),{size:`xsmall`,color:`text-light`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.description.hint`)),1)]),_:1})],2),m(p(_e),{theme:`warning`,"data-test-id":`agent-workflow-tool-target-notice`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.target.notice`,{interpolate:{trigger:p(f)}})),1)]),_:1}),z(`div`,{class:D(t.$style.field)},[z(`label`,{class:D(t.$style.label),for:`workflow-tool-target`},[c(C(p(d).baseText(`agents.toolConfig.workflow.target`))+` `,1),m(p(U),{color:`primary`,size:`small`,bold:``},{default:o(()=>[...i[9]||=[c(`*`,-1)]]),_:1})],2),z(`div`,{class:D(t.$style.controlRow)},[m(p(fe),{"model-value":ne.value,class:D(t.$style.modeSelector),"data-test-id":`agent-workflow-tool-target-mode`,"onUpdate:modelValue":Ce},{default:o(()=>[m(p(Ue),{value:`list`,label:p(d).baseText(`resourceLocator.mode.list`)},null,8,[`label`]),m(p(Ue),{value:`id`,label:p(d).baseText(`resourceLocator.mode.id`)},null,8,[`label`])]),_:1},8,[`model-value`,`class`]),ne.value===`list`?(T(),n(p(fe),{key:0,id:`workflow-tool-target`,"model-value":me.value,class:D(t.$style.controlInput),filterable:``,loading:R.value,placeholder:p(d).baseText(`agents.toolConfig.workflow.target.placeholder`),"popper-class":t.$style.popper,"data-test-id":`agent-workflow-tool-target`,"onUpdate:modelValue":xe},{default:o(()=>[Y.value||ce.value||le.value?(T(),n(p(Ue),{key:F.value??N.value,value:F.value??N.value,label:N.value},null,8,[`value`,`label`])):x(``,!0),(T(!0),u(s,null,ee(de.value,e=>(T(),n(p(Ue),{key:e.id,value:e.id,label:e.name},{default:o(()=>[z(`div`,{class:D(t.$style.option)},[m(p(U),{size:`small`,bold:``},{default:o(()=>[c(C(e.name),1)]),_:2},1024),m(p(U),{size:`xsmall`,color:`text-light`,class:D(t.$style.optionMeta)},{default:o(()=>[c(C(e.meta),1)]),_:2},1032,[`class`])],2)]),_:2},1032,[`value`,`label`]))),128))]),_:1},8,[`model-value`,`class`,`loading`,`placeholder`,`popper-class`])):(T(),n(p(re),{key:1,id:`workflow-tool-target`,modelValue:W.value,"onUpdate:modelValue":i[1]||=e=>W.value=e,class:D(t.$style.controlInput),placeholder:p(d).baseText(`resourceLocator.id.placeholder`),"data-test-id":`agent-workflow-tool-target-id`,onBlur:i[2]||=e=>we(W.value),onKeyup:i[3]||=_(e=>we(W.value),[`enter`])},null,8,[`modelValue`,`class`,`placeholder`])),X.value?(T(),n(p(q),{key:2,icon:`external-link`,variant:`ghost`,size:`small`,class:D(t.$style.openTarget),title:p(d).baseText(`agents.toolConfig.workflow.target.open`),"aria-label":p(d).baseText(`agents.toolConfig.workflow.target.open`),"data-test-id":`agent-workflow-tool-target-open`,onClick:Se},null,8,[`class`,`title`,`aria-label`])):x(``,!0)],2),G.value?(T(),n(p(U),{key:0,size:`xsmall`,color:`danger`,"data-test-id":`agent-workflow-tool-target-id-unresolvable`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.target.idNotFound`,{interpolate:{trigger:p(f)}})),1)]),_:1})):Y.value?(T(),n(p(U),{key:1,size:`xsmall`,color:`danger`,"data-test-id":`agent-workflow-tool-target-missing`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.target.unavailable`,{interpolate:{name:N.value}})),1)]),_:1})):ce.value?(T(),n(p(U),{key:2,size:`xsmall`,color:`danger`,"data-test-id":`agent-workflow-tool-target-unusable`},{default:o(()=>[c(C(p(d).baseText(`agents.builder.validation.issue.tool.workflow.incompatibleReference`,{interpolate:{id:N.value}})),1)]),_:1})):le.value?(T(),n(p(U),{key:3,size:`xsmall`,color:`warning`,"data-test-id":`agent-workflow-tool-target-duplicate`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.target.duplicateName`,{interpolate:{name:N.value}})),1)]),_:1})):ue.value?(T(),n(p(U),{key:4,size:`xsmall`,color:`warning`,"data-test-id":`agent-workflow-tool-target-unpublished`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.target.notPublished`)),1)]),_:1})):x(``,!0)],2),A(t.$slots,`commonSettings`),z(`div`,{class:D(t.$style.field)},[z(`button`,{type:`button`,class:D(t.$style.advancedTrigger),"aria-expanded":H.value,"aria-controls":`workflow-tool-advanced`,"data-test-id":`agent-workflow-tool-advanced`,onClick:i[4]||=e=>H.value=!H.value},[m(p(U),{size:`small`,bold:``},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.advanced`)),1)]),_:1}),m(p(We),{icon:H.value?`chevron-up`:`chevron-down`,size:`medium`},null,8,[`icon`])],10,Bt),r(z(`div`,{id:`workflow-tool-advanced`,class:D(t.$style.advancedContent)},[m(et,{"control-id":`agent-workflow-tool-all-outputs`,title:p(d).baseText(`agents.toolConfig.workflow.allOutputs`),description:p(d).baseText(`agents.toolConfig.workflow.allOutputs.hint`)},{default:o(()=>[m(p(ge),{id:`agent-workflow-tool-all-outputs`,"model-value":M.value,"aria-label":p(d).baseText(`agents.toolConfig.workflow.allOutputs`),"data-test-id":`agent-workflow-tool-all-outputs`,"onUpdate:modelValue":i[5]||=e=>M.value=e},null,8,[`model-value`,`aria-label`])]),_:1},8,[`title`,`description`]),m(p(U),{size:`small`,bold:``},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.inputs`)),1)]),_:1}),R.value?(T(),n(p(U),{key:0,size:`small`,color:`text-light`,role:`status`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.inputs.loading`)),1)]),_:1})):V.value?Q.value?(T(),u(s,{key:2},[Z.value.length?(T(),n(zt,{key:X.value,modelValue:I.value,"onUpdate:modelValue":i[6]||=e=>I.value=e,fields:Z.value,"tool-name":O.value,submitted:(e.submitCount??0)>0,"onUpdate:valid":i[7]||=e=>te.value=e},null,8,[`modelValue`,`fields`,`tool-name`,`submitted`])):(T(),n(p(U),{key:0,size:`xsmall`,color:`text-light`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.inputs.empty`)),1)]),_:1}))],64)):x(``,!0):(T(),u(s,{key:1},[m(p(U),{size:`small`,color:`danger`,role:`alert`},{default:o(()=>[c(C(p(d).baseText(`agents.toolConfig.workflow.inputs.loadError`)),1)]),_:1}),m(p(pe),{variant:`ghost`,size:`small`,label:p(d).baseText(`generic.retry`),onClick:ie},null,8,[`label`])],64))],2),[[g,H.value]])],2)],2))}}),[[`__cssModules`,{$style:{container:`_container_xnrdk_3`,field:`_field_xnrdk_9`,invalidDescription:`_invalidDescription_xnrdk_15`,label:`_label_xnrdk_21`,controlRow:`_controlRow_xnrdk_27`,modeSelector:`_modeSelector_xnrdk_33`,controlInput:`_controlInput_xnrdk_38`,openTarget:`_openTarget_xnrdk_43`,popper:`_popper_xnrdk_47`,option:`_option_xnrdk_54`,optionMeta:`_optionMeta_xnrdk_61`,advancedTrigger:`_advancedTrigger_xnrdk_67`,advancedContent:`_advancedContent_xnrdk_85`}}]]);t(),O();var Ht=f({__name:`AgentToolConfigWorkflowContent`,props:{initialRef:{},projectId:{},showApprovalSetting:{type:Boolean},approvalRequired:{type:Boolean},submitCount:{}},emits:[`update:valid`,`update:node-name`,`update:approvalRequired`],setup(e,{expose:t,emit:r}){let i=e,a=r,s=B(null);function c(e){s.value?.handleChangeName(e)}function l(){return s.value?.name??``}function u(){return s.value?.description??``}function d(){return s.value?.allOutputs??!1}function f(){return s.value?.getWorkflow()??``}function p(){return s.value?.getWorkflowId()}function m(){return s.value?.getInputs()}return t({getName:l,getDescription:u,getAllOutputs:d,getWorkflow:f,getWorkflowId:p,getInputs:m,handleChangeName:c}),(e,t)=>(T(),n(Vt,{ref_key:`contentRef`,ref:s,"initial-ref":i.initialRef,"project-id":i.projectId,"submit-count":i.submitCount,"onUpdate:valid":t[1]||=e=>a(`update:valid`,e),"onUpdate:nodeName":t[2]||=e=>a(`update:node-name`,e)},{commonSettings:o(()=>[i.showApprovalSetting?(T(),n(gt,{key:0,"model-value":i.approvalRequired??!1,"onUpdate:modelValue":t[0]||=e=>a(`update:approvalRequired`,e)},null,8,[`model-value`])):x(``,!0)]),_:1},8,[`initial-ref`,`project-id`,`submit-count`]))}});t(),O(),N();var Ut=`agents.builder.validation.issue.httpRequestUrlFromAi`,Wt=G(f({__name:`AgentToolConfigForm`,props:{data:{}},emits:[`update:title`,`credential-deleted`,`update:restricted`],setup(e,{expose:t,emit:r}){let i=e,a=r,s=$(),l=ve(),d=Q();function f(e){return e.kind===`mcpServer`}function m(e){if(typeof e!=`string`)return!1;try{return ne(e).length>0}catch{return!1}}let g=y(()=>f(i.data)),_=y(()=>f(i.data)?i.data:null),v=y(()=>f(i.data)?null:i.data),b=y(()=>h(v.value?.validationIssues)??[]),S=y(()=>v.value?.toolRef.type===`workflow`),w=y(()=>v.value?.toolRef.type===`custom`),E=B(null),O=B(null),A=B(null),j=B(!1),M=B(0),N=B(!1),P=B(),ee=B(!0),I=B(null),R=y(()=>g.value?_.value?.initialNode??null:S.value||w.value?null:v.value?Ce(v.value.toolRef):null),{isRestricted:z,restriction:V}=K(()=>R.value?.type),H=y(()=>R.value?d.getNodeType(R.value.type)?.displayName??R.value.type:``);L(z,e=>a(`update:restricted`,e),{immediate:!0});let W=y(()=>S.value&&v.value?.toolRef.type===`workflow`?v.value.toolRef:null),G=y(()=>g.value?_.value?.mcpServer.name??``:(v.value?.toolRef.type===`node`?v.value.toolRef.name:void 0)??R.value?.name??``),re=B(G.value),ie=y(()=>g.value?``:v.value?.customTool?.code??``),ae=y(()=>{let e=v.value?.toolRef,t=e?.type===`custom`?e.id:e?.type===`workflow`||e?.type===`node`?e.name:void 0;return v.value?.customTool?.descriptor.name??t??s.baseText(`agents.builder.tree.customBadge`)}),oe=y(()=>w.value?ae.value:re.value),q=y(()=>i.data.supportsToolApproval!==!1),se=y(()=>q.value&&!g.value&&v.value!==null);L(()=>v.value?.toolRef,e=>{N.value=!!e?.requireApproval},{immediate:!0}),L(()=>_.value?.mcpServer.toolPermissions,e=>{P.value=e??{categories:{read:`always_allow`,write:`always_allow`}}},{immediate:!0}),L(R,e=>{I.value=e},{immediate:!0}),L(oe,e=>a(`update:title`,e),{immediate:!0});let Y=y(()=>I.value??R.value),ue=y(()=>b.value.some(Be)),de=y(()=>v.value?.toolRef.type!==`node`||!b.value.some(e=>e.code===`invalid_value`&&e.path.endsWith(`.node.nodeParameters.url`))?!1:m(Y.value?.parameters.url)),X=y(()=>w.value?!0:g.value?j.value&&(!q.value||ee.value):j.value&&!de.value),fe=y(()=>{let e=v.value?.toolRef;return e?.type===`node`&&(e.node.nodeType===`n8n-nodes-base.httpRequest`||e.node.nodeType===`n8n-nodes-base.httpRequestTool`)?[`url`]:[]}),pe=y(()=>{let e={};return de.value&&(e.url=[s.baseText(Ut)]),e});function me(e){if(!q.value){let{requireApproval:t,...n}=e;return n}let t={...e};return N.value?t.requireApproval=!0:delete t.requireApproval,t}function he(){if(M.value+=1,!X.value)return!1;if(w.value){let e=v.value;return e?(e.onConfirm(me(e.toolRef)),!0):!1}if(g.value){let e=O.value?.getNode(),t=_.value;if(!e||!t||!P.value)return!1;let n=Te(e,t.mcpServer);return t.onConfirm({...n,toolPermissions:q.value?P.value:{categories:{read:`always_allow`,write:`always_allow`}}}),!0}if(S.value){let e=A.value,t=v.value;if(!t||!e)return!1;let n=e.getWorkflowId(),r=le(t.toolRef,{name:e.getName(),description:e.getDescription(),allOutputs:e.getAllOutputs(),workflow:e.getWorkflow(),...n===void 0?{}:{workflowId:n},inputs:e.getInputs()});return t.onConfirm(me(r)),!0}let e=E.value?.getNode(),t=v.value;if(!e||!t)return!1;let n=ce(t.toolRef,e);return t.onConfirm(me(n)),!0}function ge(){i.data.onRemove?.()}function Z(e){w.value||(g.value?O.value?.handleChangeName(e):S.value?A.value?.handleChangeName(e):E.value?.handleChangeName(e))}function ye(e){re.value=e}let be=k(!0);return be.run(()=>{te({store:l,onCredentialDeleted:e=>{let t=_.value;t&&t.mcpServer.credential===e&&(t.onRemove?.(),a(`credential-deleted`))}})}),F(()=>be.stop()),t({canSave:X,confirm:he,remove:ge,changeTitle:Z}),(t,r)=>(T(),u(`div`,{class:D([t.$style.contentWrapper,w.value&&t.$style.codeContentWrapper])},[p(z)?(T(),n(p(J),{key:0,"node-type-name":H.value,restriction:p(V)},null,8,[`node-type-name`,`restriction`])):ue.value?(T(),n(p(_e),{key:1,theme:`warning`,"data-test-id":`inline-restricted-tool-callout`},{default:o(()=>[c(C(p(s).baseText(`agents.toolConfig.restrictedInlineTool`)),1)]),_:1})):x(``,!0),M.value&&!X.value?(T(),n(p(U),{key:2,size:`small`,color:`danger`,"data-testid":`agent-tool-config-validation-error`},{default:o(()=>[c(C(p(s).baseText(`agents.toolConfig.validation.fixFields`)),1)]),_:1})):x(``,!0),w.value?(T(),n(vt,{key:3,code:ie.value,class:D(t.$style.customToolViewer)},null,8,[`code`,`class`])):x(``,!0),w.value&&se.value?(T(),n(gt,{key:4,modelValue:N.value,"onUpdate:modelValue":r[0]||=e=>N.value=e},null,8,[`modelValue`])):(T(),u(`div`,{key:5,class:D(t.$style.configureTab)},[W.value?(T(),n(Ht,{key:0,ref_key:`workflowContentRef`,ref:A,"initial-ref":W.value,"submit-count":M.value,"project-id":e.data.projectId,"show-approval-setting":se.value,"approval-required":N.value,"onUpdate:valid":r[1]||=e=>j.value=e,"onUpdate:nodeName":ye,"onUpdate:approvalRequired":r[2]||=e=>N.value=e},null,8,[`initial-ref`,`submit-count`,`project-id`,`show-approval-setting`,`approval-required`])):g.value&&R.value?(T(),n(bt,{key:1,ref_key:`mcpContentRef`,ref:O,"initial-node":R.value,"existing-tool-names":e.data.existingToolNames,"project-id":e.data.projectId,"hidden-parameters":[`include`,`includeTools`,`excludeTools`],"read-only":p(z),"content-test-id":`agent-tool-config-mcp-content`,"onUpdate:valid":r[3]||=e=>j.value=e,"onUpdate:nodeName":ye,"onUpdate:node":r[4]||=e=>I.value=e},null,8,[`initial-node`,`existing-tool-names`,`project-id`,`read-only`])):R.value?(T(),n(bt,{key:2,ref_key:`nodeContentRef`,ref:E,"initial-node":R.value,"existing-tool-names":e.data.existingToolNames,"project-id":e.data.projectId,"from-ai-disabled-parameters":fe.value,"parameter-issues":pe.value,"read-only":p(z),"content-test-id":`node-tool-settings-content`,"onUpdate:valid":r[5]||=e=>j.value=e,"onUpdate:nodeName":ye,"onUpdate:node":r[6]||=e=>I.value=e},null,8,[`initial-node`,`existing-tool-names`,`project-id`,`from-ai-disabled-parameters`,`parameter-issues`,`read-only`])):x(``,!0),!g.value&&R.value&&se.value?(T(),n(gt,{key:3,modelValue:N.value,"onUpdate:modelValue":r[7]||=e=>N.value=e,disabled:p(z)},null,8,[`modelValue`,`disabled`])):x(``,!0),g.value&&P.value&&q.value&&Y.value?(T(),n(yt,{key:4,modelValue:P.value,"onUpdate:modelValue":r[8]||=e=>P.value=e,node:Y.value,disabled:p(z),"project-id":e.data.projectId,"onUpdate:valid":r[9]||=e=>ee.value=e},null,8,[`modelValue`,`node`,`disabled`,`project-id`])):x(``,!0)],2))],2))}}),[[`__cssModules`,{$style:{contentWrapper:`_contentWrapper_35uik_1`,codeContentWrapper:`_codeContentWrapper_35uik_11`,configureTab:`_configureTab_35uik_16`,customToolViewer:`_customToolViewer_35uik_23`}}]]);t(),O();var Gt=f({__name:`AgentToolConfigContent`,props:{data:{}},emits:[`credential-deleted`,`request-credential-picker`,`update:title`,`update:restricted`],setup(e,{expose:t,emit:r}){let i=e,a=r,o=B(null),s=B(null),c=y(()=>i.data.kind===`registryMcpServer`),l=y(()=>s.value?.titleError??``),u=y(()=>s.value?.headerItem??null),d=y(()=>s.value?.credentialAdapter??null),f=y(()=>c.value&&(s.value?.saveDisabled??!0));function p(){return c.value?s.value?.confirm()??!1:o.value?.confirm()??!1}async function m(){return c.value?await s.value?.remove()??!1:(o.value?.remove(),!0)}function h(e){c.value?s.value?.changeTitle(e):o.value?.changeTitle(e)}function g(e,t){c.value&&s.value?.selectCredential(e,t)}return t({changeTitle:h,confirm:p,credentialAdapter:d,headerItem:u,remove:m,saveDisabled:f,selectCredential:g,titleError:l}),(t,r)=>e.data.kind===`registryMcpServer`?(T(),n(ht,{key:0,ref_key:`registryForm`,ref:s,data:e.data,onCredentialDeleted:r[0]||=e=>a(`credential-deleted`),onRequestCredentialPicker:r[1]||=e=>a(`request-credential-picker`),"onUpdate:title":r[2]||=e=>a(`update:title`,e)},null,8,[`data`])):(T(),n(Wt,{key:1,ref_key:`genericForm`,ref:o,data:e.data,onCredentialDeleted:r[3]||=e=>a(`credential-deleted`),"onUpdate:title":r[4]||=e=>a(`update:title`,e),"onUpdate:restricted":r[5]||=e=>a(`update:restricted`,e)},null,8,[`data`]))}});t(),O();var Kt=f({__name:`AgentToolConfigCredentialPicker`,props:{item:{},adapter:{},showConnectedIcon:{type:Boolean}},emits:[`select-credential`],setup(e,{expose:t,emit:r}){let i=r,a=B(null);function o(){a.value?.open()}return t({open:o}),(t,r)=>(T(),n(Ke,{ref_key:`picker`,ref:a,item:e.item,credentials:e.item.credentials??[],adapter:e.adapter,"show-connected-icon":e.showConnectedIcon,onSelectCredential:r[0]||=(e,t,n)=>i(`select-credential`,t,n)},null,8,[`item`,`credentials`,`adapter`,`show-connected-icon`]))}});t(),O(),N();var qt=G(f({__name:`AgentToolConfigTitleIcon`,props:{data:{}},setup(e){let t=e,r=Q(),i=y(()=>{if(t.data.kind===`registryMcpServer`){let e=t.data.mcpServer.metadata?.nodeTypeName;return e?r.getNodeType(e):null}return t.data.kind===`mcpServer`?r.getNodeType(t.data.initialNode.type,t.data.initialNode.typeVersion):t.data.toolRef.type===`node`?r.getNodeType(t.data.toolRef.node.nodeType,t.data.toolRef.node.nodeTypeVersion):null}),a=y(()=>{if(t.data.kind===`registryMcpServer`||t.data.kind===`mcpServer`)return`server`;if(t.data.toolRef.type===`workflow`)return`workflow`;if(t.data.toolRef.type===`custom`)return`code`});return(e,t)=>(T(),u(`span`,{class:D(e.$style.icon),"data-testid":`agent-tool-config-title-icon`,"aria-hidden":`true`},[i.value?(T(),n(ae,{key:0,"node-type":i.value,size:24,circle:!0},null,8,[`node-type`])):a.value?(T(),n(p(We),{key:1,icon:a.value,size:20},null,8,[`icon`])):x(``,!0)],2))}}),[[`__cssModules`,{$style:{icon:`_icon_1ygfj_1`}}]]);export{Dt as a,it as c,rt as d,wt as i,at as l,Kt as n,At as o,Gt as r,ct as s,qt as t,ot as u};