@hostlink/light 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/light.js CHANGED
@@ -1,71 +1,71 @@
1
- import { jsonToGraphQLQuery as Q, VariableType as O } from "json-to-graphql-query";
2
- import L from "collect.js";
3
- import ot from "axios";
4
- function R(t) {
1
+ import { jsonToGraphQLQuery as I, VariableType as S } from "json-to-graphql-query";
2
+ import Q from "collect.js";
3
+ import gt from "axios";
4
+ function $(t) {
5
5
  if (t === null || typeof t != "object")
6
6
  return !1;
7
7
  const e = Object.getPrototypeOf(t);
8
8
  return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.iterator in t ? !1 : Symbol.toStringTag in t ? Object.prototype.toString.call(t) === "[object Module]" : !0;
9
9
  }
10
- function T(t, e, r = ".", s) {
11
- if (!R(e))
12
- return T(t, {}, r, s);
10
+ function W(t, e, r = ".", s) {
11
+ if (!$(e))
12
+ return W(t, {}, r, s);
13
13
  const n = Object.assign({}, e);
14
- for (const h in t) {
15
- if (h === "__proto__" || h === "constructor")
14
+ for (const c in t) {
15
+ if (c === "__proto__" || c === "constructor")
16
16
  continue;
17
- const l = t[h];
18
- l != null && (s && s(n, h, l, r) || (Array.isArray(l) && Array.isArray(n[h]) ? n[h] = [...l, ...n[h]] : R(l) && R(n[h]) ? n[h] = T(
17
+ const l = t[c];
18
+ l != null && (s && s(n, c, l, r) || (Array.isArray(l) && Array.isArray(n[c]) ? n[c] = [...l, ...n[c]] : $(l) && $(n[c]) ? n[c] = W(
19
19
  l,
20
- n[h],
21
- (r ? `${r}.` : "") + h.toString(),
20
+ n[c],
21
+ (r ? `${r}.` : "") + c.toString(),
22
22
  s
23
- ) : n[h] = l));
23
+ ) : n[c] = l));
24
24
  }
25
25
  return n;
26
26
  }
27
- function it(t) {
27
+ function dt(t) {
28
28
  return (...e) => (
29
29
  // eslint-disable-next-line unicorn/no-array-reduce
30
- e.reduce((r, s) => T(r, s, "", t), {})
30
+ e.reduce((r, s) => W(r, s, "", t), {})
31
31
  );
32
32
  }
33
- const U = it();
34
- let M = null;
35
- const at = (t) => {
36
- M = t;
37
- }, z = () => {
38
- if (!M)
33
+ const j = dt();
34
+ let q = null;
35
+ const _t = (t) => {
36
+ q = t;
37
+ }, K = () => {
38
+ if (!q)
39
39
  throw new Error("Api client not initialized. Call setApiClient() first.");
40
- return M;
41
- }, xt = () => M;
42
- function S(t) {
40
+ return q;
41
+ }, ce = () => q;
42
+ function N(t) {
43
43
  for (let e = 0; e < t.length; e++)
44
44
  if (t[e] instanceof File)
45
45
  return !0;
46
46
  return !1;
47
47
  }
48
- function W(t) {
48
+ function x(t) {
49
49
  for (let e in t)
50
- if (t[e] instanceof File || t[e] instanceof Array && S(t[e]))
50
+ if (t[e] instanceof File || t[e] instanceof Array && N(t[e]))
51
51
  return !0;
52
52
  return !1;
53
53
  }
54
- function lt(t) {
54
+ function yt(t) {
55
55
  t = "<~" + t + "~>";
56
- var e, r, s, n, h, l = String, f = 255;
57
- for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [], n = 0, h = t.length; h > n; n += 5) r = 52200625 * (t.charCodeAt(n) - 33) + 614125 * (t.charCodeAt(n + 1) - 33) + 7225 * (t.charCodeAt(n + 2) - 33) + 85 * (t.charCodeAt(n + 3) - 33) + (t.charCodeAt(n + 4) - 33), s.push(f & r >> 24, f & r >> 16, f & r >> 8, f & r);
56
+ var e, r, s, n, c, l = String, f = 255;
57
+ for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [], n = 0, c = t.length; c > n; n += 5) r = 52200625 * (t.charCodeAt(n) - 33) + 614125 * (t.charCodeAt(n + 1) - 33) + 7225 * (t.charCodeAt(n + 2) - 33) + 85 * (t.charCodeAt(n + 3) - 33) + (t.charCodeAt(n + 4) - 33), s.push(f & r >> 24, f & r >> 16, f & r >> 8, f & r);
58
58
  return (function(p, o) {
59
59
  for (var i = o; i > 0; i--) p.pop();
60
60
  })(s, e.length), l.fromCharCode.apply(l, s);
61
61
  }
62
- const H = (t = "") => {
62
+ const tt = (t = "") => {
63
63
  const e = t, r = (s = "application/octet-stream") => {
64
64
  const n = new Uint8Array(e.length);
65
65
  for (let f = 0; f < e.length; f++)
66
66
  n[f] = e.charCodeAt(f);
67
- const h = new Blob([n], { type: s });
68
- return URL.createObjectURL(h);
67
+ const c = new Blob([n], { type: s });
68
+ return URL.createObjectURL(c);
69
69
  };
70
70
  return {
71
71
  getContent: () => e,
@@ -78,43 +78,43 @@ const H = (t = "") => {
78
78
  window.open(r(s), "_blank");
79
79
  }
80
80
  };
81
- }, te = (t) => H(atob(t)), ee = (t) => H(lt(t));
82
- function X(t, e, r, s, n) {
81
+ }, ue = (t) => tt(atob(t)), he = (t) => tt(yt(t));
82
+ function et(t, e, r, s, n) {
83
83
  if (!(!t || typeof t != "object"))
84
- for (let h in t) {
85
- const l = t[h];
84
+ for (let c in t) {
85
+ const l = t[c];
86
86
  if (l && typeof l == "object") {
87
87
  if ("__args" in l) {
88
88
  const f = l.__args, p = {};
89
89
  Object.entries(f).forEach(([o, i]) => {
90
- if (i instanceof Array && S(i)) {
91
- p[o] = new O(o);
90
+ if (i instanceof Array && N(i)) {
91
+ p[o] = new S(o);
92
92
  let a = 0;
93
- i.forEach((c) => {
94
- c instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), c), n.current++, a++);
93
+ i.forEach((u) => {
94
+ u instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), u), n.current++, a++);
95
95
  }), e[o] = "[Upload!]!";
96
- } else i instanceof File ? (p[o] = new O(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && W(i) ? (p[o] = {}, Object.entries(i).forEach(([a, c]) => {
97
- if (c instanceof Array && S(c)) {
98
- p[o][a] = new O(a);
96
+ } else i instanceof File ? (p[o] = new S(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && x(i) ? (p[o] = {}, Object.entries(i).forEach(([a, u]) => {
97
+ if (u instanceof Array && N(u)) {
98
+ p[o][a] = new S(a);
99
99
  let m = 0;
100
- c.forEach((w) => {
101
- w instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), w), n.current++, m++);
100
+ u.forEach((d) => {
101
+ d instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), d), n.current++, m++);
102
102
  }), e[a] = "[Upload!]!";
103
- } else c instanceof File ? (p[o][a] = new O(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), c), e[a] = "Upload!", n.current++) : p[o][a] = c;
103
+ } else u instanceof File ? (p[o][a] = new S(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), u), e[a] = "Upload!", n.current++) : p[o][a] = u;
104
104
  })) : i != null && (p[o] = i);
105
105
  }), l.__args = p;
106
106
  }
107
- X(l, e, r, s, n);
107
+ et(l, e, r, s, n);
108
108
  }
109
109
  }
110
110
  }
111
- const Y = (t) => async (e) => {
111
+ const rt = (t) => async (e) => {
112
112
  const r = e, s = new FormData();
113
113
  let n = !1;
114
- const h = {}, l = {};
115
- X(r, h, l, s, { current: 0 }), n = Object.keys(h).length > 0, n && (r.__variables = h);
114
+ const c = {}, l = {};
115
+ et(r, c, l, s, { current: 0 }), n = Object.keys(c).length > 0, n && (r.__variables = c);
116
116
  let p = null;
117
- const i = Q({ query: r });
117
+ const i = I({ query: r });
118
118
  if (n ? (s.append("map", JSON.stringify(l)), s.append("operations", JSON.stringify({
119
119
  query: i
120
120
  })), p = await t.post("", s)) : p = await t.post("", {
@@ -122,9 +122,9 @@ const Y = (t) => async (e) => {
122
122
  }), p.data.errors)
123
123
  throw new Error(p.data.errors[0].message);
124
124
  return p.data.data;
125
- }, F = async (t) => Y(z().axios)(t);
126
- function v(t, e, r = F) {
127
- let s, n = [], h, l;
125
+ }, F = async (t) => rt(K().axios)(t);
126
+ function L(t, e, r = F) {
127
+ let s, n = [], c, l;
128
128
  const f = (o) => !o || typeof o != "object" ? !1 : Object.values(o).some((i) => i && typeof i == "object" && Object.keys(i).some((a) => a.startsWith("_"))), p = () => n.length === 0 ? (n.unshift({}), n[0]) : (f(n[0]) && n.unshift({}), n[0]);
129
129
  return {
130
130
  first() {
@@ -141,8 +141,8 @@ function v(t, e, r = F) {
141
141
  let i = await r(this.toQuery(!0));
142
142
  if (l) {
143
143
  const a = l.split(".");
144
- for (const c of a)
145
- i = i[c];
144
+ for (const u of a)
145
+ i = i[u];
146
146
  return i;
147
147
  }
148
148
  return i[`list${t}`];
@@ -151,8 +151,8 @@ function v(t, e, r = F) {
151
151
  let i = await r(this.toQuery());
152
152
  if (l) {
153
153
  const a = l.split(".");
154
- for (const c of a)
155
- i = i[c];
154
+ for (const u of a)
155
+ i = i[u];
156
156
  return i.data;
157
157
  }
158
158
  return i[`list${t}`].data;
@@ -161,7 +161,7 @@ function v(t, e, r = F) {
161
161
  return o && typeof o == "string" && (l = o), this;
162
162
  },
163
163
  sort(o) {
164
- return o && typeof o == "string" && (h = o), this;
164
+ return o && typeof o == "string" && (c = o), this;
165
165
  },
166
166
  filters(o) {
167
167
  return o && typeof o == "object" && (n = [o]), this;
@@ -170,8 +170,8 @@ function v(t, e, r = F) {
170
170
  // where('key', value) -> exact match
171
171
  // where('key', '>', value) -> operator-based (>, <, >=, <=, !=, in, contains)
172
172
  where(o, i, a) {
173
- const c = (m, w, u) => {
174
- const d = {
173
+ const u = (m, d, b) => {
174
+ const C = {
175
175
  ">": "_gt",
176
176
  "<": "_lt",
177
177
  ">=": "_gte",
@@ -179,14 +179,14 @@ function v(t, e, r = F) {
179
179
  "!=": "_ne",
180
180
  in: "_in",
181
181
  contains: "_contains"
182
- }[w];
183
- d && n.push({ [m]: { [d]: u } });
182
+ }[d];
183
+ C && n.push({ [m]: { [C]: b } });
184
184
  };
185
185
  if (a !== void 0)
186
- c(o, String(i), a);
186
+ u(o, String(i), a);
187
187
  else {
188
- const m = p(), w = U(m, { [o]: i });
189
- n[0] = w;
188
+ const m = p(), d = j(m, { [o]: i });
189
+ n[0] = d;
190
190
  }
191
191
  return this;
192
192
  },
@@ -194,8 +194,8 @@ function v(t, e, r = F) {
194
194
  // If the same field is used multiple times, it merges them into an array
195
195
  whereContains(o, i) {
196
196
  if (o && typeof o == "string") {
197
- const a = p(), c = { _contains: i };
198
- a[o] ? Array.isArray(a[o]) ? a[o].push(c) : a[o] = [a[o], c] : a[o] = [c], n[0] = a;
197
+ const a = p(), u = { _contains: i };
198
+ a[o] ? Array.isArray(a[o]) ? a[o].push(u) : a[o] = [a[o], u] : a[o] = [u], n[0] = a;
199
199
  }
200
200
  return this;
201
201
  },
@@ -204,59 +204,59 @@ function v(t, e, r = F) {
204
204
  // If the same field is used multiple times, it merges them into an array
205
205
  whereIn(o, i) {
206
206
  if (o && typeof o == "string" && Array.isArray(i)) {
207
- const a = p(), c = { _in: i };
208
- a[o] ? Array.isArray(a[o]) ? a[o].push(c) : a[o] = [a[o], c] : a[o] = [c], n[0] = a;
207
+ const a = p(), u = { _in: i };
208
+ a[o] ? Array.isArray(a[o]) ? a[o].push(u) : a[o] = [a[o], u] : a[o] = [u], n[0] = a;
209
209
  }
210
210
  return this;
211
211
  },
212
212
  // whereBetween adds a _between filter for a specific field
213
213
  whereBetween(o, i, a) {
214
214
  if (o && typeof o == "string") {
215
- const c = p(), m = { _between: [i, a] };
216
- c[o] ? Array.isArray(c[o]) ? c[o].push(m) : c[o] = [c[o], m] : c[o] = m, n[0] = c;
215
+ const u = p(), m = { _between: [i, a] };
216
+ u[o] ? Array.isArray(u[o]) ? u[o].push(m) : u[o] = [u[o], m] : u[o] = m, n[0] = u;
217
217
  }
218
218
  return this;
219
219
  },
220
220
  // limit sets paging/limit for the data selection
221
221
  limit(o) {
222
- return typeof o == "number" && Number.isFinite(o) && (s = U(s || {}, { limit: o })), this;
222
+ return typeof o == "number" && Number.isFinite(o) && (s = j(s || {}, { limit: o })), this;
223
223
  },
224
224
  // offset sets the starting index for the data selection
225
225
  offset(o) {
226
- return typeof o == "number" && Number.isFinite(o) && (s = U(s || {}, { offset: o })), this;
226
+ return typeof o == "number" && Number.isFinite(o) && (s = j(s || {}, { offset: o })), this;
227
227
  },
228
228
  toQuery(o = !1) {
229
229
  let i;
230
- const a = n.length > 0 && Object.keys(n[0] || {}).length > 0, c = a ? 1 : 0, m = n.length > c;
231
- a && m ? i = n : m ? i = n.slice(c) : a && (i = n[0]);
232
- const w = U(
233
- h ? { sort: h } : {},
230
+ const a = n.length > 0 && Object.keys(n[0] || {}).length > 0, u = a ? 1 : 0, m = n.length > u;
231
+ a && m ? i = n : m ? i = n.slice(u) : a && (i = n[0]);
232
+ const d = j(
233
+ c ? { sort: c } : {},
234
234
  i ? { filters: i } : {}
235
- ), u = {
235
+ ), b = {
236
236
  data: {
237
237
  ...e
238
238
  }
239
239
  };
240
- if (s && (u.data.__args = s), Object.keys(w).length > 0 && (u.__args = w), o && (u.meta = {
240
+ if (s && (b.data.__args = s), Object.keys(d).length > 0 && (b.__args = d), o && (b.meta = {
241
241
  total: !0,
242
242
  key: !0,
243
243
  name: !0
244
244
  }), l) {
245
- const _ = l.split(".");
246
- let d = u;
247
- for (let y = _.length - 1; y >= 0; y--)
248
- d = {
249
- [_[y]]: d
245
+ const O = l.split(".");
246
+ let C = b;
247
+ for (let P = O.length - 1; P >= 0; P--)
248
+ C = {
249
+ [O[P]]: C
250
250
  };
251
- return d;
251
+ return C;
252
252
  }
253
253
  return {
254
- [`list${t}`]: u
254
+ [`list${t}`]: b
255
255
  };
256
256
  }
257
257
  };
258
258
  }
259
- const ct = "list", ht = [
259
+ const wt = "list", bt = [
260
260
  "flatMap",
261
261
  "chunk",
262
262
  "shuffle",
@@ -282,7 +282,7 @@ const ct = "list", ht = [
282
282
  "slice",
283
283
  "tap",
284
284
  "sort"
285
- ], ut = [
285
+ ], mt = [
286
286
  "avg",
287
287
  "count",
288
288
  "countBy",
@@ -310,7 +310,7 @@ const ct = "list", ht = [
310
310
  "implode",
311
311
  "partition"
312
312
  ];
313
- class b {
313
+ class w {
314
314
  _batchData = null;
315
315
  data_path = "";
316
316
  filters;
@@ -327,7 +327,7 @@ class b {
327
327
  this.filters = {}, this.steps = [], this.fields = e;
328
328
  }
329
329
  }
330
- b.prototype.getQueryPayload = function() {
330
+ w.prototype.getQueryPayload = function() {
331
331
  let t = {
332
332
  meta: {
333
333
  total: !0,
@@ -341,26 +341,26 @@ b.prototype.getQueryPayload = function() {
341
341
  steps: this.steps
342
342
  };
343
343
  };
344
- b.prototype.dataPath = function(t) {
344
+ w.prototype.dataPath = function(t) {
345
345
  const e = this.clone();
346
346
  return e.data_path = t, e;
347
347
  };
348
- b.prototype.buildArgs = function() {
348
+ w.prototype.buildArgs = function() {
349
349
  let t = {};
350
350
  return Object.keys(this.filters).length > 0 && (t.filters = this.filters), this._sort && (t.sort = this._sort, this._sortDesc && (t.sort += ":desc")), t;
351
351
  };
352
- b.prototype.clone = function() {
352
+ w.prototype.clone = function() {
353
353
  const t = Object.create(this);
354
354
  return t.steps = JSON.parse(JSON.stringify(this.steps)), t.filters = JSON.parse(JSON.stringify(this.filters)), t.fields = JSON.parse(JSON.stringify(this.fields)), t;
355
355
  };
356
- L().macro("whereContains", function(t, e) {
356
+ Q().macro("whereContains", function(t, e) {
357
357
  return this.filter((r) => r[t].toLowerCase().includes(e.toLowerCase()));
358
358
  });
359
- b.prototype.fetchData = async function() {
359
+ w.prototype.fetchData = async function() {
360
360
  try {
361
361
  if (this._batchData) {
362
362
  const f = this._batchData;
363
- return this.meta = f.meta, L(f.data);
363
+ return this.meta = f.meta, Q(f.data);
364
364
  }
365
365
  let t = {
366
366
  meta: {
@@ -382,37 +382,37 @@ b.prototype.fetchData = async function() {
382
382
  let l = await (this._queryFn || F)(r);
383
383
  for (const f of e)
384
384
  l = l[f];
385
- return this.meta = l.meta, L(l.data);
385
+ return this.meta = l.meta, Q(l.data);
386
386
  } catch (t) {
387
387
  throw console.error("Error fetching collection data:", t), t;
388
388
  }
389
389
  };
390
- b.prototype.processData = async function() {
390
+ w.prototype.processData = async function() {
391
391
  let t = await this.fetchData();
392
392
  for (const e of this.steps)
393
393
  t = t[e.type](...e.args);
394
394
  return t;
395
395
  };
396
- b.prototype.all = async function() {
396
+ w.prototype.all = async function() {
397
397
  return (await this.processData()).all();
398
398
  };
399
- for (const t of ht)
400
- b.prototype[t] = function(...e) {
399
+ for (const t of bt)
400
+ w.prototype[t] = function(...e) {
401
401
  const r = this.clone();
402
402
  return r.steps.push({ type: t, args: e }), r;
403
403
  };
404
- for (const t of ut)
405
- b.prototype[t] = async function(...e) {
404
+ for (const t of mt)
405
+ w.prototype[t] = async function(...e) {
406
406
  return (await this.clone().processData())[t](...e);
407
407
  };
408
- b.prototype.average = b.prototype.avg;
409
- b.prototype.first = async function() {
408
+ w.prototype.average = w.prototype.avg;
409
+ w.prototype.first = async function() {
410
410
  return this.take(1), (await this.processData()).first();
411
411
  };
412
- b.prototype._handleBatchData = function(t, e) {
412
+ w.prototype._handleBatchData = function(t, e) {
413
413
  return this._batchData ? (this.steps.push({ type: t, args: e }), this) : null;
414
414
  };
415
- b.prototype.where = function(...t) {
415
+ w.prototype.where = function(...t) {
416
416
  const e = this._handleBatchData("where", t);
417
417
  if (e) return e;
418
418
  if (t.length === 2)
@@ -444,53 +444,53 @@ b.prototype.where = function(...t) {
444
444
  }
445
445
  return this;
446
446
  };
447
- b.prototype.whereContains = function(t, e) {
447
+ w.prototype.whereContains = function(t, e) {
448
448
  const r = this._handleBatchData("whereContains", [t, e]);
449
449
  return r || (this.filters[t] = { contains: e }, this);
450
450
  };
451
- b.prototype.forPage = function(t, e) {
451
+ w.prototype.forPage = function(t, e) {
452
452
  return t = Math.max(1, t), this.already_limit ? (this.steps.push({ type: "forPage", args: [t, e] }), this) : (this.limit = e, this.offset = (t - 1) * e, this.already_limit = !0, this.already_offset = !0, this);
453
453
  };
454
- b.prototype.whereIn = function(t, e) {
454
+ w.prototype.whereIn = function(t, e) {
455
455
  const r = this._handleBatchData("whereIn", [t, e]);
456
456
  return r || (this.filters[t] = { in: e }, this);
457
457
  };
458
- b.prototype.whereNotIn = function(t, e) {
458
+ w.prototype.whereNotIn = function(t, e) {
459
459
  const r = this._handleBatchData("whereNotIn", [t, e]);
460
460
  return r || (this.filters[t] = { nin: e }, this);
461
461
  };
462
- b.prototype.whereNotBetween = function(t, e) {
462
+ w.prototype.whereNotBetween = function(t, e) {
463
463
  const r = this._handleBatchData("whereNotBetween", [t, e]);
464
464
  return r || (this.filters[t] = { notBetween: e }, this);
465
465
  };
466
- b.prototype.whereBetween = function(t, e) {
466
+ w.prototype.whereBetween = function(t, e) {
467
467
  const r = this._handleBatchData("whereBetween", [t, e]);
468
468
  return r || (this.filters[t] = { between: e }, this);
469
469
  };
470
- b.prototype.sortBy = function(t) {
470
+ w.prototype.sortBy = function(t) {
471
471
  return this.steps.push({ type: "sortBy", args: [t] }), typeof t == "string" && (this._sort = t), this;
472
472
  };
473
- b.prototype.sortByDesc = function(t) {
473
+ w.prototype.sortByDesc = function(t) {
474
474
  return this.steps.push({ type: "sortByDesc", args: [t] }), typeof t == "string" && (this._sort = t, this._sortDesc = !0), this;
475
475
  };
476
- b.prototype.skip = function(t) {
476
+ w.prototype.skip = function(t) {
477
477
  if (t < 0)
478
478
  throw new Error("Offset must be non-negative");
479
479
  return this.already_offset && this.steps.push({ type: "skip", args: [t] }), this.offset = t, this.already_offset = !0, this;
480
480
  };
481
- b.prototype.take = function(t) {
481
+ w.prototype.take = function(t) {
482
482
  if (t < 0)
483
483
  throw new Error("Length must be non-negative");
484
484
  return this.already_limit ? (this.steps.push({ type: "take", args: [t] }), this) : (this.limit = t, this.already_limit = !0, this);
485
485
  };
486
- b.prototype.splice = function(t, e) {
486
+ w.prototype.splice = function(t, e) {
487
487
  return this.steps.push({ type: "splice", args: [t, e] }), this.offset = t, this.limit = e, this.already_limit = !0, this.already_offset = !0, this;
488
488
  };
489
- const Z = (t, e, r = F) => {
490
- const s = new b(e);
491
- return s._queryFn = r, s.data_path = ct + t, s;
492
- }, V = (t, e = {}, r = {}) => {
493
- const s = r.mutation || g, n = r.createList || v, h = r.createCollection || Z, l = e;
489
+ const st = (t, e, r = F) => {
490
+ const s = new w(e);
491
+ return s._queryFn = r, s.data_path = wt + t, s;
492
+ }, nt = (t, e = {}, r = {}) => {
493
+ const s = r.mutation || g, n = r.createList || L, c = r.createCollection || st, l = e;
494
494
  let f = "list" + t;
495
495
  const p = (o) => l[o] ? l[o] : null;
496
496
  return {
@@ -506,9 +506,9 @@ const Z = (t, e, r = F) => {
506
506
  let i = {};
507
507
  for (const a of o)
508
508
  if (typeof a == "string") {
509
- const c = p(a);
510
- c && (i = U(i, c.gqlField ? typeof c.gqlField == "string" ? { [c.gqlField]: !0 } : c.gqlField : { [c.name || a]: !0 }));
511
- } else typeof a == "object" && (i = U(i, a));
509
+ const u = p(a);
510
+ u && (i = j(i, u.gqlField ? typeof u.gqlField == "string" ? { [u.gqlField]: !0 } : u.gqlField : { [u.name || a]: !0 }));
511
+ } else typeof a == "object" && (i = j(i, a));
512
512
  return i;
513
513
  },
514
514
  update(o, i) {
@@ -535,59 +535,59 @@ const Z = (t, e, r = F) => {
535
535
  fields(o) {
536
536
  let i = [];
537
537
  for (let a of o) {
538
- const c = p(a);
539
- c && i.push(c);
538
+ const u = p(a);
539
+ u && i.push(u);
540
540
  }
541
541
  return i;
542
542
  },
543
543
  async get(o, i) {
544
- const a = h(t, Zt(i));
545
- for (const [c, m] of Object.entries(o))
546
- a.where(c, "==", m);
544
+ const a = c(t, ne(i));
545
+ for (const [u, m] of Object.entries(o))
546
+ a.where(u, "==", m);
547
547
  return await a.first();
548
548
  },
549
549
  list(o) {
550
550
  let i = o;
551
551
  const a = {};
552
- Object.entries(o).forEach(([w]) => {
553
- l[w] && (a[w] = l[w], l[w].gqlField && (delete i[w], i = U(i, l[w].gqlField)), l[w].gql && (delete i[w], i = U(i, l[w].gql)));
552
+ Object.entries(o).forEach(([d]) => {
553
+ l[d] && (a[d] = l[d], l[d].gqlField && (delete i[d], i = j(i, l[d].gqlField)), l[d].gql && (delete i[d], i = j(i, l[d].gql)));
554
554
  });
555
- const c = n(t, i).dataPath(f), m = c.fetch.bind(c);
555
+ const u = n(t, i).dataPath(f), m = u.fetch.bind(u);
556
556
  return {
557
- ...c,
557
+ ...u,
558
558
  async fetch() {
559
- return (await m()).map((u) => {
560
- const _ = { ...u };
561
- return Object.entries(a).forEach(([d, y]) => {
562
- y.field && typeof y.field == "function" && (_[d] = y.field(u[d], u));
563
- }), _;
559
+ return (await m()).map((b) => {
560
+ const O = { ...b };
561
+ return Object.entries(a).forEach(([C, P]) => {
562
+ P.field && typeof P.field == "function" && (O[C] = P.field(b[C], b));
563
+ }), O;
564
564
  });
565
565
  },
566
566
  async fetchFirst() {
567
- const u = await c.fetchFirst.bind(c)();
568
- if (!u) return u;
569
- const _ = { ...u };
570
- return Object.entries(a).forEach(([d, y]) => {
571
- y.field && typeof y.field == "function" && (_[d] = y.field(u[d], u));
572
- }), _;
567
+ const b = await u.fetchFirst.bind(u)();
568
+ if (!b) return b;
569
+ const O = { ...b };
570
+ return Object.entries(a).forEach(([C, P]) => {
571
+ P.field && typeof P.field == "function" && (O[C] = P.field(b[C], b));
572
+ }), O;
573
573
  }
574
574
  };
575
575
  }
576
576
  };
577
- }, D = {}, I = (t, e) => {
578
- const r = V(t, e);
579
- return D[t] = r, r;
580
- }, q = (t) => D[t] ? D[t] : I(t, {}), re = (t) => !!D[t], se = () => Object.keys(D), ne = () => {
581
- Object.keys(D).forEach((t) => delete D[t]);
582
- }, oe = (t) => {
577
+ }, E = {}, ot = (t, e) => {
578
+ const r = nt(t, e);
579
+ return E[t] = r, r;
580
+ }, z = (t) => E[t] ? E[t] : ot(t, {}), pe = (t) => !!E[t], fe = () => Object.keys(E), ge = () => {
581
+ Object.keys(E).forEach((t) => delete E[t]);
582
+ }, de = (t) => {
583
583
  Object.entries(t).forEach(([e, r]) => {
584
- I(e, r);
584
+ ot(e, r);
585
585
  });
586
- }, ie = () => F({
586
+ }, _e = () => F({
587
587
  app: {
588
588
  permissions: !0
589
589
  }
590
- }).then((t) => t.app.permissions), $ = (t, e) => {
590
+ }).then((t) => t.app.permissions), Y = (t, e) => {
591
591
  const r = async () => {
592
592
  const { app: l } = await t({
593
593
  app: {
@@ -626,20 +626,20 @@ const Z = (t, e, r = F) => {
626
626
  }
627
627
  }).then((f) => f.webAuthnRegister);
628
628
  } };
629
- }, N = $(F, g), pt = N.assertion, ft = N.attestation, gt = N.login, dt = N.register, _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
629
+ }, G = Y(F, g), Ft = G.assertion, At = G.attestation, kt = G.login, Ct = G.register, Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
630
630
  __proto__: null,
631
- assertion: pt,
632
- attestation: ft,
633
- createWebAuthn: $,
634
- login: gt,
635
- register: dt
636
- }, Symbol.toStringTag, { value: "Module" })), yt = (t, e) => ({
637
- getCurrentUser: (r = B) => t({ my: r }).then((s) => s.my),
638
- login: (r, s, n = "") => e({ login: { __args: { username: r, password: s, code: n } } }).then((h) => h.login),
631
+ assertion: Ft,
632
+ attestation: At,
633
+ createWebAuthn: Y,
634
+ login: kt,
635
+ register: Ct
636
+ }, Symbol.toStringTag, { value: "Module" })), Pt = (t, e) => ({
637
+ getCurrentUser: (r = J) => t({ my: r }).then((s) => s.my),
638
+ login: (r, s, n = "") => e({ login: { __args: { username: r, password: s, code: n } } }).then((c) => c.login),
639
639
  logout: () => e({ logout: !0 }).then((r) => r.logout),
640
- changeExpiredPassword: (r, s, n) => e({ changeExpiredPassword: { __args: { username: r, old_password: s, new_password: n } } }).then((h) => h.changeExpiredPassword),
640
+ changeExpiredPassword: (r, s, n) => e({ changeExpiredPassword: { __args: { username: r, old_password: s, new_password: n } } }).then((c) => c.changeExpiredPassword),
641
641
  updatePassword: (r, s) => e({ changeUserPassword: { __args: { old_password: r, new_password: s } } }).then((n) => n.changeUserPassword),
642
- resetPassword: (r, s, n) => e({ resetPassword: { __args: { jwt: r, password: s, code: n } } }).then((h) => h.resetPassword),
642
+ resetPassword: (r, s, n) => e({ resetPassword: { __args: { jwt: r, password: s, code: n } } }).then((c) => c.resetPassword),
643
643
  forgetPassword: (r, s) => e({ forgetPassword: { __args: { username: r, email: s } } }).then((n) => n.forgetPassword),
644
644
  verifyCode: (r, s) => e({ forgetPasswordVerifyCode: { __args: { jwt: r, code: s } } }).then((n) => n.forgetPasswordVerifyCode),
645
645
  grantedRights: (r) => t({
@@ -648,7 +648,7 @@ const Z = (t, e, r = F) => {
648
648
  isGranted: (r) => t({
649
649
  my: { granted: { __args: { right: r } } }
650
650
  }).then((s) => s.my.granted),
651
- webAuthn: $(t, e),
651
+ webAuthn: Y(t, e),
652
652
  google: {
653
653
  unlink: () => e({ lightAuthUnlinkGoogle: !0 }).then((r) => r.lightAuthUnlinkGoogle),
654
654
  login: (r) => e({ lightAuthLoginGoogle: { __args: { credential: r } } }).then((s) => s.lightAuthLoginGoogle),
@@ -664,7 +664,7 @@ const Z = (t, e, r = F) => {
664
664
  login: (r) => e({ lightAuthLoginMicrosoft: { __args: { access_token: r } } }).then((s) => s.lightAuthLoginMicrosoft),
665
665
  register: (r) => e({ lightAuthRegisterMicrosoft: { __args: { account_id: r } } }).then((s) => s.lightAuthRegisterMicrosoft)
666
666
  }
667
- }), wt = (t = B) => F({ my: t }).then((e) => e.my), bt = (t, e, r = "") => g({ login: { __args: { username: t, password: e, code: r } } }).then((s) => s.login), mt = () => g({ logout: !0 }).then((t) => t.logout), Ft = (t, e, r) => g({ changeExpiredPassword: { __args: { username: t, old_password: e, new_password: r } } }).then((s) => s.changeExpiredPassword), At = (t, e) => g({ changeUserPassword: { __args: { old_password: t, new_password: e } } }).then((r) => r.changeUserPassword), Ct = (t, e, r) => g({ resetPassword: { __args: { jwt: t, password: e, code: r } } }).then((s) => s.resetPassword), Ot = (t, e) => g({ forgetPassword: { __args: { username: t, email: e } } }).then((r) => r.forgetPassword), Ut = (t, e) => g({ forgetPasswordVerifyCode: { __args: { jwt: t, code: e } } }).then((r) => r.forgetPasswordVerifyCode), kt = (t) => F({
667
+ }), Ut = (t = J) => F({ my: t }).then((e) => e.my), Dt = (t, e, r = "") => g({ login: { __args: { username: t, password: e, code: r } } }).then((s) => s.login), St = () => g({ logout: !0 }).then((t) => t.logout), jt = (t, e, r) => g({ changeExpiredPassword: { __args: { username: t, old_password: e, new_password: r } } }).then((s) => s.changeExpiredPassword), vt = (t, e) => g({ changeUserPassword: { __args: { old_password: t, new_password: e } } }).then((r) => r.changeUserPassword), Et = (t, e, r) => g({ resetPassword: { __args: { jwt: t, password: e, code: r } } }).then((s) => s.resetPassword), Mt = (t, e) => g({ forgetPassword: { __args: { username: t, email: e } } }).then((r) => r.forgetPassword), Tt = (t, e) => g({ forgetPasswordVerifyCode: { __args: { jwt: t, code: e } } }).then((r) => r.forgetPasswordVerifyCode), Nt = (t) => F({
668
668
  my: {
669
669
  granted: {
670
670
  __args: {
@@ -672,7 +672,7 @@ const Z = (t, e, r = F) => {
672
672
  }
673
673
  }
674
674
  }
675
- }).then((e) => e.my.granted), Dt = (t) => F({
675
+ }).then((e) => e.my.granted), Rt = (t) => F({
676
676
  my: {
677
677
  grantedRights: {
678
678
  __args: {
@@ -680,9 +680,9 @@ const Z = (t, e, r = F) => {
680
680
  }
681
681
  }
682
682
  }
683
- }).then((e) => e.my.grantedRights), ae = {
684
- getCurrentUser: wt,
685
- webAuthn: _t,
683
+ }).then((e) => e.my.grantedRights), ye = {
684
+ getCurrentUser: Ut,
685
+ webAuthn: Ot,
686
686
  google: {
687
687
  unlink: () => g({ lightAuthUnlinkGoogle: !0 }).then((t) => t.lightAuthUnlinkGoogle),
688
688
  login: (t) => g({ lightAuthLoginGoogle: { __args: { credential: t } } }).then((e) => e.lightAuthLoginGoogle),
@@ -698,22 +698,22 @@ const Z = (t, e, r = F) => {
698
698
  login: (t) => g({ lightAuthLoginMicrosoft: { __args: { access_token: t } } }).then((e) => e.lightAuthLoginMicrosoft),
699
699
  register: (t) => g({ lightAuthRegisterMicrosoft: { __args: { account_id: t } } }).then((e) => e.lightAuthRegisterMicrosoft)
700
700
  },
701
- login: bt,
702
- logout: mt,
703
- changeExpiredPassword: Ft,
704
- updatePassword: At,
705
- resetPassword: Ct,
706
- forgetPassword: Ot,
707
- verifyCode: Ut,
708
- grantedRights: Dt,
709
- isGranted: kt
710
- }, K = {
701
+ login: Dt,
702
+ logout: St,
703
+ changeExpiredPassword: jt,
704
+ updatePassword: vt,
705
+ resetPassword: Et,
706
+ forgetPassword: Mt,
707
+ verifyCode: Tt,
708
+ grantedRights: Rt,
709
+ isGranted: Nt
710
+ }, it = {
711
711
  name: !0,
712
712
  path: !0,
713
713
  size: !0,
714
714
  mime: !0,
715
715
  url: !0
716
- }, le = (t, e, r = K) => F({
716
+ }, we = (t, e, r = it) => F({
717
717
  app: {
718
718
  drive: {
719
719
  __args: { index: t },
@@ -723,7 +723,7 @@ const Z = (t, e, r = F) => {
723
723
  }
724
724
  }
725
725
  }
726
- }).then((s) => s.app.drive.files), ce = (t, e) => F({
726
+ }).then((s) => s.app.drive.files), be = (t, e) => F({
727
727
  app: {
728
728
  drive: {
729
729
  __args: {
@@ -737,8 +737,8 @@ const Z = (t, e, r = F) => {
737
737
  }
738
738
  }
739
739
  }
740
- }).then((r) => r.app.drive?.file?.base64Content), Pt = (t, e = F, r = g) => ({
741
- list: (s, n = K) => e({ app: { drive: { __args: { index: t }, files: { __args: { path: s }, ...n } } } }).then((h) => h.app.drive.files),
740
+ }).then((r) => r.app.drive?.file?.base64Content), Bt = (t, e = F, r = g) => ({
741
+ list: (s, n = it) => e({ app: { drive: { __args: { index: t }, files: { __args: { path: s }, ...n } } } }).then((c) => c.app.drive.files),
742
742
  get: (s, n = {
743
743
  name: !0,
744
744
  path: !0,
@@ -759,7 +759,7 @@ const Z = (t, e, r = F) => {
759
759
  }
760
760
  }
761
761
  }
762
- }).then((h) => h.app.drive.file),
762
+ }).then((c) => c.app.drive.file),
763
763
  readFileAsBase64(s) {
764
764
  return e({ app: { drive: { __args: { index: t }, file: { __args: { path: s }, base64Content: !0 } } } }).then((n) => n.app.drive?.file?.base64Content);
765
765
  },
@@ -783,14 +783,14 @@ const Z = (t, e, r = F) => {
783
783
  throw new Error(`File not found or cannot read content: ${s}`);
784
784
  return typeof window < "u" && window.atob ? window.atob(n.app.drive.file.base64Content) : n.app.drive.file.base64Content;
785
785
  },
786
- write: (s, n) => r({ lightDriveWriteFile: { __args: { index: t, path: s, content: n } } }).then((h) => h.lightDriveWriteFile),
786
+ write: (s, n) => r({ lightDriveWriteFile: { __args: { index: t, path: s, content: n } } }).then((c) => c.lightDriveWriteFile),
787
787
  delete: (s) => r({ lightDriveDeleteFile: { __args: { index: t, path: s } } }).then((n) => n.lightDriveDeleteFile),
788
- rename: (s, n) => r({ lightDriveRenameFile: { __args: { index: t, path: s, name: n } } }).then((h) => h.lightDriveRenameFile),
789
- move: (s, n) => r({ lightDriveMoveFile: { __args: { index: t, source: s, destination: n } } }).then((h) => h.lightDriveMoveFile)
790
- }), x = {
788
+ rename: (s, n) => r({ lightDriveRenameFile: { __args: { index: t, path: s, name: n } } }).then((c) => c.lightDriveRenameFile),
789
+ move: (s, n) => r({ lightDriveMoveFile: { __args: { index: t, source: s, destination: n } } }).then((c) => c.lightDriveMoveFile)
790
+ }), at = {
791
791
  name: !0,
792
792
  path: !0
793
- }, he = (t, e, r = x) => F({
793
+ }, me = (t, e, r = at) => F({
794
794
  app: {
795
795
  drive: {
796
796
  __args: { index: t },
@@ -800,20 +800,20 @@ const Z = (t, e, r = F) => {
800
800
  }
801
801
  }
802
802
  }
803
- }).then((s) => s.app.drive.folders), St = (t, e = F, r = g) => ({
804
- list: (s, n = x) => e({ app: { drive: { __args: { index: t }, folders: { __args: { path: s }, ...n } } } }).then((h) => h.app.drive.folders),
803
+ }).then((s) => s.app.drive.folders), qt = (t, e = F, r = g) => ({
804
+ list: (s, n = at) => e({ app: { drive: { __args: { index: t }, folders: { __args: { path: s }, ...n } } } }).then((c) => c.app.drive.folders),
805
805
  create: (s) => r({ lightDriveCreateFolder: { __args: { index: t, path: s } } }).then((n) => n.lightDriveCreateFolder),
806
806
  delete: (s) => r({ lightDriveDeleteFolder: { __args: { index: t, path: s } } }).then((n) => n.lightDriveDeleteFolder),
807
- rename: (s, n) => r({ lightDriveRenameFolder: { __args: { index: t, path: s, name: n } } }).then((h) => h.lightDriveRenameFolder)
808
- }), ue = () => F({
807
+ rename: (s, n) => r({ lightDriveRenameFolder: { __args: { index: t, path: s, name: n } } }).then((c) => c.lightDriveRenameFolder)
808
+ }), Fe = () => F({
809
809
  app: {
810
810
  drives: {
811
811
  index: !0,
812
812
  name: !0
813
813
  }
814
814
  }
815
- }).then((t) => t.app.drives), pe = (t) => tt(F, g)(t), tt = (t, e) => (r) => {
816
- const s = Pt(r, t, e), n = St(r, t, e);
815
+ }).then((t) => t.app.drives), Ae = (t) => lt(F, g)(t), lt = (t, e) => (r) => {
816
+ const s = Bt(r, t, e), n = qt(r, t, e);
817
817
  return {
818
818
  folders: n,
819
819
  files: s,
@@ -828,9 +828,9 @@ const Z = (t, e, r = F) => {
828
828
  createFolder: n.create,
829
829
  deleteFolder: n.delete,
830
830
  renameFolder: n.rename,
831
- uploadTempFile: (h) => e({
831
+ uploadTempFile: (c) => e({
832
832
  lightDriveUploadTempFile: {
833
- __args: { index: r, file: h },
833
+ __args: { index: r, file: c },
834
834
  name: !0,
835
835
  path: !0,
836
836
  size: !0,
@@ -838,26 +838,26 @@ const Z = (t, e, r = F) => {
838
838
  }
839
839
  }).then((l) => l.lightDriveUploadTempFile)
840
840
  };
841
- }, B = {
841
+ }, J = {
842
842
  user_id: !0,
843
843
  username: !0,
844
844
  first_name: !0,
845
845
  last_name: !0,
846
846
  status: !0
847
- }, fe = (t) => g({
847
+ }, ke = (t) => g({
848
848
  addUser: {
849
849
  __args: t
850
850
  }
851
- }).then((e) => e.addUser), ge = (t) => g({
851
+ }).then((e) => e.addUser), Ce = (t) => g({
852
852
  deleteUser: {
853
853
  __args: { id: t }
854
854
  }
855
- }).then((e) => e.deleteUser), de = (t = B) => v("Users", t).dataPath("app.listUser").fetch(), _e = (t, e) => g({
855
+ }).then((e) => e.deleteUser), Oe = (t = J) => L("Users", t).dataPath("app.listUser").fetch(), Pe = (t, e) => g({
856
856
  updateUser: {
857
857
  __args: { id: t, data: e }
858
858
  }
859
- }).then((r) => r.updateUser), jt = (t, e) => ({
860
- list: (r = B) => e("Users", r).dataPath("app.listUser").fetch(),
859
+ }).then((r) => r.updateUser), Lt = (t, e) => ({
860
+ list: (r = J) => e("Users", r).dataPath("app.listUser").fetch(),
861
861
  create: (r) => t({
862
862
  addUser: { __args: r }
863
863
  }).then((s) => s.addUser),
@@ -867,7 +867,7 @@ const Z = (t, e, r = F) => {
867
867
  update: (r, s) => t({
868
868
  updateUser: { __args: { id: r, data: s } }
869
869
  }).then((n) => n.updateUser)
870
- }), et = (t) => (e) => t({
870
+ }), ct = (t) => (e) => t({
871
871
  app: {
872
872
  listConfig: {
873
873
  __args: {
@@ -881,13 +881,13 @@ const Z = (t, e, r = F) => {
881
881
  }
882
882
  }
883
883
  }
884
- }).then((r) => r.app.listConfig.data[0]?.value), ye = et(F), rt = {
884
+ }).then((r) => r.app.listConfig.data[0]?.value), Ue = ct(F), ut = {
885
885
  name: !0
886
- }, we = (t = rt) => F({
886
+ }, De = (t = ut) => F({
887
887
  app: {
888
888
  roles: t
889
889
  }
890
- }).then((e) => e.app.roles), be = (t, e) => g({
890
+ }).then((e) => e.app.roles), Se = (t, e) => g({
891
891
  addRole: {
892
892
  __args: {
893
893
  data: {
@@ -896,12 +896,12 @@ const Z = (t, e, r = F) => {
896
896
  }
897
897
  }
898
898
  }
899
- }).then((r) => r.addRole), me = (t) => g({
899
+ }).then((r) => r.addRole), je = (t) => g({
900
900
  deleteRole: {
901
901
  __args: { name: t }
902
902
  }
903
- }).then((e) => e.deleteRole), Et = (t, e) => ({
904
- list: (r = rt) => t({
903
+ }).then((e) => e.deleteRole), Gt = (t, e) => ({
904
+ list: (r = ut) => t({
905
905
  app: { roles: r }
906
906
  }).then((s) => s.app.roles),
907
907
  create: (r, s) => e({
@@ -911,54 +911,54 @@ const Z = (t, e, r = F) => {
911
911
  deleteRole: { __args: { name: r } }
912
912
  }).then((s) => s.deleteRole)
913
913
  });
914
- function G(t) {
914
+ function H(t) {
915
915
  if (Array.isArray(t))
916
- return t.map((e) => G(e)).filter((e) => e !== void 0);
916
+ return t.map((e) => H(e)).filter((e) => e !== void 0);
917
917
  if (t !== null && typeof t == "object") {
918
918
  const e = Object.getPrototypeOf(t);
919
919
  if (e === Object.prototype || e === null)
920
920
  return Object.fromEntries(
921
- Object.entries(t).filter(([, r]) => r !== void 0).map(([r, s]) => [r, G(s)])
921
+ Object.entries(t).filter(([, r]) => r !== void 0).map(([r, s]) => [r, H(s)])
922
922
  );
923
923
  }
924
924
  return t;
925
925
  }
926
- function st(t, e, r, s, n) {
926
+ function ht(t, e, r, s, n) {
927
927
  if (!(!t || typeof t != "object"))
928
- for (let h in t) {
929
- const l = t[h];
928
+ for (let c in t) {
929
+ const l = t[c];
930
930
  if (l && typeof l == "object") {
931
931
  if ("__args" in l) {
932
- const f = G(l.__args), p = {};
932
+ const f = H(l.__args), p = {};
933
933
  Object.entries(f).forEach(([o, i]) => {
934
- if (i instanceof Array && S(i)) {
935
- p[o] = new O(o);
934
+ if (i instanceof Array && N(i)) {
935
+ p[o] = new S(o);
936
936
  let a = 0;
937
- i.forEach((c) => {
938
- c instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), c), n.current++, a++);
937
+ i.forEach((u) => {
938
+ u instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), u), n.current++, a++);
939
939
  }), e[o] = "[Upload!]!";
940
- } else i instanceof File ? (p[o] = new O(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && W(i) ? (p[o] = {}, Object.entries(i).forEach(([a, c]) => {
941
- if (c instanceof Array && S(c)) {
942
- p[o][a] = new O(a);
940
+ } else i instanceof File ? (p[o] = new S(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && x(i) ? (p[o] = {}, Object.entries(i).forEach(([a, u]) => {
941
+ if (u instanceof Array && N(u)) {
942
+ p[o][a] = new S(a);
943
943
  let m = 0;
944
- c.forEach((w) => {
945
- w instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), w), n.current++, m++);
944
+ u.forEach((d) => {
945
+ d instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), d), n.current++, m++);
946
946
  }), e[a] = "[Upload!]!";
947
- } else c instanceof File ? (p[o][a] = new O(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), c), e[a] = "Upload!", n.current++) : p[o][a] = c;
947
+ } else u instanceof File ? (p[o][a] = new S(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), u), e[a] = "Upload!", n.current++) : p[o][a] = u;
948
948
  })) : i != null && (p[o] = i);
949
949
  }), l.__args = p;
950
950
  }
951
- st(l, e, r, s, n);
951
+ ht(l, e, r, s, n);
952
952
  }
953
953
  }
954
954
  }
955
- const nt = (t) => async (e) => {
955
+ const pt = (t) => async (e) => {
956
956
  const r = e, s = new FormData();
957
957
  let n = !1;
958
- const h = {}, l = {};
959
- st(r, h, l, s, { current: 0 }), n = Object.keys(h).length > 0, n && (r.__variables = h);
958
+ const c = {}, l = {};
959
+ ht(r, c, l, s, { current: 0 }), n = Object.keys(c).length > 0, n && (r.__variables = c);
960
960
  let p = null;
961
- const i = Q({ mutation: r });
961
+ const i = I({ mutation: r });
962
962
  if (n ? (s.append("map", JSON.stringify(l)), s.append("operations", JSON.stringify({
963
963
  query: i
964
964
  })), p = await t.post("", s)) : p = await t.post("", {
@@ -966,41 +966,41 @@ const nt = (t) => async (e) => {
966
966
  }), p.data.errors)
967
967
  throw new Error(p.data.errors[0].message);
968
968
  return p.data.data;
969
- }, g = async (t) => nt(z().axios)(t), Fe = (t, e, r) => g({ sendMail: { __args: { email: t, subject: e, message: r } } }).then((s) => s.sendMail), Mt = (t) => ({
969
+ }, g = async (t) => pt(K().axios)(t), ve = (t, e, r) => g({ sendMail: { __args: { email: t, subject: e, message: r } } }).then((s) => s.sendMail), Jt = (t) => ({
970
970
  send: (e, r, s) => t({ sendMail: { __args: { email: e, subject: r, message: s } } }).then((n) => n.sendMail)
971
- }), vt = (t) => g({
971
+ }), $t = (t) => g({
972
972
  lightFSCreateFolder: {
973
973
  __args: { location: t }
974
974
  }
975
- }).then((e) => e.lightFSCreateFolder), Nt = (t) => g({
975
+ }).then((e) => e.lightFSCreateFolder), zt = (t) => g({
976
976
  lightFSDeleteFolder: {
977
977
  __args: { location: t }
978
978
  }
979
- }).then((e) => e.lightFSDeleteFolder), Bt = (t, e) => g({
979
+ }).then((e) => e.lightFSDeleteFolder), Qt = (t, e) => g({
980
980
  lightFSRenameFolder: {
981
981
  __args: { location: t, newName: e }
982
982
  }
983
- }).then((r) => r.lightFSRenameFolder), Rt = (t, e) => g({
983
+ }).then((r) => r.lightFSRenameFolder), Wt = (t, e) => g({
984
984
  lightFSRenameFile: {
985
985
  __args: { location: t, newName: e }
986
986
  }
987
- }).then((r) => r.lightFSRenameFile), qt = (t, e) => g({
987
+ }).then((r) => r.lightFSRenameFile), Ht = (t, e) => g({
988
988
  lightFSWriteFile: {
989
989
  __args: { location: t, content: e }
990
990
  }
991
- }).then((r) => r.lightFSWriteFile), Lt = (t, e, r = !1) => g({
991
+ }).then((r) => r.lightFSWriteFile), Xt = (t, e, r = !1) => g({
992
992
  lightFSUploadFile: {
993
993
  __args: { location: t, file: e, rename: r }
994
994
  }
995
- }).then((s) => s.lightFSUploadFile), Tt = (t) => g({
995
+ }).then((s) => s.lightFSUploadFile), Yt = (t) => g({
996
996
  lightFSDeleteFile: {
997
997
  __args: { location: t }
998
998
  }
999
- }).then((e) => e.lightFSDeleteFile), Gt = (t, e) => g({
999
+ }).then((e) => e.lightFSDeleteFile), Zt = (t, e) => g({
1000
1000
  lightFSMove: {
1001
1001
  __args: { from: t, to: e }
1002
1002
  }
1003
- }).then((r) => r.lightFSMove), Jt = (t) => F({
1003
+ }).then((r) => r.lightFSMove), Vt = (t) => F({
1004
1004
  app: {
1005
1005
  fs: {
1006
1006
  exists: {
@@ -1008,7 +1008,7 @@ const nt = (t) => async (e) => {
1008
1008
  }
1009
1009
  }
1010
1010
  }
1011
- }).then((e) => e.app.fs.exists), $t = (t, e) => {
1011
+ }).then((e) => e.app.fs.exists), It = (t, e) => {
1012
1012
  const r = {};
1013
1013
  return t && (r.search = t), e && (r.label = e), F({
1014
1014
  app: {
@@ -1032,7 +1032,7 @@ const nt = (t) => async (e) => {
1032
1032
  }
1033
1033
  }
1034
1034
  }).then((s) => s.app.fs.find);
1035
- }, Qt = (t) => F({
1035
+ }, Kt = (t) => F({
1036
1036
  app: {
1037
1037
  fs: {
1038
1038
  node: {
@@ -1062,7 +1062,7 @@ const nt = (t) => async (e) => {
1062
1062
  }
1063
1063
  }
1064
1064
  }
1065
- }).then((r) => r.app.fs.node), zt = (t, e = "text") => F({
1065
+ }).then((r) => r.app.fs.node), xt = (t, e = "text") => F({
1066
1066
  app: {
1067
1067
  fs: {
1068
1068
  node: {
@@ -1079,7 +1079,7 @@ const nt = (t) => async (e) => {
1079
1079
  }).then((r) => {
1080
1080
  const s = r.app.fs.node;
1081
1081
  return s?.__typename === "File" ? e === "text" ? s.content : s.base64Content : null;
1082
- }), Wt = (t, e) => g({
1082
+ }), te = (t, e) => g({
1083
1083
  lightFSUploadBase64: {
1084
1084
  __args: { location: t, base64: e },
1085
1085
  __typename: !0,
@@ -1093,11 +1093,11 @@ const nt = (t) => async (e) => {
1093
1093
  lastModified: !0
1094
1094
  }]
1095
1095
  }
1096
- }).then((r) => r.lightFSUploadBase64), Ht = (t) => g({
1096
+ }).then((r) => r.lightFSUploadBase64), ee = (t) => g({
1097
1097
  lightFSDuplicateFile: {
1098
1098
  __args: { location: t }
1099
1099
  }
1100
- }).then((e) => e.lightFSDuplicateFile), Xt = (t, e) => g({
1100
+ }).then((e) => e.lightFSDuplicateFile), re = (t, e) => g({
1101
1101
  lightFSUploadTempFile: {
1102
1102
  __args: { location: t, file: e },
1103
1103
  name: !0,
@@ -1106,7 +1106,7 @@ const nt = (t) => async (e) => {
1106
1106
  size: !0,
1107
1107
  mimeType: !0
1108
1108
  }
1109
- }).then((r) => r.lightFSUploadTempFile), Yt = (t, e, r) => {
1109
+ }).then((r) => r.lightFSUploadTempFile), se = (t, e, r) => {
1110
1110
  const s = { location: t };
1111
1111
  return e && (s.type = e), r && (s.search = r), F({
1112
1112
  app: {
@@ -1124,28 +1124,28 @@ const nt = (t) => async (e) => {
1124
1124
  }
1125
1125
  }
1126
1126
  }).then((n) => n.app.fs.listFiles);
1127
- }, Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1127
+ }, Ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1128
1128
  __proto__: null,
1129
- createFolder: vt,
1130
- deleteFile: Tt,
1131
- deleteFolder: Nt,
1132
- duplicateFile: Ht,
1133
- exists: Jt,
1134
- find: $t,
1135
- list: Qt,
1136
- listFiles: Yt,
1137
- move: Gt,
1138
- readFile: zt,
1139
- renameFile: Rt,
1140
- renameFolder: Bt,
1141
- uploadBase64: Wt,
1142
- uploadFile: Lt,
1143
- uploadTempFile: Xt,
1144
- writeFile: qt
1145
- }, Symbol.toStringTag, { value: "Module" })), J = (t) => {
1129
+ createFolder: $t,
1130
+ deleteFile: Yt,
1131
+ deleteFolder: zt,
1132
+ duplicateFile: ee,
1133
+ exists: Vt,
1134
+ find: It,
1135
+ list: Kt,
1136
+ listFiles: se,
1137
+ move: Zt,
1138
+ readFile: xt,
1139
+ renameFile: Wt,
1140
+ renameFolder: Qt,
1141
+ uploadBase64: te,
1142
+ uploadFile: Xt,
1143
+ uploadTempFile: re,
1144
+ writeFile: Ht
1145
+ }, Symbol.toStringTag, { value: "Module" })), X = (t) => {
1146
1146
  let e = {};
1147
1147
  return typeof t == "string" ? (e[t] = !0, e) : t instanceof Array ? (t.forEach((r) => {
1148
- Object.entries(J(r)).forEach(([s, n]) => {
1148
+ Object.entries(X(r)).forEach(([s, n]) => {
1149
1149
  e[s] = n;
1150
1150
  });
1151
1151
  }), e) : (Object.entries(t).forEach(([r, s]) => {
@@ -1157,168 +1157,227 @@ const nt = (t) => async (e) => {
1157
1157
  e[r] = s;
1158
1158
  return;
1159
1159
  }
1160
- e[r] = J(s);
1160
+ e[r] = X(s);
1161
1161
  }), e);
1162
- }, Zt = (t) => J(t), Ce = (t) => {
1162
+ }, ne = (t) => X(t), Me = (t) => {
1163
1163
  const e = typeof window > "u";
1164
- let r = [];
1165
- const s = ot.create({
1164
+ let r = [], s = null, n = null, c = null, l = null;
1165
+ const f = /* @__PURE__ */ new Set(), p = gt.create({
1166
1166
  baseURL: t,
1167
1167
  withCredentials: !0
1168
+ }), o = async () => s && !oe(s) || !n ? s : (c ??= n().then((h) => (s = h, h)).finally(() => {
1169
+ c = null;
1170
+ }), c);
1171
+ p.interceptors.request.use(async (h) => {
1172
+ const _ = await o();
1173
+ return _ && (h.headers.Authorization = `Bearer ${_}`), h;
1168
1174
  });
1169
- let n = !1, h = [];
1170
- const l = (u, _ = null) => {
1171
- h.forEach((d) => {
1172
- u ? d.reject(u) : d.resolve(_);
1173
- }), h = [];
1175
+ let i = !1, a = [];
1176
+ const u = (h, _ = null) => {
1177
+ a.forEach((y) => {
1178
+ h ? y.reject(h) : y.resolve(_);
1179
+ }), a = [];
1174
1180
  };
1175
- s.interceptors.response.use(
1176
- (u) => {
1177
- const _ = u.data.errors;
1178
- if (_ && _.some((d) => d.extensions?.code === "TOKEN_EXPIRED")) {
1179
- const d = u.config;
1180
- return n ? new Promise((y, A) => {
1181
- h.push({ resolve: y, reject: A });
1182
- }).then(() => s(d)).catch((y) => Promise.reject(y)) : (n = !0, f().then(() => (n = !1, l(null), s(d))).catch((y) => (n = !1, l(y), Promise.reject(y))));
1181
+ p.interceptors.response.use(
1182
+ (h) => {
1183
+ const _ = h.data.errors;
1184
+ if (_ && _.some((y) => y.extensions?.code === "TOKEN_EXPIRED")) {
1185
+ const y = h.config;
1186
+ return y._lightTokenRetried ? h : (y._lightTokenRetried = !0, n && (s = null), i ? new Promise((A, k) => {
1187
+ a.push({ resolve: A, reject: k });
1188
+ }).then(() => p(y)).catch((A) => Promise.reject(A)) : (i = !0, m().then(() => (i = !1, u(null), p(y))).catch((A) => (i = !1, u(A), Promise.reject(A)))));
1183
1189
  }
1184
- return u;
1190
+ return h;
1185
1191
  },
1186
- (u) => Promise.reject(u)
1192
+ (h) => Promise.reject(h)
1187
1193
  );
1188
- function f() {
1189
- return s.post("/refresh_token");
1194
+ function m() {
1195
+ return n ? o().then(() => {
1196
+ }) : p.post("/refresh_token");
1190
1197
  }
1191
- e && (s.interceptors.request.use((u) => (u.withCredentials = !0, r.length > 0 && (u.headers.Cookie = r.join("; ")), u)), s.interceptors.response.use((u) => {
1192
- if (u.headers["set-cookie"]) {
1193
- const _ = u.headers["set-cookie"].map((y) => y.split(";")[0]), d = /* @__PURE__ */ new Map();
1194
- r.forEach((y) => {
1195
- const A = y.split("=")[0];
1196
- d.set(A, y);
1197
- }), _.forEach((y) => {
1198
- const A = y.split("=")[0];
1199
- d.set(A, y);
1200
- }), r = Array.from(d.values());
1198
+ e && (p.interceptors.request.use((h) => (h.withCredentials = !0, r.length > 0 && (h.headers.Cookie = r.join("; ")), h)), p.interceptors.response.use((h) => {
1199
+ if (h.headers["set-cookie"]) {
1200
+ const _ = h.headers["set-cookie"].map((A) => A.split(";")[0]), y = /* @__PURE__ */ new Map();
1201
+ r.forEach((A) => {
1202
+ const k = A.split("=")[0];
1203
+ y.set(k, A);
1204
+ }), _.forEach((A) => {
1205
+ const k = A.split("=")[0];
1206
+ y.set(k, A);
1207
+ }), r = Array.from(y.values());
1201
1208
  }
1202
- return u;
1209
+ return h;
1203
1210
  }));
1204
- const p = Y(s), o = nt(s), i = (u, _) => v(u, _, p), a = (u, _) => Z(u, _, p), c = (u) => {
1205
- const _ = q(u), d = V(u, _.$fields, {
1206
- mutation: o,
1207
- createList: i,
1208
- createCollection: a
1211
+ const d = rt(p), b = pt(p), O = (h, _) => L(h, _, d), C = (h, _) => st(h, _, d), P = (h) => {
1212
+ const _ = z(h), y = nt(h, _.$fields, {
1213
+ mutation: b,
1214
+ createList: O,
1215
+ createCollection: C
1209
1216
  });
1210
- return d.setDataPath(_.getDataPath()), d;
1211
- }, m = yt(p, o), w = {
1212
- post: s.post.bind(s),
1217
+ return y.setDataPath(_.getDataPath()), y;
1218
+ }, U = Pt(d, b), Z = () => f.forEach((h) => h()), T = (h) => (async (..._) => {
1219
+ const y = await h(..._);
1220
+ return Z(), y;
1221
+ }), ft = {
1222
+ ...U,
1223
+ login: T(U.login),
1224
+ logout: (async () => {
1225
+ try {
1226
+ return await U.logout();
1227
+ } finally {
1228
+ Z();
1229
+ }
1230
+ }),
1231
+ google: { ...U.google, login: T(U.google.login) },
1232
+ facebook: { ...U.facebook, login: T(U.facebook.login) },
1233
+ microsoft: { ...U.microsoft, login: T(U.microsoft.login) },
1234
+ webAuthn: { ...U.webAuthn, login: T(U.webAuthn.login) }
1235
+ }, V = {
1236
+ post: p.post.bind(p),
1213
1237
  baseURL: t,
1214
- axios: s,
1215
- auth: m,
1216
- mutation: o,
1217
- query: p,
1218
- config: et(p),
1219
- mail: Mt(o),
1220
- users: jt(o, i),
1221
- model(u) {
1222
- return c(u);
1238
+ axios: p,
1239
+ setAccessToken(h) {
1240
+ s = h;
1241
+ },
1242
+ getAccessToken() {
1243
+ return s;
1244
+ },
1245
+ clearAccessToken() {
1246
+ s = null;
1247
+ },
1248
+ setAccessTokenProvider(h) {
1249
+ l?.(), l = null, n = h, s = null, c = null;
1223
1250
  },
1224
- roles: Et(p, o),
1225
- collect: (u, _) => {
1226
- const d = a(u, _);
1227
- return d.data_path = q(u).getDataPath(), d;
1251
+ onAuthChange(h) {
1252
+ return f.add(h), () => f.delete(h);
1253
+ },
1254
+ useAudience(h, _) {
1255
+ l?.(), n = async () => (await h.mutation({
1256
+ createAudienceAccessToken: {
1257
+ __args: { audience: _ }
1258
+ }
1259
+ })).createAudienceAccessToken, s = null, c = null, l = h.onAuthChange(() => {
1260
+ s = null, c = null;
1261
+ });
1228
1262
  },
1229
- list: (u, _) => i(u, _).dataPath(q(u).getDataPath()),
1263
+ auth: ft,
1264
+ mutation: b,
1265
+ query: d,
1266
+ config: ct(d),
1267
+ mail: Jt(b),
1268
+ users: Lt(b, O),
1269
+ model(h) {
1270
+ return P(h);
1271
+ },
1272
+ roles: Gt(d, b),
1273
+ collect: (h, _) => {
1274
+ const y = C(h, _);
1275
+ return y.data_path = z(h).getDataPath(), y;
1276
+ },
1277
+ list: (h, _) => O(h, _).dataPath(z(h).getDataPath()),
1230
1278
  /**
1231
1279
  * @deprecated Use `fs.*` from `filesystem` instead.
1232
1280
  */
1233
- drive: tt(p, o),
1234
- async collects(u) {
1235
- const _ = {}, d = {};
1236
- for (const A in u) {
1237
- const k = u[A].getQueryPayload();
1238
- d[A] = k.data_path, _[A] = {};
1239
- const P = k.data_path.split(".");
1240
- let j = P[P.length - 1], C = _[A];
1241
- for (const E of P) {
1242
- if (E === j) {
1243
- C[E] = k.query;
1281
+ drive: lt(d, b),
1282
+ async collects(h) {
1283
+ const _ = {}, y = {};
1284
+ for (const k in h) {
1285
+ const v = h[k].getQueryPayload();
1286
+ y[k] = v.data_path, _[k] = {};
1287
+ const M = v.data_path.split(".");
1288
+ let R = M[M.length - 1], D = _[k];
1289
+ for (const B of M) {
1290
+ if (B === R) {
1291
+ D[B] = v.query;
1244
1292
  break;
1245
1293
  }
1246
- C[E] = C[E] || {};
1294
+ D[B] = D[B] || {};
1247
1295
  }
1248
- _[A].__aliasFor = P[0];
1296
+ _[k].__aliasFor = M[0];
1249
1297
  }
1250
- const y = await p(_);
1251
- for (const A in u) {
1252
- const k = d[A].split(".");
1253
- let P = k[k.length - 1], j = y[A];
1254
- for (const C of k) {
1255
- if (C === P) {
1256
- u[A]._batchData = y[A][C];
1298
+ const A = await d(_);
1299
+ for (const k in h) {
1300
+ const v = y[k].split(".");
1301
+ let M = v[v.length - 1], R = A[k];
1302
+ for (const D of v) {
1303
+ if (D === M) {
1304
+ h[k]._batchData = A[k][D];
1257
1305
  break;
1258
1306
  }
1259
- j[C] = j[C] || {};
1307
+ R[D] = R[D] || {};
1260
1308
  }
1261
1309
  }
1262
- return u;
1310
+ return h;
1263
1311
  }
1264
1312
  };
1265
- return at(w), w;
1266
- }, Oe = v;
1313
+ return _t(V), V;
1314
+ };
1315
+ function oe(t, e = 30) {
1316
+ try {
1317
+ const r = t.split(".")[1];
1318
+ if (!r) return !0;
1319
+ const s = r.replace(/-/g, "+").replace(/_/g, "/"), n = s.padEnd(Math.ceil(s.length / 4) * 4, "="), c = JSON.parse(globalThis.atob(n));
1320
+ return typeof c.exp == "number" ? c.exp <= Math.floor(Date.now() / 1e3) + e : !1;
1321
+ } catch {
1322
+ return !0;
1323
+ }
1324
+ }
1325
+ const Te = L;
1267
1326
  export {
1268
- S as arrayHasFile,
1269
- ae as auth,
1270
- Ft as changeExpiredPassword,
1271
- ne as clearModels,
1272
- yt as createAuth,
1273
- Ce as createClient,
1274
- Z as createCollection,
1275
- et as createConfig,
1276
- tt as createDrive,
1277
- te as createFileFromBase64,
1278
- ee as createFileFromBase85,
1279
- H as createFileFromString,
1280
- v as createList,
1281
- Mt as createMail,
1282
- be as createRole,
1283
- Et as createRoles,
1284
- fe as createUser,
1285
- jt as createUsers,
1286
- B as defaultUserFields,
1287
- I as defineModel,
1288
- oe as defineModels,
1289
- me as deleteRole,
1290
- ge as deleteUser,
1291
- Ot as forgetPassword,
1292
- Ae as fs,
1293
- z as getApiClient,
1294
- xt as getApiClientOptional,
1295
- ye as getConfig,
1296
- wt as getCurrentUser,
1297
- pe as getDrive,
1298
- Dt as getGrantedRights,
1299
- q as getModel,
1300
- re as hasModel,
1301
- kt as isGranted,
1302
- Oe as list,
1303
- ue as listDrives,
1304
- le as listFiles,
1305
- he as listFolders,
1306
- se as listModels,
1307
- ie as listPermissions,
1308
- we as listRoles,
1309
- de as listUsers,
1310
- bt as login,
1311
- mt as logout,
1327
+ N as arrayHasFile,
1328
+ ye as auth,
1329
+ jt as changeExpiredPassword,
1330
+ ge as clearModels,
1331
+ Pt as createAuth,
1332
+ Me as createClient,
1333
+ st as createCollection,
1334
+ ct as createConfig,
1335
+ lt as createDrive,
1336
+ ue as createFileFromBase64,
1337
+ he as createFileFromBase85,
1338
+ tt as createFileFromString,
1339
+ L as createList,
1340
+ Jt as createMail,
1341
+ Se as createRole,
1342
+ Gt as createRoles,
1343
+ ke as createUser,
1344
+ Lt as createUsers,
1345
+ J as defaultUserFields,
1346
+ ot as defineModel,
1347
+ de as defineModels,
1348
+ je as deleteRole,
1349
+ Ce as deleteUser,
1350
+ Mt as forgetPassword,
1351
+ Ee as fs,
1352
+ K as getApiClient,
1353
+ ce as getApiClientOptional,
1354
+ Ue as getConfig,
1355
+ Ut as getCurrentUser,
1356
+ Ae as getDrive,
1357
+ Rt as getGrantedRights,
1358
+ z as getModel,
1359
+ pe as hasModel,
1360
+ Nt as isGranted,
1361
+ Te as list,
1362
+ Fe as listDrives,
1363
+ we as listFiles,
1364
+ me as listFolders,
1365
+ fe as listModels,
1366
+ _e as listPermissions,
1367
+ De as listRoles,
1368
+ Oe as listUsers,
1369
+ Dt as login,
1370
+ St as logout,
1312
1371
  g as mutation,
1313
- W as objectHasFile,
1372
+ x as objectHasFile,
1314
1373
  F as query,
1315
- ce as readFileAsBase64,
1316
- Ct as resetPassword,
1317
- Fe as sendMail,
1318
- at as setApiClient,
1319
- Zt as toQuery,
1320
- At as updatePassword,
1321
- _e as updateUser,
1322
- Ut as verifyCode,
1323
- _t as webAuthn
1374
+ be as readFileAsBase64,
1375
+ Et as resetPassword,
1376
+ ve as sendMail,
1377
+ _t as setApiClient,
1378
+ ne as toQuery,
1379
+ vt as updatePassword,
1380
+ Pe as updateUser,
1381
+ Tt as verifyCode,
1382
+ Ot as webAuthn
1324
1383
  };