@sync-in/server 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/package.json +1 -1
  3. package/server/app.constants.js +3 -3
  4. package/server/app.constants.js.map +1 -1
  5. package/server/app.functions.js +42 -0
  6. package/server/app.functions.js.map +1 -0
  7. package/static/{chunk-CCGGCHGN.js → chunk-2TB2INBF.js} +1 -1
  8. package/static/{chunk-KNZ3AQPR.js → chunk-3WLBVJ2S.js} +1 -1
  9. package/static/{chunk-24Q7OUU2.js → chunk-3YDYZLF7.js} +1 -1
  10. package/static/{chunk-XOTKK2NJ.js → chunk-4PZPHJ7L.js} +1 -1
  11. package/static/{chunk-7CFSJ4BO.js → chunk-5E3TYOL3.js} +1 -1
  12. package/static/{chunk-T74SMT7I.js → chunk-5S6KPQRA.js} +1 -1
  13. package/static/{chunk-PG54TWBO.js → chunk-6B3GGAV3.js} +1 -1
  14. package/static/{chunk-KHRF67SG.js → chunk-6NEBGCAZ.js} +1 -1
  15. package/static/{chunk-N3P6P6GW.js → chunk-BODMMLVB.js} +1 -1
  16. package/static/{chunk-Y2I36A4K.js → chunk-BU4ZICZR.js} +1 -1
  17. package/static/{chunk-RX3YQ67K.js → chunk-DQ3GEMPM.js} +1 -1
  18. package/static/{chunk-BYWSTP3P.js → chunk-FNOTGWRW.js} +1 -1
  19. package/static/{chunk-F7TXTNZC.js → chunk-GNZPP2VO.js} +1 -1
  20. package/static/{chunk-LJSVNPPQ.js → chunk-GRLHFXGB.js} +1 -1
  21. package/static/{chunk-EKEGRXCV.js → chunk-HCSWO7BO.js} +1 -1
  22. package/static/{chunk-FTSIPHMG.js → chunk-HMOB6XC5.js} +1 -1
  23. package/static/{chunk-5HNQLBSW.js → chunk-I2S3XPC5.js} +1 -1
  24. package/static/{chunk-S6EVLDHA.js → chunk-JWPXQOS3.js} +1 -1
  25. package/static/{chunk-MRF3CNLZ.js → chunk-JY2I3HGL.js} +1 -1
  26. package/static/{chunk-2FOWUJQF.js → chunk-K657XPXA.js} +1 -1
  27. package/static/{chunk-MRMSMTWD.js → chunk-MIA5YBOI.js} +1 -1
  28. package/static/{chunk-BQZWSZNN.js → chunk-NKGKBQBX.js} +1 -1
  29. package/static/{chunk-OJCAIKUK.js → chunk-PXRT4L57.js} +1 -1
  30. package/static/{chunk-3IISSX63.js → chunk-RDNTK4YH.js} +1 -1
  31. package/static/{chunk-MNNCSSHN.js → chunk-RK2ONYTL.js} +1 -1
  32. package/static/{chunk-QNFNXDSX.js → chunk-S2VBGI6Q.js} +1 -1
  33. package/static/{chunk-Y44XDRM5.js → chunk-TGLJFALR.js} +1 -1
  34. package/static/{chunk-LXQGVNU2.js → chunk-U4RW6XG5.js} +1 -1
  35. package/static/{chunk-4FJUCMEG.js → chunk-V6FA5QY4.js} +1 -1
  36. package/static/{chunk-XX7JXKA6.js → chunk-VK7XMFVE.js} +1 -1
  37. package/static/{chunk-RT3K6DZR.js → chunk-VQJYCYWI.js} +1 -1
  38. package/static/{chunk-MVZJSG5R.js → chunk-XQGPSNQB.js} +1 -1
  39. package/static/{chunk-2XPHUNYN.js → chunk-ZXXHFBGL.js} +1 -1
  40. package/static/index.html +1 -1
  41. package/static/{main-3PLRDZTO.js → main-56PZQ6TJ.js} +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- ## [1.9.0](https://github.com/Sync-in/server/compare/v1.8.1...v1.9.0) (2025-11-24)
2
+ ## [1.9.1](https://github.com/Sync-in/server/compare/v1.8.1...v1.9.1) (2025-11-25)
3
3
 
4
4
  ### Highlights 1.9
5
5
 
@@ -43,6 +43,7 @@
43
43
 
44
44
  ### Bug Fixes
45
45
 
46
+ * **ci:** replace static version import with dynamic version loader, update Dockerfile and add utility function ([15f4752](https://github.com/Sync-in/server/commit/15f4752906ac04ceaf7004162f70f5ba8b9a59cc))
46
47
  * **backend:common:** prevent errors on invalid image metadata with `failOn: 'none'` option in sharp ([901fdf8](https://github.com/Sync-in/server/commit/901fdf8cf9ede111cd821363a2a28470c5d9d314))
47
48
  * **backend:files:** avoid copy failures when sample documents are read-only and files are written to a CIFS share by falling back to stream copy ([3b734b8](https://github.com/Sync-in/server/commit/3b734b82b8d02072aa09d941ffd7b911cfcf3950))
48
49
  * **backend:files:** correct `isDir` SQL logic to handle external paths without associated file IDs ([b3ce7d4](https://github.com/Sync-in/server/commit/b3ce7d4ae66556d455bc5d5495ed2fe070c15efc))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sync-in/server",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "The secure, open-source platform for file storage, sharing, collaboration, and sync",
5
5
  "author": {
6
6
  "name": "Johan Legrand",
@@ -26,9 +26,9 @@ _export(exports, {
26
26
  return VERSION;
27
27
  }
28
28
  });
29
- const _packagejson = require("../../package.json");
30
- const VERSION = _packagejson.version;
31
- const USER_AGENT = `sync-in-server/${_packagejson.version}`;
29
+ const _appfunctions = require("./app.functions");
30
+ const VERSION = (0, _appfunctions.loadVersion)();
31
+ const USER_AGENT = `sync-in-server/${VERSION}`;
32
32
  const CONTENT_SECURITY_POLICY = (onlyOfficeServer)=>({
33
33
  useDefaults: false,
34
34
  directives: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../backend/src/app.constants.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\nimport { version } from '../../package.json'\n\nexport const VERSION = version\nexport const USER_AGENT = `sync-in-server/${version}`\nexport const CONTENT_SECURITY_POLICY = (onlyOfficeServer: string) => ({\n useDefaults: false,\n directives: {\n defaultSrc: [\"'self'\", onlyOfficeServer || ''],\n scriptSrc: [\"'self'\", \"'unsafe-inline'\", onlyOfficeServer || ''],\n styleSrc: [\"'self'\", \"'unsafe-inline'\"],\n imgSrc: [\"'self'\", 'data:'],\n fontSrc: [\"'self'\"]\n }\n})\n\nexport const CONNECT_ERROR_CODE = new Set(['ECONNREFUSED', 'ETIMEDOUT', 'ENOTFOUND'])\n"],"names":["CONNECT_ERROR_CODE","CONTENT_SECURITY_POLICY","USER_AGENT","VERSION","version","onlyOfficeServer","useDefaults","directives","defaultSrc","scriptSrc","styleSrc","imgSrc","fontSrc","Set"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;QAgBYA;eAAAA;;QAXAC;eAAAA;;QADAC;eAAAA;;QADAC;eAAAA;;;6BAFW;AAEjB,MAAMA,UAAUC,oBAAO;AACvB,MAAMF,aAAa,CAAC,eAAe,EAAEE,oBAAO,EAAE;AAC9C,MAAMH,0BAA0B,CAACI,mBAA8B,CAAA;QACpEC,aAAa;QACbC,YAAY;YACVC,YAAY;gBAAC;gBAAUH,oBAAoB;aAAG;YAC9CI,WAAW;gBAAC;gBAAU;gBAAmBJ,oBAAoB;aAAG;YAChEK,UAAU;gBAAC;gBAAU;aAAkB;YACvCC,QAAQ;gBAAC;gBAAU;aAAQ;YAC3BC,SAAS;gBAAC;aAAS;QACrB;IACF,CAAA;AAEO,MAAMZ,qBAAqB,IAAIa,IAAI;IAAC;IAAgB;IAAa;CAAY"}
1
+ {"version":3,"sources":["../../backend/src/app.constants.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { loadVersion } from './app.functions'\n\nexport const VERSION = loadVersion()\nexport const USER_AGENT = `sync-in-server/${VERSION}`\nexport const CONTENT_SECURITY_POLICY = (onlyOfficeServer: string) => ({\n useDefaults: false,\n directives: {\n defaultSrc: [\"'self'\", onlyOfficeServer || ''],\n scriptSrc: [\"'self'\", \"'unsafe-inline'\", onlyOfficeServer || ''],\n styleSrc: [\"'self'\", \"'unsafe-inline'\"],\n imgSrc: [\"'self'\", 'data:'],\n fontSrc: [\"'self'\"]\n }\n})\n\nexport const CONNECT_ERROR_CODE = new Set(['ECONNREFUSED', 'ETIMEDOUT', 'ENOTFOUND'])\n"],"names":["CONNECT_ERROR_CODE","CONTENT_SECURITY_POLICY","USER_AGENT","VERSION","loadVersion","onlyOfficeServer","useDefaults","directives","defaultSrc","scriptSrc","styleSrc","imgSrc","fontSrc","Set"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;QAiBYA;eAAAA;;QAXAC;eAAAA;;QADAC;eAAAA;;QADAC;eAAAA;;;8BAFe;AAErB,MAAMA,UAAUC,IAAAA,yBAAW;AAC3B,MAAMF,aAAa,CAAC,eAAe,EAAEC,SAAS;AAC9C,MAAMF,0BAA0B,CAACI,mBAA8B,CAAA;QACpEC,aAAa;QACbC,YAAY;YACVC,YAAY;gBAAC;gBAAUH,oBAAoB;aAAG;YAC9CI,WAAW;gBAAC;gBAAU;gBAAmBJ,oBAAoB;aAAG;YAChEK,UAAU;gBAAC;gBAAU;aAAkB;YACvCC,QAAQ;gBAAC;gBAAU;aAAQ;YAC3BC,SAAS;gBAAC;aAAS;QACrB;IACF,CAAA;AAEO,MAAMZ,qBAAqB,IAAIa,IAAI;IAAC;IAAgB;IAAa;CAAY"}
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
+ * This file is part of Sync-in | The open source file sync and share solution
4
+ * See the LICENSE file for licensing details
5
+ */ "use strict";
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ Object.defineProperty(exports, "loadVersion", {
10
+ enumerable: true,
11
+ get: function() {
12
+ return loadVersion;
13
+ }
14
+ });
15
+ const _fs = require("fs");
16
+ const _nodepath = require("node:path");
17
+ const _configconstants = require("./configuration/config.constants");
18
+ function loadVersion() {
19
+ let version;
20
+ const currentDir = (0, _nodepath.resolve)((0, _nodepath.join)(__dirname, _configconstants.IS_TEST_ENV ? '../../' : '.'));
21
+ const packageJson = 'package.json';
22
+ const candidatePaths = [
23
+ (0, _nodepath.join)(currentDir, `./${packageJson}`),
24
+ (0, _nodepath.join)(currentDir, `../${packageJson}`),
25
+ (0, _nodepath.join)(currentDir, `../../${packageJson}`)
26
+ ];
27
+ for (const p of candidatePaths){
28
+ if (!(0, _fs.existsSync)(p)) continue;
29
+ try {
30
+ version = JSON.parse((0, _fs.readFileSync)(p, 'utf8')).version;
31
+ break;
32
+ } catch (e) {
33
+ console.error(`unable to load version from: ${p} - ${e}`);
34
+ }
35
+ }
36
+ if (!version) {
37
+ throw new Error('Application version not found (package.json not readable on known paths)');
38
+ }
39
+ return version;
40
+ }
41
+
42
+ //# sourceMappingURL=app.functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../backend/src/app.functions.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { existsSync, readFileSync } from 'fs'\nimport { join, resolve } from 'node:path'\nimport { IS_TEST_ENV } from './configuration/config.constants'\n\nexport function loadVersion(): string {\n let version: string | undefined\n const currentDir = resolve(join(__dirname, IS_TEST_ENV ? '../../' : '.'))\n const packageJson = 'package.json'\n const candidatePaths = [join(currentDir, `./${packageJson}`), join(currentDir, `../${packageJson}`), join(currentDir, `../../${packageJson}`)]\n\n for (const p of candidatePaths) {\n if (!existsSync(p)) continue\n try {\n version = JSON.parse(readFileSync(p, 'utf8')).version\n break\n } catch (e) {\n console.error(`unable to load version from: ${p} - ${e}`)\n }\n }\n\n if (!version) {\n throw new Error('Application version not found (package.json not readable on known paths)')\n }\n\n return version\n}\n"],"names":["loadVersion","version","currentDir","resolve","join","__dirname","IS_TEST_ENV","packageJson","candidatePaths","p","existsSync","JSON","parse","readFileSync","e","console","error","Error"],"mappings":"AAAA;;;;CAIC;;;;+BAMeA;;;eAAAA;;;oBAJyB;0BACX;iCACF;AAErB,SAASA;IACd,IAAIC;IACJ,MAAMC,aAAaC,IAAAA,iBAAO,EAACC,IAAAA,cAAI,EAACC,WAAWC,4BAAW,GAAG,WAAW;IACpE,MAAMC,cAAc;IACpB,MAAMC,iBAAiB;QAACJ,IAAAA,cAAI,EAACF,YAAY,CAAC,EAAE,EAAEK,aAAa;QAAGH,IAAAA,cAAI,EAACF,YAAY,CAAC,GAAG,EAAEK,aAAa;QAAGH,IAAAA,cAAI,EAACF,YAAY,CAAC,MAAM,EAAEK,aAAa;KAAE;IAE9I,KAAK,MAAME,KAAKD,eAAgB;QAC9B,IAAI,CAACE,IAAAA,cAAU,EAACD,IAAI;QACpB,IAAI;YACFR,UAAUU,KAAKC,KAAK,CAACC,IAAAA,gBAAY,EAACJ,GAAG,SAASR,OAAO;YACrD;QACF,EAAE,OAAOa,GAAG;YACVC,QAAQC,KAAK,CAAC,CAAC,6BAA6B,EAAEP,EAAE,GAAG,EAAEK,GAAG;QAC1D;IACF;IAEA,IAAI,CAACb,SAAS;QACZ,MAAM,IAAIgB,MAAM;IAClB;IAEA,OAAOhB;AACT"}
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-RT3K6DZR.js";import{a as ge}from"./chunk-MRF3CNLZ.js";import{a as de}from"./chunk-PG54TWBO.js";import{a as Ce}from"./chunk-QMHUIHSR.js";import{a as fe}from"./chunk-4FJUCMEG.js";import"./chunk-XCLK7NJL.js";import{a as N}from"./chunk-MRMSMTWD.js";import{a as B,b as xe}from"./chunk-7CFSJ4BO.js";import"./chunk-LYZGJZNP.js";import{w as me}from"./chunk-BYWSTP3P.js";import"./chunk-ZCOWBVOT.js";import"./chunk-OJCAIKUK.js";import{Cb as _e,D as oe,F as R,G as re,J as se,gb as pe,s as J,va as le,wa as ce,xa as ue}from"./chunk-5HNQLBSW.js";import{Bb as G,Eb as x,Ed as q,Gb as s,Ia as H,Jd as W,Kb as S,Kd as z,L as D,Lb as F,Ld as X,Mb as U,Oa as a,Pc as j,Qb as I,Rb as $,Rf as te,Sb as k,Tb as p,Tf as ie,Ub as V,Vb as w,Wb as O,ab as L,dc as K,df as Z,dg as ne,fb as M,he as Y,ja as E,kc as g,lb as v,lc as P,mb as h,mc as y,oa as _,og as ae,pa as m,pb as b,qb as T,rb as d,sb as l,tb as c,ub as C,zf as ee}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";var ye=["MainContextMenu"],we=["TargetContextMenu"],ve=(e,o)=>o.key,be=(e,o)=>o.id,Te=(e,o)=>o.mid;function Ge(e,o){if(e&1&&C(0,"fa-icon",18),e&2){let t=s(3);d("icon",t.sortTable.sortParam.asc?t.icons.faArrowDown:t.icons.faArrowUp)("fixedWidth",!1)}}function Se(e,o){if(e&1){let t=G();l(0,"th",17),x("click",function(){_(t);let r=s().$implicit,n=s();return m(n.sortBy(r.key))}),p(1),v(2,Ge,1,2,"fa-icon",18),c()}if(e&2){let t=s().$implicit,i=s();k(t.value.class),I("width",t.value.width,"%"),$("text-align-center",t.value.textCenter)("cursor-pointer",t.value.sortable),a(),w(" ",t.value.label," "),a(),h(i.sortTable.sortParam.column===t.key?2:-1)}}function Fe(e,o){if(e&1&&v(0,Se,3,10,"th",16),e&2){let t=o.$implicit;h(t.value.show?0:-1)}}function Ue(e,o){if(e&1&&(l(0,"div",21),C(1,"img",24),l(2,"div",22)(3,"span",25),p(4),c(),l(5,"span",26),p(6),c()()()),e&2){let t=s(3).$implicit;a(),d("src",t.avatarUrl,H),a(3),w(" ",t.login," "),a(2),V(t.email)}}function Ve(e,o){if(e&1&&(l(0,"div",22)(1,"span",25),p(2),c()()),e&2){let t=s(3).$implicit;a(2),V(t.fullName)}}function Ae(e,o){if(e&1&&C(0,"app-user-avatar",27),e&2){let t=o.$implicit;d("user",t)("isMember",!0)}}function Ee(e,o){if(e&1&&b(0,Ae,1,2,"app-user-avatar",27,Te),e&2){let t=s(3).$implicit;T(t.managers)}}function Me(e,o){e&1&&p(0," too many login attempts ")}function $e(e,o){if(e&1&&p(0),e&2){let t=s(4).$implicit;w(" ",t.userIsActiveText," ")}}function ke(e,o){if(e&1&&(l(0,"span",28),v(1,Me,1,0)(2,$e,1,1),c()),e&2){let t=s(3).$implicit;k(t.isActive?"text-success":"text-danger"),a(),h(!t.isActive&&t.passwordAttempts?1:2)}}function Pe(e,o){if(e&1&&(p(0),g(1,"amDateFormat")),e&2){let t=s(3).$implicit;w(" ",P(1,1,t.createdAt)," ")}}function De(e,o){if(e&1&&(l(0,"div",22)(1,"div"),p(2),g(3,"amDateFormat"),c(),l(4,"div"),p(5),g(6,"amDateFormat"),c()()),e&2){let t=s(5).$implicit;a(2),V(P(3,2,t.currentAccess)),a(3),V(P(6,4,t.lastAccess))}}function Ie(e,o){if(e&1&&p(0),e&2){let t=s(5).$implicit;w(" ",t.hTimeAgo," ")}}function Re(e,o){if(e&1){let t=G();l(0,"div",30),x("mouseover",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!0)})("focus",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!0)})("mouseleave",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!1)}),v(1,De,7,6,"div",22)(2,Ie,1,1),c()}if(e&2){let t=s(4).$implicit;a(),h(t.currentAccessHover?1:2)}}function Be(e,o){e&1&&(l(0,"span",28),p(1,"never"),c())}function Ne(e,o){if(e&1&&v(0,Re,3,1,"div",29)(1,Be,2,0,"span",28),e&2){let t=s(3).$implicit;h(t.currentAccess?0:1)}}function Qe(e,o){if(e&1&&(l(0,"td"),v(1,Ue,7,3,"div",21)(2,Ve,3,1,"div",22)(3,Ee,2,0)(4,ke,3,3,"span",23)(5,Pe,2,3)(6,Ne,2,1),c()),e&2){let t,i=s().$implicit,r=s().$implicit;k(K("",i.value.class," ",i.value.newly?"prop-newly-"+r[i.value.newly]:"")),I("width",i.value.width,"%"),$("text-align-center",i.value.textCenter),a(),h((t=i.key)==="login"?1:t==="fullName"?2:t==="managers"?3:t==="isActive"?4:t==="createdAt"?5:t==="currentAccess"?6:-1)}}function He(e,o){if(e&1&&v(0,Qe,7,9,"td",20),e&2){let t=o.$implicit;h(t.value.show?0:-1)}}function Le(e,o){if(e&1){let t=G();l(0,"tr",19),x("click",function(){let r=_(t).$implicit,n=s();return m(n.onSelect(r))})("contextmenu",function(r){let n=_(t).$implicit,u=s();return m(u.onTargetContextMenu(r,n))})("appTap",function(){_(t);let r=s();return m(r.openGuestDialog())}),b(1,He,1,1,null,null,ve),g(3,"keyvalue"),c()}if(e&2){let t=o.$implicit,i=s();$("disabled",!t.isActive)("selected",t.id===(i.selected==null?null:i.selected.id)),a(),T(y(3,4,i.tableHeaders,i.originalOrderKeyValue))}}function Oe(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"New guest"),c()),e&2){let t=s();a(),d("icon",t.icons.faPlus)}}function Ke(e,o){}function je(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"Refresh"),c()),e&2){let t=s();a(),d("icon",t.icons.faArrowRotateRight)}}function qe(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"Edit guest"),c()),e&2){let t=s();a(),d("icon",t.icons.faPen)}}var vt=(()=>{let o=class o{constructor(){this.locale=E(q),this.originalOrderKeyValue=pe,this.icons={faRotate:X,faPlus:te,faPen:ee,faArrowDown:ne,faArrowUp:Z,faKey:Y,faArrowRotateRight:ie},this.tableHeaders={login:{label:"Login",width:30,textCenter:!1,class:"",show:!0,sortable:!0},fullName:{label:"Full name",width:15,class:"",textCenter:!1,show:!0,sortable:!0},managers:{label:"Managers",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},isActive:{label:"Status",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},createdAt:{label:"Created",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},currentAccess:{label:"Seen",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.loading=!1,this.selected=null,this.guests=[],this.layout=E(_e),this.userService=E(me),this.canCreateGuest=this.userService.userHavePermission(oe.GUESTS_ADMIN),this.sortSettings={default:[{prop:"login",type:"string"}],login:[{prop:"login",type:"string"}],fullName:[{prop:"fullName",type:"string"}],managers:[{prop:"managers",type:"length"}],storage:[{prop:"storageUsage",type:"number"}],currentAccess:[{prop:"currentAccess",type:"date"}],createdAt:[{prop:"createdAt",type:"date"}],isActive:[{prop:"isActive",type:"number"}]},this.sortTable=new xe(this.constructor.name,this.sortSettings),this.loadGuests(),this.layout.setBreadcrumbIcon(se.GUESTS),this.layout.setBreadcrumbNav({url:`/${R.BASE}/${R.GUESTS}/${re.GUESTS}`,splicing:2,translating:!0,sameLink:!0})}loadGuests(){this.loading=!0,this.onSelect(),this.userService.listGuests().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i),this.scrollView.scrollInto(-1),this.loading=!1},error:i=>{this.guests=[],this.layout.sendNotification("error","Guests",i.error.message),this.loading=!1}})}onSelect(i=null){this.selected=i}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,r){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(r),this.layout.openContextMenu(i,this.targetContextMenu)}sortBy(i,r=!0,n){this.guests=this.sortTable.sortBy(i,r,n||this.guests)}openGuestDialog(i=!1){i?this.layout.openDialog(Q,"md").content.guestChange.pipe(D(1)).subscribe(n=>{let[u,f]=n;u==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.guests,f]),this.onSelect(f))}):this.userService.getGuest(this.selected.id).subscribe({next:r=>{this.layout.openDialog(Q,"md",{initialState:{guest:r}}).content.guestChange.pipe(D(1)).subscribe(u=>{let[f,A]=u;f==="update"?this.selected=Object.assign(this.selected,A):f==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.guests.filter(he=>he.id!==A.id)))})},error:r=>this.layout.sendNotification("error","Guest error",this.selected.fullName,r)})}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=L({type:o,selectors:[["app-user-guests"]],viewQuery:function(r,n){if(r&1&&(S(N,5),S(B,7),S(ye,7),S(we,7)),r&2){let u;F(u=U())&&(n.scrollView=u.first),F(u=U())&&(n.inputFilter=u.first),F(u=U())&&(n.mainContextMenu=u.first),F(u=U())&&(n.targetContextMenu=u.first)}},decls:35,vars:32,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["l10nTranslate","",3,"class"],["alt","",1,"avatar-img",3,"src"],["draggable","false",1,"no-pointer-events"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],["l10nTranslate",""],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center",3,"mouseover","focus","mouseleave"]],template:function(r,n){if(r&1){let u=G();l(0,"div",2)(1,"button",3),g(2,"translate"),x("click",function(){return _(u),m(n.loadGuests())}),C(3,"fa-icon",4),c(),l(4,"button",5),g(5,"translate"),x("click",function(){return _(u),m(n.openGuestDialog(!0))}),C(6,"fa-icon",6),c(),l(7,"button",5),g(8,"translate"),x("click",function(){return _(u),m(n.openGuestDialog())}),C(9,"fa-icon",6),c(),C(10,"app-input-filter",7),c(),l(11,"table",8)(12,"thead")(13,"tr"),b(14,Fe,1,1,null,null,ve),g(16,"keyvalue"),c()()(),l(17,"app-virtual-scroll",9),g(18,"searchFilter"),x("contextmenu",function(A){return _(u),m(n.onContextMenu(A))}),l(19,"table",8)(20,"tbody",10),b(21,Le,4,7,"tr",11,be),c()()(),l(23,"div",12)(24,"span",13),p(25),g(26,"translate"),c()(),l(27,"context-menu",null,0),M(29,Oe,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.openGuestDialog(!0))}),M(30,Ke,0,0,"ng-template",15)(31,je,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.loadGuests())}),c(),l(32,"context-menu",null,1),M(34,qe,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.openGuestDialog())}),c()}r&2&&(a(),d("tooltip",y(2,14,"Refresh",n.locale.language)),a(2),d("icon",n.icons.faRotate)("animation",n.loading?"spin":null),a(),d("disabled",!n.canCreateGuest)("tooltip",y(5,17,"New guest",n.locale.language)),a(2),d("icon",n.icons.faPlus),a(),d("disabled",!n.selected)("tooltip",y(8,20,"Edit guest",n.locale.language)),a(2),d("icon",n.icons.faPen),a(5),T(y(16,23,n.tableHeaders,n.originalOrderKeyValue)),a(3),d("bufferAmount",5)("items",y(18,26,n.guests,n.inputFilter.search())),a(4),T(n.scrollView==null?null:n.scrollView.viewPortItems),a(4),O("",n.guests.length," ",y(26,29,"guests",n.locale.language)),a(5),d("divider",!0))},dependencies:[ae,B,J,z,N,ue,ce,le,ge,de,W,j,fe,Ce],encapsulation:2});let e=o;return e})();export{vt as UserGuestsComponent};
1
+ import{a as Q}from"./chunk-VQJYCYWI.js";import{a as ge}from"./chunk-JY2I3HGL.js";import{a as de}from"./chunk-6B3GGAV3.js";import{a as Ce}from"./chunk-QMHUIHSR.js";import{a as fe}from"./chunk-V6FA5QY4.js";import"./chunk-XCLK7NJL.js";import{a as N}from"./chunk-MIA5YBOI.js";import{a as B,b as xe}from"./chunk-5E3TYOL3.js";import"./chunk-LYZGJZNP.js";import{w as me}from"./chunk-FNOTGWRW.js";import"./chunk-ZCOWBVOT.js";import"./chunk-PXRT4L57.js";import{Cb as _e,D as oe,F as R,G as re,J as se,gb as pe,s as J,va as le,wa as ce,xa as ue}from"./chunk-I2S3XPC5.js";import{Bb as G,Eb as x,Ed as q,Gb as s,Ia as H,Jd as W,Kb as S,Kd as z,L as D,Lb as F,Ld as X,Mb as U,Oa as a,Pc as j,Qb as I,Rb as $,Rf as te,Sb as k,Tb as p,Tf as ie,Ub as V,Vb as w,Wb as O,ab as L,dc as K,df as Z,dg as ne,fb as M,he as Y,ja as E,kc as g,lb as v,lc as P,mb as h,mc as y,oa as _,og as ae,pa as m,pb as b,qb as T,rb as d,sb as l,tb as c,ub as C,zf as ee}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";var ye=["MainContextMenu"],we=["TargetContextMenu"],ve=(e,o)=>o.key,be=(e,o)=>o.id,Te=(e,o)=>o.mid;function Ge(e,o){if(e&1&&C(0,"fa-icon",18),e&2){let t=s(3);d("icon",t.sortTable.sortParam.asc?t.icons.faArrowDown:t.icons.faArrowUp)("fixedWidth",!1)}}function Se(e,o){if(e&1){let t=G();l(0,"th",17),x("click",function(){_(t);let r=s().$implicit,n=s();return m(n.sortBy(r.key))}),p(1),v(2,Ge,1,2,"fa-icon",18),c()}if(e&2){let t=s().$implicit,i=s();k(t.value.class),I("width",t.value.width,"%"),$("text-align-center",t.value.textCenter)("cursor-pointer",t.value.sortable),a(),w(" ",t.value.label," "),a(),h(i.sortTable.sortParam.column===t.key?2:-1)}}function Fe(e,o){if(e&1&&v(0,Se,3,10,"th",16),e&2){let t=o.$implicit;h(t.value.show?0:-1)}}function Ue(e,o){if(e&1&&(l(0,"div",21),C(1,"img",24),l(2,"div",22)(3,"span",25),p(4),c(),l(5,"span",26),p(6),c()()()),e&2){let t=s(3).$implicit;a(),d("src",t.avatarUrl,H),a(3),w(" ",t.login," "),a(2),V(t.email)}}function Ve(e,o){if(e&1&&(l(0,"div",22)(1,"span",25),p(2),c()()),e&2){let t=s(3).$implicit;a(2),V(t.fullName)}}function Ae(e,o){if(e&1&&C(0,"app-user-avatar",27),e&2){let t=o.$implicit;d("user",t)("isMember",!0)}}function Ee(e,o){if(e&1&&b(0,Ae,1,2,"app-user-avatar",27,Te),e&2){let t=s(3).$implicit;T(t.managers)}}function Me(e,o){e&1&&p(0," too many login attempts ")}function $e(e,o){if(e&1&&p(0),e&2){let t=s(4).$implicit;w(" ",t.userIsActiveText," ")}}function ke(e,o){if(e&1&&(l(0,"span",28),v(1,Me,1,0)(2,$e,1,1),c()),e&2){let t=s(3).$implicit;k(t.isActive?"text-success":"text-danger"),a(),h(!t.isActive&&t.passwordAttempts?1:2)}}function Pe(e,o){if(e&1&&(p(0),g(1,"amDateFormat")),e&2){let t=s(3).$implicit;w(" ",P(1,1,t.createdAt)," ")}}function De(e,o){if(e&1&&(l(0,"div",22)(1,"div"),p(2),g(3,"amDateFormat"),c(),l(4,"div"),p(5),g(6,"amDateFormat"),c()()),e&2){let t=s(5).$implicit;a(2),V(P(3,2,t.currentAccess)),a(3),V(P(6,4,t.lastAccess))}}function Ie(e,o){if(e&1&&p(0),e&2){let t=s(5).$implicit;w(" ",t.hTimeAgo," ")}}function Re(e,o){if(e&1){let t=G();l(0,"div",30),x("mouseover",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!0)})("focus",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!0)})("mouseleave",function(){_(t);let r=s(4).$implicit;return m(r.currentAccessHover=!1)}),v(1,De,7,6,"div",22)(2,Ie,1,1),c()}if(e&2){let t=s(4).$implicit;a(),h(t.currentAccessHover?1:2)}}function Be(e,o){e&1&&(l(0,"span",28),p(1,"never"),c())}function Ne(e,o){if(e&1&&v(0,Re,3,1,"div",29)(1,Be,2,0,"span",28),e&2){let t=s(3).$implicit;h(t.currentAccess?0:1)}}function Qe(e,o){if(e&1&&(l(0,"td"),v(1,Ue,7,3,"div",21)(2,Ve,3,1,"div",22)(3,Ee,2,0)(4,ke,3,3,"span",23)(5,Pe,2,3)(6,Ne,2,1),c()),e&2){let t,i=s().$implicit,r=s().$implicit;k(K("",i.value.class," ",i.value.newly?"prop-newly-"+r[i.value.newly]:"")),I("width",i.value.width,"%"),$("text-align-center",i.value.textCenter),a(),h((t=i.key)==="login"?1:t==="fullName"?2:t==="managers"?3:t==="isActive"?4:t==="createdAt"?5:t==="currentAccess"?6:-1)}}function He(e,o){if(e&1&&v(0,Qe,7,9,"td",20),e&2){let t=o.$implicit;h(t.value.show?0:-1)}}function Le(e,o){if(e&1){let t=G();l(0,"tr",19),x("click",function(){let r=_(t).$implicit,n=s();return m(n.onSelect(r))})("contextmenu",function(r){let n=_(t).$implicit,u=s();return m(u.onTargetContextMenu(r,n))})("appTap",function(){_(t);let r=s();return m(r.openGuestDialog())}),b(1,He,1,1,null,null,ve),g(3,"keyvalue"),c()}if(e&2){let t=o.$implicit,i=s();$("disabled",!t.isActive)("selected",t.id===(i.selected==null?null:i.selected.id)),a(),T(y(3,4,i.tableHeaders,i.originalOrderKeyValue))}}function Oe(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"New guest"),c()),e&2){let t=s();a(),d("icon",t.icons.faPlus)}}function Ke(e,o){}function je(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"Refresh"),c()),e&2){let t=s();a(),d("icon",t.icons.faArrowRotateRight)}}function qe(e,o){if(e&1&&(l(0,"span",28),C(1,"fa-icon",6),p(2,"Edit guest"),c()),e&2){let t=s();a(),d("icon",t.icons.faPen)}}var vt=(()=>{let o=class o{constructor(){this.locale=E(q),this.originalOrderKeyValue=pe,this.icons={faRotate:X,faPlus:te,faPen:ee,faArrowDown:ne,faArrowUp:Z,faKey:Y,faArrowRotateRight:ie},this.tableHeaders={login:{label:"Login",width:30,textCenter:!1,class:"",show:!0,sortable:!0},fullName:{label:"Full name",width:15,class:"",textCenter:!1,show:!0,sortable:!0},managers:{label:"Managers",width:15,class:"d-none d-md-table-cell",textCenter:!0,show:!0,sortable:!0},isActive:{label:"Status",width:10,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},createdAt:{label:"Created",width:12,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},currentAccess:{label:"Seen",width:12,textCenter:!0,class:"d-none d-lg-table-cell",newly:"newly",show:!0,sortable:!0}},this.loading=!1,this.selected=null,this.guests=[],this.layout=E(_e),this.userService=E(me),this.canCreateGuest=this.userService.userHavePermission(oe.GUESTS_ADMIN),this.sortSettings={default:[{prop:"login",type:"string"}],login:[{prop:"login",type:"string"}],fullName:[{prop:"fullName",type:"string"}],managers:[{prop:"managers",type:"length"}],storage:[{prop:"storageUsage",type:"number"}],currentAccess:[{prop:"currentAccess",type:"date"}],createdAt:[{prop:"createdAt",type:"date"}],isActive:[{prop:"isActive",type:"number"}]},this.sortTable=new xe(this.constructor.name,this.sortSettings),this.loadGuests(),this.layout.setBreadcrumbIcon(se.GUESTS),this.layout.setBreadcrumbNav({url:`/${R.BASE}/${R.GUESTS}/${re.GUESTS}`,splicing:2,translating:!0,sameLink:!0})}loadGuests(){this.loading=!0,this.onSelect(),this.userService.listGuests().subscribe({next:i=>{this.sortBy(this.sortTable.sortParam.column,!1,i),this.scrollView.scrollInto(-1),this.loading=!1},error:i=>{this.guests=[],this.layout.sendNotification("error","Guests",i.error.message),this.loading=!1}})}onSelect(i=null){this.selected=i}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}onTargetContextMenu(i,r){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(r),this.layout.openContextMenu(i,this.targetContextMenu)}sortBy(i,r=!0,n){this.guests=this.sortTable.sortBy(i,r,n||this.guests)}openGuestDialog(i=!1){i?this.layout.openDialog(Q,"md").content.guestChange.pipe(D(1)).subscribe(n=>{let[u,f]=n;u==="add"&&(this.sortBy(this.sortTable.sortParam.column,!1,[...this.guests,f]),this.onSelect(f))}):this.userService.getGuest(this.selected.id).subscribe({next:r=>{this.layout.openDialog(Q,"md",{initialState:{guest:r}}).content.guestChange.pipe(D(1)).subscribe(u=>{let[f,A]=u;f==="update"?this.selected=Object.assign(this.selected,A):f==="delete"&&(this.onSelect(),this.sortBy(this.sortTable.sortParam.column,!1,this.guests.filter(he=>he.id!==A.id)))})},error:r=>this.layout.sendNotification("error","Guest error",this.selected.fullName,r)})}};o.\u0275fac=function(r){return new(r||o)},o.\u0275cmp=L({type:o,selectors:[["app-user-guests"]],viewQuery:function(r,n){if(r&1&&(S(N,5),S(B,7),S(ye,7),S(we,7)),r&2){let u;F(u=U())&&(n.scrollView=u.first),F(u=U())&&(n.inputFilter=u.first),F(u=U())&&(n.mainContextMenu=u.first),F(u=U())&&(n.targetContextMenu=u.first)}},decls:35,vars:32,consts:[["MainContextMenu",""],["TargetContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon","animation"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],[3,"icon"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],[3,"contextmenu","bufferAmount","items"],["tabindex","-1"],[3,"disabled","selected"],[1,"app-foot-menu"],[1,"mx-auto"],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"icon","fixedWidth"],[3,"click","contextmenu","appTap"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center","avatar"],[1,"d-flex","flex-column"],["l10nTranslate","",3,"class"],["alt","",1,"avatar-img",3,"src"],["draggable","false",1,"no-pointer-events"],["draggable","false",1,"no-pointer-events","text-muted","fs-xxxs"],[3,"user","isMember"],["l10nTranslate",""],[1,"d-flex","justify-content-center"],[1,"d-flex","justify-content-center",3,"mouseover","focus","mouseleave"]],template:function(r,n){if(r&1){let u=G();l(0,"div",2)(1,"button",3),g(2,"translate"),x("click",function(){return _(u),m(n.loadGuests())}),C(3,"fa-icon",4),c(),l(4,"button",5),g(5,"translate"),x("click",function(){return _(u),m(n.openGuestDialog(!0))}),C(6,"fa-icon",6),c(),l(7,"button",5),g(8,"translate"),x("click",function(){return _(u),m(n.openGuestDialog())}),C(9,"fa-icon",6),c(),C(10,"app-input-filter",7),c(),l(11,"table",8)(12,"thead")(13,"tr"),b(14,Fe,1,1,null,null,ve),g(16,"keyvalue"),c()()(),l(17,"app-virtual-scroll",9),g(18,"searchFilter"),x("contextmenu",function(A){return _(u),m(n.onContextMenu(A))}),l(19,"table",8)(20,"tbody",10),b(21,Le,4,7,"tr",11,be),c()()(),l(23,"div",12)(24,"span",13),p(25),g(26,"translate"),c()(),l(27,"context-menu",null,0),M(29,Oe,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.openGuestDialog(!0))}),M(30,Ke,0,0,"ng-template",15)(31,je,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.loadGuests())}),c(),l(32,"context-menu",null,1),M(34,qe,3,1,"ng-template",14),x("execute",function(){return _(u),m(n.openGuestDialog())}),c()}r&2&&(a(),d("tooltip",y(2,14,"Refresh",n.locale.language)),a(2),d("icon",n.icons.faRotate)("animation",n.loading?"spin":null),a(),d("disabled",!n.canCreateGuest)("tooltip",y(5,17,"New guest",n.locale.language)),a(2),d("icon",n.icons.faPlus),a(),d("disabled",!n.selected)("tooltip",y(8,20,"Edit guest",n.locale.language)),a(2),d("icon",n.icons.faPen),a(5),T(y(16,23,n.tableHeaders,n.originalOrderKeyValue)),a(3),d("bufferAmount",5)("items",y(18,26,n.guests,n.inputFilter.search())),a(4),T(n.scrollView==null?null:n.scrollView.viewPortItems),a(4),O("",n.guests.length," ",y(26,29,"guests",n.locale.language)),a(5),d("divider",!0))},dependencies:[ae,B,J,z,N,ue,ce,le,ge,de,W,j,fe,Ce],encapsulation:2});let e=o;return e})();export{vt as UserGuestsComponent};
@@ -1 +1 @@
1
- import{e as oe}from"./chunk-24Q7OUU2.js";import{b as ne}from"./chunk-BQZWSZNN.js";import{s as d,u as se,v as I}from"./chunk-BYWSTP3P.js";import{$a as te,A as R,C as A,D as W,F as v,fb as ie,ka as E,la as u,ma as K,na as f,oa as Q,pa as a,qa as X,ra as Y,sa as Z,ta as ee,tb as re}from"./chunk-5HNQLBSW.js";import{d as H}from"./chunk-Y5RLD72B.js";import{Bb as D,Eb as k,Ed as V,G as w,Gb as g,Jd as q,Kd as z,Oa as S,Qa as O,Tb as U,Vb as L,Yc as F,ab as C,ea as P,ja as c,kc as $,lc as B,mc as j,nb as N,oa as x,pa as T,pb as b,qb as G,rb as y,sb as _,tb as l,v as o}from"./chunk-IOIBQGHN.js";import{n as J}from"./chunk-DM4NXKEP.js";var m=class{constructor(i){this.isAdmin=!1,this.newly=0,this.applications=[],this.currentAccessHover=!1,this.setGroups(i),this.setManagers(i),Object.assign(this,i),this.isAdmin=i.role===R.ADMINISTRATOR,this.userRoleText=ie(R[i.role]),this.avatarUrl=re(i.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=J(this.currentAccess).fromNow(!0),this.newly=te(this.currentAccess),this.permissions&&(this.applications=this.permissions.split(A))}setGroups(i){i?.groups&&(i.groups=i.groups.map(p=>new d(p)))}setManagers(i){i?.managers&&(i.managers=i.managers.map(p=>new d(p)))}};var h=class{constructor(i){Object.assign(this,i),this.permissions&&(this.applications=this.permissions.split(A))}};var Te=(()=>{let i=class i{constructor(){this.http=c(F),this.router=c(H),this.authService=c(ne)}listUsers(e=!1){return this.http.get(e?Q:K).pipe(o(t=>t.map(r=>new m(r))))}getUser(e,t=!1){return this.http.get(`${t?f:u}/${e}`).pipe(o(r=>t?new I(r):new m(r)))}createUser(e,t,r=!1){return this.http.post(r?f:u,e,{headers:t}).pipe(o(n=>r?new I(n):new m(n)))}updateUser(e,t,r,n=!1){return this.http.put(`${n?f:u}/${e}`,t,{headers:r}).pipe(o(M=>n?new I(M):new m(M)))}deleteUser(e,t,r){return this.http.request("delete",`${t.isGuest?f:u}/${e}`,{headers:r,body:t})}browseGroup(e,t=!1){return this.http.get(`${t?Y:X}${e?`/${e}`:""}`).pipe(o(r=>new se(r)))}getGroup(e){return this.http.get(`${a}/${e}`).pipe(o(t=>new h(t)))}createGroup(e){return this.http.post(a,e).pipe(o(t=>new h(t)))}updateGroup(e,t){return this.http.put(`${a}/${e}`,t).pipe(o(r=>new h(r)))}deleteGroup(e){return this.http.delete(`${a}/${e}`)}addUsersToGroup(e,t){return this.http.patch(`${a}/${e}/${E.USERS}`,t)}updateUserFromGroup(e,t,r){return this.http.patch(`${a}/${e}/${E.USERS}/${t}`,r)}removeUserFromGroup(e,t){return this.http.delete(`${a}/${e}/${E.USERS}/${t}`)}searchMembers(e,t=!1){return this.http.request("search",Z,{body:e}).pipe(o(r=>r.map(n=>(t&&delete n.description,new d(n)))),w(()=>[]))}impersonateUser(e,t){return this.http.post(`${ee}/${e}`,null,{headers:t})}initImpersonateUser(e){this.authService.initUserFromResponse(e,!0),this.router.navigate([v.BASE,v.ACCOUNT]).catch(console.error)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"});let s=i;return s})();function ae(s,i){if(s&1){let p=D();_(0,"div",3)(1,"label",4)(2,"input",5),k("change",function(t){let r=x(p).$implicit,n=g();return T(n.updatePermissions(r,t))}),l(),U(3),$(4,"translate"),$(5,"capitalize"),l()()}if(s&2){let p=i.$implicit,e=g();S(2),y("checked",e.permissions.indexOf(p)>-1)("value",p),S(),L(" ",B(5,6,j(4,3,p,e.locale.language))," ")}}var Le=(()=>{let i=class i{constructor(){this.permissions=[],this.permissionsChange=new O,this.locale=c(V),this.allApplications=Object.values(W)}updatePermissions(e,t){t.target.checked?this.permissions.push(e):this.permissions.splice(this.permissions.indexOf(e),1),this.permissionsChange.emit(this.permissions)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=C({type:i,selectors:[["app-admin-permissions"]],inputs:{permissions:"permissions"},outputs:{permissionsChange:"permissionsChange"},decls:6,vars:0,consts:[[1,"d-flex","flex-column","col-12","pb-3"],["for","permissions","l10nTranslate",""],["id","permissions",1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"change","checked","value"]],template:function(t,r){t&1&&(_(0,"div",0)(1,"label",1),U(2,"Permissions"),l(),_(3,"div",2),b(4,ae,6,8,"div",3,N),l()()),t&2&&(S(4),G(r.allApplications))},dependencies:[z,oe,q],encapsulation:2});let s=i;return s})();export{m as a,Te as b,Le as c};
1
+ import{e as oe}from"./chunk-3YDYZLF7.js";import{b as ne}from"./chunk-NKGKBQBX.js";import{s as d,u as se,v as I}from"./chunk-FNOTGWRW.js";import{$a as te,A as R,C as A,D as W,F as v,fb as ie,ka as E,la as u,ma as K,na as f,oa as Q,pa as a,qa as X,ra as Y,sa as Z,ta as ee,tb as re}from"./chunk-I2S3XPC5.js";import{d as H}from"./chunk-Y5RLD72B.js";import{Bb as D,Eb as k,Ed as V,G as w,Gb as g,Jd as q,Kd as z,Oa as S,Qa as O,Tb as U,Vb as L,Yc as F,ab as C,ea as P,ja as c,kc as $,lc as B,mc as j,nb as N,oa as x,pa as T,pb as b,qb as G,rb as y,sb as _,tb as l,v as o}from"./chunk-IOIBQGHN.js";import{n as J}from"./chunk-DM4NXKEP.js";var m=class{constructor(i){this.isAdmin=!1,this.newly=0,this.applications=[],this.currentAccessHover=!1,this.setGroups(i),this.setManagers(i),Object.assign(this,i),this.isAdmin=i.role===R.ADMINISTRATOR,this.userRoleText=ie(R[i.role]),this.avatarUrl=re(i.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=J(this.currentAccess).fromNow(!0),this.newly=te(this.currentAccess),this.permissions&&(this.applications=this.permissions.split(A))}setGroups(i){i?.groups&&(i.groups=i.groups.map(p=>new d(p)))}setManagers(i){i?.managers&&(i.managers=i.managers.map(p=>new d(p)))}};var h=class{constructor(i){Object.assign(this,i),this.permissions&&(this.applications=this.permissions.split(A))}};var Te=(()=>{let i=class i{constructor(){this.http=c(F),this.router=c(H),this.authService=c(ne)}listUsers(e=!1){return this.http.get(e?Q:K).pipe(o(t=>t.map(r=>new m(r))))}getUser(e,t=!1){return this.http.get(`${t?f:u}/${e}`).pipe(o(r=>t?new I(r):new m(r)))}createUser(e,t,r=!1){return this.http.post(r?f:u,e,{headers:t}).pipe(o(n=>r?new I(n):new m(n)))}updateUser(e,t,r,n=!1){return this.http.put(`${n?f:u}/${e}`,t,{headers:r}).pipe(o(M=>n?new I(M):new m(M)))}deleteUser(e,t,r){return this.http.request("delete",`${t.isGuest?f:u}/${e}`,{headers:r,body:t})}browseGroup(e,t=!1){return this.http.get(`${t?Y:X}${e?`/${e}`:""}`).pipe(o(r=>new se(r)))}getGroup(e){return this.http.get(`${a}/${e}`).pipe(o(t=>new h(t)))}createGroup(e){return this.http.post(a,e).pipe(o(t=>new h(t)))}updateGroup(e,t){return this.http.put(`${a}/${e}`,t).pipe(o(r=>new h(r)))}deleteGroup(e){return this.http.delete(`${a}/${e}`)}addUsersToGroup(e,t){return this.http.patch(`${a}/${e}/${E.USERS}`,t)}updateUserFromGroup(e,t,r){return this.http.patch(`${a}/${e}/${E.USERS}/${t}`,r)}removeUserFromGroup(e,t){return this.http.delete(`${a}/${e}/${E.USERS}/${t}`)}searchMembers(e,t=!1){return this.http.request("search",Z,{body:e}).pipe(o(r=>r.map(n=>(t&&delete n.description,new d(n)))),w(()=>[]))}impersonateUser(e,t){return this.http.post(`${ee}/${e}`,null,{headers:t})}initImpersonateUser(e){this.authService.initUserFromResponse(e,!0),this.router.navigate([v.BASE,v.ACCOUNT]).catch(console.error)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"});let s=i;return s})();function ae(s,i){if(s&1){let p=D();_(0,"div",3)(1,"label",4)(2,"input",5),k("change",function(t){let r=x(p).$implicit,n=g();return T(n.updatePermissions(r,t))}),l(),U(3),$(4,"translate"),$(5,"capitalize"),l()()}if(s&2){let p=i.$implicit,e=g();S(2),y("checked",e.permissions.indexOf(p)>-1)("value",p),S(),L(" ",B(5,6,j(4,3,p,e.locale.language))," ")}}var Le=(()=>{let i=class i{constructor(){this.permissions=[],this.permissionsChange=new O,this.locale=c(V),this.allApplications=Object.values(W)}updatePermissions(e,t){t.target.checked?this.permissions.push(e):this.permissions.splice(this.permissions.indexOf(e),1),this.permissionsChange.emit(this.permissions)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=C({type:i,selectors:[["app-admin-permissions"]],inputs:{permissions:"permissions"},outputs:{permissionsChange:"permissionsChange"},decls:6,vars:0,consts:[[1,"d-flex","flex-column","col-12","pb-3"],["for","permissions","l10nTranslate",""],["id","permissions",1,"form-check","form-switch","form-check-inline"],[1,"d-flex"],[1,"form-check-label"],["type","checkbox",1,"form-check-input",3,"change","checked","value"]],template:function(t,r){t&1&&(_(0,"div",0)(1,"label",1),U(2,"Permissions"),l(),_(3,"div",2),b(4,ae,6,8,"div",3,N),l()()),t&2&&(S(4),G(r.allApplications))},dependencies:[z,oe,q],encapsulation:2});let s=i;return s})();export{m as a,Te as b,Le as c};
@@ -1 +1 @@
1
- import{Pa as U}from"./chunk-5HNQLBSW.js";import{$e as o,$f as E,cg as p,db as n}from"./chunk-IOIBQGHN.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-I2S3XPC5.js";import{$e as o,$f as E,cg as p,db as n}from"./chunk-IOIBQGHN.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{a as w}from"./chunk-NMF2ZFBE.js";import{h as O}from"./chunk-2XPHUNYN.js";import{c as S,h as v}from"./chunk-MYM43ENO.js";import{Cb as M,pb as V,qb as L,rb as d,vb as N}from"./chunk-5HNQLBSW.js";import{d as R}from"./chunk-Y5RLD72B.js";import{Bb as x,Eb as h,Gb as m,Ge as D,Ia as E,Kd as k,Ne as A,Oa as l,Tb as c,Ub as T,Vb as P,Wa as b,ab as I,ja as p,lb as C,mb as g,oa as u,og as W,pa as _,rb as f,sb as i,tb as n,ub as y}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";function $(o,s){if(o&1&&(i(0,"div",16)(1,"span",3),c(2),n(),i(3,"span",17),c(4),n()()),o&2){let r=m(2);l(2),T(r.infoMsg),l(2),P(":\xA0",r.syncService.wizard.localPath.origin)}}function U(o,s){if(o&1){let r=x();i(0,"div",5)(1,"fa-icon",13),h("click",function(){u(r);let t=m();return _(t.onReset())}),n(),y(2,"img",14),i(3,"div",15),c(4),n(),C(5,$,5,2,"div",16),n()}if(o&2){let r=m();l(),f("icon",r.icons.faTimesCircle),l(),f("src",r.syncService.wizard.localPath.mimeUrl,E),l(2),T(r.syncService.wizard.localPath.path),l(),g(r.infoMsg?5:-1)}}function Y(o,s){if(o&1){let r=x();i(0,"div",18),h("dragleave",function(t){u(r);let a=m();return _(a.dragLeave(t))})("dragover",function(t){u(r);let a=m();return _(a.dragOver(t))})("drop",function(t){u(r);let a=m();return _(a.drop(t))}),i(1,"div",19)(2,"span",20),c(3,"Drop folder here"),n()()()}}var ie=(()=>{let s=class s{constructor(){this.pathIsValid=!1,this.infoMsg=null,this.syncService=p(O),this.icons={faTimesCircle:D,faArrowCircleRight:A},this.router=p(R),this.renderer=p(b),this.store=p(N),this.layout=p(M),this.layout.setBreadcrumbIcon(L.WIZARD),this.layout.setBreadcrumbNav({url:`/${d.BASE}/${d.WIZARD}/${d.WIZARD_CLIENT}/${V.WIZARD_CLIENT}`,splicing:3,translating:!0,sameLink:!0}),this.syncService.wizard.localPath&&this.checkSelection();let e=this.router.currentNavigation()?.extras.state;e?.file&&this.syncService.addFileToRemotePath(e.file)}dragOver(e){return e.preventDefault(),e.dataTransfer.items[0].type?!1:(e.dataTransfer.dropEffect="copy",e.stopPropagation(),e.target.classList.contains("dropzone")&&this.renderer.addClass(e.target,"active"),!0)}dragLeave(e){e.preventDefault(),e.target.classList.contains("dropzone")&&this.renderer.removeClass(e.target,"active")}drop(e){e.preventDefault(),e.stopPropagation();let t=e.dataTransfer.items[0].webkitGetAsEntry();return t&&t.isDirectory?(this.syncService.wizard.localPath={name:t.name,path:this.syncService.getFilePath(e.dataTransfer.files[0]),mimeUrl:v(S),origin:null},this.checkSelection(),!0):!1}onSelect(){this.syncService.showOpenDialog({properties:[w.DIRECTORY,w.CREATE_DIRECTORY],defaultPath:""}).then(e=>{e.canceled||(this.syncService.wizard.localPath={name:e.filePaths[0].split("\\").pop().split("/").pop(),path:e.filePaths[0],mimeUrl:v(S),origin:null},this.checkSelection())})}onReset(){this.syncService.wizard.localPath=null,this.pathIsValid=!1,this.infoMsg=null}onNext(){this.router.navigate([d.BASE,d.WIZARD,d.WIZARD_SERVER]).catch(console.error)}onCancel(){this.router.navigate([d.BASE,d.PATHS]).catch(console.error),this.syncService.resetWizard()}checkSelection(){let e=this.store.clientSyncPaths().find(t=>new RegExp(`^${t.settings.localPath}((\\/.*)+|\\/?)$`).test(this.syncService.wizard.localPath.path));e?(this.pathIsValid=!1,this.syncService.wizard.localPath.mimeUrl=v(`${S}_sync`),this.syncService.wizard.localPath.origin=e.settings.localPath,this.infoMsg="The parent directory is already synced"):(this.infoMsg=null,this.pathIsValid=!0)}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=I({type:s,selectors:[["app-sync-wizard-client"]],decls:22,vars:4,consts:[[1,"wizard"],[1,"d-flex","flex-column","text-center","fs-sm"],["l10nTranslate","",1,"mb-2"],["l10nTranslate",""],[1,"d-flex","flex-column","h-100"],[1,"d-flex","flex-column","my-auto","fs-sm"],[1,"area"],[1,"d-flex","flex-column","mt-4"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],[3,"icon"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],["size","2x",1,"position-absolute","align-self-center","cursor-pointer",2,"margin-left","85px",3,"click","icon"],["alt","","height","96",1,"align-self-center","mb-2",3,"src"],[1,"align-self-center","mt-2","font-size-md","word-break-all","fw-500"],[1,"align-self-center","text-warning","mt-4"],[1,"fw-bold","ms-1"],[1,"area",3,"dragleave","dragover","drop"],["l10nTranslate","",1,"dropzone"],[1,"d-flex","flex-column","justify-content-center","align-self-center"]],template:function(t,a){t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),c(3,"This wizard will help you synchronize a directory on your computer with a Sync-in directory."),n(),i(4,"div")(5,"div",3),c(6,"To begin, select a folder on your computer."),n(),i(7,"div",3),c(8,'You can drag the folder into the area below or click on the "Select" button.'),n()()(),i(9,"div",4),C(10,U,6,4,"div",5)(11,Y,4,0,"div",6),n(),i(12,"div",7)(13,"div",8)(14,"button",9),h("click",function(){return a.onCancel()}),y(15,"fa-icon",10),c(16," Cancel "),n(),i(17,"button",11),h("click",function(){return a.onSelect()}),c(18,"Select a folder"),n(),i(19,"button",12),h("click",function(){return a.onNext()}),y(20,"fa-icon",10),c(21," Next "),n()()()()),t&2&&(l(10),g(a.syncService.wizard.localPath?10:11),l(5),f("icon",a.icons.faTimesCircle),l(4),f("disabled",!a.pathIsValid),l(),f("icon",a.icons.faArrowCircleRight))},dependencies:[W,k],encapsulation:2});let o=s;return o})();export{ie as SyncWizardClientComponent};
1
+ import{a as w}from"./chunk-NMF2ZFBE.js";import{h as O}from"./chunk-ZXXHFBGL.js";import{c as S,h as v}from"./chunk-MYM43ENO.js";import{Cb as M,pb as V,qb as L,rb as d,vb as N}from"./chunk-I2S3XPC5.js";import{d as R}from"./chunk-Y5RLD72B.js";import{Bb as x,Eb as h,Gb as m,Ge as D,Ia as E,Kd as k,Ne as A,Oa as l,Tb as c,Ub as T,Vb as P,Wa as b,ab as I,ja as p,lb as C,mb as g,oa as u,og as W,pa as _,rb as f,sb as i,tb as n,ub as y}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";function $(o,s){if(o&1&&(i(0,"div",16)(1,"span",3),c(2),n(),i(3,"span",17),c(4),n()()),o&2){let r=m(2);l(2),T(r.infoMsg),l(2),P(":\xA0",r.syncService.wizard.localPath.origin)}}function U(o,s){if(o&1){let r=x();i(0,"div",5)(1,"fa-icon",13),h("click",function(){u(r);let t=m();return _(t.onReset())}),n(),y(2,"img",14),i(3,"div",15),c(4),n(),C(5,$,5,2,"div",16),n()}if(o&2){let r=m();l(),f("icon",r.icons.faTimesCircle),l(),f("src",r.syncService.wizard.localPath.mimeUrl,E),l(2),T(r.syncService.wizard.localPath.path),l(),g(r.infoMsg?5:-1)}}function Y(o,s){if(o&1){let r=x();i(0,"div",18),h("dragleave",function(t){u(r);let a=m();return _(a.dragLeave(t))})("dragover",function(t){u(r);let a=m();return _(a.dragOver(t))})("drop",function(t){u(r);let a=m();return _(a.drop(t))}),i(1,"div",19)(2,"span",20),c(3,"Drop folder here"),n()()()}}var ie=(()=>{let s=class s{constructor(){this.pathIsValid=!1,this.infoMsg=null,this.syncService=p(O),this.icons={faTimesCircle:D,faArrowCircleRight:A},this.router=p(R),this.renderer=p(b),this.store=p(N),this.layout=p(M),this.layout.setBreadcrumbIcon(L.WIZARD),this.layout.setBreadcrumbNav({url:`/${d.BASE}/${d.WIZARD}/${d.WIZARD_CLIENT}/${V.WIZARD_CLIENT}`,splicing:3,translating:!0,sameLink:!0}),this.syncService.wizard.localPath&&this.checkSelection();let e=this.router.currentNavigation()?.extras.state;e?.file&&this.syncService.addFileToRemotePath(e.file)}dragOver(e){return e.preventDefault(),e.dataTransfer.items[0].type?!1:(e.dataTransfer.dropEffect="copy",e.stopPropagation(),e.target.classList.contains("dropzone")&&this.renderer.addClass(e.target,"active"),!0)}dragLeave(e){e.preventDefault(),e.target.classList.contains("dropzone")&&this.renderer.removeClass(e.target,"active")}drop(e){e.preventDefault(),e.stopPropagation();let t=e.dataTransfer.items[0].webkitGetAsEntry();return t&&t.isDirectory?(this.syncService.wizard.localPath={name:t.name,path:this.syncService.getFilePath(e.dataTransfer.files[0]),mimeUrl:v(S),origin:null},this.checkSelection(),!0):!1}onSelect(){this.syncService.showOpenDialog({properties:[w.DIRECTORY,w.CREATE_DIRECTORY],defaultPath:""}).then(e=>{e.canceled||(this.syncService.wizard.localPath={name:e.filePaths[0].split("\\").pop().split("/").pop(),path:e.filePaths[0],mimeUrl:v(S),origin:null},this.checkSelection())})}onReset(){this.syncService.wizard.localPath=null,this.pathIsValid=!1,this.infoMsg=null}onNext(){this.router.navigate([d.BASE,d.WIZARD,d.WIZARD_SERVER]).catch(console.error)}onCancel(){this.router.navigate([d.BASE,d.PATHS]).catch(console.error),this.syncService.resetWizard()}checkSelection(){let e=this.store.clientSyncPaths().find(t=>new RegExp(`^${t.settings.localPath}((\\/.*)+|\\/?)$`).test(this.syncService.wizard.localPath.path));e?(this.pathIsValid=!1,this.syncService.wizard.localPath.mimeUrl=v(`${S}_sync`),this.syncService.wizard.localPath.origin=e.settings.localPath,this.infoMsg="The parent directory is already synced"):(this.infoMsg=null,this.pathIsValid=!0)}};s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=I({type:s,selectors:[["app-sync-wizard-client"]],decls:22,vars:4,consts:[[1,"wizard"],[1,"d-flex","flex-column","text-center","fs-sm"],["l10nTranslate","",1,"mb-2"],["l10nTranslate",""],[1,"d-flex","flex-column","h-100"],[1,"d-flex","flex-column","my-auto","fs-sm"],[1,"area"],[1,"d-flex","flex-column","mt-4"],[1,"d-flex","align-items-start"],["type","button","l10nTranslate","",1,"btn","btn-secondary","me-auto",3,"click"],[3,"icon"],["type","button","l10nTranslate","",1,"btn","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-secondary","ms-auto",3,"click","disabled"],["size","2x",1,"position-absolute","align-self-center","cursor-pointer",2,"margin-left","85px",3,"click","icon"],["alt","","height","96",1,"align-self-center","mb-2",3,"src"],[1,"align-self-center","mt-2","font-size-md","word-break-all","fw-500"],[1,"align-self-center","text-warning","mt-4"],[1,"fw-bold","ms-1"],[1,"area",3,"dragleave","dragover","drop"],["l10nTranslate","",1,"dropzone"],[1,"d-flex","flex-column","justify-content-center","align-self-center"]],template:function(t,a){t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),c(3,"This wizard will help you synchronize a directory on your computer with a Sync-in directory."),n(),i(4,"div")(5,"div",3),c(6,"To begin, select a folder on your computer."),n(),i(7,"div",3),c(8,'You can drag the folder into the area below or click on the "Select" button.'),n()()(),i(9,"div",4),C(10,U,6,4,"div",5)(11,Y,4,0,"div",6),n(),i(12,"div",7)(13,"div",8)(14,"button",9),h("click",function(){return a.onCancel()}),y(15,"fa-icon",10),c(16," Cancel "),n(),i(17,"button",11),h("click",function(){return a.onSelect()}),c(18,"Select a folder"),n(),i(19,"button",12),h("click",function(){return a.onNext()}),y(20,"fa-icon",10),c(21," Next "),n()()()()),t&2&&(l(10),g(a.syncService.wizard.localPath?10:11),l(5),f("icon",a.icons.faTimesCircle),l(4),f("disabled",!a.pathIsValid),l(),f("icon",a.icons.faArrowCircleRight))},dependencies:[W,k],encapsulation:2});let o=s;return o})();export{ie as SyncWizardClientComponent};
@@ -1 +1 @@
1
- import{a as O}from"./chunk-OJCAIKUK.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,og as M,pa as u,rb as h,rd as V,sb as f,tb as l,va as F,vf as K}from"./chunk-IOIBQGHN.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-PXRT4L57.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,og as M,pa as u,rb as h,rd as V,sb as f,tb as l,va as F,vf as K}from"./chunk-IOIBQGHN.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{a as xt}from"./chunk-F7TXTNZC.js";import{a as Ct}from"./chunk-LJSVNPPQ.js";import{a as gt}from"./chunk-RX3YQ67K.js";import{d as ht}from"./chunk-YMAN4LIU.js";import"./chunk-NMF2ZFBE.js";import{c as K}from"./chunk-Y2I36A4K.js";import{h as he}from"./chunk-2XPHUNYN.js";import{a as de,b as ue,c as fe}from"./chunk-MNNCSSHN.js";import{a as me}from"./chunk-4FJUCMEG.js";import{e as ft}from"./chunk-XCLK7NJL.js";import{a as q,b as _e}from"./chunk-7CFSJ4BO.js";import"./chunk-MYM43ENO.js";import{a as ut}from"./chunk-ZCOWBVOT.js";import"./chunk-OJCAIKUK.js";import{Ab as _t,Bb as dt,Cb as pe,gb as le,nb as Ie,ob as ce,pb as ct,qb as z,rb as $,s as te,va as st,vb as j,wa as rt,xa as lt,xb as pt,zb as mt}from"./chunk-5HNQLBSW.js";import{d as He}from"./chunk-Y5RLD72B.js";import{Aa as ye,Ab as H,Ac as we,Bb as S,Cd as Qe,Df as tt,Eb as u,Ed as J,Gb as r,Gc as ke,Ia as X,Ic as Be,Jc as ze,Jd as ee,Kb as M,Kd as Q,Ke as Xe,Lb as L,Ld as je,Mb as A,Mc as $e,Md as qe,Oa as s,Pb as D,Pc as Z,Qa as G,Qb as U,Qf as it,Rb as w,Rd as Ke,Rf as nt,Sb as E,Tb as _,Tf as ot,Ub as P,Vb as I,Xa as O,Xb as Pe,Yb as Te,Yd as Ge,Zb as ve,ab as R,cc as W,da as Se,db as Me,dc as Le,dd as De,df as oe,dg as ae,ea as Ve,ec as be,ef as Ze,eg as se,fb as v,gc as Ae,hc as B,ic as Ne,ja as k,jd as Ue,kc as y,kg as at,lb as C,mb as x,mc as T,mf as Je,nc as Ee,ne as ie,oa as f,oc as Y,od as Ye,og as re,pa as h,pb as V,qb as F,rb as p,sb as l,tb as c,tc as Oe,tf as et,ub as d,va as Fe,ve as We,ye as ne}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";var Et=(t,a)=>({"pull-left":t,"float-left":a}),wt=(t,a)=>({"pull-right":t,"float-right":a}),Ce=(t,a)=>({disabled:t,currentPage:a}),kt=(t,a,e)=>({disabled:t,$implicit:a,currentPage:e});function Dt(t,a){if(t&1){let e=S();l(0,"li",11)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(13);w("disabled",e.noPrevious()||e.disabled),s(2),p("ngTemplateOutlet",e.customFirstTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noPrevious()||e.disabled,e.page))}}function It(t,a){if(t&1){let e=S();l(0,"li",14)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.page-1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(11);w("disabled",e.noPrevious()||e.disabled),s(2),p("ngTemplateOutlet",e.customPreviousTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noPrevious()||e.disabled,e.page))}}function Rt(t,a){if(t&1){let e=S();l(0,"li",15)(1,"a",12),u("click",function(o){let n=f(e).$implicit,m=r();return h(m.selectPage(n.number,o))}),H(2,13),c()()}if(t&2){let e=a.$implicit,i=r(),o=D(7);w("active",e.active)("disabled",i.disabled&&!e.active),s(2),p("ngTemplateOutlet",i.customPageTemplate||o)("ngTemplateOutletContext",Ne(6,kt,i.disabled,e,i.page))}}function Vt(t,a){if(t&1){let e=S();l(0,"li",16)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.page+1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(9);w("disabled",e.noNext()||e.disabled),s(2),p("ngTemplateOutlet",e.customNextTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noNext()||e.disabled,e.page))}}function Ft(t,a){if(t&1){let e=S();l(0,"li",17)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.totalPages,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(15);w("disabled",e.noNext()||e.disabled),s(2),p("ngTemplateOutlet",e.customLastTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noNext()||e.disabled,e.page))}}function Mt(t,a){if(t&1&&_(0),t&2){let e=a.$implicit;P(e.text)}}function Lt(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("next"))}}function At(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("previous"))}}function Nt(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("first"))}}function Ot(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("last"))}}var St=(()=>{let a=class a{constructor(){this.main={itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"\xAB Previous",nextText:"Next \xBB",pageBtnClass:"",align:!0}}};a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=Ve({token:a,factory:a.\u0275fac,providedIn:"root"});let t=a;return t})(),Bt={provide:De,useExisting:Se(()=>zt),multi:!0},zt=(()=>{let a=class a{constructor(i,o,n){this.elementRef=i,this.changeDetection=n,this.align=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.firstText="First",this.previousText="\xAB Previous",this.nextText="Next \xBB",this.lastText="Last",this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new G,this.pageChanged=new G,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=15,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=i,this.config||this.configureOptions(Object.assign({},o.main,o.pager))}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(i){this._itemsPerPage=i,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(i){this._totalItems=i,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(i){this._totalPages=i,this.numPages.emit(i),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(i){let o=this._page;this._page=i>this.totalPages?this.totalPages:i||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(i){this.config=Object.assign({},i)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(i){this.page=i,this.pages=this.getPages(this.page,this.totalPages)}getText(i){return this[`${i}Text`]||this.config[`${i}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}selectPage(i,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(i),this.onChange(this.page))}makePage(i,o,n){return{text:o,number:i,active:n}}getPages(i,o){let n=[],m=1,g=o,N=typeof this.maxSize<"u"&&this.maxSize<o;N&&this.maxSize&&(this.rotate?(m=Math.max(i-Math.floor(this.maxSize/2),1),g=m+this.maxSize-1,g>o&&(g=o,m=g-this.maxSize+1)):(m=(Math.ceil(i/this.maxSize)-1)*this.maxSize+1,g=Math.min(m+this.maxSize-1,o)));for(let b=m;b<=g;b++){let xe=this.makePage(b,b.toString(),b===i);n.push(xe)}if(N&&!this.rotate){if(m>1){let b=this.makePage(m-1,"...",!1);n.unshift(b)}if(g<o){let b=this.makePage(g+1,"...",!1);n.push(b)}}return n}calculateTotalPages(){let i=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(i||0,1)}};a.\u0275fac=function(o){return new(o||a)(O(ye),O(St),O(we))},a.\u0275cmp=R({type:a,selectors:[["pager"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[be([Bt])],decls:7,vars:22,consts:[[1,"pager"],[3,"ngClass"],["href","",3,"click"]],template:function(o,n){o&1&&(l(0,"ul",0)(1,"li",1)(2,"a",2),u("click",function(g){return n.selectPage(n.page-1,g)}),_(3),c()(),l(4,"li",1)(5,"a",2),u("click",function(g){return n.selectPage(n.page+1,g)}),_(6),c()()()),o&2&&(s(),E(n.pageBtnClass),w("disabled",n.noPrevious())("previous",n.align),p("ngClass",B(16,Et,n.align,n.align)),s(2),P(n.getText("previous")),s(),E(n.pageBtnClass),w("disabled",n.noNext())("next",n.align),p("ngClass",B(19,wt,n.align,n.align)),s(2),P(n.getText("next")))},dependencies:[ke],encapsulation:2});let t=a;return t})(),$t={provide:De,useExisting:Se(()=>Re),multi:!0},Re=(()=>{let a=class a{constructor(i,o,n){this.elementRef=i,this.changeDetection=n,this.align=!0,this.boundaryLinks=!1,this.directionLinks=!0,this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new G,this.pageChanged=new G,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=10,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=i,this.config||this.configureOptions(o.main)}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(i){this._itemsPerPage=i,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(i){this._totalItems=i,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(i){this._totalPages=i,this.numPages.emit(i),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(i){let o=this._page;this._page=i>this.totalPages?this.totalPages:i||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(i){this.config=Object.assign({},i)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(i){this.page=i,this.pages=this.getPages(this.page,this.totalPages)}getText(i){return this[`${i}Text`]||this.config[`${i}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}selectPage(i,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(i),this.onChange(this.page))}makePage(i,o,n){return{text:o,number:i,active:n}}getPages(i,o){let n=[],m=1,g=o,N=typeof this.maxSize<"u"&&this.maxSize<o;N&&this.maxSize&&(this.rotate?(m=Math.max(i-Math.floor(this.maxSize/2),1),g=m+this.maxSize-1,g>o&&(g=o,m=g-this.maxSize+1)):(m=(Math.ceil(i/this.maxSize)-1)*this.maxSize+1,g=Math.min(m+this.maxSize-1,o)));for(let b=m;b<=g;b++){let xe=this.makePage(b,b.toString(),b===i);n.push(xe)}if(N&&!this.rotate){if(m>1){let b=this.makePage(m-1,"...",!1);n.unshift(b)}if(g<o){let b=this.makePage(g+1,"...",!1);n.push(b)}}return n}calculateTotalPages(){let i=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(i||0,1)}};a.\u0275fac=function(o){return new(o||a)(O(ye),O(St),O(we))},a.\u0275cmp=R({type:a,selectors:[["pagination"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",customPageTemplate:"customPageTemplate",customNextTemplate:"customNextTemplate",customPreviousTemplate:"customPreviousTemplate",customFirstTemplate:"customFirstTemplate",customLastTemplate:"customLastTemplate",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[be([$t])],decls:16,vars:6,consts:[["defaultPageTemplate",""],["defaultNextTemplate",""],["defaultPreviousTemplate",""],["defaultFirstTemplate",""],["defaultLastTemplate",""],[1,"pagination",3,"ngClass"],["class","pagination-first page-item",3,"disabled",4,"ngIf"],["class","pagination-prev page-item",3,"disabled",4,"ngIf"],["class","pagination-page page-item",3,"active","disabled",4,"ngFor","ngForOf"],["class","pagination-next page-item",3,"disabled",4,"ngIf"],["class","pagination-last page-item",3,"disabled",4,"ngIf"],[1,"pagination-first","page-item"],["href","",1,"page-link",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pagination-prev","page-item"],[1,"pagination-page","page-item"],[1,"pagination-next","page-item"],[1,"pagination-last","page-item"]],template:function(o,n){o&1&&(l(0,"ul",5),v(1,Dt,3,7,"li",6)(2,It,3,7,"li",7)(3,Rt,3,10,"li",8)(4,Vt,3,7,"li",9)(5,Ft,3,7,"li",10),c(),v(6,Mt,1,1,"ng-template",null,0,Y)(8,Lt,1,1,"ng-template",null,1,Y)(10,At,1,1,"ng-template",null,2,Y)(12,Nt,1,1,"ng-template",null,3,Y)(14,Ot,1,1,"ng-template",null,4,Y)),o&2&&(p("ngClass",n.classMap),s(),p("ngIf",n.boundaryLinks),s(),p("ngIf",n.directionLinks),s(),p("ngForOf",n.pages),s(),p("ngIf",n.directionLinks),s(),p("ngIf",n.boundaryLinks))},dependencies:[ke,ze,$e,Be],encapsulation:2});let t=a;return t})();var yt=(()=>{let a=class a{transform(i,o=1,n){if(!i?.length)return[];let m=(o-1)*n;return i.slice(m,m+n)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=Me({name:"paginate",type:a,pure:!0});let t=a;return t})();var Ht=t=>({nb:t}),Ut=(t,a)=>a.nbTasks,Pt=(t,a)=>a.key;function Yt(t,a){if(t&1&&d(0,"fa-icon",12),t&2){let e=r();p("icon",e.icons.faSpinner)}}function Qt(t,a){if(t&1&&(l(0,"span",13),_(1),y(2,"translate"),c()),t&2){let e=r();s(),P(Ee(2,1,"nb_actions",e.locale.language,Ae(5,Ht,e.count.actions)))}}function jt(t,a){if(t&1){let e=S();l(0,"button",27),y(1,"translate"),ve("ngModelChange",function(o){f(e);let n=r();return Te(n.showFiltered,o)||(n.showFiltered=o),h(o)}),d(2,"fa-icon",2),l(3,"span"),_(4),c()()}if(t&2){let e=r();Pe("ngModel",e.showFiltered),p("tooltip",T(1,4,"Show filtered files",e.locale.language)),s(2),p("icon",e.icons.faFilter),s(2),P(e.count.filtered)}}function qt(t,a){if(t&1){let e=S();l(0,"li",29)(1,"a",30),u("click",function(){f(e);let o=r(2);return h(o.goToPath(!1))}),l(2,"span",31),d(3,"fa-icon",2),l(4,"span",3),_(5,"Server"),c()()()()}if(t&2){let e=r(2);s(3),p("icon",e.icons.SERVER)}}function Kt(t,a){if(t&1){let e=S();l(0,"ul",28)(1,"li",29)(2,"a",30),u("click",function(){f(e);let o=r();return h(o.goToPath())}),l(3,"span",31),d(4,"fa-icon",2),l(5,"span",3),_(6,"Client"),c()()()(),C(7,qt,6,1,"li",29),c()}if(t&2){let e=r();s(4),p("icon",e.icons.CLIENT),s(3),x(e.transferSelected.action!==e.SYNC_TRANSFER_ACTION.FILTERED?7:-1)}}function Gt(t,a){t&1&&(l(0,"div",21),_(1,"No differences"),c())}function Wt(t,a){if(t&1&&d(0,"fa-icon",2),t&2){let e=r(4);p("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function Xt(t,a){if(t&1){let e=S();l(0,"th",33),u("click",function(){f(e);let o=r().$implicit,n=r(2);return h(n.sortBy(o.key))}),_(1),C(2,Wt,1,1,"fa-icon",2),c()}if(t&2){let e=r().$implicit,i=r(2);E(e.value.class),U("width",e.value.width,"%"),w("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),I(" ",e.value.label," "),s(),x(i.sortTable.sortParam.column===e.key?2:-1)}}function Zt(t,a){if(t&1&&C(0,Xt,3,10,"th",32),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function Jt(t,a){if(t&1&&(l(0,"table",22)(1,"thead")(2,"tr"),V(3,Zt,1,1,null,null,Pt),y(5,"keyvalue"),c()()()),t&2){let e=r();s(3),F(T(5,0,e.tableHeaders,e.originalOrderKeyValue))}}function ei(t,a){if(t&1&&(l(0,"span",37),d(1,"fa-icon",2)(2,"fa-icon",39),l(3,"span",40),_(4),c()()),t&2){let e=r(4).$implicit;s(),E(e.sideIconClass),p("icon",e.sideIcon),s(),p("icon",e.actionIcon),s(2),P(e.actionText)}}function ti(t,a){if(t&1&&(l(0,"span"),_(1),c(),l(2,"span")(3,"b",31),_(4,"Source"),c(),_(5),c()),t&2){let e=r(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),P(e.fileDst),s(),E(W("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),s(3),I(":\xA0",e.file)}}function ii(t,a){if(t&1&&(l(0,"span"),_(1),c()),t&2){let e=r(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),P(e.file)}}function ni(t,a){if(t&1){let e=S();l(0,"div",38)(1,"img",41),u("error",function(){f(e);let o=r(4).$implicit;return h(o.fallBackMimeUrl())}),c(),l(2,"span",42),C(3,ti,6,7)(4,ii,2,3,"span",43),c()()}if(t&2){let e=r(4).$implicit;s(),p("src",e.mimeUrl,X),s(2),x(e.fileDst?3:4)}}function oi(t,a){if(t&1&&(l(0,"td"),C(1,ei,5,5,"span",37)(2,ni,5,2,"div",38),c()),t&2){let e,i=r().$implicit;E(i.value.class),U("width",i.value.width,"%"),w("text-align-center",i.value.textCenter),s(),x((e=i.key)==="action"?1:e==="file"?2:-1)}}function ai(t,a){if(t&1&&C(0,oi,3,7,"td",36),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function si(t,a){if(t&1){let e=S();l(0,"tr",35),u("click",function(){f(e);let o=r().$implicit,n=r();return h(n.onSelect(o))}),V(1,ai,1,1,null,null,Pt),y(3,"keyvalue"),c()}if(t&2){let e=r().$implicit,i=r();w("selected",i.transferSelected&&i.transferSelected.nbTasks===e.nbTasks),s(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function ri(t,a){if(t&1&&C(0,si,4,5,"tr",34),t&2){let e=a.$implicit,i=r();x(!e.isFiltered||i.showFiltered&&e.isFiltered?0:-1)}}var Tt=(()=>{let a=class a{constructor(){this.locale=k(J),this.originalOrderKeyValue=le,this.SYNC_TRANSFER_ACTION=ht,this.icons={faArrowDown:ae,faArrowUp:oe,faStop:ie,faFlask:ne,faSpinner:Je,faRotate:je,faMapMarkerAlt:se,faFilter:Ke,CLIENT:z.CLIENT,SERVER:z.SERVER},this.tableHeaders={action:{label:"Action",width:16,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:84,textCenter:!1,class:"",show:!0,sortable:!0}},this.itemsPerPage=500,this.currentPage=1,this.running=!1,this.hasNoChanges=!1,this.transferSelected=null,this.showFiltered=!1,this.count={actions:0,filtered:0},this.transfers=Fe([]),this.layout=k(pe),this.electron=k(dt),this.store=k(j),this.syncService=k(he),this.sortSettings={default:[{prop:"nbTasks",type:"number"}],action:[{prop:"actionText",type:"string"}],file:[{prop:"file",type:"string"}]},this.sortTable=new _e(this.constructor.name,this.sortSettings),this.subscriptions=[]}ngOnInit(){this.electron.ipcRenderer.on(Ie.SYNC.REPORT_TRANSFER,(i,o)=>this.addTransfer(o)),this.subscriptions.push(this.store.clientSyncIsReporting.subscribe(i=>this.manageState(i)))}ngOnDestroy(){for(let i of this.subscriptions)i.unsubscribe();this.electron.ipcRenderer.removeAllListeners(Ie.SYNC.REPORT_TRANSFER)}manageReport(i=!1){i&&(this.hasNoChanges=!1,this.count={actions:0,filtered:0},this.transfers.set([])),this.syncService.doSync(i,[this.syncPath.id],!0)}sortBy(i,o=!0,n){this.transfers.set(this.sortTable.sortBy(i,o,n||this.transfers()))}onSelect(i){this.transferSelected=i||null}goToPath(i=!0){this.syncService.goToPath(this.syncPath,i,this.transferSelected.file)}pageChanged(){this.onSelect(),this.autoResizeDirective.scrollTop()}onClose(){this.running&&this.syncService.doSync(!1,[this.syncPath.id],!0),this.layout.closeDialog(null,this.syncPath.id)}onMinimize(){this.layout.minimizeDialog(this.syncPath.id,{name:this.syncPath.settings.name,mimeUrl:this.syncPath.mimeUrl})}addTransfer(i){let o=new gt(i);o.isFiltered?this.count.filtered++:this.count.actions++,this.transfers.update(n=>[...n,o])}manageState(i){this.running&&i===!1&&this.transfers().length===0&&(this.hasNoChanges=!0),this.running=i}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-folder-report-dialog"]],viewQuery:function(o,n){if(o&1&&(M(K,7),M(q,7)),o&2){let m;L(m=A())&&(n.autoResizeDirective=m.first),L(m=A())&&(n.inputFilter=m.first)}},inputs:{syncPath:"syncPath"},decls:37,vars:27,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Minimize","type","button",1,"btn-minimize","btn-minimize-white",3,"click"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-3",3,"click"],[1,"modal-body","p-0"],[1,"app-top-menu","bg-theme-alt"],["type","button",1,"btn","btn-sm","btn-secondary","ms-1",3,"click"],[1,"d-flex","align-items-center"],["l10nTranslate","",1,"ms-1"],[1,"ms-auto"],["animation","spin",1,"me-2",3,"icon"],[1,"fs-xxs"],[1,"d-flex","align-items-center","ms-auto"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModel","tooltip"],[3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"d-none","d-sm-block"],["l10nTranslate","",1,"p-2"],[1,"app-table"],["appAutoResize","",3,"resizeOffset","useMaxHeight"],["tabindex","-1"],[1,"modal-footer","justify-content-center","align-items-center","fs-sm"],["previousText","\u2039","nextText","\u203A","firstText","\xAB","lastText","\xBB",1,"pagination","pagination-sm",2,"margin-bottom","-.6rem",3,"pageChanged","ngModelChange","ngModel","boundaryLinks","itemsPerPage","maxSize","totalItems"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModelChange","ngModel","tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"selected"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center",2,"font-size","14px"],[1,"d-flex","align-items-center","fs-xxs"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"]],template:function(o,n){o&1&&(l(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),l(3,"span",3),_(4),c()(),l(5,"button",4),u("click",function(){return n.onMinimize()}),c(),l(6,"button",5),u("click",function(){return n.onClose()}),c()(),l(7,"div",6)(8,"div",7)(9,"button",8),u("click",function(){return n.manageReport(!n.running)}),l(10,"div",9),d(11,"fa-icon",2),l(12,"span",10),_(13,"Simulate"),c()()(),l(14,"div",11),C(15,Yt,1,1,"fa-icon",12),C(16,Qt,3,7,"span",13),c(),l(17,"div",14),C(18,jt,5,7,"button",15),l(19,"div",16),y(20,"translate"),l(21,"div",17)(22,"button",18),d(23,"fa-icon",2),c(),v(24,Kt,8,2,"ul",19),c()()(),d(25,"app-input-filter",20),c(),C(26,Gt,2,0,"div",21)(27,Jt,6,3,"table",22),l(28,"div",23)(29,"table",22)(30,"tbody",24),V(31,ri,1,1,null,null,Ut),y(33,"searchFilter"),y(34,"paginate"),c()()()(),l(35,"div",25)(36,"pagination",26),u("pageChanged",function(){return n.pageChanged()}),ve("ngModelChange",function(g){return Te(n.currentPage,g)||(n.currentPage=g),g}),c()()),o&2&&(s(2),p("icon",n.icons.faRotate),s(2),P(n.syncPath.settings.name),s(7),p("icon",n.running?n.icons.faStop:n.icons.faFlask),s(4),x(n.running?15:-1),s(),x(n.transfers().length?16:-1),s(2),x(n.count.filtered?18:-1),s(),p("tooltip",T(20,17,"Go to",n.locale.language)),s(2),p("isDisabled",!n.transferSelected),s(2),p("icon",n.icons.faMapMarkerAlt),s(3),x(n.hasNoChanges?26:27),s(2),p("resizeOffset",225)("useMaxHeight",!1),s(3),F(Ee(34,23,T(33,20,n.transfers(),n.inputFilter.search()),n.currentPage,n.itemsPerPage)),s(5),Pe("ngModel",n.currentPage),p("boundaryLinks",!0)("itemsPerPage",n.itemsPerPage)("maxSize",20)("totalItems",n.transfers().length))},dependencies:[re,Q,te,de,fe,ue,K,Re,Qe,Ue,Ye,q,ut,ee,Z,yt,me],encapsulation:2});let t=a;return t})();function li(t,a){if(t&1&&(l(0,"span",0),_(1),c()),t&2){let e=r();s(),P(e.s.settings.scheduler.unit)}}function ci(t,a){if(t&1&&(l(0,"span")(1,"span"),_(2),c(),l(3,"span",0),_(4),c()()),t&2){let e=r();s(2),I("",e.s.settings.scheduler.value,"\xA0"),s(2),P(e.s.settings.scheduler.unit+"s")}}var vt=(()=>{let a=class a{constructor(){this.store=k(j),this.SYNC_PATH_SCHEDULER_UNIT=_t,this.CLIENT_SCHEDULER_STATE=ce}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-path-scheduler"]],inputs:{s:"s"},decls:3,vars:3,consts:[["l10nTranslate",""]],template:function(o,n){o&1&&(l(0,"span"),C(1,li,2,1,"span",0)(2,ci,5,2,"span"),c()),o&2&&(E(n.s.settings.scheduler.unit!==n.SYNC_PATH_SCHEDULER_UNIT.DISABLED?n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?"text-warning text-failed":"text-success":"text-danger"),s(),x(n.s.settings.scheduler.unit===n.SYNC_PATH_SCHEDULER_UNIT.DISABLED?1:2))},dependencies:[Q],encapsulation:2});let t=a;return t})();var pi=["SyncPathContextMenu"],mi=["MainContextMenu"],bt=(t,a)=>a.key,_i=(t,a)=>a.id;function di(t,a){if(t&1){let e=S();l(0,"button",8),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doSync(!1))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("tooltip",T(1,2,"Stop synchronization",e.locale.language)),s(2),p("icon",e.icons.faStop)}}function ui(t,a){if(t&1){let e=S();l(0,"button",9),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doSync(!0))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("disabled",!e.syncPathSelected||!e.syncPathSelected.settings.enabled)("tooltip",T(1,3,"Synchronize",e.locale.language)),s(2),p("icon",e.icons.faPlay)}}function fi(t,a){if(t&1){let e=S();l(0,"button",8),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doAllSyncs(!1))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("tooltip",T(1,2,"Stop synchronizations",e.locale.language)),s(2),p("icon",e.icons.faStop)}}function hi(t,a){if(t&1){let e=S();l(0,"ul",27)(1,"li",28)(2,"a",29),u("click",function(){f(e);let o=r(2);return h(o.doAllSyncs(!0,!1))}),l(3,"span",30),d(4,"fa-icon",7),_(5," Sequentially "),c()()(),l(6,"li",28)(7,"a",29),u("click",function(){f(e);let o=r(2);return h(o.doAllSyncs(!0))}),l(8,"span",30),d(9,"fa-icon",7),_(10," Asynchronously "),c()()()()}if(t&2){let e=r(2);s(4),p("icon",e.icons.faArrowsSpin),s(5),p("icon",e.icons.faShuffle)}}function gi(t,a){if(t&1&&(l(0,"div",12),y(1,"translate"),l(2,"div",13)(3,"button",17),d(4,"fa-icon",7),c(),v(5,hi,11,2,"ul",15),c()()),t&2){let e=r();p("tooltip",T(1,2,"Synchronize all",e.locale.language)),s(4),p("icon",e.icons.faForward)}}function Ci(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r();p("icon",e.icons.faCalendarXmark)}}function xi(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r();p("icon",e.icons.faCalendarCheck)}}function Si(t,a){if(t&1){let e=S();l(0,"li",28)(1,"a",29),u("click",function(){f(e);let o=r(2);return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))}),l(2,"span",30),d(3,"fa-icon",7),_(4," Disable "),c()()()}if(t&2){let e=r(2);s(3),p("icon",e.icons.faCalendarXmark)}}function yi(t,a){if(t&1){let e=S();l(0,"ul",27),C(1,Si,5,1,"li",28),l(2,"li",28)(3,"a",29),u("click",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.SEQ))}),l(4,"span",30),d(5,"fa-icon",7),_(6," Sequentially "),c()()(),l(7,"li",28)(8,"a",29),u("click",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.ASYNC))}),l(9,"span",30),d(10,"fa-icon",7),_(11," Asynchronously "),c()()()()}if(t&2){let e=r();s(),x(e.store.clientScheduler()!==e.CLIENT_SCHEDULER_STATE.DISABLED?1:-1),s(4),p("icon",e.icons.faArrowsSpin),s(5),p("icon",e.icons.faShuffle)}}function Pi(t,a){if(t&1){let e=S();l(0,"ul",27)(1,"li",28)(2,"a",29),u("click",function(){f(e);let o=r();return h(o.goToPath())}),l(3,"span",30),d(4,"fa-icon",7),_(5," Client "),c()()(),l(6,"li",28)(7,"a",29),u("click",function(){f(e);let o=r();return h(o.goToPath(!1))}),l(8,"span",30),d(9,"fa-icon",7),_(10," Server "),c()()()()}if(t&2){let e=r();s(4),p("icon",e.icons.CLIENT),s(5),p("icon",e.icons.SERVER)}}function Ti(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(3);p("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function vi(t,a){if(t&1){let e=S();l(0,"th",32),u("click",function(){f(e);let o=r().$implicit,n=r();return h(n.sortBy(o.key))}),_(1),C(2,Ti,1,1,"fa-icon",7),c()}if(t&2){let e=r().$implicit,i=r();E(e.value.class),U("width",e.value.width,"%"),w("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),I(" ",e.value.label," "),s(),x(i.sortTable.sortParam.column===e.key?2:-1)}}function bi(t,a){if(t&1&&C(0,vi,3,10,"th",31),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function Ei(t,a){if(t&1&&(l(0,"span",41),_(1),c()),t&2){let e=r(4).$implicit;s(),P(e._nbTasks)}}function wi(t,a){if(t&1&&(l(0,"span",42),y(1,"translate"),d(2,"fa-icon",44),c()),t&2){let e=r(4).$implicit,i=r();p("tooltip",T(1,2,e.mainError,i.locale.language)),s(2),p("icon",i.icons.faExclamationTriangle)}}function ki(t,a){if(t&1){let e=S();l(0,"span",45),u("click",function(){f(e);let o=r(4).$implicit,n=r();return h(n.showErrors(o))}),d(1,"fa-icon",46),l(2,"span"),_(3),c()()}if(t&2){let e=r(4).$implicit,i=r();s(),p("icon",i.icons.faExclamationTriangle),s(2),P(e.lastErrors.length)}}function Di(t,a){if(t&1&&(l(0,"div",35),d(1,"img",39),l(2,"span"),_(3),c(),l(4,"span",40),C(5,Ei,2,1,"span",41),C(6,wi,3,5,"span",42),C(7,ki,4,2,"span",43),c()()),t&2){let e=r(3).$implicit;s(),p("src",e.mimeUrl,X),s(2),P(e.settings.name),s(2),x(e.nbSyncTasks?5:-1),s(),x(e.mainError?6:-1),s(),x(e.lastErrors.length?7:-1)}}function Ii(t,a){if(t&1&&d(0,"app-sync-path-direction-icon",36),t&2){let e=r(3).$implicit;p("syncPath",e)}}function Ri(t,a){if(t&1&&(l(0,"span",30),_(1),c()),t&2){let e=r(3).$implicit,i=r();s(),P(e.settings.mode===i.SYNC_PATH_MODE.BOTH?e.settings.conflictMode:e.settings.mode?i.SYNC_PATH_CONFLICT_MODE.REMOTE:i.SYNC_PATH_CONFLICT_MODE.LOCAL)}}function Vi(t,a){if(t&1&&(l(0,"span",30),_(1),c()),t&2){let e=r(3).$implicit;s(),P(e.settings.diffMode)}}function Fi(t,a){if(t&1&&d(0,"app-sync-path-scheduler",37),t&2){let e=r(3).$implicit;p("s",e)}}function Mi(t,a){if(t&1&&_(0),t&2){let e=r(3).$implicit;I(" ",e.settings.filters.length," ")}}function Li(t,a){if(t&1&&(_(0),y(1,"amTimeAgo")),t&2){let e=r(4).$implicit;I(" ",T(1,1,e.settings.lastSync,!0)," ")}}function Ai(t,a){if(t&1&&(_(0),y(1,"translate")),t&2){let e=r(5);I(" ",T(1,1,"never",e.locale.language)," ")}}function Ni(t,a){if(t&1&&(l(0,"div"),C(1,Li,2,4)(2,Ai,2,4),c()),t&2){let e=r(3).$implicit;E(W("sync-newly-",e.newly)),s(),x(e.newly?1:2)}}function Oi(t,a){if(t&1&&(l(0,"td"),C(1,Di,8,5,"div",35)(2,Ii,1,1,"app-sync-path-direction-icon",36)(3,Ri,2,1,"span",30)(4,Vi,2,1,"span",30)(5,Fi,1,1,"app-sync-path-scheduler",37)(6,Mi,1,1)(7,Ni,3,4,"div",38),c()),t&2){let e,i=r().$implicit,o=r().$implicit;E(Le("",i.value.class," ",i.value.newly?"sync-newly-"+o[i.value.newly]:"")),U("width",i.value.width,"%"),w("text-align-center",i.value.textCenter),s(),x((e=i.key)==="name"?1:e==="mode"?2:e==="conflictMode"?3:e==="diffMode"?4:e==="scheduler"?5:e==="filters"?6:e==="lastSync"?7:-1)}}function Bi(t,a){if(t&1&&C(0,Oi,8,9,"td",34),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function zi(t,a){if(t&1){let e=S();l(0,"tr",33),u("click",function(){let o=f(e).$implicit,n=r();return h(n.onSelect(o))})("contextmenu",function(o){let n=f(e).$implicit,m=r();return h(m.onSyncPathContextMenu(o,n))})("dblclick",function(){f(e);let o=r();return h(o.openSettingsDialog())}),V(1,Bi,1,1,null,null,bt),y(3,"keyvalue"),c()}if(t&2){let e=a.$implicit,i=r();w("selected",i.syncPathSelected&&i.syncPathSelected.id===e.id),s(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function $i(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faStop)}}function Hi(t,a){if(t&1){let e=S();v(0,$i,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doSync(!1))})}}function Ui(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faPlay)}}function Yi(t,a){if(t&1){let e=S();v(0,Ui,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doSync(!0))})}}function Qi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Simulate"),c()),t&2){let e=r();s(),p("icon",e.icons.faFlask)}}function ji(t,a){}function qi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Go to"),c()),t&2){let e=r();s(),p("icon",e.icons.faMapMarkerAlt)}}function Ki(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Edit"),c()),t&2){let e=r();s(),p("icon",e.icons.faPencilAlt)}}function Gi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Sequentially"),c()),t&2){let e=r();s(),p("icon",e.icons.faArrowsSpin)}}function Wi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Asynchronously"),c()),t&2){let e=r();s(),p("icon",e.icons.faShuffle)}}function Xi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Client"),c()),t&2){let e=r();s(),p("icon",e.icons.CLIENT)}}function Zi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Server"),c()),t&2){let e=r();s(),p("icon",e.icons.SERVER)}}function Ji(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Disabled"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faCalendarXmark)}}function en(t,a){if(t&1){let e=S();v(0,Ji,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))})}}function tn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Sequentially"),c()),t&2){let e=r();s(),p("icon",e.icons.faArrowsSpin)}}function nn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Asynchronously"),c()),t&2){let e=r();s(),p("icon",e.icons.faShuffle)}}function on(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Stop synchronizations"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faStop)}}function an(t,a){if(t&1){let e=S();v(0,on,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doAllSyncs(!1))})}}function sn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faForward)}}function rn(t,a){if(t&1&&v(0,sn,3,1,"ng-template",26),t&2){r();let e=D(53);p("subMenu",e)}}function ln(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(2);p("icon",e.icons.faCalendarXmark)}}function cn(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(2);p("icon",e.icons.faCalendarCheck)}}function pn(t,a){if(t&1&&(l(0,"span",30),C(1,ln,1,1,"fa-icon",7)(2,cn,1,1,"fa-icon",7),_(3," Scheduler "),c()),t&2){let e=r();s(),x(e.store.clientScheduler()===e.CLIENT_SCHEDULER_STATE.DISABLED?1:2)}}function mn(t,a){}function _n(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Add"),c()),t&2){let e=r();s(),p("icon",e.icons.faPlus)}}var Oo=(()=>{let a=class a{constructor(){this.locale=k(J),this.syncsInProgress=[],this.syncPathSelected=null,this.allSyncsRunning=!1,this.store=k(j),this.originalOrderKeyValue=le,this.icons={faCalendarXmark:et,faCalendarCheck:qe,faArrowDown:ae,faArrowUp:oe,faArrowRotateRight:ot,faPlus:nt,faPencilAlt:Xe,faStop:ie,faPlay:Ze,faForward:We,faArrowsSpin:Ge,faShuffle:it,faMapMarkerAlt:se,CLIENT:z.CLIENT,SERVER:z.SERVER,faInfoCircle:at,faExclamationTriangle:tt,faFlask:ne},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},mode:{label:"Direction",width:8,textCenter:!0,class:"",show:!0,sortable:!0},conflictMode:{label:"Conflict",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},diffMode:{label:"Mode",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},scheduler:{label:"Scheduler",width:8,textCenter:!0,class:"",show:!0},filters:{label:"Filters",width:5,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},lastSync:{label:"Synced",width:10,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.SYNC_PATH_MODE=pt,this.CLIENT_SCHEDULER_STATE=ce,this.SYNC_PATH_CONFLICT_MODE=mt,this.router=k(He),this.layout=k(pe),this.syncService=k(he),this.sortSettings={default:[{prop:"settings.name",type:"string"}],name:[{prop:"settings.name",type:"string"}],diffMode:[{prop:"settings.diffMode",type:"string"}],conflictMode:[{prop:"settings.conflictMode",type:"string"}],mode:[{prop:"settings.mode",type:"string"}],filters:[{prop:"settings.filters",type:"length"}],lastSync:[{prop:"lastSync",type:"date"}]},this.sortTable=new _e(this.constructor.name,this.sortSettings),this.subscriptions=[],this.focusOnPathId=null,this.focusOnPathSettings=!1,this.layout.setBreadcrumbIcon(z.SYNC),this.layout.setBreadcrumbNav({url:`/${$.BASE}/${$.PATHS}/${ct.SYNCS}`,splicing:2,translating:!0,sameLink:!0}),Oe(()=>{this.onSelect(this.store.clientSyncPaths().find(i=>i.id===this.syncPathSelected?.id))}),this.subscriptions.push(this.store.clientSyncsWithErrors.subscribe(i=>this.onSyncErrors(i))),this.subscriptions.push(this.store.clientSyncs.subscribe(i=>this.onSync(i))),this.subscriptions.push(this.store.clientSyncTask.subscribe(i=>this.onSyncTask(i))),this.checkRouteState()}ngOnInit(){if(this.focusOnPathId){let i=this.store.clientSyncPaths().findIndex(o=>o.id===this.focusOnPathId);i>-1&&(this.onSelect(this.store.clientSyncPaths()[i]),this.autoResize.scrollIntoView(Math.max(i,1)*35-35),this.focusOnPathSettings&&setTimeout(()=>this.openSettingsDialog(),500))}}ngOnDestroy(){for(let i of this.subscriptions)i.unsubscribe()}onSelect(i=null){this.syncPathSelected=i}onSync(i){this.syncsInProgress=i;for(let o of this.store.clientSyncPaths())this.syncsInProgress.find(n=>n.syncPathId===o.id)?o.inSync||o.setStatus(!0):(o.inSync&&(o.settings.lastSync=new Date),o.setStatus(!1));this.allSyncsRunning&&!this.syncsInProgress.length&&(this.allSyncsRunning=!1)}onSyncErrors(i){for(let o of this.store.clientSyncPaths()){let n=i.find(g=>g.syncPathId===o.id),m=n?n.mainError:null;o.mainError!==m&&(o.mainError=m,o.setStatus(!1)),o.lastErrors=n?n.lastErrors:[]}}onSyncTask(i){let o=this.store.clientSyncPaths().find(n=>n.id===i.syncPathId);o&&(o.nbSyncTasks=i.nbTasks)}onRefresh(){this.onSelect(),this.syncService.refreshPaths().catch(console.error)}doSync(i){this.syncService.doSync(i,[this.syncPathSelected.id],!1)}doAllSyncs(i,o=!0){let n=[];i&&(this.allSyncsRunning=i,n=this.store.clientSyncPaths().filter(m=>m.settings.enabled&&!m.inSync).map(m=>m.id)),this.syncService.doSync(i,n,!1,o)}setScheduler(i){i!==this.store.clientScheduler()&&this.syncService.setClientScheduler(i)}openReportDialog(){this.layout.openDialog(Tt,"xl",{id:this.syncPathSelected.id,initialState:{syncPath:this.syncPathSelected}})}openSettingsDialog(){this.layout.openDialog(xt,"md",{initialState:{syncPathSelected:this.syncPathSelected}})}goToPath(i=!0){this.syncService.goToPath(this.syncPathSelected,i)}addToSync(){this.router.navigate([$.BASE,$.WIZARD]).catch(console.error)}sortBy(i,o=!0,n){this.store.clientSyncPaths.set(this.sortTable.sortBy(i,o,n||this.store.clientSyncPaths()))}onSyncPathContextMenu(i,o){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(i,this.syncPathContextMenu)}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}showErrors(i){this.router.navigate([$.BASE,$.TRANSFERS],{state:{id:i.id}}).catch(console.error)}checkRouteState(){let i=this.router.currentNavigation()?.extras.state;i?.id&&(this.focusOnPathId=i.id,this.focusOnPathSettings=i.withSettings)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-paths"]],viewQuery:function(o,n){if(o&1&&(M(K,7),M(q,7),M(pi,7),M(mi,7)),o&2){let m;L(m=A())&&(n.autoResize=m.first),L(m=A())&&(n.inputFilter=m.first),L(m=A())&&(n.syncPathContextMenu=m.first),L(m=A())&&(n.mainContextMenu=m.first)}},decls:72,vars:55,consts:[["SyncPathContextMenu",""],["SyncAllContextMenu",""],["SyncGoToContextMenu",""],["SyncSchedulerContextMenu",""],["MainContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],["container","body",3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","type","button"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],["appAutoResize","",3,"contextmenu","resizeOffset"],["tabindex","-1"],[3,"selected"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"subMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click","contextmenu","dblclick"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[3,"syncPath"],[3,"s"],[3,"class"],["alt","","draggable","false","height","35",3,"src"],[1,"d-flex","align-items-center","ms-auto"],[1,"badge","rounded-pill","bg-maroon"],["placement","right",1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"tooltip"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1"],[1,"m-0",3,"icon"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,n){if(o&1){let m=S();l(0,"div",5)(1,"button",6),y(2,"translate"),u("click",function(){return f(m),h(n.onRefresh())}),d(3,"fa-icon",7),c(),l(4,"button",8),y(5,"translate"),u("click",function(){return f(m),h(n.addToSync())}),d(6,"fa-icon",7),c(),l(7,"button",9),y(8,"translate"),u("click",function(){return f(m),h(n.openSettingsDialog())}),d(9,"fa-icon",7),c(),l(10,"button",9),y(11,"translate"),u("click",function(){return f(m),h(n.openReportDialog())}),d(12,"fa-icon",7),c(),C(13,di,3,5,"button",10)(14,ui,3,6,"button",11),C(15,fi,3,5,"button",10)(16,gi,6,5,"div",12),l(17,"div",12),y(18,"translate"),y(19,"translate"),l(20,"div",13)(21,"button",14),C(22,Ci,1,1,"fa-icon",7)(23,xi,1,1,"fa-icon",7),c(),v(24,yi,12,3,"ul",15),c()(),l(25,"div",12),y(26,"translate"),l(27,"div",16)(28,"button",17),d(29,"fa-icon",7),c(),v(30,Pi,11,2,"ul",15),c()(),d(31,"app-input-filter",18),c(),l(32,"table",19)(33,"thead")(34,"tr"),V(35,bi,1,1,null,null,bt),y(37,"keyvalue"),c()()(),l(38,"div",20),u("contextmenu",function(N){return f(m),h(n.onContextMenu(N))}),l(39,"table",19)(40,"tbody",21),V(41,zi,4,5,"tr",22,_i),y(43,"searchFilter"),c()()(),l(44,"context-menu",null,0),C(46,Hi,1,0,null,23)(47,Yi,1,0,null,23),v(48,Qi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.openReportDialog())}),v(49,ji,0,0,"ng-template",25)(50,qi,3,1,"ng-template",26)(51,Ki,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.openSettingsDialog())}),c(),l(52,"context-menu",null,1),v(54,Gi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.doAllSyncs(!0,!1))}),v(55,Wi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.doAllSyncs(!0))}),c(),l(56,"context-menu",null,2),v(58,Xi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.goToPath())}),v(59,Zi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.goToPath(!1))}),c(),l(60,"context-menu",null,3),C(62,en,1,0,null,23),v(63,tn,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.setScheduler(n.CLIENT_SCHEDULER_STATE.SEQ))}),v(64,nn,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.setScheduler(n.CLIENT_SCHEDULER_STATE.ASYNC))}),c(),l(65,"context-menu",null,4),C(67,an,1,0,null,23)(68,rn,1,1,null,26),v(69,pn,4,1,"ng-template",26)(70,mn,0,0,"ng-template",25)(71,_n,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.addToSync())}),c()}if(o&2){let m=D(57),g=D(61);s(),p("tooltip",T(2,28,"Refresh",n.locale.language)),s(2),p("icon",n.icons.faArrowRotateRight),s(),p("tooltip",T(5,31,"Add",n.locale.language)),s(2),p("icon",n.icons.faPlus),s(),p("disabled",!n.syncPathSelected)("tooltip",T(8,34,"Edit",n.locale.language)),s(2),p("icon",n.icons.faPencilAlt),s(),p("disabled",!n.syncPathSelected||!n.syncPathSelected.settings.enabled)("tooltip",T(11,37,"Simulate",n.locale.language)),s(2),p("icon",n.icons.faFlask),s(),x(n.syncPathSelected&&n.syncPathSelected.inSync?13:14),s(2),x(n.allSyncsRunning?15:16),s(2),p("tooltip",T(18,40,"Scheduler",n.locale.language)+": "+T(19,43,n.store.clientScheduler(),n.locale.language)),s(4),E(W("btn btn-sm ",n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?"btn-warning":"btn-success"," dropdown-toggle")),s(),x(n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?22:23),s(3),p("tooltip",T(26,46,"Go to",n.locale.language)),s(2),p("isDisabled",!n.syncPathSelected),s(2),p("icon",n.icons.faMapMarkerAlt),s(6),F(T(37,49,n.tableHeaders,n.originalOrderKeyValue)),s(3),p("resizeOffset",105),s(3),F(T(43,52,n.store.clientSyncPaths(),n.inputFilter.search())),s(5),x(n.syncPathSelected&&n.syncPathSelected.inSync?46:47),s(3),p("divider",!0),s(),p("subMenu",m),s(12),x(n.store.clientScheduler()!==n.CLIENT_SCHEDULER_STATE.DISABLED?62:-1),s(5),x(n.allSyncsRunning?67:68),s(2),p("subMenu",g),s(),p("divider",!0)}},dependencies:[te,de,fe,ue,q,K,lt,rt,st,Ct,re,Q,vt,ee,me,ft,Z],encapsulation:2});let t=a;return t})();export{Oo as SyncPathsComponent};
1
+ import{a as xt}from"./chunk-GNZPP2VO.js";import{a as Ct}from"./chunk-GRLHFXGB.js";import{a as gt}from"./chunk-DQ3GEMPM.js";import{d as ht}from"./chunk-YMAN4LIU.js";import"./chunk-NMF2ZFBE.js";import{c as K}from"./chunk-BU4ZICZR.js";import{h as he}from"./chunk-ZXXHFBGL.js";import{a as de,b as ue,c as fe}from"./chunk-RK2ONYTL.js";import{a as me}from"./chunk-V6FA5QY4.js";import{e as ft}from"./chunk-XCLK7NJL.js";import{a as q,b as _e}from"./chunk-5E3TYOL3.js";import"./chunk-MYM43ENO.js";import{a as ut}from"./chunk-ZCOWBVOT.js";import"./chunk-PXRT4L57.js";import{Ab as _t,Bb as dt,Cb as pe,gb as le,nb as Ie,ob as ce,pb as ct,qb as z,rb as $,s as te,va as st,vb as j,wa as rt,xa as lt,xb as pt,zb as mt}from"./chunk-I2S3XPC5.js";import{d as He}from"./chunk-Y5RLD72B.js";import{Aa as ye,Ab as H,Ac as we,Bb as S,Cd as Qe,Df as tt,Eb as u,Ed as J,Gb as r,Gc as ke,Ia as X,Ic as Be,Jc as ze,Jd as ee,Kb as M,Kd as Q,Ke as Xe,Lb as L,Ld as je,Mb as A,Mc as $e,Md as qe,Oa as s,Pb as D,Pc as Z,Qa as G,Qb as U,Qf as it,Rb as w,Rd as Ke,Rf as nt,Sb as E,Tb as _,Tf as ot,Ub as P,Vb as I,Xa as O,Xb as Pe,Yb as Te,Yd as Ge,Zb as ve,ab as R,cc as W,da as Se,db as Me,dc as Le,dd as De,df as oe,dg as ae,ea as Ve,ec as be,ef as Ze,eg as se,fb as v,gc as Ae,hc as B,ic as Ne,ja as k,jd as Ue,kc as y,kg as at,lb as C,mb as x,mc as T,mf as Je,nc as Ee,ne as ie,oa as f,oc as Y,od as Ye,og as re,pa as h,pb as V,qb as F,rb as p,sb as l,tb as c,tc as Oe,tf as et,ub as d,va as Fe,ve as We,ye as ne}from"./chunk-IOIBQGHN.js";import"./chunk-DM4NXKEP.js";import"./chunk-ZIJQRARU.js";import"./chunk-KAVP6UXH.js";var Et=(t,a)=>({"pull-left":t,"float-left":a}),wt=(t,a)=>({"pull-right":t,"float-right":a}),Ce=(t,a)=>({disabled:t,currentPage:a}),kt=(t,a,e)=>({disabled:t,$implicit:a,currentPage:e});function Dt(t,a){if(t&1){let e=S();l(0,"li",11)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(13);w("disabled",e.noPrevious()||e.disabled),s(2),p("ngTemplateOutlet",e.customFirstTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noPrevious()||e.disabled,e.page))}}function It(t,a){if(t&1){let e=S();l(0,"li",14)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.page-1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(11);w("disabled",e.noPrevious()||e.disabled),s(2),p("ngTemplateOutlet",e.customPreviousTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noPrevious()||e.disabled,e.page))}}function Rt(t,a){if(t&1){let e=S();l(0,"li",15)(1,"a",12),u("click",function(o){let n=f(e).$implicit,m=r();return h(m.selectPage(n.number,o))}),H(2,13),c()()}if(t&2){let e=a.$implicit,i=r(),o=D(7);w("active",e.active)("disabled",i.disabled&&!e.active),s(2),p("ngTemplateOutlet",i.customPageTemplate||o)("ngTemplateOutletContext",Ne(6,kt,i.disabled,e,i.page))}}function Vt(t,a){if(t&1){let e=S();l(0,"li",16)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.page+1,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(9);w("disabled",e.noNext()||e.disabled),s(2),p("ngTemplateOutlet",e.customNextTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noNext()||e.disabled,e.page))}}function Ft(t,a){if(t&1){let e=S();l(0,"li",17)(1,"a",12),u("click",function(o){f(e);let n=r();return h(n.selectPage(n.totalPages,o))}),H(2,13),c()()}if(t&2){let e=r(),i=D(15);w("disabled",e.noNext()||e.disabled),s(2),p("ngTemplateOutlet",e.customLastTemplate||i)("ngTemplateOutletContext",B(4,Ce,e.noNext()||e.disabled,e.page))}}function Mt(t,a){if(t&1&&_(0),t&2){let e=a.$implicit;P(e.text)}}function Lt(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("next"))}}function At(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("previous"))}}function Nt(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("first"))}}function Ot(t,a){if(t&1&&_(0),t&2){let e=r();P(e.getText("last"))}}var St=(()=>{let a=class a{constructor(){this.main={itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"\xAB Previous",nextText:"Next \xBB",pageBtnClass:"",align:!0}}};a.\u0275fac=function(o){return new(o||a)},a.\u0275prov=Ve({token:a,factory:a.\u0275fac,providedIn:"root"});let t=a;return t})(),Bt={provide:De,useExisting:Se(()=>zt),multi:!0},zt=(()=>{let a=class a{constructor(i,o,n){this.elementRef=i,this.changeDetection=n,this.align=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.firstText="First",this.previousText="\xAB Previous",this.nextText="Next \xBB",this.lastText="Last",this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new G,this.pageChanged=new G,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=15,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=i,this.config||this.configureOptions(Object.assign({},o.main,o.pager))}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(i){this._itemsPerPage=i,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(i){this._totalItems=i,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(i){this._totalPages=i,this.numPages.emit(i),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(i){let o=this._page;this._page=i>this.totalPages?this.totalPages:i||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(i){this.config=Object.assign({},i)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(i){this.page=i,this.pages=this.getPages(this.page,this.totalPages)}getText(i){return this[`${i}Text`]||this.config[`${i}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}selectPage(i,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(i),this.onChange(this.page))}makePage(i,o,n){return{text:o,number:i,active:n}}getPages(i,o){let n=[],m=1,g=o,N=typeof this.maxSize<"u"&&this.maxSize<o;N&&this.maxSize&&(this.rotate?(m=Math.max(i-Math.floor(this.maxSize/2),1),g=m+this.maxSize-1,g>o&&(g=o,m=g-this.maxSize+1)):(m=(Math.ceil(i/this.maxSize)-1)*this.maxSize+1,g=Math.min(m+this.maxSize-1,o)));for(let b=m;b<=g;b++){let xe=this.makePage(b,b.toString(),b===i);n.push(xe)}if(N&&!this.rotate){if(m>1){let b=this.makePage(m-1,"...",!1);n.unshift(b)}if(g<o){let b=this.makePage(g+1,"...",!1);n.push(b)}}return n}calculateTotalPages(){let i=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(i||0,1)}};a.\u0275fac=function(o){return new(o||a)(O(ye),O(St),O(we))},a.\u0275cmp=R({type:a,selectors:[["pager"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[be([Bt])],decls:7,vars:22,consts:[[1,"pager"],[3,"ngClass"],["href","",3,"click"]],template:function(o,n){o&1&&(l(0,"ul",0)(1,"li",1)(2,"a",2),u("click",function(g){return n.selectPage(n.page-1,g)}),_(3),c()(),l(4,"li",1)(5,"a",2),u("click",function(g){return n.selectPage(n.page+1,g)}),_(6),c()()()),o&2&&(s(),E(n.pageBtnClass),w("disabled",n.noPrevious())("previous",n.align),p("ngClass",B(16,Et,n.align,n.align)),s(2),P(n.getText("previous")),s(),E(n.pageBtnClass),w("disabled",n.noNext())("next",n.align),p("ngClass",B(19,wt,n.align,n.align)),s(2),P(n.getText("next")))},dependencies:[ke],encapsulation:2});let t=a;return t})(),$t={provide:De,useExisting:Se(()=>Re),multi:!0},Re=(()=>{let a=class a{constructor(i,o,n){this.elementRef=i,this.changeDetection=n,this.align=!0,this.boundaryLinks=!1,this.directionLinks=!0,this.rotate=!0,this.pageBtnClass="",this.disabled=!1,this.numPages=new G,this.pageChanged=new G,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.classMap="",this.inited=!1,this._itemsPerPage=10,this._totalItems=0,this._totalPages=0,this._page=1,this.elementRef=i,this.config||this.configureOptions(o.main)}get itemsPerPage(){return this._itemsPerPage}set itemsPerPage(i){this._itemsPerPage=i,this.totalPages=this.calculateTotalPages()}get totalItems(){return this._totalItems}set totalItems(i){this._totalItems=i,this.totalPages=this.calculateTotalPages()}get totalPages(){return this._totalPages}set totalPages(i){this._totalPages=i,this.numPages.emit(i),this.inited&&this.selectPage(this.page)}get page(){return this._page}set page(i){let o=this._page;this._page=i>this.totalPages?this.totalPages:i||1,this.changeDetection.markForCheck(),!(o===this._page||typeof o>"u")&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})}configureOptions(i){this.config=Object.assign({},i)}ngOnInit(){typeof window<"u"&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),typeof this.maxSize>"u"&&(this.maxSize=this.config?.maxSize||0),typeof this.rotate>"u"&&(this.rotate=!!this.config?.rotate),typeof this.boundaryLinks>"u"&&(this.boundaryLinks=!!this.config?.boundaryLinks),typeof this.directionLinks>"u"&&(this.directionLinks=!!this.config?.directionLinks),typeof this.pageBtnClass>"u"&&(this.pageBtnClass=this.config?.pageBtnClass||""),typeof this.itemsPerPage>"u"&&(this.itemsPerPage=this.config?.itemsPerPage||0),this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0}writeValue(i){this.page=i,this.pages=this.getPages(this.page,this.totalPages)}getText(i){return this[`${i}Text`]||this.config[`${i}Text`]}noPrevious(){return this.page===1}noNext(){return this.page===this.totalPages}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}selectPage(i,o){o&&o.preventDefault(),this.disabled||(o&&o.target&&o.target.blur(),this.writeValue(i),this.onChange(this.page))}makePage(i,o,n){return{text:o,number:i,active:n}}getPages(i,o){let n=[],m=1,g=o,N=typeof this.maxSize<"u"&&this.maxSize<o;N&&this.maxSize&&(this.rotate?(m=Math.max(i-Math.floor(this.maxSize/2),1),g=m+this.maxSize-1,g>o&&(g=o,m=g-this.maxSize+1)):(m=(Math.ceil(i/this.maxSize)-1)*this.maxSize+1,g=Math.min(m+this.maxSize-1,o)));for(let b=m;b<=g;b++){let xe=this.makePage(b,b.toString(),b===i);n.push(xe)}if(N&&!this.rotate){if(m>1){let b=this.makePage(m-1,"...",!1);n.unshift(b)}if(g<o){let b=this.makePage(g+1,"...",!1);n.push(b)}}return n}calculateTotalPages(){let i=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(i||0,1)}};a.\u0275fac=function(o){return new(o||a)(O(ye),O(St),O(we))},a.\u0275cmp=R({type:a,selectors:[["pagination"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",customPageTemplate:"customPageTemplate",customNextTemplate:"customNextTemplate",customPreviousTemplate:"customPreviousTemplate",customFirstTemplate:"customFirstTemplate",customLastTemplate:"customLastTemplate",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[be([$t])],decls:16,vars:6,consts:[["defaultPageTemplate",""],["defaultNextTemplate",""],["defaultPreviousTemplate",""],["defaultFirstTemplate",""],["defaultLastTemplate",""],[1,"pagination",3,"ngClass"],["class","pagination-first page-item",3,"disabled",4,"ngIf"],["class","pagination-prev page-item",3,"disabled",4,"ngIf"],["class","pagination-page page-item",3,"active","disabled",4,"ngFor","ngForOf"],["class","pagination-next page-item",3,"disabled",4,"ngIf"],["class","pagination-last page-item",3,"disabled",4,"ngIf"],[1,"pagination-first","page-item"],["href","",1,"page-link",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pagination-prev","page-item"],[1,"pagination-page","page-item"],[1,"pagination-next","page-item"],[1,"pagination-last","page-item"]],template:function(o,n){o&1&&(l(0,"ul",5),v(1,Dt,3,7,"li",6)(2,It,3,7,"li",7)(3,Rt,3,10,"li",8)(4,Vt,3,7,"li",9)(5,Ft,3,7,"li",10),c(),v(6,Mt,1,1,"ng-template",null,0,Y)(8,Lt,1,1,"ng-template",null,1,Y)(10,At,1,1,"ng-template",null,2,Y)(12,Nt,1,1,"ng-template",null,3,Y)(14,Ot,1,1,"ng-template",null,4,Y)),o&2&&(p("ngClass",n.classMap),s(),p("ngIf",n.boundaryLinks),s(),p("ngIf",n.directionLinks),s(),p("ngForOf",n.pages),s(),p("ngIf",n.directionLinks),s(),p("ngIf",n.boundaryLinks))},dependencies:[ke,ze,$e,Be],encapsulation:2});let t=a;return t})();var yt=(()=>{let a=class a{transform(i,o=1,n){if(!i?.length)return[];let m=(o-1)*n;return i.slice(m,m+n)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275pipe=Me({name:"paginate",type:a,pure:!0});let t=a;return t})();var Ht=t=>({nb:t}),Ut=(t,a)=>a.nbTasks,Pt=(t,a)=>a.key;function Yt(t,a){if(t&1&&d(0,"fa-icon",12),t&2){let e=r();p("icon",e.icons.faSpinner)}}function Qt(t,a){if(t&1&&(l(0,"span",13),_(1),y(2,"translate"),c()),t&2){let e=r();s(),P(Ee(2,1,"nb_actions",e.locale.language,Ae(5,Ht,e.count.actions)))}}function jt(t,a){if(t&1){let e=S();l(0,"button",27),y(1,"translate"),ve("ngModelChange",function(o){f(e);let n=r();return Te(n.showFiltered,o)||(n.showFiltered=o),h(o)}),d(2,"fa-icon",2),l(3,"span"),_(4),c()()}if(t&2){let e=r();Pe("ngModel",e.showFiltered),p("tooltip",T(1,4,"Show filtered files",e.locale.language)),s(2),p("icon",e.icons.faFilter),s(2),P(e.count.filtered)}}function qt(t,a){if(t&1){let e=S();l(0,"li",29)(1,"a",30),u("click",function(){f(e);let o=r(2);return h(o.goToPath(!1))}),l(2,"span",31),d(3,"fa-icon",2),l(4,"span",3),_(5,"Server"),c()()()()}if(t&2){let e=r(2);s(3),p("icon",e.icons.SERVER)}}function Kt(t,a){if(t&1){let e=S();l(0,"ul",28)(1,"li",29)(2,"a",30),u("click",function(){f(e);let o=r();return h(o.goToPath())}),l(3,"span",31),d(4,"fa-icon",2),l(5,"span",3),_(6,"Client"),c()()()(),C(7,qt,6,1,"li",29),c()}if(t&2){let e=r();s(4),p("icon",e.icons.CLIENT),s(3),x(e.transferSelected.action!==e.SYNC_TRANSFER_ACTION.FILTERED?7:-1)}}function Gt(t,a){t&1&&(l(0,"div",21),_(1,"No differences"),c())}function Wt(t,a){if(t&1&&d(0,"fa-icon",2),t&2){let e=r(4);p("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function Xt(t,a){if(t&1){let e=S();l(0,"th",33),u("click",function(){f(e);let o=r().$implicit,n=r(2);return h(n.sortBy(o.key))}),_(1),C(2,Wt,1,1,"fa-icon",2),c()}if(t&2){let e=r().$implicit,i=r(2);E(e.value.class),U("width",e.value.width,"%"),w("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),I(" ",e.value.label," "),s(),x(i.sortTable.sortParam.column===e.key?2:-1)}}function Zt(t,a){if(t&1&&C(0,Xt,3,10,"th",32),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function Jt(t,a){if(t&1&&(l(0,"table",22)(1,"thead")(2,"tr"),V(3,Zt,1,1,null,null,Pt),y(5,"keyvalue"),c()()()),t&2){let e=r();s(3),F(T(5,0,e.tableHeaders,e.originalOrderKeyValue))}}function ei(t,a){if(t&1&&(l(0,"span",37),d(1,"fa-icon",2)(2,"fa-icon",39),l(3,"span",40),_(4),c()()),t&2){let e=r(4).$implicit;s(),E(e.sideIconClass),p("icon",e.sideIcon),s(),p("icon",e.actionIcon),s(2),P(e.actionText)}}function ti(t,a){if(t&1&&(l(0,"span"),_(1),c(),l(2,"span")(3,"b",31),_(4,"Source"),c(),_(5),c()),t&2){let e=r(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),P(e.fileDst),s(),E(W("",e.selected?"overflow-wrap-and-whitespace":"truncate"," fs-xxxs")),s(3),I(":\xA0",e.file)}}function ii(t,a){if(t&1&&(l(0,"span"),_(1),c()),t&2){let e=r(5).$implicit;E(e.selected?"overflow-wrap-and-whitespace":"truncate"),s(),P(e.file)}}function ni(t,a){if(t&1){let e=S();l(0,"div",38)(1,"img",41),u("error",function(){f(e);let o=r(4).$implicit;return h(o.fallBackMimeUrl())}),c(),l(2,"span",42),C(3,ti,6,7)(4,ii,2,3,"span",43),c()()}if(t&2){let e=r(4).$implicit;s(),p("src",e.mimeUrl,X),s(2),x(e.fileDst?3:4)}}function oi(t,a){if(t&1&&(l(0,"td"),C(1,ei,5,5,"span",37)(2,ni,5,2,"div",38),c()),t&2){let e,i=r().$implicit;E(i.value.class),U("width",i.value.width,"%"),w("text-align-center",i.value.textCenter),s(),x((e=i.key)==="action"?1:e==="file"?2:-1)}}function ai(t,a){if(t&1&&C(0,oi,3,7,"td",36),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function si(t,a){if(t&1){let e=S();l(0,"tr",35),u("click",function(){f(e);let o=r().$implicit,n=r();return h(n.onSelect(o))}),V(1,ai,1,1,null,null,Pt),y(3,"keyvalue"),c()}if(t&2){let e=r().$implicit,i=r();w("selected",i.transferSelected&&i.transferSelected.nbTasks===e.nbTasks),s(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function ri(t,a){if(t&1&&C(0,si,4,5,"tr",34),t&2){let e=a.$implicit,i=r();x(!e.isFiltered||i.showFiltered&&e.isFiltered?0:-1)}}var Tt=(()=>{let a=class a{constructor(){this.locale=k(J),this.originalOrderKeyValue=le,this.SYNC_TRANSFER_ACTION=ht,this.icons={faArrowDown:ae,faArrowUp:oe,faStop:ie,faFlask:ne,faSpinner:Je,faRotate:je,faMapMarkerAlt:se,faFilter:Ke,CLIENT:z.CLIENT,SERVER:z.SERVER},this.tableHeaders={action:{label:"Action",width:16,textCenter:!1,class:"",show:!0,sortable:!0},file:{label:"File",width:84,textCenter:!1,class:"",show:!0,sortable:!0}},this.itemsPerPage=500,this.currentPage=1,this.running=!1,this.hasNoChanges=!1,this.transferSelected=null,this.showFiltered=!1,this.count={actions:0,filtered:0},this.transfers=Fe([]),this.layout=k(pe),this.electron=k(dt),this.store=k(j),this.syncService=k(he),this.sortSettings={default:[{prop:"nbTasks",type:"number"}],action:[{prop:"actionText",type:"string"}],file:[{prop:"file",type:"string"}]},this.sortTable=new _e(this.constructor.name,this.sortSettings),this.subscriptions=[]}ngOnInit(){this.electron.ipcRenderer.on(Ie.SYNC.REPORT_TRANSFER,(i,o)=>this.addTransfer(o)),this.subscriptions.push(this.store.clientSyncIsReporting.subscribe(i=>this.manageState(i)))}ngOnDestroy(){for(let i of this.subscriptions)i.unsubscribe();this.electron.ipcRenderer.removeAllListeners(Ie.SYNC.REPORT_TRANSFER)}manageReport(i=!1){i&&(this.hasNoChanges=!1,this.count={actions:0,filtered:0},this.transfers.set([])),this.syncService.doSync(i,[this.syncPath.id],!0)}sortBy(i,o=!0,n){this.transfers.set(this.sortTable.sortBy(i,o,n||this.transfers()))}onSelect(i){this.transferSelected=i||null}goToPath(i=!0){this.syncService.goToPath(this.syncPath,i,this.transferSelected.file)}pageChanged(){this.onSelect(),this.autoResizeDirective.scrollTop()}onClose(){this.running&&this.syncService.doSync(!1,[this.syncPath.id],!0),this.layout.closeDialog(null,this.syncPath.id)}onMinimize(){this.layout.minimizeDialog(this.syncPath.id,{name:this.syncPath.settings.name,mimeUrl:this.syncPath.mimeUrl})}addTransfer(i){let o=new gt(i);o.isFiltered?this.count.filtered++:this.count.actions++,this.transfers.update(n=>[...n,o])}manageState(i){this.running&&i===!1&&this.transfers().length===0&&(this.hasNoChanges=!0),this.running=i}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-folder-report-dialog"]],viewQuery:function(o,n){if(o&1&&(M(K,7),M(q,7)),o&2){let m;L(m=A())&&(n.autoResizeDirective=m.first),L(m=A())&&(n.inputFilter=m.first)}},inputs:{syncPath:"syncPath"},decls:37,vars:27,consts:[[1,"modal-header"],[1,"modal-title"],[3,"icon"],[1,"ms-2"],["aria-label","Minimize","type","button",1,"btn-minimize","btn-minimize-white",3,"click"],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-3",3,"click"],[1,"modal-body","p-0"],[1,"app-top-menu","bg-theme-alt"],["type","button",1,"btn","btn-sm","btn-secondary","ms-1",3,"click"],[1,"d-flex","align-items-center"],["l10nTranslate","",1,"ms-1"],[1,"ms-auto"],["animation","spin",1,"me-2",3,"icon"],[1,"fs-xxs"],[1,"d-flex","align-items-center","ms-auto"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModel","tooltip"],[3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],[1,"d-none","d-sm-block"],["l10nTranslate","",1,"p-2"],[1,"app-table"],["appAutoResize","",3,"resizeOffset","useMaxHeight"],["tabindex","-1"],[1,"modal-footer","justify-content-center","align-items-center","fs-sm"],["previousText","\u2039","nextText","\u203A","firstText","\xAB","lastText","\xBB",1,"pagination","pagination-sm",2,"margin-bottom","-.6rem",3,"pageChanged","ngModelChange","ngModel","boundaryLinks","itemsPerPage","maxSize","totalItems"],["placement","top","role","button","type","button","btnCheckbox","",1,"btn","btn-sm","btn-outline-secondary","me-1",3,"ngModelChange","ngModel","tooltip"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"selected"],[3,"click"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center",2,"font-size","14px"],[1,"d-flex","align-items-center","fs-xxs"],["size","sm",1,"circle-gray-icon-sm",3,"icon"],["l10nTranslate","",1,"fs-xxxs"],["alt","","width","24",1,"me-2",3,"error","src"],[1,"d-flex","flex-column","fs-xxs"],[3,"class"]],template:function(o,n){o&1&&(l(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),l(3,"span",3),_(4),c()(),l(5,"button",4),u("click",function(){return n.onMinimize()}),c(),l(6,"button",5),u("click",function(){return n.onClose()}),c()(),l(7,"div",6)(8,"div",7)(9,"button",8),u("click",function(){return n.manageReport(!n.running)}),l(10,"div",9),d(11,"fa-icon",2),l(12,"span",10),_(13,"Simulate"),c()()(),l(14,"div",11),C(15,Yt,1,1,"fa-icon",12),C(16,Qt,3,7,"span",13),c(),l(17,"div",14),C(18,jt,5,7,"button",15),l(19,"div",16),y(20,"translate"),l(21,"div",17)(22,"button",18),d(23,"fa-icon",2),c(),v(24,Kt,8,2,"ul",19),c()()(),d(25,"app-input-filter",20),c(),C(26,Gt,2,0,"div",21)(27,Jt,6,3,"table",22),l(28,"div",23)(29,"table",22)(30,"tbody",24),V(31,ri,1,1,null,null,Ut),y(33,"searchFilter"),y(34,"paginate"),c()()()(),l(35,"div",25)(36,"pagination",26),u("pageChanged",function(){return n.pageChanged()}),ve("ngModelChange",function(g){return Te(n.currentPage,g)||(n.currentPage=g),g}),c()()),o&2&&(s(2),p("icon",n.icons.faRotate),s(2),P(n.syncPath.settings.name),s(7),p("icon",n.running?n.icons.faStop:n.icons.faFlask),s(4),x(n.running?15:-1),s(),x(n.transfers().length?16:-1),s(2),x(n.count.filtered?18:-1),s(),p("tooltip",T(20,17,"Go to",n.locale.language)),s(2),p("isDisabled",!n.transferSelected),s(2),p("icon",n.icons.faMapMarkerAlt),s(3),x(n.hasNoChanges?26:27),s(2),p("resizeOffset",225)("useMaxHeight",!1),s(3),F(Ee(34,23,T(33,20,n.transfers(),n.inputFilter.search()),n.currentPage,n.itemsPerPage)),s(5),Pe("ngModel",n.currentPage),p("boundaryLinks",!0)("itemsPerPage",n.itemsPerPage)("maxSize",20)("totalItems",n.transfers().length))},dependencies:[re,Q,te,de,fe,ue,K,Re,Qe,Ue,Ye,q,ut,ee,Z,yt,me],encapsulation:2});let t=a;return t})();function li(t,a){if(t&1&&(l(0,"span",0),_(1),c()),t&2){let e=r();s(),P(e.s.settings.scheduler.unit)}}function ci(t,a){if(t&1&&(l(0,"span")(1,"span"),_(2),c(),l(3,"span",0),_(4),c()()),t&2){let e=r();s(2),I("",e.s.settings.scheduler.value,"\xA0"),s(2),P(e.s.settings.scheduler.unit+"s")}}var vt=(()=>{let a=class a{constructor(){this.store=k(j),this.SYNC_PATH_SCHEDULER_UNIT=_t,this.CLIENT_SCHEDULER_STATE=ce}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-path-scheduler"]],inputs:{s:"s"},decls:3,vars:3,consts:[["l10nTranslate",""]],template:function(o,n){o&1&&(l(0,"span"),C(1,li,2,1,"span",0)(2,ci,5,2,"span"),c()),o&2&&(E(n.s.settings.scheduler.unit!==n.SYNC_PATH_SCHEDULER_UNIT.DISABLED?n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?"text-warning text-failed":"text-success":"text-danger"),s(),x(n.s.settings.scheduler.unit===n.SYNC_PATH_SCHEDULER_UNIT.DISABLED?1:2))},dependencies:[Q],encapsulation:2});let t=a;return t})();var pi=["SyncPathContextMenu"],mi=["MainContextMenu"],bt=(t,a)=>a.key,_i=(t,a)=>a.id;function di(t,a){if(t&1){let e=S();l(0,"button",8),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doSync(!1))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("tooltip",T(1,2,"Stop synchronization",e.locale.language)),s(2),p("icon",e.icons.faStop)}}function ui(t,a){if(t&1){let e=S();l(0,"button",9),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doSync(!0))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("disabled",!e.syncPathSelected||!e.syncPathSelected.settings.enabled)("tooltip",T(1,3,"Synchronize",e.locale.language)),s(2),p("icon",e.icons.faPlay)}}function fi(t,a){if(t&1){let e=S();l(0,"button",8),y(1,"translate"),u("click",function(){f(e);let o=r();return h(o.doAllSyncs(!1))}),d(2,"fa-icon",7),c()}if(t&2){let e=r();p("tooltip",T(1,2,"Stop synchronizations",e.locale.language)),s(2),p("icon",e.icons.faStop)}}function hi(t,a){if(t&1){let e=S();l(0,"ul",27)(1,"li",28)(2,"a",29),u("click",function(){f(e);let o=r(2);return h(o.doAllSyncs(!0,!1))}),l(3,"span",30),d(4,"fa-icon",7),_(5," Sequentially "),c()()(),l(6,"li",28)(7,"a",29),u("click",function(){f(e);let o=r(2);return h(o.doAllSyncs(!0))}),l(8,"span",30),d(9,"fa-icon",7),_(10," Asynchronously "),c()()()()}if(t&2){let e=r(2);s(4),p("icon",e.icons.faArrowsSpin),s(5),p("icon",e.icons.faShuffle)}}function gi(t,a){if(t&1&&(l(0,"div",12),y(1,"translate"),l(2,"div",13)(3,"button",17),d(4,"fa-icon",7),c(),v(5,hi,11,2,"ul",15),c()()),t&2){let e=r();p("tooltip",T(1,2,"Synchronize all",e.locale.language)),s(4),p("icon",e.icons.faForward)}}function Ci(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r();p("icon",e.icons.faCalendarXmark)}}function xi(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r();p("icon",e.icons.faCalendarCheck)}}function Si(t,a){if(t&1){let e=S();l(0,"li",28)(1,"a",29),u("click",function(){f(e);let o=r(2);return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))}),l(2,"span",30),d(3,"fa-icon",7),_(4," Disable "),c()()()}if(t&2){let e=r(2);s(3),p("icon",e.icons.faCalendarXmark)}}function yi(t,a){if(t&1){let e=S();l(0,"ul",27),C(1,Si,5,1,"li",28),l(2,"li",28)(3,"a",29),u("click",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.SEQ))}),l(4,"span",30),d(5,"fa-icon",7),_(6," Sequentially "),c()()(),l(7,"li",28)(8,"a",29),u("click",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.ASYNC))}),l(9,"span",30),d(10,"fa-icon",7),_(11," Asynchronously "),c()()()()}if(t&2){let e=r();s(),x(e.store.clientScheduler()!==e.CLIENT_SCHEDULER_STATE.DISABLED?1:-1),s(4),p("icon",e.icons.faArrowsSpin),s(5),p("icon",e.icons.faShuffle)}}function Pi(t,a){if(t&1){let e=S();l(0,"ul",27)(1,"li",28)(2,"a",29),u("click",function(){f(e);let o=r();return h(o.goToPath())}),l(3,"span",30),d(4,"fa-icon",7),_(5," Client "),c()()(),l(6,"li",28)(7,"a",29),u("click",function(){f(e);let o=r();return h(o.goToPath(!1))}),l(8,"span",30),d(9,"fa-icon",7),_(10," Server "),c()()()()}if(t&2){let e=r();s(4),p("icon",e.icons.CLIENT),s(5),p("icon",e.icons.SERVER)}}function Ti(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(3);p("icon",e.sortTable.sortParam.asc?e.icons.faArrowDown:e.icons.faArrowUp)}}function vi(t,a){if(t&1){let e=S();l(0,"th",32),u("click",function(){f(e);let o=r().$implicit,n=r();return h(n.sortBy(o.key))}),_(1),C(2,Ti,1,1,"fa-icon",7),c()}if(t&2){let e=r().$implicit,i=r();E(e.value.class),U("width",e.value.width,"%"),w("text-align-center",e.value.textCenter)("cursor-pointer",e.value.sortable),s(),I(" ",e.value.label," "),s(),x(i.sortTable.sortParam.column===e.key?2:-1)}}function bi(t,a){if(t&1&&C(0,vi,3,10,"th",31),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function Ei(t,a){if(t&1&&(l(0,"span",41),_(1),c()),t&2){let e=r(4).$implicit;s(),P(e._nbTasks)}}function wi(t,a){if(t&1&&(l(0,"span",42),y(1,"translate"),d(2,"fa-icon",44),c()),t&2){let e=r(4).$implicit,i=r();p("tooltip",T(1,2,e.mainError,i.locale.language)),s(2),p("icon",i.icons.faExclamationTriangle)}}function ki(t,a){if(t&1){let e=S();l(0,"span",45),u("click",function(){f(e);let o=r(4).$implicit,n=r();return h(n.showErrors(o))}),d(1,"fa-icon",46),l(2,"span"),_(3),c()()}if(t&2){let e=r(4).$implicit,i=r();s(),p("icon",i.icons.faExclamationTriangle),s(2),P(e.lastErrors.length)}}function Di(t,a){if(t&1&&(l(0,"div",35),d(1,"img",39),l(2,"span"),_(3),c(),l(4,"span",40),C(5,Ei,2,1,"span",41),C(6,wi,3,5,"span",42),C(7,ki,4,2,"span",43),c()()),t&2){let e=r(3).$implicit;s(),p("src",e.mimeUrl,X),s(2),P(e.settings.name),s(2),x(e.nbSyncTasks?5:-1),s(),x(e.mainError?6:-1),s(),x(e.lastErrors.length?7:-1)}}function Ii(t,a){if(t&1&&d(0,"app-sync-path-direction-icon",36),t&2){let e=r(3).$implicit;p("syncPath",e)}}function Ri(t,a){if(t&1&&(l(0,"span",30),_(1),c()),t&2){let e=r(3).$implicit,i=r();s(),P(e.settings.mode===i.SYNC_PATH_MODE.BOTH?e.settings.conflictMode:e.settings.mode?i.SYNC_PATH_CONFLICT_MODE.REMOTE:i.SYNC_PATH_CONFLICT_MODE.LOCAL)}}function Vi(t,a){if(t&1&&(l(0,"span",30),_(1),c()),t&2){let e=r(3).$implicit;s(),P(e.settings.diffMode)}}function Fi(t,a){if(t&1&&d(0,"app-sync-path-scheduler",37),t&2){let e=r(3).$implicit;p("s",e)}}function Mi(t,a){if(t&1&&_(0),t&2){let e=r(3).$implicit;I(" ",e.settings.filters.length," ")}}function Li(t,a){if(t&1&&(_(0),y(1,"amTimeAgo")),t&2){let e=r(4).$implicit;I(" ",T(1,1,e.settings.lastSync,!0)," ")}}function Ai(t,a){if(t&1&&(_(0),y(1,"translate")),t&2){let e=r(5);I(" ",T(1,1,"never",e.locale.language)," ")}}function Ni(t,a){if(t&1&&(l(0,"div"),C(1,Li,2,4)(2,Ai,2,4),c()),t&2){let e=r(3).$implicit;E(W("sync-newly-",e.newly)),s(),x(e.newly?1:2)}}function Oi(t,a){if(t&1&&(l(0,"td"),C(1,Di,8,5,"div",35)(2,Ii,1,1,"app-sync-path-direction-icon",36)(3,Ri,2,1,"span",30)(4,Vi,2,1,"span",30)(5,Fi,1,1,"app-sync-path-scheduler",37)(6,Mi,1,1)(7,Ni,3,4,"div",38),c()),t&2){let e,i=r().$implicit,o=r().$implicit;E(Le("",i.value.class," ",i.value.newly?"sync-newly-"+o[i.value.newly]:"")),U("width",i.value.width,"%"),w("text-align-center",i.value.textCenter),s(),x((e=i.key)==="name"?1:e==="mode"?2:e==="conflictMode"?3:e==="diffMode"?4:e==="scheduler"?5:e==="filters"?6:e==="lastSync"?7:-1)}}function Bi(t,a){if(t&1&&C(0,Oi,8,9,"td",34),t&2){let e=a.$implicit;x(e.value.show?0:-1)}}function zi(t,a){if(t&1){let e=S();l(0,"tr",33),u("click",function(){let o=f(e).$implicit,n=r();return h(n.onSelect(o))})("contextmenu",function(o){let n=f(e).$implicit,m=r();return h(m.onSyncPathContextMenu(o,n))})("dblclick",function(){f(e);let o=r();return h(o.openSettingsDialog())}),V(1,Bi,1,1,null,null,bt),y(3,"keyvalue"),c()}if(t&2){let e=a.$implicit,i=r();w("selected",i.syncPathSelected&&i.syncPathSelected.id===e.id),s(),F(T(3,2,i.tableHeaders,i.originalOrderKeyValue))}}function $i(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faStop)}}function Hi(t,a){if(t&1){let e=S();v(0,$i,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doSync(!1))})}}function Ui(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faPlay)}}function Yi(t,a){if(t&1){let e=S();v(0,Ui,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doSync(!0))})}}function Qi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Simulate"),c()),t&2){let e=r();s(),p("icon",e.icons.faFlask)}}function ji(t,a){}function qi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Go to"),c()),t&2){let e=r();s(),p("icon",e.icons.faMapMarkerAlt)}}function Ki(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Edit"),c()),t&2){let e=r();s(),p("icon",e.icons.faPencilAlt)}}function Gi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Sequentially"),c()),t&2){let e=r();s(),p("icon",e.icons.faArrowsSpin)}}function Wi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Asynchronously"),c()),t&2){let e=r();s(),p("icon",e.icons.faShuffle)}}function Xi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Client"),c()),t&2){let e=r();s(),p("icon",e.icons.CLIENT)}}function Zi(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Server"),c()),t&2){let e=r();s(),p("icon",e.icons.SERVER)}}function Ji(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Disabled"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faCalendarXmark)}}function en(t,a){if(t&1){let e=S();v(0,Ji,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.setScheduler(o.CLIENT_SCHEDULER_STATE.DISABLED))})}}function tn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Sequentially"),c()),t&2){let e=r();s(),p("icon",e.icons.faArrowsSpin)}}function nn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Asynchronously"),c()),t&2){let e=r();s(),p("icon",e.icons.faShuffle)}}function on(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Stop synchronizations"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faStop)}}function an(t,a){if(t&1){let e=S();v(0,on,3,1,"ng-template",24),u("execute",function(){f(e);let o=r();return h(o.doAllSyncs(!1))})}}function sn(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Synchronize"),c()),t&2){let e=r(2);s(),p("icon",e.icons.faForward)}}function rn(t,a){if(t&1&&v(0,sn,3,1,"ng-template",26),t&2){r();let e=D(53);p("subMenu",e)}}function ln(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(2);p("icon",e.icons.faCalendarXmark)}}function cn(t,a){if(t&1&&d(0,"fa-icon",7),t&2){let e=r(2);p("icon",e.icons.faCalendarCheck)}}function pn(t,a){if(t&1&&(l(0,"span",30),C(1,ln,1,1,"fa-icon",7)(2,cn,1,1,"fa-icon",7),_(3," Scheduler "),c()),t&2){let e=r();s(),x(e.store.clientScheduler()===e.CLIENT_SCHEDULER_STATE.DISABLED?1:2)}}function mn(t,a){}function _n(t,a){if(t&1&&(l(0,"span",30),d(1,"fa-icon",7),_(2,"Add"),c()),t&2){let e=r();s(),p("icon",e.icons.faPlus)}}var Oo=(()=>{let a=class a{constructor(){this.locale=k(J),this.syncsInProgress=[],this.syncPathSelected=null,this.allSyncsRunning=!1,this.store=k(j),this.originalOrderKeyValue=le,this.icons={faCalendarXmark:et,faCalendarCheck:qe,faArrowDown:ae,faArrowUp:oe,faArrowRotateRight:ot,faPlus:nt,faPencilAlt:Xe,faStop:ie,faPlay:Ze,faForward:We,faArrowsSpin:Ge,faShuffle:it,faMapMarkerAlt:se,CLIENT:z.CLIENT,SERVER:z.SERVER,faInfoCircle:at,faExclamationTriangle:tt,faFlask:ne},this.tableHeaders={name:{label:"Name",width:30,textCenter:!1,class:"",show:!0,sortable:!0},mode:{label:"Direction",width:8,textCenter:!0,class:"",show:!0,sortable:!0},conflictMode:{label:"Conflict",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},diffMode:{label:"Mode",width:6,textCenter:!0,class:"d-none d-md-table-cell",show:!0,sortable:!0},scheduler:{label:"Scheduler",width:8,textCenter:!0,class:"",show:!0},filters:{label:"Filters",width:5,textCenter:!0,class:"d-none d-lg-table-cell",show:!0,sortable:!0},lastSync:{label:"Synced",width:10,textCenter:!0,class:"",newly:"newly",show:!0,sortable:!0}},this.SYNC_PATH_MODE=pt,this.CLIENT_SCHEDULER_STATE=ce,this.SYNC_PATH_CONFLICT_MODE=mt,this.router=k(He),this.layout=k(pe),this.syncService=k(he),this.sortSettings={default:[{prop:"settings.name",type:"string"}],name:[{prop:"settings.name",type:"string"}],diffMode:[{prop:"settings.diffMode",type:"string"}],conflictMode:[{prop:"settings.conflictMode",type:"string"}],mode:[{prop:"settings.mode",type:"string"}],filters:[{prop:"settings.filters",type:"length"}],lastSync:[{prop:"lastSync",type:"date"}]},this.sortTable=new _e(this.constructor.name,this.sortSettings),this.subscriptions=[],this.focusOnPathId=null,this.focusOnPathSettings=!1,this.layout.setBreadcrumbIcon(z.SYNC),this.layout.setBreadcrumbNav({url:`/${$.BASE}/${$.PATHS}/${ct.SYNCS}`,splicing:2,translating:!0,sameLink:!0}),Oe(()=>{this.onSelect(this.store.clientSyncPaths().find(i=>i.id===this.syncPathSelected?.id))}),this.subscriptions.push(this.store.clientSyncsWithErrors.subscribe(i=>this.onSyncErrors(i))),this.subscriptions.push(this.store.clientSyncs.subscribe(i=>this.onSync(i))),this.subscriptions.push(this.store.clientSyncTask.subscribe(i=>this.onSyncTask(i))),this.checkRouteState()}ngOnInit(){if(this.focusOnPathId){let i=this.store.clientSyncPaths().findIndex(o=>o.id===this.focusOnPathId);i>-1&&(this.onSelect(this.store.clientSyncPaths()[i]),this.autoResize.scrollIntoView(Math.max(i,1)*35-35),this.focusOnPathSettings&&setTimeout(()=>this.openSettingsDialog(),500))}}ngOnDestroy(){for(let i of this.subscriptions)i.unsubscribe()}onSelect(i=null){this.syncPathSelected=i}onSync(i){this.syncsInProgress=i;for(let o of this.store.clientSyncPaths())this.syncsInProgress.find(n=>n.syncPathId===o.id)?o.inSync||o.setStatus(!0):(o.inSync&&(o.settings.lastSync=new Date),o.setStatus(!1));this.allSyncsRunning&&!this.syncsInProgress.length&&(this.allSyncsRunning=!1)}onSyncErrors(i){for(let o of this.store.clientSyncPaths()){let n=i.find(g=>g.syncPathId===o.id),m=n?n.mainError:null;o.mainError!==m&&(o.mainError=m,o.setStatus(!1)),o.lastErrors=n?n.lastErrors:[]}}onSyncTask(i){let o=this.store.clientSyncPaths().find(n=>n.id===i.syncPathId);o&&(o.nbSyncTasks=i.nbTasks)}onRefresh(){this.onSelect(),this.syncService.refreshPaths().catch(console.error)}doSync(i){this.syncService.doSync(i,[this.syncPathSelected.id],!1)}doAllSyncs(i,o=!0){let n=[];i&&(this.allSyncsRunning=i,n=this.store.clientSyncPaths().filter(m=>m.settings.enabled&&!m.inSync).map(m=>m.id)),this.syncService.doSync(i,n,!1,o)}setScheduler(i){i!==this.store.clientScheduler()&&this.syncService.setClientScheduler(i)}openReportDialog(){this.layout.openDialog(Tt,"xl",{id:this.syncPathSelected.id,initialState:{syncPath:this.syncPathSelected}})}openSettingsDialog(){this.layout.openDialog(xt,"md",{initialState:{syncPathSelected:this.syncPathSelected}})}goToPath(i=!0){this.syncService.goToPath(this.syncPathSelected,i)}addToSync(){this.router.navigate([$.BASE,$.WIZARD]).catch(console.error)}sortBy(i,o=!0,n){this.store.clientSyncPaths.set(this.sortTable.sortBy(i,o,n||this.store.clientSyncPaths()))}onSyncPathContextMenu(i,o){i.preventDefault(),i.type==="contextmenu"&&i.stopPropagation(),this.onSelect(o),this.layout.openContextMenu(i,this.syncPathContextMenu)}onContextMenu(i){i.preventDefault(),i.stopPropagation(),this.layout.openContextMenu(i,this.mainContextMenu)}showErrors(i){this.router.navigate([$.BASE,$.TRANSFERS],{state:{id:i.id}}).catch(console.error)}checkRouteState(){let i=this.router.currentNavigation()?.extras.state;i?.id&&(this.focusOnPathId=i.id,this.focusOnPathSettings=i.withSettings)}};a.\u0275fac=function(o){return new(o||a)},a.\u0275cmp=R({type:a,selectors:[["app-sync-paths"]],viewQuery:function(o,n){if(o&1&&(M(K,7),M(q,7),M(pi,7),M(mi,7)),o&2){let m;L(m=A())&&(n.autoResize=m.first),L(m=A())&&(n.inputFilter=m.first),L(m=A())&&(n.syncPathContextMenu=m.first),L(m=A())&&(n.mainContextMenu=m.first)}},decls:72,vars:55,consts:[["SyncPathContextMenu",""],["SyncAllContextMenu",""],["SyncGoToContextMenu",""],["SyncSchedulerContextMenu",""],["MainContextMenu",""],[1,"app-top-menu"],["container","body","type","button",1,"d-none","d-sm-block","btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],[3,"icon"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"click","disabled","tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"tooltip"],["container","body","type","button",1,"btn","btn-sm","btn-secondary","me-1",3,"disabled","tooltip"],["container","body",3,"tooltip"],["dropdown","",1,"btn-group","btn-group-sm","me-1"],["dropdownToggle","","type","button"],["class","dropdown-menu","role","menu",4,"dropdownMenu"],["dropdown","",1,"btn-group","btn-group-sm","me-1",3,"isDisabled"],["dropdownToggle","","type","button",1,"btn","btn-sm","btn-secondary","dropdown-toggle"],[1,"d-none","d-sm-block","ms-auto"],[1,"app-table"],["appAutoResize","",3,"contextmenu","resizeOffset"],["tabindex","-1"],[3,"selected"],["contextMenuItem",""],["contextMenuItem","",3,"execute"],["contextMenuItem","",3,"divider"],["contextMenuItem","",3,"subMenu"],["role","menu",1,"dropdown-menu"],["role","menuitem"],[1,"dropdown-item",3,"click"],["l10nTranslate",""],["l10nTranslate","",3,"width","text-align-center","cursor-pointer","class"],["l10nTranslate","",3,"click"],[3,"click","contextmenu","dblclick"],[3,"width","text-align-center","class"],[1,"d-flex","align-items-center"],[3,"syncPath"],[3,"s"],[3,"class"],["alt","","draggable","false","height","35",3,"src"],[1,"d-flex","align-items-center","ms-auto"],[1,"badge","rounded-pill","bg-maroon"],["placement","right",1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"tooltip"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1"],[1,"m-0",3,"icon"],[1,"badge","rounded-pill","bg-danger","cursor-pointer","ms-1",3,"click"],[1,"me-1",3,"icon"]],template:function(o,n){if(o&1){let m=S();l(0,"div",5)(1,"button",6),y(2,"translate"),u("click",function(){return f(m),h(n.onRefresh())}),d(3,"fa-icon",7),c(),l(4,"button",8),y(5,"translate"),u("click",function(){return f(m),h(n.addToSync())}),d(6,"fa-icon",7),c(),l(7,"button",9),y(8,"translate"),u("click",function(){return f(m),h(n.openSettingsDialog())}),d(9,"fa-icon",7),c(),l(10,"button",9),y(11,"translate"),u("click",function(){return f(m),h(n.openReportDialog())}),d(12,"fa-icon",7),c(),C(13,di,3,5,"button",10)(14,ui,3,6,"button",11),C(15,fi,3,5,"button",10)(16,gi,6,5,"div",12),l(17,"div",12),y(18,"translate"),y(19,"translate"),l(20,"div",13)(21,"button",14),C(22,Ci,1,1,"fa-icon",7)(23,xi,1,1,"fa-icon",7),c(),v(24,yi,12,3,"ul",15),c()(),l(25,"div",12),y(26,"translate"),l(27,"div",16)(28,"button",17),d(29,"fa-icon",7),c(),v(30,Pi,11,2,"ul",15),c()(),d(31,"app-input-filter",18),c(),l(32,"table",19)(33,"thead")(34,"tr"),V(35,bi,1,1,null,null,bt),y(37,"keyvalue"),c()()(),l(38,"div",20),u("contextmenu",function(N){return f(m),h(n.onContextMenu(N))}),l(39,"table",19)(40,"tbody",21),V(41,zi,4,5,"tr",22,_i),y(43,"searchFilter"),c()()(),l(44,"context-menu",null,0),C(46,Hi,1,0,null,23)(47,Yi,1,0,null,23),v(48,Qi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.openReportDialog())}),v(49,ji,0,0,"ng-template",25)(50,qi,3,1,"ng-template",26)(51,Ki,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.openSettingsDialog())}),c(),l(52,"context-menu",null,1),v(54,Gi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.doAllSyncs(!0,!1))}),v(55,Wi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.doAllSyncs(!0))}),c(),l(56,"context-menu",null,2),v(58,Xi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.goToPath())}),v(59,Zi,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.goToPath(!1))}),c(),l(60,"context-menu",null,3),C(62,en,1,0,null,23),v(63,tn,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.setScheduler(n.CLIENT_SCHEDULER_STATE.SEQ))}),v(64,nn,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.setScheduler(n.CLIENT_SCHEDULER_STATE.ASYNC))}),c(),l(65,"context-menu",null,4),C(67,an,1,0,null,23)(68,rn,1,1,null,26),v(69,pn,4,1,"ng-template",26)(70,mn,0,0,"ng-template",25)(71,_n,3,1,"ng-template",24),u("execute",function(){return f(m),h(n.addToSync())}),c()}if(o&2){let m=D(57),g=D(61);s(),p("tooltip",T(2,28,"Refresh",n.locale.language)),s(2),p("icon",n.icons.faArrowRotateRight),s(),p("tooltip",T(5,31,"Add",n.locale.language)),s(2),p("icon",n.icons.faPlus),s(),p("disabled",!n.syncPathSelected)("tooltip",T(8,34,"Edit",n.locale.language)),s(2),p("icon",n.icons.faPencilAlt),s(),p("disabled",!n.syncPathSelected||!n.syncPathSelected.settings.enabled)("tooltip",T(11,37,"Simulate",n.locale.language)),s(2),p("icon",n.icons.faFlask),s(),x(n.syncPathSelected&&n.syncPathSelected.inSync?13:14),s(2),x(n.allSyncsRunning?15:16),s(2),p("tooltip",T(18,40,"Scheduler",n.locale.language)+": "+T(19,43,n.store.clientScheduler(),n.locale.language)),s(4),E(W("btn btn-sm ",n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?"btn-warning":"btn-success"," dropdown-toggle")),s(),x(n.store.clientScheduler()===n.CLIENT_SCHEDULER_STATE.DISABLED?22:23),s(3),p("tooltip",T(26,46,"Go to",n.locale.language)),s(2),p("isDisabled",!n.syncPathSelected),s(2),p("icon",n.icons.faMapMarkerAlt),s(6),F(T(37,49,n.tableHeaders,n.originalOrderKeyValue)),s(3),p("resizeOffset",105),s(3),F(T(43,52,n.store.clientSyncPaths(),n.inputFilter.search())),s(5),x(n.syncPathSelected&&n.syncPathSelected.inSync?46:47),s(3),p("divider",!0),s(),p("subMenu",m),s(12),x(n.store.clientScheduler()!==n.CLIENT_SCHEDULER_STATE.DISABLED?62:-1),s(5),x(n.allSyncsRunning?67:68),s(2),p("subMenu",g),s(),p("divider",!0)}},dependencies:[te,de,fe,ue,q,K,lt,rt,st,Ct,re,Q,vt,ee,me,ft,Z],encapsulation:2});let t=a;return t})();export{Oo as SyncPathsComponent};