@yinuo-ngm/server 1.0.15 → 1.0.16

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 (326) hide show
  1. package/lib/plugins/error-handler.plugin.js +5 -0
  2. package/lib/routes/api-client/hub-token.routes.js +22 -0
  3. package/lib/routes/index.js +2 -0
  4. package/lib/routes/node-version.routes.d.ts +2 -0
  5. package/lib/routes/node-version.routes.js +56 -0
  6. package/lib/routes/project.routes.js +5 -0
  7. package/lib/routes/sprite-browse.routes.js +19 -5
  8. package/lib/routes/sprite.routes.js +17 -11
  9. package/lib/routes/static-files.routes.js +16 -0
  10. package/lib/routes/task.routes.js +7 -0
  11. package/package.json +3 -3
  12. package/www/3rdpartylicenses.txt +14 -66
  13. package/www/browser/chunk-2BZRE4G7.js +1 -0
  14. package/www/browser/chunk-2X3MRS27.js +1 -0
  15. package/www/browser/chunk-4KETC6EB.js +1 -0
  16. package/www/browser/chunk-5T5KA5PG.js +1 -0
  17. package/www/browser/chunk-6CGHNKJI.js +1 -0
  18. package/www/browser/chunk-76TVIB33.js +63 -0
  19. package/www/browser/chunk-7J24TP36.js +1 -0
  20. package/www/browser/chunk-ACAZUX6C.js +1 -0
  21. package/www/browser/chunk-B6MBYCXI.js +1 -0
  22. package/www/browser/chunk-BYEU6KGP.js +2 -0
  23. package/www/browser/chunk-CZ5AZ3VW.js +1 -0
  24. package/www/browser/chunk-DW7F5PEA.js +1 -0
  25. package/www/browser/chunk-DXF7BVK5.js +1 -0
  26. package/www/browser/chunk-EEVPZGEY.js +1 -0
  27. package/www/browser/chunk-G2W3B7TJ.js +1 -0
  28. package/www/browser/chunk-GDWS2L66.js +1 -0
  29. package/www/browser/chunk-HFZLJHYR.js +1 -0
  30. package/www/browser/chunk-HGONFYP6.js +1 -0
  31. package/www/browser/chunk-HHBPULJW.js +2 -0
  32. package/www/browser/chunk-HRXCR3IN.js +1 -0
  33. package/www/browser/chunk-INL2PELS.js +1 -0
  34. package/www/browser/chunk-JHMEKUZ5.js +1 -0
  35. package/www/browser/chunk-JU3TEDBV.js +37 -0
  36. package/www/browser/chunk-JZULA5JV.js +1 -0
  37. package/www/browser/chunk-KVFR7GFV.js +20 -0
  38. package/www/browser/chunk-L5D75AMV.js +1 -0
  39. package/www/browser/chunk-L7TMCSHV.js +1 -0
  40. package/www/browser/chunk-LQ5OXSW7.js +3 -0
  41. package/www/browser/chunk-MVQTKINJ.js +1 -0
  42. package/www/browser/chunk-N4LRZJBP.js +1 -0
  43. package/www/browser/chunk-O2EYEF7J.js +1 -0
  44. package/www/browser/chunk-OMDHJIUB.js +1 -0
  45. package/www/browser/chunk-OWUAAOHW.js +2 -0
  46. package/www/browser/chunk-PIK5YPIB.js +1 -0
  47. package/www/browser/chunk-RHLQRQDK.js +9 -0
  48. package/www/browser/chunk-RW2JPJV7.js +1 -0
  49. package/www/browser/chunk-S3SJ4VVM.js +11 -0
  50. package/www/browser/chunk-SIVPP74B.js +0 -0
  51. package/www/browser/chunk-SPRWNZHF.js +15 -0
  52. package/www/browser/chunk-SQQNR223.js +1 -0
  53. package/www/browser/chunk-SVQWPHF5.js +1 -0
  54. package/www/browser/chunk-SYCNSLAW.js +4 -0
  55. package/www/browser/chunk-T3KK7ZXB.js +2 -0
  56. package/www/browser/chunk-TMX5TTV3.js +1 -0
  57. package/www/browser/chunk-UFY3FLDK.js +1 -0
  58. package/www/browser/chunk-UJOHBN2Y.js +1 -0
  59. package/www/browser/chunk-UQGCUFNM.js +1 -0
  60. package/www/browser/chunk-UXXWRMM6.js +1 -0
  61. package/www/browser/chunk-UZRJGJTD.js +2 -0
  62. package/www/browser/chunk-WD4IAQR3.js +1 -0
  63. package/www/browser/chunk-WF2QTF5L.js +1 -0
  64. package/www/browser/chunk-WI67LAOV.js +4 -0
  65. package/www/browser/chunk-WNCM6QKB.js +1 -0
  66. package/www/browser/chunk-XJ5KZQNN.js +1 -0
  67. package/www/browser/chunk-YETDFSQE.js +1 -0
  68. package/www/browser/chunk-YMTC5GZK.js +1 -0
  69. package/www/browser/chunk-YVZHJ76K.js +1 -0
  70. package/www/browser/chunk-ZNTJRLVH.js +1 -0
  71. package/www/browser/dark.css +1 -30433
  72. package/www/browser/default.css +1 -30149
  73. package/www/browser/index.html +3 -3
  74. package/www/browser/main-6LN5C22E.js +34 -0
  75. package/www/browser/scripts-U25HCVEI.js +6 -0
  76. package/www/browser/styles-ROAHD7MY.css +1 -0
  77. package/www/browser/add-widget-drawer.component.css.map +0 -7
  78. package/www/browser/advanced-editor.component.css.map +0 -7
  79. package/www/browser/api-client.component.css.map +0 -7
  80. package/www/browser/api-history-drawer.component.css.map +0 -7
  81. package/www/browser/app.css.map +0 -7
  82. package/www/browser/attachment-viewer.component.css.map +0 -7
  83. package/www/browser/auth-editor.component.css.map +0 -7
  84. package/www/browser/body-editor.component.css.map +0 -7
  85. package/www/browser/chunk-2YSUXBGC.js +0 -627
  86. package/www/browser/chunk-2YSUXBGC.js.map +0 -1
  87. package/www/browser/chunk-3G2GEOPV.js +0 -456
  88. package/www/browser/chunk-3G2GEOPV.js.map +0 -1
  89. package/www/browser/chunk-3L72DF3R.js +0 -1683
  90. package/www/browser/chunk-3L72DF3R.js.map +0 -1
  91. package/www/browser/chunk-3MCIETCQ.js +0 -8279
  92. package/www/browser/chunk-3MCIETCQ.js.map +0 -1
  93. package/www/browser/chunk-665WC4RU.js +0 -5383
  94. package/www/browser/chunk-665WC4RU.js.map +0 -1
  95. package/www/browser/chunk-6QMSEZPT.js +0 -10044
  96. package/www/browser/chunk-6QMSEZPT.js.map +0 -1
  97. package/www/browser/chunk-6TBQERYX.js +0 -280
  98. package/www/browser/chunk-6TBQERYX.js.map +0 -1
  99. package/www/browser/chunk-6UW4MRJZ.js +0 -43
  100. package/www/browser/chunk-6UW4MRJZ.js.map +0 -7
  101. package/www/browser/chunk-6XUMIL3W.js +0 -5495
  102. package/www/browser/chunk-6XUMIL3W.js.map +0 -1
  103. package/www/browser/chunk-724YOJI3.js +0 -903
  104. package/www/browser/chunk-724YOJI3.js.map +0 -1
  105. package/www/browser/chunk-766T7YES.js +0 -437
  106. package/www/browser/chunk-766T7YES.js.map +0 -1
  107. package/www/browser/chunk-7FC7DN65.js +0 -728
  108. package/www/browser/chunk-7FC7DN65.js.map +0 -1
  109. package/www/browser/chunk-APGQRYWX.js +0 -156
  110. package/www/browser/chunk-APGQRYWX.js.map +0 -7
  111. package/www/browser/chunk-AQHSGTHS.js +0 -1960
  112. package/www/browser/chunk-AQHSGTHS.js.map +0 -1
  113. package/www/browser/chunk-CTOEAJQK.js +0 -40
  114. package/www/browser/chunk-CTOEAJQK.js.map +0 -7
  115. package/www/browser/chunk-DEGQJKKZ.js +0 -409
  116. package/www/browser/chunk-DEGQJKKZ.js.map +0 -1
  117. package/www/browser/chunk-DIJX2663.js +0 -1166
  118. package/www/browser/chunk-DIJX2663.js.map +0 -1
  119. package/www/browser/chunk-E4XD4GLT.js +0 -427
  120. package/www/browser/chunk-E4XD4GLT.js.map +0 -1
  121. package/www/browser/chunk-EQOY6A3M.js +0 -212
  122. package/www/browser/chunk-EQOY6A3M.js.map +0 -1
  123. package/www/browser/chunk-ETTBRXVA.js +0 -2643
  124. package/www/browser/chunk-ETTBRXVA.js.map +0 -1
  125. package/www/browser/chunk-FLSUSPBD.js +0 -5569
  126. package/www/browser/chunk-FLSUSPBD.js.map +0 -1
  127. package/www/browser/chunk-FZNHBEAZ.js +0 -102
  128. package/www/browser/chunk-FZNHBEAZ.js.map +0 -1
  129. package/www/browser/chunk-GJC7CZIJ.js +0 -361
  130. package/www/browser/chunk-GJC7CZIJ.js.map +0 -7
  131. package/www/browser/chunk-GMCNMOTD.js +0 -844
  132. package/www/browser/chunk-GMCNMOTD.js.map +0 -7
  133. package/www/browser/chunk-H43HGCRW.js +0 -198
  134. package/www/browser/chunk-H43HGCRW.js.map +0 -7
  135. package/www/browser/chunk-J447GBHM.js +0 -160
  136. package/www/browser/chunk-J447GBHM.js.map +0 -1
  137. package/www/browser/chunk-JN3VOWP7.js +0 -384
  138. package/www/browser/chunk-JN3VOWP7.js.map +0 -1
  139. package/www/browser/chunk-KSHAGY2M.js +0 -399
  140. package/www/browser/chunk-KSHAGY2M.js.map +0 -7
  141. package/www/browser/chunk-KV72AKOD.js +0 -59
  142. package/www/browser/chunk-KV72AKOD.js.map +0 -7
  143. package/www/browser/chunk-LAVMY2SJ.js +0 -26
  144. package/www/browser/chunk-LAVMY2SJ.js.map +0 -7
  145. package/www/browser/chunk-LLRVGHG5.js +0 -73
  146. package/www/browser/chunk-LLRVGHG5.js.map +0 -7
  147. package/www/browser/chunk-LPME4AJ3.js +0 -196
  148. package/www/browser/chunk-LPME4AJ3.js.map +0 -1
  149. package/www/browser/chunk-LVPSURVU.js +0 -4615
  150. package/www/browser/chunk-LVPSURVU.js.map +0 -1
  151. package/www/browser/chunk-MMPO7QLO.js +0 -4146
  152. package/www/browser/chunk-MMPO7QLO.js.map +0 -7
  153. package/www/browser/chunk-O7LB6VFM.js +0 -1953
  154. package/www/browser/chunk-O7LB6VFM.js.map +0 -1
  155. package/www/browser/chunk-P5CWA4FO.js +0 -685
  156. package/www/browser/chunk-P5CWA4FO.js.map +0 -1
  157. package/www/browser/chunk-RBWIWNTL.js +0 -203
  158. package/www/browser/chunk-RBWIWNTL.js.map +0 -7
  159. package/www/browser/chunk-RUXJCM3V.js +0 -26199
  160. package/www/browser/chunk-RUXJCM3V.js.map +0 -1
  161. package/www/browser/chunk-S77VVYUZ.js +0 -168
  162. package/www/browser/chunk-S77VVYUZ.js.map +0 -1
  163. package/www/browser/chunk-SCXPYFOB.js +0 -4316
  164. package/www/browser/chunk-SCXPYFOB.js.map +0 -1
  165. package/www/browser/chunk-SS73S33S.js +0 -471
  166. package/www/browser/chunk-SS73S33S.js.map +0 -7
  167. package/www/browser/chunk-T6UAOWNP.js +0 -600
  168. package/www/browser/chunk-T6UAOWNP.js.map +0 -1
  169. package/www/browser/chunk-TEW4MY4J.js +0 -148
  170. package/www/browser/chunk-TEW4MY4J.js.map +0 -7
  171. package/www/browser/chunk-TVORF3SF.js +0 -82
  172. package/www/browser/chunk-TVORF3SF.js.map +0 -7
  173. package/www/browser/chunk-UAN42EUZ.js +0 -2147
  174. package/www/browser/chunk-UAN42EUZ.js.map +0 -1
  175. package/www/browser/chunk-ULOHDK7Y.js +0 -1
  176. package/www/browser/chunk-ULOHDK7Y.js.map +0 -7
  177. package/www/browser/chunk-UYJ3FVRV.js +0 -3978
  178. package/www/browser/chunk-UYJ3FVRV.js.map +0 -1
  179. package/www/browser/chunk-VXHZMSDM.js +0 -5509
  180. package/www/browser/chunk-VXHZMSDM.js.map +0 -1
  181. package/www/browser/chunk-VYNQPZQO.js +0 -281
  182. package/www/browser/chunk-VYNQPZQO.js.map +0 -1
  183. package/www/browser/chunk-W3J23PZI.js +0 -9213
  184. package/www/browser/chunk-W3J23PZI.js.map +0 -1
  185. package/www/browser/chunk-W5HGHCQT.js +0 -1642
  186. package/www/browser/chunk-W5HGHCQT.js.map +0 -7
  187. package/www/browser/chunk-XF5H7E4L.js +0 -4723
  188. package/www/browser/chunk-XF5H7E4L.js.map +0 -1
  189. package/www/browser/chunk-XNFNEBMY.js +0 -398
  190. package/www/browser/chunk-XNFNEBMY.js.map +0 -7
  191. package/www/browser/chunk-XQY5SPGI.js +0 -30811
  192. package/www/browser/chunk-XQY5SPGI.js.map +0 -1
  193. package/www/browser/chunk-Y7JBZHNK.js +0 -514
  194. package/www/browser/chunk-Y7JBZHNK.js.map +0 -1
  195. package/www/browser/chunk-YWHRP4X3.js +0 -406
  196. package/www/browser/chunk-YWHRP4X3.js.map +0 -1
  197. package/www/browser/chunk-Z7FJIV62.js +0 -95
  198. package/www/browser/chunk-Z7FJIV62.js.map +0 -7
  199. package/www/browser/chunk-ZBZHXS46.js +0 -1674
  200. package/www/browser/chunk-ZBZHXS46.js.map +0 -1
  201. package/www/browser/chunk-ZZA5NVAI.js +0 -735
  202. package/www/browser/chunk-ZZA5NVAI.js.map +0 -1
  203. package/www/browser/collection-modal.component.css.map +0 -7
  204. package/www/browser/collection-tree-item.component.css.map +0 -7
  205. package/www/browser/collection-tree.component.css.map +0 -7
  206. package/www/browser/config-change-bar-component.css.map +0 -7
  207. package/www/browser/config-item-component.css.map +0 -7
  208. package/www/browser/config-nav-component.css.map +0 -7
  209. package/www/browser/config-section-component.css.map +0 -7
  210. package/www/browser/create-summary-aside.component.css.map +0 -7
  211. package/www/browser/curl-actions.component.css.map +0 -7
  212. package/www/browser/dark.css.map +0 -7
  213. package/www/browser/dashboard-canvas.component.css.map +0 -7
  214. package/www/browser/dashboard.component.css.map +0 -7
  215. package/www/browser/default.css.map +0 -7
  216. package/www/browser/detail-item-card.component.css.map +0 -7
  217. package/www/browser/ellipsis-text.component.css.map +0 -7
  218. package/www/browser/env-modal.component.css.map +0 -7
  219. package/www/browser/env-picker.component.css.map +0 -7
  220. package/www/browser/feedback.component.css.map +0 -7
  221. package/www/browser/fs-explorer.component.css.map +0 -7
  222. package/www/browser/git-import-modal.component.css.map +0 -7
  223. package/www/browser/hub-v2-personal-token-modal.component.css.map +0 -7
  224. package/www/browser/issue-action-area.component.css.map +0 -7
  225. package/www/browser/issue-add-participants-dialog.component.css.map +0 -7
  226. package/www/browser/issue-assign-dialog.component.css.map +0 -7
  227. package/www/browser/issue-attachment-area.component.css.map +0 -7
  228. package/www/browser/issue-base-info-area.component.css.map +0 -7
  229. package/www/browser/issue-branches.component.css.map +0 -7
  230. package/www/browser/issue-close-dialog.component.css.map +0 -7
  231. package/www/browser/issue-collaborators-panel.component.css.map +0 -7
  232. package/www/browser/issue-comment-editor.component.css.map +0 -7
  233. package/www/browser/issue-create-branch-dialog.component.css.map +0 -7
  234. package/www/browser/issue-description-area.component.css.map +0 -7
  235. package/www/browser/issue-detail.component.css.map +0 -7
  236. package/www/browser/issue-resolve-dialog.component.css.map +0 -7
  237. package/www/browser/issue-start-own-branch-dialog.component.css.map +0 -7
  238. package/www/browser/issues-list-table.component.css.map +0 -7
  239. package/www/browser/issues.component.css.map +0 -7
  240. package/www/browser/kill-port-widget.component.css.map +0 -7
  241. package/www/browser/kv-table.component.css.map +0 -7
  242. package/www/browser/layout-footer.component.css.map +0 -7
  243. package/www/browser/layout-header.component.css.map +0 -7
  244. package/www/browser/layout-menu.component.css.map +0 -7
  245. package/www/browser/layout-project-nav.component.css.map +0 -7
  246. package/www/browser/layout-sidebar.component.css.map +0 -7
  247. package/www/browser/layout.component.css.map +0 -7
  248. package/www/browser/less-viewport-component.css.map +0 -7
  249. package/www/browser/main.js +0 -1872
  250. package/www/browser/main.js.map +0 -1
  251. package/www/browser/markdown-viewer.component.css.map +0 -7
  252. package/www/browser/news-feed-widget.component.css.map +0 -7
  253. package/www/browser/ng-devtool.component.css.map +0 -7
  254. package/www/browser/nginx-config-editor.component.css.map +0 -7
  255. package/www/browser/nginx-log-viewer.component.css.map +0 -7
  256. package/www/browser/nginx-secondary-logs-tab.component.css.map +0 -7
  257. package/www/browser/nginx-secondary-perf-tab.component.css.map +0 -7
  258. package/www/browser/nginx-secondary-settings-tab.component.css.map +0 -7
  259. package/www/browser/nginx-secondary-ssl-tab.component.css.map +0 -7
  260. package/www/browser/nginx-secondary-test-tab.component.css.map +0 -7
  261. package/www/browser/nginx-secondary-traffic-tab.component.css.map +0 -7
  262. package/www/browser/nginx-secondary-upstream-tab.component.css.map +0 -7
  263. package/www/browser/nginx-section-card.component.css.map +0 -7
  264. package/www/browser/nginx-server-drawer.component.css.map +0 -7
  265. package/www/browser/nginx-server-list.component.css.map +0 -7
  266. package/www/browser/nginx-stat-card.component.css.map +0 -7
  267. package/www/browser/nginx.component.css.map +0 -7
  268. package/www/browser/page-layout.component.css.map +0 -7
  269. package/www/browser/pick-workspace-modal.component.css.map +0 -7
  270. package/www/browser/polyfills.js +0 -26584
  271. package/www/browser/polyfills.js.map +0 -7
  272. package/www/browser/project-conf.component.css.map +0 -7
  273. package/www/browser/project-create-modal.component.css.map +0 -7
  274. package/www/browser/project-create.component.css.map +0 -7
  275. package/www/browser/project-deps.component.css.map +0 -7
  276. package/www/browser/project-edit-modal.component.css.map +0 -7
  277. package/www/browser/project-import.component.css.map +0 -7
  278. package/www/browser/project-item-popover.component.css.map +0 -7
  279. package/www/browser/project-item.component.css.map +0 -7
  280. package/www/browser/project-list.component.css.map +0 -7
  281. package/www/browser/projects.component.css.map +0 -7
  282. package/www/browser/quick-task-widget.component.css.map +0 -7
  283. package/www/browser/rd-action-area.component.css.map +0 -7
  284. package/www/browser/rd-advance-stage-dialog.component.css.map +0 -7
  285. package/www/browser/rd-block-dialog.component.css.map +0 -7
  286. package/www/browser/rd-create-dialog.component.css.map +0 -7
  287. package/www/browser/rd-detail.component.css.map +0 -7
  288. package/www/browser/rd-item-card.component.css.map +0 -7
  289. package/www/browser/rd-list-board.component.css.map +0 -7
  290. package/www/browser/rd-list-table.component.css.map +0 -7
  291. package/www/browser/rd.component.css.map +0 -7
  292. package/www/browser/request-collections.component.css.map +0 -7
  293. package/www/browser/request-editor.component.css.map +0 -7
  294. package/www/browser/request-list-item.component.css.map +0 -7
  295. package/www/browser/request-list.component.css.map +0 -7
  296. package/www/browser/request-tabs-bar.component.css.map +0 -7
  297. package/www/browser/request-tabs.component.css.map +0 -7
  298. package/www/browser/request-urlbar.component.css.map +0 -7
  299. package/www/browser/response-viewer.component.css.map +0 -7
  300. package/www/browser/scripts.js +0 -245
  301. package/www/browser/scripts.js.map +0 -7
  302. package/www/browser/setting.component.css.map +0 -7
  303. package/www/browser/sprite-conf-modal.component.css.map +0 -7
  304. package/www/browser/sprite-icons-panel-component.css.map +0 -7
  305. package/www/browser/sprite-images-panel-component.css.map +0 -7
  306. package/www/browser/sprite-result-tabs.component.css.map +0 -7
  307. package/www/browser/sprite-viewport-component.css.map +0 -7
  308. package/www/browser/sprite.component.css.map +0 -7
  309. package/www/browser/step-advance.component.css.map +0 -7
  310. package/www/browser/step-basic.component.css.map +0 -7
  311. package/www/browser/step-config.component.css.map +0 -7
  312. package/www/browser/step-features.component.css.map +0 -7
  313. package/www/browser/step-preset.component.css.map +0 -7
  314. package/www/browser/step-summary-aside.component.css.map +0 -7
  315. package/www/browser/styles.css +0 -258
  316. package/www/browser/styles.css.map +0 -7
  317. package/www/browser/system-log.component.css.map +0 -7
  318. package/www/browser/task-actions.component.css.map +0 -7
  319. package/www/browser/task-console.component.css.map +0 -7
  320. package/www/browser/task-header.component.css.map +0 -7
  321. package/www/browser/task-list.component.css.map +0 -7
  322. package/www/browser/tasks.component.css.map +0 -7
  323. package/www/browser/terminal-view.component.css.map +0 -7
  324. package/www/browser/welcome-widget.component.css.map +0 -7
  325. package/www/browser/widget-base.component.css.map +0 -7
  326. package/www/browser/widget-host.component.css.map +0 -7
@@ -0,0 +1 @@
1
+ import{c as dn,d as un,e as fn}from"./chunk-LQ5OXSW7.js";import{a as pn,b as sn,c as ln,d as cn}from"./chunk-HGONFYP6.js";import{a as gn,b as Cn,c as _n,d as zn,e as hn}from"./chunk-SVQWPHF5.js";import{a as mn,b as Ve,c as Ae,d as Re,e as oe}from"./chunk-6CGHNKJI.js";import{a as Be,b as fe}from"./chunk-GDWS2L66.js";import{a as Wt,b as Lt,c as Gt}from"./chunk-ZNTJRLVH.js";import{a as an}from"./chunk-B6MBYCXI.js";import{a as Fe,b as Oe,c as de}from"./chunk-G2W3B7TJ.js";import{b as nn}from"./chunk-PIK5YPIB.js";import"./chunk-YVZHJ76K.js";import"./chunk-SIVPP74B.js";import{a as on,b as rn}from"./chunk-WD4IAQR3.js";import{a as Ie,b as ue}from"./chunk-WF2QTF5L.js";import"./chunk-HRXCR3IN.js";import"./chunk-DW7F5PEA.js";import"./chunk-KVFR7GFV.js";import{a as $t,c as Yt}from"./chunk-HHBPULJW.js";import{a as Z,b as I}from"./chunk-2X3MRS27.js";import{a as be,c as De,d as Kt,e as Xt,f as Ne}from"./chunk-4KETC6EB.js";import{a as dt,b as L,c as G,d as $,f as Jt,g as Ht}from"./chunk-JU3TEDBV.js";import{b as Zt}from"./chunk-JZULA5JV.js";import{a as en,b as tn}from"./chunk-TMX5TTV3.js";import"./chunk-UQGCUFNM.js";import{e as Se,f as Ee,g as le,l as ee}from"./chunk-BYEU6KGP.js";import"./chunk-5T5KA5PG.js";import{f as me}from"./chunk-UXXWRMM6.js";import{$b as ce,Eb as Y,Fa as v,Ga as P,Gb as U,Hb as Ut,Jb as qt,Kb as q,Lb as Qt,Ma as At,Na as Rt,Oa as j,Pa as H,Ra as D,Sa as S,Ub as E,Xb as je,Zb as K,ac as Q,dc as te,fc as ne}from"./chunk-SPRWNZHF.js";import"./chunk-HFZLJHYR.js";import{e as Te,h as ze}from"./chunk-L5D75AMV.js";import{i as Bt,k as Vt,n as h}from"./chunk-T3KK7ZXB.js";import{$b as ae,$c as Nt,A as pt,Ac as kt,Ec as V,Fb as M,Fc as Tt,Gb as ke,Gc as St,Ha as B,Jc as l,Kc as b,Lb as O,Lc as se,M as st,Nc as w,Oa as xe,Oc as k,Pc as T,Q as Ct,Qc as Et,Rc as jt,Sc as bt,V as _t,Wb as y,X as zt,Xc as Dt,Yb as x,Yc as mt,_b as Pt,a as J,ac as pe,ad as Ft,b as at,bc as g,cc as r,cd as W,dc as a,ea as ht,ec as c,fa as lt,g as ft,hd as A,ic as vt,id as Ot,jc as yt,kc as ct,l as ve,lc as z,na as Mt,nb as s,oa as ye,rc as m,rd as It,sa as C,sb as F,u as gt,uc as d,ya as u,yc as xt,z as _e,za as f,zb as we,zc as wt}from"./chunk-WI67LAOV.js";var kn=()=>({padding:"8px"});function Tn(o,n){if(o&1){let e=z();r(0,"button",13),m("click",function(){u(e);let i=d();return f(i.copy())}),c(1,"nz-icon",14),a()}if(o&2){let e=d();g("nz-tooltip",e.copyied?"\u5DF2\u590D\u5236":"\u590D\u5236")}}function Sn(o,n){if(o&1&&(r(0,"div",9)(1,"nz-tag",15),l(2),a()()),o&2){let e=d();s(2),se("\u63A8\u8350\uFF1A",e.draft.detected==null?null:e.draft.detected.recommendedScript)}}function En(o,n){o&1&&(r(0,"div",10),l(1," \u26A0\uFE0F \u8986\u76D6\u5DF2\u5B58\u5728\u76EE\u5F55 "),a())}function jn(o,n){if(o&1){let e=z();r(0,"button",16),m("click",function(){u(e);let i=d();return f(i.isDrawerOpen=!i.isDrawerOpen)}),c(1,"nz-icon",17),l(2," \u65E5\u5FD7\u8F93\u51FA "),a()}}function bn(o,n){o&1&&(vt(0),c(1,"app-terminal-view"),yt()),o&2&&(s(),Tt("height",100,"%"))}var We=class o{draft;chunk="";clipboard=C(an);term;isDrawerOpen=!1;isCreating=It(!1);copyied=!1;ngOnChanges(n){n.chunk&&n.chunk.currentValue&&this.term&&this.term.write(this.chunk),n.isCreating&&n.isCreating.currentValue===!0&&(this.isDrawerOpen=!0)}copy(){let n=this.draft.repoUrl||"";this.clipboard.copy(n),this.copyied=!0,setTimeout(()=>{this.copyied=!1},2e3)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-create-summary-aside"]],viewQuery:function(e,t){if(e&1&&xt(dt,5),e&2){let i;wt(i=kt())&&(t.term=i.first)}},inputs:{draft:"draft",chunk:"chunk",isCreating:[1,"isCreating"]},outputs:{isCreating:"isCreatingChange"},features:[xe],decls:44,vars:16,consts:[["logActions",""],["nzTitle","\u6458\u8981","nzSize","small",3,"nzExtra"],[1,"item"],[1,"k"],[1,"v"],[1,"v","mono"],[1,"v",3,"nz-tooltip"],["nz-button","","nzType","text","nzSize","small",3,"nz-tooltip"],[1,"sep"],[1,"tag"],[1,"warn"],["nzTitle","\u65E5\u5FD7","nzPlacement","right",3,"nzOnClose","nzVisible","nzWidth","nzBodyStyle"],[4,"nzDrawerContent"],["nz-button","","nzType","text","nzSize","small",3,"click","nz-tooltip"],["nzType","copy","nzTheme","outline"],["nzColor","blue"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","desktop","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"nz-card",1)(1,"div",2)(2,"span",3),l(3,"\u540D\u79F0"),a(),r(4,"span",4),l(5),a()(),r(6,"div",2)(7,"span",3),l(8,"\u8DEF\u5F84"),a(),r(9,"span",5),l(10),a()(),r(11,"div",2)(12,"span",3),l(13,"\u5305\u7BA1\u7406\u5668"),a(),r(14,"span",4),l(15),a()(),r(16,"div",2)(17,"span",3),l(18,"Git \u8FDC\u7A0B\u4ED3\u5E93"),a(),r(19,"span",6),l(20),a(),y(21,Tn,2,1,"button",7),a(),c(22,"div",8),r(23,"div",2)(24,"span",3),l(25,"\u6846\u67B6"),a(),r(26,"span",4),l(27),a()(),r(28,"div",2)(29,"span",3),l(30,"\u811A\u672C\u547D\u4EE4"),a(),r(31,"span",4),l(32),a()(),r(33,"div",2)(34,"span",3),l(35,"Git"),a(),r(36,"span",4),l(37),a()(),y(38,Sn,3,1,"div",9),y(39,En,2,0,"div",10),a(),O(40,jn,3,0,"ng-template",null,0,W),r(42,"nz-drawer",11),m("nzOnClose",function(){return u(i),f(t.isDrawerOpen=!1)}),O(43,bn,2,2,"ng-container",12),a()}if(e&2){let i=V(41);g("nzExtra",i),s(5),b(t.draft.name||"-"),s(5),b(t.draft.rootPath||"-"),s(5),b(t.draft.packageManager),s(4),g("nz-tooltip",t.draft.repoUrl||""),s(),b(t.draft.repoUrl||"-"),s(),x(t.draft.repoUrl?21:-1),s(6),b((t.draft.detected==null?null:t.draft.detected.framework)||"-"),s(5),b((t.draft.detected==null?null:t.draft.detected.scriptsCount)??"-"),s(5),b(t.draft.detected!=null&&t.draft.detected.hasGit?"Yes":"No"),s(),x(t.draft.detected!=null&&t.draft.detected.recommendedScript?38:-1),s(),x(t.draft.overwriteIfExists?39:-1),s(3),g("nzVisible",t.isDrawerOpen)("nzWidth",720)("nzBodyStyle",Dt(15,kn))}},dependencies:[h,I,Z,ue,Ie,ne,te,P,v,S,D,j,dt,Gt,Lt,Wt],styles:[".item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px;padding:6px 0;align-items:center}.k[_ngcontent-%COMP%]{opacity:.7;width:90px;font-size:14px}.v[_ngcontent-%COMP%]{text-align:right;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;word-break:break-all}.sep[_ngcontent-%COMP%]{height:1px;background:#0000000f;margin:10px 0}.tag[_ngcontent-%COMP%]{margin-top:8px;text-align:right}.warn[_ngcontent-%COMP%]{margin-top:10px;font-size:12px;color:#d46b08}"],changeDetection:0})};function In(o,n){o&1&&c(0,"nz-empty",6)}function Bn(o,n){if(o&1&&(r(0,"nz-tag",17),l(1),Nt(2,"titlecase"),a()),o&2){let e=d().$implicit,t=bt(4);g("nzColor",t==="angular"?"#dd0031":t==="vue"?"#42b883":"#108ee9"),s(),se(" ",Ft(2,2,e.kind)," ")}}function Vn(o,n){if(o&1&&(r(0,"div",14)(1,"div",15)(2,"div",16),l(3),a(),Et(4),y(5,Bn,3,4,"nz-tag",17),a()()),o&2){let e=n.$implicit;g("nzValue",e.path),s(2),g("nz-tooltip",e.path),s(),b(e.path),s();let t=jt(e.kind);s(),x(t?5:-1)}}function An(o,n){if(o&1){let e=z();r(0,"nz-radio-group",13),T("ngModelChange",function(i){u(e);let p=d();return k(p.selectedPath,i)||(p.selectedPath=i),f(i)}),ae(1,Vn,6,5,"div",14,Pt),a()}if(o&2){let e=d();w("ngModel",e.selectedPath),s(),pe(e.filtered())}}var Ge=class o{constructor(n){this.modalRef=n}data=C(Se);keyword=B("");selectedPath=B(null);ngOnInit(){let{candidates:n,defaultPicked:e}=this.data,t=e&&n.includes(e)?e:n[0]??"";this.selectedPath.set(t?.path??null)}filtered=A(()=>{let n=(this.keyword()||"").trim().toLowerCase(),e=this.data.candidates??[];return n?e.filter(t=>t.path.toLowerCase().includes(n)):e});cancel(){this.modalRef.close(null)}ok(){let n=this.selectedPath();n&&this.modalRef.close({pickedRoot:n})}static \u0275fac=function(e){return new(e||o)(we(Ee))};static \u0275cmp=M({type:o,selectors:[["app-pick-workspace-modal"]],decls:17,vars:3,consts:[[1,"wrap"],[1,"hint"],[1,"toolbar"],["nz-input","","placeholder","\u8FC7\u6EE4\u8DEF\u5F84\uFF08\u5173\u952E\u5B57\uFF09",3,"ngModelChange","ngModel"],["nzType","search","nzTheme","outline","nzSuffix",""],[1,"list"],["nzNotFoundContent","\u6CA1\u6709\u5339\u914D\u7684\u76EE\u5F55"],["nzSize","large",3,"ngModel"],[1,"actions"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","",1,"item",3,"nzValue"],[1,"path"],["nzTooltipPlacement","top",1,"value",3,"nz-tooltip"],["nzMode","default",3,"nzColor"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),l(2," \u68C0\u6D4B\u5230\u8BE5\u4ED3\u5E93\u53EF\u80FD\u5305\u542B\u591A\u4E2A\u524D\u7AEF\u5DE5\u4F5C\u533A\uFF08Angular / Vue \u7B49\uFF09\u3002\u8BF7\u9009\u62E9\u4E00\u4E2A\u76EE\u5F55\u7EE7\u7EED\u5BFC\u5165\uFF1A "),a(),r(3,"div",2)(4,"nz-input-wrapper")(5,"input",3),T("ngModelChange",function(p){return k(t.keyword,p)||(t.keyword=p),p}),a(),c(6,"nz-icon",4),a()(),r(7,"div",5),y(8,In,1,0,"nz-empty",6)(9,An,3,1,"nz-radio-group",7),a(),r(10,"div",8)(11,"button",9),m("click",function(){return t.cancel()}),c(12,"nz-icon",10),l(13," \u53D6\u6D88 "),a(),r(14,"button",11),m("click",function(){return t.ok()}),c(15,"nz-icon",12),l(16," \u9009\u4E2D\u5E76\u7EE7\u7EED "),a()()()),e&2&&(s(5),w("ngModel",t.keyword),s(3),x(t.filtered().length===0?8:9),s(6),g("disabled",!t.selectedPath()))},dependencies:[h,E,Y,U,q,ee,Q,K,ce,de,Oe,Fe,S,D,j,H,P,v,De,be,ue,Ie,ne,te,Vt],styles:[".wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.hint[_ngcontent-%COMP%]{opacity:.85}.toolbar[_ngcontent-%COMP%]{margin-top:4px}nz-radio-group[_ngcontent-%COMP%]{width:100%}.list[_ngcontent-%COMP%]{height:240px;overflow:auto;padding:8px;border:var(--app-border-color);border-radius:8px}.item[_ngcontent-%COMP%]{display:flex;gap:8px;padding:12px;border-radius:8px;margin:0;width:100%}.item[_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.item[_ngcontent-%COMP%] .ant-radio+span{display:flex;gap:12px;align-items:center;flex:1 1 auto;width:0;padding:0}.path[_ngcontent-%COMP%]{display:flex;gap:12px;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;width:0;overflow:hidden}.path[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;width:0;overflow:hidden}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}"]})};function Wn(o,n){o&1&&(r(0,"span",4),l(1,"\u8BE5\u8DEF\u5F84\u5DF2\u5B58\u5728"),a())}function Ln(o,n){if(o&1){let e=z();r(0,"input",15),T("ngModelChange",function(i){u(e);let p=d();return k(p.draft.initialCommitMessage,i)||(p.draft.initialCommitMessage=i),f(i)}),a()}if(o&2){let e=d();w("ngModel",e.draft.initialCommitMessage)}}var Qe=class o{draft;draftChange=new F;pathCheck$=new ve;pathExists=!1;fsApi=C(mn);ngOnInit(){this.computeRootPath(),this.pathCheck$.pipe(Ct(200),_t(),ht(n=>n?this.fsApi.pathExists(n):gt(!1))).subscribe(n=>{this.emit(),this.pathExists=n})}recalcRoot(){this.computeRootPath(),this.pathCheck$.next(this.draft.rootPath)}computeRootPath(){let n=(this.draft.parentDir??"").replace(/[\\/]+$/,""),e=(this.draft.name??"").trim();this.draft.rootPath=n&&e?`${n}/${e}`.replaceAll("\\","/"):n}emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-basic"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:40,vars:8,consts:[["nzTitle","\u57FA\u7840\u8BBE\u7F6E"],["nz-form","","nzLayout","vertical"],["nz-input","","name","name","placeholder","\u8F93\u5165\u9879\u76EE\u540D",3,"ngModelChange","ngModel"],[1,"hint"],[2,"margin-left","8px","color","#ff4d4f"],["name","pm",3,"ngModelChange","ngModel"],["nzValue","auto","nzLabel","\u9ED8\u8BA4"],["nzValue","npm","nzLabel","npm"],["nzValue","pnpm","nzLabel","pnpm"],["nzValue","yarn","nzLabel","yarn"],[1,"switch-row"],["name","overwrite",3,"ngModelChange","ngModel"],["name","skip",3,"ngModelChange","ngModel"],["name","initGit",3,"ngModelChange","ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModel"],["nz-input","","name","msg","placeholder","\u8986\u76D6\u63D0\u4EA4\u4FE1\u606F(\u9009\u586B)",3,"ngModelChange","ngModel"]],template:function(e,t){e&1&&(r(0,"nz-card",0)(1,"form",1)(2,"nz-form-item")(3,"nz-form-label"),l(4,"\u9879\u76EE\u6587\u4EF6\u5939"),a(),r(5,"nz-form-control")(6,"input",2),T("ngModelChange",function(p){return k(t.draft.name,p)||(t.draft.name=p),p}),m("ngModelChange",function(){return t.recalcRoot()}),a(),r(7,"div",3),l(8),y(9,Wn,2,0,"span",4),a()()(),r(10,"nz-form-item")(11,"nz-form-label"),l(12,"\u5305\u7BA1\u7406\u5668"),a(),r(13,"nz-form-control")(14,"nz-select",5),T("ngModelChange",function(p){return k(t.draft.packageManager,p)||(t.draft.packageManager=p),p}),c(15,"nz-option",6)(16,"nz-option",7)(17,"nz-option",8)(18,"nz-option",9),a()()(),r(19,"nz-form-item")(20,"nz-form-label"),l(21,"\u66F4\u591A\u9009\u9879"),a(),r(22,"nz-form-control")(23,"div",10)(24,"span"),l(25,"\u82E5\u76EE\u6807\u6587\u4EF6\u5939\u5DF2\u5B58\u5728\u5219\u8986\u76D6"),a(),r(26,"nz-switch",11),T("ngModelChange",function(p){return k(t.draft.overwriteIfExists,p)||(t.draft.overwriteIfExists=p),p}),m("ngModelChange",function(){return t.emit()}),a()(),r(27,"div",10)(28,"span"),l(29,"\u65E0\u65B0\u624B\u6307\u5F15\u7684\u811A\u624B\u67B6\u9879\u76EE"),a(),r(30,"nz-switch",12),T("ngModelChange",function(p){return k(t.draft.skipOnboarding,p)||(t.draft.skipOnboarding=p),p}),a()()()(),r(31,"nz-form-item")(32,"nz-form-label"),l(33,"Git"),a(),r(34,"nz-form-control")(35,"div",10)(36,"span"),l(37,"\u521D\u59CB\u5316 git \u4ED3\u5E93\uFF08\u5EFA\u8BAE\uFF09"),a(),r(38,"nz-switch",13),T("ngModelChange",function(p){return k(t.draft.initGit,p)||(t.draft.initGit=p),p}),a()(),y(39,Ln,1,1,"input",14),a()()()()),e&2&&(s(6),w("ngModel",t.draft.name),s(2),se(" ",t.draft.rootPath," "),s(),x(t.pathExists?9:-1),s(5),w("ngModel",t.draft.packageManager),s(12),w("ngModel",t.draft.overwriteIfExists),s(4),w("ngModel",t.draft.skipOnboarding),s(8),w("ngModel",t.draft.initGit),s(),x(t.draft.initGit?39:-1))},dependencies:[h,E,Qt,Y,U,Ut,q,qt,hn,G,L,Cn,gn,zn,_n,Q,K,S,Ne,Kt,Xt,fe,Be,I,Z,ne,P,ee],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}.switch-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding-bottom:4px}.switch-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:14px}.emit[_ngcontent-%COMP%]{margin-top:8px}"]})};var Je=class o{draft;draftChange=new F;emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-config"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:12,vars:2,consts:[["nzTitle","\u521B\u5EFA\u540E\u9ED8\u8BA4\u884C\u4E3A"],[1,"row"],[1,"label"],[3,"ngModelChange","ngModel"],[1,"row","col"],["nz-input","","placeholder","\u4F8B\u5982\uFF1Adev / start",3,"ngModelChange","ngModel"],[1,"hint"]],template:function(e,t){e&1&&(r(0,"nz-card",0)(1,"div",1)(2,"div",2),l(3,"\u7F6E\u9876\u6536\u85CF"),a(),r(4,"nz-switch",3),T("ngModelChange",function(p){return k(t.draft.pinFavorite,p)||(t.draft.pinFavorite=p),p}),m("ngModelChange",function(){return t.emit()}),a()(),c(5,"div",4),r(6,"div",4)(7,"div",2),l(8,"\u9ED8\u8BA4\u4EFB\u52A1\uFF08\u53EF\u9009\uFF09"),a(),r(9,"input",5),T("ngModelChange",function(p){return k(t.draft.defaultTaskName,p)||(t.draft.defaultTaskName=p),p}),m("ngModelChange",function(){return t.emit()}),a(),r(10,"div",6),l(11,"\u5EFA\u8BAE\u586B\u8BC6\u522B\u5230\u7684 dev \u6216 start"),a()()()),e&2&&(s(4),w("ngModel",t.draft.pinFavorite),s(5),w("ngModel",t.draft.defaultTaskName))},dependencies:[h,E,Y,U,q,I,Z,de,fe,Be,Q,K],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.row.col[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:8px}.label[_ngcontent-%COMP%]{font-weight:500}.hint[_ngcontent-%COMP%]{font-size:12px;opacity:.7}"]})};var He=class o{draft;draftChange=new F;emit(){this.draftChange.emit(J({},this.draft))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-features"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange"},decls:1,vars:0,consts:[["nzTitle","\u529F\u80FD\u5F00\u5173\uFF08Project Scope\uFF09"]],template:function(e,t){e&1&&c(0,"nz-card",0)},dependencies:[h,E,I,Z,fe],styles:[".row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 0}.label[_ngcontent-%COMP%]{font-weight:500}"]})};var Ze=class o{nzModalData=C(Se);isModalVisible=!1;isSaving=!1;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-git-import-modal-component"]],decls:8,vars:1,consts:[[1,"modal-body"],[1,"label"],["nz-input","","placeholder","\u8BF7\u8F93\u5165Git\u4ED3\u5E93\u5730\u5740","autofocus","",3,"ngModelChange","ngModel"],["nzInputPrefix","","nzType","github","nzTheme","outline"],[1,"hint"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"label",1),l(2,"URL"),a(),r(3,"nz-input-wrapper")(4,"input",2),T("ngModelChange",function(p){return k(t.nzModalData.cloneUrl,p)||(t.nzModalData.cloneUrl=p),p}),a(),c(5,"nz-icon",3),a(),r(6,"div",4),l(7," Git \u4ED3\u5E93\u5730\u5740, \u5982 'username/repo'. \u53EF\u4EE5\u4F7F\u7528\u524D\u7F00\u5982 'gitlab:' \u6216 'bitbucket:'. "),a()()),e&2&&(s(4),w("ngModel",t.nzModalData.cloneUrl))},dependencies:[h,E,Y,U,q,P,v,ee,Q,K,ce,je,Ne,S,j],styles:[".hint[_ngcontent-%COMP%]{margin-top:6px;font-size:12px;opacity:.7}"]})};function Gn(o,n){if(o&1){let e=z();r(0,"button",10),m("click",function(){u(e);let i=d();return f(i.requestDetect.emit())}),c(1,"nz-icon",11),a()}}var $e=class o{draft;draftChange=new F;requestDetect=new F;modal=C(le);emit(){this.draftChange.emit(J({},this.draft))}presetChange(n){if(this.draft.preset=n,n==="git"){this.openImportGitModal();return}else this.draft.repoUrl=void 0,this.emit()}openImportGitModal(){let n=this.modal.create({nzTitle:"\u4ECE Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE",nzMaskClosable:!1,nzContent:Ze,nzCentered:!0,nzWidth:"580px",nzClosable:!1,nzData:{cloneUrl:"",isSaving:!1},nzFooter:[{label:"\u53D6\u6D88",type:"default",onClick:()=>{n.close(),this.draft.repoUrl=void 0,this.draft.preset="angular",this.emit()}},{label:"\u5BFC\u5165",type:"primary",onClick:e=>{let t=e.nzModalData.cloneUrl,i=e.nzModalData.isSaving;!t||!t.trim()||i||(e.nzModalData.isSaving=!0,this.draft.repoUrl=t.trim(),e.nzModalData.isSaving=!1,this.emit(),n.close())},disabled:e=>{let t=e?.nzModalData.cloneUrl;return!t||!t.trim()},loading:e=>e?.nzModalData.isSaving===!0}]})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-step-preset"]],inputs:{draft:"draft"},outputs:{draftChange:"draftChange",requestDetect:"requestDetect"},decls:19,vars:2,consts:[["reloadExtraTpl",""],["nzTitle","\u9009\u62E9\u4E00\u5957\u9884\u8BBE",3,"nzExtra"],["nzSize","large",3,"ngModelChange","ngModel"],["nz-radio","","nzValue","angular"],["for","angular"],[1,"hint"],["nz-radio","","nzValue","vue3"],["for","vue3"],["nz-radio","","nzValue","git"],["for","git"],["nz-button","","nzType","text","nzSize","small",3,"click"],["nzType","reload","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"nz-card",1),O(1,Gn,2,0,"ng-template",null,0,W),r(3,"nz-radio-group",2),T("ngModelChange",function(_){return u(i),k(t.draft.preset,_)||(t.draft.preset=_),f(_)}),m("ngModelChange",function(_){return u(i),f(t.presetChange(_))}),r(4,"div",3)(5,"label",4),l(6,"Angular"),a(),r(7,"div",5),l(8," \u9002\u7528\u4E8E\u4F7F\u7528 Angular \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Angular CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),a()(),r(9,"div",6)(10,"label",7),l(11,"Vue 3"),a(),r(12,"div",5),l(13," \u9002\u7528\u4E8E\u4F7F\u7528 Vue 3 \u6846\u67B6\u5F00\u53D1\u7684\u9879\u76EE\uFF0C\u652F\u6301 Vite \u548C Vue CLI \u76F8\u5173\u4EFB\u52A1\u548C\u914D\u7F6E\u3002 "),a()(),r(14,"div",8)(15,"label",9),l(16,"Git\u5BFC\u5165"),a(),r(17,"div",5),l(18," \u4ECE\u73B0\u6709\u7684 Git \u4ED3\u5E93\u5BFC\u5165\u9879\u76EE\uFF0C\u81EA\u52A8\u8BC6\u522B\u9879\u76EE\u7ED3\u6784\u548C\u914D\u7F6E\u3002 "),a()()()()}if(e&2){let i=V(2);g("nzExtra",i),s(3),w("ngModel",t.draft.preset)}},dependencies:[h,E,U,q,I,Z,nn,S,D,j,ue,P,v,de,Oe,Fe],styles:[".kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.k[_ngcontent-%COMP%]{opacity:.7;display:inline-block;width:120px}.opt[_ngcontent-%COMP%]{margin-top:10px}nz-radio-group[_ngcontent-%COMP%]{width:100%}[nz-radio][_ngcontent-%COMP%]{display:block;padding:12px;border-radius:8px;width:100%;margin:0}[nz-radio][_ngcontent-%COMP%]:hover{background-color:var(--app-primary-3)}.hint[_ngcontent-%COMP%]{margin-left:24px;font-size:12px;opacity:.75}"]})};function Pn(){return{preset:"angular",name:"",parentDir:"",rootPath:"",packageManager:"auto",overwriteIfExists:!1,skipOnboarding:!0,initGit:!0,initialCommitMessage:"",importScriptsAsTasks:!0,importMakefileTasks:!1,importDockerComposeTasks:!1,generateCommonTasks:!0,pinFavorite:!1,defaultTaskName:"",cliFramework:"angular",cliTool:"@angular/cli",cliArgs:[]}}function Un(o,n){if(o&1){let e=z();r(0,"app-step-basic",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function qn(o,n){if(o&1){let e=z();r(0,"app-step-preset",17),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))})("requestDetect",function(){u(e);let i=d();return f(i.detectNow())}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Qn(o,n){if(o&1){let e=z();r(0,"app-step-features",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Jn(o,n){if(o&1){let e=z();r(0,"app-step-config",16),m("draftChange",function(i){u(e);let p=d();return f(p.setDraft(i))}),a()}if(o&2){let e=d();g("draft",e.draft())}}function Hn(o,n){if(o&1){let e=z();r(0,"button",18),m("click",function(){u(e);let i=d();return f(i.cancel())}),c(1,"nz-icon",19),l(2," \u53D6\u6D88 "),a()}}function Zn(o,n){if(o&1){let e=z();r(0,"button",18),m("click",function(){u(e);let i=d();return f(i.prev())}),c(1,"nz-icon",20),l(2," \u4E0A\u4E00\u6B65 "),a()}}function $n(o,n){if(o&1){let e=z();r(0,"button",21),m("click",function(){u(e);let i=d();return f(i.create())}),c(1,"nz-icon",22),l(2," \u521B\u5EFA\u9879\u76EE "),a()}if(o&2){let e=d();g("disabled",e.creating())}}function Yn(o,n){if(o&1){let e=z();r(0,"button",21),m("click",function(){u(e);let i=d();return f(i.next())}),l(1," \u4E0B\u4E00\u6B65 "),c(2,"nz-icon",23),a()}if(o&2){let e=d();g("disabled",!e.canNext()||!e.canGoNext())}}var Ye=class o{step=B(0);draft=B(Pn());creating=B(!1);output=B("");isDrawerOpen=B(!1);fs=C(Ve);parentDir=this.fs.currentPath();modalRef=C(Ee);api=C(Re);modal=C(le);notify=C(me);taskStream=C($t);projectState=C(oe);router=C(Te);sub=new ft;ngOnInit(){let n=this.draft(),e=this.parentDir;this.draft.set(at(J({},n),{rootPath:"",parentDir:e,name:""}))}detectNow(){let n=this.draft();n.rootPath?.trim()&&this.api.detect(n.rootPath).subscribe(e=>{let t=e.scripts??[],i={framework:e.framework??"unknown",hasPackageJson:!!e.hasPackageJson,scriptsCount:t.length,hasGit:!!e.hasGit,lockFile:e.lockFile??"unknown",recommendedScript:t.includes("dev")?"dev":t.includes("start")?"start":"",hasMakefile:!!e.hasMakefile,hasDockerCompose:!!e.hasDockerCompose},p=t.length>0,_=!!e.hasMakefile,Pe=!!e.hasDockerCompose;this.draft.set(at(J({},n),{detected:i,importScriptsAsTasks:p,importMakefileTasks:_&&n.importMakefileTasks,importDockerComposeTasks:Pe&&n.importDockerComposeTasks,defaultTaskName:i.recommendedScript||n.defaultTaskName}))})}async create(){let n=this.draft();if(!n.rootPath?.trim()||!n.name?.trim()){this.notify.error("\u8BF7\u5148\u5B8C\u5584\u9879\u76EE\u4FE1\u606F");return}if(this.creating())return;let e="\u786E\u8BA4\u521B\u5EFA\u9879\u76EE\uFF1F",t=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${n.rootPath}\uFF0C\u786E\u5B9A\u8981\u521B\u5EFA\u8BE5\u9879\u76EE\u5417\uFF1F`,i="\u786E\u8BA4\u521B\u5EFA",p=!1;n.overwriteIfExists&&(e="\u786E\u8BA4\u8986\u76D6\u5DF2\u5B58\u5728\u7684\u9879\u76EE\uFF1F",t=`\u8BF7\u786E\u8BA4\u76EE\u6807\u8DEF\u5F84 ${n.rootPath}\uFF0C\u521B\u5EFA\u65F6\u4F1A\u8986\u76D6\u539F\u6709\u6570\u636E\uFF0C\u4E14\u4E0D\u53EF\u6062\u590D\uFF0C\u786E\u5B9A\u8981\u7EE7\u7EED\u5417\uFF1F`,i="\u786E\u8BA4\u8986\u76D6",p=!0);let _=this.modal.confirm({nzTitle:e,nzContent:t,nzOkText:i,nzCancelText:"\u53D6\u6D88",nzOkDanger:p,nzCentered:!0,nzOnOk:async()=>{this.doCreate(n),_.close()}})}async doCreate(n){this.creating.set(!0),this.taskStream.ensureConnected();let e=new ve;try{let t=n.preset==="git"?this.api.bootstrapByGit(n):this.api.bootstrapByCli(n),{taskId:i}=await _e(t);this.taskStream.subscribeTask(i,3e3),this.sub.add(this.taskStream.output$(i).subscribe(Ce=>{let xn=Ce.payload.text??"";this.output.set(xn)}));let p=await this.waitForTaskEvent(i,["bootstrapDone","bootstrapFailed","bootstrapNeedPickRoot"],600*1e3,e);if(p.type==="bootstrapDone"){let Ce=p.payload;this.notify.success("\u9879\u76EE\u521B\u5EFA\u5B8C\u6210"),this.projectState.getProjects(Ce.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"]);return}if(p.type==="bootstrapFailed"){let Ce=p.payload;this.notify.error(`\u9879\u76EE\u521B\u5EFA\u5931\u8D25\uFF1A${Ce?.reason??"unknown error"}`);return}let Pe=p.payload?.candidates??[];if(!Pe.length){this.notify.error("\u9879\u76EE\u5BFC\u5165\u5931\u8D25\uFF1A\u672A\u627E\u5230\u53EF\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55");return}let ut=await this.pickWorkspaceRootByModal(Pe);if(!ut){this.modal.info({nzTitle:"\u63D0\u793A",nzContent:"\u60A8\u672A\u9009\u62E9\u4EFB\u4F55\u76EE\u5F55\uFF0C\u9879\u76EE\u5BFC\u5165\u5DF2\u53D6\u6D88\u3002\u53EF\u901A\u8FC7\u201C\u5BFC\u5165\u201D\u529F\u80FD\u91CD\u65B0\u624B\u52A8\u5BFC\u5165\u3002",nzCancelText:null,nzOkText:"\u6211\u77E5\u9053\u4E86",nzOnOk:()=>{this.modalRef.close()}});return}let rt=await _e(this.api.bootstrapPickRoot({taskId:i,pickedRoot:ut}).pipe(pt(60*1e3),lt(e)));if(!rt.ok){this.notify.error(rt.reason??"\u9879\u76EE\u5BFC\u5165\u5931\u8D25");return}this.notify.success("\u9879\u76EE\u5BFC\u5165\u5B8C\u6210"),this.projectState.getProjects(rt.projectId),this.modalRef.close({ok:!0}),this.router.navigate(["/dashboard"])}catch(t){let i=t?.name==="TimeoutError"?"\u521B\u5EFA\u8D85\u65F6\uFF1A\u811A\u624B\u67B6/\u514B\u9686\u53EF\u80FD\u5361\u4F4F\u4E86\uFF0C\u8BF7\u67E5\u770B\u4EFB\u52A1\u65E5\u5FD7":t?.error?.message||t?.message||"\u521B\u5EFA\u5931\u8D25";console.error("\u521B\u5EFA\u9879\u76EE\u5931\u8D25",t),this.notify.error(i)}finally{e.next(),e.complete(),this.creating.set(!1)}}async waitForTaskEvent(n,e,t,i){let p=new Set(e);return await _e(this.taskStream.events$().pipe(st(_=>_?.payload?.taskId===n),st(_=>p.has(_.type)),zt(),pt(t),lt(i)))}setDraft(n){this.draft.set(n)}canNext(){let n=this.step(),e=this.draft();return n===0?!(!e.name?.trim()||!e.parentDir?.trim()||!e.rootPath?.trim()):n===1?!!e.rootPath?.trim():!0}async next(){let n=this.step();if(n===0&&await this.api.checkPathExists(this.draft().rootPath)&&!this.draft().overwriteIfExists){this.notify.error("\u8BE5\u8DEF\u5F84\u4E0D\u53EF\u7528\u6216\u5DF2\u5B58\u5728\u91CD\u590D\u9879\u76EE");return}let e=Math.min(3,n+1);this.step.set(e)}prev(){this.step.set(Math.max(0,this.step()-1))}canGoNext(){let n=this.step();return n===0?!0:n===1?this.isManual():n===2}isManual(){return this.draft().preset==="manual"}canCreateHere(){let n=this.step();return this.isManual()&&n===3||!this.isManual()&&n===1}cancel(){this.modal.confirm({nzTitle:"\u53D6\u6D88\u521B\u5EFA\u9879\u76EE",nzContent:"\u786E\u5B9A\u8981\u53D6\u6D88\u521B\u5EFA\u5417",nzOkDanger:!0,nzOkText:"\u53D6\u6D88\u521B\u5EFA",nzCancelText:"\u4E0D",nzCentered:!0,nzOnOk:()=>{this.modalRef.close()}})}async pickWorkspaceRootByModal(n){let e=this.modal.create({nzTitle:"\u9009\u62E9\u8981\u5BFC\u5165\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55",nzContent:Ge,nzData:{candidates:n,defaultPicked:n[0]},nzFooter:null,nzCentered:!0,nzMaskClosable:!1,nzClosable:!0,nzWidth:720});return(await _e(e.afterClose))?.pickedRoot??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-create-modal"]],decls:21,vars:9,consts:[["nz-row","","nzJustify","start"],["nz-col","","nzSpan","24"],[3,"nzCurrent"],["nzTitle","\u8BE6\u60C5"],["nzTitle","\u9884\u8BBE"],["nzTitle","\u529F\u80FD"],["nzTitle","\u914D\u7F6E"],[1,"content"],["nzTip","\u6B63\u5728\u521B\u5EFA\u9879\u76EE...",3,"nzSpinning"],[1,"main"],[3,"draft"],[1,"actions"],["nz-button",""],["nz-button","","nzType","primary",3,"disabled"],[1,"aside"],[3,"isCreatingChange","draft","isCreating","chunk"],[3,"draftChange","draft"],[3,"draftChange","requestDetect","draft"],["nz-button","",3,"click"],["nzType","close","nzTheme","outline"],["nzType","arrow-left","nzTheme","outline"],["nz-button","","nzType","primary",3,"click","disabled"],["nzType","check","nzTheme","outline"],["nzType","arrow-right","nzTheme","outline"]],template:function(e,t){if(e&1&&(r(0,"div",0)(1,"div",1)(2,"nz-steps",2),c(3,"nz-step",3)(4,"nz-step",4)(5,"nz-step",5)(6,"nz-step",6),a(),r(7,"div",7)(8,"nz-spin",8)(9,"div",9),y(10,Un,1,1,"app-step-basic",10)(11,qn,1,1,"app-step-preset",10)(12,Qn,1,1,"app-step-features",10)(13,Jn,1,1,"app-step-config",10),r(14,"div",11),y(15,Hn,3,0,"button",12),y(16,Zn,3,0,"button",12),y(17,$n,3,1,"button",13)(18,Yn,3,1,"button",13),a()()(),r(19,"div",14)(20,"app-create-summary-aside",15),T("isCreatingChange",function(p){return k(t.creating,p)||(t.creating=p),p}),a()()()()()),e&2){let i;s(2),g("nzCurrent",t.step()),s(6),g("nzSpinning",t.creating()),s(2),x((i=t.step())===0?10:i===1?11:i===2?12:i===3?13:-1),s(5),x(t.step()===0?15:-1),s(),x(t.step()>0?16:-1),s(),x(t.canCreateHere()?17:18),s(3),g("draft",t.draft()),w("isCreating",t.creating),g("chunk",t.output())}},dependencies:[h,E,ee,I,$,G,L,fn,un,dn,S,D,j,H,Q,P,v,rn,on,Qe,$e,He,Je,We],styles:[".content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 360px;gap:16px;margin-top:16px}.main[_ngcontent-%COMP%]{min-height:420px}.actions[_ngcontent-%COMP%]{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}.aside[_ngcontent-%COMP%]{position:sticky;top:16px;height:fit-content}"]})};var Ke=class o{constructor(n){this.modal=n}goCreate(){let n=this.modal.create({nzTitle:"\u521B\u5EFA\u65B0\u9879\u76EE",nzFooter:null,nzMaskClosable:!1,nzClosable:!1,nzContent:Ye,nzWidth:"1020px",nzCentered:!0}),e=n.getContentComponent();n.afterClose.subscribe(t=>{t?.ok})}static \u0275fac=function(e){return new(e||o)(we(le))};static \u0275cmp=M({type:o,selectors:[["app-project-create"]],decls:7,vars:0,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar"],["nz-button","","nzType","primary","nzSize","large",3,"click"],["nzType","plus","nzTheme","outline"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),c(2,"app-fs-explorer"),a(),r(3,"div",2)(4,"button",3),m("click",function(){return t.goCreate()}),c(5,"nz-icon",4),l(6," \u5728\u6B64\u521B\u5EFA\u65B0\u9879\u76EE "),a()()())},dependencies:[h,S,D,j,H,$,G,L,Ae,P,v],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var ge=class o{fs=C(Ve);projectApi=C(Re);projectState=C(oe);active=B(!1);checking=B(!1);result=B(null);canImport=A(()=>this.result()?.ok===!0);warnings=A(()=>this.result()?.warnings??[]);reason=A(()=>this.result()?.reason??"");currentPath=A(()=>this.fs.currentPath()||this.fs.path());_seq=0;notify=C(me);constructor(){Ot(()=>{if(!this.active())return;let n=this.currentPath();n&&this.check(n)})}enter(){this.active.set(!0)}leave(){this.active.set(!1),this.result.set(null)}check(n){let e=++this._seq;this.checking.set(!0),this.result.set(null),this.projectApi.checkImport(n).subscribe({next:t=>{e===this._seq&&this.result.set(t)},error:t=>{e===this._seq&&this.result.set({ok:!1,root:n,reason:t?.message||"check failed"})},complete:()=>{e===this._seq&&this.checking.set(!1)}})}import(n){let e=this.currentPath();if(!e||!this.canImport())return;let t=e.replace(/[\\\/]+$/,"").split(/[\\\/]/).pop()||"New Project";this.projectApi.importByPath({root:e,name:n||t,syncTasks:!0}).subscribe({next:i=>{this.projectState.getProjects(),this.projectState.setCurrentProjectById(i.id),this.check(e),this.notify.success("\u9879\u76EE\u5BFC\u5165\u6210\u529F")}})}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Mt({token:o,factory:o.\u0275fac,providedIn:"root"})};var Xe=class o{importState=C(ge);static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-import"]],decls:7,vars:1,consts:[["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"explorer-container"],[1,"actions-bar","center"],["nz-button","","nzSize","large","nzType","primary",3,"click","disabled"],["nzType","import","nzTheme","outline"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1),c(2,"app-fs-explorer"),a(),r(3,"div",2)(4,"button",3),m("click",function(){return t.importState.import()}),c(5,"nz-icon",4),l(6," \u5BFC\u5165\u8FD9\u4E2A\u6587\u4EF6\u5939 "),a()()()),e&2&&(s(4),g("disabled",t.importState.checking()||!t.importState.canImport()))},dependencies:[h,E,$,G,L,S,D,j,H,P,v,Ae],styles:[".page[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column}.page[_ngcontent-%COMP%] .explorer-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}.page[_ngcontent-%COMP%] .actions-bar[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px;display:flex;justify-content:center;align-items:center}"]})};var Kn=(o,n)=>n.spec.id;function Xn(o,n){if(o&1){let e=z();r(0,"div",8)(1,"div",9),m("click",function(){let i=u(e).$implicit,p=d();return f(p.openTask(i))}),r(2,"div",10),c(3,"nz-icon",11),a(),r(4,"div",12)(5,"div",13)(6,"span"),l(7),a()(),r(8,"div",14)(9,"span"),l(10),a()()()(),r(11,"button",15),m("click",function(i){let p=u(e).$implicit,_=d();return i.stopPropagation(),f(_.toggleTask(p))}),c(12,"nz-icon",16),a()()}if(o&2){let e=n.$implicit,t=d();g("nzTooltipTitle",t.getTaskDescription(e)),s(7),b(e.spec.name),s(3),b(t.getTaskDescription(e)),s(2),g("nzType",t.getTaskActionIcon(e))}}var et=class o{projectId;projectState=C(oe);router=C(Te);state=C(Yt);tasks=A(()=>this.projectId?this.state.rowsViewOf(this.projectId)():[]);async ngOnChanges(){this.projectId&&await this.state.ensureProjectLoaded(this.projectId)}toggleTask(n){n.runtime?.status==="running"?this.state.stopSelected():this.state.startSelected(),this.openTask(n)}async openTask(n){this.state.select(n.spec.id),await this.router.navigate(["/tasks"]),this.projectState.setCurrentProjectById(n.spec.projectId)}getTaskName(n){return n.spec.name||n.spec.id}getTaskDescription(n){let e=n.runtime?.status;return n.runtime?this.computedStatusText(e):n.spec.description||""}getTaskActionIcon(n){let e=n.runtime?.status;return e==="running"||e==="stopping"?"pause-circle":"play-circle"}computedStatusText(n){switch(n){case"running":return"\u8FD0\u884C\u4E2D";case"stopping":return"\u505C\u6B62\u4E2D";case"success":return"\u6210\u529F";case"failed":return"\u9519\u8BEF";case"stopped":return"\u5DF2\u505C\u6B62";default:return"\u7A7A\u95F2"}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-item-popover"]],inputs:{projectId:"projectId"},features:[xe],decls:11,vars:0,consts:[[1,"dropdown-content"],[1,"pane-toolbar"],[1,"icon"],["nzType","inbox","nzTheme","outline"],[1,"title"],["nz-button","","type","button","nzType","text"],["nzType","close","nzTheme","outline"],[1,"tasks"],["nz-tooltip","","nzTooltipPlacement","right",1,"task-item",3,"nzTooltipTitle"],[1,"item-content",3,"click"],[1,"item-logo"],["nzType","code","nzTheme","outline"],[1,"list-item-info"],[1,"name"],[1,"description"],["nz-button","","nzType","text","type","button",3,"click"],["nzTheme","outline",3,"nzType"]],template:function(e,t){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),c(3,"nz-icon",3),a(),r(4,"div",4),l(5,"\u4EFB\u52A1"),a(),r(6,"button",5),c(7,"nz-icon",6),a()(),r(8,"div",7),ae(9,Xn,13,4,"div",8,Kn),a()()),e&2&&(s(9),pe(t.tasks()))},dependencies:[h,P,v,S,D,j,ne,te,ze],styles:[".dropdown-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:6px 6px 6px 16px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{font-size:18px;margin-right:6px}.dropdown-content[_ngcontent-%COMP%] .pane-toolbar[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%]{width:320px;max-height:360px;overflow:hidden auto}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]{padding:16px;display:flex;flex-direction:row;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%]:hover{background:#f5f5f5}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex:100% 1 1;width:0;gap:16px;cursor:pointer}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .item-logo[_ngcontent-%COMP%]{font-size:42px;margin-right:16px;flex:auto 0 0;display:inline-flex;align-items:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{flex:100% 1 1;width:0;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:center}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:auto 0 0}.dropdown-content[_ngcontent-%COMP%] .tasks[_ngcontent-%COMP%] .task-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:24px}"]})};function eo(o,n){if(o&1){let e=z();r(0,"button",20),m("click",function(){u(e);let i=d();return f(i.openPageUrl(i.project==null?null:i.project.repoPageUrl))}),c(1,"nz-icon",21),a()}}function to(o,n){if(o&1&&c(0,"app-project-item-popover",22),o&2){let e=d();g("projectId",e.project==null?null:e.project.id)}}var tt=class o{taskRuntime=C(Zt);notify=C(me);project=null;open=!1;selectProject=new F;toggleFavorite=new F;editProject=new F;openInEditor=new F;deleteProject=new F;tasksRunningCount=A(()=>{let n=this.project?.id?.trim();return n?this.taskRuntime.runningCountSignal(n)():0});hasTasksRunning=A(()=>this.tasksRunningCount()>0);taskBadgeTip=A(()=>{let n=this.tasksRunningCount();return n>0?`${n} \u4E2A\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C`:"\u4EFB\u52A1"});del(){if(this.hasTasksRunning()){this.notify.warn("\u5F53\u524D\u9879\u76EE\u6709\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u8BF7\u5148\u505C\u6B62\u8FD9\u4E9B\u4EFB\u52A1\u540E\u518D\u5220\u9664\u9879\u76EE\u3002");return}this.deleteProject.emit()}openPageUrl(n){n&&window.open(n,"_blank")}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-item"]],inputs:{project:"project",open:"open"},outputs:{selectProject:"selectProject",toggleFavorite:"toggleFavorite",editProject:"editProject",openInEditor:"openInEditor",deleteProject:"deleteProject"},decls:28,vars:10,consts:[["contentTemplate",""],["nz-row","",1,"project-item"],["nz-col","","nzSpan","24",1,"content"],[1,"favorite"],["nz-button","","nzType","primary",3,"click"],["nzType","star",3,"nzTheme"],[1,"info",3,"click"],[1,"list-item-info"],[1,"name"],["nz-popover","","nzPopoverTrigger","click","nzPopoverPlacement","right",1,"task-popover-trigger",3,"click","nzPopoverContent","nzPopoverOverlayClassName"],[3,"nzStatus","nz-tooltip"],[1,"root-path"],[1,"actions"],["nzSize","large"],["nzType","code","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u7F16\u8F91",3,"click"],["nzType","edit","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740"],["nz-button","","nzType","primary","nz-tooltip","\u5220\u9664",3,"click"],["nzType","delete","nzTheme","outline"],["nz-button","","nzType","primary","nz-tooltip","\u6253\u5F00\u4ED3\u5E93\u5730\u5740",3,"click"],["nzType","global","nzTheme","outline"],[3,"projectId"]],template:function(e,t){if(e&1){let i=z();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),m("click",function(_){return u(i),_.stopPropagation(),f(t.toggleFavorite.emit())}),c(4,"nz-icon",5),a()(),r(5,"div",6),m("click",function(){return u(i),f(t.selectProject.emit())}),r(6,"div",7)(7,"div",8)(8,"span"),l(9),a(),r(10,"span",9),m("click",function(_){return u(i),f(_.stopPropagation())}),c(11,"nz-badge",10),a()(),r(12,"div",11)(13,"span"),l(14),a()()()(),r(15,"div",12)(16,"nz-space",13)(17,"button",4),m("click",function(){return u(i),f(t.openInEditor.emit())}),c(18,"nz-icon",14),r(19,"span"),l(20,"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00"),a()(),r(21,"button",15),m("click",function(){return u(i),f(t.editProject.emit())}),c(22,"nz-icon",16),a(),y(23,eo,2,0,"button",17),r(24,"button",18),m("click",function(){return u(i),f(t.del())}),c(25,"nz-icon",19),a()()()()(),O(26,to,1,1,"ng-template",null,0,W)}if(e&2){let i=V(27);St("open",t.open),s(4),g("nzTheme",t.project!=null&&t.project.isFavorite?"fill":"outline"),s(5),b(t.project==null?null:t.project.name),s(),g("nzPopoverContent",i)("nzPopoverOverlayClassName","project-item-popover"),s(),g("nzStatus",t.hasTasksRunning()?"processing":"default")("nz-tooltip",t.taskBadgeTip()),s(3),b(t.project==null?null:t.project.root),s(9),x(t.project!=null&&t.project.repoPageUrl?23:-1)}},dependencies:[h,E,$,G,L,S,D,j,H,P,v,Ht,Jt,tn,en,Rt,At,et,te],styles:['.project-item[_ngcontent-%COMP%]{border-radius:4px;padding:0;margin:8px 0;transition:all .3s;cursor:pointer}.project-item.open[_ngcontent-%COMP%], .project-item[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001a;background:var(--app-primary-3)}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px;display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto;grid-template-areas:"icon info actions";grid-gap:16px;align-items:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .favorite[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{grid-area:info;-webkit-user-select:none;user-select:none}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:auto 0 0}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%]{display:inline-block;margin-left:8px;cursor:pointer}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .task-popover-trigger[_ngcontent-%COMP%] nz-badge[_ngcontent-%COMP%]{font-size:18px}.project-item[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .list-item-info[_ngcontent-%COMP%] .root-path[_ngcontent-%COMP%]{flex:auto 0 0;opacity:.7;font-size:14px}']})};var vn=o=>({$implicit:o}),no=(o,n)=>n.id;function oo(o,n){o&1&&ct(0)}function io(o,n){if(o&1&&(r(0,"div",6)(1,"h2"),l(2,"\u6536\u85CF\u7684\u9879\u76EE"),a()(),O(3,oo,1,0,"ng-container",7)),o&2){let e=d(),t=V(11);s(3),g("ngTemplateOutlet",t)("ngTemplateOutletContext",mt(2,vn,e.projectState.favoriteProjects()))}}function ro(o,n){o&1&&(r(0,"div",6)(1,"h2"),l(2,"\u66F4\u591A\u9879\u76EE"),a()())}function ao(o,n){o&1&&ct(0)}function po(o,n){o&1&&(r(0,"div",8),c(1,"nz-empty",9),a())}function so(o,n){if(o&1){let e=z();r(0,"app-project-item",12),m("selectProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.selectProject(i))})("toggleFavorite",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.toggleFavorite(i.id))})("openInEditor",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.openInEditor(i.id))})("editProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.openEditModal(i))})("deleteProject",function(){let i=u(e).$implicit,p=d(2);return f(p.projectState.deleteProject(i.id))}),a()}if(o&2){let e=n.$implicit,t=d(2);g("project",e)("open",t.projectState.isOpen(e))}}function lo(o,n){if(o&1&&(r(0,"div",10),ae(1,so,1,2,"app-project-item",11,no),a()),o&2){let e=n.$implicit;s(),pe(e)}}var nt=class o{projectState=C(oe);static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-project-list"]],decls:12,vars:8,consts:[["itemsTpl",""],["nz-row","",1,"page"],["nz-col","","nzSpan","16","nzOffset","4",1,"col"],["nz-col","",1,"topbar"],["nzInputPrefix","","nzType","search",1,"search-icon"],["nz-input","","placeholder","\u641C\u7D22\u9879\u76EE",3,"ngModelChange","ngModel"],[1,"header"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"no-projects"],["nzNotFoundImage","simple","nzNotFoundContent","\u6682\u65E0\u9879\u76EE\uFF0C\u5FEB\u53BB\u521B\u5EFA\u6216\u5BFC\u5165\u7B2C\u4E00\u4E2A\u9879\u76EE\u5427\uFF01"],[1,"content"],[3,"project","open"],[3,"selectProject","toggleFavorite","openInEditor","editProject","deleteProject","project","open"]],template:function(e,t){if(e&1){let i=z();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"nz-input-wrapper"),c(4,"nz-icon",4),r(5,"input",5),m("ngModelChange",function(_){return u(i),f(t.projectState.keyword.set(_))}),a()()(),y(6,io,4,4),y(7,ro,3,0,"div",6),O(8,ao,1,0,"ng-container",7),y(9,po,2,0,"div",8),a(),O(10,lo,3,0,"ng-template",null,0,W),a()}if(e&2){let i=V(11);s(5),g("ngModel",t.projectState.keyword()),s(),x(t.projectState.favoriteProjects().length>0?6:-1),s(),x(t.projectState.favoriteProjects().length>0?7:-1),s(),g("ngTemplateOutlet",i)("ngTemplateOutletContext",mt(6,vn,t.projectState.moreProjects())),s(),x(t.projectState.projects().length===0?9:-1)}},dependencies:[h,Bt,E,Y,U,q,I,$,G,L,tt,De,be,Q,K,ce,je,P,v],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow:hidden}.page[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;margin-bottom:12px}.page[_ngcontent-%COMP%] .topbar[_ngcontent-%COMP%] nz-input-wrapper[_ngcontent-%COMP%]{width:25%;min-width:200px}.page[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header[_ngcontent-%COMP%]{padding:12px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-weight:600}"]})};function co(o,n){o&1&&(c(0,"nz-icon",8),l(1," \u9879\u76EE "))}function mo(o,n){o&1&&c(0,"app-project-list")}function uo(o,n){o&1&&(c(0,"nz-icon",9),l(1," \u521B\u5EFA "))}function fo(o,n){o&1&&c(0,"app-project-create")}function go(o,n){o&1&&(c(0,"nz-icon",10),l(1," \u5BFC\u5165 "))}function Co(o,n){o&1&&c(0,"app-project-import")}var ot=class o{importState=C(ge);selectedIndex=0;tabIndexChange(n){n===2?this.importState.active.set(!0):this.importState.active.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=M({type:o,selectors:[["app-projects"]],decls:17,vars:4,consts:[["projectTitleTemplate",""],["addTitleTemplate",""],["importTitleTemplate",""],[1,"page"],[1,"header"],["nzCentered","",1,"tabs-container",3,"nzSelectedIndexChange","nzSelectedIndex"],[3,"nzTitle"],["nz-tab",""],["nzType","unordered-list","nzTheme","outline"],["nzType","plus-square","nzTheme","outline"],["nzType","import","nzTheme","outline"]],template:function(e,t){if(e&1){let i=z();r(0,"div",3)(1,"div",4)(2,"h2"),l(3,"\u9879\u76EE\u7BA1\u7406"),a()(),r(4,"nz-tabs",5),T("nzSelectedIndexChange",function(_){return u(i),k(t.selectedIndex,_)||(t.selectedIndex=_),f(_)}),m("nzSelectedIndexChange",function(_){return u(i),f(t.tabIndexChange(_))}),r(5,"nz-tab",6),O(6,co,2,0,"ng-template",null,0,W)(8,mo,1,0,"ng-template",7),a(),r(9,"nz-tab",6),O(10,uo,2,0,"ng-template",null,1,W)(12,fo,1,0,"ng-template",7),a(),r(13,"nz-tab",6),O(14,go,2,0,"ng-template",null,2,W)(16,Co,1,0,"ng-template",7),a()()()}if(e&2){let i=V(7),p=V(11),_=V(15);s(4),w("nzSelectedIndex",t.selectedIndex),s(),g("nzTitle",i),s(4),g("nzTitle",p),s(4),g("nzTitle",_)}},dependencies:[h,cn,ln,sn,pn,P,v,nt,Ke,Xe],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:0 0 auto;padding:16px 0}.header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}nz-tabs.tabs-container[_ngcontent-%COMP%]{flex:1 1 auto;height:0}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content{height:100%}nz-tabs.tabs-container[_ngcontent-%COMP%] .ant-tabs-content .ant-tabs-tabpane{height:100%}.toolbar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.current[_ngcontent-%COMP%]{margin:10px 0;opacity:.75}"]})};var _o=[{path:"",component:ot}],it=class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=ke({type:o});static \u0275inj=ye({imports:[ze.forChild(_o),ze]})};var yn=class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=ke({type:o});static \u0275inj=ye({imports:[h,it]})};export{yn as ProjectsModule};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-KVFR7GFV.js";import{a as A}from"./chunk-5T5KA5PG.js";import{a as E,f as L}from"./chunk-UXXWRMM6.js";import{v as S}from"./chunk-T3KK7ZXB.js";import{O as R,e as U,na as a,sa as I,v as s}from"./chunk-WI67LAOV.js";var F={TASK_NOT_FOUND:{level:"silent"},TASK_ALREADY_RUNNING:{level:"toast",message:"\u4EFB\u52A1\u5DF2\u5728\u8FD0\u884C\u4E2D"},PROCESS_SPAWN_FAILED:{level:"toast",message:"\u4EFB\u52A1\u542F\u52A8\u5931\u8D25"},TASK_SPEC_NOT_FOUND:{level:"toast",message:"\u4EFB\u52A1\u89C4\u683C\u672A\u627E\u5230"},TASK_NOT_RUNNABLE:{level:"toast",message:"\u4EFB\u52A1\u4E0D\u53EF\u8FD0\u884C"},RUN_NOT_FOUND:{level:"toast",message:"\u8FD0\u884C\u5B9E\u4F8B\u672A\u627E\u5230"},TASK_ID_REQUIRED:{level:"toast",message:"\u4EFB\u52A1 ID \u4E3A\u5FC5\u586B\u9879"},COMMAND_NOT_FOUND:{level:"toast",message:"\u547D\u4EE4\u672A\u627E\u5230\uFF0C\u8BF7\u786E\u4FDD\u5DF2\u6B63\u786E\u5B89\u88C5\u6240\u9700\u8F6F\u4EF6"},PROJECT_NOT_FOUND:{level:"toast",message:"\u9879\u76EE\u4E0D\u5B58\u5728"},PROJECT_ROOT_INVALID:{level:"toast",message:"\u9879\u76EE\u6839\u76EE\u5F55\u65E0\u6548"},PROJECT_ALREADY_EXISTS:{level:"toast",message:"\u9879\u76EE\u5DF2\u5B58\u5728"},INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u9879\u76EE\u540D\u79F0"},TARGET_EXISTS:{level:"toast",message:"\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728"},INVALID_REPO_URL:{level:"toast",message:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740"},GIT_CHECKOUT_FAILED:{level:"toast",message:"Git \u68C0\u51FA\u5931\u8D25"},BOOTSTRAP_NOT_IN_PICK_STATE:{level:"toast",message:"\u5F53\u524D\u4E0D\u5904\u4E8E\u9009\u62E9\u6839\u76EE\u5F55\u72B6\u6001"},BOOTSTRAP_CTX_NOT_FOUND:{level:"toast",message:"\u5F15\u5BFC\u4E0A\u4E0B\u6587\u672A\u627E\u5230"},BOOTSTRAP_INVALID_PICKED_ROOT:{level:"toast",message:"\u9009\u62E9\u7684\u6839\u76EE\u5F55\u65E0\u6548"},BOOTSTRAP_NOT_WAITING_PICK:{level:"toast",message:"\u5F15\u5BFC\u672A\u5904\u4E8E\u7B49\u5F85\u9009\u62E9\u72B6\u6001"},PROJECT_ANGULAR_JSON_INVALID:{level:"toast",message:"angular.json \u65E0\u6548"},PROJECT_ANGULAR_JSON_NOT_FOUND:{level:"toast",message:"angular.json \u672A\u627E\u5230"},PROJECT_VITE_CONFIG_INVALID:{level:"toast",message:"vite \u914D\u7F6E\u65E0\u6548"},PROJECT_VUE_CONFIG_NOT_FOUND:{level:"toast",message:"vite \u914D\u7F6E\u672A\u627E\u5230"},CONFIG_BACKUP_NOT_FOUND:{level:"toast",message:"\u914D\u7F6E\u5907\u4EFD\u672A\u627E\u5230"},CONFIG_READ_FAILED:{level:"toast",message:"\u914D\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u6587\u4EF6\u53EF\u80FD\u5DF2\u635F\u574F"},CONFIG_CONFLICT:{level:"toast",message:"\u914D\u7F6E\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},FS_ALREADY_EXISTS:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u5DF2\u5B58\u5728"},FS_PATH_NOT_FOUND:{level:"toast",message:"\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u672A\u627E\u5230"},FS_PERMISSION_DENIED:{level:"toast",message:"\u6587\u4EF6\u7CFB\u7EDF\u6743\u9650\u88AB\u62D2\u7EDD"},FS_EXISTS_FAILED:{level:"toast",message:"\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u5B58\u5728\u65F6\u51FA\u9519"},FS_INVALID_NAME:{level:"toast",message:"\u65E0\u6548\u7684\u6587\u4EF6\u6216\u6587\u4EF6\u5939\u540D\u79F0"},FS_MKDIR_FAILED:{level:"toast",message:"\u521B\u5EFA\u6587\u4EF6\u5939\u5931\u8D25"},INTERNAL_ERROR:{level:"toast",message:"\u7CFB\u7EDF\u5F02\u5E38\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},CONNECTION_LOST:{level:"banner",message:"\u4E0E\u672C\u5730\u670D\u52A1\u7684\u8FDE\u63A5\u5DF2\u65AD\u5F00",action:{retry:!0}},HTTP_ERROR:{level:"toast",message:"\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5"},UNAUTHORIZED:{level:"banner",message:"\u672A\u6388\u6743\u8BBF\u95EE\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55",action:{reload:!0}},UNKNOWN_ERROR:{level:"toast",message:"\u53D1\u751F\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"},WS_ERROR:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5F02\u5E38",action:{retry:!0}},WS_CLOSED:{level:"banner",message:"WebSocket \u8FDE\u63A5\u5DF2\u5173\u95ED",action:{retry:!0}},BAD_JSON:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684 JSON \u6570\u636E"},BAD_MSG:{level:"toast",message:"\u6536\u5230\u65E0\u6548\u7684\u6D88\u606F\u683C\u5F0F"},OP_NOT_SUPPORTED:{level:"toast",message:"\u64CD\u4F5C\u4E0D\u88AB\u652F\u6301"},HANDLER_FAILED:{level:"toast",message:"\u6D88\u606F\u5904\u7406\u5931\u8D25"},TOPIC_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u6D88\u606F\u4E3B\u9898"},OP_NOT_FOUND:{level:"toast",message:"\u672A\u77E5\u7684\u64CD\u4F5C\u7C7B\u578B"},DEP_INSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5B89\u88C5\u5931\u8D25"},DEP_UNINSTALL_FAILED:{level:"toast",message:"\u4F9D\u8D56\u5378\u8F7D\u5931\u8D25"},DEP_NOT_FOUND:{level:"toast",message:"\u4F9D\u8D56\u672A\u627E\u5230"},DASHBOARD_CONFLICT:{level:"toast",message:"\u4EEA\u8868\u76D8\u5DF2\u88AB\u5176\u4ED6\u5730\u65B9\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u91CD\u8BD5"},WIDGET_NOT_FOUND:{level:"toast",message:"\u90E8\u4EF6\u672A\u627E\u5230"},WIDGET_LOCKED:{level:"toast",message:"\u90E8\u4EF6\u88AB\u9501\u5B9A\uFF0C\u65E0\u6CD5\u4FEE\u6539"},RSS_FETCH_FAILED:{level:"toast",message:"RSS \u6E90\u83B7\u53D6\u5931\u8D25"},INVALID_RSS_URL:{level:"toast",message:"\u65E0\u6548\u7684 RSS \u6E90\u5730\u5740"},KILL_PORT_FAILED:{level:"toast",message:"\u7AEF\u53E3\u91CA\u653E\u5931\u8D25"},INVALID_PORT:{level:"toast",message:"\u65E0\u6548\u7684\u7AEF\u53E3\u53F7"},COLLECTION_NOT_EMPTY:{level:"toast",message:"\u96C6\u5408\u4E0D\u4E3A\u7A7A\uFF0C\u65E0\u6CD5\u5220\u9664"},INVALID_JSON:{level:"dev-only"},INVALID_MSG:{level:"dev-only"}};var D=class O{ui=I(L);dispatch(N,e,t){let _=F[N];if(!_){this.ui.error(e??"\u672A\u77E5\u9519\u8BEF");return}let T=typeof _.message=="function"?_.message(t):_.message??e;switch(_.level){case"silent":return;case"toast":this.ui.error(T??"\u64CD\u4F5C\u5931\u8D25");return;case"banner":this.ui.banner?.(T??"\u7CFB\u7EDF\u5F02\u5E38",_.action);return;case"dev-only":A.production||console.warn("[DEV ERROR]",N,t);return}}static \u0275fac=function(e){return new(e||O)};static \u0275prov=a({token:O,factory:O.\u0275fac,providedIn:"root"})};var m=U(l()),w=(O,N)=>{let e=I(D),t=m.uniqueId("req-");return O=O.clone({setHeaders:{"X-Request-Id":t}}),N(O).pipe(R(_=>{if(A.production||console.error(`[HTTP][${t}] Error:`,_),_ instanceof E)return e.dispatch(_.code,_.message,_.details),s(()=>_);if(_ instanceof S){let T=_.error?.error?.code??"HTTP_ERROR";return e.dispatch(T,_.message,_.error),s(()=>_)}return e.dispatch("INTERNAL_ERROR"),s(()=>_)}))};export{w as a};
@@ -0,0 +1 @@
1
+ import{Fa as Z,Ga as q,Ha as H,Ia as J,L,a as G,nb as K,ta as W,ua as M}from"./chunk-SPRWNZHF.js";import{Da as k,Fb as B,Gb as j,Gc as P,Jc as T,Kc as g,Lb as f,Oa as F,Wb as c,Yb as s,bc as p,cc as d,dc as _,ec as N,f as I,ic as x,jc as h,kc as R,lc as w,nb as a,oa as E,r as A,rc as D,s as u,sa as S,sb as V,td as U,uc as o,xd as y,ya as b,za as v}from"./chunk-WI67LAOV.js";function $(n,t){n&1&&R(0)}function nn(n,t){if(n&1&&f(0,$,1,0,"ng-container",7),n&2){let e=o(3);p("nzStringTemplateOutlet",e.nzIcon)}}function en(n,t){if(n&1&&N(0,"nz-icon",6),n&2){let e=o(3);p("nzType",e.nzIconType||e.inferredIconType)("nzTheme",e.iconTheme)}}function tn(n,t){if(n&1&&(d(0,"div",2),c(1,nn,1,1,"ng-container")(2,en,1,2,"nz-icon",6),_()),n&2){let e=o(2);a(),s(e.nzIcon?1:2)}}function on(n,t){if(n&1&&(x(0),T(1),h()),n&2){let e=o(4);a(),g(e.nzMessage)}}function an(n,t){if(n&1&&(d(0,"span",8),f(1,on,2,1,"ng-container",7),_()),n&2){let e=o(3);a(),p("nzStringTemplateOutlet",e.nzMessage)}}function ln(n,t){if(n&1&&(x(0),T(1),h()),n&2){let e=o(4);a(),g(e.nzDescription)}}function rn(n,t){if(n&1&&(d(0,"span",9),f(1,ln,2,1,"ng-container",7),_()),n&2){let e=o(3);a(),p("nzStringTemplateOutlet",e.nzDescription)}}function cn(n,t){if(n&1&&(d(0,"div",3),c(1,an,2,1,"span",8),c(2,rn,2,1,"span",9),_()),n&2){let e=o(2);a(),s(e.nzMessage?1:-1),a(),s(e.nzDescription?2:-1)}}function sn(n,t){if(n&1&&(x(0),T(1),h()),n&2){let e=o(3);a(),g(e.nzAction)}}function dn(n,t){if(n&1&&(d(0,"div",4),f(1,sn,2,1,"ng-container",7),_()),n&2){let e=o(2);a(),p("nzStringTemplateOutlet",e.nzAction)}}function _n(n,t){if(n&1&&(x(0),d(1,"span",12),T(2),_(),h()),n&2){let e=o(4);a(2),g(e.nzCloseText)}}function pn(n,t){if(n&1&&f(0,_n,3,1,"ng-container",7),n&2){let e=o(3);p("nzStringTemplateOutlet",e.nzCloseText)}}function zn(n,t){n&1&&N(0,"nz-icon",11)}function mn(n,t){if(n&1){let e=w();d(0,"button",10),D("click",function(){b(e);let C=o(2);return v(C.closeAlert())}),c(1,pn,1,1,"ng-container")(2,zn,1,0,"nz-icon",11),_()}if(n&2){let e=o(2);a(),s(e.nzCloseText?1:2)}}function Cn(n,t){if(n&1){let e=w();d(0,"div",1),D("@slideAlertMotion.done",function(){b(e);let C=o();return v(C.onFadeAnimationDone())}),c(1,tn,3,1,"div",2),c(2,cn,3,2,"div",3),c(3,dn,2,1,"div",4),c(4,mn,3,1,"button",5),_()}if(n&2){let e=o();P("ant-alert-rtl",e.dir==="rtl")("ant-alert-success",e.nzType==="success")("ant-alert-info",e.nzType==="info")("ant-alert-warning",e.nzType==="warning")("ant-alert-error",e.nzType==="error")("ant-alert-no-icon",!e.nzShowIcon)("ant-alert-banner",e.nzBanner)("ant-alert-closable",e.nzCloseable)("ant-alert-with-description",!!e.nzDescription),p("@.disabled",e.nzNoAnimation)("@slideAlertMotion",void 0),a(),s(e.nzShowIcon?1:-1),a(),s(e.nzMessage||e.nzDescription?2:-1),a(),s(e.nzAction?3:-1),a(),s(e.nzCloseable||e.nzCloseText?4:-1)}}var Q="alert",fn=(()=>{var l;let n,t=[],e=[],m,C=[],O=[];return l=class{cdr=S(U);directionality=S(G);destroyRef=S(k);_nzModuleName=Q;nzAction=null;nzCloseText=null;nzIconType=null;nzMessage=null;nzDescription=null;nzType="info";nzCloseable=u(this,t,!1);nzShowIcon=(u(this,e),u(this,C,!1));nzBanner=(u(this,O),!1);nzNoAnimation=!1;nzIcon=null;nzOnClose=new V;closed=!1;iconTheme="fill";inferredIconType="info-circle";dir="ltr";isTypeSet=!1;isShowIconSet=!1;constructor(){W(Q,()=>this.cdr.markForCheck())}ngOnInit(){this.directionality.change?.pipe(L(this.destroyRef)).subscribe(r=>{this.dir=r,this.cdr.detectChanges()}),this.dir=this.directionality.value}closeAlert(){this.closed=!0}onFadeAnimationDone(){this.closed&&this.nzOnClose.emit(!0)}ngOnChanges(r){let{nzShowIcon:i,nzDescription:z,nzType:X,nzBanner:Y}=r;if(i&&(this.isShowIconSet=!0),X)switch(this.isTypeSet=!0,this.nzType){case"error":this.inferredIconType="close-circle";break;case"success":this.inferredIconType="check-circle";break;case"info":this.inferredIconType="info-circle";break;case"warning":this.inferredIconType="exclamation-circle";break}z&&(this.iconTheme=this.nzDescription?"outline":"fill"),Y&&(this.isTypeSet||(this.nzType="warning"),this.isShowIconSet||(this.nzShowIcon=!0))}},(()=>{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[M()],m=[M()],A(null,null,n,{kind:"field",name:"nzCloseable",static:!1,private:!1,access:{has:i=>"nzCloseable"in i,get:i=>i.nzCloseable,set:(i,z)=>{i.nzCloseable=z}},metadata:r},t,e),A(null,null,m,{kind:"field",name:"nzShowIcon",static:!1,private:!1,access:{has:i=>"nzShowIcon"in i,get:i=>i.nzShowIcon,set:(i,z)=>{i.nzShowIcon=z}},metadata:r},C,O),r&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),I(l,"\u0275fac",function(i){return new(i||l)}),I(l,"\u0275cmp",B({type:l,selectors:[["nz-alert"]],inputs:{nzAction:"nzAction",nzCloseText:"nzCloseText",nzIconType:"nzIconType",nzMessage:"nzMessage",nzDescription:"nzDescription",nzType:"nzType",nzCloseable:[2,"nzCloseable","nzCloseable",y],nzShowIcon:[2,"nzShowIcon","nzShowIcon",y],nzBanner:[2,"nzBanner","nzBanner",y],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",y],nzIcon:"nzIcon"},outputs:{nzOnClose:"nzOnClose"},exportAs:["nzAlert"],features:[F],decls:1,vars:1,consts:[[1,"ant-alert",3,"ant-alert-rtl","ant-alert-success","ant-alert-info","ant-alert-warning","ant-alert-error","ant-alert-no-icon","ant-alert-banner","ant-alert-closable","ant-alert-with-description"],[1,"ant-alert"],[1,"ant-alert-icon"],[1,"ant-alert-content"],[1,"ant-alert-action"],["type","button","tabindex","0",1,"ant-alert-close-icon"],[3,"nzType","nzTheme"],[4,"nzStringTemplateOutlet"],[1,"ant-alert-message"],[1,"ant-alert-description"],["type","button","tabindex","0",1,"ant-alert-close-icon",3,"click"],["nzType","close"],[1,"ant-alert-close-text"]],template:function(i,z){i&1&&c(0,Cn,5,24,"div",0),i&2&&s(z.closed?-1:0)},dependencies:[q,Z,J,H],encapsulation:2,data:{animation:[K]},changeDetection:0})),l})(),kn=(()=>{class n{static \u0275fac=function(m){return new(m||n)};static \u0275mod=j({type:n});static \u0275inj=E({imports:[fn]})}return n})();export{fn as a,kn as b};
@@ -0,0 +1 @@
1
+ import{a as S,b as z,e as vt,f as Fe,k as Y,l as me,m as ne}from"./chunk-HFZLJHYR.js";import{a as fe,c as Et,ka as E,na as Tt}from"./chunk-WI67LAOV.js";function bt(n){return new E(3e3,!1)}function bs(){return new E(3100,!1)}function ws(){return new E(3101,!1)}function As(n){return new E(3001,!1)}function Ps(n){return new E(3003,!1)}function Ns(n){return new E(3004,!1)}function At(n,e){return new E(3005,!1)}function Pt(){return new E(3006,!1)}function Nt(){return new E(3007,!1)}function Mt(n,e){return new E(3008,!1)}function Ct(n){return new E(3002,!1)}function kt(n,e,t,s,i){return new E(3010,!1)}function Dt(){return new E(3011,!1)}function Rt(){return new E(3012,!1)}function Ot(){return new E(3200,!1)}function Lt(){return new E(3202,!1)}function Ft(){return new E(3013,!1)}function It(n){return new E(3014,!1)}function zt(n){return new E(3015,!1)}function Kt(n){return new E(3016,!1)}function qt(n){return new E(3500,!1)}function Bt(n){return new E(3501,!1)}function Qt(n,e){return new E(3404,!1)}function Ms(n){return new E(3502,!1)}function Vt(n){return new E(3503,!1)}function $t(){return new E(3300,!1)}function Ut(n){return new E(3504,!1)}function Gt(n){return new E(3301,!1)}function jt(n,e){return new E(3302,!1)}function Wt(n){return new E(3303,!1)}function Ht(n,e){return new E(3400,!1)}function Yt(n){return new E(3401,!1)}function Xt(n){return new E(3402,!1)}function Jt(n,e){return new E(3505,!1)}var Cs=new Set(["-moz-outline-radius","-moz-outline-radius-bottomleft","-moz-outline-radius-bottomright","-moz-outline-radius-topleft","-moz-outline-radius-topright","-ms-grid-columns","-ms-grid-rows","-webkit-line-clamp","-webkit-text-fill-color","-webkit-text-stroke","-webkit-text-stroke-color","accent-color","all","backdrop-filter","background","background-color","background-position","background-size","block-size","border","border-block-end","border-block-end-color","border-block-end-width","border-block-start","border-block-start-color","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-width","border-color","border-end-end-radius","border-end-start-radius","border-image-outset","border-image-slice","border-image-width","border-inline-end","border-inline-end-color","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-width","border-left","border-left-color","border-left-width","border-radius","border-right","border-right-color","border-right-width","border-start-end-radius","border-start-start-radius","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-width","border-width","bottom","box-shadow","caret-color","clip","clip-path","color","column-count","column-gap","column-rule","column-rule-color","column-rule-width","column-width","columns","filter","flex","flex-basis","flex-grow","flex-shrink","font","font-size","font-size-adjust","font-stretch","font-variation-settings","font-weight","gap","grid-column-gap","grid-gap","grid-row-gap","grid-template-columns","grid-template-rows","height","inline-size","input-security","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","left","letter-spacing","line-clamp","line-height","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","mask","mask-border","mask-position","mask-size","max-block-size","max-height","max-inline-size","max-lines","max-width","min-block-size","min-height","min-inline-size","min-width","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","outline","outline-color","outline-offset","outline-width","padding","padding-block-end","padding-block-start","padding-bottom","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","perspective","perspective-origin","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-coordinate","scroll-snap-destination","scrollbar-color","shape-image-threshold","shape-margin","shape-outside","tab-size","text-decoration","text-decoration-color","text-decoration-thickness","text-emphasis","text-emphasis-color","text-indent","text-shadow","text-underline-offset","top","transform","transform-origin","translate","vertical-align","visibility","width","word-spacing","z-index","zoom"]);function $(n){switch(n.length){case 0:return new Y;case 1:return n[0];default:return new me(n)}}function qe(n,e,t=new Map,s=new Map){let i=[],r=[],a=-1,o=null;if(e.forEach(l=>{let u=l.get("offset"),h=u==a,c=h&&o||new Map;l.forEach((_,y)=>{let f=y,g=_;if(y!=="offset")switch(f=n.normalizePropertyName(f,i),g){case ne:g=t.get(y);break;case z:g=s.get(y);break;default:g=n.normalizeStyleValue(y,f,g,i);break}c.set(f,g)}),h||r.push(c),o=c,a=u}),i.length)throw Ms(i);return r}function pe(n,e,t,s){switch(e){case"start":n.onStart(()=>s(t&&Ie(t,"start",n)));break;case"done":n.onDone(()=>s(t&&Ie(t,"done",n)));break;case"destroy":n.onDestroy(()=>s(t&&Ie(t,"destroy",n)));break}}function Ie(n,e,t){let s=t.totalTime,i=!!t.disabled,r=ge(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),a=n._data;return a!=null&&(r._data=a),r}function ge(n,e,t,s,i="",r=0,a){return{element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!a}}function R(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Be(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return[t,s]}var ks=typeof document>"u"?null:document.documentElement;function ye(n){let e=n.parentNode||n.host||null;return e===ks?null:e}function Ds(n){return n.substring(1,6)=="ebkit"}var X=null,wt=!1;function Zt(n){X||(X=Os()||{},wt=X.style?"WebkitAppearance"in X.style:!1);let e=!0;return X.style&&!Ds(n)&&(e=n in X.style,!e&&wt&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in X.style)),e}function Rs(n){return Cs.has(n)}function Os(){return typeof document<"u"?document.body:null}function Qe(n,e){for(;e;){if(e===n)return!0;e=ye(e)}return!1}function Ve(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var Ls=1e3,$e="{{",Fs="}}",_e="ng-enter",re="ng-leave",ae="ng-trigger",oe=".ng-trigger",Ue="ng-animating",Se=".ng-animating";function V(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:ze(parseFloat(e[1]),e[2])}function ze(n,e){switch(e){case"s":return n*Ls;default:return n}}function le(n,e,t){return n.hasOwnProperty("duration")?n:zs(n,e,t)}var Is=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function zs(n,e,t){let s,i=0,r="";if(typeof n=="string"){let a=n.match(Is);if(a===null)return e.push(bt(n)),{duration:0,delay:0,easing:""};s=ze(parseFloat(a[1]),a[2]);let o=a[3];o!=null&&(i=ze(parseFloat(o),a[4]));let l=a[5];l&&(r=l)}else s=n;if(!t){let a=!1,o=e.length;s<0&&(e.push(bs()),a=!0),i<0&&(e.push(ws()),a=!0),a&&e.splice(o,0,bt(n))}return{duration:s,delay:i,easing:r}}function xt(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function Ge(n){return Array.isArray(n)?new Map(...n):new Map(n)}function K(n,e,t){e.forEach((s,i)=>{let r=Ee(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s})}function G(n,e){e.forEach((t,s)=>{let i=Ee(s);n.style[i]=""})}function ee(n){return Array.isArray(n)?n.length==1?n[0]:vt(n):n}function es(n,e,t){let s=e.params||{},i=je(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(As(r))})}var Ke=new RegExp(`${$e}\\s*(.+?)\\s*${Fs}`,"g");function je(n){let e=[];if(typeof n=="string"){let t;for(;t=Ke.exec(n);)e.push(t[1]);Ke.lastIndex=0}return e}function te(n,e,t){let s=`${n}`,i=s.replace(Ke,(r,a)=>{let o=e[a];return o==null&&(t.push(Ps(a)),o=""),o.toString()});return i==s?n:i}var Ks=/-+([a-z0-9])/g;function Ee(n){return n.replace(Ks,(...e)=>e[1].toUpperCase())}function qs(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ts(n,e){return n===0||e===0}function ss(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,a)=>{s.has(a)||i.push(a),s.set(a,r)}),i.length)for(let r=1;r<e.length;r++){let a=e[r];i.forEach(o=>a.set(o,Te(n,o)))}}return e}function O(n,e,t){switch(e.type){case S.Trigger:return n.visitTrigger(e,t);case S.State:return n.visitState(e,t);case S.Transition:return n.visitTransition(e,t);case S.Sequence:return n.visitSequence(e,t);case S.Group:return n.visitGroup(e,t);case S.Animate:return n.visitAnimate(e,t);case S.Keyframes:return n.visitKeyframes(e,t);case S.Style:return n.visitStyle(e,t);case S.Reference:return n.visitReference(e,t);case S.AnimateChild:return n.visitAnimateChild(e,t);case S.AnimateRef:return n.visitAnimateRef(e,t);case S.Query:return n.visitQuery(e,t);case S.Stagger:return n.visitStagger(e,t);default:throw Ns(e.type)}}function Te(n,e){return window.getComputedStyle(n)[e]}var gs=(()=>{class n{validateStyleProperty(t){return Zt(t)}containsElement(t,s){return Qe(t,s)}getParentElement(t){return ye(t)}query(t,s,i){return Ve(t,s,i)}computeStyle(t,s,i){return i||""}animate(t,s,i,r,a,o=[],l){return new Y(i,r)}static \u0275fac=function(s){return new(s||n)};static \u0275prov=Tt({token:n,factory:n.\u0275fac})}return n})(),is=class{static NOOP=new gs},Ze=class{},xe=class{normalizePropertyName(e,t){return e}normalizeStyleValue(e,t,s,i){return s}},Bs=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),et=class extends Ze{normalizePropertyName(e,t){return Ee(e)}normalizeStyleValue(e,t,s,i){let r="",a=s.toString().trim();if(Bs.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else{let o=s.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&i.push(At(e,s))}return a+r}};var Pe="*";function Qs(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>Vs(s,t,e)):t.push(n),t}function Vs(n,e,t){if(n[0]==":"){let l=$s(n,t);if(typeof l=="function"){e.push(l);return}n=l}let s=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(zt(n)),e;let i=s[1],r=s[2],a=s[3];e.push(ns(i,a));let o=i==Pe&&a==Pe;r[0]=="<"&&!o&&e.push(ns(a,i))}function $s(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s)<parseFloat(t);default:return e.push(Kt(n)),"* => *"}}var ve=new Set(["true","1"]),be=new Set(["false","0"]);function ns(n,e){let t=ve.has(n)||be.has(n),s=ve.has(e)||be.has(e);return(i,r)=>{let a=n==Pe||n==i,o=e==Pe||e==r;return!a&&t&&typeof i=="boolean"&&(a=i?ve.has(n):be.has(n)),!o&&s&&typeof r=="boolean"&&(o=r?ve.has(e):be.has(e)),a&&o}}var ys=":self",Us=new RegExp(`s*${ys}s*,?`,"g");function ft(n,e,t,s){return new tt(n).build(e,t,s)}var rs="",tt=class{_driver;constructor(e){this._driver=e}build(e,t,s){let i=new st(t);return this._resetContextStyleTimingState(i),O(this,ee(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=rs,e.collectedStyles=new Map,e.collectedStyles.set(rs,new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],a=[];return e.name.charAt(0)=="@"&&t.errors.push(Pt()),e.definitions.forEach(o=>{if(this._resetContextStyleTimingState(t),o.type==S.State){let l=o,u=l.name;u.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=u}else if(o.type==S.Transition){let l=this.visitTransition(o,t);s+=l.queryCount,i+=l.depCount,a.push(l)}else t.errors.push(Nt())}),{type:S.Trigger,name:e.name,states:r,transitions:a,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,a=i||{};s.styles.forEach(o=>{o instanceof Map&&o.forEach(l=>{je(l).forEach(u=>{a.hasOwnProperty(u)||r.add(u)})})}),r.size&&t.errors.push(Mt(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=O(this,ee(e.animation),t),i=Qs(e.expr,t.errors);return{type:S.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:J(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(s=>O(this,s,t)),options:J(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(a=>{t.currentTime=s;let o=O(this,a,t);return i=Math.max(i,t.currentTime),o});return t.currentTime=i,{type:S.Group,steps:r,options:J(e.options)}}visitAnimate(e,t){let s=Hs(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:Fe({});if(r.type==S.Keyframes)i=this.visitKeyframes(r,t);else{let a=e.styles,o=!1;if(!a){o=!0;let u={};s.easing&&(u.easing=s.easing),a=Fe(u)}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(a,t);l.isEmptyStep=o,i=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let o of i)typeof o=="string"?o===z?s.push(o):t.errors.push(Ct(o)):s.push(new Map(Object.entries(o)));let r=!1,a=null;return s.forEach(o=>{if(o instanceof Map&&(o.has("easing")&&(a=o.get("easing"),o.delete("easing")),!r)){for(let l of o.values())if(l.toString().indexOf($e)>=0){r=!0;break}}}),{type:S.Style,styles:s,easing:a,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(a=>{typeof a!="string"&&a.forEach((o,l)=>{let u=t.collectedStyles.get(t.currentQuerySelector),h=u.get(l),c=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(kt(l,h.startTime,h.endTime,r,i)),c=!1),r=h.startTime),c&&u.set(l,{startTime:r,endTime:i}),t.options&&es(o,t.options,t.errors)})})}visitKeyframes(e,t){let s={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Dt()),s;let i=1,r=0,a=[],o=!1,l=!1,u=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),C=A.offset!=null?A.offset:Ws(A.styles),N=0;return C!=null&&(r++,N=A.offset=C),l=l||N<0||N>1,o=o||N<u,u=N,a.push(N),A});l&&t.errors.push(Rt()),o&&t.errors.push(Ot());let c=e.steps.length,_=0;r>0&&r<c?t.errors.push(Lt()):r==0&&(_=i/(c-1));let y=c-1,f=t.currentTime,g=t.currentAnimateTimings,v=g.duration;return h.forEach((w,A)=>{let C=_>0?A==y?1:_*A:a[A],N=C*v;t.currentTime=f+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,s.styles.push(w)}),s}visitReference(e,t){return{type:S.Reference,animation:O(this,ee(e.animation),t),options:J(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:J(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:J(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,a]=Gs(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,R(t.collectedStyles,t.currentQuerySelector,new Map);let o=O(this,ee(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:S.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:o,originalSelector:e.selector,options:J(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Ft());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:le(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,ee(e.animation),t),timings:s,options:null}}};function Gs(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ys);return e&&(n=n.replace(Us,"")),n=n.replace(/@\*/g,oe).replace(/@\w+/g,t=>oe+"-"+t.slice(1)).replace(/:animating/g,Se),[n,e]}function js(n){return n?fe({},n):null}var st=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Ws(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Hs(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=le(n,e).duration;return We(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=We(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=le(t,e);return We(i.duration,i.delay,i.easing)}function J(n){return n?(n=fe({},n),n.params&&(n.params=js(n.params))):n={},n}function We(n,e,t){return{duration:n,delay:e,easing:t}}function mt(n,e,t,s,i,r,a=null,o=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:a,subTimeline:o}}var ie=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},Ys=1,Xs=":enter",Js=new RegExp(Xs,"g"),Zs=":leave",xs=new RegExp(Zs,"g");function pt(n,e,t,s,i,r=new Map,a=new Map,o,l,u=[]){return new it().buildKeyframes(n,e,t,s,i,r,a,o,l,u)}var it=class{buildKeyframes(e,t,s,i,r,a,o,l,u,h=[]){u=u||new ie;let c=new nt(e,t,u,i,r,h,[]);c.options=l;let _=l.delay?V(l.delay):0;c.currentTimeline.delayNextStep(_),c.currentTimeline.setStyles([a],null,c.errors,l),O(this,s,c);let y=c.timelines.filter(f=>f.containsAnimation());if(y.length&&o.size){let f;for(let g=y.length-1;g>=0;g--){let v=y[g];if(v.element===t){f=v;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([o],null,c.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[mt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,a=this._visitSubInstructions(s,i,i.options);r!=a&&t.transformIntoNewTimeline(a)}t.previousNode=e}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let a=typeof r=="number"?r:V(te(r,i?.params??{},t.errors));s.delayNextStep(a)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,a=s.duration!=null?V(s.duration):null,o=s.delay!=null?V(s.delay):null;return a!==0&&e.forEach(l=>{let u=t.appendInstructionToTimeline(l,a,o);r=Math.max(r,u.duration+u.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==S.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Ne);let a=V(r.delay);i.delayNextStep(a)}e.steps.length&&(e.steps.forEach(a=>O(this,a,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(a=>{let o=t.createSubContext(e.options);r&&o.delayNextStep(r),O(this,a,o),i=Math.max(i,o.currentTimeline.currentTime),s.push(o.currentTimeline)}),s.forEach(a=>t.currentTimeline.mergeTimelineCollectedStyles(a)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?te(s,t.params,t.errors):s;return le(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,o=t.createSubContext().currentTimeline;o.easing=s.easing,e.styles.forEach(l=>{let u=l.offset||0;o.forwardTime(u*r),o.setStyles(l.styles,l.easing,t.errors,t.options),o.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(o),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?V(i.delay):0;r&&(t.previousNode.type===S.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Ne);let a=s,o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let l=null;o.forEach((u,h)=>{t.currentQueryIndex=h;let c=t.createSubContext(e.options,u);r&&c.delayNextStep(r),u===t.element&&(l=c.currentTimeline),O(this,e.animation,c),c.currentTimeline.applyStylesToKeyframe();let _=c.currentTimeline.currentTime;a=Math.max(a,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(a),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,a=Math.abs(r.duration),o=a*(t.currentQueryTotal-1),l=a*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=o-l;break;case"full":l=s.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let c=h.currentTime;O(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-c+(i.startTime-s.currentTimeline.startTime)}},Ne={},nt=class n{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Ne;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,s,i,r,a,o,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=a,this.timelines=o,this.currentTimeline=l||new Me(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=V(s.duration)),s.delay!=null&&(i.delay=V(s.delay));let r=s.params;if(r){let a=i.params;a||(a=this.options.params={}),Object.keys(r).forEach(o=>{(!t||!a.hasOwnProperty(o))&&(a[o]=te(r[o],a,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i]})}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=Ne,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new rt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,i,r,a){let o=[];if(i&&o.push(this.element),e.length>0){e=e.replace(Js,"."+this._enterClassName),e=e.replace(xs,"."+this._leaveClassName);let l=s!=1,u=this._driver.query(this.element,e,l);s!==0&&(u=s<0?u.slice(u.length+s,u.length):u.slice(0,s)),o.push(...u)}return!r&&o.length==0&&a.push(It(t)),o}},Me=class n{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=Ys,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||z),this._currentKeyframe.set(t,z);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},a=ei(e,this._globalTimelineStyles);for(let[o,l]of a){let u=te(l,r,s);this._pendingStyles.set(o,u),this._localTimelineStyles.has(o)||this._backFill.set(o,this._globalTimelineStyles.get(o)??z),this._updateStyle(o,u)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((o,l)=>{let u=new Map([...this._backFill,...o]);u.forEach((h,c)=>{h===ne?e.add(c):h===z&&t.add(c)}),s||u.set("offset",l/this.duration),i.push(u)});let r=[...e.values()],a=[...t.values()];if(s){let o=i[0],l=new Map(o);o.set("offset",0),l.set("offset",1),i=[o,l]}return mt(this.element,i,r,a,this.duration,this.startTime,this.easing,!1)}},rt=class extends Me{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,s,i,r,a,o=!1){super(e,t,a.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],a=s+t,o=t/a,l=new Map(e[0]);l.set("offset",0),r.push(l);let u=new Map(e[0]);u.set("offset",as(o)),r.push(u);let h=e.length-1;for(let c=1;c<=h;c++){let _=new Map(e[c]),y=_.get("offset"),f=t+y*s;_.set("offset",as(f/a)),r.push(_)}s=a,t=0,i="",e=r}return mt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,!0)}};function as(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function ei(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,z)}else for(let[r,a]of i)t.set(r,a)}),t}function os(n,e,t,s,i,r,a,o,l,u,h,c,_){return{type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:a,timelines:o,queriedElements:l,preStyleProps:u,postStyleProps:h,totalTime:c,errors:_}}var He={},Ce=class{_triggerName;ast;_stateStyles;constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,i){return ti(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,a,o,l,u,h){let c=[],_=this.ast.options&&this.ast.options.params||He,y=o&&o.params||He,f=this.buildStyles(s,y,c),g=l&&l.params||He,v=this.buildStyles(i,g,c),w=new Set,A=new Map,C=new Map,N=i==="void",Z={params:_s(g,_),delay:this.ast.options?.delay},B=h?[]:pt(e,t,this.ast.animation,r,a,f,v,Z,u,c),k=0;return B.forEach(D=>{k=Math.max(D.duration+D.delay,k)}),c.length?os(t,this._triggerName,s,i,N,f,v,[],[],A,C,k,c):(B.forEach(D=>{let j=D.element,x=R(A,j,new Set);D.preStyleProps.forEach(W=>x.add(W));let gt=R(C,j,new Set);D.postStyleProps.forEach(W=>gt.add(W)),j!==t&&w.add(j)}),os(t,this._triggerName,s,i,N,f,v,B,[...w.values()],A,C,k))}};function ti(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function _s(n,e){let t=fe({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i)}),t}var at=class{styles;defaultParams;normalizer;constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){let s=new Map,i=_s(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,o)=>{a&&(a=te(a,i,t));let l=this.normalizer.normalizePropertyName(o,t);a=this.normalizer.normalizeStyleValue(o,l,a,t),s.set(o,a)})}),s}};function si(n,e,t){return new ot(n,e,t)}var ot=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new at(i.style,r,s))}),ls(this.states,"true","1"),ls(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Ce(e,i,this.states))}),this.fallbackTransition=ii(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(a=>a.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function ii(n,e,t){let s=[(a,o)=>!0],i={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new Ce(n,r,e)}function ls(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var ni=new ie,lt=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s}register(e,t){let s=[],i=[],r=ft(this._driver,t,s,i);if(s.length)throw Vt(s);this._animations.set(e,r)}_buildPlayer(e,t,s){let i=e.element,r=qe(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){let i=[],r=this._animations.get(e),a,o=new Map;if(r?(a=pt(this._driver,t,r,_e,re,new Map,new Map,s,ni,i),a.forEach(h=>{let c=R(o,h.element,new Map);h.postStyleProps.forEach(_=>c.set(_,null))})):(i.push($t()),a=[]),i.length)throw Ut(i);o.forEach((h,c)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(c,y,z))})});let l=a.map(h=>{let c=o.get(h.element);return this._buildPlayer(h,new Map,c)}),u=$(l);return this._playersById.set(e,u),u.onDestroy(()=>this.destroy(e)),this.players.push(u),u}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Gt(e);return t}listen(e,t,s,i){let r=ge(t,"","","");return pe(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let a=i[0]||{};this.create(e,t,a);return}let r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},us="ng-animate-queued",ri=".ng-animate-queued",Ye="ng-animate-disabled",ai=".ng-animate-disabled",oi="ng-star-inserted",li=".ng-star-inserted",ui=[],Ss={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ci={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},q="__ng_removed",ce=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=di(i),s){let r=e,{value:a}=r,o=Et(r,["value"]);this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i])})}}},ue="void",Xe=new ce(ue),ut=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this._hostClassName="ng-tns-"+e,I(t,this._hostClassName)}listen(e,t,s,i){if(!this._triggers.has(t))throw jt(s,t);if(s==null||s.length==0)throw Wt(t);if(!fi(s))throw Ht(s,t);let r=R(this._elementListeners,e,[]),a={name:t,phase:s,callback:i};r.push(a);let o=R(this._engine.statesByElement,e,new Map);return o.has(t)||(I(e,ae),I(e,ae+"-"+t),o.set(t,Xe)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(a);l>=0&&r.splice(l,1),this._triggers.has(t)||o.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Yt(e);return t}trigger(e,t,s,i=!0){let r=this._getTrigger(t),a=new he(this.id,t,e),o=this._engine.statesByElement.get(e);o||(I(e,ae),I(e,ae+"-"+t),this._engine.statesByElement.set(e,o=new Map));let l=o.get(t),u=new ce(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&u.absorbOptions(l.options),o.set(t,u),l||(l=Xe),!(u.value===ue)&&l.value===u.value){if(!gi(l.params,u.params)){let g=[],v=r.matchStyles(l.value,l.params,g),w=r.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{G(e,v),K(e,w)})}return}let _=R(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,u.value,e,u.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:u,player:a,isFallbackTransition:f}),f||(I(e,us),a.onStart(()=>{se(e,us)})),a.onDone(()=>{let g=this.players.indexOf(a);g>=0&&this.players.splice(g,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(a);w>=0&&v.splice(w,1)}}),this.players.push(a),_.push(a),a}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,oe,!0);s.forEach(i=>{if(i[q])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(a=>a.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),a=new Map;if(r){let o=[];if(r.forEach((l,u)=>{if(a.set(u,l.value),this._triggers.has(u)){let h=this.trigger(e,u,ue,i);h&&o.push(h)}}),o.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,a),s&&$(o).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let a=r.name;if(i.has(a))return;i.add(a);let l=this._triggers.get(a).fallbackTransition,u=s.get(a)||Xe,h=new ce(ue),c=new he(this.id,a,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:l,fromState:u,toState:h,player:c,isFallbackTransition:!0})})}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let a=e;for(;a=a.parentNode;)if(s.statesByElement.get(a)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,!1,t);else{let r=e[q];(!r||r===Ss)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){I(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,a=this._elementListeners.get(r);a&&a.forEach(o=>{if(o.name==s.triggerName){let l=ge(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,pe(s.player,o.phase,l,o.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(s)}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,a=i.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ct=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){let s=new ut(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let a=!1,o=this.driver.getParentElement(t);for(;o;){let l=i.get(o);if(l){let u=s.indexOf(l);s.splice(u+1,0,e),a=!0;break}o=this.driver.getParentElement(o)}a||s.unshift(e)}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,s,i){if(we(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),!0}return!1}insertNode(e,t,s,i){if(!we(t))return;let r=t[q];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(t);a>=0&&this.collectedLeaveElements.splice(a,1)}if(e){let a=this._fetchNamespace(e);a&&a.insertNode(t,s)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),I(e,Ye)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),se(e,Ye))}removeNode(e,t,s){if(we(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[q]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,i,r){return we(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,oe,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Se,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return $(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[q];if(t&&t.setForRemoval){if(e[q]=Ss,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(Ye)&&this.markElementAsDisabled(e,!1),this.driver.query(e,ai,!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;s<this.collectedEnterElements.length;s++){let i=this.collectedEnterElements[s];I(i,oi)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let s=[];try{t=this._flushAnimations(s,e)}finally{for(let i=0;i<s.length;i++)s[i]()}}else for(let s=0;s<this.collectedLeaveElements.length;s++){let i=this.collectedLeaveElements[s];this.processLeaveNode(i)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(s=>s()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?$(t).onDone(()=>{s.forEach(i=>i())}):s.forEach(i=>i())}}reportError(e){throw Xt(e)}_flushAnimations(e,t){let s=new ie,i=[],r=new Map,a=[],o=new Map,l=new Map,u=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let m=this.driver.query(d,ri,!0);for(let p=0;p<m.length;p++)h.add(m[p])});let c=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=ds(_,this.collectedEnterElements),f=new Map,g=0;y.forEach((d,m)=>{let p=_e+g++;f.set(m,p),d.forEach(T=>I(T,p))});let v=[],w=new Set,A=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let m=this.collectedLeaveElements[d],p=m[q];p&&p.setForRemoval&&(v.push(m),w.add(m),p.hasAnimation?this.driver.query(m,li,!0).forEach(T=>w.add(T)):A.add(m))}let C=new Map,N=ds(_,Array.from(w));N.forEach((d,m)=>{let p=re+g++;C.set(m,p),d.forEach(T=>I(T,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(T=>se(T,p))}),N.forEach((d,m)=>{let p=C.get(m);d.forEach(T=>se(T,p))}),v.forEach(d=>{this.processLeaveNode(d)})});let Z=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let T=p.player,P=p.element;if(Z.push(T),this.collectedEnterElements.length){let M=P[q];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let H=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let de=F.get(p.triggerName);de.value=H,F.set(p.triggerName,de)}}T.destroy();return}}let Q=!c||!this.driver.containsElement(c,P),L=C.get(P),U=f.get(P),b=this._buildInstruction(p,s,U,L,Q);if(b.errors&&b.errors.length){B.push(b);return}if(Q){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}if(p.isFallbackTransition){T.onStart(()=>G(P,b.fromStyles)),T.onDestroy(()=>K(P,b.toStyles)),i.push(T);return}let St=[];b.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||St.push(M)}),b.timelines=St,s.append(P,b.timelines);let vs={instruction:b,player:T,element:P};a.push(vs),b.queriedElements.forEach(M=>R(o,M,[]).push(T)),b.preStyleProps.forEach((M,H)=>{if(M.size){let F=l.get(H);F||l.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))}}),b.postStyleProps.forEach((M,H)=>{let F=u.get(H);F||u.set(H,F=new Set),M.forEach((de,Le)=>F.add(Le))})});if(B.length){let d=[];B.forEach(m=>{d.push(Jt(m.triggerName,m.errors))}),Z.forEach(m=>m.destroy()),this.reportError(d)}let k=new Map,D=new Map;a.forEach(d=>{let m=d.element;s.has(m)&&(D.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,k))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(T=>{R(k,m,[]).push(T),T.destroy()})});let j=v.filter(d=>fs(d,l,u)),x=new Map;hs(x,this.driver,A,u,z).forEach(d=>{fs(d,l,u)&&j.push(d)});let W=new Map;y.forEach((d,m)=>{hs(W,this.driver,new Set(d),l,ne)}),j.forEach(d=>{let m=x.get(d),p=W.get(d);x.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let Oe=[],yt=[],_t={};a.forEach(d=>{let{element:m,player:p,instruction:T}=d;if(s.has(m)){if(h.has(m)){p.onDestroy(()=>K(m,T.toStyles)),p.disabled=!0,p.overrideTotalTime(T.totalTime),i.push(p);return}let P=_t;if(D.size>1){let L=m,U=[];for(;L=L.parentNode;){let b=D.get(L);if(b){P=b;break}U.push(L)}U.forEach(b=>D.set(b,P))}let Q=this._buildAnimation(p.namespaceId,T,k,r,W,x);if(p.setRealPlayer(Q),P===_t)Oe.push(p);else{let L=this.playersByElement.get(P);L&&L.length&&(p.parentPlayer=$(L)),i.push(p)}}else G(m,T.fromStyles),p.onDestroy(()=>K(m,T.toStyles)),yt.push(p),h.has(m)&&i.push(p)}),yt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=$(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<v.length;d++){let m=v[d],p=m[q];if(se(m,re),p&&p.hasAnimation)continue;let T=[];if(o.size){let Q=o.get(m);Q&&Q.length&&T.push(...Q);let L=this.driver.query(m,Se,!0);for(let U=0;U<L.length;U++){let b=o.get(L[U]);b&&b.length&&T.push(...b)}}let P=T.filter(Q=>!Q.destroyed);P.length?mi(this,m,P):this.processLeaveNode(m)}return v.length=0,Oe.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),Oe}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,i,r){let a=[];if(t){let o=this.playersByQueriedElement.get(e);o&&(a=o)}else{let o=this.playersByElement.get(e);if(o){let l=!r||r==ue;o.forEach(u=>{u.queued||!l&&u.triggerName!=i||a.push(u)})}}return(s||i)&&(a=a.filter(o=>!(s&&s!=o.namespaceId||i&&i!=o.triggerName))),a}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,a=t.isRemovalTransition?void 0:e,o=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let u=l.element,h=u!==r,c=R(s,u,[]);this._getPreviousPlayers(u,h,a,o,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),c.push(y)})}G(r,t.fromStyles)}_buildAnimation(e,t,s,i,r,a){let o=t.triggerName,l=t.element,u=[],h=new Set,c=new Set,_=t.timelines.map(f=>{let g=f.element;h.add(g);let v=g[q];if(v&&v.removedBeforeQueried)return new Y(f.duration,f.delay);let w=g!==l,A=pi((s.get(g)||ui).map(k=>k.getRealPlayer())).filter(k=>{let D=k;return D.element?D.element===g:!1}),C=r.get(g),N=a.get(g),Z=qe(this._normalizer,f.keyframes,C,N),B=this._buildPlayer(f,Z,A);if(f.subTimeline&&i&&c.add(g),w){let k=new he(e,o,g);k.setRealPlayer(B),u.push(k)}return B});u.forEach(f=>{R(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>hi(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>I(f,Ue));let y=$(_);return y.onDestroy(()=>{h.forEach(f=>se(f,Ue)),K(l,t.toStyles)}),c.forEach(f=>{R(i,f,[]).push(y)}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new Y(e.duration,e.delay)}},he=class{namespaceId;triggerName;element;_player=new Y;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>pe(e,s,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){R(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function hi(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1)}s.length==0&&n.delete(e)}return s}function di(n){return n??null}function we(n){return n&&n.nodeType===1}function fi(n){return n=="start"||n=="done"}function cs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function hs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(cs(l)));let a=[];s.forEach((l,u)=>{let h=new Map;l.forEach(c=>{let _=e.computeStyle(u,c,i);h.set(c,_),(!_||_.length==0)&&(u[q]=ci,a.push(u))}),n.set(u,h)});let o=0;return t.forEach(l=>cs(l,r[o++])),a}function ds(n,e){let t=new Map;if(n.forEach(o=>t.set(o,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function a(o){if(!o)return s;let l=r.get(o);if(l)return l;let u=o.parentNode;return t.has(u)?l=u:i.has(u)?l=s:l=a(u),r.set(o,l),l}return e.forEach(o=>{let l=a(o);l!==s&&t.get(l).push(o)}),t}function I(n,e){n.classList?.add(e)}function se(n,e){n.classList?.remove(e)}function mi(n,e,t){$(t).onDone(()=>n.processLeaveNode(e))}function pi(n){let e=[];return Es(n,e),e}function Es(n,e){for(let t=0;t<n.length;t++){let s=n[t];s instanceof me?Es(s.players,e):e.push(s)}}function gi(n,e){let t=Object.keys(n),s=Object.keys(e);if(t.length!=s.length)return!1;for(let i=0;i<t.length;i++){let r=t[i];if(!e.hasOwnProperty(r)||n[r]!==e[r])return!1}return!0}function fs(n,e,t){let s=t.get(n);if(!s)return!1;let i=e.get(n);return i?s.forEach(r=>i.add(r)):e.set(n,s),t.delete(n),!0}var ke=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,s){this._driver=t,this._normalizer=s,this._transitionEngine=new ct(e.body,t,s),this._timelineEngine=new lt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,s,i,r){let a=e+"-"+i,o=this._triggerCache[a];if(!o){let l=[],u=[],h=ft(this._driver,r,l,u);if(l.length)throw Qt(i,l);o=si(i,h,this._normalizer),this._triggerCache[a]=o}this._transitionEngine.registerTrigger(t,i,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,a]=Be(s),o=i;this._timelineEngine.command(r,t,a,o)}else this._transitionEngine.trigger(e,t,s,i)}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[a,o]=Be(s);return this._timelineEngine.listen(a,t,o,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function yi(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=Je(e[0]),e.length>1&&(s=Je(e[e.length-1]))):e instanceof Map&&(t=Je(e)),t||s?new _i(n,t,s):null}var _i=(()=>{class n{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,s,i){this._element=t,this._startStyles=s,this._endStyles=i;let r=n.initialStylesByElement.get(t);r||n.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&K(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(K(this._element,this._initialStyles),this._endStyles&&(K(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(G(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(G(this._element,this._endStyles),this._endStyles=null),K(this._element,this._initialStyles),this._state=3)}}return n})();function Je(n){let e=null;return n.forEach((t,s)=>{Si(s)&&(e=e||new Map,e.set(s,t))}),e}function Si(n){return n==="display"||n==="position"}var De=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let s=()=>this._onFinish();return t.addEventListener("finish",s),this.onDestroy(()=>{t.removeEventListener("finish",s)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){let i=this._convertKeyframesToObject(t);try{return e.animate(i,s)}catch{return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:Te(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},ht=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Qe(e,t)}getParentElement(e){return ye(e)}query(e,t,s){return Ve(e,t,s)}computeStyle(e,t,s){return Te(e,t)}animate(e,t,s,i,r,a=[]){let o=i==0?"both":"forwards",l={duration:s,delay:i,fill:o};r&&(l.easing=r);let u=new Map,h=a.filter(y=>y instanceof De);ts(s,i)&&h.forEach(y=>{y.currentSnapshot.forEach((f,g)=>u.set(g,f))});let c=xt(t).map(y=>new Map(y));c=ss(e,c,u);let _=yi(e,c);return new De(e,c,l,_)}};function Mi(n,e){return n==="noop"?new ke(e,new gs,new xe):new ke(e,new ht,new et)}var ms=class{_driver;_animationAst;constructor(e,t){this._driver=e;let s=[],r=ft(e,t,s,[]);if(s.length)throw qt(s);this._animationAst=r}buildTimelines(e,t,s,i,r){let a=Array.isArray(t)?Ge(t):t,o=Array.isArray(s)?Ge(s):s,l=[];r=r||new ie;let u=pt(this._driver,e,this._animationAst,_e,re,a,o,i,r,l);if(l.length)throw Bt(l);return u}},Ae="@",Ts="@.disabled",Re=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,s,i=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,s,i){if(i){this.delegate.removeChild(e,t,s,i);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){t.charAt(0)==Ae&&t==Ts?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s,i){return this.delegate.listen(e,t,s,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},dt=class extends Re{factory;constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){t.charAt(0)==Ae?t.charAt(1)=="."&&t==Ts?(s=s===void 0?!0:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s,i){if(t.charAt(0)==Ae){let r=Ei(e),a=t.slice(1),o="";return a.charAt(0)!=Ae&&([a,o]=Ti(a)),this.engine.listen(this.namespaceId,r,a,o,l=>{let u=l._data||-1;this.factory.scheduleListenerCallback(u,s,l)})}return this.delegate.listen(e,t,s,i)}};function Ei(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function Ti(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return[t,s]}var ps=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,t.onRemovalComplete=(i,r)=>{r?.removeChild(null,i)}}createRenderer(e,t){let i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let u=this._rendererCache,h=u.get(i);if(!h){let c=()=>u.delete(i);h=new Re("",i,this.engine,c),u.set(i,h)}return h}let r=t.id,a=t.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let o=u=>{Array.isArray(u)?u.forEach(o):this.engine.registerTrigger(r,a,e,u.name,u)};return t.data.animation.forEach(o),new dt(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[a,o]=r;a(o)}),this._animationCallbacksBuffer=[]})}),i.push([t,s])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};export{is as AnimationDriver,gs as NoopAnimationDriver,ms as \u0275Animation,ke as \u0275AnimationEngine,dt as \u0275AnimationRenderer,ps as \u0275AnimationRendererFactory,Ze as \u0275AnimationStyleNormalizer,Re as \u0275BaseAnimationRenderer,_e as \u0275ENTER_CLASSNAME,re as \u0275LEAVE_CLASSNAME,xe as \u0275NoopAnimationStyleNormalizer,he as \u0275TransitionAnimationPlayer,ht as \u0275WebAnimationsDriver,De as \u0275WebAnimationsPlayer,et as \u0275WebAnimationsStyleNormalizer,ts as \u0275allowPreviousPlayerStylesMerge,qs as \u0275camelCaseToDashCase,Qe as \u0275containsElement,Mi as \u0275createEngine,ye as \u0275getParentElement,Ve as \u0275invokeQuery,xt as \u0275normalizeKeyframes,Zt as \u0275validateStyleProperty,Rs as \u0275validateWebAnimatableStyleProperty};
@@ -0,0 +1 @@
1
+ import{Bb as C,L as o,_a as O,a as R,ra as P,yb as T}from"./chunk-SPRWNZHF.js";import{Ac as j,Da as l,Fb as c,Gb as w,Gc as a,Oa as F,Ra as N,Ub as E,Wc as b,fc as p,gc as f,hc as M,l as y,ma as u,mc as A,n as d,na as k,nb as h,oa as S,sa as s,tb as B,td as g,vc as m,wc as z,xd as r,yc as V,zc as $}from"./chunk-WI67LAOV.js";var I=["*"],G=["inputElement"],Q=["nz-radio",""],D=(()=>{class n{selected$=new d(1);touched$=new y;disabled$=new d(1);name$=new d(1);touch(){this.touched$.next()}select(e){this.selected$.next(e)}setDisabled(e){this.disabled$.next(e)}setName(e){this.name$.next(e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=k({token:n,factory:n.\u0275fac})}return n})(),se=(()=>{class n{cdr=s(g);nzRadioService=s(D);directionality=s(R);destroyRef=s(l);value=null;isNzDisableFirstChange=!0;onChange=()=>{};onTouched=()=>{};nzDisabled=!1;nzButtonStyle="outline";nzSize="default";nzName=null;dir="ltr";ngOnInit(){this.nzRadioService.selected$.pipe(o(this.destroyRef)).subscribe(e=>{this.value!==e&&(this.value=e,this.onChange(this.value))}),this.nzRadioService.touched$.pipe(o(this.destroyRef)).subscribe(()=>{Promise.resolve().then(()=>this.onTouched())}),this.directionality.change?.pipe(o(this.destroyRef)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(e){let{nzDisabled:t,nzName:i}=e;t&&this.nzRadioService.setDisabled(this.nzDisabled),i&&this.nzRadioService.setName(this.nzName)}writeValue(e){this.value=e,this.nzRadioService.select(e),this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.nzRadioService.setDisabled(this.nzDisabled),this.cdr.markForCheck()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=c({type:n,selectors:[["nz-radio-group"]],hostAttrs:[1,"ant-radio-group"],hostVars:8,hostBindings:function(t,i){t&2&&a("ant-radio-group-large",i.nzSize==="large")("ant-radio-group-small",i.nzSize==="small")("ant-radio-group-solid",i.nzButtonStyle==="solid")("ant-radio-group-rtl",i.dir==="rtl")},inputs:{nzDisabled:[2,"nzDisabled","nzDisabled",r],nzButtonStyle:"nzButtonStyle",nzSize:"nzSize",nzName:"nzName"},exportAs:["nzRadioGroup"],features:[b([D,{provide:C,useExisting:u(()=>n),multi:!0}]),F],ngContentSelectors:I,decls:1,vars:0,template:function(t,i){t&1&&(m(),z(0))},encapsulation:2,changeDetection:0})}return n})(),oe=(()=>{class n{directionality=s(R);nzRadioService=s(D,{optional:!0});ngZone=s(B);elementRef=s(N);cdr=s(g);focusMonitor=s(O);destroyRef=s(l);nzFormStatusService=s(T,{optional:!0});isNgModel=!1;isNzDisableFirstChange=!0;isChecked=!1;name=null;onChange=()=>{};onTouched=()=>{};inputElement;nzValue=null;nzDisabled=!1;nzAutoFocus=!1;isRadioButton=!1;dir="ltr";focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.elementRef)})}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}writeValue(e){this.isChecked=e,this.cdr.markForCheck()}registerOnChange(e){this.isNgModel=!0,this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnInit(){this.nzRadioService&&(this.nzRadioService.name$.pipe(o(this.destroyRef)).subscribe(e=>{this.name=e,this.cdr.markForCheck()}),this.nzRadioService.disabled$.pipe(o(this.destroyRef)).subscribe(e=>{this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}),this.nzRadioService.selected$.pipe(o(this.destroyRef)).subscribe(e=>{let t=this.isChecked;this.isChecked=this.nzValue===e,this.isNgModel&&t!==this.isChecked&&this.isChecked===!1&&this.onChange(!1),this.cdr.markForCheck()})),this.focusMonitor.monitor(this.elementRef,!0).pipe(o(this.destroyRef)).subscribe(e=>{e||(Promise.resolve().then(()=>this.onTouched()),this.nzRadioService&&this.nzRadioService.touch())}),this.directionality.change.pipe(o(this.destroyRef)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.setupClickListener()}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}setupClickListener(){P(this.elementRef.nativeElement,"click").pipe(o(this.destroyRef)).subscribe(e=>{e.stopPropagation(),e.preventDefault(),!(this.nzDisabled||this.isChecked)&&this.ngZone.run(()=>{this.focus(),this.nzRadioService?.select(this.nzValue),this.isNgModel&&(this.isChecked=!0,this.onChange(!0)),this.cdr.markForCheck()})})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=c({type:n,selectors:[["","nz-radio",""],["","nz-radio-button",""]],viewQuery:function(t,i){if(t&1&&V(G,7),t&2){let v;$(v=j())&&(i.inputElement=v.first)}},hostVars:18,hostBindings:function(t,i){t&2&&a("ant-radio-wrapper-in-form-item",!!i.nzFormStatusService)("ant-radio-wrapper",!i.isRadioButton)("ant-radio-button-wrapper",i.isRadioButton)("ant-radio-wrapper-checked",i.isChecked&&!i.isRadioButton)("ant-radio-button-wrapper-checked",i.isChecked&&i.isRadioButton)("ant-radio-wrapper-disabled",i.nzDisabled&&!i.isRadioButton)("ant-radio-button-wrapper-disabled",i.nzDisabled&&i.isRadioButton)("ant-radio-wrapper-rtl",!i.isRadioButton&&i.dir==="rtl")("ant-radio-button-wrapper-rtl",i.isRadioButton&&i.dir==="rtl")},inputs:{nzValue:"nzValue",nzDisabled:[2,"nzDisabled","nzDisabled",r],nzAutoFocus:[2,"nzAutoFocus","nzAutoFocus",r],isRadioButton:[2,"nz-radio-button","isRadioButton",r]},exportAs:["nzRadio"],features:[b([{provide:C,useExisting:u(()=>n),multi:!0}])],attrs:Q,ngContentSelectors:I,decls:6,vars:24,consts:[["inputElement",""],["type","radio",3,"disabled","checked"]],template:function(t,i){t&1&&(m(),p(0,"span"),M(1,"input",1,0)(3,"span"),f(),p(4,"span"),z(5),f()),t&2&&(a("ant-radio",!i.isRadioButton)("ant-radio-checked",i.isChecked&&!i.isRadioButton)("ant-radio-disabled",i.nzDisabled&&!i.isRadioButton)("ant-radio-button",i.isRadioButton)("ant-radio-button-checked",i.isChecked&&i.isRadioButton)("ant-radio-button-disabled",i.nzDisabled&&i.isRadioButton),h(),a("ant-radio-input",!i.isRadioButton)("ant-radio-button-input",i.isRadioButton),A("disabled",i.nzDisabled)("checked",i.isChecked),E("autofocus",i.nzAutoFocus?"autofocus":null)("name",i.name),h(2),a("ant-radio-inner",!i.isRadioButton)("ant-radio-button-inner",i.isRadioButton))},encapsulation:2,changeDetection:0})}return n})(),ae=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=w({type:n});static \u0275inj=S({})}return n})();export{se as a,oe as b,ae as c};
@@ -0,0 +1 @@
1
+ import{Bb as Y,Fa as G,Ga as q,Ha as H,Ia as B,L as d,Pa as J,Qa as K,_a as X,a as P,ra as k,sa as Z,ua as Q}from"./chunk-SPRWNZHF.js";import{Ac as A,Da as M,Fb as I,Gb as O,Gc as U,Jc as v,Kc as y,Lb as p,Ra as R,Ub as F,Wb as C,Wc as W,Yb as g,bc as h,cc as _,dc as m,ec as w,f as z,ic as b,jc as S,ma as N,nb as l,oa as x,r as D,s as f,sa as a,tb as T,td as j,uc as c,xd as u,yc as L,zc as V}from"./chunk-WI67LAOV.js";var ne=["switchElement"];function oe(i,s){i&1&&w(0,"nz-icon",3)}function re(i,s){if(i&1&&(b(0),v(1),S()),i&2){let r=c(2);l(),y(r.nzCheckedChildren)}}function ae(i,s){if(i&1&&p(0,re,2,1,"ng-container",6),i&2){let r=c();h("nzStringTemplateOutlet",r.nzCheckedChildren)}}function se(i,s){if(i&1&&(b(0),v(1),S()),i&2){let r=c(2);l(),y(r.nzUnCheckedChildren)}}function le(i,s){if(i&1&&p(0,se,2,1,"ng-container",6),i&2){let r=c();h("nzStringTemplateOutlet",r.nzUnCheckedChildren)}}var ce="switch",de=(()=>{var n;let i,s=[],r=[];return n=class{_nzModuleName=ce;nzConfigService=a(Z);el=a(R).nativeElement;ngZone=a(T);cdr=a(j);focusMonitor=a(X);directionality=a(P);destroyRef=a(M);isChecked=!1;onChange=()=>{};onTouched=()=>{};switchElement;nzLoading=!1;nzDisabled=!1;nzControl=!1;nzCheckedChildren=null;nzUnCheckedChildren=null;nzSize=f(this,s,"default");nzId=(f(this,r),null);dir="ltr";isNzDisableFirstChange=!0;updateValue(e){this.isChecked!==e&&(this.isChecked=e,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(){this.destroyRef.onDestroy(()=>{this.focusMonitor.stopMonitoring(this.switchElement.nativeElement)})}ngOnInit(){this.directionality.change.pipe(d(this.destroyRef)).subscribe(e=>{this.dir=e,this.cdr.detectChanges()}),this.dir=this.directionality.value,k(this.el,"click").pipe(d(this.destroyRef)).subscribe(e=>{e.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),k(this.switchElement.nativeElement,"keydown").pipe(d(this.destroyRef)).subscribe(e=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;let{keyCode:t}=e;t!==37&&t!==39&&t!==32&&t!==13||(e.preventDefault(),this.ngZone.run(()=>{t===37?this.updateValue(!1):t===39?this.updateValue(!0):(t===32||t===13)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe(d(this.destroyRef)).subscribe(e=>{e||Promise.resolve().then(()=>this.onTouched())})}writeValue(e){this.isChecked=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||e,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}},(()=>{let e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;i=[Q()],D(null,null,i,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:t=>"nzSize"in t,get:t=>t.nzSize,set:(t,o)=>{t.nzSize=o}},metadata:e},s,r),e&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})})(),z(n,"\u0275fac",function(t){return new(t||n)}),z(n,"\u0275cmp",I({type:n,selectors:[["nz-switch"]],viewQuery:function(t,o){if(t&1&&L(ne,7),t&2){let E;V(E=A())&&(o.switchElement=E.first)}},inputs:{nzLoading:[2,"nzLoading","nzLoading",u],nzDisabled:[2,"nzDisabled","nzDisabled",u],nzControl:[2,"nzControl","nzControl",u],nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],features:[W([{provide:Y,useExisting:N(()=>n),multi:!0}])],decls:8,vars:15,consts:[["switchElement",""],["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],[1,"ant-switch-handle"],["nzType","loading",1,"ant-switch-loading-icon"],[1,"ant-switch-inner"],[1,"ant-click-animating-node"],[4,"nzStringTemplateOutlet"]],template:function(t,o){t&1&&(_(0,"button",1,0)(2,"span",2),C(3,oe,1,0,"nz-icon",3),m(),_(4,"span",4),C(5,ae,1,1,"ng-container")(6,le,1,1,"ng-container"),m(),w(7,"div",5),m()),t&2&&(U("ant-switch-checked",o.isChecked)("ant-switch-loading",o.nzLoading)("ant-switch-disabled",o.nzDisabled)("ant-switch-small",o.nzSize==="small")("ant-switch-rtl",o.dir==="rtl"),h("disabled",o.nzDisabled)("nzWaveExtraNode",!0),F("id",o.nzId),l(3),g(o.nzLoading?3:-1),l(2),g(o.isChecked?5:6))},dependencies:[K,J,q,G,B,H],encapsulation:2,changeDetection:0})),n})(),Te=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=O({type:i});static \u0275inj=x({imports:[de]})}return i})();export{de as a,Te as b};
@@ -0,0 +1 @@
1
+ var r=(function(s){return s[s.State=0]="State",s[s.Transition=1]="Transition",s[s.Sequence=2]="Sequence",s[s.Group=3]="Group",s[s.Animate=4]="Animate",s[s.Keyframes=5]="Keyframes",s[s.Style=6]="Style",s[s.Trigger=7]="Trigger",s[s.Reference=8]="Reference",s[s.AnimateChild=9]="AnimateChild",s[s.AnimateRef=10]="AnimateRef",s[s.Query=11]="Query",s[s.Stagger=12]="Stagger",s})(r||{}),_="*";function a(s,t){return{type:r.Trigger,name:s,definitions:t,options:{}}}function c(s,t=null){return{type:r.Animate,styles:t,timings:s}}function y(s,t=null){return{type:r.Sequence,steps:s,options:t}}function F(s){return{type:r.Style,styles:s,offset:null}}function S(s,t,e){return{type:r.State,name:s,styles:t,options:e}}function g(s,t,e=null){return{type:r.Transition,expr:s,animation:t,options:e}}function D(s,t,e=null){return{type:r.Query,selector:s,animation:t,options:e}}function d(s,t){return{type:r.Stagger,timings:s,animation:t}}var l=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(t=0,e=0){this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},u=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(t){this.players=t;let e=0,n=0,o=0,h=this.players.length;h==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(i=>{i.onDone(()=>{++e==h&&this._onFinish()}),i.onDestroy(()=>{++n==h&&this._onDestroy()}),i.onStart(()=>{++o==h&&this._onStart()})}),this.totalTime=this.players.reduce((i,f)=>Math.max(i,f.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(n=>{let o=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(o)})}getPosition(){let t=this.players.reduce((e,n)=>e===null||n.totalTime>e.totalTime?n:e,null);return t!=null?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},p="!";export{r as a,_ as b,a as c,c as d,y as e,F as f,S as g,g as h,D as i,d as j,l as k,u as l,p as m};
@@ -0,0 +1 @@
1
+ import{a as Te}from"./chunk-YVZHJ76K.js";import{a as ue,c as fe,f as be,g as ze,i as _e}from"./chunk-HRXCR3IN.js";import{$a as ce,Fa as mt,Ga as pt,Ha as J,Ia as tt,L,R as At,S as re,a as kt,db as he,eb as me,fb as ut,h as Dt,m as oe,ob as pe,pa as le,ra as U,sa as de,ua as K,x as se}from"./chunk-SPRWNZHF.js";import{b as ne,e as ie,f as ae}from"./chunk-L5D75AMV.js";import{i as ht}from"./chunk-T3KK7ZXB.js";import{$b as ot,Ac as I,Bc as Zt,Da as et,Dc as Ut,Ec as Z,Fb as O,Fc as xt,Gb as qt,Gc as M,Hb as W,Hc as Kt,Jc as It,L as X,Lb as S,Lc as St,M as Ft,Mb as Gt,N as Pt,Oa as vt,Ra as P,Sa as nt,U as Ht,Ub as q,Wb as N,Wc as Jt,X as Vt,Xa as Yt,Xc as lt,Yb as k,_b as at,ac as st,bc as u,cc as g,cd as dt,da as Ct,dc as C,ec as V,f as _t,g as Tt,hd as wt,ic as G,jc as j,l as Lt,lc as B,ld as te,ma as $t,nb as f,nc as jt,nd as Nt,o as Ot,oa as Qt,p as Wt,qa as Xt,qd as ee,r as Q,rc as A,s as R,sa as h,sb as z,tb as Y,td as ct,u as gt,uc as c,vc as yt,wb as it,wc as rt,xc as H,xd as y,ya as _,yc as F,za as T,zc as x}from"./chunk-WI67LAOV.js";function Me(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Le=["nz-tab-body",""];function Oe(e,d){}function We(e,d){if(e&1&&(G(0),V(1,"nz-icon",1),j()),e&2){let t=d.$implicit;f(),u("nzType",t)}}var Fe=()=>({minWidth:"46px"}),Pe=()=>({visible:!1});function He(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.tab.label," ")}}function Ve(e,d){if(e&1){let t=B();g(0,"li",7),A("click",function(){let i=_(t).$implicit,a=c(2);return T(a.onSelect(i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.onContextmenu(a,i))}),S(1,He,2,1,"ng-container",8),C()}if(e&2){let t=d.$implicit;M("ant-tabs-dropdown-menu-item-disabled",t.disabled),u("nzSelected",t.active)("nzDisabled",t.disabled),f(),u("nzStringTemplateOutlet",t.tab.label)("nzStringTemplateOutletContext",lt(6,Pe))}}function $e(e,d){if(e&1&&(g(0,"ul",4),ot(1,Ve,2,7,"li",6,at),C()),e&2){let t=c();f(),st(t.items)}}function Qe(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon)}}var Xe=["navWrap"],Ye=["navList"],qe=["*"];function Ge(e,d){}function je(e,d){if(e&1&&(g(0,"div",2),S(1,Ge,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.startExtraContent().templateRef)}}function Ze(e,d){if(e&1){let t=B();g(0,"button",9),A("click",function(){_(t);let i=c();return T(i.addClicked.emit())}),C()}if(e&2){let t=c();u("addIcon",t.addIcon),q("tabindex",-1)}}function Ue(e,d){}function Ke(e,d){if(e&1&&(g(0,"div",2),S(1,Ue,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.endExtraContent().templateRef)}}function Je(e,d){}function tn(e,d){if(e&1&&(g(0,"div",2),S(1,Je,0,0,"ng-template",8),C()),e&2){let t=c();f(),u("ngTemplateOutlet",t.extraTemplate)}}var en=["contentTemplate"],nn=[[["","nz-tab-link",""]],"*"],an=["[nz-tab-link]","*"];function on(e,d){e&1&&rt(0)}function sn(e,d){e&1&&rt(0,1)}var rn=()=>({visible:!0});function ln(e,d){if(e&1&&(G(0),It(1),j()),e&2){let t=c().$implicit;f(),St(" ",t.label," ")}}function dn(e,d){if(e&1){let t=B();g(0,"button",10),A("click",function(i){_(t);let a=c().$index,l=c(2);return T(l.onClose(a,i))}),C()}if(e&2){let t=c().$implicit;u("closeIcon",t.nzCloseIcon)}}function cn(e,d){if(e&1){let t=B();g(0,"div",6),A("click",function(i){let a=_(t),l=a.$implicit,p=a.$index,b=c(2);return T(b.clickNavItem(l,p,i))})("contextmenu",function(i){let a=_(t).$implicit,l=c(2);return T(l.contextmenuNavItem(a,i))}),g(1,"button",7),S(2,ln,2,1,"ng-container",8),N(3,dn,1,1,"button",9),C()()}if(e&2){let t=d.$implicit,n=d.$index,i=c(2);xt("margin-right",i.position==="horizontal"?i.nzTabBarGutter:null,"px")("margin-bottom",i.position==="vertical"?i.nzTabBarGutter:null,"px"),M("ant-tabs-tab-active",i.nzSelectedIndex===n)("ant-tabs-tab-disabled",t.nzDisabled),f(),u("id",i.getTabContentId(n))("disabled",t.nzDisabled)("tab",t)("active",i.nzSelectedIndex===n),q("tabIndex",i.getTabIndex(t,n))("aria-disabled",t.nzDisabled)("aria-selected",i.nzSelectedIndex===n&&!i.nzHideAll)("aria-controls",i.getTabContentId(n)),f(),u("nzStringTemplateOutlet",t.label)("nzStringTemplateOutletContext",lt(19,rn)),f(),k(t.nzClosable&&i.closable&&!t.nzDisabled?3:-1)}}function hn(e,d){if(e&1){let t=B();g(0,"nz-tabs-nav",4),A("tabScroll",function(i){_(t);let a=c();return T(a.nzTabListScroll.emit(i))})("selectFocusedIndex",function(i){_(t);let a=c();return T(a.setSelectedIndex(i))})("addClicked",function(){_(t);let i=c();return T(i.onAdd())}),ot(1,cn,4,20,"div",5,at),C()}if(e&2){let t=c();Kt(t.nzTabBarStyle),u("selectedIndex",t.nzSelectedIndex||0)("inkBarAnimated",t.inkBarAnimated)("addable",t.addable)("addIcon",t.nzAddIcon)("hideBar",t.nzHideAll)("position",t.position)("extraTemplate",t.nzTabBarExtraContent)("extraContents",t.extraContents()),f(),st(t.tabs)}}function mn(e,d){}function pn(e,d){if(e&1&&S(0,mn,0,0,"ng-template",11),e&2){c();let t=Z(4);u("ngTemplateOutlet",t)}}function un(e,d){}function fn(e,d){if(e&1&&S(0,un,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function bn(e,d){if(e&1&&N(0,fn,1,1,null,11),e&2){let t=c().$index,n=c(2);k(n.nzSelectedIndex===t?0:-1)}}function zn(e,d){}function _n(e,d){if(e&1&&S(0,zn,0,0,"ng-template",11),e&2){c(2);let t=Z(4);u("ngTemplateOutlet",t)}}function Tn(e,d){if(e&1&&N(0,_n,1,1,null,11),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);k(a.nzSelectedIndex===i||n.hasBeenActive?0:-1)}}function gn(e,d){if(e&1&&V(0,"div",12),e&2){let t=c(),n=t.$implicit,i=t.$index,a=c(2);u("id",a.getTabContentId(i))("active",a.nzSelectedIndex===i)("content",n.content)("animated",a.tabPaneAnimated),q("aria-labelledby",a.getTabContentId(i))}}function Cn(e,d){if(e&1&&(N(0,pn,1,1,null,11)(1,bn,1,1)(2,Tn,1,1),S(3,gn,1,5,"ng-template",null,0,dt)),e&2){let t=d.$implicit,n=c(2);k(t.nzForceRender?0:n.nzDestroyInactiveTabPane?1:2)}}function vn(e,d){if(e&1&&ot(0,Cn,5,1,null,null,at),e&2){let t=c();st(t.tabs)}}var Et=class{index;tab},bt=(()=>{class e{addIcon="plus";element=h(P).nativeElement;getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,Me,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.addIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),ge=(()=>{class e{position=Nt("end",{alias:"nzTabBarExtraContent"});templateRef=h(it);static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabBarExtraContent","",5,"nz-tabset",5,"nz-tabs"]],inputs:{position:[1,"nzTabBarExtraContent","position"]}})}return e})(),yn=(()=>{class e{content=null;active=!1;animated=!0;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:10,hostBindings:function(n,i){n&2&&(jt("@tabSwitchMotion",i.active?"enter":"leave")("@.disabled",!i.animated),q("tabindex",i.active?0:-1)("aria-hidden",!i.active),xt("overflow-y",i.animated?i.active?null:"none":null),M("ant-tabs-tabpane-active",i.active)("ant-tabs-tabpane-hidden",i.animated?null:!i.active))},inputs:{content:"content",active:"active",animated:"animated"},exportAs:["nzTabBody"],attrs:Le,decls:1,vars:1,consts:[[3,"ngTemplateOutlet"]],template:function(n,i){n&1&&S(0,Oe,0,0,"ng-template",0),n&2&&u("ngTemplateOutlet",i.content)},dependencies:[ht],encapsulation:2,data:{animation:[pe]},changeDetection:0})}return e})(),Ie=(()=>{class e{closeIcon="close";static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nzTheme","outline",3,"nzType"]],template:function(n,i){n&1&&S(0,We,2,1,"ng-container",0),n&2&&u("nzStringTemplateOutlet",i.closeIcon)},dependencies:[tt,J,pt,mt],encapsulation:2})}return e})(),xn=(()=>{class e{templateRef=h(it,{host:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]})}return e})(),Se=(()=>{class e{elementRef=h(P);routerLink=h(ae,{self:!0,optional:!0});static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]})}return e})(),we=(()=>{class e{disabled=!1;tab;active=!1;elementRef=h(P);el=this.elementRef.nativeElement;parentElement=this.el.parentElement;focus(){this.el.focus({preventScroll:!0})}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabNavItem",""]],inputs:{disabled:[2,"disabled","disabled",y],tab:"tab",active:[2,"active","active",y]}})}return e})(),Rt=(()=>{class e{items=[];addable=!1;addIcon="plus";addClicked=new z;selected=new z;closeAnimationWaitTimeoutId;menuOpened=!1;cdr=h(ct);element=h(P).nativeElement;onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,n){t.disabled||t.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){return this.element?.offsetWidth||0}getElementHeight(){return this.element?.offsetHeight||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-nav-operations-hidden",i.items.length===0)},inputs:{items:"items",addable:[2,"addable","addable",y],addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],decls:7,vars:6,consts:[["dropdownTrigger","nzDropdown"],["menu","nzDropdownMenu"],["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzVisibleChange","mouseenter","nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement"],["nzType","ellipsis"],["nz-menu",""],["nz-tab-add-button","",3,"addIcon"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"click","contextmenu","nzSelected","nzDisabled"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let a=B();g(0,"button",2,0),A("nzVisibleChange",function(p){return _(a),T(i.menuVisChange(p))})("mouseenter",function(){return _(a),T(i.showItems())}),V(2,"nz-icon",3),C(),g(3,"nz-dropdown-menu",null,1),N(5,$e,3,0,"ul",4),C(),N(6,Qe,1,1,"button",5)}if(n&2){let a=Z(4);u("nzDropdownMenu",a)("nzOverlayStyle",lt(5,Fe))("nzMatchWidthElement",null),f(5),k(i.menuOpened?5:-1),f(),k(i.addable?6:-1)}},dependencies:[pt,mt,tt,J,bt,_e,be,fe,ue,ze],encapsulation:2,changeDetection:0})}return e})(),In=.1,Ce=.01,ft=20,ve=.995**ft,Sn=(()=>{class e{ngZone=h(Y);destroyRef=h(et);el=h(P).nativeElement;lastWheelDirection=null;lastWheelTimestamp=0;lastTimestamp=0;lastTimeDiff=0;lastMixedWheel=0;lastWheelPrevent=!1;touchPosition=null;lastOffset=null;motion=-1;offsetChange=new z;tabScroll=new z;ngOnInit(){let t=U(this.el,"wheel"),n=U(this.el,"touchstart"),i=U(this.el,"touchmove"),a=U(this.el,"touchend");this.subscribeWrap("wheel",t,this.onWheel),this.subscribeWrap("touchstart",n,this.onTouchStart),this.subscribeWrap("touchmove",i,this.onTouchMove),this.subscribeWrap("touchend",a,this.onTouchEnd)}subscribeWrap(t,n,i){return n.pipe(L(this.destroyRef)).subscribe(a=>{this.tabScroll.emit({type:t,event:a}),a.defaultPrevented||i(a)})}onTouchEnd=t=>{if(!this.touchPosition)return;let n=this.lastOffset,i=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,n){let a=n.x/i,l=n.y/i,p=Math.abs(a),b=Math.abs(l);if(Math.max(p,b)<In)return;let w=a,E=l;this.motion=window.setInterval(()=>{if(Math.abs(w)<Ce&&Math.abs(E)<Ce){window.clearInterval(this.motion);return}w*=ve,E*=ve,this.onOffset(w*ft,E*ft,t)},ft)}};onTouchMove=t=>{if(!this.touchPosition)return;t.preventDefault();let{screenX:n,screenY:i}=t.touches[0],a=n-this.touchPosition.x,l=i-this.touchPosition.y;this.onOffset(a,l,t);let p=Date.now();this.lastTimeDiff=p-this.lastTimestamp,this.lastTimestamp=p,this.lastOffset={x:a,y:l},this.touchPosition={x:n,y:i}};onTouchStart=t=>{let{screenX:n,screenY:i}=t.touches[0];this.touchPosition={x:n,y:i},window.clearInterval(this.motion)};onWheel=t=>{let{deltaX:n,deltaY:i}=t,a,l=Math.abs(n),p=Math.abs(i);l===p?a=this.lastWheelDirection==="x"?n:i:l>p?(a=n,this.lastWheelDirection="x"):(a=i,this.lastWheelDirection="y");let b=Date.now(),w=Math.abs(a);(b-this.lastWheelTimestamp>100||w-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-a,-a,t),(t.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=b,this.lastMixedWheel=w};onOffset(t,n,i){this.offsetChange.observers.length&&this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:n,event:i})})}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}})}return e})(),ye=(()=>{class e{ngZone=h(Y);el=h(P).nativeElement;position="horizontal";animated=!0;animationMode=h(Yt,{optional:!0});get _animated(){return this.animationMode!=="NoopAnimations"&&this.animated}alignToElement(t){this.ngZone.runOutsideAngular(()=>{ut(()=>this.setStyles(t))})}setStyles(t){this.position==="horizontal"?(this.el.style.top="",this.el.style.height="",this.el.style.left=this.getLeftPosition(t),this.el.style.width=this.getElementWidth(t)):(this.el.style.left="",this.el.style.width="",this.el.style.top=this.getTopPosition(t),this.el.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(n,i){n&2&&M("ant-tabs-ink-bar-animated",i._animated)},inputs:{position:"position",animated:"animated"}})}return e})(),wn=typeof ut<"u"?Wt:Ot,xe=150,Bt=(()=>{class e{cdr=h(ct);ngZone=h(Y);viewportRuler=h(oe);nzResizeObserver=h(Te);dir=h(kt);destroyRef=h(et);indexFocused=new z;selectFocusedIndex=new z;addClicked=new z;tabScroll=new z;position="horizontal";addable=!1;hideBar=!1;addIcon="plus";inkBarAnimated=!0;extraTemplate;extraContents=Nt.required();startExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="start"));endExtraContent=wt(()=>this.extraContents().find(t=>t.position()==="end"));get selectedIndex(){return this._selectedIndex}set selectedIndex(t){let n=Dt(t);this._selectedIndex!==n&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}navWrapRef;navListRef;operationRef;addBtnRef;inkBar;items;get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}get showAddButton(){return this.hiddenItems.length===0&&this.addable}translate=null;transformX=0;transformY=0;pingLeft=!1;pingRight=!1;pingTop=!1;pingBottom=!1;hiddenItems=[];keyManager;_selectedIndex=0;wrapperWidth=0;wrapperHeight=0;scrollListWidth=0;scrollListHeight=0;operationWidth=0;operationHeight=0;addButtonWidth=0;addButtonHeight=0;selectedIndexChanged=!1;lockAnimationTimeoutId;cssTransformTimeWaitingId;constructor(){this.destroyRef.onDestroy(()=>{clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId)})}ngAfterViewInit(){let t=this.dir?this.dir.change.asObservable():gt(null),n=this.viewportRuler.change(150),i=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new me(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),ut(i),X(this.nzResizeObserver.observe(this.navWrapRef),this.nzResizeObserver.observe(this.navListRef)).pipe(L(this.destroyRef),Pt(16,wn)).subscribe(()=>{i()}),X(t,n,this.items.changes).pipe(L(this.destroyRef)).subscribe(()=>{Promise.resolve().then(i),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe(L(this.destroyRef)).subscribe(a=>{this.indexFocused.emit(a),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}onSelectedFromMenu(t){let n=this.items.toArray().findIndex(i=>i===t);n!==-1&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if(this.position==="horizontal"){if(!this.lockAnimationTimeoutId&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(!this.lockAnimationTimeoutId&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){let n=this.navWrapRef.nativeElement.contains(t.target);if(!(se(t)||!n))switch(t.keyCode){case 37:case 38:case 39:case 40:this.lockAnimation(),this.keyManager.onKeydown(t);break;case 13:case 32:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;let n=this.items?this.items.toArray()[t]:null;return!!n&&!n.disabled}scrollToTab(t){if(!this.items.find(i=>i===t))return;let n=this.items.toArray();if(this.position==="horizontal"){let i=this.transformX;if(this.getLayoutDirection()==="rtl"){let a=n[0].left+n[0].width-t.left-t.width;a<this.transformX?i=a:a+t.width>this.transformX+this.wrapperWidth&&(i=a+t.width-this.wrapperWidth)}else t.left<-this.transformX?i=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(i=-(t.left+t.width-this.wrapperWidth));this.transformX=i,this.transformY=0,this.setTransform(i,0)}else{let i=this.transformY;t.top<-this.transformY?i=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(i=-(t.top+t.height-this.wrapperHeight)),this.transformY=i,this.transformX=0,this.setTransform(0,i)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},xe)}lockAnimation(){this.lockAnimationTimeoutId||this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=void 0},xe)})}setTransform(t,n){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${n}px)`}clampTransformX(t){let n=this.wrapperWidth-this.scrollListWidth;return this.getLayoutDirection()==="rtl"?Math.max(Math.min(n,t),0):Math.min(Math.max(n,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWrapRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWrapRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){let t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){let t={top:!1,right:!1,bottom:!1,left:!1},n=this.navWrapRef.nativeElement;this.position==="horizontal"?this.getLayoutDirection()==="rtl"?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth<this.scrollListWidth):(t.left=this.transformX<0,t.right=-this.transformX+this.wrapperWidth<this.scrollListWidth):(t.top=this.transformY<0,t.bottom=-this.transformY+this.wrapperHeight<this.scrollListHeight),Object.keys(t).forEach(i=>{let a=`ant-tabs-nav-wrap-ping-${i}`;t[i]?n.classList.add(a):n.classList.remove(a)})}setVisibleRange(){let t,n,i,a,l,p,b=this.items.toArray(),w={width:0,height:0,left:0,top:0,right:0},E=m=>{let D,zt=b[m]||w;return n==="right"?D=b[0].left+b[0].width-b[m].left-b[m].width:D=zt[n],D};this.position==="horizontal"?(t="width",a=this.wrapperWidth,l=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),p=this.addButtonWidth,i=Math.abs(this.transformX),this.getLayoutDirection()==="rtl"?(n="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidth<this.scrollListWidth):(this.pingLeft=this.transformX<0,this.pingRight=-this.transformX+this.wrapperWidth<this.scrollListWidth,n="left")):(t="height",a=this.wrapperHeight,l=this.scrollListHeight-(this.hiddenItems.length?this.operationHeight:0),p=this.addButtonHeight,n="top",i=-this.transformY,this.pingTop=this.transformY<0,this.pingBottom=-this.transformY+this.wrapperHeight<this.scrollListHeight);let $=a;if(l+p>a&&($=a-p),!b.length){this.hiddenItems=[],this.cdr.markForCheck();return}let v=b.length,Mt=v;for(let m=0;m<v;m+=1){let D=E(m),zt=b[m]||w;if(D+zt[t]>i+$){Mt=m-1;break}}let s=0;for(let m=v-1;m>=0;m-=1)if(E(m)<i){s=m+1;break}let o=b.slice(0,s),r=b.slice(Mt+1);this.hiddenItems=[...o,...r],this.cdr.markForCheck()}getLayoutDirection(){return this.dir&&this.dir.value==="rtl"?"rtl":"ltr"}ngOnChanges(t){let{position:n}=t;n&&!n.isFirstChange()&&(this.alignInkBarToSelectedTab(),this.lockAnimation(),this.updateScrollListPosition())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tabs-nav"]],contentQueries:function(n,i,a){if(n&1&&H(a,we,5),n&2){let l;x(l=I())&&(i.items=l)}},viewQuery:function(n,i){if(n&1&&(F(Xe,7),F(Ye,7),F(Rt,7),F(bt,5),F(ye,7)),n&2){let a;x(a=I())&&(i.navWrapRef=a.first),x(a=I())&&(i.navListRef=a.first),x(a=I())&&(i.operationRef=a.first),x(a=I())&&(i.addBtnRef=a.first),x(a=I())&&(i.inkBar=a.first)}},hostAttrs:[1,"ant-tabs-nav"],hostBindings:function(n,i){n&1&&A("keydown",function(l){return i.handleKeydown(l)})},inputs:{position:"position",addable:[2,"addable","addable",y],hideBar:[2,"hideBar","hideBar",y],addIcon:"addIcon",inkBarAnimated:"inkBarAnimated",extraTemplate:"extraTemplate",extraContents:[1,"extraContents"],selectedIndex:"selectedIndex"},outputs:{indexFocused:"indexFocused",selectFocusedIndex:"selectFocusedIndex",addClicked:"addClicked",tabScroll:"tabScroll"},exportAs:["nzTabsNav"],features:[vt],ngContentSelectors:qe,decls:11,vars:17,consts:[["navWrap",""],["navList",""],[1,"ant-tabs-extra-content"],[1,"ant-tabs-nav-wrap"],["nzTabScrollList","","role","tablist",1,"ant-tabs-nav-list",3,"offsetChange","tabScroll"],["role","tab","nz-tab-add-button","",3,"addIcon"],["nz-tabs-ink-bar","",3,"hidden","position","animated"],[3,"addClicked","selected","addIcon","addable","items"],[3,"ngTemplateOutlet"],["role","tab","nz-tab-add-button","",3,"click","addIcon"]],template:function(n,i){if(n&1){let a=B();yt(),N(0,je,2,1,"div",2),g(1,"div",3,0)(3,"div",4,1),A("offsetChange",function(p){return _(a),T(i.onOffsetChange(p))})("tabScroll",function(p){return _(a),T(i.tabScroll.emit(p))}),rt(5),N(6,Ze,1,2,"button",5),V(7,"div",6),C()(),g(8,"nz-tab-nav-operation",7),A("addClicked",function(){return _(a),T(i.addClicked.emit())})("selected",function(p){return _(a),T(i.onSelectedFromMenu(p))}),C(),N(9,Ke,2,1,"div",2)(10,tn,2,1,"div",2)}n&2&&(k(i.startExtraContent()?0:-1),f(),M("ant-tabs-nav-wrap-ping-left",i.pingLeft)("ant-tabs-nav-wrap-ping-right",i.pingRight)("ant-tabs-nav-wrap-ping-top",i.pingTop)("ant-tabs-nav-wrap-ping-bottom",i.pingBottom),f(5),k(i.showAddButton?6:-1),f(),u("hidden",i.hideBar)("position",i.position)("animated",i.inkBarAnimated),f(),u("addIcon",i.addIcon)("addable",i.addable)("items",i.hiddenItems),f(),k(i.endExtraContent()?9:i.extraTemplate?10:-1))},dependencies:[Sn,bt,ye,Rt,ht],encapsulation:2,changeDetection:0})}return e})(),Nn=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275dir=W({type:e,selectors:[["","nz-tab",""]],exportAs:["nzTab"]})}return e})(),Ne=new Xt(""),kn=(()=>{class e{nzTitle="";nzClosable=!1;nzCloseIcon="close";nzDisabled=!1;nzForceRender=!1;nzSelect=new z;nzDeselect=new z;nzClick=new z;nzContextmenu=new z;nzTabLinkTemplateDirective;template=null;linkDirective;contentTemplate;isActive=!1;hasBeenActive=!1;position=null;origin=null;closestTabSet=h(Ne);stateChanges=new Lt;get content(){return this.template||this.contentTemplate}get label(){return this.nzTitle||this.nzTabLinkTemplateDirective?.templateRef}ngOnChanges(t){let{nzTitle:n,nzDisabled:i,nzForceRender:a}=t;(n||i||a)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}setActive(t){this.isActive=t,t&&(this.hasBeenActive=!0)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=O({type:e,selectors:[["nz-tab"]],contentQueries:function(n,i,a){if(n&1&&(H(a,xn,5),H(a,Nn,5,it),H(a,Se,5)),n&2){let l;x(l=I())&&(i.nzTabLinkTemplateDirective=l.first),x(l=I())&&(i.template=l.first),x(l=I())&&(i.linkDirective=l.first)}},viewQuery:function(n,i){if(n&1&&F(en,7),n&2){let a;x(a=I())&&(i.contentTemplate=a.first)}},inputs:{nzTitle:"nzTitle",nzClosable:[2,"nzClosable","nzClosable",y],nzCloseIcon:"nzCloseIcon",nzDisabled:[2,"nzDisabled","nzDisabled",y],nzForceRender:[2,"nzForceRender","nzForceRender",y]},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[vt],ngContentSelectors:an,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(n,i){n&1&&(yt(nn),Gt(0,on,1,0,"ng-template",null,0,dt)(2,sn,1,0,"ng-template",null,1,dt))},encapsulation:2,changeDetection:0})}return e})(),Dn="tabs",An=0,En=(()=>{var v;let e,d=[],t=[],n,i=[],a=[],l,p=[],b=[],w,E=[],$=[];return v=class{_nzModuleName=Dn;nzConfigService=h(de);ngZone=h(Y);cdr=h(ct);directionality=h(kt);destroyRef=h(et);get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(s){this.indexToSelect=Dt(s,null)}nzTabPosition="top";nzTabBarExtraContent;nzCanDeactivate=null;nzAddIcon="plus";nzTabBarStyle=null;nzType=R(this,d,"line");nzSize=(R(this,t),R(this,i,"default"));nzAnimated=(R(this,a),R(this,p,!0));nzTabBarGutter=(R(this,b),R(this,E,void 0));nzHideAdd=(R(this,$),!1);nzCentered=!1;nzHideAll=!1;nzLinkRouter=!1;nzLinkExact=!0;nzDestroyInactiveTabPane=!1;nzSelectChange=new z(!0);nzSelectedIndexChange=new z;nzTabListScroll=new z;nzClose=new z;nzAdd=new z;get position(){return["top","bottom"].indexOf(this.nzTabPosition)===-1?"vertical":"horizontal"}get addable(){return this.nzType==="editable-card"&&!this.nzHideAdd}get closable(){return this.nzType==="editable-card"}get line(){return this.nzType==="line"}get inkBarAnimated(){return this.line&&(typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return typeof this.nzAnimated=="boolean"?this.nzAnimated:this.nzAnimated.tabPane}allTabs=new nt;tabLinks=new nt;tabNavBarRef;tabs=new nt;extraContents=ee(ge);dir="ltr";tabSetId;indexToSelect=0;selectedIndex=null;tabLabelSubscription=Tt.EMPTY;canDeactivateSubscription=Tt.EMPTY;router=h(ie,{optional:!0});constructor(){this.tabSetId=An++,h(te)==="nz-tabset"&&re(`${At} <nz-tabset> is deprecated, please use <nz-tabs> instead.`),this.destroyRef.onDestroy(()=>{this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()})}ngOnInit(){this.dir=this.directionality.value,this.directionality.change?.pipe(L(this.destroyRef)).subscribe(s=>{this.dir=s,this.cdr.detectChanges()})}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabs.changes.pipe(L(this.destroyRef)).subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){let o=this.tabs.toArray();for(let r=0;r<o.length;r++)if(o[r].isActive){this.indexToSelect=this.selectedIndex=r;break}}this.subscribeToTabLabels(),this.cdr.markForCheck()})}ngAfterContentChecked(){let s=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this.selectedIndex!==s){let o=this.selectedIndex==null;o||this.nzSelectChange.emit(this.createChangeEvent(s)),Promise.resolve().then(()=>{this.tabs.forEach((r,m)=>r.setActive(m===s)),o||this.nzSelectedIndexChange.emit(s)})}this.tabs.forEach((o,r)=>{o.position=r-s,this.selectedIndex!=null&&o.position===0&&!o.origin&&(o.origin=s-this.selectedIndex)}),this.selectedIndex!==s&&(this.selectedIndex=s,this.cdr.markForCheck())}onClose(s,o){o.preventDefault(),o.stopPropagation(),this.nzClose.emit({index:s})}onAdd(){this.nzAdd.emit()}clampTabIndex(s){return Math.min(this.tabs.length-1,Math.max(s||0,0))}createChangeEvent(s){let o=new Et;return o.index=s,this.tabs&&this.tabs.length&&(o.tab=this.tabs.toArray()[s],this.tabs.forEach((r,m)=>{m!==s&&r.nzDeselect.emit()}),o.tab.nzSelect.emit()),o}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=X(...this.tabs.map(s=>s.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe(Ct(this.allTabs)).subscribe(s=>{this.tabs.reset(s.filter(o=>o.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(s,o){return typeof this.nzCanDeactivate=="function"?le(this.nzCanDeactivate(s,o)).pipe(Vt(),L(this.destroyRef)):gt(!0)}clickNavItem(s,o,r){s.nzDisabled||(s.nzClick.emit(),this.isRouterLinkClickEvent(o,r)||this.setSelectedIndex(o))}isRouterLinkClickEvent(s,o){let r=o.target;return this.nzLinkRouter?!!this.tabs.toArray()[s]?.linkDirective?.elementRef.nativeElement.contains(r):!1}contextmenuNavItem(s,o){s.nzDisabled||s.nzContextmenu.emit(o)}setSelectedIndex(s){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,s).subscribe(o=>{o&&(this.nzSelectedIndex=s,this.tabNavBarRef.focusIndex=s,this.cdr.markForCheck())})}getTabIndex(s,o){return s.nzDisabled?null:this.selectedIndex===o?0:-1}getTabContentId(s){return`nz-tabs-${this.tabSetId}-tab-${s}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${At} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);X(this.router.events.pipe(Ft(s=>s instanceof ne)),this.tabLinks.changes).pipe(Ct(!0),Ht(0),L(this.destroyRef)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router?.navigated){let s=this.findShouldActiveTabIndex();s!==this.selectedIndex&&this.setSelectedIndex(s),Promise.resolve().then(()=>this.nzHideAll=s===-1)}}findShouldActiveTabIndex(){let s=this.tabs.toArray(),o=this.isLinkActive(this.router);return s.findIndex(r=>{let m=r.linkDirective;return m?o(m.routerLink):!1})}isLinkActive(s){return o=>o?!!s?.isActive(o.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"}):!1}},(()=>{let s=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;e=[K()],n=[K()],l=[K()],w=[K()],Q(null,null,e,{kind:"field",name:"nzType",static:!1,private:!1,access:{has:o=>"nzType"in o,get:o=>o.nzType,set:(o,r)=>{o.nzType=r}},metadata:s},d,t),Q(null,null,n,{kind:"field",name:"nzSize",static:!1,private:!1,access:{has:o=>"nzSize"in o,get:o=>o.nzSize,set:(o,r)=>{o.nzSize=r}},metadata:s},i,a),Q(null,null,l,{kind:"field",name:"nzAnimated",static:!1,private:!1,access:{has:o=>"nzAnimated"in o,get:o=>o.nzAnimated,set:(o,r)=>{o.nzAnimated=r}},metadata:s},p,b),Q(null,null,w,{kind:"field",name:"nzTabBarGutter",static:!1,private:!1,access:{has:o=>"nzTabBarGutter"in o,get:o=>o.nzTabBarGutter,set:(o,r)=>{o.nzTabBarGutter=r}},metadata:s},E,$),s&&Object.defineProperty(v,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s})})(),_t(v,"\u0275fac",function(o){return new(o||v)}),_t(v,"\u0275cmp",O({type:v,selectors:[["nz-tabs"],["nz-tabset"]],contentQueries:function(o,r,m){if(o&1&&(Zt(m,r.extraContents,ge,4),H(m,kn,5),H(m,Se,5)),o&2){Ut();let D;x(D=I())&&(r.allTabs=D),x(D=I())&&(r.tabLinks=D)}},viewQuery:function(o,r){if(o&1&&F(Bt,5),o&2){let m;x(m=I())&&(r.tabNavBarRef=m.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(o,r){o&2&&M("ant-tabs-card",r.nzType==="card"||r.nzType==="editable-card")("ant-tabs-editable",r.nzType==="editable-card")("ant-tabs-editable-card",r.nzType==="editable-card")("ant-tabs-centered",r.nzCentered)("ant-tabs-rtl",r.dir==="rtl")("ant-tabs-top",r.nzTabPosition==="top")("ant-tabs-bottom",r.nzTabPosition==="bottom")("ant-tabs-left",r.nzTabPosition==="left")("ant-tabs-right",r.nzTabPosition==="right")("ant-tabs-default",r.nzSize==="default")("ant-tabs-small",r.nzSize==="small")("ant-tabs-large",r.nzSize==="large")},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:[2,"nzHideAdd","nzHideAdd",y],nzCentered:[2,"nzCentered","nzCentered",y],nzHideAll:[2,"nzHideAll","nzHideAll",y],nzLinkRouter:[2,"nzLinkRouter","nzLinkRouter",y],nzLinkExact:[2,"nzLinkExact","nzLinkExact",y],nzDestroyInactiveTabPane:[2,"nzDestroyInactiveTabPane","nzDestroyInactiveTabPane",y]},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabs"],features:[Jt([{provide:Ne,useExisting:$t(()=>v)}])],decls:4,vars:12,consts:[["tabpaneTmpl",""],[3,"style","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],[3,"tabScroll","selectFocusedIndex","addClicked","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","extraContents"],[1,"ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled"],[1,"ant-tabs-tab",3,"click","contextmenu"],["type","button","role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"id","disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["type","button","nz-tab-close-button","",3,"closeIcon"],["type","button","nz-tab-close-button","",3,"click","closeIcon"],[3,"ngTemplateOutlet"],["role","tabpanel","nz-tab-body","",3,"id","active","content","animated"]],template:function(o,r){o&1&&(N(0,hn,3,10,"nz-tabs-nav",1),g(1,"div",2)(2,"div",3),N(3,vn,2,0),C()()),o&2&&(k(r.tabs.length||r.addable?0:-1),f(2),M("ant-tabs-content-top",r.nzTabPosition==="top")("ant-tabs-content-bottom",r.nzTabPosition==="bottom")("ant-tabs-content-left",r.nzTabPosition==="left")("ant-tabs-content-right",r.nzTabPosition==="right")("ant-tabs-content-animated",r.tabPaneAnimated),f(),k(r.nzHideAll?-1:3))},dependencies:[Bt,ht,we,he,ce,tt,J,Ie,yn],encapsulation:2})),v})();var bi=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=qt({type:e});static \u0275inj=Qt({imports:[En,Bt,Rt,bt,Ie]})}return e})();export{Nn as a,kn as b,En as c,bi as d};
@@ -0,0 +1,2 @@
1
+ import{a as v,b as f}from"./chunk-JZULA5JV.js";import{a as w}from"./chunk-UQGCUFNM.js";import{b as V}from"./chunk-5T5KA5PG.js";import{d as M}from"./chunk-UXXWRMM6.js";import{Ha as u,a,b as c,hd as p,id as R,l as j,na as h,ra as T,sa as m,y as g,z as I}from"./chunk-WI67LAOV.js";var b=class l{constructor(e,t){this.ws=e;this.runtimeStore=t;this.ws.messages().subscribe(s=>this.onMessage(s)),this.ws.stateChanges().subscribe(s=>{s==="open"&&this.lastWsState!=="open"&&this.replaySubs(),this.lastWsState=s})}outputByTaskId=new Map;event$=new j;subs=new Map;lastWsState="idle";ensureConnected(){this.ws.connect()}subscribeTask(e,t=200){let s=e.trim();if(!s)return;let i=Math.max(0,Math.min(5e3,t|0));this.subs.get(s)!==i&&(this.subs.set(s,i),this.ws.isOpen()&&this.ws.send({op:"sub",topic:"task",taskId:s,tail:i}))}unsubscribeTask(e){let t=e.trim();this.subs.has(t)&&(this.subs.delete(t),this.ws.isOpen()&&this.ws.send({op:"unsub",topic:"task",taskId:t}))}resize(e,t,s){let i=String(e??"").trim();i&&this.ws.isOpen()&&this.ws.send({op:"resize",topic:"task",taskId:i,cols:t,rows:s})}output$(e){return this.ensureOutput(e).asObservable()}events$(){return this.event$.asObservable()}status$(e){return this.runtimeStore.status$(e)}replaySubs(){for(let[e,t]of this.subs.entries())this.ws.send({op:"sub",topic:"task",taskId:e,tail:t})}onMessage(e){let t=e?.op;if(t==="task.output"){let s=e.payload,i=String(s.taskId??"").trim();if(!i)return;this.ensureOutput(i).next(e);return}if(t==="task.event"){let s=e.payload,i=e.type,n=String(s.taskId??"").trim();if(!n)return;this.event$.next(e);let r=this.applyEventToRuntime(i,s);if(r&&this.runtimeStore.setRuntime(r),(i==="exited"||i==="failed")&&setTimeout(()=>this.outputByTaskId.delete(n),300*1e3),i==="failed"){let o=s,y=`[failed] ${o?.error??""}`.trim(),d={runId:o.runId,taskId:n,stream:"stderr",text:y+`
2
+ `};this.ensureOutput(n).next({op:"task.output",payload:d,ts:e.ts})}}}ensureOutput(e){let t=String(e??"").trim();return this.outputByTaskId.has(t)||this.outputByTaskId.set(t,new j),this.outputByTaskId.get(t)}applyEventToRuntime(e,t){let s=String(t?.taskId??"").trim(),i=String(t?.runId??"").trim();if(!s||!i)return null;let n=this.runtimeStore.runtimeSignal(s)(),r=n&&n.runId===i?a({},n):{taskId:s,runId:i,projectId:String(t?.projectId??n?.projectId??"").trim(),status:"idle"};switch(e){case"snapshot":let o=t;return r.projectId=String(o?.projectId??r.projectId??"").trim(),r.status=o.status,r.startedAt=o.startedAt,r.stoppedAt=o.stoppedAt,r.pid=o.pid,r.exitCode=o.exitCode,r.signal=o.signal,r;case"started":return r.projectId=String(t?.projectId??r.projectId??"").trim(),r.status="running",r.pid=t?.pid??r.pid,r.startedAt=t?.startedAt??r.startedAt??Date.now(),r.stoppedAt=void 0,r.exitCode=void 0,r.signal=void 0,r;case"stopRequested":return r.status="stopping",r;case"exited":return r.status="stopped",r.exitCode=t?.exitCode??null,r.signal=t?.signal??null,r.stoppedAt=t?.stoppedAt??Date.now(),r;case"failed":return r.status="failed",r.stoppedAt=r.stoppedAt??Date.now(),r.exitCode=r.exitCode??null,r.signal=r.signal??null,r;default:return null}}static \u0275fac=function(t){return new(t||l)(T(V),T(f))};static \u0275prov=h({token:l,factory:l.\u0275fac,providedIn:"root"})};var S=class l{api=m(v);runtimeStore=m(f);state=u({rowsByProject:{},loadingByProject:{},loadedAtByProject:{}});rowsOf(e){let t=(e??"").trim();return p(()=>this.state().rowsByProject[t]??[])}isLoading(e){let t=(e??"").trim();return p(()=>!!this.state().loadingByProject[t])}isLoaded(e){let t=(e??"").trim();return p(()=>this.state().loadedAtByProject[t]!=null)}async ensureLoaded(e,t){let s=(e??"").trim();if(!s)return;let i=this.state(),n=i.loadedAtByProject[s]!=null,r=!!i.loadingByProject[s];if(!(!t?.force&&(n||r))){this.state.update(o=>c(a({},o),{loadingByProject:c(a({},o.loadingByProject),{[s]:!0})}));try{let y=(await I(this.api.getViews(s))??[]).map(d=>({spec:d.spec,runtime:d.runtime?{taskId:d.runtime.taskId,projectId:d.runtime.projectId,runId:d.runtime.runId,status:d.runtime.status,pid:d.runtime.pid,startedAt:d.runtime.startedAt,stoppedAt:d.runtime.stoppedAt,exitCode:d.runtime.exitCode,signal:d.runtime.signal}:void 0}));for(let d of y)d.runtime&&this.runtimeStore.setRuntime(d.runtime);this.state.update(d=>c(a({},d),{rowsByProject:c(a({},d.rowsByProject),{[s]:y}),loadedAtByProject:c(a({},d.loadedAtByProject),{[s]:Date.now()})}))}finally{this.state.update(o=>c(a({},o),{loadingByProject:c(a({},o.loadingByProject),{[s]:!1})}))}}}setRows(e,t){let s=(e??"").trim();if(s){for(let i of t??[])i.runtime&&this.runtimeStore.setRuntime(i.runtime);this.state.update(i=>c(a({},i),{rowsByProject:c(a({},i.rowsByProject),{[s]:t??[]}),loadedAtByProject:c(a({},i.loadedAtByProject),{[s]:Date.now()})}))}}clear(e){let t=(e??"").trim();t&&this.state.update(s=>{let i=a({},s.rowsByProject),n=a({},s.loadingByProject),r=a({},s.loadedAtByProject);return delete i[t],delete n[t],delete r[t],{rowsByProject:i,loadingByProject:n,loadedAtByProject:r}})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=h({token:l,factory:l.\u0275fac,providedIn:"root"})};var k=class l{api=m(M);projectContext=m(w);currentVersion=u(null);availableVersions=u([]);manager=u("none");loading=u(!1);error=u(null);switching=u(!1);switchError=u(null);projectRequirement=u(null);hasVersionManager=u(!1);recommendedVersions=u([]);alreadyInstalled=u(!1);canSwitch=u(!1);getNoManagerMessage(){return"\u8BF7\u5148\u5B89\u88C5 NVM \u6216 Volta \u624D\u80FD\u4F7F\u7528\u81EA\u52A8\u5207\u6362 Node \u7248\u672C\u529F\u80FD"}async getCurrentVersion(){this.loading.set(!0),this.error.set(null);try{let e=await g(this.api.get("/api/node-version/current"));e&&(this.currentVersion.set(e.current),this.availableVersions.set(e.available),this.manager.set(e.manager),this.hasVersionManager.set(e.manager!=="none"),this.canSwitch.set(e.manager!=="none"))}catch(e){this.error.set(e?.message||"\u83B7\u53D6 Node \u7248\u672C\u4FE1\u606F\u5931\u8D25")}finally{this.loading.set(!1)}}async loadProjectRequirement(){let e=this.projectContext.currentProject()?.root;if(!e){this.projectRequirement.set(null);return}try{let t=await g(this.api.post("/api/node-version/project-requirement",{projectPath:e}));this.projectRequirement.set(t)}catch(t){console.error("\u52A0\u8F7D\u9879\u76EE Node \u7248\u672C\u8981\u6C42\u5931\u8D25:",t),this.projectRequirement.set(null)}}async switchVersion(e){if(this.manager()==="none")return this.switchError.set(this.getNoManagerMessage()),!1;this.switching.set(!0),this.switchError.set(null);try{let t=await g(this.api.post("/api/node-version/switch",{version:e}));return t?(this.currentVersion.set(t.current),this.availableVersions.set(t.available),this.manager.set(t.manager),!0):!1}catch(t){let s=t?.error?.message||t?.message||"\u5207\u6362 Node \u7248\u672C\u5931\u8D25";return this.switchError.set(s),!1}finally{this.switching.set(!1)}}clearSwitchError(){this.switchError.set(null)}clearError(){this.error.set(null)}generateRecommendedVersions(e){if(!e)return this.getCommonLTSVersions();let t=n=>{let o=n.replace(/^[\^~>=<]+/,"").match(/^(\d+)\.(\d+)\.(\d+)/);return o?`v${o[1]}.${o[2]}.${o[3]}`:null},s=e.split("||").map(n=>n.trim()),i=new Set;for(let n of s){let r=t(n);r&&i.add(r)}return i.size===0?this.getCommonLTSVersions():Array.from(i)}getCommonLTSVersions(){return["v18.20.0","v20.11.0","v22.11.0"]}async installVersion(e){if(this.manager()==="none")return this.switchError.set(this.getNoManagerMessage()),!1;this.error.set(null);try{let t=await g(this.api.post("/api/node-version/install",{version:e}));return t.success?(this.alreadyInstalled.set(!!t.alreadyInstalled),!0):(this.error.set(t.error||"\u5B89\u88C5\u5931\u8D25"),!1)}catch(t){let s=t?.error?.message||t?.message||"\u5B89\u88C5 Node \u7248\u672C\u5931\u8D25";return this.error.set(s),!1}}async loadRecommendedVersions(){try{let e=await g(this.api.get("/api/node-version/recommended"));this.recommendedVersions.set(e)}catch(e){console.error("\u83B7\u53D6\u63A8\u8350\u7248\u672C\u5931\u8D25:",e),this.recommendedVersions.set(this.getFallbackVersions())}}getFallbackVersions(){return["v18.20.0","v20.11.0","v22.11.0"]}refresh(){this.getCurrentVersion(),this.loadProjectRequirement()}async deleteVersion(e){if(this.manager()==="none")return this.error.set("\u6CA1\u6709\u5B89\u88C5 Node \u7248\u672C\u7BA1\u7406\u5668"),!1;try{return await g(this.api.post("/api/node-version/uninstall",{version:e}))}catch(t){return this.error.set(t?.error?.message||t?.message||"\u5220\u9664\u7248\u672C\u5931\u8D25"),!1}}async writeEngineConfig(e){let t=this.projectContext.currentProject()?.root;if(!t)return this.error.set("\u672A\u627E\u5230\u5F53\u524D\u9879\u76EE"),!1;try{return await g(this.api.post("/api/node-version/write-engine-config",{projectPath:t,version:e}))}catch(s){return this.error.set(s?.error?.message||s?.message||"\u5199\u5165\u914D\u7F6E\u5931\u8D25"),!1}}static \u0275fac=function(t){return new(t||l)};static \u0275prov=h({token:l,factory:l.\u0275fac,providedIn:"root"})};var x=class l{api=m(v);stream=m(b);runtimeStore=m(f);catalog=m(S);nodeVersion=m(k);projectContext=m(w);projectId=u("");keyword=u("");loading=u(!1);selectedTaskId=u("");rows=p(()=>{let e=this.projectId();return e?this.catalog.rowsOf(e)():[]});rowsView=p(()=>this.rows().map(t=>{let s=t.spec.id,i=this.getRuntimeSignal(s);return c(a({},t),{runtime:i??t.runtime})}));rowsViewFiltered=p(()=>{let e=this.keyword().trim().toLowerCase(),t=this.rowsView();return e?t.filter(s=>s.spec.name?.toLowerCase().includes(e)):t});selectedRow=p(()=>{let e=this.selectedTaskId();return this.rowsView().find(t=>t.spec.id===e)??null});selectedRuntimeStatus=p(()=>{let e=this.selectedTaskId();return e?this.getRuntime(e):{status:"idle"}});isRunning=p(()=>this.selectedRuntimeStatus().status==="running");isStopping=p(()=>this.selectedRuntimeStatus().status==="stopping");isStopped=p(()=>{let e=this.selectedRuntimeStatus().status;return e==="idle"||e==="stopped"||e==="failed"||e==="success"});constructor(){R(e=>{let t=this.selectedTaskId();if(!t)return;this.stream.ensureConnected(),this.stream.subscribeTask(t,200);let s=this.runtimeStore.status$(t).subscribe();e(()=>{s.unsubscribe(),this.stream.unsubscribeTask(t)})})}getRuntime(e){return this.runtimeStore.statusSignal(e)()}getRuntimeSignal(e){return this.runtimeStore.runtimeSignal(e)()}async setProject(e){let t=e?.trim();if(!t||this.projectId()===t)return;this.projectId.set(t),this.selectedTaskId.set(""),this.keyword.set(""),await this.catalog.ensureLoaded(t);let s=this.rows()[0];s&&this.select(s.spec.id)}refresh(){let e=this.projectId();e&&(this.loading.set(!0),this.api.refresh(e).subscribe({next:t=>{this.catalog.setRows(e,t??[]),this.loading.set(!1)},error:t=>{this.loading.set(!1)}}),this.api.refreshProjectScripts(e).subscribe({next:t=>{this.projectContext.patchProject(t)},error:()=>{}}))}select(e){this.selectedTaskId.set(e)}toggleTask(){this.isRunning()?this.stopSelected():this.isStopped()&&this.startSelected()}startSelected(e){e=e?.trim()||this.selectedRow()?.spec?.id,e&&this.api.start(e).subscribe({next:()=>{this.nodeVersion.refresh()}})}stopSelected(e){if(e=e?.trim()||this.selectedTaskId(),!e)return;let t=this.getRuntimeSignal(e);t&&this.runtimeStore.setRuntime(c(a({},t),{status:"stopping"})),this.api.stop(e).subscribe({next:()=>{},error:()=>{t&&t.status==="running"&&this.runtimeStore.setRuntime(t)}})}restartSelected(e){e=e?.trim()||this.selectedTaskId(),e&&this.api.restart(e).subscribe()}rowsViewOf(e){return p(()=>{let t=e?.trim();return t?this.catalog.rowsOf(t)().map(i=>{let n=i.spec.id,r=this.getRuntime(n);return c(a({},i),{runtime:c(a({},i.runtime??{}),{status:r.status})})}):[]})}ensureProjectLoaded(e){return this.catalog.ensureLoaded(e)}static \u0275fac=function(t){return new(t||l)};static \u0275prov=h({token:l,factory:l.\u0275fac,providedIn:"root"})};export{b as a,k as b,x as c};