@sync-in/server 1.8.1 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -11
- package/environment/environment.dist.yaml +29 -26
- package/package.json +15 -15
- package/server/app.constants.js +9 -0
- package/server/app.constants.js.map +1 -1
- package/server/app.module.js +4 -0
- package/server/app.module.js.map +1 -1
- package/server/applications/admin/admin.module.js +6 -1
- package/server/applications/admin/admin.module.js.map +1 -1
- package/server/applications/{notifications/interfaces/user-mail-notification.js → admin/interfaces/check-update.interfaces.js} +1 -1
- package/server/applications/admin/interfaces/check-update.interfaces.js.map +1 -0
- package/server/applications/admin/services/admin-scheduler.service.js +53 -0
- package/server/applications/admin/services/admin-scheduler.service.js.map +1 -0
- package/server/applications/admin/services/admin.service.js +102 -0
- package/server/applications/admin/services/admin.service.js.map +1 -0
- package/server/applications/admin/services/admin.service.spec.js +46 -0
- package/server/applications/admin/services/admin.service.spec.js.map +1 -0
- package/server/applications/admin/utils/check-update.js +28 -0
- package/server/applications/admin/utils/check-update.js.map +1 -0
- package/server/applications/comments/services/comments-manager.service.js +1 -1
- package/server/applications/comments/services/comments-manager.service.js.map +1 -1
- package/server/applications/comments/services/comments-manager.service.spec.js +1 -1
- package/server/applications/comments/services/comments-manager.service.spec.js.map +1 -1
- package/server/applications/comments/services/comments-queries.service.js.map +1 -1
- package/server/applications/files/constants/cache.js +10 -1
- package/server/applications/files/constants/cache.js.map +1 -1
- package/server/applications/files/constants/only-office.js +0 -25
- package/server/applications/files/constants/only-office.js.map +1 -1
- package/server/applications/files/constants/operations.js +20 -3
- package/server/applications/files/constants/operations.js.map +1 -1
- package/server/applications/files/dto/file-operations.dto.js +7 -0
- package/server/applications/files/dto/file-operations.dto.js.map +1 -1
- package/server/applications/files/files-only-office.controller.js +3 -2
- package/server/applications/files/files-only-office.controller.js.map +1 -1
- package/server/applications/files/files-only-office.controller.spec.js +6 -5
- package/server/applications/files/files-only-office.controller.spec.js.map +1 -1
- package/server/applications/files/files.controller.js +88 -8
- package/server/applications/files/files.controller.js.map +1 -1
- package/server/applications/files/files.controller.spec.js +11 -4
- package/server/applications/files/files.controller.spec.js.map +1 -1
- package/server/applications/files/guards/files-only-office.guard.js +6 -0
- package/server/applications/files/guards/files-only-office.guard.js.map +1 -1
- package/server/applications/files/interfaces/file-db-props.interface.js.map +1 -1
- package/server/applications/files/interfaces/file-props.interface.js.map +1 -1
- package/server/applications/files/interfaces/only-office-config.interface.js.map +1 -1
- package/server/applications/files/services/files-content-manager.service.js +3 -3
- package/server/applications/files/services/files-content-manager.service.js.map +1 -1
- package/server/applications/files/services/files-lock-manager.service.js +61 -22
- package/server/applications/files/services/files-lock-manager.service.js.map +1 -1
- package/server/applications/files/services/files-manager.service.js +122 -24
- package/server/applications/files/services/files-manager.service.js.map +1 -1
- package/server/applications/files/services/files-manager.service.spec.js +15 -0
- package/server/applications/files/services/files-manager.service.spec.js.map +1 -1
- package/server/applications/files/services/files-methods.service.js +38 -8
- package/server/applications/files/services/files-methods.service.js.map +1 -1
- package/server/applications/files/services/files-only-office-manager.service.js +12 -12
- package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
- package/server/applications/files/services/files-parser.service.js +1 -1
- package/server/applications/files/services/files-parser.service.js.map +1 -1
- package/server/applications/files/services/files-queries.service.js +10 -0
- package/server/applications/files/services/files-queries.service.js.map +1 -1
- package/server/applications/files/utils/files.js +1 -1
- package/server/applications/files/utils/files.js.map +1 -1
- package/server/applications/files/utils/send-file.js +3 -2
- package/server/applications/files/utils/send-file.js.map +1 -1
- package/server/applications/links/services/links-queries.service.js +1 -1
- package/server/applications/links/services/links-queries.service.js.map +1 -1
- package/server/applications/notifications/constants/notifications.js +5 -1
- package/server/applications/notifications/constants/notifications.js.map +1 -1
- package/server/applications/notifications/i18n/de.js +8 -2
- package/server/applications/notifications/i18n/de.js.map +1 -1
- package/server/applications/notifications/i18n/es.js +8 -2
- package/server/applications/notifications/i18n/es.js.map +1 -1
- package/server/applications/notifications/i18n/fr.js +8 -2
- package/server/applications/notifications/i18n/fr.js.map +1 -1
- package/server/applications/notifications/i18n/hi.js +8 -2
- package/server/applications/notifications/i18n/hi.js.map +1 -1
- package/server/applications/notifications/i18n/it.js +8 -2
- package/server/applications/notifications/i18n/it.js.map +1 -1
- package/server/applications/notifications/i18n/ja.js +8 -2
- package/server/applications/notifications/i18n/ja.js.map +1 -1
- package/server/applications/notifications/i18n/ko.js +8 -2
- package/server/applications/notifications/i18n/ko.js.map +1 -1
- package/server/applications/notifications/i18n/pl.js +8 -2
- package/server/applications/notifications/i18n/pl.js.map +1 -1
- package/server/applications/notifications/i18n/pt.js +8 -2
- package/server/applications/notifications/i18n/pt.js.map +1 -1
- package/server/applications/notifications/i18n/pt_br.js +8 -2
- package/server/applications/notifications/i18n/pt_br.js.map +1 -1
- package/server/applications/notifications/i18n/ru.js +8 -2
- package/server/applications/notifications/i18n/ru.js.map +1 -1
- package/server/applications/notifications/i18n/tr.js +8 -2
- package/server/applications/notifications/i18n/tr.js.map +1 -1
- package/server/applications/notifications/i18n/zh.js +8 -2
- package/server/applications/notifications/i18n/zh.js.map +1 -1
- package/server/applications/notifications/interfaces/notification-properties.interface.js.map +1 -1
- package/server/applications/notifications/interfaces/user-mail-notification.interface.js +10 -0
- package/server/applications/notifications/interfaces/user-mail-notification.interface.js.map +1 -0
- package/server/applications/notifications/mails/models.js +38 -3
- package/server/applications/notifications/mails/models.js.map +1 -1
- package/server/applications/notifications/mails/templates.js +1 -1
- package/server/applications/notifications/mails/templates.js.map +1 -1
- package/server/applications/notifications/services/notifications-manager.service.js +8 -1
- package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
- package/server/applications/notifications/services/notifications-queries.service.js.map +1 -1
- package/server/applications/shares/services/shares-manager.service.js +17 -10
- package/server/applications/shares/services/shares-manager.service.js.map +1 -1
- package/server/applications/shares/services/shares-manager.service.spec.js +10 -3
- package/server/applications/shares/services/shares-manager.service.spec.js.map +1 -1
- package/server/applications/shares/services/shares-queries.service.js +11 -1
- package/server/applications/shares/services/shares-queries.service.js.map +1 -1
- package/server/applications/spaces/guards/space.guard.spec.js +2 -2
- package/server/applications/spaces/guards/space.guard.spec.js.map +1 -1
- package/server/applications/spaces/services/spaces-browser.service.js +31 -11
- package/server/applications/spaces/services/spaces-browser.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-manager.service.js +2 -2
- package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-queries.service.js +6 -2
- package/server/applications/spaces/services/spaces-queries.service.js.map +1 -1
- package/server/applications/spaces/utils/permissions.js +2 -2
- package/server/applications/spaces/utils/permissions.js.map +1 -1
- package/server/applications/sync/services/sync-manager.service.js +1 -0
- package/server/applications/sync/services/sync-manager.service.js.map +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.js +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.js.map +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.spec.js +1 -1
- package/server/applications/sync/services/sync-paths-manager.service.spec.js.map +1 -1
- package/server/applications/users/constants/user.js +1 -1
- package/server/applications/users/constants/user.js.map +1 -1
- package/server/applications/users/services/admin-users-queries.service.js +8 -0
- package/server/applications/users/services/admin-users-queries.service.js.map +1 -1
- package/server/applications/users/services/users-queries.service.js +67 -68
- package/server/applications/users/services/users-queries.service.js.map +1 -1
- package/server/applications/users/users.module.js +2 -1
- package/server/applications/users/users.module.js.map +1 -1
- package/server/applications/webdav/guards/webdav-protocol.guard.js +4 -4
- package/server/applications/webdav/guards/webdav-protocol.guard.js.map +1 -1
- package/server/applications/webdav/guards/webdav-protocol.guard.spec.js +6 -6
- package/server/applications/webdav/guards/webdav-protocol.guard.spec.js.map +1 -1
- package/server/applications/webdav/services/webdav-methods.service.js +3 -2
- package/server/applications/webdav/services/webdav-methods.service.js.map +1 -1
- package/server/applications/webdav/services/webdav-methods.service.spec.js +2 -2
- package/server/applications/webdav/services/webdav-methods.service.spec.js.map +1 -1
- package/server/authentication/constants/auth-ldap.js +2 -0
- package/server/authentication/constants/auth-ldap.js.map +1 -1
- package/server/authentication/services/auth-methods/auth-method-ldap.service.js +34 -21
- package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +1 -1
- package/server/common/functions.js +0 -8
- package/server/common/functions.js.map +1 -1
- package/server/common/image.js +1 -0
- package/server/common/image.js.map +1 -1
- package/server/common/shared.js +18 -1
- package/server/common/shared.js.map +1 -1
- package/server/infrastructure/context/services/context-manager.service.js +3 -0
- package/server/infrastructure/context/services/context-manager.service.js.map +1 -1
- package/server/infrastructure/websocket/adapters/cluster.adapter.js +4 -4
- package/server/infrastructure/websocket/adapters/cluster.adapter.js.map +1 -1
- package/static/3rdpartylicenses.txt +1393 -44
- package/static/assets/favicon.svg +2 -25
- package/static/assets/logo-dark.svg +2 -32
- package/static/assets/logo.svg +2 -32
- package/static/assets/mimes/application-sql.svg +29 -1
- package/static/assets/mimes/application-x-sql.svg +29 -0
- package/static/assets/mimes/image-bmp.svg +12 -0
- package/static/assets/pdfjs/build/pdf.mjs +4869 -4454
- package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
- package/static/assets/pdfjs/build/pdf.sandbox.mjs +3 -3
- package/static/assets/pdfjs/build/pdf.sandbox.mjs.map +1 -1
- package/static/assets/pdfjs/build/pdf.worker.mjs +885 -596
- package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
- package/static/assets/pdfjs/version +1 -1
- package/static/assets/pdfjs/web/locale/be/viewer.ftl +40 -0
- package/static/assets/pdfjs/web/locale/bg/viewer.ftl +2 -0
- package/static/assets/pdfjs/web/locale/cs/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/cy/viewer.ftl +43 -0
- package/static/assets/pdfjs/web/locale/da/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/de/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +43 -0
- package/static/assets/pdfjs/web/locale/el/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/en-CA/viewer.ftl +35 -0
- package/static/assets/pdfjs/web/locale/en-GB/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +2 -2
- package/static/assets/pdfjs/web/locale/eo/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/es-AR/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/es-CL/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/es-ES/viewer.ftl +72 -0
- package/static/assets/pdfjs/web/locale/es-MX/viewer.ftl +120 -0
- package/static/assets/pdfjs/web/locale/eu/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/fi/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/fr/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/fur/viewer.ftl +77 -0
- package/static/assets/pdfjs/web/locale/fy-NL/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/gn/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/he/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/hsb/viewer.ftl +43 -0
- package/static/assets/pdfjs/web/locale/hu/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/hy-AM/viewer.ftl +1 -1
- package/static/assets/pdfjs/web/locale/ia/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/it/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/ja/viewer.ftl +32 -0
- package/static/assets/pdfjs/web/locale/ka/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/kab/viewer.ftl +73 -0
- package/static/assets/pdfjs/web/locale/kk/viewer.ftl +21 -0
- package/static/assets/pdfjs/web/locale/ko/viewer.ftl +38 -1
- package/static/assets/pdfjs/web/locale/nb-NO/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/nl/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/nn-NO/viewer.ftl +37 -0
- package/static/assets/pdfjs/web/locale/pa-IN/viewer.ftl +37 -0
- package/static/assets/pdfjs/web/locale/pl/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/pt-BR/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/rm/viewer.ftl +73 -0
- package/static/assets/pdfjs/web/locale/ro/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/ru/viewer.ftl +42 -0
- package/static/assets/pdfjs/web/locale/sc/viewer.ftl +6 -0
- package/static/assets/pdfjs/web/locale/sk/viewer.ftl +43 -0
- package/static/assets/pdfjs/web/locale/sl/viewer.ftl +42 -1
- package/static/assets/pdfjs/web/locale/sq/viewer.ftl +77 -0
- package/static/assets/pdfjs/web/locale/sv-SE/viewer.ftl +41 -0
- package/static/assets/pdfjs/web/locale/tg/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/th/viewer.ftl +35 -0
- package/static/assets/pdfjs/web/locale/tr/viewer.ftl +39 -0
- package/static/assets/pdfjs/web/locale/vi/viewer.ftl +42 -5
- package/static/assets/pdfjs/web/locale/zh-CN/viewer.ftl +35 -0
- package/static/assets/pdfjs/web/locale/zh-TW/viewer.ftl +37 -0
- package/static/assets/pdfjs/web/viewer.css +141 -110
- package/static/assets/pdfjs/web/viewer.html +7 -7
- package/static/assets/pdfjs/web/viewer.mjs +97 -14
- package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
- package/static/chunk-22DWHRCL.js +1 -0
- package/static/chunk-23UUFZSR.js +1 -0
- package/static/{chunk-MTVSJTIW.js → chunk-24Q7OUU2.js} +1 -1
- package/static/chunk-25QTY2GI.js +1 -0
- package/static/chunk-2E7IJZLL.js +1 -0
- package/static/chunk-2FC5EKS5.js +1 -0
- package/static/chunk-2FOWUJQF.js +1 -0
- package/static/chunk-2XPHUNYN.js +1 -0
- package/static/chunk-32L7RG2G.js +1 -0
- package/static/chunk-3IISSX63.js +1 -0
- package/static/chunk-3OHSTP3R.js +1 -0
- package/static/chunk-42L6C5MT.js +1 -0
- package/static/chunk-4AGQL5GV.js +1 -0
- package/static/chunk-4BPSQMI2.js +1 -0
- package/static/chunk-4FDRWZWT.js +1 -0
- package/static/chunk-4FJUCMEG.js +1 -0
- package/static/chunk-4GCCF6PF.js +1 -0
- package/static/chunk-4ORP3SBY.js +1 -0
- package/static/chunk-4QBOHIC3.js +1 -0
- package/static/chunk-4YT6K5KY.js +1 -0
- package/static/chunk-556I6YIW.js +1 -0
- package/static/chunk-5DPIGJU4.js +1 -0
- package/static/chunk-5HNQLBSW.js +3 -0
- package/static/chunk-5IL7C45D.js +1 -0
- package/static/chunk-5KJXGMKR.js +1 -0
- package/static/chunk-5SPGSHKL.js +1 -0
- package/static/chunk-5WCQBTXW.js +1 -0
- package/static/chunk-5XUIPWOH.js +1 -0
- package/static/chunk-62WT7PI3.js +1 -0
- package/static/chunk-6F6OMQ5H.js +1 -0
- package/static/chunk-6I5BGQHT.js +1 -0
- package/static/chunk-6NOS45DG.js +1 -0
- package/static/chunk-6OKLPRCD.js +1 -0
- package/static/chunk-6VEJCG43.js +1 -0
- package/static/chunk-77SS36Z2.js +1 -0
- package/static/chunk-7AXEPO3G.js +1 -0
- package/static/chunk-7CFSJ4BO.js +1 -0
- package/static/chunk-7CKHC72R.js +1 -0
- package/static/chunk-7DUTYOJG.js +1 -0
- package/static/chunk-7HKFYRPF.js +1 -0
- package/static/chunk-7NZJZATZ.js +1 -0
- package/static/chunk-AADK5D2H.js +1 -0
- package/static/chunk-ACUF7IKP.js +1 -0
- package/static/chunk-AGREZPV4.js +1 -0
- package/static/chunk-ATBJWFA3.js +1 -0
- package/static/chunk-ATXLZN2B.js +1 -0
- package/static/chunk-AZ5TF5Y3.js +1 -0
- package/static/chunk-BBHYIURC.js +1 -0
- package/static/chunk-BHZEPHRI.js +13 -0
- package/static/chunk-BQZWSZNN.js +1 -0
- package/static/chunk-BSB4VROD.js +2 -0
- package/static/chunk-BYWSTP3P.js +1 -0
- package/static/chunk-C3AAEQKW.js +1 -0
- package/static/chunk-CCGGCHGN.js +1 -0
- package/static/chunk-CFTKW432.js +1 -0
- package/static/chunk-CNOVT6KU.js +1 -0
- package/static/chunk-D56H3XE2.js +1 -0
- package/static/chunk-DFOOSIIA.js +1 -0
- package/static/chunk-DHFQIFOF.js +1 -0
- package/static/{chunk-3GMLWAFZ.js → chunk-DIC2MVRI.js} +1 -1
- package/static/chunk-DJDRX53V.js +2 -0
- package/static/chunk-DKGXUMLT.js +1 -0
- package/static/chunk-DRHPEERW.js +2 -0
- package/static/chunk-DWYP6ZGG.js +1 -0
- package/static/chunk-EDJAISWO.js +13 -0
- package/static/chunk-EIYRBM4J.js +1 -0
- package/static/chunk-EKEGRXCV.js +7 -0
- package/static/chunk-EL6QL4TP.js +1 -0
- package/static/chunk-ERDZ7IVF.js +1 -0
- package/static/chunk-EVQKKVUZ.js +1 -0
- package/static/chunk-F2XG7EWI.js +1 -0
- package/static/chunk-F672FY5I.js +1 -0
- package/static/chunk-F6V37MKG.js +1 -0
- package/static/chunk-F7TXTNZC.js +1 -0
- package/static/chunk-FCGTI42I.js +1 -0
- package/static/chunk-FQHOSSCO.js +1 -0
- package/static/chunk-FTSIPHMG.js +1 -0
- package/static/chunk-GAGHHYLF.js +1 -0
- package/static/{chunk-JPT5WEAT.js → chunk-GOJYWL2M.js} +1 -1
- package/static/chunk-H6WOTGQ5.js +1 -0
- package/static/{chunk-CHJ64RJM.js → chunk-H6ZXFINQ.js} +1 -1
- package/static/chunk-HC7F57NA.js +1 -0
- package/static/chunk-HHWXIK2M.js +7 -0
- package/static/chunk-HKRGIRKB.js +3 -0
- package/static/chunk-HNMGPG72.js +1 -0
- package/static/chunk-HS4S6BV3.js +1 -0
- package/static/chunk-IJ7K7ATQ.js +1 -0
- package/static/chunk-IOIBQGHN.js +562 -0
- package/static/chunk-ITVA26X2.js +2 -0
- package/static/chunk-J6YSFHLZ.js +1 -0
- package/static/chunk-JAEJ6IMV.js +1 -0
- package/static/chunk-JB5R6V33.js +1 -0
- package/static/chunk-JF6WIV6M.js +1 -0
- package/static/chunk-JGB4LLUT.js +1 -0
- package/static/chunk-JGXVTKLG.js +1 -0
- package/static/chunk-JMYAD7E2.js +1 -0
- package/static/chunk-JSE63Q5X.js +1 -0
- package/static/chunk-JVV3ZL6L.js +1 -0
- package/static/chunk-JXZCNFW7.js +1 -0
- package/static/chunk-KAVP6UXH.js +1 -0
- package/static/{chunk-3R74L4UU.js → chunk-KDEEERWZ.js} +1 -1
- package/static/chunk-KHRF67SG.js +1 -0
- package/static/chunk-KLOUBIO4.js +1 -0
- package/static/chunk-KMF3ZRAO.js +1 -0
- package/static/chunk-KNZ3AQPR.js +1 -0
- package/static/chunk-KT3TWCST.js +1 -0
- package/static/chunk-L6SYG23T.js +1 -0
- package/static/chunk-LJSVNPPQ.js +1 -0
- package/static/{chunk-LNTUR3GU.js → chunk-LRDKG274.js} +1 -1
- package/static/chunk-LRQSPCYZ.js +1 -0
- package/static/chunk-LUSVISM6.js +1 -0
- package/static/chunk-LXQGVNU2.js +1 -0
- package/static/{chunk-LVSNIS5P.js → chunk-LYZGJZNP.js} +1 -1
- package/static/chunk-LZKI5P5T.js +1 -0
- package/static/chunk-M4XL3JN5.js +6 -0
- package/static/{chunk-UNCPXHHT.js → chunk-MGWG7OD7.js} +1 -1
- package/static/chunk-MKUUWY6Y.js +1 -0
- package/static/{chunk-VJTXJ43D.js → chunk-MNNCSSHN.js} +1 -1
- package/static/chunk-MR3U7TKQ.js +1 -0
- package/static/chunk-MRF3CNLZ.js +1 -0
- package/static/chunk-MRMSMTWD.js +1 -0
- package/static/chunk-MVZJSG5R.js +1 -0
- package/static/chunk-MYM43ENO.js +1 -0
- package/static/chunk-N3P6P6GW.js +7 -0
- package/static/chunk-NAH4V2R6.js +2 -0
- package/static/chunk-NBBDVVUF.js +1 -0
- package/static/chunk-NMF2ZFBE.js +1 -0
- package/static/chunk-NN4ONTOT.js +1 -0
- package/static/chunk-NOPACN4F.js +1 -0
- package/static/chunk-NYJPOP4L.js +1 -0
- package/static/chunk-OJCAIKUK.js +1 -0
- package/static/chunk-OQRWXCLY.js +1 -0
- package/static/chunk-PCFH5HCI.js +2 -0
- package/static/chunk-PG54TWBO.js +4 -0
- package/static/chunk-PJF5XUTO.js +1 -0
- package/static/{chunk-FJE6BOFL.js → chunk-PSUAQBYM.js} +1 -1
- package/static/chunk-PTLYIUFW.js +1 -0
- package/static/chunk-PZGLDZZM.js +1 -0
- package/static/chunk-Q4VNZGFI.js +1 -0
- package/static/chunk-Q556XB3S.js +1 -0
- package/static/{chunk-PB4AIT7O.js → chunk-Q7IXRPOO.js} +1 -1
- package/static/chunk-Q7U2VPIS.js +1 -0
- package/static/chunk-QM6CQMEX.js +1 -0
- package/static/chunk-QMHUIHSR.js +1 -0
- package/static/chunk-QNFNXDSX.js +1 -0
- package/static/chunk-QVFPHTOH.js +1 -0
- package/static/chunk-R4MI25E2.js +1 -0
- package/static/chunk-R7JRAR3P.js +1 -0
- package/static/chunk-R7PNKQU2.js +1 -0
- package/static/chunk-RCAORRB7.js +1 -0
- package/static/chunk-RK7XRDNB.js +1 -0
- package/static/chunk-RO7SAOLK.js +1 -0
- package/static/chunk-RQUUINHV.js +1 -0
- package/static/chunk-RT3K6DZR.js +1 -0
- package/static/chunk-RUN556VW.js +1 -0
- package/static/chunk-RX3YQ67K.js +1 -0
- package/static/chunk-S6EVLDHA.js +5 -0
- package/static/chunk-S7S5M3AZ.js +1 -0
- package/static/chunk-SBLNYV74.js +1 -0
- package/static/chunk-SIZCHHUA.js +1 -0
- package/static/chunk-SRBOO7AO.js +1 -0
- package/static/{chunk-PVDHBQRM.js → chunk-STA7NTYL.js} +1 -1
- package/static/chunk-T3YI3BSS.js +1 -0
- package/static/chunk-T74SMT7I.js +1 -0
- package/static/chunk-TAL3RTTQ.js +1 -0
- package/static/chunk-TJZKTNNS.js +1 -0
- package/static/chunk-UJTFWZEC.js +1 -0
- package/static/chunk-UPGVU5LG.js +1 -0
- package/static/chunk-UQ6O3I6W.js +1 -0
- package/static/{chunk-5NMSIIQB.js → chunk-V43RGNXA.js} +1 -1
- package/static/chunk-VWIRXLNE.js +1 -0
- package/static/chunk-VZMVGIVW.js +1 -0
- package/static/chunk-VZPCXSRG.js +2 -0
- package/static/chunk-WR3MA3L3.js +1 -0
- package/static/chunk-XCLK7NJL.js +1 -0
- package/static/{chunk-DSWEWLXJ.js → chunk-XCPDPB5G.js} +1 -1
- package/static/chunk-XEGHEUP5.js +1 -0
- package/static/chunk-XKEBQNQJ.js +1 -0
- package/static/chunk-XOF4UW3S.js +1 -0
- package/static/chunk-XOTKK2NJ.js +1 -0
- package/static/chunk-XX7JXKA6.js +1 -0
- package/static/chunk-Y2I36A4K.js +1 -0
- package/static/chunk-Y44XDRM5.js +1 -0
- package/static/{chunk-QO6BTONN.js → chunk-Y4MAPE2C.js} +1 -1
- package/static/chunk-Y5RLD72B.js +1 -0
- package/static/{chunk-DPUVSXRB.js → chunk-Y5XTRCFK.js} +1 -1
- package/static/chunk-Y63UUJGJ.js +1 -0
- package/static/chunk-YBNAC7QM.js +1 -0
- package/static/chunk-YCTCESL4.js +1 -0
- package/static/chunk-YMAN4LIU.js +1 -0
- package/static/chunk-YTDE6SXT.js +1 -0
- package/static/chunk-YZPIUJB3.js +1 -0
- package/static/chunk-ZCOWBVOT.js +1 -0
- package/static/chunk-ZHRYYMYE.js +1 -0
- package/static/chunk-ZNXTOQFG.js +1 -0
- package/static/{chunk-URHTCJ7G.js → chunk-ZQLBPLXI.js} +1 -1
- package/static/favicon.ico +0 -0
- package/static/index.html +2 -2
- package/static/main-3PLRDZTO.js +11 -0
- package/static/styles-Q4OZOSSK.css +1 -0
- package/server/applications/notifications/interfaces/user-mail-notification.js.map +0 -1
- package/static/assets/codemirror/mode/apl/apl.js +0 -174
- package/static/assets/codemirror/mode/asciiarmor/asciiarmor.js +0 -74
- package/static/assets/codemirror/mode/asn.1/asn.1.js +0 -204
- package/static/assets/codemirror/mode/asterisk/asterisk.js +0 -220
- package/static/assets/codemirror/mode/brainfuck/brainfuck.js +0 -85
- package/static/assets/codemirror/mode/clike/clike.js +0 -942
- package/static/assets/codemirror/mode/clojure/clojure.js +0 -293
- package/static/assets/codemirror/mode/cmake/cmake.js +0 -97
- package/static/assets/codemirror/mode/cobol/cobol.js +0 -255
- package/static/assets/codemirror/mode/coffeescript/coffeescript.js +0 -359
- package/static/assets/codemirror/mode/commonlisp/commonlisp.js +0 -125
- package/static/assets/codemirror/mode/crystal/crystal.js +0 -433
- package/static/assets/codemirror/mode/css/css.js +0 -862
- package/static/assets/codemirror/mode/cypher/cypher.js +0 -152
- package/static/assets/codemirror/mode/d/d.js +0 -223
- package/static/assets/codemirror/mode/dart/dart.js +0 -168
- package/static/assets/codemirror/mode/diff/diff.js +0 -47
- package/static/assets/codemirror/mode/django/django.js +0 -356
- package/static/assets/codemirror/mode/dockerfile/dockerfile.js +0 -211
- package/static/assets/codemirror/mode/dtd/dtd.js +0 -142
- package/static/assets/codemirror/mode/dylan/dylan.js +0 -352
- package/static/assets/codemirror/mode/ebnf/ebnf.js +0 -195
- package/static/assets/codemirror/mode/ecl/ecl.js +0 -206
- package/static/assets/codemirror/mode/eiffel/eiffel.js +0 -160
- package/static/assets/codemirror/mode/elm/elm.js +0 -245
- package/static/assets/codemirror/mode/erlang/erlang.js +0 -619
- package/static/assets/codemirror/mode/factor/factor.js +0 -85
- package/static/assets/codemirror/mode/fcl/fcl.js +0 -173
- package/static/assets/codemirror/mode/forth/forth.js +0 -180
- package/static/assets/codemirror/mode/fortran/fortran.js +0 -188
- package/static/assets/codemirror/mode/gas/gas.js +0 -355
- package/static/assets/codemirror/mode/gfm/gfm.js +0 -129
- package/static/assets/codemirror/mode/gherkin/gherkin.js +0 -194
- package/static/assets/codemirror/mode/go/go.js +0 -187
- package/static/assets/codemirror/mode/groovy/groovy.js +0 -245
- package/static/assets/codemirror/mode/haml/haml.js +0 -161
- package/static/assets/codemirror/mode/handlebars/handlebars.js +0 -70
- package/static/assets/codemirror/mode/haskell/haskell.js +0 -268
- package/static/assets/codemirror/mode/haskell-literate/haskell-literate.js +0 -43
- package/static/assets/codemirror/mode/haxe/haxe.js +0 -515
- package/static/assets/codemirror/mode/htmlembedded/htmlembedded.js +0 -37
- package/static/assets/codemirror/mode/htmlmixed/htmlmixed.js +0 -153
- package/static/assets/codemirror/mode/http/http.js +0 -113
- package/static/assets/codemirror/mode/idl/idl.js +0 -290
- package/static/assets/codemirror/mode/javascript/javascript.js +0 -960
- package/static/assets/codemirror/mode/jinja2/jinja2.js +0 -193
- package/static/assets/codemirror/mode/jsx/jsx.js +0 -149
- package/static/assets/codemirror/mode/julia/julia.js +0 -390
- package/static/assets/codemirror/mode/livescript/livescript.js +0 -280
- package/static/assets/codemirror/mode/lua/lua.js +0 -160
- package/static/assets/codemirror/mode/markdown/markdown.js +0 -886
- package/static/assets/codemirror/mode/mathematica/mathematica.js +0 -176
- package/static/assets/codemirror/mode/mbox/mbox.js +0 -129
- package/static/assets/codemirror/mode/meta.js +0 -221
- package/static/assets/codemirror/mode/mirc/mirc.js +0 -193
- package/static/assets/codemirror/mode/mllike/mllike.js +0 -359
- package/static/assets/codemirror/mode/modelica/modelica.js +0 -245
- package/static/assets/codemirror/mode/mscgen/mscgen.js +0 -175
- package/static/assets/codemirror/mode/mumps/mumps.js +0 -148
- package/static/assets/codemirror/mode/nginx/nginx.js +0 -178
- package/static/assets/codemirror/mode/nsis/nsis.js +0 -95
- package/static/assets/codemirror/mode/ntriples/ntriples.js +0 -195
- package/static/assets/codemirror/mode/octave/octave.js +0 -139
- package/static/assets/codemirror/mode/oz/oz.js +0 -252
- package/static/assets/codemirror/mode/pascal/pascal.js +0 -136
- package/static/assets/codemirror/mode/pegjs/pegjs.js +0 -111
- package/static/assets/codemirror/mode/perl/perl.js +0 -836
- package/static/assets/codemirror/mode/php/php.js +0 -234
- package/static/assets/codemirror/mode/pig/pig.js +0 -178
- package/static/assets/codemirror/mode/powershell/powershell.js +0 -398
- package/static/assets/codemirror/mode/properties/properties.js +0 -78
- package/static/assets/codemirror/mode/protobuf/protobuf.js +0 -72
- package/static/assets/codemirror/mode/pug/pug.js +0 -591
- package/static/assets/codemirror/mode/puppet/puppet.js +0 -220
- package/static/assets/codemirror/mode/python/python.js +0 -402
- package/static/assets/codemirror/mode/q/q.js +0 -139
- package/static/assets/codemirror/mode/r/r.js +0 -190
- package/static/assets/codemirror/mode/rpm/changes/index.html +0 -66
- package/static/assets/codemirror/mode/rpm/rpm.js +0 -109
- package/static/assets/codemirror/mode/rst/rst.js +0 -557
- package/static/assets/codemirror/mode/ruby/ruby.js +0 -303
- package/static/assets/codemirror/mode/rust/rust.js +0 -72
- package/static/assets/codemirror/mode/sas/sas.js +0 -303
- package/static/assets/codemirror/mode/sass/sass.js +0 -459
- package/static/assets/codemirror/mode/scheme/scheme.js +0 -284
- package/static/assets/codemirror/mode/shell/shell.js +0 -168
- package/static/assets/codemirror/mode/sieve/sieve.js +0 -193
- package/static/assets/codemirror/mode/slim/slim.js +0 -575
- package/static/assets/codemirror/mode/smalltalk/smalltalk.js +0 -168
- package/static/assets/codemirror/mode/smarty/smarty.js +0 -225
- package/static/assets/codemirror/mode/solr/solr.js +0 -104
- package/static/assets/codemirror/mode/soy/soy.js +0 -665
- package/static/assets/codemirror/mode/sparql/sparql.js +0 -184
- package/static/assets/codemirror/mode/spreadsheet/spreadsheet.js +0 -112
- package/static/assets/codemirror/mode/sql/sql.js +0 -529
- package/static/assets/codemirror/mode/stex/stex.js +0 -264
- package/static/assets/codemirror/mode/stylus/stylus.js +0 -775
- package/static/assets/codemirror/mode/swift/swift.js +0 -221
- package/static/assets/codemirror/mode/tcl/tcl.js +0 -140
- package/static/assets/codemirror/mode/textile/textile.js +0 -469
- package/static/assets/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
- package/static/assets/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -308
- package/static/assets/codemirror/mode/tiki/tiki.css +0 -26
- package/static/assets/codemirror/mode/tiki/tiki.js +0 -312
- package/static/assets/codemirror/mode/toml/toml.js +0 -88
- package/static/assets/codemirror/mode/tornado/tornado.js +0 -68
- package/static/assets/codemirror/mode/troff/troff.js +0 -84
- package/static/assets/codemirror/mode/ttcn/ttcn.js +0 -283
- package/static/assets/codemirror/mode/ttcn-cfg/ttcn-cfg.js +0 -214
- package/static/assets/codemirror/mode/turtle/turtle.js +0 -162
- package/static/assets/codemirror/mode/twig/twig.js +0 -141
- package/static/assets/codemirror/mode/vb/vb.js +0 -275
- package/static/assets/codemirror/mode/vbscript/vbscript.js +0 -350
- package/static/assets/codemirror/mode/velocity/velocity.js +0 -202
- package/static/assets/codemirror/mode/verilog/verilog.js +0 -781
- package/static/assets/codemirror/mode/vhdl/vhdl.js +0 -189
- package/static/assets/codemirror/mode/vue/vue.js +0 -77
- package/static/assets/codemirror/mode/wast/wast.js +0 -132
- package/static/assets/codemirror/mode/webidl/webidl.js +0 -195
- package/static/assets/codemirror/mode/xml/xml.js +0 -417
- package/static/assets/codemirror/mode/xquery/xquery.js +0 -448
- package/static/assets/codemirror/mode/yacas/yacas.js +0 -204
- package/static/assets/codemirror/mode/yaml/yaml.js +0 -120
- package/static/assets/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +0 -72
- package/static/assets/codemirror/mode/z80/z80.js +0 -116
- package/static/chunk-2KLC4T2Z.js +0 -1
- package/static/chunk-2VMSXRCB.js +0 -12
- package/static/chunk-3OHSRRKH.js +0 -4
- package/static/chunk-3R4WKOHQ.js +0 -1
- package/static/chunk-3XVM35O2.js +0 -1
- package/static/chunk-3YVRP3VM.js +0 -2
- package/static/chunk-5UKZLU5H.js +0 -1
- package/static/chunk-AF24EYXU.js +0 -1
- package/static/chunk-AKQVEHO6.js +0 -2
- package/static/chunk-BCVX464U.js +0 -2
- package/static/chunk-BQV4FRM6.js +0 -1
- package/static/chunk-CETH7UYS.js +0 -1
- package/static/chunk-DIT6W7VM.js +0 -562
- package/static/chunk-DKSEQTMX.js +0 -1
- package/static/chunk-FZ3JPGYZ.js +0 -1
- package/static/chunk-IQSKQXC3.js +0 -1
- package/static/chunk-ITUFI2BJ.js +0 -1
- package/static/chunk-LCTZJ537.js +0 -1
- package/static/chunk-LK2UCQJ6.js +0 -1
- package/static/chunk-LP5TBXEN.js +0 -7
- package/static/chunk-N3U6637P.js +0 -1
- package/static/chunk-NNV4OXSB.js +0 -1
- package/static/chunk-O6FYXVHI.js +0 -1
- package/static/chunk-OOGP4WSH.js +0 -2
- package/static/chunk-PCWDQPOM.js +0 -2
- package/static/chunk-PNR6M34W.js +0 -1
- package/static/chunk-Q5KM7LTX.js +0 -1
- package/static/chunk-QHC6ZPQ4.js +0 -1
- package/static/chunk-QMRBZHE4.js +0 -1
- package/static/chunk-QSJRY3TF.js +0 -1
- package/static/chunk-QUUIRSYT.js +0 -1
- package/static/chunk-RFH46UW3.js +0 -1
- package/static/chunk-RSXHRKM5.js +0 -1
- package/static/chunk-RV3VZJPZ.js +0 -1
- package/static/chunk-S7HNXVRB.js +0 -1
- package/static/chunk-SBZ572Q4.js +0 -2
- package/static/chunk-SJR5R3Y4.js +0 -1
- package/static/chunk-SLHTEGRU.js +0 -1
- package/static/chunk-SSFF27P2.js +0 -24
- package/static/chunk-V3LHHZYN.js +0 -1
- package/static/chunk-VQQKMY2C.js +0 -1
- package/static/chunk-WSSU2HXE.js +0 -1
- package/static/chunk-XDZGW64M.js +0 -3
- package/static/chunk-XTRDKGKG.js +0 -1
- package/static/chunk-YLWTEC3X.js +0 -1
- package/static/chunk-Z5J5F5SX.js +0 -1
- package/static/main-4H5BJY3J.js +0 -9
- package/static/scripts-WRDOQIU5.js +0 -24
- package/static/styles-2C2UNCNB.css +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{a as ze,b as Aa,c as zc,d as Oc,e as Bc,f as Uc,g as Hc,h as $c,i as Gc,j as Wc,k as He}from"./chunk-S6EVLDHA.js";import{a as Vc,b as In,c as fe}from"./chunk-Y2I36A4K.js";import{b as qc,c as jc,d as Kc,h as co}from"./chunk-2XPHUNYN.js";import"./chunk-J6YSFHLZ.js";import"./chunk-EDJAISWO.js";import{a as Tc,b as hr,c as kn,d as vr}from"./chunk-QNFNXDSX.js";import{b as Ac}from"./chunk-JXZCNFW7.js";import{a as Ze}from"./chunk-MRF3CNLZ.js";import{a as Xi,c as ai,d as Ma,e as kc}from"./chunk-EKEGRXCV.js";import{a as Pi,b as Ni,c as Ii,d as Ri}from"./chunk-MNNCSSHN.js";import{a as Zi,d as Jl,e as Fn}from"./chunk-24Q7OUU2.js";import{a as nt,c as Dn}from"./chunk-PG54TWBO.js";import{a as Le}from"./chunk-QMHUIHSR.js";import{a as Ct}from"./chunk-4FJUCMEG.js";import{a as Cr,b as gr,c as xr,d as Sr,e as Je}from"./chunk-XCLK7NJL.js";import{a as Xe}from"./chunk-MRMSMTWD.js";import{a as Ve,b as Bt}from"./chunk-7CFSJ4BO.js";import{a as Ln,b as so,c as si,d as Ic,e as lo,f as ci,g as Rc,h as ot,i as Nn,j as pi}from"./chunk-FTSIPHMG.js";import{b as Dc,c as Ut,d as yr,h as Ji,i as Fc,j as br,k as Lc,m as Pn,n as Pc,o as li,p as Nc}from"./chunk-MYM43ENO.js";import{a as Mc}from"./chunk-LYZGJZNP.js";import{a as Ea,b as Kt}from"./chunk-BQZWSZNN.js";import{a as Js,b as el,c as tl,e as ya,f as un,g as il,h as nl,i as ll,j as fc,k as xc,l as _r,m as Ye,o as Sc,q as vc,r as yc,t as bc,w as oe}from"./chunk-BYWSTP3P.js";import{a as An,b as wc}from"./chunk-ZCOWBVOT.js";import{a as Ec}from"./chunk-OJCAIKUK.js";import{$a as Mn,A as no,Aa as ht,B as Qi,Ba as wn,Ca as tc,Cb as N,D as _t,Da as ic,E as lr,Ea as ro,F as Ee,Fa as nc,G as Yi,H as $l,I as Fi,J as jt,Ja as oc,Jb as fi,Ka as rc,Kb as _c,L as ba,La as ac,Lb as hc,M as Gl,Mb as Ot,N as Wl,Na as sc,Nb as ie,O as ql,Ob as $,P as jl,Pb as Cc,Q as Kl,Qa as lc,R as Ql,Rb as gc,S as Yl,Sa as Tn,T as Xl,Ta as cc,U as cr,Ua as _e,V as Zl,Va as pc,W as ec,Wa as En,_a as pr,a as ue,b as qt,cb as dr,db as wa,e as Zs,f as va,gb as Fe,i as Ki,ib as mr,j as Ro,jb as dc,k as to,kb as mc,mb as ao,n as ui,q as sl,qb as ur,r as zo,rb as we,s as ke,sb as uc,t as Ke,tb as Li,v as cl,va as Rt,vb as te,w as pl,wa as Vt,x as dl,xa as zt,ya as De,za as oo}from"./chunk-5HNQLBSW.js";import{a as Qs,b as ei,c as dn,d as ge,e as mn,f as Ys,g as Xs}from"./chunk-Y5RLD72B.js";import{$b as Fs,$c as js,$d as Uo,Aa as Si,Ab as Ne,Af as nr,Bb as y,Bd as gn,Cb as Lo,Cd as be,Ce as Qo,Cf as Nl,Dc as Rs,Dd as Ei,De as bl,E as At,Ea as _a,Eb as _,Ec as No,Ed as H,Ef as ni,Fb as Xn,Fc as Vs,G as Mo,Gb as c,Gd as ol,Gf as oi,Ha as Yn,Hb as As,Hc as Io,Hd as rl,He as wl,Hf as Il,I as xs,Ia as ee,Ib as ks,Id as al,Ie as Yo,If as vn,Jb as Zn,Jc as zs,Jd as Z,Kb as Y,Kd as P,L as ce,La as Fo,Lb as G,Ld as Mi,Lf as Rl,M as Ss,Ma as vi,Mb as W,Mc as Wt,Na as ha,Nc as pn,O as Ao,Oa as s,Od as Oo,Of as yn,Pa as ws,Pb as Be,Pc as Ae,Pd as ml,Pe as Xo,Pf as or,Qa as ae,Qb as O,Qc as Os,Qd as xn,Qe as Tl,Ra as Wi,Rb as z,Re as El,Rf as Qe,Sb as V,Sc as Bs,Sf as bn,Ta as Ts,Tb as d,Tc as Us,Td as ul,Tf as ut,U as vs,Ub as w,Uc as Hs,Ud as fl,Ue as Ml,Va as Es,Vb as A,Vf as Vl,Wa as pt,Wb as Ie,Wc as $s,We as Al,X as ys,Xb as pe,Xd as _l,Xf as zl,Ya as Ms,Yb as de,Yc as Gs,Zb as me,Zc as Ws,Ze as Zo,_ as Kn,_b as Ds,_c as qs,_d as Bo,_f as rr,ab as M,ac as Ls,ad as Ks,ae as Ho,af as Ai,ag as Ol,ba as Ce,bb as Ca,bc as xa,be as $o,cb as yi,cc as X,cf as Jo,db as cn,dc as wt,de as hl,df as dt,dg as ft,ea as kt,ec as Sa,ed as Lt,eg as ar,f as To,fa,fb as L,fc as Tt,fd as je,ff as ki,fg as sr,g as Cs,gc as Re,ge as Cl,gf as Di,gg as Bl,hc as Jn,hd as Et,he as Pt,hf as io,hg as Ul,ia as ko,ic as Ps,ie as gl,ig as Hl,ja as S,jc as Po,jd as xe,jf as ii,jg as It,kb as Jt,kc as b,kd as fn,kf as er,la as bs,lb as g,lc as q,le as Go,lf as kl,mb as x,mc as E,mf as Ue,nb as qe,nc as Dt,nf as Dl,oa as h,oc as Ft,od as ye,oe as Wo,og as F,p as xi,pa as C,pb as k,pd as _n,q as Eo,qa as Qn,qb as D,qc as Ns,qe as xl,qf as tr,qg as fr,ra as Do,rb as m,re as Sl,rf as Fl,rg as Ta,sb as a,sc as ve,sd as hn,se as vl,tb as l,tc as Gt,td as Cn,te as qo,ub as f,ud as bi,ue as Sn,uf as Ll,v as bt,va as it,vb as qi,vc as eo,vd as wi,vf as Nt,w as gs,wb as ji,wc as se,wd as Ti,we as yl,wf as Pl,xa as ln,xb as ga,xe as jo,xf as ir,yd as ti,zc as Is,zd as Vo,ze as Ko,zf as mt}from"./chunk-IOIBQGHN.js";import{n as ri}from"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import{a as re,b as Se,d as hs,i as $t}from"./chunk-KAVP6UXH.js";var Qc=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(o,r){o&1&&f(0,"router-outlet")},dependencies:[dn],encapsulation:2});let i=n;return i})();function Yc(i){return new Ce(3e3,!1)}function jp(){return new Ce(3100,!1)}function Kp(){return new Ce(3101,!1)}function Qp(i){return new Ce(3001,!1)}function Yp(i){return new Ce(3003,!1)}function Xp(i){return new Ce(3004,!1)}function Zc(i,n){return new Ce(3005,!1)}function Jc(){return new Ce(3006,!1)}function e0(){return new Ce(3007,!1)}function t0(i,n){return new Ce(3008,!1)}function i0(i){return new Ce(3002,!1)}function n0(i,n,e,t,o){return new Ce(3010,!1)}function o0(){return new Ce(3011,!1)}function r0(){return new Ce(3012,!1)}function a0(){return new Ce(3200,!1)}function s0(){return new Ce(3202,!1)}function l0(){return new Ce(3013,!1)}function c0(i){return new Ce(3014,!1)}function p0(i){return new Ce(3015,!1)}function d0(i){return new Ce(3016,!1)}function m0(i,n){return new Ce(3404,!1)}function Zp(i){return new Ce(3502,!1)}function u0(i){return new Ce(3503,!1)}function f0(){return new Ce(3300,!1)}function _0(i){return new Ce(3504,!1)}function h0(i){return new Ce(3301,!1)}function C0(i,n){return new Ce(3302,!1)}function g0(i){return new Ce(3303,!1)}function x0(i,n){return new Ce(3400,!1)}function S0(i){return new Ce(3401,!1)}function v0(i){return new Ce(3402,!1)}function y0(i,n){return new Ce(3505,!1)}function _i(i){switch(i.length){case 0:return new Ki;case 1:return i[0];default:return new Ro(i)}}function La(i,n,e=new Map,t=new Map){let o=[],r=[],p=-1,u=null;if(n.forEach(v=>{let T=v.get("offset"),I=T==p,R=I&&u||new Map;v.forEach((le,Q)=>{let j=Q,ne=le;if(Q!=="offset")switch(j=i.normalizePropertyName(j,o),ne){case to:ne=e.get(Q);break;case qt:ne=t.get(Q);break;default:ne=i.normalizeStyleValue(Q,j,ne,o);break}R.set(j,ne)}),I||r.push(R),u=R,p=T}),o.length)throw Zp(o);return r}function wr(i,n,e,t){switch(n){case"start":i.onStart(()=>t(e&&ka(e,"start",i)));break;case"done":i.onDone(()=>t(e&&ka(e,"done",i)));break;case"destroy":i.onDestroy(()=>t(e&&ka(e,"destroy",i)));break}}function ka(i,n,e){let t=e.totalTime,o=!!e.disabled,r=Tr(i.element,i.triggerName,i.fromState,i.toState,n||i.phaseName,t??i.totalTime,o),p=i._data;return p!=null&&(r._data=p),r}function Tr(i,n,e,t,o="",r=0,p){return{element:i,triggerName:n,fromState:e,toState:t,phaseName:o,totalTime:r,disabled:!!p}}function gt(i,n,e){let t=i.get(n);return t||i.set(n,t=e),t}function Pa(i){let n=i.indexOf(":"),e=i.substring(1,n),t=i.slice(n+1);return[e,t]}var Jp=typeof document>"u"?null:document.documentElement;function Er(i){let n=i.parentNode||i.host||null;return n===Jp?null:n}function ed(i){return i.substring(1,6)=="ebkit"}var en=null,Xc=!1;function b0(i){en||(en=td()||{},Xc=en.style?"WebkitAppearance"in en.style:!1);let n=!0;return en.style&&!ed(i)&&(n=i in en.style,!n&&Xc&&(n="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in en.style)),n}function td(){return typeof document<"u"?document.body:null}function Na(i,n){for(;n;){if(n===i)return!0;n=Er(n)}return!1}function Ia(i,n,e){if(e)return Array.from(i.querySelectorAll(n));let t=i.querySelector(n);return t?[t]:[]}var id=1e3,Ra="{{",nd="}}",Va="ng-enter",Mr="ng-leave",po="ng-trigger",mo=".ng-trigger",za="ng-animating",Ar=".ng-animating";function di(i){if(typeof i=="number")return i;let n=i.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:Da(parseFloat(n[1]),n[2])}function Da(i,n){switch(n){case"s":return i*id;default:return i}}function uo(i,n,e){return i.hasOwnProperty("duration")?i:rd(i,n,e)}var od=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function rd(i,n,e){let t,o=0,r="";if(typeof i=="string"){let p=i.match(od);if(p===null)return n.push(Yc(i)),{duration:0,delay:0,easing:""};t=Da(parseFloat(p[1]),p[2]);let u=p[3];u!=null&&(o=Da(parseFloat(u),p[4]));let v=p[5];v&&(r=v)}else t=i;if(!e){let p=!1,u=n.length;t<0&&(n.push(jp()),p=!0),o<0&&(n.push(Kp()),p=!0),p&&n.splice(u,0,Yc(i))}return{duration:t,delay:o,easing:r}}function w0(i){return i.length?i[0]instanceof Map?i:i.map(n=>new Map(Object.entries(n))):[]}function Qt(i,n,e){n.forEach((t,o)=>{let r=kr(o);e&&!e.has(o)&&e.set(o,i.style[r]),i.style[r]=t})}function Vi(i,n){n.forEach((e,t)=>{let o=kr(t);i.style[o]=""})}function Rn(i){return Array.isArray(i)?i.length==1?i[0]:Zs(i):i}function T0(i,n,e){let t=n.params||{},o=Oa(i);o.length&&o.forEach(r=>{t.hasOwnProperty(r)||e.push(Qp(r))})}var Fa=new RegExp(`${Ra}\\s*(.+?)\\s*${nd}`,"g");function Oa(i){let n=[];if(typeof i=="string"){let e;for(;e=Fa.exec(i);)n.push(e[1]);Fa.lastIndex=0}return n}function Vn(i,n,e){let t=`${i}`,o=t.replace(Fa,(r,p)=>{let u=n[p];return u==null&&(e.push(Yp(p)),u=""),u.toString()});return o==t?i:o}var ad=/-+([a-z0-9])/g;function kr(i){return i.replace(ad,(...n)=>n[1].toUpperCase())}function E0(i,n){return i===0||n===0}function M0(i,n,e){if(e.size&&n.length){let t=n[0],o=[];if(e.forEach((r,p)=>{t.has(p)||o.push(p),t.set(p,r)}),o.length)for(let r=1;r<n.length;r++){let p=n[r];o.forEach(u=>p.set(u,Dr(i,u)))}}return n}function xt(i,n,e){switch(n.type){case ue.Trigger:return i.visitTrigger(n,e);case ue.State:return i.visitState(n,e);case ue.Transition:return i.visitTransition(n,e);case ue.Sequence:return i.visitSequence(n,e);case ue.Group:return i.visitGroup(n,e);case ue.Animate:return i.visitAnimate(n,e);case ue.Keyframes:return i.visitKeyframes(n,e);case ue.Style:return i.visitStyle(n,e);case ue.Reference:return i.visitReference(n,e);case ue.AnimateChild:return i.visitAnimateChild(n,e);case ue.AnimateRef:return i.visitAnimateRef(n,e);case ue.Query:return i.visitQuery(n,e);case ue.Stagger:return i.visitStagger(n,e);default:throw Xp(n.type)}}function Dr(i,n){return window.getComputedStyle(i)[n]}var is=(()=>{class i{validateStyleProperty(e){return b0(e)}containsElement(e,t){return Na(e,t)}getParentElement(e){return Er(e)}query(e,t,o){return Ia(e,t,o)}computeStyle(e,t,o){return o||""}animate(e,t,o,r,p,u=[],v){return new Ki(o,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=kt({token:i,factory:i.\u0275fac})}return i})(),nn=class{static NOOP=new is},on=class{};var sd=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Ir=class extends on{normalizePropertyName(n,e){return kr(n)}normalizeStyleValue(n,e,t,o){let r="",p=t.toString().trim();if(sd.has(e)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let u=t.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&o.push(Zc(n,t))}return p+r}};var Rr="*";function ld(i,n){let e=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>cd(t,e,n)):e.push(i),e}function cd(i,n,e){if(i[0]==":"){let v=pd(i,e);if(typeof v=="function"){n.push(v);return}i=v}let t=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return e.push(p0(i)),n;let o=t[1],r=t[2],p=t[3];n.push(A0(o,p));let u=o==Rr&&p==Rr;r[0]=="<"&&!u&&n.push(A0(p,o))}function pd(i,n){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return n.push(d0(i)),"* => *"}}var Fr=new Set(["true","1"]),Lr=new Set(["false","0"]);function A0(i,n){let e=Fr.has(i)||Lr.has(i),t=Fr.has(n)||Lr.has(n);return(o,r)=>{let p=i==Rr||i==o,u=n==Rr||n==r;return!p&&e&&typeof o=="boolean"&&(p=o?Fr.has(i):Lr.has(i)),!u&&t&&typeof r=="boolean"&&(u=r?Fr.has(n):Lr.has(n)),p&&u}}var z0=":self",dd=new RegExp(`s*${z0}s*,?`,"g");function O0(i,n,e,t){return new Wa(i).build(n,e,t)}var k0="",Wa=class{_driver;constructor(n){this._driver=n}build(n,e,t){let o=new qa(e);return this._resetContextStyleTimingState(o),xt(this,Rn(n),o)}_resetContextStyleTimingState(n){n.currentQuerySelector=k0,n.collectedStyles=new Map,n.collectedStyles.set(k0,new Map),n.currentTime=0}visitTrigger(n,e){let t=e.queryCount=0,o=e.depCount=0,r=[],p=[];return n.name.charAt(0)=="@"&&e.errors.push(Jc()),n.definitions.forEach(u=>{if(this._resetContextStyleTimingState(e),u.type==ue.State){let v=u,T=v.name;T.toString().split(/\s*,\s*/).forEach(I=>{v.name=I,r.push(this.visitState(v,e))}),v.name=T}else if(u.type==ue.Transition){let v=this.visitTransition(u,e);t+=v.queryCount,o+=v.depCount,p.push(v)}else e.errors.push(e0())}),{type:ue.Trigger,name:n.name,states:r,transitions:p,queryCount:t,depCount:o,options:null}}visitState(n,e){let t=this.visitStyle(n.styles,e),o=n.options&&n.options.params||null;if(t.containsDynamicStyles){let r=new Set,p=o||{};t.styles.forEach(u=>{u instanceof Map&&u.forEach(v=>{Oa(v).forEach(T=>{p.hasOwnProperty(T)||r.add(T)})})}),r.size&&e.errors.push(t0(n.name,[...r.values()]))}return{type:ue.State,name:n.name,style:t,options:o?{params:o}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;let t=xt(this,Rn(n.animation),e),o=ld(n.expr,e.errors);return{type:ue.Transition,matchers:o,animation:t,queryCount:e.queryCount,depCount:e.depCount,options:tn(n.options)}}visitSequence(n,e){return{type:ue.Sequence,steps:n.steps.map(t=>xt(this,t,e)),options:tn(n.options)}}visitGroup(n,e){let t=e.currentTime,o=0,r=n.steps.map(p=>{e.currentTime=t;let u=xt(this,p,e);return o=Math.max(o,e.currentTime),u});return e.currentTime=o,{type:ue.Group,steps:r,options:tn(n.options)}}visitAnimate(n,e){let t=_d(n.timings,e.errors);e.currentAnimateTimings=t;let o,r=n.styles?n.styles:va({});if(r.type==ue.Keyframes)o=this.visitKeyframes(r,e);else{let p=n.styles,u=!1;if(!p){u=!0;let T={};t.easing&&(T.easing=t.easing),p=va(T)}e.currentTime+=t.duration+t.delay;let v=this.visitStyle(p,e);v.isEmptyStep=u,o=v}return e.currentAnimateTimings=null,{type:ue.Animate,timings:t,style:o,options:null}}visitStyle(n,e){let t=this._makeStyleAst(n,e);return this._validateStyleAst(t,e),t}_makeStyleAst(n,e){let t=[],o=Array.isArray(n.styles)?n.styles:[n.styles];for(let u of o)typeof u=="string"?u===qt?t.push(u):e.errors.push(i0(u)):t.push(new Map(Object.entries(u)));let r=!1,p=null;return t.forEach(u=>{if(u instanceof Map&&(u.has("easing")&&(p=u.get("easing"),u.delete("easing")),!r)){for(let v of u.values())if(v.toString().indexOf(Ra)>=0){r=!0;break}}}),{type:ue.Style,styles:t,easing:p,offset:n.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(n,e){let t=e.currentAnimateTimings,o=e.currentTime,r=e.currentTime;t&&r>0&&(r-=t.duration+t.delay),n.styles.forEach(p=>{typeof p!="string"&&p.forEach((u,v)=>{let T=e.collectedStyles.get(e.currentQuerySelector),I=T.get(v),R=!0;I&&(r!=o&&r>=I.startTime&&o<=I.endTime&&(e.errors.push(n0(v,I.startTime,I.endTime,r,o)),R=!1),r=I.startTime),R&&T.set(v,{startTime:r,endTime:o}),e.options&&T0(u,e.options,e.errors)})})}visitKeyframes(n,e){let t={type:ue.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(o0()),t;let o=1,r=0,p=[],u=!1,v=!1,T=0,I=n.steps.map($e=>{let Ge=this._makeStyleAst($e,e),at=Ge.offset!=null?Ge.offset:fd(Ge.styles),et=0;return at!=null&&(r++,et=Ge.offset=at),v=v||et<0||et>1,u=u||et<T,T=et,p.push(et),Ge});v&&e.errors.push(r0()),u&&e.errors.push(a0());let R=n.steps.length,le=0;r>0&&r<R?e.errors.push(s0()):r==0&&(le=o/(R-1));let Q=R-1,j=e.currentTime,ne=e.currentAnimateTimings,Te=ne.duration;return I.forEach(($e,Ge)=>{let at=le>0?Ge==Q?1:le*Ge:p[Ge],et=at*Te;e.currentTime=j+ne.delay+et,ne.duration=et,this._validateStyleAst($e,e),$e.offset=at,t.styles.push($e)}),t}visitReference(n,e){return{type:ue.Reference,animation:xt(this,Rn(n.animation),e),options:tn(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:ue.AnimateChild,options:tn(n.options)}}visitAnimateRef(n,e){return{type:ue.AnimateRef,animation:this.visitReference(n.animation,e),options:tn(n.options)}}visitQuery(n,e){let t=e.currentQuerySelector,o=n.options||{};e.queryCount++,e.currentQuery=n;let[r,p]=md(n.selector);e.currentQuerySelector=t.length?t+" "+r:r,gt(e.collectedStyles,e.currentQuerySelector,new Map);let u=xt(this,Rn(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=t,{type:ue.Query,selector:r,limit:o.limit||0,optional:!!o.optional,includeSelf:p,animation:u,originalSelector:n.selector,options:tn(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(l0());let t=n.timings==="full"?{duration:0,delay:0,easing:"full"}:uo(n.timings,e.errors,!0);return{type:ue.Stagger,animation:xt(this,Rn(n.animation),e),timings:t,options:null}}};function md(i){let n=!!i.split(/\s*,\s*/).find(e=>e==z0);return n&&(i=i.replace(dd,"")),i=i.replace(/@\*/g,mo).replace(/@\w+/g,e=>mo+"-"+e.slice(1)).replace(/:animating/g,Ar),[i,n]}function ud(i){return i?re({},i):null}var qa=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(n){this.errors=n}};function fd(i){if(typeof i=="string")return null;let n=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){let t=e;n=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let e=i;n=parseFloat(e.get("offset")),e.delete("offset")}return n}function _d(i,n){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let r=uo(i,n).duration;return Ba(r,0,"")}let e=i;if(e.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=Ba(0,0,"");return r.dynamic=!0,r.strValue=e,r}let o=uo(e,n);return Ba(o.duration,o.delay,o.easing)}function tn(i){return i?(i=re({},i),i.params&&(i.params=ud(i.params))):i={},i}function Ba(i,n,e){return{duration:i,delay:n,easing:e}}function ns(i,n,e,t,o,r,p=null,u=!1){return{type:1,element:i,keyframes:n,preStyleProps:e,postStyleProps:t,duration:o,delay:r,totalTime:o+r,easing:p,subTimeline:u}}var _o=class{_map=new Map;get(n){return this._map.get(n)||[]}append(n,e){let t=this._map.get(n);t||this._map.set(n,t=[]),t.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}},hd=1,Cd=":enter",gd=new RegExp(Cd,"g"),xd=":leave",Sd=new RegExp(xd,"g");function B0(i,n,e,t,o,r=new Map,p=new Map,u,v,T=[]){return new ja().buildKeyframes(i,n,e,t,o,r,p,u,v,T)}var ja=class{buildKeyframes(n,e,t,o,r,p,u,v,T,I=[]){T=T||new _o;let R=new Ka(n,e,T,o,r,I,[]);R.options=v;let le=v.delay?di(v.delay):0;R.currentTimeline.delayNextStep(le),R.currentTimeline.setStyles([p],null,R.errors,v),xt(this,t,R);let Q=R.timelines.filter(j=>j.containsAnimation());if(Q.length&&u.size){let j;for(let ne=Q.length-1;ne>=0;ne--){let Te=Q[ne];if(Te.element===e){j=Te;break}}j&&!j.allowOnlyTimelineStyles()&&j.setStyles([u],null,R.errors,v)}return Q.length?Q.map(j=>j.buildKeyframes()):[ns(e,[],[],[],0,le,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){let t=e.subInstructions.get(e.element);if(t){let o=e.createSubContext(n.options),r=e.currentTimeline.currentTime,p=this._visitSubInstructions(t,o,o.options);r!=p&&e.transformIntoNewTimeline(p)}e.previousNode=n}visitAnimateRef(n,e){let t=e.createSubContext(n.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,t),this.visitReference(n.animation,t),e.transformIntoNewTimeline(t.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,t){for(let o of n){let r=o?.delay;if(r){let p=typeof r=="number"?r:di(Vn(r,o?.params??{},e.errors));t.delayNextStep(p)}}}_visitSubInstructions(n,e,t){let r=e.currentTimeline.currentTime,p=t.duration!=null?di(t.duration):null,u=t.delay!=null?di(t.delay):null;return p!==0&&n.forEach(v=>{let T=e.appendInstructionToTimeline(v,p,u);r=Math.max(r,T.duration+T.delay)}),r}visitReference(n,e){e.updateOptions(n.options,!0),xt(this,n.animation,e),e.previousNode=n}visitSequence(n,e){let t=e.subContextCount,o=e,r=n.options;if(r&&(r.params||r.delay)&&(o=e.createSubContext(r),o.transformIntoNewTimeline(),r.delay!=null)){o.previousNode.type==ue.Style&&(o.currentTimeline.snapshotCurrentStyles(),o.previousNode=Vr);let p=di(r.delay);o.delayNextStep(p)}n.steps.length&&(n.steps.forEach(p=>xt(this,p,o)),o.currentTimeline.applyStylesToKeyframe(),o.subContextCount>t&&o.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){let t=[],o=e.currentTimeline.currentTime,r=n.options&&n.options.delay?di(n.options.delay):0;n.steps.forEach(p=>{let u=e.createSubContext(n.options);r&&u.delayNextStep(r),xt(this,p,u),o=Math.max(o,u.currentTimeline.currentTime),t.push(u.currentTimeline)}),t.forEach(p=>e.currentTimeline.mergeTimelineCollectedStyles(p)),e.transformIntoNewTimeline(o),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){let t=n.strValue,o=e.params?Vn(t,e.params,e.errors):t;return uo(o,e.errors)}else return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){let t=e.currentAnimateTimings=this._visitTiming(n.timings,e),o=e.currentTimeline;t.delay&&(e.incrementTime(t.delay),o.snapshotCurrentStyles());let r=n.style;r.type==ue.Keyframes?this.visitKeyframes(r,e):(e.incrementTime(t.duration),this.visitStyle(r,e),o.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){let t=e.currentTimeline,o=e.currentAnimateTimings;!o&&t.hasCurrentStyleProperties()&&t.forwardFrame();let r=o&&o.easing||n.easing;n.isEmptyStep?t.applyEmptyStep(r):t.setStyles(n.styles,r,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){let t=e.currentAnimateTimings,o=e.currentTimeline.duration,r=t.duration,u=e.createSubContext().currentTimeline;u.easing=t.easing,n.styles.forEach(v=>{let T=v.offset||0;u.forwardTime(T*r),u.setStyles(v.styles,v.easing,e.errors,e.options),u.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(u),e.transformIntoNewTimeline(o+r),e.previousNode=n}visitQuery(n,e){let t=e.currentTimeline.currentTime,o=n.options||{},r=o.delay?di(o.delay):0;r&&(e.previousNode.type===ue.Style||t==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Vr);let p=t,u=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!o.optional,e.errors);e.currentQueryTotal=u.length;let v=null;u.forEach((T,I)=>{e.currentQueryIndex=I;let R=e.createSubContext(n.options,T);r&&R.delayNextStep(r),T===e.element&&(v=R.currentTimeline),xt(this,n.animation,R),R.currentTimeline.applyStylesToKeyframe();let le=R.currentTimeline.currentTime;p=Math.max(p,le)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(p),v&&(e.currentTimeline.mergeTimelineCollectedStyles(v),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){let t=e.parentContext,o=e.currentTimeline,r=n.timings,p=Math.abs(r.duration),u=p*(e.currentQueryTotal-1),v=p*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":v=u-v;break;case"full":v=t.currentStaggerTime;break}let I=e.currentTimeline;v&&I.delayNextStep(v);let R=I.currentTime;xt(this,n.animation,e),e.previousNode=n,t.currentStaggerTime=o.currentTime-R+(o.startTime-t.currentTimeline.startTime)}},Vr={},Ka=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=Vr;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(n,e,t,o,r,p,u,v){this._driver=n,this.element=e,this.subInstructions=t,this._enterClassName=o,this._leaveClassName=r,this.errors=p,this.timelines=u,this.currentTimeline=v||new zr(this._driver,e,0),u.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;let t=n,o=this.options;t.duration!=null&&(o.duration=di(t.duration)),t.delay!=null&&(o.delay=di(t.delay));let r=t.params;if(r){let p=o.params;p||(p=this.options.params={}),Object.keys(r).forEach(u=>{(!e||!p.hasOwnProperty(u))&&(p[u]=Vn(r[u],p,this.errors))})}}_copyOptions(){let n={};if(this.options){let e=this.options.params;if(e){let t=n.params={};Object.keys(e).forEach(o=>{t[o]=e[o]})}}return n}createSubContext(n=null,e,t){let o=e||this.element,r=new i(this._driver,o,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(o,t||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(n),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(n){return this.previousNode=Vr,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,t){let o={duration:e??n.duration,delay:this.currentTimeline.currentTime+(t??0)+n.delay,easing:""},r=new Qa(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,o,n.stretchStartingKeyframe);return this.timelines.push(r),o}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,t,o,r,p){let u=[];if(o&&u.push(this.element),n.length>0){n=n.replace(gd,"."+this._enterClassName),n=n.replace(Sd,"."+this._leaveClassName);let v=t!=1,T=this._driver.query(this.element,n,v);t!==0&&(T=t<0?T.slice(T.length+t,T.length):T.slice(0,t)),u.push(...T)}return!r&&u.length==0&&p.push(c0(e)),u}},zr=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(n,e,t,o){this._driver=n,this.element=e,this.startTime=t,this._elementTimelineStylesLookup=o,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new i(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=hd,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||qt),this._currentKeyframe.set(e,qt);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,t,o){e&&this._previousKeyframe.set("easing",e);let r=o&&o.params||{},p=vd(n,this._globalTimelineStyles);for(let[u,v]of p){let T=Vn(v,r,t);this._pendingStyles.set(u,T),this._localTimelineStyles.has(u)||this._backFill.set(u,this._globalTimelineStyles.get(u)??qt),this._updateStyle(u,T)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,t)=>{let o=this._styleSummary.get(t);(!o||e.time>o.time)&&this._updateStyle(t,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let n=new Set,e=new Set,t=this._keyframes.size===1&&this.duration===0,o=[];this._keyframes.forEach((u,v)=>{let T=new Map([...this._backFill,...u]);T.forEach((I,R)=>{I===to?n.add(R):I===qt&&e.add(R)}),t||T.set("offset",v/this.duration),o.push(T)});let r=[...n.values()],p=[...e.values()];if(t){let u=o[0],v=new Map(u);u.set("offset",0),v.set("offset",1),o=[u,v]}return ns(this.element,o,r,p,this.duration,this.startTime,this.easing,!1)}},Qa=class extends zr{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(n,e,t,o,r,p,u=!1){super(n,e,p.delay),this.keyframes=t,this.preStyleProps=o,this.postStyleProps=r,this._stretchStartingKeyframe=u,this.timings={duration:p.duration,delay:p.delay,easing:p.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:t,easing:o}=this.timings;if(this._stretchStartingKeyframe&&e){let r=[],p=t+e,u=e/p,v=new Map(n[0]);v.set("offset",0),r.push(v);let T=new Map(n[0]);T.set("offset",D0(u)),r.push(T);let I=n.length-1;for(let R=1;R<=I;R++){let le=new Map(n[R]),Q=le.get("offset"),j=e+Q*t;le.set("offset",D0(j/p)),r.push(le)}t=p,e=0,o="",n=r}return ns(this.element,n,this.preStyleProps,this.postStyleProps,t,e,o,!0)}};function D0(i,n=3){let e=Math.pow(10,n-1);return Math.round(i*e)/e}function vd(i,n){let e=new Map,t;return i.forEach(o=>{if(o==="*"){t??=n.keys();for(let r of t)e.set(r,qt)}else for(let[r,p]of o)e.set(r,p)}),e}function F0(i,n,e,t,o,r,p,u,v,T,I,R,le){return{type:0,element:i,triggerName:n,isRemovalTransition:o,fromState:e,fromStyles:r,toState:t,toStyles:p,timelines:u,queriedElements:v,preStyleProps:T,postStyleProps:I,totalTime:R,errors:le}}var Ua={},Or=class{_triggerName;ast;_stateStyles;constructor(n,e,t){this._triggerName=n,this.ast=e,this._stateStyles=t}match(n,e,t,o){return yd(this.ast.matchers,n,e,t,o)}buildStyles(n,e,t){let o=this._stateStyles.get("*");return n!==void 0&&(o=this._stateStyles.get(n?.toString())||o),o?o.buildStyles(e,t):new Map}build(n,e,t,o,r,p,u,v,T,I){let R=[],le=this.ast.options&&this.ast.options.params||Ua,Q=u&&u.params||Ua,j=this.buildStyles(t,Q,R),ne=v&&v.params||Ua,Te=this.buildStyles(o,ne,R),$e=new Set,Ge=new Map,at=new Map,et=o==="void",an={params:U0(ne,le),delay:this.ast.options?.delay},Xt=I?[]:B0(n,e,this.ast.animation,r,p,j,Te,an,T,R),st=0;return Xt.forEach(ct=>{st=Math.max(ct.duration+ct.delay,st)}),R.length?F0(e,this._triggerName,t,o,et,j,Te,[],[],Ge,at,st,R):(Xt.forEach(ct=>{let Hi=ct.element,sn=gt(Ge,Hi,new Set);ct.preStyleProps.forEach($i=>sn.add($i));let ms=gt(at,Hi,new Set);ct.postStyleProps.forEach($i=>ms.add($i)),Hi!==e&&$e.add(Hi)}),F0(e,this._triggerName,t,o,et,j,Te,Xt,[...$e.values()],Ge,at,st))}};function yd(i,n,e,t,o){return i.some(r=>r(n,e,t,o))}function U0(i,n){let e=re({},n);return Object.entries(i).forEach(([t,o])=>{o!=null&&(e[t]=o)}),e}var Ya=class{styles;defaultParams;normalizer;constructor(n,e,t){this.styles=n,this.defaultParams=e,this.normalizer=t}buildStyles(n,e){let t=new Map,o=U0(n,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((p,u)=>{p&&(p=Vn(p,o,e));let v=this.normalizer.normalizePropertyName(u,e);p=this.normalizer.normalizeStyleValue(u,v,p,e),t.set(u,p)})}),t}};function bd(i,n,e){return new Xa(i,n,e)}var Xa=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(n,e,t){this.name=n,this.ast=e,this._normalizer=t,e.states.forEach(o=>{let r=o.options&&o.options.params||{};this.states.set(o.name,new Ya(o.style,r,t))}),L0(this.states,"true","1"),L0(this.states,"false","0"),e.transitions.forEach(o=>{this.transitionFactories.push(new Or(n,o,this.states))}),this.fallbackTransition=wd(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,t,o){return this.transitionFactories.find(p=>p.match(n,e,t,o))||null}matchStyles(n,e,t){return this.fallbackTransition.buildStyles(n,e,t)}};function wd(i,n,e){let t=[(p,u)=>!0],o={type:ue.Sequence,steps:[],options:null},r={type:ue.Transition,animation:o,matchers:t,options:null,queryCount:0,depCount:0};return new Or(i,r,n)}function L0(i,n,e){i.has(n)?i.has(e)||i.set(e,i.get(n)):i.has(e)&&i.set(n,i.get(e))}var Td=new _o,Za=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(n,e,t){this.bodyNode=n,this._driver=e,this._normalizer=t}register(n,e){let t=[],o=[],r=O0(this._driver,e,t,o);if(t.length)throw u0(t);this._animations.set(n,r)}_buildPlayer(n,e,t){let o=n.element,r=La(this._normalizer,n.keyframes,e,t);return this._driver.animate(o,r,n.duration,n.delay,n.easing,[],!0)}create(n,e,t={}){let o=[],r=this._animations.get(n),p,u=new Map;if(r?(p=B0(this._driver,e,r,Va,Mr,new Map,new Map,t,Td,o),p.forEach(I=>{let R=gt(u,I.element,new Map);I.postStyleProps.forEach(le=>R.set(le,null))})):(o.push(f0()),p=[]),o.length)throw _0(o);u.forEach((I,R)=>{I.forEach((le,Q)=>{I.set(Q,this._driver.computeStyle(R,Q,qt))})});let v=p.map(I=>{let R=u.get(I.element);return this._buildPlayer(I,new Map,R)}),T=_i(v);return this._playersById.set(n,T),T.onDestroy(()=>this.destroy(n)),this.players.push(T),T}destroy(n){let e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);let t=this.players.indexOf(e);t>=0&&this.players.splice(t,1)}_getPlayer(n){let e=this._playersById.get(n);if(!e)throw h0(n);return e}listen(n,e,t,o){let r=Tr(e,"","","");return wr(this._getPlayer(n),t,r,o),()=>{}}command(n,e,t,o){if(t=="register"){this.register(n,o[0]);return}if(t=="create"){let p=o[0]||{};this.create(n,e,p);return}let r=this._getPlayer(n);switch(t){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(o[0]));break;case"destroy":this.destroy(n);break}}},P0="ng-animate-queued",Ed=".ng-animate-queued",Ha="ng-animate-disabled",Md=".ng-animate-disabled",Ad="ng-star-inserted",kd=".ng-star-inserted",Dd=[],H0={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Fd={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Yt="__ng_removed",ho=class{namespaceId;value;options;get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;let t=n&&n.hasOwnProperty("value"),o=t?n.value:n;if(this.value=Pd(o),t){let r=n,{value:p}=r,u=hs(r,["value"]);this.options=u}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){let e=n.params;if(e){let t=this.options.params;Object.keys(e).forEach(o=>{t[o]==null&&(t[o]=e[o])})}}},fo="void",$a=new ho(fo),Ja=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(n,e,t){this.id=n,this.hostElement=e,this._engine=t,this._hostClassName="ng-tns-"+n,Ht(e,this._hostClassName)}listen(n,e,t,o){if(!this._triggers.has(e))throw C0(t,e);if(t==null||t.length==0)throw g0(e);if(!Nd(t))throw x0(t,e);let r=gt(this._elementListeners,n,[]),p={name:e,phase:t,callback:o};r.push(p);let u=gt(this._engine.statesByElement,n,new Map);return u.has(e)||(Ht(n,po),Ht(n,po+"-"+e),u.set(e,$a)),()=>{this._engine.afterFlush(()=>{let v=r.indexOf(p);v>=0&&r.splice(v,1),this._triggers.has(e)||u.delete(e)})}}register(n,e){return this._triggers.has(n)?!1:(this._triggers.set(n,e),!0)}_getTrigger(n){let e=this._triggers.get(n);if(!e)throw S0(n);return e}trigger(n,e,t,o=!0){let r=this._getTrigger(e),p=new Co(this.id,e,n),u=this._engine.statesByElement.get(n);u||(Ht(n,po),Ht(n,po+"-"+e),this._engine.statesByElement.set(n,u=new Map));let v=u.get(e),T=new ho(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&v&&T.absorbOptions(v.options),u.set(e,T),v||(v=$a),!(T.value===fo)&&v.value===T.value){if(!Vd(v.params,T.params)){let ne=[],Te=r.matchStyles(v.value,v.params,ne),$e=r.matchStyles(T.value,T.params,ne);ne.length?this._engine.reportError(ne):this._engine.afterFlush(()=>{Vi(n,Te),Qt(n,$e)})}return}let le=gt(this._engine.playersByElement,n,[]);le.forEach(ne=>{ne.namespaceId==this.id&&ne.triggerName==e&&ne.queued&&ne.destroy()});let Q=r.matchTransition(v.value,T.value,n,T.params),j=!1;if(!Q){if(!o)return;Q=r.fallbackTransition,j=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:Q,fromState:v,toState:T,player:p,isFallbackTransition:j}),j||(Ht(n,P0),p.onStart(()=>{zn(n,P0)})),p.onDone(()=>{let ne=this.players.indexOf(p);ne>=0&&this.players.splice(ne,1);let Te=this._engine.playersByElement.get(n);if(Te){let $e=Te.indexOf(p);$e>=0&&Te.splice($e,1)}}),this.players.push(p),le.push(p),p}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,t)=>{this._elementListeners.set(t,e.filter(o=>o.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);let e=this._engine.playersByElement.get(n);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){let t=this._engine.driver.query(n,mo,!0);t.forEach(o=>{if(o[Yt])return;let r=this._engine.fetchNamespacesByElement(o);r.size?r.forEach(p=>p.triggerLeaveAnimation(o,e,!1,!0)):this.clearElementCache(o)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(o=>this.clearElementCache(o)))}triggerLeaveAnimation(n,e,t,o){let r=this._engine.statesByElement.get(n),p=new Map;if(r){let u=[];if(r.forEach((v,T)=>{if(p.set(T,v.value),this._triggers.has(T)){let I=this.trigger(n,T,fo,o);I&&u.push(I)}}),u.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,p),t&&_i(u).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){let e=this._elementListeners.get(n),t=this._engine.statesByElement.get(n);if(e&&t){let o=new Set;e.forEach(r=>{let p=r.name;if(o.has(p))return;o.add(p);let v=this._triggers.get(p).fallbackTransition,T=t.get(p)||$a,I=new ho(fo),R=new Co(this.id,p,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:p,transition:v,fromState:T,toState:I,player:R,isFallbackTransition:!0})})}}removeNode(n,e){let t=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let o=!1;if(t.totalAnimations){let r=t.players.length?t.playersByQueriedElement.get(n):[];if(r&&r.length)o=!0;else{let p=n;for(;p=p.parentNode;)if(t.statesByElement.get(p)){o=!0;break}}}if(this.prepareLeaveAnimationListeners(n),o)t.markElementAsRemoved(this.id,n,!1,e);else{let r=n[Yt];(!r||r===H0)&&(t.afterFlush(()=>this.clearElementCache(n)),t.destroyInnerAnimations(n),t._onRemovalComplete(n,e))}}insertNode(n,e){Ht(n,this._hostClassName)}drainQueuedTransitions(n){let e=[];return this._queue.forEach(t=>{let o=t.player;if(o.destroyed)return;let r=t.element,p=this._elementListeners.get(r);p&&p.forEach(u=>{if(u.name==t.triggerName){let v=Tr(r,t.triggerName,t.fromState.value,t.toState.value);v._data=n,wr(t.player,u.phase,v,u.callback)}}),o.markedForDestroy?this._engine.afterFlush(()=>{o.destroy()}):e.push(t)}),this._queue=[],e.sort((t,o)=>{let r=t.transition.ast.depCount,p=o.transition.ast.depCount;return r==0||p==0?r-p:this._engine.driver.containsElement(t.element,o.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}},es=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(n,e)=>{};_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,t){this.bodyNode=n,this.driver=e,this._normalizer=t}get queuedPlayers(){let n=[];return this._namespaceList.forEach(e=>{e.players.forEach(t=>{t.queued&&n.push(t)})}),n}createNamespace(n,e){let t=new Ja(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(t,e):(this.newHostElements.set(e,t),this.collectEnterElement(e)),this._namespaceLookup[n]=t}_balanceNamespaceList(n,e){let t=this._namespaceList,o=this.namespacesByHostElement;if(t.length-1>=0){let p=!1,u=this.driver.getParentElement(e);for(;u;){let v=o.get(u);if(v){let T=t.indexOf(v);t.splice(T+1,0,n),p=!0;break}u=this.driver.getParentElement(u)}p||t.unshift(n)}else t.push(n);return o.set(e,n),n}register(n,e){let t=this._namespaceLookup[n];return t||(t=this.createNamespace(n,e)),t}registerTrigger(n,e,t){let o=this._namespaceLookup[n];o&&o.register(e,t)&&this.totalAnimations++}destroy(n,e){n&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(n);this.namespacesByHostElement.delete(t.hostElement);let o=this._namespaceList.indexOf(t);o>=0&&this._namespaceList.splice(o,1),t.destroy(e),delete this._namespaceLookup[n]}))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){let e=new Set,t=this.statesByElement.get(n);if(t){for(let o of t.values())if(o.namespaceId){let r=this._fetchNamespace(o.namespaceId);r&&e.add(r)}}return e}trigger(n,e,t,o){if(Pr(e)){let r=this._fetchNamespace(n);if(r)return r.trigger(e,t,o),!0}return!1}insertNode(n,e,t,o){if(!Pr(e))return;let r=e[Yt];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let p=this.collectedLeaveElements.indexOf(e);p>=0&&this.collectedLeaveElements.splice(p,1)}if(n){let p=this._fetchNamespace(n);p&&p.insertNode(e,t)}o&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Ht(n,Ha)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),zn(n,Ha))}removeNode(n,e,t){if(Pr(e)){let o=n?this._fetchNamespace(n):null;o?o.removeNode(e,t):this.markElementAsRemoved(n,e,!1,t);let r=this.namespacesByHostElement.get(e);r&&r.id!==n&&r.removeNode(e,t)}else this._onRemovalComplete(e,t)}markElementAsRemoved(n,e,t,o,r){this.collectedLeaveElements.push(e),e[Yt]={namespaceId:n,setForRemoval:o,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:r}}listen(n,e,t,o,r){return Pr(e)?this._fetchNamespace(n).listen(e,t,o,r):()=>{}}_buildInstruction(n,e,t,o,r){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,t,o,n.fromState.options,n.toState.options,e,r)}destroyInnerAnimations(n){let e=this.driver.query(n,mo,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(n,Ar,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(n){let e=this.playersByElement.get(n);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(n){let e=this.playersByQueriedElement.get(n);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return _i(this.players).onDone(()=>n());n()})}processLeaveNode(n){let e=n[Yt];if(e&&e.setForRemoval){if(n[Yt]=H0,e.namespaceId){this.destroyInnerAnimations(n);let t=this._fetchNamespace(e.namespaceId);t&&t.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(Ha)&&this.markElementAsDisabled(n,!1),this.driver.query(n,Md,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,o)=>this._balanceNamespaceList(t,o)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;t<this.collectedEnterElements.length;t++){let o=this.collectedEnterElements[t];Ht(o,Ad)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let t=[];try{e=this._flushAnimations(t,n)}finally{for(let o=0;o<t.length;o++)t[o]()}}else for(let t=0;t<this.collectedLeaveElements.length;t++){let o=this.collectedLeaveElements[t];this.processLeaveNode(o)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],e.length?_i(e).onDone(()=>{t.forEach(o=>o())}):t.forEach(o=>o())}}reportError(n){throw v0(n)}_flushAnimations(n,e){let t=new _o,o=[],r=new Map,p=[],u=new Map,v=new Map,T=new Map,I=new Set;this.disabledNodes.forEach(U=>{I.add(U);let K=this.driver.query(U,Ed,!0);for(let J=0;J<K.length;J++)I.add(K[J])});let R=this.bodyNode,le=Array.from(this.statesByElement.keys()),Q=R0(le,this.collectedEnterElements),j=new Map,ne=0;Q.forEach((U,K)=>{let J=Va+ne++;j.set(K,J),U.forEach(he=>Ht(he,J))});let Te=[],$e=new Set,Ge=new Set;for(let U=0;U<this.collectedLeaveElements.length;U++){let K=this.collectedLeaveElements[U],J=K[Yt];J&&J.setForRemoval&&(Te.push(K),$e.add(K),J.hasAnimation?this.driver.query(K,kd,!0).forEach(he=>$e.add(he)):Ge.add(K))}let at=new Map,et=R0(le,Array.from($e));et.forEach((U,K)=>{let J=Mr+ne++;at.set(K,J),U.forEach(he=>Ht(he,J))}),n.push(()=>{Q.forEach((U,K)=>{let J=j.get(K);U.forEach(he=>zn(he,J))}),et.forEach((U,K)=>{let J=at.get(K);U.forEach(he=>zn(he,J))}),Te.forEach(U=>{this.processLeaveNode(U)})});let an=[],Xt=[];for(let U=this._namespaceList.length-1;U>=0;U--)this._namespaceList[U].drainQueuedTransitions(e).forEach(J=>{let he=J.player,We=J.element;if(an.push(he),this.collectedEnterElements.length){let tt=We[Yt];if(tt&&tt.setForMove){if(tt.previousTriggersValues&&tt.previousTriggersValues.has(J.triggerName)){let Gi=tt.previousTriggersValues.get(J.triggerName),Mt=this.statesByElement.get(J.element);if(Mt&&Mt.has(J.triggerName)){let wo=Mt.get(J.triggerName);wo.value=Gi,Mt.set(J.triggerName,wo)}}he.destroy();return}}let Zt=!R||!this.driver.containsElement(R,We),yt=at.get(We),gi=j.get(We),Me=this._buildInstruction(J,t,gi,yt,Zt);if(Me.errors&&Me.errors.length){Xt.push(Me);return}if(Zt){he.onStart(()=>Vi(We,Me.fromStyles)),he.onDestroy(()=>Qt(We,Me.toStyles)),o.push(he);return}if(J.isFallbackTransition){he.onStart(()=>Vi(We,Me.fromStyles)),he.onDestroy(()=>Qt(We,Me.toStyles)),o.push(he);return}let _s=[];Me.timelines.forEach(tt=>{tt.stretchStartingKeyframe=!0,this.disabledNodes.has(tt.element)||_s.push(tt)}),Me.timelines=_s,t.append(We,Me.timelines);let qp={instruction:Me,player:he,element:We};p.push(qp),Me.queriedElements.forEach(tt=>gt(u,tt,[]).push(he)),Me.preStyleProps.forEach((tt,Gi)=>{if(tt.size){let Mt=v.get(Gi);Mt||v.set(Gi,Mt=new Set),tt.forEach((wo,ua)=>Mt.add(ua))}}),Me.postStyleProps.forEach((tt,Gi)=>{let Mt=T.get(Gi);Mt||T.set(Gi,Mt=new Set),tt.forEach((wo,ua)=>Mt.add(ua))})});if(Xt.length){let U=[];Xt.forEach(K=>{U.push(y0(K.triggerName,K.errors))}),an.forEach(K=>K.destroy()),this.reportError(U)}let st=new Map,ct=new Map;p.forEach(U=>{let K=U.element;t.has(K)&&(ct.set(K,K),this._beforeAnimationBuild(U.player.namespaceId,U.instruction,st))}),o.forEach(U=>{let K=U.element;this._getPreviousPlayers(K,!1,U.namespaceId,U.triggerName,null).forEach(he=>{gt(st,K,[]).push(he),he.destroy()})});let Hi=Te.filter(U=>V0(U,v,T)),sn=new Map;I0(sn,this.driver,Ge,T,qt).forEach(U=>{V0(U,v,T)&&Hi.push(U)});let $i=new Map;Q.forEach((U,K)=>{I0($i,this.driver,new Set(U),v,to)}),Hi.forEach(U=>{let K=sn.get(U),J=$i.get(U);sn.set(U,new Map([...K?.entries()??[],...J?.entries()??[]]))});let ma=[],us=[],fs={};p.forEach(U=>{let{element:K,player:J,instruction:he}=U;if(t.has(K)){if(I.has(K)){J.onDestroy(()=>Qt(K,he.toStyles)),J.disabled=!0,J.overrideTotalTime(he.totalTime),o.push(J);return}let We=fs;if(ct.size>1){let yt=K,gi=[];for(;yt=yt.parentNode;){let Me=ct.get(yt);if(Me){We=Me;break}gi.push(yt)}gi.forEach(Me=>ct.set(Me,We))}let Zt=this._buildAnimation(J.namespaceId,he,st,r,$i,sn);if(J.setRealPlayer(Zt),We===fs)ma.push(J);else{let yt=this.playersByElement.get(We);yt&&yt.length&&(J.parentPlayer=_i(yt)),o.push(J)}}else Vi(K,he.fromStyles),J.onDestroy(()=>Qt(K,he.toStyles)),us.push(J),I.has(K)&&o.push(J)}),us.forEach(U=>{let K=r.get(U.element);if(K&&K.length){let J=_i(K);U.setRealPlayer(J)}}),o.forEach(U=>{U.parentPlayer?U.syncPlayerEvents(U.parentPlayer):U.destroy()});for(let U=0;U<Te.length;U++){let K=Te[U],J=K[Yt];if(zn(K,Mr),J&&J.hasAnimation)continue;let he=[];if(u.size){let Zt=u.get(K);Zt&&Zt.length&&he.push(...Zt);let yt=this.driver.query(K,Ar,!0);for(let gi=0;gi<yt.length;gi++){let Me=u.get(yt[gi]);Me&&Me.length&&he.push(...Me)}}let We=he.filter(Zt=>!Zt.destroyed);We.length?Id(this,K,We):this.processLeaveNode(K)}return Te.length=0,ma.forEach(U=>{this.players.push(U),U.onDone(()=>{U.destroy();let K=this.players.indexOf(U);this.players.splice(K,1)}),U.play()}),ma}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,t,o,r){let p=[];if(e){let u=this.playersByQueriedElement.get(n);u&&(p=u)}else{let u=this.playersByElement.get(n);if(u){let v=!r||r==fo;u.forEach(T=>{T.queued||!v&&T.triggerName!=o||p.push(T)})}}return(t||o)&&(p=p.filter(u=>!(t&&t!=u.namespaceId||o&&o!=u.triggerName))),p}_beforeAnimationBuild(n,e,t){let o=e.triggerName,r=e.element,p=e.isRemovalTransition?void 0:n,u=e.isRemovalTransition?void 0:o;for(let v of e.timelines){let T=v.element,I=T!==r,R=gt(t,T,[]);this._getPreviousPlayers(T,I,p,u,e.toState).forEach(Q=>{let j=Q.getRealPlayer();j.beforeDestroy&&j.beforeDestroy(),Q.destroy(),R.push(Q)})}Vi(r,e.fromStyles)}_buildAnimation(n,e,t,o,r,p){let u=e.triggerName,v=e.element,T=[],I=new Set,R=new Set,le=e.timelines.map(j=>{let ne=j.element;I.add(ne);let Te=ne[Yt];if(Te&&Te.removedBeforeQueried)return new Ki(j.duration,j.delay);let $e=ne!==v,Ge=Rd((t.get(ne)||Dd).map(st=>st.getRealPlayer())).filter(st=>{let ct=st;return ct.element?ct.element===ne:!1}),at=r.get(ne),et=p.get(ne),an=La(this._normalizer,j.keyframes,at,et),Xt=this._buildPlayer(j,an,Ge);if(j.subTimeline&&o&&R.add(ne),$e){let st=new Co(n,u,ne);st.setRealPlayer(Xt),T.push(st)}return Xt});T.forEach(j=>{gt(this.playersByQueriedElement,j.element,[]).push(j),j.onDone(()=>Ld(this.playersByQueriedElement,j.element,j))}),I.forEach(j=>Ht(j,za));let Q=_i(le);return Q.onDestroy(()=>{I.forEach(j=>zn(j,za)),Qt(v,e.toStyles)}),R.forEach(j=>{gt(o,j,[]).push(Q)}),Q}_buildPlayer(n,e,t){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,t):new Ki(n.duration,n.delay)}},Co=class{namespaceId;triggerName;element;_player=new Ki;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(n,e,t){this.namespaceId=n,this.triggerName=e,this.element=t}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,t)=>{e.forEach(o=>wr(n,t,void 0,o))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){let e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){gt(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){let e=this._player;e.triggerCallback&&e.triggerCallback(n)}};function Ld(i,n,e){let t=i.get(n);if(t){if(t.length){let o=t.indexOf(e);t.splice(o,1)}t.length==0&&i.delete(n)}return t}function Pd(i){return i??null}function Pr(i){return i&&i.nodeType===1}function Nd(i){return i=="start"||i=="done"}function N0(i,n){let e=i.style.display;return i.style.display=n??"none",e}function I0(i,n,e,t,o){let r=[];e.forEach(v=>r.push(N0(v)));let p=[];t.forEach((v,T)=>{let I=new Map;v.forEach(R=>{let le=n.computeStyle(T,R,o);I.set(R,le),(!le||le.length==0)&&(T[Yt]=Fd,p.push(T))}),i.set(T,I)});let u=0;return e.forEach(v=>N0(v,r[u++])),p}function R0(i,n){let e=new Map;if(i.forEach(u=>e.set(u,[])),n.length==0)return e;let t=1,o=new Set(n),r=new Map;function p(u){if(!u)return t;let v=r.get(u);if(v)return v;let T=u.parentNode;return e.has(T)?v=T:o.has(T)?v=t:v=p(T),r.set(u,v),v}return n.forEach(u=>{let v=p(u);v!==t&&e.get(v).push(u)}),e}function Ht(i,n){i.classList?.add(n)}function zn(i,n){i.classList?.remove(n)}function Id(i,n,e){_i(e).onDone(()=>i.processLeaveNode(n))}function Rd(i){let n=[];return $0(i,n),n}function $0(i,n){for(let e=0;e<i.length;e++){let t=i[e];t instanceof Ro?$0(t.players,n):n.push(t)}}function Vd(i,n){let e=Object.keys(i),t=Object.keys(n);if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++){let r=e[o];if(!n.hasOwnProperty(r)||i[r]!==n[r])return!1}return!0}function V0(i,n,e){let t=e.get(i);if(!t)return!1;let o=n.get(i);return o?t.forEach(r=>o.add(r)):n.set(i,t),e.delete(i),!0}var On=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(n,e)=>{};constructor(n,e,t){this._driver=e,this._normalizer=t,this._transitionEngine=new es(n.body,e,t),this._timelineEngine=new Za(n.body,e,t),this._transitionEngine.onRemovalComplete=(o,r)=>this.onRemovalComplete(o,r)}registerTrigger(n,e,t,o,r){let p=n+"-"+o,u=this._triggerCache[p];if(!u){let v=[],T=[],I=O0(this._driver,r,v,T);if(v.length)throw m0(o,v);u=bd(o,I,this._normalizer),this._triggerCache[p]=u}this._transitionEngine.registerTrigger(e,o,u)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,t,o){this._transitionEngine.insertNode(n,e,t,o)}onRemove(n,e,t){this._transitionEngine.removeNode(n,e,t)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,t,o){if(t.charAt(0)=="@"){let[r,p]=Pa(t),u=o;this._timelineEngine.command(r,e,p,u)}else this._transitionEngine.trigger(n,e,t,o)}listen(n,e,t,o,r){if(t.charAt(0)=="@"){let[p,u]=Pa(t);return this._timelineEngine.listen(p,e,u,r)}return this._transitionEngine.listen(n,e,t,o,r)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(n){this._transitionEngine.afterFlushAnimationsDone(n)}};function zd(i,n){let e=null,t=null;return Array.isArray(n)&&n.length?(e=Ga(n[0]),n.length>1&&(t=Ga(n[n.length-1]))):n instanceof Map&&(e=Ga(n)),e||t?new Od(i,e,t):null}var Od=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(e,t,o){this._element=e,this._startStyles=t,this._endStyles=o;let r=i.initialStylesByElement.get(e);r||i.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Qt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Qt(this._element,this._initialStyles),this._endStyles&&(Qt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(Vi(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Vi(this._element,this._endStyles),this._endStyles=null),Qt(this._element,this._initialStyles),this._state=3)}}return i})();function Ga(i){let n=null;return i.forEach((e,t)=>{Bd(t)&&(n=n||new Map,n.set(t,e))}),n}function Bd(i){return i==="display"||i==="position"}var Br=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(n,e,t,o){this.element=n,this.keyframes=e,this.options=t,this._specialStyles=o,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let n=this.keyframes,e=this._triggerWebAnimation(this.element,n,this.options);if(!e)return this._onFinish(),null;this.domPlayer=e,this._finalKeyframe=n.length?n[n.length-1]:new Map;let t=()=>this._onFinish();return e.addEventListener("finish",t),this.onDestroy(()=>{e.removeEventListener("finish",t)}),e}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(n){let e=[];return n.forEach(t=>{e.push(Object.fromEntries(t))}),e}_triggerWebAnimation(n,e,t){let o=this._convertKeyframesToObject(e);try{return n.animate(o,t)}catch{return null}}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){let n=this._buildPlayer();n&&(this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),n.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=n*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,o)=>{o!=="offset"&&n.set(o,this._finished?t:Dr(this.element,o))}),this.currentSnapshot=n}triggerCallback(n){let e=n==="start"?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}},Ur=class{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}containsElement(n,e){return Na(n,e)}getParentElement(n){return Er(n)}query(n,e,t){return Ia(n,e,t)}computeStyle(n,e,t){return Dr(n,e)}animate(n,e,t,o,r,p=[]){let u=o==0?"both":"forwards",v={duration:t,delay:o,fill:u};r&&(v.easing=r);let T=new Map,I=p.filter(Q=>Q instanceof Br);E0(t,o)&&I.forEach(Q=>{Q.currentSnapshot.forEach((j,ne)=>T.set(ne,j))});let R=w0(e).map(Q=>new Map(Q));R=M0(n,R,T);let le=zd(n,R);return new Br(n,R,v,le)}};var Nr="@",G0="@.disabled",Hr=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(n,e,t,o){this.namespaceId=n,this.delegate=e,this.engine=t,this._onDestroy=o}get data(){return this.delegate.data}destroyNode(n){this.delegate.destroyNode?.(n)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,t,o=!0){this.delegate.insertBefore(n,e,t),this.engine.onInsert(this.namespaceId,e,n,o)}removeChild(n,e,t,o){if(o){this.delegate.removeChild(n,e,t,o);return}this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,t,o){this.delegate.setAttribute(n,e,t,o)}removeAttribute(n,e,t){this.delegate.removeAttribute(n,e,t)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,t,o){this.delegate.setStyle(n,e,t,o)}removeStyle(n,e,t){this.delegate.removeStyle(n,e,t)}setProperty(n,e,t){e.charAt(0)==Nr&&e==G0?this.disableAnimations(n,!!t):this.delegate.setProperty(n,e,t)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,t,o){return this.delegate.listen(n,e,t,o)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}},ts=class extends Hr{factory;constructor(n,e,t,o,r){super(e,t,o,r),this.factory=n,this.namespaceId=e}setProperty(n,e,t){e.charAt(0)==Nr?e.charAt(1)=="."&&e==G0?(t=t===void 0?!0:!!t,this.disableAnimations(n,t)):this.engine.process(this.namespaceId,n,e.slice(1),t):this.delegate.setProperty(n,e,t)}listen(n,e,t,o){if(e.charAt(0)==Nr){let r=Ud(n),p=e.slice(1),u="";return p.charAt(0)!=Nr&&([p,u]=Hd(p)),this.engine.listen(this.namespaceId,r,p,u,v=>{let T=v._data||-1;this.factory.scheduleListenerCallback(T,t,v)})}return this.delegate.listen(n,e,t,o)}};function Ud(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function Hd(i){let n=i.indexOf("."),e=i.substring(0,n),t=i.slice(n+1);return[e,t]}var $r=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(n,e,t){this.delegate=n,this.engine=e,this._zone=t,e.onRemovalComplete=(o,r)=>{r?.removeChild(null,o)}}createRenderer(n,e){let o=this.delegate.createRenderer(n,e);if(!n||!e?.data?.animation){let T=this._rendererCache,I=T.get(o);if(!I){let R=()=>T.delete(o);I=new Hr("",o,this.engine,R),T.set(o,I)}return I}let r=e.id,p=e.id+"-"+this._currentId;this._currentId++,this.engine.register(p,n);let u=T=>{Array.isArray(T)?T.forEach(u):this.engine.registerTrigger(r,p,n,T.name,T)};return e.data.animation.forEach(u),new ts(this,p,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(n,e,t){if(n>=0&&n<this._microtaskId){this._zone.run(()=>e(t));return}let o=this._animationCallbacksBuffer;o.length==0&&queueMicrotask(()=>{this._zone.run(()=>{o.forEach(r=>{let[p,u]=r;p(u)}),this._animationCallbacksBuffer=[]})}),o.push([e,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(n){this.engine.flush(),this.delegate.componentReplaced?.(n)}};var Gd=(()=>{class i extends On{constructor(e,t,o){super(e,t,o)}ngOnDestroy(){this.flush()}static \u0275fac=function(t){return new(t||i)(ko(Do),ko(nn),ko(on))};static \u0275prov=kt({token:i,factory:i.\u0275fac})}return i})();function Wd(){return new Ir}function qd(i,n,e){return new $r(i,n,e)}var W0=[{provide:on,useFactory:Wd},{provide:On,useClass:Gd},{provide:Es,useFactory:qd,deps:[Us,On,Wi]}],s5=[{provide:nn,useClass:is},{provide:_a,useValue:"NoopAnimations"},...W0],jd=[{provide:nn,useFactory:()=>new Ur},{provide:_a,useFactory:()=>"BrowserAnimations"},...W0];function q0(){return ws("NgEagerAnimations"),[...jd]}var go=i=>i.url;var j0=()=>S(oe).user.isAdmin;var K0=[{path:Zi.BASE,pathMatch:"prefix",canActivate:[j0],children:[{path:Zi.USERS,data:{type:no.USER},loadComponent:()=>import("./chunk-Y44XDRM5.js").then(i=>i.AdminUsersComponent)},{path:Zi.GUESTS,data:{type:no.GUEST},loadComponent:()=>import("./chunk-Y44XDRM5.js").then(i=>i.AdminUsersComponent)},{path:Zi.GROUPS,children:[{path:"**",resolve:{routes:go},data:{type:Xi.USER},loadComponent:()=>import("./chunk-MVZJSG5R.js").then(i=>i.AdminGroupsComponent)}]},{path:Zi.PGROUPS,children:[{path:"**",resolve:{routes:go},data:{type:Xi.PERSONAL},loadComponent:()=>import("./chunk-MVZJSG5R.js").then(i=>i.AdminGroupsComponent)}]},{path:"**",redirectTo:Zi.USERS}]}];var Q0=i=>S(pi).linkValidation(i.params.uuid).pipe(Kn(n=>n===!1?xi(!1):(i.data=Se(re({},i.data),{link:n}),xi(!0))));var Y0=[{path:Ta.LINK,children:[{path:":uuid",loadComponent:()=>import("./chunk-XX7JXKA6.js").then(i=>i.PublicLinkComponent),canActivate:[Q0]},{path:`:uuid/${Ta.AUTH}`,loadComponent:()=>import("./chunk-LXQGVNU2.js").then(i=>i.PublicLinkAuthComponent)},{path:":uuid/:error",loadComponent:()=>import("./chunk-KDEEERWZ.js").then(i=>i.PublicLinkErrorComponent)}]}];var X0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Kd={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},os=Kd;var Z0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var Bn={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var J0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var e1={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var t1={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var Gr={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var i1={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var n1={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var Wr={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var qr={BASE:`${ec}/comments`,RECENTS:"recents",SPACES:"spaces"},xo=`${qr.BASE}/${qr.SPACES}`,o1=`${qr.BASE}/${qr.RECENTS}`;var jr=class{constructor(n){Object.assign(this,n),this.author&&(this.author.avatarUrl=Li(this.author.login)),this.mimeUrl=Ji(this.file.mime),this.icon=this.file.fromShare?ie.SHARES:this.file.fromSpace?ie.SPACES:ie.PERSONAL,this.iconClass=this.file.fromShare?"purple":"primary",this.showedPath=[...this.file.path.split("/").slice(this.file.path.split("/")[1]===ht.PERSONAL?2:1),this.file.name].join("/")}};var Un=class{constructor(n){this.wasModified=!1,Object.assign(this,n),this.author.avatarUrl=Li(this.author.login),this.wasModified=this.createdAt!==this.modifiedAt,this.dateToShow=this.wasModified?this.modifiedAt:this.createdAt}};var Kr=(()=>{let n=class n{constructor(){this.store=S(te),this.layout=S(N),this.http=S(Gs)}getComments(t){return this.http.get(`${xo}/${t.path}`).pipe(bt(o=>o.map(r=>new Un(r))))}createComment(t,o){return this.http.post(`${xo}/${t.path}`,o).pipe(bt(r=>new Un(r)))}updateComment(t,o){return this.http.patch(`${xo}/${t.path}`,o).pipe(bt(r=>new Un(r)))}deleteComment(t,o){return this.http.request("delete",`${xo}/${t.path}`,{body:o})}loadRecents(t){this.http.get(o1,{params:new $s().set("limit",t)}).pipe(bt(o=>o.map(r=>new jr(r)))).subscribe({next:o=>{this.store.commentsRecents.update(r=>[...o,...r.slice(t)])},error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=kt({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var Qd=(i,n)=>n.id;function Yd(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);m("icon",e.icons.faTrashAlt)}}function Xd(i,n){if(i&1){let e=y();a(0,"ul",8)(1,"li",9),_("click",function(){let o=h(e).$implicit,r=c();return C(r.goToFile(o))}),a(2,"div",10),f(3,"app-user-avatar",11),l(),a(4,"div",12)(5,"span",13)(6,"span"),d(7),l()(),a(8,"span"),g(9,Yd,1,1,"fa-icon",2),f(10,"fa-icon",14),a(11,"span"),d(12),l()()(),a(13,"div",15)(14,"span",16),d(15),b(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;z("border-0",t===o-1),s(3),m("user",e.author),s(4),w(e.content),s(),V(X("product-description text-",e.iconClass)),s(),x(e.file.inTrash?9:-1),s(),m("icon",e.icon),s(2),w(e.showedPath),s(3),w(E(16,11,e.modifiedAt,!0))}}function Zd(i,n){if(i&1&&(a(0,"div",7),f(1,"fa-icon",17),a(2,"div",18),d(3,"No recent comments"),l()()),i&2){let e=c();s(),m("icon",e.icons.faCommentDots)}}var r1=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faCommentDots:Gr,faMagnifyingGlassPlus:jo,faMagnifyingGlassMinus:qo,faTrashAlt:Di},this.router=S(ge),this.layout=S(N),this.store=S(te),this.commentsService=S(Kr),this.nbInitialComments=10,this.nbComments=this.nbInitialComments,this.comments=ve(()=>this.store.commentsRecents().slice(0,this.nbComments)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbComments=this.nbInitialComments):(this.moreElements=!0,this.nbComments*=5),this.load()}goToFile(t){this.router.navigate([$.SPACES,...t.file.path.split("/")],{queryParams:{select:t.file.name}}).then(()=>this.layout.showRSideBarTab(_e.COMMENTS,!0))}load(){this.commentsService.loadRecents(this.nbComments)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-comments-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],[3,"user"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Comments"),l(),a(5,"fa-icon",4),_("click",function(){return r.switchMore()}),l()(),a(6,"div",5),k(7,Xd,17,14,"ul",6,Qd,!1,Zd,4,1,"div",7),l()()),o&2&&(s(2),m("icon",r.icons.faCommentDots),s(3),m("icon",r.moreElements?r.icons.faMagnifyingGlassMinus:r.icons.faMagnifyingGlassPlus),s(2),D(r.comments()))},dependencies:[P,F,Ze,Je],encapsulation:2});let i=n;return i})();var Jd=(i,n)=>n.id;function em(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);m("icon",e.icons.faTrashAlt)}}function tm(i,n){if(i&1){let e=y();a(0,"ul",8)(1,"li",9),_("click",function(){let o=h(e).$implicit,r=c();return C(r.goToFile(o))}),a(2,"div",10)(3,"img",11),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l()(),a(4,"div",12)(5,"span",13)(6,"span"),d(7),l()(),a(8,"span"),g(9,em,1,1,"fa-icon",2),f(10,"fa-icon",14),a(11,"span"),d(12),l()()(),a(13,"div",15)(14,"span",16),d(15),b(16,"amTimeAgo"),l()()()()}if(i&2){let e=n.$implicit,t=n.$index,o=n.$count;z("border-0",t===o-1),s(3),m("src",e.mimeUrl,ee),s(4),w(e.name),s(),V(X("product-description text-",e.iconClass)),s(),x(e.inTrash?9:-1),s(),m("icon",e.icon),s(2),w(e.showedPath),s(3),w(E(16,11,e.mtime,!0))}}function im(i,n){if(i&1&&(a(0,"div",7),f(1,"fa-icon",17),a(2,"div",18),d(3,"No recent files"),l()()),i&2){let e=c();s(),m("icon",e.icons.faFileLines)}}var a1=(()=>{let n=class n{constructor(){this.moreElements=!1,this.icons={faFileLines:t1,faMagnifyingGlassPlus:jo,faMagnifyingGlassMinus:qo,faTrashAlt:Di},this.router=S(ge),this.store=S(te),this.filesService=S(He),this.nbInitialFiles=10,this.nbFiles=this.nbInitialFiles,this.files=ve(()=>this.store.filesRecents().slice(0,this.nbFiles)),this.load()}switchMore(){this.moreElements?(this.moreElements=!1,this.nbFiles=this.nbInitialFiles):(this.moreElements=!0,this.nbFiles*=5),this.load()}goToFile(t){this.router.navigate([$.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}load(){this.filesService.loadRecents(this.nbFiles)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-recents-widget"]],decls:10,vars:3,consts:[[1,"box-transparent"],[1,"box-header"],[3,"icon"],["l10nTranslate","",1,"box-title"],["role","button",1,"ms-auto","btn-link",3,"click","icon"],[1,"box-body","px-0","py-0"],[1,"products-list","product-list-in-box",3,"border-0"],[1,"d-flex","flex-column","justify-content-center","text-align-center","text-gray","mt-5"],[1,"products-list","product-list-in-box"],[1,"item",3,"click"],[1,"product-img"],["alt","",3,"error","src"],[1,"product-info"],[1,"product-title"],[1,"me-1",3,"icon"],[1,"product-badge"],[1,"badge","rounded-pill","bg-warning"],["size","4x",3,"icon"],["l10nTranslate","",1,"mt-4"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Files"),l(),a(5,"fa-icon",4),_("click",function(){return r.switchMore()}),l()(),a(6,"div",5),k(7,tm,17,14,"ul",6,Jd,!1,im,4,1,"div",7),l()()),o&2&&(s(2),m("icon",r.icons.faFileLines),s(3),m("icon",r.moreElements?r.icons.faMagnifyingGlassMinus:r.icons.faMagnifyingGlassPlus),s(2),D(r.files()))},dependencies:[P,F,Je],encapsulation:2});let i=n;return i})();var s1=(()=>{let n=class n{constructor(){this.layout=S(N),this.layout.setBreadcrumbIcon(hc),this.layout.setBreadcrumbNav({url:`/${fi.BASE}/${_c}`,translating:!0,sameLink:!0})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-recents"]],decls:6,vars:2,consts:[["appAutoResize","",1,"fs-xs","px-2",3,"useMaxHeight","resizeOffset"],[1,"row"],[1,"col-md-6"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),f(3,"app-files-recents-widget"),l(),a(4,"div",2),f(5,"app-comments-recents-widget"),l()()()),o&2&&m("useMaxHeight",!1)("resizeOffset",40)},dependencies:[fe,a1,r1],encapsulation:2});let i=n;return i})();var l1=[{path:cr.BASE,pathMatch:"full",redirectTo:fi.BASE},{path:fi.BASE,component:s1}];var So={BASE:"search"},nm="Search",Qr=$o,c1={title:nm,link:So.BASE,icon:Qr,level:2,submenus:[]};function rm(i,n){if(i&1){let e=y();a(0,"span",5)(1,"fa-icon",12),_("click",function(){h(e);let o=c();return C(o.clearSearch())}),l()()}if(i&2){let e=c();s(),m("icon",e.icons.faTimes)}}function am(i,n){if(i&1&&(a(0,"div",10),d(1),l()),i&2){let e=c();s(),w(e.errorMessage)}}function sm(i,n){if(i&1&&(a(0,"div")(1,"span"),d(2,"..."),l(),f(3,"span",22),a(4,"span"),d(5,"..."),l()()),i&2){let e=n.$implicit;s(3),m("innerHTML",e,Yn)}}function lm(i,n){if(i&1&&(f(0,"hr",20),a(1,"div",21),k(2,sm,6,1,"div",null,qe),l()),i&2){let e=c().$implicit;s(2),D(e.matches)}}function cm(i,n){if(i&1){let e=y();a(0,"div",13),_("click",function(){let o=h(e).$index,r=c();return C(r.selectedId=o)})("appTap",function(){let o=h(e).$implicit,r=c();return C(r.goTo(o))}),a(1,"div",14)(2,"img",15),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),a(3,"div",16)(4,"span",17),d(5),l(),a(6,"div"),f(7,"fa-icon",18),a(8,"span",19)(9,"span"),d(10),l()()()()(),g(11,lm,4,0),l()}if(i&2){let e=n.$implicit,t=n.$index,o=c();z("selected",t===o.selectedId),s(2),m("src",e.mimeUrl,ee),s(3),w(e.name),s(),V(X("d-flex align-items-center text-",e.iconClass)),s(),m("icon",e.icon),s(3),w(e.showedPath),s(),x(e.matches!=null&&e.matches.length?11:-1)}}var p1=(()=>{let n=class n{constructor(){this.locale=S(H),this.store=S(te),this.searchContent=ve(()=>this.store.currentSearch().content),this.icons={SEARCH_ICON:Qr,faSpinner:Ue,faTrashCan:ki,faTimes:Nt,faFont:Rl},this.minCharsToSearch=3,this.loading=!1,this.errorMessage=null,this.selectedId=null,this.router=S(ge),this.layout=S(N),this.filesService=S(He),this.layout.setBreadcrumbIcon(Qr),this.layout.setBreadcrumbNav({url:`/${So.BASE}`,translating:!1,sameLink:!0})}setCurrentSearch(t){this.store.currentSearch.update(o=>Se(re({},o),{content:t.target.value}))}doSearch(){this.searchContent().length<this.minCharsToSearch||(this.errorMessage=null,this.loading=!0,this.selectedId=null,this.filesService.search(this.store.currentSearch()).subscribe({next:t=>{this.store.filesSearch.set(t),this.loading=!1},error:t=>{this.store.filesSearch.set([]),this.errorMessage=t.error.message,this.loading=!1}}))}toggleFullText(){this.store.currentSearch.update(t=>Se(re({},t),{fullText:!t.fullText}))}clearSearch(){this.store.currentSearch.update(t=>Se(re({},t),{content:""})),this.store.filesSearch.set([])}goTo(t){this.router.navigate([$.SPACES,...t.path.split("/")],{queryParams:{select:t.name}}).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-search"]],viewQuery:function(o,r){if(o&1&&Y(Ve,7),o&2){let p;G(p=W())&&(r.inputFilter=p.first)}},decls:16,vars:19,consts:[[1,"app-top-menu"],[1,"input-group",2,"width","45%"],["role","button","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled"],[3,"icon","animation"],["name","search","type","text","appAutofocus","","autocomplete","",1,"flex-fill","form-control","form-control-sm",2,"padding-right","24px",3,"input","keyup.enter","keyup.escape","value","placeholder"],[1,"cursor-pointer",2,"position","absolute","right","40px","top","3px","z-index","1001","font-size","1rem"],["placement","bottom","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary-alt","fs-xxs",3,"ngModelChange","ngModel","tooltip"],[3,"icon"],[1,"d-none","d-sm-block","ms-auto"],["appAutoResize","",1,"fs-xs"],["l10nTranslate","",1,"p-3","text-danger","fw-500"],[1,"app-div-striped","py-2",3,"selected"],["role","button",3,"click","icon"],[1,"app-div-striped","py-2",3,"click","appTap"],[1,"d-flex","align-items-center","text-truncate","px-2","py-1"],["alt","","draggable","false","height","28",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2",2,"height","34px"],[1,"fs-xxs","text-truncate"],[1,"me-1",3,"icon"],[1,"fs-xxxs","text-truncate"],[1,"m-0"],[1,"d-flex","flex-column","px-2","py-1"],[1,"fs-xxxs",3,"innerHTML"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"button",2),_("click",function(){return r.doSearch()}),f(3,"fa-icon",3),l(),a(4,"input",4),b(5,"translate"),_("input",function(u){return r.setCurrentSearch(u)})("keyup.enter",function(){return r.doSearch()})("keyup.escape",function(){return r.clearSearch()}),l(),g(6,rm,2,1,"span",5),a(7,"button",6),b(8,"translate"),_("ngModelChange",function(){return r.toggleFullText()}),f(9,"fa-icon",7),l()(),f(10,"app-input-filter",8),l(),a(11,"div",9),g(12,am,2,1,"div",10),k(13,cm,12,10,"div",11,qe),b(15,"searchFilter"),l()),o&2&&(s(2),m("disabled",r.searchContent().length<r.minCharsToSearch),s(),m("icon",r.loading?r.icons.faSpinner:r.icons.SEARCH_ICON)("animation",r.loading?"spin":null),s(),m("value",r.searchContent())("placeholder",E(5,10,r.store.currentSearch().fullText?"Search for content":"Search for files",r.locale.language)),s(2),x(r.searchContent()?6:-1),s(),m("ngModel",r.store.currentSearch().fullText)("tooltip",E(8,13,"Search for content",r.locale.language)),s(2),m("icon",r.icons.faFont),s(3),x(r.errorMessage?12:-1),s(),D(E(15,16,r.store.filesSearch(),r.inputFilter.search())))},dependencies:[Ve,F,Ye,An,be,xe,ye,fe,ke,nt,P,Z,Ct],encapsulation:2});let i=n;return i})();var d1=[{path:So.BASE,component:p1}];var m1=(i,n)=>n.key;function pm(i,n){if(i&1){let e=y();a(0,"li",6)(1,"a",8),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.setView(o.key))}),a(2,"span"),f(3,"fa-icon",2),d(4),l()()()}if(i&2){let e=n.$implicit;s(3),m("icon",e.value.icon),s(),A(" ",e.value.text)}}function dm(i,n){if(i&1&&f(0,"fa-icon",10),i&2){let e=c(3);m("icon",e.sortParams.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function mm(i,n){if(i&1){let e=y();a(0,"li",6)(1,"a",8),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.sortBy.emit(o.key))}),a(2,"span",9),d(3),g(4,dm,1,1,"fa-icon",10),l()()()}if(i&2){let e=n.$implicit,t=c(2);s(3),A(" ",e.value," "),s(),x(t.sortParams.column===e.key?4:-1)}}function um(i,n){if(i&1&&(a(0,"ul",4)(1,"li",5),d(2,"Display"),l(),k(3,pm,5,2,"li",6,m1),b(5,"keyvalue"),a(6,"li",7),d(7,"Sort by"),l(),k(8,mm,5,2,"li",6,m1),b(10,"keyvalue"),l()),i&2){let e=c();s(3),D(E(5,0,e.viewsMode,e.originalOrderKeyValue)),s(5),D(E(10,3,e.sortFields,e.originalOrderKeyValue))}}var lt=(()=>{let n=class n{constructor(){this.switchView=new ae,this.sortBy=new ae,this.originalOrderKeyValue=Fe,this.icons={faCog:Ai,faArrowDown:ft,faArrowUp:dt},this.viewsMode={tl:{enabled:!1,text:"List",icon:Al},th:{enabled:!0,text:"S",icon:io,dimensions:96,image:56,imageRes:128,faSize:30,textSize:10,margins:18},thM:{enabled:!0,text:"M",icon:io,dimensions:112,image:72,imageRes:192,faSize:34,textSize:11,margins:18},thL:{enabled:!0,text:"L",icon:io,dimensions:152,image:112,imageRes:256,faSize:50,textSize:12,margins:18},thXl:{enabled:!0,text:"XL",icon:io,dimensions:192,image:152,imageRes:512,faSize:65,textSize:13,margins:18},thXxl:{enabled:!0,text:"XXL",icon:Hl,dimensions:232,image:192,imageRes:1024,faSize:80,textSize:13,margins:18}},this.layout=S(N),this.viewsMode.tl.text=this.layout.translateString(this.viewsMode.tl.text)}get viewMode(){return localStorage.getItem("viewMode")||"tl"}set viewMode(t){localStorage.setItem("viewMode",t)}currentView(){return this.viewsMode[this.viewMode]}setView(t){this.viewMode=t,this.switchView.emit(this.viewsMode[t])}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,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,r){o&1&&(a(0,"div",0)(1,"button",1),f(2,"fa-icon",2),l(),L(3,um,11,6,"ul",3),l()),o&2&&(s(2),m("icon",r.icons.faCog))},dependencies:[Ri,Ni,Ii,Pi,F,P,Ae],encapsulation:2,changeDetection:0});let i=n;return i})();var fm=(i,n)=>n.key;function _m(i,n){i&1&&(a(0,"span",0),d(1,"No permissions"),l())}function hm(i,n){if(i&1&&(f(0,"fa-icon",1),b(1,"translate")),i&2){let e=n.$implicit,t=c(2);m("icon",e.value.icon)("tooltip",E(1,3,e.value.text,t.locale.language))("placement",t.tooltipPlacement)}}function Cm(i,n){if(i&1&&(k(0,hm,2,6,"fa-icon",1,fm),b(2,"keyvalue")),i&2){let e=c();D(E(2,0,e.permissions,e.originalOrderKeyValue))}}var vt=(()=>{let n=class n{constructor(){this.permissions={},this.tooltipPlacement="top",this.replaceEmptyPermissions=!1,this.locale=S(H),this.hasPermissions=!1,this.originalOrderKeyValue=Fe}ngOnChanges(){this.hasPermissions=!!Object.keys(this.permissions).length}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-file-permissions"]],inputs:{permissions:"permissions",tooltipPlacement:"tooltipPlacement",replaceEmptyPermissions:"replaceEmptyPermissions"},features:[ln],decls:2,vars:1,consts:[["l10nTranslate",""],[1,"cursor-pointer","fs-md",3,"icon","tooltip","placement"]],template:function(o,r){o&1&&g(0,_m,2,0,"span",0)(1,Cm,3,3),o&2&&x(r.replaceEmptyPermissions&&!r.hasPermissions?0:1)},dependencies:[Ke,ke,P,F,Ae,Z],encapsulation:2});let i=n;return i})();var gm=["MainContextMenu"],xm=["TargetContextMenu"],f1=(i,n)=>n.id,_1=(i,n)=>n.key;function Sm(i,n){if(i&1&&(a(0,"span",30),d(1),l()),i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),A(" ",e.hTimeAccessAgo," ")}}function vm(i,n){if(i&1){let e=y();a(0,"div",21),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){h(e);let o=c(2);return C(o.openLinkDialog())}),a(1,"div",22)(2,"img",23),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),a(3,"span",24),g(4,Sm,2,3,"span",25),l(),a(5,"span",26),f(6,"app-share-repository",27),l()(),a(7,"div",28)(8,"span",29),d(9),l()()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);O("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),z("selected",e.id===(o.selected==null?null:o.selected.id))("disabled",!e.link.isActive),s(),Jt("rowIndex",t),s(),m("src",e.mimeUrl,ee)("height",o.galleryMode.image)("width",o.galleryMode.image),s(2),x(e.newly?4:-1),s(2),m("share",e)("galleryMode",o.galleryMode),s(2),O("font-size",o.galleryMode.textSize,"px"),s(),w(e.name)}}function ym(i,n){if(i&1){let e=y();a(0,"div",13)(1,"app-virtual-scroll",18),b(2,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(3,"div",19),k(4,vm,10,18,"div",20,f1),l()()()}if(i&2){let e=c();s(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",E(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),s(3),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function bm(i,n){if(i&1&&f(0,"fa-icon",37),i&2){let e=c(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function wm(i,n){if(i&1){let e=y();a(0,"th",36),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.sortBy(o.key))}),d(1),g(2,bm,1,2,"fa-icon",37),l()}if(i&2){let e=c().$implicit,t=c(2);V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function Tm(i,n){if(i&1&&g(0,wm,3,10,"th",35),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function Em(i,n){if(i&1){let e=y();a(0,"div",40)(1,"img",43),_("error",function(){h(e);let o=c(3).$implicit;return C(o.fallBackMimeUrl())}),l(),a(2,"div",44)(3,"span",29),d(4),l(),a(5,"span",45),d(6),l()()()}if(i&2){let e=c(3).$implicit;s(),m("src",e.mimeUrl,ee),s(3),w(e.name),s(2),w(e.description)}}function Mm(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c(4).$implicit;s(),w(e.link.email||"")}}function Am(i,n){if(i&1&&(a(0,"span",41)(1,"span"),d(2),l(),g(3,Mm,2,1,"span"),l()),i&2){let e=c(3).$implicit;s(2),w(e.link.name),s(),x(e.link.email?3:-1)}}function km(i,n){if(i&1&&f(0,"app-share-repository",42),i&2){let e=c(3).$implicit;m("share",e)}}function Dm(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c(4).$implicit;V(X("badge rounded-pill ",e.link.nbAccess>=e.link.limitAccess?"bg-danger":"bg-success")),s(),Ie(" ",e.link.nbAccess,"/",e.link.limitAccess," ")}}function Fm(i,n){if(i&1&&(a(0,"span",47),d(1),l()),i&2){let e=c(4).$implicit;s(),w(e.link.nbAccess)}}function Lm(i,n){if(i&1&&(a(0,"span",49),d(1),b(2,"translate"),l()),i&2){let e=c(5).$implicit,t=c(2);s(),Ie("",e.hTimeExpirationAgo,"\xA0",E(2,2,e.hTimeExpirationAgo===1?"day":"days",t.locale.language))}}function Pm(i,n){if(i&1&&(a(0,"span"),f(1,"fa-icon",37),g(2,Lm,3,5,"span",49),l()),i&2){let e=c(4).$implicit,t=c(2);V(X("badge rounded-pill bg-",e.hTimeExpirationAgo>=1?"warning":"danger"," ms-1")),s(),m("icon",t.icons.faClock)("fixedWidth",!1),s(),x(e.hTimeExpirationAgo>=1?2:-1)}}function Nm(i,n){if(i&1&&(a(0,"span",48),f(1,"fa-icon",6),l()),i&2){let e=c(6);s(),m("icon",e.icons.faLock)}}function Im(i,n){if(i&1&&(g(0,Dm,2,5,"span",46)(1,Fm,2,1,"span",47),g(2,Pm,3,6,"span",46),g(3,Nm,2,1,"span",48)),i&2){let e=c(3).$implicit;x(e.link.limitAccess?0:1),s(2),x(e.link.expiresAt?2:-1),s(),x(e.link.requireAuth?3:-1)}}function Rm(i,n){if(i&1&&f(0,"app-file-permissions",50),i&2){let e=c(4).$implicit;m("permissions",e.hPerms)}}function Vm(i,n){if(i&1&&g(0,Rm,1,1,"app-file-permissions",50),i&2){let e=c(3).$implicit;x(e.link.permissions?0:-1)}}function zm(i,n){if(i&1&&d(0),i&2){let e=c(4).$implicit;A(" ",e.hTimeAccessAgo," ")}}function Om(i,n){i&1&&(a(0,"span",51),d(1,"never"),l())}function Bm(i,n){if(i&1&&g(0,zm,1,1)(1,Om,2,0,"span",51),i&2){let e=c(3).$implicit;x(e.link.currentAccess?0:1)}}function Um(i,n){if(i&1&&(a(0,"td"),g(1,Em,7,3,"div",40)(2,Am,4,2,"span",41)(3,km,1,1,"app-share-repository",42)(4,Im,4,3)(5,Vm,1,1)(6,Bm,2,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly!==void 0?"props-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="link"?2:e==="from"?3:e==="info"?4:e==="permissions"?5:e==="accessed"?6:-1)}}function Hm(i,n){if(i&1&&g(0,Um,7,9,"td",39),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function $m(i,n){if(i&1){let e=y();a(0,"tr",38),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){h(e);let o=c(2);return C(o.openLinkDialog())}),k(1,Hm,1,1,null,null,_1),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);z("selected",e.id===(t.selected==null?null:t.selected.id))("disabled",!e.link.isActive),s(),D(E(3,4,t.tableHeaders,t.originalOrderKeyValue))}}function Gm(i,n){if(i&1){let e=y();a(0,"table",31)(1,"thead")(2,"tr"),k(3,Tm,1,1,null,null,_1),b(5,"keyvalue"),l()()(),a(6,"app-virtual-scroll",32),b(7,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(8,"table",31)(9,"tbody",33),k(10,$m,4,7,"tr",34,f1),l()()()}if(i&2){let e=c();s(3),D(E(5,2,e.tableHeaders,e.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",E(7,5,e.shares,e.inputFilter.search())),s(4),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Wm(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Refresh"),l()),i&2){let e=c();s(),m("icon",e.icons.faArrowRotateRight)}}function qm(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Go to"),l()),i&2){let e=c();s(),m("icon",e.icons.faMapMarkerAlt)}}function jm(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Edit link"),l()),i&2){let e=c();s(),m("icon",e.icons.faPen)}}function Km(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Copy link"),l()),i&2){let e=c();s(),m("icon",e.icons.faClipboard)}}function Qm(i,n){}function Ym(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Info"),l()),i&2){let e=c();s(),m("icon",e.icons.faCircleInfo)}}var h1=(()=>{let n=class n{constructor(){this.locale=S(H),this.layout=S(N),this.icons={faLink:Zo,faArrowRotateRight:ut,faArrowDown:ft,faArrowUp:dt,faMapMarkerAlt:ar,faPen:mt,faEllipsisH:Uo,faClock:vl,faLock:ni,faClipboard:bl,faClipboardCheck:Go,faCircleInfo:It},this.originalOrderKeyValue=Fe,this.TAB_MENU=_e,this.loading=!1,this.linkWasCopied=!1,this.shares=[],this.selected=null,this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},link:{label:"Link",width:15,textCenter:!1,class:"d-none d-sm-table-cell",show:!0,sortable:!0},from:{label:"Shared from",width:15,textCenter:!1,class:"d-none d-md-table-cell",show:!0},info:{label:"Info",width:15,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},accessed:{label:"Accessed",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",link:"Link",accessed:"Accessed"},this.activatedRoute=S(ei),this.store=S(te),this.linksService=S(pi),this.sharesService=S(ci),this.sortSettings={default:[{prop:"name",type:"string"}],link:[{prop:"link.name",type:"string"}],name:[{prop:"name",type:"string"}],info:[{prop:"link.nbAccess",type:"number"}],permissions:[{prop:"link.permissions",type:"length"}],accessed:[{prop:"link.currentAccess",type:"date"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.loadShareLinks(),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select),this.layout.setBreadcrumbIcon(this.icons.faLink),this.layout.setBreadcrumbNav({url:`/${$.LINKS}/${Ot.SHARED_BY_LINKS}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShareLinks(){this.loading=!0,this.onSelect(),this.linksService.shareLinksList().subscribe({next:t=>{this.sortBy(this.sortTable.sortParam.column,!1,t),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Links",t.error.message)}})}sortBy(t,o=!0,r){this.shares=this.sortTable.sortBy(t,o,r||this.shares)}onSelect(t=null){this.selected=t,this.store.linkSelection.set(this.selected)}openLinkDialog(){this.linksService.shareLink(this.selected.id).subscribe(t=>{this.layout.openDialog(Nn,"md",{initialState:{share:t}}).content.shareChange.pipe(ce(1)).subscribe(r=>{let[p,u]=r;p==="update"?this.selected=Object.assign(this.selected,u):p==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(v=>v.id!==u.id)))})})}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}copyToClipboard(){this.selected&&(this.linksService.copyLinkToClipboard(this.selected.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.selected.file.name||this.selected.name),setTimeout(()=>this.linkWasCopied=!1,3e3))}goTo(t){t=t||this.selected,this.sharesService.goTo(t).catch(console.error)}focusOn(t){let o=this.shares.find(r=>r.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-shared-links"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(lt,7),Y(gm,7),Y(xm,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.btnNavigationView=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.targetContextMenu=p.first)}},decls:33,vars:36,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["container","body","type","button",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary",3,"click","disabled","tooltip"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","disabled","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[3,"share","galleryMode"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected","disabled"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"d-flex","flex-column"],[3,"share"],["alt","","draggable","false","height","30","width","30",3,"error","src"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"badge","rounded-pill","bg-gray-dark","ms-1"],[1,"ms-2"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"button",3),b(2,"translate"),_("click",function(){return h(p),C(r.loadShareLinks())}),f(3,"fa-icon",4),l(),a(4,"button",5),b(5,"translate"),_("click",function(){return h(p),C(r.openLinkDialog())}),f(6,"fa-icon",6),l(),a(7,"button",7),b(8,"translate"),_("click",function(){return h(p),C(r.copyToClipboard())}),f(9,"fa-icon",6),l(),a(10,"button",8),b(11,"translate"),_("click",function(){return h(p),C(r.goTo())}),f(12,"fa-icon",6),l(),a(13,"div",9)(14,"div",10),f(15,"app-input-filter",11),l(),a(16,"app-navigation-view",12),_("sortBy",function(v){return h(p),C(r.sortBy(v))})("switchView",function(v){return h(p),C(r.galleryMode=v)}),l()()(),g(17,ym,6,8,"div",13)(18,Gm,12,8),a(19,"div",14)(20,"span",15),d(21),b(22,"translate"),l()(),a(23,"context-menu",null,0),L(25,Wm,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.loadShareLinks())}),l(),a(26,"context-menu",null,1),L(28,qm,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.goTo())}),L(29,jm,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.openLinkDialog())}),L(30,Km,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.copyToClipboard())}),L(31,Qm,0,0,"ng-template",17)(32,Ym,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.layout.showRSideBarTab(r.TAB_MENU.SELECTION))}),l()}o&2&&(s(),m("tooltip",E(2,21,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faArrowRotateRight)("animation",r.loading?"spin":null),s(),m("disabled",!r.selected)("tooltip",E(5,24,"Edit link",r.locale.language)),s(2),m("icon",r.icons.faPen),s(),V(X("btn btn-sm me-1 ",r.linkWasCopied?"btn-info":"btn-secondary")),m("disabled",!r.selected)("tooltip",E(8,27,"Copy link",r.locale.language)),s(2),m("icon",r.linkWasCopied?r.icons.faClipboardCheck:r.icons.faClipboard),s(),m("disabled",!r.selected)("tooltip",E(11,30,"Go to",r.locale.language)),s(2),m("icon",r.icons.faMapMarkerAlt),s(4),m("sortParams",r.sortTable.sortParam)("sortFields",r.btnSortFields),s(),x(r.galleryMode!=null&&r.galleryMode.enabled?17:18),s(4),Ie("",r.shares.length," ",E(22,33,"shares",r.locale.language)),s(10),m("divider",!0))},dependencies:[zt,Vt,Rt,F,P,lt,Ke,ke,Ve,Xe,si,vt,nt,Ae,Z,Ct],encapsulation:2});let i=n;return i})();var Yr=class{constructor(n){this.syncs=[],this.newly=0,Object.assign(this,n),Ic(this),this.hTimeAgo=ri(this.createdAt).fromNow(!0),this.newly=Mn(this.createdAt)}fallBackMimeUrl(){this.mimeUrl=Pn}};var Xr=(()=>{let n=class n{transform(t,o=0,r=void 0){return En(t,o,r)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275pipe=cn({name:"pathSlice",type:n,pure:!0});let i=n;return i})();var Xm=i=>({$implicit:i});function Zm(i,n){i&1&&(a(0,"span"),d(1,"loading..."),l())}var Jm=["*"];function e2(i,n){if(i&1){let e=y();qi(0,"span",2),Xn("click",function(o){h(e);let r=c();return C(r.node().mouseAction("expanderClick",o))}),ga(1,"span",3),ji()}if(i&2){let e=c();z("toggle-children-wrapper-expanded",e.node().isExpanded)("toggle-children-wrapper-collapsed",e.node().isCollapsed)}}function t2(i,n){i&1&&ga(0,"span",1)}var i2=(i,n,e)=>({$implicit:i,node:n,index:e});function n2(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c();s(),w(e.node().displayField)}}var b1=(i,n,e,t)=>({$implicit:i,node:n,index:e,templates:t});function o2(i,n){if(i&1&&f(0,"tree-node-checkbox",3),i&2){let e=c(2);m("node",e.node())}}function r2(i,n){if(i&1){let e=y();a(0,"div",2),g(1,o2,1,1,"tree-node-checkbox",3),f(2,"tree-node-expander",3),a(3,"div",4),_("click",function(o){h(e);let r=c();return C(r.node().mouseAction("click",o))})("dblclick",function(o){h(e);let r=c();return C(r.node().mouseAction("dblClick",o))})("mouseover",function(o){h(e);let r=c();return C(r.node().mouseAction("mouseOver",o))})("mouseout",function(o){h(e);let r=c();return C(r.node().mouseAction("mouseOut",o))})("contextmenu",function(o){h(e);let r=c();return C(r.node().mouseAction("contextMenu",o))})("treeDrop",function(o){h(e);let r=c();return C(r.node().onDrop(o))})("treeDropDragOver",function(o){h(e);let r=c();return C(r.node().mouseAction("dragOver",o))})("treeDropDragLeave",function(o){h(e);let r=c();return C(r.node().mouseAction("dragLeave",o))})("treeDropDragEnter",function(o){h(e);let r=c();return C(r.node().mouseAction("dragEnter",o))}),f(4,"tree-node-content",5),l()()}if(i&2){let e=c();O("padding-left",e.node().getNodePadding()),s(),x(e.node().options.useCheckbox?1:-1),s(),m("node",e.node()),s(),z("node-content-wrapper-active",e.node().isActive)("node-content-wrapper-focused",e.node().isFocused),m("treeAllowDrop",e.node().allowDrop)("allowDragoverStyling",e.node().allowDragoverStyling())("treeDrag",e.node())("treeDragEnabled",e.node().allowDrag()),s(),m("node",e.node())("index",e.index())("template",e.templates().treeNodeTemplate)}}function a2(i,n){if(i&1&&f(0,"tree-node-collection",1),i&2){let e=c(2);m("nodes",e.children())("templates",e.templates())("treeModel",e.node().treeModel)}}function s2(i,n){if(i&1&&f(0,"tree-loading-component",3),i&2){let e=c(2);O("padding-left",e.node().getNodePadding()),m("template",e.templates().loadingTemplate)("node",e.node())}}function l2(i,n){if(i&1&&(a(0,"div"),g(1,a2,1,3,"tree-node-collection",1),g(2,s2,1,4,"tree-loading-component",2),l()),i&2){let e=c();z("tree-children",!0)("tree-children-no-padding",e.node().options.levelPadding),s(),x(e.children()?1:-1),s(),x(e.children()?-1:2)}}function c2(i,n){if(i&1&&f(0,"tree-node",0),i&2){let e=n.$implicit,t=n.$index,o=c();m("node",e)("index",t)("templates",o.templates())}}function p2(i,n){if(i&1&&f(0,"tree-node-drop-slot",2),i&2){let e=c(2);m("dropIndex",e.node().index)("node",e.node().parent)}}function d2(i,n){if(i&1&&(a(0,"div"),g(1,p2,1,2,"tree-node-drop-slot",2),f(2,"tree-node-wrapper",3)(3,"tree-node-children",4)(4,"tree-node-drop-slot",2),l()),i&2){let e=c();V(e.node().getClass()),z("tree-node",!0)("tree-node-expanded",e.node().isExpanded&&e.node().hasChildren)("tree-node-collapsed",e.node().isCollapsed&&e.node().hasChildren)("tree-node-leaf",e.node().isLeaf)("tree-node-active",e.node().isActive)("tree-node-focused",e.node().isFocused),s(),x(e.index()===0?1:-1),s(),m("node",e.node())("index",e.index())("templates",e.templates()),s(),m("node",e.node())("templates",e.templates()),s(),m("dropIndex",e.node().index+1)("node",e.node().parent)}}var m2=["loadingTemplate"],u2=["treeNodeTemplate"],f2=["treeNodeWrapperTemplate"],_2=["treeNodeFullTemplate"],h2=["viewport"],C2=(i,n,e,t)=>({loadingTemplate:i,treeNodeTemplate:n,treeNodeWrapperTemplate:e,treeNodeFullTemplate:t});function g2(i,n){if(i&1&&f(0,"tree-node-collection",4),i&2){let e=c();m("nodes",e.treeModel.roots)("treeModel",e.treeModel)("templates",Po(3,C2,e.loadingTemplate,e.treeNodeTemplate,e.treeNodeWrapperTemplate,e.treeNodeFullTemplate))}}function x2(i,n){if(i&1&&f(0,"tree-node-drop-slot",5),i&2){let e=c();m("dropIndex",0)("node",e.treeModel.virtualRoot)}}var rt={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,CONTEXT_MENU:32},Pe={TOGGLE_ACTIVE:(i,n,e)=>n&&n.toggleActivated(),TOGGLE_ACTIVE_MULTI:(i,n,e)=>n&&n.toggleActivated(!0),TOGGLE_SELECTED:(i,n,e)=>n&&n.toggleSelected(),ACTIVATE:(i,n,e)=>n.setIsActive(!0),DEACTIVATE:(i,n,e)=>n.setIsActive(!1),SELECT:(i,n,e)=>n.setIsSelected(!0),DESELECT:(i,n,e)=>n.setIsSelected(!1),FOCUS:(i,n,e)=>n.focus(),TOGGLE_EXPANDED:(i,n,e)=>n.hasChildren&&n.toggleExpanded(),EXPAND:(i,n,e)=>n.expand(),COLLAPSE:(i,n,e)=>n.collapse(),DRILL_DOWN:(i,n,e)=>i.focusDrillDown(),DRILL_UP:(i,n,e)=>i.focusDrillUp(),NEXT_NODE:(i,n,e)=>i.focusNextNode(),PREVIOUS_NODE:(i,n,e)=>i.focusPreviousNode(),MOVE_NODE:(i,n,e,{from:t,to:o})=>{e.ctrlKey?i.copyNode(t,o):i.moveNode(t,o)}},Hn={mouse:{click:Pe.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:Pe.TOGGLE_EXPANDED,checkboxClick:Pe.TOGGLE_SELECTED,drop:Pe.MOVE_NODE},keys:{[rt.RIGHT]:Pe.DRILL_DOWN,[rt.LEFT]:Pe.DRILL_UP,[rt.DOWN]:Pe.NEXT_NODE,[rt.UP]:Pe.PREVIOUS_NODE,[rt.SPACE]:Pe.TOGGLE_ACTIVE,[rt.ENTER]:Pe.TOGGLE_ACTIVE}},Jr=class{get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return this.options.scrollOnActivate===void 0?!0:this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return this.options.useTriState===void 0?!0:this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return this.options.allowDragoverStyling===void 0?!0:this.options.allowDragoverStyling}constructor(n={}){this.options=n,this.actionMapping={mouse:{click:this.options?.actionMapping?.mouse?.click??Hn.mouse.click,dblClick:this.options?.actionMapping?.mouse?.dblClick??Hn.mouse.dblClick,contextMenu:this.options?.actionMapping?.mouse?.contextMenu??Hn.mouse.contextMenu,expanderClick:this.options?.actionMapping?.mouse?.expanderClick??Hn.mouse.expanderClick,checkboxClick:this.options?.actionMapping?.mouse?.checkboxClick??Hn.mouse.checkboxClick,drop:this.options?.actionMapping?.mouse?.drop??Hn.mouse.drop,dragStart:this.options?.actionMapping?.mouse?.dragStart??void 0,drag:this.options?.actionMapping?.mouse?.drag??void 0,dragEnd:this.options?.actionMapping?.mouse?.dragEnd??void 0,dragOver:this.options?.actionMapping?.mouse?.dragOver??void 0,dragLeave:this.options?.actionMapping?.mouse?.dragLeave??void 0,dragEnter:this.options?.actionMapping?.mouse?.dragEnter??void 0,mouseOver:this.options?.actionMapping?.mouse?.mouseOver??void 0,mouseOut:this.options?.actionMapping?.mouse?.mouseOut??void 0},keys:{[rt.RIGHT]:Pe.DRILL_DOWN,[rt.LEFT]:Pe.DRILL_UP,[rt.DOWN]:Pe.NEXT_NODE,[rt.UP]:Pe.PREVIOUS_NODE,[rt.SPACE]:Pe.TOGGLE_ACTIVE,[rt.ENTER]:Pe.TOGGLE_ACTIVE}},this.options?.actionMapping?.keys&&(this.actionMapping.keys=re(re({},this.actionMapping.keys),this.options.actionMapping.keys)),n.rtl&&(this.actionMapping.keys[rt.RIGHT]=n.actionMapping?.keys[rt.RIGHT]||Pe.DRILL_UP,this.actionMapping.keys[rt.LEFT]=n.actionMapping?.keys[rt.LEFT]||Pe.DRILL_DOWN)}getNodeClone(n){if(this.options.getNodeClone)return this.options.getNodeClone(n);let e=Object.assign({},n.data);return e.id&&delete e.id,e}allowDrop(n,e,t){return this.options.allowDrop instanceof Function?this.options.allowDrop(n,e,t):this.options.allowDrop===void 0?!0:this.options.allowDrop}allowDrag(n){return this.options.allowDrag instanceof Function?this.options.allowDrag(n):this.options.allowDrag}nodeClass(n){return this.options.nodeClass?this.options.nodeClass(n):""}nodeHeight(n){if(n.data.virtual)return 0;let e=this.options.nodeHeight||22;return typeof e=="function"&&(e=e(n)),e+(n.index===0?2:1)*this.dropSlotHeight}get dropSlotHeight(){return typeof this.options.dropSlotHeight=="number"?this.options.dropSlotHeight:2}},Oe={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"},rs=class i{get children(){return this._children()}set children(n){this._children.set(n)}get index(){return this._index()}set index(n){this._index.set(n)}get position(){return this._position()}set position(n){this._position.set(n)}get height(){return this._height()}set height(n){this._height.set(n)}get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children?.some(n=>n.isSelected)}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children?.every(n=>n.isAllSelected)}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw`Element Ref is no longer supported since introducing virtual scroll
|
|
2
|
+
|
|
3
|
+
You may use a template to obtain a reference to the element`}get originalNode(){return this._originalNode}constructor(n,e,t,o){this.data=n,this.parent=e,this.treeModel=t,this._isLoadingChildren=!1,this._children=it(void 0),this._index=it(void 0),this._position=it(0),this._height=it(void 0),this.allowDrop=(r,p)=>this.options.allowDrop(r,{parent:this,index:0},p),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,(this.id===void 0||this.id===null)&&(this.id=S2()),this.index=o,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(n){this.treeModel.fireEvent(n)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(n){this.setField("id",n)}getField(n){return this.data[this.options[`${n}Field`]]}setField(n,e){this.data[this.options[`${n}Field`]]=e}_findAdjacentSibling(n,e=!1){let t=this._getParentsChildren(e),o=t.indexOf(this);return t.length>o+n?t[o+n]:null}findNextSibling(n=!1){return this._findAdjacentSibling(1,n)}findPreviousSibling(n=!1){return this._findAdjacentSibling(-1,n)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(n=>!n.isHidden)}getFirstChild(n=!1){let e=n?this.visibleChildren:this.children;return e!=null&&e.length?e[0]:null}getLastChild(n=!1){let e=n?this.visibleChildren:this.children;return e!=null&&e.length?e[e.length-1]:null}findNextNode(n=!0,e=!1){return n&&this.isExpanded&&this.getFirstChild(e)||this.findNextSibling(e)||this.parent&&this.parent.findNextNode(!1,e)}findPreviousNode(n=!1){let e=this.findPreviousSibling(n);return e?e._getLastOpenDescendant(n):this.realParent}_getLastOpenDescendant(n=!1){let e=this.getLastChild(n);return this.isCollapsed||!e?this:e._getLastOpenDescendant(n)}_getParentsChildren(n=!1){return this.parent&&(n?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(n=!1){return this._getParentsChildren(n).indexOf(this)}isDescendantOf(n){return this===n?!0:this.parent&&this.parent.isDescendantOf(n)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),`tree-node-level-${this.level}`].join(" ")}onDrop(n){this.mouseAction("drop",n.event,{from:n.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(n=>{n&&(this.setField("children",n),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(e=>{e.getField("isExpanded")&&e.hasChildren&&e.expand()}))}).then(()=>{this.fireEvent({eventName:Oe.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(n){Promise.resolve(n(this)).then(()=>{this.children&&this.children.forEach(e=>e.doForAll(n))})}expandAll(){this.doForAll(n=>n.expand())}collapseAll(){this.doForAll(n=>n.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(n){return this.hasChildren&&(this.treeModel.setExpandedNode(this,n),n&&!this.children&&this.hasChildren&&!this._isLoadingChildren&&(this._isLoadingChildren=!0,this.loadNodeChildren().finally(()=>{this._isLoadingChildren=!1}))),this}autoLoadChildren(){this.isExpanded&&!this.children&&this.hasChildren&&this.loadNodeChildren()}dispose(){this.children&&this.children.forEach(n=>n.dispose()),this.parent=null,this.children=null}setIsActive(n,e=!1){return this.treeModel.setActiveNode(this,n,e),n&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(n){return this.isSelectable()?this.treeModel.setSelectedNode(this,n):this.visibleChildren.forEach(e=>e.setIsSelected(n)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(n=!1){return this.setIsActive(!this.isActive,n),this}setActiveAndVisible(n=!1){return this.setIsActive(!0,n).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(n=!1){this.treeModel.virtualScroll.scrollIntoView(this,n)}focus(n=!0){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),n&&this.scrollIntoView(),e&&this.fireEvent({eventName:Oe.blur,node:e}),this.fireEvent({eventName:Oe.focus,node:this}),this}blur(){let n=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),n&&this.fireEvent({eventName:Oe.blur,node:this}),this}setIsHidden(n){this.treeModel.setIsHidden(this,n)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(n,e,t=null){this.treeModel.setFocus(!0);let r=this.options.actionMapping.mouse[n];r&&r(this.treeModel,this,e,t)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((n,e)=>new i(n,this,this.treeModel,e))}};function S2(){return Math.floor(Math.random()*1e13)}var as=(()=>{let n=class n{constructor(){this.options=new Jr,this.eventNames=Object.keys(Oe),this._roots=it(void 0),this._expandedNodeIds=it({}),this._selectedLeafNodeIds=it({}),this._activeNodeIds=it({}),this._hiddenNodeIds=it({}),this._focusedNodeId=it(null),this._virtualRoot=it(void 0),this.firstUpdate=!0,this.subscriptions=[]}get roots(){return this._roots()}set roots(t){this._roots.set(t)}get virtualRoot(){return this._virtualRoot()}get focusedNode(){let t=this._focusedNodeId();return t?this.getNodeById(t):null}get expandedNodes(){let t=this._expandedNodeIds();return Object.keys(t).filter(r=>t[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get activeNodes(){let t=this._activeNodeIds();return Object.keys(t).filter(r=>t[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get hiddenNodes(){let t=this._hiddenNodeIds();return Object.keys(t).filter(r=>t[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get selectedLeafNodes(){let t=this._selectedLeafNodeIds();return Object.keys(t).filter(r=>t[r]).map(r=>this.getNodeById(r)).filter(Boolean)}fireEvent(t){t.treeModel=this,this.events[t.eventName].emit(t),this.events.event.emit(t)}subscribe(t,o){let r=this.events[t].subscribe(o);this.subscriptions.push(r)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this._virtualRoot()?.visibleChildren}getFirstRoot(t=!1){let o=t?this.getVisibleRoots():this.roots;return o!=null&&o.length?o[0]:null}getLastRoot(t=!1){let o=t?this.getVisibleRoots():this.roots;return o!=null&&o.length?o[o.length-1]:null}get isFocused(){return n.focusedTree===this}isNodeFocused(t){return this.focusedNode===t}isEmptyTree(){let t=this.roots;return t&&t.length===0}getNodeByPath(t,o=null){if(!t)return null;if(o=o||this._virtualRoot(),t.length===0)return o;if(!o.children)return null;let r=t.shift(),p=o.children.find(u=>u.id===r);return p?this.getNodeByPath(t,p):null}getNodeById(t){let o=t.toString();return this.getNodeBy(r=>r.id.toString()===o)}getNodeBy(t,o=null){if(o=o||this._virtualRoot(),!o.children)return null;let r=o.children.find(t);if(r)return r;for(let p of o.children){let u=this.getNodeBy(t,p);if(u)return u}}isExpanded(t){return this._expandedNodeIds()[t.id]}isHidden(t){return this._hiddenNodeIds()[t.id]}isActive(t){return this._activeNodeIds()[t.id]}isSelected(t){return this._selectedLeafNodeIds()[t.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){let t=this._virtualRoot();t&&t.dispose()}unsubscribeAll(){this.subscriptions.forEach(t=>t.unsubscribe()),this.subscriptions=[]}setData({nodes:t,options:o=null,events:r=null}){o&&(this.options=new Jr(o)),r&&(this.events=r),t&&(this.nodes=t),this.update()}update(){let t={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose();let o=new rs(t,null,this,0);this._virtualRoot.set(o),this.roots=o.children;let r=this.roots;this.firstUpdate?r&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:Oe.updateData})}setFocusedNode(t){this._focusedNodeId.set(t?t.id:null)}setFocus(t){n.focusedTree=t?this:null}doForAll(t){this.roots.forEach(o=>o.doForAll(t))}focusNextNode(){let t=this.getFocusedNode(),o=t?t.findNextNode(!0,!0):this.getFirstRoot(!0);o&&o.focus()}focusPreviousNode(){let t=this.getFocusedNode(),o=t?t.findPreviousNode(!0):this.getLastRoot(!0);o&&o.focus()}focusDrillDown(){let t=this.getFocusedNode();if(t&&t.isCollapsed&&t.hasChildren)t.toggleExpanded();else{let o=t?t.getFirstChild(!0):this.getFirstRoot(!0);o&&o.focus()}}focusDrillUp(){let t=this.getFocusedNode();if(t)if(t.isExpanded)t.toggleExpanded();else{let o=t.realParent;o&&o.focus()}}setActiveNode(t,o,r=!1){r?this._setActiveNodeMulti(t,o):this._setActiveNodeSingle(t,o),o?(t.focus(this.options.scrollOnActivate),this.fireEvent({eventName:Oe.activate,node:t}),this.fireEvent({eventName:Oe.nodeActivate,node:t})):(this.fireEvent({eventName:Oe.deactivate,node:t}),this.fireEvent({eventName:Oe.nodeDeactivate,node:t}))}setSelectedNode(t,o){this._selectedLeafNodeIds.update(r=>Se(re({},r),{[t.id]:o})),o?(t.focus(),this.fireEvent({eventName:Oe.select,node:t})):this.fireEvent({eventName:Oe.deselect,node:t})}setExpandedNode(t,o){this._expandedNodeIds.update(r=>Se(re({},r),{[t.id]:o})),this.fireEvent({eventName:Oe.toggleExpanded,node:t,isExpanded:o})}expandAll(){this.roots.forEach(t=>t.expandAll())}collapseAll(){this.roots.forEach(t=>t.collapseAll())}setIsHidden(t,o){this._hiddenNodeIds.update(r=>Se(re({},r),{[t.id]:o}))}setHiddenNodeIds(t){let o=t.reduce((r,p)=>Se(re({},r),{[p]:!0}),{});this._hiddenNodeIds.set(o)}performKeyAction(t,o){let r=this.options.actionMapping.keys[o.keyCode];return r?(o.preventDefault(),r(this,t,o),!0):!1}filterNodes(t,o=!0){let r;if(!t)return this.clearFilter();if(t&&typeof t.valueOf()=="string")r=u=>u.displayField.toLowerCase().indexOf(t.toLowerCase())!==-1;else if(t&&typeof t=="function")r=t;else{console.error("Don't know what to do with filter",t),console.error("Should be either a string or function");return}let p={};this.roots.forEach(u=>this._filterNode(p,u,r,o)),this._hiddenNodeIds.set(p),this.fireEvent({eventName:Oe.changeFilter})}clearFilter(){this._hiddenNodeIds.set({}),this.fireEvent({eventName:Oe.changeFilter})}moveNode(t,o){let r=t.getIndexInParent(),p=t.parent;if(!this.canMoveNode(t,o,r))return;let u=p.getField("children");o.parent.getField("children")||o.parent.setField("children",[]);let v=o.parent.getField("children"),T=u.splice(r,1)[0],I=p===o.parent&&o.index>r?o.index-1:o.index;v.splice(I,0,T),p.treeModel.update(),o.parent.treeModel!==p.treeModel&&o.parent.treeModel.update(),this.fireEvent({eventName:Oe.moveNode,node:T,to:{parent:o.parent.data,index:I},from:{parent:p.data,index:r}})}copyNode(t,o){let r=t.getIndexInParent();if(!this.canMoveNode(t,o,r))return;o.parent.getField("children")||o.parent.setField("children",[]);let p=o.parent.getField("children"),u=this.options.getNodeClone(t);p.splice(o.index,0,u),t.treeModel.update(),o.parent.treeModel!==t.treeModel&&o.parent.treeModel.update(),this.fireEvent({eventName:Oe.copyNode,node:u,to:{parent:o.parent.data,index:o.index}})}getState(){return{expandedNodeIds:this._expandedNodeIds(),selectedLeafNodeIds:this._selectedLeafNodeIds(),activeNodeIds:this._activeNodeIds(),hiddenNodeIds:this._hiddenNodeIds(),focusedNodeId:this._focusedNodeId()}}setState(t){t&&(this._expandedNodeIds.set(t.expandedNodeIds||{}),this._selectedLeafNodeIds.set(t.selectedLeafNodeIds||{}),this._activeNodeIds.set(t.activeNodeIds||{}),this._hiddenNodeIds.set(t.hiddenNodeIds||{}),this._focusedNodeId.set(t.focusedNodeId))}subscribeToState(t){Gt(()=>t(this.getState()))}canMoveNode(t,o,r=void 0){let p=r||t.getIndexInParent();return t.parent===o.parent&&r===o.index?!1:!o.parent.isDescendantOf(t)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(t,o,r,p){let u=r(o);return o.children&&o.children.forEach(v=>{this._filterNode(t,v,r,p)&&(u=!0)}),u||(t[o.id]=!0),p&&u&&o.ensureVisible(),u}_calculateExpandedNodes(t=null){t=t||this._virtualRoot(),t.data[this.options.isExpandedField]&&this._expandedNodeIds.update(o=>Se(re({},o),{[t.id]:!0})),t.children&&t.children.forEach(o=>this._calculateExpandedNodes(o))}_setActiveNodeSingle(t,o){this.activeNodes.filter(r=>r!==t).forEach(r=>{this.fireEvent({eventName:Oe.deactivate,node:r}),this.fireEvent({eventName:Oe.nodeDeactivate,node:r})}),o?this._activeNodeIds.set({[t.id]:!0}):this._activeNodeIds.set({})}_setActiveNodeMulti(t,o){this._activeNodeIds.update(r=>Se(re({},r),{[t.id]:o}))}};n.focusedTree=null,n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=kt({token:n,factory:n.\u0275fac});let i=n;return i})(),ss=(()=>{let n=class n{constructor(){this._draggedElement=null}set(t){this._draggedElement=t}get(){return this._draggedElement}isDragging(){return!!this.get()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=kt({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})(),C1=500,Zr=150,g1=(()=>{let n=class n{get yBlocks(){return this._yBlocks()}set yBlocks(t){this._yBlocks.set(t)}get x(){return this._x()}set x(t){this._x.set(t)}get viewportHeight(){return this._viewportHeight()}set viewportHeight(t){this._viewportHeight.set(t)}get y(){return this.yBlocks*Zr}get totalHeight(){let t=this.treeModel._virtualRoot();return t?t.height:0}constructor(){this.treeModel=S(as),this._dispose=[],this._yBlocks=it(0),this._x=it(0),this._viewportHeight=it(null),this.viewport=null;let t=this.treeModel;t.virtualScroll=this}fireEvent(t){this.treeModel.fireEvent(t)}init(){let t=this.recalcPositions.bind(this);t(),this.treeModel.subscribe(Oe.loadNodeChildren,t)}setupWatchers(t){let o=this.recalcPositions.bind(this),r=Gt(()=>{let T=this._yBlocks(),I=this.totalHeight,R=this._viewportHeight();this.fixScroll()},{injector:t}),p=Gt(()=>{let T=this.treeModel.roots;o()},{injector:t}),u=Gt(()=>{let T=this.treeModel.expandedNodes;o()},{injector:t}),v=Gt(()=>{let T=this.treeModel.hiddenNodes;o()},{injector:t});this._dispose=[()=>r.destroy(),()=>p.destroy(),()=>u.destroy(),()=>v.destroy()]}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(t){this.yBlocks=t}recalcPositions(){let t=this.treeModel._virtualRoot();t&&(t.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0))}_getPositionAfter(t,o){let r=o;return t.forEach(p=>{p.position=r,r=this._getPositionAfterNode(p,r)}),r}_getPositionAfterNode(t,o){let r=t.getSelfHeight()+o;return t.children&&t.isExpanded&&(r=this._getPositionAfter(t.visibleChildren,r)),t.height=r-o,r}clear(){this._dispose.forEach(t=>t())}setViewport(t){Object.assign(this,{viewport:t,x:t.scrollLeft,yBlocks:Math.round(t.scrollTop/Zr),viewportHeight:t.getBoundingClientRect?t.getBoundingClientRect().height:0})}scrollIntoView(t,o,r=!0){if(t.options.scrollContainer){let p=t.options.scrollContainer,u=p.getBoundingClientRect().height,v=p.getBoundingClientRect().top,T=this.viewport.getBoundingClientRect().top+t.position-v;(o||T<p.scrollTop||T+t.getSelfHeight()>p.scrollTop+u)&&(p.scrollTop=r?T-u/2:T)}else(o||t.position<this.y||t.position+t.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=r?t.position-this.viewportHeight/2:t.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/Zr)))}getViewportNodes(t){if(!t)return[];let o=t.filter(T=>!T.isHidden);if(!this.isEnabled())return o;if(!this.viewportHeight||!o.length)return[];let r=o.slice(-1)[0];if(!r.height&&r.position===0)return[];let p=x1(o,T=>T.position+C1>this.y||T.position+T.height>this.y),u=x1(o,T=>T.position-C1>this.y+this.viewportHeight,p),v=[];for(let T=p;T<=u;T++)v.push(o[T]);return v}fixScroll(){let t=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>t&&this._setYBlocks(t/Zr)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=kt({token:n,factory:n.\u0275fac});let i=n;return i})();function x1(i,n,e=0){let t=e,o=i.length-1;for(;t!==o;){let r=Math.floor((t+o)/2);n(i[r])?o=r:t===r?t=o:t=r}return t}var v2=(()=>{let n=class n{constructor(){this.template=se(void 0),this.node=se(void 0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-loading-component"]],inputs:{template:[1,"template"],node:[1,"node"]},decls:2,vars:5,consts:[[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,r){o&1&&(g(0,Zm,2,0,"span"),Ne(1,0)),o&2&&(x(r.template()?-1:0),s(),m("ngTemplateOutlet",r.template())("ngTemplateOutletContext",Re(3,Xm,r.node())))},dependencies:[Wt],encapsulation:2});let i=n;return i})(),y2=(()=>{let n=class n{constructor(){this.elementRef=S(Si),this.virtualScroll=S(g1),this.injector=S(Qn),this.setViewport=this.throttle(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init(),this.virtualScroll.setupWatchers(this.injector)}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:Oe.initialized})}),this.elementRef.nativeElement.addEventListener("scroll",this.scrollEventHandler)}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}throttle(t,o){let r=0;return function(){let p=Date.now();p-r>=o&&(t(),r=p)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-viewport"]],features:[Sa([g1])],ngContentSelectors:Jm,decls:2,vars:2,template:function(o,r){o&1&&(As(),qi(0,"div"),ks(1),ji()),o&2&&O("height",r.getTotalHeight())},encapsulation:2});let i=n;return i})(),S1="is-dragging-over",v1="is-dragging-over-disabled",w1=(()=>{let n=class n{allowDrop(t){return this._allowDrop(this.treeDraggedElement.get(),t)}constructor(){this.el=S(Si),this.renderer=S(pt),this.treeDraggedElement=S(ss),this.ngZone=S(Wi),this.allowDragoverStyling=se(!0),this.treeAllowDrop=se(void 0),this.onDropCallback=eo({alias:"treeDrop"}),this.onDragOverCallback=eo({alias:"treeDropDragOver"}),this.onDragLeaveCallback=eo({alias:"treeDropDragLeave"}),this.onDragEnterCallback=eo({alias:"treeDropDragEnter"}),this._allowDrop=(t,o)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this),Gt(()=>{let t=this.treeAllowDrop();t instanceof Function?this._allowDrop=t:t!==void 0&&(this._allowDrop=(o,r)=>t)})}ngAfterViewInit(){let t=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{t.addEventListener("dragover",this.dragOverEventHandler),t.addEventListener("dragenter",this.dragEnterEventHandler),t.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let t=this.el.nativeElement;t.removeEventListener("dragover",this.dragOverEventHandler),t.removeEventListener("dragenter",this.dragEnterEventHandler),t.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(t){if(!this.allowDrop(t))return this.allowDragoverStyling()?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:t,element:this.treeDraggedElement.get()}),t.preventDefault(),this.allowDragoverStyling()&&this.addClass()}onDragEnter(t){this.allowDrop(t)&&(t.preventDefault(),this.onDragEnterCallback.emit({event:t,element:this.treeDraggedElement.get()}))}onDragLeave(t){if(!this.allowDrop(t))return this.allowDragoverStyling()?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:t,element:this.treeDraggedElement.get()}),this.allowDragoverStyling()&&this.removeClass()}onDrop(t){this.allowDrop(t)&&(t.preventDefault(),this.onDropCallback.emit({event:t,element:this.treeDraggedElement.get()}),this.allowDragoverStyling()&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,S1)}removeClass(){this.renderer.removeClass(this.el.nativeElement,S1)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,v1)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,v1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=yi({type:n,selectors:[["","treeDrop",""]],hostBindings:function(o,r){o&1&&_("drop",function(u){return r.onDrop(u)})},inputs:{allowDragoverStyling:[1,"allowDragoverStyling"],treeAllowDrop:[1,"treeAllowDrop"]},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}});let i=n;return i})(),T1=(()=>{let n=class n{constructor(){this.node=se(void 0),this.dropIndex=se(void 0)}onDrop(t){this.node().mouseAction("drop",t.event,{from:t.element,to:{parent:this.node(),index:this.dropIndex()}})}allowDrop(t,o){return this.node().options.allowDrop(t,{parent:this.node(),index:this.dropIndex()},o)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:[1,"node"],dropIndex:[1,"dropIndex"]},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeDrop","treeAllowDrop","allowDragoverStyling"]],template:function(o,r){o&1&&(a(0,"div",0),_("treeDrop",function(u){return r.onDrop(u)}),l()),o&2&&m("treeAllowDrop",r.allowDrop.bind(r))("allowDragoverStyling",!0)},dependencies:[w1],encapsulation:2});let i=n;return i})(),b2=(()=>{let n=class n{constructor(){this.node=se(void 0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-checkbox"]],inputs:{node:[1,"node"]},decls:1,vars:2,consts:[["type","checkbox",1,"tree-node-checkbox",3,"click","checked","indeterminate"]],template:function(o,r){o&1&&(qi(0,"input",0),Xn("click",function(u){return r.node().mouseAction("checkboxClick",u)}),ji()),o&2&&Lo("checked",r.node().isSelected)("indeterminate",r.node().isPartiallySelected)},encapsulation:2});let i=n;return i})(),ls=(()=>{let n=class n{constructor(){this.node=se(),this.hasChildren=ve(()=>this.node().hasChildren)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-expander"]],inputs:{node:[1,"node"]},decls:2,vars:2,consts:[[1,"toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed"],[1,"toggle-children-placeholder"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"]],template:function(o,r){o&1&&(g(0,e2,2,4,"span",0),g(1,t2,1,0,"span",1)),o&2&&(x(r.hasChildren()?0:-1),s(),x(r.hasChildren()?-1:1))},encapsulation:2});let i=n;return i})();var w2=(()=>{let n=class n{constructor(){this.el=S(Si),this.renderer=S(pt),this.treeDraggedElement=S(ss),this.ngZone=S(Wi),this.draggedElement=se(void 0,{alias:"treeDrag"}),this.treeDragEnabled=se(void 0),this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let t=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{t.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled()?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(t){t.dataTransfer.setData("text",t.target.id);let o=this.draggedElement();this.treeDraggedElement.set(o),o.mouseAction&&o.mouseAction("dragStart",t)}onDrag(t){let o=this.draggedElement();o.mouseAction&&o.mouseAction("drag",t)}onDragEnd(){let t=this.draggedElement();t.mouseAction&&t.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=yi({type:n,selectors:[["","treeDrag",""]],hostBindings:function(o,r){o&1&&_("dragstart",function(u){return r.onDragStart(u)})("dragend",function(){return r.onDragEnd()})},inputs:{draggedElement:[1,"treeDrag","draggedElement"],treeDragEnabled:[1,"treeDragEnabled"]}});let i=n;return i})(),cs=(()=>{let n=class n{constructor(){this.node=se(void 0),this.index=se(void 0),this.template=se(void 0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-content"]],inputs:{node:[1,"node"],index:[1,"index"],template:[1,"template"]},decls:2,vars:7,consts:[[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(o,r){o&1&&(g(0,n2,2,1,"span"),Ne(1,0)),o&2&&(x(r.template()?-1:0),s(),m("ngTemplateOutlet",r.template())("ngTemplateOutletContext",Ps(3,i2,r.node(),r.node(),r.index())))},dependencies:[Wt],encapsulation:2});let i=n;return i})(),T2=(()=>{let n=class n{constructor(){this.node=se(),this.index=se(void 0),this.templates=se(),this.treeNodeWrapperTemplate=ve(()=>this.templates().treeNodeWrapperTemplate)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-wrapper"]],inputs:{node:[1,"node"],index:[1,"index"],templates:[1,"templates"]},decls:2,vars:8,consts:[[1,"node-wrapper",3,"padding-left"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node"],[1,"node-content-wrapper",3,"click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter","treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled"],[3,"node","index","template"]],template:function(o,r){o&1&&(g(0,r2,5,15,"div",0),Ne(1,1)),o&2&&(x(r.treeNodeWrapperTemplate()?-1:0),s(),m("ngTemplateOutlet",r.treeNodeWrapperTemplate())("ngTemplateOutletContext",Po(3,b1,r.node(),r.node(),r.index(),r.templates())))},dependencies:[b2,ls,w2,w1,cs,Wt],encapsulation:2});let i=n;return i})(),y1=1.005,E2=(()=>{let n=class n{constructor(){this.renderer=S(pt),this.templateRef=S(Ts),this.viewContainerRef=S(Ms),this.isOpen=se(void 0,{alias:"treeAnimateOpen"}),this.animateSpeed=se(void 0,{alias:"treeAnimateOpenSpeed"}),this.animateAcceleration=se(void 0,{alias:"treeAnimateOpenAcceleration"}),this.isEnabled=se(void 0,{alias:"treeAnimateOpenEnabled"}),Gt(()=>{let t=this.isOpen();t?(this._show(),this.isEnabled()&&this.previousIsOpen===!1&&this._animateOpen()):this.isEnabled()?this._animateClose():this._hide(),this.previousIsOpen=!!t})}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let t=this.animateSpeed(),o=this.animateAcceleration(),r=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{let p=setInterval(()=>{if(!this.isOpen()||!this.innerElement)return clearInterval(p);r+=t;let u=Math.round(r);this.renderer.setStyle(this.innerElement,"max-height",`${u}px`);let v=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;t*=o,o*=y1,v<u&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(p))},17)})}_animateClose(){if(!this.innerElement)return;let t=this.animateSpeed(),o=this.animateAcceleration(),r=this.innerElement.getBoundingClientRect().height,p=setInterval(()=>{if(this.isOpen()||!this.innerElement)return clearInterval(p);r-=t,this.renderer.setStyle(this.innerElement,"max-height",`${r}px`),t*=o,o*=y1,r<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(p))},17)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=yi({type:n,selectors:[["","treeAnimateOpen",""]],inputs:{isOpen:[1,"treeAnimateOpen","isOpen"],animateSpeed:[1,"treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:[1,"treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:[1,"treeAnimateOpenEnabled","isEnabled"]}});let i=n;return i})(),M2=(()=>{let n=class n{constructor(){this.node=se(),this.templates=se(void 0),this.children=ve(()=>this.node().children)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-children"]],inputs:{node:[1,"node"],templates:[1,"templates"]},decls:1,vars:4,consts:[[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"padding-left","template","node"],[1,"tree-node-loading",3,"template","node"]],template:function(o,r){o&1&&L(0,l2,3,6,"div",0),o&2&&m("treeAnimateOpen",r.node().isExpanded)("treeAnimateOpenSpeed",r.node().options.animateSpeed)("treeAnimateOpenAcceleration",r.node().options.animateAcceleration)("treeAnimateOpenEnabled",r.node().options.animateExpand)},dependencies:()=>[E2,E1,v2],encapsulation:2});let i=n;return i})(),E1=(()=>{let n=class n{constructor(){this.nodes=se(void 0),this.treeModel=se(void 0),this.injector=S(Qn),this.templates=se(void 0),this.viewportNodes=it([]),this.marginTop=ve(()=>{let t=this.viewportNodes(),o=t&&t.length&&t[0];return`${o&&o.parent?o.position-o.parent.position-o.parent.getSelfHeight():0}px`}),this._disposeEffects=[]}ngOnInit(){this.virtualScroll=this.treeModel().virtualScroll;let t=Gt(()=>{let o=this.nodes();if(o&&this.virtualScroll){let r=this.virtualScroll.getViewportNodes(o);this.viewportNodes.set(r)}},{injector:this.injector});this._disposeEffects=[()=>t.destroy()]}ngOnDestroy(){this._disposeEffects.forEach(t=>t())}trackNode(t,o){return o.id}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["tree-node-collection"]],inputs:{nodes:[1,"nodes"],treeModel:[1,"treeModel"],templates:[1,"templates"]},decls:3,vars:2,consts:[[3,"node","index","templates"]],template:function(o,r){o&1&&(a(0,"div"),k(1,c2,1,3,"tree-node",0,r.trackNode,!0),l()),o&2&&(O("margin-top",r.marginTop()),s(),D(r.viewportNodes()))},dependencies:()=>[A2],encapsulation:2});let i=n;return i})(),A2=(()=>{let n=class n{constructor(){this.node=se(void 0),this.index=se(void 0),this.templates=se(),this.treeNodeFullTemplate=ve(()=>this.templates().treeNodeFullTemplate)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["TreeNode"],["tree-node"]],inputs:{node:[1,"node"],index:[1,"index"],templates:[1,"templates"]},decls:2,vars:8,consts:[[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node"],[3,"node","index","templates"],[3,"node","templates"]],template:function(o,r){o&1&&(g(0,d2,5,22,"div",0),Ne(1,1)),o&2&&(x(r.treeNodeFullTemplate()?-1:0),s(),m("ngTemplateOutlet",r.treeNodeFullTemplate())("ngTemplateOutletContext",Po(3,b1,r.node(),r.node(),r.index(),r.templates())))},dependencies:[T1,T2,M2,Wt],encapsulation:2});let i=n;return i})(),M1=(()=>{let n=class n{set nodes(t){}set options(t){}set focused(t){this.treeModel.setFocus(t)}set state(t){this.treeModel.setState(t)}constructor(){this.treeModel=S(as),this.treeDraggedElement=S(ss);let t=this.treeModel;t.eventNames.forEach(o=>this[o]=new ae),t.subscribeToState(o=>this.stateChange.emit(o))}onKeydown(t){if(!this.treeModel.isFocused||["input","textarea"].includes(document.activeElement.tagName.toLowerCase()))return;let o=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(o,t)}onMousedown(t){function o(r,p){return r?r.localName===p?!1:o(r.parentElement,p):!0}o(t.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(t){(t.options||t.nodes)&&this.treeModel.setData({options:t.options&&t.options.currentValue,nodes:t.nodes&&t.nodes.currentValue,events:this.pick(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}pick(t,o){return o.reduce((r,p)=>(t&&t.hasOwnProperty(p)&&(r[p]=t[p]),r),{})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["Tree"],["tree-root"]],contentQueries:function(o,r,p){if(o&1&&(Zn(p,m2,5),Zn(p,u2,5),Zn(p,f2,5),Zn(p,_2,5)),o&2){let u;G(u=W())&&(r.loadingTemplate=u.first),G(u=W())&&(r.treeNodeTemplate=u.first),G(u=W())&&(r.treeNodeWrapperTemplate=u.first),G(u=W())&&(r.treeNodeFullTemplate=u.first)}},viewQuery:function(o,r){if(o&1&&Y(h2,5),o&2){let p;G(p=W())&&(r.viewportComponent=p.first)}},hostBindings:function(o,r){o&1&&_("keydown",function(u){return r.onKeydown(u)},ha)("mousedown",function(u){return r.onMousedown(u)},ha)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[Sa([as]),ln],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(o,r){o&1&&(a(0,"tree-viewport",null,0)(2,"div",1),L(3,g2,1,8,"tree-node-collection",2)(4,x2,1,2,"tree-node-drop-slot",3),l()()),o&2&&(s(2),z("node-dragging",r.treeDraggedElement.isDragging())("angular-tree-component-rtl",r.treeModel.options.rtl),s(),m("ngIf",r.treeModel.roots),s(),m("ngIf",r.treeModel.isEmptyTree()))},dependencies:[y2,zs,E1,T1],encapsulation:2});let i=n;return i})(),A1=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275mod=Ca({type:n}),n.\u0275inj=fa({imports:[Os]});let i=n;return i})();var D2=["tree"];function F2(i,n){if(i&1&&(a(0,"span",8),d(1),l()),i&2){let e=c(2);s(),w(e.errorMsg)}}function L2(i,n){i&1&&(a(0,"span",9),d(1,"Navigation Tree"),l())}function P2(i,n){if(i&1){let e=y();a(0,"div",3)(1,"button",6),_("click",function(){h(e);let o=c();return C(o.onRefresh())}),f(2,"fa-icon",7),l(),g(3,F2,2,1,"span",8)(4,L2,2,0,"span",9),l()}if(i&2){let e=c();s(2),m("icon",e.icons.faArrowRotateRight),s(),x(e.errorMsg?3:4)}}function N2(i,n){if(i&1&&(a(0,"span")(1,"span"),d(2),l()()),i&2){let e=c(2);s(2),w(e.store.filesSelection()[0].name)}}function I2(i,n){if(i&1&&(a(0,"span"),f(1,"fa-icon",18),l()),i&2){let e=c(2);s(),m("icon",e.icons.faQuestion)}}function R2(i,n){if(i&1&&(a(0,"span")(1,"span"),d(2),l(),d(3,"\xA0"),a(4,"span",9),d(5,"items"),l()()),i&2){let e=c(2);s(2),w(e.store.filesSelection().length)}}function V2(i,n){if(i&1){let e=y();a(0,"div",10)(1,"div",11)(2,"span",12)(3,"span",9),d(4,"Source"),l(),d(5,":"),l(),g(6,N2,3,1,"span")(7,I2,2,1,"span")(8,R2,6,1,"span"),l(),a(9,"div",13)(10,"span",12)(11,"span",9),d(12,"Destination"),l(),d(13,":"),l(),a(14,"span"),d(15),l()(),a(16,"div",14)(17,"button",15),_("click",function(){h(e);let o=c();return C(o.actionMove())}),f(18,"fa-icon",7),d(19," Move "),l(),a(20,"button",15),_("click",function(){h(e);let o=c();return C(o.actionCopy())}),f(21,"fa-icon",7),d(22," Copy "),l(),a(23,"button",16),_("click",function(){h(e);let o=c();return C(o.actionCancel())}),f(24,"fa-icon",7),d(25," Cancel "),l()()(),f(26,"hr",17)}if(i&2){let e,t=c();s(6),x((e=t.store.filesSelection().length)===1?6:e===0?7:8),s(9),w((t.selection==null?null:t.selection.data.name)||""),s(2),m("disabled",!t.selection||!t.store.filesSelection().length||!t.srcAllowed||!t.dstAllowed),s(),m("icon",t.icons.faArrowsAlt),s(2),m("disabled",!t.selection||!t.store.filesSelection().length||!t.dstAllowed),s(),m("icon",t.icons.faClone),s(3),m("icon",t.icons.faTimes)}}function z2(i,n){if(i&1){let e=y();a(0,"div",19),_("click",function(o){let r=h(e).$implicit;return C(r.mouseAction("click",o))})("appTap",function(o){let r=h(e).$implicit;return C(r.mouseAction("dblClick",o))}),f(1,"tree-node-expander",20),a(2,"div",21),f(3,"tree-node-content",22),l()()}if(i&2){let e=n.index,t=n.$implicit;O("padding-left",t.getNodePadding()),z("tree-selected",t.isActive)("tree-disabled",!t.data.enabled),s(),z("toggle-children-file",!t.data.isDir)("toggle-children-shared",t.data.inShare),m("node",t),s(),z("node-content-wrapper-active",t.isActive),s(),m("index",e)("node",t)}}function O2(i,n){if(i&1&&(a(0,"span"),f(1,"fa-icon",23),l()),i&2){let e=c();s(),m("icon",e.icons.faSpinner)}}var ea=(()=>{let n=class n{constructor(){this.selected=new ae,this.showFiles=!1,this.allowShares=!0,this.allowSpaces=!0,this.enableCopyMove=!0,this.enableNavigateTo=!0,this.sideBarHeader=!0,this.resizeOffset=80,this.toggleNodesAtStartup=!1,this.store=S(te),this.icons={faArrowRotateRight:ut,faArrowsAlt:ii,faClone:Sn,faTimes:Nt,faFolder:Ml,faFile:Bn,faQuestion:Oo,faAnglesRight:Ol,faSpinner:Ue},this.options={actionMapping:{mouse:{click:(t,o,r)=>this.onSelect(t,o,r),dblClick:(t,o)=>this.onOpen(o),expanderClick:()=>null}},animateExpand:!1,levelPadding:10,useVirtualScroll:!1,nodeHeight:30,dropSlotHeight:0,allowDrag:!1,allowDrop:!1,getChildren:t=>this.getTreeNode(t)},this.srcAllowed=!0,this.dstAllowed=!0,this.errorMsg=null,this.layout=S(N),this.router=S(ge),this.user=S(oe),this.filesService=S(He),this.copyMoveOnHeight=80,this.subscriptions=[],this.preventDblClick=!1,this._copyMoveOn=!1,this.enableCopyMove&&this.subscriptions.push(ui(this.store.filesSelection).subscribe(()=>this.checkAllowed(this.selection)))}get copyMoveOn(){return this._copyMoveOn}set copyMoveOn(t){this._copyMoveOn!==t&&(this._copyMoveOn=t,t?this.resizeOffset+=this.copyMoveOnHeight:this.resizeOffset-=this.copyMoveOnHeight,setTimeout(()=>this.layout.resizeEvent.next(),0))}get selection(){return this.filesService.treeNodeSelected}set selection(t){this.filesService.treeNodeSelected=t,t&&([0,-1,-2].indexOf(t.data.id)===-1?this.selected.emit(t.data):this.selected.emit(null))}ngOnInit(){this.enableCopyMove&&this.subscriptions.push(this.filesService.treeCopyMoveOn.subscribe(()=>this.onCopyMove())),this.initRoot(),setTimeout(()=>this.focusLastNode(),100)}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onRefresh(){this.tree.treeModel.activeNodes.length?this.tree.treeModel.activeNodes.forEach(t=>{t.loadNodeChildren().then(()=>this.tree.treeModel.update())}):(this.user.userHavePermission(_t.PERSONAL_SPACE)&&this.tree.treeModel.getNodeById(0).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.user.userHavePermission(_t.SPACES)&&this.tree.treeModel.getNodeById(-1).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.allowShares&&this.user.userHavePermission(_t.SHARES)&&this.tree.treeModel.getNodeById(-2).loadNodeChildren().then(()=>this.tree.treeModel.update()))}actionCancel(){this.copyMoveOn=!1,this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}actionCopy(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,ze.COPY),this.copyMoveOn=!1}actionMove(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,ze.MOVE),this.copyMoveOn=!1}initRoot(){if(this.nodes=[],this.user.userHavePermission(_t.PERSONAL_SPACE)){let t={id:0,name:this.layout.translateString(Ot.PERSONAL_FILES),path:`${$.FILES}/${ht.PERSONAL}`,isDir:!0,inShare:!1,mime:Ut,quotaIsExceeded:this.store.user.getValue().quotaIsExceeded,enabled:!0,permissions:tc,children:null,hasChildren:!0,isExpanded:!1};this.checkToggleNodeAtStartup(t,!0)}if(this.allowSpaces&&this.user.userHavePermission(_t.SPACES)){let t={id:-1,name:this.layout.translateString(Ot.SPACES),path:$.SPACES,isDir:!0,mime:Ut,inShare:!1,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(t)}if(this.allowShares&&this.user.userHavePermission(_t.SHARES)){let t={id:-2,name:this.layout.translateString(Ot.SHARES),path:$.SHARES,isDir:!0,mime:Ut,inShare:!0,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(t)}}checkToggleNodeAtStartup(t,o=!1){this.toggleNodesAtStartup?this.getTreeNode(t).then(r=>{t.children=r,o?this.nodes.unshift(t):this.nodes.push(t),this.tree.treeModel.update(),this.toggleExpand(this.tree,this.tree.treeModel.getNodeById(t.id),null)}):(o?this.nodes.unshift(t):this.nodes.push(t),this.tree.treeModel.update())}focusLastNode(){this.selection&&(this.selection=this.tree.treeModel.getNodeById(this.selection.data.id),this.selection&&Pe.ACTIVATE(this.tree,this.selection,null))}getTreeNode(t){return this.filesService.getTreeNode(t?.data?.path||t?.path||t,this.showFiles)}collapseChildren(t,o){for(let r of o)[0,-1,-2].indexOf(r.id)===-1&&r.id!==t.id&&(r.data.isExpanded=!1,r.collapse())}toggleExpand(t,o,r){Pe.TOGGLE_EXPANDED(t,o,r),o.data.isExpanded=!!o.data.isExpanded}onOpen(t){if(!this.copyMoveOn&&this.enableNavigateTo&&t.data.enabled){clearTimeout(this.preventTimer),this.preventDblClick=!0;let o=t.data.path.split("/");o[0]!==$.SPACES&&o.unshift($.SPACES),this.router.navigate(o).catch(console.error)}}onSelect(t,o,r){if(!o.data.enabled){this.layout.sendNotification("warning",o.data.name,`${o.data.inShare?"Share":"Space"} is disabled`);return}Pe.ACTIVATE(t,o,r),this.preventTimer=setTimeout(()=>{this.checkAllowed(o),this.selection=o,this.preventDblClick||o.hasChildren&&(this.collapseChildren(o,o.parent.children),this.toggleExpand(t,o,r)),this.preventDblClick=!1},200)}checkAllowed(t){if(this.copyMoveOn){if(this.store.filesSelection().length)for(let o of this.store.filesSelection()){if(o.root?.alias){this.errorMsg="You can not move an anchored file",this.srcAllowed=!1,this.dstAllowed=!0;return}if(o.lock&&o.lock.ownerLogin!==this.store.user.getValue().login){this.errorMsg="You can not move a locked file",this.srcAllowed=!1,this.dstAllowed=!0;return}}if(t){if([-1,-2].indexOf(t.data.id)>-1){this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!1;return}else if(t.data.permissions.indexOf(De.ADD)===-1){this.errorMsg="You are not allowed to write here",this.srcAllowed=!0,this.dstAllowed=!1;return}else if(t.data.quotaIsExceeded){this.errorMsg="No more space available",this.srcAllowed=!0,this.dstAllowed=!1;return}}this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}}onCopyMove(){this.onRefresh(),this.copyMoveOn=!0,this.checkAllowed(this.selection)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-tree"]],viewQuery:function(o,r){if(o&1&&Y(D2,7),o&2){let p;G(p=W())&&(r.tree=p.first)}},inputs:{showFiles:"showFiles",allowShares:"allowShares",allowSpaces:"allowSpaces",enableCopyMove:"enableCopyMove",enableNavigateTo:"enableNavigateTo",sideBarHeader:"sideBarHeader",resizeOffset:"resizeOffset",toggleNodesAtStartup:"toggleNodesAtStartup"},outputs:{selected:"selected"},decls:9,vars:7,consts:[["tree",""],["treeNodeWrapperTemplate",""],["loadingTemplate",""],[1,"sidebar-component-title"],["appAutoResize","",3,"overFlowX","resizeOffset","useMaxHeight"],[3,"nodes","options"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["l10nTranslate","",1,"text-danger","fs-xxs","p-2"],["l10nTranslate",""],[1,"px-2","pt-2","pb-0","fs-xs"],[1,"text-start","text-truncate"],["l10nTranslate","",1,"fs-xs","fw-bold","me-2"],[1,"text-start","text-truncate","mt-1"],[1,"d-flex","justify-content-between","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary",3,"click"],[1,"mx-0","mt-2","mb-0"],[1,"fw-bold","me-1",3,"icon"],[1,"node-wrapper",3,"click","appTap"],[3,"node"],[1,"node-content-wrapper"],[3,"index","node"],["animation","spin",1,"fw-bold",3,"icon"]],template:function(o,r){o&1&&(g(0,P2,5,2,"div",3),g(1,V2,27,7),a(2,"div",4)(3,"tree-root",5,0),L(5,z2,4,15,"ng-template",null,1,Ft)(7,O2,2,1,"ng-template",null,2,Ft),l()()),o&2&&(x(r.sideBarHeader?0:-1),s(),x(r.copyMoveOn?1:-1),s(),m("overFlowX","auto")("resizeOffset",r.resizeOffset)("useMaxHeight",!1),s(),m("nodes",r.nodes)("options",r.options))},dependencies:[fe,A1,M1,cs,ls,P,F,nt],encapsulation:2});let i=n;return i})();function B2(i,n){if(i&1&&(a(0,"span"),f(1,"fa-icon",10),d(2),b(3,"pathSlice"),l()),i&2){let e=c();s(),m("icon",e.selection.isDir?e.icons.faFolderClosed:e.icons.faFile),s(),A(" ",E(3,2,e.selection.path,-1)," ")}}function U2(i,n){i&1&&(a(0,"span",2),d(1,"Select a file"),l())}function H2(i,n){if(i&1&&(a(0,"span",7),d(1),l()),i&2){let e=c();s(),w(e.errorSelection)}}var $n=(()=>{let n=class n{constructor(){this.currentRoots=[],this.submitEvent=new ae,this.allowSpaces=!1,this.toggleNodesAtStartup=!0,this.mustHaveShareOutsidePermission=!1,this.layout=S(N),this.icons={faFile:Bn,faFolderClosed:Wr},this.errorSelection=null,this.selection=null}onSelect(t){if(t){if(this.mustHaveShareOutsidePermission){if(t.permissions.indexOf(De.SHARE_OUTSIDE)===-1){this.errorSelection=this.layout.translateString("You do not have share permission"),this.selection=null;return}if(t.path.split("/").length<=2){this.errorSelection=this.layout.translateString("You can not share a space"),this.selection=null;return}}let o=t,r=this.currentRoots.find(p=>p.file.id===o.id);r?(this.errorSelection=this.layout.translateString("This item is already selected"),this.selection=null):(r=this.currentRoots.find(p=>o.path.startsWith(p.file.path)),r?(this.errorSelection=`${this.layout.translateString("Parent item is already selected")}: ${r.file.path}`,this.selection=null):(this.errorSelection=null,this.selection=o))}else this.selection=null,this.errorSelection=null}onSubmit(){this.submitEvent.emit({id:this.selection.id,name:this.selection.name,path:this.selection.path,mime:this.selection.mime,permissions:this.selection.permissions}),this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-tree-dialog"]],inputs:{currentRoots:"currentRoots",allowSpaces:"allowSpaces",toggleNodesAtStartup:"toggleNodesAtStartup",mustHaveShareOutsidePermission:"mustHaveShareOutsidePermission"},outputs:{submitEvent:"submitEvent"},decls:13,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","py-2","px-0"],[3,"selected","enableNavigateTo","enableCopyMove","showFiles","allowShares","allowSpaces","sideBarHeader","toggleNodesAtStartup","resizeOffset"],[1,"modal-footer"],[1,"me-auto","fs-sm","text-danger","text-truncate"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[3,"icon"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),g(2,B2,4,5,"span")(3,U2,2,0,"span",2),l(),a(4,"button",3),_("click",function(){return r.layout.closeDialog()}),l()(),a(5,"div",4)(6,"app-files-tree",5),_("selected",function(u){return r.onSelect(u)}),l()(),a(7,"div",6),g(8,H2,2,1,"span",7),a(9,"button",8),_("click",function(){return r.layout.closeDialog()}),d(10,"Cancel"),l(),a(11,"button",9),_("click",function(){return r.onSubmit()}),d(12,"Confirm"),l()()),o&2&&(s(2),x(r.selection?2:3),s(4),m("enableNavigateTo",!1)("enableCopyMove",!1)("showFiles",!0)("allowShares",!1)("allowSpaces",r.allowSpaces)("sideBarHeader",!1)("toggleNodesAtStartup",r.toggleNodesAtStartup)("resizeOffset",200),s(2),x(r.errorSelection?8:-1),s(3),m("disabled",!r.selection))},dependencies:[P,ea,F,Xr],encapsulation:2});let i=n;return i})();function $2(i,n){if(i&1){let e=y();a(0,"input",12),b(1,"translate"),_("ngModelChange",function(o){h(e);let r=c();return C(r.checkInput(o,!0))}),l()}if(i&2){let e=c();z("is-invalid",!e.rootNameIsValid),m("ngModel",e.newSpaceRoot.name)("placeholder",E(1,4,"Name",e.locale.language))}}function G2(i,n){if(i&1&&(a(0,"span",9),d(1),l()),i&2){let e=c();s(),w(e.error)}}function W2(i,n){if(i&1){let e=y();a(0,"button",13),_("click",function(){h(e);let o=c();return C(o.onSubmit())}),d(1,"Confirm"),l()}}function q2(i,n){if(i&1){let e=y();a(0,"button",14),_("click",function(){h(e);let o=c();return C(o.onValidRoot())}),d(1,"Check the location"),l()}}var ta=(()=>{let n=class n{constructor(){this.currentRoots=[],this.submitEvent=new ae,this.withRootName=!0,this.locale=S(H),this.layout=S(N),this.icons={faFolderClosed:sr},this.newSpaceRoot={name:"",externalPath:""},this.rootNameIsValid=!1,this.rootPathIsValid=!1,this.rootIsValid=!1,this.spacesService=S(ot)}ngOnInit(){this.withRootName||(this.rootNameIsValid=!0)}keyEnter(){this.rootIsValid?this.onSubmit():this.onValidRoot()}onValidRoot(){if(this.withRootName&&!this.newSpaceRoot.name||!this.newSpaceRoot.externalPath){this.error="Name and location are required";return}this.newSpaceRoot.externalPath[0]!=="/"&&(this.newSpaceRoot.externalPath="/"+this.newSpaceRoot.externalPath);for(let t of this.currentRoots){let o=t.externalPath[t.externalPath.length-1]==="/"?t.externalPath:`${t.externalPath}/`;if(this.newSpaceRoot.externalPath.startsWith(o)){this.rootPathIsValid=!1,this.error="Parent location already exists in files";return}}this.spacesService.checkSpaceRootPath(this.newSpaceRoot.externalPath).subscribe({next:()=>{this.rootPathIsValid=!0,this.rootNameIsValid=!0,this.rootIsValid=!0,this.error=null},error:t=>{this.rootPathIsValid=!1,this.error=t.error.message}})}onSubmit(){this.submitEvent.emit(this.newSpaceRoot),this.layout.closeDialog()}checkInput(t,o=!1){o?(this.newSpaceRoot.name=t,this.rootNameIsValid=!!t):(this.newSpaceRoot.externalPath=t,this.rootPathIsValid=!!t),this.rootIsValid&&(this.rootIsValid=!1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-root-path-dialog"]],hostBindings:function(o,r){o&1&&_("keyup.enter",function(){return r.keyEnter()})},inputs:{currentRoots:"currentRoots",withRootName:"withRootName"},outputs:{submitEvent:"submitEvent"},decls:14,vars:13,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","form-validation"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModel","is-invalid","placeholder"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-4",3,"ngModelChange","autoFocus","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-sm","text-danger","text-truncate"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModelChange","ngModel","placeholder"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Add an external location"),l()(),a(5,"button",4),_("click",function(){return r.layout.closeDialog()}),l()(),a(6,"div",5),g(7,$2,2,7,"input",6),a(8,"input",7),b(9,"translate"),_("ngModelChange",function(u){return r.checkInput(u)}),l()(),a(10,"div",8),g(11,G2,2,1,"span",9),g(12,W2,2,0,"button",10)(13,q2,2,0,"button",11),l()),o&2&&(s(2),m("icon",r.icons.faFolderClosed),s(5),x(r.withRootName?7:-1),s(),z("is-invalid",!r.rootPathIsValid),m("placeholder",X("",E(9,10,"Location",r.locale.language),": /home/sync-in/data"))("autoFocus",!r.withRootName)("ngModel",r.newSpaceRoot.externalPath),s(3),x(r.error?11:-1),s(),x(r.rootIsValid?12:13))},dependencies:[F,P,be,je,xe,ti,ye,Ye,Z],encapsulation:2});let i=n;return i})();var k1=(()=>{let n=class n{constructor(){this.locale=S(H)}ngOnInit(){this.setFilePath()}ngOnChanges(){this.setFilePath()}setFilePath(){let t=this.share.file?En(this.share.file.name,-1):"";t?this.fileName=t:this.share.parent?.id?this.fileName=this.share.parent.name:this.share instanceof lo&&this.share.externalPath&&(this.fileName=this.share.externalPath)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-share-file-name"]],inputs:{share:"share"},features:[ln],decls:4,vars:2,consts:[[1,"d-flex","align-items-center"],["draggable","false","height","30","width","30","alt","",3,"error","src"],[1,"d-flex","flex-column","overflow-wrap-and-whitespace","ms-2"]],template:function(o,r){o&1&&(qi(0,"div",0)(1,"img",1),Xn("error",function(){return r.share.fallBackMimeUrl()}),ji(),qi(2,"div",2),d(3),ji()()),o&2&&(s(),Lo("src",r.share.mimeUrl,ee),s(2),A(" ",r.fileName," "))},encapsulation:2});let i=n;return i})();function K2(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c();s(),w(e.share.name)}}function Q2(i,n){i&1&&(a(0,"span",3),d(1,"Create a new share"),l())}function Y2(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();m("icon",e.icons.faSpinner)}}function X2(i,n){i&1&&(a(0,"h4",5)(1,"span",3),d(2,"Edit share"),l()())}function Z2(i,n){if(i&1&&(f(0,"fa-icon",40),a(1,"span",41),d(2,"Settings"),l()),i&2){let e=c();m("icon",e.icons.faCog)}}function J2(i,n){if(i&1&&(a(0,"div",44)(1,"label",45),d(2,"Storage Usage"),l(),f(3,"app-storage-usage",46),l()),i&2){let e=c(2);s(3),m("item",e.share)}}function eu(i,n){if(i&1){let e=y();a(0,"div",42)(1,"app-storage-quota",43),me("quotaChange",function(o){h(e);let r=c();return de(r.share.storageQuota,o)||(r.share.storageQuota=o),C(o)}),l()(),g(2,J2,4,1,"div",44)}if(i&2){let e=c();s(),pe("quota",e.share.storageQuota),m("fullWidth",!0),s(),x(e.share.storageUsage?2:-1)}}function tu(i,n){if(i&1){let e=y();a(0,"div")(1,"label",47),d(2,"Full-text search"),l(),a(3,"div",22)(4,"input",48),me("ngModelChange",function(o){h(e);let r=c();return de(r.share.storageIndexing,o)||(r.share.storageIndexing=o),C(o)}),l(),a(5,"label",49),d(6),l()()()}if(i&2){let e=c();s(4),pe("ngModel",e.share.storageIndexing),s(2),A(" ",e.share.storageIndexing?"enabled":"disabled"," ")}}function iu(i,n){if(i&1&&(a(0,"div",15)(1,"label",50),d(2,"File"),l(),f(3,"app-share-file-name",51),l()),i&2){let e=c();s(3),m("share",e.share)}}function nu(i,n){if(i&1&&(a(0,"div",58)(1,"label",59),d(2,"Deactivation date"),l(),a(3,"div",60),d(4),b(5,"amDateFormat"),l()()),i&2){let e=c(2);s(4),w(q(5,1,e.share.disabledAt))}}function ou(i,n){if(i&1&&(a(0,"div",32)(1,"div",52)(2,"label",53),d(3,"Creation date"),l(),a(4,"div",54),d(5),b(6,"amDateFormat"),l()(),a(7,"div",55)(8,"label",56),d(9,"Modification date"),l(),a(10,"div",57),d(11),b(12,"amDateFormat"),l()(),g(13,nu,6,3,"div",58),l()),i&2){let e=c();s(5),w(q(6,3,e.share.createdAt)),s(6),w(q(12,5,e.share.modifiedAt)),s(2),x(e.share.disabledAt&&!e.share.enabled?13:-1)}}function ru(i,n){if(i&1&&(f(0,"fa-icon",40),a(1,"span",61),d(2,"Members"),l(),a(3,"span"),d(4),l()),i&2){let e=c();m("icon",e.icons.faUsers),s(4),A("(",e.share.members.length,")")}}function au(i,n){if(i&1&&(f(0,"fa-icon",40),a(1,"span",61),d(2,"Links"),l(),a(3,"span"),d(4),l()),i&2){let e=c();m("icon",e.icons.LINKS),s(4),A("(",e.share.links.length,")")}}function su(i,n){if(i&1){let e=y();a(0,"button",63),_("click",function(){h(e);let o=c(2);return C(o.confirmDeletion=!0)}),d(1," Remove "),l()}if(i&2){let e=c(2);m("disabled",e.confirmDeletion)}}function lu(i,n){if(i&1){let e=y();a(0,"button",66),_("click",function(){h(e);let o=c(3);return C(o.openAdminRootDialog())}),f(1,"fa-icon",40),d(2," External location "),l()}if(i&2){let e=c(3);s(),m("icon",e.icons.faUserShield)}}function cu(i,n){if(i&1){let e=y();a(0,"button",64),_("click",function(){h(e);let o=c(2);return C(o.openSelectRootDialog())}),f(1,"fa-icon",40)(2,"fa-icon",40),d(3," File "),l(),g(4,lu,3,1,"button",65)}if(i&2){let e=c(2);s(),m("icon",e.icons.faPlus),s(),m("icon",e.icons.SHARES),s(2),x(e.user.isAdmin?4:-1)}}function pu(i,n){if(i&1&&g(0,su,2,1,"button",62)(1,cu,5,3),i&2){let e=c();x(e.share.id?0:e.allowFilesOptions?1:-1)}}function du(i,n){if(i&1){let e=y();a(0,"button",64),_("click",function(){h(e);let o=c();return C(o.openCreateLinkDialog())}),f(1,"fa-icon",40)(2,"fa-icon",40),d(3," Link "),l()}if(i&2){let e=c();s(),m("icon",e.icons.faPlus),s(),m("icon",e.icons.LINKS)}}var rn=(()=>{let n=class n{constructor(){this.parentShareId=null,this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.allowFilesOptions=!0,this.shareChange=new ae,this.locale=S(H),this.layout=S(N),this.icons={SHARED:ie.SHARED_WITH_OTHERS,SHARES:ie.SHARES,LINKS:ie.LINKS,faPlus:Qe,faSpinner:Ue,faUserShield:Qo,faUsers:Ko,faCog:Ai},this.allowedPermissions=[],this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=S(oe),this.user=this.userService.user,this.sharesService=S(ci),this.linksService=S(pi),this.spacesService=S(ot)}ngOnInit(){this.share||([this.share,this.parentShareId]=this.sharesService.initShareFromFile(this.user,this.file,this.isSharesRepo,this.inSharesList)),this.allowedPermissions=Object.keys(this.share.hPerms)}searchMembers(t){let o={search:t,ignoreUserIds:[this.user.id,...this.share.parent?.ownerId?[this.share.parent.ownerId]:[],...this.share.members.filter(r=>r.isUser).map(r=>r.id)],ignoreGroupIds:this.share.members.filter(r=>r.isGroup).map(r=>r.id)};return this.userService.searchMembers(o,[De.SHARE_INSIDE])}openSelectRootDialog(){this.layout.openDialog($n,"xl",{initialState:{toggleNodesAtStartup:!1,allowSpaces:!0,mustHaveShareOutsidePermission:!0}}).content.submitEvent.pipe(ce(1)).subscribe(o=>{let r=o.path.split("/"),p={id:o.id,name:o.name,path:En(o.path,2),permissions:o.permissions,mime:o.mime,ownerId:r[1]===ht.PERSONAL?this.user.id:null,inTrash:!1,isDir:o.mime===Ut,space:{alias:r[1],name:r[1],root:{alias:"",name:""}}},u=Se(re({},this.share),{file:p,externalPath:null});u.name=u.file.name,this.share=new lo(u),this.allowedPermissions=Object.keys(this.share.hPerms)})}openAdminRootDialog(){this.layout.openDialog(ta,null,{initialState:{withRootName:!1}}).content.submitEvent.pipe(ce(1)).subscribe(o=>{let r=Se(re({},this.share),{file:null,externalPath:o.externalPath,name:o.externalPath.split("/").at(-1)});this.share=new lo(r),this.allowedPermissions=Object.keys(this.share.hPerms)})}openEditLinkDialog(t){this.linksService.editLinkDialog(t,this.share,fr.SHARE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.share)}cantSubmit(){return this.submitted||!this.share.externalPath&&!this.share.file}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.parentShareId?this.sharesService.deleteShareChild(this.parentShareId,this.share.id):this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.loading=!1,this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:o=>{this.onError(),this.layout.sendNotification("error","Delete share",this.share.name,o)}}):this.share.id===0?this.sharesService.createShare(this.share).subscribe({next:t=>{this.loading=!1,this.share=t,this.shareChange.emit(["add",t]),this.layout.closeDialog()},error:t=>{this.onError(),this.layout.sendNotification("error","Create share",this.share.name,t)}}):(this.parentShareId?this.sharesService.updateShareChild(this.parentShareId,this.share.id,this.share):this.parentSpaceId?this.spacesService.updateSpaceShare(this.parentSpaceId,this.share):this.sharesService.updateShare(this.share)).subscribe({next:o=>{this.loading=!1,this.share=o,this.shareChange.emit(["update",o]),this.layout.closeDialog()},error:o=>{this.onError(),this.layout.sendNotification("error","Edit share",this.share.name,o)}})}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-share-dialog"]],inputs:{share:"share",file:"file",parentShareId:"parentShareId",parentSpaceId:"parentSpaceId",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList",allowFilesOptions:"allowFilesOptions"},outputs:{shareChange:"shareChange"},decls:61,vars:41,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[2,"max-width","80%"],[1,"mb-3","px-0"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-between"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"col-6"],[1,"mb-3"],["for","from","l10nTranslate",""],["id","from",3,"share","showFullPath"],["for","permissions","l10nTranslate",""],[1,"d-flex"],["id","permissions",3,"permissions","replaceEmptyPermissions"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","filterPermissions","allowedPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],[1,"d-flex","flex-column","align-items-start","mb-3"],[1,"w-100",3,"quotaChange","quota","fullWidth"],[1,"d-flex","flex-column","mb-3"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],["for","switchFullText","l10nTranslate",""],["id","switchFullText","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchFullText","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],["for","shareFilePath","l10nTranslate","",1,"no-select"],["id","shareFilePath",3,"share"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),g(3,K2,2,1,"span")(4,Q2,2,0,"span",3),g(5,Y2,1,1,"fa-icon",4),l(),g(6,X2,3,0,"h4",5),a(7,"button",6),_("click",function(){return r.layout.closeDialog()}),l()(),a(8,"div",7)(9,"tabset",8),f(10,"hr",9),a(11,"tab",10),_("selectTab",function(){return r.tabView=null}),L(12,Z2,3,1,"ng-template",11),a(13,"div",12)(14,"div",13)(15,"div",14)(16,"div",15)(17,"label",16),d(18," Share name "),l(),a(19,"input",17),me("ngModelChange",function(u){return de(r.share.name,u)||(r.share.name=u),u}),l()(),a(20,"div",15)(21,"label",18),d(22," Description "),l(),a(23,"input",19),me("ngModelChange",function(u){return de(r.share.description,u)||(r.share.description=u),u}),l()(),g(24,eu,3,3),a(25,"div",20)(26,"div")(27,"label",21),d(28,"Share status"),l(),a(29,"div",22)(30,"input",23),me("ngModelChange",function(u){return de(r.share.enabled,u)||(r.share.enabled=u),u}),l(),a(31,"label",24),d(32),l()()(),g(33,tu,7,2,"div"),l()()(),a(34,"div",25),g(35,iu,4,1,"div",15),a(36,"div",26)(37,"label",27),d(38,"Shared from"),l(),f(39,"app-share-repository",28),l(),a(40,"div",26)(41,"label",29),d(42,"File permissions"),l(),a(43,"div",30),f(44,"app-file-permissions",31),l()(),g(45,ou,14,7,"div",32),l()()(),a(46,"tab",33),_("selectTab",function(){return r.tabView="members"}),L(47,ru,5,2,"ng-template",11),a(48,"div",9)(49,"app-user-search",34),me("membersChange",function(u){return de(r.share.members,u)||(r.share.members=u),u}),l()()(),a(50,"tab",33),_("selectTab",function(){return r.tabView="links"}),L(51,au,5,2,"ng-template",11),a(52,"div",9)(53,"app-user-search",35),me("membersChange",function(u){return de(r.share.links,u)||(r.share.links=u),u}),l()()()()(),a(54,"div",36),g(55,pu,2,1),g(56,du,4,2,"button",37),a(57,"button",38),_("click",function(){return r.onCancel()}),d(58,"Cancel"),l(),a(59,"button",39),_("click",function(){return r.onSubmit()}),d(60),l()()),o&2&&(s(2),m("icon",r.icons.SHARED),s(),x(r.share.id?3:4),s(2),x(r.loading?5:-1),s(),x(r.share.id?6:-1),s(),V(X("btn-close btn-close-white ",r.share.id?"ms-2":"ms-auto"," ms-2")),s(2),m("justified",!0),s(10),V(X("form-control form-control-sm ",r.share.name?"":"is-invalid")),pe("ngModel",r.share.name),s(4),pe("ngModel",r.share.description),s(),x(r.share.externalPath?24:-1),s(6),pe("ngModel",r.share.enabled),s(2),A(" ",r.share.enabled?"enabled":"disabled"," "),s(),x(r.share.externalPath?33:-1),s(2),x(r.share.file!=null&&r.share.file.name||r.share.externalPath?35:-1),s(4),m("share",r.share)("showFullPath",!0),s(5),m("permissions",r.share.hPerms)("replaceEmptyPermissions",!0),s(),x(r.share!=null&&r.share.id?45:-1),s(4),pe("members",r.share.members),m("withPermissions",!0)("filterPermissions",!0)("allowedPermissions",r.allowedPermissions)("searchFunction",r.searchMembers.bind(r)),s(4),pe("members",r.share.links),m("filterPermissions",!0)("allowedPermissions",r.allowedPermissions)("withPermissions",!0)("editFunction",r.openEditLinkDialog.bind(r))("hideInput",!0),s(2),x(r.tabView?-1:55),s(),x(r.tabView==="links"?56:-1),s(3),V(X("btn btn-sm ",r.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",r.cantSubmit()),s(),A(" ",r.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[F,P,Sr,gr,Cr,xr,Ye,Ei,je,Lt,xe,ti,be,ye,Dn,si,k1,vt,vr,kn,Le],encapsulation:2});let i=n;return i})();var ia=class{constructor(n){this.isShareLink=!1,Object.assign(this,n),this.owner.avatarUrl=Li(this.owner.login),this.isShareLink=this.type===so.LINK,this.setMimeUrl()}fallBackMimeUrl(){this.mimeUrl=Pn}setMimeUrl(){!this.file||this.file.mime===Ut?this.mimeUrl=Ji(yr):this.mimeUrl=Ji(this.file.mime)}};var D1=i=>({$implicit:i}),mu=(i,n)=>n.id;function uu(i,n){if(i&1&&f(0,"fa-icon",17),i&2){let e=c(3);m("icon",e.icons.LINKS)}}function fu(i,n){i&1&&Ne(0)}function _u(i,n){if(i&1&&(a(0,"ul"),L(1,fu,1,0,"ng-container",10),l()),i&2){let e=c().$implicit;c(2);let t=Be(15);s(),m("ngTemplateOutlet",t)("ngTemplateOutletContext",Re(2,D1,e.children))}}function hu(i,n){if(i&1){let e=y();a(0,"li")(1,"div",14),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("dblclick",function(){h(e);let o=c(2);return C(o.openChildShare())}),a(2,"div",15)(3,"img",16),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),g(4,uu,1,1,"fa-icon",17),a(5,"span",18),d(6),l()(),a(7,"div",19)(8,"span",20),d(9),l(),f(10,"app-user-avatar",21),l()(),g(11,_u,2,4,"ul"),l()}if(i&2){let e=n.$implicit,t=c(2);s(),z("selected",t.selected&&t.selected.id===e.id),s(2),m("src",e.mimeUrl,ee),s(),x(e.isShareLink?4:-1),s(2),w(e.name),s(3),w(e.owner.fullName),s(),m("user",e.owner)("height",26)("width",26),s(),x((e.children==null?null:e.children.length)>0?11:-1)}}function Cu(i,n){if(i&1&&k(0,hu,12,10,"li",null,mu),i&2){let e=n.$implicit,t=c();D(t.toShares(e))}}function gu(i,n){i&1&&Ne(0)}var Oi=(()=>{let n=class n{constructor(){this.fromAdmin=!1,this.sharesCountEvent=new ae,this.layout=S(N),this.icons={SHARED:ie.SHARED_WITH_OTHERS,LINKS:ie.LINKS},this.loading=!1,this.childSharesLength=0,this.sharesService=S(ci),this.linksService=S(pi),this.spacesService=S(ot)}ngOnInit(){this.loadChildShares()}toShares(t){return t}loadChildShares(){this.loading=!0;let t;if(this.share)t=this.sharesService.listChildShares(this.share.id);else if(this.space)t=this.spacesService.listSpaceShares(this.space.id);else{console.error("share or space not defined");return}t.subscribe({next:o=>{this.childSharesLength=o.length,this.sharesCountEvent.emit(o.length),this.setShares(o.map(r=>new ia(r))),this.loading=!1},error:o=>{this.childShares=[],this.childSharesLength=0,this.loading=!1,this.layout.sendNotification("error","Child shares",o.error.message)}})}onSelect(t){this.selected=t}openChildShare(){if(this.selected.isShareLink){let t;if(this.share)t=this.linksService.shareLinkChild(this.share.id,this.selected.id);else if(this.space)t=this.spacesService.getSpaceShareLink(this.space.id,this.selected.id);else{console.error("share or space not defined");return}t.subscribe({next:o=>{this.layout.openDialog(Nn,"md",{initialState:{share:o}}).content.shareChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;u==="update"?this.selected.name=v.name:this.loadChildShares()})},error:o=>this.layout.sendNotification("error","Edit children shares",this.selected.name,o)})}else{let t;if(this.share)t=this.sharesService.getShareChild(this.share.id,this.selected.id);else if(this.space)t=this.spacesService.getSpaceShare(this.space.id,this.selected.id);else{console.error("share or space not defined");return}t.subscribe({next:o=>{this.layout.openDialog(rn,"lg",{initialState:Se(re(re({},this.share?{parentShareId:this.share.id}:{}),this.space?{parentSpaceId:this.space.id}:{}),{share:o})}).content.shareChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;u==="update"?(this.selected.name=v.name,this.selected.alias=v.alias):this.loadChildShares()})},error:o=>this.layout.sendNotification("error","Edit children shares",this.selected.name,o)})}}setShares(t){let o={id:this.share?.id||0,children:[]};this.recurseChildrenShares(t,o),this.childShares=o.children}recurseChildrenShares(t,o){for(let r of t)r.parentId===o.id?(o.children=o.children??[],o.children.push(r),this.recurseChildrenShares(t,r)):o.id===0&&!r.parentId&&(o.children=o.children??[],o.children.push(r),this.recurseChildrenShares(t,r))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-shared-children-dialog"]],inputs:{fromAdmin:"fromAdmin",share:"share",space:"space"},outputs:{sharesCountEvent:"sharesCountEvent"},decls:22,vars:9,consts:[["recursiveList",""],[1,"modal-header","align-items-center"],[1,"modal-title","w-100"],[1,"d-flex"],[1,"me-2",3,"icon"],[1,"ms-auto","me-2"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],["appAutoResize","",1,"modal-body",2,"padding-right","24px",3,"resizeOffset"],[1,"tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"modal-footer"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"app-div-hovered",3,"click","dblclick"],[1,"me-auto","text-truncate"],["alt","","draggable","false","height","28",3,"error","src"],[1,"align-middle","ms-1",3,"icon"],[1,"ms-1","align-middle"],[1,"d-flex","align-items-center"],[1,"fs-xxxs","me-2"],["tooltipPlacement","top","container","body",3,"user","height","width"]],template:function(o,r){if(o&1){let p=y();a(0,"div",1)(1,"h4",2)(2,"div",3)(3,"div"),f(4,"fa-icon",4),a(5,"span"),d(6),l()(),a(7,"div",5)(8,"span",6),d(9,"Child shares"),l(),d(10),l()()(),a(11,"button",7),_("click",function(){return h(p),C(r.layout.closeDialog())}),l()(),a(12,"div",8)(13,"ul",9),L(14,Cu,2,0,"ng-template",null,0,Ft)(16,gu,1,0,"ng-container",10),l()(),a(17,"div",11)(18,"button",12),_("click",function(){return h(p),C(r.openChildShare())}),d(19,"Edit"),l(),a(20,"button",13),_("click",function(){return h(p),C(r.layout.closeDialog())}),d(21,"Close"),l()()}if(o&2){let p=Be(15);s(4),m("icon",r.icons.SHARED),s(2),w((r.share==null?null:r.share.name)||(r.space==null?null:r.space.name)),s(4),A("\xA0(",r.childSharesLength,") "),s(2),m("resizeOffset",170),s(4),m("ngTemplateOutlet",p)("ngTemplateOutletContext",Re(7,D1,r.childShares)),s(2),m("disabled",!r.selected)}},dependencies:[fe,Wt,P,F,Ze],styles:[`ul.tree[_ngcontent-%COMP%], ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:18px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0;padding:0;line-height:30px;border-left:1px solid rgb(100,100,100);white-space:nowrap}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-flex;width:100%;cursor:pointer;border-radius:4px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-left:none}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{position:relative;top:-.3em;height:1.2rem;width:1rem;color:#fff;border-bottom:1px solid rgb(100,100,100);content:"";display:inline-block}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child:before{border-left:1px solid rgb(100,100,100)}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
`]});let i=n;return i})();var xu=["MainContextMenu"],Su=["TargetContextMenu"],vu=()=>["shares"],F1=(i,n)=>n.id,L1=(i,n)=>n.key;function yu(i,n){if(i&1&&(a(0,"span",31),d(1),l()),i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),w(e.hTimeAgo)}}function bu(i,n){if(i&1){let e=y();a(0,"div",32),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.openChildShareDialog(o))}),f(1,"fa-icon",33),a(2,"span"),d(3),l()()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),m("icon",t.icons.SHARED),s(2),w(e.counts.shares)}}function wu(i,n){if(i&1){let e=y();a(0,"div",21),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){h(e);let o=c(2);return C(o.openShareDialog())}),a(1,"div",22)(2,"img",23),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),a(3,"span",24),g(4,yu,2,3,"span",25),l(),g(5,bu,4,4,"div",26),a(6,"span",27),f(7,"app-share-repository",28),l()(),a(8,"div",29)(9,"span",30),d(10),l()()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);O("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),z("disabled",!e.enabled)("selected",e.id===(o.selected==null?null:o.selected.id)),s(),Jt("rowIndex",t),s(),m("src",e.mimeUrl,ee)("height",o.galleryMode.image)("width",o.galleryMode.image),s(2),x(e.newly?4:-1),s(),x(e.counts.shares?5:-1),s(2),m("share",e)("galleryMode",o.galleryMode),s(2),O("font-size",o.galleryMode.textSize,"px"),s(),w(e.name)}}function Tu(i,n){if(i&1){let e=y();a(0,"div",12)(1,"app-virtual-scroll",18),b(2,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(3,"div",19),k(4,wu,11,19,"div",20,F1),l()()()}if(i&2){let e=c();s(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",E(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),s(3),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Eu(i,n){if(i&1&&f(0,"fa-icon",6),i&2){let e=c(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function Mu(i,n){if(i&1){let e=y();a(0,"th",39),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.sortBy(o.key))}),d(1),g(2,Eu,1,1,"fa-icon",6),l()}if(i&2){let e=c().$implicit,t=c(2);V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function Au(i,n){if(i&1&&g(0,Mu,3,10,"th",38),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function ku(i,n){if(i&1){let e=y();a(0,"div",42)(1,"img",44),_("error",function(){h(e);let o=c(3).$implicit;return C(o.fallBackMimeUrl())}),l(),a(2,"div",45)(3,"span",30),d(4),l(),a(5,"span",46),d(6),l()()()}if(i&2){let e=c(3).$implicit;s(),m("src",e.mimeUrl,ee),s(3),w(e.name),s(2),w(e.description)}}function Du(i,n){if(i&1&&f(0,"app-share-repository",43),i&2){let e=c(3).$implicit;m("share",e)}}function Fu(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"joinCounts"),l()),i&2){let e=c(3).$implicit;s(),w(E(2,1,e.counts,Tt(4,vu)))}}function Lu(i,n){if(i&1){let e=y();a(0,"span",49),_("click",function(){h(e);let o=c(4).$implicit,r=c(2);return C(r.openChildShareDialog(o))}),f(1,"fa-icon",33),a(2,"span"),d(3),l()()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.SHARED),s(2),w(e.counts.shares)}}function Pu(i,n){if(i&1){let e=y();a(0,"span",50),_("click",function(){h(e);let o=c(4).$implicit,r=c(2);return C(r.goToComments(o))}),f(1,"fa-icon",6),l()}if(i&2){let e=c(6);s(),m("icon",e.icons.faCommentDots)}}function Nu(i,n){if(i&1&&(g(0,Lu,4,2,"span",47),g(1,Pu,2,1,"span",48)),i&2){let e=c(3).$implicit;x(e.counts.shares?0:-1),s(),x(e.hasComments?1:-1)}}function Iu(i,n){if(i&1&&d(0),i&2){let e=c(3).$implicit;A(" ",e.hTimeAgo," ")}}function Ru(i,n){if(i&1&&(a(0,"td"),g(1,ku,7,3,"div",42)(2,Du,1,1,"app-share-repository",43)(3,Fu,3,5,"span")(4,Nu,2,2)(5,Iu,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="from"?2:e==="members"?3:e==="info"?4:e==="created"?5:-1)}}function Vu(i,n){if(i&1&&g(0,Ru,6,9,"td",41),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function zu(i,n){if(i&1){let e=y();a(0,"tr",40),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){h(e);let o=c(2);return C(o.openShareDialog())}),k(1,Vu,1,1,null,null,L1),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);z("disabled",!e.enabled)("selected",e.id===(t.selected==null?null:t.selected.id)),s(),D(E(3,4,t.tableHeaders,t.originalOrderKeyValue))}}function Ou(i,n){if(i&1){let e=y();a(0,"table",34)(1,"thead")(2,"tr"),k(3,Au,1,1,null,null,L1),b(5,"keyvalue"),l()()(),a(6,"app-virtual-scroll",35),b(7,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(8,"table",34)(9,"tbody",36),k(10,zu,4,7,"tr",37,F1),l()()()}if(i&2){let e=c();s(3),D(E(5,2,e.tableHeaders,e.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",E(7,5,e.shares,e.inputFilter.search())),s(4),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Bu(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"New share"),l()),i&2){let e=c();s(),m("icon",e.icons.faPlus)}}function Uu(i,n){}function Hu(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Refresh"),l()),i&2){let e=c();s(),m("icon",e.icons.faArrowRotateRight)}}function $u(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Go to"),l()),i&2){let e=c();s(),m("icon",e.icons.faMapMarkerAlt)}}function Gu(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Edit"),l()),i&2){let e=c();s(),m("icon",e.icons.faPen)}}function Wu(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Edit children shares"),l()),i&2){let e=c(2);s(),m("icon",e.icons.SHARED)}}function qu(i,n){if(i&1){let e=y();L(0,Wu,3,1,"ng-template",15),_("execute",function(){h(e);let o=c();return C(o.openChildShareDialog())})}}function ju(i,n){}function Ku(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",6),d(2,"Info"),l()),i&2){let e=c();s(),m("icon",e.icons.faCircleInfo)}}var P1=(()=>{let n=class n{constructor(){this.locale=S(H),this.layout=S(N),this.icons={SHARED:ie.SHARED_WITH_OTHERS,faArrowRotateRight:ut,faArrowDown:ft,faArrowUp:dt,faRotate:Mi,faPlus:Qe,faMinus:xn,faPen:mt,faEllipsisH:Uo,faMapMarkerAlt:ar,faCircleInfo:It,faCommentDots:nr},this.originalOrderKeyValue=Fe,this.TAB_MENU=_e,this.loading=!1,this.shares=[],this.selected=null,this.tableHeaders={name:{label:"Name",width:40,textCenter:!1,class:"",show:!0,sortable:!0},from:{label:"Shared from",width:20,textCenter:!1,class:"d-none d-md-table-cell",show:!0},members:{label:"Members",width:16,class:"d-none d-md-table-cell",textCenter:!1,show:!0},info:{label:"Info",width:14,textCenter:!0,class:"d-none d-md-table-cell",show:!0},created:{label:"Created",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",created:"Created"},this.activatedRoute=S(ei),this.store=S(te),this.sharesService=S(ci),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],created:[{prop:"createdAt",type:"date"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.loadShares(),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select),this.layout.setBreadcrumbIcon(this.icons.SHARED),this.layout.setBreadcrumbNav({url:`/${$.SHARED}/${Ot.SHARED_WITH_OTHER}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShares(){this.loading=!0,this.onSelect(),this.sharesService.listShares().subscribe({next:t=>{this.sortBy(this.sortTable.sortParam.column,!1,t.map(o=>new Yr(o))),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Shares",t.error.message)}})}sortBy(t,o=!0,r){this.shares=this.sortTable.sortBy(t,o,r||this.shares)}onSelect(t=null){this.selected=t,this.store.shareSelection.set(this.selected)}openShareDialog(t=!1){t?this.layout.openDialog(rn,"lg").content.shareChange.pipe(ce(1)).subscribe(r=>{let[p,u]=r;p==="add"&&(this.focusOnSelect=u.name,this.loadShares())}):this.sharesService.getShare(this.selected.id).subscribe({next:o=>{this.layout.openDialog(rn,"lg",{initialState:{share:o}}).content.shareChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;if(u==="update"){this.selected.name=v.name,this.selected.alias=v.alias,this.selected.description=v.description,this.selected.modifiedAt=v.modifiedAt,this.selected.enabled=v.enabled;let T={users:0,groups:0,links:v.links.length};for(let I of v.members)I.isUser?T.users++:T.groups++;this.selected.counts=re(re({},this.selected.counts),T)}else u==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(T=>T.id!==v.id)))})},error:o=>this.layout.sendNotification("error","Edit share",this.selected.name,o)})}openChildShareDialog(t){t&&this.onSelect(t),this.layout.openDialog(Oi,null,{initialState:{share:this.selected}}).content.sharesCountEvent.subscribe(r=>this.selected.counts.shares=r)}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}goTo(t){t=t||this.selected,this.sharesService.goTo(t).catch(console.error)}goToComments(t){this.sharesService.goTo(t).then(()=>this.layout.showRSideBarTab(_e.COMMENTS,!0))}focusOn(t){let o=this.shares.find(r=>r.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-shared"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(lt,7),Y(xu,7),Y(Su,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.btnNavigationView=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.targetContextMenu=p.first)}},decls:38,vars:40,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["contextMenuItem",""],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","selected","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-right","badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"font-size"],[1,"label-bottom-left"],[3,"share","galleryMode"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"label-bottom-right","badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[3,"share"],["alt","","draggable","false","height","30","width","30",3,"error","src"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-success","cursor-pointer"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"click"],["l10nTranslate",""]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"button",3),b(2,"translate"),_("click",function(){return h(p),C(r.loadShares())}),f(3,"fa-icon",4),l(),a(4,"button",5),b(5,"translate"),_("click",function(){return h(p),C(r.openShareDialog(!0))}),f(6,"fa-icon",6),l(),a(7,"button",7),b(8,"translate"),_("click",function(){return h(p),C(r.openShareDialog())}),f(9,"fa-icon",6),l(),a(10,"button",7),b(11,"translate"),_("click",function(){return h(p),C(r.openChildShareDialog())}),f(12,"fa-icon",6),l(),a(13,"button",7),b(14,"translate"),_("click",function(){return h(p),C(r.goTo())}),f(15,"fa-icon",6),l(),a(16,"div",8)(17,"div",9),f(18,"app-input-filter",10),l(),a(19,"app-navigation-view",11),_("sortBy",function(v){return h(p),C(r.sortBy(v))})("switchView",function(v){return h(p),C(r.galleryMode=v)}),l()()(),g(20,Tu,6,8,"div",12)(21,Ou,12,8),a(22,"div",13)(23,"span",14),d(24),b(25,"translate"),l()(),a(26,"context-menu",null,0),L(28,Bu,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.openShareDialog(!0))}),L(29,Uu,0,0,"ng-template",16)(30,Hu,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.loadShares())}),l(),a(31,"context-menu",null,1),L(33,$u,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.goTo())}),L(34,Gu,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.openShareDialog())}),g(35,qu,1,0,null,17),L(36,ju,0,0,"ng-template",16)(37,Ku,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.layout.showRSideBarTab(r.TAB_MENU.SELECTION))}),l()}o&2&&(s(),m("tooltip",E(2,22,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faArrowRotateRight)("animation",r.loading?"spin":null),s(),m("tooltip",E(5,25,"New share",r.locale.language)),s(2),m("icon",r.icons.faPlus),s(),m("disabled",!r.selected)("tooltip",E(8,28,"Edit share",r.locale.language)),s(2),m("icon",r.icons.faPen),s(),m("disabled",!(r.selected!=null&&r.selected.counts.shares))("tooltip",E(11,31,"Edit children shares",r.locale.language)),s(2),m("icon",r.icons.SHARED),s(),m("disabled",!r.selected)("tooltip",E(14,34,"Go to",r.locale.language)),s(2),m("icon",r.icons.faMapMarkerAlt),s(4),m("sortParams",r.sortTable.sortParam)("sortFields",r.btnSortFields),s(),x(r.galleryMode!=null&&r.galleryMode.enabled?20:21),s(4),Ie("",r.shares.length," ",E(25,37,"shares",r.locale.language)),s(5),m("divider",!0),s(6),x(r.selected!=null&&r.selected.counts.shares?35:-1),s(),m("divider",!0))},dependencies:[F,P,lt,Ve,Ke,ke,Xe,Ri,zt,Vt,Rt,si,nt,Ae,Z,Ct,ai],encapsulation:2});let i=n;return i})();var na=(()=>{let n=class n{constructor(){this.inputField="name",this.fullWidth=!1,this.textCenter=!1,this.disableOnBlur=!0,this.disableFocus=!1,this.disableKeyboard=!1,this.updateObject=new ae(!0),this.renamingInProgress=new ae(!0),this.elementRef=S(Si),this.renderer=S(pt),this.dangerColor="#dd4b39",this.primaryColor="#3c8dbc"}ngOnInit(){this.initStyles(),this.renamingInProgress.emit(!0),this.elementRef.nativeElement.value=this.inputObject[this.inputField],setTimeout(()=>{this.setParentDraggable("false"),this.disableFocus||(this.elementRef.nativeElement.focus(),this.elementRef.nativeElement.select())},5)}onBlur(){this.disableOnBlur&&this.disableEdit()}onEnter(){this.disableKeyboard||(this.elementRef.nativeElement.value?this.elementRef.nativeElement.value===this.inputObject[this.inputField]?(this.setCorrectForm(),this.disableEdit()):(this.setCorrectForm(),this.updateObject.next({object:this.inputObject,name:this.elementRef.nativeElement.value}),this.disableEdit()):this.setIncorrectForm())}onEscape(){this.disableKeyboard||this.disableEdit()}initStyles(){this.renderer.setStyle(this.elementRef.nativeElement,"display","inline"),this.renderer.setStyle(this.elementRef.nativeElement,"height","100%"),this.renderer.setStyle(this.elementRef.nativeElement,"min-height","20px"),this.renderer.addClass(this.elementRef.nativeElement,"form-control"),this.renderer.addClass(this.elementRef.nativeElement,"form-control-sm"),this.textCenter?(this.renderer.addClass(this.elementRef.nativeElement,"text-center"),this.renderer.setStyle(this.elementRef.nativeElement,"padding","0")):this.renderer.setStyle(this.elementRef.nativeElement,"padding","2px"),this.fullWidth?this.renderer.addClass(this.elementRef.nativeElement,"w-100"):this.renderer.addClass(this.elementRef.nativeElement,"w-75")}setIncorrectForm(){this.renderer.addClass(this.elementRef.nativeElement,"is-invalid"),this.renderer.setStyle(this.elementRef.nativeElement,"border-color",this.dangerColor)}setCorrectForm(){this.renderer.removeClass(this.elementRef.nativeElement,"is-invalid"),this.renderer.setStyle(this.elementRef.nativeElement,"border-color",this.primaryColor)}disableEdit(){this.setParentDraggable("true"),this.renamingInProgress.emit(!1),setTimeout(()=>this.inputObject.isRenamed=!1,100)}setParentDraggable(t){this.renderer.setAttribute(this.elementRef.nativeElement.parentElement,"draggable",t)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=yi({type:n,selectors:[["","appInputEdit",""]],hostBindings:function(o,r){o&1&&_("blur",function(){return r.onBlur()})("keyup.enter",function(){return r.onEnter()})("keyup.esc",function(){return r.onEscape()})},inputs:{inputObject:"inputObject",inputField:"inputField",fullWidth:"fullWidth",textCenter:"textCenter",disableOnBlur:"disableOnBlur",disableFocus:"disableFocus",disableKeyboard:"disableKeyboard"},outputs:{updateObject:"updateObject",renamingInProgress:"renamingInProgress"}});let i=n;return i})();var N1=(()=>{let n=class n{constructor(){this.uploadFiles=new ae,this.elementRef=S(Si),this.renderer=S(pt)}ngOnInit(){let t=document.createElement("input");this.renderer.setAttribute(t,"type","file"),this.renderer.setStyle(t,"display","none"),this.renderer.setStyle(t,"position","absolute"),this.elementRef.nativeElement.appendChild(t),this.eventElement=this.renderer.listen(this.elementRef.nativeElement,"click",()=>t.click()),this.options?.isMultiple&&this.renderer.setAttribute(t,"multiple","multiple"),this.options?.isDirectory&&this.renderer.setAttribute(t,"webkitdirectory","webkitdirectory"),this.eventInput=this.renderer.listen(t,"change",o=>{o.target.value&&(this.uploadFiles.next({files:o.target.files,isDirectory:this.options?.isDirectory||!1}),o.target.value="")})}ngOnDestroy(){try{this.eventElement(),this.eventInput()}catch(t){console.warn(t)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=yi({type:n,selectors:[["","appUploadFiles",""]],inputs:{options:"options"},outputs:{uploadFiles:"uploadFiles"}});let i=n;return i})();function Yu(i,n){i&1&&(a(0,"span",3),d(1,"Compress and Save"),l())}function Xu(i,n){i&1&&(a(0,"span",3),d(1,"Compress and Download"),l())}function Zu(i,n){if(i&1){let e=y();a(0,"div",15)(1,"label",12)(2,"input",13),me("ngModelChange",function(o){h(e);let r=c();return de(r.archiveProps.compressInDirectory,o)||(r.archiveProps.compressInDirectory=o),C(o)}),l(),a(3,"span",19),d(4,"Save in the current directory"),l()()()}if(i&2){let e=c();s(2),pe("ngModel",e.archiveProps.compressInDirectory)}}var oa=(()=>{let n=class n{constructor(){this.archiveProps={name:"",files:[],compressInDirectory:!0,extension:"tar"},this.submitEvent=new ae,this.disableInDirCompression=!1,this.locale=S(H),this.layout=S(N),this.compression=!1,this.icons={faFileArchive:Ho},this.submitted=!1,this.filesService=S(He)}ngOnInit(){this.disableInDirCompression&&(this.archiveProps.compressInDirectory=!1)}onEnter(){this.onSubmit()}onSubmit(){this.archiveProps.name&&!this.submitted&&(this.submitted=!0,this.filesService.compress(this.archiveProps),this.submitEvent.emit(),this.layout.closeDialog())}setCompression(t){this.archiveProps.extension=t?"tgz":"tar"}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-compression-dialog"]],hostBindings:function(o,r){o&1&&_("keyup.enter",function(){return r.onEnter()},vi)},inputs:{archiveProps:"archiveProps"},outputs:{submitEvent:"submitEvent"},decls:29,vars:16,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate",""],[1,"fs-xs","ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"input-group","input-group-sm"],["appAutofocus","","type","text",1,"form-control","form-control-sm","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"input-group-text"],[2,"min-width","40px"],[1,"form-check","mb-0","mt-2","ps-0"],[1,"form-check-label","ps-1"],["type","checkbox",3,"ngModelChange","ngModel"],["l10nTranslate","",1,"fs-xs","me-1"],[1,"form-check","mb-0","mt-1","ps-0"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["l10nTranslate","",1,"fs-xs"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),g(3,Yu,2,0,"span",3)(4,Xu,2,0,"span",3),a(5,"span",4),d(6),b(7,"translate"),l()(),a(8,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(9,"div",6)(10,"div",7)(11,"input",8),b(12,"translate"),me("ngModelChange",function(u){return de(r.archiveProps.name,u)||(r.archiveProps.name=u),u}),l(),a(13,"div",9)(14,"span",10),d(15),l()()(),a(16,"div",11)(17,"label",12)(18,"input",13),me("ngModelChange",function(u){return de(r.compression,u)||(r.compression=u),u}),_("ngModelChange",function(u){return r.setCompression(u)}),l(),a(19,"span",14),d(20,"Enable compression"),l(),a(21,"small",3),d(22,"(this may take longer)"),l()()(),g(23,Zu,5,1,"div",15),l(),a(24,"div",16)(25,"button",17),_("click",function(){return r.layout.closeDialog()}),d(26,"Cancel"),l(),a(27,"button",18),_("click",function(){return r.onSubmit()}),d(28,"Confirm"),l()()),o&2&&(s(2),m("icon",r.icons.faFileArchive),s(),x(r.archiveProps.compressInDirectory?3:4),s(3),Ie("(",r.archiveProps.files.length," ",E(7,10,r.archiveProps.files.length>1?"items":"item",r.locale.language),")"),s(5),pe("ngModel",r.archiveProps.name),m("placeholder",E(12,13,"Archive name",r.locale.language)),s(4),A(".",r.archiveProps.extension),s(3),pe("ngModel",r.compression),s(5),x(r.disableInDirCompression?-1:23),s(4),m("disabled",!r.archiveProps.name||r.submitted))},dependencies:[F,be,je,Lt,xe,ye,Ye,P,Z],encapsulation:2,changeDetection:0});let i=n;return i})();var I1={"Microsoft Word":".docx","Microsoft Excel":".xlsx","Microsoft PowerPoint":".pptx","Open Document Text":".odt","Open Document Spreadsheet":".ods","Open Document Presentation":".odp","Rich Text Format":".rtf",Text:".txt"};var Ju=["InputText"],ef=(i,n)=>n.key;function tf(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faGlobe)}}function nf(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faFolderClosed)}}function of(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faFileAlt)}}function rf(i,n){if(i&1){let e=y();a(0,"li",20)(1,"a",21),_("click",function(){let o=h(e).$implicit,r=c(3);return C(r.onSelectDocType(o.key))}),d(2),l()()}if(i&2){let e=n.$implicit;s(2),w(e.key)}}function af(i,n){if(i&1&&(a(0,"ul",19),k(1,rf,3,1,"li",20,ef),b(3,"keyvalue"),l()),i&2){let e=c(2);s(),D(E(3,0,e.docTypes,e.originalOrderKeyValue))}}function sf(i,n){if(i&1&&(a(0,"div",7)(1,"button",15)(2,"span",16),d(3),l(),f(4,"fa-icon",17),l(),L(5,af,4,3,"ul",18),l()),i&2){let e=c();s(3),w(e.selectedDocType),s(),m("icon",e.icons.faCaretDown)}}function lf(i,n){if(i&1){let e=y();a(0,"div",8)(1,"span",9),f(2,"fa-icon",3),l(),a(3,"input",22),b(4,"translate"),me("ngModelChange",function(o){h(e);let r=c();return de(r.downloadProp.url,o)||(r.downloadProp.url=o),C(o)}),_("keydown.control.v",function(){h(e);let o=c();return C(o.pasteUrl())})("keydown.meta.v",function(){h(e);let o=c();return C(o.pasteUrl())}),l()()}if(i&2){let e=c();s(2),m("icon",e.icons.faGlobe),s(),pe("ngModel",e.downloadProp.url),m("placeholder",E(4,3,e.downloadProp.placeholder,e.locale.language))}}function cf(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faFolderClosed)}}function pf(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faFileAlt)}}function df(i,n){if(i&1&&(a(0,"span",12),d(1),l()),i&2){let e=c();s(),w(e.error)}}var R1=(()=>{let n=class n{constructor(){this.refreshFiles=new ae,this.locale=S(H),this.layout=S(N),this.originalOrderKeyValue=Fe,this.icons={faCaretDown:Vl,faGlobe:yn,faFolderClosed:sr,faFileAlt:ir},this.fileProp={title:"",name:"",placeholder:""},this.downloadProp={title:"Download from an external link",url:"",placeholder:"URL (https://...)"},this.selectedDocType="Text",this.docTypes=I1,this.submitted=!1,this.filesService=S(He)}ngOnInit(){this.inputType==="download"?(this.fileProp.title="Download from URL",this.fileProp.placeholder="File name"):this.inputType==="file"?(this.fileProp.name=`${this.layout.translateString("New document")}.txt`,this.fileProp.title="New document",this.fileProp.placeholder="Document name",this.updateFileSelection()):(this.fileProp.title="New folder",this.fileProp.placeholder="Folder name")}onSelectDocType(t){this.selectedDocType=t;let o=this.fileNamePosition();this.fileProp.name=`${this.fileProp.name.substring(0,o<0?this.fileProp.name.length:o)}${this.docTypes[t]}`,this.updateFileSelection()}onEnter(){this.fileProp.name&&this.onSubmit()}onSubmit(){if(this.submitted=!0,this.files.find(t=>t.name.toLowerCase()===this.fileProp.name.toLowerCase())){this.error="This name is already used",this.submitted=!1;return}if(this.inputType==="download"){if(!Ac.test(this.downloadProp.url)){this.error="Malformed URL",this.submitted=!1;return}this.filesService.downloadFromUrl(this.downloadProp.url,this.fileProp.name)}else this.filesService.make(this.inputType,this.fileProp.name);this.layout.closeDialog()}pasteUrl(){setTimeout(()=>{this.fileProp.name=this.downloadProp.url.split("/").slice(-1)[0]},200)}fileNamePosition(){return this.fileProp.name.lastIndexOf(".")}updateFileSelection(){setTimeout(()=>{this.inputText.nativeElement.focus(),this.inputText.nativeElement.setSelectionRange(0,this.fileNamePosition())},0)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-files-new-dialog"]],viewQuery:function(o,r){if(o&1&&Y(Ju,7),o&2){let p;G(p=W())&&(r.inputText=p.first)}},hostBindings:function(o,r){o&1&&_("keyup.enter",function(){return r.onEnter()},vi)},inputs:{files:"files",inputType:"inputType"},outputs:{refreshFiles:"refreshFiles"},decls:24,vars:12,consts:[["InputText",""],[1,"modal-header"],[1,"modal-title"],[3,"icon"],["l10nTranslate","",1,"ms-1"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],["dropdown","",1,"btn-group","btn-group-sm","mb-3"],[1,"input-group","input-group-sm","my-2"],[1,"input-group-text"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-xs","text-danger"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["aria-controls","dropdown-animated","dropdownToggle","","id","button-animated","type","button",1,"btn","btn-primary","dropdown-toggle"],["l10nTranslate",""],[1,"ms-3",3,"icon"],["aria-labelledby","button-animated","class","dropdown-menu","id","dropdown-animated","role","menu",4,"dropdownMenu"],["aria-labelledby","button-animated","id","dropdown-animated","role","menu",1,"dropdown-menu"],["role","menuitem"],["l10nTranslate","",1,"dropdown-item",3,"click"],["type","text","appAutofocus","",1,"form-control","fs-xs",3,"ngModelChange","keydown.control.v","keydown.meta.v","ngModel","placeholder"]],template:function(o,r){if(o&1){let p=y();a(0,"div",1)(1,"h4",2),g(2,tf,1,1,"fa-icon",3)(3,nf,1,1,"fa-icon",3)(4,of,1,1,"fa-icon",3),a(5,"span",4),d(6),l()(),a(7,"button",5),_("click",function(){return h(p),C(r.layout.closeDialog())}),l()(),a(8,"div",6),g(9,sf,6,2,"div",7),g(10,lf,5,6,"div",8),a(11,"div",8)(12,"span",9),g(13,cf,1,1,"fa-icon",3)(14,pf,1,1,"fa-icon",3),l(),a(15,"input",10,0),b(17,"translate"),me("ngModelChange",function(v){return h(p),de(r.fileProp.name,v)||(r.fileProp.name=v),C(v)}),l()()(),a(18,"div",11),g(19,df,2,1,"span",12),a(20,"button",13),_("click",function(){return h(p),C(r.layout.closeDialog())}),d(21,"Cancel"),l(),a(22,"button",14),_("click",function(){return h(p),C(r.onSubmit())}),d(23,"Confirm "),l()()}if(o&2){let p;s(2),x((p=r.inputType)==="download"?2:p==="directory"?3:p==="file"?4:-1),s(4),w(r.fileProp.title),s(3),x(r.inputType==="file"?9:-1),s(),x(r.inputType==="download"?10:-1),s(3),x(r.inputType==="directory"?13:14),s(2),pe("ngModel",r.fileProp.name),m("placeholder",E(17,9,r.fileProp.placeholder,r.locale.language)),s(4),x(r.error?19:-1),s(3),m("disabled",!r.fileProp.name||r.inputType==="download"&&!r.downloadProp.url||r.submitted)}},dependencies:[F,P,Ri,Ni,Ii,Pi,be,je,xe,ye,Ye,Z,Ae],encapsulation:2});let i=n;return i})();var V1=i=>({arg:i});function mf(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();m("icon",e.icons.faSpinner)}}function uf(i,n){if(i&1&&(f(0,"div",11),b(1,"translate")),i&2){let e=c(2);m("innerHTML",Dt(1,1,e.permanently?"delete_multiple_files":"trash_multiple_files",e.locale.language,Re(5,V1,e.files.length)),Yn)}}function ff(i,n){if(i&1&&(f(0,"div",11),b(1,"translate")),i&2){let e=c(2);m("innerHTML",Dt(1,1,e.permanently?"delete_one_file":"trash_one_file",e.locale.language,Re(5,V1,e.files[0].name)),Yn)}}function _f(i,n){if(i&1&&g(0,uf,2,7,"div",11)(1,ff,2,7,"div",11),i&2){let e=c();x(e.files.length>1?0:e.files.length===1?1:-1)}}function hf(i,n){if(i&1&&(a(0,"div",3),d(1),l()),i&2){let e=c();s(),w(e.permanently?"Permanent deletion":"Moving to trash")}}var z1=(()=>{let n=class n{constructor(){this.files=[],this.permanently=!1,this.removeFiles=new ae,this.locale=S(H),this.layout=S(N),this.icons={faTrashCan:ki,faSpinner:Ue},this.submitted=!1}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.removeFiles.next(),this.layout.closeDialog())}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-trash-dialog"]],hostBindings:function(o,r){o&1&&_("keyup.enter",function(){return r.onEnter()},vi)},inputs:{files:"files",permanently:"permanently"},outputs:{removeFiles:"removeFiles"},decls:16,vars:4,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"overflow-wrap-and-whitespace"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"innerHTML"]],template:function(o,r){if(o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Trash"),l(),g(5,mf,1,1,"fa-icon",4),l(),a(6,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(7,"div",6)(8,"div",7),g(9,_f,2,1)(10,hf,2,1,"div",3),l()(),a(11,"div",8)(12,"button",9),_("click",function(){return r.layout.closeDialog()}),d(13,"Cancel"),l(),a(14,"button",10),_("click",function(){return r.onSubmit()}),d(15,"Confirm"),l()()),o&2){let p;s(2),m("icon",r.icons.faTrashCan),s(3),x(r.submitted?5:-1),s(4),x((p=r.submitted)===!1?9:p===!0?10:-1),s(5),m("disabled",r.submitted)}},dependencies:[P,F,Z],encapsulation:2,changeDetection:0});let i=n;return i})();function Cf(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();m("icon",e.icons.faSpinner)}}var O1=(()=>{let n=class n{constructor(){this.files=[],this.layout=S(N),this.icons={faTrashCan:ki,faSpinner:Ue},this.submitted=!1,this.filesService=S(He)}onEnter(){this.onSubmit()}onSubmit(){this.submitted||(this.submitted=!0,this.filesService.delete(this.files),this.layout.closeDialog(),this.submitted=!1)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-trash-empty-dialog"]],hostBindings:function(o,r){o&1&&_("keyup.enter",function(){return r.onEnter()},vi)},inputs:{files:"files"},decls:17,vars:3,consts:[[1,"modal-header"],["l10nTranslate","",1,"modal-title"],[1,"me-1",3,"icon"],["l10nTranslate",""],["animation","spin",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Trash"),l(),g(5,Cf,1,1,"fa-icon",4),l(),a(6,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(7,"div",6)(8,"div",3),d(9,"Would you like to empty the trash ?"),l(),a(10,"small",3),d(11,"All items will be permanently deleted"),l()(),a(12,"div",7)(13,"button",8),_("click",function(){return r.layout.closeDialog()}),d(14,"Cancel"),l(),a(15,"button",9),_("click",function(){return r.onSubmit()}),d(16,"Confirm"),l()()),o&2&&(s(2),m("icon",r.icons.faTrashCan),s(3),x(r.submitted?5:-1),s(10),m("disabled",r.submitted))},dependencies:[F,P],encapsulation:2});let i=n;return i})();var Wn={VIEWABLE:new Map([["doc","word"],["docm","word"],["docx","word"],["dot","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["fodt","word"],["gdoc","word"],["htm","word"],["html","word"],["hwp","word"],["hwpx","word"],["mht","word"],["mhtml","word"],["odt","word"],["ott","word"],["pages","word"],["rtf","word"],["stw","word"],["sxw","word"],["wps","word"],["wpt","word"],["csv","cell"],["et","cell"],["ett","cell"],["fods","cell"],["gsheet","cell"],["numbers","cell"],["ods","cell"],["ots","cell"],["sxc","cell"],["xls","cell"],["xlsm","cell"],["xlsx","cell"],["xlt","cell"],["xltm","cell"],["xltx","cell"],["dps","slide"],["dpt","slide"],["fodp","slide"],["gslide","slide"],["key","slide"],["odg","slide"],["odp","slide"],["otp","slide"],["pot","slide"],["potm","slide"],["potx","slide"],["pps","slide"],["ppsm","slide"],["ppsx","slide"],["ppt","slide"],["pptm","slide"],["pptx","slide"],["sxi","slide"],["djvu","pdf"],["docxf","pdf"],["oform","pdf"],["oxps","pdf"],["pdf","pdf"],["xps","pdf"],["vsdm","diagram"],["vsdx","diagram"],["vssm","diagram"],["vssx","diagram"],["vstm","diagram"],["vstx","diagram"]]),EDITABLE:new Map([["doc","word"],["docm","word"],["docx","word"],["dotm","word"],["dotx","word"],["epub","word"],["fb2","word"],["html","word"],["odt","word"],["ott","word"],["rtf","word"],["xlsb","cell"],["xlsm","cell"],["xls","cell"],["xlsx","cell"],["xltm","cell"],["xltx","cell"],["csv","cell"],["ods","cell"],["ots","cell"],["potm","slide"],["potx","slide"],["ppsm","slide"],["ppsx","slide"],["pptm","slide"],["ppt","slide"],["pptx","slide"],["odp","slide"],["otp","slide"],["pdf","pdf"]])};var ra=class{constructor(n,e,t=!1){this.shares=[],this.links=[],this.spaces=[],this.syncs=[],this.newly=0,this.isRenamed=!1,this.isImage=!1,this.isViewable=!1,this.isEditable=!1,this.isCompressible=!0,this.isBeingDeleted=!1,this.isSelected=!1,this.isDisabled=!1,this.canBeReShared=!1,this.haveThumbnail=!1,this.setShares(sc("shares",n)),Object.assign(this,n),this.path=`${e}/${this.path!=="."?`${this.path}/`:""}${this.root?.alias||this.name}`,this.mime=this.getMime(this.mime,t),this.hTimeAgo=ri(this.mtime).fromNow(!0),this.newly=Mn(this.mtime),this.setMimeUrl(),this.setHSize(),this.setRoot(t)}get dataUrl(){return`${zc}/${this.path}`}get taskUrl(){return`${Bc}/${this.path}`}get thumbnailUrl(){return`${Oc}/${this.path}`}fallBackMimeUrl(){this.mimeUrl=Pn}rename(n){this.name=n,this.path=[...this.path.split("/").slice(0,-1),this.name].join("/")}updateMime(n){this.mime=n,this.setMimeUrl()}getType(n){return this.isDir?n?yr:Ut:Dc}getMime(n,e){if(this.isDir)return this.isViewable=!1,this.getType(e);if(n){let t=n.split("-")[0],o=this.name.split(".").pop().toLowerCase();return o===li.PDF?(this.shortMime=li.PDF,this.isViewable=!0,this.isEditable=Wn.EDITABLE.has(o)):Wn.EDITABLE.has(o)||Wn.VIEWABLE.has(o)?(this.shortMime=li.DOCUMENT,this.isEditable=Wn.EDITABLE.has(o),this.isViewable=this.isEditable||Wn.VIEWABLE.has(o)):o==="mp4"?(this.isViewable=!0,this.shortMime=li.MEDIA,this.haveThumbnail=!0):t===li.IMAGE?(this.shortMime=li.IMAGE,this.isImage=!0,this.isViewable=!0,this.haveThumbnail=!0):["video","audio"].indexOf(t)>-1?(this.shortMime=li.MEDIA,this.isViewable=!0,this.haveThumbnail=!0):Pc.has(n)?(this.isCompressible=!1,this.isViewable=!1):Nc.has(o)||(this.isViewable=!0,this.isEditable=!0,this.shortMime=li.TEXT),n}else return this.isViewable=!0,this.shortMime=li.TEXT,this.getType(e)}setMimeUrl(){this.mimeUrl=Ji(this.mime)}setRoot(n){this.root&&(this.root.enabled===!1&&(this.isDisabled=!0),this.root.hPerms=vc(this.root.permissions,this.isDir?[]:[De.DELETE,De.ADD]),this.root?.owner?.login&&(this.root.owner.avatarUrl=Li(this.root.owner.login)),this.canBeReShared=n&&De.SHARE_OUTSIDE in this.root.hPerms)}setHSize(){this.hSize=this.isDir?"\u25CF":pr(this.size,0,!0)}setShares(n){if(n?.length)for(let e of n)e.type===0?this.shares.push(e):this.links.push(e)}};var gf=["InputRename"],xf=(i,n)=>n.alias,Sf=(i,n)=>n.key;function vf(i,n){if(i&1&&f(0,"app-user-avatar",14)(1,"div",9),i&2){let e=c().$implicit;m("user",e.owner)}}function yf(i,n){if(i&1){let e=y();a(0,"input",15,0),_("updateObject",function(o){h(e);let r=c(2);return C(r.onRenameRoot(o))}),l()}if(i&2){let e=c().$implicit;m("inputObject",e)("fullWidth",!0)}}function bf(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c(2).$implicit;s(),w(e.externalPath)}}function wf(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"pathSlice"),l()),i&2){let e=c(2).$implicit;s(),w(E(2,1,e.file.path,-2))}}function Tf(i,n){if(i&1&&(a(0,"div",16)(1,"span"),d(2),l()(),a(3,"div",17),g(4,bf,2,1,"span")(5,wf,3,4,"span"),l()),i&2){let e=c().$implicit,t=c();s(2),w(e.name),s(2),x(t.user.isAdmin&&e.externalPath?4:5)}}function Ef(i,n){if(i&1&&(a(0,"div",7)(1,"div",18),d(2),l(),a(3,"div",18),d(4),b(5,"amTimeAgo"),l()()),i&2){let e=c().$implicit;s(2),w(e.alias),s(2),w(q(5,2,e.createdAt))}}function Mf(i,n){if(i&1){let e=y();a(0,"button",21),b(1,"translate"),me("ngModelChange",function(o){h(e);let r=c().$implicit,p=c().$implicit;return de(p.hPerms[r.key],o)||(p.hPerms[r.key]=o),C(o)}),_("ngModelChange",function(){h(e);let o=c(2).$implicit,r=c();return C(r.onPermissionChange(o))}),f(2,"fa-icon",22),l()}if(i&2){let e=c().$implicit,t=c().$implicit,o=c();V(X("btn btn-sm btn-custom ",!t.isDir&&(e.key==="a"||e.key==="d")?"disabled":"")),pe("ngModel",t.hPerms[e.key]),m("tooltip",E(1,6,o.SPACES_PERMISSIONS_TEXT[e.key].text,o.locale.language)),s(2),m("icon",o.SPACES_PERMISSIONS_TEXT[e.key].icon)}}function Af(i,n){if(i&1&&(a(0,"button",23),b(1,"translate"),f(2,"fa-icon",22),l()),i&2){let e=c().$implicit,t=c().$implicit,o=c();z("active",t.hPerms[e.key]),m("tooltip",E(1,4,o.SPACES_PERMISSIONS_TEXT[e.key].text,o.locale.language)),s(2),m("icon",o.SPACES_PERMISSIONS_TEXT[e.key].icon)}}function kf(i,n){if(i&1&&g(0,Mf,3,9,"button",19)(1,Af,3,7,"button",20),i&2){let e=c().$implicit,t=c();x(!(e.owner!=null&&e.owner.id)&&t.user.isAdmin||(e.owner==null?null:e.owner.id)===t.user.id?0:1)}}function Df(i,n){if(i&1){let e=y();a(0,"div",1)(1,"div",2)(2,"div",3),g(3,vf,2,1),f(4,"img",4),a(5,"div",5),g(6,yf,2,2,"input",6)(7,Tf,6,2),l()(),g(8,Ef,6,4,"div",7),a(9,"div",8),f(10,"div",9),k(11,kf,2,1,null,null,Sf),b(13,"keyvalue"),f(14,"div",10),a(15,"button",11),b(16,"translate"),_("click",function(){let o=h(e).$implicit,r=c();return C(r.setRenamed(o))}),f(17,"fa-icon",12),l(),a(18,"button",13),b(19,"translate"),_("click",function(){let o=h(e).$implicit,r=c();return C(r.removeRoot(o))}),f(20,"fa-icon",12),l()()()()}if(i&2){let e=n.$implicit,t=c();s(3),x(t.showUsers?3:-1),s(),z("cursor-pointer",!!e.file.path),m("src",e.file.mimeUrl,ee)("tooltip",e.file.path),s(2),x(e.isRenamed?6:7),s(2),x(t.showInfo?8:-1),s(3),D(E(13,14,e.hPerms,t.originalOrderKeyValue)),s(4),V(X("btn btn-sm ",e.isRenamed?"btn-success":"btn-custom"," me-2")),m("tooltip",E(16,17,"Rename",t.locale.language)),s(2),m("icon",t.icons.faPen),s(),m("tooltip",E(19,20,"Remove",t.locale.language)),s(2),m("icon",t.icons.faTimes)}}var qn=(()=>{let n=class n{constructor(){this.showInfo=!0,this.showUsers=!0,this.addRootFile=null,this.locale=S(H),this.icons={faTimes:Nt,faPen:mt},this.SPACES_PERMISSIONS_TEXT=Cc,this.originalOrderKeyValue=Fe,this.subscription=null}ngOnInit(){this.addRootFile&&(this.subscription=this.addRootFile.subscribe(t=>this.addRoot(t)))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}addRoot(t){let o={id:0,alias:ao(t.name,"alias",this.space.roots).toLowerCase(),name:ao(t.name,"name",this.space.roots),permissions:"",createdAt:new Date};t.externalPath?(o.externalPath=t.externalPath,o.owner={id:null,login:null,email:null,fullName:null},o.file={id:0,path:null,mime:null}):(o.externalPath=null,o.owner={id:this.user.id,login:this.user.login,email:this.user.email,fullName:this.user.fullName},o.file={id:t.id,path:t.path,mime:t.mime}),this.space.addRoot(o,!0)}removeRoot(t){this.space.roots=this.space.roots.filter(o=>t.alias!==o.alias)}onRenameRoot(t){let o=t.object;o.alias=ao(rc(t.name,!0),"alias",this.space.roots.filter(r=>r.id!==o.id)).toLowerCase(),o.name=ao(t.name.replace(nc,""),"name",this.space.roots.filter(r=>r.id!==o.id))}onPermissionChange(t){t.permissions=yc(t.hPerms)}setRenamed(t){t.isRenamed?(this.onRenameRoot({object:t,name:this.inputRename.nativeElement.value}),t.isRenamed=!1):t.isRenamed=!0}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-manage-roots"]],viewQuery:function(o,r){if(o&1&&Y(gf,5),o&2){let p;G(p=W())&&(r.inputRename=p.first)}},inputs:{space:"space",user:"user",showInfo:"showInfo",showUsers:"showUsers",addRootFile:"addRootFile"},decls:2,vars:0,consts:[["InputRename",""],[1,"bg-theme","mb-1","p-2",2,"border-radius","4px"],[1,"d-flex","align-items-center","text-truncate","no-select","fs-xs",2,"height","32px"],[1,"d-flex","align-items-center","text-truncate","me-auto"],["draggable","false","height","30","width","30","alt","",3,"src","tooltip"],[1,"d-flex","flex-column","text-truncate","ms-2"],["appInputEdit","","type","text","required","",3,"inputObject","fullWidth"],[1,"d-flex","flex-column","fs-xxxs","text-muted","d-none","d-lg-block","ms-3"],[1,"d-flex","no-select"],[1,"vr","mx-2"],[1,"vr","ms-1","me-2"],["type","button",3,"click","tooltip"],[3,"icon"],["type","button",1,"btn","btn-sm","btn-danger",3,"click","tooltip"],["tooltipPlacement","bottom",3,"user"],["appInputEdit","","type","text","required","",3,"updateObject","inputObject","fullWidth"],[1,"text-truncate"],[1,"d-none","d-lg-block","fs-xxxs","text-truncate"],[1,"d-flex","justify-content-end"],["btnCheckbox","","type","button",3,"ngModel","tooltip","class"],["type","button",1,"btn","btn-sm","btn-custom","disabled",3,"tooltip","active"],["btnCheckbox","","type","button",3,"ngModelChange","ngModel","tooltip"],["size","lg",3,"icon"],["type","button",1,"btn","btn-sm","btn-custom","disabled",3,"tooltip"]],template:function(o,r){o&1&&k(0,Df,21,23,"div",1,xf),o&2&&D(r.space.roots)},dependencies:[wc,An,F,Ze,Ke,ke,be,xe,ye,na,Ae,Z,Je,Xr],encapsulation:2});let i=n;return i})();function Ff(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();m("icon",e.icons.faSpinner)}}var B1=(()=>{let n=class n{constructor(){this.addAnchoredFiles=new ae,this.locale=S(H),this.layout=S(N),this.icons={faAnchor:oi,faPlus:Qe,faSpinner:Ue,SPACES:ie.SPACES},this.space={roots:[]},this.submitted=!1,this.loading=!1,this.userService=S(oe),this.user=this.userService.user,this.spacesService=S(ot)}ngOnInit(){for(let t of this.files)this.space.roots.push({id:t.id,name:t.name,alias:t.name,permissions:"",createdAt:new Date,isRenamed:!1,hPerms:Sc("",[De.SHARE_INSIDE]),isDir:t.mime===Ut,owner:{id:this.user.id,login:this.user.login},file:t})}onSetSpace(t){this.selectedSpace=t}onSearchSpaces(t){return this.spacesService.searchSpaces({search:t,shareInsidePermission:!0,limit:6})}onSubmit(){!this.selectedSpace||!this.space.roots.length||(this.loading=!0,this.submitted=!0,this.spacesService.createUserSpaceRoots(this.selectedSpace.id,this.space.roots).subscribe({next:t=>{t.length&&this.addAnchoredFiles.emit({space:this.selectedSpace,rootFiles:t.map(o=>({id:o.file.id,name:o.file.path.split("/").at(-1)}))}),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Anchor files to a space",t.error.message),this.loading=!1,this.submitted=!1}}))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-anchor-file-dialog"]],inputs:{files:"files"},decls:22,vars:14,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"mb-3"],["for","space","l10nTranslate",""],["id","space",3,"data","searchFunction","active","itemIcon","placeholder"],["for","files","l10nTranslate",""],["id","files",3,"space","user","showInfo","showUsers"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Anchor files to a space"),l()(),g(5,Ff,1,1,"fa-icon",4),a(6,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(7,"div",6)(8,"div",7)(9,"label",8),d(10,"Space"),l(),a(11,"app-select",9),b(12,"translate"),_("data",function(u){return r.onSetSpace(u)}),l()(),a(13,"div",7)(14,"label",10),d(15,"Files"),l(),f(16,"app-space-manage-roots",11),l()(),a(17,"div",12)(18,"button",13),_("click",function(){return r.layout.closeDialog()}),d(19,"Cancel"),l(),a(20,"button",14),_("click",function(){return r.onSubmit()}),d(21," Confirm "),l()()),o&2&&(s(2),m("icon",r.icons.faAnchor),s(3),x(r.loading?5:-1),s(6),m("searchFunction",r.onSearchSpaces.bind(r))("active",r.selectedSpace)("itemIcon",r.icons.SPACES)("placeholder",E(12,11,"Type to search for space to select",r.locale.language)),s(5),m("space",r.space)("user",r.user)("showInfo",!1)("showUsers",!1),s(4),m("disabled",r.submitted||!r.selectedSpace||!r.space.roots.length))},dependencies:[F,P,qn,kc,Z],encapsulation:2});let i=n;return i})();var Lf=["MainContextMenu"],Pf=["MainReadOnlyContextMenu"],Nf=["FileContextMenu"],If=i=>({nb:i}),Rf=()=>({isMultiple:!0}),Vf=()=>({isDirectory:!0}),U1=(i,n)=>n.id,H1=(i,n)=>n.key;function zf(i,n){if(i&1){let e=y();a(0,"a",33),_("uploadFiles",function(o){h(e);let r=c(3);return C(r.onUploadFiles(o,!0))}),a(1,"span",22),f(2,"fa-icon",10),d(3,"Upload folders"),l()()}if(i&2){let e=c(3);m("options",Tt(2,Vf)),s(2),m("icon",e.icons.faUpload)}}function Of(i,n){if(i&1){let e=y();a(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openNewDialog("directory"))}),a(3,"span",22),f(4,"fa-icon",10),d(5,"New folder"),l()()(),a(6,"li",29)(7,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openNewDialog("file"))}),a(8,"span",22),f(9,"fa-icon",10),d(10,"New document"),l()()(),a(11,"li",29)(12,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openNewDialog("download"))}),a(13,"span",22),f(14,"fa-icon",10),d(15,"Download from URL"),l()()(),a(16,"li",29)(17,"a",31),_("uploadFiles",function(o){h(e);let r=c(2);return C(r.onUploadFiles(o))}),a(18,"span",22),f(19,"fa-icon",10),d(20,"Upload files"),l()(),g(21,zf,4,3,"a",32),l()()}if(i&2){let e=c(2);s(4),m("icon",e.icons.PERSONAL),s(5),m("icon",e.icons.faFileAlt),s(5),m("icon",e.icons.faGlobe),s(3),m("options",Tt(6,Rf)),s(2),m("icon",e.icons.faUpload),s(2),x(e.supportUploadFolder?21:-1)}}function Bf(i,n){if(i&1){let e=y();a(0,"div",26),_("onShown",function(){h(e);let o=c();return C(o.initUpload())}),a(1,"button",27),b(2,"translate"),f(3,"fa-icon",10),l(),L(4,Of,22,7,"ul",13),l()}if(i&2){let e=c();s(),m("tooltip",E(2,2,"New",e.locale.language)),s(2),m("icon",e.icons.faPlus)}}function Uf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.openSpaceAnchorFileDialog())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Anchor to a space"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faAnchor)}}function Hf(i,n){if(i&1){let e=y();a(0,"ul",28)(1,"li",29)(2,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openShareDialog())}),a(3,"span",22),f(4,"fa-icon",10),d(5,"New share"),l()()(),a(6,"li",29)(7,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openShareLinkDialog())}),a(8,"span",22),f(9,"fa-icon",10),d(10,"New share link"),l()()(),g(11,Uf,5,1,"li",29),l()}if(i&2){let e=c(2);s(4),m("icon",e.icons.SHARES),s(5),m("icon",e.icons.faLink),s(2),x(e.isFilesRepo?11:-1)}}function $f(i,n){if(i&1&&(a(0,"div",11)(1,"button",27),b(2,"translate"),f(3,"fa-icon",10),l(),L(4,Hf,12,3,"ul",13),l()),i&2){let e=c();m("isDisabled",!e.hasSelection||e.inSharesList&&!e.selection[0].canBeReShared),s(),m("tooltip",E(2,3,"Share",e.locale.language)),s(2),m("icon",e.icons.SHARES)}}function Gf(i,n){if(i&1){let e=y();a(0,"button",9),b(1,"translate"),_("click",function(){h(e);let o=c(2);return C(o.openEmptyTrashDialog())}),f(2,"fa-icon",10),l()}if(i&2){let e=c(2);m("disabled",!e.stats.elements)("tooltip",E(1,3,"Empty",e.locale.language)),s(2),m("icon",e.icons.TRASH)}}function Wf(i,n){if(i&1){let e=y();a(0,"button",9),b(1,"translate"),_("click",function(){h(e);let o=c();return C(o.openTrashDialog(!0))}),f(2,"fa-icon",10),l(),g(3,Gf,3,6,"button",34)}if(i&2){let e=c();m("disabled",!e.hasSelection)("tooltip",E(1,4,"Remove",e.locale.language)),s(2),m("icon",e.icons.faBan),s(),x(e.inRootSpace?3:-1)}}function qf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.shortcutView())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"View"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faEye)}}function jf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.shortcutEdit())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Edit"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faPen)}}function Kf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.shortcutRename())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Rename"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faSpellCheck)}}function Qf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.addToSync())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Synchronize"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faRotate)}}function Yf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(3);return C(o.decompressFile())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Decompress"),l()()()}if(i&2){let e=c(3);s(3),m("icon",e.icons.faFileArchive)}}function Xf(i,n){if(i&1){let e=y();g(0,qf,5,1,"li",29),g(1,jf,5,1,"li",29),g(2,Kf,5,1,"li",29),a(3,"li",29)(4,"a",30),_("click",function(){h(e);let o=c(2);return C(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),a(5,"span",22),f(6,"fa-icon",10),d(7,"Comment"),l()()(),g(8,Qf,5,1,"li",29),g(9,Yf,5,1,"li",29)}if(i&2){let e=c(2);x(e.selection[0].isViewable?0:-1),s(),x(e.selection[0].isEditable?1:-1),s(),x(e.inSharesList?-1:2),s(4),m("icon",e.icons.faCommentDots),s(2),x(e.isElectronApp&&e.selection[0].isDir?8:-1),s(),x(!e.inSharesList&&!e.selection[0].isCompressible?9:-1)}}function Zf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(2);return C(o.openCompressionDialog())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Compress"),l()()()}if(i&2){let e=c(2);s(3),m("icon",e.icons.faFileArchive)}}function Jf(i,n){if(i&1){let e=y();a(0,"li",29)(1,"a",30),_("click",function(){h(e);let o=c(2);return C(o.copyMoveFiles())}),a(2,"span",22),f(3,"fa-icon",10),d(4,"Copy/Move"),l()()()}if(i&2){let e=c(2);s(3),m("icon",e.icons.faArrowsAlt)}}function e_(i,n){if(i&1){let e=y();a(0,"a",30),_("click",function(){h(e);let o=c(3);return C(o.openTrashDialog(!0))}),a(1,"span",22),f(2,"fa-icon",10),d(3,"Remove"),l()()}if(i&2){let e=c(3);s(2),m("icon",e.icons.faBan)}}function t_(i,n){if(i&1){let e=y();a(0,"a",30),_("click",function(){h(e);let o=c(3);return C(o.openTrashDialog())}),a(1,"span",22),f(2,"fa-icon",10),d(3,"Trash"),l()()}if(i&2){let e=c(3);s(2),m("icon",e.icons.TRASH)}}function i_(i,n){if(i&1&&(f(0,"li",35),a(1,"li",29),g(2,e_,4,1,"a",36)(3,t_,4,1,"a",36),l()),i&2){let e=c(2);s(2),x(e.isTrashRepo?2:3)}}function n_(i,n){if(i&1){let e=y();a(0,"ul",28),g(1,Xf,10,6),g(2,Zf,5,1,"li",29),g(3,Jf,5,1,"li",29),a(4,"li",29)(5,"a",30),_("click",function(){h(e);let o=c();return C(o.addToClipboard())}),a(6,"span",22),f(7,"fa-icon",10),d(8,"Clipboard"),l()()(),a(9,"li",29)(10,"a",30),_("click",function(){h(e);let o=c();return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION))}),a(11,"span",22),f(12,"fa-icon",10),d(13,"Info"),l()()(),g(14,i_,4,1),l()}if(i&2){let e=c();s(),x(e.selection.length===1?1:-1),s(),x(e.canCompress?2:-1),s(),x(e.hasDisabledItemsInSelection?-1:3),s(4),m("icon",e.icons.faClipboardList),s(5),m("icon",e.icons.faCircleInfo),s(2),x(e.inSharesList?-1:14)}}function o_(i,n){i&1&&f(0,"div")}function r_(i,n){if(i&1){let e=y();a(0,"img",56),_("error",function(){h(e);let o=c().$implicit;return C(o.isImage=!1)}),l()}if(i&2){let e=c().$implicit,t=c(2);O("max-height",t.galleryMode.image,"px"),m("src",wt("",e.thumbnailUrl,"?size=",t.galleryMode.imageRes),ee)}}function a_(i,n){if(i&1){let e=y();a(0,"img",57),_("error",function(){h(e);let o=c().$implicit;return C(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(2);m("src",e.mimeUrl,ee)("height",t.galleryMode.image)("width",t.galleryMode.image)}}function s_(i,n){if(i&1){let e=y();a(0,"span",58),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.openLockDialog(o))}),f(1,"fa-icon",10),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),m("tooltip",xa(e.lock.owner)),s(),m("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function l_(i,n){if(i&1){let e=y();a(0,"span",59),_("click",function(){h(e);let o=c(3);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),m("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length," ")}}function c_(i,n){if(i&1){let e=y();a(0,"span",60),_("click",function(){h(e);let o=c(3);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),m("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length," ")}}function p_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(3);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),m("icon",t.icons.LINKS),s(),A("\xA0",e.links.length," ")}}function d_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(3);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),m("icon",t.icons.SYNC),s(),A("\xA0",e.syncs.length," ")}}function m_(i,n){if(i&1){let e=y();a(0,"span",62),_("click",function(){h(e);let o=c(3);return C(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),f(1,"fa-icon",10),l()}if(i&2){let e=c(3);O("font-size",e.galleryMode.textSize,"px"),s(),m("icon",e.icons.faCommentDots)}}function u_(i,n){if(i&1&&(a(0,"span",51),f(1,"app-user-avatar",63),l()),i&2){let e=c().$implicit,t=c(2);s(),m("user",e.root.owner)("height",t.galleryMode.dimensions/3)("width",t.galleryMode.dimensions/3)("fontSize",t.galleryMode.faSize/2)}}function f_(i,n){if(i&1&&(a(0,"span",52)(1,"span",64),d(2),l()()),i&2){let e=c().$implicit,t=c(2);s(),O("font-size",t.galleryMode.textSize,"px"),s(),w(e.hTimeAgo)}}function __(i,n){if(i&1){let e=y();a(0,"input",65),_("renamingInProgress",function(o){h(e);let r=c(3);return C(r.setRenamingInProgress(o))})("updateObject",function(o){h(e);let r=c(3);return C(r.renameFile(o))}),l()}if(i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),m("inputObject",e)("fullWidth",!0)("textCenter",!0)}}function h_(i,n){if(i&1&&(a(0,"span",66),d(1),l()),i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),w(e.name)}}function C_(i,n){if(i&1){let e=y();a(0,"div",41),_("click",function(o){let r=h(e).$implicit,p=c(2);return C(p.onSelect(o,r))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),a(1,"div",42),g(2,r_,1,5,"img",43)(3,a_,1,3,"img",44),a(4,"span",45),g(5,s_,2,5,"span",46),g(6,l_,3,4,"span",47),g(7,c_,3,4,"span",48),g(8,p_,3,4,"span",49),g(9,d_,3,4,"span",49),g(10,m_,2,3,"span",50),l(),g(11,u_,2,4,"span",51),g(12,f_,3,3,"span",52),l(),a(13,"div",53),g(14,__,1,5,"input",54)(15,h_,2,3,"span",55),l()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);O("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),z("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),s(),Jt("rowIndex",t),s(),x(e.isImage?2:3),s(3),x(e.lock?5:-1),s(),x(e.shares.length?6:-1),s(),x(e.spaces.length?7:-1),s(),x(e.links.length?8:-1),s(),x(e.syncs.length?9:-1),s(),x(e.hasComments?10:-1),s(),x(e.root?11:-1),s(),x(e.newly?12:-1),s(2),x(e.isRenamed?14:15)}}function g_(i,n){if(i&1){let e=y();a(0,"div",18)(1,"app-virtual-scroll",37),b(2,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),L(3,o_,1,0,"div",38),a(4,"div",39),k(5,C_,16,21,"div",40,U1),l()()()}if(i&2){let e=c(),t=Be(33);s(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",Dt(2,6,e.files,e.inputFilter.search(),"name"))("galleryMode",!0)("resizeOffset",110),s(2),m("ngTemplateOutlet",t),s(2),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function x_(i,n){if(i&1&&f(0,"fa-icon",73),i&2){let e=c(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function S_(i,n){if(i&1){let e=y();a(0,"th",72),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.sortBy(o.key))}),d(1),g(2,x_,1,2,"fa-icon",73),l()}if(i&2){let e=c().$implicit,t=c(2);V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function v_(i,n){if(i&1&&g(0,S_,3,10,"th",71),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function y_(i,n){i&1&&f(0,"div")}function b_(i,n){if(i&1){let e=y();a(0,"input",80),_("renamingInProgress",function(o){h(e);let r=c(6);return C(r.setRenamingInProgress(o))})("updateObject",function(o){h(e);let r=c(6);return C(r.renameFile(o))}),l()}if(i&2){let e=c(4).$implicit;m("inputObject",e)}}function w_(i,n){if(i&1&&(a(0,"span",81),d(1),l()),i&2){let e=c(5).$implicit;s(),w(e.root.description)}}function T_(i,n){if(i&1&&(a(0,"div",79)(1,"span",66),d(2),l(),g(3,w_,2,1,"span",81),l()),i&2){let e=c(4).$implicit,t=c(2);s(2),w(e.name),s(),x(t.inSharesList&&(e.root!=null&&e.root.description)?3:-1)}}function E_(i,n){if(i&1){let e=y();a(0,"div",76)(1,"img",77),_("error",function(){h(e);let o=c(3).$implicit;return C(o.fallBackMimeUrl())}),l(),g(2,b_,1,1,"input",78)(3,T_,4,2,"div",79),l()}if(i&2){let e=c(3).$implicit;s(),m("src",e.mimeUrl,ee),s(),x(e.isRenamed?2:3)}}function M_(i,n){if(i&1&&(a(0,"div",82),f(1,"app-user-avatar",83),l()),i&2){let e=c(4).$implicit;s(),m("user",e.root.owner)}}function A_(i,n){if(i&1&&g(0,M_,2,1,"div",82),i&2){let e=c(3).$implicit;x(e.root?0:-1)}}function k_(i,n){if(i&1){let e=y();a(0,"span",87),_("click",function(){h(e);let o=c(4).$implicit,r=c(2);return C(r.openLockDialog(o))}),f(1,"fa-icon",10),l()}if(i&2){let e=c(4).$implicit,t=c(2);m("tooltip",xa(e.lock.owner)),s(),m("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faLockOpen)}}function D_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(6);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length," ")}}function F_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(6);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.LINKS),s(),A("\xA0",e.links.length," ")}}function L_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(6);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length," ")}}function P_(i,n){if(i&1){let e=y();a(0,"span",61),_("click",function(){h(e);let o=c(6);return C(o.layout.showRSideBarTab(o.TAB_MENU.SELECTION,!0))}),f(1,"fa-icon",10),d(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.SYNC),s(),A("\xA0",e.syncs.length," ")}}function N_(i,n){if(i&1){let e=y();a(0,"span",62),_("click",function(){h(e);let o=c(6);return C(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),f(1,"fa-icon",10),l()}if(i&2){let e=c(6);s(),m("icon",e.icons.faCommentDots)}}function I_(i,n){if(i&1&&(g(0,k_,2,3,"span",84),g(1,D_,3,2,"span",85),g(2,F_,3,2,"span",85),g(3,L_,3,2,"span",85),g(4,P_,3,2,"span",85),g(5,N_,2,1,"span",86)),i&2){let e=c(3).$implicit;x(e.lock?0:-1),s(),x(e.shares.length?1:-1),s(),x(e.links.length?2:-1),s(),x(e.spaces.length?3:-1),s(),x(e.syncs.length?4:-1),s(),x(e.hasComments?5:-1)}}function R_(i,n){if(i&1&&f(0,"app-file-permissions",88),i&2){let e=c(4).$implicit;m("permissions",e.root.hPerms)}}function V_(i,n){if(i&1&&g(0,R_,1,1,"app-file-permissions",88),i&2){let e=c(3).$implicit;x(e.root&&e.root.permissions?0:-1)}}function z_(i,n){if(i&1&&d(0),i&2){let e=c(3).$implicit;A(" ",e.hSize," ")}}function O_(i,n){if(i&1&&d(0),i&2){let e=c(3).$implicit;A(" ",e.hTimeAgo," ")}}function B_(i,n){if(i&1&&(a(0,"td"),g(1,E_,4,2,"div",76)(2,A_,1,1)(3,I_,6,6)(4,V_,1,1)(5,z_,1,1)(6,O_,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="anchored"?2:e==="info"?3:e==="permissions"?4:e==="size"?5:e==="mtime"?6:-1)}}function U_(i,n){if(i&1&&g(0,B_,7,9,"td",75),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function H_(i,n){if(i&1){let e=y();a(0,"tr",74),_("click",function(o){let r=h(e).$implicit,p=c(2);return C(p.onSelect(o,r))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),k(1,U_,1,1,null,null,H1),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);z("disabled",e.isDisabled)("deleted",e.isBeingDeleted)("selected",e.isSelected),s(),D(E(3,6,t.tableHeaders,t.originalOrderKeyValue))}}function $_(i,n){if(i&1){let e=y();a(0,"table",67)(1,"thead")(2,"tr"),k(3,v_,1,1,null,null,H1),b(5,"keyvalue"),l()()(),a(6,"app-virtual-scroll",68),b(7,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),L(8,y_,1,0,"div",38),a(9,"table",67)(10,"tbody",69),k(11,H_,4,9,"tr",70,U1),l()()()}if(i&2){let e=c(),t=Be(33);s(3),D(E(5,3,e.tableHeaders,e.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",Dt(7,6,e.files,e.inputFilter.search(),"name")),s(2),m("ngTemplateOutlet",t),s(3),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function G_(i,n){if(i&1&&(a(0,"span",20),d(1),b(2,"translate"),l()),i&2){let e=c();s(),Ie("",e.stats.dirs," ",E(2,2,e.stats.dirs>1?"directories":"directory",e.locale.language))}}function W_(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"translate"),l()),i&2){let e=c();s(),Ie("",e.stats.files," ",E(2,2,e.stats.files>1?"files":"file",e.locale.language))}}function q_(i,n){i&1&&(a(0,"div",89)(1,"span",22),d(2,"Forbidden resource"),l()())}function j_(i,n){i&1&&(a(0,"div",89)(1,"span",22),d(2,"Location not found"),l()())}function K_(i,n){i&1&&(a(0,"div",89)(1,"span",22),d(2,"Server Error"),l()())}function Q_(i,n){i&1&&(a(0,"div",90)(1,"span",22),d(2,"Drag and drop your files here"),l()())}function Y_(i,n){if(i&1&&g(0,q_,3,0,"div",89)(1,j_,3,0,"div",89)(2,K_,3,0,"div",89)(3,Q_,3,0,"div",90),i&2){let e=c();x(e.forbiddenResource?0:e.locationNotFound?1:e.serverError?2:!e.isTrashRepo&&!e.loading&&!e.stats.elements?3:-1)}}function X_(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"View"),l()),i&2){let e=c(3);s(),m("icon",e.icons.faEye)}}function Z_(i,n){if(i&1){let e=y();L(0,X_,3,1,"ng-template",25),_("execute",function(){h(e);let o=c(2);return C(o.shortcutView())})}}function J_(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Edit"),l()),i&2){let e=c(3);s(),m("icon",e.icons.faPen)}}function eh(i,n){if(i&1){let e=y();L(0,J_,3,1,"ng-template",25),_("execute",function(){h(e);let o=c(2);return C(o.shortcutEdit())})}}function th(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Rename"),l()),i&2){let e=c(3);s(),m("icon",e.icons.faSpellCheck)}}function ih(i,n){if(i&1){let e=y();L(0,th,3,1,"ng-template",25),_("execute",function(){h(e);let o=c(2);return C(o.shortcutRename())})}}function nh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Comment"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faCommentDots)}}function oh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Synchronize"),l()),i&2){let e=c(3);s(),m("icon",e.icons.faRotate)}}function rh(i,n){if(i&1){let e=y();L(0,oh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c(2);return C(o.addToSync())})}}function ah(i,n){if(i&1){let e=y();g(0,Z_,1,0,null,23),g(1,eh,1,0,null,23),g(2,ih,1,0,null,23),L(3,nh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.layout.showRSideBarTab(o.TAB_MENU.COMMENTS,!0))}),g(4,rh,1,0,null,23)}if(i&2){let e=c();x(e.selection[0].isViewable?0:-1),s(),x(e.selection[0].isEditable?1:-1),s(),x(e.inSharesList?-1:2),s(2),x(e.isElectronApp&&e.selection[0].isDir?4:-1)}}function sh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Compress"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faFileArchive)}}function lh(i,n){if(i&1){let e=y();L(0,sh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openCompressionDialog())})}}function ch(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Decompress"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faFileArchive)}}function ph(i,n){if(i&1){let e=y();L(0,ch,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.decompressFile())})}}function dh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Copy/Move"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faArrowsAlt)}}function mh(i,n){if(i&1){let e=y();L(0,dh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.copyMoveFiles())})}}function uh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Share"),l()),i&2){let e=c(2);s(),m("icon",e.icons.SHARES)}}function fh(i,n){if(i&1&&L(0,uh,3,1,"ng-template",24),i&2){c();let e=Be(46);m("subMenu",e)}}function _h(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Clipboard"),l()),i&2){let e=c();s(),m("icon",e.icons.faClipboardList)}}function hh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Download"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faDownload)}}function Ch(i,n){if(i&1){let e=y();L(0,hh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.downloadFiles())})}}function gh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Info"),l()),i&2){let e=c();s(),m("icon",e.icons.faCircleInfo)}}function xh(i,n){}function Sh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2),l()),i&2){let e=c(2);s(),m("icon",e.isTrashRepo?e.icons.faBan:e.icons.TRASH),s(),A(" ",e.isTrashRepo?"Remove":"Trash")}}function vh(i,n){if(i&1){let e=y();L(0,xh,0,0,"ng-template",91)(1,Sh,3,2,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openTrashDialog(o.isTrashRepo))})}i&2&&m("divider",!0)}function yh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"New share"),l()),i&2){let e=c();s(),m("icon",e.icons.SHARES)}}function bh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"New share link"),l()),i&2){let e=c();s(),m("icon",e.icons.faLink)}}function wh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Anchor to a space"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faAnchor)}}function Th(i,n){if(i&1){let e=y();L(0,wh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openSpaceAnchorFileDialog())})}}function Eh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Empty"),l()),i&2){let e=c();s(),m("icon",e.icons.TRASH)}}function Mh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Refresh"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faArrowRotateRight)}}function Ah(i,n){if(i&1){let e=y();L(0,Mh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.loadFiles())})}}function kh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"New folder"),l()),i&2){let e=c(2);s(),m("icon",e.icons.PERSONAL)}}function Dh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"New document"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faFileAlt)}}function Fh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Download from URL"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faGlobe)}}function Lh(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Upload files"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faUpload)}}function Ph(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",10),d(2,"Upload folders"),l()),i&2){let e=c(3);s(),m("icon",e.icons.faUpload)}}function Nh(i,n){if(i&1){let e=y();L(0,Ph,3,1,"ng-template",25),_("execute",function(){h(e);let o=c(2);return C(o.shortcutUploadFolders())})}}function Ih(i,n){if(i&1){let e=y();L(0,kh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openNewDialog("directory"))}),L(1,Dh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openNewDialog("file"))}),L(2,Fh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.openNewDialog("download"))}),L(3,Lh,3,1,"ng-template",25),_("execute",function(){h(e);let o=c();return C(o.shortcutUploadFiles())}),g(4,Nh,1,0,null,23)}if(i&2){let e=c();s(4),x(e.supportUploadFolder?4:-1)}}var aa=(()=>{let n=class n{constructor(){this.locale=S(H),this.layout=S(N),this.icons={SPACES:ie.SPACES,SHARES:ie.SHARES,TRASH:ie.TRASH,PERSONAL:ie.PERSONAL,LINKS:ie.LINKS,SYNC:ur.SYNC,faArrowRotateRight:ut,faPlus:Qe,faFileAlt:ir,faGlobe:yn,faUpload:or,faDownload:vn,faLink:Zo,faAnchor:oi,faEllipsis:Bo,faPen:mt,faEye:gl,faRotate:Mi,faCommentDots:nr,faFileArchive:Ho,faSpellCheck:Fl,faArrowsAlt:ii,faCircleInfo:It,faBan:hl,faArrowUp:dt,faArrowDown:ft,faLock:ni,faLockOpen:Pl,faClipboardList:Yo},this.loading=!1,this.locationNotFound=!1,this.forbiddenResource=!1,this.serverError=!1,this.hasRoots=!1,this.canShare={inside:!1,outside:!1},this.multipleSelection=!1,this.hasSelection=!1,this.hasDisabledItemsInSelection=!1,this.canCompress=!0,this.renamingInProgress=!1,this.supportUploadFolder=!1,this.originalOrderKeyValue=Fe,this.TAB_MENU=_e,this.tableHeaders={name:{label:"Name",width:45,textCenter:!1,class:"",show:!0,sortable:!0},anchored:{label:"Anchored by",width:5,class:"d-none d-md-table-cell",textCenter:!0,show:this.hasRoots,sortable:!0},info:{label:"Info",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:this.hasRoots},size:{label:"Size",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},mtime:{label:"Modified",width:10,textCenter:!0,class:"d-none d-sm-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",isDir:"Type",size:"Size",mtime:"Modified"},this.files=[],this.selection=[],this.stats={dirs:0,files:0,size:0,elements:0},this.router=S(ge),this.activatedRoute=S(ei),this.zone=S(Wi),this.renderer=S(pt),this.store=S(te),this.isElectronApp=this.store.isElectronApp(),this.spacesBrowser=S(Uc),this.filesService=S(He),this.filesUpload=S(Wc),this.uploadButtonsShowed=!1,this.subscriptions=[],this.sortSettings={default:[{prop:"name",type:"string"},{prop:"isDir",type:"number"}],name:[{prop:"name",type:"string"}],isDir:[{prop:"isDir",type:"number"}],anchored:[{prop:"root.id",type:"number"},{prop:"root.owner.fullName",type:"string"}],size:[{prop:"size",type:"number"}],mtime:[{prop:"mtime",type:"number"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.moveFromDrag=!1}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView(),this.supportUploadFolder=this.filesUpload.supportUploadDirectory,this.activatedRoute.queryParams.subscribe(t=>this.focusOn(t.select)),this.activatedRoute.data.subscribe(t=>this.setSpace(t)),this.subscriptions.push(this.store.filesOnEvent.subscribe(t=>this.onFileEvent(t)))}ngAfterViewInit(){setTimeout(()=>this.initEventHandlers(),500)}ngOnDestroy(){this.destroyEventHandlers(),this.resetFilesSelection(),this.subscriptions.forEach(t=>t.unsubscribe())}onKeyPress(t){if((t.target.id==="table-files"||t.target.id==="thumb-files")&&(t.ctrlKey||t.metaKey))switch(t.which||t.keyCode){case 65:t.preventDefault(),t.stopPropagation(),this.updateSelection(this.files);return;case 67:case 88:t.preventDefault(),t.stopPropagation(),this.selection.length&&(this.filesService.clipboardAction=t.keyCode==67?"copyPaste":"cutPaste",this.filesService.addToClipboard(this.selection));return;case 86:t.preventDefault(),t.stopPropagation(),this.filesService.onPasteClipboard();return;default:return}}loadFiles(){this.loading=!0,this.forbiddenResource=!1,this.locationNotFound=!1,this.serverError=!1,this.inputFilter.clear(),this.resetFilesSelection(),this.spacesBrowser.loadFiles().subscribe({next:t=>{this.spacePermissions=t.permissions,this.canShare.outside=this.spacePermissions.indexOf(De.SHARE_OUTSIDE)>-1,this.canShare.inside=this.spacePermissions.indexOf(De.SHARE_INSIDE)>-1,this.hasRoots=t.hasRoots,this.tableHeaders.anchored.show=t.hasRoots,this.tableHeaders.anchored.label=this.isSharesRepo?"Owner":"Anchored by",this.tableHeaders.anchored.width=10,this.tableHeaders.permissions.show=t.hasRoots,this.sortBy(this.sortTable.sortParam.column,!1,t.files.map(o=>new ra(o,this.baseRepoUrl,this.isSharesRepo))),this.updateFilesStats(this.files),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.files=[],this.updateFilesStats(this.files),t.status!==401&&(this.forbiddenResource=t.status===403,this.locationNotFound=t.status===404,this.serverError=t.status===0,this.layout.sendNotification("error","Files",t.error.message)),this.loading=!1}})}sortBy(t,o=!0,r){this.files=this.sortTable.sortBy(t,o,r||this.files)}switchView(t){let o=this.galleryMode;this.galleryMode=t,this.galleryMode.enabled!==o.enabled&&(this.destroyEventHandlers(),setTimeout(()=>this.initEventHandlers(),500))}onSelect(t,o){this.loading||(t.shiftKey&&this.selection.length>0&&this.selection.indexOf(o)===-1?this.selectRangeFiles(o):!t.ctrlKey&&!t.metaKey?this.updateSelection([o]):this.modifySelection(o))}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.isTrashRepo||this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.selection.length<=1&&this.updateSelection([o]),this.layout.openContextMenu(t,this.fileContextMenu)}browse(t){if(t.isDisabled){this.layout.sendNotification("warning",t.name,"Share is disabled");return}t.isRenamed||(t.isDir?this.router.navigate([t.root?.alias||t.name],{relativeTo:this.activatedRoute}).catch(console.error):this.shortcutView(!0))}copyMoveFiles(){this.layout.showRSideBarTab(_e.TREE,!0),setTimeout(()=>this.filesService.treeCopyMoveOn.next(),100)}downloadFiles(){this.multipleSelection?this.openCompressionDialog(!1):this.filesService.download(this.selection[0])}shortcutView(t=!1){this.selection[0].isDir?this.browse(this.selection[0]):t&&this.selection[0].isEditable?this.shortcutEdit():this.selection[0].isViewable?this.openViewerDialog(Aa.VIEW):this.downloadFiles()}shortcutEdit(){this.openViewerDialog(Aa.EDIT)}shortcutUploadFiles(){this.uploadButtonsShowed||document.getElementById("newButton").click(),setTimeout(()=>document.getElementById("uploadFilesButton").click(),100)}shortcutUploadFolders(){if(!this.uploadButtonsShowed){let t=document.getElementById("newButton");t.click(),t.click()}setTimeout(()=>document.getElementById("uploadFoldersButton").click(),100)}shortcutRename(){this.selection[0].isRenamed=!this.selection[0].isRenamed}renameFile(t){return $t(this,null,function*(){let o=t.object,r=t.name,p=!1,u=this.files.find(v=>v.name.toLowerCase()===r.toLowerCase()&&v.id!==o.id);u&&(p=yield this.filesService.openOverwriteDialog([o],r),!p)||this.filesService.rename(o,r,p).pipe(ce(1)).subscribe({next:v=>{o.rename(v.name),o.isEditable=!1,p&&(o.updateMime(u.mime),this.sortBy(this.sortTable.sortParam.column,!1,this.files.filter(T=>T.id!==u.id)))},error:v=>this.layout.sendNotification("error","Rename",o.name,v)})})}setRenamingInProgress(t){this.renamingInProgress=t}addToSync(){this.router.navigate([we.BASE,we.WIZARD,we.WIZARD_CLIENT],{state:{file:this.selection[0]}}).catch(console.error)}addToClipboard(){this.filesService.addToClipboard(this.selection)}openShareDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(rn,"lg",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList,allowFilesOptions:!1}}).content.shareChange.pipe(ce(1)).subscribe(r=>{let p=r[1];this.selection[0].id<0&&(this.selection[0].id=p.file.id),this.selection[0].shares.push({id:p.id,alias:p.alias,name:p.name,type:so.COMMON})})}openShareLinkDialog(){let t=this.setFilePermissionsAndSpace();if(t===null)return;this.layout.openDialog(Nn,"md",{initialState:{file:t,isSharesRepo:this.isSharesRepo,inSharesList:this.inSharesList}}).content.shareChange.pipe(ce(1)).subscribe(r=>{let[p,u]=r;p==="add"&&(this.selection[0].id<0&&(this.selection[0].id=u.file.id),this.selection[0].links.push({id:u.id,alias:u.alias,name:u.name,type:so.LINK}))})}openSpaceAnchorFileDialog(){this.layout.openDialog(B1,"lg",{initialState:{files:this.selection}}).content.addAnchoredFiles.pipe(ce(1)).subscribe(o=>{for(let r of this.selection){let p=o.rootFiles.find(u=>u.name===r.name);p&&r.spaces.map(u=>u.id).indexOf(o.space.id)===-1&&(r.id<0&&(r.id=p.id),r.spaces.push(o.space))}})}initUpload(){!this.isTrashRepo&&!this.uploadButtonsShowed&&(this.uploadButtonsShowed=!0)}onUploadFiles(t,o=!1){return $t(this,null,function*(){let r=!1;if(o){let p=t.files[0].webkitRelativePath.split("/")[0],u=this.files.find(v=>v.name.toLowerCase()===p.toLowerCase());if(u&&(r=yield this.filesService.openOverwriteDialog([u]),!r))return}else{let p=this.files.filter(u=>[...t.files].some(v=>v.name.toLowerCase()===u.name.toLowerCase()));if(p.length>0&&(r=yield this.filesService.openOverwriteDialog(p),!r))return}this.filesUpload.addFiles(t.files,r).catch(console.error)})}onDropFiles(t){return $t(this,null,function*(){let o=!1,r=this.files.filter(p=>[...t.dataTransfer.files].some(u=>u.name.toLowerCase()===p.name.toLowerCase()));r.length>0&&(o=yield this.filesService.openOverwriteDialog(r),!o)||this.filesUpload.onDropFiles(t,o)})}decompressFile(){this.filesService.decompress(this.selection[0])}openCompressionDialog(t=!0){let o={name:this.selection[0].name,compressInDirectory:this.inSharesList?!1:t,files:this.selection.map(r=>({name:r.name,rootAlias:r.root?.alias})),extension:"tar"};this.layout.openDialog(oa,null,{initialState:{archiveProps:o,disableInDirCompression:this.inSharesList}})}openNewDialog(t){this.layout.openDialog(R1,null,{initialState:{files:this.files,inputType:t}})}openEmptyTrashDialog(){this.isTrashRepo&&this.inRootSpace&&this.layout.openDialog(O1,null,{initialState:{files:this.files}})}openTrashDialog(t=!1){if(!this.selection.length)return;this.layout.openDialog(z1,null,{initialState:{files:this.selection,permanently:t}}).content.removeFiles.pipe(ce(1)).subscribe(()=>this.removeFiles())}openLockDialog(t){this.filesService.openLockDialog(t)}setSpace(t){this.currentRoute=this.filesService.currentRoute=`${t.repository}${dr(t.routes)}`,this.baseRepoUrl=`${t.repository}${t.routes.length?`/${t.routes[0].path}`:""}`,this.isFilesRepo=t.repository===$.FILES,this.isSharesRepo=t.repository===$.SHARES,this.isTrashRepo=t.repository===$.TRASH,this.inRootSpace=this.isSharesRepo?t.routes.length===0:t.routes.length===1,this.inSharesList=this.isSharesRepo&&this.inRootSpace,this.spacesBrowser.setEnvironment(t.repository,t.routes),this.isPersonalSpace=this.spacesBrowser.inPersonalSpace,this.loadFiles()}onFileEvent(t){if(t.archiveId){this.filesService.downloadTaskArchive(t.archiveId);return}let o=t?.fileDstPath===this.currentRoute;if(t.filePath===this.currentRoute||o){let r=o&&t.reloadFocusOnDst;if(t.fileName&&((t.focus||r)&&(this.focusOnSelect=t.fileName),t.delete&&!r))if(t.status===$c.SUCCESS)this.files=this.files.filter(p=>p.name!==t.fileName),this.updateFilesStats(this.files),this.resetFilesSelection();else{let p=this.files.find(u=>u.name===t.fileName);p&&(p.isBeingDeleted=!1)}(t.reload||r)&&this.loadFiles()}}removeFiles(){let t=this.selection.filter(o=>!o.root?.alias);this.selection.length!==t.length&&this.layout.sendNotification("warning","Remove","You can not remove an anchored file"),t.length&&this.filesService.delete(t)}setFilePermissionsAndSpace(){if(this.selection[0]?.root&&this.selection[0].root.permissions.indexOf(De.SHARE_OUTSIDE)===-1)return this.layout.sendNotification("warning",this.selection[0].name,"You do not have share permission"),null;let t=re({},this.selection[0]);if(this.isPersonalSpace)t.permissions=this.spacePermissions;else if(this.selection[0]?.root)if(t.permissions=this.selection[0].root.permissions,this.inSharesList)t.space={alias:this.selection[0].root.alias,name:this.selection[0].root.alias,root:void 0};else{let o=this.currentRoute.split("/")[1];t.space={alias:o,name:o,root:{alias:this.selection[0].root.alias,name:this.selection[0].name}}}else{t.permissions=this.spacePermissions;let[o,r]=this.currentRoute.split("/").slice(1,3);t.space={alias:o,name:o,root:{alias:r,name:r}}}return t}openViewerDialog(t){let o=this.selection[0],r;this.inSharesList?r=o.root.permissions:r=o?.root?lc(this.spacePermissions,o?.root.permissions):this.spacePermissions,this.filesService.openViewerDialog(t,o,this.files,r).catch(console.error)}focusOn(t){if(!t){this.focusOnSelect=null;return}if(!this.files.length){this.focusOnSelect=t;return}let o=this.files.find(r=>r.name.toLowerCase()===t.toLowerCase());!o&&this.hasRoots&&(o=this.files.find(r=>r.root?.alias.toLowerCase()===t.toLowerCase())),o?(setTimeout(()=>this.scrollView.scrollInto(o),100),this.updateSelection([o])):this.focusOnSelect=t}updateFilesStats(t){this.stats={dirs:0,files:0,size:0,elements:0};for(let o of t)this.updateCounters(o)}updateCounters(t,o=!0){let r=o?dc:mc;this.stats.elements=r(this.stats.elements,1),this.stats.size=r(this.stats.size,t.size),t.isDir?this.stats.dirs=r(this.stats.dirs,1):this.stats.files=r(this.stats.files,1)}resetFilesSelection(){this.updateSelection([])}modifySelection(t){t&&(t.isSelected?this.updateSelection(this.selection.filter(o=>o.id!==t.id)):this.updateSelection([t,...this.selection]))}updateSelection(t){t.length?this.selection=this.files.filter(o=>t.indexOf(o)>-1?(o.isSelected=!0,!0):(o.isSelected=!1,!1)):this.selection=this.selection.filter(o=>(o.isSelected=!1,!1)),this.hasSelection=!!this.selection.length,this.hasDisabledItemsInSelection=!!this.selection.find(o=>o.isDisabled),this.canCompress=!this.hasDisabledItemsInSelection&&(this.selection.length>1||this.selection.length===1&&this.selection[0].isCompressible),this.multipleSelection=this.selection.length>1||this.selection.length===1&&this.selection[0].isDir,this.store.filesSelection.set(this.selection)}selectRangeFiles(t){let o=this.files.indexOf(t),r=this.selection.map(T=>this.files.indexOf(T)),p=[],u=Math.min(...r),v=Math.max(...r);if(o<u)for(let T=o;T<u;T++)p.push(this.files[T]);else if(o>v)for(let T=o;T>v;T--)p.push(this.files[T]);this.updateSelection([...this.selection,...p])}initEventHandlers(){this.zone.runOutsideAngular(()=>{this.eventDragOverHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragover",t=>{if(this.inSharesList||this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;["TD","TR","DIV","APP-VIRTUAL-SCROLL","IMG"].indexOf(t.target.nodeName)>-1&&(t.preventDefault(),this.moveFromDrag?t.dataTransfer.dropEffect="move":t.dataTransfer.dropEffect="copy")}),this.eventDragStartHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragstart",t=>{if(this.inSharesList&&t.preventDefault(),t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV"){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&(this.selection.indexOf(o)===-1&&this.zone.run(()=>this.updateSelection([o])),this.moveFromDrag=!0)}}),this.eventDragEnterHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragenter",t=>{if(t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(t.target.parentElement.nodeName==="TD"?this.renderer.addClass(t.target.parentElement,In):t.target.parentElement.classList.contains("card-body")&&this.renderer.addClass(t.target.parentElement.parentElement,In))}}),this.eventDragLeaveHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragleave",t=>{t.preventDefault(),this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"?this.renderer.removeClass(t.target.parentElement,In):t.target.parentElement.classList.contains("card-body")&&this.renderer.removeClass(t.target.parentElement.parentElement,In))}),this.eventDragEndHandler=this.renderer.listen(this.scrollView.element.nativeElement,"dragend",t=>{t.preventDefault(),this.moveFromDrag=!1}),this.eventDropHandler=this.renderer.listen(this.scrollView.element.nativeElement,"drop",t=>{if(this.inSharesList||this.isTrashRepo&&!this.moveFromDrag)return t.preventDefault(),!1;if(this.moveFromDrag&&(t.target.parentElement.nodeName==="TD"||t.target.parentElement.nodeName==="DIV")){t.preventDefault();let o=this.scrollView.viewPortItems[this.galleryMode.enabled?t.target.parentElement.getAttribute("rowIndex"):t.target.parentElement.parentElement.rowIndex];o&&o.isDir&&this.selection.indexOf(o)===-1&&(this.renderer.removeClass(t.target.parentElement,In),this.selection.length&&this.zone.run(()=>this.filesService.copyMove(this.selection,o.path,ze.MOVE)))}else return t.dataTransfer.files.length?(t.preventDefault(),this.zone.run(()=>this.onDropFiles(t)),!1):(t.preventDefault(),!1)}),this.eventKeysHandler=this.renderer.listen(this.scrollView.element.nativeElement,"keydown",t=>{if(this.renamingInProgress)return;let o=t.keyCode||t.which;if([37,38,39,40].indexOf(o)===-1)return;if((o===37||o===39)&&!this.galleryMode.enabled)return;t.preventDefault(),t.stopPropagation();let r,p=this.selection.map(I=>this.files.indexOf(I)),u=this.galleryMode.enabled;o===37?(u=!1,o=38):o===39&&(u=!1,o=40),o===38?(u?r=Math.min(...p)-Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):r=Math.min(...p)-1,r<=-1&&(r=this.files.length-1)):(u?r=Math.max(...p)+Math.ceil(this.scrollView.element.nativeElement.offsetWidth/(this.galleryMode.dimensions+this.galleryMode.margins)):r=Math.max(...p)+1,r>=this.files.length&&(r=0));let v=this.files[r];this.zone.run(()=>{!t.shiftKey&&!t.ctrlKey&&!t.metaKey?this.updateSelection([v]):this.modifySelection(v)});let T=this.scrollView.element.nativeElement.querySelectorAll(Vc);if(T.length){let I;o===38?(I=T[0],wa(I)||I.scrollIntoView(!0)):(I=T[T.length-1],wa(I)||I.scrollIntoView(!1))}else setTimeout(()=>this.scrollView.scrollInto(v),0)})})}destroyEventHandlers(){for(let t of[this.eventDragStartHandler,this.eventDragOverHandler,this.eventDragEnterHandler,this.eventDragLeaveHandler,this.eventDragEndHandler,this.eventDropHandler,this.eventKeysHandler].filter(o=>o))try{t()}catch(o){console.warn(o)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-spaces-browser"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(lt,7),Y(Lf,7),Y(Pf,7),Y(Nf,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.btnNavigationView=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.mainReadOnlyContextMenu=p.first),G(p=W())&&(r.fileContextMenu=p.first)}},hostBindings:function(o,r){o&1&&_("keydown",function(u){return r.onKeyPress(u)},Fo)},decls:57,vars:41,consts:[["CommonMessages",""],["FileContextMenu",""],["ShareContextMenu",""],["MainReadOnlyContextMenu",""],["MainContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"me-1"],[1,"mx-auto"],["l10nTranslate",""],["contextMenuItem",""],["contextMenuItem","",3,"subMenu"],["contextMenuItem","",3,"execute"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"onShown"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["appUploadFiles","","id","uploadFilesButton",1,"dropdown-item",3,"uploadFiles","options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"options"],["appUploadFiles","","id","uploadFoldersButton",1,"dropdown-item",3,"uploadFiles","options"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],[1,"dropdown-divider"],[1,"dropdown-item"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],[4,"ngTemplateOutlet"],["id","thumb-files","tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","deleted","selected","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],["alt","","draggable","true",1,"img-fluid",3,"max-height","src"],["alt","","draggable","true",3,"src","height","width"],[1,"label-bottom-right"],["placement","auto",1,"badge","rounded-pill","bg-maroon","cursor-pointer",3,"tooltip","font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"font-size"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"font-size"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"font-size"],[1,"label-bottom-left"],[1,"label-top-right"],[1,"card-footer","text-center","text-truncate","p-1"],["appInputEdit","","type","text","required","",3,"inputObject","fullWidth","textCenter","font-size"],["draggable","false",1,"no-pointer-events",3,"font-size"],["alt","","draggable","true",1,"img-fluid",3,"error","src"],["alt","","draggable","true",3,"error","src","height","width"],["placement","auto",1,"badge","rounded-pill","bg-maroon","cursor-pointer",3,"click","tooltip"],[1,"badge","rounded-pill","bg-primary","cursor-pointer",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","ms-1",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-success","cursor-pointer",3,"click"],[3,"user","height","width","fontSize"],[1,"badge","rounded-pill","bg-warning"],["appInputEdit","","type","text","required","",3,"renamingInProgress","updateObject","inputObject","fullWidth","textCenter"],["draggable","false",1,"no-pointer-events"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["id","table-files","tabindex","-1"],[3,"disabled","deleted","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],["draggable","true",1,"d-flex","align-items-center"],["alt","","draggable","false","height","30","width","30",3,"error","src"],["appInputEdit","","required","","type","text",3,"inputObject"],[1,"d-flex","flex-column","text-truncate"],["appInputEdit","","required","","type","text",3,"renamingInProgress","updateObject","inputObject"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[1,"d-flex","flex-column","align-items-center"],[3,"user"],["placement","auto",1,"badge","rounded-pill","bg-maroon","cursor-pointer","me-1",3,"tooltip"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-success","cursor-pointer"],["placement","auto",1,"badge","rounded-pill","bg-maroon","cursor-pointer","me-1",3,"click","tooltip"],["tooltipPlacement","auto",3,"permissions"],[1,"fs-sm","text-center","text-danger","fw-bold","no-select"],[1,"fs-sm","text-center","text-muted","fw-bold","no-select"],["contextMenuItem","",3,"divider"]],template:function(o,r){if(o&1){let p=y();a(0,"div",5)(1,"button",6),b(2,"translate"),_("click",function(){return h(p),C(r.loadFiles())}),f(3,"fa-icon",7),l(),g(4,Bf,5,5,"div",8),a(5,"button",9),b(6,"translate"),_("click",function(){return h(p),C(r.downloadFiles())}),f(7,"fa-icon",10),l(),g(8,$f,5,6,"div",11),g(9,Wf,4,7),a(10,"div",11)(11,"button",12),f(12,"fa-icon",10),l(),L(13,n_,15,6,"ul",13),l(),a(14,"div",14)(15,"div",15),f(16,"app-input-filter",16),l(),a(17,"app-navigation-view",17),_("sortBy",function(v){return h(p),C(r.sortBy(v))})("switchView",function(v){return h(p),C(r.switchView(v))}),l()()(),g(18,g_,7,10,"div",18)(19,$_,13,10),a(20,"div",19)(21,"span"),g(22,G_,3,5,"span",20),g(23,W_,3,5,"span"),l(),a(24,"span",21),d(25),b(26,"translate"),l(),a(27,"span")(28,"span",22),d(29,"Total"),l(),d(30),b(31,"toBytes"),l()(),L(32,Y_,4,1,"ng-template",null,0,Ft),a(34,"context-menu",null,1),g(36,ah,5,4),g(37,lh,1,0,null,23),g(38,ph,1,0,null,23),g(39,mh,1,0,null,23),g(40,fh,1,1,null,24),L(41,_h,3,1,"ng-template",25),_("execute",function(){return h(p),C(r.addToClipboard())}),g(42,Ch,1,0,null,23),L(43,gh,3,1,"ng-template",25),_("execute",function(){return h(p),C(r.layout.showRSideBarTab(r.TAB_MENU.SELECTION))}),g(44,vh,2,1),l(),a(45,"context-menu",null,2),L(47,yh,3,1,"ng-template",25),_("execute",function(){return h(p),C(r.openShareDialog())}),L(48,bh,3,1,"ng-template",25),_("execute",function(){return h(p),C(r.openShareLinkDialog())}),g(49,Th,1,0,null,23),l(),a(50,"context-menu",null,3),L(52,Eh,3,1,"ng-template",25),_("execute",function(){return h(p),C(r.openEmptyTrashDialog())}),l(),a(53,"context-menu",null,4),g(55,Ah,1,0,null,23)(56,Ih,5,1),l()}o&2&&(s(),m("tooltip",E(2,27,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faArrowRotateRight)("animation",r.loading?"spin":null),s(),x(!r.isTrashRepo&&!r.inSharesList?4:-1),s(),m("disabled",!r.hasSelection||r.hasDisabledItemsInSelection)("tooltip",E(6,30,"Download",r.locale.language)),s(2),m("icon",r.icons.faDownload),s(),x(!r.isTrashRepo&&r.canShare.outside||r.inSharesList?8:-1),s(),x(r.isTrashRepo?9:-1),s(),m("isDisabled",!r.hasSelection),s(2),m("icon",r.icons.faEllipsis),s(5),m("sortParams",r.sortTable.sortParam)("sortFields",r.btnSortFields),s(),x(r.galleryMode!=null&&r.galleryMode.enabled?18:19),s(4),x(r.stats.dirs?22:-1),s(),x(r.stats.files?23:-1),s(2),w(Dt(26,33,r.hasSelection?r.selection.length>1?"nb_selections":"one_selection":"no_selection",r.locale.language,Re(39,If,r.selection.length))),s(5),A("\xA0",q(31,37,r.stats.size)),s(6),x(r.selection.length===1?36:-1),s(),x(r.canCompress?37:-1),s(),x(!r.inSharesList&&r.selection.length===1&&!r.selection[0].isCompressible?38:-1),s(),x(r.hasDisabledItemsInSelection?-1:39),s(),x(!r.isTrashRepo&&r.canShare.outside||r.inSharesList&&(r.selection[0]!=null&&r.selection[0].canBeReShared)?40:-1),s(2),x(r.hasDisabledItemsInSelection?-1:42),s(2),x(r.inSharesList?-1:44),s(5),x(r.isFilesRepo?49:-1),s(6),x(r.inSharesList?55:56))},dependencies:[P,F,Ke,ke,Ri,Ni,Ii,Pi,Ve,zt,Vt,Rt,Xe,na,lt,Wt,Ze,N1,vt,nt,Z,hr,Ae,Ct],encapsulation:2});let i=n;return i})();var jn=(i,n)=>n.id;function Rh(i,n){if(i&1){let e=y();a(0,"div",2)(1,"div",3)(2,"button",4),_("click",function(){h(e);let o=c(2);return C(o.addToClipboard())}),f(3,"fa-icon",5),d(4," Send to Clipboard "),l()()(),f(5,"hr",6)}if(i&2){let e=c(2);s(3),m("icon",e.icons.faClipboardCheck)}}function Vh(i,n){if(i&1){let e=y();a(0,"div",7)(1,"img",8),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),a(2,"span",9),d(3),l()()}if(i&2){let e=n.$implicit;s(),m("src",e.mimeUrl,ee),s(2),w(e.name)}}function zh(i,n){if(i&1&&(a(0,"div",1),k(1,Vh,4,2,"div",7,jn),l()),i&2){let e=c(2);s(),D(e.files())}}function Oh(i,n){if(i&1&&(a(0,"div",27),f(1,"img",28),l()),i&2){let e=c().$implicit,t=c(3);O("height",t.cardImageSize,"px"),s(),O("max-height",t.cardImageSize,"px"),m("src",X("",e.thumbnailUrl,"?size=256"),ee)}}function Bh(i,n){if(i&1&&f(0,"app-files-viewer-media",13),i&2){let e=c().$implicit,t=c(3);m("currentHeight",t.cardImageSize)("fileUrl",e.dataUrl)}}function Uh(i,n){if(i&1){let e=y();a(0,"img",29),_("error",function(){h(e);let o=c().$implicit;return C(o.fallBackMimeUrl())}),l()}if(i&2){let e=c().$implicit,t=c(3);O("height",t.cardImageSize,"px"),m("src",e.mimeUrl,ee)}}function Hh(i,n){if(i&1&&f(0,"fa-icon",21),i&2){let e=c(4);m("icon",e.icons.faSpinner)}}function $h(i,n){if(i&1&&d(0),i&2){c();let e=Ls(16);A(" ",e," ")}}function Gh(i,n){if(i&1&&(a(0,"span",30),f(1,"fa-icon",5),a(2,"span",31),d(3,"Exclusive"),l()()),i&2){let e=c(5);s(),m("icon",e.icons.faLock)}}function Wh(i,n){if(i&1&&(a(0,"span",30),f(1,"fa-icon",5),a(2,"span",31),d(3,"Shared"),l()()),i&2){let e=c(5);s(),m("icon",e.icons.faUnlock)}}function qh(i,n){if(i&1&&g(0,Gh,4,1,"span",30)(1,Wh,4,1,"span",30),i&2){let e=c().$implicit;x(e.lock.isExclusive?0:1)}}function jh(i,n){i&1&&(a(0,"span",23),d(1,"no"),l())}function Kh(i,n){if(i&1&&(a(0,"span",25),f(1,"fa-icon",5),d(2),l()),i&2){let e=c().$implicit,t=c(3);s(),m("icon",t.icons.SHARES),s(),A("\xA0",e.shares.length+e.links.length," ")}}function Qh(i,n){i&1&&(a(0,"span",23),d(1,"no"),l())}function Yh(i,n){if(i&1&&(a(0,"span",25),f(1,"fa-icon",5),d(2),l()),i&2){let e=c().$implicit,t=c(3);s(),m("icon",t.icons.SPACES),s(),A("\xA0",e.spaces.length)}}function Xh(i,n){i&1&&(a(0,"span",23),d(1,"no"),l())}function Zh(i,n){if(i&1&&(a(0,"div",22)(1,"div",18),d(2,"Owner"),l(),f(3,"app-user-avatar",33),l()),i&2){let e=c(2).$implicit;s(3),m("user",e.root.owner)("height",26)("width",26)}}function Jh(i,n){if(i&1&&f(0,"app-file-permissions",32),i&2){let e=c(2).$implicit;m("permissions",e.root.hPerms)}}function e4(i,n){i&1&&(a(0,"span",23),d(1,"no"),l())}function t4(i,n){if(i&1&&(f(0,"hr",15),a(1,"div",16),g(2,Zh,4,3,"div",22),a(3,"div",27)(4,"div",18),d(5,"Permissions"),l(),g(6,Jh,1,1,"app-file-permissions",32)(7,e4,2,0,"span",23),l()()),i&2){let e=c().$implicit;s(2),x(e.root.owner?2:-1),s(4),x(e.root.permissions?6:7)}}function i4(i,n){if(i&1){let e=y();a(0,"div",38),_("click",function(){h(e);let o=c(2).$implicit,r=c(3);return C(r.openLockDialog(o))}),f(1,"fa-icon",5),a(2,"span"),d(3),l()()}if(i&2){let e=c(2).$implicit,t=c(3);s(),m("icon",e.lock.isExclusive?t.icons.faLock:t.icons.faUnlock),s(2),A("\xA0",e.lock.owner)}}function n4(i,n){if(i&1){let e=y();a(0,"div",39),_("click",function(){let o=h(e).$implicit,r=c(5);return C(r.goToSpace(o))}),f(1,"fa-icon",5),a(2,"span"),d(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),m("icon",t.icons.SPACES),s(2),A("\xA0",e.name)}}function o4(i,n){if(i&1){let e=y();a(0,"div",39),_("click",function(){let o=h(e).$implicit,r=c(5);return C(r.goToShare(o))}),f(1,"fa-icon",5),a(2,"span"),d(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),m("icon",t.icons.SHARES),s(2),A("\xA0",e.name)}}function r4(i,n){if(i&1){let e=y();a(0,"div",39),_("click",function(){let o=h(e).$implicit,r=c(5);return C(r.goToShare(o))}),f(1,"fa-icon",5),a(2,"span"),d(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),m("icon",t.icons.LINKS),s(2),A("\xA0",e.name)}}function a4(i,n){if(i&1){let e=y();a(0,"div",39),_("click",function(){let o=h(e).$implicit,r=c(5);return C(r.goToSync(o))}),f(1,"fa-icon",5),a(2,"span"),d(3),l()()}if(i&2){let e=n.$implicit,t=c(5);s(),m("icon",t.icons.SYNC),s(2),A("\xA0",e.clientName)}}function s4(i,n){if(i&1&&(f(0,"hr",34),a(1,"div",35),g(2,i4,4,2,"div",36),k(3,n4,4,2,"div",37,jn),k(5,o4,4,2,"div",37,jn),k(7,r4,4,2,"div",37,jn),k(9,a4,4,2,"div",37,jn),l()),i&2){let e=c().$implicit;s(2),x(e.lock?2:-1),s(),D(e.spaces),s(2),D(e.shares),s(2),D(e.links),s(2),D(e.syncs)}}function l4(i,n){if(i&1){let e=y();a(0,"div",10)(1,"div",11),g(2,Oh,2,6,"div",12)(3,Bh,1,2,"app-files-viewer-media",13)(4,Uh,1,3,"img",14),l()(),f(5,"hr",15),a(6,"div",16)(7,"div",17)(8,"div",18),d(9,"Name"),l(),a(10,"div",19),d(11),l()(),a(12,"div",17)(13,"div",18),d(14,"Size"),l(),a(15,"div",20),Ds(16),b(17,"async"),g(18,Hh,1,1,"fa-icon",21)(19,$h,1,1),l()(),a(20,"div",17)(21,"div",18),d(22,"Created"),l(),a(23,"div",20),d(24),b(25,"amDateFormat"),l()(),a(26,"div",17)(27,"div",18),d(28,"Modified"),l(),a(29,"div",20),d(30),b(31,"amDateFormat"),l()(),a(32,"div",22)(33,"div",18),d(34,"Lock"),l(),g(35,qh,2,1)(36,jh,2,0,"span",23),l(),a(37,"div",22)(38,"div",18),d(39,"Shared"),l(),a(40,"div",24),g(41,Kh,3,2,"span",25)(42,Qh,2,0,"span",23),l()(),a(43,"div",22)(44,"div",18),d(45,"Anchored"),l(),g(46,Yh,3,2,"span",25)(47,Xh,2,0,"span",23),l(),a(48,"div",22)(49,"div",18),d(50,"Synced"),l(),a(51,"span"),d(52),b(53,"translate"),l()(),a(54,"div",22)(55,"div",18),d(56,"Comments"),l(),a(57,"span",26),_("click",function(){h(e);let o=c(3);return C(o.goToComments())}),d(58),b(59,"translate"),l()()(),g(60,t4,8,2),g(61,s4,11,1)}if(i&2){let e,t=n.$implicit,o=c(3);s(2),x((e=t.shortMime)==="image"?2:e==="media"?3:4),s(9),w(t.name),s(5);let r=Fs(q(17,18,o.getSizeLazy(t)));s(2),x(r===null?18:19),s(6),w(q(25,21,t.ctime)),s(6),w(q(31,23,t.mtime)),s(5),x(t.lock?35:36),s(6),x(t.shares.length||t.links.length?41:42),s(5),x(t.spaces.length?46:47),s(5),V(X("badge rounded-pill ",t.syncs.length?"bg-primary":"bg-secondary-alt")),s(),A(" ",E(53,25,t.syncs.length?"yes":"no",o.locale.language)," "),s(5),V(X("badge rounded-pill ",t.hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),s(),A(" ",E(59,28,t.hasComments?"yes":"no",o.locale.language)," "),s(2),x(t.root?60:-1),s(),x(t.lock||t.spaces.length||t.shares.length||t.links.length||t.syncs.length?61:-1)}}function c4(i,n){if(i&1&&k(0,l4,62,31,null,null,jn),i&2){let e=c(2);D(e.files())}}function p4(i,n){if(i&1&&(g(0,Rh,6,1),a(1,"div",0),g(2,zh,3,0,"div",1)(3,c4,2,0),l()),i&2){let e=c();x(e.multiple()?0:-1),s(),m("resizeOffset",e.resizeOffset()),s(),x(e.multiple()?2:3)}}var $1=(()=>{let n=class n{constructor(){this.files=se.required(),this.locale=S(H),this.multiple=ve(()=>this.files().length>1),this.resizeOffset=ve(()=>this.multiple()?120:80),this.cardImageSize=80,this.icons={SPACES:ie.SPACES,SHARES:ie.SHARES,LINKS:ie.LINKS,SYNC:ur.SYNC,faLock:ni,faUnlock:Cl,faClipboardCheck:Go,faArrowsAlt:ii,faSpinner:Ue},this.router=S(ge),this.layout=S(N),this.filesService=S(He)}goToShare(t){this.layout.toggleRSideBar(!1),this.router.navigate([t.type===0?$.SHARED:$.LINKS],{queryParams:{select:t.name}}).catch(console.error)}goToSpace(t){this.layout.toggleRSideBar(!1),this.router.navigate([$.SPACES],{queryParams:{select:t.name}}).catch(console.error)}goToComments(){this.layout.showRSideBarTab(_e.COMMENTS,!0)}addToClipboard(){this.filesService.addToClipboard(this.files()),this.layout.showRSideBarTab(_e.CLIPBOARD,!0)}goToSync(t){this.layout.toggleRSideBar(!1),this.router.navigate([Ee.BASE,Ee.CLIENTS],{state:{clientId:t.clientId,pathId:t.id}}).catch(console.error)}openLockDialog(t){this.filesService.openLockDialog(t)}getSizeLazy(t){return t.isDir?(t.hDirSize||(t.hDirSize=this.filesService.getSize(t).pipe(bt(o=>pr(o,0,!0)),Mo(()=>t.hDirSize=xi(t.hSize)),ys(1))),t.hDirSize):xi(t.hSize)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-selection"]],inputs:{files:[1,"files"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"flex-column","p-2","w-100"],[1,"px-2","pt-2","pb-0","fs-xxs"],[1,"d-flex","justify-content-center","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary","me-1",3,"click"],[3,"icon"],[1,"mx-0","mt-2","mb-0"],[1,"d-inline-flex","w-100","align-content-center","align-items-center","mx-1"],["alt","","height","30","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"d-flex","align-items-center",3,"height"],[3,"currentHeight","fileUrl"],["alt","",3,"src","height"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],["animation","spin-pulse",3,"icon"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"d-flex","col-sm-7"],[1,"badge","rounded-pill","bg-primary"],[3,"click"],[1,"d-flex","align-items-center"],["alt","",1,"img-fluid",3,"src"],["alt","",3,"error","src"],["l10nTranslate","",1,"badge","rounded-pill","bg-maroon"],["l10nTranslate","",1,"ms-1"],[3,"permissions"],["tooltipPlacement","bottom",3,"user","height","width"],[1,"mt-1","mb-2"],[1,"d-flex","flex-wrap","align-items-center","p-2","fs-xs"],[1,"badge","rounded-pill","white-space","bg-maroon","cursor-pointer","mb-2"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-2"],[1,"badge","rounded-pill","white-space","bg-maroon","cursor-pointer","mb-2",3,"click"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1","mb-2",3,"click"]],template:function(o,r){o&1&&g(0,p4,4,3),o&2&&x(r.files().length?0:-1)},dependencies:[fe,P,F,Hc,Ze,vt,Le,Z,pn],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function d4(i,n){if(i&1&&d(0),i&2){let e=c(2);A(" ",e.link().link.currentIp," ")}}function m4(i,n){if(i&1&&(d(0),b(1,"amDateFormat")),i&2){let e=c(2);A(" ",q(1,1,e.link().link.currentAccess)," ")}}function u4(i,n){if(i&1&&d(0),i&2){let e=c(2);A(" ",e.link().link.lastIp," ")}}function f4(i,n){if(i&1&&(d(0),b(1,"amDateFormat")),i&2){let e=c(2);A(" ",q(1,1,e.link().link.lastAccess)," ")}}function _4(i,n){if(i&1&&(a(0,"span")(1,"span"),d(2),b(3,"translate"),b(4,"translate"),l()()),i&2){let e=c(2);V(X("badge rounded-pill bg-",e.link().hTimeExpirationAgo>=1?"warning":"danger")),s(2),w(e.link().hTimeExpirationAgo>=1?e.link().hTimeExpirationAgo+"\xA0"+E(3,4,"days",e.locale.language):E(4,7,"expired",e.locale.language))}}function h4(i,n){i&1&&(a(0,"span",13),d(1," no "),l())}function C4(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c(2);V(X("badge rounded-pill ",e.link().link.nbAccess>=e.link().link.limitAccess?"bg-danger":"bg-success")),s(),Ie(" ",e.link().link.nbAccess,"/",e.link().link.limitAccess," ")}}function g4(i,n){if(i&1&&(a(0,"span",14),d(1),l()),i&2){let e=c(2);s(),w(e.link().link.nbAccess)}}function x4(i,n){if(i&1&&f(0,"app-file-permissions",16),i&2){let e=c(2);m("permissions",e.link().hPerms)}}function S4(i,n){i&1&&(a(0,"span",13),d(1,"no"),l())}function v4(i,n){if(i&1){let e=y();a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){h(e);let o=c();return C(o.link().fallBackMimeUrl())}),l()()(),f(4,"hr",4),a(5,"div",5)(6,"div",6)(7,"div",7),d(8,"Name"),l(),a(9,"div",8),d(10),l()(),a(11,"div",6)(12,"div",7),d(13,"Created"),l(),a(14,"div",9),d(15),b(16,"amDateFormat"),l()(),a(17,"div",10),_("mouseover",function(){h(e);let o=c();return C(o.accessHover=!0)})("mouseleave",function(){h(e);let o=c();return C(o.accessHover=!1)})("focus",function(){h(e);let o=c();return C(o.accessHover=!0)}),a(18,"div",7),d(19,"Accessed"),l(),a(20,"div",9),g(21,d4,1,1)(22,m4,2,3),l()(),a(23,"div",10),_("mouseover",function(){h(e);let o=c();return C(o.lastAccessHover=!0)})("mouseleave",function(){h(e);let o=c();return C(o.lastAccessHover=!1)})("focus",function(){h(e);let o=c();return C(o.accessHover=!0)}),a(24,"div",7),d(25,"Last access"),l(),a(26,"div",9),g(27,u4,1,1)(28,f4,2,3),l()(),a(29,"div",11)(30,"div",7),d(31,"Authentication"),l(),a(32,"span"),d(33),b(34,"translate"),l()(),a(35,"div",11)(36,"div",7),d(37,"Expired"),l(),g(38,_4,5,10,"span",12)(39,h4,2,0,"span",13),l(),a(40,"div",11)(41,"div",7),d(42,"Active"),l(),a(43,"span"),d(44),b(45,"translate"),l()(),a(46,"div",11)(47,"div",7),d(48,"Access"),l(),g(49,C4,2,5,"span",12)(50,g4,2,1,"span",14),l()(),f(51,"hr",4),a(52,"div",5)(53,"div",11)(54,"div",7),d(55,"Shared from"),l(),f(56,"app-share-repository",15),l(),a(57,"div",11)(58,"div",7),d(59,"Permissions"),l(),g(60,x4,1,1,"app-file-permissions",16)(61,S4,2,0,"span",13),l()()()}if(i&2){let e=c();m("resizeOffset",e.resizeOffset),s(3),O("height",e.cardImageSize,"px"),m("src",e.link().mimeUrl,ee),s(7),w(e.link().name),s(5),w(q(16,21,e.link().link.createdAt)),s(6),x(e.accessHover?21:22),s(6),x(e.lastAccessHover?27:28),s(5),V(X("badge rounded-pill ",e.link().link.requireAuth?"bg-success":"bg-warning")),s(),A(" ",E(34,23,e.link().link.requireAuth?"yes":"no",e.locale.language)," "),s(5),x(e.link().link.expiresAt?38:39),s(5),V(X("badge rounded-pill ",e.link().link.isActive?"bg-primary":"bg-danger")),s(),A(" ",E(45,26,e.link().link.isActive?"yes":"no",e.locale.language)," "),s(5),x(e.link().link.limitAccess!==0?49:50),s(7),m("share",e.link())("showIcon",!1),s(4),x(e.link().link.permissions?60:61)}}var G1=(()=>{let n=class n{constructor(){this.link=se.required(),this.locale=S(H),this.cardImageSize=80,this.resizeOffset=80,this.accessHover=!1,this.lastAccessHover=!1}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-link-selection"]],inputs:{link:[1,"link"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","mb-1",3,"mouseover","mouseleave","focus"],[1,"d-flex","align-items-center","mb-1"],[3,"class"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-success"],[3,"share","showIcon"],[3,"permissions"]],template:function(o,r){o&1&&g(0,v4,62,29,"div",0),o&2&&x(r.link()?0:-1)},dependencies:[fe,P,si,vt,Z,Le],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();var y4=()=>["shares"];function b4(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"joinCounts"),l()),i&2){let e=c(2);s(),w(E(2,1,e.share().counts,Tt(4,y4)))}}function w4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function T4(i,n){if(i&1){let e=y();a(0,"span",15),_("click",function(){h(e);let o=c(2);return C(o.childShareDialog(o.share()))}),f(1,"fa-icon",16),a(2,"span"),d(3),l()()}if(i&2){let e=c(2);s(),m("icon",e.iconShared),s(2),w(e.share().counts.shares)}}function E4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function M4(i,n){if(i&1){let e=y();a(0,"div",0)(1,"div",1)(2,"div",2)(3,"img",3),_("error",function(){h(e);let o=c();return C(o.share().fallBackMimeUrl())}),l()()(),f(4,"hr",4),a(5,"div",5)(6,"div",6)(7,"div",7),d(8,"Name"),l(),a(9,"div",8),d(10),l()(),a(11,"div",6)(12,"div",7),d(13,"Created"),l(),a(14,"div",9),d(15),b(16,"amDateFormat"),l()(),a(17,"div",6)(18,"div",7),d(19,"Modified"),l(),a(20,"div",9),d(21),b(22,"amDateFormat"),l()(),a(23,"div",10)(24,"div",7),d(25,"Members"),l(),g(26,b4,3,5,"span")(27,w4,2,0,"span",11),l(),a(28,"div",10)(29,"div",7),d(30,"Child shares"),l(),g(31,T4,4,2,"span",12)(32,E4,2,0,"span",11),l(),a(33,"div",10)(34,"div",7),d(35,"Comments"),l(),a(36,"span",13),_("click",function(){h(e);let o=c();return C(o.goToComments())}),d(37),b(38,"translate"),l()()(),f(39,"hr",4),a(40,"div",5)(41,"div",10)(42,"div",7),d(43,"Shared from"),l(),f(44,"app-share-repository",14),l()()()}if(i&2){let e=c();m("resizeOffset",e.resizeOffset),s(3),O("height",e.cardImageSize,"px"),m("src",e.share().mimeUrl,ee),s(7),w(e.share().name),s(5),w(q(16,15,e.share().createdAt)),s(6),w(q(22,17,e.share().modifiedAt)),s(5),x(e.share().counts.users||e.share().counts.groups?26:27),s(5),x(e.share().counts.shares?31:32),s(5),V(X("badge rounded-pill ",e.share().hasComments?"bg-success":"bg-secondary-alt"," cursor-pointer")),s(),A(" ",E(38,19,e.share().hasComments?"yes":"no",e.locale.language)," "),s(7),m("share",e.share())("showIcon",!1)}}var W1=(()=>{let n=class n{constructor(){this.share=se.required(),this.locale=S(H),this.iconShared=ie.SHARED_WITH_OTHERS,this.cardImageSize=80,this.resizeOffset=80,this.layout=S(N),this.sharesService=S(ci)}childShareDialog(t){t.counts.shares&&this.layout.openDialog(Oi,null,{initialState:{share:t}})}goToComments(){this.share().hasComments&&this.sharesService.goTo(this.share()).then(()=>this.layout.showRSideBarTab(_e.COMMENTS,!0))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-share-selection"]],inputs:{share:[1,"share"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],["alt","","draggable","false",3,"error","src"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[3,"click"],[3,"share","showIcon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,r){o&1&&g(0,M4,45,22,"div",0),o&2&&x(r.share()?0:-1)},dependencies:[fe,P,F,si,Z,Le,ai],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function A4(i,n){if(i&1&&f(0,"fa-icon",3),i&2){let e=c();m("icon",e.icons.faSpinner)}}function k4(i,n){i&1&&(a(0,"span",5),d(1,"You have no files anchored on this space"),l())}var sa=(()=>{let n=class n{constructor(){this.layout=S(N),this.addRootFileEvent=new To,this.icons={faAnchor:oi,faPlus:Qe,faSpinner:Ue,SPACES:ie.SPACES},this.submitted=!1,this.loading=!1,this.spacesService=S(ot)}ngOnInit(){this.space?.roots.length&&(this.space.roots=[]),this.spacesService.getUserSpaceRoots(this.space.id).subscribe({next:t=>this.setSpaceRoots(t),error:t=>{this.layout.sendNotification("error","Manage my anchored files",t.error.message)}})}openSelectRootDialog(){this.layout.openDialog($n,"xl",{initialState:{currentRoots:this.space.roots.filter(o=>o.owner.id===this.user.id)}}).content.submitEvent.pipe(ce(1)).subscribe(o=>this.addRootFileEvent.next(o))}onSubmit(){this.loading=!0,this.submitted=!0,this.spacesService.updateUserSpaceRoots(this.space.id,this.space.roots.map(t=>({id:t.id,alias:t.alias,name:t.name,permissions:t.permissions,file:{id:t.file.id,path:t.file.path,mime:t.file.mime}}))).subscribe({next:t=>{this.setSpaceRoots(t),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Manage my anchored files",t.error.message),this.submitted=!1,this.loading=!1}})}setSpaceRoots(t){this.space.roots=[];for(let o of t)this.space.addRoot(Se(re({},o),{owner:this.user}),!0);this.space.counts.roots=this.space.roots.length}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-user-anchors-dialog"]],inputs:{space:"space",user:"user"},decls:22,vars:11,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"space","user","showUsers","addRootFile"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],[3,"icon"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span"),d(4),l()(),g(5,A4,1,1,"fa-icon",3),a(6,"h4",4)(7,"span",5),d(8,"Manage my anchored files"),l()(),a(9,"button",6),_("click",function(){return r.layout.closeDialog()}),l()(),a(10,"div",7),f(11,"app-space-manage-roots",8),g(12,k4,2,0,"span",5),l(),a(13,"div",9)(14,"button",10),_("click",function(){return r.openSelectRootDialog()}),f(15,"fa-icon",11)(16,"fa-icon",11),d(17," File "),l(),a(18,"button",12),_("click",function(){return r.layout.closeDialog()}),d(19,"Cancel"),l(),a(20,"button",13),_("click",function(){return r.onSubmit()}),d(21," Confirm "),l()()),o&2&&(s(2),m("icon",r.icons.SPACES),s(2),w(r.space.name),s(),x(r.loading?5:-1),s(6),m("space",r.space)("user",r.user)("showUsers",!1)("addRootFile",r.addRootFileEvent),s(),x(r.space.roots.length?-1:12),s(3),m("icon",r.icons.faPlus),s(),m("icon",r.icons.faAnchor),s(4),m("disabled",r.submitted))},dependencies:[F,P,qn],encapsulation:2});let i=n;return i})();var D4=()=>["roots"],F4=(i,n)=>n.id;function L4(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"joinCounts"),l()),i&2){let e=c(2);s(),w(E(2,1,e.space().counts,Tt(4,D4)))}}function P4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function N4(i,n){if(i&1){let e=y();a(0,"span",15),_("click",function(){h(e);let o=c(2);return C(o.openSpaceRootsDialog())}),f(1,"fa-icon",16),a(2,"span"),d(3),l()()}if(i&2){let e=c(2);s(),m("icon",e.icons.ANCHORED),s(2),w(e.space().counts.roots)}}function I4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function R4(i,n){if(i&1){let e=y();a(0,"span",18),_("click",function(){h(e);let o=c(3);return C(o.openChildShareDialog(o.space()))}),f(1,"fa-icon",16),a(2,"span"),d(3),l()()}if(i&2){let e=c(3);s(),m("icon",e.icons.SHARED),s(2),w(e.space().counts.shares)}}function V4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function z4(i,n){if(i&1&&(a(0,"div",10)(1,"div",7),d(2,"Child shares"),l(),g(3,R4,4,2,"span",17)(4,V4,2,0,"span",11),l()),i&2){let e=c(2);s(3),x(e.space().counts.shares?3:4)}}function O4(i,n){if(i&1&&f(0,"app-user-avatar",13),i&2){let e=n.$implicit;m("user",e)("isMember",!0)("height",26)("width",26)}}function B4(i,n){if(i&1&&f(0,"app-file-permissions",14),i&2){let e=c(2);m("permissions",e.space().hPerms)}}function U4(i,n){i&1&&(a(0,"span",11),d(1,"no"),l())}function H4(i,n){if(i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),f(3,"fa-icon",3),l()(),f(4,"hr",4),a(5,"div",5)(6,"div",6)(7,"div",7),d(8,"Name"),l(),a(9,"div",8),d(10),l()(),a(11,"div",6)(12,"div",7),d(13,"Created"),l(),a(14,"div",9),d(15),b(16,"amDateFormat"),l()(),a(17,"div",6)(18,"div",7),d(19,"Modified"),l(),a(20,"div",9),d(21),b(22,"amDateFormat"),l()(),a(23,"div",10)(24,"div",7),d(25,"Members"),l(),g(26,L4,3,5,"span")(27,P4,2,0,"span",11),l(),a(28,"div",10)(29,"div",7),d(30,"Anchored"),l(),g(31,N4,4,2,"span",12)(32,I4,2,0,"span",11),l(),g(33,z4,5,1,"div",10),l(),f(34,"hr",4),a(35,"div",5)(36,"div",10)(37,"div",7),d(38,"Managers"),l(),k(39,O4,1,4,"app-user-avatar",13,F4),l(),a(41,"div",10)(42,"div",7),d(43,"Permissions"),l(),g(44,B4,1,1,"app-file-permissions",14)(45,U4,2,0,"span",11),l()()()),i&2){let e=c();m("resizeOffset",e.resizeOffset),s(3),O("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),m("icon",e.icons.SPACES)("fixedWidth",!1),s(7),w(e.space().name),s(5),w(q(16,14,e.space().createdAt)),s(6),w(q(22,16,e.space().modifiedAt)),s(5),x(e.space().counts.users||e.space().counts.groups?26:27),s(5),x(e.space().counts.roots?31:32),s(2),x(e.space().role===e.SPACE_ROLE.IS_MANAGER?33:-1),s(6),D(e.space().managers),s(5),x(e.space().permissions?44:45)}}var q1=(()=>{let n=class n{constructor(){this.space=se.required(),this.locale=S(H),this.SPACE_ROLE=wn,this.icons={SPACES:ie.SPACES,ANCHORED:ie.ANCHORED,SHARED:ie.SHARED_WITH_OTHERS},this.cardImageSize=80,this.resizeOffset=80,this.userService=S(oe),this.layout=S(N)}openSpaceRootsDialog(){this.layout.openDialog(sa,"md",{initialState:{space:this.space(),user:this.userService.user}})}openChildShareDialog(t){t.counts.shares&&this.layout.openDialog(Oi,null,{initialState:{space:t}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-selection"]],inputs:{space:[1,"space"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"word-break-all","fs-xxs"],[1,"fs-xxs"],[1,"d-flex","align-items-center","mb-1"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],["tooltipPlacement","bottom",3,"user","isMember","height","width"],[3,"permissions"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"]],template:function(o,r){o&1&&g(0,H4,46,18,"div",0),o&2&&x(r.space()?0:-1)},dependencies:[fe,F,P,vt,Ze,ai,Le],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function $4(i,n){if(i&1&&(a(0,"span",11),d(1),l()),i&2){let e=c(2);s(),w(e.trash().nb)}}function G4(i,n){i&1&&(a(0,"span",12),d(1,"no"),l())}function W4(i,n){if(i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),f(3,"fa-icon",3),l()(),f(4,"hr",4),a(5,"div",5)(6,"div",6)(7,"div",7),d(8,"Name"),l(),a(9,"div",8),d(10),b(11,"translate"),l()(),a(12,"div",6)(13,"div",7),d(14,"Created"),l(),a(15,"div",9),d(16),b(17,"amDateFormat"),l()(),a(18,"div",6)(19,"div",7),d(20,"Modified"),l(),a(21,"div",9),d(22),b(23,"amDateFormat"),l()(),a(24,"div",10)(25,"div",7),d(26,"Elements"),l(),g(27,$4,2,1,"span",11)(28,G4,2,0,"span",12),l()()()),i&2){let e=c();m("resizeOffset",e.resizeOffset),s(3),O("width",e.cardImageSize,"px")("height",e.cardImageSize,"px"),m("icon",e.iconTrash)("fixedWidth",!1),s(7),w(e.trash().isPersonal?E(11,11,e.trash().name,e.locale.language):e.trash().name),s(6),w(q(17,14,e.trash().ctime)),s(6),w(q(23,16,e.trash().mtime)),s(5),x(e.trash().nb?27:28)}}var j1=(()=>{let n=class n{constructor(){this.trash=se.required(),this.locale=S(H),this.iconTrash=ie.TRASH,this.cardImageSize=80,this.resizeOffset=80}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-trash-selection"]],inputs:{trash:[1,"trash"]},decls:1,vars:1,consts:[["appAutoResize","",1,"fs-xxs",3,"resizeOffset"],[1,"card","px-1","pt-1"],[1,"card-body","align-self-center","p-0","my-1"],[1,"circle-primary-icon",2,"font-size","48px",3,"icon","fixedWidth"],[1,"my-1"],[1,"p-2"],[1,"d-flex","mb-1"],["l10nTranslate","",1,"d-flex","col-sm-5","ps-1","pb-1","fw-bold"],[1,"d-flex","col-sm-7","word-break-all","fs-xxs"],[1,"d-flex","col-sm-7","fs-xxs"],[1,"d-flex","align-items-center","mb-1"],[1,"badge","rounded-pill","bg-danger"],["l10nTranslate","",1,"badge","rounded-pill","bg-secondary-alt"]],template:function(o,r){o&1&&g(0,W4,29,18,"div",0),o&2&&x(r.trash()?0:-1)},dependencies:[fe,F,P,Le,Z],styles:[".card[_ngcontent-%COMP%]{width:100%;background:transparent;border:none}"],changeDetection:0});let i=n;return i})();function q4(i,n){if(i&1&&f(0,"app-files-selection",0),i&2){let e=c();m("files",e.store.filesSelection())}}function j4(i,n){if(i&1&&f(0,"app-space-selection",1),i&2){let e=c();m("space",e.store.spaceSelection())}}function K4(i,n){if(i&1&&f(0,"app-share-selection",2),i&2){let e=c();m("share",e.store.shareSelection())}}function Q4(i,n){if(i&1&&f(0,"app-trash-selection",3),i&2){let e=c();m("trash",e.store.trashSelection())}}function Y4(i,n){if(i&1&&f(0,"app-link-selection",4),i&2){let e=c();m("link",e.store.linkSelection())}}var K1=(()=>{let n=class n{constructor(){this.store=S(te),this.SPACES_PATH=$,this.selectionType=ve(()=>this.setRepository(this.store.repository()))}setRepository(t){return[$.SPACES,$.SHARED,$.LINKS,$.TRASHES].indexOf(t)>-1?t:$.FILES}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-selection"]],decls:5,vars:1,consts:[[3,"files"],[3,"space"],[3,"share"],[3,"trash"],[3,"link"]],template:function(o,r){if(o&1&&g(0,q4,1,1,"app-files-selection",0)(1,j4,1,1,"app-space-selection",1)(2,K4,1,1,"app-share-selection",2)(3,Q4,1,1,"app-trash-selection",3)(4,Y4,1,1,"app-link-selection",4),o&2){let p;x((p=r.selectionType())===r.SPACES_PATH.FILES?0:p===r.SPACES_PATH.SPACES?1:p===r.SPACES_PATH.SHARED?2:p===r.SPACES_PATH.TRASHES?3:p===r.SPACES_PATH.LINKS?4:-1)}},dependencies:[$1,W1,q1,j1,G1],encapsulation:2,changeDetection:0});let i=n;return i})();var X4=["CommentCreate"],Z4=(i,n)=>n.id;function J4(i,n){if(i&1){let e=y();a(0,"i",14),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.onEditComment(o))}),f(1,"fa-icon",15),l()}if(i&2){let e=c(3);s(),m("icon",e.icons.faEdit)}}function e3(i,n){if(i&1){let e=y();f(0,"textarea",16,1),a(2,"div",17)(3,"button",18),_("click",function(){h(e);let o=Be(1),r=c().$implicit,p=c(2);return C(p.updateComment(r,o.value))}),d(4," Update "),l(),a(5,"button",19),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.onEditComment(o))}),d(6," Cancel "),l(),a(7,"button",20),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.removeComment(o))}),d(8," Remove "),l()()}if(i&2){let e=Be(1),t=c().$implicit;m("ngModel",t.content)("disabled",!t.author.isAuthor&&t.isFileOwner),s(3),m("disabled",!e.value||t.content===e.value)}}function t3(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"amDateFormat"),l()),i&2){let e=c(2).$implicit;s(),w(q(2,1,e.dateToShow))}}function i3(i,n){i&1&&(a(0,"span",22),d(1,"modified"),l())}function n3(i,n){if(i&1&&(g(0,i3,2,0,"span",22),a(1,"span"),d(2),b(3,"amTimeAgo"),l()),i&2){let e=c(2).$implicit;x(e.wasModified?0:-1),s(2),w(q(3,2,e.dateToShow))}}function o3(i,n){if(i&1){let e=y();a(0,"div"),d(1),l(),a(2,"span",21),_("mouseleave",function(){h(e);let o=c().$implicit;return C(o.isHover=!1)})("mouseover",function(){h(e);let o=c().$implicit;return C(o.isHover=!0)})("focus",function(){h(e);let o=c().$implicit;return C(o.isHover=!0)}),g(3,t3,3,3,"span")(4,n3,4,4),l()}if(i&2){let e=c().$implicit;s(),w(e.content),s(2),x(e.isHover?3:4)}}function r3(i,n){if(i&1&&(a(0,"div",7)(1,"div",8),f(2,"app-user-avatar",9),a(3,"div",10)(4,"b"),d(5),b(6,"translate"),l()(),a(7,"div",11),g(8,J4,2,1,"i",12),l()(),a(9,"div",13),g(10,e3,9,3)(11,o3,5,2),l()()),i&2){let e=n.$implicit,t=c(2);s(2),m("user",e.author)("width",24)("height",24),s(3),w(e.author.isAuthor?E(6,6,"Me",t.locale.language):e.author.fullName),s(3),x(e.author.isAuthor||e.isFileOwner?8:-1),s(2),x(e.isEdited?10:11)}}function a3(i,n){if(i&1&&(a(0,"div",6),k(1,r3,12,9,"div",7,Z4),l()),i&2){let e=c();s(),D(e.comments)}}var Q1=(()=>{let n=class n{constructor(){this.locale=S(H),this.comments=[],this.icons={faEdit:xl},this.store=S(te),this.file=ve(()=>this.store.filesSelection().length?this.store.filesSelection()[0]:null),this.layout=S(N),this.commentsService=S(Kr),this.subscriptions=[],this.subscriptions.push(ui(this.file).subscribe(t=>this.loadComments(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onEditComment(t){t.isEdited||this.comments.forEach(o=>o.isEdited=!1),t.isEdited=!t.isEdited}loadComments(t){t&&t.hasComments?this.commentsService.getComments(this.file()).subscribe({next:o=>this.comments=o,error:o=>this.layout.sendNotification("error","Comments","Unable to load",o)}):this.comments=[]}postComment(){let t=this.commentInput.nativeElement.value;this.commentsService.createComment(this.file(),{content:t,fileId:this.file().id}).subscribe({next:o=>{this.comments.unshift(o),this.commentInput.nativeElement.value="",this.file().id=o.fileId,this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to create",o)})}removeComment(t){this.commentsService.deleteComment(this.file(),{commentId:t.id,fileId:this.file().id}).subscribe({next:()=>{this.comments=this.comments.filter(o=>o.id!==t.id),this.file().hasComments=!!this.comments.length},error:o=>this.layout.sendNotification("error","Comment","Unable to delete",o)})}updateComment(t,o){this.commentsService.updateComment(this.file(),{commentId:t.id,fileId:this.file().id,content:o}).subscribe({next:r=>{t.isEdited=!1,Object.assign(t,r)},error:r=>{this.layout.sendNotification("error","Comment","Unable to update",r)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-comments-selection"]],viewQuery:function(o,r){if(o&1&&Y(X4,7),o&2){let p;G(p=W())&&(r.commentInput=p.first)}},decls:8,vars:7,consts:[["CommentCreate",""],["CommentUpdate",""],[1,"sidebar-component-title"],[1,"input-group","mb-0"],["type","text","appAutofocus","",1,"form-control","form-control-sm",3,"keyup.enter","disabled","placeholder"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"click","disabled"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","app-comment","rounded"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],[1,"cursor-pointer"],[1,"pb-2","px-2"],[1,"cursor-pointer",3,"click"],[3,"icon"],["required","",1,"form-control","form-control-sm","mt-1","mb-2",3,"ngModel","disabled"],[1,"d-flex"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","me-auto",3,"click","disabled"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary","align-content-around",3,"click"],["role","button","type","button","l10nTranslate","",1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"],[1,"text-muted","no-select","pt-1","fs-xxxs",3,"mouseleave","mouseover","focus"],["l10nTranslate","",1,"me-1"]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"div",3)(2,"input",4,0),b(4,"translate"),_("keyup.enter",function(){return h(p),C(r.postComment())}),l(),a(5,"button",5),_("click",function(){return h(p),C(r.postComment())}),d(6," Add "),l()()(),g(7,a3,3,0,"div",6)}if(o&2){let p=Be(3);s(2),m("disabled",!r.file())("placeholder",E(4,4,"Write a comment ...",r.locale.language)),s(3),m("disabled",!p.value),s(2),x(r.comments.length?7:-1)}},dependencies:[Ye,P,fe,F,be,je,xe,ti,ye,Ze,Z,Le,Je],encapsulation:2});let i=n;return i})();var s3=(i,n)=>n.key,l3=(i,n)=>n.id;function c3(i,n){if(i&1&&(a(0,"option",8),d(1),l()),i&2){let e=n.$implicit;m("ngValue",e.key),s(),w(e.value.text)}}function p3(i,n){if(i&1){let e=y();a(0,"div",12)(1,"div",13)(2,"img",14),_("error",function(){let o=h(e).$implicit;return C(o.fallBackMimeUrl())}),l(),a(3,"div",15),d(4),l(),a(5,"button",16),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.remove(o))}),f(6,"fa-icon",4),l()()()}if(i&2){let e=n.$implicit,t=c(2);s(),m("tooltip",e.path),s(),m("src",e.mimeUrl,ee),s(2),w(e.name),s(2),m("icon",t.icons.faTimes)}}function d3(i,n){if(i&1){let e=y();a(0,"div",5)(1,"div",6)(2,"select",7),me("ngModelChange",function(o){h(e);let r=c();return de(r.selectedAction,o)||(r.selectedAction=o),C(o)}),k(3,c3,2,2,"option",8,s3),b(5,"keyvalue"),l(),a(6,"button",9),_("click",function(){h(e);let o=c();return C(o.doAction())}),d(7,"Confirm"),l()()(),f(8,"hr",10),a(9,"div",11),k(10,p3,7,4,"div",12,l3),l()}if(i&2){let e=c();s(2),pe("ngModel",e.selectedAction),s(),D(E(5,2,e.operations,e.originalOrderKeyValue)),s(6),m("resizeOffset",120),s(),D(e.files)}}var Y1=(()=>{let n=class n{constructor(){this.locale=S(H),this.icons={faTrashCan:ki,faTimes:Nt,faDownload:vn,faArrowsAlt:ii,faClone:Sn,faQuestion:Oo},this.originalOrderKeyValue=Fe,this.operations={copyPaste:{text:"Copy-Paste",operation:ze.COPY},cutPaste:{text:"Cut-Paste",operation:ze.MOVE},download:{text:"Download",operation:ze.DOWNLOAD},compress:{text:"Compress",operation:ze.COMPRESS}},this.files=[],this.layout=S(N),this.store=S(te),this.filesService=S(He),this.selectedAction=this.filesService.clipboardAction,this.subscriptions=[],this.subscriptions.push(this.store.filesClipboard.subscribe(t=>this.files=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}clearAll(){this.layout.toggleRSideBar(!1),this.filesService.clearClipboard()}remove(t){this.files.length===1?this.clearAll():this.filesService.removeFromClipboard(t)}doAction(){if(this.selectedAction==="copyPaste"||this.selectedAction==="cutPaste")this.filesService.onPasteClipboard(this.selectedAction);else{let t={name:this.files[0].name,compressInDirectory:this.operations[this.selectedAction].operation===ze.COMPRESS,files:this.files.map(r=>({name:r.name,rootAlias:r.root?.alias,path:r.path})),extension:"tar"};this.layout.openDialog(oa,null,{initialState:{archiveProps:t}}).content.submitEvent.pipe(ce(1)).subscribe(()=>this.filesService.clearClipboard())}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-clipboard"]],decls:8,vars:7,consts:[[1,"sidebar-component-title"],["container","body","placement","left",1,"cursor-pointer",3,"icon","tooltip"],["l10nTranslate",""],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"px-2","pt-2","pb-2","fs-xs"],[1,"d-flex","justify-content-between","mt-2"],[1,"form-select","form-select-sm","my-auto",3,"ngModelChange","ngModel"],["l10nTranslate","",3,"ngValue"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary","ms-1",3,"click"],[1,"mx-0","mt-2","mb-0"],["appAutoResize","",1,"sidebar-item",3,"resizeOffset"],[1,"sidebar-item-container"],[1,"sidebar-item-content",3,"tooltip"],["alt","","height","28","width","auto",1,"me-1",3,"error","src"],[1,"text-truncate","fs-xxs"],[1,"btn","btn-xxs","btn-danger","ms-auto",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0),f(1,"fa-icon",1),b(2,"translate"),a(3,"span",2),d(4,"Clipboard"),l(),a(5,"button",3),_("click",function(){return r.clearAll()}),f(6,"fa-icon",4),l()(),g(7,d3,12,5)),o&2&&(s(),m("icon",r.icons.faQuestion)("tooltip",E(2,4,"Actions will be performed in the current folder",r.locale.language)),s(5),m("icon",r.icons.faTrashCan),s(),x(r.files.length?7:-1))},dependencies:[fe,F,Ke,ke,P,be,wi,Ti,bi,xe,ye,Z,Ae],encapsulation:2});let i=n;return i})();var X1=(()=>{let n=class n{constructor(){this.layout=S(N),this.store=S(te),this.tabs=[{label:_e.SELECTION,components:[K1],loadComponent:!1,icon:Dl,count:{value:ui(ve(()=>this.store.filesSelection().length>1?this.store.filesSelection().length>1e3?"999+":this.store.filesSelection().length:0)),level:"primary"},title:"Info",active:!1},{label:_e.TREE,components:[ea],loadComponent:!0,icon:Bl,title:null,active:!1},{label:_e.COMMENTS,components:[Q1],loadComponent:!1,icon:Gr,title:null,active:!1},{label:_e.CLIPBOARD,components:[Y1],loadComponent:!1,icon:Yo,count:{value:this.store.filesClipboard.pipe(bt(t=>t.length)),level:"maroon"},showOnCount:!0,title:null,active:!1}],this.layout.setTabsRSideBar(cc.FILES,this.tabs)}ngOnDestroy(){this.layout.setTabsRSideBar(null)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-spaces-nav"]],decls:1,vars:0,template:function(o,r){o&1&&f(0,"router-outlet")},dependencies:[dn],encapsulation:2});let i=n;return i})();var Z1=(()=>{let n=class n{transform(t,o,r){if(typeof o>"u"||typeof o=="number"&&typeof r>"u")throw new Error("TimeAddPipe: missing required arguments");return ri(t).add(o,r)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275pipe=cn({name:"amAdd",type:n,pure:!0});let i=n;return i})();var J1=(()=>{let n=class n{transform(t,o){if(!o)throw new Error("TimeDurationPipe: missing required time unit argument");return ri.duration({[o]:t}).humanize()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275pipe=cn({name:"amDuration",type:n,pure:!1});let i=n;return i})();function u3(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c();s(),w(e.space.name)}}function f3(i,n){i&1&&(a(0,"span",3),d(1,"Create a new space"),l())}function _3(i,n){if(i&1&&f(0,"fa-icon",4),i&2){let e=c();m("icon",e.icons.faSpinner)}}function h3(i,n){i&1&&(a(0,"h4",5)(1,"span",3),d(2,"Edit space"),l()())}function C3(i,n){if(i&1&&(f(0,"fa-icon",47),a(1,"span",48),d(2,"Settings"),l()),i&2){let e=c();m("icon",e.icons.faCog)}}function g3(i,n){if(i&1&&(a(0,"div",22)(1,"label",49),d(2,"Storage Usage"),l(),f(3,"app-storage-usage",50),l()),i&2){let e=c();s(3),m("item",e.space)}}function x3(i,n){i&1&&(a(0,"small",36),d(1,"At least one manager is required"),l())}function S3(i,n){if(i&1&&(a(0,"div",57)(1,"label",58),d(2,"Deactivation date"),l(),a(3,"div",59),d(4),b(5,"amDateFormat"),l()()),i&2){let e=c(2);s(4),w(q(5,1,e.space.disabledAt))}}function v3(i,n){if(i&1&&(a(0,"div",37)(1,"div",51)(2,"label",52),d(3,"Creation date"),l(),a(4,"div",53),d(5),b(6,"amDateFormat"),l()(),a(7,"div",54)(8,"label",55),d(9,"Modification date"),l(),a(10,"div",56),d(11),b(12,"amDateFormat"),l()(),g(13,S3,6,3,"div",57),l()),i&2){let e=c();s(5),w(q(6,3,e.space.createdAt)),s(6),w(q(12,5,e.space.modifiedAt)),s(2),x(e.space.disabledAt&&!e.space.enabled?13:-1)}}function y3(i,n){if(i&1&&(f(0,"fa-icon",47),a(1,"span",60),d(2,"Files"),l(),a(3,"span"),d(4),l()),i&2){let e=c();m("icon",e.icons.faAnchor),s(4),A("(",(e.space.roots==null?null:e.space.roots.length)||0,")")}}function b3(i,n){if(i&1&&(f(0,"fa-icon",47),a(1,"span",60),d(2,"Members"),l(),a(3,"span"),d(4),l()),i&2){let e=c();m("icon",e.icons.faUsers),s(4),A("(",e.space.members.length,")")}}function w3(i,n){if(i&1&&(f(0,"fa-icon",47),a(1,"span",60),d(2,"Links"),l(),a(3,"span"),d(4),l()),i&2){let e=c();m("icon",e.icons.LINKS),s(4),A("(",e.space.links.length,")")}}function T3(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"amAdd"),b(3,"amTimeAgo"),l()),i&2){let e=c(3);s(),A("\xA0",E(3,5,Dt(2,1,e.space.disabledAt,e.SPACE_MAX_DISABLED_DAYS,"days"),!0))}}function E3(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"amDuration"),l()),i&2){let e=c(3);s(),A("\xA0",E(2,1,e.SPACE_MAX_DISABLED_DAYS,"days"))}}function M3(i,n){if(i&1&&(a(0,"div",62)(1,"span",3),d(2,"Space and data will be deleted in"),l(),a(3,"span",63),g(4,T3,4,8,"span")(5,E3,3,4,"span"),l()()),i&2){let e=c(2);s(4),x(e.space.disabledAt?4:5)}}function A3(i,n){if(i&1){let e=y();a(0,"button",61),_("click",function(){h(e);let o=c();return C(o.confirmDeletion=!0)}),d(1," Remove "),l(),g(2,M3,6,1,"div",62)}if(i&2){let e=c();m("disabled",e.confirmDeletion),s(2),x(e.space.enabled?-1:2)}}function k3(i,n){if(i&1){let e=y();a(0,"button",64),_("click",function(){h(e);let o=c();return C(o.openCreateLinkDialog())}),f(1,"fa-icon",47)(2,"fa-icon",47),d(3," Link "),l()}if(i&2){let e=c();s(),m("icon",e.icons.faPlus),s(),m("icon",e.icons.LINKS)}}function D3(i,n){if(i&1){let e=y();a(0,"button",66),_("click",function(){h(e);let o=c(2);return C(o.openAdminRootDialog())}),f(1,"fa-icon",47)(2,"fa-icon",47),d(3," External location "),l()}if(i&2){let e=c(2);s(),m("icon",e.icons.faPlus),s(),m("icon",e.icons.faUserShield)}}function F3(i,n){if(i&1){let e=y();a(0,"button",64),_("click",function(){h(e);let o=c();return C(o.openSelectRootDialog())}),f(1,"fa-icon",47)(2,"fa-icon",47),d(3," File "),l(),g(4,D3,4,2,"button",65)}if(i&2){let e=c();s(),m("icon",e.icons.faPlus),s(),m("icon",e.icons.faAnchor),s(2),x(e.user.isAdmin?4:-1)}}var ps=(()=>{let n=class n{constructor(){this.space=new Rc({id:0,name:"",createdAt:new Date,enabled:!0,storageUsage:0,storageQuota:null}),this.spaceChange=new ae,this.locale=S(H),this.layout=S(N),this.icons={SPACES:ie.SPACES,LINKS:ie.LINKS,faPen:mt,faAnchor:oi,faUserShield:Qo,faPlus:Qe,faSpinner:Ue,faCog:Ai,faUsers:Ko},this.SPACE_MAX_DISABLED_DAYS=30,this.addRootFileEvent=new To,this.allowedLinkPermissions=[De.ADD,De.DELETE,De.MODIFY],this.editManagers=!1,this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=S(oe),this.user=this.userService.user,this.spacesService=S(ot),this.linksService=S(pi)}ngOnInit(){this.space.id||this.space.managers.unshift(bc(this.user,wn.IS_MANAGER))}searchManagers(t){let o={search:t,ignoreUserIds:[...this.space.managers.map(r=>r.id),...this.space.members.filter(r=>r.isUser).map(r=>r.id)],onlyUsers:!0};return this.userService.searchMembers(o)}searchMembers(t){let o={search:t,ignoreUserIds:[...this.space.managers.map(r=>r.id),...this.space.members.filter(r=>r.isUser).map(r=>r.id)],ignoreGroupIds:this.space.members.filter(r=>r.isGroup).map(r=>r.id)};return this.userService.searchMembers(o)}openSelectRootDialog(){this.layout.openDialog($n,"xl",{initialState:{currentRoots:this.space.roots.filter(o=>o.owner.id===this.user.id)}}).content.submitEvent.pipe(ce(1)).subscribe(o=>this.addRootFileEvent.next(o))}openAdminRootDialog(){this.layout.openDialog(ta,null,{initialState:{currentRoots:this.space.roots.filter(o=>o.externalPath)}}).content.submitEvent.pipe(ce(1)).subscribe(o=>this.addRootFileEvent.next(o))}openEditLinkDialog(t){this.linksService.editLinkDialog(t,this.space,fr.SPACE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.space)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.space.id===0&&this.layout.closeDialog(),this.spacesService.deleteSpace(this.space.id,{deleteNow:!0}).subscribe({next:()=>{this.loading=!1,this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:t=>{this.onError(),this.layout.sendNotification("error","Delete space",this.space.name,t)}})):this.space.id===0?this.spacesService.createSpace(this.space).subscribe({next:t=>{this.loading=!1,this.space=t,this.spaceChange.emit(["add",t]),this.layout.closeDialog()},error:t=>{this.onError(),this.layout.sendNotification("error","Create space",this.space.name,t)}}):this.spacesService.updateSpace(this.space).subscribe({next:t=>{this.loading=!1,t?(this.space=t,this.spaceChange.emit(["update",t])):this.spaceChange.emit(["delete",this.space]),this.layout.closeDialog()},error:t=>{this.onError(),this.layout.sendNotification("error","Edit space",this.space.name,t)}})}cantSubmit(){return this.submitted||!this.space.name||!this.space.managers.length}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-space-dialog"]],inputs:{space:"space"},outputs:{spaceChange:"spaceChange"},decls:70,vars:48,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[2,"max-width","85%"],[1,"mb-3","px-0"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"d-flex","flex-column","align-items-start","mb-3"],[1,"w-100",3,"quotaChange","quota","fullWidth"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","justify-content-between"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],["for","switchFullText","l10nTranslate",""],["id","switchFullText","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchFullText","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"d-flex","flex-column","col-6"],["type","button",3,"click"],["for","editManagers","l10nTranslate","",1,"no-select-pointer"],["id","editManagers",1,"ms-1",3,"icon"],[3,"membersChange","members","searchFunction","editMode","hideInput","customPlaceholder"],["l10nTranslate","",1,"text-danger"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[1,"col-12"],[3,"space","user","addRootFile"],[3,"membersChange","members","withPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","storage","l10nTranslate",""],["id","storage",3,"item"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[1,"text-danger","white-space-truncate","fs-sm","mx-auto"],[1,"fw-bold"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),g(3,u3,2,1,"span")(4,f3,2,0,"span",3),g(5,_3,1,1,"fa-icon",4),l(),g(6,h3,3,0,"h4",5),a(7,"button",6),_("click",function(){return r.layout.closeDialog()}),l()(),a(8,"div",7)(9,"tabset",8),f(10,"hr",9),a(11,"tab",10),_("selectTab",function(){return r.tabView=null}),L(12,C3,3,1,"ng-template",11),a(13,"div",12)(14,"div",13)(15,"div",14)(16,"div",15)(17,"label",16),d(18," Space name "),l(),a(19,"input",17),me("ngModelChange",function(u){return de(r.space.name,u)||(r.space.name=u),u}),l()(),a(20,"div",15)(21,"label",18),d(22," Description "),l(),a(23,"input",19),me("ngModelChange",function(u){return de(r.space.description,u)||(r.space.description=u),u}),l()(),a(24,"div",20)(25,"app-storage-quota",21),me("quotaChange",function(u){return de(r.space.storageQuota,u)||(r.space.storageQuota=u),u}),l()(),g(26,g3,4,1,"div",22),a(27,"div",23)(28,"div")(29,"label",24),d(30,"Space status"),l(),a(31,"div",25)(32,"input",26),me("ngModelChange",function(u){return de(r.space.enabled,u)||(r.space.enabled=u),u}),l(),a(33,"label",27),d(34),l()()(),a(35,"div")(36,"label",28),d(37,"Full-text search"),l(),a(38,"div",25)(39,"input",29),me("ngModelChange",function(u){return de(r.space.storageIndexing,u)||(r.space.storageIndexing=u),u}),l(),a(40,"label",30),d(41),l()()()()()(),a(42,"div",31)(43,"div",32),_("click",function(){return r.editManagers=!r.editManagers}),a(44,"label",33),d(45,"Managers"),l(),f(46,"fa-icon",34),l(),a(47,"app-user-search",35),me("membersChange",function(u){return de(r.space.managers,u)||(r.space.managers=u),u}),l(),g(48,x3,2,0,"small",36),g(49,v3,14,7,"div",37),l()()(),a(50,"tab",38),_("selectTab",function(){return r.tabView="roots"}),L(51,y3,5,2,"ng-template",11),a(52,"div",39),f(53,"app-space-manage-roots",40),l()(),a(54,"tab",38),_("selectTab",function(){return r.tabView="members"}),L(55,b3,5,2,"ng-template",11),a(56,"div",9)(57,"app-user-search",41),me("membersChange",function(u){return de(r.space.members,u)||(r.space.members=u),u}),l()()(),a(58,"tab",38),_("selectTab",function(){return r.tabView="links"}),L(59,w3,5,2,"ng-template",11),a(60,"div",9)(61,"app-user-search",42),me("membersChange",function(u){return de(r.space.links,u)||(r.space.links=u),u}),l()()()()(),a(62,"div",43),g(63,A3,3,2),g(64,k3,4,2,"button",44),g(65,F3,5,3),a(66,"button",45),_("click",function(){return r.onCancel()}),d(67,"Cancel"),l(),a(68,"button",46),_("click",function(){return r.onSubmit()}),d(69),l()()),o&2&&(s(2),m("icon",r.icons.SPACES),s(),x(r.space.id?3:4),s(2),x(r.loading?5:-1),s(),x(r.space.id?6:-1),s(),V(X("btn-close btn-close-white ",r.space.id?"ms-2":"ms-auto"," ms-2")),s(2),m("justified",!0),s(10),V(X("form-control form-control-sm ",r.space.name?"":"is-invalid")),pe("ngModel",r.space.name),s(4),pe("ngModel",r.space.description),s(2),pe("quota",r.space.storageQuota),m("fullWidth",!0),s(),x(r.space.storageUsage?26:-1),s(6),pe("ngModel",r.space.enabled),s(2),A(" ",r.space.enabled?"enabled":"disabled"," "),s(5),pe("ngModel",r.space.storageIndexing),s(2),A(" ",r.space.storageIndexing?"enabled":"disabled"," "),s(5),m("icon",r.icons.faPen),s(),pe("members",r.space.managers),m("searchFunction",r.searchManagers.bind(r))("editMode",r.editManagers)("hideInput",!r.editManagers)("customPlaceholder","Type to search for managers to add"),s(),x(r.space.managers.length?-1:48),s(),x(r.space.id?49:-1),s(4),m("space",r.space)("user",r.user)("addRootFile",r.addRootFileEvent),s(4),pe("members",r.space.members),m("withPermissions",!0)("searchFunction",r.searchMembers.bind(r)),s(4),pe("members",r.space.links),m("filterPermissions",!0)("allowedPermissions",r.allowedLinkPermissions)("withPermissions",!0)("editFunction",r.openEditLinkDialog.bind(r))("hideInput",!0),s(2),x(!r.tabView&&r.space.id&&r.user.isAdmin?63:-1),s(),x(r.tabView==="links"?64:-1),s(),x(r.tabView==="roots"?65:-1),s(3),V(X("btn btn-sm ",r.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",r.cantSubmit()),s(),A(" ",r.confirmDeletion?"Confirm permanent deletion of data":"Confirm"," "))},dependencies:[P,F,Sr,gr,Cr,xr,be,je,Lt,xe,ti,ye,Ye,vr,Dn,qn,kn,Je,Z1,J1,Le],encapsulation:2});let i=n;return i})();var L3=["MainContextMenu"],P3=["TargetContextMenu"],N3=()=>["roots","shares"],ep=(i,n)=>n.id,tp=(i,n)=>n.mid,ip=(i,n)=>n.key;function I3(i,n){if(i&1){let e=y();a(0,"button",3),b(1,"translate"),_("click",function(){h(e);let o=c();return C(o.openSpaceDialog(!0))}),f(2,"fa-icon",7),l()}if(i&2){let e=c();m("tooltip",E(1,2,"New space",e.locale.language)),s(2),m("icon",e.icons.faPlus)}}function R3(i,n){if(i&1&&(a(0,"span",29),d(1),l()),i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),w(e.hTimeAgo)}}function V3(i,n){if(i&1&&f(0,"app-user-avatar",30),i&2){let e=n.$implicit,t=c(4);m("user",e)("isMember",!0)("height",t.galleryMode.dimensions/3)("width",t.galleryMode.dimensions/3)}}function z3(i,n){if(i&1&&(a(0,"span",26),k(1,V3,1,4,"app-user-avatar",30,tp),l()),i&2){let e=c().$implicit;s(),D(e.managers)}}function O3(i,n){if(i&1){let e=y();a(0,"div",21),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),a(1,"div",22),f(2,"fa-icon",23),a(3,"span",24),g(4,R3,2,3,"span",25),l(),g(5,z3,3,0,"span",26),l(),a(6,"div",27)(7,"span",28),d(8),l()()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);O("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),z("disabled",!e.enabled)("selected",e.id===(o.selected==null?null:o.selected.id)),s(),Jt("rowIndex",t),s(),O("min-width",o.galleryMode.image,"px")("min-height",o.galleryMode.image,"px")("font-size",o.galleryMode.faSize,"px"),m("icon",o.icons.SPACES),s(2),x(e.newly?4:-1),s(),x(e.managers.length?5:-1),s(2),O("font-size",o.galleryMode.textSize,"px"),s(),w(e.name)}}function B3(i,n){if(i&1){let e=y();a(0,"div",12)(1,"app-virtual-scroll",18),b(2,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(3,"div",19),k(4,O3,9,21,"div",20,ep),l()()()}if(i&2){let e=c();s(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",E(2,5,e.spaces,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),s(3),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function U3(i,n){if(i&1&&f(0,"fa-icon",37),i&2){let e=c(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function H3(i,n){if(i&1){let e=y();a(0,"th",36),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.sortBy(o.key))}),d(1),g(2,U3,1,2,"fa-icon",37),l()}if(i&2){let e=c().$implicit,t=c(2);V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function $3(i,n){if(i&1&&g(0,H3,3,10,"th",35),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function G3(i,n){if(i&1&&(a(0,"div",40),f(1,"fa-icon",41),a(2,"div",42)(3,"span",28),d(4),l(),a(5,"span",43),d(6),l()()()),i&2){let e=c(3).$implicit,t=c(2);s(),m("icon",t.icons.SPACES)("fixedWidth",!1),s(3),w(e.name),s(2),w(e.description)}}function W3(i,n){if(i&1&&f(0,"app-user-avatar",44),i&2){let e=n.$implicit;m("user",e)("isMember",!0)}}function q3(i,n){if(i&1&&k(0,W3,1,2,"app-user-avatar",44,tp),i&2){let e=c(3).$implicit;D(e.managers)}}function j3(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"joinCounts"),l()),i&2){let e=c(3).$implicit;s(),w(E(2,1,e.counts,Tt(4,N3)))}}function K3(i,n){if(i&1){let e=y();a(0,"span",47),_("click",function(){h(e);let o=c(6);return C(o.openSpaceRootsDialog())}),f(1,"fa-icon",7),d(2),l()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.faAnchor),s(),A("\xA0",e.counts.roots," ")}}function Q3(i,n){if(i&1){let e=y();a(0,"span",48),_("click",function(){h(e);let o=c(4).$implicit,r=c(2);return C(r.openChildShareDialog(o))}),f(1,"fa-icon",49),a(2,"span"),d(3),l()()}if(i&2){let e=c(4).$implicit,t=c(2);s(),m("icon",t.icons.SHARED),s(2),w(e.counts.shares)}}function Y3(i,n){if(i&1&&(g(0,K3,3,2,"span",45),g(1,Q3,4,2,"span",46)),i&2){let e=c(3).$implicit,t=c(2);x(e.counts!=null&&e.counts.roots?0:-1),s(),x(e.role===t.SPACE_ROLE.IS_MANAGER&&e.counts.shares?1:-1)}}function X3(i,n){if(i&1&&f(0,"app-file-permissions",50),i&2){let e=c(4).$implicit;m("permissions",e.hPerms)}}function Z3(i,n){if(i&1&&g(0,X3,1,1,"app-file-permissions",50),i&2){let e=c(3).$implicit;x(e.permissions?0:-1)}}function J3(i,n){if(i&1&&d(0),i&2){let e=c(3).$implicit;A(" ",e.hTimeAgo," ")}}function e6(i,n){if(i&1&&(a(0,"td"),g(1,G3,7,4,"div",40)(2,q3,2,0)(3,j3,3,5,"span")(4,Y3,2,2)(5,Z3,1,1)(6,J3,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="managers"?2:e==="members"?3:e==="info"?4:e==="permissions"?5:e==="modified"?6:-1)}}function t6(i,n){if(i&1&&g(0,e6,7,9,"td",39),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function i6(i,n){if(i&1){let e=y();a(0,"tr",38),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),k(1,t6,1,1,null,null,ip),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);z("disabled",!e.enabled)("selected",e.id===(t.selected==null?null:t.selected.id)),s(),D(E(3,4,t.tableHeaders,t.originalOrderKeyValue))}}function n6(i,n){if(i&1){let e=y();a(0,"table",31)(1,"thead")(2,"tr"),k(3,$3,1,1,null,null,ip),b(5,"keyvalue"),l()()(),a(6,"app-virtual-scroll",32),b(7,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(8,"table",31)(9,"tbody",33),k(10,i6,4,7,"tr",34,ep),l()()()}if(i&2){let e=c();s(3),D(E(5,2,e.tableHeaders,e.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",E(7,5,e.spaces,e.inputFilter.search())),s(4),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function o6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"New space"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faPlus)}}function r6(i,n){}function a6(i,n){if(i&1){let e=y();L(0,o6,3,1,"ng-template",15),_("execute",function(){h(e);let o=c();return C(o.openSpaceDialog(!0))}),L(1,r6,0,0,"ng-template",17)}i&2&&(s(),m("divider",!0))}function s6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"Refresh"),l()),i&2){let e=c();s(),m("icon",e.icons.faArrowRotateRight)}}function l6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"Edit space"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faPen)}}function c6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"Edit children shares"),l()),i&2){let e=c(3);s(),m("icon",e.icons.SHARED)}}function p6(i,n){if(i&1){let e=y();L(0,c6,3,1,"ng-template",15),_("execute",function(){h(e);let o=c(2);return C(o.openChildShareDialog())})}}function d6(i,n){if(i&1){let e=y();L(0,l6,3,1,"ng-template",15),_("execute",function(){h(e);let o=c();return C(o.openSpaceDialog())}),g(1,p6,1,0,null,16)}if(i&2){let e=c();s(),x(e.selected!=null&&e.selected.counts.shares?1:-1)}}function m6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"Manage my anchored files"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faAnchor)}}function u6(i,n){if(i&1){let e=y();L(0,m6,3,1,"ng-template",15),_("execute",function(){h(e);let o=c();return C(o.openSpaceRootsDialog())})}}function f6(i,n){}function _6(i,n){i&1&&L(0,f6,0,0,"ng-template",17),i&2&&m("divider",!0)}function h6(i,n){if(i&1&&(a(0,"span",51),f(1,"fa-icon",7),d(2,"Info"),l()),i&2){let e=c();s(),m("icon",e.icons.faCircleInfo)}}var np=(()=>{let n=class n{constructor(){this.locale=S(H),this.layout=S(N),this.SPACE_ROLE=wn,this.originalOrderKeyValue=Fe,this.TAB_MENU=_e,this.icons={SPACES:ie.SPACES,SHARED:ie.SHARED_WITH_OTHERS,faAnchor:oi,faArrowDown:ft,faArrowUp:dt,faRotate:Mi,faArrowRotateRight:ut,faUpload:or,faPlus:Qe,faPen:mt,faCircleInfo:It},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},managers:{label:"Managers",width:10,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},members:{label:"Members",width:20,class:"d-none d-md-table-cell",textCenter:!1,show:!0},info:{label:"Info",width:15,textCenter:!0,class:"d-none d-md-table-cell",show:!0},permissions:{label:"Permissions",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",managers:"Managers",permissions:"Permissions",modified:"Modified"},this.loading=!1,this.spaces=[],this.selected=null,this.canCreateSpace=!1,this.canEditSpace=!1,this.canManageRoots=!1,this.router=S(ge),this.activatedRoute=S(ei),this.spacesService=S(ot),this.store=S(te),this.userService=S(oe),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],managers:[{prop:"managers",type:"length"}],permissions:[{prop:"permissions",type:"length"}],modified:[{prop:"modified",type:"date"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.loadSpaces(),this.canCreateSpace=this.userService.userHavePermission(_t.SPACES_ADMIN),this.layout.setBreadcrumbIcon(ie.SPACES),this.layout.setBreadcrumbNav({url:`/${$.SPACES}/${Ot.SPACES}`,translating:!0,sameLink:!0}),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select)}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadSpaces(){this.loading=!0,this.onSelect(),this.spacesService.listSpaces().subscribe({next:t=>{this.sortBy(this.sortTable.sortParam.column,!1,t),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:t=>{this.spaces=[],this.loading=!1,this.layout.sendNotification("error","Spaces",t.error.message)}})}browse(t){t.enabled?this.router.navigate([$.FILES,t.alias],{relativeTo:this.activatedRoute}).catch(console.error):this.layout.sendNotification("warning",t.name,"Space is disabled")}onSelect(t=null){t?(this.selected=t,this.canEditSpace=!!t.managers.find(o=>o.id===this.userService.user.id),this.canManageRoots=this.canEditSpace||t.havePermission(De.SHARE_INSIDE)):(this.selected=null,this.canEditSpace=!1,this.canManageRoots=!1),this.store.spaceSelection.set(this.selected)}sortBy(t,o=!0,r){this.spaces=this.sortTable.sortBy(t,o,r||this.spaces)}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}openSpaceDialog(t=!1){t?this.layout.openDialog(ps,"xl").content.spaceChange.pipe(ce(1)).subscribe(r=>{let[p,u]=r;p==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.concat(u)),this.onSelect(u))}):this.selected&&this.canEditSpace&&this.spacesService.getSpace(this.selected.id).subscribe({next:o=>{this.layout.openDialog(ps,"xl",{initialState:{space:o}}).content.spaceChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;u==="update"?(this.selected.name=v.name,this.selected.alias=v.alias,this.selected.description=v.description,this.selected.counts=Se(re({},v.counts),{shares:this.selected.counts.shares}),this.selected.modifiedAt=v.modifiedAt,this.selected.enabled=v.enabled,this.selected.managers=[...v.managers]):u==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.spaces.filter(T=>T.id!==v.id)))})},error:o=>this.layout.sendNotification("error","Edit space",this.selected.name,o)})}openSpaceRootsDialog(){setTimeout(()=>{this.layout.openDialog(sa,"md",{initialState:{space:this.selected,user:this.userService.user}})},this.selected?0:100)}openChildShareDialog(t){t&&this.onSelect(t),this.layout.openDialog(Oi,null,{initialState:{space:this.selected}}).content.sharesCountEvent.subscribe(r=>this.selected.counts.shares=r)}focusOn(t){let o=this.spaces.find(r=>r.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-spaces"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(lt,7),Y(L3,7),Y(P3,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.btnNavigationView=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.targetContextMenu=p.first)}},decls:34,vars:37,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"disabled","selected","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-left"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[3,"user","isMember","height","width"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[1,"circle-primary-icon",3,"icon","fixedWidth"],[1,"d-flex","flex-column","text-truncate"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1"],[1,"badge","rounded-pill","bg-primary","cursor-pointer","me-1",3,"click"],[1,"badge","rounded-pill","bg-purple","cursor-pointer","me-1",3,"click"],[1,"me-1",3,"icon"],["tooltipPlacement","auto",3,"permissions"],["l10nTranslate",""]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"button",3),b(2,"translate"),_("click",function(){return h(p),C(r.loadSpaces())}),f(3,"fa-icon",4),l(),g(4,I3,3,5,"button",5),a(5,"button",6),b(6,"translate"),_("click",function(){return h(p),C(r.openSpaceDialog())}),f(7,"fa-icon",7),l(),a(8,"button",6),b(9,"translate"),_("click",function(){return h(p),C(r.openChildShareDialog())}),f(10,"fa-icon",7),l(),a(11,"button",6),b(12,"translate"),_("click",function(){return h(p),C(r.openSpaceRootsDialog())}),f(13,"fa-icon",7),l(),a(14,"div",8)(15,"div",9),f(16,"app-input-filter",10),l(),a(17,"app-navigation-view",11),_("sortBy",function(v){return h(p),C(r.sortBy(v))})("switchView",function(v){return h(p),C(r.galleryMode=v)}),l()()(),g(18,B3,6,8,"div",12)(19,n6,12,8),a(20,"div",13)(21,"span",14),d(22),b(23,"translate"),l()(),a(24,"context-menu",null,0),g(26,a6,2,1),L(27,s6,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.loadSpaces())}),l(),a(28,"context-menu",null,1),g(30,d6,2,1),g(31,u6,1,0,null,16),g(32,_6,1,1,null,17),L(33,h6,3,1,"ng-template",15),_("execute",function(){return h(p),C(r.layout.showRSideBarTab(r.TAB_MENU.SELECTION))}),l()}o&2&&(s(),m("tooltip",E(2,22,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faArrowRotateRight)("animation",r.loading?"spin":null),s(),x(r.canCreateSpace?4:-1),s(),m("disabled",!r.canEditSpace)("tooltip",E(6,25,"Edit space",r.locale.language)),s(2),m("icon",r.icons.faPen),s(),m("disabled",!r.canEditSpace||!(r.selected!=null&&r.selected.counts.shares))("tooltip",E(9,28,"Edit children shares",r.locale.language)),s(2),m("icon",r.icons.SHARED),s(),m("disabled",!r.canManageRoots)("tooltip",E(12,31,"Manage my anchored files",r.locale.language)),s(2),m("icon",r.icons.faAnchor),s(4),m("sortParams",r.sortTable.sortParam)("sortFields",r.btnSortFields),s(),x(r.galleryMode!=null&&r.galleryMode.enabled?18:19),s(4),Ie("",r.spaces.length," ",E(23,34,"spaces",r.locale.language)),s(4),x(r.canCreateSpace?26:-1),s(4),x(r.canEditSpace?30:-1),s(),x(r.canManageRoots?31:-1),s(),x(r.canEditSpace||r.canManageRoots?32:-1))},dependencies:[P,F,Ze,Xe,Ke,ke,zt,Vt,Rt,lt,Ve,vt,nt,Ae,ai,Z,Ct],encapsulation:2});let i=n;return i})();var la=class{constructor(n){this.newly=0,this.isPersonal=!1,Object.assign(this,n),this.isPersonal=this.alias===ht.PERSONAL,this.hTimeAgo=ri(this.mtime).fromNow(!0),this.newly=Mn(this.mtime)}};var C6=["MainContextMenu"],g6=["TargetContextMenu"],op=(i,n)=>n.id,rp=(i,n)=>n.key;function x6(i,n){if(i&1&&(a(0,"span",25),d(1),l()),i&2){let e=c().$implicit,t=c(2);O("font-size",t.galleryMode.textSize,"px"),s(),w(e.hTimeAgo)}}function S6(i,n){if(i&1&&(d(0),b(1,"translate")),i&2){let e=c().$implicit,t=c(2);A(" ",E(1,1,e.name,t.locale.language)," ")}}function v6(i,n){if(i&1&&d(0),i&2){let e=c().$implicit;A(" ",e.name," ")}}function y6(i,n){if(i&1){let e=y();a(0,"div",16),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),a(1,"div",17),f(2,"fa-icon",18),a(3,"span",19),g(4,x6,2,3,"span",20),l(),a(5,"span",21)(6,"span",22),d(7),l()()(),a(8,"div",23)(9,"span",24),g(10,S6,2,4)(11,v6,1,1),l()()()}if(i&2){let e=n.$implicit,t=n.$index,o=c(2);O("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),z("selected",e.id===(o.selected==null?null:o.selected.id)),s(),Jt("rowIndex",t),s(),O("min-width",o.galleryMode.image,"px")("min-height",o.galleryMode.image,"px")("font-size",o.galleryMode.faSize,"px"),m("icon",e.isPersonal?o.icons.PERSONAL:o.icons.SPACES),s(2),x(e.newly?4:-1),s(2),O("font-size",o.galleryMode.textSize,"px"),s(),w(e.nb),s(2),O("font-size",o.galleryMode.textSize,"px"),s(),x(e.isPersonal?10:11)}}function b6(i,n){if(i&1){let e=y();a(0,"div",9)(1,"app-virtual-scroll",13),b(2,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(3,"div",14),k(4,y6,12,21,"div",15,op),l()()()}if(i&2){let e=c();s(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",E(2,5,e.trashBins,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),s(3),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function w6(i,n){if(i&1&&f(0,"fa-icon",32),i&2){let e=c(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function T6(i,n){if(i&1){let e=y();a(0,"th",31),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.sortBy(o.key))}),d(1),g(2,w6,1,2,"fa-icon",32),l()}if(i&2){let e=c().$implicit,t=c(2);V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function E6(i,n){if(i&1&&g(0,T6,3,10,"th",30),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function M6(i,n){if(i&1&&(d(0),b(1,"translate")),i&2){let e=c(4).$implicit,t=c(2);A(" ",E(1,1,e.name,t.locale.language)," ")}}function A6(i,n){if(i&1&&d(0),i&2){let e=c(4).$implicit;A(" ",e.name," ")}}function k6(i,n){if(i&1&&(a(0,"div",35),f(1,"fa-icon",18),a(2,"span",24),g(3,M6,2,4)(4,A6,1,1),l()()),i&2){let e=c(3).$implicit,t=c(2);s(),m("icon",e.isPersonal?t.icons.PERSONAL:t.icons.SPACES),s(2),x(e.isPersonal?3:4)}}function D6(i,n){if(i&1&&(a(0,"span",22),d(1),l()),i&2){let e=c(3).$implicit;s(),w(e.nb)}}function F6(i,n){if(i&1&&d(0),i&2){let e=c(3).$implicit;A(" ",e.hTimeAgo," ")}}function L6(i,n){if(i&1&&(a(0,"td"),g(1,k6,5,2,"div",35)(2,D6,2,1,"span",22)(3,F6,1,1),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="nb"?2:e==="modified"?3:-1)}}function P6(i,n){if(i&1&&g(0,L6,4,9,"td",34),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function N6(i,n){if(i&1){let e=y();a(0,"tr",33),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c(2);return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c(2);return C(r.browse(o))}),k(1,P6,1,1,null,null,rp),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c(2);z("selected",e.id===(t.selected==null?null:t.selected.id)),s(),D(E(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function I6(i,n){if(i&1){let e=y();a(0,"table",26)(1,"thead")(2,"tr"),k(3,E6,1,1,null,null,rp),b(5,"keyvalue"),l()()(),a(6,"app-virtual-scroll",27),b(7,"searchFilter"),_("contextmenu",function(o){h(e);let r=c();return C(r.onContextMenu(o))}),a(8,"table",26)(9,"tbody",28),k(10,N6,4,5,"tr",29,op),l()()()}if(i&2){let e=c();s(3),D(E(5,2,e.tableHeaders,e.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",E(7,5,e.trashBins,e.inputFilter.search())),s(4),D(e.scrollView==null?null:e.scrollView.viewPortItems)}}function R6(i,n){if(i&1&&(a(0,"span",36),f(1,"fa-icon",37),d(2,"Refresh"),l()),i&2){let e=c();s(),m("icon",e.icons.faArrowRotateRight)}}function V6(i,n){if(i&1&&(a(0,"span",36),f(1,"fa-icon",37),d(2,"Info"),l()),i&2){let e=c();s(),m("icon",e.icons.faCircleInfo)}}var ap=(()=>{let n=class n{constructor(){this.locale=S(H),this.layout=S(N),this.originalOrderKeyValue=Fe,this.icons={SPACES:ie.SPACES,PERSONAL:ie.PERSONAL,faArrowDown:ft,faArrowUp:dt,faArrowRotateRight:ut,faCircleInfo:It},this.TAB_MENU=_e,this.loading=!1,this.selected=null,this.trashBins=[],this.tableHeaders={name:{label:"Space",width:50,textCenter:!1,class:"",show:!0,sortable:!0},nb:{label:"Elements",width:10,textCenter:!0,class:"",show:!0,sortable:!0},modified:{label:"Modified",width:10,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.btnSortFields={name:"Name",nb:"Elements",mtime:"Modified"},this.router=S(ge),this.store=S(te),this.spacesService=S(ot),this.sortSettings={default:[{prop:"isPersonal",type:"number"},{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],nb:[{prop:"nb",type:"number"}],modified:[{prop:"mtime",type:"date"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.loadTrashBins(),this.layout.setBreadcrumbIcon(ie.TRASH),this.layout.setBreadcrumbNav({url:`/${$.TRASH}/${Ot.TRASH}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadTrashBins(){this.loading=!0,this.onSelect(),this.spacesService.listTrashBins().subscribe({next:t=>{this.sortBy(this.sortTable.sortParam.column,!1,t.map(o=>new la(o))),this.loading=!1}})}onSelect(t=null){this.selected=t,this.store.trashSelection.set(this.selected)}sortBy(t,o=!0,r){this.trashBins=this.sortTable.sortBy(t,o,r||this.trashBins)}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}browse(t){this.router.navigate([$.SPACES_TRASH,t.alias]).catch(console.error)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-spaces-trash"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(lt,7),Y(C6,7),Y(g6,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.btnNavigationView=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.targetContextMenu=p.first)}},decls:20,vars:14,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],[1,"ms-auto"],[1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block"],[3,"sortBy","switchView","sortParams","sortFields"],[1,"app-thumbs"],["contextMenuItem","",3,"execute"],[1,"app-foot-menu"],[1,"mx-auto"],[3,"contextmenu","childHeight","childWidth","items","galleryMode","resizeOffset"],["tabindex","-1",1,"row","g-0"],[1,"card",3,"selected","height","width"],[1,"card",3,"click","contextmenu","appTap"],[1,"card-body"],[1,"circle-primary-icon",3,"icon"],[1,"label-top-right"],[1,"badge","rounded-pill","bg-warning",3,"font-size"],[1,"label-bottom-right"],[1,"badge","rounded-pill","bg-danger"],[1,"card-footer","text-center","text-truncate","p-1"],["draggable","false",1,"no-pointer-events"],[1,"badge","rounded-pill","bg-warning"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],["l10nTranslate",""],[3,"icon"]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"button",3),b(2,"translate"),_("click",function(){return h(p),C(r.loadTrashBins())}),f(3,"fa-icon",4),l(),a(4,"div",5)(5,"div",6),f(6,"app-input-filter",7),l(),a(7,"app-navigation-view",8),_("sortBy",function(v){return h(p),C(r.sortBy(v))})("switchView",function(v){return h(p),C(r.galleryMode=v)}),l()()(),g(8,b6,6,8,"div",9)(9,I6,12,8),a(10,"context-menu",null,0),L(12,R6,3,1,"ng-template",10),_("execute",function(){return h(p),C(r.loadTrashBins())}),l(),a(13,"context-menu",null,1),L(15,V6,3,1,"ng-template",10),_("execute",function(){return h(p),C(r.layout.showRSideBarTab(r.TAB_MENU.SELECTION))}),l(),a(16,"div",11)(17,"span",12),d(18),b(19,"translate"),l()()}o&2&&(s(),m("tooltip",E(2,8,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faArrowRotateRight)("animation",r.loading?"spin":null),s(4),m("sortParams",r.sortTable.sortParam)("sortFields",r.btnSortFields),s(),x(r.galleryMode!=null&&r.galleryMode.enabled?8:9),s(10),Ie("",r.trashBins.length," ",E(19,11,"trash bins",r.locale.language)))},dependencies:[F,lt,Ve,Ke,ke,Xe,P,zt,Vt,Rt,nt,Z,Ae,Ct],encapsulation:2});let i=n;return i})();var Bi=i=>(S(te).repository.set(i.data.repository),i.url);var sp=[{path:"",component:X1,children:[{path:$.SPACES,pathMatch:"full",component:np,resolve:{routes:Bi},data:{repository:$.SPACES}},{path:$.TRASH,pathMatch:"full",component:ap,resolve:{routes:Bi},data:{repository:$.TRASHES}},{path:$.SHARED,pathMatch:"full",component:P1,resolve:{routes:Bi},data:{repository:$.SHARED}},{path:$.LINKS,pathMatch:"full",component:h1,resolve:{routes:Bi},data:{repository:$.LINKS}},{path:$.SPACES_FILES,children:[{path:"**",component:aa,resolve:{routes:Bi},data:{repository:$.FILES}}]},{path:$.SPACES_SHARES,children:[{path:"**",component:aa,resolve:{routes:Bi},data:{repository:$.SHARES}}]},{path:$.SPACES_TRASH,children:[{path:"**",component:aa,resolve:{routes:Bi},data:{repository:$.TRASH}}]}]}];var lp=()=>S(oe).userHavePermission(_t.DESKTOP_APP),cp=()=>{let i=S(oe);return i.userHavePermission(_t.DESKTOP_APP_SYNC)&&!!i.user.clientId},pp=()=>{let i=S(co),n=!!(i.wizard.localPath&&i.wizard.remotePath);return n||S(ge).navigate([we.BASE,we.WIZARD,i.wizard.localPath?we.WIZARD_SERVER:we.WIZARD_CLIENT]).catch(console.error),n},dp=()=>{let n=!!S(co).wizard.localPath;return n||S(ge).navigate([we.BASE,we.WIZARD,we.WIZARD_CLIENT]).catch(console.error),n};var mp=()=>S(co).refreshPaths();var up=[{path:we.BASE,pathMatch:"prefix",canActivate:[cp],resolve:[mp],children:[{path:"",pathMatch:"full",redirectTo:we.PATHS},{path:we.PATHS,pathMatch:"full",loadComponent:()=>import("./chunk-T74SMT7I.js").then(i=>i.SyncPathsComponent)},{path:we.TRANSFERS,pathMatch:"full",loadComponent:()=>import("./chunk-KHRF67SG.js").then(i=>i.SyncTransfersComponent)},{path:we.WIZARD,pathMatch:"full",redirectTo:`${we.WIZARD}/${we.WIZARD_CLIENT}`},{path:`${we.WIZARD}/${we.WIZARD_CLIENT}`,pathMatch:"full",loadComponent:()=>import("./chunk-XOTKK2NJ.js").then(i=>i.SyncWizardClientComponent)},{path:`${we.WIZARD}/${we.WIZARD_SERVER}`,canActivate:[dp],pathMatch:"full",loadComponent:()=>import("./chunk-3IISSX63.js").then(i=>i.SyncWizardServerComponent)},{path:`${we.WIZARD}/${we.WIZARD_SETTINGS}`,canActivate:[pp],pathMatch:"full",loadComponent:()=>import("./chunk-2FOWUJQF.js").then(i=>i.SyncWizardSettingsComponent)}]}];var Ui="webdav",mi={SERVER:ic,WEBDAV:Ui,PERSONAL:ht.PERSONAL,SPACES:ht.SPACES,SHARES:ht.SHARES,TRASH:ht.TRASH},vD={[mi.SERVER]:{route:"/",spaceRepository:null},[mi.WEBDAV]:{route:`/${Ui}`,spaceRepository:null},[mi.PERSONAL]:{route:`/${Ui}/${mi.PERSONAL}`,spaceRepository:[oo.FILES,ht.PERSONAL]},[mi.SPACES]:{route:`/${Ui}/${mi.SPACES}`,spaceRepository:[oo.FILES]},[mi.SHARES]:{route:`/${Ui}/${mi.SHARES}`,spaceRepository:[oo.SHARES]},[mi.TRASH]:{route:`/${Ui}/${mi.TRASH}`,spaceRepository:[oo.TRASH]}};function z6(i,n){if(i&1&&(a(0,"li",8),d(1),l()),i&2){let e=n.$implicit;s(),w(e)}}function O6(i,n){if(i&1){let e=y();a(0,"p",5),d(1," Keep these codes in a safe place. They will allow you to access your account if you lose access to your two-factor authentication. "),l(),a(2,"p",6),d(3," These recovery codes are for one-time use only and will only be displayed here once. "),l(),a(4,"ul",7),k(5,z6,2,1,"li",8,qe),l(),a(7,"div",9)(8,"button",10),_("click",function(){h(e);let o=c();return C(o.downloadRecoveryCodes())}),d(9,"Download"),l(),a(10,"button",11),_("click",function(){h(e);let o=c();return C(o.clipBoardRecoveryCodes())}),d(11,"Copy"),l(),a(12,"button",12),_("click",function(){h(e);let o=c();return C(o.onClose(!0))}),d(13,"Close"),l()()}if(i&2){let e=c();s(5),D(e.recoveryCodes)}}function B6(i,n){if(i&1&&(a(0,"div",14),d(1),l()),i&2){let e=c(2);s(),w(e.hasError)}}function U6(i,n){i&1&&(a(0,"span",3),d(1,"Scan this QR code using your authenticator app."),l(),a(2,"small",28),d(3,"\xA0"),a(4,"i",3),d(5,"(Such as FreeOTP, Proton Authenticator etc.)"),l()())}function H6(i,n){if(i&1){let e=y();a(0,"div",13),g(1,B6,2,1,"div",14)(2,U6,6,0),l(),a(3,"div",15),f(4,"img",16),l(),a(5,"div",17)(6,"div",18),d(7,"Or enter this secret manually"),l(),a(8,"div"),f(9,"fa-icon",19),a(10,"strong",20),_("click",function(){h(e);let o=c();return C(o.clipBoardSecret())}),d(11),l()()(),f(12,"hr",21),a(13,"form",22),_("ngSubmit",function(){h(e);let o=c();return C(o.onSubmit())}),a(14,"div",23),d(15,"Enter your password"),l(),a(16,"div",24)(17,"app-input-password",25),_("passwordChange",function(o){h(e);let r=c();return C(r.twoFaForm.controls.password.setValue(o))}),l()(),a(18,"div",23),d(19,"Valid with your TOTP code"),l(),a(20,"div",24),f(21,"input",26),l(),a(22,"div",9)(23,"button",27),d(24,"Confirm"),l(),a(25,"button",12),_("click",function(){h(e);let o=c();return C(o.onClose())}),d(26,"Cancel"),l()()()}if(i&2){let e=c();s(),x(e.hasError?1:2),s(3),m("src",e.qrDataUrl,ee),s(5),m("icon",e.icons.faCopy),s(2),w(e.secret),s(2),m("formGroup",e.twoFaForm),s(4),m("password",e.twoFaForm.value.password)("focus",!0)("centered",!0),s(4),m("maxlength",e.twoFaCodelength),s(2),m("disabled",e.twoFaForm.invalid||e.submitted)}}var fp=(()=>{let n=class n{constructor(){this.isValid=new ae,this.wasEnabled=!1,this.submitted=!1,this.hasError=null,this.icons={faKey:Pt,faLock:ni,faCopy:bn},this.twoFaCodelength=un,this.locale=S(H),this.layout=S(N),this.userService=S(oe),this.clipBoardService=S(Ln),this.fb=S(gn),this.twoFaForm=this.fb.group({totpCode:this.fb.control("",[Et.required,Et.pattern(new RegExp(`^\\d{${un}}$`))]),password:this.fb.control("")})}onClose(t=!1){this.layout.closeDialog(),this.isValid.emit(t)}onSubmit(){this.submitted=!0,this.userService.enable2Fa({code:this.twoFaForm.value.totpCode,password:this.twoFaForm.value.password}).subscribe({next:t=>{t.success?(this.wasEnabled=!0,this.recoveryCodes=t.recoveryCodes,this.isValid.emit(!0)):this.hasError="Invalid code",setTimeout(()=>this.submitted=!1,1e3)},error:t=>{this.hasError=t.error?t.error.message:t,setTimeout(()=>this.submitted=!1,1e3)}})}clipBoardSecret(){this.clipBoardService.copyFromContent(this.secret),this.layout.sendNotification("info","Two-factor Authentication","Secret copied")}clipBoardRecoveryCodes(){this.clipBoardService.copyFromContent(this.recoveryCodes.join(`
|
|
10
|
+
`)),this.layout.sendNotification("info","Two-factor Authentication","Recovery codes copied")}downloadRecoveryCodes(){let t=this.recoveryCodes.join(`
|
|
11
|
+
`),o=new Blob([t],{type:"text/plain;charset=utf-8"}),r=URL.createObjectURL(o);mr(r,"sync-in.recovery-codes.txt"),URL.revokeObjectURL(r)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-auth-2fa-enable-dialog"]],inputs:{qrDataUrl:"qrDataUrl",secret:"secret"},outputs:{isValid:"isValid"},decls:8,vars:2,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"],["l10nTranslate","",1,"text-align-center"],["l10nTranslate","",1,"text-align-center","font-italic","text-warning"],[1,"list-group","text-align-center","my-3"],[1,"list-group-item","font-monospace"],[1,"d-grid","gap-2"],["type","button","l10nTranslate","",1,"btn","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],[1,"d-flex","flex-column","text-align-center","justify-content-center","align-items-center","fs-xs","mt-2","mb-4",2,"height","45px"],["l10nTranslate","",1,"text-danger"],[1,"text-center","my-3"],["alt","QR Code",1,"img-fluid","border","p-2","rounded",2,"max-width","150px",3,"src"],[1,"text-muted","small","text-center","mb-3"],["l10nTranslate","",1,"mb-2"],[3,"icon"],["role","button",1,"ms-1","font-monospace","link-primary",3,"click"],[2,"border-width","2px"],[3,"ngSubmit","formGroup"],["l10nTranslate","",1,"text-align-center","mb-3"],[1,"mb-3"],["id","password","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022",3,"passwordChange","password","focus","centered"],["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,"maxlength"],["type","submit","l10nTranslate","",1,"btn","btn-primary",3,"disabled"],[1,"text-muted"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Two-Factor Authentication"),l()()(),a(5,"div",4),g(6,O6,14,0)(7,H6,27,10),l()),o&2&&(s(2),m("icon",r.icons.faLock),s(4),x(r.wasEnabled?6:7))},dependencies:[F,P,Ei,_n,je,xe,fn,Vo,hn,Cn,_r],encapsulation:2});let i=n;return i})();var ca=(function(i){return i.WEBDAV="webdav",i})(ca||{});var $6=i=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:i,showWeekNumbers:!1}),G6=(i,n)=>n.name;function W6(i,n){if(i&1&&(a(0,"option",19),d(1),l()),i&2){let e=n.$implicit;m("value",e),s(),w(e)}}function q6(i,n){if(i&1&&(a(0,"div",22),d(1),l()),i&2){let e=c(3);s(),A(" ",e.hasError," ")}}function j6(i,n){i&1&&(a(0,"div",23),d(1," This password will only be shown once after it is generated "),l())}function K6(i,n){i&1&&f(0,"hr",24)}function Q6(i,n){if(i&1&&(g(0,q6,2,1,"div",22)(1,j6,2,0,"div",23),g(2,K6,1,0,"hr",24)),i&2){let e=c(2);x(e.hasError?0:1),s(2),x(e.appPasswords.length?2:-1)}}function Y6(i,n){if(i&1){let e=y();a(0,"div",11)(1,"div",12),d(2,"Generate a new app password"),l(),a(3,"div",13)(4,"form",14),_("ngSubmit",function(){h(e);let o=c();return C(o.genAppPassword())}),a(5,"div",15),f(6,"input",16),b(7,"translate"),a(8,"div",17),d(9,"Application"),l(),a(10,"select",18),k(11,W6,2,2,"option",19,qe),l(),f(13,"input",20),b(14,"translate"),a(15,"button",21),d(16," Generate "),l()()()()(),g(17,Q6,3,2)}if(i&2){let e=c();s(4),m("formGroup",e.appPasswordForm),s(2),z("is-invalid",e.appPasswordForm.controls.name.invalid),m("placeholder",E(7,8,"Password name",e.locale.language)),s(5),D(e.availableApps),s(2),m("placeholder",E(14,11,"Never expires",e.locale.language))("bsConfig",Re(14,$6,e.minDate)),s(2),m("disabled",e.appPasswordForm.invalid||e.submitted),s(2),x(e.generatedPassword?-1:17)}}function X6(i,n){if(i&1&&(a(0,"div",26)(1,"strong",3),d(2,"Expiration"),l(),d(3),l()),i&2){let e=c(2);s(3),A(":\xA0",e.generatedPassword.expiration," ")}}function Z6(i,n){i&1&&f(0,"hr",24)}function J6(i,n){if(i&1){let e=y();a(0,"div",25)(1,"div",26)(2,"strong",3),d(3,"Password name"),l(),d(4),l(),a(5,"div",26)(6,"strong",3),d(7,"Application"),l(),d(8),b(9,"translate"),l(),g(10,X6,4,1,"div",26),a(11,"div",26)(12,"strong",3),d(13,"Generated password"),l(),d(14,":\xA0 "),a(15,"span",27),_("click",function(){h(e);let o=c();return C(o.clipBoardPassword())}),f(16,"fa-icon",9),a(17,"span"),d(18),l()()()(),g(19,Z6,1,0,"hr",24)}if(i&2){let e=c();s(4),A(":\xA0",e.generatedPassword.name," "),s(4),A(":\xA0",E(9,6,e.generatedPassword.app,e.locale.language)," "),s(2),x(e.generatedPassword.expiration?10:-1),s(6),m("icon",e.icons.faCopy),s(2),w(e.generatedPassword.password),s(),x(e.appPasswords.length?19:-1)}}function eC(i,n){if(i&1&&(a(0,"div"),d(1),b(2,"amDateFormat"),l()),i&2){let e=c().$implicit;s(),w(q(2,1,e.lastAccess))}}function tC(i,n){if(i&1&&(a(0,"div"),d(1),l()),i&2){let e=c().$implicit;s(),w(e.lastIp)}}function iC(i,n){if(i&1){let e=y();a(0,"tr")(1,"td"),d(2),l(),a(3,"td"),d(4),b(5,"translate"),l(),a(6,"td",30)(7,"div",31)(8,"div"),d(9),b(10,"amDateFormat"),l(),g(11,eC,3,3,"div"),l()(),a(12,"td",30)(13,"div",31)(14,"div"),d(15),l(),g(16,tC,2,1,"div"),l()(),a(17,"td",30),d(18),b(19,"amDateFormat"),b(20,"translate"),l(),a(21,"td",30),d(22),b(23,"amDateFormat"),l(),a(24,"td")(25,"button",32),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.deleteAppPassword(o.name))}),d(26,"Delete"),l()()()}if(i&2){let e=n.$implicit,t=c(2);s(2),w(e.name),s(2),w(E(5,8,e.app,t.locale.language)),s(5),w(e.currentAccess?q(10,11,e.currentAccess):"-"),s(2),x(e.lastAccess?11:-1),s(4),w(e.currentIp||"-"),s(),x(e.lastIp?16:-1),s(2),w(e.expiration?E(19,13,e.expiration,"L"):E(20,16,"never",t.locale.language)),s(4),w(q(23,19,e.createdAt))}}function nC(i,n){if(i&1&&(a(0,"table",6)(1,"thead")(2,"tr")(3,"th",28),d(4,"Name"),l(),a(5,"th",28),d(6,"Application"),l(),a(7,"th",28),d(8,"Access"),l(),a(9,"th",28),d(10,"IP"),l(),a(11,"th",28),d(12,"Expiration"),l(),a(13,"th",28),d(14,"Created"),l(),a(15,"th",28),d(16,"Action"),l()()(),a(17,"tbody",29),k(18,iC,27,21,"tr",null,G6),l()()),i&2){let e=c();s(18),D(e.appPasswords)}}var _p=(()=>{let n=class n{constructor(){this.appPasswords=[],this.nbAppPasswords=new ae,this.locale=S(H),this.availableApps=Object.values(ca),this.allowGeneration=!1,this.minDate=oc(),this.submitted=!1,this.icons={faKey:Pt,faCopy:bn,faPlus:Qe},this.fb=S(gn),this.appPasswordForm=this.fb.group({name:this.fb.control("",[Et.required]),app:this.fb.control(ca.WEBDAV,[Et.required]),expiration:this.fb.control(null)}),this.layout=S(N),this.userService=S(oe),this.clipBoardService=S(Ln),this.minDate.setDate(this.minDate.getDate()+1),this.appPasswordForm.controls.name.valueChanges.pipe(At(Boolean)).subscribe(t=>{this.hasError=void 0,this.appPasswordForm.controls.name.setValue(ac(t),{emitEvent:!1})})}ngOnInit(){this.appPasswords.length===0&&(this.allowGeneration=!0)}onClose(){this.layout.closeDialog()}deleteAppPassword(t){this.userService.deleteAppPassword(t).subscribe({next:()=>{this.appPasswords=this.appPasswords.filter(o=>o.name!==t),this.nbAppPasswords.emit(this.appPasswords.length)},error:o=>this.layout.sendNotification("error","Application Passwords","Unable to revoke",o)})}genAppPassword(){return $t(this,null,function*(){for(let o of this.appPasswords)if(o.name===this.appPasswordForm.value.name){this.hasError="This name is already used";return}let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.generateAppPassword(this.appPasswordForm.value,t).subscribe({next:o=>{this.appPasswordForm.patchValue({name:"",expiration:null}),this.appPasswords.unshift(o),this.generatedPassword=o,this.nbAppPasswords.emit(this.appPasswords.length)},error:o=>this.layout.sendNotification("error","Application Passwords","Unable to generate",o)})})}clipBoardPassword(){this.clipBoardService.copyFromContent(this.generatedPassword.password),this.layout.sendNotification("info","Generated password","Copied")}onAllowGenerationChange(){this.generatedPassword?(this.generatedPassword=null,this.allowGeneration=!0):this.allowGeneration=!this.allowGeneration}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-auth-manage-app-passwords"]],inputs:{appPasswords:"appPasswords"},outputs:{nbAppPasswords:"nbAppPasswords"},decls:17,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"table","table-striped","table-hover","align-middle","text-center","no-select"],[1,"modal-footer"],["role","button","type","button","btnCheckbox","","l10nTranslate","",1,"btn","btn-sm","btn-outline-success","me-auto",3,"ngModelChange","ngModel"],[3,"icon"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"d-flex","flex-fill","flex-column"],["l10nTranslate","",1,"fw-500","mb-3"],[1,"d-flex","flex-column","align-items-start"],[1,"w-100",3,"ngSubmit","formGroup"],[1,"input-group","input-group-sm","flex-nowrap"],["appAutofocus","","name","name","formControlName","name","type","text","required","",1,"flex-grow-1","form-control","form-control-sm","pe-0",3,"placeholder"],["l10nTranslate","",1,"input-group-text"],["formControlName","app",1,"form-select","form-select-sm",2,"max-width","150px"],["l10nTranslate","",3,"value"],["bsDatepicker","","id","expiration","formControlName","expiration","placement","bottom","type","text",1,"form-control","form-control-sm",2,"max-width","120px",3,"placeholder","bsConfig"],["type","submit","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"disabled"],["l10nTranslate","",1,"alert","alert-danger","text-center","my-3"],["l10nTranslate","",1,"alert","alert-secondary","text-center","my-3"],[1,"mb-1","mt-4"],[1,"d-flex","flex-column","alert","alert-success","text-center","my-3"],[1,"d-flex"],["role","button",1,"font-monospace","fw-bold","link-body-emphasis",3,"click"],["scope","col","l10nTranslate",""],[1,"table-group-divider"],[1,"fs-xxxs"],[1,"d-flex","flex-column","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-outline-danger",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Manage app passwords"),l()(),a(5,"button",4),_("click",function(){return r.onClose()}),l()(),a(6,"div",5),g(7,Y6,18,16),g(8,J6,20,9),g(9,nC,20,0,"table",6),l(),a(10,"div",7)(11,"button",8),_("ngModelChange",function(){return r.onAllowGenerationChange()}),f(12,"fa-icon",9)(13,"fa-icon",9),d(14," Password "),l(),a(15,"button",10),_("click",function(){return r.onClose()}),d(16,"Close"),l()()),o&2&&(s(2),m("icon",r.icons.faKey),s(5),x(r.allowGeneration&&!r.generatedPassword?7:-1),s(),x(r.generatedPassword?8:-1),s(),x(r.appPasswords.length?9:-1),s(2),m("ngModel",r.allowGeneration),s(),m("icon",r.icons.faPlus),s(),m("icon",r.icons.faKey))},dependencies:[F,P,be,_n,wi,Ti,je,bi,xe,fn,ti,ye,Ye,pl,dl,Ei,hn,Cn,An,Le,Z],encapsulation:2});let i=n;return i})();function oC(i,n){if(i&1&&(a(0,"option",14),d(1),b(2,"translate"),b(3,"capitalize"),l()),i&2){let e=n.$implicit,t=c(2);m("ngValue",t.allOnlineStatus.indexOf(e)),s(),w(q(3,5,E(2,2,e,t.locale.language)))}}function rC(i,n){if(i&1&&(a(0,"span",35),f(1,"fa-icon",39),a(2,"span",40),d(3,"Administrator"),l()()),i&2){let e=c(3);s(),m("icon",e.icons.faKey)}}function aC(i,n){if(i&1&&(a(0,"span",41),d(1),l()),i&2){let e=n.$implicit;s(),w(e)}}function sC(i,n){if(i&1&&k(0,aC,2,1,"span",41,qe),i&2){let e=c(3);D(e.user.applications)}}function lC(i,n){if(i&1&&(a(0,"li",29)(1,"span",28),d(2,"Permissions"),l(),g(3,rC,4,1,"span",35)(4,sC,2,0),l(),a(5,"li",36)(6,"span",28),d(7,"Storage Space"),l(),a(8,"span",37),f(9,"app-storage-usage",38),l()()),i&2){let e=c(2);s(3),x(e.user.isAdmin?3:4),s(6),m("item",e.user)}}function cC(i,n){if(i&1){let e=y();a(0,"div",3)(1,"div",16)(2,"div",9)(3,"div",17)(4,"div",18)(5,"div",19),f(6,"img",20)(7,"span"),l()(),a(8,"div",21)(9,"div",22),d(10),l(),a(11,"div",23),d(12),l(),a(13,"div",24),d(14),b(15,"translate"),b(16,"amTimeAgo"),l(),a(17,"select",25),me("ngModelChange",function(o){h(e);let r=c();return de(r.user.onlineStatus,o)||(r.user.onlineStatus=o),C(o)}),_("ngModelChange",function(o){h(e);let r=c();return C(r.setOnlineStatus(o))}),k(18,oC,4,7,"option",14,qe),l()()(),a(20,"ul",26)(21,"li",27)(22,"span",28),d(23,"Login"),l(),a(24,"span"),d(25),l()(),a(26,"li",29)(27,"span",28),d(28,"IP Addresses"),l(),a(29,"span",30),d(30),l(),a(31,"span",31),d(32),l()(),a(33,"li",29)(34,"span",28),d(35,"Connections"),l(),a(36,"span",30),d(37),b(38,"amDateFormat"),l(),a(39,"span",31),d(40),b(41,"amDateFormat"),l()(),g(42,lC,10,2),a(43,"li",27)(44,"span",32),d(45,"WebDAV"),l(),a(46,"span",33),_("click",function(){h(e);let o=c();return C(o.clipBoardLink())}),f(47,"fa-icon",34),d(48),l()()()()()()}if(i&2){let e=c();s(6),m("src",e.userAvatar,ee),s(),V(X("avatar-",e.allOnlineStatus[e.user.onlineStatus])),s(3),w(e.user.fullName),s(2),w(e.user.email),s(2),Ie("",E(15,17,"Member since",e.locale.language)," ",E(16,20,e.user.createdAt,!0)),s(3),pe("ngModel",e.user.onlineStatus),s(),D(e.allOnlineStatus),s(7),w(e.user.login),s(5),w(e.user.currentIp),s(2),w(e.user.lastIp),s(5),w(q(38,23,e.user.currentAccess)),s(3),w(q(41,25,e.user.lastAccess)),s(2),x(e.user.isUser?42:-1),s(5),m("icon",e.icons.faCopy),s(),A(" ",e.webdavUrl," ")}}function pC(i,n){if(i&1&&f(0,"app-password-strength-bar",8),i&2){let e=c();m("passwordToCheck",e.newPassword)}}function dC(i,n){if(i&1){let e=y();a(0,"div",10)(1,"span",11),d(2,"Avatar"),l(),a(3,"div",12)(4,"button",42),_("click",function(){h(e);let o=c();return C(o.genAvatar())}),d(5,"Generate"),l(),a(6,"button",43)(7,"span",40),d(8,"Import"),l(),a(9,"input",44),_("change",function(o){h(e);let r=c();return C(r.uploadAvatar(o))}),l()()()()}}function mC(i,n){if(i&1&&(a(0,"option",14),d(1),l()),i&2){let e=n.$implicit,t=c();m("ngValue",e),s(),w(t.i18nLanguageText[e])}}function uC(i,n){if(i&1&&(a(0,"option",15),d(1),l()),i&2){let e=n.$implicit,t=c();m("ngValue",t.allNotifications.indexOf(e)),s(),w(e)}}function fC(i,n){if(i&1){let e=y();a(0,"button",58),_("click",function(){h(e);let o=c(2);return C(o.disable2Fa())}),d(1," Disable "),l()}if(i&2){let e=c(2);m("disabled",!e.store.server().twoFaEnabled)}}function _C(i,n){if(i&1&&(a(0,"span",40),d(1,"Manage"),l(),d(2,"\xA0"),a(3,"span"),d(4),l()),i&2){let e=c(2);s(4),A("(",e.user.appPasswords,")")}}function hC(i,n){i&1&&(a(0,"span",40),d(1,"Generate"),l())}function CC(i,n){if(i&1){let e=y();a(0,"div",10)(1,"span",45),d(2,"Full-text search"),l(),a(3,"div",12)(4,"div",46)(5,"input",47),_("ngModelChange",function(o){h(e);let r=c();return C(r.updateStorageIndexing(o))}),l(),a(6,"label",48)(7,"span",40),d(8),a(9,"span",40),d(10,"for personal files"),l()()()()()(),a(11,"div",10)(12,"span",45),d(13,"Password"),l(),a(14,"div",12)(15,"div",22)(16,"app-input-password",49),me("passwordChange",function(o){h(e);let r=c();return de(r.oldPassword,o)||(r.oldPassword=o),C(o)}),l()(),a(17,"div",22)(18,"app-input-password",50),me("passwordChange",function(o){h(e);let r=c();return de(r.newPassword,o)||(r.newPassword=o),C(o)}),l()(),a(19,"button",51),_("click",function(){h(e);let o=c();return C(o.submitPassword())}),d(20," Update "),l()()(),a(21,"div",10)(22,"span",52),d(23,"Security"),l(),a(24,"div",12)(25,"div",53),d(26,"Two-Factor Authentication"),l(),a(27,"button",54),_("click",function(){h(e);let o=c();return C(o.enable2Fa())}),d(28),l(),g(29,fC,2,1,"button",55),a(30,"div",56),d(31,"Application Passwords"),l(),a(32,"button",57),_("click",function(){h(e);let o=c();return C(o.manageAppPasswords())}),g(33,_C,5,1)(34,hC,2,0,"span",40),l()()()}if(i&2){let e=c();s(5),m("ngModel",e.user.storageIndexing),s(3),A("",e.user.storageIndexing?"enabled":"disabled","\xA0"),s(8),pe("password",e.oldPassword),s(2),pe("password",e.newPassword),m("disabled",!(e.oldPassword!=null&&e.oldPassword.length))("isRequired",!!(e.oldPassword!=null&&e.oldPassword.length))("passwordMinLength",e.passwordMinLength)("showGenerator",!0),s(),m("disabled",!e.newPassword||!e.oldPassword||e.newPassword.length<e.passwordMinLength),s(8),m("disabled",!e.store.server().twoFaEnabled),s(),A(" ",e.user.twoFaEnabled?"Reset":"Enable"," "),s(),x(e.user.twoFaEnabled?29:-1),s(4),x(e.user.appPasswords>0?33:34)}}var hp=(()=>{let n=class n{constructor(){this.locale=S(H),this.i18nLanguageText=Wl,this.allNotifications=Object.values($l),this.allOnlineStatus=Fi,this.passwordMinLength=8,this.icons={faCopy:bn,faKey:Pt},this.userAvatar=null,this.webdavUrl=`${window.location.origin}/${Ui}`,this.store=S(te),this.l10nTranslationService=S(ol),this.layout=S(N),this.languages=this.layout.getLanguages(!0),this.userService=S(oe),this.clipBoardService=S(Ln),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t)),this.layout.setBreadcrumbIcon(jt.ACCOUNT),this.layout.setBreadcrumbNav({url:`/${Ee.BASE}/${Ee.ACCOUNT}/${Yi.ACCOUNT}`,splicing:2,translating:!0,sameLink:!0})}get language(){return this.user?.language||ba}set language(t){t===ba&&(t=null),this.userService.changeLanguage({language:t}).subscribe({next:()=>this.updateLanguage(t),error:()=>this.layout.sendNotification("error","Configuration","Unable to update language")})}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}genAvatar(){this.userService.genAvatar()}uploadAvatar(t){this.userService.uploadAvatar(t.target.files[0])}submitPassword(){return $t(this,null,function*(){if(!this.oldPassword){this.layout.sendNotification("error","Configuration","Current password missing !");return}if(!this.newPassword){this.layout.sendNotification("error","Configuration","New password missing !");return}if(this.newPassword.length<8){this.layout.sendNotification("warning","Configuration","New password must have 8 characters minimum");return}let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.changePassword({oldPassword:this.oldPassword,newPassword:this.newPassword},t).subscribe({next:()=>{this.oldPassword="",this.newPassword="",this.layout.sendNotification("info","Configuration","Password has been updated")},error:o=>{this.oldPassword="",o.status===403?this.layout.sendNotification("error","Configuration","Unable to update password",o):this.layout.sendNotification("warning","Configuration","Current password does not match")}})})}updateNotification(t){this.userService.changeNotification({notification:t}).subscribe({next:()=>{this.user.notification=t,this.layout.sendNotification("info","Configuration","Notification preference updated")},error:o=>this.layout.sendNotification("error","Configuration","Unable to update notification preference",o)})}updateStorageIndexing(t){this.userService.changeStorageIndexing({storageIndexing:t}).subscribe({next:()=>{this.user.storageIndexing=t,this.layout.sendNotification("info","Configuration","Full-text search preference updated")},error:o=>this.layout.sendNotification("error","Configuration","Unable to update full-text search preference",o)})}clipBoardLink(){this.clipBoardService.copyFromContent(this.webdavUrl),this.layout.sendNotification("info","Link copied",this.webdavUrl)}enable2Fa(){return $t(this,null,function*(){this.userService.init2Fa().subscribe({next:t=>{this.layout.openDialog(fp,"xs",{initialState:{qrDataUrl:t.qrDataUrl,secret:t.secret}},{keyboard:!1}).content.isValid.pipe(At(r=>r),ce(1)).subscribe(()=>{this.layout.sendNotification("success","Configuration","Two-Factor Authentication is enabled"),this.store.user.next(Se(re({},this.store.user.getValue()),{twoFaEnabled:!0}))})},error:t=>this.layout.sendNotification("error","Configuration","Two-Factor Authentication",t)})})}disable2Fa(){return $t(this,null,function*(){let t=yield this.userService.auth2FaVerifyDialog(!0);t&&this.userService.disable2Fa({code:t.get(il),password:t.get(nl)}).subscribe({next:()=>{this.layout.sendNotification("success","Configuration","Two-Factor Authentication is disabled"),this.store.user.next(Se(re({},this.store.user.getValue()),{twoFaEnabled:!1}))},error:o=>{this.layout.sendNotification("error","Configuration","Two-Factor Authentication",o)}})})}manageAppPasswords(){return $t(this,null,function*(){let t=yield this.userService.auth2FaVerifyDialog();t!==!1&&this.userService.listAppPasswords(t).subscribe({next:o=>{this.layout.openDialog(_p,"md",{initialState:{appPasswords:o}}).content.nbAppPasswords.subscribe(p=>{this.store.user.next(Se(re({},this.store.user.getValue()),{appPasswords:p}))})},error:o=>this.layout.sendNotification("error","Configuration","Unable to get app passwords",o)})})}updateLanguage(t){this.user.language=t,this.layout.setLanguage(t).then(()=>this.layout.sendNotification("info","Configuration","Language updated"))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-account"]],decls:28,vars:7,consts:[["appAutoResize","",1,"profile-page",3,"resizeOffset"],[1,"container-fluid"],[1,"row"],[1,"col-lg-6","col-sm-12","p-2"],[1,"box","box-primary","box-solid","mb-0"],[1,"d-flex","box-header","align-items-center"],["l10nTranslate","",1,"box-title","me-5"],[1,"fs-xxxs"],[3,"passwordToCheck"],[1,"box-body"],[1,"row","mb-3"],["l10nTranslate","",1,"col-4","align-self-start"],[1,"col-auto"],[1,"form-select","form-select-sm",3,"ngModelChange","ngModel"],[3,"ngValue"],["l10nTranslate","",3,"ngValue"],[1,"box","box-primary","mb-0"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-xl"],["alt","",1,"avatar-img","profile-user-img",3,"src"],[1,"user-details"],[1,"mb-1"],[1,"fs-xxs","text-nowrap"],[1,"text-muted","fs-xxs"],[1,"form-select","form-select-sm","my-auto","mt-2",3,"ngModelChange","ngModel"],[1,"list-group","my-2"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],["l10nTranslate","",1,"me-auto","pe-4"],[1,"list-group-item","d-flex","align-items-center","justify-content-end","flex-wrap"],[1,"badge","bg-warning","rounded-pill","my-1"],[1,"badge","bg-secondary-alt","rounded-pill","ms-1","my-1"],[1,"me-auto","pe-4"],[1,"text-primary","text-end","cursor-pointer",3,"click"],[3,"icon"],[1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],[1,"list-group-item","d-flex","align-items-center"],[1,"col-5"],[3,"item"],[1,"me-1",3,"icon"],["l10nTranslate",""],["l10nTranslate","",1,"badge","bg-gray-dark","rounded-pill","ms-1","my-1"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-success","me-1",3,"click"],["type","button",1,"btn-file-upload","btn","btn-xs","btn-secondary"],["accept","image/*","name","file","role","button","type","file",3,"change"],["l10nTranslate","",1,"col-4","text-nowrap","align-self-start"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchFullText","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchFullText",1,"form-check-label","mb-0","ms-2"],["placeholder","current password",3,"passwordChange","password"],["placeholder","new password",3,"passwordChange","password","disabled","isRequired","passwordMinLength","showGenerator"],["type","button","l10nTranslate","",1,"d-flex","btn","btn-xs","btn-primary","text-nowrap",3,"click","disabled"],["l10nTranslate","",1,"col-4","align-self-start","text-nowrap"],["l10nTranslate","",1,"fw-500","mb-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-danger","ms-2",3,"disabled"],["l10nTranslate","",1,"fw-500","mt-3","mb-2"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-primary","me-1",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-xs","btn-danger","ms-2",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),g(3,cC,49,27,"div",3),a(4,"div",3)(5,"div",4)(6,"div",5)(7,"h3",6),d(8,"Configuration"),l(),a(9,"span",7),g(10,pC,1,1,"app-password-strength-bar",8),l()(),a(11,"div",9),g(12,dC,10,0,"div",10),a(13,"div",10)(14,"span",11),d(15,"Language"),l(),a(16,"div",12)(17,"select",13),me("ngModelChange",function(u){return de(r.language,u)||(r.language=u),u}),k(18,mC,2,2,"option",14,qe),l()()(),a(20,"div",10)(21,"span",11),d(22,"Notification"),l(),a(23,"div",12)(24,"select",13),_("ngModelChange",function(u){return r.updateNotification(u)}),k(25,uC,2,2,"option",15,qe),l()()(),g(27,CC,35,13),l()()()()()()),o&2&&(m("resizeOffset",40),s(3),x(r.user?3:-1),s(7),x(r.newPassword?10:-1),s(2),x(r.user.isUser?12:-1),s(5),pe("ngModel",r.language),s(),D(r.languages),s(6),m("ngModel",r.user==null?null:r.user.notification),s(),D(r.allNotifications),s(2),x(r.user.isUser?27:-1))},dependencies:[fe,be,wi,Ti,Lt,bi,xe,ye,Mc,P,F,kn,_r,Fn,Z,Le,Je],encapsulation:2});let i=n;return i})();var yo=(function(i){return i.WIN="win",i.MAC="mac",i.LINUX="linux",i.NODE="node",i})(yo||{});function gC(i,n){if(i&1&&(a(0,"div",1)(1,"span")(2,"span",3),d(3,"Repository"),l(),d(4,":\xA0"),a(5,"span",4),d(6),l()(),a(7,"span",5),d(8,"Version:\xA0"),a(9,"b"),d(10),l()(),a(11,"span"),d(12),b(13,"amDateFormat"),l()()),i&2){let e=c();s(6),w(e.store.appStoreManifest().repository),s(4),w(e.store.appStoreManifest().version),s(2),w(E(13,3,e.store.appStoreManifest().date,"L"))}}function xC(i,n){if(i&1&&(f(0,"fa-icon",15),a(1,"h5",16),d(2,"Windows"),l()),i&2){let e=c(3);m("icon",e.icons.faWindows)}}function SC(i,n){if(i&1&&(f(0,"fa-icon",15),a(1,"h5",16),d(2,"Mac"),l()),i&2){let e=c(3);m("icon",e.icons.faApple)}}function vC(i,n){if(i&1&&(f(0,"fa-icon",15),a(1,"h5",16),d(2,"Linux"),l()),i&2){let e=c(3);m("icon",e.icons.faLinux)}}function yC(i,n){if(i&1&&(f(0,"fa-icon",15),a(1,"h5",16),d(2,"Command Line"),l()),i&2){let e=c(3);m("icon",e.icons.faTerminal)}}function bC(i,n){if(i&1){let e=y();a(0,"div",17)(1,"span",3),d(2,"System requirements"),l(),a(3,"span"),d(4,":\xA0Node.js 22+"),l()(),a(5,"a",18),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.download(o,!0))}),a(6,"span",3),d(7,"Download tar.gz version"),l(),d(8,"\xA0 "),l()}}function wC(i,n){if(i&1){let e=y();a(0,"div",17)(1,"span",3),d(2,"System requirements"),l(),a(3,"span"),d(4),l()(),a(5,"a",18),_("click",function(){h(e);let o=c().$implicit,r=c(2);return C(r.download(o,!0))}),d(6),l()}if(i&2){let e=c().$implicit,t=c(2);s(4),A(":\xA0",e===t.APP_STORE_OS.MAC?"Intel 64bit":"64bit"),s(2),w(e===t.APP_STORE_OS.MAC?"Download Apple Silicon ARM64 version":"Download ARM64 version")}}function TC(i,n){if(i&1){let e=y();a(0,"div",10)(1,"div",11)(2,"div",12),g(3,xC,3,1)(4,SC,3,1)(5,vC,3,1)(6,yC,3,1),a(7,"a",13),_("click",function(){let o=h(e).$implicit,r=c(2);return C(r.download(o))}),f(8,"fa-icon",14),a(9,"span",3),d(10,"Download"),l()(),a(11,"div"),g(12,bC,9,0)(13,wC,7,2),l()()()()}if(i&2){let e,t=n.$implicit,o=c(2);s(3),x((e=t)===o.APP_STORE_OS.WIN?3:e===o.APP_STORE_OS.MAC?4:e===o.APP_STORE_OS.LINUX?5:e===o.APP_STORE_OS.NODE?6:-1),s(5),m("icon",o.icons.faDownload),s(4),x(t===o.APP_STORE_OS.NODE?12:13)}}function EC(i,n){if(i&1&&(a(0,"div",2)(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),k(5,TC,14,3,"div",10,qe),l()()()()()),i&2){let e=c();m("resizeOffset",80),s(5),D(e.APP_STORE_PLATFORM_LIST)}}var Cp=(()=>{let n=class n{constructor(){this.store=S(te),this.icons={faWindows:qc,faApple:jc,faLinux:Kc,faDownload:vn,faTerminal:El},this.APP_STORE_OS=yo,this.APP_STORE_PLATFORM_LIST=Object.values(yo),this.layout=S(N),this.userService=S(oe),this.userService.checkAppStoreAvailability(),this.layout.setBreadcrumbIcon(jt.APPS),this.layout.setBreadcrumbNav({url:`/${Ee.BASE}/${Ee.APPS}/${Yi.APPS}`,splicing:2,translating:!0,sameLink:!0})}download(t,o=!1){let r=this.store.appStoreManifest().platform[t].find(p=>t===yo.NODE?p.ext==="tar.gz"===o:p.arch==="arm64"===o);mr(r.url)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-applications"]],decls:3,vars:2,consts:[[1,"app-top-menu","px-4"],[1,"d-flex","flex-fill","align-items-center","fs-xs"],["appAutoResize","",1,"d-flex","flex-column","fs-sm","bg-theme",2,"height","100%",3,"resizeOffset"],["l10nTranslate",""],["l10nTranslate","",1,"fw-bold"],[1,"mx-auto"],[1,"d-flex"],[1,"col-12","p-4"],[1,"container","p-0"],[1,"row"],[1,"col-md-4"],[1,"card","text-bg-light","text-center","mb-3"],[1,"card-body"],[1,"btn","btn-sm","btn-primary","mt-3","mb-2",3,"click"],[1,"me-2",3,"icon"],["size","3x",2,"height","36px",3,"icon"],[1,"card-title","mt-3","mb-2"],[1,"small","text-muted","mb-1"],["role","button","l10nTranslate","",1,"small",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0),g(1,gC,14,6,"div",1),l(),g(2,EC,7,1,"div",2)),o&2&&(s(),x(r.store.appStoreManifest()?1:-1),s(),x(r.store.appStoreManifest()?2:-1))},dependencies:[F,P,fe,Le],encapsulation:2});let i=n;return i})();var gp=(()=>{let n=class n{constructor(){this.currentMemberIds=[],this.hasChanges=new ae,this.layout=S(N),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:Tl},this.userService=S(oe)}searchMembers(t){let o={search:t,onlyUsers:!0,usersRole:this.parentGroup.type===Xi.USER?no.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(r=>r.id)]};return this.userService.searchMembers(o)}onSubmit(){this.submitted=!0,this.userService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(t=>t.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.parentGroup.name),this.layout.closeDialog()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.parentGroup.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-add-users-dialog"]],inputs:{parentGroup:"parentGroup",currentMemberIds:"currentMemberIds"},outputs:{hasChanges:"hasChanges"},decls:16,vars:7,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[3,"membersChange","members","withPermissions","customPlaceholder","searchFunction"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span"),d(4),l()(),a(5,"h4",3)(6,"span",4),d(7,"Add members"),l()(),a(8,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(9,"div",6)(10,"app-user-search",7),me("membersChange",function(u){return de(r.newMembers,u)||(r.newMembers=u),u}),l()(),a(11,"div",8)(12,"button",9),_("click",function(){return r.layout.closeDialog()}),d(13,"Cancel"),l(),a(14,"button",10),_("click",function(){return r.onSubmit()}),d(15," Confirm "),l()()),o&2&&(s(2),m("icon",r.icons.faUserPlus),s(2),w(r.parentGroup.name),s(6),pe("members",r.newMembers),m("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",r.searchMembers.bind(r)),s(4),m("disabled",r.submitted||!r.newMembers.length))},dependencies:[F,P,Dn],encapsulation:2});let i=n;return i})();function MC(i,n){if(i&1&&f(0,"img",9),i&2){let e=c();m("src",e.member.avatarUrl,ee)}}function AC(i,n){if(i&1&&f(0,"fa-icon",16),i&2){let e=c();V(e.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),m("icon",e.icons.GROUPS)}}function kC(i,n){if(i&1&&(a(0,"div",7)(1,"span",17),d(2,"from the group"),l(),a(3,"span",11),d(4),b(5,"capitalize"),l()()),i&2){let e=c();s(4),w(q(5,1,e.parentGroup.name))}}function DC(i,n){i&1&&(a(0,"small",12),d(1,"Only the group will be deleted, the members will no longer be part of it."),l())}var xp=(()=>{let n=class n{constructor(){this.wasDeleted=new ae,this.submitted=!1,this.icons={GROUPS:jt.GROUPS,faMinus:xn,faUserMinus:Il},this.layout=S(N),this.userService=S(oe)}onSubmit(){this.submitted=!0;let t=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.userService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.userService.deletePersonalGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",t,this.member.name),this.onClose()},error:r=>{this.submitted=!1,this.layout.sendNotification("error",t,this.member.name,r)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-group-delete-dialog"]],inputs:{parentGroup:"parentGroup",member:"member"},outputs:{wasDeleted:"wasDeleted"},decls:26,vars:10,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"fw-bold","me-1"],["translate",""],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],[3,"icon"],["translate","",1,"mx-1"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span"),d(4),l()(),a(5,"h4",3)(6,"span",4),d(7),l()(),a(8,"button",5),_("click",function(){return r.onClose()}),l()(),a(9,"div",6)(10,"div",7)(11,"div",8),g(12,MC,1,1,"img",9)(13,AC,1,3,"fa-icon",10),l(),a(14,"span",11),d(15),b(16,"capitalize"),l(),a(17,"span",12),d(18,"will be removed"),l(),g(19,kC,6,3,"div",7),l(),g(20,DC,2,0,"small",12),l(),a(21,"div",13)(22,"button",14),_("click",function(){return r.onClose()}),d(23,"Cancel"),l(),a(24,"button",15),_("click",function(){return r.onSubmit()}),d(25," Remove "),l()()),o&2&&(s(2),m("icon",r.member.isUser?r.icons.faUserMinus:r.icons.faMinus),s(2),w(r.member.name),s(3),w(r.member.isUser?"Remove from group":"Delete group"),s(5),x(r.member.isUser?12:13),s(3),w(q(16,8,r.member.name)),s(4),x(r.member.isUser?19:-1),s(),x(r.member.isGroup?20:-1),s(4),m("disabled",r.submitted))},dependencies:[F,P,Fn],encapsulation:2});let i=n;return i})();var Sp=(()=>{let n=class n{constructor(){this.layout=S(N),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=Qi,this.icons={faUserPen:wl,faKey:Pt},this.userService=S(oe)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let t=this.isManager?Qi.MANAGER:Qi.MEMBER;this.userService.updateUserFromPersonalGroup(this.parentGroup.id,this.user.id,{role:t}).subscribe({next:()=>{this.user.setGroupRole(t),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,o)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-personal-group-edit-user-dialog"]],inputs:{parentGroup:"parentGroup",user:"user"},decls:25,vars:5,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"ngModelChange","ngModel"],[1,"ms-1",3,"icon"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span"),d(4),l()(),a(5,"h4",3)(6,"span",4),d(7,"Edit user"),l()(),a(8,"button",5),_("click",function(){return r.layout.closeDialog()}),l()(),a(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),me("ngModelChange",function(u){return de(r.isManager,u)||(r.isManager=u),u}),l(),a(15,"span",4),d(16,"Set as group manager"),l(),f(17,"fa-icon",12),l()()()(),a(18,"small",4),d(19,"As a manager, the user will be able to manage the group and its members."),l()(),a(20,"div",13)(21,"button",14),_("click",function(){return r.layout.closeDialog()}),d(22,"Cancel"),l(),a(23,"button",15),_("click",function(){return r.onSubmit()}),d(24," Confirm "),l()()),o&2&&(s(2),m("icon",r.icons.faUserPen),s(2),w(r.user.name),s(10),pe("ngModel",r.isManager),s(3),m("icon",r.icons.faKey),s(6),m("disabled",r.submitted))},dependencies:[F,P,be,Lt,xe,ye],encapsulation:2});let i=n;return i})();var vp=(()=>{let n=class n{constructor(){this.wasLeft=new ae,this.submitted=!1,this.icons={GROUPS:jt.GROUPS,faRightFromBracket:Jo},this.layout=S(N),this.userService=S(oe)}onClose(){this.wasLeft.emit(!1),this.layout.closeDialog()}onSubmit(){this.submitted=!0,this.userService.leavePersonalGroup(this.member.id).subscribe({next:()=>{this.wasLeft.emit(!0),this.layout.sendNotification("success","The group was left",this.member.name),this.onClose()},error:t=>{this.submitted=!1,this.layout.sendNotification("error","The group was not left",this.member.name,t)}})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-personal-group-leave-dialog"]],inputs:{member:"member"},outputs:{wasLeft:"wasLeft"},decls:19,vars:6,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-auto",3,"click"],[1,"modal-body"],[1,"d-flex","align-items-center"],[1,"d-flex","align-items-center","avatar","me-2"],[3,"icon"],[1,"fw-bold","me-1"],[1,"modal-footer"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"h4",1),f(2,"fa-icon",2),a(3,"span",3),d(4,"Leave group"),l()(),a(5,"button",4),_("click",function(){return r.onClose()}),l()(),a(6,"div",5)(7,"div",6)(8,"div",7),f(9,"fa-icon",8),l(),a(10,"span",9),d(11),l(),a(12,"span",3),d(13,"will be left, you will no longer be a member of this group"),l()()(),a(14,"div",10)(15,"button",11),_("click",function(){return r.onClose()}),d(16,"Cancel"),l(),a(17,"button",12),_("click",function(){return r.onSubmit()}),d(18," Confirm "),l()()),o&2&&(s(2),m("icon",r.icons.faRightFromBracket),s(7),V(r.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),m("icon",r.icons.GROUPS),s(2),w(r.member.name),s(6),m("disabled",r.submitted))},dependencies:[F,P],encapsulation:2});let i=n;return i})();var FC=["MainContextMenu"],LC=["TargetContextMenu"],yp=(i,n)=>n.key,PC=(i,n)=>n.mid;function NC(i,n){if(i&1){let e=y();a(0,"ul",19)(1,"li",20)(2,"a",21),_("click",function(){h(e);let o=c(2);return C(o.browse(o.selected))}),a(3,"span",22),f(4,"fa-icon",6),d(5,"See members"),l()()(),a(6,"li",20)(7,"a",21),_("click",function(){h(e);let o=c(2);return C(o.openLeaveGroupDialog())}),a(8,"span",22),f(9,"fa-icon",6),d(10,"Leave group"),l()()()()}if(i&2){let e=c(2);s(2),z("disabled",!e.selected),s(2),m("icon",e.icons.faUsersRectangle),s(3),z("disabled",!e.selected||!e.selected.isPersonalGroup),s(2),m("icon",e.icons.faRightFromBracket)}}function IC(i,n){if(i&1&&(a(0,"div",7)(1,"button",17),f(2,"fa-icon",6),l(),L(3,NC,11,6,"ul",18),l()),i&2){let e=c();s(),z("disabled",!e.selected),s(),m("icon",e.icons.faEllipsis)}}function RC(i,n){if(i&1&&f(0,"fa-icon",25),i&2){let e=c(3);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)("fixedWidth",!1)}}function VC(i,n){if(i&1){let e=y();a(0,"th",24),_("click",function(){h(e);let o=c().$implicit,r=c();return C(r.sortBy(o.key))}),d(1),g(2,RC,1,2,"fa-icon",25),l()}if(i&2){let e=c().$implicit,t=c();V(e.value.class),O("width",e.value.width,"%"),z("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),A(" ",e.value.label," "),s(),x(t.sortTable.sortParam.column===e.key?2:-1)}}function zC(i,n){if(i&1&&g(0,VC,3,10,"th",23),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function OC(i,n){if(i&1&&f(0,"img",29),i&2){let e=c(4).$implicit;m("src",e.avatarUrl,ee)}}function BC(i,n){if(i&1&&f(0,"fa-icon",6),i&2){let e=c(4).$implicit,t=c();V(e.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),m("icon",t.icons.GROUPS)}}function UC(i,n){if(i&1&&f(0,"fa-icon",33),i&2){let e=c(5);m("icon",e.icons.faKey)}}function HC(i,n){if(i&1&&(a(0,"div",28),g(1,OC,1,1,"img",29)(2,BC,1,3,"fa-icon",30),a(3,"div",31)(4,"span",32),d(5),g(6,UC,1,1,"fa-icon",33),l(),a(7,"span",34),d(8),l()()()),i&2){let e=c(3).$implicit;s(),x(e.isUser?1:2),s(4),A(" ",e.name," "),s(),x(e.isUser&&e.isGroupManager?6:-1),s(2),w(e.description)}}function $C(i,n){if(i&1&&(a(0,"span",22),d(1),l()),i&2){let e=c(4).$implicit;s(),w(e.type)}}function GC(i,n){if(i&1&&(a(0,"span",22),d(1),l()),i&2){let e=c(4).$implicit;s(),w(e.isGroupManager?"Manager":"Member")}}function WC(i,n){if(i&1&&g(0,$C,2,1,"span",22)(1,GC,2,1,"span",22),i&2){let e=c(3).$implicit;x(e.isGroup?0:1)}}function qC(i,n){if(i&1&&(a(0,"span",22),d(1),l()),i&2){let e=c(3).$implicit;s(),w(e.isGroupManager?"Manager":"Member")}}function jC(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"joinCounts"),l()),i&2){let e=c(4).$implicit;s(),w(q(2,1,e.counts))}}function KC(i,n){if(i&1&&g(0,jC,3,3,"span"),i&2){let e=c(3).$implicit;x(e.isGroup?0:-1)}}function QC(i,n){if(i&1&&(d(0),b(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",E(1,1,e.createdAt,!0)," ")}}function YC(i,n){if(i&1&&(d(0),b(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",q(1,1,e.createdAt)," ")}}function XC(i,n){if(i&1&&(d(0),b(1,"amTimeAgo")),i&2){let e=c(3).$implicit;A(" ",q(1,1,e.modifiedAt)," ")}}function ZC(i,n){if(i&1&&(a(0,"td"),g(1,HC,9,4,"div",28)(2,WC,2,1)(3,qC,2,1,"span",22)(4,KC,1,1)(5,QC,2,4)(6,YC,2,3)(7,XC,2,3),l()),i&2){let e,t=c().$implicit,o=c().$implicit;V(wt("",t.value.class," ",t.value.newly?"prop-newly-"+o[t.value.newly]:"")),O("width",t.value.width,"%"),z("text-align-center",t.value.textCenter),s(),x((e=t.key)==="name"?1:e==="type"?2:e==="role"?3:e==="members"?4:e==="memberSince"?5:e==="createdAt"?6:e==="modifiedAt"?7:-1)}}function JC(i,n){if(i&1&&g(0,ZC,8,9,"td",27),i&2){let e=n.$implicit;x(e.value.show?0:-1)}}function e8(i,n){if(i&1){let e=y();a(0,"tr",26),_("click",function(){let o=h(e).$implicit,r=c();return C(r.onSelect(o))})("contextmenu",function(o){let r=h(e).$implicit,p=c();return C(p.onTargetContextMenu(o,r))})("appTap",function(){let o=h(e).$implicit,r=c();return C(r.browse(o))}),k(1,JC,1,1,null,null,yp),b(3,"keyvalue"),l()}if(i&2){let e=n.$implicit,t=c();z("selected",e.mid===(t.selected==null?null:t.selected.mid)),s(),D(E(3,2,t.tableHeaders,t.originalOrderKeyValue))}}function t8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2),l()),i&2){let e=c(2);s(),m("icon",e.icons.faPlus),s(),A(" ",e.allowedAction.addGroup?"Personal group":"Add members")}}function i8(i,n){if(i&1){let e=y();L(0,t8,3,2,"ng-template",16),_("execute",function(){h(e);let o=c();return C(o.openDialog(!0))})}}function n8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2,"Refresh"),l()),i&2){let e=c();s(),m("icon",e.icons.faArrowRotateRight)}}function o8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2,"See members"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faUsersRectangle)}}function r8(i,n){if(i&1){let e=y();L(0,o8,3,1,"ng-template",16),_("execute",function(){h(e);let o=c();return C(o.browse(o.selected))})}}function a8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2),l()),i&2){let e=c(2);s(),m("icon",e.icons.faPen),s(),A(" ",e.allowedAction.editGroup?"Edit group":"Edit user")}}function s8(i,n){if(i&1){let e=y();L(0,a8,3,2,"ng-template",16),_("execute",function(){h(e);let o=c();return C(o.openDialog())})}}function l8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2),l()),i&2){let e=c(2);s(),m("icon",e.icons.faMinus),s(),A(" ",e.allowedAction.removeGroup?"Delete group":"Remove from group")}}function c8(i,n){if(i&1){let e=y();L(0,l8,3,2,"ng-template",16),_("execute",function(){h(e);let o=c();return C(o.openDialog(!1,!0))})}}function p8(i,n){if(i&1&&(a(0,"span",22),f(1,"fa-icon",6),d(2,"Leave group"),l()),i&2){let e=c(2);s(),m("icon",e.icons.faRightFromBracket)}}function d8(i,n){if(i&1){let e=y();L(0,p8,3,1,"ng-template",16),_("execute",function(){h(e);let o=c();return C(o.openLeaveGroupDialog())})}}var bp=(()=>{let n=class n{constructor(){this.locale=S(H),this.originalOrderKeyValue=Fe,this.icons={GROUPS:jt.GROUPS,faRotate:Mi,faPlus:Qe,faMinus:xn,faPen:mt,faArrowDown:ft,faArrowUp:dt,faKey:Pt,faArrowRotateRight:ut,faRightFromBracket:Jo,faUsersRectangle:ul,faEllipsis:Bo},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},type:{label:"Type",width:10,textCenter:!0,class:"",show:!0,sortable:!0},role:{label:"Role",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},memberSince:{label:"Member since",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!1,sortable:!0},createdAt:{label:"Created",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},modifiedAt:{label:"Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.isCurrentGroupManager=!1,this.allowedAction={addGroup:!1,addUsers:!1,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1},this.loading=!1,this.selected=null,this.members=[],this.router=S(ge),this.activatedRoute=S(ei),this.layout=S(N),this.userService=S(oe),this.canCreatePersonalGroup=this.userService.userHavePermission(_t.PERSONAL_GROUPS_ADMIN),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],role:[{prop:"isGroupManager",type:"number"}],createdAt:[{prop:"createdAt",type:"date"}],modifiedAt:[{prop:"modifiedAt",type:"date"}]},this.sortTable=new Bt(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(t=>this.setEnv(t.routes)),this.activatedRoute.queryParams.subscribe(t=>this.focusOnSelect=t.select),this.layout.setBreadcrumbIcon(jt.GROUPS)}setEnv(t){let o;t.length?(o=t[t.length-1].path,this.layout.setBreadcrumbNav({url:`/${Ee.BASE}/${Ee.GROUPS}/${Yi.GROUPS}${dr(t)}`,splicing:2,translating:!0,sameLink:!0,mutateLevel:{1:{setUrl:!0}}})):this.layout.setBreadcrumbNav({url:`/${Ee.BASE}/${Ee.GROUPS}/${Yi.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(o)}refresh(){this.loadGroups(this.currentGroup?.name)}loadGroups(t){this.loading=!0,this.onSelect(),this.userService.browseGroup(t).subscribe({next:o=>{this.tableHeaders.members.show=!t,this.tableHeaders.role.show=!t,this.tableHeaders.modifiedAt.show=!t,this.tableHeaders.createdAt.show=!t,this.tableHeaders.memberSince.show=!!t,this.currentGroup=o.parentGroup,this.isCurrentGroupManager=this.currentGroup?.role===Qi.MANAGER,this.sortBy(this.sortTable.sortParam.column,!1,o.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:o=>{this.members=[],this.layout.sendNotification("error","Groups",o.error.message),this.onSelect(),this.loading=!1}})}browse(t){t.isGroup&&this.router.navigate([t.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(t=null){this.selected=t,this.selected?this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager,removeGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,editUser:!!this.currentGroup&&this.selected.isUser&&this.isCurrentGroupManager&&this.currentGroup.type===Xi.PERSONAL,editGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isGroupManager&&this.selected.isPersonalGroup,leaveGroup:!this.currentGroup&&this.selected.isGroup&&this.selected.isPersonalGroup}:this.allowedAction={addGroup:!this.currentGroup&&this.canCreatePersonalGroup,addUsers:!!this.currentGroup&&this.isCurrentGroupManager,removeUser:!1,removeGroup:!1,editUser:!1,editGroup:!1,leaveGroup:!1}}onContextMenu(t){t.preventDefault(),t.stopPropagation(),this.layout.openContextMenu(t,this.mainContextMenu)}onTargetContextMenu(t,o){t.preventDefault(),t.type==="contextmenu"&&t.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(t,this.targetContextMenu)}sortBy(t,o=!0,r){this.members=this.sortTable.sortBy(t,o,r||this.members)}openDialog(t=!1,o=!1){t?this.currentGroup?this.layout.openDialog(gp,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(p=>p.isUser).map(p=>p.id)}}).content.hasChanges.pipe(At(p=>p),ce(1)).subscribe(()=>this.refresh()):this.layout.openDialog(Ma,"md").content.groupChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;u==="add"&&(v.setGroupRole(Qi.MANAGER),v.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(v)),this.onSelect(v))}):o?this.layout.openDialog(xp,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(At(p=>p),ce(1)).subscribe(()=>{this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(p=>this.selected.mid!==p.mid)),this.onSelect()}):this.selected.isGroup?this.layout.openDialog(Ma,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(ce(1)).subscribe(p=>{let[u,v]=p;u==="update"&&(this.selected=Object.assign(this.selected,{name:v.name,description:v.description,modifiedAt:v.modifiedAt}))}):this.layout.openDialog(Sp,"md",{initialState:{parentGroup:this.currentGroup,user:this.selected}})}openLeaveGroupDialog(){this.layout.openDialog(vp,"md",{initialState:{member:this.selected}}).content.wasLeft.pipe(ce(1)).subscribe(o=>{o&&(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(r=>r.id!==this.selected.id)),this.onSelect())})}focusOn(t){let o=this.members.find(r=>r.name===t);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-groups"]],viewQuery:function(o,r){if(o&1&&(Y(Xe,5),Y(Ve,7),Y(FC,7),Y(LC,7)),o&2){let p;G(p=W())&&(r.scrollView=p.first),G(p=W())&&(r.inputFilter=p.first),G(p=W())&&(r.mainContextMenu=p.first),G(p=W())&&(r.targetContextMenu=p.first)}},decls:41,vars:43,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],[1,"d-flex","flex-column"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,r){if(o&1){let p=y();a(0,"div",2)(1,"button",3),b(2,"translate"),_("click",function(){return h(p),C(r.refresh())}),f(3,"fa-icon",4),l(),a(4,"button",5),b(5,"translate"),_("click",function(){return h(p),C(r.openDialog(!0))}),f(6,"fa-icon",6),l(),a(7,"button",5),b(8,"translate"),_("click",function(){return h(p),C(r.openDialog(!1,!0))}),f(9,"fa-icon",6),l(),a(10,"button",5),b(11,"translate"),_("click",function(){return h(p),C(r.openDialog())}),f(12,"fa-icon",6),l(),g(13,IC,4,3,"div",7),f(14,"app-input-filter",8),l(),a(15,"table",9)(16,"thead")(17,"tr"),k(18,zC,1,1,null,null,yp),b(20,"keyvalue"),l()()(),a(21,"app-virtual-scroll",10),b(22,"searchFilter"),_("contextmenu",function(v){return h(p),C(r.onContextMenu(v))}),a(23,"table",9)(24,"tbody",11),k(25,e8,4,5,"tr",12,PC),l()()(),a(27,"div",13)(28,"span",14),d(29),b(30,"translate"),l()(),a(31,"context-menu",null,0),g(33,i8,1,0,null,15),L(34,n8,3,1,"ng-template",16),_("execute",function(){return h(p),C(r.refresh())}),l(),a(35,"context-menu",null,1),g(37,r8,1,0,null,15),g(38,s8,1,0,null,15),g(39,c8,1,0,null,15),g(40,d8,1,0,null,15),l()}o&2&&(s(),m("tooltip",E(2,22,"Refresh",r.locale.language)),s(2),m("icon",r.icons.faRotate)("animation",r.loading?"spin":null),s(),m("disabled",!r.allowedAction.addGroup&&!r.allowedAction.addUsers)("tooltip",E(5,25,r.allowedAction.addGroup?"New personal group":"Add members",r.locale.language)),s(2),m("icon",r.icons.faPlus),s(),m("disabled",!r.allowedAction.removeGroup&&!r.allowedAction.removeUser)("tooltip",E(8,28,r.allowedAction.removeGroup?"Delete group":"Remove from group",r.locale.language)),s(2),m("icon",r.icons.faMinus),s(),m("disabled",!r.allowedAction.editGroup&&!r.allowedAction.editUser)("tooltip",E(11,31,r.allowedAction.editGroup?"Edit group":"Edit user",r.locale.language)),s(2),m("icon",r.icons.faPen),s(),x(r.currentGroup?-1:13),s(5),D(E(20,34,r.tableHeaders,r.originalOrderKeyValue)),s(3),m("bufferAmount",5)("items",E(22,37,r.members,r.inputFilter.search())),s(4),D(r.scrollView==null?null:r.scrollView.viewPortItems),s(4),Ie("",r.members.length," ",E(30,40,"groups",r.locale.language)),s(4),x(r.allowedAction.addGroup||r.allowedAction.addUsers?33:-1),s(4),x(r.selected!=null&&r.selected.isGroup?37:-1),s(),x(r.allowedAction.editGroup||r.allowedAction.editUser?38:-1),s(),x(r.allowedAction.removeGroup||r.allowedAction.removeUser?39:-1),s(),x(r.allowedAction.leaveGroup?40:-1))},dependencies:[zt,Vt,Rt,F,P,Ve,Xe,ke,Pi,Ii,Ni,nt,Ae,Z,Ct,ai,Je],encapsulation:2});let i=n;return i})();var wp=()=>!S(oe).user.isLink,Tp=()=>S(oe).user.isUser;var Ep=[{path:Ee.BASE,pathMatch:"prefix",canActivate:[wp],children:[{path:Ee.ACCOUNT,component:hp},{path:Ee.CLIENTS,canActivate:[lp],loadComponent:()=>import("./chunk-N3P6P6GW.js").then(i=>i.SyncClientsComponent)},{path:Ee.GROUPS,children:[{path:"**",resolve:{routes:go},component:bp}]},{path:Ee.GUESTS,canActivate:[Tp],loadComponent:()=>import("./chunk-CCGGCHGN.js").then(i=>i.UserGuestsComponent)},{path:Ee.APPS,component:Cp},{path:"**",redirectTo:Ee.ACCOUNT}]}];var ds=(i,n)=>S(Kt).checkUserAuthAndLoad(n.url),Mp=()=>S(Kt).isLogged()?(S(ge).navigate([]).catch(console.error),!1):!0;function m8(i,n){if(i&1&&(a(0,"span",17),f(1,"fa-icon",18),l(),f(2,"input",19),b(3,"translate")),i&2){let e=c(2);s(),m("icon",e.icons.faKey),s(),m("placeholder",E(3,2,"Recovery code",e.locale.language))}}function u8(i,n){if(i&1&&(a(0,"span",17),f(1,"fa-icon",18),l(),f(2,"input",20),b(3,"translate")),i&2){let e=c(2);s(),m("icon",e.icons.faQrcode),s(),m("placeholder",E(3,3,"Authentication code",e.locale.language))("maxlength",e.twoFaCodelength)}}function f8(i,n){if(i&1){let e=y();a(0,"p",7),d(1),l(),a(2,"form",8),_("ngSubmit",function(){h(e);let o=c();return C(o.onSubmit2Fa())}),a(3,"div",9),g(4,m8,4,5)(5,u8,4,6),l(),a(6,"div",10)(7,"div",11)(8,"label",12),f(9,"input",13),a(10,"span",7),d(11,"Use a recovery code"),l()()()(),a(12,"div",14)(13,"button",15),_("click",function(){h(e);let o=c();return C(o.onCancel2Fa())}),d(14,"Cancel"),l(),a(15,"button",16),d(16," Confirm "),l()()()}if(i&2){let e=c();V(X("fs-sm mb-3 ",e.hasError?"text-danger":"text-white-50")),s(),w(e.hasError||"Two-Factor Authentication"),s(),m("formGroup",e.twoFaForm),s(2),x(e.twoFaForm.value.isRecoveryCode?4:5),s(11),m("disabled",e.twoFaForm.value.isRecoveryCode?e.twoFaForm.controls.recoveryCode.invalid:e.twoFaForm.controls.totpCode.invalid||e.submitted)}}function _8(i,n){if(i&1){let e=y();a(0,"form",8),_("ngSubmit",function(){h(e);let o=c();return C(o.onSubmit())}),a(1,"p",7),d(2),l(),a(3,"div",21)(4,"span",17),f(5,"fa-icon",18),l(),f(6,"input",22),b(7,"translate"),l(),a(8,"div",23)(9,"span",17),f(10,"fa-icon",18),l(),f(11,"input",24),b(12,"translate"),l(),a(13,"div",25)(14,"button",26),d(15,"Sign in"),l()()()}if(i&2){let e=c();m("formGroup",e.loginForm),s(),V(X("fs-sm mb-3 ",e.hasError?"text-danger":"text-white-50")),s(),w(e.hasError||"Sign-in to your account"),s(3),m("icon",e.icons.faUserAlt),s(),m("placeholder",E(7,10,"Login or Email",e.locale.language)),s(4),m("icon",e.icons.faLock),s(),m("placeholder",E(12,13,"Password",e.locale.language)),s(3),m("disabled",e.loginForm.invalid||e.submitted)}}var Ap=(()=>{let n=class n{constructor(){this.locale=S(H),this.icons={faLock:ni,faUserAlt:tr,faKey:Pt,faQrcode:Ul},this.twoFaCodelength=un,this.logoUrl=br,this.hasError=null,this.submitted=!1,this.twoFaVerify=!1,this.fb=S(gn),this.loginForm=this.fb.group({username:this.fb.control("",[Et.required]),password:this.fb.control("",[Et.required])}),this.twoFaForm=this.fb.group({totpCode:this.fb.control("",[Et.required,Et.pattern(new RegExp(`^\\d{${un}}$`))]),recoveryCode:this.fb.control("",[Et.required,Et.minLength(8)]),isRecoveryCode:this.fb.control(!1)}),this.router=S(ge),this.auth=S(Kt)}onSubmit(){this.submitted=!0,this.auth.login(this.loginForm.value.username,this.loginForm.value.password).pipe(Ao(()=>setTimeout(()=>this.submitted=!1,1500))).subscribe({next:t=>this.isLogged(t),error:t=>this.isLogged({success:!1,message:t.error?t.error.message:t})})}onSubmit2Fa(){this.submitted=!0;let t={code:this.twoFaForm.value.isRecoveryCode?this.twoFaForm.value.recoveryCode:this.twoFaForm.value.totpCode,isRecoveryCode:this.twoFaForm.value.isRecoveryCode};this.auth.loginWith2Fa(t).subscribe({next:o=>this.is2FaVerified(o),error:o=>this.is2FaVerified({success:!1,message:o.error?o.error.message:o})})}onCancel2Fa(){this.auth.logout(),this.twoFaForm.patchValue({totpCode:"",recoveryCode:""}),this.twoFaVerify=!1,this.submitted=!1,this.hasError=null}is2FaVerified(t){t.success?(this.auth.initUserFromResponse(t),this.isLogged({success:!0,message:t.message})):(this.hasError=t.message||"Unable to verify code",this.submitted=!1),this.twoFaForm.patchValue({totpCode:"",recoveryCode:""})}isLogged(t){t.success?(this.hasError=null,t.twoFaEnabled?this.twoFaVerify=!0:this.auth.returnUrl?this.router.navigateByUrl(this.auth.returnUrl).then(()=>{this.auth.returnUrl=null,this.loginForm.reset()}):this.router.navigate([fi.BASE]).then(()=>this.loginForm.reset())):(this.hasError=t.message||"Server connection error",this.submitted=!1),this.loginForm.patchValue({password:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-auth"]],decls:8,vars:2,consts:[[1,"app-auth"],[1,"background"],[1,"content"],[1,"header"],["alt","","height","65",3,"src"],[1,"body"],[3,"formGroup"],["l10nTranslate",""],[3,"ngSubmit","formGroup"],[1,"input-group","mt-2","mb-4"],[1,"d-flex","text-white-50","fs-xs"],[1,"form-check","form-switch","form-check-inline"],["for","useRecovery",1,"form-check-label"],["formControlName","isRecoveryCode","id","useRecovery","type","checkbox",1,"form-check-input"],[1,"d-flex","mt-4"],["type","button","l10nTranslate","",1,"btn","btn-secondary","px-4","w-50","me-3",3,"click"],["type","submit","l10nTranslate","",1,"btn","btn-primary","px-4","w-50",3,"disabled"],[1,"input-group-text"],[3,"icon"],["appAutofocus","","type","password","formControlName","recoveryCode",1,"form-control",3,"placeholder"],["appAutofocus","","type","text","formControlName","totpCode","inputmode","numeric","autocomplete","one-time-code",1,"form-control",3,"placeholder","maxlength"],[1,"input-group","my-2"],["appAutofocus","","formControlName","username","type","text",1,"form-control",3,"placeholder"],[1,"input-group","mb-4"],["formControlName","password","type","password",1,"form-control",3,"placeholder"],[1,"d-flex"],["type","submit","l10nTranslate","",1,"btn","btn-primary","px-4","w-100",3,"disabled"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),f(4,"img",4),l(),a(5,"div",5),g(6,f8,17,7)(7,_8,16,16,"form",6),l()()()()),o&2&&(s(4),m("src",r.logoUrl,ee),s(2),x(r.twoFaVerify?6:7))},dependencies:[Ye,Ei,_n,je,Lt,xe,fn,Vo,hn,Cn,F,P,Z],encapsulation:2});let i=n;return i})();var kp=[{path:Ea.BASE,canActivate:[Mp],children:[{path:Ea.LOGIN,component:Ap}]}];var h8=()=>({matrixParams:"ignored",queryParams:"ignored",paths:"exact",fragment:"ignored"});function C8(i,n){if(i&1&&f(0,"fa-icon",2),i&2){let e=c(2);m("icon",e.icons.faChevronRight)("fixedWidth",!1)}}function g8(i,n){if(i&1&&f(0,"fa-icon",5),i&2){let e=c(2);m("icon",e.breadcrumbIcon)}}function x8(i,n){if(i&1&&(g(0,C8,1,2,"fa-icon",2),a(1,"li",3)(2,"a",4),g(3,g8,1,1,"fa-icon",5),a(4,"span"),d(5),l()()()),i&2){let e=n.$implicit,t=n.$index,o=c();x(t!==0?0:-1),s(),m("routerLinkActiveOptions",Tt(5,h8)),s(),m("routerLink",e.link),s(),x(t===0&&o.breadcrumbIcon?3:-1),s(2),w(e.title)}}var Dp=(()=>{let n=class n{constructor(){this.icons={faChevronRight:yl},this.breadcrumbIcon=kl,this.levels=[],this.layout=S(N),this.subscriptions=[],this.subscriptions.push(this.layout.breadcrumbNav.subscribe(t=>this.updateNav(t))),this.subscriptions.push(this.layout.breadcrumbIcon.subscribe(t=>this.breadcrumbIcon=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateNav(t){let o=t.splicing||1,r=t.translating||!1,p=t.sameLink||!1,u=t.firstLink||null,v=t.mutateLevel||null,T=t.url.split("/").slice(1);if(this.levels=[],T.length>=1&&T[0]){let I=`/${T.splice(0,o).join("/")}`;this.levels.push({link:u||I,title:""});for(let{index:R,item:le}of T.filter(Q=>Q!=="").map((Q,j)=>({index:j,item:Q}))){let Q=le.split("?")[0];if((!p||v&&v[R]&&v[R].setUrl)&&(I+="/"+Q),v&&v[R]){if(v[R].hide)continue;v[R].setTitle&&(Q=v[R].translateTitle?this.layout.translateString(v[R].setTitle):v[R].setTitle)}else r&&(Q=this.layout.translateString(Q));this.levels.push({link:I,title:Q})}}else this.levels.push({link:["/"],title:""})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-breadcrumb"]],decls:4,vars:0,consts:[[1,"breadcrumb"],[1,"breadcrumb-content"],[3,"icon","fixedWidth"],["routerLinkActive","active",3,"routerLinkActiveOptions"],[3,"routerLink"],[3,"icon"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1),k(2,x8,6,6,null,null,qe),l()()),o&2&&(s(2),D(r.levels))},dependencies:[mn,Ys,F],encapsulation:2});let i=n;return i})();function S8(i,n){if(i&1&&f(0,"img",8),i&2){let e=c();m("src",e.userAvatar,ee)("width",28)("height",28)}}var Fp=(()=>{let n=class n{constructor(){this.allOnlineStatus=Fi,this.icons={faAngleLeft:Wo,faAngleRight:Xo},this.userAvatar=null,this.location=S(No),this.layout=S(N),this.store=S(te),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}openSidebarUser(){this.layout.showRSideBarTab(_e.PROFILE)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-navbar"]],decls:13,vars:6,consts:[[1,"main-header"],[1,"navbar","navbar-content"],["role","button",1,"d-sm-none","navbar-button",3,"click"],[3,"icon"],[1,"navbar-breadcrumb"],[1,"navbar-right-side"],[1,"menu",3,"click"],[1,"avatar"],["alt","",1,"avatar-img","bg-gray-light-important",3,"src","width","height"]],template:function(o,r){o&1&&(a(0,"header",0)(1,"nav",1)(2,"a",2),_("click",function(){return r.navigateTo("back")}),f(3,"fa-icon",3),l(),a(4,"a",2),_("click",function(){return r.navigateTo("next")}),f(5,"fa-icon",3),l(),a(6,"div",4),f(7,"app-breadcrumb"),l(),a(8,"div",5)(9,"div",6),_("click",function(){return r.openSidebarUser()}),a(10,"div",7),g(11,S8,1,3,"img",8),f(12,"span"),l()()()()()),o&2&&(s(3),m("icon",r.icons.faAngleLeft),s(2),m("icon",r.icons.faAngleRight),s(6),x(r.userAvatar?11:-1),s(),V(X("avatar-",r.allOnlineStatus[r.user==null?null:r.user.onlineStatus])))},dependencies:[Dp,F],encapsulation:2});let i=n;return i})();var v8=["sidebar"],y8=(i,n)=>({menu:i,previousLevel:n}),b8=i=>({menu:i}),w8=i=>({menu:i,isMenuIcon:!0}),T8=(i,n)=>({mainMenu:i,menu:n}),da=i=>({menu:i,isMenuIcon:!1}),bo=(i,n)=>n.title;function E8(i,n){if(i&1&&Ne(0,18),i&2){let e=c(),t=e.$implicit,o=e.$index,r=c(),p=Be(27);m("ngTemplateOutlet",p)("ngTemplateOutletContext",Jn(2,y8,t,o===0?0:r.appsMenu.submenus[o-1].level))}}function M8(i,n){if(i&1&&g(0,E8,1,5,"ng-container",18),i&2){let e=n.$implicit;x(e.hide?-1:0)}}function A8(i,n){if(i&1){let e=y();a(0,"a",8),_("click",function(){h(e);let o=c();return C(o.logOut())})("mouseenter",function(){h(e);let o=c();return C(o.onHoverIconsMenu(!0,{title:"logout"}))})("mouseleave",function(){h(e);let o=c();return C(o.onHoverIconsMenu(!1,{title:"logout"}))}),f(1,"fa-icon",19),l()}if(i&2){let e=c();s(),m("icon",e.icons.faUserSecret)}}function k8(i,n){if(i&1&&Ne(0,18),i&2){let e=c().$implicit;c();let t=Be(29);m("ngTemplateOutlet",t)("ngTemplateOutletContext",Re(2,b8,e))}}function D8(i,n){if(i&1&&g(0,k8,1,4,"ng-container",18),i&2){let e=n.$implicit;x(e.hide?-1:0)}}function F8(i,n){i&1&&Ne(0)}function L8(i,n){if(i&1){let e=y();a(0,"div",20),_("click",function(){h(e);let o=c();return C(o.checkComponentRoute())}),L(1,F8,1,0,"ng-container",21),l()}if(i&2){let e=c();m("resizeOffset",40),s(),m("ngComponentOutlet",e.currentMenu.component)}}function P8(i,n){if(i&1&&(a(0,"span",23),d(1),l()),i&2){let e=c().menu;s(),w(e.title)}}function N8(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c(2).menu;V(X("badge bg-",e.count.level," rounded-pill")),s(),w(n)}}function I8(i,n){if(i&1&&(a(0,"span"),g(1,N8,2,4,"span",24),b(2,"async"),l()),i&2){let e,t=c(),o=t.menu,r=t.isMenuIcon;V(r?"menu-badge-icon":"menu-badge"),s(),x((e=q(2,3,o.count.value))?1:-1,e)}}function R8(i,n){if(i&1&&(f(0,"fa-icon",22),g(1,P8,2,1,"span",23),g(2,I8,3,5,"span",24)),i&2){let e=n.menu,t=n.isMenuIcon;m("icon",e.icon)("animation",e.iconAnimated?"spin":null),s(),x(t?-1:1),s(),x(e.count?2:-1)}}function V8(i,n){if(i&1&&Ne(0,18),i&2){let e=c().$implicit,t=c(2).menu;c();let o=Be(31);m("ngTemplateOutlet",o)("ngTemplateOutletContext",Jn(2,T8,t,e))}}function z8(i,n){if(i&1&&g(0,V8,1,5,"ng-container",18),i&2){let e=n.$implicit;x(e.hide?-1:0)}}function O8(i,n){i&1&&Ne(0)}function B8(i,n){if(i&1){let e=y();a(0,"div",20),_("click",function(){h(e);let o=c(2).menu,r=c();return C(r.checkComponentRoute(o))}),L(1,O8,1,0,"ng-container",21),l()}if(i&2){let e=c(3);m("resizeOffset",40),s(),m("ngComponentOutlet",e.currentMenu.component)}}function U8(i,n){if(i&1&&(a(0,"div"),k(1,z8,1,1,null,null,bo),g(3,B8,2,2,"div",16),l()),i&2){let e=c().menu,t=c();V(X("menu-mini ",e.level<9?"align-self-start":"align-self-end")),s(),D(e.submenus),s(2),x(t.currentMenu.component?3:-1)}}function H8(i,n){if(i&1){let e=y();a(0,"a",25),_("mouseenter",function(){let o=h(e).menu,r=c();return C(r.onHoverIconsMenu(!0,o))})("mouseleave",function(){let o=h(e).menu,r=c();return C(r.onHoverIconsMenu(!1,o))})("click",function(){let o=h(e).menu,r=c();return C(r.checkMenuContext(o))}),Ne(1,18),g(2,U8,4,4,"div",24),l()}if(i&2){let e=n.menu,t=n.previousLevel;c();let o=Be(25);z("mt-auto",t<9&&e.level>9)("active",e.isActive),s(),m("ngTemplateOutlet",o)("ngTemplateOutletContext",Re(7,w8,e)),s(),x(e.miniOpened?2:-1)}}function $8(i,n){if(i&1&&(a(0,"div",28)(1,"a",26),Ne(2,18),l()()),i&2){let e=c().$implicit,t=c(2).menu;c();let o=Be(25);V(t.isActive?"collapse-show":"collapse-hide"),z("active",e.isActive),s(),m("routerLink",e.link),s(),m("ngTemplateOutlet",o)("ngTemplateOutletContext",Re(7,da,e))}}function G8(i,n){if(i&1&&g(0,$8,3,9,"div",27),i&2){let e=n.$implicit;x(e.hide?-1:0)}}function W8(i,n){if(i&1&&k(0,G8,1,1,null,null,bo),i&2){let e=c().menu;D(e.submenus)}}function q8(i,n){if(i&1&&(a(0,"div",7)(1,"a",26),Ne(2,18),l()(),g(3,W8,2,0)),i&2){let e=n.menu;c();let t=Be(25);z("active",e.isActive),s(),m("routerLink",e.link),s(),m("ngTemplateOutlet",t)("ngTemplateOutletContext",Re(6,da,e)),s(),x(e.submenus!=null&&e.submenus.length?3:-1)}}function j8(i,n){if(i&1){let e=y();a(0,"a",29),_("click",function(o){h(e);let r=c().$implicit,p=c(2).mainMenu,u=c();return C(u.onMiniMenuNavigate(o,[r.link],p))}),Ne(1,18),l()}if(i&2){let e=c().$implicit;c(3);let t=Be(25);z("active",e.isActive),s(),m("ngTemplateOutlet",t)("ngTemplateOutletContext",Re(4,da,e))}}function K8(i,n){if(i&1&&g(0,j8,2,6,"a",30),i&2){let e=n.$implicit;x(e.hide?-1:0)}}function Q8(i,n){if(i&1&&k(0,K8,1,1,null,null,bo),i&2){let e=c().menu;D(e.submenus)}}function Y8(i,n){if(i&1){let e=y();a(0,"a",29),_("click",function(o){let r=h(e),p=r.mainMenu,u=r.menu,v=c();return C(v.onMiniMenuNavigate(o,[u.link],p))}),Ne(1,18),l(),g(2,Q8,2,0)}if(i&2){let e=n.menu;c();let t=Be(25);z("active",e.isActive),s(),m("ngTemplateOutlet",t)("ngTemplateOutletContext",Re(5,da,e)),s(),x(e.submenus!=null&&e.submenus.length?2:-1)}}var Lp=(()=>{let n=class n{constructor(){this.store=S(te),this.icons={faAngleLeft:Wo,faAngleRight:Xo,faUserSecret:rr},this.logoIconUrl=Fc,this.leftSideBarIsOpen=!1,this.appsMenu=Zl,this.router=S(ge),this.renderer=S(pt),this.location=S(No),this.authService=S(Kt),this.layout=S(N),this.userService=S(oe),this.subscriptions=[],this.menuAppsHovered=!1,this.menuIconsHovered=!1,this.menuAppsHoveredTimeout=null,this.menuIconsStopPropagation=!1,this.appName=Yl,this.appVersion=Xl,this.appsMenu.submenus=[gc,c1,uc,Gl,Jl],Ec("number",this.appsMenu.submenus,"level",!0),this.subscriptions.push(this.store.user.pipe(At(t=>!!t)).subscribe(()=>this.loadMenus())),this.subscriptions.push(this.layout.leftSideBarIsOpen.subscribe(t=>this.leftSideBarIsOpen=t)),this.subscriptions.push(this.router.events.pipe(At(t=>t instanceof Qs)).subscribe(t=>this.updateUrl(t.urlAfterRedirects)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}loadMenus(){this.userService.setMenusVisibility(this.appsMenu.submenus),this.updateUrl(this.router.url)}logOut(){this.authService.logout(!0)}navigateTo(t){t==="back"?this.location.back():this.location.forward()}toggleSideBar(){for(let t of this.appsMenu.submenus)t.miniOpened=!1;this.leftSideBarIsOpen&&this.renderer.removeStyle(this.sidebar.nativeElement,"z-index"),this.layout.toggleLSideBar()}checkMenuContext(t){!this.leftSideBarIsOpen&&this.layout.isSmallerScreen()&&t.submenus?.length?this.onHoverIconsMenu(!t.miniOpened,t):this.navigateToUrl([t.link])}onMiniMenuNavigate(t,o,r=null){t.stopPropagation(),this.navigateToUrl(o,r)}checkComponentRoute(t){this.currentMenu.link!==this.currentUrl&&this.router.navigate([this.currentMenu.link]).catch(console.error),t&&(t.miniOpened=!1)}onHoverAppsMenu(t){this.leftSideBarIsOpen&&(this.menuAppsHovered=t,t?this.menuAppsHoveredTimeout=setTimeout(()=>this.setActiveMenu(),5e3):(clearTimeout(this.menuAppsHoveredTimeout),this.checkHoveredMenu()))}onHoverIconsMenu(t,o,r=!1){if(!(this.leftSideBarIsOpen&&this.menuIconsStopPropagation))if((t&&o.submenus?.length||o.component)&&(this.currentMenu=o),this.leftSideBarIsOpen||r)this.menuIconsHovered=t,t?this.updateDynamicTitle(o.title):this.checkHoveredMenu();else{t?this.renderer.setStyle(this.sidebar.nativeElement,"z-index","1030"):this.renderer.removeStyle(this.sidebar.nativeElement,"z-index");for(let p of this.appsMenu.submenus.filter(u=>u.title!==o.title))p.miniOpened=!1;o.miniOpened=!!t}}checkHoveredMenu(){setTimeout(()=>{!this.menuIconsHovered&&!this.menuAppsHovered&&this.setActiveMenu()},50)}navigateToUrl(t,o=null){this.router.navigate(t).then(()=>{o&&o.miniOpened&&(o.miniOpened=!1)})}updateUrl(t){this.currentUrl=t.substring(1);for(let o of this.appsMenu.submenus)if(o.isActive=!!(!o.hide&&(o.link===this.currentUrl||o.matchLink&&o.matchLink.test(this.currentUrl))),o.isActive&&(this.currentMenu=o),o.submenus?.length){for(let r of o.submenus)if(r.isActive=o.isActive&&(r.link===this.currentUrl||!!r.matchLink&&r.matchLink.test(this.currentUrl)),r.submenus?.length)for(let p of r.submenus)p.isActive=this.currentUrl.startsWith(p.link)}this.currentMenu??=this.appsMenu.submenus[0],this.updateDynamicTitle(),this.menuIconsStopPropagation=!0,setTimeout(()=>this.menuIconsStopPropagation=!1,500)}setActiveMenu(){let t=this.appsMenu.submenus.find(o=>o.isActive);t&&(this.currentMenu=t,this.updateDynamicTitle(this.currentMenu.title))}updateDynamicTitle(t){this.dynamicTitle=this.layout.translateString(t!==void 0?t:this.currentMenu?this.currentMenu.title:this.appsMenu.title)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-sidebar-left"]],viewQuery:function(o,r){if(o&1&&Y(v8,7),o&2){let p;G(p=W())&&(r.sidebar=p.first)}},decls:32,vars:7,consts:[["sidebar",""],["MenuTemplate",""],["sidebarMenuIcons",""],["MenuApps",""],["MiniMenuApps",""],[1,"left-sidebar"],[1,"sidebar-apps-icons"],[1,"menu"],[3,"click","mouseenter","mouseleave"],[1,"logo-container"],["alt","",3,"src"],[1,"sidebar-apps-menus",3,"mouseenter","mouseleave"],[1,"menu-title",3,"mouseenter"],[1,"sidebar-title"],["role","button",1,"sidebar-btn",3,"click","icon"],[1,"menus-group"],["appAutoResize","",3,"resizeOffset"],[1,"sidebar-apps-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"icon"],["appAutoResize","",3,"click","resizeOffset"],[4,"ngComponentOutlet"],[3,"icon","animation"],["l10nTranslate",""],[3,"class"],[3,"mouseenter","mouseleave","click"],[3,"routerLink"],[1,"menu","submenu",3,"active","class"],[1,"menu","submenu"],[3,"click"],[3,"active"]],template:function(o,r){if(o&1){let p=y();a(0,"aside",5,0)(2,"div",6)(3,"div",7)(4,"a",8),_("click",function(){return h(p),C(r.toggleSideBar())})("mouseenter",function(){return h(p),C(r.onHoverIconsMenu(!0,{title:r.appName},!0))})("mouseleave",function(){return h(p),C(r.onHoverIconsMenu(!1,{title:r.appName},!0))}),a(5,"div",9),f(6,"img",10),l()(),k(7,M8,1,1,null,null,bo),g(9,A8,2,1,"a"),l()(),a(10,"div",11),_("mouseenter",function(){return h(p),C(r.onHoverAppsMenu(!0))})("mouseleave",function(){return h(p),C(r.onHoverAppsMenu(!1))}),a(11,"div",12),_("mouseenter",function(){return h(p),C(r.onHoverAppsMenu(!1))}),a(12,"a")(13,"span",13),d(14),l(),a(15,"fa-icon",14),_("click",function(){return h(p),C(r.navigateTo("back"))}),l(),a(16,"fa-icon",14),_("click",function(){return h(p),C(r.navigateTo("next"))}),l()()(),a(17,"div",15),k(18,D8,1,1,null,null,bo),g(20,L8,2,2,"div",16),l(),a(21,"div",17)(22,"span"),d(23),l()()()(),L(24,R8,3,4,"ng-template",null,1,Ft)(26,H8,3,9,"ng-template",null,2,Ft)(28,q8,4,8,"ng-template",null,3,Ft)(30,Y8,3,7,"ng-template",null,4,Ft)}o&2&&(s(6),m("src",r.logoIconUrl,ee),s(),D(r.appsMenu.submenus),s(2),x(r.store.userImpersonate()?9:-1),s(5),w(r.dynamicTitle),s(),m("icon",r.icons.faAngleLeft),s(),m("icon",r.icons.faAngleRight),s(2),D(r.currentMenu.submenus),s(2),x(r.leftSideBarIsOpen&&r.currentMenu.component?20:-1),s(3),w(r.appVersion))},dependencies:[mn,F,fe,P,Io,Wt,pn],encapsulation:2});let i=n;return i})();var X8=i=>({nb:i}),Z8=(i,n)=>({nba:i,nb:n}),J8=(i,n)=>n.id;function eg(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"translate"),l()),i&2){let e=c();s(),w(Dt(2,1,e.nbTotalTasks===0?"no_task":e.nbTotalTasks>1?"nb_tasks":"one_task",e.locale.language,Re(5,X8,e.nbTotalTasks)))}}function tg(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"translate"),l()),i&2){let e=c();s(),A("",Dt(2,1,e.nbActiveTasks>1?"nb_active_tasks":"one_active_task",e.locale.language,Jn(5,Z8,e.nbActiveTasks,e.nbTotalTasks))," ")}}function ig(i,n){if(i&1){let e=y();a(0,"button",5),_("click",function(){h(e);let o=c();return C(o.removeTasks())}),f(1,"fa-icon",6),l()}if(i&2){let e=c();s(),m("icon",e.icons.faTrashAlt)}}function ng(i,n){i&1&&f(0,"div",1)}function og(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"translate"),l()),i&2){let e=c().$implicit,t=c();s(),A("\xA0:\xA0",E(2,1,e.result,t.locale.language))}}function rg(i,n){if(i&1&&(a(0,"span"),d(1),b(2,"toBytes"),l()),i&2){let e=c().$implicit;s(),A("",E(2,1,e.props.size,2),"\xA0\u2022\xA0")}}function ag(i,n){if(i&1&&(f(0,"fa-icon",6),a(1,"span"),d(2),l()),i&2){let e=c().$implicit,t=c();m("icon",t.icons.faFolderClosed),s(2),A("\xA0",e.props.directories,"\xA0\u2022\xA0")}}function sg(i,n){if(i&1&&(f(0,"fa-icon",6),a(1,"span"),d(2),l()),i&2){let e=c().$implicit,t=c();m("icon",t.icons.faFile),s(2),A("\xA0",e.props.files,"\xA0\u2022\xA0")}}function lg(i,n){if(i&1){let e=y();a(0,"div",4)(1,"div",7),b(2,"translate"),_("click",function(){let o=h(e).$implicit,r=c();return C(r.goToFile(o))}),a(3,"span"),f(4,"fa-icon",8),a(5,"b"),f(6,"fa-icon",9),l(),a(7,"span"),d(8),l(),g(9,og,3,4,"span"),l(),a(10,"div",10)(11,"progressbar",11)(12,"span",12),g(13,rg,3,4,"span"),g(14,ag,3,2),g(15,sg,3,2),f(16,"fa-icon",6),a(17,"span"),d(18),b(19,"amTimeAgo"),l()()()()()()}if(i&2){let e=n.$implicit,t=c();s(),m("tooltip",E(2,18,e.result,t.locale.language)),s(2),z("text-gray-dark",e.status<2)("text-danger",e.status>=2),s(),m("icon",t.iconsStatus[e.status])("animation",e.status===0?"spin-pulse":null),s(2),m("icon",t.iconsOperation[e.type]),s(2),w(e.name),s(),x(e.status===2?9:-1),s(2),m("max",100)("value",e.status>0?100:e.props.progress||100)("type",e.status<1?"warning":e.status===2?"danger":null),s(2),x(e.props.size?13:-1),s(),x(e.props.directories?14:-1),s(),x(e.props.files?15:-1),s(),m("icon",t.icons.faClock),s(2),A("\xA0",E(19,21,e.startedAt,!0))}}var Pp=(()=>{let n=class n{constructor(){this.locale=S(H),this.icons={faTrashAlt:Di,faFlag:Nl,faClock:Z0,faFile:Bn,faFolderClosed:Wr},this.iconsStatus=[Ue,er,fl],this.iconsOperation={[ze.DELETE]:J0,[ze.MOVE]:ii,[ze.COPY]:Sn,[ze.DOWNLOAD]:yn,[ze.UPLOAD]:ml,[ze.COMPRESS]:os,[ze.DECOMPRESS]:os},this.nbActiveTasks=0,this.nbEndedTasks=0,this.nbTotalTasks=0,this.tasks=[],this.router=S(ge),this.store=S(te),this.filesService=S(He),this.filesTasksService=S(Gc),this.subscriptions=[],this.subscriptions.push(this.store.filesActiveTasks.subscribe(t=>this.updateTasks(t,!0))),this.subscriptions.push(this.store.filesEndedTasks.subscribe(t=>this.updateTasks(t,!1)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}updateTasks(t,o=!1){o?(this.tasks=[...t,...this.store.filesEndedTasks.getValue()],this.nbActiveTasks=t.length,this.nbEndedTasks=this.store.filesEndedTasks.getValue().length):(this.tasks=[...this.store.filesActiveTasks.getValue(),...t],this.nbEndedTasks=t.length,this.nbActiveTasks=this.store.filesActiveTasks.getValue().length),this.nbTotalTasks=this.nbActiveTasks+this.nbEndedTasks}removeTasks(){this.filesTasksService.removeAll()}goToFile(t){if(t.status===1){if(t.type===ze.COMPRESS&&t.props.compressInDirectory===!1){this.filesService.downloadTaskArchive(t.id);return}else if(t.type===ze.DELETE){if(t.path.startsWith($.FILES))t.path=t.path.replace($.FILES,$.TRASH);else if(t.path.startsWith($.SHARES))return}this.router.navigate([`${$.SPACES}/${t.path}`],{queryParams:{select:t.name}}).catch(console.error)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-files-tasks"]],decls:10,vars:2,consts:[[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize",""],[1,"task-list"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["placement","bottom",1,"px-2","py-1","text-truncate",3,"click","tooltip"],[3,"icon","animation"],[1,"me-1",3,"icon"],[1,"fs-xxxs"],[1,"custom-progress-bar","position-relative",3,"max","value","type"],[1,"d-flex","align-items-center","justify-content-center","position-absolute","mx-1","w-100"]],template:function(o,r){if(o&1&&(a(0,"div",0),f(1,"div",1),a(2,"div"),g(3,eg,3,7,"span")(4,tg,3,8,"span"),l(),g(5,ig,2,1,"button",2)(6,ng,1,0,"div",1),l(),a(7,"div",3),k(8,lg,20,24,"div",4,J8),l()),o&2){let p;s(3),x((p=r.nbActiveTasks)===0?3:4),s(2),x(r.nbTotalTasks?5:6),s(3),D(r.tasks)}},dependencies:[F,fe,Ke,ke,Tc,Z,Je,hr],encapsulation:2});let i=n;return i})();var cg=["notificationsHtml"],pg=(i,n)=>n.id;function dg(i,n){if(i&1&&(a(0,"span",4),d(1),l()),i&2){let e=c();s(),A("(",e.store.notifications().length,")")}}function mg(i,n){if(i&1){let e=y();a(0,"button",8),_("click",function(){h(e);let o=c();return C(o.removeAll())}),f(1,"fa-icon",9),l()}if(i&2){let e=c();s(),m("icon",e.icons.faTrashAlt)}}function ug(i,n){i&1&&f(0,"div",2)}function fg(i,n){if(i&1&&(a(0,"b",3),d(1),l()),i&2){let e=c().$implicit;s(),w(e.fromUser.fullName)}}function _g(i,n){if(i&1&&(a(0,"b"),d(1),l()),i&2){let e=c().$implicit;s(),w(e.fromUser.fullName)}}function hg(i,n){if(i&1&&f(0,"fa-icon",9),i&2){let e=c().$implicit;m("icon",e.appIcon)}}function Cg(i,n){if(i&1&&(a(0,"span"),d(1),l()),i&2){let e=c().$implicit;s(),A("\xA0",e.mainElement)}}function gg(i,n){if(i&1){let e=y();a(0,"div",10,0)(2,"div",11),f(3,"app-user-avatar",12),a(4,"div",13),g(5,fg,2,1,"b",3)(6,_g,2,1,"b"),l(),a(7,"div",14)(8,"i",15),_("click",function(){let o=h(e).$implicit,r=c();return C(r.remove(o))}),f(9,"fa-icon",9),l()()(),a(10,"div",16)(11,"div")(12,"span",3),d(13),l(),d(14,":\xA0"),a(15,"b",17),_("click",function(){let o=h(e).$implicit,r=c();return C(r.goto(o))}),d(16),l()(),a(17,"div",18)(18,"div"),d(19),b(20,"amTimeAgo"),l(),a(21,"div",19),g(22,hg,1,1,"fa-icon",9),g(23,Cg,2,1,"span"),l()()()()}if(i&2){let e=n.$implicit,t=c();z("newly-1",e.soonRead),s(3),m("user",e.fromUser)("width",24)("height",24)("unknownUserAsInfo",e.fromUser.id===-1),s(2),x(e.fromUser.id===-1?5:6),s(4),m("icon",t.icons.faTimes),s(4),w(e.content.event),s(3),w(e.content.element),s(),z("text-muted",!e.soonRead),s(2),w(q(20,15,e.createdAt)),s(3),x(e.appIcon?22:-1),s(),x(e.mainElement?23:-1)}}var Np=(()=>{let n=class n{constructor(){this.store=S(te),this.icons={faCheck:er,faTimes:Nt,faMagnifyingGlass:$o,faTrashAlt:Di,faCircleInfo:It},this.router=S(ge),this.layout=S(N),this.notificationsService=S(xc),Gt(()=>{this.store.unreadNotifications(),setTimeout(()=>this.observeUnreadNotifications(),0)})}ngAfterViewInit(){this.observer=new IntersectionObserver(t=>{t.forEach(o=>{if(o.isIntersecting){let r=o.target,p=this.notificationsHtml.toArray().findIndex(u=>u.nativeElement===r);if(p!==-1){let u=this.store.notifications()[p];u&&!u.wasRead&&(u.wasRead=!0,u.soonRead=!0,this.observer.unobserve(r),setTimeout(()=>this.wasRead(u),2e3))}}})},{threshold:.5})}removeAll(){this.notificationsService.deleteNotification().subscribe({next:()=>this.store.notifications.set([]),error:t=>this.layout.sendNotification("error","Notifications","Unable to delete",t)})}remove(t){this.notificationsService.deleteNotification(t.id).subscribe({next:()=>this.store.notifications.update(o=>o.filter(r=>t.id!==r.id)),error:o=>this.layout.sendNotification("error","Notifications","Unable to delete",o)})}goto(t){if(t.content.externalUrl)window.open(t.content.externalUrl,"_blank","noopener");else{let o=t.content.app===fc.SYNC?t.content.element.split("/").at(-1):t.content.element;this.router.navigate([$.SPACES,...t.content.url.split("/")],{queryParams:{select:o}}).catch(console.error)}}observeUnreadNotifications(){this.notificationsHtml&&this.notificationsHtml.forEach((t,o)=>{let r=this.store.notifications()[o];r&&!r.wasRead&&this.observer.observe(t.nativeElement)})}wasRead(t){this.notificationsService.wasReadNotification(t.id).subscribe({next:()=>{this.store.notifications.update(o=>{let r=[...o],p=r.find(u=>u.id===t.id);return p&&(p.soonRead=!1,p.wasRead=!0),r})},error:o=>this.layout.sendNotification("error","Notifications","Mark as read",o)})}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-notifications"]],viewQuery:function(o,r){if(o&1&&Y(cg,5),o&2){let p;G(p=W())&&(r.notificationsHtml=p)}},decls:11,vars:2,consts:[["notificationsHtml",""],[1,"sidebar-component-title","justify-content-between"],[2,"width","35px"],["l10nTranslate",""],[1,"ps-1"],[1,"btn","btn-xs","btn-secondary"],["appAutoResize","",1,"fs-xxs","p-2"],[1,"mb-1","app-small-card","rounded","no-select",3,"newly-1"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],[1,"mb-1","app-small-card","rounded","no-select"],[1,"d-flex","px-2","pt-2","pb-1"],[3,"user","width","height","unknownUserAsInfo"],[1,"align-self-center","ms-1"],[1,"ms-auto","align-self-center",2,"font-size","14px"],["role","button",3,"click"],[1,"pb-2","px-2"],[1,"cursor-pointer","btn-link",3,"click"],[1,"d-flex","fs-xxxs","pt-1"],[1,"ms-auto"]],template:function(o,r){o&1&&(a(0,"div",1),f(1,"div",2),a(2,"span")(3,"span",3),d(4,"Notifications"),l(),g(5,dg,2,1,"span",4),l(),g(6,mg,2,1,"button",5)(7,ug,1,0,"div",2),l(),a(8,"div",6),k(9,gg,24,17,"div",7,pg),l()),o&2&&(s(5),x(r.store.notifications().length?5:-1),s(),x(r.store.notifications().length?6:7),s(3),D(r.store.notifications()))},dependencies:[P,fe,F,Ze,Je],encapsulation:2});let i=n;return i})();var xg=(i,n)=>n.id;function Sg(i,n){if(i&1&&(a(0,"div",3)(1,"div",4),f(2,"img",5)(3,"span"),a(4,"div",6)(5,"span",7),d(6),l(),a(7,"span",8),d(8),l()()()()),i&2){let e=n.$implicit,t=c();s(2),m("src",e.avatarUrl,ee),s(),V(X("avatar-",t.allOnlineStatus[e==null?null:e.onlineStatus])),s(3),w(e.fullName),s(2),w(e.email)}}var Ip=(()=>{let n=class n{constructor(){this.allOnlineStatus=Fi,this.store=S(te),this.onlineUsers=ve(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==lr.OFFLINE))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-onlines"]],decls:6,vars:0,consts:[[1,"sidebar-component-title"],["l10nTranslate",""],["appAutoResize",""],[1,"app-onlines-content"],[1,"d-flex","align-items-center","align-self-center","avatar"],["alt","",1,"avatar-img",3,"src"],[1,"d-flex","flex-column","ms-2"],["draggable","false",1,"no-pointer-events","fs-xs"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"span",1),d(2,"Online users"),l()(),a(3,"div",2),k(4,Sg,9,6,"div",3,xg),l()),o&2&&(s(4),D(r.onlineUsers()))},dependencies:[fe,P],encapsulation:2});let i=n;return i})();function vg(i,n){if(i&1){let e=y();a(0,"button",22),_("click",function(){h(e);let o=c();return C(o.collapseRSideBar())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();m("routerLink",e.USER_PATH.BASE),s(),m("icon",e.icons.faUserAlt)}}function yg(i,n){if(i&1){let e=y();a(0,"button",23),_("click",function(){h(e);let o=c();return C(o.collapseRSideBar())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();s(),m("icon",e.icons.faCog)}}function bg(i,n){if(i&1){let e=y();a(0,"button",4),_("click",function(){h(e);let o=c();return C(o.logOut())}),f(1,"fa-icon",5),l()}if(i&2){let e=c();s(),m("icon",e.store.userImpersonate()?e.icons.faUserSecret:e.icons.faPowerOff)}}function wg(i,n){i&1&&(a(0,"div",13),d(1,"Guest Link"),l())}function Tg(i,n){if(i&1&&(a(0,"div"),d(1),l(),a(2,"div",24),d(3),l()),i&2){let e=c();s(),w(e.user==null?null:e.user.fullName),s(2),w(e.user==null?null:e.user.email)}}function Eg(i,n){if(i&1&&(a(0,"option",15),d(1),b(2,"translate"),b(3,"capitalize"),l()),i&2){let e=n.$implicit,t=c();m("ngValue",t.allOnlineStatus.indexOf(e)),s(),w(q(3,5,E(2,2,e,t.locale.language)))}}var Rp=(()=>{let n=class n{constructor(){this.logoDarkUrl=br,this.logoUrl=Lc,this.store=S(te),this.locale=S(H),this.USER_PATH=Ee,this.allOnlineStatus=Fi,this.appBaseUrl=`${ro.WEBSITE}`,this.icons={faUserAlt:tr,faCircleHalfStroke:Sl,faCog:Ai,faPowerOff:_l,faUserSecret:rr},this.userAvatar=null,this.layout=S(N),this.themeLight=Tn,this.authService=S(Kt),this.userService=S(oe),this.subscriptions=[],this.subscriptions.push(this.store.user.subscribe(t=>this.user=t)),this.subscriptions.push(this.store.userAvatarUrl.subscribe(t=>this.userAvatar=t)),this.appBaseUrl=this.layout.getCurrentLanguage()==="fr"?`${ro.WEBSITE}/fr/`:`${ro.WEBSITE}/`}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}collapseRSideBar(){this.layout.toggleRSideBar(!1)}setOnlineStatus(t){this.userService.changeOnlineStatus(t)}toggleTheme(){this.layout.toggleTheme()}logOut(){this.authService.logout(),this.layout.toggleRSideBar(!1)}openLink(t){switch(t){case"website":this.layout.openUrl(this.appBaseUrl);break;case"versions":this.layout.openUrl(ro.RELEASES);break;default:this.layout.openUrl(`${this.appBaseUrl}${t}`)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-user-profile"]],decls:39,vars:11,consts:[[1,"d-flex","flex-column","100vh"],[1,"sidebar-component-title"],[1,"d-flex","flex-fill","justify-content-between"],["type","button",1,"btn","btn-xs","btn-secondary",3,"routerLink"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary"],["type","button",1,"btn","btn-xs","btn-secondary"],[1,"user-header"],[1,"d-flex","flex-column","justify-content-center","me-2"],[1,"avatar-lg"],["alt","",1,"avatar-img",3,"src"],[1,"user-details"],["l10nTranslate",""],[1,"form-select","form-select-sm","mt-1",3,"ngModelChange","ngModel"],[3,"ngValue"],[1,"d-none","d-md-block","hide-on-small-height","position-absolute","w-100","fs-xs",2,"bottom","46px"],[1,"d-flex","flex-column","mx-3"],[1,"mb-1"],["alt","","height","30",3,"src"],["l10nTranslate","",1,"link-primary","cursor-pointer",3,"click"],[1,"link-primary","cursor-pointer",3,"click"],["type","button",1,"btn","btn-xs","btn-secondary",3,"click","routerLink"],["type","button","routerLink","/admin",1,"btn","btn-xs","btn-secondary",3,"click"],[1,"small"]],template:function(o,r){o&1&&(a(0,"div",0)(1,"div",1)(2,"div",2),g(3,vg,2,2,"button",3),a(4,"button",4),_("click",function(){return r.toggleTheme()}),f(5,"fa-icon",5),l(),g(6,yg,2,1,"button",6),g(7,bg,2,1,"button",7),l()(),a(8,"div",8)(9,"div",9)(10,"div",10),f(11,"img",11)(12,"span"),l()(),a(13,"div",12),g(14,wg,2,0,"div",13)(15,Tg,4,2),a(16,"select",14),_("ngModelChange",function(u){return r.setOnlineStatus(u)}),k(17,Eg,4,7,"option",15,qe),l()()(),a(19,"div",16),f(20,"hr"),a(21,"div",17)(22,"div",18),f(23,"img",19),l(),a(24,"div")(25,"a",20),_("click",function(){return r.openLink("website")}),d(26,"Website"),l(),a(27,"span"),d(28,"\xA0|\xA0"),l(),a(29,"a",20),_("click",function(){return r.openLink("docs")}),d(30,"Documentation"),l(),a(31,"span"),d(32,"\xA0|\xA0"),l(),a(33,"a",20),_("click",function(){return r.openLink("versions")}),d(34,"Versions"),l(),a(35,"span"),d(36,"\xA0|\xA0"),l(),a(37,"a",21),_("click",function(){return r.openLink("support")}),d(38," \u{1F49B}"),l()()()()()),o&2&&(s(3),x(r.user!=null&&r.user.isLink?-1:3),s(2),m("icon",r.icons.faCircleHalfStroke),s(),x(r.user!=null&&r.user.isAdmin?6:-1),s(),x(!r.store.isElectronApp()||r.store.isElectronApp()&&r.store.userImpersonate()?7:-1),s(4),m("src",r.userAvatar,ee),s(),V(X("avatar-",r.allOnlineStatus[r.user==null?null:r.user.onlineStatus])),s(2),x(r.user!=null&&r.user.isLink?14:15),s(2),m("ngModel",r.user==null?null:r.user.onlineStatus),s(),D(r.allOnlineStatus),s(6),m("src",r.layout.switchTheme.getValue()===r.themeLight?r.logoUrl:r.logoDarkUrl,ee))},dependencies:[be,wi,Ti,bi,xe,ye,mn,F,P,Fn,Z],styles:["@media (max-height: 300px){.hide-on-small-height[_ngcontent-%COMP%]{display:none!important}}"]});let i=n;return i})();var Mg=(i,n)=>n.id;function Ag(i,n){if(i&1){let e=y();a(0,"button",5),_("click",function(){h(e);let o=c();return C(o.onCloseAll())}),f(1,"fa-icon",6),l()}if(i&2){let e=c();s(),m("icon",e.icons.faXmark)}}function kg(i,n){if(i&1){let e=y();a(0,"div",7),_("click",function(){let o=h(e).$implicit,r=c();return C(r.onMaximize(o))}),a(1,"div",8),f(2,"img",9),a(3,"div",10),d(4),l(),a(5,"button",11),_("click",function(o){let r=h(e).$implicit,p=c();return C(p.onClose(o,r))}),f(6,"fa-icon",6),l()()()}if(i&2){let e=n.$implicit,t=c();s(2),m("ngSrc",e.element.mimeUrl),s(2),w(e.element.name),s(2),m("icon",t.icons.faTimes)}}var Vp=(()=>{let n=class n{constructor(){this.icons={faXmark:Ll,faTimes:Nt},this.windows=[],this.layout=S(N),this.subscription=null,this.subscription=this.layout.windows.subscribe(t=>this.setWindows(t))}ngOnDestroy(){this.subscription.unsubscribe()}onMaximize(t){this.layout.restoreDialog(t.id)}onClose(t,o){t.preventDefault(),t.stopPropagation();let r=this.layout.modalRefs.get(o.id);r&&r.content.onClose(),this.layout.windows.getValue().length||this.layout.toggleRSideBar(!1)}onCloseAll(){for(let t of this.layout.windows.getValue()){let o=this.layout.modalRefs.get(t.id);o&&o.content.onClose()}this.layout.windows.getValue().length||this.layout.toggleRSideBar(!1)}setWindows(t){t.length||this.layout.hideRSideBarTab(_e.WINDOWS),this.windows=t}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-windows"]],decls:7,vars:1,consts:[[1,"sidebar-component-title"],[1,"btn","btn-sm","btn-secondary"],["l10nTranslate",""],["appAutoResize","",1,"sidebar-item"],[1,"sidebar-item-container"],[1,"btn","btn-sm","btn-secondary",3,"click"],[3,"icon"],[1,"sidebar-item-container",3,"click"],[1,"sidebar-item-content"],["alt","","width","28","height","28",3,"ngSrc"],[1,"text-truncate","fs-xxs","ms-2"],[1,"btn","btn-xs","btn-danger","ms-auto",3,"click"]],template:function(o,r){o&1&&(a(0,"div",0),g(1,Ag,2,1,"button",1),a(2,"span",2),d(3,"Windows Manager"),l()(),a(4,"div",3),k(5,kg,7,3,"div",4,Mg),l()),o&2&&(s(),x(r.windows.length?1:-1),s(4),D(r.windows))},dependencies:[fe,F,P,Bs],encapsulation:2});let i=n;return i})();var zp=(i,n)=>n.label,Dg=(i,n)=>n.name;function Fg(i,n){if(i&1&&(a(0,"div",5)(1,"div",6),d(2),l()()),i&2){let e=c().$implicit;s(2),w(e.title)}}function Lg(i,n){i&1&&Ne(0)}function Pg(i,n){if(i&1&&(a(0,"div",7),L(1,Lg,1,0,"ng-container",8),l()),i&2){let e=c().$implicit;s(),m("ngComponentOutlet",e)}}function Ng(i,n){if(i&1&&g(0,Pg,2,1,"div",7),i&2){let e=c(2).$implicit;x(e.active||e.loadComponent?0:-1)}}function Ig(i,n){if(i&1&&k(0,Ng,1,1,null,null,Dg),i&2){let e=c().$implicit;D(e.components)}}function Rg(i,n){if(i&1&&(a(0,"div"),g(1,Fg,3,1,"div",5),g(2,Ig,2,0),l()),i&2){let e=n.$implicit,t=c();V(e.active?"d-block":"d-none"),s(),x(e.title?1:-1),s(),x(t.showComponents||e.loadComponent?2:-1)}}function Vg(i,n){if(i&1&&(a(0,"a",4),f(1,"fa-icon",9),l()),i&2){let e=c();s(),m("icon",e.icons.faWifi)}}function zg(i,n){if(i&1&&(a(0,"span",13)(1,"span"),d(2),l()()),i&2){let e=c(2).$implicit;s(),V(X("badge bg-",e.count.level," rounded-pill")),s(),w(n)}}function Og(i,n){if(i&1){let e=y();a(0,"a",11),_("click",function(){h(e);let o=c().$implicit,r=c();return C(r.setTabVisible(o.label))}),f(1,"fa-icon",12),g(2,zg,3,4,"span",13),b(3,"async"),l()}if(i&2){let e,t=c().$implicit,o=c();z("mt-auto",t.firstOfLasts)("active",o.visible&&t.active),s(),m("icon",t.icon),s(),x((e=q(3,6,t.count&&t.count.value))?2:-1,e)}}function Bg(i,n){if(i&1&&(g(0,Og,4,8,"a",10),b(1,"async")),i&2){let e=n.$implicit;x(e.icon&&(!e.showOnCount||e.showOnCount&&e.count&&q(1,1,e.count.value))?0:-1)}}var Op=(()=>{let n=class n{constructor(){this.visible=!1,this.showComponents=!1,this.tabs=[],this.theme=Tn,this.networkIsOnline=!0,this.icons={faWifi:zl},this.layout=S(N),this.store=S(te),this.subscriptions=[],this.showDelay=null,this.currentMenu=null,this.firstsTabs=[{label:_e.PROFILE,components:[Rp],icon:null,title:null,active:!1},{label:_e.ONLINES,components:[Ip],icon:e1,title:null,count:{value:ui(ve(()=>this.store.onlineUsers().filter(t=>t.onlineStatus!==lr.OFFLINE).length)),level:"success"},showOnCount:!0,active:!1},{label:_e.NOTIFICATIONS,components:[Np],icon:X0,title:null,count:{value:ui(ve(()=>this.store.unreadNotifications().length)),level:"warning"},active:!1},{label:_e.TASKS,components:[Pp],icon:i1,title:null,count:{value:gs([this.store.filesActiveTasks.pipe(bt(t=>t.length)),this.store.clientSyncTasksCount]).pipe(bt(([t,o])=>t+o)),level:"maroon"},active:!1}],this.lastsTabs=[{label:_e.WINDOWS,components:[Vp],icon:n1,title:null,count:{value:this.layout.windows.pipe(bt(t=>t.length)),level:"maroon"},showOnCount:!0,firstOfLasts:!0,active:!1}],this.tabs=[...this.firstsTabs,...this.lastsTabs],this.subscriptions.push(this.layout.rightSideBarIsOpen.subscribe(t=>this.setVisible(t))),this.subscriptions.push(this.layout.rightSideBarSetTabs.subscribe(t=>this.setTabs(t))),this.subscriptions.push(this.layout.rightSideBarOpenAndShowTab.subscribe(t=>this.setTabVisible(t))),this.subscriptions.push(this.layout.rightSideBarSelectTab.subscribe(t=>this.selectTab(t))),this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.theme=t)),this.subscriptions.push(this.layout.networkIsOnline.subscribe(t=>this.networkIsOnline=t))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}setTabVisible(t){this.visible?t&&t!==this.layout.currentRightSideBarTab?this.selectTab(t):this.layout.toggleRSideBar(!1):(this.selectTab(t),this.layout.toggleRSideBar(!0))}setVisible(t){t?(clearTimeout(this.showDelay),this.showComponents=t):this.showDelay=setTimeout(()=>this.showComponents=t,500),this.visible=t}setTabs(t){t.name!==this.currentMenu&&(this.tabs=[...this.firstsTabs,...t.tabs?t.tabs:[],...this.lastsTabs],this.currentMenu=t.name,t.name===null&&!this.tabs.find(o=>o.active)&&this.layout.toggleRSideBar(!1))}selectTab(t){if(t){let o=!1;for(let r of this.tabs)r.active=r.label==t,r.active&&(o=!0,this.layout.currentRightSideBarTab=t);o||(this.tabs[0].active=!0)}}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-sidebar-right"]],decls:9,vars:6,consts:[[3,"class"],[1,"control-sidebar-menu"],[1,"sidebar-apps-icons"],[1,"menu"],[1,"bg-warning"],[1,"sidebar-title"],["l10nTranslate",""],[1,"sidebar-component-content"],[4,"ngComponentOutlet"],[1,"text-white",3,"icon"],[3,"mt-auto","active"],[3,"click"],[3,"icon"],[1,"menu-badge"]],template:function(o,r){o&1&&(a(0,"aside"),k(1,Rg,3,4,"div",0,zp),l(),a(3,"div",1)(4,"div",2)(5,"div",3),g(6,Vg,2,1,"a",4),k(7,Bg,2,3,null,null,zp),l()()()),o&2&&(V(X("control-sidebar control-sidebar-",r.theme)),z("control-sidebar-open",r.visible),s(),D(r.tabs),s(5),x(r.networkIsOnline?-1:6),s(),D(r.tabs))},dependencies:[F,P,Io,pn],encapsulation:2});let i=n;return i})();var Bp=(()=>{let n=class n{constructor(){this.themeMode=Tn,this.document=S(Do),this.layout=S(N),this.renderer=S(pt),this.rightSideBarClass="control-sidebar-open",this.leftSideBarCollapsedClass="sidebar-collapse",this.leftSideBarOpenedClass="sidebar-open",this.isSmallerThanMediumScreen=!1,this.subscriptions=[],this.subscriptions.push(this.layout.switchTheme.subscribe(t=>this.setTheme(t))),this.subscriptions.push(this.layout.toggleRightSideBar.subscribe(t=>this.toggleRightSideBar(t))),this.subscriptions.push(this.layout.toggleLeftSideBar.subscribe(t=>this.toggleLeftSideBar(t)))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}onResize(){this.layout.resizeEvent.next(),this.isSmallerThanMediumScreen!==this.layout.isSmallerMediumScreen()&&(this.isSmallerThanMediumScreen=!this.isSmallerThanMediumScreen,this.checkLeftSideBarCollapse())}onDragOver(t){t.preventDefault()}onDrop(t){t.preventDefault()}toggleLeftSideBar(t){t===1?(this.openLeftSideBar(),this.layout.leftSideBarIsOpen.next(!0)):t===2?(this.collapseLeftSideBar(),this.layout.leftSideBarIsOpen.next(!1)):this.document.body.classList.contains(this.leftSideBarOpenedClass)?(this.collapseLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!1),this.layout.leftSideBarIsOpen.next(!1)):(this.openLeftSideBar(),this.layout.saveLeftSideBarIsOpen.next(!0),this.layout.leftSideBarIsOpen.next(!0))}toggleRightSideBar(t){t?this.renderer.addClass(this.document.body,this.rightSideBarClass):this.renderer.removeClass(this.document.body,this.rightSideBarClass)}openLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarCollapsedClass),this.renderer.addClass(this.document.body,this.leftSideBarOpenedClass)}collapseLeftSideBar(){this.renderer.removeClass(this.document.body,this.leftSideBarOpenedClass),this.renderer.addClass(this.document.body,this.leftSideBarCollapsedClass)}checkLeftSideBarCollapse(){this.isSmallerThanMediumScreen?this.toggleLeftSideBar(2):this.toggleLeftSideBar(this.layout.saveLeftSideBarIsOpen.getValue()?1:2)}setTheme(t){this.renderer.removeClass(this.document.body,this.themeMode),this.themeMode=t,this.renderer.addClass(this.document.body,this.themeMode)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=M({type:n,selectors:[["app-layout"]],hostBindings:function(o,r){o&1&&_("resize",function(){return r.onResize()},Fo)("dragover",function(u){return r.onDragOver(u)})("drop",function(u){return r.onDrop(u)})},decls:8,vars:0,consts:[[1,"app-main"],[1,"wrapper"],[1,"content-wrapper"],[1,"content-container"]],template:function(o,r){o&1&&(a(0,"body",0)(1,"div",1),f(2,"app-navbar")(3,"app-sidebar-left"),a(4,"div",2)(5,"div",3),f(6,"router-outlet"),l()(),f(7,"app-sidebar-right"),l()())},dependencies:[dn,Fp,Lp,Op],encapsulation:2});let i=n;return i})();var Up=[{path:cr.BASE,component:Bp,canActivate:[ds],canActivateChild:[ds],children:[...l1,...d1,...sp,...Ep,...up,...K0]},...kp,...Y0,{path:"**",redirectTo:fi.BASE}];var Hp=(()=>{let n=class n{constructor(){this.injector=S(Qn),this.auth=null,this.isRefreshingToken=!1,this.waitForRefreshToken=new Cs(!1),this.retryCount=3,this.retryWaitMilliSeconds=2e3}intercept(t,o){let r=pc(t.url);return r&&(t=t.clone({url:r})),o.handle(t).pipe(Mo(p=>p.status===401?this.handleAuthorizationError(t,o,p):p.status===0?this.handleRetries(t,o,p):Eo(()=>p)))}handleAuthorizationError(t,o,r){return this.auth||(this.auth=this.injector.get(Kt)),console.debug("AuthInterceptor:",t.url,r.status),[tl,Js,el].indexOf(t.url)===-1?this.isRefreshingToken?(console.debug("AuthInterceptor: wait for refresh token"),this.waitForRefreshToken.pipe(At(p=>!p),ce(1),Kn(()=>o.handle(this.auth.checkCSRF(t))))):(console.debug("AuthInterceptor: refreshing token"),this.isRefreshingToken=!0,this.waitForRefreshToken.next(!0),this.auth.refreshToken().pipe(Kn(()=>(this.waitForRefreshToken.next(!1),o.handle(this.auth.checkCSRF(t)))),Ao(()=>this.isRefreshingToken=!1))):Eo(()=>r)}handleRetries(t,o,r){return o.handle(t).pipe(vs(p=>p.pipe(xs((u,v)=>v<this.retryCount&&u.status==0?xi(u):Eo(()=>u)),Ss(this.retryWaitMilliSeconds))))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=kt({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function $p(){return Object.assign(new zo,{adaptivePosition:!1,triggers:"hover",delay:500})}var Gp={url:"",options:{autoConnect:!1,reconnection:!0,forceNew:!1,transports:["websocket"]}};var Wp={providers:[Ns({eventCoalescing:!0}),{provide:Rs,useClass:Vs},{provide:Ws,useClass:Hp,multi:!0},Xs(Up),qs(js(),Ks({cookieName:ya,headerName:ya})),rl(ql,re({storage:jl,translationLoader:Kl},Is()?{missingTranslationHandler:Ql}:{})),al(),q0(),cl({positionClass:"toast-bottom-right",preventDuplicates:!1,maxOpened:6,autoDismiss:!0,timeOut:6e3}),{provide:zo,useFactory:$p},sl,bs(ll.forRoot(Gp))]};Hs(Qc,Wp).catch(console.error);
|