@sync-in/server 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +9 -9
  3. package/static/{chunk-S44QIK3G.js → chunk-2AA3WMW5.js} +1 -1
  4. package/static/{chunk-ZEJLIGAY.js → chunk-2MRTBCSV.js} +1 -1
  5. package/static/{chunk-RBTLSPYJ.js → chunk-2PDTP6N4.js} +1 -1
  6. package/static/{chunk-UOK3LKSX.js → chunk-32AVRWC3.js} +1 -1
  7. package/static/{chunk-CVXLHSO5.js → chunk-3I6NPM62.js} +1 -1
  8. package/static/{chunk-IHS5LSJJ.js → chunk-3WBCGTYW.js} +1 -1
  9. package/static/{chunk-KDUAB76O.js → chunk-44D7RWET.js} +1 -1
  10. package/static/{chunk-3QTROEHV.js → chunk-4CQLN5HL.js} +1 -1
  11. package/static/{chunk-7HJFIMNF.js → chunk-5WTIUYFF.js} +1 -1
  12. package/static/{chunk-3VRUIWQG.js → chunk-6LHJBXUE.js} +1 -1
  13. package/static/{chunk-DVCN3P7Q.js → chunk-76JDXKD7.js} +1 -1
  14. package/static/{chunk-S6H2ELRY.js → chunk-7EHP6HO3.js} +1 -1
  15. package/static/{chunk-EKWB5W72.js → chunk-7WOPGQXB.js} +1 -1
  16. package/static/chunk-ACCGBDUZ.js +13 -0
  17. package/static/{chunk-VZFZUI6D.js → chunk-AFNUBQMD.js} +1 -1
  18. package/static/{chunk-TNCKNU6I.js → chunk-AXLDYLIO.js} +1 -1
  19. package/static/{chunk-JAJ7VXMB.js → chunk-B4UP2EQM.js} +1 -1
  20. package/static/{chunk-BCN4T5DO.js → chunk-BAHNSFET.js} +2 -2
  21. package/static/chunk-CAD3RHAY.js +1 -0
  22. package/static/{chunk-HZAB6F4Q.js → chunk-CQOQXVYG.js} +1 -1
  23. package/static/{chunk-XSURUW7C.js → chunk-CTPKDDVI.js} +1 -1
  24. package/static/{chunk-7KAYOR3A.js → chunk-D4XDSS6P.js} +1 -1
  25. package/static/{chunk-2GXOVGTD.js → chunk-DXESTGOH.js} +1 -1
  26. package/static/{chunk-PDG7DOEF.js → chunk-EUKVDBBK.js} +1 -1
  27. package/static/{chunk-FTFEQDWH.js → chunk-F3GMI6OL.js} +1 -1
  28. package/static/{chunk-XZHWESIY.js → chunk-FVFOX6OP.js} +1 -1
  29. package/static/{chunk-U5E5H2DD.js → chunk-G7TLKY5X.js} +1 -1
  30. package/static/{chunk-NIKNG2FX.js → chunk-GCPX3EFC.js} +1 -1
  31. package/static/{chunk-D2MLAO5N.js → chunk-GYFLVCFN.js} +1 -1
  32. package/static/{chunk-RJULB733.js → chunk-I3XI72AV.js} +1 -1
  33. package/static/chunk-IAWRRL6J.js +1 -0
  34. package/static/{chunk-WZPF4LS2.js → chunk-IOP3ON2H.js} +1 -1
  35. package/static/{chunk-CSVPAZHK.js → chunk-IOX3ANJR.js} +1 -1
  36. package/static/{chunk-R4VYKZVJ.js → chunk-IWWBV6EM.js} +1 -1
  37. package/static/{chunk-2RWLNKZH.js → chunk-IZ7TCHUW.js} +1 -1
  38. package/static/{chunk-3ZLBVUCX.js → chunk-J2BUPRCZ.js} +2 -2
  39. package/static/{chunk-JRXG43AA.js → chunk-J45SD6RC.js} +2 -2
  40. package/static/{chunk-PPJCVBJH.js → chunk-JVGN5V5E.js} +1 -1
  41. package/static/{chunk-IMFO2MI7.js → chunk-JXZOYX4N.js} +1 -1
  42. package/static/{chunk-KEZNIIFH.js → chunk-K5VO5XTG.js} +1 -1
  43. package/static/{chunk-R4VMWCM5.js → chunk-KBUIDMCK.js} +1 -1
  44. package/static/chunk-KY6MNZLC.js +1 -0
  45. package/static/{chunk-QGHNJVJ6.js → chunk-LRK6RNPR.js} +1 -1
  46. package/static/{chunk-CMNMPG6Z.js → chunk-M7IFVC5D.js} +1 -1
  47. package/static/{chunk-D5FQ72R4.js → chunk-MOWL3ILT.js} +1 -1
  48. package/static/chunk-MPWD4VMY.js +1 -0
  49. package/static/{chunk-ZHUBWKA2.js → chunk-MTRXBVWZ.js} +1 -1
  50. package/static/{chunk-QJ22N76V.js → chunk-MZQK6LNV.js} +1 -1
  51. package/static/{chunk-76REYAEA.js → chunk-NG7QWUFM.js} +1 -1
  52. package/static/{chunk-XX3JPJUM.js → chunk-NUG54Y65.js} +1 -1
  53. package/static/{chunk-ZOMRIN3G.js → chunk-OKI3N5AI.js} +2 -2
  54. package/static/chunk-OYPJUVD6.js +1 -0
  55. package/static/{chunk-RNVPQQKT.js → chunk-P2IJCGWD.js} +1 -1
  56. package/static/{chunk-TTWMFWEC.js → chunk-P7X53PEP.js} +1 -1
  57. package/static/{chunk-ARS47O5X.js → chunk-Q5K4ZUHK.js} +1 -1
  58. package/static/{chunk-3ZBAQTHJ.js → chunk-QIGUDEZF.js} +1 -1
  59. package/static/{chunk-76M3BMK6.js → chunk-QJVC3SRJ.js} +11 -11
  60. package/static/chunk-QQAF3MLL.js +1 -0
  61. package/static/chunk-R4P4NBUL.js +1 -0
  62. package/static/{chunk-VBTZDHZ3.js → chunk-RBBMH2FM.js} +1 -1
  63. package/static/{chunk-QTPIEEZW.js → chunk-RPHWIW7S.js} +1 -1
  64. package/static/{chunk-LWSCODLD.js → chunk-RWCNTCU5.js} +1 -1
  65. package/static/{chunk-KAUCN24H.js → chunk-SAN35XTD.js} +1 -1
  66. package/static/{chunk-SDJNZULP.js → chunk-SQYWQUL4.js} +1 -1
  67. package/static/chunk-TQBCGNFG.js +1 -0
  68. package/static/chunk-VBH3Y2M5.js +1 -0
  69. package/static/{chunk-ZU5MQTFN.js → chunk-VHZKPUWE.js} +1 -1
  70. package/static/{chunk-J7474P3L.js → chunk-VNNLMUK7.js} +1 -1
  71. package/static/chunk-WB2DECOA.js +1 -0
  72. package/static/{chunk-WFMEUST4.js → chunk-WE3ISL7O.js} +1 -1
  73. package/static/{chunk-JNTNMIUH.js → chunk-WJFKUJJX.js} +1 -1
  74. package/static/{chunk-CN5YVRFT.js → chunk-WM56LPJ3.js} +1 -1
  75. package/static/{chunk-4NIYCYRS.js → chunk-WO6GBHBZ.js} +2 -2
  76. package/static/{chunk-LZUHREOF.js → chunk-WSTGWBVW.js} +1 -1
  77. package/static/{chunk-WRK2FTKU.js → chunk-WTWGBCFO.js} +1 -1
  78. package/static/{chunk-27V66YJV.js → chunk-XFZ37WVK.js} +2 -2
  79. package/static/{chunk-VD5JHSDS.js → chunk-Y433XOAJ.js} +1 -1
  80. package/static/{chunk-3MVPXC3U.js → chunk-Y67J3BOL.js} +1 -1
  81. package/static/{chunk-FWQJ4ZCD.js → chunk-YBEH442D.js} +1 -1
  82. package/static/chunk-YKCUUBZP.js +5 -0
  83. package/static/{chunk-AALPWGPB.js → chunk-YWLMFOB4.js} +3 -3
  84. package/static/{chunk-X7NHX5C7.js → chunk-ZFAXICUH.js} +1 -1
  85. package/static/index.html +2 -2
  86. package/static/main-ZXEMCBMI.js +11 -0
  87. package/static/{styles-XLLEY5Y3.css → styles-PD6764CP.css} +1 -1
  88. package/static/chunk-2YQ4SX3A.js +0 -13
  89. package/static/chunk-46TJLPJY.js +0 -1
  90. package/static/chunk-6OEOADR6.js +0 -1
  91. package/static/chunk-G7RZN7HN.js +0 -1
  92. package/static/chunk-LTJNLOX2.js +0 -1
  93. package/static/chunk-NNZWSNAW.js +0 -1
  94. package/static/chunk-NWKBB7J4.js +0 -1
  95. package/static/chunk-PVYVY3GD.js +0 -1
  96. package/static/chunk-Q5X5TPAG.js +0 -1
  97. package/static/chunk-SNOOCDJD.js +0 -1
  98. package/static/chunk-SPQH3ATC.js +0 -5
  99. package/static/chunk-ZCSHU3D7.js +0 -1
  100. package/static/main-5O3KLGIR.js +0 -11
package/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ ## [1.11.0](https://github.com/Sync-in/server/compare/v1.10.1...v1.11.0) (2026-01-20)
3
+
4
+ ### Security
5
+
6
+ * **backend:** upgrade tar to 7.5.4 (GHSA-8qq5-rm4j-mr97) ([a42c1079](https://github.com/Sync-in/server/commit/a42c107904852f32db3ede01b7ee5a0a039bd6bf))
7
+
8
+ ### Features
9
+
10
+ * **frontend:** add delayed auto-collapse functionality for right sidebar ([315bad2](https://github.com/Sync-in/server/commit/315bad25980d1b7596f86d4cd4f9045137bf7d4d))
11
+
2
12
  ## [1.10.1](https://github.com/Sync-in/server/compare/v1.10.0...v1.10.1) (2026-01-12)
3
13
 
4
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sync-in/server",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "The secure, open-source platform for file storage, sharing, collaboration, and sync",
5
5
  "author": {
6
6
  "name": "Johan Legrand",
@@ -74,21 +74,21 @@
74
74
  "dependencies": {
75
75
  "@fastify/cookie": "11.0.2",
76
76
  "@fastify/helmet": "13.0.2",
77
- "@fastify/multipart": "9.3.0",
77
+ "@fastify/multipart": "9.4.0",
78
78
  "@fastify/send": "4.1.0",
79
79
  "@fastify/static": "9.0.0",
80
80
  "@knaadh/nestjs-drizzle-mysql2": "1.2.0",
81
81
  "@lukeed/ms": "2.0.2",
82
82
  "@nestjs/axios": "4.0.1",
83
- "@nestjs/common": "11.1.11",
83
+ "@nestjs/common": "11.1.12",
84
84
  "@nestjs/config": "4.0.2",
85
- "@nestjs/core": "11.1.11",
85
+ "@nestjs/core": "11.1.12",
86
86
  "@nestjs/jwt": "11.0.2",
87
87
  "@nestjs/passport": "11.0.5",
88
- "@nestjs/platform-fastify": "11.1.11",
89
- "@nestjs/platform-socket.io": "11.1.11",
88
+ "@nestjs/platform-fastify": "11.1.12",
89
+ "@nestjs/platform-socket.io": "11.1.12",
90
90
  "@nestjs/schedule": "6.1.0",
91
- "@nestjs/websockets": "11.1.11",
91
+ "@nestjs/websockets": "11.1.12",
92
92
  "@socket.io/cluster-adapter": "0.3.0",
93
93
  "@socket.io/redis-adapter": "8.3.0",
94
94
  "archiver": "7.0.1",
@@ -104,7 +104,7 @@
104
104
  "js-yaml": "4.1.1",
105
105
  "ldapts": "8.1.3",
106
106
  "mime-types": "3.0.2",
107
- "mysql2": "3.16.0",
107
+ "mysql2": "3.16.1",
108
108
  "nestjs-pino": "4.5.0",
109
109
  "nodemailer": "7.0.12",
110
110
  "passport-jwt": "4.0.1",
@@ -116,7 +116,7 @@
116
116
  "sax": "1.4.4",
117
117
  "sharp": "0.34.5",
118
118
  "socket.io": "4.8.3",
119
- "tar": "7.5.2",
119
+ "tar": "7.5.4",
120
120
  "text-to-svg": "3.1.5",
121
121
  "time2fa": "1.4.2",
122
122
  "unpdf": "1.4.0",
@@ -1 +1 @@
1
- import{a as O}from"./chunk-WRK2FTKU.js";import{Ad as E,Bb as d,Dd as L,Eb as c,Ed as N,Gb as y,J as g,Jd as H,Kb as w,Lb as b,Ma as P,Mb as S,N as _,Oa as a,ab as v,fd as B,ja as p,jd as I,kc as T,lb as x,mb as k,mc as D,oa as m,pa as u,qg as M,rb as h,rd as V,sb as f,tb as l,va as F,xf as K}from"./chunk-76M3BMK6.js";var z=["iFilter"];function A(o,t){if(o&1){let s=d();f(0,"span",3)(1,"fa-icon",4),c("click",function(){m(s);let i=y();return u(i.clear())}),l()()}if(o&2){let s=y();a(),h("icon",s.faTimes)}}var tt=(()=>{let t=class t{constructor(){this.search=F(""),this.locale=p(N),this.faTimes=K,this.fb=p(E),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(g(300),_()).subscribe(e=>this.onType(e))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(e){(e.ctrlKey||e.metaKey)&&e.keyCode===70?(e.preventDefault(),e.stopPropagation(),this.iFilter.nativeElement.focus()):e.keyCode===27&&e.preventDefault()}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(e){this.search.set(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=v({type:t,selectors:[["app-input-filter"]],viewQuery:function(i,r){if(i&1&&w(z,7),i&2){let n;b(n=S())&&(r.iFilter=n.first)}},hostBindings:function(i,r){i&1&&c("keydown",function(C){return r.onKeyPress(C)},P)},decls:5,vars:6,consts:[["iFilter",""],[1,"btn-group",2,"height","30px","max-width","150px"],["type","text",1,"form-control","form-control-sm",2,"padding-right","24px",3,"keyup.escape","placeholder","formControl"],[1,"cursor-pointer",2,"position","absolute","right","5px","top","3px","z-index","1001","font-size","1rem"],["role","button",3,"click","icon"]],template:function(i,r){if(i&1){let n=d();f(0,"div",1)(1,"input",2,0),T(3,"translate"),c("keyup.escape",function(){return m(n),u(r.clear())}),l(),x(4,A,2,1,"span",3),l()}i&2&&(a(),h("placeholder",D(3,3,"Filter",r.locale.language)+" (Ctrl/\u2318+F)")("formControl",r.searchControl),a(3),k(r.search()?4:-1))},dependencies:[L,B,I,V,M,H],encapsulation:2});let o=t;return o})();var Q=class{constructor(t,s){this.defaultId="default",this.keyStore=`sortBy${t}`,this.sortSettings=s,this._sortParam=this.sort}get sortParam(){return this._sortParam||this.sort}get sort(){let t=localStorage.getItem(this.keyStore);return t?JSON.parse(t):{column:this.defaultId,asc:!1}}set sort(t){this._sortParam=t,localStorage.setItem(this.keyStore,JSON.stringify(t))}sortBy(t,s=!0,e){if(!(t in this.sortSettings))return e;s&&(this.sortParam.asc?(this.sortParam.column=this.defaultId,this.sortParam.asc=!1,t=this.defaultId):this.sortParam.column===t?this.sortParam.asc=!this.sortParam.asc:(this.sortParam.column=t,this.sortParam.asc=!1),this.sort=this.sortParam);for(let i of this.sortSettings[t])O(i.type,e,i.prop,t===this.defaultId?!1:this.sortParam.asc);return[...e]}};export{tt as a,Q as b};
1
+ import{a as O}from"./chunk-WTWGBCFO.js";import{Ad as E,Bb as d,Dd as L,Eb as c,Ed as N,Gb as y,J as g,Jd as H,Kb as w,Lb as b,Ma as P,Mb as S,N as _,Oa as a,ab as v,fd as B,ja as p,jd as I,kc as T,lb as x,mb as k,mc as D,oa as m,pa as u,rb as h,rd as V,sb as f,sg as M,tb as l,va as F,zf as K}from"./chunk-QJVC3SRJ.js";var z=["iFilter"];function A(o,t){if(o&1){let s=d();f(0,"span",3)(1,"fa-icon",4),c("click",function(){m(s);let i=y();return u(i.clear())}),l()()}if(o&2){let s=y();a(),h("icon",s.faTimes)}}var tt=(()=>{let t=class t{constructor(){this.search=F(""),this.locale=p(N),this.faTimes=K,this.fb=p(E),this.searchControl=this.fb.control(""),this.subscription=this.searchControl.valueChanges.pipe(g(300),_()).subscribe(e=>this.onType(e))}ngOnDestroy(){this.subscription.unsubscribe()}onKeyPress(e){(e.ctrlKey||e.metaKey)&&e.keyCode===70?(e.preventDefault(),e.stopPropagation(),this.iFilter.nativeElement.focus()):e.keyCode===27&&e.preventDefault()}clear(){this.searchControl&&(this.searchControl.reset(),this.iFilter.nativeElement.value="")}onType(e){this.search.set(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=v({type:t,selectors:[["app-input-filter"]],viewQuery:function(i,r){if(i&1&&w(z,7),i&2){let n;b(n=S())&&(r.iFilter=n.first)}},hostBindings:function(i,r){i&1&&c("keydown",function(C){return r.onKeyPress(C)},P)},decls:5,vars:6,consts:[["iFilter",""],[1,"btn-group",2,"height","30px","max-width","150px"],["type","text",1,"form-control","form-control-sm",2,"padding-right","24px",3,"keyup.escape","placeholder","formControl"],[1,"cursor-pointer",2,"position","absolute","right","5px","top","3px","z-index","1001","font-size","1rem"],["role","button",3,"click","icon"]],template:function(i,r){if(i&1){let n=d();f(0,"div",1)(1,"input",2,0),T(3,"translate"),c("keyup.escape",function(){return m(n),u(r.clear())}),l(),x(4,A,2,1,"span",3),l()}i&2&&(a(),h("placeholder",D(3,3,"Filter",r.locale.language)+" (Ctrl/\u2318+F)")("formControl",r.searchControl),a(3),k(r.search()?4:-1))},dependencies:[L,B,I,V,M,H],encapsulation:2});let o=t;return o})();var Q=class{constructor(t,s){this.defaultId="default",this.keyStore=`sortBy${t}`,this.sortSettings=s,this._sortParam=this.sort}get sortParam(){return this._sortParam||this.sort}get sort(){let t=localStorage.getItem(this.keyStore);return t?JSON.parse(t):{column:this.defaultId,asc:!1}}set sort(t){this._sortParam=t,localStorage.setItem(this.keyStore,JSON.stringify(t))}sortBy(t,s=!0,e){if(!(t in this.sortSettings))return e;s&&(this.sortParam.asc?(this.sortParam.column=this.defaultId,this.sortParam.asc=!1,t=this.defaultId):this.sortParam.column===t?this.sortParam.asc=!this.sortParam.asc:(this.sortParam.column=t,this.sortParam.asc=!1),this.sort=this.sortParam);for(let i of this.sortSettings[t])O(i.type,e,i.prop,t===this.defaultId?!1:this.sortParam.asc);return[...e]}};export{tt as a,Q as b};
@@ -1 +1 @@
1
- import{d as c}from"./chunk-G7RZN7HN.js";import{ca as a,da as O,ia as n,la as s,sa as P,va as o,ya as Q,za as i}from"./chunk-2YQ4SX3A.js";import"./chunk-KAVP6UXH.js";var p=a({String:O.string,Number:O.number,"True False":O.bool,PropertyName:O.propertyName,Null:O.null,", :":O.separator,"[ ]":O.squareBracket,"{ }":O.brace}),g=c.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[p],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var h=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;let r=m(e,t.state.doc);return[{from:r,message:e.message,severity:"error",to:r}]}return[]};function m(t,e){let r;return(r=t.message.match(/at position (\d+)/))?Math.min(+r[1],e.length):(r=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+r[1]).from+ +r[2]-1,e.length):0}var l=n.define({name:"json",parser:g.configure({props:[P.add({Object:o({except:/^\s*\}/}),Array:o({except:/^\s*\]/})}),Q.add({"Object Array":i})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function S(){return new s(l)}export{S as json,l as jsonLanguage,h as jsonParseLinter};
1
+ import{d as c}from"./chunk-MPWD4VMY.js";import{Aa as i,da as a,ea as O,ja as n,ma as s,ta as P,wa as o,za as Q}from"./chunk-ACCGBDUZ.js";import"./chunk-KAVP6UXH.js";var p=a({String:O.string,Number:O.number,"True False":O.bool,PropertyName:O.propertyName,Null:O.null,", :":O.separator,"[ ]":O.squareBracket,"{ }":O.brace}),g=c.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[p],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});var h=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;let r=m(e,t.state.doc);return[{from:r,message:e.message,severity:"error",to:r}]}return[]};function m(t,e){let r;return(r=t.message.match(/at position (\d+)/))?Math.min(+r[1],e.length):(r=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+r[1]).from+ +r[2]-1,e.length):0}var l=n.define({name:"json",parser:g.configure({props:[P.add({Object:o({except:/^\s*\}/}),Array:o({except:/^\s*\]/})}),Q.add({"Object Array":i})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function S(){return new s(l)}export{S as json,l as jsonLanguage,h as jsonParseLinter};
@@ -1 +1 @@
1
- import{Pa as U}from"./chunk-AALPWGPB.js";import{af as o,bg as E,db as n,eg as p}from"./chunk-76M3BMK6.js";var t={BASE:"admin",USERS:"users",GUESTS:"guests",GROUPS:"groups",PGROUPS:"personal_groups"},i={ADMIN:"Administration",USERS:"Users",GROUPS:"Groups",GUESTS:"Guests",PGROUPS:"Personal groups"},s={BASE:o,USERS:p,GROUPS:E},c={title:i.ADMIN,link:`${t.BASE}/${t.USERS}`,icon:s.BASE,matchLink:new RegExp(`^${t.BASE}`),level:12,checks:[{prop:"user",value:"isAdmin"}],submenus:[{title:i.USERS,icon:s.USERS,link:`${t.BASE}/${t.USERS}`,matchLink:RegExp(`^${t.BASE}/${t.USERS}$|^${t.BASE}/${t.GUESTS}$`)},{title:i.GROUPS,icon:s.GROUPS,link:`${t.BASE}/${t.GROUPS}`,matchLink:RegExp(`^${t.BASE}/${t.GROUPS}|^${t.BASE}/${t.PGROUPS}`)}]};var $=(()=>{let S=class S{transform(r){return r&&U(r)}};S.\u0275fac=function(a){return new(a||S)},S.\u0275pipe=n({name:"capitalize",type:S,pure:!0});let e=S;return e})();export{t as a,i as b,s as c,c as d,$ as e};
1
+ import{Pa as U}from"./chunk-YWLMFOB4.js";import{cf as o,db as n,dg as E,gg as p}from"./chunk-QJVC3SRJ.js";var t={BASE:"admin",USERS:"users",GUESTS:"guests",GROUPS:"groups",PGROUPS:"personal_groups"},i={ADMIN:"Administration",USERS:"Users",GROUPS:"Groups",GUESTS:"Guests",PGROUPS:"Personal groups"},s={BASE:o,USERS:p,GROUPS:E},c={title:i.ADMIN,link:`${t.BASE}/${t.USERS}`,icon:s.BASE,matchLink:new RegExp(`^${t.BASE}`),level:12,checks:[{prop:"user",value:"isAdmin"}],submenus:[{title:i.USERS,icon:s.USERS,link:`${t.BASE}/${t.USERS}`,matchLink:RegExp(`^${t.BASE}/${t.USERS}$|^${t.BASE}/${t.GUESTS}$`)},{title:i.GROUPS,icon:s.GROUPS,link:`${t.BASE}/${t.GROUPS}`,matchLink:RegExp(`^${t.BASE}/${t.GROUPS}|^${t.BASE}/${t.PGROUPS}`)}]};var $=(()=>{let S=class S{transform(r){return r&&U(r)}};S.\u0275fac=function(a){return new(a||S)},S.\u0275pipe=n({name:"capitalize",type:S,pure:!0});let e=S;return e})();export{t as a,i as b,s as c,c as d,$ as e};
@@ -1 +1 @@
1
- import{d as Z}from"./chunk-RJULB733.js";import"./chunk-CMNMPG6Z.js";import"./chunk-TNCKNU6I.js";import{a as G,b as l,d as b}from"./chunk-G7RZN7HN.js";import"./chunk-SDJNZULP.js";import{D as p,aa as f,ca as c,da as a,i as $,ia as d,ja as m,la as g,sa as v,ta as u,ya as x}from"./chunk-2YQ4SX3A.js";import"./chunk-KAVP6UXH.js";var X=1,T=2,y=3,U=155,z=4,j=156;function Y(O){return O>=65&&O<=90||O>=97&&O<=122}var E=new l(O=>{let i=O.pos;for(;;){let{next:t}=O;if(t<0)break;if(t==123){let r=O.peek(1);if(r==123){if(O.pos>i)break;O.acceptToken(X,2);return}else if(r==35){if(O.pos>i)break;O.acceptToken(T,2);return}else if(r==37){if(O.pos>i)break;let e=2,P=2;for(;;){let Q=O.peek(e);if(Q==32||Q==10)++e;else if(Q==35)for(++e;;){let o=O.peek(e);if(o<0||o==10)break;e++}else if(Q==45&&P==2)P=++e;else{O.acceptToken(y,P);return}}}}if(O.advance(),t==10)break}O.pos>i&&O.acceptToken(U)});function _(O,i,t){return new l(r=>{let e=r.pos;for(;;){let{next:P}=r;if(P==123&&r.peek(1)==37){let Q=2;for(;;Q++){let n=r.peek(Q);if(n!=32&&n!=10)break}let o="";for(;;Q++){let n=r.peek(Q);if(!Y(n))break;o+=String.fromCharCode(n)}if(o==O){if(r.pos>e)break;r.acceptToken(t,2);break}}else if(P<0)break;if(r.advance(),P==10)break}r.pos>e&&r.acceptToken(i)})}var W=_("endraw",j,z),V={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},q={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},F=b.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,5:gO#^OPO,5:gO*RQWO'#E|OOOP,5:n,5:nO#lOPO,5:nO*YQWO'#E|OOOP,5:v,5:vO#zOPO,5:vO*aQWO'#E|OOOP,5:{,5:{O$YOPO,5:{O*hQWO'#E|OOOP,5;Q,5;QO$hOPO,5;QO*oQWO'#E|OOOP,5;V,5;VO*vOPO,5;VO$vOPO,5;VO+UQWO'#E|OOOP,5;^,5;^O%UOPO,5;^O+`QWO'#E|OOOP,5;c,5;cO%dOPO,5;cO+gQWO'#E|O+nQSO,5;hOvQSO,5:OO+uQSO,5:ZO+zQSO,5:bO+uQSO,5:hO+uQSO,5:oO,PQSO,5:wO,XQpO,5:|O+uQSO,5;RO,^QSO,5;WO,fQSO,5;_OvQSO,5;dOvQSO,5;jOvQSO,5;jOvQSO,5;pOOOO'#Fk'#FkO,nO#tO,5;wOOOP-E9]-E9]O,vQ!bO,59QOvQSO,59TOvQSO,59UOvQSO,59U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dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:"\u26A0 {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",maxTerm:173,nodeProps:[["closedBy",1,"}}",2,"#}",-2,3,4,"%}",32,")"],["openedBy",7,"{{",31,"(",57,"{%",140,"{#"],["group",-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,"Expression",-11,53,64,71,77,84,92,97,102,107,114,119,"Statement"]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[E,W,1,2,3,4,5,new G("b~RPstU~XP#q#r[~aO$Q~~",17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:O=>V[O]||-1},{term:55,get:O=>q[O]||-1}],tokenPrec:3602});function S(O,i){return O.split(" ").map(t=>({label:t,type:i}))}var N=S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr","function"),C=S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace","function"),D=S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller","keyword"),R=C.concat(D),h=S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends","keyword");function A(O){var i;let{state:t,pos:r}=O,e=m(t).resolveInner(r,-1).enterUnfinishedNodesBefore(r),P=((i=e.childBefore(r))===null||i===void 0?void 0:i.name)||e.name;if(e.name=="FilterName")return{type:"filter",node:e};if(O.explicit&&(P=="FilterOp"||P=="filter"))return{type:"filter"};if(e.name=="TagName")return{type:"tag",node:e};if(O.explicit&&P=="{%")return{type:"tag"};if(e.name=="PropertyName"&&e.parent.name=="MemberExpression")return{type:"prop",node:e,target:e.parent};if(e.name=="."&&e.parent.name=="MemberExpression")return{type:"prop",target:e.parent};if(e.name=="MemberExpression"&&P==".")return{type:"prop",target:e};if(e.name=="VariableName")return{type:"expr",from:e.from};if(e.name=="Comment"||e.name=="StringLiteral"||e.name=="NumberLiteral")return null;let Q=O.matchBefore(/[\w\u00c0-\uffff]+$/);return Q?{type:"expr",from:Q.from}:O.explicit?{type:"expr"}:null}function L(O,i,t,r){let e=[];for(;;){let P=i.getChild("Expression");if(!P)return[];if(P.name=="VariableName"){e.unshift(O.sliceDoc(P.from,P.to));break}else if(P.name=="MemberExpression"){let Q=P.getChild("PropertyName");Q&&e.unshift(O.sliceDoc(Q.from,Q.to)),i=P}else return[]}return r(e,O,t)}function I(O={}){let i=O.tags?O.tags.concat(h):h,t=O.variables?O.variables.concat(R):R,{properties:r}=O;return e=>{var P;let Q=A(e);if(!Q)return null;let o=(P=Q.from)!==null&&P!==void 0?P:Q.node?Q.node.from:e.pos,n;return Q.type=="filter"?n=N:Q.type=="tag"?n=i:Q.type=="expr"?n=t:n=r?L(e.state,Q.target,e,r):[],n.length?{options:n,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var H=p.inputHandler.of((O,i,t,r)=>r!="%"||i!=t||O.state.doc.sliceString(i-1,t+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:"%%"},range:$.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function k(O){return i=>{let t=O.test(i.textAfter);return i.lineIndent(i.node.from)+(t?0:i.unit)}}var B=d.define({name:"jinja",parser:F.configure({props:[c({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":a.keyword,"required scoped recursive with without context ignore missing":a.modifier,self:a.self,"loop super":a.standard(a.variableName),"if elif else endif for endfor call endcall":a.controlKeyword,"block endblock set endset macro endmacro import from include":a.definitionKeyword,"Comment/...":a.blockComment,VariableName:a.variableName,Definition:a.definition(a.variableName),PropertyName:a.propertyName,FilterName:a.special(a.variableName),ArithOp:a.arithmeticOperator,AssignOp:a.definitionOperator,"not and or":a.logicOperator,CompareOp:a.compareOperator,"in is":a.operatorKeyword,"FilterOp ConcatOp":a.operator,StringLiteral:a.string,NumberLiteral:a.number,BooleanLiteral:a.bool,"{% %} {# #} {{ }} { }":a.brace,"( )":a.paren,".":a.derefOperator,": , .":a.punctuation}),v.add({Tag:u({closing:"%}"}),"IfStatement ForStatement":k(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:k(/^\s*(\{%-?\s*)?end\w/)}),x.add({"Statement Comment"(O){let i=O.firstChild,t=O.lastChild;return!i||i.name!="Tag"&&i.name!="{#"?null:{from:i.to,to:t.name=="EndTag"||t.name=="#}"?t.from:O.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),s=Z();function w(O){return B.configure({wrap:f(i=>i.type.isTop?{parser:O.parser,overlay:t=>t.name=="Text"||t.name=="RawText"}:null)},"jinja")}var J=w(s.language);function rO(O={}){let i=O.base||s,t=i.language==s.language?J:w(i.language);return new g(t,[i.support,t.data.of({autocomplete:I(O)}),i.language.data.of({closeBrackets:{brackets:["{"]}}),H])}export{H as closePercentBrace,rO as jinja,I as jinjaCompletionSource,J as jinjaLanguage};
1
+ import{d as Z}from"./chunk-I3XI72AV.js";import"./chunk-M7IFVC5D.js";import"./chunk-AXLDYLIO.js";import{a as G,b as l,d as b}from"./chunk-MPWD4VMY.js";import"./chunk-SQYWQUL4.js";import{D as p,ba as f,da as c,ea as a,i as $,ja as d,ka as m,ma as g,ta as v,ua as u,za as x}from"./chunk-ACCGBDUZ.js";import"./chunk-KAVP6UXH.js";var X=1,T=2,y=3,U=155,z=4,j=156;function Y(O){return O>=65&&O<=90||O>=97&&O<=122}var E=new l(O=>{let i=O.pos;for(;;){let{next:t}=O;if(t<0)break;if(t==123){let r=O.peek(1);if(r==123){if(O.pos>i)break;O.acceptToken(X,2);return}else if(r==35){if(O.pos>i)break;O.acceptToken(T,2);return}else if(r==37){if(O.pos>i)break;let e=2,P=2;for(;;){let Q=O.peek(e);if(Q==32||Q==10)++e;else if(Q==35)for(++e;;){let o=O.peek(e);if(o<0||o==10)break;e++}else if(Q==45&&P==2)P=++e;else{O.acceptToken(y,P);return}}}}if(O.advance(),t==10)break}O.pos>i&&O.acceptToken(U)});function _(O,i,t){return new l(r=>{let e=r.pos;for(;;){let{next:P}=r;if(P==123&&r.peek(1)==37){let Q=2;for(;;Q++){let n=r.peek(Q);if(n!=32&&n!=10)break}let o="";for(;;Q++){let n=r.peek(Q);if(!Y(n))break;o+=String.fromCharCode(n)}if(o==O){if(r.pos>e)break;r.acceptToken(t,2);break}}else if(P<0)break;if(r.advance(),P==10)break}r.pos>e&&r.acceptToken(i)})}var W=_("endraw",j,z),V={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},q={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},F=b.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'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bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:"\u26A0 {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}",maxTerm:173,nodeProps:[["closedBy",1,"}}",2,"#}",-2,3,4,"%}",32,")"],["openedBy",7,"{{",31,"(",57,"{%",140,"{#"],["group",-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,"Expression",-11,53,64,71,77,84,92,97,102,107,114,119,"Statement"]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#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;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[E,W,1,2,3,4,5,new G("b~RPstU~XP#q#r[~aO$Q~~",17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:O=>V[O]||-1},{term:55,get:O=>q[O]||-1}],tokenPrec:3602});function S(O,i){return O.split(" ").map(t=>({label:t,type:i}))}var N=S("abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr","function"),C=S("boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace","function"),D=S("loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller","keyword"),R=C.concat(D),h=S("raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends","keyword");function A(O){var i;let{state:t,pos:r}=O,e=m(t).resolveInner(r,-1).enterUnfinishedNodesBefore(r),P=((i=e.childBefore(r))===null||i===void 0?void 0:i.name)||e.name;if(e.name=="FilterName")return{type:"filter",node:e};if(O.explicit&&(P=="FilterOp"||P=="filter"))return{type:"filter"};if(e.name=="TagName")return{type:"tag",node:e};if(O.explicit&&P=="{%")return{type:"tag"};if(e.name=="PropertyName"&&e.parent.name=="MemberExpression")return{type:"prop",node:e,target:e.parent};if(e.name=="."&&e.parent.name=="MemberExpression")return{type:"prop",target:e.parent};if(e.name=="MemberExpression"&&P==".")return{type:"prop",target:e};if(e.name=="VariableName")return{type:"expr",from:e.from};if(e.name=="Comment"||e.name=="StringLiteral"||e.name=="NumberLiteral")return null;let Q=O.matchBefore(/[\w\u00c0-\uffff]+$/);return Q?{type:"expr",from:Q.from}:O.explicit?{type:"expr"}:null}function L(O,i,t,r){let e=[];for(;;){let P=i.getChild("Expression");if(!P)return[];if(P.name=="VariableName"){e.unshift(O.sliceDoc(P.from,P.to));break}else if(P.name=="MemberExpression"){let Q=P.getChild("PropertyName");Q&&e.unshift(O.sliceDoc(Q.from,Q.to)),i=P}else return[]}return r(e,O,t)}function I(O={}){let i=O.tags?O.tags.concat(h):h,t=O.variables?O.variables.concat(R):R,{properties:r}=O;return e=>{var P;let Q=A(e);if(!Q)return null;let o=(P=Q.from)!==null&&P!==void 0?P:Q.node?Q.node.from:e.pos,n;return Q.type=="filter"?n=N:Q.type=="tag"?n=i:Q.type=="expr"?n=t:n=r?L(e.state,Q.target,e,r):[],n.length?{options:n,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var H=p.inputHandler.of((O,i,t,r)=>r!="%"||i!=t||O.state.doc.sliceString(i-1,t+1)!="{}"?!1:(O.dispatch(O.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:"%%"},range:$.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:"input.type"}),!0));function k(O){return i=>{let t=O.test(i.textAfter);return i.lineIndent(i.node.from)+(t?0:i.unit)}}var B=d.define({name:"jinja",parser:F.configure({props:[c({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":a.keyword,"required scoped recursive with without context ignore missing":a.modifier,self:a.self,"loop super":a.standard(a.variableName),"if elif else endif for endfor call endcall":a.controlKeyword,"block endblock set endset macro endmacro import from include":a.definitionKeyword,"Comment/...":a.blockComment,VariableName:a.variableName,Definition:a.definition(a.variableName),PropertyName:a.propertyName,FilterName:a.special(a.variableName),ArithOp:a.arithmeticOperator,AssignOp:a.definitionOperator,"not and or":a.logicOperator,CompareOp:a.compareOperator,"in is":a.operatorKeyword,"FilterOp ConcatOp":a.operator,StringLiteral:a.string,NumberLiteral:a.number,BooleanLiteral:a.bool,"{% %} {# #} {{ }} { }":a.brace,"( )":a.paren,".":a.derefOperator,": , .":a.punctuation}),v.add({Tag:u({closing:"%}"}),"IfStatement ForStatement":k(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:k(/^\s*(\{%-?\s*)?end\w/)}),x.add({"Statement Comment"(O){let i=O.firstChild,t=O.lastChild;return!i||i.name!="Tag"&&i.name!="{#"?null:{from:i.to,to:t.name=="EndTag"||t.name=="#}"?t.from:O.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),s=Z();function w(O){return B.configure({wrap:f(i=>i.type.isTop?{parser:O.parser,overlay:t=>t.name=="Text"||t.name=="RawText"}:null)},"jinja")}var J=w(s.language);function rO(O={}){let i=O.base||s,t=i.language==s.language?J:w(i.language);return new g(t,[i.support,t.data.of({autocomplete:I(O)}),i.language.data.of({closeBrackets:{brackets:["{"]}}),H])}export{H as closePercentBrace,rO as jinja,I as jinjaCompletionSource,J as jinjaLanguage};
@@ -1 +1 @@
1
- import{$a as at,B as Qt,Ba as mi,Cb as z,I as oi,Ma as _i,Mb as Ai,Na as gi,Nb as ct,Pb as bi,Qb as Ti,Ua as yi,W as ci,X as jt,_ as ot,aa as hi,ab as Ei,ba as ui,ca as xt,da as li,ea as pi,fa as Jt,ga as q,ha as fi,ia as di,ja as X,qb as Si,tb as M,ub as wi,vb as Pt}from"./chunk-AALPWGPB.js";import{Aa as Re,Af as ii,Bb as st,Bd as Je,Cd as Xe,Dd as Rt,Eb as B,Ed as Ot,G as Ae,Gb as D,Gf as ri,Jd as ze,Kb as Pe,Kd as kt,L as be,Lb as Fe,Mb as Ie,Oa as m,Pb as Kt,Qa as Oe,Qb as Le,Rb as bt,Tb as b,Vb as Ue,Vc as $e,W as Te,Xb as Be,Yb as De,Yc as Tt,Yf as si,Zb as Me,ab as At,bb as ke,c as we,cb as xe,ea as wt,fa as ve,fd as vt,ha as Ce,hd as nt,he as Ze,ie as ti,ja as p,jb as Ne,jd as Ct,kc as Ve,kd as qe,lb as k,mb as x,mc as We,oa as W,od as Ge,og as ni,pa as $,pd as He,qg as Nt,rb as C,sb as f,sd as Ye,tb as _,td as Ke,ub as J,v as S,yd as Qe,yf as ei,zd as je}from"./chunk-76M3BMK6.js";import{n as ai}from"./chunk-DM4NXKEP.js";import{a as O,b as ge,d as ye,e as Ee,i as Se}from"./chunk-KAVP6UXH.js";var V=(function(r){return r.USER="user",r.GUEST="guest",r.LINK="link",r.GROUP="group",r.PGROUP="personal group",r})(V||{});function vi(r,t=[]){let e=O({},Object.fromEntries(Object.entries(Ti).filter(([i,s])=>t.indexOf(i)===-1)));if(!r)return e;for(let i of r.split(":"))i in e&&(e[i]=!0);return e}function ts(r,t,e=[]){let i={};if(!r)return i;for(let s of r.split(":"))e.indexOf(s)===-1&&(i[s]=t.indexOf(s)>-1);return i}function es(r,t=[]){let e={};if(!r)return e;for(let i of r.split(":"))t.indexOf(i)===-1&&(e[i]=bi[i]);return e}function is(r){return Object.entries(r).filter(([t,e])=>e).map(([t,e])=>t).join(":")}var T=class{constructor(t,e=[]){this.newly=0,this.linkSettings=null,Object.assign(this,t),this.mid=`${t.type[0]}${t.id}`,this.hPerms=vi(t.permissions,e),t.login&&(this.avatarUrl=M(t.login)),this.isLink=!!this.linkId,this.isGuest=this.type===V.GUEST,this.isUser=this.isGuest||this.type===V.USER&&!this.isLink,this.isGroup=this.type===V.GROUP||this.type===V.PGROUP,this.isPersonalGroup=this.type===V.PGROUP,this.setGroupRole(),this.modifiedAt?this.newly=at(this.modifiedAt):this.createdAt&&(this.newly=at(this.createdAt))}setGroupRole(t){typeof t<"u"&&(this.groupRole=t),this.isGroupManager=this.groupRole===Qt.MANAGER}};function ls(r,t,e){return new T({id:r.id,login:r.login,name:r.fullName,description:r.email,type:V.USER,spaceRole:t||mi.IS_MEMBER,groupRole:e||Qt.MEMBER,permissions:""})}var Ci={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var ht={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var l=(function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r.TWO_FA_BASE="2fa",r.TWO_FA_ENABLE="enable",r.TWO_FA_DISABLE="disable",r.TWO_FA_LOGIN_VERIFY="login/verify",r.TWO_FA_ADMIN_RESET_USER="reset/user",r})(l||{}),ms=`${l.BASE}/${l.LOGIN}`,_s=`${l.BASE}/${l.LOGOUT}`,Ri=`${l.BASE}/${l.REFRESH}`,gs=`${l.BASE}/${l.TOKEN}`,ys=`${l.BASE}/${l.TOKEN_REFRESH}`,Oi=`/${l.WS}`,Xt=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ENABLE}`,ki=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_DISABLE}`,xi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_LOGIN_VERIFY}`,Ni=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ADMIN_RESET_USER}`;var fe={};Ee(fe,{Fetch:()=>mt,Manager:()=>K,NodeWebSocket:()=>L,NodeXHR:()=>I,Socket:()=>H,WebSocket:()=>L,WebTransport:()=>G,XHR:()=>I,connect:()=>Q,default:()=>Q,io:()=>Q,protocol:()=>le});var v=Object.create(null);v.open="0";v.close="1";v.ping="2";v.pong="3";v.message="4";v.upgrade="5";v.noop="6";var ut=Object.create(null);Object.keys(v).forEach(r=>{ut[v[r]]=r});var lt={type:"error",data:"parser error"};var Ii=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Li=typeof ArrayBuffer=="function",Ui=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,pt=({type:r,data:t},e,i)=>Ii&&t instanceof Blob?e?i(t):Pi(t,i):Li&&(t instanceof ArrayBuffer||Ui(t))?e?i(t):Pi(new Blob([t]),i):i(v[r]+(t||"")),Pi=(r,t)=>{let e=new FileReader;return e.onload=function(){let i=e.result.split(",")[1];t("b"+(i||""))},e.readAsDataURL(r)};function Fi(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var zt;function Bi(r,t){if(Ii&&r.data instanceof Blob)return r.data.arrayBuffer().then(Fi).then(t);if(Li&&(r.data instanceof ArrayBuffer||Ui(r.data)))return t(Fi(r.data));pt(r,!1,e=>{zt||(zt=new TextEncoder),t(zt.encode(e))})}var Di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<Di.length;r++)ft[Di.charCodeAt(r)]=r;var Mi=r=>{let t=r.length*.75,e=r.length,i,s=0,n,o,a,h;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);let R=new ArrayBuffer(t),A=new Uint8Array(R);for(i=0;i<e;i+=4)n=ft[r.charCodeAt(i)],o=ft[r.charCodeAt(i+1)],a=ft[r.charCodeAt(i+2)],h=ft[r.charCodeAt(i+3)],A[s++]=n<<2|o>>4,A[s++]=(o&15)<<4|a>>2,A[s++]=(a&3)<<6|h&63;return R};var mr=typeof ArrayBuffer=="function",dt=(r,t)=>{if(typeof r!="string")return{type:"message",data:Vi(r,t)};let e=r.charAt(0);return e==="b"?{type:"message",data:_r(r.substring(1),t)}:ut[e]?r.length>1?{type:ut[e],data:r.substring(1)}:{type:ut[e]}:lt},_r=(r,t)=>{if(mr){let e=Mi(r);return Vi(e,t)}else return{base64:!0,data:r}},Vi=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var Wi="",$i=(r,t)=>{let e=r.length,i=new Array(e),s=0;r.forEach((n,o)=>{pt(n,!1,a=>{i[o]=a,++s===e&&t(i.join(Wi))})})},qi=(r,t)=>{let e=r.split(Wi),i=[];for(let s=0;s<e.length;s++){let n=dt(e[s],t);if(i.push(n),n.type==="error")break}return i};function Gi(){return new TransformStream({transform(r,t){Bi(r,e=>{let i=e.length,s;if(i<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,i);else if(i<65536){s=new Uint8Array(3);let n=new DataView(s.buffer);n.setUint8(0,126),n.setUint16(1,i)}else{s=new Uint8Array(9);let n=new DataView(s.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(i))}r.data&&typeof r.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(e)})}})}var Zt;function It(r){return r.reduce((t,e)=>t+e.length,0)}function Lt(r,t){if(r[0].length===t)return r.shift();let e=new Uint8Array(t),i=0;for(let s=0;s<t;s++)e[s]=r[0][i++],i===r[0].length&&(r.shift(),i=0);return r.length&&i<r[0].length&&(r[0]=r[0].slice(i)),e}function Hi(r,t){Zt||(Zt=new TextDecoder);let e=[],i=0,s=-1,n=!1;return new TransformStream({transform(o,a){for(e.push(o);;){if(i===0){if(It(e)<1)break;let h=Lt(e,1);n=(h[0]&128)===128,s=h[0]&127,s<126?i=3:s===126?i=1:i=2}else if(i===1){if(It(e)<2)break;let h=Lt(e,2);s=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),i=3}else if(i===2){if(It(e)<8)break;let h=Lt(e,8),R=new DataView(h.buffer,h.byteOffset,h.length),A=R.getUint32(0);if(A>Math.pow(2,21)-1){a.enqueue(lt);break}s=A*Math.pow(2,32)+R.getUint32(4),i=3}else{if(It(e)<s)break;let h=Lt(e,s);a.enqueue(dt(n?h:Zt.decode(h),t)),i=0}if(s===0||s>r){a.enqueue(lt);break}}}})}var te=4;function u(r){if(r)return gr(r)}function gr(r){for(var t in u.prototype)r[t]=u.prototype[t];return r}u.prototype.on=u.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};u.prototype.once=function(r,t){function e(){this.off(r,e),t.apply(this,arguments)}return e.fn=t,this.on(r,e),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+r];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var i,s=0;s<e.length;s++)if(i=e[s],i===t||i.fn===t){e.splice(s,1);break}return e.length===0&&delete this._callbacks["$"+r],this};u.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+r],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(e){e=e.slice(0);for(var i=0,s=e.length;i<s;++i)e[i].apply(this,t)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};u.prototype.hasListeners=function(r){return!!this.listeners(r).length};var N=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),g=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Yi="arraybuffer";function Ut(r,...t){return t.reduce((e,i)=>(r.hasOwnProperty(i)&&(e[i]=r[i]),e),{})}var yr=g.setTimeout,Er=g.clearTimeout;function P(r,t){t.useNativeTimers?(r.setTimeoutFn=yr.bind(g),r.clearTimeoutFn=Er.bind(g)):(r.setTimeoutFn=g.setTimeout.bind(g),r.clearTimeoutFn=g.clearTimeout.bind(g))}var Sr=1.33;function Ki(r){return typeof r=="string"?wr(r):Math.ceil((r.byteLength||r.size)*Sr)}function wr(r){let t=0,e=0;for(let i=0,s=r.length;i<s;i++)t=r.charCodeAt(i),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(i++,e+=4);return e}function Bt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Qi(r){let t="";for(let e in r)r.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(r[e]));return t}function ji(r){let t={},e=r.split("&");for(let i=0,s=e.length;i<s;i++){let n=e[i].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}var Dt=class extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}},F=class extends u{constructor(t){super(),this.writable=!1,P(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,i){return super.emitReserved("error",new Dt(t,e,i)),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 e=dt(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let e=Qi(t);return e.length?"?"+e:""}};var Z=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||e()})),this.writable||(i++,this.once("drain",function(){--i||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};qi(t,this.socket.binaryType).forEach(e),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,$i(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Bt()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(t,e)}};var Ji=!1;try{Ji=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Xi=Ji;function Ar(){}var ee=class extends Z{constructor(t){if(super(t),typeof location<"u"){let e=location.protocol==="https:",i=location.port;i||(i=e?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,e){let i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(s,n)=>{this.onError("xhr post error",s,n)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,i)=>{this.onError("xhr poll error",e,i)}),this.pollXhr=t}},Mt=(()=>{class r extends u{constructor(e,i,s){super(),this.createRequest=e,P(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;let i=Ut(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&s.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var n;s.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ar,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zi);else if(typeof addEventListener=="function"){let r="onpagehide"in g?"pagehide":"unload";addEventListener(r,zi,!1)}}function zi(){for(let r in Mt.requests)Mt.requests.hasOwnProperty(r)&&Mt.requests[r].abort()}var br=(function(){let r=Zi({xdomain:!1});return r&&r.responseType!==null})(),I=class extends ee{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=br&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mt(Zi,this.uri(),t)}};function Zi(r){let t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Xi))return new XMLHttpRequest}catch{}if(!t)try{return new g[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tr=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",re=class extends F{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,i=tr?{}:Ut(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,i)}catch(s){return this.emitReserved("error",s)}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 e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;pt(i,this.supportsBinary,n=>{try{this.doWrite(i,n)}catch{}s&&N(()=>{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",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Bt()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}},ie=g.WebSocket||g.MozWebSocket,L=class extends re{createSocket(t,e,i){return tr?new ie(t,e,i):e?new ie(t,e):new ie(t)}doWrite(t,e){this.ws.send(e)}};var G=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 e=Hi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),s=Gi();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();let n=()=>{i.read().then(({done:a,value:h})=>{a||(this.onPacket(h),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 e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;this._writer.write(i).then(()=>{s&&N(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var se={websocket:L,webtransport:G,polling:I};var Tr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function tt(r){if(r.length>8e3)throw"URI too long";let t=r,e=r.indexOf("["),i=r.indexOf("]");e!=-1&&i!=-1&&(r=r.substring(0,e)+r.substring(e,i).replace(/:/g,";")+r.substring(i,r.length));let s=Tr.exec(r||""),n={},o=14;for(;o--;)n[vr[o]]=s[o]||"";return e!=-1&&i!=-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=Cr(n,n.path),n.queryKey=Rr(n,n.query),n}function Cr(r,t){let e=/\/{2,9}/g,i=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function Rr(r,t){let e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,s,n){s&&(e[s]=n)}),e}var ne=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vt=[];ne&&addEventListener("offline",()=>{Vt.forEach(r=>r())},!1);var Wt=(()=>{class r extends u{constructor(e,i){if(super(),this.binaryType=Yi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(i=e,e=null),e){let s=tt(e);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=tt(i.host).host);P(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{let n=s.prototype.name;this.transports.push(n),this._transportsByName[n]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ji(this.opts.query)),ne&&(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"})},Vt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let i=Object.assign({},this.opts.query);i.EIO=te,i.transport=e,this.id&&(i.sid=this.id);let s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let i=this.createTransport(e);i.open(),this.setTransport(i)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let i=new Error("server error");i.code=e.data,this._onError(i);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),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 e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){let n=this.writeBuffer[s].data;if(n&&(i+=Ki(n)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,N(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,i,s){return this._sendPacket("message",e,i,s),this}send(e,i,s){return this._sendPacket("message",e,i,s),this}_sendPacket(e,i,s,n){if(typeof i=="function"&&(n=i,i=void 0),typeof s=="function"&&(n=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;let o={type:e,data:i,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),e()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,i){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(),ne&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let s=Vt.indexOf(this._offlineEventListener);s!==-1&&Vt.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,i),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=te,r})(),$t=class extends Wt{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 e=this.createTransport(t),i=!1;Wt.priorWebsocketSuccess=!1;let s=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",U=>{if(!i)if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Wt.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(A(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let rt=new Error("probe error");rt.transport=e.name,this.emitReserved("upgradeError",rt)}}))};function n(){i||(i=!0,A(),e.close(),e=null)}let o=U=>{let rt=new Error("probe error: "+U);rt.transport=e.name,n(),this.emitReserved("upgradeError",rt)};function a(){o("transport closed")}function h(){o("socket closed")}function R(U){e&&U.name!==e.name&&n()}let A=()=>{e.removeListener("open",s),e.removeListener("error",o),e.removeListener("close",a),this.off("close",h),this.off("upgrading",R)};e.once("open",s),e.once("error",o),e.once("close",a),this.once("close",h),this.once("upgrading",R),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}},et=class extends $t{constructor(t,e={}){let i=typeof t=="object"?t:e;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>se[s]).filter(s=>!!s)),super(t,i)}};var mt=class extends Z{doPoll(){this._fetch().then(t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then(e=>this.onData(e))}).catch(t=>{this.onError("fetch read error",t)})}doWrite(t,e){this._fetch(t).then(i=>{if(!i.ok)return this.onError("fetch write error",i.status,i);e()}).catch(i=>{this.onError("fetch write error",i)})}_fetch(t){var e;let i=t!==void 0,s=new Headers(this.opts.extraHeaders);return i&&s.set("content-type","text/plain;charset=UTF-8"),(e=this.socket._cookieJar)===null||e===void 0||e.appendCookies(s),fetch(this.uri(),{method:i?"POST":"GET",body:i?t:null,headers:s,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 vn=et.protocol;function er(r,t="",e){let i=r;e=e||typeof location<"u"&&location,r==null&&(r=e.protocol+"//"+e.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=e.protocol+r:r=e.host+r),/^(https?|wss?):\/\//.test(r)||(typeof e<"u"?r=e.protocol+"//"+r:r="https://"+r),i=tt(r)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let n=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+t,i.href=i.protocol+"://"+n+(e&&e.port===i.port?"":":"+i.port),i}var pe={};Ee(pe,{Decoder:()=>he,Encoder:()=>ce,PacketType:()=>c,isPacketValid:()=>Ur,protocol:()=>le});var Or=typeof ArrayBuffer=="function",kr=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,ir=Object.prototype.toString,xr=typeof Blob=="function"||typeof Blob<"u"&&ir.call(Blob)==="[object BlobConstructor]",Nr=typeof File=="function"||typeof File<"u"&&ir.call(File)==="[object FileConstructor]";function gt(r){return Or&&(r instanceof ArrayBuffer||kr(r))||xr&&r instanceof Blob||Nr&&r instanceof File}function _t(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;e++)if(_t(r[e]))return!0;return!1}if(gt(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return _t(r.toJSON(),!0);for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&_t(r[e]))return!0;return!1}function rr(r){let t=[],e=r.data,i=r;return i.data=oe(e,t),i.attachments=t.length,{packet:i,buffers:t}}function oe(r,t){if(!r)return r;if(gt(r)){let e={_placeholder:!0,num:t.length};return t.push(r),e}else if(Array.isArray(r)){let e=new Array(r.length);for(let i=0;i<r.length;i++)e[i]=oe(r[i],t);return e}else if(typeof r=="object"&&!(r instanceof Date)){let e={};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=oe(r[i],t));return e}return r}function sr(r,t){return r.data=ae(r.data,t),delete r.attachments,r}function ae(r,t){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<t.length)return t[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let e=0;e<r.length;e++)r[e]=ae(r[e],t);else if(typeof r=="object")for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=ae(r[e],t));return r}var nr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],le=5,c=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(c||{}),ce=class{constructor(t){this.replacer=t}encode(t){return(t.type===c.EVENT||t.type===c.ACK)&&_t(t)?this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===c.BINARY_EVENT||t.type===c.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e=rr(t),i=this.encodeAsString(e.packet),s=e.buffers;return s.unshift(i),s}},he=class r extends u{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);let i=e.type===c.BINARY_EVENT;i||e.type===c.BINARY_ACK?(e.type=i?c.EVENT:c.ACK,this.reconstructor=new ue(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(gt(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0,i={type:Number(t.charAt(0))};if(c[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===c.BINARY_EVENT||i.type===c.BINARY_ACK){let n=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);let o=t.substring(n,e);if(o!=Number(o)||t.charAt(e)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(e+1)==="/"){let n=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););i.nsp=t.substring(n,e)}else i.nsp="/";let s=t.charAt(e+1);if(s!==""&&Number(s)==s){let n=e+1;for(;++e;){let o=t.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){let n=this.tryParse(t.substr(e));if(r.isPayloadValid(i.type,n))i.data=n;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return qt(e);case c.DISCONNECT:return e===void 0;case c.CONNECT_ERROR:return typeof e=="string"||qt(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&nr.indexOf(e[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ue=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 e=sr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Pr(r){return typeof r=="string"}var Fr=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Ir(r){return r===void 0||Fr(r)}function qt(r){return Object.prototype.toString.call(r)==="[object Object]"}function Lr(r,t){switch(r){case c.CONNECT:return t===void 0||qt(t);case c.DISCONNECT:return t===void 0;case c.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&nr.indexOf(t[0])===-1);case c.ACK:return Array.isArray(t);case c.CONNECT_ERROR:return typeof t=="string"||qt(t);default:return!1}}function Ur(r){return Pr(r.nsp)&&Ir(r.id)&&Lr(r.type,r.data)}function w(r,t,e){return r.on(t,e),function(){r.off(t,e)}}var Br=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),H=class extends u{constructor(t,e,i){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=e,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[w(t,"open",this.onopen.bind(this)),w(t,"packet",this.onpacket.bind(this)),w(t,"error",this.onerror.bind(this)),w(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,...e){var i,s,n;if(Br.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let o={type:c.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){let A=this.ids++,U=e.pop();this._registerAckCallback(A,U),o.id=A}let a=(s=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||s===void 0?void 0:s.writable,h=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var i;let s=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(s===void 0){this.acks[t]=e;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);e.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(n),e.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise((i,s)=>{let n=(o,a)=>o?s(o):i(a);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...n)=>(this._queue[0],s!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(s)):(this._queue.shift(),e&&e(null,...n)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.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:c.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,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){let i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case c.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 c.EVENT:case c.BINARY_EVENT:this.onevent(t);break;case c.ACK:case c.BINARY_ACK:this.onack(t);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();let i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){let e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let e=this._anyListeners.slice();for(let i of e)i.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 e=this,i=!1;return function(...s){i||(i=!0,e.packet({type:c.ACK,id:t,data:s}))}}onack(t){let e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}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:c.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 e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,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 e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let e=this._anyOutgoingListeners.slice();for(let i of e)i.apply(this,t.data)}}};function Y(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Y.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-e:r+e}return Math.min(r,this.max)|0};Y.prototype.reset=function(){this.attempts=0};Y.prototype.setMin=function(r){this.ms=r};Y.prototype.setMax=function(r){this.max=r};Y.prototype.setJitter=function(r){this.jitter=r};var K=class extends u{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,P(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;let s=e.parser||pe;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=e.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 e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.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 et(this.uri,this.opts);let e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let s=w(e,"open",function(){i.onopen(),t&&t()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=w(e,"error",n);if(this._timeout!==!1){let a=this._timeout,h=this.setTimeoutFn(()=>{s(),n(new Error("timeout")),e.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(s),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(w(t,"ping",this.onping.bind(this)),w(t,"data",this.ondata.bind(this)),w(t,"error",this.onerror.bind(this)),w(t,"close",this.onclose.bind(this)),w(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){N(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new H(this,t,e),this.nsps[t]=i),i}_destroy(t){let e=Object.keys(this.nsps);for(let i of e)if(this.nsps[i].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],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,e){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),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 e=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var yt={};function Q(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};let e=er(r,t.path||"/socket.io"),i=e.source,s=e.id,n=e.path,o=yt[s]&&n in yt[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o,h;return a?h=new K(i,t):(yt[s]||(yt[s]=new K(i,t)),h=yt[s]),e.query&&!t.query&&(t.query=e.queryKey),h.socket(e.path,t)}Object.assign(Q,{Manager:K,Socket:H,io:Q,connect:Q});var it=class r{config;appRef;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(t,e){this.config=t,this.appRef=e,t===void 0&&(t=this.emptyConfig);let i=t.url,s=t.options,n=Q?Q:fe;this.ioSocket=n(i,s)}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 e=this.namespaces[t];if(e)return e;let a=this.config,{url:i}=a,s=ye(a,["url"]),n=O({url:!i.endsWith("/")&&!t.startsWith("/")?`${i}/${t}`:`${i}${t}`},s),o=new r(n,this.appRef);return this.namespaces[t]=o,o}on(t,e){return this.ioSocket.on(t,e),this}once(t,e){return this.ioSocket.once(t,e),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(t,...e){return this.ioSocket.emit(t,...e),this}send(...t){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(t,...e){return this.ioSocket.emitWithAck(t,...e)}removeListener(t,e){return this.ioSocket.removeListener(t,e),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 we(e=>{let i=s=>{e.next(s),this.appRef.tick()};return this.ioSocket.on(t,i),()=>{this.subscribersCounter[t]--,this.subscribersCounter[t]===0&&(this.ioSocket.removeListener(t,i),delete this.eventObservables$[t])}}).pipe(Te())),this.eventObservables$[t]}fromOneTimeEvent(t){return new Promise(e=>this.once(t,e))}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,e){return this.ioSocket.off(t,e),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 Dr(r,t){return new it(r,t)}var or=new Ce("__SOCKET_IO_CONFIG__"),_o=(()=>{class r{static forRoot(e){return{ngModule:r,providers:[{provide:or,useValue:e},{provide:it,useFactory:Dr,deps:[or,Ne]}]}}static \u0275fac=function(i){return new(i||r)};static \u0275mod=ke({type:r});static \u0275inj=ve({})}return r})();var de={BASE:`${ci}/notifications`,UNREAD:"unread"},Gt=de.BASE;var d=(function(r){return r.ADD="add",r.UPDATE="update",r.DELETE="delete",r.DELETE_PERMANENTLY="deletePermanently",r})(d||{});var y=(function(r){return r.COMMENTS="comments",r.SPACES="spaces",r.SPACE_ROOTS="spaces_roots",r.SHARES="shares",r.LINKS="links",r.SYNC="sync",r.AUTH_LOCKED="auth_locked",r.AUTH_2FA="auth_2fa",r.UNLOCK_REQUEST="unlock_request",r.UPDATE_AVAILABLE="server_update_available",r})(y||{}),bo={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"},UNLOCK_REQUEST:"sends you a request to unlock the file",UPDATE_AVAILABLE:"A new update is available"};var ar=ii;var cr={[y.COMMENTS]:ar,[y.SPACES]:ct.SPACES,[y.SPACE_ROOTS]:ct.SPACES,[y.SHARES]:ct.SHARES,[y.LINKS]:ct.LINKS,[y.SYNC]:Si.SYNC,[y.UNLOCK_REQUEST]:ei};var Ht=class{constructor(t){this.soonRead=!1,Object.assign(this,t),this.fromUser?this.fromUser.avatarUrl=M(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Info",avatarUrl:null},this.appIcon=cr[this.content.app],this.setMainElement()}setMainElement(){if(!(this.content.app===y.COMMENTS||this.content.app===y.SHARES||this.content.app===y.UPDATE_AVAILABLE||this.content.app===y.SYNC)&&this.content?.url){let t=this.content.url.split("/");t.length>1&&(this.mainElement=t[t.length-1])}}};var hr=(()=>{let t=class t{constructor(){this.http=p(Tt),this.store=p(Pt),this.layout=p(z)}getNotifications(i=!1){return this.http.get(`${Gt}${i?`/${de.UNREAD}`:""}`).pipe(S(s=>s.map(n=>new Ht(n))))}wasReadNotification(i){return this.http.patch(`${Gt}/${i}`,null)}deleteNotification(i){return this.http.delete(`${Gt}${i?`/${i}`:""}`)}checkUnreadNotifications(i=!1){this.getNotifications().subscribe(s=>{let n;if(i&&s.length){let o=s[0];n=this.layout.sendNotification("info",o.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(o.content.event)}: <b>${o.content.element}</b>`),null,{enableHtml:!0})}else{let o=s.filter(a=>!a.wasRead).length;o&&(n=this.layout.sendNotification("info","Notifications",this.layout.translateString(o===1?"one_notification":"nb_notifications",{nb:o})))}n&&n.onTap.pipe(be(1)).subscribe(()=>this.layout.showRSideBarTab(yi.NOTIFICATIONS,!0)),this.store.notifications.set(s)})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var E=(function(r){return r.ACCESS="access",r.ACCESS_2FA="access_2fa",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r.CSRF_2FA="csrf_2fa",r})(E||{});var Xo="sync-in-csrf";var me=6;var ur="sync-in-two-fa-code",lr="sync-in-two-fa-password",zo={[E.ACCESS]:"/",[E.REFRESH]:Ri,[E.WS]:Oi,[E.CSRF]:"/",[E.ACCESS_2FA]:xi,[E.CSRF_2FA]:"/"},Zo=[E.REFRESH,E.ACCESS,E.WS,E.CSRF],ta=[E.ACCESS_2FA,E.CSRF_2FA];var Vr=["Password"];function Wr(r,t){r&1&&(f(0,"label",1),b(1,"Password"),_())}function $r(r,t){if(r&1){let e=st();f(0,"div",5),B("click",function(){W(e);let s=D();return $(s.randomPassword())}),f(1,"span"),J(2,"fa-icon",6),_()()}if(r&2){let e=D();m(2),C("icon",e.icons.faDice)}}var pr=(()=>{let t=class t{constructor(){this.passwordChange=new Oe,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.centered=!1,this.locale=p(Ot),this.toggleVisiblePassword=Ei,this.icons={faEye:ti,faEyeSlash:si,faDice:ni}}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(s){return new(s||t)},t.\u0275cmp=At({type:t,selectors:[["app-input-password"]],viewQuery:function(s,n){if(s&1&&Pe(Vr,7),s&2){let o;Fe(o=Ie())&&(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(s,n){if(s&1){let o=st();k(0,Wr,2,0,"label",1),f(1,"div",2)(2,"input",3,0),Ve(4,"translate"),Me("ngModelChange",function(h){return W(o),De(n.password,h)||(n.password=h),$(h)}),B("keyup",function(){return W(o),$(n.passwordChange.emit(n.password))}),_(),k(5,$r,3,1,"div",4),f(6,"div",5),B("click",function(){W(o);let h=Kt(3);return $(n.toggleVisiblePassword(h))}),f(7,"span"),J(8,"fa-icon",6),_()()()}if(s&2){let o=Kt(3);x(n.showLabel?0:-1),m(2),Le("padding-left",n.centered?"2rem":""),bt("is-invalid",n.isRequired&&(n.password==null?null:n.password.length)<n.passwordMinLength)("text-center",n.centered),Be("ngModel",n.password),C("disabled",n.disabled)("placeholder",We(4,13,n.placeholder,n.locale.language))("required",n.isRequired),m(3),x(n.showGenerator?5:-1),m(3),C("icon",o.type==="text"?n.icons.faEye:n.icons.faEyeSlash)}},dependencies:[Xe,vt,Ct,Qe,Ge,Rt,Nt,kt,ze],encapsulation:2});let r=t;return r})();var fr=(()=>{let t=class t{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=p(Re)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};t.\u0275fac=function(s){return new(s||t)},t.\u0275dir=xe({type:t,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let r=t;return r})();function qr(r,t){r&1&&(f(0,"span",3),b(1,"Two-Factor Authentication"),_())}function Gr(r,t){r&1&&(f(0,"span",3),b(1,"Password Authentication"),_())}function Hr(r,t){if(r&1&&b(0),r&2){let e=D();Ue(" ",e.hasError," ")}}function Yr(r,t){r&1&&b(0," Enter your password ")}function Kr(r,t){r&1&&b(0," Valid with your TOTP code ")}function Qr(r,t){if(r&1){let e=st();f(0,"div",9)(1,"app-input-password",13),B("passwordChange",function(s){W(e);let n=D();return $(n.updatePassword(s))}),_()()}if(r&2){let e=D();m(),C("password",e.twoFaForm.value.password)("focus",!0)("centered",!0)}}function jr(r,t){r&1&&(f(0,"div",14),b(1,"Valid with your TOTP code"),_())}function Jr(r,t){if(r&1&&(k(0,jr,2,0,"div",14),f(1,"div",15),J(2,"input",16),_()),r&2){let e=D();x(e.withPassword?0:-1),m(2),C("autoFocus",!e.withPassword)("autoSelect",!e.withPassword)("maxlength",e.twoFaCodelength)}}var dr=(()=>{let t=class t{constructor(){this.withPassword=!1,this.withTwoFaEnabled=!0,this.submitted=!1,this.hasError=null,this.icons={faKey:Ze,faLock:ri},this.twoFaCodelength=me,this.locale=p(Ot),this.fb=p(Je),this.layout=p(z)}ngOnInit(){this.twoFaForm=this.fb.group({totpCode:this.fb.control("",this.withTwoFaEnabled?[nt.required,nt.pattern(new RegExp(`^\\d{${me}}$`))]:null),password:this.fb.control("",this.withPassword?[nt.required,nt.minLength(8)]:null)})}onClose(i=!1){this.isValid(i),this.layout.closeDialog()}onSubmit(){this.submitted=!0;let i=new $e(O(O({},this.withTwoFaEnabled?{[ur]:this.twoFaForm.value.totpCode}:{}),this.withPassword?{[lr]:this.twoFaForm.value.password}:{}));this.onClose(i)}updatePassword(i){this.twoFaForm.patchValue({password:i})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=At({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(s,n){s&1&&(f(0,"div",0)(1,"h4",1),J(2,"fa-icon",2),k(3,qr,2,0,"span",3)(4,Gr,2,0,"span",3),_()(),f(5,"div",4)(6,"div",5)(7,"div",6)(8,"p",7),k(9,Hr,1,1)(10,Yr,1,0)(11,Kr,1,0),_(),f(12,"form",8),B("ngSubmit",function(){return n.onSubmit()}),k(13,Qr,2,3,"div",9),k(14,Jr,3,4),f(15,"div",10)(16,"button",11),b(17,"Confirm"),_(),f(18,"button",12),B("click",function(){return n.onClose()}),b(19,"Cancel"),_()()()()()()),s&2&&(m(2),C("icon",n.icons.faLock),m(),x(n.withTwoFaEnabled?3:4),m(5),bt("text-danger",n.hasError),m(),x(n.hasError?9:n.withPassword?10:11),m(3),C("formGroup",n.twoFaForm),m(),x(n.withPassword?13:-1),m(),x(n.withTwoFaEnabled?14:-1),m(2),C("disabled",n.twoFaForm.invalid||n.submitted))},dependencies:[Nt,kt,fr,Rt,He,vt,Ct,qe,je,Ye,Ke,pr],encapsulation:2});let r=t;return r})();var Yt=class{constructor(t){this.parentGroup=t.parentGroup,this.members=t.members.map(e=>new T(e))}};var j=class{constructor(t){this.newly=0,this.currentAccessHover=!1,this.setManagers(t),Object.assign(this,t),this.avatarUrl=M(t.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=ai(this.currentAccess).fromNow(!0),this.newly=at(this.currentAccess)}setManagers(t){t?.managers&&(t.managers=t.managers.map(e=>new T(e)))}};var St=class{constructor(t){this.setOnlineStatus(gi("status",t)),this.avatarUrl=M(t.login),Object.assign(this,t)}setOnlineStatus(t){this.onlineStatus=t,this.onlineTextStatus=oi[t]}};var lc=(()=>{let t=class t{constructor(){this.http=p(Tt),this.layout=p(z),this.store=p(Pt),this.webSocket=p(it),this.notifications=p(hr),this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(Ci.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USER).pipe(S(i=>new St(i))).subscribe(i=>this.newOnlineUser(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USERS).pipe(S(i=>i.map(s=>new St(s)))).subscribe(i=>this.setOnlineUsers(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_STATUS).subscribe(i=>this.receiveOnlineStatus(i))}get user(){return this.store.user.getValue()}initUser(i,s=!1){this.refreshAvatar(),this.layout.setLanguage(i.language).catch(console.error),this.store.userImpersonate.set(s||i.impersonated),this.store.user.next(i),this.checkQuota(this.store.user.getValue()),s&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(i){this.store.onlineUsers.set(i)}newOnlineUser(i){this.store.onlineUsers().find(s=>s.id===i.id)?this.receiveOnlineStatus({userId:i.id,status:i.onlineStatus}):this.store.onlineUsers.update(s=>[i,...s])}userHavePermission(i){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(i)!==-1:!1}browseGroup(i){return this.http.get(`${fi}${i?`/${i}`:""}`).pipe(S(s=>new Yt(s)))}createPersonalGroup(i){return this.http.post(q,i).pipe(S(s=>new T(s)))}updatePersonalGroup(i,s){return this.http.put(`${q}/${i}`,s).pipe(S(n=>new T(n)))}leavePersonalGroup(i){return this.http.delete(`${di}/${i}`)}addUsersToGroup(i,s){return this.http.patch(`${q}/${i}/${ot.USERS}`,s)}deletePersonalGroup(i){return this.http.delete(`${q}/${i}`)}updateUserFromPersonalGroup(i,s,n){return this.http.patch(`${q}/${i}/${ot.USERS}/${s}`,n)}removeUserFromGroup(i,s){return this.http.delete(`${q}/${i}/${ot.USERS}/${s}`)}listGuests(){return this.http.get(X).pipe(S(i=>i.map(s=>new j(s))))}getGuest(i){return this.http.get(`${X}/${i}`).pipe(S(s=>new j(s)))}createGuest(i){return this.http.post(X,i).pipe(S(s=>new j(s)))}updateGuest(i,s){return this.http.put(`${X}/${i}`,s).pipe(S(n=>n?new j(n):null))}deleteGuest(i){return this.http.delete(`${X}/${i}`)}genAvatar(){this.http.patch(Jt,null).subscribe({next:()=>this.refreshAvatar(),error:i=>this.layout.sendNotification("error","Configuration","Avatar",i)})}uploadAvatar(i){let s=new FormData;s.append("file",i),this.http.put(Jt,s).subscribe({next:()=>this.refreshAvatar(),error:n=>this.layout.sendNotification("error","Configuration","Avatar",n)})}changePassword(i,s){return this.http.put(ui,i,{headers:s})}changeLanguage(i){return this.http.put(hi,i)}changeNotification(i){return this.http.put(li,i)}changeStorageIndexing(i){return this.http.put(pi,i)}changeOnlineStatus(i,s=!0){this.webSocket.emit(ht.EVENTS.ONLINE_STATUS,{status:i,store:s})}receiveOnlineStatus(i){this.user.id===i.userId?this.user.onlineStatus=i.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(s=>s.map(n=>n.id===i.userId?ge(O({},n),{onlineStatus:i.status}):n))}searchMembers(i,s=[]){return this.http.request("search",ot.BASE,{body:i}).pipe(S(n=>n.map(o=>new T(o,s))),Ae(()=>[]))}setMenusVisibility(i){for(let s of i)if(!(s.id&&(s.hide=!this.userHavePermission(s.id),s.hide))&&(s.checks?.length&&(s.hide=!s.checks.map(n=>n.negate?!this[n.prop][n.value]:this[n.prop][n.value]).every(n=>!!n)),s.submenus?.length&&this.setMenusVisibility(s.submenus),s.title===Ai.FILES)){for(let n of s.submenus)if(!n.hide){s.link=n.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(wi())}checkAppStoreAvailability(){this.http.get(`${jt.BASE}/${jt.APP_STORE}`).subscribe({next:i=>this.store.appStoreManifest.set(i),error:i=>console.error(i)})}getEditorProviderPreference(){return localStorage.getItem("editorPreference")}setEditorProviderPreference(i){i===null?localStorage.removeItem("editorPreference"):localStorage.setItem("editorPreference",i)}listAppPasswords(i){return this.http.get(xt,{headers:i})}generateAppPassword(i,s){return this.http.post(xt,i,{headers:s})}deleteAppPassword(i){return this.http.delete(`${xt}/${i}`)}init2Fa(){return this.http.get(Xt)}enable2Fa(i){return this.http.post(Xt,i)}disable2Fa(i){return this.http.post(ki,i)}adminResetUser2Fa(i,s){return this.http.post(`${Ni}/${i}`,null,{headers:s})}auth2FaVerifyDialog(i=!1){return Se(this,null,function*(){let s=this.store.server().twoFaEnabled&&this.user.twoFaEnabled;if(i||s)return new Promise(n=>{let o=this.layout.openDialog(dr,"xs",{initialState:{withPassword:i,withTwoFaEnabled:s}},{keyboard:!1});o.content.isValid=a=>{n(a)}})})}checkQuota(i){if(!(i.isGuest||i.isLink)&&i.storageQuota){let s=Math.round(100/i.storageQuota*(i.storageQuota-i.storageUsage));s<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):s<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0}):s<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0})}}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{ms as a,_s as b,Ri as c,xi as d,Xo as e,me as f,ur as g,lr as h,_o as i,y as j,hr as k,pr as l,fr as m,V as n,vi as o,ts as p,es as q,is as r,T as s,ls as t,Yt as u,j as v,lc as w};
1
+ import{$a as at,B as Qt,Ba as mi,Cb as z,I as oi,Ma as _i,Mb as Ai,Na as gi,Nb as ct,Pb as bi,Qb as Ti,Ua as yi,W as ci,X as jt,_ as ot,aa as hi,ab as Ei,ba as ui,ca as xt,da as li,ea as pi,fa as Jt,ga as q,ha as fi,ia as di,ja as X,qb as Si,tb as M,ub as wi,vb as Pt}from"./chunk-YWLMFOB4.js";import{Aa as Re,Af as ei,Bb as st,Bd as Je,Cd as Xe,Cf as ii,Dd as Rt,Eb as B,Ed as Ot,G as Ae,Gb as D,If as ri,Jd as ze,Kb as Pe,Kd as kt,L as be,Lb as Fe,Mb as Ie,Oa as m,Pb as Kt,Qa as Oe,Qb as Le,Rb as bt,Tb as b,Vb as Ue,Vc as $e,W as Te,Xb as Be,Yb as De,Yc as Tt,Zb as Me,_f as si,ab as At,bb as ke,c as we,cb as xe,ea as wt,fa as ve,fd as vt,ha as Ce,hd as nt,he as Ze,ie as ti,ja as p,jb as Ne,jd as Ct,kc as Ve,kd as qe,lb as k,mb as x,mc as We,oa as W,od as Ge,pa as $,pd as He,qg as ni,rb as C,sb as f,sd as Ye,sg as Nt,tb as _,td as Ke,ub as J,v as S,yd as Qe,zd as je}from"./chunk-QJVC3SRJ.js";import{n as ai}from"./chunk-DM4NXKEP.js";import{a as O,b as ge,d as ye,e as Ee,i as Se}from"./chunk-KAVP6UXH.js";var V=(function(r){return r.USER="user",r.GUEST="guest",r.LINK="link",r.GROUP="group",r.PGROUP="personal group",r})(V||{});function vi(r,t=[]){let e=O({},Object.fromEntries(Object.entries(Ti).filter(([i,s])=>t.indexOf(i)===-1)));if(!r)return e;for(let i of r.split(":"))i in e&&(e[i]=!0);return e}function ts(r,t,e=[]){let i={};if(!r)return i;for(let s of r.split(":"))e.indexOf(s)===-1&&(i[s]=t.indexOf(s)>-1);return i}function es(r,t=[]){let e={};if(!r)return e;for(let i of r.split(":"))t.indexOf(i)===-1&&(e[i]=bi[i]);return e}function is(r){return Object.entries(r).filter(([t,e])=>e).map(([t,e])=>t).join(":")}var T=class{constructor(t,e=[]){this.newly=0,this.linkSettings=null,Object.assign(this,t),this.mid=`${t.type[0]}${t.id}`,this.hPerms=vi(t.permissions,e),t.login&&(this.avatarUrl=M(t.login)),this.isLink=!!this.linkId,this.isGuest=this.type===V.GUEST,this.isUser=this.isGuest||this.type===V.USER&&!this.isLink,this.isGroup=this.type===V.GROUP||this.type===V.PGROUP,this.isPersonalGroup=this.type===V.PGROUP,this.setGroupRole(),this.modifiedAt?this.newly=at(this.modifiedAt):this.createdAt&&(this.newly=at(this.createdAt))}setGroupRole(t){typeof t<"u"&&(this.groupRole=t),this.isGroupManager=this.groupRole===Qt.MANAGER}};function ls(r,t,e){return new T({id:r.id,login:r.login,name:r.fullName,description:r.email,type:V.USER,spaceRole:t||mi.IS_MEMBER,groupRole:e||Qt.MEMBER,permissions:""})}var Ci={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var ht={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var l=(function(r){return r.BASE="/api/auth",r.LOGIN="login",r.LOGOUT="logout",r.REFRESH="refresh",r.TOKEN="token",r.TOKEN_REFRESH="token/refresh",r.WS="socket.io",r.TWO_FA_BASE="2fa",r.TWO_FA_ENABLE="enable",r.TWO_FA_DISABLE="disable",r.TWO_FA_LOGIN_VERIFY="login/verify",r.TWO_FA_ADMIN_RESET_USER="reset/user",r})(l||{}),ms=`${l.BASE}/${l.LOGIN}`,_s=`${l.BASE}/${l.LOGOUT}`,Ri=`${l.BASE}/${l.REFRESH}`,gs=`${l.BASE}/${l.TOKEN}`,ys=`${l.BASE}/${l.TOKEN_REFRESH}`,Oi=`/${l.WS}`,Xt=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ENABLE}`,ki=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_DISABLE}`,xi=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_LOGIN_VERIFY}`,Ni=`${l.BASE}/${l.TWO_FA_BASE}/${l.TWO_FA_ADMIN_RESET_USER}`;var fe={};Ee(fe,{Fetch:()=>mt,Manager:()=>K,NodeWebSocket:()=>L,NodeXHR:()=>I,Socket:()=>H,WebSocket:()=>L,WebTransport:()=>G,XHR:()=>I,connect:()=>Q,default:()=>Q,io:()=>Q,protocol:()=>le});var v=Object.create(null);v.open="0";v.close="1";v.ping="2";v.pong="3";v.message="4";v.upgrade="5";v.noop="6";var ut=Object.create(null);Object.keys(v).forEach(r=>{ut[v[r]]=r});var lt={type:"error",data:"parser error"};var Ii=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Li=typeof ArrayBuffer=="function",Ui=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,pt=({type:r,data:t},e,i)=>Ii&&t instanceof Blob?e?i(t):Pi(t,i):Li&&(t instanceof ArrayBuffer||Ui(t))?e?i(t):Pi(new Blob([t]),i):i(v[r]+(t||"")),Pi=(r,t)=>{let e=new FileReader;return e.onload=function(){let i=e.result.split(",")[1];t("b"+(i||""))},e.readAsDataURL(r)};function Fi(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var zt;function Bi(r,t){if(Ii&&r.data instanceof Blob)return r.data.arrayBuffer().then(Fi).then(t);if(Li&&(r.data instanceof ArrayBuffer||Ui(r.data)))return t(Fi(r.data));pt(r,!1,e=>{zt||(zt=new TextEncoder),t(zt.encode(e))})}var Di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<Di.length;r++)ft[Di.charCodeAt(r)]=r;var Mi=r=>{let t=r.length*.75,e=r.length,i,s=0,n,o,a,h;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);let R=new ArrayBuffer(t),A=new Uint8Array(R);for(i=0;i<e;i+=4)n=ft[r.charCodeAt(i)],o=ft[r.charCodeAt(i+1)],a=ft[r.charCodeAt(i+2)],h=ft[r.charCodeAt(i+3)],A[s++]=n<<2|o>>4,A[s++]=(o&15)<<4|a>>2,A[s++]=(a&3)<<6|h&63;return R};var mr=typeof ArrayBuffer=="function",dt=(r,t)=>{if(typeof r!="string")return{type:"message",data:Vi(r,t)};let e=r.charAt(0);return e==="b"?{type:"message",data:_r(r.substring(1),t)}:ut[e]?r.length>1?{type:ut[e],data:r.substring(1)}:{type:ut[e]}:lt},_r=(r,t)=>{if(mr){let e=Mi(r);return Vi(e,t)}else return{base64:!0,data:r}},Vi=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var Wi="",$i=(r,t)=>{let e=r.length,i=new Array(e),s=0;r.forEach((n,o)=>{pt(n,!1,a=>{i[o]=a,++s===e&&t(i.join(Wi))})})},qi=(r,t)=>{let e=r.split(Wi),i=[];for(let s=0;s<e.length;s++){let n=dt(e[s],t);if(i.push(n),n.type==="error")break}return i};function Gi(){return new TransformStream({transform(r,t){Bi(r,e=>{let i=e.length,s;if(i<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,i);else if(i<65536){s=new Uint8Array(3);let n=new DataView(s.buffer);n.setUint8(0,126),n.setUint16(1,i)}else{s=new Uint8Array(9);let n=new DataView(s.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(i))}r.data&&typeof r.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(e)})}})}var Zt;function It(r){return r.reduce((t,e)=>t+e.length,0)}function Lt(r,t){if(r[0].length===t)return r.shift();let e=new Uint8Array(t),i=0;for(let s=0;s<t;s++)e[s]=r[0][i++],i===r[0].length&&(r.shift(),i=0);return r.length&&i<r[0].length&&(r[0]=r[0].slice(i)),e}function Hi(r,t){Zt||(Zt=new TextDecoder);let e=[],i=0,s=-1,n=!1;return new TransformStream({transform(o,a){for(e.push(o);;){if(i===0){if(It(e)<1)break;let h=Lt(e,1);n=(h[0]&128)===128,s=h[0]&127,s<126?i=3:s===126?i=1:i=2}else if(i===1){if(It(e)<2)break;let h=Lt(e,2);s=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),i=3}else if(i===2){if(It(e)<8)break;let h=Lt(e,8),R=new DataView(h.buffer,h.byteOffset,h.length),A=R.getUint32(0);if(A>Math.pow(2,21)-1){a.enqueue(lt);break}s=A*Math.pow(2,32)+R.getUint32(4),i=3}else{if(It(e)<s)break;let h=Lt(e,s);a.enqueue(dt(n?h:Zt.decode(h),t)),i=0}if(s===0||s>r){a.enqueue(lt);break}}}})}var te=4;function u(r){if(r)return gr(r)}function gr(r){for(var t in u.prototype)r[t]=u.prototype[t];return r}u.prototype.on=u.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};u.prototype.once=function(r,t){function e(){this.off(r,e),t.apply(this,arguments)}return e.fn=t,this.on(r,e),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+r];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var i,s=0;s<e.length;s++)if(i=e[s],i===t||i.fn===t){e.splice(s,1);break}return e.length===0&&delete this._callbacks["$"+r],this};u.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+r],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(e){e=e.slice(0);for(var i=0,s=e.length;i<s;++i)e[i].apply(this,t)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};u.prototype.hasListeners=function(r){return!!this.listeners(r).length};var N=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),g=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Yi="arraybuffer";function Ut(r,...t){return t.reduce((e,i)=>(r.hasOwnProperty(i)&&(e[i]=r[i]),e),{})}var yr=g.setTimeout,Er=g.clearTimeout;function P(r,t){t.useNativeTimers?(r.setTimeoutFn=yr.bind(g),r.clearTimeoutFn=Er.bind(g)):(r.setTimeoutFn=g.setTimeout.bind(g),r.clearTimeoutFn=g.clearTimeout.bind(g))}var Sr=1.33;function Ki(r){return typeof r=="string"?wr(r):Math.ceil((r.byteLength||r.size)*Sr)}function wr(r){let t=0,e=0;for(let i=0,s=r.length;i<s;i++)t=r.charCodeAt(i),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(i++,e+=4);return e}function Bt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Qi(r){let t="";for(let e in r)r.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(r[e]));return t}function ji(r){let t={},e=r.split("&");for(let i=0,s=e.length;i<s;i++){let n=e[i].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}var Dt=class extends Error{constructor(t,e,i){super(t),this.description=e,this.context=i,this.type="TransportError"}},F=class extends u{constructor(t){super(),this.writable=!1,P(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,i){return super.emitReserved("error",new Dt(t,e,i)),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 e=dt(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let e=Qi(t);return e.length?"?"+e:""}};var Z=class extends F{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||e()})),this.writable||(i++,this.once("drain",function(){--i||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};qi(t,this.socket.binaryType).forEach(e),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,$i(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=Bt()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(t,e)}};var Ji=!1;try{Ji=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Xi=Ji;function Ar(){}var ee=class extends Z{constructor(t){if(super(t),typeof location<"u"){let e=location.protocol==="https:",i=location.port;i||(i=e?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,e){let i=this.request({method:"POST",data:t});i.on("success",e),i.on("error",(s,n)=>{this.onError("xhr post error",s,n)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,i)=>{this.onError("xhr poll error",e,i)}),this.pollXhr=t}},Mt=(()=>{class r extends u{constructor(e,i,s){super(),this.createRequest=e,P(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;let i=Ut(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&s.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var n;s.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ar,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zi);else if(typeof addEventListener=="function"){let r="onpagehide"in g?"pagehide":"unload";addEventListener(r,zi,!1)}}function zi(){for(let r in Mt.requests)Mt.requests.hasOwnProperty(r)&&Mt.requests[r].abort()}var br=(function(){let r=Zi({xdomain:!1});return r&&r.responseType!==null})(),I=class extends ee{constructor(t){super(t);let e=t&&t.forceBase64;this.supportsBinary=br&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Mt(Zi,this.uri(),t)}};function Zi(r){let t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Xi))return new XMLHttpRequest}catch{}if(!t)try{return new g[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tr=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",re=class extends F{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,i=tr?{}:Ut(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,i)}catch(s){return this.emitReserved("error",s)}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 e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;pt(i,this.supportsBinary,n=>{try{this.doWrite(i,n)}catch{}s&&N(()=>{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",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Bt()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}},ie=g.WebSocket||g.MozWebSocket,L=class extends re{createSocket(t,e,i){return tr?new ie(t,e,i):e?new ie(t,e):new ie(t)}doWrite(t,e){this.ws.send(e)}};var G=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 e=Hi(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(e).getReader(),s=Gi();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();let n=()=>{i.read().then(({done:a,value:h})=>{a||(this.onPacket(h),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 e=0;e<t.length;e++){let i=t[e],s=e===t.length-1;this._writer.write(i).then(()=>{s&&N(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var se={websocket:L,webtransport:G,polling:I};var Tr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function tt(r){if(r.length>8e3)throw"URI too long";let t=r,e=r.indexOf("["),i=r.indexOf("]");e!=-1&&i!=-1&&(r=r.substring(0,e)+r.substring(e,i).replace(/:/g,";")+r.substring(i,r.length));let s=Tr.exec(r||""),n={},o=14;for(;o--;)n[vr[o]]=s[o]||"";return e!=-1&&i!=-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=Cr(n,n.path),n.queryKey=Rr(n,n.query),n}function Cr(r,t){let e=/\/{2,9}/g,i=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function Rr(r,t){let e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,s,n){s&&(e[s]=n)}),e}var ne=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vt=[];ne&&addEventListener("offline",()=>{Vt.forEach(r=>r())},!1);var Wt=(()=>{class r extends u{constructor(e,i){if(super(),this.binaryType=Yi,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(i=e,e=null),e){let s=tt(e);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=tt(i.host).host);P(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{let n=s.prototype.name;this.transports.push(n),this._transportsByName[n]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ji(this.opts.query)),ne&&(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"})},Vt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let i=Object.assign({},this.opts.query);i.EIO=te,i.transport=e,this.id&&(i.sid=this.id);let s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let i=this.createTransport(e);i.open(),this.setTransport(i)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let i=new Error("server error");i.code=e.data,this._onError(i);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),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 e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){let n=this.writeBuffer[s].data;if(n&&(i+=Ki(n)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,N(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,i,s){return this._sendPacket("message",e,i,s),this}send(e,i,s){return this._sendPacket("message",e,i,s),this}_sendPacket(e,i,s,n){if(typeof i=="function"&&(n=i,i=void 0),typeof s=="function"&&(n=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;let o={type:e,data:i,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),e()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,i){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(),ne&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let s=Vt.indexOf(this._offlineEventListener);s!==-1&&Vt.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,i),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=te,r})(),$t=class extends Wt{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 e=this.createTransport(t),i=!1;Wt.priorWebsocketSuccess=!1;let s=()=>{i||(e.send([{type:"ping",data:"probe"}]),e.once("packet",U=>{if(!i)if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Wt.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(A(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let rt=new Error("probe error");rt.transport=e.name,this.emitReserved("upgradeError",rt)}}))};function n(){i||(i=!0,A(),e.close(),e=null)}let o=U=>{let rt=new Error("probe error: "+U);rt.transport=e.name,n(),this.emitReserved("upgradeError",rt)};function a(){o("transport closed")}function h(){o("socket closed")}function R(U){e&&U.name!==e.name&&n()}let A=()=>{e.removeListener("open",s),e.removeListener("error",o),e.removeListener("close",a),this.off("close",h),this.off("upgrading",R)};e.once("open",s),e.once("error",o),e.once("close",a),this.once("close",h),this.once("upgrading",R),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&e.push(t[i]);return e}},et=class extends $t{constructor(t,e={}){let i=typeof t=="object"?t:e;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>se[s]).filter(s=>!!s)),super(t,i)}};var mt=class extends Z{doPoll(){this._fetch().then(t=>{if(!t.ok)return this.onError("fetch read error",t.status,t);t.text().then(e=>this.onData(e))}).catch(t=>{this.onError("fetch read error",t)})}doWrite(t,e){this._fetch(t).then(i=>{if(!i.ok)return this.onError("fetch write error",i.status,i);e()}).catch(i=>{this.onError("fetch write error",i)})}_fetch(t){var e;let i=t!==void 0,s=new Headers(this.opts.extraHeaders);return i&&s.set("content-type","text/plain;charset=UTF-8"),(e=this.socket._cookieJar)===null||e===void 0||e.appendCookies(s),fetch(this.uri(),{method:i?"POST":"GET",body:i?t:null,headers:s,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 vn=et.protocol;function er(r,t="",e){let i=r;e=e||typeof location<"u"&&location,r==null&&(r=e.protocol+"//"+e.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=e.protocol+r:r=e.host+r),/^(https?|wss?):\/\//.test(r)||(typeof e<"u"?r=e.protocol+"//"+r:r="https://"+r),i=tt(r)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let n=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+t,i.href=i.protocol+"://"+n+(e&&e.port===i.port?"":":"+i.port),i}var pe={};Ee(pe,{Decoder:()=>he,Encoder:()=>ce,PacketType:()=>c,isPacketValid:()=>Ur,protocol:()=>le});var Or=typeof ArrayBuffer=="function",kr=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,ir=Object.prototype.toString,xr=typeof Blob=="function"||typeof Blob<"u"&&ir.call(Blob)==="[object BlobConstructor]",Nr=typeof File=="function"||typeof File<"u"&&ir.call(File)==="[object FileConstructor]";function gt(r){return Or&&(r instanceof ArrayBuffer||kr(r))||xr&&r instanceof Blob||Nr&&r instanceof File}function _t(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let e=0,i=r.length;e<i;e++)if(_t(r[e]))return!0;return!1}if(gt(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return _t(r.toJSON(),!0);for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&_t(r[e]))return!0;return!1}function rr(r){let t=[],e=r.data,i=r;return i.data=oe(e,t),i.attachments=t.length,{packet:i,buffers:t}}function oe(r,t){if(!r)return r;if(gt(r)){let e={_placeholder:!0,num:t.length};return t.push(r),e}else if(Array.isArray(r)){let e=new Array(r.length);for(let i=0;i<r.length;i++)e[i]=oe(r[i],t);return e}else if(typeof r=="object"&&!(r instanceof Date)){let e={};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=oe(r[i],t));return e}return r}function sr(r,t){return r.data=ae(r.data,t),delete r.attachments,r}function ae(r,t){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<t.length)return t[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let e=0;e<r.length;e++)r[e]=ae(r[e],t);else if(typeof r=="object")for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=ae(r[e],t));return r}var nr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],le=5,c=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(c||{}),ce=class{constructor(t){this.replacer=t}encode(t){return(t.type===c.EVENT||t.type===c.ACK)&&_t(t)?this.encodeAsBinary({type:t.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===c.BINARY_EVENT||t.type===c.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e=rr(t),i=this.encodeAsString(e.packet),s=e.buffers;return s.unshift(i),s}},he=class r extends u{constructor(t){super(),this.reviver=t}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);let i=e.type===c.BINARY_EVENT;i||e.type===c.BINARY_ACK?(e.type=i?c.EVENT:c.ACK,this.reconstructor=new ue(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(gt(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0,i={type:Number(t.charAt(0))};if(c[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===c.BINARY_EVENT||i.type===c.BINARY_ACK){let n=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);let o=t.substring(n,e);if(o!=Number(o)||t.charAt(e)!=="-")throw new Error("Illegal attachments");i.attachments=Number(o)}if(t.charAt(e+1)==="/"){let n=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););i.nsp=t.substring(n,e)}else i.nsp="/";let s=t.charAt(e+1);if(s!==""&&Number(s)==s){let n=e+1;for(;++e;){let o=t.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===t.length)break}i.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){let n=this.tryParse(t.substr(e));if(r.isPayloadValid(i.type,n))i.data=n;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case c.CONNECT:return qt(e);case c.DISCONNECT:return e===void 0;case c.CONNECT_ERROR:return typeof e=="string"||qt(e);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&nr.indexOf(e[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ue=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 e=sr(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Pr(r){return typeof r=="string"}var Fr=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Ir(r){return r===void 0||Fr(r)}function qt(r){return Object.prototype.toString.call(r)==="[object Object]"}function Lr(r,t){switch(r){case c.CONNECT:return t===void 0||qt(t);case c.DISCONNECT:return t===void 0;case c.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&nr.indexOf(t[0])===-1);case c.ACK:return Array.isArray(t);case c.CONNECT_ERROR:return typeof t=="string"||qt(t);default:return!1}}function Ur(r){return Pr(r.nsp)&&Ir(r.id)&&Lr(r.type,r.data)}function w(r,t,e){return r.on(t,e),function(){r.off(t,e)}}var Br=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),H=class extends u{constructor(t,e,i){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=e,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[w(t,"open",this.onopen.bind(this)),w(t,"packet",this.onpacket.bind(this)),w(t,"error",this.onerror.bind(this)),w(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,...e){var i,s,n;if(Br.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;let o={type:c.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){let A=this.ids++,U=e.pop();this._registerAckCallback(A,U),o.id=A}let a=(s=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||s===void 0?void 0:s.writable,h=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var i;let s=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(s===void 0){this.acks[t]=e;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);e.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(n),e.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise((i,s)=>{let n=(o,a)=>o?s(o):i(a);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...n)=>(this._queue[0],s!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(s)):(this._queue.shift(),e&&e(null,...n)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.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:c.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,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){let i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case c.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 c.EVENT:case c.BINARY_EVENT:this.onevent(t);break;case c.ACK:case c.BINARY_ACK:this.onack(t);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();let i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){let e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let e=this._anyListeners.slice();for(let i of e)i.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 e=this,i=!1;return function(...s){i||(i=!0,e.packet({type:c.ACK,id:t,data:s}))}}onack(t){let e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}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:c.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 e=this._anyListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,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 e=this._anyOutgoingListeners;for(let i=0;i<e.length;i++)if(t===e[i])return e.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let e=this._anyOutgoingListeners.slice();for(let i of e)i.apply(this,t.data)}}};function Y(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Y.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-e:r+e}return Math.min(r,this.max)|0};Y.prototype.reset=function(){this.attempts=0};Y.prototype.setMin=function(r){this.ms=r};Y.prototype.setMax=function(r){this.max=r};Y.prototype.setJitter=function(r){this.jitter=r};var K=class extends u{constructor(t,e){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,P(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((i=e.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;let s=e.parser||pe;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=e.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 e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.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 et(this.uri,this.opts);let e=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let s=w(e,"open",function(){i.onopen(),t&&t()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=w(e,"error",n);if(this._timeout!==!1){let a=this._timeout,h=this.setTimeoutFn(()=>{s(),n(new Error("timeout")),e.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(s),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(w(t,"ping",this.onping.bind(this)),w(t,"data",this.ondata.bind(this)),w(t,"error",this.onerror.bind(this)),w(t,"close",this.onclose.bind(this)),w(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){N(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new H(this,t,e),this.nsps[t]=i),i}_destroy(t){let e=Object.keys(this.nsps);for(let i of e)if(this.nsps[i].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let i=0;i<e.length;i++)this.engine.write(e[i],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,e){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),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 e=this.backoff.duration();this._reconnecting=!0;let i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},e);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var yt={};function Q(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};let e=er(r,t.path||"/socket.io"),i=e.source,s=e.id,n=e.path,o=yt[s]&&n in yt[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o,h;return a?h=new K(i,t):(yt[s]||(yt[s]=new K(i,t)),h=yt[s]),e.query&&!t.query&&(t.query=e.queryKey),h.socket(e.path,t)}Object.assign(Q,{Manager:K,Socket:H,io:Q,connect:Q});var it=class r{config;appRef;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(t,e){this.config=t,this.appRef=e,t===void 0&&(t=this.emptyConfig);let i=t.url,s=t.options,n=Q?Q:fe;this.ioSocket=n(i,s)}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 e=this.namespaces[t];if(e)return e;let a=this.config,{url:i}=a,s=ye(a,["url"]),n=O({url:!i.endsWith("/")&&!t.startsWith("/")?`${i}/${t}`:`${i}${t}`},s),o=new r(n,this.appRef);return this.namespaces[t]=o,o}on(t,e){return this.ioSocket.on(t,e),this}once(t,e){return this.ioSocket.once(t,e),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(t,...e){return this.ioSocket.emit(t,...e),this}send(...t){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(t,...e){return this.ioSocket.emitWithAck(t,...e)}removeListener(t,e){return this.ioSocket.removeListener(t,e),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 we(e=>{let i=s=>{e.next(s),this.appRef.tick()};return this.ioSocket.on(t,i),()=>{this.subscribersCounter[t]--,this.subscribersCounter[t]===0&&(this.ioSocket.removeListener(t,i),delete this.eventObservables$[t])}}).pipe(Te())),this.eventObservables$[t]}fromOneTimeEvent(t){return new Promise(e=>this.once(t,e))}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,e){return this.ioSocket.off(t,e),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 Dr(r,t){return new it(r,t)}var or=new Ce("__SOCKET_IO_CONFIG__"),_o=(()=>{class r{static forRoot(e){return{ngModule:r,providers:[{provide:or,useValue:e},{provide:it,useFactory:Dr,deps:[or,Ne]}]}}static \u0275fac=function(i){return new(i||r)};static \u0275mod=ke({type:r});static \u0275inj=ve({})}return r})();var de={BASE:`${ci}/notifications`,UNREAD:"unread"},Gt=de.BASE;var d=(function(r){return r.ADD="add",r.UPDATE="update",r.DELETE="delete",r.DELETE_PERMANENTLY="deletePermanently",r})(d||{});var y=(function(r){return r.COMMENTS="comments",r.SPACES="spaces",r.SPACE_ROOTS="spaces_roots",r.SHARES="shares",r.LINKS="links",r.SYNC="sync",r.AUTH_LOCKED="auth_locked",r.AUTH_2FA="auth_2fa",r.UNLOCK_REQUEST="unlock_request",r.UPDATE_AVAILABLE="server_update_available",r})(y||{}),bo={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"},UNLOCK_REQUEST:"sends you a request to unlock the file",UPDATE_AVAILABLE:"A new update is available"};var ar=ii;var cr={[y.COMMENTS]:ar,[y.SPACES]:ct.SPACES,[y.SPACE_ROOTS]:ct.SPACES,[y.SHARES]:ct.SHARES,[y.LINKS]:ct.LINKS,[y.SYNC]:Si.SYNC,[y.UNLOCK_REQUEST]:ei};var Ht=class{constructor(t){this.soonRead=!1,Object.assign(this,t),this.fromUser?this.fromUser.avatarUrl=M(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Info",avatarUrl:null},this.appIcon=cr[this.content.app],this.setMainElement()}setMainElement(){if(!(this.content.app===y.COMMENTS||this.content.app===y.SHARES||this.content.app===y.UPDATE_AVAILABLE||this.content.app===y.SYNC)&&this.content?.url){let t=this.content.url.split("/");t.length>1&&(this.mainElement=t[t.length-1])}}};var hr=(()=>{let t=class t{constructor(){this.http=p(Tt),this.store=p(Pt),this.layout=p(z)}getNotifications(i=!1){return this.http.get(`${Gt}${i?`/${de.UNREAD}`:""}`).pipe(S(s=>s.map(n=>new Ht(n))))}wasReadNotification(i){return this.http.patch(`${Gt}/${i}`,null)}deleteNotification(i){return this.http.delete(`${Gt}${i?`/${i}`:""}`)}checkUnreadNotifications(i=!1){this.getNotifications().subscribe(s=>{let n;if(i&&s.length){let o=s[0];n=this.layout.sendNotification("info",o.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(o.content.event)}: <b>${o.content.element}</b>`),null,{enableHtml:!0})}else{let o=s.filter(a=>!a.wasRead).length;o&&(n=this.layout.sendNotification("info","Notifications",this.layout.translateString(o===1?"one_notification":"nb_notifications",{nb:o})))}n&&n.onTap.pipe(be(1)).subscribe(()=>this.layout.showRSideBarTab(yi.NOTIFICATIONS,!0)),this.store.notifications.set(s)})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();var E=(function(r){return r.ACCESS="access",r.ACCESS_2FA="access_2fa",r.REFRESH="refresh",r.WS="ws",r.CSRF="csrf",r.CSRF_2FA="csrf_2fa",r})(E||{});var Xo="sync-in-csrf";var me=6;var ur="sync-in-two-fa-code",lr="sync-in-two-fa-password",zo={[E.ACCESS]:"/",[E.REFRESH]:Ri,[E.WS]:Oi,[E.CSRF]:"/",[E.ACCESS_2FA]:xi,[E.CSRF_2FA]:"/"},Zo=[E.REFRESH,E.ACCESS,E.WS,E.CSRF],ta=[E.ACCESS_2FA,E.CSRF_2FA];var Vr=["Password"];function Wr(r,t){r&1&&(f(0,"label",1),b(1,"Password"),_())}function $r(r,t){if(r&1){let e=st();f(0,"div",5),B("click",function(){W(e);let s=D();return $(s.randomPassword())}),f(1,"span"),J(2,"fa-icon",6),_()()}if(r&2){let e=D();m(2),C("icon",e.icons.faDice)}}var pr=(()=>{let t=class t{constructor(){this.passwordChange=new Oe,this.passwordMinLength=8,this.showGenerator=!1,this.showLabel=!1,this.disabled=!1,this.isRequired=!1,this.focus=!1,this.centered=!1,this.locale=p(Ot),this.toggleVisiblePassword=Ei,this.icons={faEye:ti,faEyeSlash:si,faDice:ni}}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(s){return new(s||t)},t.\u0275cmp=At({type:t,selectors:[["app-input-password"]],viewQuery:function(s,n){if(s&1&&Pe(Vr,7),s&2){let o;Fe(o=Ie())&&(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(s,n){if(s&1){let o=st();k(0,Wr,2,0,"label",1),f(1,"div",2)(2,"input",3,0),Ve(4,"translate"),Me("ngModelChange",function(h){return W(o),De(n.password,h)||(n.password=h),$(h)}),B("keyup",function(){return W(o),$(n.passwordChange.emit(n.password))}),_(),k(5,$r,3,1,"div",4),f(6,"div",5),B("click",function(){W(o);let h=Kt(3);return $(n.toggleVisiblePassword(h))}),f(7,"span"),J(8,"fa-icon",6),_()()()}if(s&2){let o=Kt(3);x(n.showLabel?0:-1),m(2),Le("padding-left",n.centered?"2rem":""),bt("is-invalid",n.isRequired&&(n.password==null?null:n.password.length)<n.passwordMinLength)("text-center",n.centered),Be("ngModel",n.password),C("disabled",n.disabled)("placeholder",We(4,13,n.placeholder,n.locale.language))("required",n.isRequired),m(3),x(n.showGenerator?5:-1),m(3),C("icon",o.type==="text"?n.icons.faEye:n.icons.faEyeSlash)}},dependencies:[Xe,vt,Ct,Qe,Ge,Rt,Nt,kt,ze],encapsulation:2});let r=t;return r})();var fr=(()=>{let t=class t{constructor(){this.autoFocus=!0,this.autoSelect=!0,this.elementRef=p(Re)}ngOnInit(){setTimeout(()=>{this.autoFocus&&this.elementRef.nativeElement.focus(),this.autoSelect&&this.elementRef.nativeElement.select()},0)}};t.\u0275fac=function(s){return new(s||t)},t.\u0275dir=xe({type:t,selectors:[["","appAutofocus",""]],inputs:{autoFocus:"autoFocus",autoSelect:"autoSelect"}});let r=t;return r})();function qr(r,t){r&1&&(f(0,"span",3),b(1,"Two-Factor Authentication"),_())}function Gr(r,t){r&1&&(f(0,"span",3),b(1,"Password Authentication"),_())}function Hr(r,t){if(r&1&&b(0),r&2){let e=D();Ue(" ",e.hasError," ")}}function Yr(r,t){r&1&&b(0," Enter your password ")}function Kr(r,t){r&1&&b(0," Valid with your TOTP code ")}function Qr(r,t){if(r&1){let e=st();f(0,"div",9)(1,"app-input-password",13),B("passwordChange",function(s){W(e);let n=D();return $(n.updatePassword(s))}),_()()}if(r&2){let e=D();m(),C("password",e.twoFaForm.value.password)("focus",!0)("centered",!0)}}function jr(r,t){r&1&&(f(0,"div",14),b(1,"Valid with your TOTP code"),_())}function Jr(r,t){if(r&1&&(k(0,jr,2,0,"div",14),f(1,"div",15),J(2,"input",16),_()),r&2){let e=D();x(e.withPassword?0:-1),m(2),C("autoFocus",!e.withPassword)("autoSelect",!e.withPassword)("maxlength",e.twoFaCodelength)}}var dr=(()=>{let t=class t{constructor(){this.withPassword=!1,this.withTwoFaEnabled=!0,this.submitted=!1,this.hasError=null,this.icons={faKey:Ze,faLock:ri},this.twoFaCodelength=me,this.locale=p(Ot),this.fb=p(Je),this.layout=p(z)}ngOnInit(){this.twoFaForm=this.fb.group({totpCode:this.fb.control("",this.withTwoFaEnabled?[nt.required,nt.pattern(new RegExp(`^\\d{${me}}$`))]:null),password:this.fb.control("",this.withPassword?[nt.required,nt.minLength(8)]:null)})}onClose(i=!1){this.isValid(i),this.layout.closeDialog()}onSubmit(){this.submitted=!0;let i=new $e(O(O({},this.withTwoFaEnabled?{[ur]:this.twoFaForm.value.totpCode}:{}),this.withPassword?{[lr]:this.twoFaForm.value.password}:{}));this.onClose(i)}updatePassword(i){this.twoFaForm.patchValue({password:i})}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=At({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(s,n){s&1&&(f(0,"div",0)(1,"h4",1),J(2,"fa-icon",2),k(3,qr,2,0,"span",3)(4,Gr,2,0,"span",3),_()(),f(5,"div",4)(6,"div",5)(7,"div",6)(8,"p",7),k(9,Hr,1,1)(10,Yr,1,0)(11,Kr,1,0),_(),f(12,"form",8),B("ngSubmit",function(){return n.onSubmit()}),k(13,Qr,2,3,"div",9),k(14,Jr,3,4),f(15,"div",10)(16,"button",11),b(17,"Confirm"),_(),f(18,"button",12),B("click",function(){return n.onClose()}),b(19,"Cancel"),_()()()()()()),s&2&&(m(2),C("icon",n.icons.faLock),m(),x(n.withTwoFaEnabled?3:4),m(5),bt("text-danger",n.hasError),m(),x(n.hasError?9:n.withPassword?10:11),m(3),C("formGroup",n.twoFaForm),m(),x(n.withPassword?13:-1),m(),x(n.withTwoFaEnabled?14:-1),m(2),C("disabled",n.twoFaForm.invalid||n.submitted))},dependencies:[Nt,kt,fr,Rt,He,vt,Ct,qe,je,Ye,Ke,pr],encapsulation:2});let r=t;return r})();var Yt=class{constructor(t){this.parentGroup=t.parentGroup,this.members=t.members.map(e=>new T(e))}};var j=class{constructor(t){this.newly=0,this.currentAccessHover=!1,this.setManagers(t),Object.assign(this,t),this.avatarUrl=M(t.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=ai(this.currentAccess).fromNow(!0),this.newly=at(this.currentAccess)}setManagers(t){t?.managers&&(t.managers=t.managers.map(e=>new T(e)))}};var St=class{constructor(t){this.setOnlineStatus(gi("status",t)),this.avatarUrl=M(t.login),Object.assign(this,t)}setOnlineStatus(t){this.onlineStatus=t,this.onlineTextStatus=oi[t]}};var lc=(()=>{let t=class t{constructor(){this.http=p(Tt),this.layout=p(z),this.store=p(Pt),this.webSocket=p(it),this.notifications=p(hr),this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(Ci.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USER).pipe(S(i=>new St(i))).subscribe(i=>this.newOnlineUser(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_USERS).pipe(S(i=>i.map(s=>new St(s)))).subscribe(i=>this.setOnlineUsers(i)),this.webSocket.fromEvent(ht.EVENTS.ONLINE_STATUS).subscribe(i=>this.receiveOnlineStatus(i))}get user(){return this.store.user.getValue()}initUser(i,s=!1){this.refreshAvatar(),this.layout.setLanguage(i.language).catch(console.error),this.store.userImpersonate.set(s||i.impersonated),this.store.user.next(i),this.checkQuota(this.store.user.getValue()),s&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(i){this.store.onlineUsers.set(i)}newOnlineUser(i){this.store.onlineUsers().find(s=>s.id===i.id)?this.receiveOnlineStatus({userId:i.id,status:i.onlineStatus}):this.store.onlineUsers.update(s=>[i,...s])}userHavePermission(i){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(i)!==-1:!1}browseGroup(i){return this.http.get(`${fi}${i?`/${i}`:""}`).pipe(S(s=>new Yt(s)))}createPersonalGroup(i){return this.http.post(q,i).pipe(S(s=>new T(s)))}updatePersonalGroup(i,s){return this.http.put(`${q}/${i}`,s).pipe(S(n=>new T(n)))}leavePersonalGroup(i){return this.http.delete(`${di}/${i}`)}addUsersToGroup(i,s){return this.http.patch(`${q}/${i}/${ot.USERS}`,s)}deletePersonalGroup(i){return this.http.delete(`${q}/${i}`)}updateUserFromPersonalGroup(i,s,n){return this.http.patch(`${q}/${i}/${ot.USERS}/${s}`,n)}removeUserFromGroup(i,s){return this.http.delete(`${q}/${i}/${ot.USERS}/${s}`)}listGuests(){return this.http.get(X).pipe(S(i=>i.map(s=>new j(s))))}getGuest(i){return this.http.get(`${X}/${i}`).pipe(S(s=>new j(s)))}createGuest(i){return this.http.post(X,i).pipe(S(s=>new j(s)))}updateGuest(i,s){return this.http.put(`${X}/${i}`,s).pipe(S(n=>n?new j(n):null))}deleteGuest(i){return this.http.delete(`${X}/${i}`)}genAvatar(){this.http.patch(Jt,null).subscribe({next:()=>this.refreshAvatar(),error:i=>this.layout.sendNotification("error","Configuration","Avatar",i)})}uploadAvatar(i){let s=new FormData;s.append("file",i),this.http.put(Jt,s).subscribe({next:()=>this.refreshAvatar(),error:n=>this.layout.sendNotification("error","Configuration","Avatar",n)})}changePassword(i,s){return this.http.put(ui,i,{headers:s})}changeLanguage(i){return this.http.put(hi,i)}changeNotification(i){return this.http.put(li,i)}changeStorageIndexing(i){return this.http.put(pi,i)}changeOnlineStatus(i,s=!0){this.webSocket.emit(ht.EVENTS.ONLINE_STATUS,{status:i,store:s})}receiveOnlineStatus(i){this.user.id===i.userId?this.user.onlineStatus=i.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(s=>s.map(n=>n.id===i.userId?ge(O({},n),{onlineStatus:i.status}):n))}searchMembers(i,s=[]){return this.http.request("search",ot.BASE,{body:i}).pipe(S(n=>n.map(o=>new T(o,s))),Ae(()=>[]))}setMenusVisibility(i){for(let s of i)if(!(s.id&&(s.hide=!this.userHavePermission(s.id),s.hide))&&(s.checks?.length&&(s.hide=!s.checks.map(n=>n.negate?!this[n.prop][n.value]:this[n.prop][n.value]).every(n=>!!n)),s.submenus?.length&&this.setMenusVisibility(s.submenus),s.title===Ai.FILES)){for(let n of s.submenus)if(!n.hide){s.link=n.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(wi())}checkAppStoreAvailability(){this.http.get(`${jt.BASE}/${jt.APP_STORE}`).subscribe({next:i=>this.store.appStoreManifest.set(i),error:i=>console.error(i)})}getEditorProviderPreference(){return localStorage.getItem("editorPreference")}setEditorProviderPreference(i){i===null?localStorage.removeItem("editorPreference"):localStorage.setItem("editorPreference",i)}listAppPasswords(i){return this.http.get(xt,{headers:i})}generateAppPassword(i,s){return this.http.post(xt,i,{headers:s})}deleteAppPassword(i){return this.http.delete(`${xt}/${i}`)}init2Fa(){return this.http.get(Xt)}enable2Fa(i){return this.http.post(Xt,i)}disable2Fa(i){return this.http.post(ki,i)}adminResetUser2Fa(i,s){return this.http.post(`${Ni}/${i}`,null,{headers:s})}auth2FaVerifyDialog(i=!1){return Se(this,null,function*(){let s=this.store.server().twoFaEnabled&&this.user.twoFaEnabled;if(i||s)return new Promise(n=>{let o=this.layout.openDialog(dr,"xs",{initialState:{withPassword:i,withTwoFaEnabled:s}},{keyboard:!1});o.content.isValid=a=>{n(a)}})})}checkQuota(i){if(!(i.isGuest||i.isLink)&&i.storageQuota){let s=Math.round(100/i.storageQuota*(i.storageQuota-i.storageUsage));s<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):s<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0}):s<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:s}),null,{disableTimeOut:!0,closeButton:!0})}}};t.\u0275fac=function(s){return new(s||t)},t.\u0275prov=wt({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{ms as a,_s as b,Ri as c,xi as d,Xo as e,me as f,ur as g,lr as h,_o as i,y as j,hr as k,pr as l,fr as m,V as n,vi as o,ts as p,es as q,is as r,T as s,ls as t,Yt as u,j as v,lc as w};