@sync-in/server 1.5.2 → 1.6.1

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 (355) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +2 -1
  3. package/environment/environment.dist.min.yaml +1 -0
  4. package/environment/environment.dist.yaml +88 -30
  5. package/migrations/0002_sleepy_korath.sql +1 -0
  6. package/migrations/meta/0002_snapshot.json +2424 -0
  7. package/migrations/meta/_journal.json +7 -0
  8. package/package.json +14 -12
  9. package/server/app.bootstrap.js +1 -1
  10. package/server/app.bootstrap.js.map +1 -1
  11. package/server/applications/files/services/files-manager.service.js +1 -2
  12. package/server/applications/files/services/files-manager.service.js.map +1 -1
  13. package/server/applications/files/services/files-only-office-manager.service.js +5 -6
  14. package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
  15. package/server/applications/files/utils/files.js +6 -4
  16. package/server/applications/files/utils/files.js.map +1 -1
  17. package/server/applications/links/links.controller.js +2 -2
  18. package/server/applications/links/links.controller.js.map +1 -1
  19. package/server/applications/links/services/links-manager.service.js +2 -1
  20. package/server/applications/links/services/links-manager.service.js.map +1 -1
  21. package/server/applications/links/services/links-manager.service.spec.js +6 -3
  22. package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
  23. package/server/applications/notifications/constants/notifications.js +9 -0
  24. package/server/applications/notifications/constants/notifications.js.map +1 -1
  25. package/server/applications/notifications/i18n/fr.js +10 -1
  26. package/server/applications/notifications/i18n/fr.js.map +1 -1
  27. package/server/applications/notifications/interfaces/notification-properties.interface.js.map +1 -1
  28. package/server/applications/notifications/mails/models.js +41 -3
  29. package/server/applications/notifications/mails/models.js.map +1 -1
  30. package/server/applications/notifications/mails/templates.js +1 -1
  31. package/server/applications/notifications/mails/templates.js.map +1 -1
  32. package/server/applications/notifications/schemas/notifications.schema.js +2 -1
  33. package/server/applications/notifications/schemas/notifications.schema.js.map +1 -1
  34. package/server/applications/notifications/services/notifications-manager.service.js +16 -13
  35. package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
  36. package/server/applications/notifications/services/notifications-manager.service.spec.js +9 -8
  37. package/server/applications/notifications/services/notifications-manager.service.spec.js.map +1 -1
  38. package/server/applications/notifications/services/notifications-queries.service.js +1 -1
  39. package/server/applications/notifications/services/notifications-queries.service.js.map +1 -1
  40. package/server/applications/shares/services/shares-manager.service.js +3 -2
  41. package/server/applications/shares/services/shares-manager.service.js.map +1 -1
  42. package/server/applications/sync/constants/auth.js +2 -2
  43. package/server/applications/sync/constants/auth.js.map +1 -1
  44. package/server/applications/sync/dtos/sync-client-registration.dto.js +5 -0
  45. package/server/applications/sync/dtos/sync-client-registration.dto.js.map +1 -1
  46. package/server/applications/sync/dtos/sync-operations.dto.js +1 -2
  47. package/server/applications/sync/dtos/sync-operations.dto.js.map +1 -1
  48. package/server/applications/sync/schemas/sync-clients.schema.js +2 -1
  49. package/server/applications/sync/schemas/sync-clients.schema.js.map +1 -1
  50. package/server/applications/sync/schemas/sync-paths.schema.js +2 -1
  51. package/server/applications/sync/schemas/sync-paths.schema.js.map +1 -1
  52. package/server/applications/sync/services/sync-clients-manager.service.js +28 -20
  53. package/server/applications/sync/services/sync-clients-manager.service.js.map +1 -1
  54. package/server/applications/sync/services/sync-clients-manager.service.spec.js +24 -18
  55. package/server/applications/sync/services/sync-clients-manager.service.spec.js.map +1 -1
  56. package/server/applications/sync/services/sync-queries.service.js +5 -5
  57. package/server/applications/sync/services/sync-queries.service.js.map +1 -1
  58. package/server/applications/users/admin-users.controller.js +48 -37
  59. package/server/applications/users/admin-users.controller.js.map +1 -1
  60. package/server/applications/users/admin-users.controller.spec.js +15 -0
  61. package/server/applications/users/admin-users.controller.spec.js.map +1 -1
  62. package/server/applications/users/constants/routes.js +5 -0
  63. package/server/applications/users/constants/routes.js.map +1 -1
  64. package/server/applications/users/constants/user.js +8 -0
  65. package/server/applications/users/constants/user.js.map +1 -1
  66. package/server/applications/users/dto/delete-user.dto.js +5 -23
  67. package/server/applications/users/dto/delete-user.dto.js.map +1 -1
  68. package/server/applications/users/dto/user-properties.dto.js +38 -3
  69. package/server/applications/users/dto/user-properties.dto.js.map +1 -1
  70. package/server/applications/users/interfaces/admin-user.interface.js.map +1 -1
  71. package/server/applications/users/interfaces/user-secrets.interface.js +10 -0
  72. package/server/applications/users/interfaces/user-secrets.interface.js.map +1 -0
  73. package/server/applications/users/models/user.model.js +84 -50
  74. package/server/applications/users/models/user.model.js.map +1 -1
  75. package/server/applications/users/schemas/user.interface.js.map +1 -1
  76. package/server/applications/users/schemas/users.schema.js +2 -0
  77. package/server/applications/users/schemas/users.schema.js.map +1 -1
  78. package/server/applications/users/services/admin-users-manager.service.js +7 -19
  79. package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
  80. package/server/applications/users/services/admin-users-manager.service.spec.js +7 -26
  81. package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
  82. package/server/applications/users/services/admin-users-queries.service.js +1 -0
  83. package/server/applications/users/services/admin-users-queries.service.js.map +1 -1
  84. package/server/applications/users/services/users-manager.service.js +138 -28
  85. package/server/applications/users/services/users-manager.service.js.map +1 -1
  86. package/server/applications/users/services/users-manager.service.spec.js +11 -9
  87. package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
  88. package/server/applications/users/services/users-queries.service.js +63 -57
  89. package/server/applications/users/services/users-queries.service.js.map +1 -1
  90. package/server/applications/users/users.controller.js +48 -1
  91. package/server/applications/users/users.controller.js.map +1 -1
  92. package/server/applications/users/users.controller.spec.js +8 -1
  93. package/server/applications/users/users.controller.spec.js.map +1 -1
  94. package/server/applications/users/users.e2e-spec.js +2 -1
  95. package/server/applications/users/users.e2e-spec.js.map +1 -1
  96. package/server/applications/users/utils/avatar.js +48 -0
  97. package/server/applications/users/utils/avatar.js.map +1 -0
  98. package/server/authentication/auth.config.js +89 -26
  99. package/server/authentication/auth.config.js.map +1 -1
  100. package/server/authentication/auth.controller.js +117 -9
  101. package/server/authentication/auth.controller.js.map +1 -1
  102. package/server/authentication/auth.controller.spec.js +16 -1
  103. package/server/authentication/auth.controller.spec.js.map +1 -1
  104. package/server/authentication/auth.e2e-spec.js +4 -3
  105. package/server/authentication/auth.e2e-spec.js.map +1 -1
  106. package/server/authentication/auth.module.js +4 -1
  107. package/server/authentication/auth.module.js.map +1 -1
  108. package/server/authentication/constants/auth-ldap.js +44 -0
  109. package/server/authentication/constants/auth-ldap.js.map +1 -0
  110. package/server/authentication/constants/auth.js +37 -4
  111. package/server/authentication/constants/auth.js.map +1 -1
  112. package/server/authentication/constants/routes.js +21 -0
  113. package/server/authentication/constants/routes.js.map +1 -1
  114. package/server/authentication/constants/scope.js +20 -0
  115. package/server/authentication/constants/scope.js.map +1 -0
  116. package/server/authentication/dto/login-response.dto.js +27 -4
  117. package/server/authentication/dto/login-response.dto.js.map +1 -1
  118. package/server/authentication/dto/token-response.dto.js +5 -0
  119. package/server/authentication/dto/token-response.dto.js.map +1 -1
  120. package/server/{applications/users/dto/user-password.dto.js → authentication/dto/two-fa-verify.dto.js} +27 -9
  121. package/server/authentication/dto/two-fa-verify.dto.js.map +1 -0
  122. package/server/authentication/guards/auth-basic.strategy.js +6 -5
  123. package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
  124. package/server/authentication/guards/auth-token-access.strategy.js +3 -2
  125. package/server/authentication/guards/auth-token-access.strategy.js.map +1 -1
  126. package/server/authentication/guards/auth-token-refresh.strategy.js +3 -2
  127. package/server/authentication/guards/auth-token-refresh.strategy.js.map +1 -1
  128. package/server/authentication/guards/auth-two-fa-guard.js +81 -0
  129. package/server/authentication/guards/auth-two-fa-guard.js.map +1 -0
  130. package/server/authentication/interfaces/jwt-payload.interface.js +5 -0
  131. package/server/authentication/interfaces/jwt-payload.interface.js.map +1 -1
  132. package/server/authentication/interfaces/token.interface.js +2 -0
  133. package/server/authentication/interfaces/token.interface.js.map +1 -1
  134. package/server/authentication/interfaces/two-fa-setup.interface.js +10 -0
  135. package/server/authentication/interfaces/two-fa-setup.interface.js.map +1 -0
  136. package/server/authentication/models/auth-method.js.map +1 -1
  137. package/server/authentication/services/auth-manager.service.js +72 -49
  138. package/server/authentication/services/auth-manager.service.js.map +1 -1
  139. package/server/authentication/services/auth-methods/auth-method-database.service.js +3 -3
  140. package/server/authentication/services/auth-methods/auth-method-database.service.js.map +1 -1
  141. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js +5 -0
  142. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js.map +1 -1
  143. package/server/authentication/services/auth-methods/auth-method-ldap.service.js +151 -66
  144. package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +1 -1
  145. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js +52 -50
  146. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js.map +1 -1
  147. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js +251 -0
  148. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js.map +1 -0
  149. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js +41 -0
  150. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js.map +1 -0
  151. package/server/authentication/utils/crypt-secret.js +68 -0
  152. package/server/authentication/utils/crypt-secret.js.map +1 -0
  153. package/server/common/functions.js +18 -2
  154. package/server/common/functions.js.map +1 -1
  155. package/server/common/qrcode.js +34 -0
  156. package/server/common/qrcode.js.map +1 -0
  157. package/server/common/shared.js +18 -0
  158. package/server/common/shared.js.map +1 -1
  159. package/server/configuration/config.environment.js +23 -6
  160. package/server/configuration/config.environment.js.map +1 -1
  161. package/server/configuration/config.interfaces.js +10 -0
  162. package/server/configuration/config.interfaces.js.map +1 -0
  163. package/server/configuration/config.loader.js.map +1 -1
  164. package/server/configuration/config.validation.js +13 -13
  165. package/server/configuration/config.validation.js.map +1 -1
  166. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js +6 -6
  167. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js.map +1 -1
  168. package/server/infrastructure/cache/schemas/mysql-cache.schema.js +2 -1
  169. package/server/infrastructure/cache/schemas/mysql-cache.schema.js.map +1 -1
  170. package/server/infrastructure/cache/services/cache.service.js.map +1 -1
  171. package/server/infrastructure/database/columns.js +39 -0
  172. package/server/infrastructure/database/columns.js.map +1 -0
  173. package/server/infrastructure/database/database.config.js +0 -1
  174. package/server/infrastructure/database/database.config.js.map +1 -1
  175. package/server/infrastructure/mailer/interfaces/mail.interface.js.map +1 -1
  176. package/server/infrastructure/mailer/mailer.config.js +12 -0
  177. package/server/infrastructure/mailer/mailer.config.js.map +1 -1
  178. package/server/infrastructure/mailer/mailer.service.js +2 -1
  179. package/server/infrastructure/mailer/mailer.service.js.map +1 -1
  180. package/static/assets/mimes/text-x-c.svg +1 -0
  181. package/static/assets/pdfjs/build/pdf.mjs +2522 -914
  182. package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
  183. package/static/assets/pdfjs/build/pdf.sandbox.mjs +2 -2
  184. package/static/assets/pdfjs/build/pdf.worker.mjs +1024 -566
  185. package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
  186. package/static/assets/pdfjs/version +1 -1
  187. package/static/assets/pdfjs/web/debugger.mjs +116 -37
  188. package/static/assets/pdfjs/web/images/comment-popup-editButton.svg +5 -0
  189. package/static/assets/pdfjs/web/locale/ach/viewer.ftl +0 -12
  190. package/static/assets/pdfjs/web/locale/af/viewer.ftl +0 -12
  191. package/static/assets/pdfjs/web/locale/an/viewer.ftl +0 -16
  192. package/static/assets/pdfjs/web/locale/ar/viewer.ftl +0 -32
  193. package/static/assets/pdfjs/web/locale/ast/viewer.ftl +0 -19
  194. package/static/assets/pdfjs/web/locale/az/viewer.ftl +0 -16
  195. package/static/assets/pdfjs/web/locale/be/viewer.ftl +0 -32
  196. package/static/assets/pdfjs/web/locale/bg/viewer.ftl +0 -32
  197. package/static/assets/pdfjs/web/locale/bn/viewer.ftl +0 -16
  198. package/static/assets/pdfjs/web/locale/bo/viewer.ftl +0 -12
  199. package/static/assets/pdfjs/web/locale/br/viewer.ftl +0 -22
  200. package/static/assets/pdfjs/web/locale/brx/viewer.ftl +0 -16
  201. package/static/assets/pdfjs/web/locale/bs/viewer.ftl +0 -32
  202. package/static/assets/pdfjs/web/locale/ca/viewer.ftl +12 -23
  203. package/static/assets/pdfjs/web/locale/cak/viewer.ftl +0 -23
  204. package/static/assets/pdfjs/web/locale/ckb/viewer.ftl +0 -16
  205. package/static/assets/pdfjs/web/locale/cs/viewer.ftl +0 -32
  206. package/static/assets/pdfjs/web/locale/cy/viewer.ftl +0 -32
  207. package/static/assets/pdfjs/web/locale/da/viewer.ftl +3 -35
  208. package/static/assets/pdfjs/web/locale/de/viewer.ftl +0 -32
  209. package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +0 -32
  210. package/static/assets/pdfjs/web/locale/el/viewer.ftl +0 -32
  211. package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +0 -32
  212. package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +0 -32
  213. package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +25 -13
  214. package/static/assets/pdfjs/web/locale/eo/viewer.ftl +0 -32
  215. package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +0 -32
  216. package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +0 -32
  217. package/static/assets/pdfjs/web/locale/es-ES/viewer.ftl +5 -32
  218. package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +0 -32
  219. package/static/assets/pdfjs/web/locale/et/viewer.ftl +0 -16
  220. package/static/assets/pdfjs/web/locale/eu/viewer.ftl +38 -32
  221. package/static/assets/pdfjs/web/locale/fa/viewer.ftl +0 -19
  222. package/static/assets/pdfjs/web/locale/ff/viewer.ftl +0 -12
  223. package/static/assets/pdfjs/web/locale/fi/viewer.ftl +0 -32
  224. package/static/assets/pdfjs/web/locale/fr/viewer.ftl +0 -32
  225. package/static/assets/pdfjs/web/locale/fur/viewer.ftl +0 -32
  226. package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +0 -32
  227. package/static/assets/pdfjs/web/locale/ga-IE/viewer.ftl +0 -12
  228. package/static/assets/pdfjs/web/locale/gd/viewer.ftl +0 -23
  229. package/static/assets/pdfjs/web/locale/gl/viewer.ftl +0 -32
  230. package/static/assets/pdfjs/web/locale/gn/viewer.ftl +0 -32
  231. package/static/assets/pdfjs/web/locale/gu-IN/viewer.ftl +0 -12
  232. package/static/assets/pdfjs/web/locale/he/viewer.ftl +0 -32
  233. package/static/assets/pdfjs/web/locale/hi-IN/viewer.ftl +0 -16
  234. package/static/assets/pdfjs/web/locale/hr/viewer.ftl +0 -32
  235. package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +0 -32
  236. package/static/assets/pdfjs/web/locale/hu/viewer.ftl +0 -32
  237. package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +372 -16
  238. package/static/assets/pdfjs/web/locale/hye/viewer.ftl +0 -16
  239. package/static/assets/pdfjs/web/locale/ia/viewer.ftl +0 -32
  240. package/static/assets/pdfjs/web/locale/id/viewer.ftl +38 -32
  241. package/static/assets/pdfjs/web/locale/is/viewer.ftl +27 -32
  242. package/static/assets/pdfjs/web/locale/it/viewer.ftl +0 -33
  243. package/static/assets/pdfjs/web/locale/ja/viewer.ftl +31 -33
  244. package/static/assets/pdfjs/web/locale/ka/viewer.ftl +0 -32
  245. package/static/assets/pdfjs/web/locale/kab/viewer.ftl +0 -32
  246. package/static/assets/pdfjs/web/locale/kk/viewer.ftl +31 -32
  247. package/static/assets/pdfjs/web/locale/km/viewer.ftl +0 -12
  248. package/static/assets/pdfjs/web/locale/kn/viewer.ftl +0 -12
  249. package/static/assets/pdfjs/web/locale/ko/viewer.ftl +0 -32
  250. package/static/assets/pdfjs/web/locale/lij/viewer.ftl +0 -12
  251. package/static/assets/pdfjs/web/locale/lo/viewer.ftl +0 -23
  252. package/static/assets/pdfjs/web/locale/lt/viewer.ftl +0 -16
  253. package/static/assets/pdfjs/web/locale/ltg/viewer.ftl +0 -12
  254. package/static/assets/pdfjs/web/locale/lv/viewer.ftl +0 -12
  255. package/static/assets/pdfjs/web/locale/meh/viewer.ftl +0 -14
  256. package/static/assets/pdfjs/web/locale/mk/viewer.ftl +0 -19
  257. package/static/assets/pdfjs/web/locale/ml/viewer.ftl +0 -31
  258. package/static/assets/pdfjs/web/locale/mr/viewer.ftl +0 -16
  259. package/static/assets/pdfjs/web/locale/ms/viewer.ftl +0 -12
  260. package/static/assets/pdfjs/web/locale/my/viewer.ftl +0 -12
  261. package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +0 -32
  262. package/static/assets/pdfjs/web/locale/ne-NP/viewer.ftl +0 -12
  263. package/static/assets/pdfjs/web/locale/nl/viewer.ftl +0 -32
  264. package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +0 -32
  265. package/static/assets/pdfjs/web/locale/oc/viewer.ftl +0 -24
  266. package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +0 -32
  267. package/static/assets/pdfjs/web/locale/pl/viewer.ftl +0 -32
  268. package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +0 -32
  269. package/static/assets/pdfjs/web/locale/pt-PT/viewer.ftl +0 -32
  270. package/static/assets/pdfjs/web/locale/rm/viewer.ftl +0 -32
  271. package/static/assets/pdfjs/web/locale/ro/viewer.ftl +5 -37
  272. package/static/assets/pdfjs/web/locale/ru/viewer.ftl +0 -32
  273. package/static/assets/pdfjs/web/locale/sat/viewer.ftl +0 -23
  274. package/static/assets/pdfjs/web/locale/sc/viewer.ftl +8 -27
  275. package/static/assets/pdfjs/web/locale/sco/viewer.ftl +0 -16
  276. package/static/assets/pdfjs/web/locale/si/viewer.ftl +0 -22
  277. package/static/assets/pdfjs/web/locale/sk/viewer.ftl +0 -32
  278. package/static/assets/pdfjs/web/locale/skr/viewer.ftl +0 -32
  279. package/static/assets/pdfjs/web/locale/sl/viewer.ftl +30 -32
  280. package/static/assets/pdfjs/web/locale/son/viewer.ftl +0 -12
  281. package/static/assets/pdfjs/web/locale/sq/viewer.ftl +0 -32
  282. package/static/assets/pdfjs/web/locale/sr/viewer.ftl +0 -32
  283. package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +0 -32
  284. package/static/assets/pdfjs/web/locale/szl/viewer.ftl +0 -16
  285. package/static/assets/pdfjs/web/locale/ta/viewer.ftl +0 -12
  286. package/static/assets/pdfjs/web/locale/te/viewer.ftl +0 -16
  287. package/static/assets/pdfjs/web/locale/tg/viewer.ftl +0 -32
  288. package/static/assets/pdfjs/web/locale/th/viewer.ftl +38 -32
  289. package/static/assets/pdfjs/web/locale/tl/viewer.ftl +0 -16
  290. package/static/assets/pdfjs/web/locale/tr/viewer.ftl +0 -32
  291. package/static/assets/pdfjs/web/locale/trs/viewer.ftl +0 -12
  292. package/static/assets/pdfjs/web/locale/uk/viewer.ftl +0 -32
  293. package/static/assets/pdfjs/web/locale/ur/viewer.ftl +0 -16
  294. package/static/assets/pdfjs/web/locale/uz/viewer.ftl +0 -12
  295. package/static/assets/pdfjs/web/locale/vi/viewer.ftl +0 -32
  296. package/static/assets/pdfjs/web/locale/xh/viewer.ftl +0 -12
  297. package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +0 -32
  298. package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +0 -32
  299. package/static/assets/pdfjs/web/viewer.css +586 -437
  300. package/static/assets/pdfjs/web/viewer.html +12 -23
  301. package/static/assets/pdfjs/web/viewer.mjs +955 -514
  302. package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
  303. package/static/assets/pdfjs/web/wasm/openjpeg.wasm +0 -0
  304. package/static/assets/pdfjs/web/wasm/openjpeg_nowasm_fallback.js +10 -22
  305. package/static/{chunk-SPTF6FSM.js → chunk-27YQB3TE.js} +1 -1
  306. package/static/chunk-2I4CUFUA.js +1 -0
  307. package/static/chunk-2MTM6SWN.js +4 -0
  308. package/static/{chunk-7VRUZRJG.js → chunk-34MKICK5.js} +2 -2
  309. package/static/chunk-5O3DIUU3.js +1 -0
  310. package/static/{chunk-VJRTMDEJ.js → chunk-6NMVZIIT.js} +1 -1
  311. package/static/{chunk-L6MU6S2V.js → chunk-7DN7ZAPU.js} +1 -1
  312. package/static/{chunk-MVO4WZLK.js → chunk-7FUM3JGM.js} +1 -1
  313. package/static/{chunk-RSS6GYNE.js → chunk-7ITZXYYJ.js} +1 -1
  314. package/static/chunk-7P27WBGC.js +4 -0
  315. package/static/chunk-ATP3BFHV.js +562 -0
  316. package/static/chunk-AWQ2YTVC.js +1 -0
  317. package/static/chunk-DSOE3FEP.js +1 -0
  318. package/static/{chunk-2R6HHGUR.js → chunk-EFKMBLRE.js} +1 -1
  319. package/static/chunk-FUFKVHPU.js +1 -0
  320. package/static/{chunk-MRSWNAVB.js → chunk-HCDLWTMW.js} +1 -1
  321. package/static/chunk-IPAC4VAF.js +1 -0
  322. package/static/{chunk-ZC5NIT55.js → chunk-IQOALFYU.js} +1 -1
  323. package/static/chunk-JASU3CIH.js +1 -0
  324. package/static/{chunk-6OJZWYRZ.js → chunk-JQ5FTO2M.js} +1 -1
  325. package/static/chunk-JUNZFADM.js +1 -0
  326. package/static/{chunk-LLWSLOSX.js → chunk-LJUKI4SQ.js} +1 -1
  327. package/static/{chunk-WI7FOANP.js → chunk-LUWQFIWR.js} +1 -1
  328. package/static/{chunk-BIUNUYZ5.js → chunk-ORMRCEGT.js} +1 -1
  329. package/static/{chunk-IZL7JPTS.js → chunk-Q7D6RN4N.js} +1 -1
  330. package/static/{chunk-JYXLQRHG.js → chunk-QJX6ITLW.js} +1 -1
  331. package/static/{chunk-YJMN3B4N.js → chunk-QQ6UQQBR.js} +1 -1
  332. package/static/chunk-S2HDY3OL.js +1 -0
  333. package/static/{chunk-NE4NDO45.js → chunk-S75P2FFI.js} +1 -1
  334. package/static/{chunk-CRQNEHTX.js → chunk-T3EYFSVZ.js} +1 -1
  335. package/static/{chunk-MCLQFZ3S.js → chunk-U34OZUZ7.js} +1 -1
  336. package/static/chunk-Y7EH7G5K.js +1 -0
  337. package/static/{chunk-MGGT6MIJ.js → chunk-ZQQPUYLU.js} +1 -1
  338. package/static/index.html +2 -2
  339. package/static/main-7SQDDVMD.js +9 -0
  340. package/static/{styles-FYUSO6OJ.css → styles-A5VYX3CE.css} +1 -1
  341. package/server/applications/users/dto/user-password.dto.js.map +0 -1
  342. package/static/chunk-4U5A2DEP.js +0 -4
  343. package/static/chunk-54EAZ2UD.js +0 -1
  344. package/static/chunk-7ZRXJONB.js +0 -1
  345. package/static/chunk-F2J2IIJE.js +0 -1
  346. package/static/chunk-FNFGUIQH.js +0 -4
  347. package/static/chunk-GGLK52CG.js +0 -1
  348. package/static/chunk-HW2H3ISM.js +0 -559
  349. package/static/chunk-HX6BBYVD.js +0 -1
  350. package/static/chunk-JF7S3UYQ.js +0 -1
  351. package/static/chunk-KSHPKI4G.js +0 -1
  352. package/static/chunk-VPJ2V27B.js +0 -1
  353. package/static/chunk-VUI3KV7V.js +0 -1
  354. package/static/chunk-ZXS4V7J2.js +0 -1
  355. package/static/main-FFIWFD2F.js +0 -7
@@ -0,0 +1 @@
1
+ import{$ as Vt,B as si,Ha as _i,Ia as yi,Jb as Ai,Kb as lt,Na as Ei,R as ui,T as li,Ta as bi,Tb as L,U as ie,Ua as Si,X as ut,Z as pi,_ as fi,aa as di,ba as se,ca as W,da as mi,ea as gi,fa as z,ib as wi,lb as Z,mb as vi,nb as Ht,zb as tt}from"./chunk-2MTM6SWN.js";import{$c as Pt,Ad as Ut,Cb as v,Eb as D,G as Oe,Gd as ii,Hb as Le,Hd as Mt,Ib as Ue,Jb as Ot,Kb as xt,L as xe,Lb as te,Ma as m,Mb as Me,Mc as Ye,Nb as H,Of as ci,Pb as T,Pc as Ft,Qa as Pe,Ra as Q,Rb as Ve,Tb as He,Ub as We,Vb as $e,W as Ne,Xa as Ct,Ya as kt,Za as J,Zb as Nt,_c as It,ba as at,bb as Be,bd as Bt,c as Re,ca as vt,ce as ri,da as At,dc as qe,dd as ht,de as ni,eg as hi,fa as Fe,fc as Ge,fd as Dt,gd as Ke,ha as p,hb as De,ib as Rt,jb as R,kb as O,kd as je,ld as Qe,ma as M,na as V,od as Je,pb as k,pd as Xe,qb as f,qc as ee,qf as oi,rb as g,sb as X,ud as ze,v as b,va as Ie,vd as Ze,wf as ai,xd as ti,ya as Tt,yd as ei,zb as ct,zd as Lt}from"./chunk-ATP3BFHV.js";import{a as U,b as Ae,c as Te,e as Ce,j as ke}from"./chunk-RTRJ3KFH.js";var Ti={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var pt={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var l=(function(s){return s.BASE="/api/auth",s.LOGIN="login",s.LOGOUT="logout",s.REFRESH="refresh",s.TOKEN="token",s.TOKEN_REFRESH="token/refresh",s.WS="socket.io",s.TWO_FA_BASE="2fa",s.TWO_FA_ENABLE="enable",s.TWO_FA_DISABLE="disable",s.TWO_FA_LOGIN_VERIFY="login/verify",s.TWO_FA_ADMIN_RESET_USER="reset/user",s})(l||{}),tr=`${l.BASE}/${l.LOGIN}`,er=`${l.BASE}/${l.LOGOUT}`,Ci=`${l.BASE}/${l.REFRESH}`,ir=`${l.BASE}/${l.TOKEN}`,sr=`${l.BASE}/${l.TOKEN_REFRESH}`,ki=`/${l.WS}`,re=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ENABLE}`,Ri=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_DISABLE}`,Oi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_LOGIN_VERIFY}`,xi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ADMIN_RESET_USER}`;var be={};Ce(be,{Fetch:()=>yt,Manager:()=>Y,NodeWebSocket:()=>P,NodeXHR:()=>I,Socket:()=>q,WebSocket:()=>P,WebTransport:()=>$,XHR:()=>I,connect:()=>K,default:()=>K,io:()=>K,protocol:()=>ye});var C=Object.create(null);C.open="0";C.close="1";C.ping="2";C.pong="3";C.message="4";C.upgrade="5";C.noop="6";var ft=Object.create(null);Object.keys(C).forEach(s=>{ft[C[s]]=s});var dt={type:"error",data:"parser error"};var Ii=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pi=typeof ArrayBuffer=="function",Bi=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,mt=({type:s,data:t},i,e)=>Ii&&t instanceof Blob?i?e(t):Ni(t,e):Pi&&(t instanceof ArrayBuffer||Bi(t))?i?e(t):Ni(new Blob([t]),e):e(C[s]+(t||"")),Ni=(s,t)=>{let i=new FileReader;return i.onload=function(){let e=i.result.split(",")[1];t("b"+(e||""))},i.readAsDataURL(s)};function Fi(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}var ne;function Di(s,t){if(Ii&&s.data instanceof Blob)return s.data.arrayBuffer().then(Fi).then(t);if(Pi&&(s.data instanceof ArrayBuffer||Bi(s.data)))return t(Fi(s.data));mt(s,!1,i=>{ne||(ne=new TextEncoder),t(ne.encode(i))})}var Li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Li.length;s++)gt[Li.charCodeAt(s)]=s;var Ui=s=>{let t=s.length*.75,i=s.length,e,r=0,n,o,a,c;s[s.length-1]==="="&&(t--,s[s.length-2]==="="&&t--);let E=new ArrayBuffer(t),w=new Uint8Array(E);for(e=0;e<i;e+=4)n=gt[s.charCodeAt(e)],o=gt[s.charCodeAt(e+1)],a=gt[s.charCodeAt(e+2)],c=gt[s.charCodeAt(e+3)],w[r++]=n<<2|o>>4,w[r++]=(o&15)<<4|a>>2,w[r++]=(a&3)<<6|c&63;return E};var gs=typeof ArrayBuffer=="function",_t=(s,t)=>{if(typeof s!="string")return{type:"message",data:Mi(s,t)};let i=s.charAt(0);return i==="b"?{type:"message",data:_s(s.substring(1),t)}:ft[i]?s.length>1?{type:ft[i],data:s.substring(1)}:{type:ft[i]}:dt},_s=(s,t)=>{if(gs){let i=Ui(s);return Mi(i,t)}else return{base64:!0,data:s}},Mi=(s,t)=>{switch(t){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};var Vi="",Hi=(s,t)=>{let i=s.length,e=new Array(i),r=0;s.forEach((n,o)=>{mt(n,!1,a=>{e[o]=a,++r===i&&t(e.join(Vi))})})},Wi=(s,t)=>{let i=s.split(Vi),e=[];for(let r=0;r<i.length;r++){let n=_t(i[r],t);if(e.push(n),n.type==="error")break}return e};function $i(){return new TransformStream({transform(s,t){Di(s,i=>{let e=i.length,r;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);let n=new DataView(r.buffer);n.setUint8(0,126),n.setUint16(1,e)}else{r=new Uint8Array(9);let n=new DataView(r.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(e))}s.data&&typeof s.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(i)})}})}var oe;function Wt(s){return s.reduce((t,i)=>t+i.length,0)}function $t(s,t){if(s[0].length===t)return s.shift();let i=new Uint8Array(t),e=0;for(let r=0;r<t;r++)i[r]=s[0][e++],e===s[0].length&&(s.shift(),e=0);return s.length&&e<s[0].length&&(s[0]=s[0].slice(e)),i}function qi(s,t){oe||(oe=new TextDecoder);let i=[],e=0,r=-1,n=!1;return new TransformStream({transform(o,a){for(i.push(o);;){if(e===0){if(Wt(i)<1)break;let c=$t(i,1);n=(c[0]&128)===128,r=c[0]&127,r<126?e=3:r===126?e=1:e=2}else if(e===1){if(Wt(i)<2)break;let c=$t(i,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),e=3}else if(e===2){if(Wt(i)<8)break;let c=$t(i,8),E=new DataView(c.buffer,c.byteOffset,c.length),w=E.getUint32(0);if(w>Math.pow(2,21)-1){a.enqueue(dt);break}r=w*Math.pow(2,32)+E.getUint32(4),e=3}else{if(Wt(i)<r)break;let c=$t(i,r);a.enqueue(_t(n?c:oe.decode(c),t)),e=0}if(r===0||r>s){a.enqueue(dt);break}}}})}var ae=4;function u(s){if(s)return ys(s)}function ys(s){for(var t in u.prototype)s[t]=u.prototype[t];return s}u.prototype.on=u.prototype.addEventListener=function(s,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(t),this};u.prototype.once=function(s,t){function i(){this.off(s,i),t.apply(this,arguments)}return i.fn=t,this.on(s,i),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(s,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+s];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var e,r=0;r<i.length;r++)if(e=i[r],e===t||e.fn===t){i.splice(r,1);break}return i.length===0&&delete this._callbacks["$"+s],this};u.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),i=this._callbacks["$"+s],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(i){i=i.slice(0);for(var e=0,r=i.length;e<r;++e)i[e].apply(this,t)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};u.prototype.hasListeners=function(s){return!!this.listeners(s).length};var x=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,i)=>i(t,0),_=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Gi="arraybuffer";function qt(s,...t){return t.reduce((i,e)=>(s.hasOwnProperty(e)&&(i[e]=s[e]),i),{})}var Es=_.setTimeout,bs=_.clearTimeout;function N(s,t){t.useNativeTimers?(s.setTimeoutFn=Es.bind(_),s.clearTimeoutFn=bs.bind(_)):(s.setTimeoutFn=_.setTimeout.bind(_),s.clearTimeoutFn=_.clearTimeout.bind(_))}var Ss=1.33;function Yi(s){return typeof s=="string"?ws(s):Math.ceil((s.byteLength||s.size)*Ss)}function ws(s){let t=0,i=0;for(let e=0,r=s.length;e<r;e++)t=s.charCodeAt(e),t<128?i+=1:t<2048?i+=2:t<55296||t>=57344?i+=3:(e++,i+=4);return i}function Gt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ki(s){let t="";for(let i in s)s.hasOwnProperty(i)&&(t.length&&(t+="&"),t+=encodeURIComponent(i)+"="+encodeURIComponent(s[i]));return t}function ji(s){let t={},i=s.split("&");for(let e=0,r=i.length;e<r;e++){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}var Yt=class extends Error{constructor(t,i,e){super(t),this.description=i,this.context=e,this.type="TransportError"}},F=class extends u{constructor(t){super(),this.writable=!1,N(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,i,e){return super.emitReserved("error",new Yt(t,i,e)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let i=_t(t,this.socket.binaryType);this.onPacket(i)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,i={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let i=Ki(t);return i.length?"?"+i:""}};var et=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let i=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||i()})),this.writable||(e++,this.once("drain",function(){--e||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let i=e=>{if(this.readyState==="opening"&&e.type==="open"&&this.onOpen(),e.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)};Wi(t,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Hi(t,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=Gt()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(t,i)}};var Qi=!1;try{Qi=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Ji=Qi;function vs(){}var ce=class extends et{constructor(t){if(super(t),typeof location<"u"){let i=location.protocol==="https:",e=location.port;e||(e=i?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||e!==t.port}}doWrite(t,i){let e=this.request({method:"POST",data:t});e.on("success",i),e.on("error",(r,n)=>{this.onError("xhr post error",r,n)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(i,e)=>{this.onError("xhr poll error",i,e)}),this.pollXhr=t}},Kt=(()=>{class s extends u{constructor(i,e,r){super(),this.createRequest=i,N(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;let e=qt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var n;r.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=s.requestsCount++,s.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=vs,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete s.requests[this._index],this._xhr=null}}_onLoad(){let i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return s.requestsCount=0,s.requests={},s})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Xi);else if(typeof addEventListener=="function"){let s="onpagehide"in _?"pagehide":"unload";addEventListener(s,Xi,!1)}}function Xi(){for(let s in Kt.requests)Kt.requests.hasOwnProperty(s)&&Kt.requests[s].abort()}var As=(function(){let s=zi({xdomain:!1});return s&&s.responseType!==null})(),I=class extends ce{constructor(t){super(t);let i=t&&t.forceBase64;this.supportsBinary=As&&!i}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kt(zi,this.uri(),t)}};function zi(s){let t=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ji))return new XMLHttpRequest}catch{}if(!t)try{return new _[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Zi=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ue=class extends F{get name(){return"websocket"}doOpen(){let t=this.uri(),i=this.opts.protocols,e=Zi?{}:qt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(e.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,i,e)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let i=0;i<t.length;i++){let e=t[i],r=i===t.length-1;mt(e,this.supportsBinary,n=>{try{this.doWrite(e,n)}catch{}r&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=Gt()),this.supportsBinary||(i.b64=1),this.createUri(t,i)}},he=_.WebSocket||_.MozWebSocket,P=class extends ue{createSocket(t,i,e){return Zi?new he(t,i,e):i?new he(t,i):new he(t)}doWrite(t,i){this.ws.send(i)}};var $=class extends F{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let i=qi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(i).getReader(),r=$i();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let n=()=>{e.read().then(({done:a,value:c})=>{a||(this.onPacket(c),n())}).catch(a=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let i=0;i<t.length;i++){let e=t[i],r=i===t.length-1;this._writer.write(e).then(()=>{r&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var le={websocket:P,webtransport:$,polling:I};var Ts=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Cs=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function it(s){if(s.length>8e3)throw"URI too long";let t=s,i=s.indexOf("["),e=s.indexOf("]");i!=-1&&e!=-1&&(s=s.substring(0,i)+s.substring(i,e).replace(/:/g,";")+s.substring(e,s.length));let r=Ts.exec(s||""),n={},o=14;for(;o--;)n[Cs[o]]=r[o]||"";return i!=-1&&e!=-1&&(n.source=t,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=ks(n,n.path),n.queryKey=Rs(n,n.query),n}function ks(s,t){let i=/\/{2,9}/g,e=t.replace(i,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&e.splice(0,1),t.slice(-1)=="/"&&e.splice(e.length-1,1),e}function Rs(s,t){let i={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,r,n){r&&(i[r]=n)}),i}var pe=typeof addEventListener=="function"&&typeof removeEventListener=="function",jt=[];pe&&addEventListener("offline",()=>{jt.forEach(s=>s())},!1);var Qt=(()=>{class s extends u{constructor(i,e){if(super(),this.binaryType=Gi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(e=i,i=null),i){let r=it(i);e.hostname=r.host,e.secure=r.protocol==="https"||r.protocol==="wss",e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=it(e.host).host);N(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(r=>{let n=r.prototype.name;this.transports.push(n),this._transportsByName[n]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ji(this.opts.query)),pe&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},jt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){let e=Object.assign({},this.opts.query);e.EIO=ae,e.transport=i,this.id&&(e.sid=this.id);let r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let i=this.opts.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(i);e.open(),this.setTransport(e)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",s.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=new Error("server error");e.code=i.data,this._onError(e);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r<this.writeBuffer.length;r++){let n=this.writeBuffer[r].data;if(n&&(e+=Yi(n)),r>0&&e>this._maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,x(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,e,r){return this._sendPacket("message",i,e,r),this}send(i,e,r){return this._sendPacket("message",i,e,r),this}_sendPacket(i,e,r,n){if(typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let o={type:i,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let i=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),i()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(s.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),pe&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=jt.indexOf(this._offlineEventListener);r!==-1&&jt.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,e),this.writeBuffer=[],this._prevBufferLen=0}}}return s.protocol=ae,s})(),Jt=class extends Qt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let i=this.createTransport(t),e=!1;Qt.priorWebsocketSuccess=!1;let r=()=>{e||(i.send([{type:"ping",data:"probe"}]),i.once("packet",B=>{if(!e)if(B.type==="pong"&&B.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;Qt.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{e||this.readyState!=="closed"&&(w(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{let ot=new Error("probe error");ot.transport=i.name,this.emitReserved("upgradeError",ot)}}))};function n(){e||(e=!0,w(),i.close(),i=null)}let o=B=>{let ot=new Error("probe error: "+B);ot.transport=i.name,n(),this.emitReserved("upgradeError",ot)};function a(){o("transport closed")}function c(){o("socket closed")}function E(B){i&&B.name!==i.name&&n()}let w=()=>{i.removeListener("open",r),i.removeListener("error",o),i.removeListener("close",a),this.off("close",c),this.off("upgrading",E)};i.once("open",r),i.once("error",o),i.once("close",a),this.once("close",c),this.once("upgrading",E),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{e||i.open()},200):i.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let i=[];for(let e=0;e<t.length;e++)~this.transports.indexOf(t[e])&&i.push(t[e]);return i}},st=class extends Jt{constructor(t,i={}){let e=typeof t=="object"?t:i;(!e.transports||e.transports&&typeof e.transports[0]=="string")&&(e.transports=(e.transports||["polling","websocket","webtransport"]).map(r=>le[r]).filter(r=>!!r)),super(t,e)}};var yt=class extends et{doPoll(){this._fetch().then(t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then(i=>this.onData(i))}).catch(t=>{this.onError("fetch read error",t)})}doWrite(t,i){this._fetch(t).then(e=>{if(!e.ok)return this.onError("fetch write error",e.status,e);i()}).catch(e=>{this.onError("fetch write error",e)})}_fetch(t){var i;let e=t!==void 0,r=new Headers(this.opts.extraHeaders);return e&&r.set("content-type","text/plain;charset=UTF-8"),(i=this.socket._cookieJar)===null||i===void 0||i.appendCookies(r),fetch(this.uri(),{method:e?"POST":"GET",body:e?t:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then(n=>{var o;return(o=this.socket._cookieJar)===null||o===void 0||o.parseCookies(n.headers.getSetCookie()),n})}};var un=st.protocol;function ts(s,t="",i){let e=s;i=i||typeof location<"u"&&location,s==null&&(s=i.protocol+"//"+i.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=i.protocol+s:s=i.host+s),/^(https?|wss?):\/\//.test(s)||(typeof i<"u"?s=i.protocol+"//"+s:s="https://"+s),e=it(s)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port="80":/^(http|ws)s$/.test(e.protocol)&&(e.port="443")),e.path=e.path||"/";let n=e.host.indexOf(":")!==-1?"["+e.host+"]":e.host;return e.id=e.protocol+"://"+n+":"+e.port+t,e.href=e.protocol+"://"+n+(i&&i.port===e.port?"":":"+e.port),e}var Ee={};Ce(Ee,{Decoder:()=>ge,Encoder:()=>me,PacketType:()=>h,protocol:()=>ye});var Os=typeof ArrayBuffer=="function",xs=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,es=Object.prototype.toString,Ns=typeof Blob=="function"||typeof Blob<"u"&&es.call(Blob)==="[object BlobConstructor]",Fs=typeof File=="function"||typeof File<"u"&&es.call(File)==="[object FileConstructor]";function bt(s){return Os&&(s instanceof ArrayBuffer||xs(s))||Ns&&s instanceof Blob||Fs&&s instanceof File}function Et(s,t){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let i=0,e=s.length;i<e;i++)if(Et(s[i]))return!0;return!1}if(bt(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Et(s.toJSON(),!0);for(let i in s)if(Object.prototype.hasOwnProperty.call(s,i)&&Et(s[i]))return!0;return!1}function is(s){let t=[],i=s.data,e=s;return e.data=fe(i,t),e.attachments=t.length,{packet:e,buffers:t}}function fe(s,t){if(!s)return s;if(bt(s)){let i={_placeholder:!0,num:t.length};return t.push(s),i}else if(Array.isArray(s)){let i=new Array(s.length);for(let e=0;e<s.length;e++)i[e]=fe(s[e],t);return i}else if(typeof s=="object"&&!(s instanceof Date)){let i={};for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(i[e]=fe(s[e],t));return i}return s}function ss(s,t){return s.data=de(s.data,t),delete s.attachments,s}function de(s,t){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<t.length)return t[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let i=0;i<s.length;i++)s[i]=de(s[i],t);else if(typeof s=="object")for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(s[i]=de(s[i],t));return s}var Is=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ye=5,h=(function(s){return s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK",s})(h||{}),me=class{constructor(t){this.replacer=t}encode(t){return(t.type===h.EVENT||t.type===h.ACK)&&Et(t)?this.encodeAsBinary({type:t.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let i=""+t.type;return(t.type===h.BINARY_EVENT||t.type===h.BINARY_ACK)&&(i+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(i+=t.nsp+","),t.id!=null&&(i+=t.id),t.data!=null&&(i+=JSON.stringify(t.data,this.replacer)),i}encodeAsBinary(t){let i=is(t),e=this.encodeAsString(i.packet),r=i.buffers;return r.unshift(e),r}};function rs(s){return Object.prototype.toString.call(s)==="[object Object]"}var ge=class s extends u{constructor(t){super(),this.reviver=t}add(t){let i;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(t);let e=i.type===h.BINARY_EVENT;e||i.type===h.BINARY_ACK?(i.type=e?h.EVENT:h.ACK,this.reconstructor=new _e(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(bt(t)||t.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(t),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let i=0,e={type:Number(t.charAt(0))};if(h[e.type]===void 0)throw new Error("unknown packet type "+e.type);if(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK){let n=i+1;for(;t.charAt(++i)!=="-"&&i!=t.length;);let o=t.substring(n,i);if(o!=Number(o)||t.charAt(i)!=="-")throw new Error("Illegal attachments");e.attachments=Number(o)}if(t.charAt(i+1)==="/"){let n=i+1;for(;++i&&!(t.charAt(i)===","||i===t.length););e.nsp=t.substring(n,i)}else e.nsp="/";let r=t.charAt(i+1);if(r!==""&&Number(r)==r){let n=i+1;for(;++i;){let o=t.charAt(i);if(o==null||Number(o)!=o){--i;break}if(i===t.length)break}e.id=Number(t.substring(n,i+1))}if(t.charAt(++i)){let n=this.tryParse(t.substr(i));if(s.isPayloadValid(e.type,n))e.data=n;else throw new Error("invalid payload")}return e}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,i){switch(t){case h.CONNECT:return rs(i);case h.DISCONNECT:return i===void 0;case h.CONNECT_ERROR:return typeof i=="string"||rs(i);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&Is.indexOf(i[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},_e=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let i=ss(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function S(s,t,i){return s.on(t,i),function(){s.off(t,i)}}var Ps=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),q=class extends u{constructor(t,i,e){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=i,e&&e.auth&&(this.auth=e.auth),this._opts=Object.assign({},e),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[S(t,"open",this.onopen.bind(this)),S(t,"packet",this.onpacket.bind(this)),S(t,"error",this.onerror.bind(this)),S(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...i){var e,r,n;if(Ps.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(i.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;let o={type:h.EVENT,data:i};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){let w=this.ids++,B=i.pop();this._registerAckCallback(w,B),o.id=w}let a=(r=(e=this.io.engine)===null||e===void 0?void 0:e.transport)===null||r===void 0?void 0:r.writable,c=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,i){var e;let r=(e=this.flags.timeout)!==null&&e!==void 0?e:this._opts.ackTimeout;if(r===void 0){this.acks[t]=i;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);i.call(this,new Error("operation has timed out"))},r),o=(...a)=>{this.io.clearTimeoutFn(n),i.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...i){return new Promise((e,r)=>{let n=(o,a)=>o?r(o):e(a);n.withError=!0,i.push(n),this.emit(t,...i)})}_addToQueue(t){let i;typeof t[t.length-1]=="function"&&(i=t.pop());let e={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...n)=>e!==this._queue[0]?void 0:(r!==null?e.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(r)):(this._queue.shift(),i&&i(null,...n)),e.pending=!1,this._drainQueue())),this._queue.push(e),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let i=this._queue[0];i.pending&&!t||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case h.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(t);break;case h.ACK:case h.BINARY_ACK:this.onack(t);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e);break}}onevent(t){let i=t.data||[];t.id!=null&&i.push(this.ack(t.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let i=this._anyListeners.slice();for(let e of i)e.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let i=this,e=!1;return function(...r){e||(e=!0,i.packet({type:h.ACK,id:t,data:r}))}}onack(t){let i=this.acks[t.id];typeof i=="function"&&(delete this.acks[t.id],i.withError&&t.data.unshift(null),i.apply(this,t.data))}onconnect(t,i){this.id=t,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let i=this._anyListeners;for(let e=0;e<i.length;e++)if(t===i[e])return i.splice(e,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let i=this._anyOutgoingListeners;for(let e=0;e<i.length;e++)if(t===i[e])return i.splice(e,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let i=this._anyOutgoingListeners.slice();for(let e of i)e.apply(this,t.data)}}};function G(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}G.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),i=Math.floor(t*this.jitter*s);s=(Math.floor(t*10)&1)==0?s-i:s+i}return Math.min(s,this.max)|0};G.prototype.reset=function(){this.attempts=0};G.prototype.setMin=function(s){this.ms=s};G.prototype.setMax=function(s){this.max=s};G.prototype.setJitter=function(s){this.jitter=s};var Y=class extends u{constructor(t,i){var e;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(i=t,t=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,N(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((e=i.randomizationFactor)!==null&&e!==void 0?e:.5),this.backoff=new G({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=t;let r=i.parser||Ee;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var i;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(i=this.backoff)===null||i===void 0||i.setMin(t),this)}randomizationFactor(t){var i;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(i=this.backoff)===null||i===void 0||i.setJitter(t),this)}reconnectionDelayMax(t){var i;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(i=this.backoff)===null||i===void 0||i.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new st(this.uri,this.opts);let i=this.engine,e=this;this._readyState="opening",this.skipReconnect=!1;let r=S(i,"open",function(){e.onopen(),t&&t()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=S(i,"error",n);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),i.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(S(t,"ping",this.onping.bind(this)),S(t,"data",this.ondata.bind(this)),S(t,"error",this.onerror.bind(this)),S(t,"close",this.onclose.bind(this)),S(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(i){this.onclose("parse error",i)}}ondecoded(t){x(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,i){let e=this.nsps[t];return e?this._autoConnect&&!e.active&&e.connect():(e=new q(this,t,i),this.nsps[t]=e),e}_destroy(t){let i=Object.keys(this.nsps);for(let e of i)if(this.nsps[e].active)return;this._close()}_packet(t){let i=this.encoder.encode(t);for(let e=0;e<i.length;e++)this.engine.write(i[e],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,i){var e;this.cleanup(),(e=this.engine)===null||e===void 0||e.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let i=this.backoff.duration();this._reconnecting=!0;let e=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},i);this.opts.autoUnref&&e.unref(),this.subs.push(()=>{this.clearTimeoutFn(e)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var St={};function K(s,t){typeof s=="object"&&(t=s,s=void 0),t=t||{};let i=ts(s,t.path||"/socket.io"),e=i.source,r=i.id,n=i.path,o=St[r]&&n in St[r].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o,c;return a?c=new Y(e,t):(St[r]||(St[r]=new Y(e,t)),c=St[r]),i.query&&!t.query&&(t.query=i.queryKey),c.socket(i.path,t)}Object.assign(K,{Manager:Y,Socket:q,io:K,connect:K});var rt=class s{config;appRef;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(t,i){this.config=t,this.appRef=i,t===void 0&&(t=this.emptyConfig);let e=t.url,r=t.options,n=K?K:be;this.ioSocket=n(e,r)}get auth(){return this.ioSocket.auth}set auth(t){this.ioSocket.auth=t}get io(){return this.ioSocket.io}get open(){return this.connect}get close(){return this.disconnect}of(t){if(!t||t==="/")return this;let i=this.namespaces[t];if(i)return i;let a=this.config,{url:e}=a,r=Te(a,["url"]),n=U({url:!e.endsWith("/")&&!t.startsWith("/")?`${e}/${t}`:`${e}${t}`},r),o=new s(n,this.appRef);return this.namespaces[t]=o,o}on(t,i){return this.ioSocket.on(t,i),this}once(t,i){return this.ioSocket.once(t,i),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(t,...i){return this.ioSocket.emit(t,...i),this}send(...t){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(t,...i){return this.ioSocket.emitWithAck(t,...i)}removeListener(t,i){return this.ioSocket.removeListener(t,i),this}removeAllListeners(t){return this.ioSocket.removeAllListeners(t),this}fromEvent(t){return this.subscribersCounter[t]||(this.subscribersCounter[t]=0),this.subscribersCounter[t]++,this.eventObservables$[t]||(this.eventObservables$[t]=new Re(i=>{let e=r=>{i.next(r),this.appRef.tick()};return this.ioSocket.on(t,e),()=>{this.subscribersCounter[t]--,this.subscribersCounter[t]===0&&(this.ioSocket.removeListener(t,e),delete this.eventObservables$[t])}}).pipe(Ne())),this.eventObservables$[t]}fromOneTimeEvent(t){return new Promise(i=>this.once(t,i))}listeners(t){return this.ioSocket.listeners(t)}hasListeners(t){return this.ioSocket.hasListeners(t)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(t,i){return this.ioSocket.off(t,i),this}offAny(t){return this.ioSocket.offAny(t),this}offAnyOutgoing(t){return this.ioSocket.offAnyOutgoing(t),this}onAny(t){return this.ioSocket.onAny(t),this}onAnyOutgoing(t){return this.ioSocket.onAnyOutgoing(t),this}prependAny(t){return this.ioSocket.prependAny(t),this}prependAnyOutgoing(t){return this.ioSocket.prependAnyOutgoing(t),this}timeout(t){return this.ioSocket.timeout(t),this}get volatile(){let t=this.ioSocket.volatile;return this}get active(){return this.ioSocket.active}get connected(){return this.ioSocket.connected}get disconnected(){return this.ioSocket.disconnected}get recovered(){return this.ioSocket.recovered}get id(){return this.ioSocket.id}compress(t){return this.ioSocket.compress(t),this}};function Bs(s,t){return new rt(s,t)}var ns=new Fe("__SOCKET_IO_CONFIG__"),to=(()=>{class s{static forRoot(i){return{ngModule:s,providers:[{provide:ns,useValue:i},{provide:rt,useFactory:Bs,deps:[ns,De]}]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=kt({type:s});static \u0275inj=At({})}return s})();var Se={BASE:`${li}/notifications`,UNREAD:"unread"},Xt=Se.BASE;var d=(function(s){return s.ADD="add",s.UPDATE="update",s.DELETE="delete",s.DELETE_PERMANENTLY="deletePermanently",s})(d||{});var A=(function(s){return s.COMMENTS="comments",s.SPACES="spaces",s.SPACE_ROOTS="spaces_roots",s.SHARES="shares",s.LINKS="links",s.SYNC="sync",s.AUTH_LOCKED="auth_locked",s.AUTH_2FA="auth_2fa",s})(A||{}),ao={COMMENTS:"commented",SPACES:{[d.ADD]:"You now have access to the space",[d.DELETE]:"You no longer have access to the space",[d.DELETE_PERMANENTLY]:"This space has been permanently deleted"},SPACE_ROOTS:{[d.ADD]:"anchored",[d.DELETE]:"unanchored"},SHARES:{[d.ADD]:"shared with you",[d.DELETE]:"no longer share with you"},SHARES_WITHOUT_OWNER:{[d.ADD]:"You now have access to the share",[d.DELETE]:"You no longer have access to the share",[d.DELETE_PERMANENTLY]:"You are no longer a member of the parent share, your child share has been deleted"},LINKS:{[d.ADD]:"shared with you",[d.UPDATE]:"You now have access to the space"},SYNC:{[d.DELETE]:"You are no longer synchronizing"},AUTH_2FA:{[d.ADD]:"Two-factor authentication (2FA) on your account has been enabled",[d.DELETE]:"Two-factor authentication (2FA) on your account has been disabled"},AUTH_LOCKED:{[d.DELETE]:"Your account has been locked after several unsuccessful authentication attempts"}};var os=oi;var as={[A.COMMENTS]:os,[A.SPACES]:lt.SPACES,[A.SPACE_ROOTS]:lt.SPACES,[A.SHARES]:lt.SHARES,[A.LINKS]:lt.LINKS,[A.SYNC]:wi.SYNC};var zt=class{constructor(t){this.soonRead=!1,Object.assign(this,t),this.fromUser?this.fromUser.avatarUrl=Z(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Information",avatarUrl:null},this.appIcon=as[this.content.app],this.setMainElement()}setMainElement(){if(this.content.app===A.COMMENTS||this.content.app===A.SHARES||this.content.app===A.SYNC)return;let t=this.content.url.split("/");t.length>1&&(this.mainElement=t[t.length-1])}};var cs=(()=>{let t=class t{constructor(){this.http=p(Ft),this.store=p(Ht),this.layout=p(tt)}getNotifications(e=!1){return this.http.get(`${Xt}${e?`/${Se.UNREAD}`:""}`).pipe(b(r=>r.map(n=>new zt(n))))}wasReadNotification(e){return this.http.patch(`${Xt}/${e}`,null)}deleteNotification(e){return this.http.delete(`${Xt}${e?`/${e}`:""}`)}checkUnreadNotifications(e=!1){this.getNotifications().subscribe(r=>{let n;if(e&&r.length){let o=r[0];n=this.layout.sendNotification("warning",o.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(o.content.event)}: <b>${o.content.element}</b>`),null,{enableHtml:!0})}else{let o=r.filter(a=>!a.wasRead).length;o&&(n=this.layout.sendNotification("warning","Notifications",this.layout.translateString(o===1?"one_notification":"nb_notifications",{nb:o})))}n&&n.onTap.pipe(xe(1)).subscribe(()=>this.layout.showRSideBarTab(Ei.NOTIFICATIONS,!0)),this.store.notifications.set(r)})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})();var y=(function(s){return s.ACCESS="access",s.ACCESS_2FA="access_2fa",s.REFRESH="refresh",s.WS="ws",s.CSRF="csrf",s.CSRF_2FA="csrf_2fa",s})(y||{});var Bo="sync-in-csrf";var we=6;var hs="sync-in-two-fa-code",us="sync-in-two-fa-password",Do={[y.ACCESS]:"/",[y.REFRESH]:Ci,[y.WS]:ki,[y.CSRF]:"/",[y.ACCESS_2FA]:Oi,[y.CSRF_2FA]:"/"},Lo=[y.REFRESH,y.ACCESS,y.WS,y.CSRF],Uo=[y.ACCESS_2FA,y.CSRF_2FA];var Ls=["Password"];function Us(s,t){s&1&&(f(0,"label",1),T(1,"Password"),g())}function Ms(s,t){if(s&1){let i=ct();f(0,"div",5),v("click",function(){M(i);let r=D();return V(r.randomPassword())}),f(1,"span"),X(2,"fa-icon",6),g()()}if(s&2){let i=D();m(2),k("icon",i.icons.faDice)}}var ls=(()=>{let t=class t{constructor(){this.passwordChange=new Be,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.centered=!1,this.locale=p(Ut),this.toggleVisiblePassword=Si,this.icons={faEye:ni,faEyeSlash:ci,faDice:hi}}ngOnInit(){this.focus&&setTimeout(()=>{this.passwordElement.nativeElement.focus(),this.passwordElement.nativeElement.select()},0)}randomPassword(){this.disabled||this.passwordChange.emit(_i(this.passwordMinLength+2))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=Ct({type:t,selectors:[["app-input-password"]],viewQuery:function(r,n){if(r&1&&Ue(Ls,7),r&2){let o;Ot(o=xt())&&(n.passwordElement=o.first)}},inputs:{password:"password",passwordMinLength:"passwordMinLength",placeholder:"placeholder",showGenerator:"showGenerator",showLabel:"showLabel",disabled:"disabled",isRequired:"isRequired",focus:"focus",centered:"centered"},outputs:{passwordChange:"passwordChange"},decls:9,vars:16,consts:[["Password",""],["for","password","l10nTranslate",""],["id","password",1,"input-group","input-group-sm",2,"min-width","150px"],["autocomplete","off","type","password",1,"form-control","form-control-sm","pe-0",3,"ngModelChange","keyup","ngModel","disabled","placeholder","required"],[1,"input-group-text","cursor-pointer"],[1,"input-group-text","cursor-pointer",3,"click"],[3,"icon"]],template:function(r,n){if(r&1){let o=ct();R(0,Us,2,0,"label",1),f(1,"div",2)(2,"input",3,0),qe(4,"translate"),$e("ngModelChange",function(c){return M(o),We(n.password,c)||(n.password=c),V(c)}),v("keyup",function(){return M(o),V(n.passwordChange.emit(n.password))}),g(),R(5,Ms,3,1,"div",4),f(6,"div",5),v("click",function(){M(o);let c=te(3);return V(n.toggleVisiblePassword(c))}),f(7,"span"),X(8,"fa-icon",6),g()()()}if(r&2){let o=te(3);O(n.showLabel?0:-1),m(2),Me("padding-left",n.centered?"2rem":""),H("is-invalid",n.isRequired&&(n.password==null?null:n.password.length)<n.passwordMinLength)("text-center",n.centered),He("ngModel",n.password),k("disabled",n.disabled)("placeholder",Ge(4,13,n.placeholder,n.locale.language))("required",n.isRequired),m(3),O(n.showGenerator?5:-1),m(3),k("icon",o.type==="text"?n.icons.faEye:n.icons.faEyeSlash)}},dependencies:[ei,Bt,Dt,ze,je,Lt,It,Mt,ii],encapsulation:2});let s=t;return s})();var ps=(()=>{let t=class t{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=p(Tt)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=J({type:t,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let s=t;return s})();function Vs(s,t){s&1&&(f(0,"span",3),T(1,"Two-Factor Authentication"),g())}function Hs(s,t){s&1&&(f(0,"span",3),T(1,"Password Authentication"),g())}function Ws(s,t){if(s&1&&T(0),s&2){let i=D();Ve(" ",i.hasError," ")}}function $s(s,t){s&1&&T(0," Enter your password ")}function qs(s,t){s&1&&T(0," Valid with your TOTP code ")}function Gs(s,t){if(s&1){let i=ct();f(0,"div",9)(1,"app-input-password",13),v("passwordChange",function(r){M(i);let n=D();return V(n.updatePassword(r))}),g()()}if(s&2){let i=D();m(),k("password",i.twoFaForm.value.password)("focus",!0)("centered",!0)}}function Ys(s,t){s&1&&(f(0,"div",14),T(1,"Valid with your TOTP code"),g())}function Ks(s,t){if(s&1&&(R(0,Ys,2,0,"div",14),f(1,"div",15),X(2,"input",16),g()),s&2){let i=D();O(i.withPassword?0:-1),m(2),k("autoFocus",!i.withPassword)("autoSelect",!i.withPassword)("maxlength",i.twoFaCodelength)}}var fs=(()=>{let t=class t{constructor(){this.withPassword=!1,this.withTwoFaEnabled=!0,this.submitted=!1,this.hasError=null,this.icons={faKey:ri,faLock:ai},this.twoFaCodelength=we,this.locale=p(Ut),this.fb=p(ti),this.layout=p(tt)}ngOnInit(){this.twoFaForm=this.fb.group({totpCode:this.fb.control("",this.withTwoFaEnabled?[ht.required,ht.pattern(new RegExp(`^\\d{${we}}$`))]:null),password:this.fb.control("",this.withPassword?[ht.required,ht.minLength(8)]:null)})}onClose(e=!1){this.isValid(e),this.layout.closeDialog()}onSubmit(){this.submitted=!0;let e=new Ye(U(U({},this.withTwoFaEnabled?{[hs]:this.twoFaForm.value.totpCode}:{}),this.withPassword?{[us]:this.twoFaForm.value.password}:{}));this.onClose(e)}updatePassword(e){this.twoFaForm.patchValue({password:e})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=Ct({type:t,selectors:[["app-user-auth-2fa-verify-dialog"]],inputs:{withPassword:"withPassword",withTwoFaEnabled:"withTwoFaEnabled"},decls:20,vars:9,consts:[[1,"modal-header","align-items-center","justify-content-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"modal-body","modal-auth-verify-2fa"],[1,"card","shadow-sm"],[1,"card-body"],["l10nTranslate","",1,"d-flex","justify-content-center","align-items-center","mb-3"],[3,"ngSubmit","formGroup"],[1,"mb-4"],[1,"d-grid","gap-2"],["type","submit","l10nTranslate","",1,"btn","btn-primary",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["id","password","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",3,"passwordChange","password","focus","centered"],["l10nTranslate","",1,"text-align-center","mb-3"],[1,"mb-3"],["appAutofocus","","type","text","formControlName","totpCode","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022","inputmode","numeric","autocomplete","one-time-code","name","totp",1,"form-control","text-center","fs-4",3,"autoFocus","autoSelect","maxlength"]],template:function(r,n){r&1&&(f(0,"div",0)(1,"h4",1),X(2,"fa-icon",2),R(3,Vs,2,0,"span",3)(4,Hs,2,0,"span",3),g()(),f(5,"div",4)(6,"div",5)(7,"div",6)(8,"p",7),R(9,Ws,1,1)(10,$s,1,0)(11,qs,1,0),g(),f(12,"form",8),v("ngSubmit",function(){return n.onSubmit()}),R(13,Gs,2,3,"div",9),R(14,Ks,3,4),f(15,"div",10)(16,"button",11),T(17,"Confirm"),g(),f(18,"button",12),v("click",function(){return n.onClose()}),T(19,"Cancel"),g()()()()()()),r&2&&(m(2),k("icon",n.icons.faLock),m(),O(n.withTwoFaEnabled?3:4),m(5),H("text-danger",n.hasError),m(),O(n.hasError?9:n.withPassword?10:11),m(3),k("formGroup",n.twoFaForm),m(),O(n.withPassword?13:-1),m(),O(n.withTwoFaEnabled?14:-1),m(2),k("disabled",n.twoFaForm.invalid||n.submitted))},dependencies:[It,Mt,ps,Lt,Qe,Bt,Dt,Ke,Ze,Je,Xe,ls],encapsulation:2});let s=t;return s})();var Zt=class{constructor(t){this.parentGroup=t.parentGroup,this.members=t.members.map(i=>new L(i))}};var j=class{constructor(t){this.newly=0,this.currentAccessHover=!1,this.setManagers(t),Object.assign(this,t),this.avatarUrl=Z(t.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=(0,si.default)(this.currentAccess).fromNow(!0),this.newly=bi(this.currentAccess)}setManagers(t){t?.managers&&(t.managers=t.managers.map(i=>new L(i)))}};var wt=class{constructor(t){this.setOnlineStatus(yi("status",t)),this.avatarUrl=Z(t.login),Object.assign(this,t)}setOnlineStatus(t){this.onlineStatus=t,this.onlineTextStatus=ui[t]}};var Qa=(()=>{let t=class t{constructor(){this.http=p(Ft),this.layout=p(tt),this.store=p(Ht),this.webSocket=p(rt),this.notifications=p(cs),this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(Ti.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_USER).pipe(b(e=>new wt(e))).subscribe(e=>this.newOnlineUser(e)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_USERS).pipe(b(e=>e.map(r=>new wt(r)))).subscribe(e=>this.setOnlineUsers(e)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_STATUS).subscribe(e=>this.receiveOnlineStatus(e))}get user(){return this.store.user.getValue()}initUser(e,r=!1){this.refreshAvatar(),this.layout.setLanguage(e.language),this.store.userImpersonate.set(r||e.impersonated),this.store.user.next(e),this.checkQuota(this.store.user.getValue()),r&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(e){this.store.onlineUsers.set(e)}newOnlineUser(e){this.store.onlineUsers().find(r=>r.id===e.id)?this.receiveOnlineStatus({userId:e.id,status:e.onlineStatus}):this.store.onlineUsers.update(r=>[e,...r])}userHavePermission(e){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(e)!==-1:!1}browseGroup(e){return this.http.get(`${mi}${e?`/${e}`:""}`).pipe(b(r=>new Zt(r)))}createPersonalGroup(e){return this.http.post(W,e).pipe(b(r=>new L(r)))}updatePersonalGroup(e,r){return this.http.put(`${W}/${e}`,r).pipe(b(n=>new L(n)))}leavePersonalGroup(e){return this.http.delete(`${gi}/${e}`)}addUsersToGroup(e,r){return this.http.patch(`${W}/${e}/${ut.USERS}`,r)}deletePersonalGroup(e){return this.http.delete(`${W}/${e}`)}updateUserFromPersonalGroup(e,r,n){return this.http.patch(`${W}/${e}/${ut.USERS}/${r}`,n)}removeUserFromGroup(e,r){return this.http.delete(`${W}/${e}/${ut.USERS}/${r}`)}listGuests(){return this.http.get(z).pipe(b(e=>e.map(r=>new j(r))))}getGuest(e){return this.http.get(`${z}/${e}`).pipe(b(r=>new j(r)))}createGuest(e){return this.http.post(z,e).pipe(b(r=>new j(r)))}updateGuest(e,r){return this.http.put(`${z}/${e}`,r).pipe(b(n=>n?new j(n):null))}deleteGuest(e){return this.http.delete(`${z}/${e}`)}genAvatar(){this.http.patch(se,null).subscribe({next:()=>this.refreshAvatar(),error:e=>this.layout.sendNotification("error","Configuration","Avatar",e)})}uploadAvatar(e){let r=new FormData;r.append("file",e),this.http.put(se,r).subscribe({next:()=>this.refreshAvatar(),error:n=>this.layout.sendNotification("error","Configuration","Avatar",n)})}changePassword(e,r){return this.http.put(fi,e,{headers:r})}changeLanguage(e){return this.http.put(pi,e)}changeNotification(e){return this.http.put(di,e)}changeOnlineStatus(e,r=!0){this.webSocket.emit(pt.EVENTS.ONLINE_STATUS,{status:e,store:r})}receiveOnlineStatus(e){this.user.id===e.userId?this.user.onlineStatus=e.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(r=>r.map(n=>n.id===e.userId?Ae(U({},n),{onlineStatus:e.status}):n))}searchMembers(e,r=[]){return this.http.request("search",ut.BASE,{body:e}).pipe(b(n=>n.map(o=>new L(o,r))),Oe(()=>[]))}setMenusVisibility(e){for(let r of e)if(!(r.id&&(r.hide=!this.userHavePermission(r.id),r.hide))&&(r.checks?.length&&(r.hide=!r.checks.map(n=>n.negate?!this[n.prop][n.value]:this[n.prop][n.value]).every(n=>!!n)),r.submenus?.length&&this.setMenusVisibility(r.submenus),r.title===Ai.FILES)){for(let n of r.submenus)if(!n.hide){r.link=n.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(vi())}checkAppStoreAvailability(){this.http.get(`${ie.BASE}/${ie.APP_STORE}`).subscribe({next:e=>this.store.appStoreManifest.set(e),error:e=>console.error(e)})}listAppPasswords(e){return this.http.get(Vt,{headers:e})}generateAppPassword(e,r){return this.http.post(Vt,e,{headers:r})}deleteAppPassword(e){return this.http.delete(`${Vt}/${e}`)}init2Fa(){return this.http.get(re)}enable2Fa(e){return this.http.post(re,e)}disable2Fa(e){return this.http.post(Ri,e)}adminResetUser2Fa(e,r){return this.http.post(`${xi}/${e}`,null,{headers:r})}auth2FaVerifyDialog(e=!1){return ke(this,null,function*(){let r=this.store.server().twoFaEnabled&&this.user.twoFaEnabled;if(e||r)return new Promise(n=>{let o=this.layout.openDialog(fs,"xs",{initialState:{withPassword:e,withTwoFaEnabled:r}},{keyboard:!1});o.content.isValid=a=>{n(a)}})})}checkQuota(e){if(!(e.isGuest||e.isLink)&&e.storageQuota){let r=Math.round(100/e.storageQuota*(e.storageQuota-e.storageUsage));r<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):r<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:r}),null,{disableTimeOut:!0,closeButton:!0}):r<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:r}),null,{disableTimeOut:!0,closeButton:!0})}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})();var js={provide:Pt,useExisting:at(()=>Qs),multi:!0},Qs=(()=>{let t=class t{constructor(){this.btnCheckboxTrue=!0,this.btnCheckboxFalse=!1,this.state=!1,this.isDisabled=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype}onClick(){this.isDisabled||(this.toggle(!this.state),this.onChange(this.value))}ngOnInit(){this.toggle(this.trueValue===this.value)}get trueValue(){return typeof this.btnCheckboxTrue<"u"?this.btnCheckboxTrue:!0}get falseValue(){return typeof this.btnCheckboxFalse<"u"?this.btnCheckboxFalse:!1}toggle(e){this.state=e,this.value=this.state?this.trueValue:this.falseValue}writeValue(e){this.state=this.trueValue===e,this.value=e?this.trueValue:this.falseValue}setDisabledState(e){this.isDisabled=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=J({type:t,selectors:[["","btnCheckbox",""]],hostVars:3,hostBindings:function(r,n){r&1&&v("click",function(){return n.onClick()}),r&2&&(Rt("aria-pressed",n.state),H("active",n.state))},inputs:{btnCheckboxTrue:"btnCheckboxTrue",btnCheckboxFalse:"btnCheckboxFalse"},features:[Nt([js])]});let s=t;return s})(),Js={provide:Pt,useExisting:at(()=>ds),multi:!0},ds=(()=>{let t=class t{get value(){return this.group?this.group.value:this._value}set value(e){if(this.group){this.group.value=e;return}this._value=e,this._onChange(e)}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}get controlOrGroupDisabled(){return this.disabled||this.group&&this.group.disabled?!0:void 0}get hasDisabledClass(){return this.controlOrGroupDisabled&&!this.isActive}get isActive(){return this.btnRadio===this.value}get tabindex(){if(!this.controlOrGroupDisabled)return this.isActive||this.group==null?0:-1}get hasFocus(){return this._hasFocus}constructor(e,r,n,o){this.el=e,this.cdr=r,this.renderer=n,this.group=o,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.uncheckable=!1,this.role="radio",this._disabled=!1,this._hasFocus=!1}toggleIfAllowed(){this.canToggle()&&(this.uncheckable&&this.btnRadio===this.value?this.value=void 0:this.value=this.btnRadio)}onSpacePressed(e){this.toggleIfAllowed(),e.preventDefault()}focus(){this.el.nativeElement.focus()}onFocus(){this._hasFocus=!0}onBlur(){this._hasFocus=!1,this.onTouched()}canToggle(){return!this.controlOrGroupDisabled&&(this.uncheckable||this.btnRadio!==this.value)}ngOnChanges(e){"uncheckable"in e&&(this.uncheckable=this.uncheckable!==!1&&typeof this.uncheckable<"u")}_onChange(e){if(this.group){this.group.value=e;return}this.onTouched(),this.onChange(e)}writeValue(e){this.value=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){if(this._disabled=e,e){this.renderer.setAttribute(this.el.nativeElement,"disabled","disabled");return}this.renderer.removeAttribute(this.el.nativeElement,"disabled")}};t.\u0275fac=function(r){return new(r||t)(Q(Tt),Q(ee),Q(Pe),Q(at(()=>ms),8))},t.\u0275dir=J({type:t,selectors:[["","btnRadio",""]],hostVars:8,hostBindings:function(r,n){r&1&&v("click",function(){return n.toggleIfAllowed()})("keydown.space",function(a){return n.onSpacePressed(a)})("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),r&2&&(Rt("aria-disabled",n.controlOrGroupDisabled)("aria-checked",n.isActive)("role",n.role)("tabindex",n.tabindex),H("disabled",n.hasDisabledClass)("active",n.isActive))},inputs:{btnRadio:"btnRadio",uncheckable:"uncheckable",value:"value",disabled:"disabled"},features:[Nt([Js]),Ie]});let s=t;return s})(),Xs={provide:Pt,useExisting:at(()=>ms),multi:!0},ms=(()=>{let t=class t{constructor(e){this.cdr=e,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.role="radiogroup",this._disabled=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get disabled(){return this._disabled}get tabindex(){return this._disabled?null:0}writeValue(e){this._value=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.radioButtons&&(this._disabled=e,this.radioButtons.forEach(r=>{r.setDisabledState(e)}),this.cdr.markForCheck())}onFocus(){if(this._disabled)return;let e=this.getActiveOrFocusedRadio();if(e){e.focus();return}if(this.radioButtons){let r=this.radioButtons.find(n=>!n.disabled);r&&r.focus()}}onBlur(){this.onTouched&&this.onTouched()}selectNext(e){this.selectInDirection("next"),e.preventDefault()}selectPrevious(e){this.selectInDirection("previous"),e.preventDefault()}selectInDirection(e){if(this._disabled)return;function r(o,a){let E=(o+(e==="next"?1:-1))%a.length;return E<0&&(E=a.length-1),E}let n=this.getActiveOrFocusedRadio();if(n&&this.radioButtons){let o=this.radioButtons.toArray(),a=o.indexOf(n);for(let c=r(a,o);c!==a;c=r(c,o))if(o[c].canToggle()){o[c].toggleIfAllowed(),o[c].focus();break}}}getActiveOrFocusedRadio(){if(this.radioButtons)return this.radioButtons.find(e=>e.isActive)||this.radioButtons.find(e=>e.hasFocus)}};t.\u0275fac=function(r){return new(r||t)(Q(ee))},t.\u0275dir=J({type:t,selectors:[["","btnRadioGroup",""]],contentQueries:function(r,n,o){if(r&1&&Le(o,ds,4),r&2){let a;Ot(a=xt())&&(n.radioButtons=a)}},hostVars:2,hostBindings:function(r,n){r&1&&v("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()})("keydown.ArrowRight",function(a){return n.selectNext(a)})("keydown.ArrowDown",function(a){return n.selectNext(a)})("keydown.ArrowLeft",function(a){return n.selectPrevious(a)})("keydown.ArrowUp",function(a){return n.selectPrevious(a)}),r&2&&Rt("role",n.role)("tabindex",n.tabindex)},features:[Nt([Xs])]});let s=t;return s})(),cc=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=kt({type:t}),t.\u0275inj=At({});let s=t;return s})();export{tr as a,er as b,Ci as c,Oi as d,Bo as e,we as f,hs as g,us as h,to as i,A as j,cs as k,ls as l,ps as m,Zt as n,j as o,Qa as p,Qs as q,cc as r};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-JXZCNFW7.js";import{Oa as I,Pa as N,v as D,w as E}from"./chunk-4U5A2DEP.js";import{Cb as g,Ed as L,Fd as b,Ma as m,Mb as c,Nb as q,Ob as T,Pb as C,Tb as x,Ub as v,Vb as M,Xa as h,Xb as _,ad as Q,bb as d,dc as W,ed as B,fc as y,ha as p,jd as P,pb as f,qb as r,rb as l,wd as S,yd as w}from"./chunk-HW2H3ISM.js";var K=(()=>{let o=class o{constructor(){this.quotaChange=new d,this.maxWidthPercent=75,this.fullWidth=!1,this.locale=p(w),this.invalid=!1}ngOnInit(){this.fullWidth&&(this.maxWidthPercent=100),this.quota!==null&&(this.quotaText=this.quota===0?"0":N(this.quota))}onQuotaBlur(){if(this.quotaText){if(this.quotaText==="0"){this.quotaChange.emit(0);return}let e=u.exec(this.quotaText);if(e){this.quotaText=`${e[1]} ${e[2].toUpperCase()}`,this.quotaChange.emit(I(parseInt(e[1]),e[2]));return}}this.quotaChange.emit(null)}validateQuota(){this.invalid=this.quotaText&&this.quotaText!=="0"&&!u.test(this.quotaText)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=h({type:o,selectors:[["app-storage-quota"]],inputs:{quota:"quota",maxWidthPercent:"maxWidthPercent",fullWidth:"fullWidth"},outputs:{quotaChange:"quotaChange"},decls:5,vars:12,consts:[["for","storageQuota","l10nTranslate",""],["id","storageQuota"],["id","quota","placement","top","tooltip",'"512 MB" "12 GB" "2 TB" ...',"triggers","focus","type","text",3,"ngModelChange","blur","ngModel","placeholder"]],template:function(i,t){i&1&&(r(0,"label",0),C(1,"Storage Quota"),l(),r(2,"div",1)(3,"input",2),W(4,"translate"),M("ngModelChange",function(n){return v(t.quotaText,n)||(t.quotaText=n),n}),g("ngModelChange",function(){return t.validateQuota()})("blur",function(){return t.onQuotaBlur()}),l()()),i&2&&(m(3),T(_("form-control form-control-sm ",t.invalid?"is-invalid":"")),c("max-width",t.maxWidthPercent,"%"),q("w-100",t.fullWidth),x("ngModel",t.quotaText),f("placeholder",y(4,9,"Unlimited",t.locale.language)))},dependencies:[E,D,S,Q,B,P,b,L],encapsulation:2});let a=o;return a})();export{K as a};
1
+ import{a as u}from"./chunk-JXZCNFW7.js";import{Ra as I,Sa as N,v as D,w as E}from"./chunk-2MTM6SWN.js";import{Ad as w,Cb as g,Gd as L,Hd as b,Ma as m,Mb as c,Nb as q,Ob as T,Pb as C,Tb as x,Ub as v,Vb as M,Xa as h,Xb as _,bb as d,bd as Q,dc as W,fc as y,fd as B,ha as p,kd as P,pb as f,qb as r,rb as l,yd as S}from"./chunk-ATP3BFHV.js";var K=(()=>{let o=class o{constructor(){this.quotaChange=new d,this.maxWidthPercent=75,this.fullWidth=!1,this.locale=p(w),this.invalid=!1}ngOnInit(){this.fullWidth&&(this.maxWidthPercent=100),this.quota!==null&&(this.quotaText=this.quota===0?"0":N(this.quota))}onQuotaBlur(){if(this.quotaText){if(this.quotaText==="0"){this.quotaChange.emit(0);return}let e=u.exec(this.quotaText);if(e){this.quotaText=`${e[1]} ${e[2].toUpperCase()}`,this.quotaChange.emit(I(parseInt(e[1]),e[2]));return}}this.quotaChange.emit(null)}validateQuota(){this.invalid=this.quotaText&&this.quotaText!=="0"&&!u.test(this.quotaText)}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=h({type:o,selectors:[["app-storage-quota"]],inputs:{quota:"quota",maxWidthPercent:"maxWidthPercent",fullWidth:"fullWidth"},outputs:{quotaChange:"quotaChange"},decls:5,vars:12,consts:[["for","storageQuota","l10nTranslate",""],["id","storageQuota"],["id","quota","placement","top","tooltip",'"512 MB" "12 GB" "2 TB" ...',"triggers","focus","type","text",3,"ngModelChange","blur","ngModel","placeholder"]],template:function(i,t){i&1&&(r(0,"label",0),C(1,"Storage Quota"),l(),r(2,"div",1)(3,"input",2),W(4,"translate"),M("ngModelChange",function(n){return v(t.quotaText,n)||(t.quotaText=n),n}),g("ngModelChange",function(){return t.validateQuota()})("blur",function(){return t.onQuotaBlur()}),l()()),i&2&&(m(3),T(_("form-control form-control-sm ",t.invalid?"is-invalid":"")),c("max-width",t.maxWidthPercent,"%"),q("w-100",t.fullWidth),x("ngModel",t.quotaText),f("placeholder",y(4,9,"Unlimited",t.locale.language)))},dependencies:[E,D,S,Q,B,P,b,L],encapsulation:2});let a=o;return a})();export{K as a};
@@ -1 +1 @@
1
- import{a as P,b as R,c as X,d as $}from"./chunk-NE4NDO45.js";import{Xa as K,wb as O}from"./chunk-4U5A2DEP.js";import{Cb as h,Eb as l,Fd as B,Gc as k,Le as F,Ma as r,Pb as m,Rb as y,Re as E,Ue as L,Uf as I,Xa as M,Ye as d,Yf as N,Zc as z,ab as T,bb as g,dc as S,fc as V,ha as C,jb as b,kb as D,ma as w,na as f,nb as _,ob as v,pb as p,qb as a,rb as s,sb as u,zb as x}from"./chunk-HW2H3ISM.js";var A=(t,i)=>i.key;function U(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.setView(o.key))}),a(2,"span"),u(3,"fa-icon",2),m(4),s()()()}if(t&2){let e=i.$implicit;r(3),p("icon",e.value.icon),r(),y(" ",e.value.text)}}function j(t,i){if(t&1&&u(0,"fa-icon",10),t&2){let e=l(3);p("icon",e.sortParams.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function q(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.sortBy.emit(o.key))}),a(2,"span",9),m(3),b(4,j,1,1,"fa-icon",10),s()()()}if(t&2){let e=i.$implicit,n=l(2);r(3),y(" ",e.value," "),r(),D(n.sortParams.column===e.key?4:-1)}}function G(t,i){if(t&1&&(a(0,"ul",4)(1,"li",5),m(2,"Display"),s(),_(3,U,5,2,"li",6,A),S(5,"keyvalue"),a(6,"li",7),m(7,"Sort by"),s(),_(8,q,5,2,"li",6,A),S(10,"keyvalue"),s()),t&2){let e=l();r(3),v(V(5,0,e.viewsMode,e.originalOrderKeyValue)),r(5),v(V(10,3,e.sortFields,e.originalOrderKeyValue))}}var le=(()=>{let i=class i{constructor(){this.switchView=new g,this.sortBy=new g,this.originalOrderKeyValue=K,this.icons={faCog:E,faArrowDown:I,faArrowUp:L},this.viewsMode={tl:{enabled:!1,text:"List",icon:F},th:{enabled:!0,text:"S",icon:d,dimensions:96,image:56,imageRes:128,faSize:30,textSize:10,margins:18},thM:{enabled:!0,text:"M",icon:d,dimensions:112,image:72,imageRes:192,faSize:34,textSize:11,margins:18},thL:{enabled:!0,text:"L",icon:d,dimensions:152,image:112,imageRes:256,faSize:50,textSize:12,margins:18},thXl:{enabled:!0,text:"XL",icon:d,dimensions:192,image:152,imageRes:512,faSize:65,textSize:13,margins:18},thXxl:{enabled:!0,text:"XXL",icon:N,dimensions:232,image:192,imageRes:1024,faSize:80,textSize:13,margins:18}},this.layout=C(O),this.viewsMode.tl.text=this.layout.translateString(this.viewsMode.tl.text)}get viewMode(){return localStorage.getItem("viewMode")||"tl"}set viewMode(n){localStorage.setItem("viewMode",n)}currentView(){return this.viewsMode[this.viewMode]}setView(n){this.viewMode=n,this.switchView.emit(this.viewsMode[n])}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=M({type:i,selectors:[["app-navigation-view"]],inputs:{sortParams:"sortParams",sortFields:"sortFields"},outputs:{switchView:"switchView",sortBy:"sortBy"},decls:4,vars:1,consts:[["dropdown","",1,"btn-group","btn-group-sm"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[3,"icon"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["l10nTranslate","",1,"dropdown-header","fw-bold"],["role","menuitem"],["l10nTranslate","",1,"dropdown-header","fw-bold","mt-1"],[1,"dropdown-item",3,"click"],["l10nTranslate","",1,"me-2"],["size","xs",1,"ms-1",3,"icon"]],template:function(o,c){o&1&&(a(0,"div",0)(1,"button",1),u(2,"fa-icon",2),s(),T(3,G,11,6,"ul",3),s()),o&2&&(r(2),p("icon",c.icons.faCog))},dependencies:[$,R,X,P,z,B,k],encapsulation:2,changeDetection:0});let t=i;return t})();export{le as a};
1
+ import{a as P,b as R,c as X,d as $}from"./chunk-S75P2FFI.js";import{_a as K,zb as O}from"./chunk-2MTM6SWN.js";import{$e as d,Cb as h,Eb as l,Gc as k,Hd as B,Ma as r,Oe as F,Pb as m,Rb as y,Ue as E,Xa as M,Xe as L,Xf as I,_c as z,ab as T,ag as N,bb as g,dc as S,fc as V,ha as C,jb as b,kb as D,ma as w,na as f,nb as _,ob as v,pb as p,qb as a,rb as s,sb as u,zb as x}from"./chunk-ATP3BFHV.js";var A=(t,i)=>i.key;function U(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.setView(o.key))}),a(2,"span"),u(3,"fa-icon",2),m(4),s()()()}if(t&2){let e=i.$implicit;r(3),p("icon",e.value.icon),r(),y(" ",e.value.text)}}function j(t,i){if(t&1&&u(0,"fa-icon",10),t&2){let e=l(3);p("icon",e.sortParams.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function q(t,i){if(t&1){let e=x();a(0,"li",6)(1,"a",8),h("click",function(){let o=w(e).$implicit,c=l(2);return f(c.sortBy.emit(o.key))}),a(2,"span",9),m(3),b(4,j,1,1,"fa-icon",10),s()()()}if(t&2){let e=i.$implicit,n=l(2);r(3),y(" ",e.value," "),r(),D(n.sortParams.column===e.key?4:-1)}}function G(t,i){if(t&1&&(a(0,"ul",4)(1,"li",5),m(2,"Display"),s(),_(3,U,5,2,"li",6,A),S(5,"keyvalue"),a(6,"li",7),m(7,"Sort by"),s(),_(8,q,5,2,"li",6,A),S(10,"keyvalue"),s()),t&2){let e=l();r(3),v(V(5,0,e.viewsMode,e.originalOrderKeyValue)),r(5),v(V(10,3,e.sortFields,e.originalOrderKeyValue))}}var le=(()=>{let i=class i{constructor(){this.switchView=new g,this.sortBy=new g,this.originalOrderKeyValue=K,this.icons={faCog:E,faArrowDown:I,faArrowUp:L},this.viewsMode={tl:{enabled:!1,text:"List",icon:F},th:{enabled:!0,text:"S",icon:d,dimensions:96,image:56,imageRes:128,faSize:30,textSize:10,margins:18},thM:{enabled:!0,text:"M",icon:d,dimensions:112,image:72,imageRes:192,faSize:34,textSize:11,margins:18},thL:{enabled:!0,text:"L",icon:d,dimensions:152,image:112,imageRes:256,faSize:50,textSize:12,margins:18},thXl:{enabled:!0,text:"XL",icon:d,dimensions:192,image:152,imageRes:512,faSize:65,textSize:13,margins:18},thXxl:{enabled:!0,text:"XXL",icon:N,dimensions:232,image:192,imageRes:1024,faSize:80,textSize:13,margins:18}},this.layout=C(O),this.viewsMode.tl.text=this.layout.translateString(this.viewsMode.tl.text)}get viewMode(){return localStorage.getItem("viewMode")||"tl"}set viewMode(n){localStorage.setItem("viewMode",n)}currentView(){return this.viewsMode[this.viewMode]}setView(n){this.viewMode=n,this.switchView.emit(this.viewsMode[n])}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=M({type:i,selectors:[["app-navigation-view"]],inputs:{sortParams:"sortParams",sortFields:"sortFields"},outputs:{switchView:"switchView",sortBy:"sortBy"},decls:4,vars:1,consts:[["dropdown","",1,"btn-group","btn-group-sm"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[3,"icon"],["class","dropdown-menu dropdown-menu-right","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu","dropdown-menu-right"],["l10nTranslate","",1,"dropdown-header","fw-bold"],["role","menuitem"],["l10nTranslate","",1,"dropdown-header","fw-bold","mt-1"],[1,"dropdown-item",3,"click"],["l10nTranslate","",1,"me-2"],["size","xs",1,"ms-1",3,"icon"]],template:function(o,c){o&1&&(a(0,"div",0)(1,"button",1),u(2,"fa-icon",2),s(),T(3,G,11,6,"ul",3),s()),o&2&&(r(2),p("icon",c.icons.faCog))},dependencies:[$,R,X,P,z,B,k],encapsulation:2,changeDetection:0});let t=i;return t})();export{le as a};
@@ -1 +1 @@
1
- import{$ as y,A as He,Cb as Ur,E as W,G as J,Hb as Pr,I as se,Ia as wr,Jb as _r,K as Dt,Kb as xr,L as ae,O as Ve,P as G,Q as Nt,Qa as xt,R as fr,Ra as _,Sa as br,Tc as zr,V as pr,Va as Ir,Wa as Lt,Xa as Ar,Y as gr,Z as T,Za as Ie,_ as Ut,a as ar,aa as S,b as ur,bb as X,c as cr,ca as C,d as Tt,e as Et,ea as vr,eb as Tr,f as z,fa as D,fb as Er,g as M,ga as We,gb as Or,ha as d,hb as Mr,ia as mr,ib as Dr,ic as Lr,k as F,ka as ue,kc as Q,la as P,nc as jr,o as I,oa as Rr,oc as kr,p as h,q as we,qa as yr,qc as Ke,r as lr,ra as Ge,s as hr,sb as Nr,sc as Ye,ta as Qe,ua as Sr,uc as $r,v,va as be,vc as Ze,w as Ot,wa as Pt,x as A,xa as Cr,y as Mt,ya as _t,z as dr}from"./chunk-HW2H3ISM.js";import{a as l,b as U}from"./chunk-RTRJ3KFH.js";var f="primary",$e=Symbol("RouteTitle"),Ft=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function re(t){return new Ft(t)}function Qr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function xn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?qt(t):void 0,r=n?qt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Kr(t[i],n[i]))return!1;return!0}function qt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Kr(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Yr(t){return t.length>0?t[t.length-1]:null}function H(t){return lr(t)?t:Er(t)?I(Promise.resolve(t)):h(t)}var Ln={exact:Jr,subset:Xr},Zr={exact:jn,subset:kn,ignored:()=>!0};function Fr(t,n,e){return Ln[e.paths](t.root,n.root,e.matrixParams)&&Zr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function jn(t,n){return j(t,n)}function Jr(t,n,e){if(!ee(t.segments,n.segments)||!et(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Jr(t.children[r],n.children[r],e))return!1;return!0}function kn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Kr(t[e],n[e]))}function Xr(t,n,e){return en(t,n,n.segments,e)}function en(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ee(i,e)||n.hasChildren()||!et(i,e,r))}else if(t.segments.length===e.length){if(!ee(t.segments,e)||!et(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Xr(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ee(t.segments,i)||!et(t.segments,i,r)||!t.children[f]?!1:en(t.children[f],n,o,r)}}function et(t,n,e){return n.every((r,i)=>Zr[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){return Fn.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return tt(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=re(this.parameters),this._parameterMap}toString(){return rn(this)}};function $n(t,n){return ee(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function ee(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function zn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new ne,providedIn:"root"})}return t})(),ne=class{parse(n){let e=new Ht(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ae(n.root,!0)}`,r=Hn(n.queryParams),i=typeof n.fragment=="string"?`#${qn(n.fragment)}`:"";return`${e}${r}${i}`}},Fn=new ne;function tt(t){return t.segments.map(n=>rn(n)).join("/")}function Ae(t,n){if(!t.hasChildren())return tt(t);if(n){let e=t.children[f]?Ae(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ae(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=zn(t,(r,i)=>i===f?[Ae(t.children[f],!1)]:[`${i}:${Ae(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${tt(t)}/${e[0]}`:`${tt(t)}/(${e.join("//")})`}}function tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Je(t){return tn(t).replace(/%3B/gi,";")}function qn(t){return encodeURI(t)}function Bt(t){return tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function rt(t){return decodeURIComponent(t)}function qr(t){return rt(t.replace(/\+/g,"%20"))}function rn(t){return`${Bt(t.path)}${Bn(t.parameters)}`}function Bn(t){return Object.entries(t).map(([n,e])=>`;${Bt(n)}=${Bt(e)}`).join("")}function Hn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${Je(e)}=${Je(i)}`).join("&"):`${Je(e)}=${Je(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Vn=/^[^\/()?;#]+/;function jt(t){let n=t.match(Vn);return n?n[0]:""}var Wn=/^[^\/()?;=#]+/;function Gn(t){let n=t.match(Wn);return n?n[0]:""}var Qn=/^[^=?&#]+/;function Kn(t){let n=t.match(Qn);return n?n[0]:""}var Yn=/^[^&#]+/;function Zn(t){let n=t.match(Yn);return n?n[0]:""}var Ht=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=jt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new K(rt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Gn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=jt(this.remaining);i&&(r=i,this.capture(r))}n[rt(e)]=rt(r)}parseQueryParam(n){let e=Kn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Zn(this.remaining);s&&(r=s,this.capture(r))}let i=qr(e),o=qr(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=jt(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new S(4011,!1)}};function nn(t){return t.segments.length>0?new g([],{[f]:t}):t}function on(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=on(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return Jn(e)}function Jn(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function Y(t){return t instanceof $}function sn(t,n,e=null,r=null){let i=an(t);return un(i,n,e,r)}function an(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=nn(r);return n??i}function un(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return kt(i,i,i,e,r);let o=Xn(n);if(o.toRoot())return kt(i,i,new g([],{}),e,r);let s=ei(o,i,t),a=s.processChildren?Ee(s.segmentGroup,s.index,o.commands):ln(s.segmentGroup,s.index,o.commands);return kt(i,s.segmentGroup,a,e,r)}function nt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function De(t){return typeof t=="object"&&t!=null&&t.outlets}function kt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;t===n?s=e:s=cn(t,n,e);let a=nn(on(s));return new $(a,o,i)}function cn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=cn(o,n,e)}),new g(t.segments,r)}var it=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&nt(r[0]))throw new S(4003,!1);let i=r.find(De);if(i&&i!==Yr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Xn(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new it(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new it(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ei(t,n,e){if(t.isAbsolute)return new he(n,!0,0);if(!e)return new he(n,!1,NaN);if(e.parent===null)return new he(e,!0,0);let r=nt(t.commands[0])?0:1,i=e.segments.length-1+r;return ti(e,i,t.numberOfDoubleDots)}function ti(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new he(r,!1,i-o)}function ri(t){return De(t[0])?t[0].outlets:{[f]:t}}function ln(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Ee(t,n,e);let r=ni(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Ee(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Vt(t,n,e):r.match?Ee(t,0,i):Vt(t,n,e)}function Ee(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=ri(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Ee(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ln(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function ni(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(De(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Hr(u,c,s))return o;r+=2}else{if(!Hr(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Vt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(De(o)){let u=ii(o.outlets);return new g(r,u)}if(i===0&&nt(e[0])){let u=t.segments[n];r.push(new K(u.path,Br(e[0]))),i++;continue}let s=De(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&nt(a)?(r.push(new K(s,Br(a))),i+=2):(r.push(new K(s,{})),i++)}return new g(r,{})}function ii(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Vt(new g([],{}),0,r))}),n}function Br(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Hr(t,n,e){return t==e.path&&j(n,e.parameters)}var Oe="imperative",m=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(m||{}),O=class{id;url;constructor(n,e){this.id=n,this.url=e}},ie=class extends O{type=m.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},L=class extends O{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(w||{}),Ne=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ne||{}),k=class extends O{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends O{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends O{error;target;type=m.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Ue=class extends O{urlAfterRedirects;state;type=m.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ot=class extends O{urlAfterRedirects;state;type=m.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},st=class extends O{urlAfterRedirects;state;shouldActivate;type=m.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},at=class extends O{urlAfterRedirects;state;type=m.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ut=class extends O{urlAfterRedirects;state;type=m.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ct=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},lt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ht=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},dt=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ft=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},pt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Pe=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function oi(t){return!(t instanceof Pe)&&!(t instanceof pe)}function si(t,n){return t.providers&&!t._injector&&(t._injector=Lt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function x(t){return t.outlet||f}function ai(t,n){let e=t.filter(r=>x(r)===n);return e.push(...t.filter(r=>x(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var gt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new gt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(We(ue))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Wt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Wt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Gt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Gt(n,this._root).map(e=>e.value)}};function Wt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Wt(t,e);if(r)return r}return null}function Gt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Gt(t,e);if(r.length)return r.unshift(n),r}return[]}var E=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var _e=class extends vt{snapshot;constructor(n,e){super(n),this.snapshot=e,tr(this,n)}toString(){return this.snapshot.toString()}};function hn(t){let n=ui(t),e=new M([new K("",{})]),r=new M({}),i=new M({}),o=new M({}),s=new M(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new _e(new E(a,[]),n)}function ui(t){let n={},e={},r={},o=new te([],n,r,"",e,f,t,null,{});return new xe("",new E(o,[]))}var B=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(v(c=>c[$e]))??h(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(v(n=>re(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(v(n=>re(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function mt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&fn(i)&&(r.resolve[$e]=i.title),r}var te=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[$e]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=re(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},xe=class extends vt{url;constructor(n,e){super(e),this.url=n,tr(this,e)}toString(){return dn(this._root)}};function tr(t,n){n.value._routerState=t,n.children.forEach(e=>tr(t,e))}function dn(t){let n=t.children.length>0?` { ${t.children.map(dn).join(", ")} } `:"";return`${t.value}${n}`}function $t(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),xn(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Qt(t,n){let e=j(t.params,n.params)&&$n(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Qt(t.parent,n.parent))}function fn(t){return typeof t.title=="string"||t.title===null}var pn=new D(""),rr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new X;deactivateEvents=new X;attachEvents=new X;detachEvents=new X;routerOutletData=kr(void 0);parentContexts=d(Re);location=d(br);changeDetector=d(Ke);inputBinder=d(Ct,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Kt(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ie({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[be]})}return t})(),Kt=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===B?this.route:n===Re?this.childContexts:n===pn?this.outletData:this.parent.get(n,e)}},Ct=new D("");var nr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ar({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Nr(0,"router-outlet")},dependencies:[rr],encapsulation:2})}return t})();function ir(t){let n=t.children&&t.children.map(ir),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=nr),e}function ci(t,n,e){let r=Le(t,n._root,e?e._root:void 0);return new _e(r,n)}function Le(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=li(t,n,e);return new E(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Le(t,a)),s}}let r=hi(n.value),i=n.children.map(o=>Le(t,o));return new E(r,i)}}function li(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Le(t,r,i);return Le(t,r)})}function hi(t){return new B(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},gn="ngNavigationCancelingError";function Rt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Y(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=vn(!1,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function vn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[gn]=!0,e.cancellationCode=n,e}function di(t){return mn(t)&&Y(t.url)}function mn(t){return!!t&&t[gn]}var fi=(t,n,e,r)=>v(i=>(new Yt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Yt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),$t(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new pt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new dt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if($t(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),$t(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},yt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},de=class{component;route;constructor(n,e){this.component=n,this.route=e}};function pi(t,n,e){let r=t._root,i=n?n._root:null;return Te(r,i,e,[r.value])}function gi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function ye(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!vr(t)?t:n.get(t):r}function Te(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{vi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Me(a,e.getContext(s),i)),i}function vi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=mi(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new yt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Te(t,n,a?a.children:null,r,i):Te(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new de(a.outlet.component,s))}else s&&Me(n,a,i),i.canActivateChecks.push(new yt(r)),o.component?Te(t,null,a?a.children:null,r,i):Te(t,null,e,r,i);return i}function mi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ee(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ee(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Qt(t,n)||!j(t.queryParams,n.queryParams);case"paramsChange":default:return!Qt(t,n)}}function Me(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Me(s,n.children.getContext(o),e):Me(s,null,e):Me(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new de(n.outlet.component,i)):e.canDeactivateChecks.push(new de(null,i)):e.canDeactivateChecks.push(new de(null,i))}function Fe(t){return typeof t=="function"}function Ri(t){return typeof t=="boolean"}function yi(t){return t&&Fe(t.canLoad)}function Si(t){return t&&Fe(t.canActivate)}function Ci(t){return t&&Fe(t.canActivateChild)}function wi(t){return t&&Fe(t.canDeactivate)}function bi(t){return t&&Fe(t.canMatch)}function Rn(t){return t instanceof hr||t?.name==="EmptyError"}var Xe=Symbol("INITIAL_VALUE");function ve(){return T(t=>Ot(t.map(n=>n.pipe(ae(1),gr(Xe)))).pipe(v(n=>{for(let e of n)if(e!==!0){if(e===Xe)return Xe;if(e===!1||Ii(e))return e}return!0}),W(n=>n!==Xe),ae(1)))}function Ii(t){return Y(t)||t instanceof ge}function Ai(t,n){return A(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(U(l({},e),{guardsResult:!0})):Ti(s,r,i,t).pipe(A(a=>a&&Ri(a)?Ei(r,o,t,n):h(a)),v(a=>U(l({},e),{guardsResult:a})))})}function Ti(t,n,e,r){return I(t).pipe(A(i=>Ui(i.component,i.route,e,n,r)),G(i=>i!==!0,!0))}function Ei(t,n,e,r){return I(n).pipe(se(i=>dr(Mi(i.route.parent,r),Oi(i.route,r),Ni(t,i.path,e),Di(t,i.route,e))),G(i=>i!==!0,!0))}function Oi(t,n){return t!==null&&n&&n(new ft(t)),h(!0)}function Mi(t,n){return t!==null&&n&&n(new ht(t)),h(!0)}function Di(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>He(()=>{let s=me(n)??e,a=ye(o,s),u=Si(a)?a.canActivate(n,t):P(s,()=>a(n,t));return H(u).pipe(G())}));return h(i).pipe(ve())}function Ni(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>gi(s)).filter(s=>s!==null).map(s=>He(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,p=ye(u,c),R=Ci(p)?p.canActivateChild(r,t):P(c,()=>p(r,t));return H(R).pipe(G())});return h(a).pipe(ve())}));return h(o).pipe(ve())}function Ui(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=me(n)??i,c=ye(a,u),p=wi(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return H(p).pipe(G())});return h(s).pipe(ve())}function Pi(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=yi(a)?a.canLoad(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),yn(r))}function yn(t){return ur(y(n=>{if(typeof n!="boolean")throw Rt(t,n)}),v(n=>n===!0))}function _i(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=bi(a)?a.canMatch(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),yn(r))}var je=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},ke=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ce(t){return we(new je(t))}function xi(t){return we(new S(4e3,!1))}function Li(t){return we(vn(!1,w.GuardRejected))}var Zt=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[f])return xi(`${n.redirectTo}`);i=i.children[f]}}applyRedirectCommands(n,e,r,i,o){return ji(e,i,o).pipe(v(s=>{if(s instanceof $)throw new ke(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new ke(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function ji(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:p,title:R}=n;return H(P(e,()=>r({params:c,data:p,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:R})))}var Jt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ki(t,n,e,r,i){let o=Sn(t,n,e);return o.matched?(r=si(n,r),_i(r,n,e,i).pipe(v(s=>s===!0?o:l({},Jt)))):h(o)}function Sn(t,n,e){if(n.path==="**")return $i(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Jt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Qr)(e,t,n);if(!i)return l({},Jt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function $i(t){return{matched:!0,parameters:t.length>0?Yr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Vr(t,n,e,r){return e.length>0&&qi(t,e,r)?{segmentGroup:new g(n,Fi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Bi(t,e,r)?{segmentGroup:new g(t.segments,zi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function zi(t,n,e,r){let i={};for(let o of e)if(wt(t,n,o)&&!r[x(o)]){let s=new g([],{});i[x(o)]=s}return l(l({},r),i)}function Fi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&x(r)!==f){let i=new g([],{});e[x(r)]=i}return e}function qi(t,n,e){return e.some(r=>wt(t,n,r)&&x(r)!==f)}function Bi(t,n,e){return e.some(r=>wt(t,n,r))}function wt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Hi(t,n,e){return n.length===0&&!t.children[e]}var Xt=class{};function Vi(t,n,e,r,i,o,s="emptyOnly"){return new er(t,n,e,r,i,s,o).recognize()}var Wi=31,er=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Zt(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}recognize(){let n=Vr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(v(({children:e,rootSnapshot:r})=>{let i=new E(r,e),o=new xe("",i),s=sn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new te([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,f,e).pipe(v(r=>({children:r,rootSnapshot:e})),J(r=>{if(r instanceof ke)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof je?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(v(s=>s instanceof E?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return I(o).pipe(se(s=>{let a=r.children[s],u=ai(e,s);return this.processSegmentGroup(n,u,a,s,i)}),pr((s,a)=>(s.push(...a),s)),Dt(null),fr(),A(s=>{if(s===null)return ce(r);let a=Cn(s);return Gi(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return I(e).pipe(se(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(J(c=>{if(c instanceof je)return h(null);throw c}))),G(u=>!!u),J(u=>{if(Rn(u))return Hi(r,i,o)?h(new Xt):ce(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return x(r)!==s&&(s===f||!wt(i,o,r))?ce(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ce(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:p,positionalParamSegments:R,remainingSegments:N}=Sn(e,i,o);if(!u)return ce(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Wi&&(this.allowRedirects=!1));let V=new te(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Wr(i),x(i),i.component??i._loadedComponent??null,i,Gr(i)),b=mt(V,a,this.paramsInheritanceStrategy);return V.params=Object.freeze(b.params),V.data=Object.freeze(b.data),this.applyRedirects.applyRedirectCommands(p,i.redirectTo,R,V,n).pipe(T(Z=>this.applyRedirects.lineralizeSegments(i,Z)),A(Z=>this.processSegment(n,r,e,Z.concat(N),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=ki(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(T(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(T(({routes:c})=>{let p=r._loadedInjector??n,{parameters:R,consumedSegments:N,remainingSegments:V}=u,b=new te(N,R,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Wr(r),x(r),r.component??r._loadedComponent??null,r,Gr(r)),oe=mt(b,s,this.paramsInheritanceStrategy);b.params=Object.freeze(oe.params),b.data=Object.freeze(oe.data);let{segmentGroup:Z,slicedSegments:At}=Vr(e,N,V,c);if(At.length===0&&Z.hasChildren())return this.processChildren(p,c,Z,b).pipe(v(Be=>new E(b,Be)));if(c.length===0&&At.length===0)return h(new E(b,[]));let Pn=x(r)===o;return this.processSegment(p,c,Z,At,Pn?f:o,!0,b).pipe(v(Be=>new E(b,Be instanceof E?[Be]:[])))}))):ce(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):Pi(n,e,r,this.urlSerializer).pipe(A(i=>i?this.configLoader.loadChildren(n,e).pipe(y(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Li(e))):h({routes:[],injector:n})}};function Gi(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function Qi(t){let n=t.value.routeConfig;return n&&n.path===""}function Cn(t){let n=[],e=new Set;for(let r of t){if(!Qi(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Cn(r.children);n.push(new E(r.value,i))}return n.filter(r=>!e.has(r))}function Wr(t){return t.data||{}}function Gr(t){return t.resolve||{}}function Ki(t,n,e,r,i,o){return A(s=>Vi(t,n,e,r,s.extractedUrl,i,o).pipe(v(({state:a,tree:u})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Yi(t,n){return A(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of wn(u))s.add(c);let a=0;return I(s).pipe(se(u=>o.has(u)?Zi(u,r,t,n):(u.data=mt(u,u.parent,t).resolve,h(void 0))),y(()=>a++),Nt(1),A(u=>a===s.size?h(e):F))})}function wn(t){let n=t.children.map(e=>wn(e)).flat();return[t,...n]}function Zi(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!fn(i)&&(o[$e]=i.title),He(()=>(t.data=mt(t,t.parent,e).resolve,Ji(o,t,n,r).pipe(v(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function Ji(t,n,e,r){let i=qt(t);if(i.length===0)return h({});let o={};return I(i).pipe(A(s=>Xi(t[s],n,e,r).pipe(G(),y(a=>{if(a instanceof ge)throw Rt(new ne,a);o[s]=a}))),Nt(1),v(()=>o),J(s=>Rn(s)?F:we(s)))}function Xi(t,n,e,r){let i=me(n)??r,o=ye(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return H(s)}function zt(t){return T(n=>{let e=t(n);return e?I(e).pipe(v(()=>n)):h(n)})}var or=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[$e]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(bn),providedIn:"root"})}return t})(),bn=(()=>{class t extends or{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(We(zr))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new D("",{providedIn:"root",factory:()=>({})}),qe=new D(""),In=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=d(Lr);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return h(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=H(P(e,()=>r.loadComponent())).pipe(v(Tn),T(En),y(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),Ve(()=>{this.componentLoaders.delete(r)})),o=new Et(i,()=>new z).pipe(Tt());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=An(r,this.compiler,e,this.onLoadEndListener).pipe(Ve(()=>{this.childrenLoaders.delete(r)})),s=new Et(o,()=>new z).pipe(Tt());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function An(t,n,e,r){return H(P(e,()=>t.loadChildren())).pipe(v(Tn),T(En),A(i=>i instanceof Ir||Array.isArray(i)?h(i):I(n.compileModuleAsync(i))),v(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(qe,[],{optional:!0,self:!0}).flat()),{routes:s.map(ir),injector:o}}))}function eo(t){return t&&typeof t=="object"&&"default"in t}function Tn(t){return eo(t)?t.default:t}function En(t){return h(t)}var bt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(to),providedIn:"root"})}return t})(),to=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),On=new D("");var Mn=new D(""),Dn=(()=>{class t{currentNavigation=Qe(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new z;transitionAbortWithErrorSubject=new z;configLoader=d(In);environmentInjector=d(ue);destroyRef=d(yr);urlSerializer=d(ze);rootContexts=d(Re);location=d(Ze);inputBindingEnabled=d(Ct,{optional:!0})!==null;titleStrategy=d(or);options=d(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=d(bt);createViewTransition=d(On,{optional:!0});navigationErrorHandler=d(Mn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ct(i)),r=i=>this.events.next(new lt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;Q(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new M(null),this.transitions.pipe(W(r=>r!==null),T(r=>{let i=!1;return h(r).pipe(T(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),F;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new q(o.id,this.urlSerializer.serialize(o.rawUrl),"",Ne.IgnoredSameUrlNavigation)),o.resolve(!1),F;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(T(u=>(this.events.next(new ie(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?F:Promise.resolve(u))),Ki(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),y(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=u.urlAfterRedirects,p));let c=new Ue(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:p,restoredState:R,extras:N}=o,V=new ie(u,this.urlSerializer.serialize(c),p,R);this.events.next(V);let b=hn(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:b,urlAfterRedirects:c,extras:U(l({},N),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(oe=>(oe.finalUrl=c,oe)),h(r)}else return this.events.next(new q(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Ne.IgnoredByUrlHandlingStrategy)),o.resolve(!1),F}),y(o=>{let s=new ot(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),v(o=>(this.currentTransition=r=U(l({},o),{guards:pi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),Ai(this.environmentInjector,o=>this.events.next(o)),y(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Rt(this.urlSerializer,o.guardsResult);let s=new st(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),W(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",w.GuardRejected),!1)),zt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(y(s=>{let a=new at(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),T(s=>{let a=!1;return h(s).pipe(Yi(this.paramsInheritanceStrategy,this.environmentInjector),y({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",w.NoDataFromResolver)}}))}),y(s=>{let a=new ut(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),zt(o=>{let s=a=>{let u=[];if(a.routeConfig?.loadComponent){let c=me(a)??this.environmentInjector;u.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(y(p=>{a.component=p}),v(()=>{})))}for(let c of a.children)u.push(...s(c));return u};return Ot(s(o.targetSnapshot.root)).pipe(Dt(null),ae(1))}),zt(()=>this.afterPreactivation()),T(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?I(a).pipe(v(()=>r)):h(r)}),v(o=>{let s=ci(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),y(()=>{this.events.next(new Pe)}),fi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ae(1),Ut(new cr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(W(()=>!i&&!r.targetRouterState),y(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",w.Aborted)}))),y({next:o=>{i=!0,this.lastSuccessfulNavigation=Q(this.currentNavigation),this.events.next(new L(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Ut(this.transitionAbortWithErrorSubject.pipe(y(o=>{throw o}))),Ve(()=>{i||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),J(o=>{if(this.destroyed)return r.resolve(!1),F;if(i=!0,mn(o))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),di(o)?this.events.next(new pe(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=P(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof ge){let{message:u,cancellationCode:c}=Rt(this.urlSerializer,a);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new pe(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return F}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=Q(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ro(t){return t!==Oe}var Nn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(no),providedIn:"root"})}return t})(),St=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},no=(()=>{class t extends St{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Un=(()=>{class t{urlSerializer=d(ze);options=d(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=d(Ze);urlHandlingStrategy=d(bt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new $;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof $?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=hn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(io),providedIn:"root"})}return t})(),io=(()=>{class t extends Un{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ie?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof Ue?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Pe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==w.SupersededByNewNavigation&&e.code!==w.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof L&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sr(t,n){t.events.pipe(W(e=>e instanceof L||e instanceof k||e instanceof fe||e instanceof q),v(e=>e instanceof L||e instanceof q?0:(e instanceof k?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:!1)?2:1),W(e=>e!==2),ae(1)).subscribe(()=>{n()})}var oo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},so={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=d(Tr);stateManager=d(Un);options=d(Se,{optional:!0})||{};pendingTasks=d(Sr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=d(Dn);urlSerializer=d(ze);location=d(Ze);urlHandlingStrategy=d(bt);injector=d(ue);_events=new z;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=d(Nn);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=d(qe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!d(Ct,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new ar;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=Q(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof L)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||ro(i.source)},s);this.scheduleNavigation(a,Oe,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}oi(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Oe,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=l({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Ge)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Q(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(ir),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let R;try{let N=i?i.snapshot:this.routerState.snapshot.root;R=an(N)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),R=this.currentUrlTree.root}return un(R,e,p,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=Y(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Oe,null,r)}navigate(e,r={skipLocationChange:!1}){return ao(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},oo):r===!1?i=l({},so):i=r,Y(e))return Fr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Fr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((R,N)=>{a=R,u=N});let p=this.pendingTasks.add();return sr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(R=>Promise.reject(R))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ao(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var It=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Qe(null);get href(){return Q(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new z;applicationErrorHandler=d(Ge);options=d(Se,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(d(new jr("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof L&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Y(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:Y(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(_(Ce),_(B),Cr("tabindex"),_(xt),_(_t),_($r))};static \u0275dir=Ie({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Ur("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Dr("href",i.reactiveHref(),wr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Ye],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Ye],replaceUrl:[2,"replaceUrl","replaceUrl",Ye],routerLink:"routerLink"},features:[be]})}return t})(),co=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new X;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof L&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(Mt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=I(e).pipe(Mt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=lo(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(_(Ce),_(_t),_(xt),_(Ke),_(It,8))};static \u0275dir=Ie({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Pr(o,It,5),r&2){let s;_r(s=xr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[be]})}return t})();function lo(t){return!!t.paths}var ho=new D("");function fo(t,...n){return mr([{provide:qe,multi:!0,useValue:t},[],{provide:B,useFactory:po,deps:[Ce]},{provide:Or,multi:!0,useFactory:go},n.map(e=>e.\u0275providers)])}function po(t){return t.routerState.root}function go(){let t=d(Rr);return n=>{let e=t.get(Mr);if(n!==e.components[0])return;let r=t.get(Ce),i=t.get(vo);t.get(mo)===1&&r.initialNavigation(),t.get(Ro,null,{optional:!0})?.setUpPreloading(),t.get(ho,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var vo=new D("",{factory:()=>new z}),mo=new D("",{providedIn:"root",factory:()=>1});var Ro=new D("");export{ut as a,B as b,rr as c,Ce as d,It as e,co as f,fo as g};
1
+ import{$ as y,A as He,Cb as Ur,E as W,G as J,Hb as Pr,I as se,Ia as wr,Jb as _r,K as Dt,Kb as xr,L as ae,O as Ve,P as G,Q as Nt,Qa as xt,R as fr,Ra as _,Sa as br,Uc as zr,V as pr,Va as Ir,Wa as Lt,Xa as Ar,Y as gr,Z as T,Za as Ie,_ as Ut,a as ar,aa as S,b as ur,bb as X,c as cr,ca as C,d as Tt,e as Et,ea as vr,eb as Tr,f as z,fa as D,fb as Er,g as M,ga as We,gb as Or,ha as d,hb as Mr,ia as mr,ib as Dr,ic as Lr,k as F,ka as ue,kc as Q,la as P,nc as jr,o as I,oa as Rr,oc as kr,p as h,q as we,qa as yr,qc as Ke,r as lr,ra as Ge,s as hr,sb as Nr,sc as Ye,ta as Qe,ua as Sr,uc as $r,v,va as be,vc as Ze,w as Ot,wa as Pt,x as A,xa as Cr,y as Mt,ya as _t,z as dr}from"./chunk-ATP3BFHV.js";import{a as l,b as U}from"./chunk-RTRJ3KFH.js";var f="primary",$e=Symbol("RouteTitle"),Ft=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function re(t){return new Ft(t)}function Qr(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function xn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?qt(t):void 0,r=n?qt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Kr(t[i],n[i]))return!1;return!0}function qt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Kr(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function Yr(t){return t.length>0?t[t.length-1]:null}function H(t){return lr(t)?t:Er(t)?I(Promise.resolve(t)):h(t)}var Ln={exact:Jr,subset:Xr},Zr={exact:jn,subset:kn,ignored:()=>!0};function Fr(t,n,e){return Ln[e.paths](t.root,n.root,e.matrixParams)&&Zr[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function jn(t,n){return j(t,n)}function Jr(t,n,e){if(!ee(t.segments,n.segments)||!et(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!Jr(t.children[r],n.children[r],e))return!1;return!0}function kn(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Kr(t[e],n[e]))}function Xr(t,n,e){return en(t,n,n.segments,e)}function en(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ee(i,e)||n.hasChildren()||!et(i,e,r))}else if(t.segments.length===e.length){if(!ee(t.segments,e)||!et(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!Xr(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ee(t.segments,i)||!et(t.segments,i,r)||!t.children[f]?!1:en(t.children[f],n,o,r)}}function et(t,n,e){return n.every((r,i)=>Zr[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){return Fn.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return tt(this)}},K=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=re(this.parameters),this._parameterMap}toString(){return rn(this)}};function $n(t,n){return ee(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function ee(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function zn(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var ze=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>new ne,providedIn:"root"})}return t})(),ne=class{parse(n){let e=new Ht(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${Ae(n.root,!0)}`,r=Hn(n.queryParams),i=typeof n.fragment=="string"?`#${qn(n.fragment)}`:"";return`${e}${r}${i}`}},Fn=new ne;function tt(t){return t.segments.map(n=>rn(n)).join("/")}function Ae(t,n){if(!t.hasChildren())return tt(t);if(n){let e=t.children[f]?Ae(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${Ae(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=zn(t,(r,i)=>i===f?[Ae(t.children[f],!1)]:[`${i}:${Ae(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${tt(t)}/${e[0]}`:`${tt(t)}/(${e.join("//")})`}}function tn(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Je(t){return tn(t).replace(/%3B/gi,";")}function qn(t){return encodeURI(t)}function Bt(t){return tn(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function rt(t){return decodeURIComponent(t)}function qr(t){return rt(t.replace(/\+/g,"%20"))}function rn(t){return`${Bt(t.path)}${Bn(t.parameters)}`}function Bn(t){return Object.entries(t).map(([n,e])=>`;${Bt(n)}=${Bt(e)}`).join("")}function Hn(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${Je(e)}=${Je(i)}`).join("&"):`${Je(e)}=${Je(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var Vn=/^[^\/()?;#]+/;function jt(t){let n=t.match(Vn);return n?n[0]:""}var Wn=/^[^\/()?;=#]+/;function Gn(t){let n=t.match(Wn);return n?n[0]:""}var Qn=/^[^=?&#]+/;function Kn(t){let n=t.match(Qn);return n?n[0]:""}var Yn=/^[^&#]+/;function Zn(t){let n=t.match(Yn);return n?n[0]:""}var Ht=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=jt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new S(4009,!1);return this.capture(n),new K(rt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Gn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=jt(this.remaining);i&&(r=i,this.capture(r))}n[rt(e)]=rt(r)}parseQueryParam(n){let e=Kn(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Zn(this.remaining);s&&(r=s,this.capture(r))}let i=qr(e),o=qr(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=jt(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new S(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new S(4011,!1)}};function nn(t){return t.segments.length>0?new g([],{[f]:t}):t}function on(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=on(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return Jn(e)}function Jn(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function Y(t){return t instanceof $}function sn(t,n,e=null,r=null){let i=an(t);return un(i,n,e,r)}function an(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=nn(r);return n??i}function un(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return kt(i,i,i,e,r);let o=Xn(n);if(o.toRoot())return kt(i,i,new g([],{}),e,r);let s=ei(o,i,t),a=s.processChildren?Ee(s.segmentGroup,s.index,o.commands):ln(s.segmentGroup,s.index,o.commands);return kt(i,s.segmentGroup,a,e,r)}function nt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function De(t){return typeof t=="object"&&t!=null&&t.outlets}function kt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;t===n?s=e:s=cn(t,n,e);let a=nn(on(s));return new $(a,o,i)}function cn(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=cn(o,n,e)}),new g(t.segments,r)}var it=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&nt(r[0]))throw new S(4003,!1);let i=r.find(De);if(i&&i!==Yr(r))throw new S(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Xn(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new it(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new it(e,n,r)}var he=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function ei(t,n,e){if(t.isAbsolute)return new he(n,!0,0);if(!e)return new he(n,!1,NaN);if(e.parent===null)return new he(e,!0,0);let r=nt(t.commands[0])?0:1,i=e.segments.length-1+r;return ti(e,i,t.numberOfDoubleDots)}function ti(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new S(4005,!1);i=r.segments.length}return new he(r,!1,i-o)}function ri(t){return De(t[0])?t[0].outlets:{[f]:t}}function ln(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Ee(t,n,e);let r=ni(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Ee(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Vt(t,n,e):r.match?Ee(t,0,i):Vt(t,n,e)}function Ee(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=ri(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Ee(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=ln(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function ni(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(De(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!Hr(u,c,s))return o;r+=2}else{if(!Hr(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Vt(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(De(o)){let u=ii(o.outlets);return new g(r,u)}if(i===0&&nt(e[0])){let u=t.segments[n];r.push(new K(u.path,Br(e[0]))),i++;continue}let s=De(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&nt(a)?(r.push(new K(s,Br(a))),i+=2):(r.push(new K(s,{})),i++)}return new g(r,{})}function ii(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Vt(new g([],{}),0,r))}),n}function Br(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Hr(t,n,e){return t==e.path&&j(n,e.parameters)}var Oe="imperative",m=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(m||{}),O=class{id;url;constructor(n,e){this.id=n,this.url=e}},ie=class extends O{type=m.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},L=class extends O{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},w=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(w||{}),Ne=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ne||{}),k=class extends O{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q=class extends O{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},fe=class extends O{error;target;type=m.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Ue=class extends O{urlAfterRedirects;state;type=m.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ot=class extends O{urlAfterRedirects;state;type=m.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},st=class extends O{urlAfterRedirects;state;shouldActivate;type=m.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},at=class extends O{urlAfterRedirects;state;type=m.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ut=class extends O{urlAfterRedirects;state;type=m.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ct=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},lt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ht=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},dt=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},ft=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},pt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Pe=class{},pe=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function oi(t){return!(t instanceof Pe)&&!(t instanceof pe)}function si(t,n){return t.providers&&!t._injector&&(t._injector=Lt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function x(t){return t.outlet||f}function ai(t,n){let e=t.filter(r=>x(r)===n);return e.push(...t.filter(r=>x(r)!==n)),e}function me(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var gt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return me(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new Re(this.rootInjector)}},Re=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new gt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(We(ue))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=Wt(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=Wt(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Gt(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Gt(n,this._root).map(e=>e.value)}};function Wt(t,n){if(t===n.value)return n;for(let e of n.children){let r=Wt(t,e);if(r)return r}return null}function Gt(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Gt(t,e);if(r.length)return r.unshift(n),r}return[]}var E=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function le(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var _e=class extends vt{snapshot;constructor(n,e){super(n),this.snapshot=e,tr(this,n)}toString(){return this.snapshot.toString()}};function hn(t){let n=ui(t),e=new M([new K("",{})]),r=new M({}),i=new M({}),o=new M({}),s=new M(""),a=new B(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new _e(new E(a,[]),n)}function ui(t){let n={},e={},r={},o=new te([],n,r,"",e,f,t,null,{});return new xe("",new E(o,[]))}var B=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(v(c=>c[$e]))??h(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(v(n=>re(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(v(n=>re(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function mt(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&fn(i)&&(r.resolve[$e]=i.title),r}var te=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[$e]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=re(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=re(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},xe=class extends vt{url;constructor(n,e){super(e),this.url=n,tr(this,e)}toString(){return dn(this._root)}};function tr(t,n){n.value._routerState=t,n.children.forEach(e=>tr(t,e))}function dn(t){let n=t.children.length>0?` { ${t.children.map(dn).join(", ")} } `:"";return`${t.value}${n}`}function $t(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),xn(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Qt(t,n){let e=j(t.params,n.params)&&$n(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Qt(t.parent,n.parent))}function fn(t){return typeof t.title=="string"||t.title===null}var pn=new D(""),rr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new X;deactivateEvents=new X;attachEvents=new X;detachEvents=new X;routerOutletData=kr(void 0);parentContexts=d(Re);location=d(br);changeDetector=d(Ke);inputBinder=d(Ct,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new S(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new S(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new S(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new S(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new Kt(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ie({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[be]})}return t})(),Kt=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===B?this.route:n===Re?this.childContexts:n===pn?this.outletData:this.parent.get(n,e)}},Ct=new D("");var nr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ar({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Nr(0,"router-outlet")},dependencies:[rr],encapsulation:2})}return t})();function ir(t){let n=t.children&&t.children.map(ir),e=n?U(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=nr),e}function ci(t,n,e){let r=Le(t,n._root,e?e._root:void 0);return new _e(r,n)}function Le(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=li(t,n,e);return new E(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Le(t,a)),s}}let r=hi(n.value),i=n.children.map(o=>Le(t,o));return new E(r,i)}}function li(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Le(t,r,i);return Le(t,r)})}function hi(t){return new B(new M(t.url),new M(t.params),new M(t.queryParams),new M(t.fragment),new M(t.data),t.outlet,t.component,t)}var ge=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},gn="ngNavigationCancelingError";function Rt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=Y(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=vn(!1,w.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function vn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[gn]=!0,e.cancellationCode=n,e}function di(t){return mn(t)&&Y(t.url)}function mn(t){return!!t&&t[gn]}var fi=(t,n,e,r)=>v(i=>(new Yt(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Yt=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),$t(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=le(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=le(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new pt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new dt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if($t(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),$t(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},yt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},de=class{component;route;constructor(n,e){this.component=n,this.route=e}};function pi(t,n,e){let r=t._root,i=n?n._root:null;return Te(r,i,e,[r.value])}function gi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function ye(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!vr(t)?t:n.get(t):r}function Te(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=le(n);return t.children.forEach(s=>{vi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Me(a,e.getContext(s),i)),i}function vi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=mi(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new yt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Te(t,n,a?a.children:null,r,i):Te(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new de(a.outlet.component,s))}else s&&Me(n,a,i),i.canActivateChecks.push(new yt(r)),o.component?Te(t,null,a?a.children:null,r,i):Te(t,null,e,r,i);return i}function mi(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ee(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ee(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Qt(t,n)||!j(t.queryParams,n.queryParams);case"paramsChange":default:return!Qt(t,n)}}function Me(t,n,e){let r=le(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Me(s,n.children.getContext(o),e):Me(s,null,e):Me(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new de(n.outlet.component,i)):e.canDeactivateChecks.push(new de(null,i)):e.canDeactivateChecks.push(new de(null,i))}function Fe(t){return typeof t=="function"}function Ri(t){return typeof t=="boolean"}function yi(t){return t&&Fe(t.canLoad)}function Si(t){return t&&Fe(t.canActivate)}function Ci(t){return t&&Fe(t.canActivateChild)}function wi(t){return t&&Fe(t.canDeactivate)}function bi(t){return t&&Fe(t.canMatch)}function Rn(t){return t instanceof hr||t?.name==="EmptyError"}var Xe=Symbol("INITIAL_VALUE");function ve(){return T(t=>Ot(t.map(n=>n.pipe(ae(1),gr(Xe)))).pipe(v(n=>{for(let e of n)if(e!==!0){if(e===Xe)return Xe;if(e===!1||Ii(e))return e}return!0}),W(n=>n!==Xe),ae(1)))}function Ii(t){return Y(t)||t instanceof ge}function Ai(t,n){return A(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(U(l({},e),{guardsResult:!0})):Ti(s,r,i,t).pipe(A(a=>a&&Ri(a)?Ei(r,o,t,n):h(a)),v(a=>U(l({},e),{guardsResult:a})))})}function Ti(t,n,e,r){return I(t).pipe(A(i=>Ui(i.component,i.route,e,n,r)),G(i=>i!==!0,!0))}function Ei(t,n,e,r){return I(n).pipe(se(i=>dr(Mi(i.route.parent,r),Oi(i.route,r),Ni(t,i.path,e),Di(t,i.route,e))),G(i=>i!==!0,!0))}function Oi(t,n){return t!==null&&n&&n(new ft(t)),h(!0)}function Mi(t,n){return t!==null&&n&&n(new ht(t)),h(!0)}function Di(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>He(()=>{let s=me(n)??e,a=ye(o,s),u=Si(a)?a.canActivate(n,t):P(s,()=>a(n,t));return H(u).pipe(G())}));return h(i).pipe(ve())}function Ni(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>gi(s)).filter(s=>s!==null).map(s=>He(()=>{let a=s.guards.map(u=>{let c=me(s.node)??e,p=ye(u,c),R=Ci(p)?p.canActivateChild(r,t):P(c,()=>p(r,t));return H(R).pipe(G())});return h(a).pipe(ve())}));return h(o).pipe(ve())}function Ui(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=me(n)??i,c=ye(a,u),p=wi(c)?c.canDeactivate(t,n,e,r):P(u,()=>c(t,n,e,r));return H(p).pipe(G())});return h(s).pipe(ve())}function Pi(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=yi(a)?a.canLoad(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),yn(r))}function yn(t){return ur(y(n=>{if(typeof n!="boolean")throw Rt(t,n)}),v(n=>n===!0))}function _i(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=ye(s,t),u=bi(a)?a.canMatch(n,e):P(t,()=>a(n,e));return H(u)});return h(o).pipe(ve(),yn(r))}var je=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},ke=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ce(t){return we(new je(t))}function xi(t){return we(new S(4e3,!1))}function Li(t){return we(vn(!1,w.GuardRejected))}var Zt=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[f])return xi(`${n.redirectTo}`);i=i.children[f]}}applyRedirectCommands(n,e,r,i,o){return ji(e,i,o).pipe(v(s=>{if(s instanceof $)throw new ke(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new ke(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new S(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function ji(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:p,title:R}=n;return H(P(e,()=>r({params:c,data:p,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:R})))}var Jt={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ki(t,n,e,r,i){let o=Sn(t,n,e);return o.matched?(r=si(n,r),_i(r,n,e,i).pipe(v(s=>s===!0?o:l({},Jt)))):h(o)}function Sn(t,n,e){if(n.path==="**")return $i(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Jt):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Qr)(e,t,n);if(!i)return l({},Jt);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function $i(t){return{matched:!0,parameters:t.length>0?Yr(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Vr(t,n,e,r){return e.length>0&&qi(t,e,r)?{segmentGroup:new g(n,Fi(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Bi(t,e,r)?{segmentGroup:new g(t.segments,zi(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function zi(t,n,e,r){let i={};for(let o of e)if(wt(t,n,o)&&!r[x(o)]){let s=new g([],{});i[x(o)]=s}return l(l({},r),i)}function Fi(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&x(r)!==f){let i=new g([],{});e[x(r)]=i}return e}function qi(t,n,e){return e.some(r=>wt(t,n,r)&&x(r)!==f)}function Bi(t,n,e){return e.some(r=>wt(t,n,r))}function wt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Hi(t,n,e){return n.length===0&&!t.children[e]}var Xt=class{};function Vi(t,n,e,r,i,o,s="emptyOnly"){return new er(t,n,e,r,i,s,o).recognize()}var Wi=31,er=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Zt(this.urlSerializer,this.urlTree)}noMatchError(n){return new S(4002,`'${n.segmentGroup}'`)}recognize(){let n=Vr(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(v(({children:e,rootSnapshot:r})=>{let i=new E(r,e),o=new xe("",i),s=sn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new te([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,f,e).pipe(v(r=>({children:r,rootSnapshot:e})),J(r=>{if(r instanceof ke)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof je?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(v(s=>s instanceof E?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return I(o).pipe(se(s=>{let a=r.children[s],u=ai(e,s);return this.processSegmentGroup(n,u,a,s,i)}),pr((s,a)=>(s.push(...a),s)),Dt(null),fr(),A(s=>{if(s===null)return ce(r);let a=Cn(s);return Gi(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return I(e).pipe(se(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(J(c=>{if(c instanceof je)return h(null);throw c}))),G(u=>!!u),J(u=>{if(Rn(u))return Hi(r,i,o)?h(new Xt):ce(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return x(r)!==s&&(s===f||!wt(i,o,r))?ce(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ce(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:p,positionalParamSegments:R,remainingSegments:N}=Sn(e,i,o);if(!u)return ce(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Wi&&(this.allowRedirects=!1));let V=new te(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Wr(i),x(i),i.component??i._loadedComponent??null,i,Gr(i)),b=mt(V,a,this.paramsInheritanceStrategy);return V.params=Object.freeze(b.params),V.data=Object.freeze(b.data),this.applyRedirects.applyRedirectCommands(p,i.redirectTo,R,V,n).pipe(T(Z=>this.applyRedirects.lineralizeSegments(i,Z)),A(Z=>this.processSegment(n,r,e,Z.concat(N),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=ki(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(T(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(T(({routes:c})=>{let p=r._loadedInjector??n,{parameters:R,consumedSegments:N,remainingSegments:V}=u,b=new te(N,R,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Wr(r),x(r),r.component??r._loadedComponent??null,r,Gr(r)),oe=mt(b,s,this.paramsInheritanceStrategy);b.params=Object.freeze(oe.params),b.data=Object.freeze(oe.data);let{segmentGroup:Z,slicedSegments:At}=Vr(e,N,V,c);if(At.length===0&&Z.hasChildren())return this.processChildren(p,c,Z,b).pipe(v(Be=>new E(b,Be)));if(c.length===0&&At.length===0)return h(new E(b,[]));let Pn=x(r)===o;return this.processSegment(p,c,Z,At,Pn?f:o,!0,b).pipe(v(Be=>new E(b,Be instanceof E?[Be]:[])))}))):ce(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):Pi(n,e,r,this.urlSerializer).pipe(A(i=>i?this.configLoader.loadChildren(n,e).pipe(y(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Li(e))):h({routes:[],injector:n})}};function Gi(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function Qi(t){let n=t.value.routeConfig;return n&&n.path===""}function Cn(t){let n=[],e=new Set;for(let r of t){if(!Qi(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Cn(r.children);n.push(new E(r.value,i))}return n.filter(r=>!e.has(r))}function Wr(t){return t.data||{}}function Gr(t){return t.resolve||{}}function Ki(t,n,e,r,i,o){return A(s=>Vi(t,n,e,r,s.extractedUrl,i,o).pipe(v(({state:a,tree:u})=>U(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Yi(t,n){return A(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of wn(u))s.add(c);let a=0;return I(s).pipe(se(u=>o.has(u)?Zi(u,r,t,n):(u.data=mt(u,u.parent,t).resolve,h(void 0))),y(()=>a++),Nt(1),A(u=>a===s.size?h(e):F))})}function wn(t){let n=t.children.map(e=>wn(e)).flat();return[t,...n]}function Zi(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!fn(i)&&(o[$e]=i.title),He(()=>(t.data=mt(t,t.parent,e).resolve,Ji(o,t,n,r).pipe(v(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function Ji(t,n,e,r){let i=qt(t);if(i.length===0)return h({});let o={};return I(i).pipe(A(s=>Xi(t[s],n,e,r).pipe(G(),y(a=>{if(a instanceof ge)throw Rt(new ne,a);o[s]=a}))),Nt(1),v(()=>o),J(s=>Rn(s)?F:we(s)))}function Xi(t,n,e,r){let i=me(n)??r,o=ye(t,i),s=o.resolve?o.resolve(n,e):P(i,()=>o(n,e));return H(s)}function zt(t){return T(n=>{let e=t(n);return e?I(e).pipe(v(()=>n)):h(n)})}var or=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[$e]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(bn),providedIn:"root"})}return t})(),bn=(()=>{class t extends or{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(We(zr))};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Se=new D("",{providedIn:"root",factory:()=>({})}),qe=new D(""),In=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=d(Lr);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return h(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=H(P(e,()=>r.loadComponent())).pipe(v(Tn),T(En),y(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),Ve(()=>{this.componentLoaders.delete(r)})),o=new Et(i,()=>new z).pipe(Tt());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=An(r,this.compiler,e,this.onLoadEndListener).pipe(Ve(()=>{this.childrenLoaders.delete(r)})),s=new Et(o,()=>new z).pipe(Tt());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function An(t,n,e,r){return H(P(e,()=>t.loadChildren())).pipe(v(Tn),T(En),A(i=>i instanceof Ir||Array.isArray(i)?h(i):I(n.compileModuleAsync(i))),v(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(qe,[],{optional:!0,self:!0}).flat()),{routes:s.map(ir),injector:o}}))}function eo(t){return t&&typeof t=="object"&&"default"in t}function Tn(t){return eo(t)?t.default:t}function En(t){return h(t)}var bt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(to),providedIn:"root"})}return t})(),to=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),On=new D("");var Mn=new D(""),Dn=(()=>{class t{currentNavigation=Qe(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new z;transitionAbortWithErrorSubject=new z;configLoader=d(In);environmentInjector=d(ue);destroyRef=d(yr);urlSerializer=d(ze);rootContexts=d(Re);location=d(Ze);inputBindingEnabled=d(Ct,{optional:!0})!==null;titleStrategy=d(or);options=d(Se,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=d(bt);createViewTransition=d(On,{optional:!0});navigationErrorHandler=d(Mn,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new ct(i)),r=i=>this.events.next(new lt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;Q(()=>{this.transitions?.next(U(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new M(null),this.transitions.pipe(W(r=>r!==null),T(r=>{let i=!1;return h(r).pipe(T(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),F;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?U(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new q(o.id,this.urlSerializer.serialize(o.rawUrl),"",Ne.IgnoredSameUrlNavigation)),o.resolve(!1),F;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(T(u=>(this.events.next(new ie(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?F:Promise.resolve(u))),Ki(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),y(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=u.urlAfterRedirects,p));let c=new Ue(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:p,restoredState:R,extras:N}=o,V=new ie(u,this.urlSerializer.serialize(c),p,R);this.events.next(V);let b=hn(this.rootComponentType).snapshot;return this.currentTransition=r=U(l({},o),{targetSnapshot:b,urlAfterRedirects:c,extras:U(l({},N),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(oe=>(oe.finalUrl=c,oe)),h(r)}else return this.events.next(new q(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Ne.IgnoredByUrlHandlingStrategy)),o.resolve(!1),F}),y(o=>{let s=new ot(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),v(o=>(this.currentTransition=r=U(l({},o),{guards:pi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),Ai(this.environmentInjector,o=>this.events.next(o)),y(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Rt(this.urlSerializer,o.guardsResult);let s=new st(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),W(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",w.GuardRejected),!1)),zt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(y(s=>{let a=new at(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),T(s=>{let a=!1;return h(s).pipe(Yi(this.paramsInheritanceStrategy,this.environmentInjector),y({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",w.NoDataFromResolver)}}))}),y(s=>{let a=new ut(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),zt(o=>{let s=a=>{let u=[];if(a.routeConfig?.loadComponent){let c=me(a)??this.environmentInjector;u.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(y(p=>{a.component=p}),v(()=>{})))}for(let c of a.children)u.push(...s(c));return u};return Ot(s(o.targetSnapshot.root)).pipe(Dt(null),ae(1))}),zt(()=>this.afterPreactivation()),T(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?I(a).pipe(v(()=>r)):h(r)}),v(o=>{let s=ci(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=U(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),y(()=>{this.events.next(new Pe)}),fi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),ae(1),Ut(new cr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(W(()=>!i&&!r.targetRouterState),y(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",w.Aborted)}))),y({next:o=>{i=!0,this.lastSuccessfulNavigation=Q(this.currentNavigation),this.events.next(new L(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Ut(this.transitionAbortWithErrorSubject.pipe(y(o=>{throw o}))),Ve(()=>{i||this.cancelNavigationTransition(r,"",w.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),J(o=>{if(this.destroyed)return r.resolve(!1),F;if(i=!0,mn(o))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),di(o)?this.events.next(new pe(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new fe(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=P(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof ge){let{message:u,cancellationCode:c}=Rt(this.urlSerializer,a);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new pe(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return F}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=Q(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ro(t){return t!==Oe}var Nn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(no),providedIn:"root"})}return t})(),St=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},no=(()=>{class t extends St{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Un=(()=>{class t{urlSerializer=d(ze);options=d(Se,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=d(Ze);urlHandlingStrategy=d(bt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new $;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof $?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=hn(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:()=>d(io),providedIn:"root"})}return t})(),io=(()=>{class t extends Un{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ie?this.updateStateMemento():e instanceof q?this.commitTransition(r):e instanceof Ue?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Pe?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==w.SupersededByNewNavigation&&e.code!==w.Redirect?this.restoreHistory(r):e instanceof fe?this.restoreHistory(r,!0):e instanceof L&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pt(t)))(i||t)}})();static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sr(t,n){t.events.pipe(W(e=>e instanceof L||e instanceof k||e instanceof fe||e instanceof q),v(e=>e instanceof L||e instanceof q?0:(e instanceof k?e.code===w.Redirect||e.code===w.SupersededByNewNavigation:!1)?2:1),W(e=>e!==2),ae(1)).subscribe(()=>{n()})}var oo={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},so={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ce=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=d(Tr);stateManager=d(Un);options=d(Se,{optional:!0})||{};pendingTasks=d(Sr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=d(Dn);urlSerializer=d(ze);location=d(Ze);urlHandlingStrategy=d(bt);injector=d(ue);_events=new z;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=d(Nn);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=d(qe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!d(Ct,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new ar;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=Q(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==w.Redirect&&r.code!==w.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof L)this.navigated=!0;else if(r instanceof pe){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||ro(i.source)},s);this.scheduleNavigation(a,Oe,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}oi(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Oe,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=l({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(Ge)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Q(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(ir),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let R;try{let N=i?i.snapshot:this.routerState.snapshot.root;R=an(N)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),R=this.currentUrlTree.root}return un(R,e,p,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=Y(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Oe,null,r)}navigate(e,r={skipLocationChange:!1}){return ao(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},oo):r===!1?i=l({},so):i=r,Y(e))return Fr(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Fr(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((R,N)=>{a=R,u=N});let p=this.pendingTasks.add();return sr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(R=>Promise.reject(R))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function ao(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new S(4008,!1)}var It=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=Qe(null);get href(){return Q(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new z;applicationErrorHandler=d(Ge);options=d(Se,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(d(new jr("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof L&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(Y(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:Y(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(_(Ce),_(B),Cr("tabindex"),_(xt),_(_t),_($r))};static \u0275dir=Ie({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Ur("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Dr("href",i.reactiveHref(),wr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Ye],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Ye],replaceUrl:[2,"replaceUrl","replaceUrl",Ye],routerLink:"routerLink"},features:[be]})}return t})(),co=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new X;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof L&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(Mt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=I(e).pipe(Mt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=lo(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(_(Ce),_(_t),_(xt),_(Ke),_(It,8))};static \u0275dir=Ie({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&Pr(o,It,5),r&2){let s;_r(s=xr())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[be]})}return t})();function lo(t){return!!t.paths}var ho=new D("");function fo(t,...n){return mr([{provide:qe,multi:!0,useValue:t},[],{provide:B,useFactory:po,deps:[Ce]},{provide:Or,multi:!0,useFactory:go},n.map(e=>e.\u0275providers)])}function po(t){return t.routerState.root}function go(){let t=d(Rr);return n=>{let e=t.get(Mr);if(n!==e.components[0])return;let r=t.get(Ce),i=t.get(vo);t.get(mo)===1&&r.initialNavigation(),t.get(Ro,null,{optional:!0})?.setUpPreloading(),t.get(ho,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var vo=new D("",{factory:()=>new z}),mo=new D("",{providedIn:"root",factory:()=>1});var Ro=new D("");export{ut as a,B as b,rr as c,Ce as d,It as e,co as f,fo as g};