@atom8n/n8n-editor-ui 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/.stylelintcache +1 -0
  2. package/README.md +59 -0
  3. package/biome.jsonc +8 -0
  4. package/build.log +55 -0
  5. package/data/node-popularity.json +3998 -0
  6. package/dist/assets/AddDataTableModal-UINkk54_.js +1555 -0
  7. package/dist/assets/AgentEditorModal-CVww87TJ.js +358 -0
  8. package/dist/assets/Alert-Dy86dyOr.js +102 -0
  9. package/dist/assets/AnimatedSpinner-DmPN4poP.js +15 -0
  10. package/dist/assets/AnnotationTagsDropdown.ee-BJ7N9lek.js +71 -0
  11. package/dist/assets/AuthView-D2LWHrMp.js +106 -0
  12. package/dist/assets/BottomMenu-CIQiK_dJ.js +532 -0
  13. package/dist/assets/CalendarDate-DgQUMbNo.js +875 -0
  14. package/dist/assets/ChangePasswordView-Z6tUkw0u.js +133 -0
  15. package/dist/assets/ChatAgentAvatar-50YBnv3N.js +67 -0
  16. package/dist/assets/ChatFile-xZxmc2nV.js +146 -0
  17. package/dist/assets/ChatLayout-CTE_5SiM.js +96 -0
  18. package/dist/assets/ChatPersonalAgentsView-BGpHk03K.js +149 -0
  19. package/dist/assets/ChatSidebar-BkVwIypC.js +528 -0
  20. package/dist/assets/ChatView-BbbdeU9x.js +1559 -0
  21. package/dist/assets/ChatWorkflowAgentsView-BtunOxlC.js +116 -0
  22. package/dist/assets/CollectionParameter-BdcPG1lu.js +52 -0
  23. package/dist/assets/CommitMonoVariable-ytizKI8U.woff2 +0 -0
  24. package/dist/assets/CommunityNodeUpdateInfo-C37kca4W.js +273 -0
  25. package/dist/assets/CopyInput-DDZVu2iU.js +74 -0
  26. package/dist/assets/CredentialIcon-8YdTTFZ1.js +80 -0
  27. package/dist/assets/CredentialPicker-DWtj314o.js +293 -0
  28. package/dist/assets/CredentialSelectorModal-DTW2fKh0.js +138 -0
  29. package/dist/assets/CredentialsView-BjUchcCu.js +480 -0
  30. package/dist/assets/DataTableActions-DpAkoxg_.js +95 -0
  31. package/dist/assets/DataTableDetailsView-Coq7zdW5.js +41922 -0
  32. package/dist/assets/DataTableView-Cs-BIkzw.js +293 -0
  33. package/dist/assets/DemoFooter-Cga3jvi-.js +65 -0
  34. package/dist/assets/Draggable-vfvXl9Sp.js +105 -0
  35. package/dist/assets/EmptySharedSectionActionBox-DOXZtTCv.js +36 -0
  36. package/dist/assets/EnterpriseEdition.ee-D_rCFexM.js +15 -0
  37. package/dist/assets/EntityNotFound-3dhTRWsE.js +85 -0
  38. package/dist/assets/EntityUnAuthorised-ChJYZakE.js +66 -0
  39. package/dist/assets/ErrorView-zT9cX76a.js +61 -0
  40. package/dist/assets/EvaluationsRootView-C-OVWYnY.js +523 -0
  41. package/dist/assets/EvaluationsView-CJwJTruc.js +469 -0
  42. package/dist/assets/ExecutionsTime-DEQiyozR.js +573 -0
  43. package/dist/assets/ExecutionsView-Bd5Oh8TH.js +791 -0
  44. package/dist/assets/ExternalSecretsProviderConnectionSwitch.ee-C7Ih-uRo.js +191 -0
  45. package/dist/assets/FixedCollectionParameter-CYuTDW9t.js +496 -0
  46. package/dist/assets/ForgotMyPasswordView-Bs_L9P27.js +102 -0
  47. package/dist/assets/InsightsChartAverageRuntime-Bp3VA8_7.js +62 -0
  48. package/dist/assets/InsightsChartFailed-KPaNWoEr.js +52 -0
  49. package/dist/assets/InsightsChartFailureRate-DE6kE3FM.js +54 -0
  50. package/dist/assets/InsightsChartTimeSaved-auABNZlc.js +68 -0
  51. package/dist/assets/InsightsChartTotal-BKzYRKE7.js +56 -0
  52. package/dist/assets/InsightsDashboard-JWx4W6Db.js +473 -0
  53. package/dist/assets/InsightsPaywall-C8zLLKe8.js +63 -0
  54. package/dist/assets/InsightsSummary-cmN1lHDm.js +210 -0
  55. package/dist/assets/InsightsTableWorkflows-CqcC3IbQ.js +203 -0
  56. package/dist/assets/InterVariable-DiVDrmQJ.woff2 +0 -0
  57. package/dist/assets/InterVariable-Italic-FCBEiFp6.woff2 +0 -0
  58. package/dist/assets/ItemsRenderer-DC8WVyMv.js +922 -0
  59. package/dist/assets/KeyboardShortcutTooltip-D8PAK5JP.js +31 -0
  60. package/dist/assets/LogsPanel-BR06u9RK.js +52 -0
  61. package/dist/assets/LogsPanel-C-_acMHp.js +2325 -0
  62. package/dist/assets/MCPConnectWorkflowsModal-3g8_iUa4.js +303 -0
  63. package/dist/assets/MainHeader-DiQc1edn.js +2153 -0
  64. package/dist/assets/MainSidebar-CoPGG5Ea.js +804 -0
  65. package/dist/assets/MigrationRuleDetail-BAxk1Pvl.js +295 -0
  66. package/dist/assets/MigrationRules-IW9lZMpE.js +285 -0
  67. package/dist/assets/Modal-CIzXlZdZ.js +204 -0
  68. package/dist/assets/ModelByIdSelectorModal-DLvBjzJO.js +115 -0
  69. package/dist/assets/NDVEmptyState-33UoX00I.js +19743 -0
  70. package/dist/assets/NodeCreation-BNzbSWSB.js +240 -0
  71. package/dist/assets/NodeCreator-BftgCKx7.js +1288 -0
  72. package/dist/assets/NodeDetailsView-CsoQCpcF.js +1075 -0
  73. package/dist/assets/NodeDetailsViewV2-C_wNQR_3.js +981 -0
  74. package/dist/assets/NodeIcon-B9VW6tX6.js +87 -0
  75. package/dist/assets/NodeSettings-ZwVip6VR.js +1872 -0
  76. package/dist/assets/NodeView-D4WUEvLB.js +2452 -0
  77. package/dist/assets/OAuthConsentView-DlrUqZbT.js +230 -0
  78. package/dist/assets/PageViewLayout-NT1KPFgy.js +12 -0
  79. package/dist/assets/ParameterInputList-sG2nz-Jo.js +38091 -0
  80. package/dist/assets/PrebuiltAgentTemplatesView-Csi5U8dc.js +154 -0
  81. package/dist/assets/ProjectBreadcrumb-C_XiY7sc.js +98 -0
  82. package/dist/assets/ProjectCardBadge-t_hs7vzx.js +209 -0
  83. package/dist/assets/ProjectHeader-Dq5Ihb26.js +549 -0
  84. package/dist/assets/ProjectIcon-DY8gGuHX.js +64 -0
  85. package/dist/assets/ProjectRoleView-Du-KTrAC.js +435 -0
  86. package/dist/assets/ProjectRolesView-DjxM_y4u.js +239 -0
  87. package/dist/assets/ProjectSettings-C6kWuV21.js +966 -0
  88. package/dist/assets/ProjectSharing-CVUgNWAY.js +262 -0
  89. package/dist/assets/ProjectVariables-CJlAo3dv.js +467 -0
  90. package/dist/assets/ProviderSettingsModal-BUFC2ZLv.js +307 -0
  91. package/dist/assets/PushConnectionTracker-DPBnGV0v.js +27 -0
  92. package/dist/assets/ResolversView-3BdkvvYA.js +209 -0
  93. package/dist/assets/ResourceFiltersDropdown-dgyXpcEX.js +159 -0
  94. package/dist/assets/ResourcesListLayout-qBLtomK6.js +631 -0
  95. package/dist/assets/RunDataHtml-BrW0OQra.js +7 -0
  96. package/dist/assets/RunDataHtml-Cleia4Cj.js +40 -0
  97. package/dist/assets/RunDataJson-uxkrhYRK.js +227 -0
  98. package/dist/assets/RunDataJsonActions-DkPk7E8d.js +5007 -0
  99. package/dist/assets/RunDataParsedAiContent-CtPRjig-.js +26 -0
  100. package/dist/assets/RunDataParsedAiContent-WAuqLQ5M.js +192 -0
  101. package/dist/assets/RunDataSearch-YBWUr93C.js +141 -0
  102. package/dist/assets/RunDataTable-DcXaBynW.js +631 -0
  103. package/dist/assets/SamlOnboarding-BTdQ_hr3.js +78 -0
  104. package/dist/assets/SaveButton-D5sQSxIk.js +89 -0
  105. package/dist/assets/SelectedItemsInfo-BHZ-NvF5.js +58 -0
  106. package/dist/assets/SettingsApiView-IfZTMXx1.js +313 -0
  107. package/dist/assets/SettingsChatHubView-gWh2X6vX.js +285 -0
  108. package/dist/assets/SettingsCommunityNodesView-D8VQtpGY.js +349 -0
  109. package/dist/assets/SettingsExternalSecrets-CpMc7mkW.js +233 -0
  110. package/dist/assets/SettingsLdapView-CU5a2MAy.js +2553 -0
  111. package/dist/assets/SettingsLogStreamingView-uojTe-oX.js +375 -0
  112. package/dist/assets/SettingsMCPView-B5Swp1C_.js +1214 -0
  113. package/dist/assets/SettingsPersonalView-Cr3aGood.js +402 -0
  114. package/dist/assets/SettingsSourceControl-DXOvFDEY.js +547 -0
  115. package/dist/assets/SettingsSso-27MfU1HV.js +1032 -0
  116. package/dist/assets/SettingsUsageAndPlan-DqIO-G46.js +419 -0
  117. package/dist/assets/SettingsUsersView-DfHB4_Kh.js +833 -0
  118. package/dist/assets/SettingsView-C4sA7Uny.js +90 -0
  119. package/dist/assets/SetupTemplateFormStep-BmiSzZin.js +258 -0
  120. package/dist/assets/SetupView-VORZ-L_u.js +112 -0
  121. package/dist/assets/SetupWorkflowCredentialsButton-DTmkOAW5.js +73 -0
  122. package/dist/assets/SetupWorkflowFromTemplateView-B9NupdJE.js +286 -0
  123. package/dist/assets/SeverityTag-CX1qTTNA.js +45 -0
  124. package/dist/assets/SigninView-D9_Pm16j.js +358 -0
  125. package/dist/assets/SignoutView-BFsjEAGz.js +19 -0
  126. package/dist/assets/SignupView-Am4ot0QZ.js +137 -0
  127. package/dist/assets/SkeletonAgentCard-C5TL-h8F.js +191 -0
  128. package/dist/assets/TagsDropdown-Bvx_Hd6Q.js +230 -0
  129. package/dist/assets/TemplateCard-CyQ1GuVz.js +105 -0
  130. package/dist/assets/TemplateDetails-CZRusTxE.js +124 -0
  131. package/dist/assets/TemplateList-DKvbwuiY.js +333 -0
  132. package/dist/assets/TemplatesCollectionView-D8dxU8By.js +184 -0
  133. package/dist/assets/TemplatesSearchView-CebC_GLs.js +1230 -0
  134. package/dist/assets/TemplatesView-025CcmIY.js +57 -0
  135. package/dist/assets/TemplatesWorkflowView-C2JfwJAn.js +170 -0
  136. package/dist/assets/TestRunDetailView-Ck78TTWO.js +395 -0
  137. package/dist/assets/TextWithHighlights-BxumwGnv.js +57 -0
  138. package/dist/assets/TimeAgo-C6EN4lCs.js +123 -0
  139. package/dist/assets/ToolsSelectorModal-8QJoUvRL.js +368 -0
  140. package/dist/assets/TriggerPanel-B6pacLkk.js +1225 -0
  141. package/dist/assets/VirtualSchema-B3zGe_8b.js +2402 -0
  142. package/dist/assets/VirtualSchema-Dkh0Cu5z.js +37 -0
  143. package/dist/assets/VueMarkdown-CQqJL9vK.js +28 -0
  144. package/dist/assets/WorkerView-Caznsljo.js +563 -0
  145. package/dist/assets/WorkflowActivationErrorMessage-CGrfPi9O.js +17 -0
  146. package/dist/assets/WorkflowActivator-BINnz0f7.js +362 -0
  147. package/dist/assets/WorkflowExecutionsInfoAccordion-Dg37yEfT.js +166 -0
  148. package/dist/assets/WorkflowExecutionsLandingPage-V2wdubhK.js +93 -0
  149. package/dist/assets/WorkflowExecutionsPreview-DdJaqYV6.js +616 -0
  150. package/dist/assets/WorkflowExecutionsView-DV8ySTfn.js +808 -0
  151. package/dist/assets/WorkflowHistory-GtaBMzIM.js +973 -0
  152. package/dist/assets/WorkflowLocation-CQ9Sq-2y.js +164 -0
  153. package/dist/assets/WorkflowOnboardingView-C49gt0Jr.js +61 -0
  154. package/dist/assets/WorkflowPreview-CXdvv4Nq.js +186 -0
  155. package/dist/assets/WorkflowTagsDropdown-QwbICWjN.js +71 -0
  156. package/dist/assets/WorkflowsView-B-MWIECO.js +3253 -0
  157. package/dist/assets/_MapCache-CcdIl4Ae.js +363 -0
  158. package/dist/assets/_baseOrderBy-N8Be_6z6.js +2989 -0
  159. package/dist/assets/_initCloneObject-viQQyT6o.js +80 -0
  160. package/dist/assets/_plugin-vue_export-helper-BwBpWJRZ.js +6 -0
  161. package/dist/assets/aiTemplatesStarterCollection.store-nL9nePkK.js +656 -0
  162. package/dist/assets/apiKeys.store-BhOFmP2j.js +51 -0
  163. package/dist/assets/assistant.store-CNywgN4S.js +518 -0
  164. package/dist/assets/auth.eventBus-CWXS0Qp7.js +5 -0
  165. package/dist/assets/banners.store-CGEcBTDn.js +195 -0
  166. package/dist/assets/builder.store-Czk2ipDE.js +31417 -0
  167. package/dist/assets/buttons.esm-yintpW2E.js +364 -0
  168. package/dist/assets/chart-CNvyywtJ.js +10958 -0
  169. package/dist/assets/chartjs.utils-BAE52Cv9.js +155 -0
  170. package/dist/assets/chat.store-290YeyrQ.js +865 -0
  171. package/dist/assets/chatPanel.store-NDaawEZL.js +118 -0
  172. package/dist/assets/chunk-6z4oVpB-.js +36 -0
  173. package/dist/assets/col-Cmt4cmuS.js +158 -0
  174. package/dist/assets/constants-C8OH4tTq.js +106256 -0
  175. package/dist/assets/constants-DMrsrpD7.js +32 -0
  176. package/dist/assets/core-B9gt_4yk.js +4 -0
  177. package/dist/assets/core-CP5FY4aX.js +1202 -0
  178. package/dist/assets/core-CRbPymLT.js +9741 -0
  179. package/dist/assets/dataTable.store-DmipQsol.js +207 -0
  180. package/dist/assets/date-picker-2IDsBs2n.js +4115 -0
  181. package/dist/assets/dateFormatter-ik4-9_9r.js +33 -0
  182. package/dist/assets/dateformat-hG8NERse.js +181 -0
  183. package/dist/assets/dialog-lMho1TD8.js +425 -0
  184. package/dist/assets/dist-Cw46Is-h.js +151 -0
  185. package/dist/assets/doppler-B__k0MeW.webp +0 -0
  186. package/dist/assets/element-icons-B-tDfklg.woff +0 -0
  187. package/dist/assets/element-icons-_lZGOqcG.ttf +0 -0
  188. package/dist/assets/empty-BuGRxzl4.js +2210 -0
  189. package/dist/assets/en-CF30SCh2.js +95 -0
  190. package/dist/assets/en-DyO2pPiC.js +2 -0
  191. package/dist/assets/es-BkUFJVtD.js +43338 -0
  192. package/dist/assets/evaluation.constants-GYAwmJnh.js +284 -0
  193. package/dist/assets/executions.store-B9uRYwgv.js +205 -0
  194. package/dist/assets/exports-Crx_gvt_.js +1799 -0
  195. package/dist/assets/externalSecrets.ee.store-BJh4a_6G.js +118 -0
  196. package/dist/assets/fileUtils-CRWqOQje.js +20 -0
  197. package/dist/assets/folders.store-yAFj-5Vl.js +235 -0
  198. package/dist/assets/get-BcEmeOxn.js +2781 -0
  199. package/dist/assets/index-SL8542zQ.js +28372 -0
  200. package/dist/assets/insights.constants-BkJCYJTL.js +55 -0
  201. package/dist/assets/insights.store-BFc3kDUo.js +61 -0
  202. package/dist/assets/insights.utils-CcLXdrrz.js +77 -0
  203. package/dist/assets/isEmpty-C3XXoHqJ.js +35216 -0
  204. package/dist/assets/languageModules-9LyndCqU.js +13862 -0
  205. package/dist/assets/logStreaming.store-IZhWe_VK.js +190 -0
  206. package/dist/assets/mcp.constants-_Jcn7fPq.js +10 -0
  207. package/dist/assets/mcp.store-B9yfcAN9.js +116 -0
  208. package/dist/assets/merge-DhuTk1HM.js +564 -0
  209. package/dist/assets/nodeCreator.store-Bpnrwp2l.js +5444 -0
  210. package/dist/assets/nodeIcon-D6X-ENYt.js +102 -0
  211. package/dist/assets/nodeTransforms-RzcOM0v2.js +42 -0
  212. package/dist/assets/orderBy-Cu9F9DU_.js +15 -0
  213. package/dist/assets/path-browserify-RUt2u7iT.js +328 -0
  214. package/dist/assets/personalizedTemplatesV3.store-BGYp0YBN.js +334 -0
  215. package/dist/assets/pickBy-UI0Jt4wC.js +18 -0
  216. package/dist/assets/preload-helper-dyVz7ck7.js +59 -0
  217. package/dist/assets/radio-CSce3UT0.js +262 -0
  218. package/dist/assets/readyToRun.store-YEMvPUqo.js +626 -0
  219. package/dist/assets/readyToRunWorkflows.store-G3srgIze.js +1319 -0
  220. package/dist/assets/retry-BgHaYzbB.js +23 -0
  221. package/dist/assets/roles.store-CRf_zJTb.js +51 -0
  222. package/dist/assets/router-DNpzz3GH.js +2631 -0
  223. package/dist/assets/sanitize-html-CbW56HUN.js +10758 -0
  224. package/dist/assets/schemaPreview.store-DUgN1yVE.js +113 -0
  225. package/dist/assets/semver-Bk6DGseV.js +1306 -0
  226. package/dist/assets/smartDecimal-DAZl4HKA.js +6 -0
  227. package/dist/assets/sortByProperty-Cn7iGKYu.js +8 -0
  228. package/dist/assets/sourceControl.eventBus-D47xXSc_.js +3 -0
  229. package/dist/assets/sqlite3-DBpDb1lf.wasm +0 -0
  230. package/dist/assets/sqlite3-opfs-async-proxy-vVtmDGHX.js +461 -0
  231. package/dist/assets/sqlite3-worker1-bundler-friendly-DLarOZDL.js +9405 -0
  232. package/dist/assets/src-jviYSG25.js +55454 -0
  233. package/dist/assets/sso.store-DyApJwhx.js +139 -0
  234. package/dist/assets/style-E3CrYFV8.css +111829 -0
  235. package/dist/assets/table-we1DjFMV.js +3944 -0
  236. package/dist/assets/templateActions-bEDSARw2.js +65 -0
  237. package/dist/assets/templateTransforms-BHWiRbtR.js +43 -0
  238. package/dist/assets/truncate-C0KYt7i3.js +4176 -0
  239. package/dist/assets/typescript.worker-CYqLvLHh.js +152048 -0
  240. package/dist/assets/uniqBy-xDyuCRP0.js +10 -0
  241. package/dist/assets/usage.store-CU5J_nGm.js +100 -0
  242. package/dist/assets/useActions-B1JckIRj.js +255 -0
  243. package/dist/assets/useBeforeUnload-DiDkvI8p.js +40 -0
  244. package/dist/assets/useCanvasMapping-BXT7rGhC.js +12570 -0
  245. package/dist/assets/useCanvasOperations-8ULLtMkY.js +1765 -0
  246. package/dist/assets/useClipboard-DvjhVHqJ.js +39 -0
  247. package/dist/assets/useCommandBar-C4tLJbKt.js +2425 -0
  248. package/dist/assets/useCredentialResolvers-BKeFGJnY.js +78 -0
  249. package/dist/assets/useCustomAgent-DpILEt5e.js +471 -0
  250. package/dist/assets/useDebounce-Br5_1ug-.js +147 -0
  251. package/dist/assets/useExecutionData-M5iKsX6z.js +23 -0
  252. package/dist/assets/useExecutionDebugging-8azMzbnd.js +191 -0
  253. package/dist/assets/useExecutionHelpers-BgRRhpBM.js +91 -0
  254. package/dist/assets/useImportCurlCommand-CKiEmX5P.js +8891 -0
  255. package/dist/assets/useIntersectionObserver-BWMwOueh.js +33 -0
  256. package/dist/assets/useKeybindings-B2jfN6rd.js +62 -0
  257. package/dist/assets/useLogsTreeExpand-sZViUfdM.js +843 -0
  258. package/dist/assets/useMcp-DoMOIfqT.js +27 -0
  259. package/dist/assets/usePageRedirectionHelper-DjkznpX6.js +51 -0
  260. package/dist/assets/usePinnedData-BhZkqttf.js +203 -0
  261. package/dist/assets/usePushConnection-DMS-F_IW.js +513 -0
  262. package/dist/assets/useRecentResources-BVORr7eM.js +118 -0
  263. package/dist/assets/useRunWorkflow-LO7ffLp9.js +950 -0
  264. package/dist/assets/useSettingsItems-BhZXwMZn.js +144 -0
  265. package/dist/assets/useTelemetryContext-V6bv4YRq.js +34 -0
  266. package/dist/assets/useWorkflowActivate-DeSmDXjI.js +152 -0
  267. package/dist/assets/useWorkflowsCache-DtcEEAIR.js +179 -0
  268. package/dist/assets/userRoleProvisioning.store-kkSIdeTo.js +33 -0
  269. package/dist/assets/utils-DI7dLldp.js +54 -0
  270. package/dist/assets/versions.store-B1z2OrLE.js +191 -0
  271. package/dist/assets/vue-CydWIhxN.js +4378 -0
  272. package/dist/assets/vue-json-pretty-CsGX66mG.js +1130 -0
  273. package/dist/assets/vue.runtime.esm-bundler-tP5dCd7J.js +7325 -0
  274. package/dist/assets/xml-B_oj6Mle.js +2060 -0
  275. package/dist/favicon.ico +0 -0
  276. package/dist/index.html +157 -0
  277. package/dist/static/base-path.js +1 -0
  278. package/dist/static/community_package_tooltip_img.png +0 -0
  279. package/dist/static/data-mapping-gif.gif +0 -0
  280. package/dist/static/form-grey.svg +1 -0
  281. package/dist/static/google-auth/disabled.dark.png +0 -0
  282. package/dist/static/google-auth/disabled.png +0 -0
  283. package/dist/static/google-auth/focus.dark.png +0 -0
  284. package/dist/static/google-auth/focus.png +0 -0
  285. package/dist/static/google-auth/normal.dark.png +0 -0
  286. package/dist/static/google-auth/normal.png +0 -0
  287. package/dist/static/google-auth/pressed.dark.png +0 -0
  288. package/dist/static/google-auth/pressed.png +0 -0
  289. package/dist/static/n8n-logo.png +0 -0
  290. package/dist/static/og_image.png +0 -0
  291. package/dist/static/open-ai.svg +1 -0
  292. package/dist/static/openChat.png +0 -0
  293. package/dist/static/posthog.init.js +41 -0
  294. package/dist/static/prefers-color-scheme.css +5 -0
  295. package/dist/static/webhook-icon.svg +1 -0
  296. package/dist/tree-sitter-bash.wasm +0 -0
  297. package/dist/tree-sitter.wasm +0 -0
  298. package/eslint.config.mjs +59 -0
  299. package/index.html +45 -0
  300. package/index.js +0 -0
  301. package/package.json +147 -0
  302. package/postcss.config.cjs +6 -0
  303. package/scripts/fetch-node-popularity.mjs +102 -0
  304. package/stylelint.config.mjs +9 -0
  305. package/tailwind.config.js +8 -0
  306. package/tsconfig.json +36 -0
  307. package/vite/i18n-locales-hmr-helpers.ts +19 -0
  308. package/vite/source-map-js-shim.ts +1 -0
  309. package/vite/vite-plugin-node-popularity.mts +32 -0
  310. package/vite.config.mts +304 -0
@@ -0,0 +1,2989 @@
1
+ import { r as __export, t as __commonJSMin } from "./chunk-6z4oVpB-.js";
2
+ import { At as isReactive, Bt as toRaw, C as computed, Dn as init_dist, Dt as getCurrentScope, En as global, Et as effectScope, G as nextTick, Ht as toRefs, It as ref, Mt as markRaw, Nt as onScopeDispose, Pt as reactive, R as hasInjectionContext, Vt as toRef, _t as watch, jt as isRef, z as inject } from "./vue.runtime.esm-bundler-tP5dCd7J.js";
3
+ import { X as set, Y as isVue2 } from "./core-CRbPymLT.js";
4
+ import { D as process$1, E as init_dist$1, i as init_dist$2, r as Buffer } from "./empty-BuGRxzl4.js";
5
+ import { l as require_isSymbol, n as require__baseGet, o as require__arrayMap } from "./get-BcEmeOxn.js";
6
+ import { m as require_isArray } from "./_MapCache-CcdIl4Ae.js";
7
+ import { Aa as randomString, Da as jsonParse, Hi as setGlobalState, _i as require__baseIteratee, vi as require__baseForOwn, xo as ApplicationError } from "./constants-C8OH4tTq.js";
8
+ import { T as require__baseUnary, o as require_identity, y as require_isArrayLike } from "./merge-DhuTk1HM.js";
9
+ init_dist();
10
+ var activePinia;
11
+ var setActivePinia = (pinia) => activePinia = pinia;
12
+ var piniaSymbol = Symbol();
13
+ function isPlainObject$1(o) {
14
+ return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
15
+ }
16
+ var MutationType;
17
+ (function(MutationType$1) {
18
+ MutationType$1["direct"] = "direct";
19
+ MutationType$1["patchObject"] = "patch object";
20
+ MutationType$1["patchFunction"] = "patch function";
21
+ })(MutationType || (MutationType = {}));
22
+ var IS_CLIENT = typeof window !== "undefined";
23
+ var _global$1 = /* @__PURE__ */ (() => typeof window === "object" && window.window === window ? window : typeof self === "object" && self.self === self ? self : typeof global === "object" && global.global === global ? global : typeof globalThis === "object" ? globalThis : { HTMLElement: null })();
24
+ function bom(blob, { autoBom = false } = {}) {
25
+ if (autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) return new Blob([String.fromCharCode(65279), blob], { type: blob.type });
26
+ return blob;
27
+ }
28
+ function download(url, name, opts) {
29
+ const xhr = new XMLHttpRequest();
30
+ xhr.open("GET", url);
31
+ xhr.responseType = "blob";
32
+ xhr.onload = function() {
33
+ saveAs(xhr.response, name, opts);
34
+ };
35
+ xhr.onerror = function() {
36
+ console.error("could not download file");
37
+ };
38
+ xhr.send();
39
+ }
40
+ function corsEnabled(url) {
41
+ const xhr = new XMLHttpRequest();
42
+ xhr.open("HEAD", url, false);
43
+ try {
44
+ xhr.send();
45
+ } catch (e) {}
46
+ return xhr.status >= 200 && xhr.status <= 299;
47
+ }
48
+ function click(node) {
49
+ try {
50
+ node.dispatchEvent(new MouseEvent("click"));
51
+ } catch (e) {
52
+ const evt = document.createEvent("MouseEvents");
53
+ evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
54
+ node.dispatchEvent(evt);
55
+ }
56
+ }
57
+ var _navigator$1 = typeof navigator === "object" ? navigator : { userAgent: "" };
58
+ var isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator$1.userAgent) && /AppleWebKit/.test(_navigator$1.userAgent) && !/Safari/.test(_navigator$1.userAgent))();
59
+ var saveAs = !IS_CLIENT ? () => {} : typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : "msSaveOrOpenBlob" in _navigator$1 ? msSaveAs : fileSaverSaveAs;
60
+ function downloadSaveAs(blob, name = "download", opts) {
61
+ const a = document.createElement("a");
62
+ a.download = name;
63
+ a.rel = "noopener";
64
+ if (typeof blob === "string") {
65
+ a.href = blob;
66
+ if (a.origin !== location.origin) if (corsEnabled(a.href)) download(blob, name, opts);
67
+ else {
68
+ a.target = "_blank";
69
+ click(a);
70
+ }
71
+ else click(a);
72
+ } else {
73
+ a.href = URL.createObjectURL(blob);
74
+ setTimeout(function() {
75
+ URL.revokeObjectURL(a.href);
76
+ }, 4e4);
77
+ setTimeout(function() {
78
+ click(a);
79
+ }, 0);
80
+ }
81
+ }
82
+ function msSaveAs(blob, name = "download", opts) {
83
+ if (typeof blob === "string") if (corsEnabled(blob)) download(blob, name, opts);
84
+ else {
85
+ const a = document.createElement("a");
86
+ a.href = blob;
87
+ a.target = "_blank";
88
+ setTimeout(function() {
89
+ click(a);
90
+ });
91
+ }
92
+ else navigator.msSaveOrOpenBlob(bom(blob, opts), name);
93
+ }
94
+ function fileSaverSaveAs(blob, name, opts, popup) {
95
+ popup = popup || open("", "_blank");
96
+ if (popup) popup.document.title = popup.document.body.innerText = "downloading...";
97
+ if (typeof blob === "string") return download(blob, name, opts);
98
+ const force = blob.type === "application/octet-stream";
99
+ const isSafari = /constructor/i.test(String(_global$1.HTMLElement)) || "safari" in _global$1;
100
+ const isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
101
+ if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== "undefined") {
102
+ const reader = new FileReader();
103
+ reader.onloadend = function() {
104
+ let url = reader.result;
105
+ if (typeof url !== "string") {
106
+ popup = null;
107
+ throw new Error("Wrong reader.result type");
108
+ }
109
+ url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;");
110
+ if (popup) popup.location.href = url;
111
+ else location.assign(url);
112
+ popup = null;
113
+ };
114
+ reader.readAsDataURL(blob);
115
+ } else {
116
+ const url = URL.createObjectURL(blob);
117
+ if (popup) popup.location.assign(url);
118
+ else location.href = url;
119
+ popup = null;
120
+ setTimeout(function() {
121
+ URL.revokeObjectURL(url);
122
+ }, 4e4);
123
+ }
124
+ }
125
+ var { assign: assign$1 } = Object;
126
+ function createPinia() {
127
+ const scope = effectScope(true);
128
+ const state = scope.run(() => ref({}));
129
+ let _p = [];
130
+ let toBeInstalled = [];
131
+ const pinia = markRaw({
132
+ install(app) {
133
+ setActivePinia(pinia);
134
+ pinia._a = app;
135
+ app.provide(piniaSymbol, pinia);
136
+ app.config.globalProperties.$pinia = pinia;
137
+ toBeInstalled.forEach((plugin) => _p.push(plugin));
138
+ toBeInstalled = [];
139
+ },
140
+ use(plugin) {
141
+ if (!this._a && true) toBeInstalled.push(plugin);
142
+ else _p.push(plugin);
143
+ return this;
144
+ },
145
+ _p,
146
+ _a: null,
147
+ _e: scope,
148
+ _s: /* @__PURE__ */ new Map(),
149
+ state
150
+ });
151
+ return pinia;
152
+ }
153
+ var noop$1 = () => {};
154
+ function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {
155
+ subscriptions.push(callback);
156
+ const removeSubscription = () => {
157
+ const idx = subscriptions.indexOf(callback);
158
+ if (idx > -1) {
159
+ subscriptions.splice(idx, 1);
160
+ onCleanup();
161
+ }
162
+ };
163
+ if (!detached && getCurrentScope()) onScopeDispose(removeSubscription);
164
+ return removeSubscription;
165
+ }
166
+ function triggerSubscriptions(subscriptions, ...args) {
167
+ subscriptions.slice().forEach((callback) => {
168
+ callback(...args);
169
+ });
170
+ }
171
+ var fallbackRunWithContext = (fn) => fn();
172
+ var ACTION_MARKER = Symbol();
173
+ var ACTION_NAME = Symbol();
174
+ function mergeReactiveObjects(target, patchToApply) {
175
+ if (target instanceof Map && patchToApply instanceof Map) patchToApply.forEach((value, key) => target.set(key, value));
176
+ else if (target instanceof Set && patchToApply instanceof Set) patchToApply.forEach(target.add, target);
177
+ for (const key in patchToApply) {
178
+ if (!patchToApply.hasOwnProperty(key)) continue;
179
+ const subPatch = patchToApply[key];
180
+ const targetValue = target[key];
181
+ if (isPlainObject$1(targetValue) && isPlainObject$1(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) target[key] = mergeReactiveObjects(targetValue, subPatch);
182
+ else target[key] = subPatch;
183
+ }
184
+ return target;
185
+ }
186
+ var skipHydrateSymbol = Symbol();
187
+ function shouldHydrate(obj) {
188
+ return !isPlainObject$1(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
189
+ }
190
+ var { assign } = Object;
191
+ function isComputed(o) {
192
+ return !!(isRef(o) && o.effect);
193
+ }
194
+ function createOptionsStore(id, options, pinia, hot) {
195
+ const { state, actions, getters } = options;
196
+ const initialState = pinia.state.value[id];
197
+ let store;
198
+ function setup() {
199
+ if (!initialState && true) pinia.state.value[id] = state ? state() : {};
200
+ return assign(toRefs(pinia.state.value[id]), actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
201
+ computedGetters[name] = markRaw(computed(() => {
202
+ setActivePinia(pinia);
203
+ const store$1 = pinia._s.get(id);
204
+ return getters[name].call(store$1, store$1);
205
+ }));
206
+ return computedGetters;
207
+ }, {}));
208
+ }
209
+ store = createSetupStore(id, setup, options, pinia, hot, true);
210
+ return store;
211
+ }
212
+ function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
213
+ let scope;
214
+ const optionsForPlugin = assign({ actions: {} }, options);
215
+ const $subscribeOptions = { deep: true };
216
+ let isListening;
217
+ let isSyncListening;
218
+ let subscriptions = [];
219
+ let actionSubscriptions = [];
220
+ let debuggerEvents;
221
+ const initialState = pinia.state.value[$id];
222
+ if (!isOptionsStore && !initialState && true) pinia.state.value[$id] = {};
223
+ ref({});
224
+ let activeListener;
225
+ function $patch(partialStateOrMutator) {
226
+ let subscriptionMutation;
227
+ isListening = isSyncListening = false;
228
+ if (typeof partialStateOrMutator === "function") {
229
+ partialStateOrMutator(pinia.state.value[$id]);
230
+ subscriptionMutation = {
231
+ type: MutationType.patchFunction,
232
+ storeId: $id,
233
+ events: debuggerEvents
234
+ };
235
+ } else {
236
+ mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
237
+ subscriptionMutation = {
238
+ type: MutationType.patchObject,
239
+ payload: partialStateOrMutator,
240
+ storeId: $id,
241
+ events: debuggerEvents
242
+ };
243
+ }
244
+ const myListenerId = activeListener = Symbol();
245
+ nextTick().then(() => {
246
+ if (activeListener === myListenerId) isListening = true;
247
+ });
248
+ isSyncListening = true;
249
+ triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
250
+ }
251
+ const $reset = isOptionsStore ? function $reset$1() {
252
+ const { state } = options;
253
+ const newState = state ? state() : {};
254
+ this.$patch(($state) => {
255
+ assign($state, newState);
256
+ });
257
+ } : noop$1;
258
+ function $dispose() {
259
+ scope.stop();
260
+ subscriptions = [];
261
+ actionSubscriptions = [];
262
+ pinia._s.delete($id);
263
+ }
264
+ const action = (fn, name = "") => {
265
+ if (ACTION_MARKER in fn) {
266
+ fn[ACTION_NAME] = name;
267
+ return fn;
268
+ }
269
+ const wrappedAction = function() {
270
+ setActivePinia(pinia);
271
+ const args = Array.from(arguments);
272
+ const afterCallbackList = [];
273
+ const onErrorCallbackList = [];
274
+ function after(callback) {
275
+ afterCallbackList.push(callback);
276
+ }
277
+ function onError(callback) {
278
+ onErrorCallbackList.push(callback);
279
+ }
280
+ triggerSubscriptions(actionSubscriptions, {
281
+ args,
282
+ name: wrappedAction[ACTION_NAME],
283
+ store,
284
+ after,
285
+ onError
286
+ });
287
+ let ret;
288
+ try {
289
+ ret = fn.apply(this && this.$id === $id ? this : store, args);
290
+ } catch (error) {
291
+ triggerSubscriptions(onErrorCallbackList, error);
292
+ throw error;
293
+ }
294
+ if (ret instanceof Promise) return ret.then((value) => {
295
+ triggerSubscriptions(afterCallbackList, value);
296
+ return value;
297
+ }).catch((error) => {
298
+ triggerSubscriptions(onErrorCallbackList, error);
299
+ return Promise.reject(error);
300
+ });
301
+ triggerSubscriptions(afterCallbackList, ret);
302
+ return ret;
303
+ };
304
+ wrappedAction[ACTION_MARKER] = true;
305
+ wrappedAction[ACTION_NAME] = name;
306
+ return wrappedAction;
307
+ };
308
+ const store = reactive({
309
+ _p: pinia,
310
+ $id,
311
+ $onAction: addSubscription.bind(null, actionSubscriptions),
312
+ $patch,
313
+ $reset,
314
+ $subscribe(callback, options$1 = {}) {
315
+ const removeSubscription = addSubscription(subscriptions, callback, options$1.detached, () => stopWatcher());
316
+ const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
317
+ if (options$1.flush === "sync" ? isSyncListening : isListening) callback({
318
+ storeId: $id,
319
+ type: MutationType.direct,
320
+ events: debuggerEvents
321
+ }, state);
322
+ }, assign({}, $subscribeOptions, options$1)));
323
+ return removeSubscription;
324
+ },
325
+ $dispose
326
+ });
327
+ pinia._s.set($id, store);
328
+ const setupStore = (pinia._a && pinia._a.runWithContext || fallbackRunWithContext)(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));
329
+ for (const key in setupStore) {
330
+ const prop = setupStore[key];
331
+ if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
332
+ if (!isOptionsStore) {
333
+ if (initialState && shouldHydrate(prop)) if (isRef(prop)) prop.value = initialState[key];
334
+ else mergeReactiveObjects(prop, initialState[key]);
335
+ pinia.state.value[$id][key] = prop;
336
+ }
337
+ } else if (typeof prop === "function") {
338
+ setupStore[key] = action(prop, key);
339
+ optionsForPlugin.actions[key] = prop;
340
+ }
341
+ }
342
+ assign(store, setupStore);
343
+ assign(toRaw(store), setupStore);
344
+ Object.defineProperty(store, "$state", {
345
+ get: () => pinia.state.value[$id],
346
+ set: (state) => {
347
+ $patch(($state) => {
348
+ assign($state, state);
349
+ });
350
+ }
351
+ });
352
+ pinia._p.forEach((extender) => {
353
+ assign(store, scope.run(() => extender({
354
+ store,
355
+ app: pinia._a,
356
+ pinia,
357
+ options: optionsForPlugin
358
+ })));
359
+ });
360
+ if (initialState && isOptionsStore && options.hydrate) options.hydrate(store.$state, initialState);
361
+ isListening = true;
362
+ isSyncListening = true;
363
+ return store;
364
+ }
365
+ /* @__NO_SIDE_EFFECTS__ */
366
+ function defineStore(idOrOptions, setup, setupOptions) {
367
+ let id;
368
+ let options;
369
+ const isSetupStore = typeof setup === "function";
370
+ if (typeof idOrOptions === "string") {
371
+ id = idOrOptions;
372
+ options = isSetupStore ? setupOptions : setup;
373
+ } else {
374
+ options = idOrOptions;
375
+ id = idOrOptions.id;
376
+ }
377
+ function useStore(pinia, hot) {
378
+ const hasContext = hasInjectionContext();
379
+ pinia = pinia || (hasContext ? inject(piniaSymbol, null) : null);
380
+ if (pinia) setActivePinia(pinia);
381
+ pinia = activePinia;
382
+ if (!pinia._s.has(id)) if (isSetupStore) createSetupStore(id, setup, options, pinia);
383
+ else createOptionsStore(id, options, pinia);
384
+ return pinia._s.get(id);
385
+ }
386
+ useStore.$id = id;
387
+ return useStore;
388
+ }
389
+ function storeToRefs(store) {
390
+ {
391
+ store = toRaw(store);
392
+ const refs = {};
393
+ for (const key in store) {
394
+ const value = store[key];
395
+ if (isRef(value) || isReactive(value)) refs[key] = toRef(store, key);
396
+ }
397
+ return refs;
398
+ }
399
+ }
400
+ var PiniaVuePlugin = function(_Vue) {
401
+ _Vue.mixin({
402
+ beforeCreate() {
403
+ const options = this.$options;
404
+ if (options.pinia) {
405
+ const pinia = options.pinia;
406
+ /* istanbul ignore else */
407
+ if (!this._provided) {
408
+ const provideCache = {};
409
+ Object.defineProperty(this, "_provided", {
410
+ get: () => provideCache,
411
+ set: (v) => Object.assign(provideCache, v)
412
+ });
413
+ }
414
+ this._provided[piniaSymbol] = pinia;
415
+ /* istanbul ignore else */
416
+ if (!this.$pinia) this.$pinia = pinia;
417
+ pinia._a = this;
418
+ if (IS_CLIENT) setActivePinia(pinia);
419
+ } else if (!this.$pinia && options.parent && options.parent.$pinia) this.$pinia = options.parent.$pinia;
420
+ },
421
+ destroyed() {
422
+ delete this._pStores;
423
+ }
424
+ });
425
+ };
426
+ const N8N_IO_BASE_URL = "https://api.n8n.io/api/";
427
+ const BROWSER_ID_STORAGE_KEY = "n8n-browserId";
428
+ const NPM_COMMUNITY_NODE_SEARCH_API_URL = "https://api.npms.io/v2/";
429
+ const INSTANCE_ID_HEADER = "n8n-instance-id";
430
+ const INSTANCE_VERSION_HEADER = "n8n-version";
431
+ const TOOL_EXECUTOR_NODE_NAME = "PartialExecutionToolExecutor";
432
+ const Time = {
433
+ milliseconds: {
434
+ toHours: 1 / (3600 * 1e3),
435
+ toMinutes: 1 / (60 * 1e3),
436
+ toSeconds: 1 / 1e3
437
+ },
438
+ seconds: { toMilliseconds: 1e3 },
439
+ minutes: { toMilliseconds: 60 * 1e3 },
440
+ hours: {
441
+ toMilliseconds: 3600 * 1e3,
442
+ toSeconds: 3600
443
+ },
444
+ days: {
445
+ toSeconds: 1440 * 60,
446
+ toMilliseconds: 1440 * 60 * 1e3
447
+ }
448
+ };
449
+ const LOGSTREAMING_DEFAULT_MAX_FREE_SOCKETS = 5;
450
+ const LOGSTREAMING_DEFAULT_MAX_SOCKETS = 50;
451
+ 5 * Time.seconds.toMilliseconds;
452
+ 3 * Time.minutes.toMilliseconds;
453
+ const LOGSTREAMING_CB_DEFAULT_MAX_FAILURES = 5;
454
+ const LOGSTREAMING_CB_DEFAULT_FAILURE_WINDOW_MS = 1 * Time.minutes.toMilliseconds;
455
+ function assert(condition, message) {
456
+ if (!condition) throw new Error(message ?? "Assertion failed");
457
+ }
458
+ function bind(fn, thisArg) {
459
+ return function wrap() {
460
+ return fn.apply(thisArg, arguments);
461
+ };
462
+ }
463
+ init_dist();
464
+ init_dist$1();
465
+ var { toString } = Object.prototype;
466
+ var { getPrototypeOf } = Object;
467
+ var { iterator, toStringTag } = Symbol;
468
+ var kindOf = ((cache) => (thing) => {
469
+ const str = toString.call(thing);
470
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
471
+ })(Object.create(null));
472
+ var kindOfTest = (type) => {
473
+ type = type.toLowerCase();
474
+ return (thing) => kindOf(thing) === type;
475
+ };
476
+ var typeOfTest = (type) => (thing) => typeof thing === type;
477
+ var { isArray: isArray$1 } = Array;
478
+ var isUndefined = typeOfTest("undefined");
479
+ function isBuffer(val) {
480
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
481
+ }
482
+ var isArrayBuffer = kindOfTest("ArrayBuffer");
483
+ function isArrayBufferView(val) {
484
+ let result;
485
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) result = ArrayBuffer.isView(val);
486
+ else result = val && val.buffer && isArrayBuffer(val.buffer);
487
+ return result;
488
+ }
489
+ var isString = typeOfTest("string");
490
+ var isFunction$1 = typeOfTest("function");
491
+ var isNumber = typeOfTest("number");
492
+ var isObject = (thing) => thing !== null && typeof thing === "object";
493
+ var isBoolean = (thing) => thing === true || thing === false;
494
+ var isPlainObject = (val) => {
495
+ if (kindOf(val) !== "object") return false;
496
+ const prototype$2 = getPrototypeOf(val);
497
+ return (prototype$2 === null || prototype$2 === Object.prototype || Object.getPrototypeOf(prototype$2) === null) && !(toStringTag in val) && !(iterator in val);
498
+ };
499
+ var isEmptyObject = (val) => {
500
+ if (!isObject(val) || isBuffer(val)) return false;
501
+ try {
502
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
503
+ } catch (e) {
504
+ return false;
505
+ }
506
+ };
507
+ var isDate = kindOfTest("Date");
508
+ var isFile = kindOfTest("File");
509
+ var isBlob = kindOfTest("Blob");
510
+ var isFileList = kindOfTest("FileList");
511
+ var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
512
+ var isFormData = (thing) => {
513
+ let kind;
514
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
515
+ };
516
+ var isURLSearchParams = kindOfTest("URLSearchParams");
517
+ var [isReadableStream, isRequest, isResponse, isHeaders] = [
518
+ "ReadableStream",
519
+ "Request",
520
+ "Response",
521
+ "Headers"
522
+ ].map(kindOfTest);
523
+ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
524
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
525
+ if (obj === null || typeof obj === "undefined") return;
526
+ let i;
527
+ let l;
528
+ if (typeof obj !== "object") obj = [obj];
529
+ if (isArray$1(obj)) for (i = 0, l = obj.length; i < l; i++) fn.call(null, obj[i], i, obj);
530
+ else {
531
+ if (isBuffer(obj)) return;
532
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
533
+ const len = keys.length;
534
+ let key;
535
+ for (i = 0; i < len; i++) {
536
+ key = keys[i];
537
+ fn.call(null, obj[key], key, obj);
538
+ }
539
+ }
540
+ }
541
+ function findKey(obj, key) {
542
+ if (isBuffer(obj)) return null;
543
+ key = key.toLowerCase();
544
+ const keys = Object.keys(obj);
545
+ let i = keys.length;
546
+ let _key;
547
+ while (i-- > 0) {
548
+ _key = keys[i];
549
+ if (key === _key.toLowerCase()) return _key;
550
+ }
551
+ return null;
552
+ }
553
+ var _global = (() => {
554
+ if (typeof globalThis !== "undefined") return globalThis;
555
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
556
+ })();
557
+ var isContextDefined = (context) => !isUndefined(context) && context !== _global;
558
+ function merge() {
559
+ const { caseless, skipUndefined } = isContextDefined(this) && this || {};
560
+ const result = {};
561
+ const assignValue = (val, key) => {
562
+ const targetKey = caseless && findKey(result, key) || key;
563
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) result[targetKey] = merge(result[targetKey], val);
564
+ else if (isPlainObject(val)) result[targetKey] = merge({}, val);
565
+ else if (isArray$1(val)) result[targetKey] = val.slice();
566
+ else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val;
567
+ };
568
+ for (let i = 0, l = arguments.length; i < l; i++) arguments[i] && forEach(arguments[i], assignValue);
569
+ return result;
570
+ }
571
+ var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
572
+ forEach(b, (val, key) => {
573
+ if (thisArg && isFunction$1(val)) a[key] = bind(val, thisArg);
574
+ else a[key] = val;
575
+ }, { allOwnKeys });
576
+ return a;
577
+ };
578
+ var stripBOM = (content) => {
579
+ if (content.charCodeAt(0) === 65279) content = content.slice(1);
580
+ return content;
581
+ };
582
+ var inherits = (constructor, superConstructor, props, descriptors$1) => {
583
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors$1);
584
+ constructor.prototype.constructor = constructor;
585
+ Object.defineProperty(constructor, "super", { value: superConstructor.prototype });
586
+ props && Object.assign(constructor.prototype, props);
587
+ };
588
+ var toFlatObject = (sourceObj, destObj, filter, propFilter) => {
589
+ let props;
590
+ let i;
591
+ let prop;
592
+ const merged = {};
593
+ destObj = destObj || {};
594
+ if (sourceObj == null) return destObj;
595
+ do {
596
+ props = Object.getOwnPropertyNames(sourceObj);
597
+ i = props.length;
598
+ while (i-- > 0) {
599
+ prop = props[i];
600
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
601
+ destObj[prop] = sourceObj[prop];
602
+ merged[prop] = true;
603
+ }
604
+ }
605
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
606
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
607
+ return destObj;
608
+ };
609
+ var endsWith = (str, searchString, position) => {
610
+ str = String(str);
611
+ if (position === void 0 || position > str.length) position = str.length;
612
+ position -= searchString.length;
613
+ const lastIndex = str.indexOf(searchString, position);
614
+ return lastIndex !== -1 && lastIndex === position;
615
+ };
616
+ var toArray = (thing) => {
617
+ if (!thing) return null;
618
+ if (isArray$1(thing)) return thing;
619
+ let i = thing.length;
620
+ if (!isNumber(i)) return null;
621
+ const arr = new Array(i);
622
+ while (i-- > 0) arr[i] = thing[i];
623
+ return arr;
624
+ };
625
+ var isTypedArray = ((TypedArray) => {
626
+ return (thing) => {
627
+ return TypedArray && thing instanceof TypedArray;
628
+ };
629
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
630
+ var forEachEntry = (obj, fn) => {
631
+ const _iterator = (obj && obj[iterator]).call(obj);
632
+ let result;
633
+ while ((result = _iterator.next()) && !result.done) {
634
+ const pair = result.value;
635
+ fn.call(obj, pair[0], pair[1]);
636
+ }
637
+ };
638
+ var matchAll = (regExp, str) => {
639
+ let matches;
640
+ const arr = [];
641
+ while ((matches = regExp.exec(str)) !== null) arr.push(matches);
642
+ return arr;
643
+ };
644
+ var isHTMLForm = kindOfTest("HTMLFormElement");
645
+ var toCamelCase = (str) => {
646
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
647
+ return p1.toUpperCase() + p2;
648
+ });
649
+ };
650
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty$1 }) => (obj, prop) => hasOwnProperty$1.call(obj, prop))(Object.prototype);
651
+ var isRegExp = kindOfTest("RegExp");
652
+ var reduceDescriptors = (obj, reducer) => {
653
+ const descriptors$1 = Object.getOwnPropertyDescriptors(obj);
654
+ const reducedDescriptors = {};
655
+ forEach(descriptors$1, (descriptor, name) => {
656
+ let ret;
657
+ if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor;
658
+ });
659
+ Object.defineProperties(obj, reducedDescriptors);
660
+ };
661
+ var freezeMethods = (obj) => {
662
+ reduceDescriptors(obj, (descriptor, name) => {
663
+ if (isFunction$1(obj) && [
664
+ "arguments",
665
+ "caller",
666
+ "callee"
667
+ ].indexOf(name) !== -1) return false;
668
+ const value = obj[name];
669
+ if (!isFunction$1(value)) return;
670
+ descriptor.enumerable = false;
671
+ if ("writable" in descriptor) {
672
+ descriptor.writable = false;
673
+ return;
674
+ }
675
+ if (!descriptor.set) descriptor.set = () => {
676
+ throw Error("Can not rewrite read-only method '" + name + "'");
677
+ };
678
+ });
679
+ };
680
+ var toObjectSet = (arrayOrString, delimiter) => {
681
+ const obj = {};
682
+ const define = (arr) => {
683
+ arr.forEach((value) => {
684
+ obj[value] = true;
685
+ });
686
+ };
687
+ isArray$1(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
688
+ return obj;
689
+ };
690
+ var noop = () => {};
691
+ var toFiniteNumber = (value, defaultValue) => {
692
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
693
+ };
694
+ function isSpecCompliantForm(thing) {
695
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
696
+ }
697
+ var toJSONObject = (obj) => {
698
+ const stack = new Array(10);
699
+ const visit = (source, i) => {
700
+ if (isObject(source)) {
701
+ if (stack.indexOf(source) >= 0) return;
702
+ if (isBuffer(source)) return source;
703
+ if (!("toJSON" in source)) {
704
+ stack[i] = source;
705
+ const target = isArray$1(source) ? [] : {};
706
+ forEach(source, (value, key) => {
707
+ const reducedValue = visit(value, i + 1);
708
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
709
+ });
710
+ stack[i] = void 0;
711
+ return target;
712
+ }
713
+ }
714
+ return source;
715
+ };
716
+ return visit(obj, 0);
717
+ };
718
+ var isAsyncFn = kindOfTest("AsyncFunction");
719
+ var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
720
+ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
721
+ if (setImmediateSupported) return setImmediate;
722
+ return postMessageSupported ? ((token, callbacks) => {
723
+ _global.addEventListener("message", ({ source, data }) => {
724
+ if (source === _global && data === token) callbacks.length && callbacks.shift()();
725
+ }, false);
726
+ return (cb) => {
727
+ callbacks.push(cb);
728
+ _global.postMessage(token, "*");
729
+ };
730
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
731
+ })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
732
+ var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process$1 !== "undefined" && process$1.nextTick || _setImmediate;
733
+ var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
734
+ var utils_default = {
735
+ isArray: isArray$1,
736
+ isArrayBuffer,
737
+ isBuffer,
738
+ isFormData,
739
+ isArrayBufferView,
740
+ isString,
741
+ isNumber,
742
+ isBoolean,
743
+ isObject,
744
+ isPlainObject,
745
+ isEmptyObject,
746
+ isReadableStream,
747
+ isRequest,
748
+ isResponse,
749
+ isHeaders,
750
+ isUndefined,
751
+ isDate,
752
+ isFile,
753
+ isBlob,
754
+ isRegExp,
755
+ isFunction: isFunction$1,
756
+ isStream,
757
+ isURLSearchParams,
758
+ isTypedArray,
759
+ isFileList,
760
+ forEach,
761
+ merge,
762
+ extend,
763
+ trim,
764
+ stripBOM,
765
+ inherits,
766
+ toFlatObject,
767
+ kindOf,
768
+ kindOfTest,
769
+ endsWith,
770
+ toArray,
771
+ forEachEntry,
772
+ matchAll,
773
+ isHTMLForm,
774
+ hasOwnProperty,
775
+ hasOwnProp: hasOwnProperty,
776
+ reduceDescriptors,
777
+ freezeMethods,
778
+ toObjectSet,
779
+ toCamelCase,
780
+ noop,
781
+ toFiniteNumber,
782
+ findKey,
783
+ global: _global,
784
+ isContextDefined,
785
+ isSpecCompliantForm,
786
+ toJSONObject,
787
+ isAsyncFn,
788
+ isThenable,
789
+ setImmediate: _setImmediate,
790
+ asap,
791
+ isIterable
792
+ };
793
+ function AxiosError$1(message, code, config, request$1, response) {
794
+ Error.call(this);
795
+ if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor);
796
+ else this.stack = (/* @__PURE__ */ new Error()).stack;
797
+ this.message = message;
798
+ this.name = "AxiosError";
799
+ code && (this.code = code);
800
+ config && (this.config = config);
801
+ request$1 && (this.request = request$1);
802
+ if (response) {
803
+ this.response = response;
804
+ this.status = response.status ? response.status : null;
805
+ }
806
+ }
807
+ utils_default.inherits(AxiosError$1, Error, { toJSON: function toJSON() {
808
+ return {
809
+ message: this.message,
810
+ name: this.name,
811
+ description: this.description,
812
+ number: this.number,
813
+ fileName: this.fileName,
814
+ lineNumber: this.lineNumber,
815
+ columnNumber: this.columnNumber,
816
+ stack: this.stack,
817
+ config: utils_default.toJSONObject(this.config),
818
+ code: this.code,
819
+ status: this.status
820
+ };
821
+ } });
822
+ var prototype$1 = AxiosError$1.prototype;
823
+ var descriptors = {};
824
+ [
825
+ "ERR_BAD_OPTION_VALUE",
826
+ "ERR_BAD_OPTION",
827
+ "ECONNABORTED",
828
+ "ETIMEDOUT",
829
+ "ERR_NETWORK",
830
+ "ERR_FR_TOO_MANY_REDIRECTS",
831
+ "ERR_DEPRECATED",
832
+ "ERR_BAD_RESPONSE",
833
+ "ERR_BAD_REQUEST",
834
+ "ERR_CANCELED",
835
+ "ERR_NOT_SUPPORT",
836
+ "ERR_INVALID_URL"
837
+ ].forEach((code) => {
838
+ descriptors[code] = { value: code };
839
+ });
840
+ Object.defineProperties(AxiosError$1, descriptors);
841
+ Object.defineProperty(prototype$1, "isAxiosError", { value: true });
842
+ AxiosError$1.from = (error, code, config, request$1, response, customProps) => {
843
+ const axiosError = Object.create(prototype$1);
844
+ utils_default.toFlatObject(error, axiosError, function filter(obj) {
845
+ return obj !== Error.prototype;
846
+ }, (prop) => {
847
+ return prop !== "isAxiosError";
848
+ });
849
+ const msg = error && error.message ? error.message : "Error";
850
+ const errCode = code == null && error ? error.code : code;
851
+ AxiosError$1.call(axiosError, msg, errCode, config, request$1, response);
852
+ if (error && axiosError.cause == null) Object.defineProperty(axiosError, "cause", {
853
+ value: error,
854
+ configurable: true
855
+ });
856
+ axiosError.name = error && error.name || "Error";
857
+ customProps && Object.assign(axiosError, customProps);
858
+ return axiosError;
859
+ };
860
+ var AxiosError_default = AxiosError$1;
861
+ init_dist$2();
862
+ function isVisitable(thing) {
863
+ return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
864
+ }
865
+ function removeBrackets(key) {
866
+ return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
867
+ }
868
+ function renderKey(path, key, dots) {
869
+ if (!path) return key;
870
+ return path.concat(key).map(function each(token, i) {
871
+ token = removeBrackets(token);
872
+ return !dots && i ? "[" + token + "]" : token;
873
+ }).join(dots ? "." : "");
874
+ }
875
+ function isFlatArray(arr) {
876
+ return utils_default.isArray(arr) && !arr.some(isVisitable);
877
+ }
878
+ var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) {
879
+ return /^is[A-Z]/.test(prop);
880
+ });
881
+ function toFormData$1(obj, formData, options) {
882
+ if (!utils_default.isObject(obj)) throw new TypeError("target must be an object");
883
+ formData = formData || new FormData();
884
+ options = utils_default.toFlatObject(options, {
885
+ metaTokens: true,
886
+ dots: false,
887
+ indexes: false
888
+ }, false, function defined(option, source) {
889
+ return !utils_default.isUndefined(source[option]);
890
+ });
891
+ const metaTokens = options.metaTokens;
892
+ const visitor = options.visitor || defaultVisitor;
893
+ const dots = options.dots;
894
+ const indexes = options.indexes;
895
+ const useBlob = (options.Blob || typeof Blob !== "undefined" && Blob) && utils_default.isSpecCompliantForm(formData);
896
+ if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
897
+ function convertValue(value) {
898
+ if (value === null) return "";
899
+ if (utils_default.isDate(value)) return value.toISOString();
900
+ if (utils_default.isBoolean(value)) return value.toString();
901
+ if (!useBlob && utils_default.isBlob(value)) throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
902
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
903
+ return value;
904
+ }
905
+ function defaultVisitor(value, key, path) {
906
+ let arr = value;
907
+ if (value && !path && typeof value === "object") {
908
+ if (utils_default.endsWith(key, "{}")) {
909
+ key = metaTokens ? key : key.slice(0, -2);
910
+ value = JSON.stringify(value);
911
+ } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
912
+ key = removeBrackets(key);
913
+ arr.forEach(function each(el, index) {
914
+ !(utils_default.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el));
915
+ });
916
+ return false;
917
+ }
918
+ }
919
+ if (isVisitable(value)) return true;
920
+ formData.append(renderKey(path, key, dots), convertValue(value));
921
+ return false;
922
+ }
923
+ const stack = [];
924
+ const exposedHelpers = Object.assign(predicates, {
925
+ defaultVisitor,
926
+ convertValue,
927
+ isVisitable
928
+ });
929
+ function build(value, path) {
930
+ if (utils_default.isUndefined(value)) return;
931
+ if (stack.indexOf(value) !== -1) throw Error("Circular reference detected in " + path.join("."));
932
+ stack.push(value);
933
+ utils_default.forEach(value, function each(el, key) {
934
+ if ((!(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers)) === true) build(el, path ? path.concat(key) : [key]);
935
+ });
936
+ stack.pop();
937
+ }
938
+ if (!utils_default.isObject(obj)) throw new TypeError("data must be an object");
939
+ build(obj);
940
+ return formData;
941
+ }
942
+ var toFormData_default = toFormData$1;
943
+ function encode$1(str) {
944
+ const charMap = {
945
+ "!": "%21",
946
+ "'": "%27",
947
+ "(": "%28",
948
+ ")": "%29",
949
+ "~": "%7E",
950
+ "%20": "+",
951
+ "%00": "\0"
952
+ };
953
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
954
+ return charMap[match];
955
+ });
956
+ }
957
+ function AxiosURLSearchParams(params, options) {
958
+ this._pairs = [];
959
+ params && toFormData_default(params, this, options);
960
+ }
961
+ var prototype = AxiosURLSearchParams.prototype;
962
+ prototype.append = function append(name, value) {
963
+ this._pairs.push([name, value]);
964
+ };
965
+ prototype.toString = function toString$1(encoder) {
966
+ const _encode = encoder ? function(value) {
967
+ return encoder.call(this, value, encode$1);
968
+ } : encode$1;
969
+ return this._pairs.map(function each(pair) {
970
+ return _encode(pair[0]) + "=" + _encode(pair[1]);
971
+ }, "").join("&");
972
+ };
973
+ var AxiosURLSearchParams_default = AxiosURLSearchParams;
974
+ function encode(val) {
975
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
976
+ }
977
+ function buildURL(url, params, options) {
978
+ if (!params) return url;
979
+ const _encode = options && options.encode || encode;
980
+ if (utils_default.isFunction(options)) options = { serialize: options };
981
+ const serializeFn = options && options.serialize;
982
+ let serializedParams;
983
+ if (serializeFn) serializedParams = serializeFn(params, options);
984
+ else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
985
+ if (serializedParams) {
986
+ const hashmarkIndex = url.indexOf("#");
987
+ if (hashmarkIndex !== -1) url = url.slice(0, hashmarkIndex);
988
+ url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
989
+ }
990
+ return url;
991
+ }
992
+ var InterceptorManager = class {
993
+ constructor() {
994
+ this.handlers = [];
995
+ }
996
+ use(fulfilled, rejected, options) {
997
+ this.handlers.push({
998
+ fulfilled,
999
+ rejected,
1000
+ synchronous: options ? options.synchronous : false,
1001
+ runWhen: options ? options.runWhen : null
1002
+ });
1003
+ return this.handlers.length - 1;
1004
+ }
1005
+ eject(id) {
1006
+ if (this.handlers[id]) this.handlers[id] = null;
1007
+ }
1008
+ clear() {
1009
+ if (this.handlers) this.handlers = [];
1010
+ }
1011
+ forEach(fn) {
1012
+ utils_default.forEach(this.handlers, function forEachHandler(h) {
1013
+ if (h !== null) fn(h);
1014
+ });
1015
+ }
1016
+ };
1017
+ var InterceptorManager_default = InterceptorManager;
1018
+ var transitional_default = {
1019
+ silentJSONParsing: true,
1020
+ forcedJSONParsing: true,
1021
+ clarifyTimeoutError: false
1022
+ };
1023
+ var browser_default = {
1024
+ isBrowser: true,
1025
+ classes: {
1026
+ URLSearchParams: typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams_default,
1027
+ FormData: typeof FormData !== "undefined" ? FormData : null,
1028
+ Blob: typeof Blob !== "undefined" ? Blob : null
1029
+ },
1030
+ protocols: [
1031
+ "http",
1032
+ "https",
1033
+ "file",
1034
+ "blob",
1035
+ "url",
1036
+ "data"
1037
+ ]
1038
+ };
1039
+ var utils_exports = /* @__PURE__ */ __export({
1040
+ hasBrowserEnv: () => hasBrowserEnv,
1041
+ hasStandardBrowserEnv: () => hasStandardBrowserEnv,
1042
+ hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
1043
+ navigator: () => _navigator,
1044
+ origin: () => origin
1045
+ });
1046
+ var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
1047
+ var _navigator = typeof navigator === "object" && navigator || void 0;
1048
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
1049
+ "ReactNative",
1050
+ "NativeScript",
1051
+ "NS"
1052
+ ].indexOf(_navigator.product) < 0);
1053
+ var hasStandardBrowserWebWorkerEnv = (() => {
1054
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
1055
+ })();
1056
+ var origin = hasBrowserEnv && window.location.href || "http://localhost";
1057
+ var platform_default = {
1058
+ ...utils_exports,
1059
+ ...browser_default
1060
+ };
1061
+ function toURLEncodedForm(data, options) {
1062
+ return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
1063
+ visitor: function(value, key, path, helpers) {
1064
+ if (platform_default.isNode && utils_default.isBuffer(value)) {
1065
+ this.append(key, value.toString("base64"));
1066
+ return false;
1067
+ }
1068
+ return helpers.defaultVisitor.apply(this, arguments);
1069
+ },
1070
+ ...options
1071
+ });
1072
+ }
1073
+ function parsePropPath(name) {
1074
+ return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
1075
+ return match[0] === "[]" ? "" : match[1] || match[0];
1076
+ });
1077
+ }
1078
+ function arrayToObject(arr) {
1079
+ const obj = {};
1080
+ const keys = Object.keys(arr);
1081
+ let i;
1082
+ const len = keys.length;
1083
+ let key;
1084
+ for (i = 0; i < len; i++) {
1085
+ key = keys[i];
1086
+ obj[key] = arr[key];
1087
+ }
1088
+ return obj;
1089
+ }
1090
+ function formDataToJSON(formData) {
1091
+ function buildPath(path, value, target, index) {
1092
+ let name = path[index++];
1093
+ if (name === "__proto__") return true;
1094
+ const isNumericKey = Number.isFinite(+name);
1095
+ const isLast = index >= path.length;
1096
+ name = !name && utils_default.isArray(target) ? target.length : name;
1097
+ if (isLast) {
1098
+ if (utils_default.hasOwnProp(target, name)) target[name] = [target[name], value];
1099
+ else target[name] = value;
1100
+ return !isNumericKey;
1101
+ }
1102
+ if (!target[name] || !utils_default.isObject(target[name])) target[name] = [];
1103
+ if (buildPath(path, value, target[name], index) && utils_default.isArray(target[name])) target[name] = arrayToObject(target[name]);
1104
+ return !isNumericKey;
1105
+ }
1106
+ if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) {
1107
+ const obj = {};
1108
+ utils_default.forEachEntry(formData, (name, value) => {
1109
+ buildPath(parsePropPath(name), value, obj, 0);
1110
+ });
1111
+ return obj;
1112
+ }
1113
+ return null;
1114
+ }
1115
+ var formDataToJSON_default = formDataToJSON;
1116
+ function stringifySafely(rawValue, parser, encoder) {
1117
+ if (utils_default.isString(rawValue)) try {
1118
+ (parser || JSON.parse)(rawValue);
1119
+ return utils_default.trim(rawValue);
1120
+ } catch (e) {
1121
+ if (e.name !== "SyntaxError") throw e;
1122
+ }
1123
+ return (encoder || JSON.stringify)(rawValue);
1124
+ }
1125
+ var defaults = {
1126
+ transitional: transitional_default,
1127
+ adapter: [
1128
+ "xhr",
1129
+ "http",
1130
+ "fetch"
1131
+ ],
1132
+ transformRequest: [function transformRequest(data, headers) {
1133
+ const contentType = headers.getContentType() || "";
1134
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
1135
+ const isObjectPayload = utils_default.isObject(data);
1136
+ if (isObjectPayload && utils_default.isHTMLForm(data)) data = new FormData(data);
1137
+ if (utils_default.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
1138
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) return data;
1139
+ if (utils_default.isArrayBufferView(data)) return data.buffer;
1140
+ if (utils_default.isURLSearchParams(data)) {
1141
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
1142
+ return data.toString();
1143
+ }
1144
+ let isFileList$1;
1145
+ if (isObjectPayload) {
1146
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, this.formSerializer).toString();
1147
+ if ((isFileList$1 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
1148
+ const _FormData = this.env && this.env.FormData;
1149
+ return toFormData_default(isFileList$1 ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
1150
+ }
1151
+ }
1152
+ if (isObjectPayload || hasJSONContentType) {
1153
+ headers.setContentType("application/json", false);
1154
+ return stringifySafely(data);
1155
+ }
1156
+ return data;
1157
+ }],
1158
+ transformResponse: [function transformResponse(data) {
1159
+ const transitional = this.transitional || defaults.transitional;
1160
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1161
+ const JSONRequested = this.responseType === "json";
1162
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) return data;
1163
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
1164
+ const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested;
1165
+ try {
1166
+ return JSON.parse(data, this.parseReviver);
1167
+ } catch (e) {
1168
+ if (strictJSONParsing) {
1169
+ if (e.name === "SyntaxError") throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
1170
+ throw e;
1171
+ }
1172
+ }
1173
+ }
1174
+ return data;
1175
+ }],
1176
+ timeout: 0,
1177
+ xsrfCookieName: "XSRF-TOKEN",
1178
+ xsrfHeaderName: "X-XSRF-TOKEN",
1179
+ maxContentLength: -1,
1180
+ maxBodyLength: -1,
1181
+ env: {
1182
+ FormData: platform_default.classes.FormData,
1183
+ Blob: platform_default.classes.Blob
1184
+ },
1185
+ validateStatus: function validateStatus(status) {
1186
+ return status >= 200 && status < 300;
1187
+ },
1188
+ headers: { common: {
1189
+ "Accept": "application/json, text/plain, */*",
1190
+ "Content-Type": void 0
1191
+ } }
1192
+ };
1193
+ utils_default.forEach([
1194
+ "delete",
1195
+ "get",
1196
+ "head",
1197
+ "post",
1198
+ "put",
1199
+ "patch"
1200
+ ], (method) => {
1201
+ defaults.headers[method] = {};
1202
+ });
1203
+ var defaults_default = defaults;
1204
+ var ignoreDuplicateOf = utils_default.toObjectSet([
1205
+ "age",
1206
+ "authorization",
1207
+ "content-length",
1208
+ "content-type",
1209
+ "etag",
1210
+ "expires",
1211
+ "from",
1212
+ "host",
1213
+ "if-modified-since",
1214
+ "if-unmodified-since",
1215
+ "last-modified",
1216
+ "location",
1217
+ "max-forwards",
1218
+ "proxy-authorization",
1219
+ "referer",
1220
+ "retry-after",
1221
+ "user-agent"
1222
+ ]);
1223
+ var parseHeaders_default = (rawHeaders) => {
1224
+ const parsed = {};
1225
+ let key;
1226
+ let val;
1227
+ let i;
1228
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
1229
+ i = line.indexOf(":");
1230
+ key = line.substring(0, i).trim().toLowerCase();
1231
+ val = line.substring(i + 1).trim();
1232
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
1233
+ if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
1234
+ else parsed[key] = [val];
1235
+ else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
1236
+ });
1237
+ return parsed;
1238
+ };
1239
+ var $internals = Symbol("internals");
1240
+ function normalizeHeader(header) {
1241
+ return header && String(header).trim().toLowerCase();
1242
+ }
1243
+ function normalizeValue(value) {
1244
+ if (value === false || value == null) return value;
1245
+ return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
1246
+ }
1247
+ function parseTokens(str) {
1248
+ const tokens = Object.create(null);
1249
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1250
+ let match;
1251
+ while (match = tokensRE.exec(str)) tokens[match[1]] = match[2];
1252
+ return tokens;
1253
+ }
1254
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1255
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1256
+ if (utils_default.isFunction(filter)) return filter.call(this, value, header);
1257
+ if (isHeaderNameFilter) value = header;
1258
+ if (!utils_default.isString(value)) return;
1259
+ if (utils_default.isString(filter)) return value.indexOf(filter) !== -1;
1260
+ if (utils_default.isRegExp(filter)) return filter.test(value);
1261
+ }
1262
+ function formatHeader(header) {
1263
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1264
+ return char.toUpperCase() + str;
1265
+ });
1266
+ }
1267
+ function buildAccessors(obj, header) {
1268
+ const accessorName = utils_default.toCamelCase(" " + header);
1269
+ [
1270
+ "get",
1271
+ "set",
1272
+ "has"
1273
+ ].forEach((methodName) => {
1274
+ Object.defineProperty(obj, methodName + accessorName, {
1275
+ value: function(arg1, arg2, arg3) {
1276
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1277
+ },
1278
+ configurable: true
1279
+ });
1280
+ });
1281
+ }
1282
+ var AxiosHeaders$1 = class {
1283
+ constructor(headers) {
1284
+ headers && this.set(headers);
1285
+ }
1286
+ set(header, valueOrRewrite, rewrite) {
1287
+ const self$1 = this;
1288
+ function setHeader(_value, _header, _rewrite) {
1289
+ const lHeader = normalizeHeader(_header);
1290
+ if (!lHeader) throw new Error("header name must be a non-empty string");
1291
+ const key = utils_default.findKey(self$1, lHeader);
1292
+ if (!key || self$1[key] === void 0 || _rewrite === true || _rewrite === void 0 && self$1[key] !== false) self$1[key || _header] = normalizeValue(_value);
1293
+ }
1294
+ const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1295
+ if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
1296
+ else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
1297
+ else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
1298
+ let obj = {}, dest, key;
1299
+ for (const entry of header) {
1300
+ if (!utils_default.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
1301
+ obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
1302
+ }
1303
+ setHeaders(obj, valueOrRewrite);
1304
+ } else header != null && setHeader(valueOrRewrite, header, rewrite);
1305
+ return this;
1306
+ }
1307
+ get(header, parser) {
1308
+ header = normalizeHeader(header);
1309
+ if (header) {
1310
+ const key = utils_default.findKey(this, header);
1311
+ if (key) {
1312
+ const value = this[key];
1313
+ if (!parser) return value;
1314
+ if (parser === true) return parseTokens(value);
1315
+ if (utils_default.isFunction(parser)) return parser.call(this, value, key);
1316
+ if (utils_default.isRegExp(parser)) return parser.exec(value);
1317
+ throw new TypeError("parser must be boolean|regexp|function");
1318
+ }
1319
+ }
1320
+ }
1321
+ has(header, matcher) {
1322
+ header = normalizeHeader(header);
1323
+ if (header) {
1324
+ const key = utils_default.findKey(this, header);
1325
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1326
+ }
1327
+ return false;
1328
+ }
1329
+ delete(header, matcher) {
1330
+ const self$1 = this;
1331
+ let deleted = false;
1332
+ function deleteHeader(_header) {
1333
+ _header = normalizeHeader(_header);
1334
+ if (_header) {
1335
+ const key = utils_default.findKey(self$1, _header);
1336
+ if (key && (!matcher || matchHeaderValue(self$1, self$1[key], key, matcher))) {
1337
+ delete self$1[key];
1338
+ deleted = true;
1339
+ }
1340
+ }
1341
+ }
1342
+ if (utils_default.isArray(header)) header.forEach(deleteHeader);
1343
+ else deleteHeader(header);
1344
+ return deleted;
1345
+ }
1346
+ clear(matcher) {
1347
+ const keys = Object.keys(this);
1348
+ let i = keys.length;
1349
+ let deleted = false;
1350
+ while (i--) {
1351
+ const key = keys[i];
1352
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1353
+ delete this[key];
1354
+ deleted = true;
1355
+ }
1356
+ }
1357
+ return deleted;
1358
+ }
1359
+ normalize(format) {
1360
+ const self$1 = this;
1361
+ const headers = {};
1362
+ utils_default.forEach(this, (value, header) => {
1363
+ const key = utils_default.findKey(headers, header);
1364
+ if (key) {
1365
+ self$1[key] = normalizeValue(value);
1366
+ delete self$1[header];
1367
+ return;
1368
+ }
1369
+ const normalized = format ? formatHeader(header) : String(header).trim();
1370
+ if (normalized !== header) delete self$1[header];
1371
+ self$1[normalized] = normalizeValue(value);
1372
+ headers[normalized] = true;
1373
+ });
1374
+ return this;
1375
+ }
1376
+ concat(...targets) {
1377
+ return this.constructor.concat(this, ...targets);
1378
+ }
1379
+ toJSON(asStrings) {
1380
+ const obj = Object.create(null);
1381
+ utils_default.forEach(this, (value, header) => {
1382
+ value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value);
1383
+ });
1384
+ return obj;
1385
+ }
1386
+ [Symbol.iterator]() {
1387
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1388
+ }
1389
+ toString() {
1390
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
1391
+ }
1392
+ getSetCookie() {
1393
+ return this.get("set-cookie") || [];
1394
+ }
1395
+ get [Symbol.toStringTag]() {
1396
+ return "AxiosHeaders";
1397
+ }
1398
+ static from(thing) {
1399
+ return thing instanceof this ? thing : new this(thing);
1400
+ }
1401
+ static concat(first, ...targets) {
1402
+ const computed$1 = new this(first);
1403
+ targets.forEach((target) => computed$1.set(target));
1404
+ return computed$1;
1405
+ }
1406
+ static accessor(header) {
1407
+ const accessors = (this[$internals] = this[$internals] = { accessors: {} }).accessors;
1408
+ const prototype$2 = this.prototype;
1409
+ function defineAccessor(_header) {
1410
+ const lHeader = normalizeHeader(_header);
1411
+ if (!accessors[lHeader]) {
1412
+ buildAccessors(prototype$2, _header);
1413
+ accessors[lHeader] = true;
1414
+ }
1415
+ }
1416
+ utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1417
+ return this;
1418
+ }
1419
+ };
1420
+ AxiosHeaders$1.accessor([
1421
+ "Content-Type",
1422
+ "Content-Length",
1423
+ "Accept",
1424
+ "Accept-Encoding",
1425
+ "User-Agent",
1426
+ "Authorization"
1427
+ ]);
1428
+ utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
1429
+ let mapped = key[0].toUpperCase() + key.slice(1);
1430
+ return {
1431
+ get: () => value,
1432
+ set(headerValue) {
1433
+ this[mapped] = headerValue;
1434
+ }
1435
+ };
1436
+ });
1437
+ utils_default.freezeMethods(AxiosHeaders$1);
1438
+ var AxiosHeaders_default = AxiosHeaders$1;
1439
+ function transformData(fns, response) {
1440
+ const config = this || defaults_default;
1441
+ const context = response || config;
1442
+ const headers = AxiosHeaders_default.from(context.headers);
1443
+ let data = context.data;
1444
+ utils_default.forEach(fns, function transform(fn) {
1445
+ data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
1446
+ });
1447
+ headers.normalize();
1448
+ return data;
1449
+ }
1450
+ function isCancel$1(value) {
1451
+ return !!(value && value.__CANCEL__);
1452
+ }
1453
+ function CanceledError$1(message, config, request$1) {
1454
+ AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request$1);
1455
+ this.name = "CanceledError";
1456
+ }
1457
+ utils_default.inherits(CanceledError$1, AxiosError_default, { __CANCEL__: true });
1458
+ var CanceledError_default = CanceledError$1;
1459
+ function settle(resolve, reject, response) {
1460
+ const validateStatus = response.config.validateStatus;
1461
+ if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response);
1462
+ else reject(new AxiosError_default("Request failed with status code " + response.status, [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
1463
+ }
1464
+ function parseProtocol(url) {
1465
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1466
+ return match && match[1] || "";
1467
+ }
1468
+ function speedometer(samplesCount, min) {
1469
+ samplesCount = samplesCount || 10;
1470
+ const bytes = new Array(samplesCount);
1471
+ const timestamps = new Array(samplesCount);
1472
+ let head = 0;
1473
+ let tail = 0;
1474
+ let firstSampleTS;
1475
+ min = min !== void 0 ? min : 1e3;
1476
+ return function push(chunkLength) {
1477
+ const now = Date.now();
1478
+ const startedAt = timestamps[tail];
1479
+ if (!firstSampleTS) firstSampleTS = now;
1480
+ bytes[head] = chunkLength;
1481
+ timestamps[head] = now;
1482
+ let i = tail;
1483
+ let bytesCount = 0;
1484
+ while (i !== head) {
1485
+ bytesCount += bytes[i++];
1486
+ i = i % samplesCount;
1487
+ }
1488
+ head = (head + 1) % samplesCount;
1489
+ if (head === tail) tail = (tail + 1) % samplesCount;
1490
+ if (now - firstSampleTS < min) return;
1491
+ const passed = startedAt && now - startedAt;
1492
+ return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
1493
+ };
1494
+ }
1495
+ var speedometer_default = speedometer;
1496
+ function throttle(fn, freq) {
1497
+ let timestamp = 0;
1498
+ let threshold = 1e3 / freq;
1499
+ let lastArgs;
1500
+ let timer;
1501
+ const invoke = (args, now = Date.now()) => {
1502
+ timestamp = now;
1503
+ lastArgs = null;
1504
+ if (timer) {
1505
+ clearTimeout(timer);
1506
+ timer = null;
1507
+ }
1508
+ fn(...args);
1509
+ };
1510
+ const throttled = (...args) => {
1511
+ const now = Date.now();
1512
+ const passed = now - timestamp;
1513
+ if (passed >= threshold) invoke(args, now);
1514
+ else {
1515
+ lastArgs = args;
1516
+ if (!timer) timer = setTimeout(() => {
1517
+ timer = null;
1518
+ invoke(lastArgs);
1519
+ }, threshold - passed);
1520
+ }
1521
+ };
1522
+ const flush = () => lastArgs && invoke(lastArgs);
1523
+ return [throttled, flush];
1524
+ }
1525
+ var throttle_default = throttle;
1526
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
1527
+ let bytesNotified = 0;
1528
+ const _speedometer = speedometer_default(50, 250);
1529
+ return throttle_default((e) => {
1530
+ const loaded = e.loaded;
1531
+ const total = e.lengthComputable ? e.total : void 0;
1532
+ const progressBytes = loaded - bytesNotified;
1533
+ const rate = _speedometer(progressBytes);
1534
+ const inRange = loaded <= total;
1535
+ bytesNotified = loaded;
1536
+ listener({
1537
+ loaded,
1538
+ total,
1539
+ progress: total ? loaded / total : void 0,
1540
+ bytes: progressBytes,
1541
+ rate: rate ? rate : void 0,
1542
+ estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
1543
+ event: e,
1544
+ lengthComputable: total != null,
1545
+ [isDownloadStream ? "download" : "upload"]: true
1546
+ });
1547
+ }, freq);
1548
+ };
1549
+ const progressEventDecorator = (total, throttled) => {
1550
+ const lengthComputable = total != null;
1551
+ return [(loaded) => throttled[0]({
1552
+ lengthComputable,
1553
+ total,
1554
+ loaded
1555
+ }), throttled[1]];
1556
+ };
1557
+ const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
1558
+ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin$1, isMSIE) => (url) => {
1559
+ url = new URL(url, platform_default.origin);
1560
+ return origin$1.protocol === url.protocol && origin$1.host === url.host && (isMSIE || origin$1.port === url.port);
1561
+ })(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
1562
+ var cookies_default = platform_default.hasStandardBrowserEnv ? {
1563
+ write(name, value, expires, path, domain, secure) {
1564
+ const cookie = [name + "=" + encodeURIComponent(value)];
1565
+ utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
1566
+ utils_default.isString(path) && cookie.push("path=" + path);
1567
+ utils_default.isString(domain) && cookie.push("domain=" + domain);
1568
+ secure === true && cookie.push("secure");
1569
+ document.cookie = cookie.join("; ");
1570
+ },
1571
+ read(name) {
1572
+ const match = document.cookie.match(/* @__PURE__ */ new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
1573
+ return match ? decodeURIComponent(match[3]) : null;
1574
+ },
1575
+ remove(name) {
1576
+ this.write(name, "", Date.now() - 864e5);
1577
+ }
1578
+ } : {
1579
+ write() {},
1580
+ read() {
1581
+ return null;
1582
+ },
1583
+ remove() {}
1584
+ };
1585
+ function isAbsoluteURL(url) {
1586
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
1587
+ }
1588
+ function combineURLs(baseURL, relativeURL) {
1589
+ return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
1590
+ }
1591
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
1592
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
1593
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) return combineURLs(baseURL, requestedURL);
1594
+ return requestedURL;
1595
+ }
1596
+ var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
1597
+ function mergeConfig$1(config1, config2) {
1598
+ config2 = config2 || {};
1599
+ const config = {};
1600
+ function getMergedValue(target, source, prop, caseless) {
1601
+ if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) return utils_default.merge.call({ caseless }, target, source);
1602
+ else if (utils_default.isPlainObject(source)) return utils_default.merge({}, source);
1603
+ else if (utils_default.isArray(source)) return source.slice();
1604
+ return source;
1605
+ }
1606
+ function mergeDeepProperties(a, b, prop, caseless) {
1607
+ if (!utils_default.isUndefined(b)) return getMergedValue(a, b, prop, caseless);
1608
+ else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a, prop, caseless);
1609
+ }
1610
+ function valueFromConfig2(a, b) {
1611
+ if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
1612
+ }
1613
+ function defaultToConfig2(a, b) {
1614
+ if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
1615
+ else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
1616
+ }
1617
+ function mergeDirectKeys(a, b, prop) {
1618
+ if (prop in config2) return getMergedValue(a, b);
1619
+ else if (prop in config1) return getMergedValue(void 0, a);
1620
+ }
1621
+ const mergeMap = {
1622
+ url: valueFromConfig2,
1623
+ method: valueFromConfig2,
1624
+ data: valueFromConfig2,
1625
+ baseURL: defaultToConfig2,
1626
+ transformRequest: defaultToConfig2,
1627
+ transformResponse: defaultToConfig2,
1628
+ paramsSerializer: defaultToConfig2,
1629
+ timeout: defaultToConfig2,
1630
+ timeoutMessage: defaultToConfig2,
1631
+ withCredentials: defaultToConfig2,
1632
+ withXSRFToken: defaultToConfig2,
1633
+ adapter: defaultToConfig2,
1634
+ responseType: defaultToConfig2,
1635
+ xsrfCookieName: defaultToConfig2,
1636
+ xsrfHeaderName: defaultToConfig2,
1637
+ onUploadProgress: defaultToConfig2,
1638
+ onDownloadProgress: defaultToConfig2,
1639
+ decompress: defaultToConfig2,
1640
+ maxContentLength: defaultToConfig2,
1641
+ maxBodyLength: defaultToConfig2,
1642
+ beforeRedirect: defaultToConfig2,
1643
+ transport: defaultToConfig2,
1644
+ httpAgent: defaultToConfig2,
1645
+ httpsAgent: defaultToConfig2,
1646
+ cancelToken: defaultToConfig2,
1647
+ socketPath: defaultToConfig2,
1648
+ responseEncoding: defaultToConfig2,
1649
+ validateStatus: mergeDirectKeys,
1650
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
1651
+ };
1652
+ utils_default.forEach(Object.keys({
1653
+ ...config1,
1654
+ ...config2
1655
+ }), function computeConfigValue(prop) {
1656
+ const merge$1 = mergeMap[prop] || mergeDeepProperties;
1657
+ const configValue = merge$1(config1[prop], config2[prop], prop);
1658
+ utils_default.isUndefined(configValue) && merge$1 !== mergeDirectKeys || (config[prop] = configValue);
1659
+ });
1660
+ return config;
1661
+ }
1662
+ var resolveConfig_default = (config) => {
1663
+ const newConfig = mergeConfig$1({}, config);
1664
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
1665
+ newConfig.headers = headers = AxiosHeaders_default.from(headers);
1666
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
1667
+ if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
1668
+ if (utils_default.isFormData(data)) {
1669
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
1670
+ else if (utils_default.isFunction(data.getHeaders)) {
1671
+ const formHeaders = data.getHeaders();
1672
+ const allowedHeaders = ["content-type", "content-length"];
1673
+ Object.entries(formHeaders).forEach(([key, val]) => {
1674
+ if (allowedHeaders.includes(key.toLowerCase())) headers.set(key, val);
1675
+ });
1676
+ }
1677
+ }
1678
+ if (platform_default.hasStandardBrowserEnv) {
1679
+ withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
1680
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
1681
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
1682
+ if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue);
1683
+ }
1684
+ }
1685
+ return newConfig;
1686
+ };
1687
+ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
1688
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
1689
+ const _config = resolveConfig_default(config);
1690
+ let requestData = _config.data;
1691
+ const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
1692
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
1693
+ let onCanceled;
1694
+ let uploadThrottled, downloadThrottled;
1695
+ let flushUpload, flushDownload;
1696
+ function done() {
1697
+ flushUpload && flushUpload();
1698
+ flushDownload && flushDownload();
1699
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
1700
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
1701
+ }
1702
+ let request$1 = new XMLHttpRequest();
1703
+ request$1.open(_config.method.toUpperCase(), _config.url, true);
1704
+ request$1.timeout = _config.timeout;
1705
+ function onloadend() {
1706
+ if (!request$1) return;
1707
+ const responseHeaders = AxiosHeaders_default.from("getAllResponseHeaders" in request$1 && request$1.getAllResponseHeaders());
1708
+ settle(function _resolve(value) {
1709
+ resolve(value);
1710
+ done();
1711
+ }, function _reject(err) {
1712
+ reject(err);
1713
+ done();
1714
+ }, {
1715
+ data: !responseType || responseType === "text" || responseType === "json" ? request$1.responseText : request$1.response,
1716
+ status: request$1.status,
1717
+ statusText: request$1.statusText,
1718
+ headers: responseHeaders,
1719
+ config,
1720
+ request: request$1
1721
+ });
1722
+ request$1 = null;
1723
+ }
1724
+ if ("onloadend" in request$1) request$1.onloadend = onloadend;
1725
+ else request$1.onreadystatechange = function handleLoad() {
1726
+ if (!request$1 || request$1.readyState !== 4) return;
1727
+ if (request$1.status === 0 && !(request$1.responseURL && request$1.responseURL.indexOf("file:") === 0)) return;
1728
+ setTimeout(onloadend);
1729
+ };
1730
+ request$1.onabort = function handleAbort() {
1731
+ if (!request$1) return;
1732
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request$1));
1733
+ request$1 = null;
1734
+ };
1735
+ request$1.onerror = function handleError(event) {
1736
+ const err = new AxiosError_default(event && event.message ? event.message : "Network Error", AxiosError_default.ERR_NETWORK, config, request$1);
1737
+ err.event = event || null;
1738
+ reject(err);
1739
+ request$1 = null;
1740
+ };
1741
+ request$1.ontimeout = function handleTimeout() {
1742
+ let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
1743
+ const transitional = _config.transitional || transitional_default;
1744
+ if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage;
1745
+ reject(new AxiosError_default(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, request$1));
1746
+ request$1 = null;
1747
+ };
1748
+ requestData === void 0 && requestHeaders.setContentType(null);
1749
+ if ("setRequestHeader" in request$1) utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
1750
+ request$1.setRequestHeader(key, val);
1751
+ });
1752
+ if (!utils_default.isUndefined(_config.withCredentials)) request$1.withCredentials = !!_config.withCredentials;
1753
+ if (responseType && responseType !== "json") request$1.responseType = _config.responseType;
1754
+ if (onDownloadProgress) {
1755
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
1756
+ request$1.addEventListener("progress", downloadThrottled);
1757
+ }
1758
+ if (onUploadProgress && request$1.upload) {
1759
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
1760
+ request$1.upload.addEventListener("progress", uploadThrottled);
1761
+ request$1.upload.addEventListener("loadend", flushUpload);
1762
+ }
1763
+ if (_config.cancelToken || _config.signal) {
1764
+ onCanceled = (cancel) => {
1765
+ if (!request$1) return;
1766
+ reject(!cancel || cancel.type ? new CanceledError_default(null, config, request$1) : cancel);
1767
+ request$1.abort();
1768
+ request$1 = null;
1769
+ };
1770
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
1771
+ if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
1772
+ }
1773
+ const protocol = parseProtocol(_config.url);
1774
+ if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
1775
+ reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
1776
+ return;
1777
+ }
1778
+ request$1.send(requestData || null);
1779
+ });
1780
+ };
1781
+ var composeSignals = (signals, timeout) => {
1782
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
1783
+ if (timeout || length) {
1784
+ let controller = new AbortController();
1785
+ let aborted;
1786
+ const onabort = function(reason) {
1787
+ if (!aborted) {
1788
+ aborted = true;
1789
+ unsubscribe();
1790
+ const err = reason instanceof Error ? reason : this.reason;
1791
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
1792
+ }
1793
+ };
1794
+ let timer = timeout && setTimeout(() => {
1795
+ timer = null;
1796
+ onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
1797
+ }, timeout);
1798
+ const unsubscribe = () => {
1799
+ if (signals) {
1800
+ timer && clearTimeout(timer);
1801
+ timer = null;
1802
+ signals.forEach((signal$1) => {
1803
+ signal$1.unsubscribe ? signal$1.unsubscribe(onabort) : signal$1.removeEventListener("abort", onabort);
1804
+ });
1805
+ signals = null;
1806
+ }
1807
+ };
1808
+ signals.forEach((signal$1) => signal$1.addEventListener("abort", onabort));
1809
+ const { signal } = controller;
1810
+ signal.unsubscribe = () => utils_default.asap(unsubscribe);
1811
+ return signal;
1812
+ }
1813
+ };
1814
+ var composeSignals_default = composeSignals;
1815
+ const streamChunk = function* (chunk, chunkSize) {
1816
+ let len = chunk.byteLength;
1817
+ if (!chunkSize || len < chunkSize) {
1818
+ yield chunk;
1819
+ return;
1820
+ }
1821
+ let pos = 0;
1822
+ let end;
1823
+ while (pos < len) {
1824
+ end = pos + chunkSize;
1825
+ yield chunk.slice(pos, end);
1826
+ pos = end;
1827
+ }
1828
+ };
1829
+ const readBytes = async function* (iterable, chunkSize) {
1830
+ for await (const chunk of readStream(iterable)) yield* streamChunk(chunk, chunkSize);
1831
+ };
1832
+ var readStream = async function* (stream) {
1833
+ if (stream[Symbol.asyncIterator]) {
1834
+ yield* stream;
1835
+ return;
1836
+ }
1837
+ const reader = stream.getReader();
1838
+ try {
1839
+ for (;;) {
1840
+ const { done, value } = await reader.read();
1841
+ if (done) break;
1842
+ yield value;
1843
+ }
1844
+ } finally {
1845
+ await reader.cancel();
1846
+ }
1847
+ };
1848
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
1849
+ const iterator$1 = readBytes(stream, chunkSize);
1850
+ let bytes = 0;
1851
+ let done;
1852
+ let _onFinish = (e) => {
1853
+ if (!done) {
1854
+ done = true;
1855
+ onFinish && onFinish(e);
1856
+ }
1857
+ };
1858
+ return new ReadableStream({
1859
+ async pull(controller) {
1860
+ try {
1861
+ const { done: done$1, value } = await iterator$1.next();
1862
+ if (done$1) {
1863
+ _onFinish();
1864
+ controller.close();
1865
+ return;
1866
+ }
1867
+ let len = value.byteLength;
1868
+ if (onProgress) onProgress(bytes += len);
1869
+ controller.enqueue(new Uint8Array(value));
1870
+ } catch (err) {
1871
+ _onFinish(err);
1872
+ throw err;
1873
+ }
1874
+ },
1875
+ cancel(reason) {
1876
+ _onFinish(reason);
1877
+ return iterator$1.return();
1878
+ }
1879
+ }, { highWaterMark: 2 });
1880
+ };
1881
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
1882
+ var { isFunction } = utils_default;
1883
+ var globalFetchAPI = (({ fetch: fetch$1, Request, Response }) => ({
1884
+ fetch: fetch$1,
1885
+ Request,
1886
+ Response
1887
+ }))(utils_default.global);
1888
+ var { ReadableStream: ReadableStream$1, TextEncoder } = utils_default.global;
1889
+ var test = (fn, ...args) => {
1890
+ try {
1891
+ return !!fn(...args);
1892
+ } catch (e) {
1893
+ return false;
1894
+ }
1895
+ };
1896
+ var factory = (env) => {
1897
+ const { fetch: fetch$1, Request, Response } = Object.assign({}, globalFetchAPI, env);
1898
+ const isFetchSupported = isFunction(fetch$1);
1899
+ const isRequestSupported = isFunction(Request);
1900
+ const isResponseSupported = isFunction(Response);
1901
+ if (!isFetchSupported) return false;
1902
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
1903
+ const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
1904
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
1905
+ let duplexAccessed = false;
1906
+ const hasContentType = new Request(platform_default.origin, {
1907
+ body: new ReadableStream$1(),
1908
+ method: "POST",
1909
+ get duplex() {
1910
+ duplexAccessed = true;
1911
+ return "half";
1912
+ }
1913
+ }).headers.has("Content-Type");
1914
+ return duplexAccessed && !hasContentType;
1915
+ });
1916
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
1917
+ const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
1918
+ isFetchSupported && [
1919
+ "text",
1920
+ "arrayBuffer",
1921
+ "blob",
1922
+ "formData",
1923
+ "stream"
1924
+ ].forEach((type) => {
1925
+ !resolvers[type] && (resolvers[type] = (res, config) => {
1926
+ let method = res && res[type];
1927
+ if (method) return method.call(res);
1928
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
1929
+ });
1930
+ });
1931
+ const getBodyLength = async (body) => {
1932
+ if (body == null) return 0;
1933
+ if (utils_default.isBlob(body)) return body.size;
1934
+ if (utils_default.isSpecCompliantForm(body)) return (await new Request(platform_default.origin, {
1935
+ method: "POST",
1936
+ body
1937
+ }).arrayBuffer()).byteLength;
1938
+ if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) return body.byteLength;
1939
+ if (utils_default.isURLSearchParams(body)) body = body + "";
1940
+ if (utils_default.isString(body)) return (await encodeText(body)).byteLength;
1941
+ };
1942
+ const resolveBodyLength = async (headers, body) => {
1943
+ const length = utils_default.toFiniteNumber(headers.getContentLength());
1944
+ return length == null ? getBodyLength(body) : length;
1945
+ };
1946
+ return async (config) => {
1947
+ let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions } = resolveConfig_default(config);
1948
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
1949
+ let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
1950
+ let request$1 = null;
1951
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
1952
+ composedSignal.unsubscribe();
1953
+ });
1954
+ let requestContentLength;
1955
+ try {
1956
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
1957
+ let _request = new Request(url, {
1958
+ method: "POST",
1959
+ body: data,
1960
+ duplex: "half"
1961
+ });
1962
+ let contentTypeHeader;
1963
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
1964
+ if (_request.body) {
1965
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
1966
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
1967
+ }
1968
+ }
1969
+ if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
1970
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
1971
+ const resolvedOptions = {
1972
+ ...fetchOptions,
1973
+ signal: composedSignal,
1974
+ method: method.toUpperCase(),
1975
+ headers: headers.normalize().toJSON(),
1976
+ body: data,
1977
+ duplex: "half",
1978
+ credentials: isCredentialsSupported ? withCredentials : void 0
1979
+ };
1980
+ request$1 = isRequestSupported && new Request(url, resolvedOptions);
1981
+ let response = await (isRequestSupported ? fetch$1(request$1, fetchOptions) : fetch$1(url, resolvedOptions));
1982
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
1983
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
1984
+ const options = {};
1985
+ [
1986
+ "status",
1987
+ "statusText",
1988
+ "headers"
1989
+ ].forEach((prop) => {
1990
+ options[prop] = response[prop];
1991
+ });
1992
+ const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
1993
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
1994
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
1995
+ flush && flush();
1996
+ unsubscribe && unsubscribe();
1997
+ }), options);
1998
+ }
1999
+ responseType = responseType || "text";
2000
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
2001
+ !isStreamResponse && unsubscribe && unsubscribe();
2002
+ return await new Promise((resolve, reject) => {
2003
+ settle(resolve, reject, {
2004
+ data: responseData,
2005
+ headers: AxiosHeaders_default.from(response.headers),
2006
+ status: response.status,
2007
+ statusText: response.statusText,
2008
+ config,
2009
+ request: request$1
2010
+ });
2011
+ });
2012
+ } catch (err) {
2013
+ unsubscribe && unsubscribe();
2014
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request$1), { cause: err.cause || err });
2015
+ throw AxiosError_default.from(err, err && err.code, config, request$1);
2016
+ }
2017
+ };
2018
+ };
2019
+ var seedCache = /* @__PURE__ */ new Map();
2020
+ const getFetch = (config) => {
2021
+ let env = utils_default.merge.call({ skipUndefined: true }, globalFetchAPI, config ? config.env : null);
2022
+ const { fetch: fetch$1, Request, Response } = env;
2023
+ const seeds = [
2024
+ Request,
2025
+ Response,
2026
+ fetch$1
2027
+ ];
2028
+ let i = seeds.length, seed, target, map = seedCache;
2029
+ while (i--) {
2030
+ seed = seeds[i];
2031
+ target = map.get(seed);
2032
+ target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env));
2033
+ map = target;
2034
+ }
2035
+ return target;
2036
+ };
2037
+ getFetch();
2038
+ var knownAdapters = {
2039
+ http: null,
2040
+ xhr: xhr_default,
2041
+ fetch: { get: getFetch }
2042
+ };
2043
+ utils_default.forEach(knownAdapters, (fn, value) => {
2044
+ if (fn) {
2045
+ try {
2046
+ Object.defineProperty(fn, "name", { value });
2047
+ } catch (e) {}
2048
+ Object.defineProperty(fn, "adapterName", { value });
2049
+ }
2050
+ });
2051
+ var renderReason = (reason) => `- ${reason}`;
2052
+ var isResolvedHandle = (adapter$1) => utils_default.isFunction(adapter$1) || adapter$1 === null || adapter$1 === false;
2053
+ var adapters_default = {
2054
+ getAdapter: (adapters, config) => {
2055
+ adapters = utils_default.isArray(adapters) ? adapters : [adapters];
2056
+ const { length } = adapters;
2057
+ let nameOrAdapter;
2058
+ let adapter$1;
2059
+ const rejectedReasons = {};
2060
+ for (let i = 0; i < length; i++) {
2061
+ nameOrAdapter = adapters[i];
2062
+ let id;
2063
+ adapter$1 = nameOrAdapter;
2064
+ if (!isResolvedHandle(nameOrAdapter)) {
2065
+ adapter$1 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2066
+ if (adapter$1 === void 0) throw new AxiosError_default(`Unknown adapter '${id}'`);
2067
+ }
2068
+ if (adapter$1 && (utils_default.isFunction(adapter$1) || (adapter$1 = adapter$1.get(config)))) break;
2069
+ rejectedReasons[id || "#" + i] = adapter$1;
2070
+ }
2071
+ if (!adapter$1) {
2072
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
2073
+ throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
2074
+ }
2075
+ return adapter$1;
2076
+ },
2077
+ adapters: knownAdapters
2078
+ };
2079
+ function throwIfCancellationRequested(config) {
2080
+ if (config.cancelToken) config.cancelToken.throwIfRequested();
2081
+ if (config.signal && config.signal.aborted) throw new CanceledError_default(null, config);
2082
+ }
2083
+ function dispatchRequest(config) {
2084
+ throwIfCancellationRequested(config);
2085
+ config.headers = AxiosHeaders_default.from(config.headers);
2086
+ config.data = transformData.call(config, config.transformRequest);
2087
+ if ([
2088
+ "post",
2089
+ "put",
2090
+ "patch"
2091
+ ].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false);
2092
+ return adapters_default.getAdapter(config.adapter || defaults_default.adapter, config)(config).then(function onAdapterResolution(response) {
2093
+ throwIfCancellationRequested(config);
2094
+ response.data = transformData.call(config, config.transformResponse, response);
2095
+ response.headers = AxiosHeaders_default.from(response.headers);
2096
+ return response;
2097
+ }, function onAdapterRejection(reason) {
2098
+ if (!isCancel$1(reason)) {
2099
+ throwIfCancellationRequested(config);
2100
+ if (reason && reason.response) {
2101
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
2102
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
2103
+ }
2104
+ }
2105
+ return Promise.reject(reason);
2106
+ });
2107
+ }
2108
+ const VERSION$1 = "1.12.0";
2109
+ var validators$1 = {};
2110
+ [
2111
+ "object",
2112
+ "boolean",
2113
+ "number",
2114
+ "function",
2115
+ "string",
2116
+ "symbol"
2117
+ ].forEach((type, i) => {
2118
+ validators$1[type] = function validator(thing) {
2119
+ return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
2120
+ };
2121
+ });
2122
+ var deprecatedWarnings = {};
2123
+ validators$1.transitional = function transitional(validator, version, message) {
2124
+ function formatMessage(opt, desc) {
2125
+ return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
2126
+ }
2127
+ return (value, opt, opts) => {
2128
+ if (validator === false) throw new AxiosError_default(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError_default.ERR_DEPRECATED);
2129
+ if (version && !deprecatedWarnings[opt]) {
2130
+ deprecatedWarnings[opt] = true;
2131
+ console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
2132
+ }
2133
+ return validator ? validator(value, opt, opts) : true;
2134
+ };
2135
+ };
2136
+ validators$1.spelling = function spelling(correctSpelling) {
2137
+ return (value, opt) => {
2138
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
2139
+ return true;
2140
+ };
2141
+ };
2142
+ function assertOptions(options, schema, allowUnknown) {
2143
+ if (typeof options !== "object") throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
2144
+ const keys = Object.keys(options);
2145
+ let i = keys.length;
2146
+ while (i-- > 0) {
2147
+ const opt = keys[i];
2148
+ const validator = schema[opt];
2149
+ if (validator) {
2150
+ const value = options[opt];
2151
+ const result = value === void 0 || validator(value, opt, options);
2152
+ if (result !== true) throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
2153
+ continue;
2154
+ }
2155
+ if (allowUnknown !== true) throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION);
2156
+ }
2157
+ }
2158
+ var validator_default = {
2159
+ assertOptions,
2160
+ validators: validators$1
2161
+ };
2162
+ var validators = validator_default.validators;
2163
+ var Axios$1 = class {
2164
+ constructor(instanceConfig) {
2165
+ this.defaults = instanceConfig || {};
2166
+ this.interceptors = {
2167
+ request: new InterceptorManager_default(),
2168
+ response: new InterceptorManager_default()
2169
+ };
2170
+ }
2171
+ async request(configOrUrl, config) {
2172
+ try {
2173
+ return await this._request(configOrUrl, config);
2174
+ } catch (err) {
2175
+ if (err instanceof Error) {
2176
+ let dummy = {};
2177
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error();
2178
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
2179
+ try {
2180
+ if (!err.stack) err.stack = stack;
2181
+ else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) err.stack += "\n" + stack;
2182
+ } catch (e) {}
2183
+ }
2184
+ throw err;
2185
+ }
2186
+ }
2187
+ _request(configOrUrl, config) {
2188
+ if (typeof configOrUrl === "string") {
2189
+ config = config || {};
2190
+ config.url = configOrUrl;
2191
+ } else config = configOrUrl || {};
2192
+ config = mergeConfig$1(this.defaults, config);
2193
+ const { transitional, paramsSerializer, headers } = config;
2194
+ if (transitional !== void 0) validator_default.assertOptions(transitional, {
2195
+ silentJSONParsing: validators.transitional(validators.boolean),
2196
+ forcedJSONParsing: validators.transitional(validators.boolean),
2197
+ clarifyTimeoutError: validators.transitional(validators.boolean)
2198
+ }, false);
2199
+ if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
2200
+ else validator_default.assertOptions(paramsSerializer, {
2201
+ encode: validators.function,
2202
+ serialize: validators.function
2203
+ }, true);
2204
+ if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
2205
+ else config.allowAbsoluteUrls = true;
2206
+ validator_default.assertOptions(config, {
2207
+ baseUrl: validators.spelling("baseURL"),
2208
+ withXsrfToken: validators.spelling("withXSRFToken")
2209
+ }, true);
2210
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
2211
+ let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
2212
+ headers && utils_default.forEach([
2213
+ "delete",
2214
+ "get",
2215
+ "head",
2216
+ "post",
2217
+ "put",
2218
+ "patch",
2219
+ "common"
2220
+ ], (method) => {
2221
+ delete headers[method];
2222
+ });
2223
+ config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
2224
+ const requestInterceptorChain = [];
2225
+ let synchronousRequestInterceptors = true;
2226
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2227
+ if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return;
2228
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2229
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2230
+ });
2231
+ const responseInterceptorChain = [];
2232
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2233
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2234
+ });
2235
+ let promise;
2236
+ let i = 0;
2237
+ let len;
2238
+ if (!synchronousRequestInterceptors) {
2239
+ const chain = [dispatchRequest.bind(this), void 0];
2240
+ chain.unshift(...requestInterceptorChain);
2241
+ chain.push(...responseInterceptorChain);
2242
+ len = chain.length;
2243
+ promise = Promise.resolve(config);
2244
+ while (i < len) promise = promise.then(chain[i++], chain[i++]);
2245
+ return promise;
2246
+ }
2247
+ len = requestInterceptorChain.length;
2248
+ let newConfig = config;
2249
+ i = 0;
2250
+ while (i < len) {
2251
+ const onFulfilled = requestInterceptorChain[i++];
2252
+ const onRejected = requestInterceptorChain[i++];
2253
+ try {
2254
+ newConfig = onFulfilled(newConfig);
2255
+ } catch (error) {
2256
+ onRejected.call(this, error);
2257
+ break;
2258
+ }
2259
+ }
2260
+ try {
2261
+ promise = dispatchRequest.call(this, newConfig);
2262
+ } catch (error) {
2263
+ return Promise.reject(error);
2264
+ }
2265
+ i = 0;
2266
+ len = responseInterceptorChain.length;
2267
+ while (i < len) promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
2268
+ return promise;
2269
+ }
2270
+ getUri(config) {
2271
+ config = mergeConfig$1(this.defaults, config);
2272
+ return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
2273
+ }
2274
+ };
2275
+ utils_default.forEach([
2276
+ "delete",
2277
+ "get",
2278
+ "head",
2279
+ "options"
2280
+ ], function forEachMethodNoData(method) {
2281
+ Axios$1.prototype[method] = function(url, config) {
2282
+ return this.request(mergeConfig$1(config || {}, {
2283
+ method,
2284
+ url,
2285
+ data: (config || {}).data
2286
+ }));
2287
+ };
2288
+ });
2289
+ utils_default.forEach([
2290
+ "post",
2291
+ "put",
2292
+ "patch"
2293
+ ], function forEachMethodWithData(method) {
2294
+ function generateHTTPMethod(isForm) {
2295
+ return function httpMethod(url, data, config) {
2296
+ return this.request(mergeConfig$1(config || {}, {
2297
+ method,
2298
+ headers: isForm ? { "Content-Type": "multipart/form-data" } : {},
2299
+ url,
2300
+ data
2301
+ }));
2302
+ };
2303
+ }
2304
+ Axios$1.prototype[method] = generateHTTPMethod();
2305
+ Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
2306
+ });
2307
+ var Axios_default = Axios$1;
2308
+ var CancelToken_default = class CancelToken$1 {
2309
+ constructor(executor) {
2310
+ if (typeof executor !== "function") throw new TypeError("executor must be a function.");
2311
+ let resolvePromise;
2312
+ this.promise = new Promise(function promiseExecutor(resolve) {
2313
+ resolvePromise = resolve;
2314
+ });
2315
+ const token = this;
2316
+ this.promise.then((cancel) => {
2317
+ if (!token._listeners) return;
2318
+ let i = token._listeners.length;
2319
+ while (i-- > 0) token._listeners[i](cancel);
2320
+ token._listeners = null;
2321
+ });
2322
+ this.promise.then = (onfulfilled) => {
2323
+ let _resolve;
2324
+ const promise = new Promise((resolve) => {
2325
+ token.subscribe(resolve);
2326
+ _resolve = resolve;
2327
+ }).then(onfulfilled);
2328
+ promise.cancel = function reject() {
2329
+ token.unsubscribe(_resolve);
2330
+ };
2331
+ return promise;
2332
+ };
2333
+ executor(function cancel(message, config, request$1) {
2334
+ if (token.reason) return;
2335
+ token.reason = new CanceledError_default(message, config, request$1);
2336
+ resolvePromise(token.reason);
2337
+ });
2338
+ }
2339
+ throwIfRequested() {
2340
+ if (this.reason) throw this.reason;
2341
+ }
2342
+ subscribe(listener) {
2343
+ if (this.reason) {
2344
+ listener(this.reason);
2345
+ return;
2346
+ }
2347
+ if (this._listeners) this._listeners.push(listener);
2348
+ else this._listeners = [listener];
2349
+ }
2350
+ unsubscribe(listener) {
2351
+ if (!this._listeners) return;
2352
+ const index = this._listeners.indexOf(listener);
2353
+ if (index !== -1) this._listeners.splice(index, 1);
2354
+ }
2355
+ toAbortSignal() {
2356
+ const controller = new AbortController();
2357
+ const abort = (err) => {
2358
+ controller.abort(err);
2359
+ };
2360
+ this.subscribe(abort);
2361
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
2362
+ return controller.signal;
2363
+ }
2364
+ static source() {
2365
+ let cancel;
2366
+ return {
2367
+ token: new CancelToken$1(function executor(c) {
2368
+ cancel = c;
2369
+ }),
2370
+ cancel
2371
+ };
2372
+ }
2373
+ };
2374
+ function spread$1(callback) {
2375
+ return function wrap(arr) {
2376
+ return callback.apply(null, arr);
2377
+ };
2378
+ }
2379
+ function isAxiosError$1(payload) {
2380
+ return utils_default.isObject(payload) && payload.isAxiosError === true;
2381
+ }
2382
+ var HttpStatusCode$1 = {
2383
+ Continue: 100,
2384
+ SwitchingProtocols: 101,
2385
+ Processing: 102,
2386
+ EarlyHints: 103,
2387
+ Ok: 200,
2388
+ Created: 201,
2389
+ Accepted: 202,
2390
+ NonAuthoritativeInformation: 203,
2391
+ NoContent: 204,
2392
+ ResetContent: 205,
2393
+ PartialContent: 206,
2394
+ MultiStatus: 207,
2395
+ AlreadyReported: 208,
2396
+ ImUsed: 226,
2397
+ MultipleChoices: 300,
2398
+ MovedPermanently: 301,
2399
+ Found: 302,
2400
+ SeeOther: 303,
2401
+ NotModified: 304,
2402
+ UseProxy: 305,
2403
+ Unused: 306,
2404
+ TemporaryRedirect: 307,
2405
+ PermanentRedirect: 308,
2406
+ BadRequest: 400,
2407
+ Unauthorized: 401,
2408
+ PaymentRequired: 402,
2409
+ Forbidden: 403,
2410
+ NotFound: 404,
2411
+ MethodNotAllowed: 405,
2412
+ NotAcceptable: 406,
2413
+ ProxyAuthenticationRequired: 407,
2414
+ RequestTimeout: 408,
2415
+ Conflict: 409,
2416
+ Gone: 410,
2417
+ LengthRequired: 411,
2418
+ PreconditionFailed: 412,
2419
+ PayloadTooLarge: 413,
2420
+ UriTooLong: 414,
2421
+ UnsupportedMediaType: 415,
2422
+ RangeNotSatisfiable: 416,
2423
+ ExpectationFailed: 417,
2424
+ ImATeapot: 418,
2425
+ MisdirectedRequest: 421,
2426
+ UnprocessableEntity: 422,
2427
+ Locked: 423,
2428
+ FailedDependency: 424,
2429
+ TooEarly: 425,
2430
+ UpgradeRequired: 426,
2431
+ PreconditionRequired: 428,
2432
+ TooManyRequests: 429,
2433
+ RequestHeaderFieldsTooLarge: 431,
2434
+ UnavailableForLegalReasons: 451,
2435
+ InternalServerError: 500,
2436
+ NotImplemented: 501,
2437
+ BadGateway: 502,
2438
+ ServiceUnavailable: 503,
2439
+ GatewayTimeout: 504,
2440
+ HttpVersionNotSupported: 505,
2441
+ VariantAlsoNegotiates: 506,
2442
+ InsufficientStorage: 507,
2443
+ LoopDetected: 508,
2444
+ NotExtended: 510,
2445
+ NetworkAuthenticationRequired: 511
2446
+ };
2447
+ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
2448
+ HttpStatusCode$1[value] = key;
2449
+ });
2450
+ var HttpStatusCode_default = HttpStatusCode$1;
2451
+ function createInstance(defaultConfig) {
2452
+ const context = new Axios_default(defaultConfig);
2453
+ const instance = bind(Axios_default.prototype.request, context);
2454
+ utils_default.extend(instance, Axios_default.prototype, context, { allOwnKeys: true });
2455
+ utils_default.extend(instance, context, null, { allOwnKeys: true });
2456
+ instance.create = function create(instanceConfig) {
2457
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
2458
+ };
2459
+ return instance;
2460
+ }
2461
+ var axios = createInstance(defaults_default);
2462
+ axios.Axios = Axios_default;
2463
+ axios.CanceledError = CanceledError_default;
2464
+ axios.CancelToken = CancelToken_default;
2465
+ axios.isCancel = isCancel$1;
2466
+ axios.VERSION = VERSION$1;
2467
+ axios.toFormData = toFormData_default;
2468
+ axios.AxiosError = AxiosError_default;
2469
+ axios.Cancel = axios.CanceledError;
2470
+ axios.all = function all$1(promises) {
2471
+ return Promise.all(promises);
2472
+ };
2473
+ axios.spread = spread$1;
2474
+ axios.isAxiosError = isAxiosError$1;
2475
+ axios.mergeConfig = mergeConfig$1;
2476
+ axios.AxiosHeaders = AxiosHeaders_default;
2477
+ axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
2478
+ axios.getAdapter = adapters_default.getAdapter;
2479
+ axios.HttpStatusCode = HttpStatusCode_default;
2480
+ axios.default = axios;
2481
+ var axios_default = axios;
2482
+ var { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios_default;
2483
+ var getBrowserId = () => {
2484
+ let browserId = localStorage.getItem(BROWSER_ID_STORAGE_KEY);
2485
+ if (!browserId) {
2486
+ browserId = crypto.randomUUID();
2487
+ localStorage.setItem(BROWSER_ID_STORAGE_KEY, browserId);
2488
+ }
2489
+ return browserId;
2490
+ };
2491
+ var NO_NETWORK_ERROR_CODE = 999;
2492
+ var STREAM_SEPARATOR = "⧉⇋⇋➽⌑⧉§§\n";
2493
+ var MfaRequiredError = class extends ApplicationError {
2494
+ constructor() {
2495
+ super("MFA is required to access this resource. Please set up MFA in your user settings.");
2496
+ this.name = "MfaRequiredError";
2497
+ }
2498
+ };
2499
+ var ResponseError = class extends ApplicationError {
2500
+ httpStatusCode;
2501
+ errorCode;
2502
+ serverStackTrace;
2503
+ meta;
2504
+ constructor(message, options = {}) {
2505
+ super(message);
2506
+ this.name = "ResponseError";
2507
+ const { errorCode, httpStatusCode, stack, meta } = options;
2508
+ if (errorCode) this.errorCode = errorCode;
2509
+ if (httpStatusCode) this.httpStatusCode = httpStatusCode;
2510
+ if (stack) this.serverStackTrace = stack;
2511
+ if (meta) this.meta = meta;
2512
+ }
2513
+ };
2514
+ var legacyParamSerializer = (params) => Object.keys(params).filter((key) => params[key] !== void 0).map((key) => {
2515
+ if (Array.isArray(params[key])) return params[key].map((v) => `${key}[]=${encodeURIComponent(v)}`).join("&");
2516
+ if (typeof params[key] === "object") params[key] = JSON.stringify(params[key]);
2517
+ return `${key}=${encodeURIComponent(params[key])}`;
2518
+ }).join("&");
2519
+ async function request(config) {
2520
+ const { method, baseURL, endpoint, headers, data } = config;
2521
+ let absoluteBaseURL = baseURL;
2522
+ if (baseURL.startsWith("/")) absoluteBaseURL = (typeof window !== "undefined" && window.location?.origin?.startsWith("vscode-webview:") ? "http://localhost:5678" : typeof window !== "undefined" ? window.location?.origin : "http://localhost:5678") + baseURL;
2523
+ const options = {
2524
+ method,
2525
+ url: endpoint,
2526
+ baseURL: absoluteBaseURL,
2527
+ headers: headers ?? {}
2528
+ };
2529
+ if (baseURL.startsWith("/")) options.headers["browser-id"] = getBrowserId();
2530
+ if (!baseURL.includes("api.n8n.io") && !baseURL.includes("n8n.cloud")) options.withCredentials = options.withCredentials ?? true;
2531
+ if ([
2532
+ "POST",
2533
+ "PATCH",
2534
+ "PUT"
2535
+ ].includes(method)) options.data = data;
2536
+ else if (data) {
2537
+ options.params = data;
2538
+ options.paramsSerializer = legacyParamSerializer;
2539
+ }
2540
+ try {
2541
+ return (await axios_default.request(options)).data;
2542
+ } catch (error) {
2543
+ if (error.message === "Network Error") throw new ResponseError("Can't connect to n8n.", { errorCode: 999 });
2544
+ const errorResponseData = error.response?.data;
2545
+ if (errorResponseData?.mfaRequired === true) throw new MfaRequiredError();
2546
+ if (errorResponseData?.message !== void 0) {
2547
+ if (errorResponseData.name === "NodeApiError") {
2548
+ errorResponseData.httpStatusCode = error.response.status;
2549
+ throw errorResponseData;
2550
+ }
2551
+ throw new ResponseError(errorResponseData.message, {
2552
+ errorCode: errorResponseData.code,
2553
+ httpStatusCode: error.response.status,
2554
+ stack: errorResponseData.stack,
2555
+ meta: errorResponseData.meta
2556
+ });
2557
+ }
2558
+ throw error;
2559
+ }
2560
+ }
2561
+ async function getFullApiResponse(context, method, endpoint, data) {
2562
+ return await request({
2563
+ method,
2564
+ baseURL: context.baseUrl,
2565
+ endpoint,
2566
+ headers: { "push-ref": context.pushRef },
2567
+ data
2568
+ });
2569
+ }
2570
+ async function makeRestApiRequest(context, method, endpoint, data) {
2571
+ return (await request({
2572
+ method,
2573
+ baseURL: context.baseUrl,
2574
+ endpoint,
2575
+ headers: { "push-ref": context.pushRef },
2576
+ data
2577
+ })).data;
2578
+ }
2579
+ async function get(baseURL, endpoint, params, headers) {
2580
+ return await request({
2581
+ method: "GET",
2582
+ baseURL,
2583
+ endpoint,
2584
+ headers,
2585
+ data: params
2586
+ });
2587
+ }
2588
+ async function post(baseURL, endpoint, params, headers) {
2589
+ return await request({
2590
+ method: "POST",
2591
+ baseURL,
2592
+ endpoint,
2593
+ headers,
2594
+ data: params
2595
+ });
2596
+ }
2597
+ async function streamRequest(context, apiEndpoint, payload, onChunk, onDone, onError, separator = STREAM_SEPARATOR, abortSignal) {
2598
+ let onErrorOnce = (e) => {
2599
+ onErrorOnce = void 0;
2600
+ onError?.(e);
2601
+ };
2602
+ let absoluteBaseUrl = context.baseUrl;
2603
+ if (context.baseUrl.startsWith("/")) absoluteBaseUrl = (typeof window !== "undefined" && window.location?.origin?.startsWith("vscode-webview:") ? "http://localhost:5678" : typeof window !== "undefined" ? window.location?.origin : "http://localhost:5678") + context.baseUrl;
2604
+ const assistantRequest = {
2605
+ headers: {
2606
+ "browser-id": getBrowserId(),
2607
+ "Content-Type": "application/json"
2608
+ },
2609
+ method: "POST",
2610
+ credentials: "include",
2611
+ body: JSON.stringify(payload),
2612
+ signal: abortSignal
2613
+ };
2614
+ try {
2615
+ const response = await fetch(`${absoluteBaseUrl}${apiEndpoint}`, assistantRequest);
2616
+ if (response.body) {
2617
+ const reader = response.body.getReader();
2618
+ const decoder = new TextDecoder("utf-8");
2619
+ let buffer = "";
2620
+ async function readStream$1() {
2621
+ const { done, value } = await reader.read();
2622
+ if (done) {
2623
+ if (response.ok) onDone?.();
2624
+ else onErrorOnce?.(new ResponseError(response.statusText, { httpStatusCode: response.status }));
2625
+ return;
2626
+ }
2627
+ const chunk = decoder.decode(value);
2628
+ buffer += chunk;
2629
+ const splitChunks = buffer.split(separator);
2630
+ buffer = "";
2631
+ for (const splitChunk of splitChunks) if (splitChunk) {
2632
+ let data;
2633
+ try {
2634
+ data = jsonParse(splitChunk, { errorMessage: "Invalid json" });
2635
+ } catch (e) {
2636
+ buffer += splitChunk;
2637
+ continue;
2638
+ }
2639
+ try {
2640
+ if (response.ok) onChunk?.(data);
2641
+ else {
2642
+ const message = "message" in data ? data.message : response.statusText;
2643
+ onErrorOnce?.(new ResponseError(String(message), { httpStatusCode: response.status }));
2644
+ }
2645
+ } catch (e) {
2646
+ if (e instanceof Error) onErrorOnce?.(e);
2647
+ }
2648
+ }
2649
+ await readStream$1();
2650
+ }
2651
+ await readStream$1();
2652
+ } else if (onErrorOnce) onErrorOnce(new Error(response.statusText));
2653
+ } catch (e) {
2654
+ assert(e instanceof Error);
2655
+ onErrorOnce?.(e);
2656
+ }
2657
+ }
2658
+ const STORES = {
2659
+ COMMUNITY_NODES: "communityNodes",
2660
+ ROOT: "root",
2661
+ SETTINGS: "settings",
2662
+ UI: "ui",
2663
+ USERS: "users",
2664
+ WORKFLOWS: "workflows",
2665
+ WORKFLOWS_V2: "workflowsV2",
2666
+ WORKFLOWS_EE: "workflowsEE",
2667
+ EXECUTIONS: "executions",
2668
+ NDV: "ndv",
2669
+ TEMPLATES: "templates",
2670
+ NODE_TYPES: "nodeTypes",
2671
+ CREDENTIALS: "credentials",
2672
+ TAGS: "tags",
2673
+ ANNOTATION_TAGS: "annotationTags",
2674
+ VERSIONS: "versions",
2675
+ NODE_CREATOR: "nodeCreator",
2676
+ WEBHOOKS: "webhooks",
2677
+ HISTORY: "history",
2678
+ CLOUD_PLAN: "cloudPlan",
2679
+ RBAC: "rbac",
2680
+ PUSH: "push",
2681
+ COLLABORATION: "collaboration",
2682
+ ASSISTANT: "assistant",
2683
+ BUILDER: "builder",
2684
+ CHAT_PANEL: "chatPanel",
2685
+ CHAT_PANEL_STATE: "chatPanelState",
2686
+ BECOME_TEMPLATE_CREATOR: "becomeTemplateCreator",
2687
+ PROJECTS: "projects",
2688
+ API_KEYS: "apiKeys",
2689
+ EVALUATION: "evaluation",
2690
+ FOLDERS: "folders",
2691
+ MODULES: "modules",
2692
+ FOCUS_PANEL: "focusPanel",
2693
+ WORKFLOW_STATE: "workflowState",
2694
+ AI_TEMPLATES_STARTER_COLLECTION: "aiTemplatesStarterCollection",
2695
+ PERSONALIZED_TEMPLATES: "personalizedTemplates",
2696
+ EXPERIMENT_READY_TO_RUN_WORKFLOWS: "readyToRunWorkflows",
2697
+ EXPERIMENT_READY_TO_RUN_WORKFLOWS_V2: "readyToRunWorkflowsV2",
2698
+ EXPERIMENT_TEMPLATE_RECO_V2: "templateRecoV2",
2699
+ PERSONALIZED_TEMPLATES_V3: "personalizedTemplatesV3",
2700
+ READY_TO_RUN: "readyToRun",
2701
+ TEMPLATES_DATA_QUALITY: "templatesDataQuality",
2702
+ BANNERS: "banners",
2703
+ CONSENT: "consent"
2704
+ };
2705
+ function getTagName(configName) {
2706
+ return `n8n:config:${configName}`;
2707
+ }
2708
+ function getConfigFromMetaTag(configName) {
2709
+ const tagName = getTagName(configName);
2710
+ try {
2711
+ const metaTag = document.querySelector(`meta[name="${tagName}"]`);
2712
+ if (!metaTag) return null;
2713
+ const encodedContent = metaTag.getAttribute("content");
2714
+ if (!encodedContent) return null;
2715
+ return atob(encodedContent);
2716
+ } catch (error) {
2717
+ console.warn(`Failed to read n8n config for "${tagName}":`, error);
2718
+ return null;
2719
+ }
2720
+ }
2721
+ function getAndParseConfigFromMetaTag(configName) {
2722
+ const config = getConfigFromMetaTag(configName);
2723
+ if (!config) return null;
2724
+ try {
2725
+ return JSON.parse(config);
2726
+ } catch (error) {
2727
+ console.warn(`Failed to parse n8n config for "${getTagName(configName)}":`, error);
2728
+ return null;
2729
+ }
2730
+ }
2731
+ function getBaseUrl() {
2732
+ const { VUE_APP_URL_BASE_API } = {};
2733
+ const envUrl = VUE_APP_URL_BASE_API;
2734
+ const windowApiUrl = window.__API_BASE_URL__;
2735
+ const windowBasePath = window.BASE_PATH;
2736
+ const url = (envUrl !== "{{BASE_PATH}}" ? envUrl : void 0) ?? windowApiUrl ?? windowBasePath;
2737
+ if (url && url.trim() !== "") return url;
2738
+ if (typeof window !== "undefined" && window.location && !window.location.origin.startsWith("vscode-webview:")) return window.location.origin;
2739
+ return "http://localhost:5678";
2740
+ }
2741
+ const useRootStore = /* @__PURE__ */ defineStore(STORES.ROOT, () => {
2742
+ const state = ref({
2743
+ baseUrl: getBaseUrl(),
2744
+ restEndpoint: getConfigFromMetaTag("rest-endpoint") ?? "rest",
2745
+ defaultLocale: "en",
2746
+ endpointForm: "form",
2747
+ endpointFormTest: "form-test",
2748
+ endpointFormWaiting: "form-waiting",
2749
+ endpointMcp: "mcp",
2750
+ endpointMcpTest: "mcp-test",
2751
+ endpointWebhook: "webhook",
2752
+ endpointWebhookTest: "webhook-test",
2753
+ endpointWebhookWaiting: "webhook-waiting",
2754
+ timezone: "America/New_York",
2755
+ executionTimeout: -1,
2756
+ maxExecutionTimeout: Number.MAX_SAFE_INTEGER,
2757
+ versionCli: "0.0.0",
2758
+ oauthCallbackUrls: {},
2759
+ n8nMetadata: {},
2760
+ pushRef: randomString(10).toLowerCase(),
2761
+ urlBaseWebhook: "http://localhost:5678/",
2762
+ urlBaseEditor: "http://localhost:5678",
2763
+ instanceId: "",
2764
+ binaryDataMode: "default"
2765
+ });
2766
+ const baseUrl = computed(() => state.value.baseUrl);
2767
+ const formUrl = computed(() => `${state.value.urlBaseWebhook}${state.value.endpointForm}`);
2768
+ const formTestUrl = computed(() => `${state.value.urlBaseEditor}${state.value.endpointFormTest}`);
2769
+ const formWaitingUrl = computed(() => `${state.value.urlBaseEditor}${state.value.endpointFormWaiting}`);
2770
+ const webhookUrl = computed(() => `${state.value.urlBaseWebhook}${state.value.endpointWebhook}`);
2771
+ const webhookTestUrl = computed(() => `${state.value.urlBaseEditor}${state.value.endpointWebhookTest}`);
2772
+ const webhookWaitingUrl = computed(() => `${state.value.urlBaseEditor}${state.value.endpointWebhookWaiting}`);
2773
+ const mcpUrl = computed(() => `${state.value.urlBaseWebhook}${state.value.endpointMcp}`);
2774
+ const mcpTestUrl = computed(() => `${state.value.urlBaseEditor}${state.value.endpointMcpTest}`);
2775
+ const pushRef = computed(() => state.value.pushRef);
2776
+ const binaryDataMode = computed(() => state.value.binaryDataMode);
2777
+ const defaultLocale = computed(() => state.value.defaultLocale);
2778
+ const urlBaseEditor = computed(() => state.value.urlBaseEditor);
2779
+ const instanceId = computed(() => state.value.instanceId);
2780
+ const versionCli = computed(() => state.value.versionCli);
2781
+ const OAuthCallbackUrls = computed(() => state.value.oauthCallbackUrls);
2782
+ const restUrl = computed(() => {
2783
+ const base = state.value.baseUrl || "/";
2784
+ const endpoint = state.value.restEndpoint || "rest";
2785
+ return `${base.endsWith("/") ? base.slice(0, -1) : base}/${endpoint}`;
2786
+ });
2787
+ const executionTimeout = computed(() => state.value.executionTimeout);
2788
+ const maxExecutionTimeout = computed(() => state.value.maxExecutionTimeout);
2789
+ const timezone = computed(() => state.value.timezone);
2790
+ const restApiContext = computed(() => ({
2791
+ baseUrl: restUrl.value,
2792
+ pushRef: state.value.pushRef
2793
+ }));
2794
+ const setUrlBaseWebhook = (value) => {
2795
+ const url = value.endsWith("/") ? value : `${value}/`;
2796
+ state.value.urlBaseWebhook = url;
2797
+ };
2798
+ const setUrlBaseEditor = (value) => {
2799
+ const url = value.endsWith("/") ? value : `${value}/`;
2800
+ state.value.urlBaseEditor = url;
2801
+ };
2802
+ const setEndpointForm = (value) => {
2803
+ state.value.endpointForm = value;
2804
+ };
2805
+ const setEndpointFormTest = (value) => {
2806
+ state.value.endpointFormTest = value;
2807
+ };
2808
+ const setEndpointFormWaiting = (value) => {
2809
+ state.value.endpointFormWaiting = value;
2810
+ };
2811
+ const setEndpointWebhook = (value) => {
2812
+ state.value.endpointWebhook = value;
2813
+ };
2814
+ const setEndpointWebhookTest = (value) => {
2815
+ state.value.endpointWebhookTest = value;
2816
+ };
2817
+ const setEndpointWebhookWaiting = (value) => {
2818
+ state.value.endpointWebhookWaiting = value;
2819
+ };
2820
+ const setEndpointMcp = (value) => {
2821
+ state.value.endpointMcp = value;
2822
+ };
2823
+ const setEndpointMcpTest = (value) => {
2824
+ state.value.endpointMcpTest = value;
2825
+ };
2826
+ const setTimezone = (value) => {
2827
+ state.value.timezone = value;
2828
+ setGlobalState({ defaultTimezone: value });
2829
+ };
2830
+ const setExecutionTimeout = (value) => {
2831
+ state.value.executionTimeout = value;
2832
+ };
2833
+ const setMaxExecutionTimeout = (value) => {
2834
+ state.value.maxExecutionTimeout = value;
2835
+ };
2836
+ const setVersionCli = (value) => {
2837
+ state.value.versionCli = value;
2838
+ };
2839
+ const setInstanceId = (value) => {
2840
+ state.value.instanceId = value;
2841
+ };
2842
+ const setOauthCallbackUrls = (value) => {
2843
+ state.value.oauthCallbackUrls = value;
2844
+ };
2845
+ const setN8nMetadata = (value) => {
2846
+ state.value.n8nMetadata = value;
2847
+ };
2848
+ const setDefaultLocale = (value) => {
2849
+ state.value.defaultLocale = value;
2850
+ };
2851
+ const setBinaryDataMode = (value) => {
2852
+ state.value.binaryDataMode = value;
2853
+ };
2854
+ return {
2855
+ baseUrl,
2856
+ formUrl,
2857
+ formTestUrl,
2858
+ formWaitingUrl,
2859
+ mcpUrl,
2860
+ mcpTestUrl,
2861
+ webhookUrl,
2862
+ webhookTestUrl,
2863
+ webhookWaitingUrl,
2864
+ restUrl,
2865
+ restApiContext,
2866
+ urlBaseEditor,
2867
+ versionCli,
2868
+ instanceId,
2869
+ pushRef,
2870
+ defaultLocale,
2871
+ binaryDataMode,
2872
+ OAuthCallbackUrls,
2873
+ executionTimeout,
2874
+ maxExecutionTimeout,
2875
+ timezone,
2876
+ setUrlBaseWebhook,
2877
+ setUrlBaseEditor,
2878
+ setEndpointForm,
2879
+ setEndpointFormTest,
2880
+ setEndpointFormWaiting,
2881
+ setEndpointWebhook,
2882
+ setEndpointWebhookTest,
2883
+ setEndpointWebhookWaiting,
2884
+ setEndpointMcp,
2885
+ setEndpointMcpTest,
2886
+ setTimezone,
2887
+ setExecutionTimeout,
2888
+ setMaxExecutionTimeout,
2889
+ setVersionCli,
2890
+ setInstanceId,
2891
+ setOauthCallbackUrls,
2892
+ setN8nMetadata,
2893
+ setDefaultLocale,
2894
+ setBinaryDataMode
2895
+ };
2896
+ });
2897
+ var require__createBaseEach = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2898
+ var isArrayLike$1 = require_isArrayLike();
2899
+ function createBaseEach(eachFunc, fromRight) {
2900
+ return function(collection, iteratee) {
2901
+ if (collection == null) return collection;
2902
+ if (!isArrayLike$1(collection)) return eachFunc(collection, iteratee);
2903
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
2904
+ while (fromRight ? index-- : ++index < length) if (iteratee(iterable[index], index, iterable) === false) break;
2905
+ return collection;
2906
+ };
2907
+ }
2908
+ module.exports = createBaseEach;
2909
+ }));
2910
+ var require__baseEach = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2911
+ var baseForOwn = require__baseForOwn();
2912
+ module.exports = require__createBaseEach()(baseForOwn);
2913
+ }));
2914
+ var require__baseMap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2915
+ var baseEach = require__baseEach(), isArrayLike = require_isArrayLike();
2916
+ function baseMap$1(collection, iteratee) {
2917
+ var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
2918
+ baseEach(collection, function(value, key, collection$1) {
2919
+ result[++index] = iteratee(value, key, collection$1);
2920
+ });
2921
+ return result;
2922
+ }
2923
+ module.exports = baseMap$1;
2924
+ }));
2925
+ var require__baseSortBy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2926
+ function baseSortBy$1(array, comparer) {
2927
+ var length = array.length;
2928
+ array.sort(comparer);
2929
+ while (length--) array[length] = array[length].value;
2930
+ return array;
2931
+ }
2932
+ module.exports = baseSortBy$1;
2933
+ }));
2934
+ var require__compareAscending = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2935
+ var isSymbol = require_isSymbol();
2936
+ function compareAscending$1(value, other) {
2937
+ if (value !== other) {
2938
+ var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
2939
+ var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
2940
+ if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) return 1;
2941
+ if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) return -1;
2942
+ }
2943
+ return 0;
2944
+ }
2945
+ module.exports = compareAscending$1;
2946
+ }));
2947
+ var require__compareMultiple = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2948
+ var compareAscending = require__compareAscending();
2949
+ function compareMultiple$1(object, other, orders) {
2950
+ var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
2951
+ while (++index < length) {
2952
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
2953
+ if (result) {
2954
+ if (index >= ordersLength) return result;
2955
+ return result * (orders[index] == "desc" ? -1 : 1);
2956
+ }
2957
+ }
2958
+ return object.index - other.index;
2959
+ }
2960
+ module.exports = compareMultiple$1;
2961
+ }));
2962
+ var require__baseOrderBy = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2963
+ var arrayMap = require__arrayMap(), baseGet = require__baseGet(), baseIteratee = require__baseIteratee(), baseMap = require__baseMap(), baseSortBy = require__baseSortBy(), baseUnary = require__baseUnary(), compareMultiple = require__compareMultiple(), identity = require_identity(), isArray = require_isArray();
2964
+ function baseOrderBy(collection, iteratees, orders) {
2965
+ if (iteratees.length) iteratees = arrayMap(iteratees, function(iteratee) {
2966
+ if (isArray(iteratee)) return function(value) {
2967
+ return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
2968
+ };
2969
+ return iteratee;
2970
+ });
2971
+ else iteratees = [identity];
2972
+ var index = -1;
2973
+ iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
2974
+ return baseSortBy(baseMap(collection, function(value, key, collection$1) {
2975
+ var criteria = arrayMap(iteratees, function(iteratee) {
2976
+ return iteratee(value);
2977
+ });
2978
+ return {
2979
+ "criteria": criteria,
2980
+ "index": ++index,
2981
+ "value": value
2982
+ };
2983
+ }), function(object, other) {
2984
+ return compareMultiple(object, other, orders);
2985
+ });
2986
+ }
2987
+ module.exports = baseOrderBy;
2988
+ }));
2989
+ export { storeToRefs as A, INSTANCE_VERSION_HEADER as C, PiniaVuePlugin as D, N8N_IO_BASE_URL as E, createPinia as O, INSTANCE_ID_HEADER as S, BROWSER_ID_STORAGE_KEY as T, LOGSTREAMING_CB_DEFAULT_FAILURE_WINDOW_MS as _, MfaRequiredError as a, LOGSTREAMING_DEFAULT_MAX_SOCKETS as b, get as c, post as d, request as f, assert as g, axios_default as h, getAndParseConfigFromMetaTag as i, defineStore as k, getFullApiResponse as l, AxiosError as m, require__baseEach as n, NO_NETWORK_ERROR_CODE as o, streamRequest as p, useRootStore as r, ResponseError as s, require__baseOrderBy as t, makeRestApiRequest as u, LOGSTREAMING_CB_DEFAULT_MAX_FAILURES as v, NPM_COMMUNITY_NODE_SEARCH_API_URL as w, TOOL_EXECUTOR_NODE_NAME as x, LOGSTREAMING_DEFAULT_MAX_FREE_SOCKETS as y };