@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,63 @@
1
+ import{M as je}from"./chunk-SPRWNZHF.js";import{A as Me,p as E,w as Ne}from"./chunk-T3KK7ZXB.js";import{B as ue,Bb as $e,Fb as K,Gb as Ae,Gc as Pe,J as de,Jc as Ce,Kc as Le,L as ge,Oa as Se,Ra as Re,T as fe,V as me,Wa as Te,a as f,b as O,ba as ke,ea as xe,fa as be,fc as Oe,gc as _e,hd as De,ib as Q,l as D,na as we,nb as Ee,oa as ye,qa as _,ra as R,sb as N,tc as ze,u as pe,vc as Ie,wc as ve,zb as M}from"./chunk-WI67LAOV.js";function J(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=J();function We(r){A=r}var C={exec:()=>null};function g(r,e=""){let i=typeof r=="string"?r:r.source,n={replace:(t,l)=>{let s=typeof l=="string"?l:l.source;return s=s.replace(b.caret,"$1"),i=i.replace(t,s),n},getRegex:()=>new RegExp(i,e)};return n}var lt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),b={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},at=/^(?:[ \t]*(?:\n|$))+/,ot=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ct=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ht=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Y=/(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ke=g(Qe).replace(/bull/g,Y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),pt=g(Qe).replace(/bull/g,Y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ee=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ut=/^[^\n]+/,te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dt=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gt=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Y).getRegex(),q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ft=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ne).replace("tag",q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xe=g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),mt=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xe).getRegex(),re={blockquote:mt,code:ot,def:dt,fences:ct,heading:ht,hr:L,html:ft,lheading:Ke,list:gt,newline:at,paragraph:Xe,table:C,text:ut},Be=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex(),kt=O(f({},re),{lheading:pt,table:Be,paragraph:g(ee).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",q).getRegex()}),xt=O(f({},re),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(ee).replace("hr",L).replace("heading",` *#{1,6} *[^
2
+ ]`).replace("lheading",Ke).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),bt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ge=/^( {2,}|\\)\n(?!\s*$)/,yt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,H=/[\p{P}\p{S}]/u,ie=/[\s\p{P}\p{S}]/u,Ve=/[^\s\p{P}\p{S}]/u,St=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ie).getRegex(),Je=/(?!~)[\p{P}\p{S}]/u,Rt=/(?!~)[\s\p{P}\p{S}]/u,Tt=/(?:[^\s\p{P}\p{S}]|~)/u,Et=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",lt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ye=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$t=g(Ye,"u").replace(/punct/g,H).getRegex(),At=g(Ye,"u").replace(/punct/g,Je).getRegex(),et="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ot=g(et,"gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,ie).replace(/punct/g,H).getRegex(),_t=g(et,"gu").replace(/notPunctSpace/g,Tt).replace(/punctSpace/g,Rt).replace(/punct/g,Je).getRegex(),zt=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ve).replace(/punctSpace/g,ie).replace(/punct/g,H).getRegex(),It=g(/\\(punct)/,"gu").replace(/punct/g,H).getRegex(),vt=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Pt=g(ne).replace("(?:-->|$)","-->").getRegex(),Ct=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Pt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Lt=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tt=g(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",te).getRegex(),nt=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",te).getRegex(),Dt=g("reflink|nolink(?!\\()","g").replace("reflink",tt).replace("nolink",nt).getRegex(),Fe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,se={_backpedal:C,anyPunctuation:It,autolink:vt,blockSkip:Et,br:Ge,code:wt,del:C,emStrongLDelim:$t,emStrongRDelimAst:Ot,emStrongRDelimUnd:zt,escape:bt,link:Lt,nolink:nt,punctuation:St,reflink:tt,reflinkSearch:Dt,tag:Ct,text:yt,url:C},Nt=O(f({},se),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()}),X=O(f({},se),{emStrongRDelimAst:_t,emStrongLDelim:At,url:g(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Fe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Fe).getRegex()}),Mt=O(f({},X),{br:g(Ge).replace("{2,}","*").getRegex(),text:g(X.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),j={normal:re,gfm:kt,pedantic:xt},I={normal:se,gfm:X,breaks:Mt,pedantic:Nt},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qe=r=>jt[r];function S(r,e){if(e){if(b.escapeTest.test(r))return r.replace(b.escapeReplace,qe)}else if(b.escapeTestNoEncode.test(r))return r.replace(b.escapeReplaceNoEncode,qe);return r}function He(r){try{r=encodeURI(r).replace(b.percentDecode,"%")}catch{return null}return r}function Ze(r,e){let i=r.replace(b.findPipe,(l,s,o)=>{let a=!1,h=s;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),n=i.split(b.splitPipe),t=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;t<n.length;t++)n[t]=n[t].trim().replace(b.slashPipe,"|");return n}function v(r,e,i){let n=r.length;if(n===0)return"";let t=0;for(;t<n;){let l=r.charAt(n-t-1);if(l===e&&!i)t++;else if(l!==e&&i)t++;else break}return r.slice(0,n-t)}function Bt(r,e){if(r.indexOf(e[1])===-1)return-1;let i=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return i>0?-2:-1}function Ue(r,e,i,n,t){let l=e.href,s=e.title||null,o=r[1].replace(t.other.outputLinkReplace,"$1");n.state.inLink=!0;let a={type:r[0].charAt(0)==="!"?"image":"link",raw:i,href:l,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,a}function Ft(r,e,i){let n=r.match(i.other.indentCodeCompensation);if(n===null)return e;let t=n[1];return e.split(`
3
+ `).map(l=>{let s=l.match(i.other.beginningSpace);if(s===null)return l;let[o]=s;return o.length>=t.length?l.slice(t.length):l}).join(`
4
+ `)}var F=class{options;rules;lexer;constructor(r){this.options=r||A}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let i=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?i:v(i,`
5
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let i=e[0],n=Ft(i,e[3]||"",this.rules);return{type:"code",raw:i,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let i=e[2].trim();if(this.rules.other.endingHash.test(i)){let n=v(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:v(e[0],`
6
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let i=v(e[0],`
7
+ `).split(`
8
+ `),n="",t="",l=[];for(;i.length>0;){let s=!1,o=[],a;for(a=0;a<i.length;a++)if(this.rules.other.blockquoteStart.test(i[a]))o.push(i[a]),s=!0;else if(!s)o.push(i[a]);else break;i=i.slice(a);let h=o.join(`
9
+ `),c=h.replace(this.rules.other.blockquoteSetextReplace,`
10
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
11
+ ${h}`:h,t=t?`${t}
12
+ ${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,l,!0),this.lexer.state.top=u,i.length===0)break;let p=l.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let m=p,k=m.raw+`
13
+ `+i.join(`
14
+ `),x=this.blockquote(k);l[l.length-1]=x,n=n.substring(0,n.length-m.raw.length)+x.raw,t=t.substring(0,t.length-m.text.length)+x.text;break}else if(p?.type==="list"){let m=p,k=m.raw+`
15
+ `+i.join(`
16
+ `),x=this.list(k);l[l.length-1]=x,n=n.substring(0,n.length-p.raw.length)+x.raw,t=t.substring(0,t.length-m.raw.length)+x.raw,i=k.substring(l.at(-1).raw.length).split(`
17
+ `);continue}}return{type:"blockquote",raw:n,tokens:l,text:t}}}list(r){let e=this.rules.block.list.exec(r);if(e){let i=e[1].trim(),n=i.length>1,t={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let l=this.rules.other.listItemRegex(i),s=!1;for(;r;){let a=!1,h="",c="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;h=e[0],r=r.substring(h.length);let u=e[2].split(`
18
+ `,1)[0].replace(this.rules.other.listReplaceTabs,U=>" ".repeat(3*U.length)),p=r.split(`
19
+ `,1)[0],m=!u.trim(),k=0;if(this.options.pedantic?(k=2,c=u.trimStart()):m?k=e[1].length+1:(k=e[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,c=u.slice(k),k+=e[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+`
20
+ `,r=r.substring(p.length+1),a=!0),!a){let U=this.rules.other.nextBulletRegex(k),oe=this.rules.other.hrRegex(k),ce=this.rules.other.fencesBeginRegex(k),he=this.rules.other.headingBeginRegex(k),st=this.rules.other.htmlBeginRegex(k);for(;r;){let W=r.split(`
21
+ `,1)[0],z;if(p=W,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),z=p):z=p.replace(this.rules.other.tabCharGlobal," "),ce.test(p)||he.test(p)||st.test(p)||U.test(p)||oe.test(p))break;if(z.search(this.rules.other.nonSpaceChar)>=k||!p.trim())c+=`
22
+ `+z.slice(k);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ce.test(u)||he.test(u)||oe.test(u))break;c+=`
23
+ `+p}!m&&!p.trim()&&(m=!0),h+=W+`
24
+ `,r=r.substring(W.length+1),u=z.slice(k)}}t.loose||(s?t.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let x=null,Z;this.options.gfm&&(x=this.rules.other.listIsTask.exec(c),x&&(Z=x[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),t.items.push({type:"list_item",raw:h,task:!!x,checked:Z,loose:!1,text:c,tokens:[]}),t.raw+=h}let o=t.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let a=0;a<t.items.length;a++)if(this.lexer.state.top=!1,t.items[a].tokens=this.lexer.blockTokens(t.items[a].text,[]),!t.loose){let h=t.items[a].tokens.filter(u=>u.type==="space"),c=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));t.loose=c}if(t.loose)for(let a=0;a<t.items.length;a++)t.items[a].loose=!0;return t}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let i=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:i,raw:e[0],href:n,title:t}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let i=Ze(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
25
+ `):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let s of n)this.rules.other.tableAlignRight.test(s)?l.align.push("right"):this.rules.other.tableAlignCenter.test(s)?l.align.push("center"):this.rules.other.tableAlignLeft.test(s)?l.align.push("left"):l.align.push(null);for(let s=0;s<i.length;s++)l.header.push({text:i[s],tokens:this.lexer.inline(i[s]),header:!0,align:l.align[s]});for(let s of t)l.rows.push(Ze(s,l.header.length).map((o,a)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:l.align[a]})));return l}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let i=e[1].charAt(e[1].length-1)===`
26
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:i,tokens:this.lexer.inline(i)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let l=v(i.slice(0,-1),"\\");if((i.length-l.length)%2===0)return}else{let l=Bt(e[2],"()");if(l===-2)return;if(l>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],t="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(n);l&&(n=l[1],t=l[3])}else t=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Ue(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let i;if((i=this.rules.inline.reflink.exec(r))||(i=this.rules.inline.nolink.exec(r))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[n.toLowerCase()];if(!t){let l=i[0].charAt(0);return{type:"text",raw:l,text:l}}return Ue(i,t,i[0],this.lexer,this.rules)}}emStrong(r,e,i=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let t=[...n[0]].length-1,l,s,o=t,a=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+t);(n=h.exec(e))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(s=[...l].length,n[3]||n[4]){o+=s;continue}else if((n[5]||n[6])&&t%3&&!((t+s)%3)){a+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+a);let c=[...n[0]][0].length,u=r.slice(0,t+n.index+c+s);if(Math.min(t,s)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let i=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),t=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&t&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:e[0],text:i}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let i,n;return e[2]==="@"?(i=e[1],n="mailto:"+i):(i=e[1],n=i),{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let i,n;if(e[2]==="@")i=e[0],n="mailto:"+i;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);i=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let i=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:i}}}},w=class G{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||A,this.options.tokenizer=this.options.tokenizer||new F,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:b,block:j.normal,inline:I.normal};this.options.pedantic?(i.block=j.pedantic,i.inline=I.pedantic):this.options.gfm&&(i.block=j.gfm,this.options.breaks?i.inline=I.breaks:i.inline=I.gfm),this.tokenizer.rules=i}static get rules(){return{block:j,inline:I}}static lex(e,i){return new G(i).lex(e)}static lexInline(e,i){return new G(i).inlineTokens(e)}lex(e){e=e.replace(b.carriageReturn,`
27
+ `),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let n=this.inlineQueue[i];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],n=!1){for(this.options.pedantic&&(e=e.replace(b.tabCharGlobal," ").replace(b.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(s=>(t=s.call({lexer:this},e,i))?(e=e.substring(t.raw.length),i.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let s=i.at(-1);t.raw.length===1&&s!==void 0?s.raw+=`
28
+ `:i.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let s=i.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
29
+ `)?"":`
30
+ `)+t.raw,s.text+=`
31
+ `+t.text,this.inlineQueue.at(-1).src=s.text):i.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let s=i.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
32
+ `)?"":`
33
+ `)+t.raw,s.text+=`
34
+ `+t.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},i.push(t));continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),i.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),i.push(t);continue}let l=e;if(this.options.extensions?.startBlock){let s=1/0,o=e.slice(1),a;this.options.extensions.startBlock.forEach(h=>{a=h.call({lexer:this},o),typeof a=="number"&&a>=0&&(s=Math.min(s,a))}),s<1/0&&s>=0&&(l=e.substring(0,s+1))}if(this.state.top&&(t=this.tokenizer.paragraph(l))){let s=i.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
35
+ `)?"":`
36
+ `)+t.raw,s.text+=`
37
+ `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):i.push(t),n=l.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let s=i.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
38
+ `)?"":`
39
+ `)+t.raw,s.text+=`
40
+ `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):i.push(t);continue}if(e){let s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let n=e,t=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)a.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,t.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(t=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)l=t[2]?t[2].length:0,n=n.slice(0,t.index+l)+"["+"a".repeat(t[0].length-l-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let s=!1,o="";for(;e;){s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,i))?(e=e.substring(a.raw.length),i.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=i.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):i.push(a);continue}if(a=this.tokenizer.emStrong(e,n,o)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),i.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),i.push(a);continue}let h=e;if(this.options.extensions?.startInline){let c=1/0,u=e.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},u),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(h=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(h)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;let c=i.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):i.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return i}},T=class{options;parser;constructor(r){this.options=r||A}space(r){return""}code({text:r,lang:e,escaped:i}){let n=(e||"").match(b.notSpaceStart)?.[0],t=r.replace(b.endingNewline,"")+`
41
+ `;return n?'<pre><code class="language-'+S(n)+'">'+(i?t:S(t,!0))+`</code></pre>
42
+ `:"<pre><code>"+(i?t:S(t,!0))+`</code></pre>
43
+ `}blockquote({tokens:r}){return`<blockquote>
44
+ ${this.parser.parse(r)}</blockquote>
45
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
46
+ `}hr(r){return`<hr>
47
+ `}list(r){let e=r.ordered,i=r.start,n="";for(let s=0;s<r.items.length;s++){let o=r.items[s];n+=this.listitem(o)}let t=e?"ol":"ul",l=e&&i!==1?' start="'+i+'"':"";return"<"+t+l+`>
48
+ `+n+"</"+t+`>
49
+ `}listitem(r){let e="";if(r.task){let i=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=i+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=i+" "+S(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(r.tokens,!!r.loose),`<li>${e}</li>
50
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
51
+ `}table(r){let e="",i="";for(let t=0;t<r.header.length;t++)i+=this.tablecell(r.header[t]);e+=this.tablerow({text:i});let n="";for(let t=0;t<r.rows.length;t++){let l=r.rows[t];i="";for(let s=0;s<l.length;s++)i+=this.tablecell(l[s]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
52
+ <thead>
53
+ `+e+`</thead>
54
+ `+n+`</table>
55
+ `}tablerow({text:r}){return`<tr>
56
+ ${r}</tr>
57
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),i=r.header?"th":"td";return(r.align?`<${i} align="${r.align}">`:`<${i}>`)+e+`</${i}>
58
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${S(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:i}){let n=this.parser.parseInline(i),t=He(r);if(t===null)return n;r=t;let l='<a href="'+r+'"';return e&&(l+=' title="'+S(e)+'"'),l+=">"+n+"</a>",l}image({href:r,title:e,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let t=He(r);if(t===null)return S(i);r=t;let l=`<img src="${r}" alt="${i}"`;return e&&(l+=` title="${S(e)}"`),l+=">",l}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:S(r.text)}},le=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},y=class V{options;renderer;textRenderer;constructor(e){this.options=e||A,this.options.renderer=this.options.renderer||new T,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new le}static parse(e,i){return new V(i).parse(e)}static parseInline(e,i){return new V(i).parseInline(e)}parse(e,i=!0){let n="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let o=l,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=a||"";continue}}let s=l;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"def":{n+=this.renderer.def(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let o=s,a=this.renderer.text(o);for(;t+1<e.length&&e[t+1].type==="text";)o=e[++t],a+=`
59
+ `+this.renderer.text(o);i?n+=this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):n+=a;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(e,i=this.renderer){let n="";for(let t=0;t<e.length;t++){let l=e[t];if(this.options.extensions?.renderers?.[l.type]){let o=this.options.extensions.renderers[l.type].call({parser:this},l);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=o||"";continue}}let s=l;switch(s.type){case"escape":{n+=i.text(s);break}case"html":{n+=i.html(s);break}case"link":{n+=i.link(s);break}case"image":{n+=i.image(s);break}case"strong":{n+=i.strong(s);break}case"em":{n+=i.em(s);break}case"codespan":{n+=i.codespan(s);break}case"br":{n+=i.br(s);break}case"del":{n+=i.del(s);break}case"text":{n+=i.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},P=class{options;block;constructor(r){this.options=r||A}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?w.lex:w.lexInline}provideParser(){return this.block?y.parse:y.parseInline}},qt=class{defaults=J();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=T;TextRenderer=le;Lexer=w;Tokenizer=F;Hooks=P;constructor(...r){this.use(...r)}walkTokens(r,e){let i=[];for(let n of r)switch(i=i.concat(e.call(this,n)),n.type){case"table":{let t=n;for(let l of t.header)i=i.concat(this.walkTokens(l.tokens,e));for(let l of t.rows)for(let s of l)i=i.concat(this.walkTokens(s.tokens,e));break}case"list":{let t=n;i=i.concat(this.walkTokens(t.items,e));break}default:{let t=n;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(l=>{let s=t[l].flat(1/0);i=i.concat(this.walkTokens(s,e))}):t.tokens&&(i=i.concat(this.walkTokens(t.tokens,e)))}}return i}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(i=>{let n=f({},i);if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let l=e.renderers[t.name];l?e.renderers[t.name]=function(...s){let o=t.renderer.apply(this,s);return o===!1&&(o=l.apply(this,s)),o}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[t.level];l?l.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&(t.level==="block"?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:t.level==="inline"&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),n.extensions=e),i.renderer){let t=this.defaults.renderer||new T(this.defaults);for(let l in i.renderer){if(!(l in t))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let s=l,o=i.renderer[s],a=t[s];t[s]=(...h)=>{let c=o.apply(t,h);return c===!1&&(c=a.apply(t,h)),c||""}}n.renderer=t}if(i.tokenizer){let t=this.defaults.tokenizer||new F(this.defaults);for(let l in i.tokenizer){if(!(l in t))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let s=l,o=i.tokenizer[s],a=t[s];t[s]=(...h)=>{let c=o.apply(t,h);return c===!1&&(c=a.apply(t,h)),c}}n.tokenizer=t}if(i.hooks){let t=this.defaults.hooks||new P;for(let l in i.hooks){if(!(l in t))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let s=l,o=i.hooks[s],a=t[s];P.passThroughHooks.has(l)?t[s]=h=>{if(this.defaults.async&&P.passThroughHooksRespectAsync.has(l))return(async()=>{let u=await o.call(t,h);return a.call(t,u)})();let c=o.call(t,h);return a.call(t,c)}:t[s]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await o.apply(t,h);return u===!1&&(u=await a.apply(t,h)),u})();let c=o.apply(t,h);return c===!1&&(c=a.apply(t,h)),c}}n.hooks=t}if(i.walkTokens){let t=this.defaults.walkTokens,l=i.walkTokens;n.walkTokens=function(s){let o=[];return o.push(l.call(this,s)),t&&(o=o.concat(t.call(this,s))),o}}this.defaults=f(f({},this.defaults),n)}),this}setOptions(r){return this.defaults=f(f({},this.defaults),r),this}lexer(r,e){return w.lex(r,e??this.defaults)}parser(r,e){return y.parse(r,e??this.defaults)}parseMarkdown(r){return(e,i)=>{let n=f({},i),t=f(f({},this.defaults),n),l=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&n.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(t.hooks&&(t.hooks.options=t,t.hooks.block=r),t.async)return(async()=>{let s=t.hooks?await t.hooks.preprocess(e):e,o=await(t.hooks?await t.hooks.provideLexer():r?w.lex:w.lexInline)(s,t),a=t.hooks?await t.hooks.processAllTokens(o):o;t.walkTokens&&await Promise.all(this.walkTokens(a,t.walkTokens));let h=await(t.hooks?await t.hooks.provideParser():r?y.parse:y.parseInline)(a,t);return t.hooks?await t.hooks.postprocess(h):h})().catch(l);try{t.hooks&&(e=t.hooks.preprocess(e));let s=(t.hooks?t.hooks.provideLexer():r?w.lex:w.lexInline)(e,t);t.hooks&&(s=t.hooks.processAllTokens(s)),t.walkTokens&&this.walkTokens(s,t.walkTokens);let o=(t.hooks?t.hooks.provideParser():r?y.parse:y.parseInline)(s,t);return t.hooks&&(o=t.hooks.postprocess(o)),o}catch(s){return l(s)}}}onError(r,e){return i=>{if(i.message+=`
60
+ Please report this to https://github.com/markedjs/marked.`,r){let n="<p>An error occurred:</p><pre>"+S(i.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(i);throw i}}},$=new qt;function d(r,e){return $.parse(r,e)}d.options=d.setOptions=function(r){return $.setOptions(r),d.defaults=$.defaults,We(d.defaults),d};d.getDefaults=J;d.defaults=A;d.use=function(...r){return $.use(...r),d.defaults=$.defaults,We(d.defaults),d};d.walkTokens=function(r,e){return $.walkTokens(r,e)};d.parseInline=$.parseInline;d.Parser=y;d.parser=y.parse;d.Renderer=T;d.TextRenderer=le;d.Lexer=w;d.lexer=w.lex;d.Tokenizer=F;d.Hooks=P;d.parse=d;var on=d.options,cn=d.setOptions,hn=d.use,pn=d.walkTokens,un=d.parseInline;var dn=y.parse,gn=w.lex;var Ht=["*"],Zt="Copy",Ut="Copied",Wt=(()=>{let e=class e{constructor(){this._buttonClick$=new D,this.copied=je(this._buttonClick$.pipe(xe(()=>ge(pe(!0),de(3e3).pipe(fe(!1)))),me(),ke(1))),this.copiedText=De(()=>this.copied()?Ut:Zt)}onCopyToClipboardClick(){this._buttonClick$.next()}};e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=K({type:e,selectors:[["markdown-clipboard"]],decls:2,vars:3,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(t,l){t&1&&(Oe(0,"button",0),ze("click",function(){return l.onCopyToClipboardClick()}),Ce(1),_e()),t&2&&(Pe("copied",l.copied()),Ee(),Le(l.copiedText()))},encapsulation:2,changeDetection:0});let r=e;return r})(),Qt=new _("CLIPBOARD_OPTIONS");var ae=(function(r){return r.CommandLine="command-line",r.LineHighlight="line-highlight",r.LineNumbers="line-numbers",r})(ae||{}),Kt=new _("MARKED_EXTENSIONS"),Xt=new _("MARKED_OPTIONS"),Gt=new _("MERMAID_OPTIONS"),rt=new _("SANITIZE");function Vt(r){return typeof r=="function"}var Jt="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",Yt="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",en="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",tn="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",nn="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",rn="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information";var it=(()=>{let e=class e{get options(){return this._options}set options(n){this._options=f(f({},this.DEFAULT_MARKED_OPTIONS),n)}get renderer(){return this.options.renderer}set renderer(n){this.options.renderer=n}constructor(n,t,l,s,o,a,h,c){this.clipboardOptions=n,this.extensions=t,this.mermaidOptions=s,this.platform=o,this.sanitize=a,this.http=h,this.sanitizer=c,this.DEFAULT_MARKED_OPTIONS={renderer:new T},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new D,this.reload$=this._reload$.asObservable(),this.options=l}parse(n,t=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:l,inline:s,emoji:o,mermaid:a,disableSanitizer:h}=t,c=f(f({},this.options),t.markedOptions),u=c.renderer||this.renderer||new T;this.extensions&&(this.renderer=this.extendsRendererForExtensions(u)),a&&(this.renderer=this.extendsRendererForMermaid(u));let p=this.trimIndentation(n),m=l?this.decodeHtml(p):p,k=o?this.parseEmoji(m):m,x=this.parseMarked(k,c,s);return h?x:this.sanitizeHtml(x)}render(n,t=this.DEFAULT_RENDER_OPTIONS,l){let{clipboard:s,clipboardOptions:o,katex:a,katexOptions:h,mermaid:c,mermaidOptions:u}=t;a&&this.renderKatex(n,f(f({},this.DEFAULT_KATEX_OPTIONS),h)),c&&this.renderMermaid(n,f(f(f({},this.DEFAULT_MERMAID_OPTIONS),this.mermaidOptions),u)),s&&this.renderClipboard(n,l,f(f(f({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),o)),this.highlight(n)}reload(){this._reload$.next()}getSource(n){if(!this.http)throw new Error(rn);return this.http.get(n,{responseType:"text"}).pipe(ue(t=>this.handleExtension(n,t)))}highlight(n){if(!E(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;n||(n=document);let t=n.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,l=>l.classList.add("language-none")),Prism.highlightAllUnder(n)}decodeHtml(n){if(!E(this.platform))return n;let t=document.createElement("textarea");return t.innerHTML=n,t.value}extendsRendererForExtensions(n){let t=n;return t.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&d.use(...this.extensions),t.\u0275NgxMarkdownRendererExtendedForExtensions=!0),n}extendsRendererForMermaid(n){let t=n;if(t.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return n;let l=n.code;return n.code=s=>s.lang==="mermaid"?`<div class="mermaid">${s.text}</div>`:l(s),t.\u0275NgxMarkdownRendererExtendedForMermaid=!0,n}handleExtension(n,t){let l=n.lastIndexOf("://"),s=l>-1?n.substring(l+4):n,o=s.lastIndexOf("/"),a=o>-1?s.substring(o+1).split("?")[0]:"",h=a.lastIndexOf("."),c=h>-1?a.substring(h+1):"";return c&&c!=="md"?"```"+c+`
61
+ `+t+"\n```":t}parseMarked(n,t,l=!1){if(t.renderer){let s=f({},t.renderer);delete s.\u0275NgxMarkdownRendererExtendedForExtensions,delete s.\u0275NgxMarkdownRendererExtendedForMermaid,delete t.renderer,d.use({renderer:s})}return l?d.parseInline(n,t):d.parse(n,t)}parseEmoji(n){if(!E(this.platform))return n;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(Jt);return joypixels.shortnameToUnicode(n)}renderKatex(n,t){if(E(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(Yt);renderMathInElement(n,t)}}renderClipboard(n,t,l){if(!E(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(tn);if(!t)throw new Error(nn);let{buttonComponent:s,buttonTemplate:o}=l,a=n.querySelectorAll("pre");for(let h=0;h<a.length;h++){let c=a.item(h),u=document.createElement("div");u.style.position="relative",c.parentNode.insertBefore(u,c),u.appendChild(c);let p=document.createElement("div");p.classList.add("markdown-clipboard-toolbar"),p.style.position="absolute",p.style.top=".5em",p.style.right=".5em",p.style.zIndex="1",u.insertAdjacentElement("beforeend",p),u.onmouseenter=()=>p.classList.add("hover"),u.onmouseleave=()=>p.classList.remove("hover");let m;if(s){let x=t.createComponent(s);m=x.hostView,x.changeDetectorRef.markForCheck()}else if(o)m=t.createEmbeddedView(o);else{let x=t.createComponent(Wt);m=x.hostView,x.changeDetectorRef.markForCheck()}let k;m.rootNodes.forEach(x=>{p.appendChild(x),k=new ClipboardJS(x,{text:()=>c.innerText})}),m.onDestroy(()=>k.destroy())}}renderMermaid(n,t=this.DEFAULT_MERMAID_OPTIONS){if(!E(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(en);let l=n.querySelectorAll(".mermaid");l.length!==0&&(mermaid.initialize(t),mermaid.run({nodes:l}))}trimIndentation(n){if(!n)return"";let t;return n.split(`
62
+ `).map(l=>{let s=t;return l.length>0&&(s=isNaN(s)?l.search(/\S|$/):Math.min(l.search(/\S|$/),s)),isNaN(t)&&(t=s),s?l.substring(s):l}).join(`
63
+ `)}async sanitizeHtml(n){return Vt(this.sanitize)?this.sanitize(await n):this.sanitize!==Q.NONE?this.sanitizer.sanitize(this.sanitize,n)??"":n}};e.\u0275fac=function(t){return new(t||e)(R(Qt,8),R(Kt,8),R(Xt,8),R(Gt,8),R(Te),R(rt),R(Ne,8),R(Me))},e.\u0275prov=we({token:e,factory:e.\u0275fac});let r=e;return r})(),Hn=(()=>{let e=class e{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(n){this._disableSanitizer=this.coerceBooleanProperty(n)}get inline(){return this._inline}set inline(n){this._inline=this.coerceBooleanProperty(n)}get clipboard(){return this._clipboard}set clipboard(n){this._clipboard=this.coerceBooleanProperty(n)}get emoji(){return this._emoji}set emoji(n){this._emoji=this.coerceBooleanProperty(n)}get katex(){return this._katex}set katex(n){this._katex=this.coerceBooleanProperty(n)}get mermaid(){return this._mermaid}set mermaid(n){this._mermaid=this.coerceBooleanProperty(n)}get lineHighlight(){return this._lineHighlight}set lineHighlight(n){this._lineHighlight=this.coerceBooleanProperty(n)}get lineNumbers(){return this._lineNumbers}set lineNumbers(n){this._lineNumbers=this.coerceBooleanProperty(n)}get commandLine(){return this._commandLine}set commandLine(n){this._commandLine=this.coerceBooleanProperty(n)}constructor(n,t,l){this.element=n,this.markdownService=t,this.viewContainerRef=l,this.error=new N,this.load=new N,this.ready=new N,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new D}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(be(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}async render(n,t=!1){let l={decodeHtml:t,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},s={clipboard:this.clipboard,clipboardOptions:this.getClipboardOptions(),katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},o=await this.markdownService.parse(n,l);this.element.nativeElement.innerHTML=o,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,s,this.viewContainerRef),this.ready.emit()}coerceBooleanProperty(n){return n!=null&&`${String(n)}`!="false"}getClipboardOptions(){if(this.clipboardButtonComponent||this.clipboardButtonTemplate)return{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate}}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:n=>{this.render(n).then(()=>{this.load.emit(n)})},error:n=>this.error.emit(n)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,ae.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,ae.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(n,t){let l=n.querySelectorAll("pre");for(let s=0;s<l.length;s++){let o=t instanceof Array?t:[t];l.item(s).classList.add(...o)}}setPluginOptions(n,t){let l=n.querySelectorAll("pre");for(let s=0;s<l.length;s++)Object.keys(t).forEach(o=>{let a=t[o];if(a){let h=this.toLispCase(o);l.item(s).setAttribute(h,a.toString())}})}toLispCase(n){let t=n.match(/([A-Z])/g);if(!t)return n;let l=n.toString();for(let s=0,o=t.length;s<o;s++)l=l.replace(new RegExp(t[s]),"-"+t[s].toLowerCase());return l.slice(0,1)==="-"&&(l=l.slice(1)),l}};e.\u0275fac=function(t){return new(t||e)(M(Re),M(it),M($e))},e.\u0275cmp=K({type:e,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},features:[Se],ngContentSelectors:Ht,decls:1,vars:0,template:function(t,l){t&1&&(Ie(),ve(0))},encapsulation:2});let r=e;return r})();function sn(r){return[it,r?.loader??[],r?.clipboardOptions??[],r?.markedOptions??[],r?.mermaidOptions??[],r?.markedExtensions??[],an(r?.sanitize)??[]]}function ln(r){return r!=null&&r.provide!=null}function an(r){return ln(r)?r:{provide:rt,useValue:r??Q.HTML}}var Zn=(()=>{let e=class e{static forRoot(n){return{ngModule:e,providers:[sn(n)]}}static forChild(){return{ngModule:e}}};e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Ae({type:e}),e.\u0275inj=ye({});let r=e;return r})();export{Hn as a,sn as b,Zn as c};
@@ -0,0 +1 @@
1
+ import{a as Oe,b as Te}from"./chunk-XJ5KZQNN.js";import{a as be,b as Ie}from"./chunk-INL2PELS.js";import"./chunk-SIVPP74B.js";import{b as Ne}from"./chunk-WD4IAQR3.js";import{a as je,b as we}from"./chunk-WF2QTF5L.js";import"./chunk-DW7F5PEA.js";import"./chunk-KVFR7GFV.js";import{b as le,c as pe,d as se,e as xe,g as ze,h as De}from"./chunk-JU3TEDBV.js";import{a as Me}from"./chunk-UQGCUFNM.js";import"./chunk-5T5KA5PG.js";import{d as Pe,e as ye}from"./chunk-UXXWRMM6.js";import{$b as _e,Eb as me,Fa as ne,Ga as ie,Gb as ce,Kb as de,Oa as oe,Ra as re,Sa as ae,Ub as ue,Xb as ge,Zb as fe,ac as Ce,dc as ve,fc as he}from"./chunk-SPRWNZHF.js";import"./chunk-HFZLJHYR.js";import{h as B}from"./chunk-L5D75AMV.js";import{i as te,n as E}from"./chunk-T3KK7ZXB.js";import{$b as L,B as A,Ec as J,Fb as $,Gb as w,Ha as _,Jc as p,Kc as T,Lb as O,Lc as z,Nc as K,Oc as Q,Pc as X,Uc as Y,Vb as U,W as y,Wb as v,Yb as h,Yc as V,a as g,ac as G,b as f,bc as u,cc as o,cd as Z,dc as r,ec as m,hd as I,ic as W,id as ee,jc as H,kc as k,lc as M,na as q,nb as a,oa as j,rc as b,sa as x,uc as d,ya as D,za as P}from"./chunk-WI67LAOV.js";var N=class n{api=x(Pe);getDeps(t){return this.api.get(`/api/deps/list/${t}`).pipe(A(e=>({items:[...e.dependencies.map(l=>f(g({},l),{group:"dependencies"})),...e.devDependencies.map(l=>f(g({},l),{group:"devDependencies"}))],meta:e.meta})))}install(t,e){return this.api.post(`/api/deps/install/${t}`,e)}uninstall(t,e){return this.api.post(`/api/deps/uninstall/${t}`,e)}installDevtools(t){return this.api.post(`/api/deps/devtools/install/${t}`,{tool:"devtools"})}getProjectNodeInfo(t){return this.api.post("/api/node-version/project-requirement",{projectPath:t})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})};var Fe=["class","component"],Se=n=>({$implicit:n,title:"\u8FD0\u884C\u4F9D\u8D56"}),ke=n=>({$implicit:n,title:"\u5F00\u53D1\u4F9D\u8D56"});function Ve(n,t){if(n&1&&(o(0,"div",8),m(1,"span",15),o(2,"span",10),p(3,"Node \u7248\u672C\uFF1A"),r(),o(4,"span",11),p(5),r()()),n&2){let e,i=d(2);a(5),z(" ",((e=i.meta())==null?null:e.voltaConfig)||((e=i.meta())==null?null:e.enginesNode)," ")}}function Be(n,t){if(n&1&&(o(0,"div",14),m(1,"span",15),o(2,"span",10),p(3,"\u63A8\u8350 Node \u7248\u672C\uFF1A"),r(),o(4,"span",11),p(5),r(),m(6,"span",16),r()),n&2){let e,i=d(2);a(5),z(" ",(e=i.nodeVersionInfo())==null?null:e.requiredVersion," "),a(),u("nz-tooltip","\u6839\u636E\u9879\u76EE\u6846\u67B6\u7248\u672C\u81EA\u52A8\u63A8\u8350")}}function Re(n,t){if(n&1&&(o(0,"div",6)(1,"div",8),m(2,"span",9),o(3,"span",10),p(4,"\u5305\u7BA1\u7406\u5668\uFF1A"),r(),o(5,"span",11),p(6),r()(),o(7,"div",8),m(8,"span",12),o(9,"span",10),p(10,"\u4ED3\u5E93\u72B6\u6001\uFF1A"),r(),o(11,"nz-tag",13),p(12),r()(),v(13,Ve,6,1,"div",8)(14,Be,7,2,"div",14),r()),n&2){let e,i,l,c,s,C=d();a(6),T(((e=C.meta())==null?null:e.packageManager)||"-"),a(2),u("nzType",(i=C.meta())!=null&&i.registryOnline?"cloud-server":"cloud"),a(3),u("nzColor",(l=C.meta())!=null&&l.registryOnline?"success":"error"),a(),z(" ",(c=C.meta())!=null&&c.registryOnline?"\u5728\u7EBF":"\u79BB\u7EBF"," "),a(),h((s=C.meta())!=null&&s.voltaConfig||(s=C.meta())!=null&&s.enginesNode?13:(s=C.nodeVersionInfo())!=null&&s.requiredVersion?14:-1)}}function Ae(n,t){n&1&&k(0)}function qe(n,t){n&1&&k(0)}function $e(n,t){n&1&&(o(0,"nz-tag",30),p(1,"\u5DF2\u5B89\u88C5"),r())}function Ue(n,t){n&1&&(o(0,"nz-tag",31),p(1,"\u672A\u5B89\u88C5"),r())}function Le(n,t){if(n&1){let e=M();o(0,"button",37),b("click",function(){D(e);let l=d().$implicit,c=d(2);return P(c.installOrUpdate(l))}),m(1,"nz-icon",38),r()}if(n&2){let e=d().$implicit,i=d(2);u("nzLoading",i.installing()[e.name])("nz-tooltip",e.hasUpdate?"\u66F4\u65B0\u5230\u6700\u65B0\u7248\u672C":"\u5B89\u88C5\u4F9D\u8D56")}}function Ge(n,t){if(n&1){let e=M();o(0,"button",39),b("nzOnConfirm",function(){D(e);let l=d().$implicit,c=d(2);return P(c.uninstall(l))}),m(1,"nz-icon",40),r()}if(n&2){let e=d().$implicit;u("nzPopconfirmTitle",Y("\u786E\u5B9A\u5378\u8F7D ",e.name,"\uFF1F")),a(),u("nz-tooltip","\u5378\u8F7D"+e.name)}}function We(n,t){if(n&1){let e=M();o(0,"div",19)(1,"div",21)(2,"div",22)(3,"div",23),m(4,"span",24),r(),o(5,"div",25)(6,"div",26),p(7),r(),o(8,"div",27)(9,"span"),p(10),r(),o(11,"span",28),p(12,"\xB7"),r(),o(13,"span"),p(14),r(),o(15,"span",28),p(16,"\xB7"),r(),o(17,"span"),p(18),r()()()(),o(19,"div",29),v(20,$e,2,0,"nz-tag",30)(21,Ue,2,0,"nz-tag",31),o(22,"a",32),b("click",function(){let l=D(e).$implicit,c=d(2);return P(c.openDetail(l))}),m(23,"span",33),p(24," \u67E5\u770B\u8BE6\u60C5 "),r()(),o(25,"div",34),v(26,Le,2,2,"button",35),v(27,Ge,2,3,"button",36),r()()()}if(n&2){let e=t.$implicit;a(7),T(e.name),a(3),z("\u7248\u672C ",e.current||"-"),a(4),z("\u8981\u6C42 ",e.required||"-"),a(4),z("\u6700\u65B0 ",e.latest||"-"),a(2),h(e.installed?20:21),a(6),h(e.hasUpdate||!e.installed?26:-1),a(),h(e.installed?27:-1)}}function He(n,t){n&1&&(o(0,"div",20),p(1,"\u65E0\u6570\u636E"),r())}function Je(n,t){if(n&1&&(o(0,"div",17),p(1),r(),o(2,"div",18),L(3,We,28,7,"div",19,U().trackByName,!0),v(5,He,2,0,"div",20),r()),n&2){let e=t.$implicit,i=t.title;a(),T(i),a(2),G(e),a(2),h(e.length===0?5:-1)}}var F=class n{api=x(N);msg=x(ye);projectContext=x(Me);projectId=I(()=>this.projectContext.currentProjectId()||"");loading=_(!1);keyword=_("");items=_([]);meta=_(null);nodeVersionInfo=_(null);installing=_({});uninstalling=_({});runtimeItems=I(()=>this.filterItems(this.items().filter(t=>t.group==="dependencies")));devItems=I(()=>this.filterItems(this.items().filter(t=>t.group==="devDependencies")));runningCount=I(()=>this.items().filter(t=>t.hasUpdate).length);depsState=x(N);constructor(){ee(async()=>{this.refresh()})}filterItems(t){let e=this.keyword().trim().toLowerCase();return e?t.filter(i=>i.name.toLowerCase().includes(e)):t}refresh(){this.loading.set(!0),this.nodeVersionInfo.set(null),this.api.getDeps(this.projectId()).pipe(y(()=>this.loading.set(!1))).subscribe({next:({items:t,meta:e})=>{this.items.set(t),this.meta.set(e),!e?.voltaConfig&&!e?.enginesNode&&this.loadNodeVersionInfo()},error:t=>this.msg.error(t?.message||"\u52A0\u8F7D\u4F9D\u8D56\u5931\u8D25")})}loadNodeVersionInfo(){let t=this.projectContext.currentProject();t?.root&&this.api.getProjectNodeInfo(t.root).subscribe({next:e=>{this.nodeVersionInfo.set(e)},error:()=>{this.nodeVersionInfo.set(null)}})}openDetail(t){t.homepage?window.open(t.homepage,"_blank"):window.open(`https://www.npmjs.com/package/${encodeURIComponent(t.name)}`,"_blank")}installOrUpdate(t){let e=t.name;this.installing.set(f(g({},this.installing()),{[e]:!0}));let i=t.installed&&t.hasUpdate?"latest":"required",l=t.installed&&t.hasUpdate?"\u5DF2\u66F4\u65B0":"\u5DF2\u5B89\u88C5";this.api.install(this.projectId(),{name:t.name,group:t.group,target:i}).pipe(y(()=>this.installing.set(f(g({},this.installing()),{[e]:!1})))).subscribe({next:()=>{this.msg.success(l),this.refresh()}})}uninstall(t){let e=t.name;this.uninstalling.set(f(g({},this.uninstalling()),{[e]:!0})),this.api.uninstall(this.projectId(),{name:t.name,group:t.group}).pipe(y(()=>this.uninstalling.set(f(g({},this.uninstalling()),{[e]:!1})))).subscribe({next:()=>{this.msg.success("\u5DF2\u5378\u8F7D"),this.refresh()}})}installDevtools(){this.loading.set(!0),this.api.installDevtools(this.projectId()).pipe(y(()=>this.loading.set(!1))).subscribe({next:()=>{this.msg.success("devtools \u5DF2\u5B89\u88C5"),this.refresh()},error:t=>this.msg.error(t?.message||"devtools \u5B89\u88C5\u5931\u8D25")})}installAll(){let t=this.items().filter(i=>!i.installed);if(!t.length){this.msg.info("\u6CA1\u6709\u9700\u8981\u5B89\u88C5\u7684\u4F9D\u8D56");return}(async()=>{this.loading.set(!0);try{for(let i of t)await new Promise((l,c)=>{this.api.install(this.projectId(),{name:i.name,group:i.group,target:"required"}).subscribe({next:()=>l(),error:s=>c(s)})});this.msg.success("\u5DF2\u5B8C\u6210\u5B89\u88C5"),this.refresh()}catch{this.msg.error("\u6279\u91CF\u5B89\u88C5\u5931\u8D25")}finally{this.loading.set(!1)}})()}trackByName(t,e){return e.group+":"+e.name}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=$({type:n,selectors:[["app-project-deps",8,"component"]],attrs:Fe,decls:13,vars:12,consts:[["contentTemplate",""],[3,"title","loading"],["ngProjectAs","actions",5,["actions"]],["nz-input","","placeholder","\u641C\u7D22",1,"search",3,"ngModelChange","ngModel"],["nzType","search","nzInputPrefix",""],[1,"panel"],[1,"version-info"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"version-info-item"],["nz-icon","","nzType","inbox"],[1,"version-label"],[1,"version-value"],["nz-icon","",3,"nzType"],[3,"nzColor"],[1,"version-info-item","recommended-version"],["nz-icon","","nzType","proj:node"],["nz-icon","","nzType","question-circle",1,"recommended-badge",3,"nz-tooltip"],[1,"group-title"],[1,"list"],[1,"row"],[1,"empty"],["nz-row","","nzAlign","middle",1,"row-inner"],["nz-col","","nzFlex","400px",1,"left"],[1,"pkg-icon"],["nz-icon","","nzType","appstore"],[1,"pkg"],[1,"name"],[1,"sub"],[1,"sep"],["nz-col","","nzFlex","auto",1,"mid"],["nzColor","success"],["nzColor","warning"],[1,"detail",3,"click"],["nz-icon","","nzType","link"],["nz-col","","nzFlex","180px",1,"right"],["nz-button","","nzType","text",3,"nzLoading","nz-tooltip"],["nz-button","","nzType","text","nz-popconfirm","",3,"nzPopconfirmTitle"],["nz-button","","nzType","text",3,"click","nzLoading","nz-tooltip"],["nzType","download"],["nz-button","","nzType","text","nz-popconfirm","",3,"nzOnConfirm","nzPopconfirmTitle"],["nzType","delete","nzTheme","fill",3,"nz-tooltip"]],template:function(e,i){if(e&1){let l=M();o(0,"app-page-layout",1),W(1,2),m(2,"app-ng-devtool"),o(3,"nz-input-wrapper")(4,"input",3),X("ngModelChange",function(s){return D(l),Q(i.keyword,s)||(i.keyword=s),P(s)}),b("ngModelChange",function(s){return D(l),P(i.keyword.set(s))}),r(),m(5,"nz-icon",4),r(),H(),o(6,"div",5),v(7,Re,15,5,"div",6),O(8,Ae,1,0,"ng-container",7),m(9,"nz-divider"),O(10,qe,1,0,"ng-container",7),r()(),O(11,Je,6,2,"ng-template",null,0,Z)}if(e&2){let l=J(12);u("title","\u9879\u76EE\u914D\u7F6E")("loading",i.loading()),a(4),K("ngModel",i.keyword),a(3),h(i.meta()?7:-1),a(),u("ngTemplateOutlet",l)("ngTemplateOutletContext",V(8,Se,i.runtimeItems())),a(2),u("ngTemplateOutlet",l)("ngTemplateOutletContext",V(10,ke,i.devItems()))}},dependencies:[E,te,ue,me,ce,de,se,pe,le,ae,re,oe,Ce,fe,_e,ge,ie,ne,he,ve,we,je,Ne,Te,Oe,Ie,be,ze,De,xe],styles:[".panel[_ngcontent-%COMP%]{border-radius:10px;padding:16px 18px;box-shadow:0 2px 8px #0000000f}.version-info[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px 32px;padding:12px 16px;background:linear-gradient(135deg,#1890ff0a,#52c41a0a);border-radius:8px;margin-bottom:20px;border:1px solid rgba(24,144,255,.08)}.version-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14px;opacity:.85}.version-info-item[_ngcontent-%COMP%] nz-icon[_ngcontent-%COMP%]{font-size:16px;opacity:.6}.version-info-item[_ngcontent-%COMP%] .version-label[_ngcontent-%COMP%]{font-weight:500;color:var(--text-color-secondary)}.version-info-item[_ngcontent-%COMP%] .version-value[_ngcontent-%COMP%]{font-weight:600;color:var(--text-color-primary)}.version-info-item.recommended-version[_ngcontent-%COMP%]{padding:4px 12px;background:#52c41a14;border-radius:6px;border:1px solid rgba(82,196,26,.2)}.version-info-item.recommended-version[_ngcontent-%COMP%] .version-value[_ngcontent-%COMP%]{color:#52c41a}.version-info-item.recommended-version[_ngcontent-%COMP%] .recommended-badge[_ngcontent-%COMP%]{color:#52c41a;cursor:help}.group-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;margin:6px 0 12px;opacity:.65}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.row[_ngcontent-%COMP%]{border-radius:10px}.row[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #0000001a;background:var(--app-primary-3)}.row-inner[_ngcontent-%COMP%]{padding:10px 12px}.left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.left[_ngcontent-%COMP%] .pkg-icon[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:8px;opacity:.65;display:inline-flex;align-items:center;justify-content:center}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-weight:600;line-height:18px}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{margin-top:2px;font-size:12px;opacity:.55}.left[_ngcontent-%COMP%] .pkg[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%] .sep[_ngcontent-%COMP%]{margin:0 6px}.mid[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px}.mid[_ngcontent-%COMP%] .detail[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:var(--text-color-primary)}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:6px}.empty[_ngcontent-%COMP%]{padding:16px 0;text-align:center}"]})};var Ke=[{path:"",component:F}],S=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=w({type:n});static \u0275inj=j({imports:[B.forChild(Ke),B]})};var Ee=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=w({type:n});static \u0275inj=j({imports:[E,S]})};export{Ee as DependenciesModule};
@@ -0,0 +1 @@
1
+ import{a as ot}from"./chunk-WD4IAQR3.js";import{Bb as it,L as d,R as J,S as v,c as Y,oa as K,ra as Q,sa as tt,ta as et}from"./chunk-SPRWNZHF.js";import{i as X}from"./chunk-T3KK7ZXB.js";import{B as u,C as T,Ca as V,Da as $,Fb as U,Gb as Z,Lb as G,M as A,Q as p,Ra as j,V as N,Wb as g,Wc as W,Yb as m,a as o,bc as q,cc as C,dc as E,ec as B,ha as x,l as S,m as h,ma as F,n as y,na as R,nb as f,oa as _,sa as r,sb as k,tb as P,u as b,uc as H,xd as z}from"./chunk-WI67LAOV.js";function nt(e,c){e&1&&(C(0,"div",0),B(1,"nz-spin"),E())}function st(e,c){}function rt(e,c){if(e&1&&(C(0,"div",1),G(1,st,0,0,"ng-template",2),E()),e&2){let t=H();f(),q("ngTemplateOutlet",t.nzToolkit)}}var a={UNLOAD:"unload",LOADING:"loading",LOADED:"LOADED"},O="codeEditor";function I(e){return(...c)=>{e&&e(...c)}}var D=new y(1),l=a.UNLOAD,dt=(()=>{class e{nzConfigService=r(tt);document=r(V);firstEditorInitialized=!1;option={};config;option$=new h(this.option);constructor(){let t=this.nzConfigService.getConfigForComponent(O);this.config=o({},t),this.config.monacoEnvironment&&(window.MonacoEnvironment=o({},this.config.monacoEnvironment)),this.option=this.config.defaultEditorOption||{},et(O,()=>{let i=this.nzConfigService.getConfigForComponent(O);i&&this._updateDefaultOption(i.defaultEditorOption)})}_updateDefaultOption(t){this.option=o(o({},this.option),t),this.option$.next(this.option),"theme"in t&&t.theme&&monaco.editor.setTheme(t.theme)}requestToInit(){return l===a.LOADED?(this.onInit(),b(this.getLatestOption())):(l===a.UNLOAD&&(this.config.useStaticLoading&&typeof monaco>"u"?v("You choose to use static loading but it seems that you forget to config webpack plugin correctly. Please refer to our official websitefor more details about static loading."):this.loadMonacoScript()),D.pipe(x(()=>this.onInit()),u(()=>this.getLatestOption())))}loadMonacoScript(){if(this.config.useStaticLoading){Promise.resolve().then(()=>this.onLoad());return}if(l===a.LOADING)return;l=a.LOADING;let t=this.config.assetsRoot,i=t?`${t}/vs`:"assets/vs",n=window,s=this.document.createElement("script");s.type="text/javascript",s.src=`${i}/loader.js`;let L=()=>{w(),n.require.config(o({paths:{vs:i}},this.config.extraConfig)),n.require(["vs/editor/editor.main"],()=>{this.onLoad()})},M=()=>{throw w(),new Error(`${J} cannot load assets of monaco editor from source "${i}".`)},w=()=>{s.removeEventListener("load",L),s.removeEventListener("error",M),this.document.documentElement.removeChild(s)};s.addEventListener("load",L),s.addEventListener("error",M),this.document.documentElement.appendChild(s)}onLoad(){l=a.LOADED,D.next(!0),D.complete(),I(this.config.onLoad)()}onInit(){this.firstEditorInitialized||(this.firstEditorInitialized=!0,I(this.config.onFirstEditorInit)()),I(this.config.onInit)()}getLatestOption(){return o({},this.option)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=R({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),at=(()=>{class e{nzCodeEditorService=r(dt);ngZone=r(P);platform=r(Y);destroyRef=r($);nzEditorMode="normal";nzOriginalText="";nzLoading=!1;nzFullControl=!1;nzToolkit;set nzEditorOption(t){this.editorOption$.next(t)}nzEditorInitialized=new k;editorOptionCached={};el=r(j).nativeElement;resize$=new S;editorOption$=new h({});editorInstance=null;value="";modelSet=!1;onDidChangeContentDisposable=null;constructor(){this.el.classList.add("ant-code-editor"),this.destroyRef.onDestroy(()=>{this.onDidChangeContentDisposable&&(this.onDidChangeContentDisposable.dispose(),this.onDidChangeContentDisposable=null),this.editorInstance&&(this.editorInstance.dispose(),this.editorInstance=null)})}ngAfterViewInit(){this.platform.isBrowser&&this.nzCodeEditorService.requestToInit().pipe(d(this.destroyRef)).subscribe(t=>this.setup(t))}writeValue(t){this.value=t,this.setValue()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouch=t}onChange=t=>{};onTouch=()=>{};layout(){this.resize$.next()}setup(t){this.ngZone.runOutsideAngular(()=>K().pipe(d(this.destroyRef)).subscribe(()=>{this.editorOptionCached=t,this.registerOptionChanges(),this.initMonacoEditorInstance(),this.registerResizeChange(),this.setValue(),this.nzFullControl||this.setValueEmitter(),this.nzEditorInitialized.observers.length&&this.ngZone.run(()=>this.nzEditorInitialized.emit(this.editorInstance))}))}registerOptionChanges(){T([this.editorOption$,this.nzCodeEditorService.option$]).pipe(d(this.destroyRef)).subscribe(([t,i])=>{this.editorOptionCached=o(o(o({},this.editorOptionCached),i),t),this.updateOptionToMonaco()})}initMonacoEditorInstance(){this.ngZone.runOutsideAngular(()=>{this.editorInstance=this.nzEditorMode==="normal"?monaco.editor.create(this.el,o({},this.editorOptionCached)):monaco.editor.createDiffEditor(this.el,o({},this.editorOptionCached))})}registerResizeChange(){Q(window,"resize").pipe(p(300),d(this.destroyRef)).subscribe(()=>{this.layout()}),this.resize$.pipe(d(this.destroyRef),A(()=>!!this.editorInstance),u(()=>({width:this.el.clientWidth,height:this.el.clientHeight})),N((t,i)=>t.width===i.width&&t.height===i.height),p(50)).subscribe(()=>{this.editorInstance.layout()})}setValue(){if(this.editorInstance){if(this.nzFullControl&&this.value){v("should not set value when you are using full control mode! It would result in ambiguous data flow!");return}if(this.nzEditorMode==="normal")if(this.modelSet){let t=this.editorInstance.getModel();this.preservePositionAndSelections(()=>t.setValue(this.value))}else this.editorInstance.setModel(monaco.editor.createModel(this.value,this.editorOptionCached.language)),this.modelSet=!0;else if(this.modelSet){let t=this.editorInstance.getModel();this.preservePositionAndSelections(()=>{t.modified.setValue(this.value),t.original.setValue(this.nzOriginalText)})}else{let t=this.editorOptionCached.language;this.editorInstance.setModel({original:monaco.editor.createModel(this.nzOriginalText,t),modified:monaco.editor.createModel(this.value,t)}),this.modelSet=!0}}}preservePositionAndSelections(t){if(!this.editorInstance){t();return}let i=this.editorInstance.getPosition(),n=this.editorInstance.getSelections();t(),i&&this.editorInstance.setPosition(i),n&&this.editorInstance.setSelections(n)}setValueEmitter(){let t=this.nzEditorMode==="normal"?this.editorInstance.getModel():this.editorInstance.getModel().modified;this.onDidChangeContentDisposable=t.onDidChangeContent(()=>{this.emitValue(t.getValue())})}emitValue(t){this.value!==t&&(this.value=t,this.ngZone.run(()=>{this.onChange(t)}))}updateOptionToMonaco(){this.editorInstance&&this.editorInstance.updateOptions(o({},this.editorOptionCached))}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=U({type:e,selectors:[["nz-code-editor"]],inputs:{nzEditorMode:"nzEditorMode",nzOriginalText:"nzOriginalText",nzLoading:[2,"nzLoading","nzLoading",z],nzFullControl:[2,"nzFullControl","nzFullControl",z],nzToolkit:"nzToolkit",nzEditorOption:"nzEditorOption"},outputs:{nzEditorInitialized:"nzEditorInitialized"},exportAs:["nzCodeEditor"],features:[W([{provide:it,useExisting:F(()=>e),multi:!0}])],decls:2,vars:2,consts:[[1,"ant-code-editor-loading"],[1,"ant-code-editor-toolkit"],[3,"ngTemplateOutlet"]],template:function(i,n){i&1&&(g(0,nt,2,0,"div",0),g(1,rt,2,1,"div",1)),i&2&&(m(n.nzLoading?0:-1),f(),m(n.nzToolkit?1:-1))},dependencies:[ot,X],encapsulation:2,changeDetection:0})}return e})(),yt=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=Z({type:e});static \u0275inj=_({imports:[at]})}return e})();export{at as a,yt as b};
@@ -0,0 +1 @@
1
+ import{Ca as a,Gb as u,na as c,oa as r,sa as d}from"./chunk-WI67LAOV.js";var s=class{_document;_textarea;constructor(i,o){this._document=o;let t=this._textarea=this._document.createElement("textarea"),n=t.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",t.setAttribute("aria-hidden","true"),t.value=i,t.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(t)}copy(){let i=this._textarea,o=!1;try{if(i){let t=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),o=this._document.execCommand("copy"),t&&t.focus()}}catch{}return o}destroy(){let i=this._textarea;i&&(i.remove(),this._textarea=void 0)}},x=(()=>{class e{_document=d(a);constructor(){}copy(o){let t=this.beginCopy(o),n=t.copy();return t.destroy(),n}beginCopy(o){return new s(o,this._document)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var D=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=u({type:e});static \u0275inj=r({})}return e})();export{x as a,D as b};
@@ -0,0 +1,2 @@
1
+ import{Da as zi,E as ft,Fa as yt,G as _i,Ga as zt,H as Ci,Ha as we,Ia as Se,L as se,Oa as bt,Pa as wt,Ra as St,S as vi,Sa as Tt,U as mt,Va as Pt,Ya as bi,Za as wi,a as ze,ba as Di,bb as Si,d as We,da as ut,e as be,f as ai,fb as Ti,g as li,h as dt,ha as _t,i as A,ia as Ct,k as ci,l as ht,m as di,p as hi,r as pt,ra as vt,s as pi,sa as Dt,t as gi,ta as yi,u as oe,v as gt,w as fi,x as mi,y as ui}from"./chunk-SPRWNZHF.js";import{c as ri,d as at,f as ye,g as lt,h as ct}from"./chunk-HFZLJHYR.js";import{$b as ni,$c as st,Ac as B,B as Ut,Ba as K,Bb as Le,Ca as me,Da as Xe,Fb as M,Fc as J,G as Kt,Gb as X,Gc as ee,Ha as Je,Hb as I,Hc as ve,Ib as tt,Ic as De,Jb as Fe,Jc as te,K as qt,Kb as it,L as Ne,Lb as G,Lc as ie,M as pe,Oa as Ae,Pa as Xt,Ra as q,S as $,Ub as j,Wb as b,Wc as He,Xa as Jt,Yb as w,Zc as si,_b as ii,a as he,ac as oi,ad as rt,bc as C,c as jt,cc as _,da as ge,dc as v,ea as Qt,ec as O,fa as x,g as Z,ha as Yt,i as Ye,ic as ue,jb as Q,jc as _e,l as p,lc as N,m as Zt,na as fe,nb as m,nc as nt,oa as U,p as $t,qa as L,rc as P,sa as c,sb as g,sc as ot,tb as Y,td as ne,uc as f,vb as ei,wb as k,xb as et,xc as Be,xd as u,ya as E,yb as ti,yc as Ce,yd as Ve,za as R,zc as F}from"./chunk-WI67LAOV.js";var Pi=class o{static formats={B:{max:1024},kB:{max:Math.pow(1024,2),prev:"B"},KB:{max:Math.pow(1024,2),prev:"B"},MB:{max:Math.pow(1024,3),prev:"kB"},GB:{max:Math.pow(1024,4),prev:"MB"},TB:{max:Number.MAX_SAFE_INTEGER,prev:"GB"}};transform(i,e=0,t="B",n){if(!(_t(i)&&_t(e)&&e%1===0&&e>=0))return i;let s=i,r=t;for(;r!=="B";)s*=1024,r=o.formats[r].prev;if(n){let a=o.formats[n],l=Ct(o.calculateResult(a,s),e);return o.formatResult(l,n)}for(let a in o.formats)if(o.formats.hasOwnProperty(a)){let l=o.formats[a];if(s<l.max){let d=Ct(o.calculateResult(l,s),e);return o.formatResult(d,a)}}}static formatResult(i,e){return`${i} ${e}`}static calculateResult(i,e){let t=i.prev?o.formats[i.prev]:void 0;return t?e/t.max:e}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=tt({name:"nzBytes",type:o,pure:!0})},Et=(()=>{class o{transform(e,t="px"){return typeof e=="number"?`${e}${t}`:e}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=tt({name:"nzToCssUnit",type:o,pure:!0})}return o})();var Rt=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=X({type:o});static \u0275inj=U({})}return o})();function Mt(o){let i=o.cloneNode(!0),e=i.querySelectorAll("[id]"),t=o.nodeName.toLowerCase();i.removeAttribute("id");for(let n=0;n<e.length;n++)e[n].removeAttribute("id");return t==="canvas"?ki(o,i):(t==="input"||t==="select"||t==="textarea")&&xi(o,i),Ri("canvas",o,i,ki),Ri("input, textarea, select",o,i,xi),i}function Ri(o,i,e,t){let n=i.querySelectorAll(o);if(n.length){let s=e.querySelectorAll(o);for(let r=0;r<n.length;r++)t(n[r],s[r])}}var Tn=0;function xi(o,i){i.type!=="file"&&(i.value=o.value),i.type==="radio"&&i.name&&(i.name=`mat-clone-${i.name}-${Tn++}`)}function ki(o,i){let e=i.getContext("2d");if(e)try{e.drawImage(o,0,0)}catch{}}function Bt(o){let i=o.getBoundingClientRect();return{top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.width,height:i.height,x:i.x,y:i.y}}function It(o,i,e){let{top:t,bottom:n,left:s,right:r}=o;return e>=t&&e<=n&&i>=s&&i<=r}function Pn(o,i){let e=i.left<o.left,t=i.left+i.width>o.right,n=i.top<o.top,s=i.top+i.height>o.bottom;return e||t||n||s}function Ee(o,i,e){o.top+=i,o.bottom=o.top+o.height,o.left+=e,o.right=o.left+o.width}function Mi(o,i,e,t){let{top:n,right:s,bottom:r,left:a,width:l,height:d}=o,h=l*i,D=d*i;return t>n-D&&t<r+D&&e>a-h&&e<s+h}var Ge=class{_document;positions=new Map;constructor(i){this._document=i}clear(){this.positions.clear()}cache(i){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),i.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Bt(e)})})}handleScroll(i){let e=be(i),t=this.positions.get(e);if(!t)return null;let n=t.scrollPosition,s,r;if(e===this._document){let d=this.getViewportScrollPosition();s=d.top,r=d.left}else s=e.scrollTop,r=e.scrollLeft;let a=n.top-s,l=n.left-r;return this.positions.forEach((d,h)=>{d.clientRect&&e!==h&&e.contains(h)&&Ee(d.clientRect,a,l)}),n.top=s,n.left=r,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function ji(o,i){let e=o.rootNodes;if(e.length===1&&e[0].nodeType===i.ELEMENT_NODE)return e[0];let t=i.createElement("div");return e.forEach(n=>t.appendChild(n)),t}function Ht(o,i,e){for(let t in i)if(i.hasOwnProperty(t)){let n=i[t];n?o.setProperty(t,n,e?.has(t)?"important":""):o.removeProperty(t)}return o}function re(o,i){let e=i?"":"none";Ht(o.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function Ii(o,i,e){Ht(o.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},e)}function je(o,i){return i&&i!="none"?o+" "+i:o}function Oi(o,i){o.style.width=`${i.width}px`,o.style.height=`${i.height}px`,o.style.transform=Re(i.left,i.top)}function Re(o,i){return`translate3d(${Math.round(o)}px, ${Math.round(i)}px, 0)`}function Ni(o){let i=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*i}function En(o){let i=getComputedStyle(o),e=xt(i,"transition-property"),t=e.find(a=>a==="transform"||a==="all");if(!t)return 0;let n=e.indexOf(t),s=xt(i,"transition-duration"),r=xt(i,"transition-delay");return Ni(s[n])+Ni(r[n])}function xt(o,i){return o.getPropertyValue(i).split(",").map(t=>t.trim())}var Rn=new Set(["position"]),Ot=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(i,e,t,n,s,r,a,l,d,h){this._document=i,this._rootElement=e,this._direction=t,this._initialDomRect=n,this._previewTemplate=s,this._previewClass=r,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=d,this._renderer=h}attach(i){this._preview=this._createPreview(),i.appendChild(this._preview),Ai(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(i){this._preview.style.transform=i}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(i){this._preview.classList.add(i)}getTransitionDuration(){return En(this._preview)}addEventListener(i,e){return this._renderer.listen(this._preview,i,e)}_createPreview(){let i=this._previewTemplate,e=this._previewClass,t=i?i.template:null,n;if(t&&i){let s=i.matchSize?this._initialDomRect:null,r=i.viewContainer.createEmbeddedView(t,i.context);r.detectChanges(),n=ji(r,this._document),this._previewEmbeddedView=r,i.matchSize?Oi(n,s):n.style.transform=Re(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else n=Mt(this._rootElement),Oi(n,this._initialDomRect),this._initialTransform&&(n.style.transform=this._initialTransform);return Ht(n.style,{"pointer-events":"none",margin:Ai(n)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Rn),re(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("popover","manual"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>n.classList.add(s)):n.classList.add(e)),n}};function Ai(o){return"showPopover"in o}var xn={passive:!0},Li={passive:!1},kn={passive:!1,capture:!0},Mn=800,Fi="cdk-drag-placeholder",Bi=new Set(["position"]),Nt=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Je(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new p;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=Z.EMPTY;_pointerUpSubscription=Z.EMPTY;_scrollSubscription=Z.EMPTY;_resizeSubscription=Z.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(i){i!==this._disabled&&(this._disabled=i,this._toggleNativeDragInteractions(),this._handles.forEach(e=>re(e,i)))}_disabled=!1;beforeStarted=new p;started=new p;released=new p;ended=new p;entered=new p;exited=new p;dropped=new p;moved=this._moveEvents;data;constrainPosition;constructor(i,e,t,n,s,r,a){this._config=e,this._document=t,this._ngZone=n,this._viewportRuler=s,this._dragDropRegistry=r,this._renderer=a,this.withRootElement(i).withParent(e.parentDragRef||null),this._parentPositions=new Ge(t),r.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(t=>A(t)),this._handles.forEach(t=>re(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){let e=A(i);if(e!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"mousedown",this._pointerDown,Li),t.listen(e,"touchstart",this._pointerDown,xn),t.listen(e,"dragstart",this._nativeDragStart,Li)]),this._initialTransform=void 0,this._rootElement=e}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?A(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&Pn(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let i=this._boundaryElement.getBoundingClientRect(),e=this._rootElement.getBoundingClientRect(),t=0,n=0;e.left<i.left?t=i.left-e.left:e.right>i.right&&(t=i.right-e.right),e.top<i.top?n=i.top-e.top:e.bottom>i.bottom&&(n=i.bottom-e.bottom);let s=this._activeTransform.x,r=this._activeTransform.y,a=s+t,l=r+n;this._rootElement.style.transform=Re(a,l),this._activeTransform={x:a,y:l},this._passiveTransform={x:a,y:l}}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),re(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),re(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){let i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){let i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null}_pointerDown=i=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,i)}else this.disabled||this._initializeDragSequence(this._rootElement,i)};_pointerMove=i=>{let e=this._getPointerPositionOnPage(i);if(!this._hasStartedDragging()){let n=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(n+s>=this._config.dragStartThreshold){let a=Date.now()>=this._dragStartTime+this._getDragStartDelay(i),l=this._dropContainer;if(!a){this._endDragSequence(i);return}(!l||!l.isDragging()&&!l.isReceiving())&&(i.cancelable&&i.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(i)))}return}i.cancelable&&i.preventDefault();let t=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,e);else{let n=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=t.x-n.x+this._passiveTransform.x,s.y=t.y-n.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:i,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta})})};_pointerUp=i=>{this._endDragSequence(i)};_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){Te(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(e,"selectstart",In,kn)}),t){let n=this._rootElement,s=n.parentNode,r=this._placeholder=this._createPlaceholderElement(),a=this._marker=this._marker||this._document.createComment("");s.insertBefore(a,n),this._initialTransform=n.style.transform||"",this._preview=new Ot(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(s,e)),Ii(n,!1,Bi),this._document.body.appendChild(s.replaceChild(r,n)),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),n=Te(e),s=!n&&e.button!==0,r=this._rootElement,a=be(e),l=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+Mn>Date.now(),d=n?wi(e):bi(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),t||s||l||d)return;if(this._handles.length){let T=r.style;this._rootElementTapHighlight=T.webkitTapHighlightColor||"",T.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(T=>this._updateOnScroll(T)),this._boundaryElement&&(this._boundaryRect=Bt(this._boundaryElement));let h=this._previewTemplate;this._pickupPositionInElement=h&&h.template&&!h.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,e);let D=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:D.x,y:D.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(i){Ii(this._rootElement,!0,Bi),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),n=this._getPointerPositionOnPage(i),s=this._getDragDistance(n),r=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:s,dropPoint:n,event:i}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:s,dropPoint:n,event:i}),e.drop(this,t,this._initialIndex,this._initialContainer,r,s,n,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:e},{x:t,y:n}){let s=this._initialContainer._getSiblingContainerFromPosition(this,i,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{let r=this._dropContainer.getItemIndex(this),a=this._dropContainer.getItemAtIndex(r+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(s,this._dropContainer,a),this._dropContainer=s,this._dropContainer.enter(this,i,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,n),this._dropContainer._sortItem(this,i,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,e):this._applyPreviewTransform(i-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let i=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let n=a=>{(!a||this._preview&&be(a)===this._preview.element&&a.propertyName==="transform")&&(r(),t(),clearTimeout(s))},s=setTimeout(n,e*1.5),r=this._preview.addEventListener("transitionend",n)}))}_createPlaceholderElement(){let i=this._placeholderTemplate,e=i?i.template:null,t;return e?(this._placeholderRef=i.viewContainer.createEmbeddedView(e,i.context),this._placeholderRef.detectChanges(),t=ji(this._placeholderRef,this._document)):t=Mt(this._rootElement),t.style.pointerEvents="none",t.classList.add(Fi),t}_getPointerPositionInElement(i,e,t){let n=e===this._rootElement?null:e,s=n?n.getBoundingClientRect():i,r=Te(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition(),l=r.pageX-s.left-a.left,d=r.pageY-s.top-a.top;return{x:s.left-i.left+l,y:s.top-i.top+d}}_getPointerPositionOnPage(i){let e=this._getViewportScrollPosition(),t=Te(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,n=t.pageX-e.left,s=t.pageY-e.top;if(this._ownerSVGElement){let r=this._ownerSVGElement.getScreenCTM();if(r){let a=this._ownerSVGElement.createSVGPoint();return a.x=n,a.y=s,a.matrixTransform(r.inverse())}}return{x:n,y:s}}_getConstrainedPointerPosition(i){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:n}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if(this.lockAxis==="x"||e==="x"?n=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:r}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:d}=this._getPreviewRect(),h=a.top+r,D=a.bottom-(d-r),T=a.left+s,ce=a.right-(l-s);t=Hi(t,T,ce),n=Hi(n,h,D)}return{x:t,y:n}}_updatePointerDirectionDelta(i){let{x:e,y:t}=i,n=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-s.x),a=Math.abs(t-s.y);return r>this._config.pointerDirectionChangeThreshold&&(n.x=e>s.x?1:-1,s.x=e),a>this._config.pointerDirectionChangeThreshold&&(n.y=t>s.y?1:-1,s.y=t),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,re(this._rootElement,i))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(i=>i()),this._rootElementCleanups=void 0}_applyRootElementTransform(i,e){let t=1/this.scale,n=Re(i*t,e*t),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=je(n,this._initialTransform)}_applyPreviewTransform(i,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,n=Re(i,e);this._preview.setTransform(je(n,t))}_getDragDistance(i){let e=this._pickupPositionOnPage;return e?{x:i.x-e.x,y:i.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:e}=this._passiveTransform;if(i===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),n=this._boundaryElement.getBoundingClientRect();if(n.width===0&&n.height===0||t.width===0&&t.height===0)return;let s=n.left-t.left,r=t.right-n.right,a=n.top-t.top,l=t.bottom-n.bottom;n.width>t.width?(s>0&&(i+=s),r>0&&(i-=r)):i=0,n.height>t.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(i!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:i})}_getDragStartDelay(i){let e=this.dragStartDelay;return typeof e=="number"?e:Te(i)?e.touch:e?e.mouse:0}_updateOnScroll(i){let e=this._parentPositions.handleScroll(i);if(e){let t=be(i);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&Ee(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=We(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,e){let t=this._previewContainer||"global";if(t==="parent")return i;if(t==="global"){let n=this._document;return e||n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement||n.body}return A(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=i=>{if(this._handles.length){let e=this._getTargetHandle(i);e&&!this._disabledHandles.has(e)&&!this.disabled&&i.preventDefault()}else this.disabled||i.preventDefault()};_getTargetHandle(i){return this._handles.find(e=>i.target&&(i.target===e||e.contains(i.target)))}_conditionallyInsertAnchor(i,e,t){if(i===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(e===this._initialContainer&&e.hasAnchor){let n=this._anchor??=Mt(this._placeholder);n.classList.remove(Fi),n.classList.add("cdk-drag-anchor"),n.style.transform="",t?t.before(n):A(e.element).appendChild(n)}}};function Hi(o,i,e){return Math.max(i,Math.min(e,o))}function Te(o){return o.type[0]==="t"}function In(o){o.preventDefault()}function Zi(o,i,e){let t=Vi(i,o.length-1),n=Vi(e,o.length-1);if(t===n)return;let s=o[t],r=n<t?-1:1;for(let a=t;a!==n;a+=r)o[a]=o[a+r];o[n]=s}function Vi(o,i){return Math.max(0,Math.min(i,o))}var Ze=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(i){this._dragDropRegistry=i}_previousSwap={drag:null,delta:0,overlaps:!1};start(i){this.withItems(i)}sort(i,e,t,n){let s=this._itemPositions,r=this._getItemIndexFromPointerPosition(i,e,t,n);if(r===-1&&s.length>0)return null;let a=this.orientation==="horizontal",l=s.findIndex(z=>z.drag===i),d=s[r],h=s[l].clientRect,D=d.clientRect,T=l>r?1:-1,ce=this._getItemOffsetPx(h,D,T),Ke=this._getSiblingOffsetPx(l,s,T),qe=s.slice();return Zi(s,l,r),s.forEach((z,Qe)=>{if(qe[Qe]===z)return;let Me=z.drag===i,de=Me?ce:Ke,Ie=Me?i.getPlaceholderElement():z.drag.getRootElement();z.offset+=de;let Oe=Math.round(z.offset*(1/z.drag.scale));a?(Ie.style.transform=je(`translate3d(${Oe}px, 0, 0)`,z.initialTransform),Ee(z.clientRect,0,de)):(Ie.style.transform=je(`translate3d(0, ${Oe}px, 0)`,z.initialTransform),Ee(z.clientRect,de,0))}),this._previousSwap.overlaps=It(D,e,t),this._previousSwap.drag=d.drag,this._previousSwap.delta=a?n.x:n.y,{previousIndex:l,currentIndex:r}}enter(i,e,t,n){let s=n==null||n<0?this._getItemIndexFromPointerPosition(i,e,t):n,r=this._activeDraggables,a=r.indexOf(i),l=i.getPlaceholderElement(),d=r[s];if(d===i&&(d=r[s+1]),!d&&(s==null||s===-1||s<r.length-1)&&this._shouldEnterAsFirstChild(e,t)&&(d=r[0]),a>-1&&r.splice(a,1),d&&!this._dragDropRegistry.isDragging(d)){let h=d.getRootElement();h.parentElement.insertBefore(l,h),r.splice(s,0,i)}else this._element.appendChild(l),r.push(i);l.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables?.forEach(i=>{let e=i.getRootElement();if(e){let t=this._itemPositions.find(n=>n.drag===i)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return this._getVisualItemPositions().findIndex(e=>e.drag===i)}getItemAtIndex(i){return this._getVisualItemPositions()[i]?.drag||null}updateOnScroll(i,e){this._itemPositions.forEach(({clientRect:t})=>{Ee(t,i,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(i){this._element=i}_cacheItemPositions(){let i=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:Bt(t)}}).sort((e,t)=>i?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions}_getItemOffsetPx(i,e,t){let n=this.orientation==="horizontal",s=n?e.left-i.left:e.top-i.top;return t===-1&&(s+=n?e.width-i.width:e.height-i.height),s}_getSiblingOffsetPx(i,e,t){let n=this.orientation==="horizontal",s=e[i].clientRect,r=e[i+t*-1],a=s[n?"width":"height"]*t;if(r){let l=n?"left":"top",d=n?"right":"bottom";t===-1?a-=r.clientRect[l]-s[d]:a+=s[l]-r.clientRect[d]}return a}_shouldEnterAsFirstChild(i,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,n=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let r=t[t.length-1].clientRect;return n?i>=r.right:e>=r.bottom}else{let r=t[0].clientRect;return n?i<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(i,e,t,n){let s=this.orientation==="horizontal",r=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===i)return!1;if(n){let d=s?n.x:n.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&d===this._previousSwap.delta)return!1}return s?e>=Math.floor(l.left)&&e<Math.floor(l.right):t>=Math.floor(l.top)&&t<Math.floor(l.bottom)});return r===-1||!this._sortPredicate(r,i)?-1:r}},At=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(i,e){this._document=i,this._dragDropRegistry=e}start(i){let e=this._element.childNodes;this._relatedNodes=[];for(let t=0;t<e.length;t++){let n=e[t];this._relatedNodes.push([n,n.nextSibling])}this.withItems(i)}sort(i,e,t,n){let s=this._getItemIndexFromPointerPosition(i,e,t),r=this._previousSwap;if(s===-1||this._activeItems[s]===i)return null;let a=this._activeItems[s];if(r.drag===a&&r.overlaps&&r.deltaX===n.x&&r.deltaY===n.y)return null;let l=this.getItemIndex(i),d=i.getPlaceholderElement(),h=a.getRootElement();s>l?h.after(d):h.before(d),Zi(this._activeItems,l,s);let D=this._getRootNode().elementFromPoint(e,t);return r.deltaX=n.x,r.deltaY=n.y,r.drag=a,r.overlaps=h===D||h.contains(D),{previousIndex:l,currentIndex:s}}enter(i,e,t,n){let s=this._activeItems.indexOf(i);s>-1&&this._activeItems.splice(s,1);let r=n==null||n<0?this._getItemIndexFromPointerPosition(i,e,t):n;r===-1&&(r=this._getClosestItemIndexToPointer(i,e,t));let a=this._activeItems[r];a&&!this._dragDropRegistry.isDragging(a)?(this._activeItems.splice(r,0,i),a.getRootElement().before(i.getPlaceholderElement())):(this._activeItems.push(i),this._element.appendChild(i.getPlaceholderElement()))}withItems(i){this._activeItems=i.slice()}withSortPredicate(i){this._sortPredicate=i}reset(){let i=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[n,s]=this._relatedNodes[t];n.parentNode===i&&n.nextSibling!==s&&(s===null?i.appendChild(n):s.parentNode===i&&i.insertBefore(n,s))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(i){return this._activeItems.indexOf(i)}getItemAtIndex(i){return this._activeItems[i]||null}updateOnScroll(){this._activeItems.forEach(i=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(i){i!==this._element&&(this._element=i,this._rootNode=void 0)}_getItemIndexFromPointerPosition(i,e,t){let n=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),s=n?this._activeItems.findIndex(r=>{let a=r.getRootElement();return n===a||a.contains(n)}):-1;return s===-1||!this._sortPredicate(s,i)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=We(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(i,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let n=1/0,s=-1;for(let r=0;r<this._activeItems.length;r++){let a=this._activeItems[r];if(a!==i){let{x:l,y:d}=a.getRootElement().getBoundingClientRect(),h=Math.hypot(e-l,t-d);h<n&&(n=h,s=r)}}return s}},Wi=.05,$i=.05,S=(function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o})(S||{}),y=(function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o})(y||{}),Lt=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new p;entered=new p;exited=new p;dropped=new p;sorted=new p;receivingStarted=new p;receivingStopped=new p;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=Z.EMPTY;_verticalScrollDirection=S.NONE;_horizontalScrollDirection=y.NONE;_scrollNode;_stopScrollTimers=new p;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(i,e,t,n,s){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=s;let r=this.element=A(i);this._document=t,this.withOrientation("vertical").withElementContainer(r),e.registerDropContainer(this),this._parentPositions=new Ge(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,e,t,n){this._draggingStarted(),n==null&&this.sortingDisabled&&(n=this._draggables.indexOf(i)),this._sortStrategy.enter(i,e,t,n),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,e,t,n,s,r,a,l={}){this._reset(),this.dropped.next({item:i,currentIndex:e,previousIndex:t,container:this,previousContainer:n,isPointerOverContainer:s,distance:r,dropPoint:a,event:l})}withItems(i){let e=this._draggables;return this._draggables=i,i.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(n=>n.isDragging()).every(n=>i.indexOf(n)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._direction=i,this._sortStrategy instanceof Ze&&(this._sortStrategy.direction=i),this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){if(i==="mixed")this._sortStrategy=new At(this._document,this._dragDropRegistry);else{let e=new Ze(this._dragDropRegistry);e.direction=this._direction,e.orientation=i,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(i){let e=this._container;return this._scrollableElements=i.indexOf(e)===-1?[e,...i]:i.slice(),this}withElementContainer(i){if(i===this._container)return this;let e=A(this.element),t=this._scrollableElements.indexOf(this._container),n=this._scrollableElements.indexOf(i);return t>-1&&this._scrollableElements.splice(t,1),n>-1&&this._scrollableElements.splice(n,1),this._sortStrategy&&this._sortStrategy.withElementContainer(i),this._cachedShadowRoot=null,this._scrollableElements.unshift(i),this._container=i,this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}getItemAtIndex(i){return this._isDragging?this._sortStrategy.getItemAtIndex(i):this._draggables[i]||null}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,e,t,n){if(this.sortingDisabled||!this._domRect||!Mi(this._domRect,Wi,e,t))return;let s=this._sortStrategy.sort(i,e,t,n);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,e){if(this.autoScrollDisabled)return;let t,n=S.NONE,s=y.NONE;if(this._parentPositions.positions.forEach((r,a)=>{a===this._document||!r.clientRect||t||Mi(r.clientRect,Wi,i,e)&&([n,s]=On(a,r.clientRect,this._direction,i,e),(n||s)&&(t=a))}),!n&&!s){let{width:r,height:a}=this._viewportRuler.getViewportSize(),l={width:r,height:a,top:0,right:r,bottom:a,left:0};n=Ui(l,e),s=Ki(l,i),t=window}t&&(n!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=n,this._horizontalScrollDirection=s,this._scrollNode=t,(n||s)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let i=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let i=this._container.style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),qt(0,$t).pipe(x(this._stopScrollTimers)).subscribe(()=>{let i=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===S.UP?i.scrollBy(0,-e):this._verticalScrollDirection===S.DOWN&&i.scrollBy(0,e),this._horizontalScrollDirection===y.LEFT?i.scrollBy(-e,0):this._horizontalScrollDirection===y.RIGHT&&i.scrollBy(e,0)})};_isOverContainer(i,e){return this._domRect!=null&&It(this._domRect,i,e)}_getSiblingContainerFromPosition(i,e,t){return this._siblings.find(n=>n._canReceive(i,e,t))}_canReceive(i,e,t){if(!this._domRect||!It(this._domRect,e,t)||!this.enterPredicate(i,this))return!1;let n=this._getShadowRoot().elementFromPoint(e,t);return n?n===this._container||this._container.contains(n):!1}_startReceiving(i,e){let t=this._activeSiblings;!t.has(i)&&e.every(n=>this.enterPredicate(n,this)||this._draggables.indexOf(n)>-1)&&(t.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:e}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(i);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let i=We(this._container);this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let i=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,i))}};function Ui(o,i){let{top:e,bottom:t,height:n}=o,s=n*$i;return i>=e-s&&i<=e+s?S.UP:i>=t-s&&i<=t+s?S.DOWN:S.NONE}function Ki(o,i){let{left:e,right:t,width:n}=o,s=n*$i;return i>=e-s&&i<=e+s?y.LEFT:i>=t-s&&i<=t+s?y.RIGHT:y.NONE}function On(o,i,e,t,n){let s=Ui(i,n),r=Ki(i,t),a=S.NONE,l=y.NONE;if(s){let d=o.scrollTop;s===S.UP?d>0&&(a=S.UP):o.scrollHeight-d>o.clientHeight&&(a=S.DOWN)}if(r){let d=o.scrollLeft;e==="rtl"?r===y.RIGHT?d<0&&(l=y.RIGHT):o.scrollWidth+d>o.clientWidth&&(l=y.LEFT):r===y.LEFT?d>0&&(l=y.LEFT):o.scrollWidth-d>o.clientWidth&&(l=y.RIGHT)}return[a,l]}var Pe={capture:!0},kt={passive:!1,capture:!0},Nn=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,n){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
2
+ `],encapsulation:2,changeDetection:0})}return o})(),Vt=(()=>{class o{_ngZone=c(Y);_document=c(me);_styleLoader=c(ai);_renderer=c(et).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new p;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Je([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new p;pointerUp=new p;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,kt)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(Nn),this._activeDragInstances.update(n=>[...n,e]),this._activeDragInstances().length===1)){let n=t.type.startsWith("touch"),s=a=>this.pointerUp.next(a),r=[["scroll",a=>this._scroll.next(a),Pe],["selectstart",this._preventDefaultWhileDragging,kt]];n?r.push(["touchend",s,Pe],["touchcancel",s,Pe]):r.push(["mouseup",s,Pe]),n||r.push(["mousemove",a=>this.pointerMove.next(a),kt]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=r.map(([a,l,d])=>this._renderer.listen(this._document,a,l,d))})}}stopDragging(e){this._activeDragInstances.update(t=>{let n=t.indexOf(e);return n>-1?(t.splice(n,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this._scroll];return e&&e!==this._document&&t.push(new Ye(n=>this._ngZone.runOutsideAngular(()=>{let s=this._renderer.listen(e,"scroll",r=>{this._activeDragInstances().length&&n.next(r)},Pe);return()=>{s()}}))),Ne(...t)}registerDirectiveNode(e,t){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,t)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(t){return new(t||o)};static \u0275prov=fe({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),An={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Wt=(()=>{class o{_document=c(me);_ngZone=c(Y);_viewportRuler=c(di);_dragDropRegistry=c(Vt);_renderer=c(et).createRenderer(null,null);constructor(){}createDrag(e,t=An){return new Nt(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new Lt(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(t){return new(t||o)};static \u0275prov=fe({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})(),Ft=new L("CDK_DRAG_PARENT");var qi=new L("CdkDragHandle"),Qi=(()=>{class o{element=c(q);_parentDrag=c(Ft,{optional:!0,skipSelf:!0});_dragDropRegistry=c(Vt);_stateChanges=new p;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._stateChanges.next(this)}_disabled=!1;constructor(){this._parentDrag?._addHandle(this)}ngAfterViewInit(){if(!this._parentDrag){let e=this.element.nativeElement.parentElement;for(;e;){let t=this._dragDropRegistry.getDragDirectiveForNode(e);if(t){this._parentDrag=t,t._addHandle(this);break}e=e.parentElement}}}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",u]},features:[He([{provide:qi,useExisting:o}])]})}return o})(),Yi=new L("CDK_DRAG_CONFIG"),Xi=new L("CdkDropList"),Ji=(()=>{class o{element=c(q);dropContainer=c(Xi,{optional:!0,skipSelf:!0});_ngZone=c(Y);_viewContainerRef=c(Le);_dir=c(ze,{optional:!0});_changeDetectorRef=c(ne);_selfHandle=c(qi,{optional:!0,self:!0});_parentDrag=c(Ft,{optional:!0,skipSelf:!0});_dragDropRegistry=c(Vt);_destroyed=new p;_handles=new Zt([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new g;released=new g;ended=new g;entered=new g;exited=new g;dropped=new g;moved=new Ye(e=>{let t=this._dragRef.moved.pipe(Ut(n=>({source:this,pointerPosition:n.pointerPosition,event:n.event,delta:n.delta,distance:n.distance}))).subscribe(e);return()=>{t.unsubscribe()}});_injector=c(K);constructor(){let e=this.dropContainer,t=c(Yi,{optional:!0}),n=c(Wt);this._dragRef=n.createDrag(this.element,{dragStartThreshold:t&&t.dragStartThreshold!=null?t.dragStartThreshold:5,pointerDirectionChangeThreshold:t&&t.pointerDirectionChangeThreshold!=null?t.pointerDirectionChangeThreshold:5,zIndex:t?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),t&&this._assignDefaults(t),e&&(e.addItem(this),e._dropListRef.beforeStarted.pipe(x(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}resetToBoundary(){this._dragRef.resetToBoundary()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){ei(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let t=e.rootElementSelector,n=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let t=this._handles.getValue();t.push(e),this._handles.next(t)}_removeHandle(e){let t=this._handles.getValue(),n=t.indexOf(e);n>-1&&(t.splice(n,1),this._handles.next(t))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,t=e;this.rootElementSelector&&(t=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(t||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):A(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let t=this._dir,n=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof n=="object"&&n?n:dt(n),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe($(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let t=this.element.nativeElement.parentElement;for(;t;){let n=this._dragDropRegistry.getDragDirectiveForNode(t);if(n){e.withParent(n._dragRef);break}t=t.parentElement}})}_handleEvents(e){e.started.subscribe(t=>{this.started.emit({source:this,event:t.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(t=>{this.released.emit({source:this,event:t.event})}),e.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event})})}_assignDefaults(e){let{lockAxis:t,dragStartDelay:n,constrainPosition:s,previewClass:r,boundaryElement:a,draggingDisabled:l,rootElementSelector:d,previewContainer:h}=e;this.disabled=l??!1,this.dragStartDelay=n||0,this.lockAxis=t||null,s&&(this.constrainPosition=s),r&&(this.previewClass=r),a&&(this.boundaryElement=a),d&&(this.rootElementSelector=d),h&&(this.previewContainer=h)}_setupHandlesListener(){this._handles.pipe(Yt(e=>{let t=e.map(n=>n.element);this._selfHandle&&this.rootElementSelector&&t.push(this.element),this._dragRef.withHandles(t)}),Qt(e=>Ne(...e.map(t=>t._stateChanges.pipe(ge(t))))),x(this._destroyed)).subscribe(e=>{let t=this._dragRef,n=e.element.nativeElement;e.disabled?t.disableHandle(n):t.enableHandle(n)})}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,n){t&2&&ee("cdk-drag-disabled",n.disabled)("cdk-drag-dragging",n._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",u],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Ve]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[He([{provide:Ft,useExisting:o}]),Ae]})}return o})(),Gi=new L("CdkDropListGroup");var Lo=(()=>{class o{element=c(q);_changeDetectorRef=c(ne);_scrollDispatcher=c(ci);_dir=c(ze,{optional:!0});_group=c(Gi,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new p;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=c(fi).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;hasAnchor;dropped=new g;entered=new g;exited=new g;sorted=new g;_unsortedItems=new Set;constructor(){let e=c(Wt),t=c(Yi,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,t&&this._assignDefaults(t),this._dropListRef.enterPredicate=(n,s)=>this.enterPredicate(n.data,s.data),this._dropListRef.sortPredicate=(n,s,r)=>this.sortPredicate(n,s.data,r.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),o._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),e._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(t=>t._dragRef))}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let t=this._latestSortedRefs.indexOf(e._dragRef);t>-1&&(this._latestSortedRefs.splice(t,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,t)=>e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=o._dropLists.indexOf(this);e>-1&&o._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(ge(this._dir.value),x(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{let t=li(this.connectedTo).map(n=>{if(typeof n=="string"){let s=o._dropLists.find(r=>r.id===n);return s}return n});if(this._group&&this._group._items.forEach(n=>{t.indexOf(n)===-1&&t.push(n)}),!this._scrollableParentsResolved){let n=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(n),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let n=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(n)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=dt(this.autoScrollStep,2),e.hasAnchor=this.hasAnchor,e.connectedTo(t.filter(n=>n&&n!==this).map(n=>n._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(t=>t._dragRef)),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),Ne(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:t,draggingDisabled:n,sortingDisabled:s,listAutoScrollDisabled:r,listOrientation:a}=e;this.disabled=n??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=r??!1,this.orientation=a||"vertical",this.lockAxis=t||null}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e)}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,n){t&2&&(j("id",n.id),ee("cdk-drop-list-disabled",n.disabled)("cdk-drop-list-dragging",n._dropListRef.isDragging())("cdk-drop-list-receiving",n._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",u],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",u],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",u],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",u]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[He([{provide:Gi,useValue:void 0},{provide:Xi,useExisting:o}])]})}return o})();var Fo=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=X({type:o});static \u0275inj=U({providers:[Wt],imports:[hi]})}return o})();var Fn=["nz-modal-close",""];function Bn(o,i){if(o&1&&(ue(0),O(1,"nz-icon",2),_e()),o&2){let e=i.$implicit;m(),C("nzType",e)}}var on=["modalElement"];function Hn(o,i){if(o&1){let e=N();_(0,"button",16),P("click",function(){E(e);let n=f();return R(n.onCloseClick())}),v()}}function Vn(o,i){if(o&1&&(ue(0),O(1,"span",12),_e()),o&2){let e=f();m(),C("innerHTML",e.config.nzTitle,Q)}}function Wn(o,i){}function Gn(o,i){if(o&1&&O(0,"div",12),o&2){let e=f();C("innerHTML",e.config.nzContent,Q)}}function jn(o,i){if(o&1){let e=N();_(0,"button",17),P("click",function(){E(e);let n=f();return R(n.onCancel())}),te(1),v()}if(o&2){let e=f();C("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),j("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),m(),ie(" ",e.config.nzCancelText||e.locale.cancelText," ")}}function Zn(o,i){if(o&1){let e=N();_(0,"button",18),P("click",function(){E(e);let n=f();return R(n.onOk())}),te(1),v()}if(o&2){let e=f();C("nzType",e.config.nzOkType)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled)("nzDanger",e.config.nzOkDanger),j("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),m(),ie(" ",e.config.nzOkText||e.locale.okText," ")}}var $n=["nz-modal-footer",""],Un=(o,i)=>({$implicit:o,modalRef:i});function Kn(o,i){if(o&1){let e=N();_(0,"button",3),P("click",function(){let n=E(e).$implicit,s=f(4);return R(s.onButtonClick(n))}),te(1),v()}if(o&2){let e=i.$implicit,t=f(4);C("hidden",!t.getButtonCallableProp(e,"show"))("nzLoading",t.getButtonCallableProp(e,"loading"))("disabled",t.getButtonCallableProp(e,"disabled"))("nzType",e.type)("nzDanger",e.danger)("nzShape",e.shape)("nzSize",e.size)("nzGhost",e.ghost),m(),ie(" ",e.label," ")}}function qn(o,i){if(o&1&&ni(0,Kn,2,9,"button",2,ii),o&2){let e=f(3);oi(e.buttons)}}function Qn(o,i){if(o&1&&O(0,"div",1),o&2){let e=f(3);C("innerHTML",e.config.nzFooter,Q)}}function Yn(o,i){if(o&1&&(ue(0),b(1,qn,2,0)(2,Qn,1,1,"div",1),_e()),o&2){let e=f(2);m(),w(e.buttonsFooter?1:2)}}function Xn(o,i){if(o&1&&G(0,Yn,3,1,"ng-container",0),o&2){let e=f();C("nzStringTemplateOutlet",e.config.nzFooter)("nzStringTemplateOutletContext",si(2,Un,e.config.nzData,e.modalRef))}}function Jn(o,i){if(o&1){let e=N();_(0,"button",6),P("click",function(){E(e);let n=f(2);return R(n.onCancel())}),te(1),v()}if(o&2){let e=f(2);C("nzLoading",e.config.nzCancelLoading)("disabled",e.config.nzCancelDisabled),j("cdkFocusInitial",e.config.nzAutofocus==="cancel"||null),m(),ie(" ",e.config.nzCancelText||e.locale.cancelText," ")}}function eo(o,i){if(o&1){let e=N();_(0,"button",7),P("click",function(){E(e);let n=f(2);return R(n.onOk())}),te(1),v()}if(o&2){let e=f(2);C("nzType",e.config.nzOkType)("nzDanger",e.config.nzOkDanger)("nzLoading",e.config.nzOkLoading)("disabled",e.config.nzOkDisabled),j("cdkFocusInitial",e.config.nzAutofocus==="ok"||null),m(),ie(" ",e.config.nzOkText||e.locale.okText," ")}}function to(o,i){if(o&1&&(b(0,Jn,2,4,"button",4),b(1,eo,2,6,"button",5)),o&2){let e=f();w(e.config.nzCancelText!==null?0:-1),m(),w(e.config.nzOkText!==null?1:-1)}}var io=["nz-modal-title",""];function no(o,i){if(o&1&&(ue(0),O(1,"div",2),_e()),o&2){let e=f();m(),C("innerHTML",e.config.nzTitle,Q)}}function oo(o,i){if(o&1){let e=N();_(0,"button",9),P("click",function(){E(e);let n=f();return R(n.onCloseClick())}),v()}}function so(o,i){if(o&1&&O(0,"div",10),o&2){let e=f();J("cursor",e.config.nzDraggable?"move":"auto")}}function ro(o,i){}function ao(o,i){if(o&1&&O(0,"div",7),o&2){let e=f();C("innerHTML",e.config.nzContent,Q)}}function lo(o,i){if(o&1){let e=N();_(0,"div",11),P("cancelTriggered",function(){E(e);let n=f();return R(n.onCloseClick())})("okTriggered",function(){E(e);let n=f();return R(n.onOkClick())}),v()}if(o&2){let e=f();C("modalRef",e.modalRef)}}var en=()=>{},W=class{nzCentered=!1;nzClosable=!0;nzOkLoading=!1;nzOkDisabled=!1;nzCancelDisabled=!1;nzCancelLoading=!1;nzDraggable=!1;nzNoAnimation=!1;nzAutofocus="auto";nzMask;nzMaskClosable;nzKeyboard=!0;nzZIndex=1e3;nzWidth=520;nzCloseIcon="close";nzOkType="primary";nzOkDanger=!1;nzModalType="default";nzOnCancel=en;nzOnOk=en;nzData;nzMaskStyle;nzBodyStyle;nzWrapClassName;nzClassName;nzStyle;nzTitle;nzFooter;nzCancelText;nzOkText;nzContent;nzCloseOnNavigation;nzViewContainerRef;nzAfterOpen;nzAfterClose;nzIconType="question-circle";nzDirection},H={enter:"ant-zoom-enter",enterActive:"ant-zoom-enter-active",leave:"ant-zoom-leave",leaveActive:"ant-zoom-leave-active"},ae={enter:"ant-fade-enter",enterActive:"ant-fade-enter-active",leave:"ant-fade-leave",leaveActive:"ant-fade-leave-active"},$e="ant-modal-mask",Ue="modal",co=new L(""),sn={modalContainer:ri("modalContainer",[lt("void, exit",ye({})),lt("enter",ye({})),ct("* => enter",at(".24s",ye({}))),ct("* => void, * => exit",at(".2s",ye({})))])},Gt=(()=>{class o{config=c(W);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["button","nz-modal-close",""]],hostAttrs:["aria-label","Close",1,"ant-modal-close"],exportAs:["nzModalCloseBuiltin"],attrs:Fn,decls:2,vars:1,consts:[[1,"ant-modal-close-x"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-close-icon",3,"nzType"]],template:function(t,n){t&1&&(_(0,"span",0),G(1,Bn,2,1,"ng-container",1),v()),t&2&&(m(),C("nzStringTemplateOutlet",n.config.nzCloseIcon))},dependencies:[zt,yt,Se,we],encapsulation:2,changeDetection:0})}return o})();function ho(o,i){return he(he({},i),o)}function ke(o,i,e){return typeof o>"u"?typeof i>"u"?e:i:o}function tn(o){let{nzCentered:i,nzMask:e,nzMaskClosable:t,nzClosable:n,nzOkLoading:s,nzOkDisabled:r,nzCancelDisabled:a,nzCancelLoading:l,nzKeyboard:d,nzNoAnimation:h,nzDraggable:D,nzContent:T,nzFooter:ce,nzZIndex:Ke,nzWidth:qe,nzWrapClassName:z,nzClassName:Qe,nzStyle:Me,nzTitle:de,nzCloseIcon:Ie,nzMaskStyle:Oe,nzBodyStyle:pn,nzOkText:gn,nzCancelText:fn,nzOkType:mn,nzOkDanger:un,nzIconType:_n,nzModalType:Cn,nzOnOk:vn,nzOnCancel:Dn,nzAfterOpen:yn,nzAfterClose:zn,nzCloseOnNavigation:bn,nzAutofocus:wn}=o;return{nzCentered:i,nzMask:e,nzMaskClosable:t,nzDraggable:D,nzClosable:n,nzOkLoading:s,nzOkDisabled:r,nzCancelDisabled:a,nzCancelLoading:l,nzKeyboard:d,nzNoAnimation:h,nzContent:T,nzFooter:ce,nzZIndex:Ke,nzWidth:qe,nzWrapClassName:z,nzClassName:Qe,nzStyle:Me,nzTitle:de,nzCloseIcon:Ie,nzMaskStyle:Oe,nzBodyStyle:pn,nzOkText:gn,nzCancelText:fn,nzOkType:mn,nzOkDanger:un,nzIconType:_n,nzModalType:Cn,nzOnOk:vn,nzOnCancel:Dn,nzAfterOpen:yn,nzAfterClose:zn,nzCloseOnNavigation:bn,nzAutofocus:wn}}function nn(){throw Error("Attempting to attach modal content after content is already attached")}var rn=(()=>{class o extends gi{document=c(me);cdr=c(ne);config=c(W);ngZone=c(Y);host=c(q);focusTrapFactory=c(Si);render=c(ti);overlayRef=c(ft);nzConfigService=c(Dt);animationType=c(Jt,{optional:!0});destroyRef=c(Xe);portalOutlet;modalElementRef;animationStateChanged=new g;containerClick=new g;cancelTriggered=new g;okTriggered=new g;state="enter";modalRef;isStringContent=!1;dir="ltr";elementFocusedBeforeModalWasOpened=null;focusTrap;mouseDown=!1;oldMaskStyle=null;get showMask(){let e=this.nzConfigService.getConfigForComponent(Ue)||{};return!!ke(this.config.nzMask,e.nzMask,!0)}get maskClosable(){let e=this.nzConfigService.getConfigForComponent(Ue)||{};return!!ke(this.config.nzMaskClosable,e.nzMaskClosable,!0)}constructor(){super(),this.dir=this.overlayRef.getDirection(),this.isStringContent=typeof this.config.nzContent=="string",yi(Ue,()=>this.updateMaskClassname()),this.destroyRef.onDestroy(()=>{this.setMaskExitAnimationClass(!0)})}onContainerClick(e){e.target===e.currentTarget&&!this.mouseDown&&this.showMask&&this.maskClosable&&this.containerClick.emit()}onCloseClick(){this.cancelTriggered.emit()}onOkClick(){this.okTriggered.emit()}attachComponentPortal(e){return this.portalOutlet.hasAttached()&&nn(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachComponentPortal(e)}attachTemplatePortal(e){return this.portalOutlet.hasAttached()&&nn(),this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop(),this.portalOutlet.attachTemplatePortal(e)}attachStringContent(){this.savePreviouslyFocusedElement(),this.setZIndexForBackdrop()}getNativeElement(){return this.host.nativeElement}animationDisabled(){return this.config.nzNoAnimation||this.animationType==="NoopAnimations"}setModalTransformOrigin(){let e=this.modalElementRef.nativeElement;if(this.elementFocusedBeforeModalWasOpened){let t=this.elementFocusedBeforeModalWasOpened.getBoundingClientRect(),n=Di(this.elementFocusedBeforeModalWasOpened),s=n.left+t.width/2,r=n.top+t.height/2,a=`${s-e.offsetLeft}px ${r-e.offsetTop}px 0px`;this.render.setStyle(e,"transform-origin",a)}}savePreviouslyFocusedElement(){this.focusTrap||(this.focusTrap=this.focusTrapFactory.create(this.host.nativeElement)),this.document&&(this.elementFocusedBeforeModalWasOpened=this.document.activeElement,this.host.nativeElement.focus&&this.ngZone.runOutsideAngular(()=>Ti(()=>this.host.nativeElement.focus())))}trapFocus(){let e=this.host.nativeElement;if(this.config.nzAutofocus)this.focusTrap.focusInitialElementWhenReady();else{let t=this.document.activeElement;t!==e&&!e.contains(t)&&e.focus()}}restoreFocus(){let e=this.elementFocusedBeforeModalWasOpened;if(e&&typeof e.focus=="function"){let t=this.document.activeElement,n=this.host.nativeElement;(!t||t===this.document.body||t===n||n.contains(t))&&e.focus()}this.focusTrap&&this.focusTrap.destroy()}setEnterAnimationClass(){if(this.animationDisabled())return;this.setModalTransformOrigin();let e=this.modalElementRef.nativeElement,t=this.overlayRef.backdropElement;e.classList.add(H.enter),e.classList.add(H.enterActive),t&&(t.classList.add(ae.enter),t.classList.add(ae.enterActive))}setExitAnimationClass(){let e=this.modalElementRef.nativeElement;e.classList.add(H.leave),e.classList.add(H.leaveActive),this.setMaskExitAnimationClass()}setMaskExitAnimationClass(e=!1){let t=this.overlayRef.backdropElement;if(t){if(this.animationDisabled()||e){t.classList.remove($e);return}t.classList.add(ae.leave),t.classList.add(ae.leaveActive)}}cleanAnimationClass(){if(this.animationDisabled())return;let e=this.overlayRef.backdropElement,t=this.modalElementRef.nativeElement;e&&(e.classList.remove(ae.enter),e.classList.remove(ae.enterActive)),t.classList.remove(H.enter),t.classList.remove(H.enterActive),t.classList.remove(H.leave),t.classList.remove(H.leaveActive)}setZIndexForBackdrop(){let e=this.overlayRef.backdropElement;e&&mt(this.config.nzZIndex)&&this.render.setStyle(e,"z-index",this.config.nzZIndex)}bindBackdropStyle(){let e=this.overlayRef.backdropElement;if(e){if(this.oldMaskStyle){let t=this.oldMaskStyle;Object.keys(t).forEach(n=>{this.render.removeStyle(e,n)}),this.oldMaskStyle=null}if(this.setZIndexForBackdrop(),typeof this.config.nzMaskStyle=="object"&&Object.keys(this.config.nzMaskStyle).length){let t=he({},this.config.nzMaskStyle);Object.keys(t).forEach(n=>{this.render.setStyle(e,n,t[n])}),this.oldMaskStyle=t}}}updateMaskClassname(){let e=this.overlayRef.backdropElement;e&&(this.showMask?e.classList.add($e):e.classList.remove($e))}onAnimationDone(e){e.toState==="enter"?this.trapFocus():e.toState==="exit"&&this.restoreFocus(),this.cleanAnimationClass(),this.animationStateChanged.emit(e)}onAnimationStart(e){e.toState==="enter"?(this.setEnterAnimationClass(),this.bindBackdropStyle()):e.toState==="exit"&&this.setExitAnimationClass(),this.animationStateChanged.emit(e)}startExitAnimation(){this.state="exit",this.cdr.markForCheck()}setupMouseListeners(e){vt(this.host.nativeElement,"mouseup").pipe(se(this.destroyRef)).subscribe(()=>{this.mouseDown&&setTimeout(()=>{this.mouseDown=!1})}),vt(e.nativeElement,"mousedown").pipe(se(this.destroyRef)).subscribe(()=>{this.mouseDown=!0})}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,features:[Fe]})}return o})(),an=(()=>{class o extends rn{i18n=c(Pt);set _portalOutlet(e){this.portalOutlet=e}set _modalElementRef(e){this.modalElementRef=e}cancelTriggered=new g;okTriggered=new g;locale;constructor(){super(),this.i18n.localeChange.pipe(se()).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["nz-modal-confirm-container"]],viewQuery:function(t,n){if(t&1&&(Ce(oe,7),Ce(on,7)),t&2){let s;F(s=B())&&(n._portalOutlet=s.first),F(s=B())&&(n._modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(t,n){t&1&&(ot("@modalContainer.start",function(r){return n.onAnimationStart(r)})("@modalContainer.done",function(r){return n.onAnimationDone(r)}),P("click",function(r){return n.onContainerClick(r)})),t&2&&(nt("@.disabled",n.config.nzNoAnimation)("@modalContainer",n.state),De(n.config.nzWrapClassName?"ant-modal-wrap "+n.config.nzWrapClassName:"ant-modal-wrap"),J("z-index",n.config.nzZIndex),ee("ant-modal-wrap-rtl",n.dir==="rtl")("ant-modal-centered",n.config.nzCentered))},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalConfirmContainer"],features:[it([ht]),Fe],decls:17,vars:16,consts:[["modalElement",""],["role","document",1,"ant-modal"],[1,"ant-modal-content"],["nz-modal-close",""],[1,"ant-modal-body"],[1,"ant-modal-confirm-body-wrapper"],[1,"ant-modal-confirm-body"],[3,"nzType"],[1,"ant-modal-confirm-title"],[4,"nzStringTemplateOutlet"],[1,"ant-modal-confirm-content"],["cdkPortalOutlet",""],[3,"innerHTML"],[1,"ant-modal-confirm-btns"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzLoading","disabled","nzDanger"],["nz-modal-close","",3,"click"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzLoading","disabled","nzDanger"]],template:function(t,n){t&1&&(_(0,"div",1,0),st(2,"nzToCssUnit"),_(3,"div",2),b(4,Hn,1,0,"button",3),_(5,"div",4)(6,"div",5)(7,"div",6),O(8,"nz-icon",7),_(9,"span",8),G(10,Vn,2,1,"ng-container",9),v(),_(11,"div",10),G(12,Wn,0,0,"ng-template",11),b(13,Gn,1,1,"div",12),v()(),_(14,"div",13),b(15,jn,2,4,"button",14),b(16,Zn,2,6,"button",15),v()()()()()),t&2&&(ve(n.config.nzStyle),De(n.config.nzClassName),J("width",rt(2,14,n.config==null?null:n.config.nzWidth)),m(4),w(n.config.nzClosable?4:-1),m(),ve(n.config.nzBodyStyle),m(3),C("nzType",n.config.nzIconType),m(2),C("nzStringTemplateOutlet",n.config.nzTitle),m(3),w(n.isStringContent?13:-1),m(2),w(n.config.nzCancelText!==null?15:-1),m(),w(n.config.nzOkText!==null?16:-1))},dependencies:[Rt,zt,yt,Gt,Se,we,gt,oe,Tt,St,bt,wt,Et],encapsulation:2,data:{animation:[sn.modalContainer]}})}return o})(),ln=(()=>{class o{i18n=c(Pt);config=c(W);buttonsFooter=!1;buttons=[];locale;cancelTriggered=new g;okTriggered=new g;modalRef;constructor(){Array.isArray(this.config.nzFooter)&&(this.buttonsFooter=!0,this.buttons=this.config.nzFooter.map(po)),this.i18n.localeChange.pipe(se()).subscribe(()=>{this.locale=this.i18n.getLocaleData("Modal")})}onCancel(){this.cancelTriggered.emit()}onOk(){this.okTriggered.emit()}getButtonCallableProp(e,t){let n=e[t],s=this.modalRef.getContentComponent();return typeof n=="function"?n.apply(e,s&&[s]):n}onButtonClick(e){if(!this.getButtonCallableProp(e,"loading")){let n=this.getButtonCallableProp(e,"onClick");e.autoLoading&&ut(n)&&(e.loading=!0,n.then(()=>e.loading=!1).catch(s=>{throw e.loading=!1,s}))}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["div","nz-modal-footer",""]],hostAttrs:[1,"ant-modal-footer"],inputs:{modalRef:"modalRef"},outputs:{cancelTriggered:"cancelTriggered",okTriggered:"okTriggered"},exportAs:["nzModalFooterBuiltin"],attrs:$n,decls:2,vars:1,consts:[[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],[3,"innerHTML"],["nz-button","",3,"hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"click","hidden","nzLoading","disabled","nzType","nzDanger","nzShape","nzSize","nzGhost"],["nz-button","",3,"nzLoading","disabled"],["nz-button","",3,"nzType","nzDanger","nzLoading","disabled"],["nz-button","",3,"click","nzLoading","disabled"],["nz-button","",3,"click","nzType","nzDanger","nzLoading","disabled"]],template:function(t,n){t&1&&b(0,Xn,1,5,"ng-container")(1,to,2,2),t&2&&w(n.config.nzFooter?0:1)},dependencies:[Se,we,Tt,St,bt,wt],encapsulation:2})}return o})();function po(o){return he({type:null,size:"default",autoLoading:!0,show:!0,loading:!1,disabled:!1},o)}var cn=(()=>{class o{config=c(W);static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["div","nz-modal-title",""]],hostAttrs:[1,"ant-modal-header"],exportAs:["nzModalTitleBuiltin"],attrs:io,decls:2,vars:1,consts:[[1,"ant-modal-title"],[4,"nzStringTemplateOutlet"],[3,"innerHTML"]],template:function(t,n){t&1&&(_(0,"div",0),G(1,no,2,1,"ng-container",1),v()),t&2&&(m(),C("nzStringTemplateOutlet",n.config.nzTitle))},dependencies:[Se,we],encapsulation:2,changeDetection:0})}return o})(),dn=(()=>{class o extends rn{set _portalOutlet(e){this.portalOutlet=e}set _modalElementRef(e){this.modalElementRef=e}ngOnInit(){this.setupMouseListeners(this.modalElementRef)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Xt(o)))(n||o)}})();static \u0275cmp=M({type:o,selectors:[["nz-modal-container"]],viewQuery:function(t,n){if(t&1&&(Ce(oe,7),Ce(on,7)),t&2){let s;F(s=B())&&(n._portalOutlet=s.first),F(s=B())&&(n._modalElementRef=s.first)}},hostAttrs:["tabindex","-1","role","dialog"],hostVars:10,hostBindings:function(t,n){t&1&&(ot("@modalContainer.start",function(r){return n.onAnimationStart(r)})("@modalContainer.done",function(r){return n.onAnimationDone(r)}),P("click",function(r){return n.onContainerClick(r)})),t&2&&(nt("@.disabled",n.config.nzNoAnimation)("@modalContainer",n.state),De(n.config.nzWrapClassName?"ant-modal-wrap "+n.config.nzWrapClassName:"ant-modal-wrap"),J("z-index",n.config.nzZIndex),ee("ant-modal-wrap-rtl",n.dir==="rtl")("ant-modal-centered",n.config.nzCentered))},exportAs:["nzModalContainer"],features:[it([ht]),Fe],decls:10,vars:15,consts:[["modalElement",""],["cdkDrag","","cdkDragBoundary",".cdk-overlay-container","role","document",1,"ant-modal",3,"cdkDragDisabled"],[1,"ant-modal-content"],["nz-modal-close",""],["nz-modal-title","","cdkDragHandle","",3,"cursor"],[1,"ant-modal-body"],["cdkPortalOutlet",""],[3,"innerHTML"],["nz-modal-footer","",3,"modalRef"],["nz-modal-close","",3,"click"],["nz-modal-title","","cdkDragHandle",""],["nz-modal-footer","",3,"cancelTriggered","okTriggered","modalRef"]],template:function(t,n){t&1&&(_(0,"div",1,0),st(2,"nzToCssUnit"),_(3,"div",2),b(4,oo,1,0,"button",3),b(5,so,1,2,"div",4),_(6,"div",5),G(7,ro,0,0,"ng-template",6),b(8,ao,1,1,"div",7),v(),b(9,lo,1,1,"div",8),v()()),t&2&&(ve(n.config.nzStyle),De(n.config.nzClassName),J("width",rt(2,13,n.config==null?null:n.config.nzWidth)),C("cdkDragDisabled",!n.config.nzDraggable),m(4),w(n.config.nzClosable?4:-1),m(),w(n.config.nzTitle?5:-1),m(),ve(n.config.nzBodyStyle),m(2),w(n.isStringContent?8:-1),m(),w(n.config.nzFooter!==null?9:-1))},dependencies:[Gt,cn,gt,oe,ln,Rt,Ji,Qi,Et],encapsulation:2,data:{animation:[sn.modalContainer]}})}return o})(),xe={OPEN:0,CLOSING:1,CLOSED:2},V={CANCEL:"cancel",OK:"ok"},le=class{overlayRef;config;containerInstance;componentInstance=null;componentRef=null;result;state=xe.OPEN;afterClose=new p;afterOpen=new p;closeTimeout;destroy$=new p;constructor(i,e,t){this.overlayRef=i,this.config=e,this.containerInstance=t,t.animationStateChanged.pipe(pe(n=>n.phaseName==="done"&&n.toState==="enter"),$(1)).subscribe(()=>{this.afterOpen.next(),this.afterOpen.complete(),e.nzAfterOpen instanceof g&&e.nzAfterOpen.emit()}),t.animationStateChanged.pipe(pe(n=>n.phaseName==="done"&&n.toState==="exit"),$(1)).subscribe(()=>{clearTimeout(this.closeTimeout),this._finishDialogClose()}),t.containerClick.pipe(x(this.destroy$)).subscribe(()=>{!this.config.nzCancelLoading&&!this.config.nzOkLoading&&this.trigger(V.CANCEL)}),i.keydownEvents().pipe(pe(n=>this.config.nzKeyboard&&!this.config.nzCancelLoading&&!this.config.nzOkLoading&&n.keyCode===27&&!mi(n))).subscribe(n=>{n.preventDefault(),this.trigger(V.CANCEL)}),t.cancelTriggered.pipe(x(this.destroy$)).subscribe(()=>this.trigger(V.CANCEL)),t.okTriggered.pipe(x(this.destroy$)).subscribe(()=>this.trigger(V.OK)),i.detachments().subscribe(()=>{this.afterClose.next(this.result),this.afterClose.complete(),e.nzAfterClose instanceof g&&e.nzAfterClose.emit(this.result),this.componentInstance=null,this.componentRef=null,this.overlayRef.dispose()})}getContentComponent(){return this.componentInstance}getContentComponentRef(){return this.componentRef}getElement(){return this.containerInstance.getNativeElement()}destroy(i){this.close(i)}triggerOk(){return this.trigger(V.OK)}triggerCancel(){return this.trigger(V.CANCEL)}close(i){this.state===xe.OPEN&&(this.result=i,this.containerInstance.animationStateChanged.pipe(pe(e=>e.phaseName==="start"),$(1)).subscribe(e=>{this.overlayRef.detachBackdrop(),this.closeTimeout=setTimeout(()=>{this._finishDialogClose()},e.totalTime+100)}),this.containerInstance.startExitAnimation(),this.state=xe.CLOSING)}updateConfig(i){Object.assign(this.config,i),this.containerInstance.bindBackdropStyle(),this.containerInstance.cdr.markForCheck()}getState(){return this.state}getConfig(){return this.config}getBackdropElement(){return this.overlayRef.backdropElement}async trigger(i){if(this.state===xe.CLOSING)return;let e={[V.OK]:{trigger:this.config.nzOnOk,loadingKey:"nzOkLoading"},[V.CANCEL]:{trigger:this.config.nzOnCancel,loadingKey:"nzCancelLoading"}},{trigger:t,loadingKey:n}=e[i];if(!this.config[n]){if(t instanceof g)t.emit(this.getContentComponent());else if(typeof t=="function"){let s=t(this.getContentComponent());if(ut(s)){this.config[n]=!0;let r=!1;try{r=await s}finally{this.config[n]=!1,this.closeWhitResult(r)}}else this.closeWhitResult(s)}}}closeWhitResult(i){i!==!1&&this.close(i)}_finishDialogClose(){this.state=xe.CLOSED,this.overlayRef.dispose(),this.destroy$.next()}},hn=(()=>{class o{injector=c(K);nzConfigService=c(Dt);directionality=c(ze);parentModal=c(o,{skipSelf:!0,optional:!0});openModalsAtThisLevel=[];afterAllClosedAtThisLevel=new p;get openModals(){return this.parentModal?this.parentModal.openModals:this.openModalsAtThisLevel}get _afterAllClosed(){let e=this.parentModal;return e?e._afterAllClosed:this.afterAllClosedAtThisLevel}afterAllClose=Kt(()=>this.openModals.length?this._afterAllClosed:this._afterAllClosed.pipe(ge(void 0)));create(e){return this.open(e.nzContent,e)}closeAll(){this.closeModals(this.openModals)}confirm(e={},t="confirm"){return"nzFooter"in e&&vi(`The Confirm-Modal doesn't support "nzFooter", this property will be ignored.`),"nzWidth"in e||(e.nzWidth=416),"nzMaskClosable"in e||(e.nzMaskClosable=!1),e.nzModalType="confirm",e.nzClassName=`ant-modal-confirm ant-modal-confirm-${t} ${e.nzClassName||""}`,this.create(e)}info(e={}){return this.confirmFactory(e,"info")}success(e={}){return this.confirmFactory(e,"success")}error(e={}){return this.confirmFactory(e,"error")}warning(e={}){return this.confirmFactory(e,"warning")}open(e,t){let n=ho(t||{},new W),s=this.createOverlay(n),r=this.attachModalContainer(s,n),a=this.attachModalContent(e,r,s,n);return r.modalRef=a,zi(s,t?.nzZIndex),this.openModals.push(a),a.afterClose.subscribe(()=>this.removeOpenModal(a)),a}removeOpenModal(e){let t=this.openModals.indexOf(e);t>-1&&(this.openModals.splice(t,1),this.openModals.length||this._afterAllClosed.next())}closeModals(e){let t=e.length;for(;t--;)e[t].close(),this.openModals.length||this._afterAllClosed.next()}createOverlay(e){let t=this.nzConfigService.getConfigForComponent(Ue)||{};return Ci(this.injector,{hasBackdrop:!0,scrollStrategy:ui(this.injector),backdropClass:ke(e.nzMask,t.nzMask,!0)?$e:"",positionStrategy:_i(this.injector),disposeOnNavigation:ke(e.nzCloseOnNavigation,t.nzCloseOnNavigation,!0),direction:ke(e.nzDirection,t.nzDirection,this.directionality.value)})}attachModalContainer(e,t){let n=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector,s=K.create({parent:n||this.injector,providers:[{provide:ft,useValue:e},{provide:W,useValue:t}]}),r=t.nzModalType==="confirm"?an:dn,a=new pt(r,t.nzViewContainerRef,s);return e.attach(a).instance}attachModalContent(e,t,n,s){let r=new le(n,s,t);if(e instanceof k)t.attachTemplatePortal(new pi(e,null,{$implicit:s.nzData,modalRef:r}));else if(mt(e)&&typeof e!="string"){let a=this.createInjector(r,s),l=t.attachComponentPortal(new pt(e,s.nzViewContainerRef,a));r.componentRef=l,r.componentInstance=l.instance}else t.attachStringContent();return r}createInjector(e,t){let n=t&&t.nzViewContainerRef&&t.nzViewContainerRef.injector;return K.create({parent:n||this.injector,providers:[{provide:le,useValue:e},{provide:co,useValue:t.nzData}]})}confirmFactory(e={},t){let n={info:"info-circle",success:"check-circle",error:"close-circle",warning:"exclamation-circle"};return"nzIconType"in e||(e.nzIconType=n[t]),"nzCancelText"in e||(e.nzCancelText=null),this.confirm(e,t)}ngOnDestroy(){this.closeModals(this.openModalsAtThisLevel),this.afterAllClosedAtThisLevel.complete()}static \u0275fac=function(t){return new(t||o)};static \u0275prov=fe({token:o,factory:o.\u0275fac})}return o})(),go=(()=>{class o{templateRef=c(k);static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","nzModalContent",""]],exportAs:["nzModalContent"]})}return o})(),fo=(()=>{class o{templateRef=c(k);nzModalRef=c(le,{optional:!0});constructor(){this.nzModalRef?.updateConfig({nzFooter:this.templateRef})}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","nzModalFooter",""]],exportAs:["nzModalFooter"]})}return o})(),mo=(()=>{class o{templateRef=c(k);nzModalRef=c(le,{optional:!0});constructor(){this.nzModalRef?.updateConfig({nzTitle:this.templateRef})}static \u0275fac=function(t){return new(t||o)};static \u0275dir=I({type:o,selectors:[["","nzModalTitle",""]],exportAs:["nzModalTitle"]})}return o})(),ws=(()=>{class o{cdr=c(ne);modal=c(hn);viewContainerRef=c(Le);destroyRef=c(Xe);nzMask;nzMaskClosable;nzCloseOnNavigation;nzVisible=!1;nzClosable=!0;nzOkLoading=!1;nzOkDisabled=!1;nzCancelDisabled=!1;nzCancelLoading=!1;nzKeyboard=!0;nzNoAnimation=!1;nzCentered=!1;nzDraggable=!1;nzContent;nzFooter;nzZIndex=1e3;nzWidth=520;nzWrapClassName;nzClassName;nzStyle;nzTitle;nzCloseIcon="close";nzMaskStyle;nzBodyStyle;nzOkText;nzCancelText;nzOkType="primary";nzOkDanger=!1;nzIconType="question-circle";nzModalType="default";nzAutofocus="auto";nzOnOk=new g;nzOnCancel=new g;nzAfterOpen=new g;nzAfterClose=new g;nzVisibleChange=new g;set modalTitle(e){e&&this.setTitleWithTemplate(e)}contentFromContentChild;set modalFooter(e){e&&this.setFooterWithTemplate(e)}modalRef=null;get afterOpen(){return this.nzAfterOpen.asObservable()}get afterClose(){return this.nzAfterClose.asObservable()}constructor(){this.destroyRef.onDestroy(()=>{this.modalRef?._finishDialogClose()})}open(){if(this.nzVisible||(this.nzVisible=!0,this.nzVisibleChange.emit(!0)),!this.modalRef){let e=this.getConfig();this.modalRef=this.modal.create(e),this.modalRef.afterClose.asObservable().pipe(se(this.destroyRef)).subscribe(()=>{this.close()})}}close(e){this.nzVisible&&(this.nzVisible=!1,this.nzVisibleChange.emit(!1)),this.modalRef&&(this.modalRef.close(e),this.modalRef=null)}destroy(e){this.close(e)}triggerOk(){this.modalRef?.triggerOk()}triggerCancel(){this.modalRef?.triggerCancel()}getContentComponent(){return this.modalRef?.getContentComponent()}getElement(){return this.modalRef?.getElement()}getModalRef(){return this.modalRef}setTitleWithTemplate(e){this.nzTitle=e,this.modalRef&&Promise.resolve().then(()=>{this.modalRef.updateConfig({nzTitle:this.nzTitle})})}setFooterWithTemplate(e){this.nzFooter=e,this.modalRef&&Promise.resolve().then(()=>{this.modalRef.updateConfig({nzFooter:this.nzFooter})}),this.cdr.markForCheck()}getConfig(){let e=tn(this);return e.nzViewContainerRef=this.viewContainerRef,e.nzContent=this.nzContent||this.contentFromContentChild,e}ngOnChanges(e){let s=e,{nzVisible:t}=s,n=jt(s,["nzVisible"]);Object.keys(n).length&&this.modalRef&&this.modalRef.updateConfig(tn(this)),t&&(this.nzVisible?this.open():this.close())}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=M({type:o,selectors:[["nz-modal"]],contentQueries:function(t,n,s){if(t&1&&(Be(s,mo,7,k),Be(s,go,7,k),Be(s,fo,7,k)),t&2){let r;F(r=B())&&(n.modalTitle=r.first),F(r=B())&&(n.contentFromContentChild=r.first),F(r=B())&&(n.modalFooter=r.first)}},inputs:{nzMask:[2,"nzMask","nzMask",u],nzMaskClosable:[2,"nzMaskClosable","nzMaskClosable",u],nzCloseOnNavigation:[2,"nzCloseOnNavigation","nzCloseOnNavigation",u],nzVisible:[2,"nzVisible","nzVisible",u],nzClosable:[2,"nzClosable","nzClosable",u],nzOkLoading:[2,"nzOkLoading","nzOkLoading",u],nzOkDisabled:[2,"nzOkDisabled","nzOkDisabled",u],nzCancelDisabled:[2,"nzCancelDisabled","nzCancelDisabled",u],nzCancelLoading:[2,"nzCancelLoading","nzCancelLoading",u],nzKeyboard:[2,"nzKeyboard","nzKeyboard",u],nzNoAnimation:[2,"nzNoAnimation","nzNoAnimation",u],nzCentered:[2,"nzCentered","nzCentered",u],nzDraggable:[2,"nzDraggable","nzDraggable",u],nzContent:"nzContent",nzFooter:"nzFooter",nzZIndex:[2,"nzZIndex","nzZIndex",Ve],nzWidth:"nzWidth",nzWrapClassName:"nzWrapClassName",nzClassName:"nzClassName",nzStyle:"nzStyle",nzTitle:"nzTitle",nzCloseIcon:"nzCloseIcon",nzMaskStyle:"nzMaskStyle",nzBodyStyle:"nzBodyStyle",nzOkText:"nzOkText",nzCancelText:"nzCancelText",nzOkType:"nzOkType",nzOkDanger:[2,"nzOkDanger","nzOkDanger",u],nzIconType:"nzIconType",nzModalType:"nzModalType",nzAutofocus:"nzAutofocus",nzOnOk:"nzOnOk",nzOnCancel:"nzOnCancel"},outputs:{nzOnOk:"nzOnOk",nzOnCancel:"nzOnCancel",nzAfterOpen:"nzAfterOpen",nzAfterClose:"nzAfterClose",nzVisibleChange:"nzVisibleChange"},exportAs:["nzModal"],features:[Ae],decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})}return o})(),Ss=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=X({type:o});static \u0275inj=U({providers:[hn],imports:[Gt,ln,cn,dn,an]})}return o})();export{Qi as a,Ji as b,Lo as c,Fo as d,co as e,le as f,hn as g,go as h,fo as i,mo as j,ws as k,Ss as l};