@hostlink/light 2.7.2 → 2.8.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,384 +1,194 @@
1
- var T = Object.defineProperty;
2
- var V = (t, e, r) => e in t ? T(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var C = (t, e, r) => V(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { jsonToGraphQLQuery as E, VariableType as S } from "json-to-graphql-query";
5
- import W from "axios";
6
- import N from "collect.js";
7
- function R(t) {
8
- const e = "==".slice(0, (4 - t.length % 4) % 4), r = t.replace(/-/g, "+").replace(/_/g, "/") + e, s = atob(r), n = new ArrayBuffer(s.length), i = new Uint8Array(n);
9
- for (let c = 0; c < s.length; c++)
10
- i[c] = s.charCodeAt(c);
11
- return n;
12
- }
13
- function J(t) {
14
- const e = new Uint8Array(t);
15
- let r = "";
16
- for (const i of e)
17
- r += String.fromCharCode(i);
18
- return btoa(r).replace(/\+/g, "-").replace(
19
- /\//g,
20
- "_"
21
- ).replace(/=/g, "");
22
- }
23
- var p = "copy", F = "convert";
24
- function v(t, e, r) {
25
- if (e === p)
26
- return r;
27
- if (e === F)
28
- return t(r);
29
- if (e instanceof Array)
30
- return r.map((s) => v(t, e[0], s));
31
- if (e instanceof Object) {
32
- const s = {};
33
- for (const [n, i] of Object.entries(e)) {
34
- if (i.derive) {
35
- const c = i.derive(r);
36
- c !== void 0 && (r[n] = c);
37
- }
38
- if (!(n in r)) {
39
- if (i.required)
40
- throw new Error(`Missing key: ${n}`);
41
- continue;
42
- }
43
- if (r[n] == null) {
44
- s[n] = null;
45
- continue;
46
- }
47
- s[n] = v(
48
- t,
49
- i.schema,
50
- r[n]
51
- );
52
- }
53
- return s;
54
- }
55
- }
56
- function q(t, e) {
57
- return {
58
- required: !0,
59
- schema: t,
60
- derive: e
61
- };
62
- }
63
- function h(t) {
64
- return {
65
- required: !0,
66
- schema: t
67
- };
68
- }
69
- function g(t) {
70
- return {
71
- required: !1,
72
- schema: t
73
- };
74
- }
75
- var B = {
76
- type: h(p),
77
- id: h(F),
78
- transports: g(p)
79
- }, j = {
80
- appid: g(p),
81
- appidExclude: g(p),
82
- credProps: g(p)
83
- }, U = {
84
- appid: g(p),
85
- appidExclude: g(p),
86
- credProps: g(p)
87
- }, K = {
88
- publicKey: h({
89
- rp: h(p),
90
- user: h({
91
- id: h(F),
92
- name: h(p),
93
- displayName: h(p)
94
- }),
95
- challenge: h(F),
96
- pubKeyCredParams: h(p),
97
- timeout: g(p),
98
- excludeCredentials: g([B]),
99
- authenticatorSelection: g(p),
100
- attestation: g(p),
101
- extensions: g(j)
102
- }),
103
- signal: g(p)
104
- }, M = {
105
- type: h(p),
106
- id: h(p),
107
- rawId: h(F),
108
- authenticatorAttachment: g(p),
109
- response: h({
110
- clientDataJSON: h(F),
111
- attestationObject: h(F),
112
- transports: q(
113
- p,
114
- (t) => {
115
- var e;
116
- return ((e = t.getTransports) == null ? void 0 : e.call(t)) || [];
117
- }
118
- )
119
- }),
120
- clientExtensionResults: q(
121
- U,
122
- (t) => t.getClientExtensionResults()
123
- )
124
- }, G = {
125
- mediation: g(p),
126
- publicKey: h({
127
- challenge: h(F),
128
- timeout: g(p),
129
- rpId: g(p),
130
- allowCredentials: g([B]),
131
- userVerification: g(p),
132
- extensions: g(j)
133
- }),
134
- signal: g(p)
135
- }, I = {
136
- type: h(p),
137
- id: h(p),
138
- rawId: h(F),
139
- authenticatorAttachment: g(p),
140
- response: h({
141
- clientDataJSON: h(F),
142
- authenticatorData: h(F),
143
- signature: h(F),
144
- userHandle: h(F)
145
- }),
146
- clientExtensionResults: q(
147
- U,
148
- (t) => t.getClientExtensionResults()
149
- )
150
- };
151
- function Q(t) {
152
- return v(R, K, t);
153
- }
154
- function z(t) {
155
- return v(
156
- J,
157
- M,
158
- t
159
- );
160
- }
161
- function $(t) {
162
- return v(R, G, t);
163
- }
164
- function H(t) {
165
- return v(
166
- J,
167
- I,
168
- t
169
- );
170
- }
171
- async function X(t) {
172
- const e = await navigator.credentials.create(
173
- t
174
- );
175
- return e.toJSON = () => z(e), e;
176
- }
177
- async function Y(t) {
178
- const e = await navigator.credentials.get(
179
- t
180
- );
181
- return e.toJSON = () => H(e), e;
182
- }
183
- const Z = (t) => ({
1
+ var N = Object.defineProperty;
2
+ var B = (t, e, r) => e in t ? N(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var m = (t, e, r) => B(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { jsonToGraphQLQuery as P, VariableType as F } from "json-to-graphql-query";
5
+ import R from "axios";
6
+ import D from "collect.js";
7
+ const E = (t) => ({
184
8
  login: async () => {
185
- const { app: e } = await m(t, {
9
+ const { app: e } = await w(t, {
186
10
  app: {
187
11
  auth: {
188
12
  webAuthnRequestOptions: !0
189
13
  }
190
14
  }
191
- }), r = e.auth.webAuthnRequestOptions, s = $({
192
- publicKey: r
193
- }), n = await Y(s);
194
- await u(t, "webAuthnAssertion", {
195
- assertion: n.toJSON()
15
+ }), r = e.auth.webAuthnRequestOptions, s = PublicKeyCredential.parseRequestOptionsFromJSON(r), i = await navigator.credentials.get({ publicKey: s });
16
+ await l(t, "webAuthnAssertion", {
17
+ assertion: i.toJSON()
196
18
  });
197
19
  },
198
20
  register: async () => {
199
- const { app: e } = await m(t, {
21
+ const { app: e } = await w(t, {
200
22
  app: {
201
23
  auth: {
202
24
  webAuthnCreationOptions: !0
203
25
  }
204
26
  }
205
- }), r = Q({
206
- publicKey: e.auth.webAuthnCreationOptions
207
- }), s = await X(r);
208
- await u(t, "webAuthnRegister", {
27
+ }), r = PublicKeyCredential.parseCreationOptionsFromJSON(e.auth.webAuthnCreationOptions), s = await navigator.credentials.create({ publicKey: r });
28
+ await l(t, "webAuthnRegister", {
209
29
  registration: s.toJSON()
210
30
  });
211
31
  }
212
- }), x = (t) => ({
213
- WebAuthn: Z(t),
32
+ }), j = (t) => ({
33
+ WebAuthn: E(t),
214
34
  google: {
215
- unlink: () => u(t, "lightAuthUnlinkGoogle"),
216
- login: (e) => u(t, "lightAuthLoginGoogle", {
35
+ unlink: () => l(t, "lightAuthUnlinkGoogle"),
36
+ login: (e) => l(t, "lightAuthLoginGoogle", {
217
37
  credential: e
218
38
  }),
219
- register: (e) => u(t, "lightAuthRegisterGoogle", {
39
+ register: (e) => l(t, "lightAuthRegisterGoogle", {
220
40
  credential: e
221
41
  })
222
42
  },
223
43
  facebook: {
224
- unlink: () => u(t, "lightAuthUnlinkFacebook"),
225
- login: (e) => u(t, "lightAuthLoginFacebook", {
44
+ unlink: () => l(t, "lightAuthUnlinkFacebook"),
45
+ login: (e) => l(t, "lightAuthLoginFacebook", {
226
46
  access_token: e
227
47
  }),
228
- register: (e) => u(t, "lightAuthRegisterFacebook", {
48
+ register: (e) => l(t, "lightAuthRegisterFacebook", {
229
49
  access_token: e
230
50
  })
231
51
  },
232
52
  microsoft: {
233
- unlink: () => u(t, "lightAuthUnlinkMicrosoft"),
234
- login: (e) => u(t, "lightAuthLoginMicrosoft", {
53
+ unlink: () => l(t, "lightAuthUnlinkMicrosoft"),
54
+ login: (e) => l(t, "lightAuthLoginMicrosoft", {
235
55
  access_token: e
236
56
  }),
237
- register: (e) => u(t, "lightAuthRegisterMicrosoft", {
57
+ register: (e) => l(t, "lightAuthRegisterMicrosoft", {
238
58
  account_id: e
239
59
  })
240
60
  },
241
- login: (e, r, s = "") => u(t, "login", {
61
+ login: (e, r, s = "") => l(t, "login", {
242
62
  username: e,
243
63
  password: r,
244
64
  code: s
245
65
  }),
246
- logout: () => u(t, "logout"),
247
- changeExpiredPassword: (e, r, s) => u(t, "changeExpiredPassword", {
66
+ logout: () => l(t, "logout"),
67
+ changeExpiredPassword: (e, r, s) => l(t, "changeExpiredPassword", {
248
68
  username: e,
249
69
  old_password: r,
250
70
  new_password: s
251
71
  }),
252
- updatePassword: (e, r) => u(t, "changeUserPassword", {
72
+ updatePassword: (e, r) => l(t, "changeUserPassword", {
253
73
  old_password: e,
254
74
  new_password: r
255
75
  }),
256
- resetPassword: (e, r, s) => u(t, "resetPassword", {
76
+ resetPassword: (e, r, s) => l(t, "resetPassword", {
257
77
  jwt: e,
258
78
  password: r,
259
79
  code: s
260
80
  }),
261
- forgetPassword: (e, r) => u(t, "forgetPassword", {
81
+ forgetPassword: (e, r) => l(t, "forgetPassword", {
262
82
  username: e,
263
83
  email: r
264
84
  }),
265
85
  verifyCode(e, r) {
266
- return u(t, "forgetPasswordVerifyCode", {
86
+ return l(t, "forgetPasswordVerifyCode", {
267
87
  jwt: e,
268
88
  code: r
269
89
  });
270
90
  },
271
- granted: async (e) => (await m(t, {
272
- granted: {
273
- __args: {
274
- rights: e
91
+ granted: async (e) => {
92
+ const { my: r } = await w(t, {
93
+ my: {
94
+ grantedRights: {
95
+ __args: {
96
+ rights: e
97
+ }
98
+ }
275
99
  }
276
- }
277
- })).granted
278
- }), tt = (t, e, r) => {
279
- const s = e, n = t, i = r;
280
- let c = "list" + e;
281
- const o = (a) => i[a] ? i[a]() : null;
100
+ });
101
+ return r.grantedRights;
102
+ }
103
+ }), S = (t, e, r) => {
104
+ const s = e, i = t, g = r;
105
+ let h = "list" + e;
106
+ const n = (a) => g[a] ? g[a]() : null;
282
107
  return {
283
- field: o,
284
- $fields: i,
108
+ field: n,
109
+ $fields: g,
285
110
  setDataPath(a) {
286
- return c = a, c;
111
+ return h = a, h;
287
112
  },
288
113
  getDataPath() {
289
- return c;
114
+ return h;
290
115
  },
291
116
  gqlFields(a) {
292
- const l = [];
293
- for (const f of a)
294
- if (typeof f == "string") {
295
- const _ = o(f);
296
- _ && l.push(_.getGQLField());
297
- } else typeof f == "object" && l.push(f);
298
- return l;
117
+ const o = [];
118
+ for (const c of a)
119
+ if (typeof c == "string") {
120
+ const u = n(c);
121
+ u && o.push(u.getGQLField());
122
+ } else typeof c == "object" && o.push(c);
123
+ return o;
299
124
  },
300
- async update(a, l) {
301
- return await u(n, "update" + s, { id: a, data: l });
125
+ async update(a, o) {
126
+ return await l(i, "update" + s, { id: a, data: o });
302
127
  },
303
128
  async delete(a) {
304
- return await u(n, "delete" + s, { id: a });
129
+ return await l(i, "delete" + s, { id: a });
305
130
  },
306
131
  async add(a) {
307
- return await u(n, "add" + s, { data: a });
132
+ return await l(i, "add" + s, { data: a });
308
133
  },
309
134
  fields(a) {
310
- let l = [];
311
- for (let f of a) {
312
- const _ = o(f);
313
- _ && l.push(_);
135
+ let o = [];
136
+ for (let c of a) {
137
+ const u = n(c);
138
+ u && o.push(u);
314
139
  }
315
- return l;
140
+ return o;
316
141
  },
317
- async get(a, l) {
318
- return (await m(n, {
319
- ["list" + s]: {
320
- __args: {
321
- filters: a
322
- },
323
- data: {
324
- __args: {
325
- limit: 1
326
- },
327
- ...O(l)
328
- }
329
- }
330
- }))["list" + s].data[0];
142
+ async get(a, o) {
143
+ const c = (await Promise.resolve().then(() => A)).default, u = c(s, i, C(o));
144
+ for (const [p, d] of Object.entries(a))
145
+ u.where(p, "==", d);
146
+ return await u.first();
331
147
  },
332
- async list(a, l) {
333
- return (await m(n, {
334
- ["list" + s]: {
335
- __args: {
336
- filters: a
337
- },
338
- data: {
339
- ...O(l)
340
- }
341
- }
342
- }))["list" + s].data;
148
+ async list(a, o) {
149
+ const c = (await Promise.resolve().then(() => A)).default, u = c(s, i, C(o));
150
+ for (const [p, d] of Object.entries(a))
151
+ u.where(p, "==", d);
152
+ return await u.all();
343
153
  }
344
154
  };
345
155
  };
346
- function et(t) {
156
+ function q(t) {
347
157
  t = "<~" + t + "~>";
348
- var e, r, s, n, i, c = String, o = 255;
349
- 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, i = t.length; i > 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(o & r >> 24, o & r >> 16, o & r >> 8, o & r);
350
- return function(a, l) {
351
- for (var f = l; f > 0; f--) a.pop();
352
- }(s, e.length), c.fromCharCode.apply(c, s);
158
+ var e, r, s, i, g, h = String, n = 255;
159
+ 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 = [], i = 0, g = t.length; g > i; i += 5) r = 52200625 * (t.charCodeAt(i) - 33) + 614125 * (t.charCodeAt(i + 1) - 33) + 7225 * (t.charCodeAt(i + 2) - 33) + 85 * (t.charCodeAt(i + 3) - 33) + (t.charCodeAt(i + 4) - 33), s.push(n & r >> 24, n & r >> 16, n & r >> 8, n & r);
160
+ return function(a, o) {
161
+ for (var c = o; c > 0; c--) a.pop();
162
+ }(s, e.length), h.fromCharCode.apply(h, s);
353
163
  }
354
164
  const k = (t = "") => {
355
165
  const e = t, r = (s = "application/octet-stream") => {
356
- const n = new Uint8Array(e.length);
357
- for (let o = 0; o < e.length; o++)
358
- n[o] = e.charCodeAt(o);
359
- const i = new Blob([n], { type: s });
360
- return URL.createObjectURL(i);
166
+ const i = new Uint8Array(e.length);
167
+ for (let n = 0; n < e.length; n++)
168
+ i[n] = e.charCodeAt(n);
169
+ const g = new Blob([i], { type: s });
170
+ return URL.createObjectURL(g);
361
171
  };
362
172
  return {
363
173
  getContent: () => e,
364
174
  getURL: r,
365
175
  download: (s) => {
366
- const n = document.createElement("a");
367
- n.download = s, n.href = r(), document.body.appendChild(n), n.click(), document.body.removeChild(n);
176
+ const i = document.createElement("a");
177
+ i.download = s, i.href = r(), document.body.appendChild(i), i.click(), document.body.removeChild(i);
368
178
  },
369
179
  open: (s) => {
370
180
  window.open(r(s), "_blank");
371
181
  }
372
182
  };
373
- }, _t = {
374
- fromBase85: (t) => k(et(t)),
183
+ }, Z = {
184
+ fromBase85: (t) => k(q(t)),
375
185
  fromBase64: (t) => k(atob(t)),
376
186
  fromString: (t) => k(t)
377
- }, P = (t) => {
187
+ }, v = (t) => {
378
188
  let e = {};
379
189
  return typeof t == "string" ? (e[t] = !0, e) : t instanceof Array ? (t.forEach((r) => {
380
- Object.entries(P(r)).forEach(([s, n]) => {
381
- e[s] = n;
190
+ Object.entries(v(r)).forEach(([s, i]) => {
191
+ e[s] = i;
382
192
  });
383
193
  }), e) : (Object.entries(t).forEach(([r, s]) => {
384
194
  if (r == "__args" || r == "__aliasFor" || r == "__variables" || r == "__directives" || r == "__all_on" || r == "__name") {
@@ -389,10 +199,10 @@ const k = (t = "") => {
389
199
  e[r] = s;
390
200
  return;
391
201
  }
392
- e[r] = P(s);
202
+ e[r] = v(s);
393
203
  }), e);
394
- }, O = (t) => P(t), m = async (t, e) => {
395
- let r = E(O(e));
204
+ }, C = (t) => v(t), w = async (t, e) => {
205
+ let r = P(C(e));
396
206
  const s = await t.post("", {
397
207
  query: `{ ${r} }`
398
208
  });
@@ -400,53 +210,53 @@ const k = (t = "") => {
400
210
  throw new Error(s.data.errors[0].message);
401
211
  return s.data.data;
402
212
  };
403
- function rt(t) {
213
+ function U(t) {
404
214
  for (let e = 0; e < t.length; e++)
405
215
  if (t[e] instanceof File)
406
216
  return !0;
407
217
  return !1;
408
218
  }
409
- function st(t) {
219
+ function L(t) {
410
220
  for (let e in t)
411
221
  if (t[e] instanceof File)
412
222
  return !0;
413
223
  return !1;
414
224
  }
415
- const u = async (t, e, r = null, s = []) => {
416
- let n = {
225
+ const l = async (t, e, r = null, s = []) => {
226
+ let i = {
417
227
  [e]: {}
418
228
  };
419
- const i = new FormData();
420
- let c = !1;
229
+ const g = new FormData();
230
+ let h = !1;
421
231
  if (r) {
422
- const l = {}, f = {}, _ = {};
423
- let b = 0;
424
- Object.entries(r).forEach(([y, w]) => {
425
- if (w instanceof Array && rt(w)) {
426
- c = !0;
427
- let D = 0;
428
- w.forEach((A) => {
429
- A instanceof File && (l[y] = new S(y), f[b] = ["variables." + y + "." + D], i.append(b.toString(), A), b++);
430
- }), _[y] = "[Upload!]!";
431
- } else w instanceof File ? (c = !0, l[y] = new S(y), f[b] = ["variables." + y], i.append(b.toString(), w), _[y] = "Upload!", b++) : w instanceof Object && st(w) ? (c = !0, l[y] = {}, Object.entries(w).forEach(([D, A]) => {
432
- A instanceof File ? (l[y][D] = new S(D), f[b] = ["variables." + D], i.append(b.toString(), A), _[D] = "Upload!", b++) : l[y][D] = A;
433
- })) : w !== void 0 && (l[y] = w);
434
- }), n[e].__args = l, n.__variables = _, c && i.append("map", JSON.stringify(f));
232
+ const o = {}, c = {}, u = {};
233
+ let p = 0;
234
+ Object.entries(r).forEach(([d, y]) => {
235
+ if (y instanceof Array && U(y)) {
236
+ h = !0;
237
+ let _ = 0;
238
+ y.forEach((b) => {
239
+ b instanceof File && (o[d] = new F(d), c[p] = ["variables." + d + "." + _], g.append(p.toString(), b), p++);
240
+ }), u[d] = "[Upload!]!";
241
+ } else y instanceof File ? (h = !0, o[d] = new F(d), c[p] = ["variables." + d], g.append(p.toString(), y), u[d] = "Upload!", p++) : y instanceof Object && L(y) ? (h = !0, o[d] = {}, Object.entries(y).forEach(([_, b]) => {
242
+ b instanceof File ? (o[d][_] = new F(_), c[p] = ["variables." + _], g.append(p.toString(), b), u[_] = "Upload!", p++) : o[d][_] = b;
243
+ })) : y !== void 0 && (o[d] = y);
244
+ }), i[e].__args = o, i.__variables = u, h && g.append("map", JSON.stringify(c));
435
245
  }
436
- Object.entries(O(s)).forEach(([l, f]) => {
437
- n[e][l] = f;
438
- }), Object.entries(n[e]).length === 0 && (n[e] = !0);
439
- let o = null;
440
- const a = E({ mutation: n });
441
- if (c ? (i.append("operations", JSON.stringify({
246
+ Object.entries(C(s)).forEach(([o, c]) => {
247
+ i[e][o] = c;
248
+ }), Object.entries(i[e]).length === 0 && (i[e] = !0);
249
+ let n = null;
250
+ const a = P({ mutation: i });
251
+ if (h ? (g.append("operations", JSON.stringify({
442
252
  query: a
443
- })), o = await t.post("", i)) : o = await t.post("", {
253
+ })), n = await t.post("", g)) : n = await t.post("", {
444
254
  query: a
445
- }), o.data.errors)
446
- throw new Error(o.data.errors[0].message);
447
- return o.data.data[e];
448
- }, nt = (t) => ({
449
- uploadTempFile: (e) => u(t, "fsUploadTempFile", {
255
+ }), n.data.errors)
256
+ throw new Error(n.data.errors[0].message);
257
+ return n.data.data[e];
258
+ }, J = (t) => ({
259
+ uploadTempFile: (e) => l(t, "fsUploadTempFile", {
450
260
  file: e
451
261
  }, {
452
262
  name: !0,
@@ -455,7 +265,7 @@ const u = async (t, e, r = null, s = []) => {
455
265
  mime: !0
456
266
  }),
457
267
  folders: {
458
- list: async (e) => (await m(t, {
268
+ list: async (e) => (await w(t, {
459
269
  fsListFolders: {
460
270
  __args: {
461
271
  path: e
@@ -464,44 +274,55 @@ const u = async (t, e, r = null, s = []) => {
464
274
  path: !0
465
275
  }
466
276
  })).fsListFolders,
467
- create: (e) => u(t, "fsCreateFolder", { path: e }),
468
- delete: (e) => u(t, "fsDeleteFolder", { path: e }),
469
- rename: (e, r) => u(t, "fsRenameFolder", { path: e, name: r })
277
+ create: (e) => l(t, "fsCreateFolder", { path: e }),
278
+ delete: (e) => l(t, "fsDeleteFolder", { path: e }),
279
+ rename: (e, r) => l(t, "fsRenameFolder", { path: e, name: r })
470
280
  },
471
281
  files: {
472
- list: async (e) => (await m(t, {
473
- fsListFiles: {
474
- __args: {
475
- path: e
476
- },
477
- name: !0,
478
- path: !0,
479
- size: !0,
480
- mime: !0,
481
- canPreview: !0,
482
- imagePath: !0
483
- }
484
- })).fsListFiles,
282
+ list: async (e) => {
283
+ let { app: r } = await w(t, {
284
+ app: {
285
+ drive: {
286
+ files: {
287
+ __args: {
288
+ path: e
289
+ },
290
+ name: !0,
291
+ path: !0,
292
+ size: !0,
293
+ mime: !0,
294
+ canPreview: !0,
295
+ imagePath: !0
296
+ }
297
+ }
298
+ }
299
+ });
300
+ return r.drive.files;
301
+ },
485
302
  read: async (e) => {
486
- let r = await m(t, {
487
- fsFile: {
488
- __args: {
489
- path: e
490
- },
491
- base64Content: !0
303
+ let { app: r } = await w(t, {
304
+ app: {
305
+ drive: {
306
+ files: {
307
+ __args: {
308
+ path: e
309
+ },
310
+ base64Content: !0
311
+ }
312
+ }
492
313
  }
493
314
  });
494
- return window.atob(r.fsFile.base64Content);
315
+ return window.atob(r.drive.files[0].base64Content);
495
316
  },
496
- write: (e, r) => u(t, "fsWriteFile", {
317
+ write: (e, r) => l(t, "fsWriteFile", {
497
318
  path: e,
498
319
  content: r
499
320
  }),
500
- delete: (e) => u(t, "fsDeleteFile", { path: e }),
501
- rename: (e, r) => u(t, "fsRenameFile", { path: e, name: r }),
502
- move: (e, r) => u(t, "fsMoveFile", { source: e, target: r })
321
+ delete: (e) => l(t, "fsDeleteFile", { path: e }),
322
+ rename: (e, r) => l(t, "fsRenameFile", { path: e, name: r }),
323
+ move: (e, r) => l(t, "fsMoveFile", { source: e, target: r })
503
324
  }
504
- }), it = (t) => ({
325
+ }), T = (t) => ({
505
326
  get: async (e) => (await t({
506
327
  config: {
507
328
  __args: {
@@ -509,13 +330,13 @@ const u = async (t, e, r = null, s = []) => {
509
330
  }
510
331
  }
511
332
  })).config
512
- }), at = (t) => ({
513
- send: (e, r, s) => u(t, "sendMail", {
333
+ }), M = (t) => ({
334
+ send: (e, r, s) => l(t, "sendMail", {
514
335
  email: e,
515
336
  subject: r,
516
337
  message: s
517
338
  })
518
- }), ot = (t) => ({
339
+ }), W = (t) => ({
519
340
  list: async (e = {
520
341
  user_id: !0,
521
342
  username: !0,
@@ -523,52 +344,52 @@ const u = async (t, e, r = null, s = []) => {
523
344
  last_name: !0,
524
345
  status: !0
525
346
  }) => {
526
- const r = L("Users", t, e);
347
+ const r = O("Users", t, e);
527
348
  return r.data_path = "app.users", r.all();
528
349
  }
529
- }), lt = (t) => {
350
+ }), z = (t) => {
530
351
  const e = t, r = {};
531
352
  return {
532
- create(s, n) {
353
+ create(s, i) {
533
354
  r[s] = null;
534
- let i = {};
535
- for (const c of Object.entries(n)) {
536
- const [o, a] = c;
537
- i[o] = () => ({
538
- name: a.name ? a.name : o,
355
+ let g = {};
356
+ for (const h of Object.entries(i)) {
357
+ const [n, a] = h;
358
+ g[n] = () => ({
359
+ name: a.name ? a.name : n,
539
360
  raw: a,
540
- getName: () => a.name ? a.name : o,
541
- getGQLField: () => a.gqlField !== void 0 ? a.gqlField : a.name || o,
361
+ getName: () => a.name ? a.name : n,
362
+ getGQLField: () => a.gqlField !== void 0 ? a.gqlField : a.name || n,
542
363
  getRaw() {
543
364
  return a;
544
365
  },
545
- getValue(l) {
546
- return a.field && typeof a.field == "function" ? a.field(l) : a.field && typeof a.field == "string" ? l[a.field] : l[this.getName()];
366
+ getValue(o) {
367
+ return a.field && typeof a.field == "function" ? a.field(o) : a.field && typeof a.field == "string" ? o[a.field] : o[this.getName()];
547
368
  },
548
- getFormattedValue(l) {
549
- const f = this.getValue(l);
550
- return a.format ? a.format(f) : f;
369
+ getFormattedValue(o) {
370
+ const c = this.getValue(o);
371
+ return a.format ? a.format(c) : c;
551
372
  }
552
373
  });
553
374
  }
554
- r[s] = tt(e, s, i);
375
+ r[s] = S(e, s, g);
555
376
  },
556
377
  get(s) {
557
378
  return r[s] || this.create(s, {}), r[s];
558
379
  }
559
380
  };
560
- }, ut = (t) => ({
381
+ }, G = (t) => ({
561
382
  list: async (e = {
562
383
  name: !0
563
384
  }) => {
564
- const { app: { roles: r } } = await m(t, {
385
+ const { app: { roles: r } } = await w(t, {
565
386
  app: {
566
387
  roles: e
567
388
  }
568
389
  });
569
390
  return r;
570
391
  }
571
- }), ct = [
392
+ }), Q = "list", I = [
572
393
  "flatMap",
573
394
  "chunk",
574
395
  "shuffle",
@@ -594,7 +415,7 @@ const u = async (t, e, r = null, s = []) => {
594
415
  "slice",
595
416
  "tap",
596
417
  "sort"
597
- ], ft = [
418
+ ], $ = [
598
419
  "avg",
599
420
  "count",
600
421
  "countBy",
@@ -620,29 +441,27 @@ const u = async (t, e, r = null, s = []) => {
620
441
  "get",
621
442
  "has",
622
443
  "implode",
623
- "partition",
624
- "sole"
444
+ "partition"
625
445
  ];
626
- class d {
446
+ class f {
627
447
  constructor(e, r) {
628
- C(this, "_batchData", null);
629
- // 新增
630
- C(this, "data_path", "");
631
- C(this, "axios");
632
- C(this, "filters");
633
- C(this, "steps");
634
- C(this, "fields");
635
- C(this, "already_limit", !1);
636
- C(this, "already_offset", !1);
637
- C(this, "limit", null);
638
- C(this, "offset", null);
639
- C(this, "_sort", null);
640
- C(this, "_sortDesc", !1);
641
- C(this, "meta", {});
448
+ m(this, "_batchData", null);
449
+ m(this, "data_path", "");
450
+ m(this, "axios");
451
+ m(this, "filters");
452
+ m(this, "steps");
453
+ m(this, "fields");
454
+ m(this, "already_limit", !1);
455
+ m(this, "already_offset", !1);
456
+ m(this, "limit", null);
457
+ m(this, "offset", null);
458
+ m(this, "_sort", null);
459
+ m(this, "_sortDesc", !1);
460
+ m(this, "meta", {});
642
461
  this.axios = r, this.filters = {}, this.steps = [], this.fields = e;
643
462
  }
644
463
  }
645
- d.prototype.getQueryPayload = function() {
464
+ f.prototype.getQueryPayload = function() {
646
465
  let t = {
647
466
  meta: {
648
467
  total: !0,
@@ -656,119 +475,159 @@ d.prototype.getQueryPayload = function() {
656
475
  steps: this.steps
657
476
  };
658
477
  };
659
- d.prototype.dataPath = function(t) {
478
+ f.prototype.dataPath = function(t) {
660
479
  const e = this.clone();
661
480
  return e.data_path = t, e;
662
481
  };
663
- d.prototype.buildArgs = function() {
482
+ f.prototype.buildArgs = function() {
664
483
  let t = {};
665
484
  return Object.keys(this.filters).length > 0 && (t.filters = this.filters), this._sort && (t.sort = this._sort, this._sortDesc && (t.sort += ":desc")), t;
666
485
  };
667
- d.prototype.clone = function() {
486
+ f.prototype.clone = function() {
668
487
  const t = Object.create(this);
669
488
  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;
670
489
  };
671
- N().macro("whereContains", function(t, e) {
490
+ D().macro("whereContains", function(t, e) {
672
491
  return this.filter((r) => r[t].toLowerCase().includes(e.toLowerCase()));
673
492
  });
674
- d.prototype.fetchData = async function() {
675
- if (this._batchData) {
676
- const o = this._batchData;
677
- return this.meta = o.meta, N(o.data);
678
- }
679
- let t = {
680
- meta: {
681
- total: !0,
682
- key: !0,
683
- name: !0
493
+ f.prototype.fetchData = async function() {
494
+ try {
495
+ if (this._batchData) {
496
+ const n = this._batchData;
497
+ return this.meta = n.meta, D(n.data);
684
498
  }
685
- };
686
- t.__args = this.buildArgs(), t.data = this.fields, this.already_limit && (t.data.__args = t.data.__args || {}, t.data.__args.limit = this.limit), this.already_offset && (t.data.__args = t.data.__args || {}, t.data.__args.offset = this.offset);
687
- const e = this.data_path.split(".");
688
- let r = {}, s = r, n = e[e.length - 1];
689
- for (const o of e) {
690
- if (o === n) {
691
- s[o] = t;
692
- break;
499
+ let t = {
500
+ meta: {
501
+ total: !0,
502
+ key: !0,
503
+ name: !0
504
+ }
505
+ };
506
+ t.__args = this.buildArgs(), t.data = this.fields, this.already_limit && (t.data.__args = t.data.__args || {}, t.data.__args.limit = this.limit), this.already_offset && (t.data.__args = t.data.__args || {}, t.data.__args.offset = this.offset);
507
+ const e = this.data_path.split(".");
508
+ let r = {}, s = r, i = e[e.length - 1];
509
+ for (const n of e) {
510
+ if (n === i) {
511
+ s[n] = t;
512
+ break;
513
+ }
514
+ s[n] = {}, s = s[n];
693
515
  }
694
- s[o] = {}, s = s[o];
516
+ let h = await w(this.axios, r);
517
+ for (const n of e)
518
+ h = h[n];
519
+ return this.meta = h.meta, D(h.data);
520
+ } catch (t) {
521
+ throw console.error("Error fetching collection data:", t), t;
695
522
  }
696
- let c = await m(this.axios, r);
697
- for (const o of e)
698
- c = c[o];
699
- return this.meta = c.meta, N(c.data);
700
523
  };
701
- d.prototype.processData = async function() {
524
+ f.prototype.processData = async function() {
702
525
  let t = await this.fetchData();
703
526
  for (const e of this.steps)
704
527
  t = t[e.type](...e.args);
705
528
  return t;
706
529
  };
707
- d.prototype.all = async function() {
530
+ f.prototype.all = async function() {
708
531
  return (await this.processData()).all();
709
532
  };
710
- for (const t of ct)
711
- d.prototype[t] = function(...e) {
533
+ for (const t of I)
534
+ f.prototype[t] = function(...e) {
712
535
  const r = this.clone();
713
536
  return r.steps.push({ type: t, args: e }), r;
714
537
  };
715
- for (const t of ft)
716
- d.prototype[t] = async function(...e) {
538
+ for (const t of $)
539
+ f.prototype[t] = async function(...e) {
717
540
  return (await this.clone().processData())[t](...e);
718
541
  };
719
- d.prototype.average = d.prototype.avg;
720
- d.prototype.first = async function() {
542
+ f.prototype.average = f.prototype.avg;
543
+ f.prototype.first = async function() {
721
544
  return this.take(1), (await this.processData()).first();
722
545
  };
723
- d.prototype.where = function(...t) {
724
- if (this._batchData)
725
- return this.steps.push({ type: "where", args: t }), this;
726
- if (t.length == 2)
546
+ f.prototype._handleBatchData = function(t, e) {
547
+ return this._batchData ? (this.steps.push({ type: t, args: e }), this) : null;
548
+ };
549
+ f.prototype.where = function(...t) {
550
+ const e = this._handleBatchData("where", t);
551
+ if (e) return e;
552
+ if (t.length === 2)
727
553
  this.filters[t[0]] = t[1];
728
- else if (t.length == 3) {
729
- let e = "==", r = t[0], s = null;
730
- t.length == 3 && (e = t[1], s = t[2]), e === "==" && (this.filters[r] = s), e === "<" && (this.filters[r] = { lt: s }), e === "<=" && (this.filters[r] = { lte: s }), e === ">" && (this.filters[r] = { gt: s }), e === ">=" && (this.filters[r] = { gte: s }), e === "!==" && (this.filters[r] = { ne: s });
554
+ else if (t.length === 3) {
555
+ const r = t[0], s = t[1], i = t[2];
556
+ switch (s) {
557
+ case "==":
558
+ this.filters[r] = i;
559
+ break;
560
+ case "<":
561
+ this.filters[r] = { lt: i };
562
+ break;
563
+ case "<=":
564
+ this.filters[r] = { lte: i };
565
+ break;
566
+ case ">":
567
+ this.filters[r] = { gt: i };
568
+ break;
569
+ case ">=":
570
+ this.filters[r] = { gte: i };
571
+ break;
572
+ case "!==":
573
+ this.filters[r] = { ne: i };
574
+ break;
575
+ default:
576
+ throw new Error(`Unsupported operator: ${s}`);
577
+ }
731
578
  }
732
579
  return this;
733
580
  };
734
- d.prototype.whereContains = function(t, e) {
735
- return this._batchData ? (this.steps.push({ type: "whereContains", args: [t, e] }), this) : (this.filters[t] = { contains: e }, this);
581
+ f.prototype.whereContains = function(t, e) {
582
+ const r = this._handleBatchData("whereContains", [t, e]);
583
+ return r || (this.filters[t] = { contains: e }, this);
736
584
  };
737
- d.prototype.forPage = function(t, e) {
585
+ f.prototype.forPage = function(t, e) {
738
586
  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);
739
587
  };
740
- d.prototype.whereIn = function(t, e) {
741
- return this._batchData ? (this.steps.push({ type: "whereIn", args: [t, e] }), this) : (this.filters[t] = { in: e }, this);
588
+ f.prototype.whereIn = function(t, e) {
589
+ const r = this._handleBatchData("whereIn", [t, e]);
590
+ return r || (this.filters[t] = { in: e }, this);
742
591
  };
743
- d.prototype.whereNotIn = function(t, e) {
744
- return this._batchData ? (this.steps.push({ type: "whereNotIn", args: [t, e] }), this) : (this.filters[t] = { nin: e }, this);
592
+ f.prototype.whereNotIn = function(t, e) {
593
+ const r = this._handleBatchData("whereNotIn", [t, e]);
594
+ return r || (this.filters[t] = { nin: e }, this);
745
595
  };
746
- d.prototype.whereNotBetween = function(t, e) {
747
- return this._batchData ? (this.steps.push({ type: "whereNotBetween", args: [t, e] }), this) : (this.filters[t] = { notBetween: e }, this);
596
+ f.prototype.whereNotBetween = function(t, e) {
597
+ const r = this._handleBatchData("whereNotBetween", [t, e]);
598
+ return r || (this.filters[t] = { notBetween: e }, this);
748
599
  };
749
- d.prototype.whereBetween = function(t, e) {
750
- return this._batchData ? (this.steps.push({ type: "whereBetween", args: [t, e] }), this) : (this.filters[t] = { between: e }, this);
600
+ f.prototype.whereBetween = function(t, e) {
601
+ const r = this._handleBatchData("whereBetween", [t, e]);
602
+ return r || (this.filters[t] = { between: e }, this);
751
603
  };
752
- d.prototype.sortBy = function(t) {
604
+ f.prototype.sortBy = function(t) {
753
605
  return this.steps.push({ type: "sortBy", args: [t] }), typeof t == "string" && (this._sort = t), this;
754
606
  };
755
- d.prototype.sortByDesc = function(t) {
607
+ f.prototype.sortByDesc = function(t) {
756
608
  return this.steps.push({ type: "sortByDesc", args: [t] }), typeof t == "string" && (this._sort = t, this._sortDesc = !0), this;
757
609
  };
758
- d.prototype.skip = function(t) {
610
+ f.prototype.skip = function(t) {
611
+ if (t < 0)
612
+ throw new Error("Offset must be non-negative");
759
613
  return this.already_offset && this.steps.push({ type: "skip", args: [t] }), this.offset = t, this.already_offset = !0, this;
760
614
  };
761
- d.prototype.take = function(t) {
615
+ f.prototype.take = function(t) {
616
+ if (t < 0)
617
+ throw new Error("Length must be non-negative");
762
618
  return this.already_limit ? (this.steps.push({ type: "take", args: [t] }), this) : (this.limit = t, this.already_limit = !0, this);
763
619
  };
764
- d.prototype.splice = function(t, e) {
620
+ f.prototype.splice = function(t, e) {
765
621
  return this.steps.push({ type: "splice", args: [t, e] }), this.offset = t, this.limit = e, this.already_limit = !0, this.already_offset = !0, this;
766
622
  };
767
- const L = (t, e, r) => {
768
- const s = new d(r, e);
769
- return s.data_path = "list" + t, s;
770
- }, pt = (t, e) => ({
771
- uploadTempFile: (r) => u(e, "lightDriveUploadTempFile", {
623
+ const O = (t, e, r) => {
624
+ const s = new f(r, e);
625
+ return s.data_path = Q + t, s;
626
+ }, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
627
+ __proto__: null,
628
+ default: O
629
+ }, Symbol.toStringTag, { value: "Module" })), K = (t, e) => ({
630
+ uploadTempFile: (r) => l(e, "lightDriveUploadTempFile", {
772
631
  index: t,
773
632
  file: r
774
633
  }, {
@@ -781,7 +640,7 @@ const L = (t, e, r) => {
781
640
  list: async (r, s = {
782
641
  name: !0,
783
642
  path: !0
784
- }) => (await m(e, {
643
+ }) => (await w(e, {
785
644
  app: {
786
645
  drive: {
787
646
  __args: {
@@ -796,9 +655,9 @@ const L = (t, e, r) => {
796
655
  }
797
656
  }
798
657
  })).app.drive.folders,
799
- create: (r) => u(e, "lightDriveCreateFolder", { index: t, path: r }),
800
- delete: (r) => u(e, "lightDriveDeleteFolder", { index: t, path: r }),
801
- rename: (r, s) => u(e, "lightDriveRenameFolder", { index: t, path: r, name: s })
658
+ create: (r) => l(e, "lightDriveCreateFolder", { index: t, path: r }),
659
+ delete: (r) => l(e, "lightDriveDeleteFolder", { index: t, path: r }),
660
+ rename: (r, s) => l(e, "lightDriveRenameFolder", { index: t, path: r, name: s })
802
661
  },
803
662
  files: {
804
663
  list: async (r, s = {
@@ -807,7 +666,7 @@ const L = (t, e, r) => {
807
666
  size: !0,
808
667
  mime: !0,
809
668
  url: !0
810
- }) => (await m(e, {
669
+ }) => (await w(e, {
811
670
  app: {
812
671
  drive: {
813
672
  __args: {
@@ -828,7 +687,7 @@ const L = (t, e, r) => {
828
687
  size: !0,
829
688
  mime: !0,
830
689
  url: !0
831
- }) => (await m(e, {
690
+ }) => (await w(e, {
832
691
  app: {
833
692
  drive: {
834
693
  __args: {
@@ -844,7 +703,7 @@ const L = (t, e, r) => {
844
703
  }
845
704
  })).app.drive.file,
846
705
  read: async (r) => {
847
- let s = await m(e, {
706
+ let s = await w(e, {
848
707
  app: {
849
708
  drive: {
850
709
  __args: {
@@ -859,78 +718,93 @@ const L = (t, e, r) => {
859
718
  }
860
719
  }
861
720
  });
862
- return window.atob(s.app.drive.file.base64Content);
721
+ if (!s.app.drive.file || !s.app.drive.file.base64Content)
722
+ throw new Error(`File not found or cannot read content: ${r}`);
723
+ return typeof window < "u" && window.atob ? window.atob(s.app.drive.file.base64Content) : s.app.drive.file.base64Content;
863
724
  },
864
- write: (r, s) => u(e, "lightDriveWriteFile", { index: t, path: r, content: s }),
865
- delete: (r) => u(e, "lightDriveDeleteFile", { index: t, path: r }),
866
- rename: (r, s) => u(e, "lightDriveRenameFile", { index: t, path: r, name: s }),
867
- move: (r, s) => u(e, "lightDriveMoveFile", { index: t, source: r, destination: s })
725
+ write: (r, s) => l(e, "lightDriveWriteFile", { index: t, path: r, content: s }),
726
+ delete: (r) => l(e, "lightDriveDeleteFile", { index: t, path: r }),
727
+ rename: (r, s) => l(e, "lightDriveRenameFile", { index: t, path: r, name: s }),
728
+ move: (r, s) => l(e, "lightDriveMoveFile", { index: t, source: r, destination: s })
868
729
  }
869
- }), mt = (t) => {
870
- const e = W.create({
730
+ }), x = (t) => {
731
+ const e = typeof window > "u";
732
+ let r = [];
733
+ const s = R.create({
871
734
  baseURL: t,
872
735
  withCredentials: !0
873
- }), r = (i, c = null, o = []) => u(e, i, c, o), s = (i) => m(e, i), n = lt(e);
736
+ });
737
+ e && (s.interceptors.request.use((n) => (n.withCredentials = !0, r.length > 0 && (n.headers.Cookie = r.join("; ")), n)), s.interceptors.response.use((n) => {
738
+ if (n.headers["set-cookie"]) {
739
+ const a = n.headers["set-cookie"].map((u) => u.split(";")[0]), o = r.map((u) => u.split("=")[0]), c = a.filter((u) => {
740
+ const p = u.split("=")[0];
741
+ return !o.includes(p);
742
+ });
743
+ r = [...r, ...c];
744
+ }
745
+ return n;
746
+ }));
747
+ const i = (n, a = null, o = []) => l(s, n, a, o), g = (n) => w(s, n), h = z(s);
874
748
  return {
875
749
  baseURL: t,
876
- axios: e,
877
- auth: x(e),
878
- mutation: r,
879
- query: s,
880
- config: it(s),
881
- mail: at(e),
882
- users: ot(e),
883
- fs: nt(e),
884
- models: n,
885
- model(i) {
886
- return n.get(i);
750
+ axios: s,
751
+ auth: j(s),
752
+ mutation: i,
753
+ query: g,
754
+ config: T(g),
755
+ mail: M(s),
756
+ users: W(s),
757
+ fs: J(s),
758
+ models: h,
759
+ model(n) {
760
+ return h.get(n);
887
761
  },
888
- roles: ut(e),
889
- collect: (i, c) => {
890
- const o = L(i, e, c);
891
- return o.data_path = n.get(i).getDataPath(), o;
762
+ roles: G(s),
763
+ collect: (n, a) => {
764
+ const o = O(n, s, a);
765
+ return o.data_path = h.get(n).getDataPath(), o;
892
766
  },
893
- drive(i) {
894
- return pt(i, e);
767
+ drive(n) {
768
+ return K(n, s);
895
769
  },
896
- async collects(i) {
897
- const c = {}, o = {};
898
- for (const l in i) {
899
- const f = i[l].getQueryPayload();
900
- o[l] = f.data_path, c[l] = {};
901
- const _ = f.data_path.split(".");
902
- let b = _[_.length - 1], y = c[l];
903
- for (const w of _) {
904
- if (w === b) {
905
- y[w] = f.query;
770
+ async collects(n) {
771
+ const a = {}, o = {};
772
+ for (const u in n) {
773
+ const p = n[u].getQueryPayload();
774
+ o[u] = p.data_path, a[u] = {};
775
+ const d = p.data_path.split(".");
776
+ let y = d[d.length - 1], _ = a[u];
777
+ for (const b of d) {
778
+ if (b === y) {
779
+ _[b] = p.query;
906
780
  break;
907
781
  }
908
- y[w] = y[w] || {};
782
+ _[b] = _[b] || {};
909
783
  }
910
- c[l].__aliasFor = _[0];
784
+ a[u].__aliasFor = d[0];
911
785
  }
912
- const a = await m(e, c);
913
- for (const l in i) {
914
- const f = o[l].split(".");
915
- let _ = f[f.length - 1], b = a[l];
916
- for (const y of f) {
917
- if (y === _) {
918
- i[l]._batchData = a[l][y];
786
+ const c = await w(s, a);
787
+ for (const u in n) {
788
+ const p = o[u].split(".");
789
+ let d = p[p.length - 1], y = c[u];
790
+ for (const _ of p) {
791
+ if (_ === d) {
792
+ n[u]._batchData = c[u][_];
919
793
  break;
920
794
  }
921
- b[y] = b[y] || {};
795
+ y[_] = y[_] || {};
922
796
  }
923
797
  }
924
- return i;
798
+ return n;
925
799
  }
926
800
  };
927
801
  };
928
802
  export {
929
- _t as File,
930
- mt as createClient,
931
- L as createCollection,
803
+ Z as File,
804
+ x as createClient,
805
+ O as createCollection,
932
806
  k as file,
933
- u as mutation,
934
- m as query,
935
- O as toQuery
807
+ l as mutation,
808
+ w as query,
809
+ C as toQuery
936
810
  };