@sync-in/server 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +173 -58
- package/environment/environment.dist.yaml +6 -3
- package/migrations/0003_giant_luckman.sql +6 -0
- package/migrations/meta/0003_snapshot.json +2463 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +19 -17
- package/server/app.bootstrap.js +5 -2
- package/server/app.bootstrap.js.map +1 -1
- package/server/app.constants.js +0 -4
- package/server/app.constants.js.map +1 -1
- package/server/app.service.js +7 -6
- package/server/app.service.js.map +1 -1
- package/server/applications/files/constants/only-office.js +12 -0
- package/server/applications/files/constants/only-office.js.map +1 -1
- package/server/applications/files/files.config.js +5 -0
- package/server/applications/files/files.config.js.map +1 -1
- package/server/applications/files/files.controller.js +12 -4
- package/server/applications/files/files.controller.js.map +1 -1
- package/server/applications/files/files.controller.spec.js +18 -4
- package/server/applications/files/files.controller.spec.js.map +1 -1
- package/server/applications/files/services/files-content-manager.service.js +6 -6
- package/server/applications/files/services/files-content-manager.service.js.map +1 -1
- package/server/applications/files/services/files-manager.service.js +4 -4
- package/server/applications/files/services/files-manager.service.js.map +1 -1
- package/server/applications/files/services/files-methods.service.js +4 -7
- package/server/applications/files/services/files-methods.service.js.map +1 -1
- package/server/applications/files/services/files-only-office-manager.service.js +2 -2
- package/server/applications/files/services/files-only-office-manager.service.js.map +1 -1
- package/server/applications/files/services/files-parser.service.js +6 -3
- package/server/applications/files/services/files-parser.service.js.map +1 -1
- package/server/applications/files/services/files-scheduler.service.js +51 -3
- package/server/applications/files/services/files-scheduler.service.js.map +1 -1
- package/server/applications/files/services/files-search-manager.service.js +4 -0
- package/server/applications/files/services/files-search-manager.service.js.map +1 -1
- package/server/applications/files/utils/doc-textify/adapters/pdf.js +6 -8
- package/server/applications/files/utils/doc-textify/adapters/pdf.js.map +1 -1
- package/server/applications/notifications/i18n/de.js +56 -0
- package/server/applications/notifications/i18n/de.js.map +1 -0
- package/server/applications/notifications/i18n/es.js +52 -0
- package/server/applications/notifications/i18n/es.js.map +1 -0
- package/server/applications/notifications/i18n/hi.js +52 -0
- package/server/applications/notifications/i18n/hi.js.map +1 -0
- package/server/applications/notifications/i18n/index.js +73 -8
- package/server/applications/notifications/i18n/index.js.map +1 -1
- package/server/applications/notifications/i18n/it.js +52 -0
- package/server/applications/notifications/i18n/it.js.map +1 -0
- package/server/applications/notifications/i18n/ja.js +52 -0
- package/server/applications/notifications/i18n/ja.js.map +1 -0
- package/server/applications/notifications/i18n/ko.js +52 -0
- package/server/applications/notifications/i18n/ko.js.map +1 -0
- package/server/applications/notifications/i18n/pl.js +52 -0
- package/server/applications/notifications/i18n/pl.js.map +1 -0
- package/server/applications/notifications/i18n/pt.js +52 -0
- package/server/applications/notifications/i18n/pt.js.map +1 -0
- package/server/applications/notifications/i18n/pt_br.js +52 -0
- package/server/applications/notifications/i18n/pt_br.js.map +1 -0
- package/server/applications/notifications/i18n/ru.js +52 -0
- package/server/applications/notifications/i18n/ru.js.map +1 -0
- package/server/applications/notifications/i18n/tr.js +52 -0
- package/server/applications/notifications/i18n/tr.js.map +1 -0
- package/server/applications/notifications/i18n/zh.js +52 -0
- package/server/applications/notifications/i18n/zh.js.map +1 -0
- package/server/applications/notifications/mails/models.js +6 -7
- package/server/applications/notifications/mails/models.js.map +1 -1
- package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
- package/server/applications/shares/dto/create-or-update-share.dto.js +11 -0
- package/server/applications/shares/dto/create-or-update-share.dto.js.map +1 -1
- package/server/applications/shares/interfaces/share-props.interface.js.map +1 -1
- package/server/applications/shares/schemas/share.interface.js.map +1 -1
- package/server/applications/shares/schemas/shares.schema.js +9 -0
- package/server/applications/shares/schemas/shares.schema.js.map +1 -1
- package/server/applications/shares/services/shares-manager.service.js +46 -17
- package/server/applications/shares/services/shares-manager.service.js.map +1 -1
- package/server/applications/shares/services/shares-queries.service.js +24 -5
- package/server/applications/shares/services/shares-queries.service.js.map +1 -1
- package/server/applications/spaces/constants/cache.js +4 -0
- package/server/applications/spaces/constants/cache.js.map +1 -1
- package/server/applications/spaces/dto/create-or-update-space.dto.js +5 -0
- package/server/applications/spaces/dto/create-or-update-space.dto.js.map +1 -1
- package/server/applications/spaces/guards/space.guard.js +3 -3
- package/server/applications/spaces/guards/space.guard.js.map +1 -1
- package/server/applications/spaces/models/space-props.model.js.map +1 -1
- package/server/applications/spaces/models/space.model.js.map +1 -1
- package/server/applications/spaces/schemas/space.interface.js.map +1 -1
- package/server/applications/spaces/schemas/spaces.schema.js +1 -0
- package/server/applications/spaces/schemas/spaces.schema.js.map +1 -1
- package/server/applications/spaces/services/spaces-browser.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-manager.service.js +34 -31
- package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-queries.service.js +23 -7
- package/server/applications/spaces/services/spaces-queries.service.js.map +1 -1
- package/server/applications/spaces/services/spaces-scheduler.service.js +21 -20
- package/server/applications/spaces/services/spaces-scheduler.service.js.map +1 -1
- package/server/applications/spaces/spaces.controller.js +4 -2
- package/server/applications/spaces/spaces.controller.js.map +1 -1
- package/server/applications/spaces/utils/paths.js +14 -16
- package/server/applications/spaces/utils/paths.js.map +1 -1
- package/server/applications/sync/services/sync-manager.service.js +4 -3
- 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/sync/sync.controller.js +2 -1
- package/server/applications/sync/sync.controller.js.map +1 -1
- package/server/applications/users/constants/routes.js +5 -0
- package/server/applications/users/constants/routes.js.map +1 -1
- package/server/applications/users/constants/user.js +0 -16
- package/server/applications/users/constants/user.js.map +1 -1
- package/server/applications/users/dto/user-properties.dto.js +10 -0
- package/server/applications/users/dto/user-properties.dto.js.map +1 -1
- package/server/applications/users/models/user.model.js.map +1 -1
- package/server/applications/users/schemas/user.interface.js.map +1 -1
- package/server/applications/users/schemas/users.schema.js +3 -2
- package/server/applications/users/schemas/users.schema.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.js +1 -0
- package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
- package/server/applications/users/services/admin-users-manager.service.spec.js +2 -1
- package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/users-manager.service.js +7 -2
- package/server/applications/users/services/users-manager.service.js.map +1 -1
- package/server/applications/users/services/users-manager.service.spec.js +1 -0
- package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
- package/server/applications/users/services/users-queries.service.js +18 -4
- package/server/applications/users/services/users-queries.service.js.map +1 -1
- package/server/applications/users/users.controller.js +15 -0
- package/server/applications/users/users.controller.js.map +1 -1
- package/server/applications/users/users.gateway.js +6 -0
- package/server/applications/users/users.gateway.js.map +1 -1
- package/server/applications/users/utils/test.js +2 -2
- package/server/applications/users/utils/test.js.map +1 -1
- package/server/applications/webdav/constants/routes.js +2 -2
- package/server/applications/webdav/constants/routes.js.map +1 -1
- package/server/applications/webdav/constants/webdav.js +2 -2
- package/server/applications/webdav/constants/webdav.js.map +1 -1
- package/server/applications/webdav/filters/webdav.filter.js +2 -2
- package/server/applications/webdav/filters/webdav.filter.js.map +1 -1
- package/server/applications/webdav/filters/webdav.filter.spec.js +2 -2
- package/server/applications/webdav/filters/webdav.filter.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/utils/webdav.js +1 -2
- package/server/applications/webdav/utils/webdav.js.map +1 -1
- package/server/authentication/auth.config.js +2 -2
- package/server/authentication/auth.config.js.map +1 -1
- package/server/authentication/guards/auth-basic.strategy.js +2 -2
- package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
- package/server/common/i18n.js +52 -0
- package/server/common/i18n.js.map +1 -0
- package/server/common/image.js +63 -43
- package/server/common/image.js.map +1 -1
- package/server/common/interfaces.js.map +1 -1
- package/server/common/shared.js +5 -2
- package/server/common/shared.js.map +1 -1
- package/server/configuration/config.validation.js +3 -3
- package/server/configuration/config.validation.js.map +1 -1
- package/server/infrastructure/cache/adapters/mysql-cache.adapter.js +8 -6
- package/server/infrastructure/cache/adapters/mysql-cache.adapter.js.map +1 -1
- package/server/infrastructure/cache/adapters/redis-cache.adapter.js +22 -17
- package/server/infrastructure/cache/adapters/redis-cache.adapter.js.map +1 -1
- package/server/infrastructure/cache/cache.e2e-spec.js +1 -0
- package/server/infrastructure/cache/cache.e2e-spec.js.map +1 -1
- package/server/infrastructure/cache/cache.module.js +1 -14
- package/server/infrastructure/cache/cache.module.js.map +1 -1
- package/server/infrastructure/cache/services/cache.service.js.map +1 -1
- package/server/infrastructure/database/database.module.js +20 -1
- package/server/infrastructure/database/database.module.js.map +1 -1
- package/server/infrastructure/database/utils.js +48 -0
- package/server/infrastructure/database/utils.js.map +1 -1
- package/server/infrastructure/scheduler/scheduler.module.js +1 -1
- package/server/infrastructure/scheduler/scheduler.module.js.map +1 -1
- package/server/infrastructure/websocket/adapters/cluster.adapter.js +1 -3
- package/server/infrastructure/websocket/adapters/cluster.adapter.js.map +1 -1
- package/static/3rdpartylicenses.txt +137 -163
- package/static/chunk-2KLC4T2Z.js +1 -0
- package/static/chunk-2VMSXRCB.js +12 -0
- package/static/chunk-3GMLWAFZ.js +1 -0
- package/static/chunk-3OHSRRKH.js +4 -0
- package/static/chunk-3R4WKOHQ.js +1 -0
- package/static/{chunk-7ITZXYYJ.js → chunk-3R74L4UU.js} +1 -1
- package/static/chunk-3XVM35O2.js +1 -0
- package/static/chunk-3YVRP3VM.js +2 -0
- package/static/chunk-5NMSIIQB.js +1 -0
- package/static/chunk-5UKZLU5H.js +1 -0
- package/static/chunk-AF24EYXU.js +1 -0
- package/static/chunk-AKQVEHO6.js +2 -0
- package/static/chunk-BCVX464U.js +2 -0
- package/static/chunk-BQV4FRM6.js +1 -0
- package/static/{chunk-EVIE5F2U.js → chunk-CETH7UYS.js} +1 -1
- package/static/chunk-CHJ64RJM.js +1 -0
- package/static/chunk-DIT6W7VM.js +562 -0
- package/static/chunk-DKSEQTMX.js +1 -0
- package/static/chunk-DM4NXKEP.js +1 -0
- package/static/chunk-DPUVSXRB.js +1 -0
- package/static/chunk-DSWEWLXJ.js +1 -0
- package/static/chunk-FJE6BOFL.js +1 -0
- package/static/chunk-FZ3JPGYZ.js +1 -0
- package/static/chunk-IQSKQXC3.js +1 -0
- package/static/chunk-ITUFI2BJ.js +1 -0
- package/static/chunk-JPT5WEAT.js +1 -0
- package/static/chunk-LCTZJ537.js +1 -0
- package/static/chunk-LK2UCQJ6.js +1 -0
- package/static/chunk-LNTUR3GU.js +1 -0
- package/static/chunk-LP5TBXEN.js +7 -0
- package/static/{chunk-IPAC4VAF.js → chunk-LVSNIS5P.js} +1 -1
- package/static/{chunk-SIPE37PA.js → chunk-MTVSJTIW.js} +1 -1
- package/static/chunk-N3U6637P.js +1 -0
- package/static/chunk-NNV4OXSB.js +1 -0
- package/static/chunk-O6FYXVHI.js +1 -0
- package/static/chunk-OOGP4WSH.js +2 -0
- package/static/chunk-PB4AIT7O.js +1 -0
- package/static/chunk-PCWDQPOM.js +2 -0
- package/static/chunk-PNR6M34W.js +1 -0
- package/static/chunk-PVDHBQRM.js +1 -0
- package/static/chunk-Q5KM7LTX.js +1 -0
- package/static/chunk-QHC6ZPQ4.js +1 -0
- package/static/chunk-QMRBZHE4.js +1 -0
- package/static/chunk-QO6BTONN.js +1 -0
- package/static/chunk-QSJRY3TF.js +1 -0
- package/static/chunk-QUUIRSYT.js +1 -0
- package/static/chunk-RFH46UW3.js +1 -0
- package/static/{chunk-PTGDOWV3.js → chunk-RSXHRKM5.js} +1 -1
- package/static/chunk-RV3VZJPZ.js +1 -0
- package/static/{chunk-QNJFQVYI.js → chunk-S7HNXVRB.js} +1 -1
- package/static/chunk-SBZ572Q4.js +2 -0
- package/static/chunk-SJR5R3Y4.js +1 -0
- package/static/chunk-SLHTEGRU.js +1 -0
- package/static/{chunk-SH5EVL4E.js → chunk-SSFF27P2.js} +1 -1
- package/static/chunk-UNCPXHHT.js +1 -0
- package/static/chunk-URHTCJ7G.js +1 -0
- package/static/chunk-V3LHHZYN.js +1 -0
- package/static/{chunk-DJYJ66UF.js → chunk-VJTXJ43D.js} +1 -1
- package/static/chunk-VQQKMY2C.js +1 -0
- package/static/{chunk-IQOALFYU.js → chunk-WSSU2HXE.js} +1 -1
- package/static/chunk-XDZGW64M.js +3 -0
- package/static/chunk-XTRDKGKG.js +1 -0
- package/static/chunk-YLWTEC3X.js +1 -0
- package/static/chunk-Z5J5F5SX.js +1 -0
- package/static/chunk-ZIJQRARU.js +1 -0
- package/static/index.html +2 -2
- package/static/main-4H5BJY3J.js +9 -0
- package/static/scripts-WRDOQIU5.js +24 -0
- package/static/{styles-A5VYX3CE.css → styles-2C2UNCNB.css} +1 -1
- package/server/applications/spaces/interfaces/space-quota.interface.js +0 -10
- package/server/applications/spaces/interfaces/space-quota.interface.js.map +0 -1
- package/static/chunk-22EANI6R.js +0 -1
- package/static/chunk-3GFGJYMK.js +0 -1
- package/static/chunk-4YGJGZZZ.js +0 -1
- package/static/chunk-5K7HEX3C.js +0 -27
- package/static/chunk-5KLMS6A4.js +0 -1
- package/static/chunk-ATP3BFHV.js +0 -562
- package/static/chunk-BB4G55KE.js +0 -1
- package/static/chunk-EWKSX76T.js +0 -1
- package/static/chunk-FHLACA7V.js +0 -1
- package/static/chunk-GCATNU55.js +0 -1
- package/static/chunk-GYODPCIE.js +0 -1
- package/static/chunk-HZTFYLM5.js +0 -1
- package/static/chunk-JSUKJT6Z.js +0 -1
- package/static/chunk-JXZCNFW7.js +0 -1
- package/static/chunk-LTGFCQR7.js +0 -1
- package/static/chunk-LV3PYKWO.js +0 -1
- package/static/chunk-N2WFNW6M.js +0 -7
- package/static/chunk-ORMRCEGT.js +0 -1
- package/static/chunk-OUTBJSMW.js +0 -1
- package/static/chunk-RS2PX32L.js +0 -1
- package/static/chunk-RSSWH3S2.js +0 -1
- package/static/chunk-RTRJ3KFH.js +0 -1
- package/static/chunk-TKTCBDOG.js +0 -1
- package/static/chunk-V6K2N46L.js +0 -1
- package/static/chunk-XLCCZSQL.js +0 -4
- package/static/chunk-YPEH66GG.js +0 -1
- package/static/chunk-YPOIUQ57.js +0 -1
- package/static/chunk-ZKCFO2OA.js +0 -4
- package/static/main-MZ7HWZXO.js +0 -9
- package/static/scripts-VZVAP2P4.js +0 -30
package/static/chunk-BB4G55KE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as N}from"./chunk-FHLACA7V.js";import"./chunk-4YGJGZZZ.js";import"./chunk-IPAC4VAF.js";import"./chunk-3GFGJYMK.js";import"./chunk-EWKSX76T.js";import"./chunk-XLCCZSQL.js";import{k as F,l as I}from"./chunk-22EANI6R.js";import{b as _,e as P}from"./chunk-ORMRCEGT.js";import{Ad as T,Cb as p,Ga as h,Gd as E,Hd as U,Ma as i,Pb as g,Tb as v,Ub as k,Vb as y,Xa as f,_c as S,bd as L,ce as D,dc as b,fc as w,fd as C,ha as l,ie as R,kd as A,pb as n,qb as t,rb as o,sb as a,yd as M}from"./chunk-ATP3BFHV.js";import"./chunk-RTRJ3KFH.js";var Q=(()=>{let r=class r{constructor(){this.locale=l(T),this.logoUrl=F,this.linkProtected=I,this.icons={faKey:D,faSignInAlt:R},this.password="",this.activatedRoute=l(_),this.linksService=l(N),this.activatedRoute.params.subscribe(c=>this.uuid=c.uuid)}validPassword(){this.password&&this.linksService.linkAuthentication(this.uuid,this.password).subscribe(()=>this.password="")}};r.\u0275fac=function(s){return new(s||r)},r.\u0275cmp=f({type:r,selectors:[["app-public-link-auth"]],decls:18,vars:10,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],["alt","","height","96",1,"cursor-pointer",3,"click","src"],[1,"d-flex","mt-2","ms-auto","me-auto",2,"width","250px"],[1,"input-group"],[1,"input-group-text","bg-gray-light"],[3,"icon"],["autocomplete","off","type","password",1,"form-control","border-0",3,"ngModelChange","keyup.enter","ngModel","placeholder"],["type","button",1,"btn","btn-default","btn-custom","border-0",3,"click","disabled"],[1,"error-text","no-select"],[1,"hr"],["l10nTranslate","",1,"solve"]],template:function(s,e){s&1&&(t(0,"div",0)(1,"div",1)(2,"a",2),a(3,"img",3),o()(),t(4,"img",4),p("click",function(){return e.validPassword()}),o(),t(5,"div",5)(6,"div",6)(7,"span",7),a(8,"fa-icon",8),o(),t(9,"input",9),b(10,"translate"),y("ngModelChange",function(m){return k(e.password,m)||(e.password=m),m}),p("keyup.enter",function(){return e.validPassword()}),o(),t(11,"button",10),p("click",function(){return e.validPassword()}),a(12,"fa-icon",8),o()()(),t(13,"div",11),a(14,"span",12),t(15,"div")(16,"span",13),g(17,"This share is protected by a password"),o()()()()),s&2&&(i(3),n("src",e.logoUrl,h),i(),n("src",e.linkProtected,h),i(4),n("icon",e.icons.faKey),i(),v("ngModel",e.password),n("placeholder",w(10,7,"Password",e.locale.language)),i(2),n("disabled",!(e.password!=null&&e.password.length)),i(),n("icon",e.icons.faSignInAlt))},dependencies:[P,M,L,C,A,S,U,E],encapsulation:2});let d=r;return d})();export{Q as PublicLinkAuthComponent};
|
package/static/chunk-EWKSX76T.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as Vt,B as si,Ha as _i,Ia as yi,Jb as Ai,Kb as lt,Na as Ei,R as ui,T as li,Ta as bi,Tb as L,U as ie,Ua as Si,X as ut,Z as pi,_ as fi,aa as di,ba as se,ca as W,da as mi,ea as gi,fa as z,ib as wi,lb as Z,mb as vi,nb as Ht,zb as tt}from"./chunk-XLCCZSQL.js";import{$c as Pt,Ad as Ut,Cb as v,Eb as D,G as Oe,Gd as ii,Hb as Le,Hd as Mt,Ib as Ue,Jb as Ot,Kb as xt,L as xe,Lb as te,Ma as m,Mb as Me,Mc as Ye,Nb as H,Of as ci,Pb as T,Pc as Ft,Qa as Pe,Ra as Q,Rb as Ve,Tb as He,Ub as We,Vb as $e,W as Ne,Xa as Ct,Ya as kt,Za as J,Zb as Nt,_c as It,ba as at,bb as Be,bd as Bt,c as Re,ca as vt,ce as ri,da as At,dc as qe,dd as ht,de as ni,eg as hi,fa as Fe,fc as Ge,fd as Dt,gd as Ke,ha as p,hb as De,ib as Rt,jb as R,kb as O,kd as je,ld as Qe,ma as M,na as V,od as Je,pb as k,pd as Xe,qb as f,qc as ee,qf as oi,rb as g,sb as X,ud as ze,v as b,va as Ie,vd as Ze,wf as ai,xd as ti,ya as Tt,yd as ei,zb as ct,zd as Lt}from"./chunk-ATP3BFHV.js";import{a as U,b as Ae,c as Te,e as Ce,j as ke}from"./chunk-RTRJ3KFH.js";var Ti={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var pt={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var l=(function(s){return s.BASE="/api/auth",s.LOGIN="login",s.LOGOUT="logout",s.REFRESH="refresh",s.TOKEN="token",s.TOKEN_REFRESH="token/refresh",s.WS="socket.io",s.TWO_FA_BASE="2fa",s.TWO_FA_ENABLE="enable",s.TWO_FA_DISABLE="disable",s.TWO_FA_LOGIN_VERIFY="login/verify",s.TWO_FA_ADMIN_RESET_USER="reset/user",s})(l||{}),tr=`${l.BASE}/${l.LOGIN}`,er=`${l.BASE}/${l.LOGOUT}`,Ci=`${l.BASE}/${l.REFRESH}`,ir=`${l.BASE}/${l.TOKEN}`,sr=`${l.BASE}/${l.TOKEN_REFRESH}`,ki=`/${l.WS}`,re=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ENABLE}`,Ri=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_DISABLE}`,Oi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_LOGIN_VERIFY}`,xi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ADMIN_RESET_USER}`;var be={};Ce(be,{Fetch:()=>yt,Manager:()=>Y,NodeWebSocket:()=>P,NodeXHR:()=>I,Socket:()=>q,WebSocket:()=>P,WebTransport:()=>$,XHR:()=>I,connect:()=>K,default:()=>K,io:()=>K,protocol:()=>ye});var C=Object.create(null);C.open="0";C.close="1";C.ping="2";C.pong="3";C.message="4";C.upgrade="5";C.noop="6";var ft=Object.create(null);Object.keys(C).forEach(s=>{ft[C[s]]=s});var dt={type:"error",data:"parser error"};var Ii=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pi=typeof ArrayBuffer=="function",Bi=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,mt=({type:s,data:t},i,e)=>Ii&&t instanceof Blob?i?e(t):Ni(t,e):Pi&&(t instanceof ArrayBuffer||Bi(t))?i?e(t):Ni(new Blob([t]),e):e(C[s]+(t||"")),Ni=(s,t)=>{let i=new FileReader;return i.onload=function(){let e=i.result.split(",")[1];t("b"+(e||""))},i.readAsDataURL(s)};function Fi(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}var ne;function Di(s,t){if(Ii&&s.data instanceof Blob)return s.data.arrayBuffer().then(Fi).then(t);if(Pi&&(s.data instanceof ArrayBuffer||Bi(s.data)))return t(Fi(s.data));mt(s,!1,i=>{ne||(ne=new TextEncoder),t(ne.encode(i))})}var Li="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Li.length;s++)gt[Li.charCodeAt(s)]=s;var Ui=s=>{let t=s.length*.75,i=s.length,e,r=0,n,o,a,c;s[s.length-1]==="="&&(t--,s[s.length-2]==="="&&t--);let E=new ArrayBuffer(t),w=new Uint8Array(E);for(e=0;e<i;e+=4)n=gt[s.charCodeAt(e)],o=gt[s.charCodeAt(e+1)],a=gt[s.charCodeAt(e+2)],c=gt[s.charCodeAt(e+3)],w[r++]=n<<2|o>>4,w[r++]=(o&15)<<4|a>>2,w[r++]=(a&3)<<6|c&63;return E};var gs=typeof ArrayBuffer=="function",_t=(s,t)=>{if(typeof s!="string")return{type:"message",data:Mi(s,t)};let i=s.charAt(0);return i==="b"?{type:"message",data:_s(s.substring(1),t)}:ft[i]?s.length>1?{type:ft[i],data:s.substring(1)}:{type:ft[i]}:dt},_s=(s,t)=>{if(gs){let i=Ui(s);return Mi(i,t)}else return{base64:!0,data:s}},Mi=(s,t)=>{switch(t){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};var Vi="",Hi=(s,t)=>{let i=s.length,e=new Array(i),r=0;s.forEach((n,o)=>{mt(n,!1,a=>{e[o]=a,++r===i&&t(e.join(Vi))})})},Wi=(s,t)=>{let i=s.split(Vi),e=[];for(let r=0;r<i.length;r++){let n=_t(i[r],t);if(e.push(n),n.type==="error")break}return e};function $i(){return new TransformStream({transform(s,t){Di(s,i=>{let e=i.length,r;if(e<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,e);else if(e<65536){r=new Uint8Array(3);let n=new DataView(r.buffer);n.setUint8(0,126),n.setUint16(1,e)}else{r=new Uint8Array(9);let n=new DataView(r.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(e))}s.data&&typeof s.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(i)})}})}var oe;function Wt(s){return s.reduce((t,i)=>t+i.length,0)}function $t(s,t){if(s[0].length===t)return s.shift();let i=new Uint8Array(t),e=0;for(let r=0;r<t;r++)i[r]=s[0][e++],e===s[0].length&&(s.shift(),e=0);return s.length&&e<s[0].length&&(s[0]=s[0].slice(e)),i}function qi(s,t){oe||(oe=new TextDecoder);let i=[],e=0,r=-1,n=!1;return new TransformStream({transform(o,a){for(i.push(o);;){if(e===0){if(Wt(i)<1)break;let c=$t(i,1);n=(c[0]&128)===128,r=c[0]&127,r<126?e=3:r===126?e=1:e=2}else if(e===1){if(Wt(i)<2)break;let c=$t(i,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),e=3}else if(e===2){if(Wt(i)<8)break;let c=$t(i,8),E=new DataView(c.buffer,c.byteOffset,c.length),w=E.getUint32(0);if(w>Math.pow(2,21)-1){a.enqueue(dt);break}r=w*Math.pow(2,32)+E.getUint32(4),e=3}else{if(Wt(i)<r)break;let c=$t(i,r);a.enqueue(_t(n?c:oe.decode(c),t)),e=0}if(r===0||r>s){a.enqueue(dt);break}}}})}var ae=4;function u(s){if(s)return ys(s)}function ys(s){for(var t in u.prototype)s[t]=u.prototype[t];return s}u.prototype.on=u.prototype.addEventListener=function(s,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(t),this};u.prototype.once=function(s,t){function i(){this.off(s,i),t.apply(this,arguments)}return i.fn=t,this.on(s,i),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(s,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+s];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var e,r=0;r<i.length;r++)if(e=i[r],e===t||e.fn===t){i.splice(r,1);break}return i.length===0&&delete this._callbacks["$"+s],this};u.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),i=this._callbacks["$"+s],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(i){i=i.slice(0);for(var e=0,r=i.length;e<r;++e)i[e].apply(this,t)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};u.prototype.hasListeners=function(s){return!!this.listeners(s).length};var x=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,i)=>i(t,0),_=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Gi="arraybuffer";function qt(s,...t){return t.reduce((i,e)=>(s.hasOwnProperty(e)&&(i[e]=s[e]),i),{})}var Es=_.setTimeout,bs=_.clearTimeout;function N(s,t){t.useNativeTimers?(s.setTimeoutFn=Es.bind(_),s.clearTimeoutFn=bs.bind(_)):(s.setTimeoutFn=_.setTimeout.bind(_),s.clearTimeoutFn=_.clearTimeout.bind(_))}var Ss=1.33;function Yi(s){return typeof s=="string"?ws(s):Math.ceil((s.byteLength||s.size)*Ss)}function ws(s){let t=0,i=0;for(let e=0,r=s.length;e<r;e++)t=s.charCodeAt(e),t<128?i+=1:t<2048?i+=2:t<55296||t>=57344?i+=3:(e++,i+=4);return i}function Gt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ki(s){let t="";for(let i in s)s.hasOwnProperty(i)&&(t.length&&(t+="&"),t+=encodeURIComponent(i)+"="+encodeURIComponent(s[i]));return t}function ji(s){let t={},i=s.split("&");for(let e=0,r=i.length;e<r;e++){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}var Yt=class extends Error{constructor(t,i,e){super(t),this.description=i,this.context=e,this.type="TransportError"}},F=class extends u{constructor(t){super(),this.writable=!1,N(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,i,e){return super.emitReserved("error",new Yt(t,i,e)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let i=_t(t,this.socket.binaryType);this.onPacket(i)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,i={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let i=Ki(t);return i.length?"?"+i:""}};var et=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let i=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||i()})),this.writable||(e++,this.once("drain",function(){--e||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let i=e=>{if(this.readyState==="opening"&&e.type==="open"&&this.onOpen(),e.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)};Wi(t,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Hi(t,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=Gt()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(t,i)}};var Qi=!1;try{Qi=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Ji=Qi;function vs(){}var ce=class extends et{constructor(t){if(super(t),typeof location<"u"){let i=location.protocol==="https:",e=location.port;e||(e=i?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||e!==t.port}}doWrite(t,i){let e=this.request({method:"POST",data:t});e.on("success",i),e.on("error",(r,n)=>{this.onError("xhr post error",r,n)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(i,e)=>{this.onError("xhr poll error",i,e)}),this.pollXhr=t}},Kt=(()=>{class s extends u{constructor(i,e,r){super(),this.createRequest=i,N(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;let e=qt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var n;r.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=s.requestsCount++,s.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=vs,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete s.requests[this._index],this._xhr=null}}_onLoad(){let i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return s.requestsCount=0,s.requests={},s})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Xi);else if(typeof addEventListener=="function"){let s="onpagehide"in _?"pagehide":"unload";addEventListener(s,Xi,!1)}}function Xi(){for(let s in Kt.requests)Kt.requests.hasOwnProperty(s)&&Kt.requests[s].abort()}var As=(function(){let s=zi({xdomain:!1});return s&&s.responseType!==null})(),I=class extends ce{constructor(t){super(t);let i=t&&t.forceBase64;this.supportsBinary=As&&!i}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kt(zi,this.uri(),t)}};function zi(s){let t=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ji))return new XMLHttpRequest}catch{}if(!t)try{return new _[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var Zi=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ue=class extends F{get name(){return"websocket"}doOpen(){let t=this.uri(),i=this.opts.protocols,e=Zi?{}:qt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(e.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,i,e)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let i=0;i<t.length;i++){let e=t[i],r=i===t.length-1;mt(e,this.supportsBinary,n=>{try{this.doWrite(e,n)}catch{}r&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=Gt()),this.supportsBinary||(i.b64=1),this.createUri(t,i)}},he=_.WebSocket||_.MozWebSocket,P=class extends ue{createSocket(t,i,e){return Zi?new he(t,i,e):i?new he(t,i):new he(t)}doWrite(t,i){this.ws.send(i)}};var $=class extends F{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let i=qi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),e=t.readable.pipeThrough(i).getReader(),r=$i();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let n=()=>{e.read().then(({done:a,value:c})=>{a||(this.onPacket(c),n())}).catch(a=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let i=0;i<t.length;i++){let e=t[i],r=i===t.length-1;this._writer.write(e).then(()=>{r&&x(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var le={websocket:P,webtransport:$,polling:I};var Ts=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Cs=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function it(s){if(s.length>8e3)throw"URI too long";let t=s,i=s.indexOf("["),e=s.indexOf("]");i!=-1&&e!=-1&&(s=s.substring(0,i)+s.substring(i,e).replace(/:/g,";")+s.substring(e,s.length));let r=Ts.exec(s||""),n={},o=14;for(;o--;)n[Cs[o]]=r[o]||"";return i!=-1&&e!=-1&&(n.source=t,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=ks(n,n.path),n.queryKey=Rs(n,n.query),n}function ks(s,t){let i=/\/{2,9}/g,e=t.replace(i,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&e.splice(0,1),t.slice(-1)=="/"&&e.splice(e.length-1,1),e}function Rs(s,t){let i={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,r,n){r&&(i[r]=n)}),i}var pe=typeof addEventListener=="function"&&typeof removeEventListener=="function",jt=[];pe&&addEventListener("offline",()=>{jt.forEach(s=>s())},!1);var Qt=(()=>{class s extends u{constructor(i,e){if(super(),this.binaryType=Gi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(e=i,i=null),i){let r=it(i);e.hostname=r.host,e.secure=r.protocol==="https"||r.protocol==="wss",e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=it(e.host).host);N(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(r=>{let n=r.prototype.name;this.transports.push(n),this._transportsByName[n]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ji(this.opts.query)),pe&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},jt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){let e=Object.assign({},this.opts.query);e.EIO=ae,e.transport=i,this.id&&(e.sid=this.id);let r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let i=this.opts.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(i);e.open(),this.setTransport(e)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",s.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=new Error("server error");e.code=i.data,this._onError(e);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r<this.writeBuffer.length;r++){let n=this.writeBuffer[r].data;if(n&&(e+=Yi(n)),r>0&&e>this._maxPayload)return this.writeBuffer.slice(0,r);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,x(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,e,r){return this._sendPacket("message",i,e,r),this}send(i,e,r){return this._sendPacket("message",i,e,r),this}_sendPacket(i,e,r,n){if(typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let o={type:i,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let i=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),i()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(s.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),pe&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=jt.indexOf(this._offlineEventListener);r!==-1&&jt.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,e),this.writeBuffer=[],this._prevBufferLen=0}}}return s.protocol=ae,s})(),Jt=class extends Qt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let i=this.createTransport(t),e=!1;Qt.priorWebsocketSuccess=!1;let r=()=>{e||(i.send([{type:"ping",data:"probe"}]),i.once("packet",B=>{if(!e)if(B.type==="pong"&&B.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;Qt.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{e||this.readyState!=="closed"&&(w(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{let ot=new Error("probe error");ot.transport=i.name,this.emitReserved("upgradeError",ot)}}))};function n(){e||(e=!0,w(),i.close(),i=null)}let o=B=>{let ot=new Error("probe error: "+B);ot.transport=i.name,n(),this.emitReserved("upgradeError",ot)};function a(){o("transport closed")}function c(){o("socket closed")}function E(B){i&&B.name!==i.name&&n()}let w=()=>{i.removeListener("open",r),i.removeListener("error",o),i.removeListener("close",a),this.off("close",c),this.off("upgrading",E)};i.once("open",r),i.once("error",o),i.once("close",a),this.once("close",c),this.once("upgrading",E),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{e||i.open()},200):i.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let i=[];for(let e=0;e<t.length;e++)~this.transports.indexOf(t[e])&&i.push(t[e]);return i}},st=class extends Jt{constructor(t,i={}){let e=typeof t=="object"?t:i;(!e.transports||e.transports&&typeof e.transports[0]=="string")&&(e.transports=(e.transports||["polling","websocket","webtransport"]).map(r=>le[r]).filter(r=>!!r)),super(t,e)}};var yt=class extends et{doPoll(){this._fetch().then(t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then(i=>this.onData(i))}).catch(t=>{this.onError("fetch read error",t)})}doWrite(t,i){this._fetch(t).then(e=>{if(!e.ok)return this.onError("fetch write error",e.status,e);i()}).catch(e=>{this.onError("fetch write error",e)})}_fetch(t){var i;let e=t!==void 0,r=new Headers(this.opts.extraHeaders);return e&&r.set("content-type","text/plain;charset=UTF-8"),(i=this.socket._cookieJar)===null||i===void 0||i.appendCookies(r),fetch(this.uri(),{method:e?"POST":"GET",body:e?t:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then(n=>{var o;return(o=this.socket._cookieJar)===null||o===void 0||o.parseCookies(n.headers.getSetCookie()),n})}};var un=st.protocol;function ts(s,t="",i){let e=s;i=i||typeof location<"u"&&location,s==null&&(s=i.protocol+"//"+i.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=i.protocol+s:s=i.host+s),/^(https?|wss?):\/\//.test(s)||(typeof i<"u"?s=i.protocol+"//"+s:s="https://"+s),e=it(s)),e.port||(/^(http|ws)$/.test(e.protocol)?e.port="80":/^(http|ws)s$/.test(e.protocol)&&(e.port="443")),e.path=e.path||"/";let n=e.host.indexOf(":")!==-1?"["+e.host+"]":e.host;return e.id=e.protocol+"://"+n+":"+e.port+t,e.href=e.protocol+"://"+n+(i&&i.port===e.port?"":":"+e.port),e}var Ee={};Ce(Ee,{Decoder:()=>ge,Encoder:()=>me,PacketType:()=>h,protocol:()=>ye});var Os=typeof ArrayBuffer=="function",xs=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,es=Object.prototype.toString,Ns=typeof Blob=="function"||typeof Blob<"u"&&es.call(Blob)==="[object BlobConstructor]",Fs=typeof File=="function"||typeof File<"u"&&es.call(File)==="[object FileConstructor]";function bt(s){return Os&&(s instanceof ArrayBuffer||xs(s))||Ns&&s instanceof Blob||Fs&&s instanceof File}function Et(s,t){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let i=0,e=s.length;i<e;i++)if(Et(s[i]))return!0;return!1}if(bt(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Et(s.toJSON(),!0);for(let i in s)if(Object.prototype.hasOwnProperty.call(s,i)&&Et(s[i]))return!0;return!1}function is(s){let t=[],i=s.data,e=s;return e.data=fe(i,t),e.attachments=t.length,{packet:e,buffers:t}}function fe(s,t){if(!s)return s;if(bt(s)){let i={_placeholder:!0,num:t.length};return t.push(s),i}else if(Array.isArray(s)){let i=new Array(s.length);for(let e=0;e<s.length;e++)i[e]=fe(s[e],t);return i}else if(typeof s=="object"&&!(s instanceof Date)){let i={};for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(i[e]=fe(s[e],t));return i}return s}function ss(s,t){return s.data=de(s.data,t),delete s.attachments,s}function de(s,t){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<t.length)return t[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let i=0;i<s.length;i++)s[i]=de(s[i],t);else if(typeof s=="object")for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(s[i]=de(s[i],t));return s}var Is=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ye=5,h=(function(s){return s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK",s})(h||{}),me=class{constructor(t){this.replacer=t}encode(t){return(t.type===h.EVENT||t.type===h.ACK)&&Et(t)?this.encodeAsBinary({type:t.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let i=""+t.type;return(t.type===h.BINARY_EVENT||t.type===h.BINARY_ACK)&&(i+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(i+=t.nsp+","),t.id!=null&&(i+=t.id),t.data!=null&&(i+=JSON.stringify(t.data,this.replacer)),i}encodeAsBinary(t){let i=is(t),e=this.encodeAsString(i.packet),r=i.buffers;return r.unshift(e),r}};function rs(s){return Object.prototype.toString.call(s)==="[object Object]"}var ge=class s extends u{constructor(t){super(),this.reviver=t}add(t){let i;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(t);let e=i.type===h.BINARY_EVENT;e||i.type===h.BINARY_ACK?(i.type=e?h.EVENT:h.ACK,this.reconstructor=new _e(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(bt(t)||t.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(t),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let i=0,e={type:Number(t.charAt(0))};if(h[e.type]===void 0)throw new Error("unknown packet type "+e.type);if(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK){let n=i+1;for(;t.charAt(++i)!=="-"&&i!=t.length;);let o=t.substring(n,i);if(o!=Number(o)||t.charAt(i)!=="-")throw new Error("Illegal attachments");e.attachments=Number(o)}if(t.charAt(i+1)==="/"){let n=i+1;for(;++i&&!(t.charAt(i)===","||i===t.length););e.nsp=t.substring(n,i)}else e.nsp="/";let r=t.charAt(i+1);if(r!==""&&Number(r)==r){let n=i+1;for(;++i;){let o=t.charAt(i);if(o==null||Number(o)!=o){--i;break}if(i===t.length)break}e.id=Number(t.substring(n,i+1))}if(t.charAt(++i)){let n=this.tryParse(t.substr(i));if(s.isPayloadValid(e.type,n))e.data=n;else throw new Error("invalid payload")}return e}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,i){switch(t){case h.CONNECT:return rs(i);case h.DISCONNECT:return i===void 0;case h.CONNECT_ERROR:return typeof i=="string"||rs(i);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&Is.indexOf(i[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},_e=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let i=ss(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function S(s,t,i){return s.on(t,i),function(){s.off(t,i)}}var Ps=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),q=class extends u{constructor(t,i,e){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=i,e&&e.auth&&(this.auth=e.auth),this._opts=Object.assign({},e),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[S(t,"open",this.onopen.bind(this)),S(t,"packet",this.onpacket.bind(this)),S(t,"error",this.onerror.bind(this)),S(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...i){var e,r,n;if(Ps.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(i.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;let o={type:h.EVENT,data:i};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){let w=this.ids++,B=i.pop();this._registerAckCallback(w,B),o.id=w}let a=(r=(e=this.io.engine)===null||e===void 0?void 0:e.transport)===null||r===void 0?void 0:r.writable,c=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,i){var e;let r=(e=this.flags.timeout)!==null&&e!==void 0?e:this._opts.ackTimeout;if(r===void 0){this.acks[t]=i;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);i.call(this,new Error("operation has timed out"))},r),o=(...a)=>{this.io.clearTimeoutFn(n),i.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...i){return new Promise((e,r)=>{let n=(o,a)=>o?r(o):e(a);n.withError=!0,i.push(n),this.emit(t,...i)})}_addToQueue(t){let i;typeof t[t.length-1]=="function"&&(i=t.pop());let e={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...n)=>e!==this._queue[0]?void 0:(r!==null?e.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(r)):(this._queue.shift(),i&&i(null,...n)),e.pending=!1,this._drainQueue())),this._queue.push(e),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let i=this._queue[0];i.pending&&!t||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case h.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(t);break;case h.ACK:case h.BINARY_ACK:this.onack(t);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e);break}}onevent(t){let i=t.data||[];t.id!=null&&i.push(this.ack(t.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let i=this._anyListeners.slice();for(let e of i)e.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let i=this,e=!1;return function(...r){e||(e=!0,i.packet({type:h.ACK,id:t,data:r}))}}onack(t){let i=this.acks[t.id];typeof i=="function"&&(delete this.acks[t.id],i.withError&&t.data.unshift(null),i.apply(this,t.data))}onconnect(t,i){this.id=t,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let i=this._anyListeners;for(let e=0;e<i.length;e++)if(t===i[e])return i.splice(e,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let i=this._anyOutgoingListeners;for(let e=0;e<i.length;e++)if(t===i[e])return i.splice(e,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let i=this._anyOutgoingListeners.slice();for(let e of i)e.apply(this,t.data)}}};function G(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}G.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),i=Math.floor(t*this.jitter*s);s=(Math.floor(t*10)&1)==0?s-i:s+i}return Math.min(s,this.max)|0};G.prototype.reset=function(){this.attempts=0};G.prototype.setMin=function(s){this.ms=s};G.prototype.setMax=function(s){this.max=s};G.prototype.setJitter=function(s){this.jitter=s};var Y=class extends u{constructor(t,i){var e;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(i=t,t=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,N(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((e=i.randomizationFactor)!==null&&e!==void 0?e:.5),this.backoff=new G({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=t;let r=i.parser||Ee;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var i;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(i=this.backoff)===null||i===void 0||i.setMin(t),this)}randomizationFactor(t){var i;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(i=this.backoff)===null||i===void 0||i.setJitter(t),this)}reconnectionDelayMax(t){var i;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(i=this.backoff)===null||i===void 0||i.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new st(this.uri,this.opts);let i=this.engine,e=this;this._readyState="opening",this.skipReconnect=!1;let r=S(i,"open",function(){e.onopen(),t&&t()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=S(i,"error",n);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),i.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(S(t,"ping",this.onping.bind(this)),S(t,"data",this.ondata.bind(this)),S(t,"error",this.onerror.bind(this)),S(t,"close",this.onclose.bind(this)),S(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(i){this.onclose("parse error",i)}}ondecoded(t){x(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,i){let e=this.nsps[t];return e?this._autoConnect&&!e.active&&e.connect():(e=new q(this,t,i),this.nsps[t]=e),e}_destroy(t){let i=Object.keys(this.nsps);for(let e of i)if(this.nsps[e].active)return;this._close()}_packet(t){let i=this.encoder.encode(t);for(let e=0;e<i.length;e++)this.engine.write(i[e],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,i){var e;this.cleanup(),(e=this.engine)===null||e===void 0||e.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let i=this.backoff.duration();this._reconnecting=!0;let e=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},i);this.opts.autoUnref&&e.unref(),this.subs.push(()=>{this.clearTimeoutFn(e)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var St={};function K(s,t){typeof s=="object"&&(t=s,s=void 0),t=t||{};let i=ts(s,t.path||"/socket.io"),e=i.source,r=i.id,n=i.path,o=St[r]&&n in St[r].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o,c;return a?c=new Y(e,t):(St[r]||(St[r]=new Y(e,t)),c=St[r]),i.query&&!t.query&&(t.query=i.queryKey),c.socket(i.path,t)}Object.assign(K,{Manager:Y,Socket:q,io:K,connect:K});var rt=class s{config;appRef;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(t,i){this.config=t,this.appRef=i,t===void 0&&(t=this.emptyConfig);let e=t.url,r=t.options,n=K?K:be;this.ioSocket=n(e,r)}get auth(){return this.ioSocket.auth}set auth(t){this.ioSocket.auth=t}get io(){return this.ioSocket.io}get open(){return this.connect}get close(){return this.disconnect}of(t){if(!t||t==="/")return this;let i=this.namespaces[t];if(i)return i;let a=this.config,{url:e}=a,r=Te(a,["url"]),n=U({url:!e.endsWith("/")&&!t.startsWith("/")?`${e}/${t}`:`${e}${t}`},r),o=new s(n,this.appRef);return this.namespaces[t]=o,o}on(t,i){return this.ioSocket.on(t,i),this}once(t,i){return this.ioSocket.once(t,i),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(t,...i){return this.ioSocket.emit(t,...i),this}send(...t){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(t,...i){return this.ioSocket.emitWithAck(t,...i)}removeListener(t,i){return this.ioSocket.removeListener(t,i),this}removeAllListeners(t){return this.ioSocket.removeAllListeners(t),this}fromEvent(t){return this.subscribersCounter[t]||(this.subscribersCounter[t]=0),this.subscribersCounter[t]++,this.eventObservables$[t]||(this.eventObservables$[t]=new Re(i=>{let e=r=>{i.next(r),this.appRef.tick()};return this.ioSocket.on(t,e),()=>{this.subscribersCounter[t]--,this.subscribersCounter[t]===0&&(this.ioSocket.removeListener(t,e),delete this.eventObservables$[t])}}).pipe(Ne())),this.eventObservables$[t]}fromOneTimeEvent(t){return new Promise(i=>this.once(t,i))}listeners(t){return this.ioSocket.listeners(t)}hasListeners(t){return this.ioSocket.hasListeners(t)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(t,i){return this.ioSocket.off(t,i),this}offAny(t){return this.ioSocket.offAny(t),this}offAnyOutgoing(t){return this.ioSocket.offAnyOutgoing(t),this}onAny(t){return this.ioSocket.onAny(t),this}onAnyOutgoing(t){return this.ioSocket.onAnyOutgoing(t),this}prependAny(t){return this.ioSocket.prependAny(t),this}prependAnyOutgoing(t){return this.ioSocket.prependAnyOutgoing(t),this}timeout(t){return this.ioSocket.timeout(t),this}get volatile(){let t=this.ioSocket.volatile;return this}get active(){return this.ioSocket.active}get connected(){return this.ioSocket.connected}get disconnected(){return this.ioSocket.disconnected}get recovered(){return this.ioSocket.recovered}get id(){return this.ioSocket.id}compress(t){return this.ioSocket.compress(t),this}};function Bs(s,t){return new rt(s,t)}var ns=new Fe("__SOCKET_IO_CONFIG__"),to=(()=>{class s{static forRoot(i){return{ngModule:s,providers:[{provide:ns,useValue:i},{provide:rt,useFactory:Bs,deps:[ns,De]}]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=kt({type:s});static \u0275inj=At({})}return s})();var Se={BASE:`${li}/notifications`,UNREAD:"unread"},Xt=Se.BASE;var d=(function(s){return s.ADD="add",s.UPDATE="update",s.DELETE="delete",s.DELETE_PERMANENTLY="deletePermanently",s})(d||{});var A=(function(s){return s.COMMENTS="comments",s.SPACES="spaces",s.SPACE_ROOTS="spaces_roots",s.SHARES="shares",s.LINKS="links",s.SYNC="sync",s.AUTH_LOCKED="auth_locked",s.AUTH_2FA="auth_2fa",s})(A||{}),ao={COMMENTS:"commented",SPACES:{[d.ADD]:"You now have access to the space",[d.DELETE]:"You no longer have access to the space",[d.DELETE_PERMANENTLY]:"This space has been permanently deleted"},SPACE_ROOTS:{[d.ADD]:"anchored",[d.DELETE]:"unanchored"},SHARES:{[d.ADD]:"shared with you",[d.DELETE]:"no longer share with you"},SHARES_WITHOUT_OWNER:{[d.ADD]:"You now have access to the share",[d.DELETE]:"You no longer have access to the share",[d.DELETE_PERMANENTLY]:"You are no longer a member of the parent share, your child share has been deleted"},LINKS:{[d.ADD]:"shared with you",[d.UPDATE]:"You now have access to the space"},SYNC:{[d.DELETE]:"You are no longer synchronizing"},AUTH_2FA:{[d.ADD]:"Two-factor authentication (2FA) on your account has been enabled",[d.DELETE]:"Two-factor authentication (2FA) on your account has been disabled"},AUTH_LOCKED:{[d.DELETE]:"Your account has been locked after several unsuccessful authentication attempts"}};var os=oi;var as={[A.COMMENTS]:os,[A.SPACES]:lt.SPACES,[A.SPACE_ROOTS]:lt.SPACES,[A.SHARES]:lt.SHARES,[A.LINKS]:lt.LINKS,[A.SYNC]:wi.SYNC};var zt=class{constructor(t){this.soonRead=!1,Object.assign(this,t),this.fromUser?this.fromUser.avatarUrl=Z(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Information",avatarUrl:null},this.appIcon=as[this.content.app],this.setMainElement()}setMainElement(){if(this.content.app===A.COMMENTS||this.content.app===A.SHARES||this.content.app===A.SYNC)return;let t=this.content.url.split("/");t.length>1&&(this.mainElement=t[t.length-1])}};var cs=(()=>{let t=class t{constructor(){this.http=p(Ft),this.store=p(Ht),this.layout=p(tt)}getNotifications(e=!1){return this.http.get(`${Xt}${e?`/${Se.UNREAD}`:""}`).pipe(b(r=>r.map(n=>new zt(n))))}wasReadNotification(e){return this.http.patch(`${Xt}/${e}`,null)}deleteNotification(e){return this.http.delete(`${Xt}${e?`/${e}`:""}`)}checkUnreadNotifications(e=!1){this.getNotifications().subscribe(r=>{let n;if(e&&r.length){let o=r[0];n=this.layout.sendNotification("warning",o.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(o.content.event)}: <b>${o.content.element}</b>`),null,{enableHtml:!0})}else{let o=r.filter(a=>!a.wasRead).length;o&&(n=this.layout.sendNotification("warning","Notifications",this.layout.translateString(o===1?"one_notification":"nb_notifications",{nb:o})))}n&&n.onTap.pipe(xe(1)).subscribe(()=>this.layout.showRSideBarTab(Ei.NOTIFICATIONS,!0)),this.store.notifications.set(r)})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})();var y=(function(s){return s.ACCESS="access",s.ACCESS_2FA="access_2fa",s.REFRESH="refresh",s.WS="ws",s.CSRF="csrf",s.CSRF_2FA="csrf_2fa",s})(y||{});var Bo="sync-in-csrf";var we=6;var hs="sync-in-two-fa-code",us="sync-in-two-fa-password",Do={[y.ACCESS]:"/",[y.REFRESH]:Ci,[y.WS]:ki,[y.CSRF]:"/",[y.ACCESS_2FA]:Oi,[y.CSRF_2FA]:"/"},Lo=[y.REFRESH,y.ACCESS,y.WS,y.CSRF],Uo=[y.ACCESS_2FA,y.CSRF_2FA];var Ls=["Password"];function Us(s,t){s&1&&(f(0,"label",1),T(1,"Password"),g())}function Ms(s,t){if(s&1){let i=ct();f(0,"div",5),v("click",function(){M(i);let r=D();return V(r.randomPassword())}),f(1,"span"),X(2,"fa-icon",6),g()()}if(s&2){let i=D();m(2),k("icon",i.icons.faDice)}}var ls=(()=>{let t=class t{constructor(){this.passwordChange=new Be,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.centered=!1,this.locale=p(Ut),this.toggleVisiblePassword=Si,this.icons={faEye:ni,faEyeSlash:ci,faDice:hi}}ngOnInit(){this.focus&&setTimeout(()=>{this.passwordElement.nativeElement.focus(),this.passwordElement.nativeElement.select()},0)}randomPassword(){this.disabled||this.passwordChange.emit(_i(this.passwordMinLength+2))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=Ct({type:t,selectors:[["app-input-password"]],viewQuery:function(r,n){if(r&1&&Ue(Ls,7),r&2){let o;Ot(o=xt())&&(n.passwordElement=o.first)}},inputs:{password:"password",passwordMinLength:"passwordMinLength",placeholder:"placeholder",showGenerator:"showGenerator",showLabel:"showLabel",disabled:"disabled",isRequired:"isRequired",focus:"focus",centered:"centered"},outputs:{passwordChange:"passwordChange"},decls:9,vars:16,consts:[["Password",""],["for","password","l10nTranslate",""],["id","password",1,"input-group","input-group-sm",2,"min-width","150px"],["autocomplete","off","type","password",1,"form-control","form-control-sm","pe-0",3,"ngModelChange","keyup","ngModel","disabled","placeholder","required"],[1,"input-group-text","cursor-pointer"],[1,"input-group-text","cursor-pointer",3,"click"],[3,"icon"]],template:function(r,n){if(r&1){let o=ct();R(0,Us,2,0,"label",1),f(1,"div",2)(2,"input",3,0),qe(4,"translate"),$e("ngModelChange",function(c){return M(o),We(n.password,c)||(n.password=c),V(c)}),v("keyup",function(){return M(o),V(n.passwordChange.emit(n.password))}),g(),R(5,Ms,3,1,"div",4),f(6,"div",5),v("click",function(){M(o);let c=te(3);return V(n.toggleVisiblePassword(c))}),f(7,"span"),X(8,"fa-icon",6),g()()()}if(r&2){let o=te(3);O(n.showLabel?0:-1),m(2),Me("padding-left",n.centered?"2rem":""),H("is-invalid",n.isRequired&&(n.password==null?null:n.password.length)<n.passwordMinLength)("text-center",n.centered),He("ngModel",n.password),k("disabled",n.disabled)("placeholder",Ge(4,13,n.placeholder,n.locale.language))("required",n.isRequired),m(3),O(n.showGenerator?5:-1),m(3),k("icon",o.type==="text"?n.icons.faEye:n.icons.faEyeSlash)}},dependencies:[ei,Bt,Dt,ze,je,Lt,It,Mt,ii],encapsulation:2});let s=t;return s})();var ps=(()=>{let t=class t{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=p(Tt)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=J({type:t,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let s=t;return s})();function Vs(s,t){s&1&&(f(0,"span",3),T(1,"Two-Factor Authentication"),g())}function Hs(s,t){s&1&&(f(0,"span",3),T(1,"Password Authentication"),g())}function Ws(s,t){if(s&1&&T(0),s&2){let i=D();Ve(" ",i.hasError," ")}}function $s(s,t){s&1&&T(0," Enter your password ")}function qs(s,t){s&1&&T(0," Valid with your TOTP code ")}function Gs(s,t){if(s&1){let i=ct();f(0,"div",9)(1,"app-input-password",13),v("passwordChange",function(r){M(i);let n=D();return V(n.updatePassword(r))}),g()()}if(s&2){let i=D();m(),k("password",i.twoFaForm.value.password)("focus",!0)("centered",!0)}}function Ys(s,t){s&1&&(f(0,"div",14),T(1,"Valid with your TOTP code"),g())}function Ks(s,t){if(s&1&&(R(0,Ys,2,0,"div",14),f(1,"div",15),X(2,"input",16),g()),s&2){let i=D();O(i.withPassword?0:-1),m(2),k("autoFocus",!i.withPassword)("autoSelect",!i.withPassword)("maxlength",i.twoFaCodelength)}}var fs=(()=>{let t=class t{constructor(){this.withPassword=!1,this.withTwoFaEnabled=!0,this.submitted=!1,this.hasError=null,this.icons={faKey:ri,faLock:ai},this.twoFaCodelength=we,this.locale=p(Ut),this.fb=p(ti),this.layout=p(tt)}ngOnInit(){this.twoFaForm=this.fb.group({totpCode:this.fb.control("",this.withTwoFaEnabled?[ht.required,ht.pattern(new RegExp(`^\\d{${we}}$`))]:null),password:this.fb.control("",this.withPassword?[ht.required,ht.minLength(8)]:null)})}onClose(e=!1){this.isValid(e),this.layout.closeDialog()}onSubmit(){this.submitted=!0;let e=new Ye(U(U({},this.withTwoFaEnabled?{[hs]:this.twoFaForm.value.totpCode}:{}),this.withPassword?{[us]:this.twoFaForm.value.password}:{}));this.onClose(e)}updatePassword(e){this.twoFaForm.patchValue({password:e})}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=Ct({type:t,selectors:[["app-user-auth-2fa-verify-dialog"]],inputs:{withPassword:"withPassword",withTwoFaEnabled:"withTwoFaEnabled"},decls:20,vars:9,consts:[[1,"modal-header","align-items-center","justify-content-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"modal-body","modal-auth-verify-2fa"],[1,"card","shadow-sm"],[1,"card-body"],["l10nTranslate","",1,"d-flex","justify-content-center","align-items-center","mb-3"],[3,"ngSubmit","formGroup"],[1,"mb-4"],[1,"d-grid","gap-2"],["type","submit","l10nTranslate","",1,"btn","btn-primary",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["id","password","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",3,"passwordChange","password","focus","centered"],["l10nTranslate","",1,"text-align-center","mb-3"],[1,"mb-3"],["appAutofocus","","type","text","formControlName","totpCode","placeholder","\u2022\u2022\u2022\u2022\u2022\u2022","inputmode","numeric","autocomplete","one-time-code","name","totp",1,"form-control","text-center","fs-4",3,"autoFocus","autoSelect","maxlength"]],template:function(r,n){r&1&&(f(0,"div",0)(1,"h4",1),X(2,"fa-icon",2),R(3,Vs,2,0,"span",3)(4,Hs,2,0,"span",3),g()(),f(5,"div",4)(6,"div",5)(7,"div",6)(8,"p",7),R(9,Ws,1,1)(10,$s,1,0)(11,qs,1,0),g(),f(12,"form",8),v("ngSubmit",function(){return n.onSubmit()}),R(13,Gs,2,3,"div",9),R(14,Ks,3,4),f(15,"div",10)(16,"button",11),T(17,"Confirm"),g(),f(18,"button",12),v("click",function(){return n.onClose()}),T(19,"Cancel"),g()()()()()()),r&2&&(m(2),k("icon",n.icons.faLock),m(),O(n.withTwoFaEnabled?3:4),m(5),H("text-danger",n.hasError),m(),O(n.hasError?9:n.withPassword?10:11),m(3),k("formGroup",n.twoFaForm),m(),O(n.withPassword?13:-1),m(),O(n.withTwoFaEnabled?14:-1),m(2),k("disabled",n.twoFaForm.invalid||n.submitted))},dependencies:[It,Mt,ps,Lt,Qe,Bt,Dt,Ke,Ze,Je,Xe,ls],encapsulation:2});let s=t;return s})();var Zt=class{constructor(t){this.parentGroup=t.parentGroup,this.members=t.members.map(i=>new L(i))}};var j=class{constructor(t){this.newly=0,this.currentAccessHover=!1,this.setManagers(t),Object.assign(this,t),this.avatarUrl=Z(t.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=(0,si.default)(this.currentAccess).fromNow(!0),this.newly=bi(this.currentAccess)}setManagers(t){t?.managers&&(t.managers=t.managers.map(i=>new L(i)))}};var wt=class{constructor(t){this.setOnlineStatus(yi("status",t)),this.avatarUrl=Z(t.login),Object.assign(this,t)}setOnlineStatus(t){this.onlineStatus=t,this.onlineTextStatus=ui[t]}};var Qa=(()=>{let t=class t{constructor(){this.http=p(Ft),this.layout=p(tt),this.store=p(Ht),this.webSocket=p(rt),this.notifications=p(cs),this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(Ti.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_USER).pipe(b(e=>new wt(e))).subscribe(e=>this.newOnlineUser(e)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_USERS).pipe(b(e=>e.map(r=>new wt(r)))).subscribe(e=>this.setOnlineUsers(e)),this.webSocket.fromEvent(pt.EVENTS.ONLINE_STATUS).subscribe(e=>this.receiveOnlineStatus(e))}get user(){return this.store.user.getValue()}initUser(e,r=!1){this.refreshAvatar(),this.layout.setLanguage(e.language),this.store.userImpersonate.set(r||e.impersonated),this.store.user.next(e),this.checkQuota(this.store.user.getValue()),r&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(e){this.store.onlineUsers.set(e)}newOnlineUser(e){this.store.onlineUsers().find(r=>r.id===e.id)?this.receiveOnlineStatus({userId:e.id,status:e.onlineStatus}):this.store.onlineUsers.update(r=>[e,...r])}userHavePermission(e){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(e)!==-1:!1}browseGroup(e){return this.http.get(`${mi}${e?`/${e}`:""}`).pipe(b(r=>new Zt(r)))}createPersonalGroup(e){return this.http.post(W,e).pipe(b(r=>new L(r)))}updatePersonalGroup(e,r){return this.http.put(`${W}/${e}`,r).pipe(b(n=>new L(n)))}leavePersonalGroup(e){return this.http.delete(`${gi}/${e}`)}addUsersToGroup(e,r){return this.http.patch(`${W}/${e}/${ut.USERS}`,r)}deletePersonalGroup(e){return this.http.delete(`${W}/${e}`)}updateUserFromPersonalGroup(e,r,n){return this.http.patch(`${W}/${e}/${ut.USERS}/${r}`,n)}removeUserFromGroup(e,r){return this.http.delete(`${W}/${e}/${ut.USERS}/${r}`)}listGuests(){return this.http.get(z).pipe(b(e=>e.map(r=>new j(r))))}getGuest(e){return this.http.get(`${z}/${e}`).pipe(b(r=>new j(r)))}createGuest(e){return this.http.post(z,e).pipe(b(r=>new j(r)))}updateGuest(e,r){return this.http.put(`${z}/${e}`,r).pipe(b(n=>n?new j(n):null))}deleteGuest(e){return this.http.delete(`${z}/${e}`)}genAvatar(){this.http.patch(se,null).subscribe({next:()=>this.refreshAvatar(),error:e=>this.layout.sendNotification("error","Configuration","Avatar",e)})}uploadAvatar(e){let r=new FormData;r.append("file",e),this.http.put(se,r).subscribe({next:()=>this.refreshAvatar(),error:n=>this.layout.sendNotification("error","Configuration","Avatar",n)})}changePassword(e,r){return this.http.put(fi,e,{headers:r})}changeLanguage(e){return this.http.put(pi,e)}changeNotification(e){return this.http.put(di,e)}changeOnlineStatus(e,r=!0){this.webSocket.emit(pt.EVENTS.ONLINE_STATUS,{status:e,store:r})}receiveOnlineStatus(e){this.user.id===e.userId?this.user.onlineStatus=e.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(r=>r.map(n=>n.id===e.userId?Ae(U({},n),{onlineStatus:e.status}):n))}searchMembers(e,r=[]){return this.http.request("search",ut.BASE,{body:e}).pipe(b(n=>n.map(o=>new L(o,r))),Oe(()=>[]))}setMenusVisibility(e){for(let r of e)if(!(r.id&&(r.hide=!this.userHavePermission(r.id),r.hide))&&(r.checks?.length&&(r.hide=!r.checks.map(n=>n.negate?!this[n.prop][n.value]:this[n.prop][n.value]).every(n=>!!n)),r.submenus?.length&&this.setMenusVisibility(r.submenus),r.title===Ai.FILES)){for(let n of r.submenus)if(!n.hide){r.link=n.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(vi())}checkAppStoreAvailability(){this.http.get(`${ie.BASE}/${ie.APP_STORE}`).subscribe({next:e=>this.store.appStoreManifest.set(e),error:e=>console.error(e)})}listAppPasswords(e){return this.http.get(Vt,{headers:e})}generateAppPassword(e,r){return this.http.post(Vt,e,{headers:r})}deleteAppPassword(e){return this.http.delete(`${Vt}/${e}`)}init2Fa(){return this.http.get(re)}enable2Fa(e){return this.http.post(re,e)}disable2Fa(e){return this.http.post(Ri,e)}adminResetUser2Fa(e,r){return this.http.post(`${xi}/${e}`,null,{headers:r})}auth2FaVerifyDialog(e=!1){return ke(this,null,function*(){let r=this.store.server().twoFaEnabled&&this.user.twoFaEnabled;if(e||r)return new Promise(n=>{let o=this.layout.openDialog(fs,"xs",{initialState:{withPassword:e,withTwoFaEnabled:r}},{keyboard:!1});o.content.isValid=a=>{n(a)}})})}checkQuota(e){if(!(e.isGuest||e.isLink)&&e.storageQuota){let r=Math.round(100/e.storageQuota*(e.storageQuota-e.storageUsage));r<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):r<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:r}),null,{disableTimeOut:!0,closeButton:!0}):r<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:r}),null,{disableTimeOut:!0,closeButton:!0})}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=vt({token:t,factory:t.\u0275fac,providedIn:"root"});let s=t;return s})();var js={provide:Pt,useExisting:at(()=>Qs),multi:!0},Qs=(()=>{let t=class t{constructor(){this.btnCheckboxTrue=!0,this.btnCheckboxFalse=!1,this.state=!1,this.isDisabled=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype}onClick(){this.isDisabled||(this.toggle(!this.state),this.onChange(this.value))}ngOnInit(){this.toggle(this.trueValue===this.value)}get trueValue(){return typeof this.btnCheckboxTrue<"u"?this.btnCheckboxTrue:!0}get falseValue(){return typeof this.btnCheckboxFalse<"u"?this.btnCheckboxFalse:!1}toggle(e){this.state=e,this.value=this.state?this.trueValue:this.falseValue}writeValue(e){this.state=this.trueValue===e,this.value=e?this.trueValue:this.falseValue}setDisabledState(e){this.isDisabled=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=J({type:t,selectors:[["","btnCheckbox",""]],hostVars:3,hostBindings:function(r,n){r&1&&v("click",function(){return n.onClick()}),r&2&&(Rt("aria-pressed",n.state),H("active",n.state))},inputs:{btnCheckboxTrue:"btnCheckboxTrue",btnCheckboxFalse:"btnCheckboxFalse"},features:[Nt([js])]});let s=t;return s})(),Js={provide:Pt,useExisting:at(()=>ds),multi:!0},ds=(()=>{let t=class t{get value(){return this.group?this.group.value:this._value}set value(e){if(this.group){this.group.value=e;return}this._value=e,this._onChange(e)}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}get controlOrGroupDisabled(){return this.disabled||this.group&&this.group.disabled?!0:void 0}get hasDisabledClass(){return this.controlOrGroupDisabled&&!this.isActive}get isActive(){return this.btnRadio===this.value}get tabindex(){if(!this.controlOrGroupDisabled)return this.isActive||this.group==null?0:-1}get hasFocus(){return this._hasFocus}constructor(e,r,n,o){this.el=e,this.cdr=r,this.renderer=n,this.group=o,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.uncheckable=!1,this.role="radio",this._disabled=!1,this._hasFocus=!1}toggleIfAllowed(){this.canToggle()&&(this.uncheckable&&this.btnRadio===this.value?this.value=void 0:this.value=this.btnRadio)}onSpacePressed(e){this.toggleIfAllowed(),e.preventDefault()}focus(){this.el.nativeElement.focus()}onFocus(){this._hasFocus=!0}onBlur(){this._hasFocus=!1,this.onTouched()}canToggle(){return!this.controlOrGroupDisabled&&(this.uncheckable||this.btnRadio!==this.value)}ngOnChanges(e){"uncheckable"in e&&(this.uncheckable=this.uncheckable!==!1&&typeof this.uncheckable<"u")}_onChange(e){if(this.group){this.group.value=e;return}this.onTouched(),this.onChange(e)}writeValue(e){this.value=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){if(this._disabled=e,e){this.renderer.setAttribute(this.el.nativeElement,"disabled","disabled");return}this.renderer.removeAttribute(this.el.nativeElement,"disabled")}};t.\u0275fac=function(r){return new(r||t)(Q(Tt),Q(ee),Q(Pe),Q(at(()=>ms),8))},t.\u0275dir=J({type:t,selectors:[["","btnRadio",""]],hostVars:8,hostBindings:function(r,n){r&1&&v("click",function(){return n.toggleIfAllowed()})("keydown.space",function(a){return n.onSpacePressed(a)})("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),r&2&&(Rt("aria-disabled",n.controlOrGroupDisabled)("aria-checked",n.isActive)("role",n.role)("tabindex",n.tabindex),H("disabled",n.hasDisabledClass)("active",n.isActive))},inputs:{btnRadio:"btnRadio",uncheckable:"uncheckable",value:"value",disabled:"disabled"},features:[Nt([Js]),Ie]});let s=t;return s})(),Xs={provide:Pt,useExisting:at(()=>ms),multi:!0},ms=(()=>{let t=class t{constructor(e){this.cdr=e,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.role="radiogroup",this._disabled=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get disabled(){return this._disabled}get tabindex(){return this._disabled?null:0}writeValue(e){this._value=e,this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.radioButtons&&(this._disabled=e,this.radioButtons.forEach(r=>{r.setDisabledState(e)}),this.cdr.markForCheck())}onFocus(){if(this._disabled)return;let e=this.getActiveOrFocusedRadio();if(e){e.focus();return}if(this.radioButtons){let r=this.radioButtons.find(n=>!n.disabled);r&&r.focus()}}onBlur(){this.onTouched&&this.onTouched()}selectNext(e){this.selectInDirection("next"),e.preventDefault()}selectPrevious(e){this.selectInDirection("previous"),e.preventDefault()}selectInDirection(e){if(this._disabled)return;function r(o,a){let E=(o+(e==="next"?1:-1))%a.length;return E<0&&(E=a.length-1),E}let n=this.getActiveOrFocusedRadio();if(n&&this.radioButtons){let o=this.radioButtons.toArray(),a=o.indexOf(n);for(let c=r(a,o);c!==a;c=r(c,o))if(o[c].canToggle()){o[c].toggleIfAllowed(),o[c].focus();break}}}getActiveOrFocusedRadio(){if(this.radioButtons)return this.radioButtons.find(e=>e.isActive)||this.radioButtons.find(e=>e.hasFocus)}};t.\u0275fac=function(r){return new(r||t)(Q(ee))},t.\u0275dir=J({type:t,selectors:[["","btnRadioGroup",""]],contentQueries:function(r,n,o){if(r&1&&Le(o,ds,4),r&2){let a;Ot(a=xt())&&(n.radioButtons=a)}},hostVars:2,hostBindings:function(r,n){r&1&&v("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()})("keydown.ArrowRight",function(a){return n.selectNext(a)})("keydown.ArrowDown",function(a){return n.selectNext(a)})("keydown.ArrowLeft",function(a){return n.selectPrevious(a)})("keydown.ArrowUp",function(a){return n.selectPrevious(a)}),r&2&&Rt("role",n.role)("tabindex",n.tabindex)},features:[Nt([Xs])]});let s=t;return s})(),cc=(()=>{let t=class t{static forRoot(){return{ngModule:t,providers:[]}}};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=kt({type:t}),t.\u0275inj=At({});let s=t;return s})();export{tr as a,er as b,Ci as c,Oi as d,Bo as e,we as f,hs as g,us as h,to as i,A as j,cs as k,ls as l,ps as m,Zt as n,j as o,Qa as p,Qs as q,cc as r};
|
package/static/chunk-FHLACA7V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-4YGJGZZZ.js";import{a as vt}from"./chunk-IPAC4VAF.js";import{b as Ct}from"./chunk-3GFGJYMK.js";import{l as ht,p as gt,q as _t,r as kt}from"./chunk-EWKSX76T.js";import{A as ze,Ea as he,Ia as de,Jb as fe,Kb as R,Lb as H,Mb as mt,Ob as dt,Pa as st,Qb as ut,Sb as ft,T as ee,Tb as St,_a as at,ab as lt,ob as L,rb as ct,v as Ge,w as Ze,xa as rt,y as Ye,z as Xe,zb as B}from"./chunk-XLCCZSQL.js";import{d as Y}from"./chunk-ORMRCEGT.js";import{$b as Le,Ad as Q,Cb as w,Eb as u,G as oe,Gc as Te,Gd as J,Hd as We,L as ve,Ld as Qe,Ma as l,Mb as we,Nb as K,Ob as x,Of as ot,Pb as p,Pc as Z,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,_c as X,ad as De,bb as re,bd as Ne,ca as P,cb as Ae,dc as C,dd as z,de as Je,f as ke,fa as ye,fc as v,fd as Re,fe as et,fg as ue,ga as j,gd as Pe,gg as pt,ha as S,hd as me,hg as N,jb as _,jd as f,kb as k,kd as Fe,lb as Ie,ld as Me,ma as F,md as $e,na as M,nb as se,ob as ae,od as Oe,of as it,p as V,pa as be,pb as m,pd as Be,qb as s,qd as He,rb as a,rd as Ue,sb as d,sd as Ve,t as Ce,td as Ke,v as b,va as Ee,we as tt,wf as nt,yd as qe,zb as G,zd as je}from"./chunk-ATP3BFHV.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center","overflow-wrap-and-whitespace"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(Ct),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new St({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:dt.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(gt),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ft(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=ut(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,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"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["bsDatepicker","","id","expiration","formControlName","expiresAt","placement","left","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column","overflow-wrap-and-whitespace","me-2"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Never expires",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,kt,_t,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,ht,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
|
package/static/chunk-GCATNU55.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as q,C as $e}from"./chunk-5K7HEX3C.js";import"./chunk-QNJFQVYI.js";import{a as L}from"./chunk-PTGDOWV3.js";import"./chunk-JXZCNFW7.js";import"./chunk-5KLMS6A4.js";import{a as ke}from"./chunk-IQOALFYU.js";import{d as Fe}from"./chunk-DJYJ66UF.js";import"./chunk-ZKCFO2OA.js";import{a as z,b as Q,c as Me,d as Ee}from"./chunk-TKTCBDOG.js";import{b as Ae,c as Pe}from"./chunk-FHLACA7V.js";import{b as Re}from"./chunk-4YGJGZZZ.js";import"./chunk-IPAC4VAF.js";import"./chunk-3GFGJYMK.js";import"./chunk-EWKSX76T.js";import{B as re,Jb as ve,Kb as Te,Lb as Ve,Na as U,Ta as Se,_a as we,nb as ye,ra as fe,sa as xe,ta as ge,v as ne,w as oe,zb as be}from"./chunk-XLCCZSQL.js";import{m as De}from"./chunk-22EANI6R.js";import{b as Y}from"./chunk-ORMRCEGT.js";import{Ad as ee,Cb as u,Eb as a,Ga as H,Gc as X,Gd as te,Hd as ie,Ib as E,Id as ae,Jb as F,Jf as _e,Kb as k,L as I,Lf as me,Ma as r,Mb as V,Nb as P,Nd as le,Ob as O,Pb as C,Qb as v,Rb as N,Sb as j,Xa as K,Xe as ce,Xf as ue,Yb as G,Yd as se,Yf as he,_b as J,_c as Z,ab as T,bg as Ce,dc as S,fc as w,ha as M,ib as W,jb as y,kb as b,ma as d,na as _,nb as D,ob as R,pb as m,qb as s,rb as p,rf as pe,sb as h,sf as de,zb as g}from"./chunk-ATP3BFHV.js";import{a as B}from"./chunk-RTRJ3KFH.js";var $=class{constructor(l){this.syncs=[],this.newly=0,Object.assign(this,l),Re(this),this.hTimeAgo=(0,re.default)(this.createdAt).fromNow(!0),this.newly=Se(this.createdAt)}fallBackMimeUrl(){this.mimeUrl=De}};var Oe=["MainContextMenu"],Ne=["TargetContextMenu"],Ue=()=>["shares"],Be=(t,l)=>l.id,Ie=(t,l)=>l.key;function ze(t,l){if(t&1&&(s(0,"span",31),C(1),p()),t&2){let e=a().$implicit,n=a(2);V("font-size",n.galleryMode.textSize,"px"),r(),v(e.hTimeAgo)}}function Qe(t,l){if(t&1){let e=g();s(0,"div",32),u("click",function(){d(e);let o=a().$implicit,i=a(2);return _(i.openChildShareDialog(o))}),h(1,"fa-icon",33),s(2,"span"),C(3),p()()}if(t&2){let e=a().$implicit,n=a(2);V("font-size",n.galleryMode.textSize,"px"),r(),m("icon",n.icons.SHARED),r(2),v(e.counts.shares)}}function Le(t,l){if(t&1){let e=g();s(0,"div",21),u("click",function(){let o=d(e).$implicit,i=a(2);return _(i.onSelect(o))})("contextmenu",function(o){let i=d(e).$implicit,c=a(2);return _(c.onTargetContextMenu(o,i))})("pressup",function(o){let i=d(e).$implicit,c=a(2);return _(c.onTargetContextMenu(o,i))})("tap",function(){d(e);let o=a(2);return _(o.openShareDialog())}),s(1,"div",22)(2,"img",23),u("error",function(){let o=d(e).$implicit;return _(o.fallBackMimeUrl())}),p(),s(3,"span",24),y(4,ze,2,3,"span",25),p(),y(5,Qe,4,4,"div",26),s(6,"span",27),h(7,"app-share-repository",28),p()(),s(8,"div",29)(9,"span",30),C(10),p()()()}if(t&2){let e=l.$implicit,n=l.$index,o=a(2);V("height",o.galleryMode.dimensions,"px")("width",o.galleryMode.dimensions,"px"),P("disabled",!e.enabled)("selected",e.id===(o.selected==null?null:o.selected.id)),r(),W("rowIndex",n),r(),m("src",e.mimeUrl,H)("height",o.galleryMode.image)("width",o.galleryMode.image),r(2),b(e.newly?4:-1),r(),b(e.counts.shares?5:-1),r(2),m("share",e)("galleryMode",o.galleryMode),r(2),V("font-size",o.galleryMode.textSize,"px"),r(),v(e.name)}}function qe(t,l){if(t&1){let e=g();s(0,"div",12)(1,"app-virtual-scroll",18),S(2,"searchFilter"),u("contextmenu",function(o){d(e);let i=a();return _(i.onContextMenu(o))}),s(3,"div",19),D(4,Le,11,19,"div",20,Be),p()()()}if(t&2){let e=a();r(),m("childHeight",e.galleryMode.dimensions)("childWidth",e.galleryMode.dimensions)("items",w(2,5,e.shares,e.inputFilter.search()))("galleryMode",!0)("resizeOffset",110),r(3),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function Ke(t,l){if(t&1&&h(0,"fa-icon",6),t&2){let e=a(4);m("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function We(t,l){if(t&1){let e=g();s(0,"th",39),u("click",function(){d(e);let o=a().$implicit,i=a(2);return _(i.sortBy(o.key))}),C(1),y(2,Ke,1,1,"fa-icon",6),p()}if(t&2){let e=a().$implicit,n=a(2);O(e.value.class),V("width",e.value.width,"%"),P("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),r(),N(" ",e.value.label," "),r(),b(n.sortTable.sortParam.column===e.key?2:-1)}}function je(t,l){if(t&1&&y(0,We,3,10,"th",38),t&2){let e=l.$implicit;b(e.value.show?0:-1)}}function Ge(t,l){if(t&1){let e=g();s(0,"div",42)(1,"img",44),u("error",function(){d(e);let o=a(3).$implicit;return _(o.fallBackMimeUrl())}),p(),s(2,"div",45)(3,"span",30),C(4),p(),s(5,"span",46),C(6),p()()()}if(t&2){let e=a(3).$implicit;r(),m("src",e.mimeUrl,H),r(3),v(e.name),r(2),v(e.description)}}function Je(t,l){if(t&1&&h(0,"app-share-repository",43),t&2){let e=a(3).$implicit;m("share",e)}}function Xe(t,l){if(t&1&&(s(0,"span"),C(1),S(2,"joinCounts"),p()),t&2){let e=a(3).$implicit;r(),v(w(2,1,e.counts,J(4,Ue)))}}function Ye(t,l){if(t&1){let e=g();s(0,"span",49),u("click",function(){d(e);let o=a(4).$implicit,i=a(2);return _(i.openChildShareDialog(o))}),h(1,"fa-icon",33),s(2,"span"),C(3),p()()}if(t&2){let e=a(4).$implicit,n=a(2);r(),m("icon",n.icons.SHARED),r(2),v(e.counts.shares)}}function Ze(t,l){if(t&1){let e=g();s(0,"span",50),u("click",function(){d(e);let o=a(4).$implicit,i=a(2);return _(i.goToComments(o))}),h(1,"fa-icon",6),p()}if(t&2){let e=a(6);r(),m("icon",e.icons.faCommentDots)}}function et(t,l){if(t&1&&(y(0,Ye,4,2,"span",47),y(1,Ze,2,1,"span",48)),t&2){let e=a(3).$implicit;b(e.counts.shares?0:-1),r(),b(e.hasComments?1:-1)}}function tt(t,l){if(t&1&&C(0),t&2){let e=a(3).$implicit;N(" ",e.hTimeAgo," ")}}function it(t,l){if(t&1&&(s(0,"td"),y(1,Ge,7,3,"div",42)(2,Je,1,1,"app-share-repository",43)(3,Xe,3,5,"span")(4,et,2,2)(5,tt,1,1),p()),t&2){let e,n=a().$implicit,o=a().$implicit;O(G("",n.value.class," ",n.value.newly?"prop-newly-"+o[n.value.newly]:"")),V("width",n.value.width,"%"),P("text-align-center",n.value.textCenter),r(),b((e=n.key)==="name"?1:e==="from"?2:e==="members"?3:e==="infos"?4:e==="created"?5:-1)}}function nt(t,l){if(t&1&&y(0,it,6,9,"td",41),t&2){let e=l.$implicit;b(e.value.show?0:-1)}}function ot(t,l){if(t&1){let e=g();s(0,"tr",40),u("click",function(){let o=d(e).$implicit,i=a(2);return _(i.onSelect(o))})("contextmenu",function(o){let i=d(e).$implicit,c=a(2);return _(c.onTargetContextMenu(o,i))})("pressup",function(o){let i=d(e).$implicit,c=a(2);return _(c.onTargetContextMenu(o,i))})("tap",function(){d(e);let o=a(2);return _(o.openShareDialog())}),D(1,nt,1,1,null,null,Ie),S(3,"keyvalue"),p()}if(t&2){let e=l.$implicit,n=a(2);P("disabled",!e.enabled)("selected",e.id===(n.selected==null?null:n.selected.id)),r(),R(w(3,4,n.tableHeaders,n.originalOrderKeyValue))}}function rt(t,l){if(t&1){let e=g();s(0,"table",34)(1,"thead")(2,"tr"),D(3,je,1,1,null,null,Ie),S(5,"keyvalue"),p()()(),s(6,"app-virtual-scroll",35),S(7,"searchFilter"),u("contextmenu",function(o){d(e);let i=a();return _(i.onContextMenu(o))}),s(8,"table",34)(9,"tbody",36),D(10,ot,4,7,"tr",37,Be),p()()()}if(t&2){let e=a();r(3),R(w(5,2,e.tableHeaders,e.originalOrderKeyValue)),r(3),m("bufferAmount",5)("items",w(7,5,e.shares,e.inputFilter.search())),r(4),R(e.scrollView==null?null:e.scrollView.viewPortItems)}}function at(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"New share"),p()),t&2){let e=a();r(),m("icon",e.icons.faPlus)}}function lt(t,l){}function st(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"Refresh"),p()),t&2){let e=a();r(),m("icon",e.icons.faArrowRotateRight)}}function ct(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"Go to"),p()),t&2){let e=a();r(),m("icon",e.icons.faMapMarkerAlt)}}function pt(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"Edit"),p()),t&2){let e=a();r(),m("icon",e.icons.faPen)}}function dt(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"Edit children shares"),p()),t&2){let e=a(2);r(),m("icon",e.icons.SHARED)}}function _t(t,l){if(t&1){let e=g();T(0,dt,3,1,"ng-template",15),u("execute",function(){d(e);let o=a();return _(o.openChildShareDialog())})}}function mt(t,l){}function ut(t,l){if(t&1&&(s(0,"span",51),h(1,"fa-icon",6),C(2,"Informations"),p()),t&2){let e=a();r(),m("icon",e.icons.faCircleInfo)}}var Xt=(()=>{let l=class l{constructor(){this.locale=M(ee),this.layout=M(be),this.icons={SHARED:Te.SHARED_WITH_OTHERS,faArrowRotateRight:me,faArrowDown:ue,faArrowUp:ce,faRotate:ae,faPlus:_e,faMinus:le,faPen:pe,faEllipsisH:se,faMapMarkerAlt:he,faCircleInfo:Ce,faCommentDots:de},this.originalOrderKeyValue=we,this.TAB_MENU=U,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},infos:{label:"Infos",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=M(Y),this.store=M(ye),this.sharesService=M(Pe),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],created:[{prop:"createdAt",type:"date"}]},this.sortTable=new Ee(this.constructor.name,this.sortSettings),this.loadShares(),this.activatedRoute.queryParams.subscribe(n=>this.focusOnSelect=n.select),this.layout.setBreadcrumbIcon(this.icons.SHARED),this.layout.setBreadcrumbNav({url:`/${Ve.SHARED}/${ve.SHARED_WITH_OTHER}`,translating:!0,sameLink:!0})}ngOnInit(){this.galleryMode=this.btnNavigationView.currentView()}loadShares(){this.loading=!0,this.onSelect(),this.sharesService.listShares().subscribe({next:n=>{this.sortBy(this.sortTable.sortParam.column,!1,n.map(o=>new $(o))),this.loading=!1,this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1)},error:n=>{this.shares=[],this.loading=!1,this.layout.sendNotification("error","Shares",n.error.message)}})}sortBy(n,o=!0,i){this.shares=this.sortTable.sortBy(n,o,i||this.shares)}onSelect(n=null){this.selected=n,this.store.shareSelection.set(this.selected)}openShareDialog(n=!1){n?this.layout.openDialog(q,"lg").content.shareChange.pipe(I(1)).subscribe(i=>{let[c,f]=i;c==="add"&&(this.focusOnSelect=f.name,this.loadShares())}):this.sharesService.getShare(this.selected.id).subscribe({next:o=>{this.layout.openDialog(q,"lg",{initialState:{share:o}}).content.shareChange.pipe(I(1)).subscribe(c=>{let[f,x]=c;if(f==="update"){this.selected.name=x.name,this.selected.alias=x.alias,this.selected.description=x.description,this.selected.modifiedAt=x.modifiedAt,this.selected.enabled=x.enabled;let A={users:0,groups:0,links:x.links.length};for(let He of x.members)He.isUser?A.users++:A.groups++;this.selected.counts=B(B({},this.selected.counts),A)}else f==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.shares.filter(A=>A.id!==x.id)))})},error:o=>this.layout.sendNotification("error","Edit share",this.selected.name,o)})}openChildShareDialog(n){n&&this.onSelect(n),this.layout.openDialog($e,null,{initialState:{share:this.selected}}).content.sharesCountEvent.subscribe(i=>this.selected.counts.shares=i)}onContextMenu(n){n.preventDefault(),n.stopPropagation(),this.layout.openContextMenu(n,this.mainContextMenu)}onTargetContextMenu(n,o){n.preventDefault(),n.type==="contextmenu"&&n.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(n,this.targetContextMenu)}goTo(n){n=n||this.selected,this.sharesService.goTo(n).catch(console.error)}goToComments(n){this.sharesService.goTo(n).then(()=>this.layout.showRSideBarTab(U.COMMENTS,!0))}focusOn(n){let o=this.shares.find(i=>i.name===n);o&&(setTimeout(()=>this.scrollView.scrollInto(o),100),this.onSelect(o))}};l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=K({type:l,selectors:[["app-shared"]],viewQuery:function(o,i){if(o&1&&(E(Q,5),E(z,7),E(L,7),E(Oe,7),E(Ne,7)),o&2){let c;F(c=k())&&(i.scrollView=c.first),F(c=k())&&(i.inputFilter=c.first),F(c=k())&&(i.btnNavigationView=c.first),F(c=k())&&(i.mainContextMenu=c.first),F(c=k())&&(i.targetContextMenu=c.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","pressup","tap"],[1,"card-body"],["alt","","draggable","true",3,"error","src","height","width"],[1,"label-top-right"],["l10nTranslate","",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"],["l10nTranslate","",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","pressup","tap"],[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,i){if(o&1){let c=g();s(0,"div",2)(1,"button",3),S(2,"translate"),u("click",function(){return d(c),_(i.loadShares())}),h(3,"fa-icon",4),p(),s(4,"button",5),S(5,"translate"),u("click",function(){return d(c),_(i.openShareDialog(!0))}),h(6,"fa-icon",6),p(),s(7,"button",7),S(8,"translate"),u("click",function(){return d(c),_(i.openShareDialog())}),h(9,"fa-icon",6),p(),s(10,"button",7),S(11,"translate"),u("click",function(){return d(c),_(i.openChildShareDialog())}),h(12,"fa-icon",6),p(),s(13,"button",7),S(14,"translate"),u("click",function(){return d(c),_(i.goTo())}),h(15,"fa-icon",6),p(),s(16,"div",8)(17,"div",9),h(18,"app-input-filter",10),p(),s(19,"app-navigation-view",11),u("sortBy",function(x){return d(c),_(i.sortBy(x))})("switchView",function(x){return d(c),_(i.galleryMode=x)}),p()()(),y(20,qe,6,8,"div",12)(21,rt,12,8),s(22,"div",13)(23,"span",14),C(24),S(25,"translate"),p()(),s(26,"context-menu",null,0),T(28,at,3,1,"ng-template",15),u("execute",function(){return d(c),_(i.openShareDialog(!0))}),T(29,lt,0,0,"ng-template",16)(30,st,3,1,"ng-template",15),u("execute",function(){return d(c),_(i.loadShares())}),p(),s(31,"context-menu",null,1),T(33,ct,3,1,"ng-template",15),u("execute",function(){return d(c),_(i.goTo())}),T(34,pt,3,1,"ng-template",15),u("execute",function(){return d(c),_(i.openShareDialog())}),y(35,_t,1,0,null,17),T(36,mt,0,0,"ng-template",16)(37,ut,3,1,"ng-template",15),u("execute",function(){return d(c),_(i.layout.showRSideBarTab(i.TAB_MENU.SELECTION))}),p()}o&2&&(r(),m("tooltip",w(2,22,"Refresh",i.locale.language)),r(2),m("icon",i.icons.faArrowRotateRight)("animation",i.loading?"spin":null),r(),m("tooltip",w(5,25,"New share",i.locale.language)),r(2),m("icon",i.icons.faPlus),r(),m("disabled",!i.selected)("tooltip",w(8,28,"Edit share",i.locale.language)),r(2),m("icon",i.icons.faPen),r(),m("disabled",!(i.selected!=null&&i.selected.counts.shares))("tooltip",w(11,31,"Edit children shares",i.locale.language)),r(2),m("icon",i.icons.SHARED),r(),m("disabled",!i.selected)("tooltip",w(14,34,"Go to",i.locale.language)),r(2),m("icon",i.icons.faMapMarkerAlt),r(4),m("sortParams",i.sortTable.sortParam)("sortFields",i.btnSortFields),r(),b(i.galleryMode!=null&&i.galleryMode.enabled?20:21),r(4),j("",i.shares.length," ",w(25,37,"shares",i.locale.language)),r(5),m("divider",!0),r(6),b(i.selected!=null&&i.selected.counts.shares?35:-1),r(),m("divider",!0))},dependencies:[Z,ie,L,z,oe,ne,Q,Fe,ge,xe,fe,Ae,X,te,Me,ke],encapsulation:2});let t=l;return t})();export{Xt as SharedComponent};
|
package/static/chunk-GYODPCIE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as B}from"./chunk-FHLACA7V.js";import"./chunk-4YGJGZZZ.js";import"./chunk-IPAC4VAF.js";import"./chunk-3GFGJYMK.js";import"./chunk-EWKSX76T.js";import{Kb as A}from"./chunk-XLCCZSQL.js";import{c as I,d as M,h as R,k as j,m as z}from"./chunk-22EANI6R.js";import{b as P,e as w}from"./chunk-ORMRCEGT.js";import{Ad as E,Cb as _,Eb as c,Ga as h,Gd as T,Hd as D,Ma as a,Pb as m,Qb as v,Sb as b,Xa as L,_c as y,dc as x,fc as C,ha as u,jb as f,kb as k,ma as g,na as S,pb as p,qb as o,rb as r,sb as d,zb as U}from"./chunk-ATP3BFHV.js";import"./chunk-RTRJ3KFH.js";function N(e,i){if(e&1){let t=U();o(0,"img",14),_("error",function(){g(t);let s=c();return S(s.fallBackMimeUrl())}),r()}if(e&2){let t=c();p("src",t.mimeUrl,h)}}function V(e,i){if(e&1&&d(0,"fa-icon",7),e&2){let t=c();p("icon",t.icons.SPACES)("fixedWidth",!1)}}function F(e,i){if(e&1&&(d(0,"img",15),o(1,"span",16),m(2),r()),e&2){let t=c();p("src",t.link.owner.avatar,h),a(2),v(t.link.owner.fullName)}}function O(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this space"),r())}function W(e,i){if(e&1&&(o(0,"span"),m(1),x(2,"translate"),x(3,"translate"),r()),e&2){let t=c();a(),b("",C(2,2,"share with you this",t.locale.language)," ",C(3,5,t.link.share.isDir?"directory":"file",t.locale.language))}}function Y(e,i){e&1&&(o(0,"span",13),m(1,"You have been invited to join this share"),r())}var ie=(()=>{let i=class i{constructor(){this.locale=u(E),this.icons={SPACES:A.SPACES},this.logoUrl=j,this.mimeUrl=null,this.activatedRoute=u(P),this.linksService=u(B),this.activatedRoute.params.subscribe(n=>this.linkUUID=n.uuid),this.activatedRoute.data.subscribe(n=>this.setLink(n.link))}setLink(n){n.space||(this.mimeUrl=R(n.share.isDir?n.share.hasParent?M:I:n.share.mime)),this.link=n}followLink(){this.linksService.linkAccess(this.linkUUID,this.link)}fallBackMimeUrl(){this.mimeUrl=z}};i.\u0275fac=function(s){return new(s||i)},i.\u0275cmp=L({type:i,selectors:[["app-public-link"]],decls:18,vars:5,consts:[[1,"link-page"],[1,"header"],["routerLink",""],["alt","","height","40",3,"src"],[1,"d-flex","flex-column","align-content-center"],[1,"resource","d-flex","flex-column","align-items-center","mt-3","mx-auto","cursor-pointer",3,"click"],["alt","","height","96",1,"no-select-pointer",3,"src"],[1,"circle-primary-icon",2,"min-width","128px","min-height","128px","font-size","64px",3,"icon","fixedWidth"],[1,"error-code"],[1,"error-text","no-select"],[1,"hr"],[1,"d-flex","justify-content-center","align-items-center"],[1,"solve"],["l10nTranslate",""],["alt","","height","96",1,"no-select-pointer",3,"error","src"],["alt","","width","42","height","42",1,"avatar-base-img","me-3",3,"src"],[1,"oops","me-2"]],template:function(s,l){s&1&&(o(0,"div",0)(1,"div",1)(2,"a",2),d(3,"img",3),r()(),o(4,"div",4)(5,"div",5),_("click",function(){return l.followLink()}),f(6,N,1,1,"img",6)(7,V,1,2,"fa-icon",7),o(8,"span",8),m(9),r()()(),o(10,"div",9),d(11,"span",10),o(12,"div",11),f(13,F,3,2),o(14,"span",12),f(15,O,2,0,"span",13)(16,W,4,8,"span")(17,Y,2,0,"span",13),r()()()()),s&2&&(a(3),p("src",l.logoUrl,h),a(3),k(l.mimeUrl?6:7),a(3),v((l.link.share==null?null:l.link.share.name)||(l.link.space==null?null:l.link.space.name)),a(4),k(l.link.owner?13:-1),a(2),k(l.link.space?15:l.link.owner?16:17))},dependencies:[w,y,D,T],encapsulation:2});let e=i;return e})();export{ie as PublicLinkComponent};
|
package/static/chunk-HZTFYLM5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ue,b as z,c as we,d as Ct}from"./chunk-N2WFNW6M.js";import{b as R,c as _t}from"./chunk-RSSWH3S2.js";import{a as S,b as Y,c as tt,e as dt}from"./chunk-SIPE37PA.js";import{a as bt}from"./chunk-IQOALFYU.js";import{a as ft,b as ht,c as gt}from"./chunk-DJYJ66UF.js";import{a as _e,b as mt,c as pt,d as ct,h as ut}from"./chunk-ZKCFO2OA.js";import{a as Ge,b as Se,c as lt,d as st}from"./chunk-TKTCBDOG.js";import"./chunk-3GFGJYMK.js";import{m as rt,q as at}from"./chunk-EWKSX76T.js";import{M as Ze,N as K,O as et,Ob as xe,Tb as ye,Wa as ve,_a as de,ra as it,sa as nt,ta as ot,v as je,wa as H,zb as V}from"./chunk-XLCCZSQL.js";import{b as Me,d as Pe}from"./chunk-ORMRCEGT.js";import{Ad as oe,Ae as Qe,Cb as _,Cf as ze,E as be,Eb as u,Ef as Ye,Ga as J,Gc as te,Gd as re,Hd as P,Ib as Q,Id as Ke,Jb as q,Je as se,Jf as ce,Kb as W,L as O,Lf as Je,Ma as s,Mb as Ce,Nb as U,Nd as ae,Ob as k,Pb as m,Qb as C,Rb as $,Sb as Ee,Sd as He,Tb as X,Ub as Z,Ue as qe,Vb as ee,Xa as E,Xb as Ae,Xe as We,Xf as Xe,Yb as De,_c as M,ab as T,ad as Ve,bb as I,bd as Re,ce as le,dc as v,dd as Fe,ec as D,fc as w,fd as L,gd as Ue,ha as x,hd as ke,jb as h,jd as j,kb as g,kd as ie,ma as y,na as G,nb as B,ob as N,od as Oe,pb as c,pd as Ie,qb as r,qd as Be,rb as a,rd as Ne,rf as me,sb as d,sd as $e,yd as ne,zb as A,zd as Le,zf as pe}from"./chunk-ATP3BFHV.js";import{a as he,b as ge}from"./chunk-RTRJ3KFH.js";var vt=(()=>{let l=class l{constructor(){this.currentMemberIds=[],this.hasChanges=new I,this.layout=x(V),this.newMembers=[],this.submitted=!1,this.icons={faUserPlus:se},this.adminService=x(R)}searchMembers(o){let n={search:o,onlyUsers:!0,usersRole:this.parentGroup.type===ue.USER?Ze.USER:void 0,ignoreUserIds:[...this.currentMemberIds,...this.newMembers.map(e=>e.id)]};return this.adminService.searchMembers(n)}onSubmit(){this.submitted=!0,this.adminService.addUsersToGroup(this.parentGroup.id,this.newMembers.map(o=>o.id)).subscribe({next:()=>{this.hasChanges.emit(!0),this.layout.sendNotification("success","Add members",this.newMembers.map(o=>o.name).join("<br>"),null,{enableHtml:!0}),this.layout.closeDialog()},error:o=>{this.submitted=!1,this.layout.sendNotification("error","Add members",this.newMembers.map(n=>n.name).join("<br>"),o,{enableHtml:!0})}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-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(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Add members"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"app-user-search",7),ee("membersChange",function(f){return Z(e.newMembers,f)||(e.newMembers=f),f}),a()(),r(11,"div",8)(12,"button",9),_("click",function(){return e.layout.closeDialog()}),m(13,"Cancel"),a(),r(14,"button",10),_("click",function(){return e.onSubmit()}),m(15," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPlus),s(2),C(e.parentGroup.name),s(6),X("members",e.newMembers),c("withPermissions",!1)("customPlaceholder","Type to search for users to add")("searchFunction",e.searchMembers.bind(e)),s(4),c("disabled",e.submitted||!e.newMembers.length))},dependencies:[M,P,ut],encapsulation:2});let t=l;return t})();function wt(t,l){if(t&1&&d(0,"img",9),t&2){let i=u();c("src",i.member.avatarUrl,J)}}function Tt(t,l){if(t&1&&d(0,"fa-icon",15),t&2){let i=u();k(i.member.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",i.icons.GROUPS)}}function Et(t,l){if(t&1&&(r(0,"div",7)(1,"span",16),m(2,"from the group"),a(),r(3,"span",11),m(4),v(5,"capitalize"),a()()),t&2){let i=u();s(4),C(D(5,1,i.parentGroup.name))}}function At(t,l){t&1&&(r(0,"small",4),m(1,"Only the group will be deleted, the members will no longer be part of it."),a())}var xt=(()=>{let l=class l{constructor(){this.wasDeleted=new I,this.submitted=!1,this.icons={GROUPS:H.GROUPS,faMinus:ae,faUserMinus:pe},this.layout=x(V),this.adminService=x(R)}onSubmit(){this.submitted=!0;let o=this.member.isUser?"Remove from group":"Delete group";(this.member.isUser?this.adminService.removeUserFromGroup(this.parentGroup.id,this.member.id):this.adminService.deleteGroup(this.member.id)).subscribe({next:()=>{this.wasDeleted.emit(!0),this.layout.sendNotification("success",o,this.member.name),this.onClose()},error:e=>{this.submitted=!1,this.layout.sendNotification("error",o,this.member.name,e)}})}onClose(){this.wasDeleted.emit(!1),this.layout.closeDialog()}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-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"],[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"],["l10nTranslate","",1,"mx-1"]],template:function(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7),a()(),r(8,"button",5),_("click",function(){return e.onClose()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8),h(12,wt,1,1,"img",9)(13,Tt,1,3,"fa-icon",10),a(),r(14,"span",11),m(15),v(16,"capitalize"),a(),r(17,"span",4),m(18,"will be removed"),a(),h(19,Et,6,3,"div",7),a(),h(20,At,2,0,"small",4),a(),r(21,"div",12)(22,"button",13),_("click",function(){return e.onClose()}),m(23,"Cancel"),a(),r(24,"button",14),_("click",function(){return e.onSubmit()}),m(25," Remove "),a()()),n&2&&(s(2),c("icon",e.member.isUser?e.icons.faUserMinus:e.icons.faMinus),s(2),C(e.member.name),s(3),C(e.member.isUser?"Remove from group":"Delete group"),s(5),g(e.member.isUser?12:13),s(3),C(D(16,8,e.member.name)),s(4),g(e.member.isUser?19:-1),s(),g(e.member.isGroup?20:-1),s(4),c("disabled",e.submitted))},dependencies:[M,P,dt],encapsulation:2});let t=l;return t})();var Dt=(t,l)=>l.value;function Mt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span"),m(2),a()),t&2){let i=u();c("icon",i.icons.faPen),s(2),C(i.group.name)}}function Pt(t,l){if(t&1&&(d(0,"fa-icon",31),r(1,"span",23),m(2,"New group"),a()),t&2){let i=u();c("icon",i.icons.faPlus)}}function Vt(t,l){t&1&&(r(0,"h4",2)(1,"span",23),m(2,"Edit group"),a()())}function Rt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Settings"),a()),t&2){let i=u();c("icon",i.icons.faCog)}}function Ft(t,l){if(t&1&&(r(0,"option",21),m(1),a()),t&2){let i=l.$implicit;c("ngValue",i.value),s(),C(i.key)}}function Ut(t,l){t&1&&(r(0,"span",23),m(1,"All users can see this group."),a())}function kt(t,l){t&1&&(r(0,"span",23),m(1,"Users who are not members of this group cannot see it."),a())}function Ot(t,l){t&1&&(r(0,"span",23),m(1,"The group is not visible, its members cannot see it and cannot see each other."),a())}function It(t,l){if(t&1&&(r(0,"div",24)(1,"div",18)(2,"label",34),m(3,"Creation date"),a(),r(4,"div",35),m(5),v(6,"amDateFormat"),a()(),r(7,"div",36)(8,"label",37),m(9,"Modification date"),a(),r(10,"div",38),m(11),v(12,"amDateFormat"),a()()()),t&2){let i=u();s(5),C(D(6,2,i.group.createdAt)),s(6),C(D(12,4,i.group.modifiedAt))}}function Bt(t,l){if(t&1&&(d(0,"fa-icon",32),r(1,"span",33),m(2,"Permissions"),a()),t&2){let i=u();c("icon",i.icons.faShieldHalved)}}var Te=(()=>{let l=class l{constructor(){this.group=null,this.parentGroup=null,this.groupChange=new I,this.locale=x(oe),this.layout=x(V),this.icons={GROUPS:H.GROUPS,faPen:me,faPlus:ce,faCog:qe,faShieldHalved:Ye},this.submitted=!1,this.originalOrderKeyValue=de,this.allVisibilities={Visible:z.VISIBLE,Private:z.PRIVATE,Isolated:z.ISOLATED},this.adminService=x(R)}ngOnInit(){this.groupForm=new ke({name:new j(this.group?.name||"",Fe.required),description:new j(this.group?.description||""),visibility:new j(this.group?.visibility||z.VISIBLE),applications:new j(this.group?.applications||[]),parent:new j(this.parentGroup)})}updateApplications(o){this.groupForm.controls.applications.setValue(o),this.groupForm.controls.applications.markAsDirty()}onSetParent(o){this.groupForm.controls.parent.setValue(o?{id:o.id,name:o.name}:null),this.groupForm.controls.parent.markAsDirty()}searchGroups(o){let n={search:o,onlyGroups:!0,excludePersonalGroups:!0,ignoreGroupIds:this.groupForm.value.parent?[this.groupForm.value.parent.id]:[]};return this.adminService.searchMembers(n,!0)}onSubmit(){if(this.submitted=!0,this.group?.id){let o=this.makeDto();this.adminService.updateGroup(this.group.id,o).subscribe({next:n=>{this.groupChange.emit(["update",n]),this.layout.sendNotification("success","Group updated",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}else{let o=this.makeDto(!0);this.adminService.createGroup(o).subscribe({next:n=>{this.groupChange.emit(["add",n]),this.layout.sendNotification("success","Group created",this.groupForm.value.name),this.layout.closeDialog()},error:n=>this.onError(n)})}}makeDto(o=!1){let n;o?n=Object.fromEntries(Object.keys(this.groupForm.controls).map(e=>[e,this.groupForm.controls[e].value])):n=Object.fromEntries(Object.keys(this.groupForm.controls).filter(e=>this.groupForm.controls[e].dirty).map(e=>[e,this.groupForm.controls[e].value]));for(let e in n)switch(e){case"applications":n.permissions=n[e].join(et),delete n.applications;break;case"parent":n.parentId=n[e]?n[e].id:null,delete n.parent;break}return n}onError(o){this.layout.sendNotification("error","Group error",this.groupForm.value.name,o),this.submitted=!1}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-group-dialog"]],inputs:{group:"group",parentGroup:"parentGroup"},outputs:{groupChange:"groupChange"},decls:50,vars:24,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body","form-validation",3,"formGroup"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","flex-column"],[1,"d-flex","col-12","pb-3"],[1,"flex-fill","col-6","pe-4"],["for","name","l10nTranslate",""],["id","name","appAutofocus","","formControlName","name","autocomplete","off","type","text",1,"form-control","form-control-sm",3,"autoSelect"],[1,"flex-fill","col-6","ps-4"],["for","description","l10nTranslate",""],["id","description","formControlName","description","autocomplete","off","type","text",1,"form-control","form-control-sm"],[1,"d-flex","flex-column","align-items-start","col-12","pb-3"],[1,"col-6","pe-4"],["for","visibility","l10nTranslate",""],["id","visibility","formControlName","visibility",1,"form-control","form-select","form-select-sm"],["l10nTranslate","",3,"ngValue"],[1,"d-none","d-sm-block","fst-italic","fs-xxs"],["l10nTranslate",""],[1,"d-flex","align-items-start","col-12","pb-3"],["for","parent","translate",""],["id","parent",3,"data","searchFunction","active","itemIcon","placeholder"],[3,"permissionsChange","permissions"],[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"],[1,"me-2",3,"icon"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-end","col-6","ps-4"],["for","modified","l10nTranslate",""],["id","modified"]],template:function(n,e){if(n&1&&(r(0,"div",0)(1,"h4",1),h(2,Mt,3,2)(3,Pt,3,1),a(),h(4,Vt,3,0,"h4",2),r(5,"button",3),_("click",function(){return e.layout.closeDialog()}),a()(),r(6,"div",4)(7,"tabset",5),d(8,"hr",6),r(9,"tab",7),_("selectTab",function(){return e.tabView=null}),T(10,Rt,3,1,"ng-template",8),r(11,"div",9)(12,"div",10)(13,"div",11)(14,"label",12),m(15,"Name"),a(),d(16,"input",13),a(),r(17,"div",14)(18,"label",15),m(19,"Description"),a(),d(20,"input",16),a()(),r(21,"div",17)(22,"div",18)(23,"label",19),m(24,"Visibility"),a(),r(25,"select",20),B(26,Ft,2,2,"option",21,Dt),v(28,"keyvalue"),a()(),r(29,"div",22),h(30,Ut,2,0,"span",23)(31,kt,2,0,"span",23)(32,Ot,2,0,"span",23),a()(),r(33,"div",24)(34,"div",18)(35,"label",25),m(36,"Parent group"),a(),r(37,"app-select",26),v(38,"translate"),_("data",function(f){return e.onSetParent(f)}),a()()(),h(39,It,13,6,"div",24),a()(),r(40,"tab",7),_("selectTab",function(){return e.tabView="permissions"}),T(41,Bt,3,1,"ng-template",8),r(42,"div",9)(43,"div",10)(44,"app-admin-permissions",27),_("permissionsChange",function(f){return e.updateApplications(f)}),a()()()()()(),r(45,"div",28)(46,"button",29),_("click",function(){return e.layout.closeDialog()}),m(47,"Cancel"),a(),r(48,"button",30),_("click",function(){return e.onSubmit()}),m(49," Confirm "),a()()),n&2){let p;s(2),g(e.group?2:3),s(2),g(e.group?4:-1),s(),k(Ae("btn-close btn-close-white ",e.group?"ms-2":"ms-auto"," ms-2")),s(),c("formGroup",e.groupForm),s(),c("justified",!0),s(9),U("is-invalid",e.groupForm.controls.name.invalid),c("autoSelect",!1),s(10),N(w(28,18,e.allVisibilities,e.originalOrderKeyValue)),s(4),g((p=e.groupForm.value.visibility)===e.allVisibilities.Visible?30:p===e.allVisibilities.Private?31:p===e.allVisibilities.Isolated?32:-1),s(7),c("searchFunction",e.searchGroups.bind(e))("active",e.groupForm.value.parent)("itemIcon",e.icons.GROUPS)("placeholder",w(38,21,"Select the parent group",e.locale.language)),s(2),g(e.group?39:-1),s(5),c("permissions",e.groupForm.value.applications),s(4),c("disabled",e.submitted||e.groupForm.invalid)}},dependencies:[M,P,Le,Ne,$e,Re,Be,L,Ue,Oe,Ie,rt,_t,Ct,pt,ct,mt,te,re,_e],encapsulation:2});let t=l;return t})();var Gt=(()=>{let l=class l{constructor(){this.layout=x(V),this.submitted=!1,this.isManager=!1,this.USER_GROUP_ROLE=K,this.icons={faUserPen:Qe,faKey:le},this.adminService=x(R)}ngOnInit(){this.isManager=this.user.isGroupManager}onSubmit(){if(this.submitted=!0,this.user.isGroupManager===this.isManager){this.layout.closeDialog();return}let o=this.isManager?K.MANAGER:K.MEMBER;this.adminService.updateUserFromGroup(this.parentGroup.id,this.user.id,{role:o}).subscribe({next:()=>{this.user.setGroupRole(o),this.layout.sendNotification("success","Edit user",this.user.name),this.layout.closeDialog()},error:n=>{this.submitted=!1,this.layout.sendNotification("error","Edit user",this.user.name,n)}})}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-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(n,e){n&1&&(r(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),r(3,"span"),m(4),a()(),r(5,"h4",3)(6,"span",4),m(7,"Edit user"),a()(),r(8,"button",5),_("click",function(){return e.layout.closeDialog()}),a()(),r(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"label",10)(14,"input",11),ee("ngModelChange",function(f){return Z(e.isManager,f)||(e.isManager=f),f}),a(),r(15,"span",4),m(16,"Set as group manager"),a(),d(17,"fa-icon",12),a()()()(),r(18,"small",4),m(19,"As a manager, the user will be able to manage group members but not group properties."),a()(),r(20,"div",13)(21,"button",14),_("click",function(){return e.layout.closeDialog()}),m(22,"Cancel"),a(),r(23,"button",15),_("click",function(){return e.onSubmit()}),m(24," Confirm "),a()()),n&2&&(s(2),c("icon",e.icons.faUserPen),s(2),C(e.user.name),s(10),X("ngModel",e.isManager),s(3),c("icon",e.icons.faKey),s(6),c("disabled",e.submitted))},dependencies:[M,P,ne,Ve,L,ie],encapsulation:2});let t=l;return t})();var Nt=["MainContextMenu"],$t=["TargetContextMenu"],St=(t,l)=>l.key,Lt=(t,l)=>l.mid;function jt(t,l){if(t&1){let i=A();r(0,"ul",26)(1,"li",27)(2,"a",28),_("click",function(){y(i);let n=u();return G(n.openDialog(!0))}),r(3,"span",14),d(4,"fa-icon",7),m(5),a()()(),r(6,"li",27)(7,"a",28),_("click",function(){y(i);let n=u();return G(n.addUserToGroupDialog())}),r(8,"span",14),d(9,"fa-icon",7),m(10,"Add members"),a()()()()}if(t&2){let i=u();s(2),U("disabled",!!i.currentGroup&&i.personalGroupsView),s(2),c("icon",i.icons.GROUPS),s(),$(" ",i.personalGroupsView?"Personal group":"Group"),s(2),U("disabled",!i.currentGroup),s(2),c("icon",i.icons.faUserPlus)}}function Kt(t,l){if(t&1&&d(0,"fa-icon",31),t&2){let i=u(3);c("icon",i.sortTable.sortParam.asc?i.icons.faArrowDown:i.icons.faArrowUp)("fixedWidth",!1)}}function Ht(t,l){if(t&1){let i=A();r(0,"th",30),_("click",function(){y(i);let n=u().$implicit,e=u();return G(e.sortBy(n.key))}),m(1),h(2,Kt,1,2,"fa-icon",31),a()}if(t&2){let i=u().$implicit,o=u();k(i.value.class),Ce("width",i.value.width,"%"),U("text-align-center",i.value.textCenter)("cursor-pointer",i.value.sortable),s(),$(" ",i.value.label," "),s(),g(o.sortTable.sortParam.column===i.key?2:-1)}}function Qt(t,l){if(t&1&&h(0,Ht,3,10,"th",29),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function qt(t,l){if(t&1&&d(0,"img",36),t&2){let i=u(4).$implicit;c("src",i.avatarUrl,J)}}function Wt(t,l){if(t&1&&d(0,"fa-icon",7),t&2){let i=u(4).$implicit,o=u();k(i.isPersonalGroup?"circle-purple-icon":"circle-primary-icon"),c("icon",o.icons.GROUPS)}}function zt(t,l){if(t&1&&d(0,"fa-icon",39),t&2){let i=u(5);c("icon",i.icons.faKey)}}function Yt(t,l){if(t&1&&(r(0,"div",34),h(1,qt,1,1,"img",36)(2,Wt,1,3,"fa-icon",37),r(3,"div",35)(4,"span",38),m(5),h(6,zt,1,1,"fa-icon",39),a(),r(7,"span",40),m(8),a()()()),t&2){let i=u(3).$implicit;s(),g(i.isUser?1:2),s(4),$(" ",i.name," "),s(),g(i.isUser&&i.isGroupManager?6:-1),s(2),C(i.description)}}function Jt(t,l){if(t&1&&(r(0,"span"),m(1),v(2,"joinCounts"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.counts))}}function Xt(t,l){if(t&1&&h(0,Jt,3,3,"span"),t&2){let i=u(3).$implicit;g(i.isGroup?0:-1)}}function Zt(t,l){t&1&&(r(0,"span",14),m(1,"manager"),a())}function ei(t,l){if(t&1&&(r(0,"span",14),m(1),a()),t&2){let i=u(4).$implicit;s(),C(i.type)}}function ti(t,l){if(t&1&&h(0,Zt,2,0,"span",14)(1,ei,2,1,"span",14),t&2){let i=u(3).$implicit;g(i.isUser&&i.isGroupManager?0:1)}}function ii(t,l){if(t&1&&(r(0,"div"),m(1),v(2,"amDateFormat"),a()),t&2){let i=u(4).$implicit;s(),C(D(2,1,i.modifiedAt))}}function ni(t,l){if(t&1&&(r(0,"div",35)(1,"div"),m(2),v(3,"amDateFormat"),a(),h(4,ii,3,3,"div"),a()),t&2){let i=u(3).$implicit;s(2),C(D(3,2,i.createdAt)),s(2),g(i.modifiedAt?4:-1)}}function oi(t,l){if(t&1&&(r(0,"td"),h(1,Yt,9,4,"div",34)(2,Xt,1,1)(3,ti,2,1)(4,ni,5,4,"div",35),a()),t&2){let i,o=u().$implicit,n=u().$implicit;k(De("",o.value.class," ",o.value.newly?"prop-newly-"+n[o.value.newly]:"")),Ce("width",o.value.width,"%"),U("text-align-center",o.value.textCenter),s(),g((i=o.key)==="name"?1:i==="members"?2:i==="type"?3:i==="createdAndModified"?4:-1)}}function ri(t,l){if(t&1&&h(0,oi,5,9,"td",33),t&2){let i=l.$implicit;g(i.value.show?0:-1)}}function ai(t,l){if(t&1){let i=A();r(0,"tr",32),_("click",function(){let n=y(i).$implicit,e=u();return G(e.onSelect(n))})("contextmenu",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("pressup",function(n){let e=y(i).$implicit,p=u();return G(p.onTargetContextMenu(n,e))})("tap",function(){let n=y(i).$implicit,e=u();return G(e.browse(n))}),B(1,ri,1,1,null,null,St),v(3,"keyvalue"),a()}if(t&2){let i=l.$implicit,o=u();U("selected",i.mid===(o.selected==null?null:o.selected.mid)),s(),N(w(3,2,o.tableHeaders,o.originalOrderKeyValue))}}function li(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPlus),s(),$(" ",i.personalGroupsView?"Personal group":"Group")}}function si(t,l){if(t&1){let i=A();T(0,li,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog(!0))})}}function mi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Add members"),a()),t&2){let i=u(2);s(),c("icon",i.icons.faUserPlus)}}function pi(t,l){if(t&1){let i=A();T(0,mi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.addUserToGroupDialog())})}}function ci(t,l){}function ui(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Refresh"),a()),t&2){let i=u();s(),c("icon",i.icons.faArrowRotateRight)}}function di(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2),a()),t&2){let i=u(2);s(),c("icon",i.icons.faPen),s(),$(" ",i.selected.isGroup?"Edit group":"Edit user")}}function _i(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Delete group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faMinus)}}function fi(t,l){if(t&1){let i=A();T(0,_i,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function hi(t,l){if(t&1&&(r(0,"span",14),d(1,"fa-icon",7),m(2,"Remove from group"),a()),t&2){let i=u(3);s(),c("icon",i.icons.faUserMinus)}}function gi(t,l){if(t&1){let i=A();T(0,hi,3,1,"ng-template",25),_("execute",function(){y(i);let n=u(2);return G(n.openDialog(!1,!0))})}}function bi(t,l){if(t&1){let i=A();T(0,di,3,2,"ng-template",25),_("execute",function(){y(i);let n=u();return G(n.openDialog())}),h(1,fi,1,0,null,23)(2,gi,1,0,null,23)}if(t&2){let i=u();s(),g(i.selected.isGroup?1:2)}}var oo=(()=>{let l=class l{constructor(){this.locale=x(oe),this.originalOrderKeyValue=de,this.icons={GROUPS:H.GROUPS,faRotate:Ke,faPlus:ce,faMinus:ae,faPen:me,faArrowDown:Xe,faArrowUp:We,faKey:le,faUserPlus:se,faUserMinus:pe,faArrowRotateRight:Je,faToggleOn:ze,faToggleOff:He},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},members:{label:"Members",width:10,class:"",textCenter:!0,show:!0},createdAndModified:{label:"Created & Modified",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.personalGroupsView=!1,this.loading=!1,this.selected=null,this.members=[],this.router=x(Pe),this.activatedRoute=x(Me),this.layout=x(V),this.adminService=x(R),this.sortSettings={default:[{prop:"name",type:"string"}],name:[{prop:"name",type:"string"}],type:[{prop:"type",type:"string"}],createdAndModified:[{prop:"modifiedAt",type:"date"},{prop:"createdAt",type:"date"}]},this.sortTable=new st(this.constructor.name,this.sortSettings),this.activatedRoute.data.subscribe(o=>{this.personalGroupsView=o.type===ue.PERSONAL,this.setEnv(o.routes)}),this.activatedRoute.queryParams.subscribe(o=>this.focusOnSelect=o.select),this.layout.setBreadcrumbIcon(tt.GROUPS)}onPersonalGroupsView(o){this.personalGroupsView=o,this.router.navigate([S.BASE,o?S.PGROUPS:S.GROUPS]).catch(console.error)}refresh(){this.loadGroups(this.currentGroup?.name)}browse(o){o.isGroup&&this.router.navigate([o.name],{relativeTo:this.activatedRoute}).catch(console.error)}onSelect(o=null){this.selected=o}onContextMenu(o){o.preventDefault(),o.stopPropagation(),this.layout.openContextMenu(o,this.mainContextMenu)}onTargetContextMenu(o,n){o.preventDefault(),o.type==="contextmenu"&&o.stopPropagation(),this.onSelect(n),this.layout.openContextMenu(o,this.targetContextMenu)}sortBy(o,n=!0,e){this.members=this.sortTable.sortBy(o,n,e||this.members)}addUserToGroupDialog(){this.layout.openDialog(vt,"md",{initialState:{parentGroup:this.currentGroup,currentMemberIds:this.members.filter(n=>n.isUser).map(n=>n.id)}}).content.hasChanges.pipe(be(n=>n),O(1)).subscribe(()=>this.refresh())}openDialog(o=!1,n=!1){o?this.personalGroupsView?this.layout.openDialog(we,"md").content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="add"&&(b.setGroupRole(K.MANAGER),b.counts={users:1},this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(b)),this.onSelect(b))}):this.layout.openDialog(Te,"md",{initialState:{parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;if(f==="add")if(!this.currentGroup&&!b?.parent||b.parent.id===this.currentGroup.id){let F=new ye(ge(he({},b),{type:xe.GROUP}));this.sortBy(this.sortTable.sortParam.column,!1,this.members.concat(new ye(ge(he({},b),{type:xe.GROUP})))),this.onSelect(F)}else this.router.navigate([`${S.BASE}/${S.GROUPS}`,b.parent?.id?b.parent.name:""],{queryParams:{select:b.name}}).catch(console.error)}):n?this.layout.openDialog(xt,"md",{initialState:{parentGroup:this.currentGroup,member:this.selected}}).content.wasDeleted.pipe(be(p=>p),O(1)).subscribe(()=>{this.currentGroup?this.selected.counts?.groups?this.loadGroups(this.currentGroup.name):(this.sortBy(this.sortTable.sortParam.column,!1,this.members.filter(p=>this.selected.mid!==p.mid)),this.onSelect()):this.loadGroups()}):this.selected.isGroup?this.personalGroupsView?this.layout.openDialog(we,"md",{initialState:{originalGroup:this.selected}}).content.groupChange.pipe(O(1)).subscribe(p=>{let[f,b]=p;f==="update"&&(this.selected=Object.assign(this.selected,{name:b.name,description:b.description,modifiedAt:b.modifiedAt}))}):this.adminService.getGroup(this.selected.id).subscribe({next:e=>{this.layout.openDialog(Te,"md",{initialState:{group:e,parentGroup:this.currentGroup}}).content.groupChange.pipe(O(1)).subscribe(f=>{let[b,F]=f;b==="update"&&(!this.currentGroup&&!F?.parent||F.parent.id===this.currentGroup.id?this.selected=Object.assign(this.selected,F):this.router.navigate([`${S.BASE}/${S.GROUPS}`,F.parent?.id?F.parent.name:""],{queryParams:{select:F.name}}).catch(console.error))})},error:e=>this.layout.sendNotification("error","Edit group",this.selected.name,e)}):this.layout.openDialog(Gt,"md",{initialState:{user:this.selected,parentGroup:this.currentGroup}})}setEnv(o){let n;o.length?(n=o[o.length-1].path,this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}${ve(o)}`:`/${S.BASE}/${S.GROUPS}${ve(o)}`,firstLink:`/${S.BASE}/${S.GROUPS}`,splicing:1,translating:!0,sameLink:!1,mutateLevel:{0:{setTitle:this.personalGroupsView?Y.PGROUPS:Y.GROUPS,translateTitle:!0}}})):this.layout.setBreadcrumbNav({url:this.personalGroupsView?`/${S.BASE}/${S.PGROUPS}/${Y.PGROUPS}`:`/${S.BASE}/${S.GROUPS}/${Y.GROUPS}`,splicing:2,translating:!0,sameLink:!0}),this.loadGroups(n)}loadGroups(o){this.loading=!0,this.onSelect(),this.adminService.browseGroup(o,this.personalGroupsView).subscribe({next:n=>{this.currentGroup=n.parentGroup,this.sortBy(this.sortTable.sortParam.column,!1,n.members),this.focusOnSelect?this.focusOn(this.focusOnSelect):this.scrollView.scrollInto(-1),this.loading=!1},error:n=>{this.members=[],this.layout.sendNotification("error","Groups",n.error.message),this.onSelect(),this.loading=!1}})}focusOn(o){let n=this.members.find(e=>e.name===o);n&&(setTimeout(()=>this.scrollView.scrollInto(n),100),this.onSelect(n))}};l.\u0275fac=function(n){return new(n||l)},l.\u0275cmp=E({type:l,selectors:[["app-admin-groups"]],viewQuery:function(n,e){if(n&1&&(Q(Se,5),Q(Ge,7),Q(Nt,7),Q($t,7)),n&2){let p;q(p=W())&&(e.scrollView=p.first),q(p=W())&&(e.inputFilter=p.first),q(p=W())&&(e.mainContextMenu=p.first),q(p=W())&&(e.targetContextMenu=p.first)}},decls:48,vars:42,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"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","container","body","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle",3,"tooltip"],[3,"icon"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[1,"ms-auto"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-1",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"me-2",3,"icon"],["l10nTranslate",""],[1,"btn-group","btn-group-sm"],[1,"d-none","d-sm-block"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem",""],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"execute"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","pressup","tap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["alt","",1,"avatar-img",3,"src"],[3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"m-0",3,"icon"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"]],template:function(n,e){if(n&1){let p=A();r(0,"div",2)(1,"button",3),v(2,"translate"),_("click",function(){return y(p),G(e.refresh())}),d(3,"fa-icon",4),a(),r(4,"div",5)(5,"button",6),v(6,"translate"),d(7,"fa-icon",7),a(),T(8,jt,11,7,"ul",8),a(),r(9,"button",9),v(10,"translate"),_("click",function(){return y(p),G(e.openDialog(!1,!0))}),d(11,"fa-icon",7),a(),r(12,"button",9),v(13,"translate"),_("click",function(){return y(p),G(e.openDialog())}),d(14,"fa-icon",7),a(),r(15,"div",10)(16,"button",11),_("ngModelChange",function(b){return y(p),G(e.onPersonalGroupsView(b))}),r(17,"div",12),d(18,"fa-icon",13),r(19,"span",14),m(20,"Personal groups"),a()()(),r(21,"div",15),d(22,"app-input-filter",16),a()()(),r(23,"table",17)(24,"thead")(25,"tr"),B(26,Qt,1,1,null,null,St),v(28,"keyvalue"),a()()(),r(29,"app-virtual-scroll",18),v(30,"searchFilter"),_("contextmenu",function(b){return y(p),G(e.onContextMenu(b))}),r(31,"table",17)(32,"tbody",19),B(33,ai,4,5,"tr",20,Lt),a()()(),r(35,"div",21)(36,"span",22),m(37),v(38,"translate"),a()(),r(39,"context-menu",null,0),h(41,si,1,0,null,23),h(42,pi,1,0,null,23),T(43,ci,0,0,"ng-template",24)(44,ui,3,1,"ng-template",25),_("execute",function(){return y(p),G(e.refresh())}),a(),r(45,"context-menu",null,1),h(47,bi,3,1),a()}n&2&&(s(),c("tooltip",w(2,21,"Refresh",e.locale.language)),s(2),c("icon",e.icons.faRotate)("animation",e.loading?"spin":null),s(2),c("tooltip",w(6,24,"New",e.locale.language)),s(2),c("icon",e.icons.faPlus),s(2),c("disabled",!e.selected)("tooltip",w(10,27,e.selected!=null&&e.selected.isUser?"Remove from group":"Delete group",e.locale.language)),s(2),c("icon",e.icons.faMinus),s(),c("disabled",!e.selected)("tooltip",w(13,30,e.selected!=null&&e.selected.isGroup?"Edit group":"Edit user",e.locale.language)),s(2),c("icon",e.icons.faPen),s(2),c("ngModel",e.personalGroupsView),s(2),c("icon",e.personalGroupsView?e.icons.faToggleOn:e.icons.faToggleOff),s(8),N(w(28,33,e.tableHeaders,e.originalOrderKeyValue)),s(3),c("bufferAmount",5)("items",w(30,36,e.members,e.inputFilter.search())),s(4),N(e.scrollView==null?null:e.scrollView.viewPortItems),s(4),Ee("",e.members.length," ",w(38,39,"groups",e.locale.language)),s(4),g(e.currentGroup&&!e.personalGroupsView||!e.currentGroup&&e.personalGroupsView?41:-1),s(),g(e.currentGroup?42:-1),s(),c("divider",!0),s(4),g(e.selected?47:-1))},dependencies:[ot,nt,it,M,P,Ge,Se,je,ft,gt,ht,at,ne,L,ie,te,re,lt,bt,_e],encapsulation:2});let t=l;return t})();export{oo as AdminGroupsComponent};
|
package/static/chunk-JSUKJT6Z.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Sa as $}from"./chunk-XLCCZSQL.js";import{Ac as R,Eb as o,Fb as y,Gb as x,Lb as C,Ma as c,Mb as w,Nb as b,Pb as d,Qa as E,Qb as f,Ra as u,Sb as N,Xa as m,Ya as M,_a as j,ab as h,ca as I,da as S,dc as g,ec as U,gc as _,hc as T,ib as v,jb as F,kb as P,pb as s,qb as p,rb as l,va as D,ya as B,yb as k,zc as O}from"./chunk-ATP3BFHV.js";var V=["*"];function J(t,e){t&1&&k(0)}function K(t,e){if(t&1&&(p(0,"bar",3),x(1),l()),t&2){let a=o();s("type",a.type)("value",a._value)("max",a.max)("animate",a.animate)("striped",a.striped)}}function L(t,e){if(t&1&&(p(0,"bar",3),d(1),l()),t&2){let a=e.$implicit,i=o(2);s("type",a.type)("value",a.value)("max",a.max||i.max)("animate",i.animate)("striped",i.striped),c(),f(a.label)}}function W(t,e){if(t&1&&h(0,L,2,6,"bar",4),t&2){let a=o();s("ngForOf",a._values)}}var X=(()=>{let e=class e{constructor(i,n){this.el=i,this.renderer=n,this.max=100,this.value=0,this.animate=!1,this.striped=!1,this.type="info",this.percent=100}ngOnChanges(i){(i.value||i.max)&&(this.percent=100*(Number(i.value?.currentValue||this.value)/Number(i.max?.currentValue||this.max||100))),i.type&&this.applyTypeClasses()}applyTypeClasses(){if(this._prevType){let i=`progress-bar-${this._prevType}`,n=`bg-${this._prevType}`;this.renderer.removeClass(this.el.nativeElement,i),this.renderer.removeClass(this.el.nativeElement,n),this._prevType=void 0}if(this.type){let i=`progress-bar-${this.type}`,n=`bg-${this.type}`;this.renderer.addClass(this.el.nativeElement,i),this.renderer.addClass(this.el.nativeElement,n),this._prevType=this.type}}};e.\u0275fac=function(n){return new(n||e)(u(B),u(E))},e.\u0275cmp=m({type:e,selectors:[["bar"]],hostAttrs:["role","progressbar","aria-valuemin","0"],hostVars:13,hostBindings:function(n,r){n&2&&(v("aria-valuenow",r.value)("aria-valuetext",r.percent?r.percent.toFixed(0)+"%":"")("aria-valuemax",r.max),w("height","100","%")("width",r.percent,"%"),b("progress-bar",!0)("progress-bar-animated",r.animate)("progress-bar-striped",r.striped))},inputs:{max:"max",value:"value",animate:"animate",striped:"striped",type:"type"},features:[D],ngContentSelectors:V,decls:1,vars:0,template:function(n,r){n&1&&(y(),x(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Y=(()=>{let e=class e{constructor(){this.animate=!1,this.max=100}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),A=(()=>{let e=class e{set value(i){this.isStacked=Array.isArray(i),typeof i=="number"?(this._value=i,this._values=void 0):(this._value=void 0,this._values=i)}constructor(i){this.max=100,this.animate=!1,this.striped=!1,this.isStacked=!1,this._value=0,Object.assign(this,i)}};e.\u0275fac=function(n){return new(n||e)(u(Y))},e.\u0275cmp=m({type:e,selectors:[["progressbar"]],hostVars:3,hostBindings:function(n,r){n&2&&(v("max",r.max),b("progress",!0))},inputs:{max:"max",animate:"animate",striped:"striped",type:"type",value:"value"},ngContentSelectors:V,decls:5,vars:3,consts:[["NotStacked",""],["Stacked",""],[4,"ngIf","ngIfThen","ngIfElse"],[3,"type","value","max","animate","striped"],[3,"type","value","max","animate","striped",4,"ngFor","ngForOf"]],template:function(n,r){if(n&1&&(y(),h(0,J,1,0,"ng-container",2)(1,K,2,5,"ng-template",null,0,T)(3,W,1,1,"ng-template",null,1,T)),n&2){let z=C(2),G=C(4);s("ngIf",!r.isStacked)("ngIfThen",z)("ngIfElse",G)}},dependencies:[R,X,O],styles:["[_nghost-%COMP%]{width:100%;display:flex}"],changeDetection:0});let t=e;return t})(),H=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:[]}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=M({type:e}),e.\u0275inj=S({});let t=e;return t})();var q=(()=>{let e=class e{transform(i,n=0,r=!1){return $(i,n,r)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=j({name:"toBytes",type:e,pure:!0});let t=e;return t})();function ee(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),g(4,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageQuota)("value",a.item.storageUsage)("type",null),c(2),N("",_(3,5,a.item.storageUsage,2,!0)," / ",U(4,9,a.item.storageQuota))}}function te(t,e){if(t&1&&(p(0,"progressbar",0)(1,"span",1),d(2),g(3,"toBytes"),l()()),t&2){let a=o();s("max",a.item.storageUsage)("value",a.item.storageUsage)("type",null),c(2),f(_(3,4,a.item.storageUsage,2,!0))}}var oe=(()=>{let e=class e{constructor(){this.item={storageUsage:0,storageQuota:null}}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-storage-usage"]],inputs:{item:"item"},decls:2,vars:1,consts:[[1,"bg-black",3,"max","value","type"],[1,"ms-1","me-1"]],template:function(n,r){n&1&&F(0,ee,5,11,"progressbar",0)(1,te,4,8,"progressbar",0),n&2&&P(r.item.storageQuota>0?0:1)},dependencies:[H,A,q],encapsulation:2});let t=e;return t})();export{A as a,H as b,q as c,oe as d};
|
package/static/chunk-JXZCNFW7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=new RegExp(/[!@#$%^&*()~`,.?":{}|<>_+-]/g),p=new RegExp("\\s*(\\d+)\\s*(MB|GB|TB).*","i"),a=/^https?:\/\//;function c(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}export{p as a,a as b,c};
|