@hostlink/light 2.3.8 → 2.5.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/auth.d.ts +15 -3
- package/dist/createClient.d.ts +2 -0
- package/dist/drive.d.ts +30 -0
- package/dist/light.js +639 -524
- package/dist/light.umd.cjs +12 -12
- package/dist/roles.d.ts +9 -1
- package/dist/users.d.ts +8 -1
- package/package.json +1 -1
package/dist/light.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsonToGraphQLQuery as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
1
|
+
var Yt = Object.defineProperty;
|
|
2
|
+
var Zt = (e, t, r) => t in e ? Yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var A = (e, t, r) => Zt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { jsonToGraphQLQuery as Tt, VariableType as K } from "json-to-graphql-query";
|
|
5
|
+
import kt from "axios";
|
|
6
|
+
function Pt(e) {
|
|
7
7
|
const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), s = new Uint8Array(i);
|
|
8
8
|
for (let o = 0; o < n.length; o++)
|
|
9
9
|
s[o] = n.charCodeAt(o);
|
|
@@ -19,14 +19,14 @@ function Nt(e) {
|
|
|
19
19
|
"_"
|
|
20
20
|
).replace(/=/g, "");
|
|
21
21
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (t ===
|
|
22
|
+
var h = "copy", _ = "convert";
|
|
23
|
+
function D(e, t, r) {
|
|
24
|
+
if (t === h)
|
|
25
25
|
return r;
|
|
26
|
-
if (t ===
|
|
26
|
+
if (t === _)
|
|
27
27
|
return e(r);
|
|
28
28
|
if (t instanceof Array)
|
|
29
|
-
return r.map((n) =>
|
|
29
|
+
return r.map((n) => D(e, t[0], n));
|
|
30
30
|
if (t instanceof Object) {
|
|
31
31
|
const n = {};
|
|
32
32
|
for (const [i, s] of Object.entries(t)) {
|
|
@@ -43,7 +43,7 @@ function P(e, t, r) {
|
|
|
43
43
|
n[i] = null;
|
|
44
44
|
continue;
|
|
45
45
|
}
|
|
46
|
-
n[i] =
|
|
46
|
+
n[i] = D(
|
|
47
47
|
e,
|
|
48
48
|
s.schema,
|
|
49
49
|
r[i]
|
|
@@ -52,14 +52,14 @@ function P(e, t, r) {
|
|
|
52
52
|
return n;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function x(e, t) {
|
|
56
56
|
return {
|
|
57
57
|
required: !0,
|
|
58
58
|
schema: e,
|
|
59
59
|
derive: t
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function y(e) {
|
|
63
63
|
return {
|
|
64
64
|
required: !0,
|
|
65
65
|
schema: e
|
|
@@ -72,116 +72,116 @@ function b(e) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
var Bt = {
|
|
75
|
-
type:
|
|
76
|
-
id:
|
|
77
|
-
transports: b(
|
|
75
|
+
type: y(h),
|
|
76
|
+
id: y(_),
|
|
77
|
+
transports: b(h)
|
|
78
78
|
}, qt = {
|
|
79
|
-
appid: b(
|
|
80
|
-
appidExclude: b(
|
|
81
|
-
credProps: b(
|
|
82
|
-
},
|
|
83
|
-
appid: b(
|
|
84
|
-
appidExclude: b(
|
|
85
|
-
credProps: b(
|
|
86
|
-
},
|
|
87
|
-
publicKey:
|
|
88
|
-
rp:
|
|
89
|
-
user:
|
|
90
|
-
id:
|
|
91
|
-
name:
|
|
92
|
-
displayName:
|
|
79
|
+
appid: b(h),
|
|
80
|
+
appidExclude: b(h),
|
|
81
|
+
credProps: b(h)
|
|
82
|
+
}, Ut = {
|
|
83
|
+
appid: b(h),
|
|
84
|
+
appidExclude: b(h),
|
|
85
|
+
credProps: b(h)
|
|
86
|
+
}, tr = {
|
|
87
|
+
publicKey: y({
|
|
88
|
+
rp: y(h),
|
|
89
|
+
user: y({
|
|
90
|
+
id: y(_),
|
|
91
|
+
name: y(h),
|
|
92
|
+
displayName: y(h)
|
|
93
93
|
}),
|
|
94
|
-
challenge:
|
|
95
|
-
pubKeyCredParams:
|
|
96
|
-
timeout: b(
|
|
94
|
+
challenge: y(_),
|
|
95
|
+
pubKeyCredParams: y(h),
|
|
96
|
+
timeout: b(h),
|
|
97
97
|
excludeCredentials: b([Bt]),
|
|
98
|
-
authenticatorSelection: b(
|
|
99
|
-
attestation: b(
|
|
98
|
+
authenticatorSelection: b(h),
|
|
99
|
+
attestation: b(h),
|
|
100
100
|
extensions: b(qt)
|
|
101
101
|
}),
|
|
102
|
-
signal: b(
|
|
103
|
-
},
|
|
104
|
-
type:
|
|
105
|
-
id:
|
|
106
|
-
rawId:
|
|
107
|
-
authenticatorAttachment: b(
|
|
108
|
-
response:
|
|
109
|
-
clientDataJSON:
|
|
110
|
-
attestationObject:
|
|
111
|
-
transports:
|
|
112
|
-
|
|
102
|
+
signal: b(h)
|
|
103
|
+
}, rr = {
|
|
104
|
+
type: y(h),
|
|
105
|
+
id: y(h),
|
|
106
|
+
rawId: y(_),
|
|
107
|
+
authenticatorAttachment: b(h),
|
|
108
|
+
response: y({
|
|
109
|
+
clientDataJSON: y(_),
|
|
110
|
+
attestationObject: y(_),
|
|
111
|
+
transports: x(
|
|
112
|
+
h,
|
|
113
113
|
(e) => {
|
|
114
114
|
var t;
|
|
115
115
|
return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
}),
|
|
119
|
-
clientExtensionResults:
|
|
120
|
-
|
|
119
|
+
clientExtensionResults: x(
|
|
120
|
+
Ut,
|
|
121
121
|
(e) => e.getClientExtensionResults()
|
|
122
122
|
)
|
|
123
|
-
},
|
|
124
|
-
mediation: b(
|
|
125
|
-
publicKey:
|
|
126
|
-
challenge:
|
|
127
|
-
timeout: b(
|
|
128
|
-
rpId: b(
|
|
123
|
+
}, er = {
|
|
124
|
+
mediation: b(h),
|
|
125
|
+
publicKey: y({
|
|
126
|
+
challenge: y(_),
|
|
127
|
+
timeout: b(h),
|
|
128
|
+
rpId: b(h),
|
|
129
129
|
allowCredentials: b([Bt]),
|
|
130
|
-
userVerification: b(
|
|
130
|
+
userVerification: b(h),
|
|
131
131
|
extensions: b(qt)
|
|
132
132
|
}),
|
|
133
|
-
signal: b(
|
|
134
|
-
},
|
|
135
|
-
type:
|
|
136
|
-
id:
|
|
137
|
-
rawId:
|
|
138
|
-
authenticatorAttachment: b(
|
|
139
|
-
response:
|
|
140
|
-
clientDataJSON:
|
|
141
|
-
authenticatorData:
|
|
142
|
-
signature:
|
|
143
|
-
userHandle:
|
|
133
|
+
signal: b(h)
|
|
134
|
+
}, nr = {
|
|
135
|
+
type: y(h),
|
|
136
|
+
id: y(h),
|
|
137
|
+
rawId: y(_),
|
|
138
|
+
authenticatorAttachment: b(h),
|
|
139
|
+
response: y({
|
|
140
|
+
clientDataJSON: y(_),
|
|
141
|
+
authenticatorData: y(_),
|
|
142
|
+
signature: y(_),
|
|
143
|
+
userHandle: y(_)
|
|
144
144
|
}),
|
|
145
|
-
clientExtensionResults:
|
|
146
|
-
|
|
145
|
+
clientExtensionResults: x(
|
|
146
|
+
Ut,
|
|
147
147
|
(e) => e.getClientExtensionResults()
|
|
148
148
|
)
|
|
149
149
|
};
|
|
150
|
-
function nr(e) {
|
|
151
|
-
return P(Dt, kt, e);
|
|
152
|
-
}
|
|
153
150
|
function ir(e) {
|
|
154
|
-
return
|
|
151
|
+
return D(Pt, tr, e);
|
|
152
|
+
}
|
|
153
|
+
function sr(e) {
|
|
154
|
+
return D(
|
|
155
155
|
Nt,
|
|
156
|
-
|
|
156
|
+
rr,
|
|
157
157
|
e
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
function sr(e) {
|
|
161
|
-
return P(Dt, rr, e);
|
|
162
|
-
}
|
|
163
160
|
function or(e) {
|
|
164
|
-
return
|
|
161
|
+
return D(Pt, er, e);
|
|
162
|
+
}
|
|
163
|
+
function ar(e) {
|
|
164
|
+
return D(
|
|
165
165
|
Nt,
|
|
166
|
-
|
|
166
|
+
nr,
|
|
167
167
|
e
|
|
168
168
|
);
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
170
|
+
async function ur(e) {
|
|
171
171
|
const t = await navigator.credentials.create(
|
|
172
172
|
e
|
|
173
173
|
);
|
|
174
|
-
return t.toJSON = () =>
|
|
174
|
+
return t.toJSON = () => sr(t), t;
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function cr(e) {
|
|
177
177
|
const t = await navigator.credentials.get(
|
|
178
178
|
e
|
|
179
179
|
);
|
|
180
|
-
return t.toJSON = () =>
|
|
180
|
+
return t.toJSON = () => ar(t), t;
|
|
181
181
|
}
|
|
182
|
-
const
|
|
182
|
+
const fr = (e) => ({
|
|
183
183
|
login: async (t) => {
|
|
184
|
-
const { app: r } = await
|
|
184
|
+
const { app: r } = await w(e, {
|
|
185
185
|
app: {
|
|
186
186
|
auth: {
|
|
187
187
|
webAuthnRequestOptions: {
|
|
@@ -191,77 +191,95 @@ const cr = (e) => ({
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
}), n = r.auth.webAuthnRequestOptions, i =
|
|
194
|
+
}), n = r.auth.webAuthnRequestOptions, i = or({
|
|
195
195
|
publicKey: n
|
|
196
|
-
}), s = await
|
|
197
|
-
await
|
|
196
|
+
}), s = await cr(i);
|
|
197
|
+
await f(e, "webAuthnAssertion", {
|
|
198
198
|
username: t,
|
|
199
199
|
assertion: s.toJSON()
|
|
200
200
|
});
|
|
201
201
|
},
|
|
202
202
|
register: async () => {
|
|
203
|
-
const { app: t } = await
|
|
203
|
+
const { app: t } = await w(e, {
|
|
204
204
|
app: {
|
|
205
205
|
auth: {
|
|
206
206
|
webAuthnCreationOptions: !0
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
}), r =
|
|
209
|
+
}), r = ir({
|
|
210
210
|
publicKey: t.auth.webAuthnCreationOptions
|
|
211
|
-
}), n = await
|
|
212
|
-
await
|
|
211
|
+
}), n = await ur(r);
|
|
212
|
+
await f(e, "webAuthnRegister", {
|
|
213
213
|
registration: n.toJSON()
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
}),
|
|
217
|
-
WebAuthn:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
216
|
+
}), lr = (e) => ({
|
|
217
|
+
WebAuthn: fr(e),
|
|
218
|
+
google: {
|
|
219
|
+
unlink: () => f(e, "lightAuthUnlinkGoogle"),
|
|
220
|
+
login: (t) => f(e, "lightAuthLoginGoogle", {
|
|
221
|
+
access_token: t
|
|
222
|
+
}),
|
|
223
|
+
register: (t) => f(e, "lightAuthRegisterGoogle", {
|
|
224
|
+
credential: t
|
|
225
|
+
})
|
|
226
|
+
},
|
|
227
|
+
facebook: {
|
|
228
|
+
unlink: () => f(e, "lightAuthUnlinkFacebook"),
|
|
229
|
+
login: (t) => f(e, "lightAuthLoginFacebook", {
|
|
230
|
+
access_token: t
|
|
231
|
+
}),
|
|
232
|
+
register: (t) => f(e, "lightAuthRegisterFacebook", {
|
|
233
|
+
access_token: t
|
|
234
|
+
})
|
|
235
|
+
},
|
|
236
|
+
microsoft: {
|
|
237
|
+
unlink: () => f(e, "lightAuthUnlinkMicrosoft"),
|
|
238
|
+
login: (t) => f(e, "lightAuthLoginMicrosoft", {
|
|
239
|
+
access_token: t
|
|
240
|
+
}),
|
|
241
|
+
register: (t) => f(e, "lightAuthRegisterMicrosoft", {
|
|
242
|
+
account_id: t
|
|
243
|
+
})
|
|
244
|
+
},
|
|
245
|
+
login: (t, r, n = "") => f(e, "login", {
|
|
228
246
|
username: t,
|
|
229
247
|
password: r,
|
|
230
248
|
code: n
|
|
231
249
|
}),
|
|
232
|
-
logout: () =>
|
|
233
|
-
changeExpiredPassword: (t, r, n) =>
|
|
250
|
+
logout: () => f(e, "logout"),
|
|
251
|
+
changeExpiredPassword: (t, r, n) => f(e, "changeExpiredPassword", {
|
|
234
252
|
username: t,
|
|
235
253
|
old_password: r,
|
|
236
254
|
new_password: n
|
|
237
255
|
}),
|
|
238
|
-
updatePassword: (t, r) =>
|
|
256
|
+
updatePassword: (t, r) => f(e, "updatePassword", {
|
|
239
257
|
old_password: t,
|
|
240
258
|
new_password: r
|
|
241
259
|
}),
|
|
242
|
-
resetPassword: (t, r, n) =>
|
|
260
|
+
resetPassword: (t, r, n) => f(e, "resetPassword", {
|
|
243
261
|
username: t,
|
|
244
262
|
password: r,
|
|
245
263
|
code: n
|
|
246
264
|
}),
|
|
247
|
-
forgetPassword: (t, r) =>
|
|
265
|
+
forgetPassword: (t, r) => f(e, "forgetPassword", {
|
|
248
266
|
username: t,
|
|
249
267
|
email: r
|
|
250
268
|
}),
|
|
251
269
|
verifyCode(t, r) {
|
|
252
|
-
return
|
|
270
|
+
return f(e, "forgetPasswordVerifyCode", {
|
|
253
271
|
username: t,
|
|
254
272
|
code: r
|
|
255
273
|
});
|
|
256
274
|
},
|
|
257
|
-
granted: async (t) => (await
|
|
275
|
+
granted: async (t) => (await w(e, {
|
|
258
276
|
granted: {
|
|
259
277
|
__args: {
|
|
260
278
|
rights: t
|
|
261
279
|
}
|
|
262
280
|
}
|
|
263
281
|
})).granted
|
|
264
|
-
}),
|
|
282
|
+
}), hr = (e, t, r) => {
|
|
265
283
|
const n = t, i = e, s = r;
|
|
266
284
|
let o = "list" + t;
|
|
267
285
|
const u = (a) => s[a] ? s[a]() : null;
|
|
@@ -276,32 +294,32 @@ const cr = (e) => ({
|
|
|
276
294
|
},
|
|
277
295
|
gqlFields(a) {
|
|
278
296
|
const c = [];
|
|
279
|
-
for (const
|
|
280
|
-
if (typeof
|
|
281
|
-
const v = u(
|
|
297
|
+
for (const p of a)
|
|
298
|
+
if (typeof p == "string") {
|
|
299
|
+
const v = u(p);
|
|
282
300
|
v && c.push(v.getGQLField());
|
|
283
|
-
} else typeof
|
|
301
|
+
} else typeof p == "object" && c.push(p);
|
|
284
302
|
return c;
|
|
285
303
|
},
|
|
286
304
|
async update(a, c) {
|
|
287
|
-
return await
|
|
305
|
+
return await f(i, "update" + n, { id: a, data: c });
|
|
288
306
|
},
|
|
289
307
|
async delete(a) {
|
|
290
|
-
return await
|
|
308
|
+
return await f(i, "delete" + n, { id: a });
|
|
291
309
|
},
|
|
292
310
|
async add(a) {
|
|
293
|
-
return await
|
|
311
|
+
return await f(i, "add" + n, { data: a });
|
|
294
312
|
},
|
|
295
313
|
fields(a) {
|
|
296
314
|
let c = [];
|
|
297
|
-
for (let
|
|
298
|
-
const v = u(
|
|
315
|
+
for (let p of a) {
|
|
316
|
+
const v = u(p);
|
|
299
317
|
v && c.push(v);
|
|
300
318
|
}
|
|
301
319
|
return c;
|
|
302
320
|
},
|
|
303
321
|
async get(a, c) {
|
|
304
|
-
return (await
|
|
322
|
+
return (await w(i, {
|
|
305
323
|
["list" + n]: {
|
|
306
324
|
__args: {
|
|
307
325
|
filters: a
|
|
@@ -316,7 +334,7 @@ const cr = (e) => ({
|
|
|
316
334
|
}))["list" + n].data[0];
|
|
317
335
|
},
|
|
318
336
|
async list(a, c) {
|
|
319
|
-
return (await
|
|
337
|
+
return (await w(i, {
|
|
320
338
|
["list" + n]: {
|
|
321
339
|
__args: {
|
|
322
340
|
filters: a
|
|
@@ -329,15 +347,15 @@ const cr = (e) => ({
|
|
|
329
347
|
}
|
|
330
348
|
};
|
|
331
349
|
};
|
|
332
|
-
function
|
|
350
|
+
function pr(e) {
|
|
333
351
|
e = "<~" + e + "~>";
|
|
334
352
|
var t, r, n, i, s, o = String, u = 255;
|
|
335
353
|
for (e.slice(0, 2) === "<~" && e.slice(-2), e = e.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), t = "uuuuu".slice(e.length % 5 || 5), e += t, n = [], i = 0, s = e.length; s > i; i += 5) r = 52200625 * (e.charCodeAt(i) - 33) + 614125 * (e.charCodeAt(i + 1) - 33) + 7225 * (e.charCodeAt(i + 2) - 33) + 85 * (e.charCodeAt(i + 3) - 33) + (e.charCodeAt(i + 4) - 33), n.push(u & r >> 24, u & r >> 16, u & r >> 8, u & r);
|
|
336
354
|
return function(a, c) {
|
|
337
|
-
for (var
|
|
355
|
+
for (var p = c; p > 0; p--) a.pop();
|
|
338
356
|
}(n, t.length), o.fromCharCode.apply(o, n);
|
|
339
357
|
}
|
|
340
|
-
const
|
|
358
|
+
const W = (e = "") => {
|
|
341
359
|
const t = e, r = (n = "application/octet-stream") => {
|
|
342
360
|
const i = new Uint8Array(t.length);
|
|
343
361
|
for (let u = 0; u < t.length; u++)
|
|
@@ -356,10 +374,10 @@ const R = (e = "") => {
|
|
|
356
374
|
window.open(r(n), "_blank");
|
|
357
375
|
}
|
|
358
376
|
};
|
|
359
|
-
},
|
|
360
|
-
fromBase85: (e) =>
|
|
361
|
-
fromBase64: (e) =>
|
|
362
|
-
fromString: (e) =>
|
|
377
|
+
}, ho = {
|
|
378
|
+
fromBase85: (e) => W(pr(e)),
|
|
379
|
+
fromBase64: (e) => W(atob(e)),
|
|
380
|
+
fromString: (e) => W(e)
|
|
363
381
|
}, G = (e) => {
|
|
364
382
|
let t = {};
|
|
365
383
|
return typeof e == "string" ? (t[e] = !0, t) : e instanceof Array ? (e.forEach((r) => {
|
|
@@ -377,8 +395,8 @@ const R = (e = "") => {
|
|
|
377
395
|
}
|
|
378
396
|
t[r] = G(n);
|
|
379
397
|
}), t);
|
|
380
|
-
}, N = (e) => G(e),
|
|
381
|
-
let r =
|
|
398
|
+
}, N = (e) => G(e), w = async (e, t) => {
|
|
399
|
+
let r = Tt(N(t));
|
|
382
400
|
const n = await e.post("", {
|
|
383
401
|
query: `{ ${r} }`
|
|
384
402
|
});
|
|
@@ -386,44 +404,44 @@ const R = (e = "") => {
|
|
|
386
404
|
throw new Error(n.data.errors[0].message);
|
|
387
405
|
return n.data.data;
|
|
388
406
|
};
|
|
389
|
-
function
|
|
407
|
+
function yr(e) {
|
|
390
408
|
for (let t = 0; t < e.length; t++)
|
|
391
409
|
if (e[t] instanceof File)
|
|
392
410
|
return !0;
|
|
393
411
|
return !1;
|
|
394
412
|
}
|
|
395
|
-
function
|
|
413
|
+
function mr(e) {
|
|
396
414
|
for (let t in e)
|
|
397
415
|
if (e[t] instanceof File)
|
|
398
416
|
return !0;
|
|
399
417
|
return !1;
|
|
400
418
|
}
|
|
401
|
-
const
|
|
419
|
+
const f = async (e, t, r = null, n = []) => {
|
|
402
420
|
let i = {
|
|
403
421
|
[t]: {}
|
|
404
422
|
};
|
|
405
423
|
const s = new FormData();
|
|
406
424
|
let o = !1;
|
|
407
425
|
if (r) {
|
|
408
|
-
const c = {},
|
|
409
|
-
let
|
|
426
|
+
const c = {}, p = {}, v = {};
|
|
427
|
+
let l = 0;
|
|
410
428
|
Object.entries(r).forEach(([m, g]) => {
|
|
411
|
-
if (g instanceof Array &&
|
|
429
|
+
if (g instanceof Array && yr(g)) {
|
|
412
430
|
o = !0;
|
|
413
431
|
let E = 0;
|
|
414
432
|
g.forEach((C) => {
|
|
415
|
-
C instanceof File && (c[m] = new
|
|
433
|
+
C instanceof File && (c[m] = new K(m), p[l] = ["variables." + m + "." + E], s.append(l.toString(), C), l++);
|
|
416
434
|
}), v[m] = "[Upload!]!";
|
|
417
|
-
} else g instanceof File ? (o = !0, c[m] = new
|
|
418
|
-
C instanceof File ? (c[m][E] = new
|
|
435
|
+
} else g instanceof File ? (o = !0, c[m] = new K(m), p[l] = ["variables." + m], s.append(l.toString(), g), v[m] = "Upload!", l++) : g instanceof Object && mr(g) ? (o = !0, c[m] = {}, Object.entries(g).forEach(([E, C]) => {
|
|
436
|
+
C instanceof File ? (c[m][E] = new K(E), p[l] = ["variables." + E], s.append(l.toString(), C), v[E] = "Upload!", l++) : c[m][E] = C;
|
|
419
437
|
})) : g !== void 0 && (c[m] = g);
|
|
420
|
-
}), i[t].__args = c, i.__variables = v, o && s.append("map", JSON.stringify(
|
|
438
|
+
}), i[t].__args = c, i.__variables = v, o && s.append("map", JSON.stringify(p));
|
|
421
439
|
}
|
|
422
|
-
Object.entries(N(n)).forEach(([c,
|
|
423
|
-
i[t][c] =
|
|
440
|
+
Object.entries(N(n)).forEach(([c, p]) => {
|
|
441
|
+
i[t][c] = p;
|
|
424
442
|
}), Object.entries(i[t]).length === 0 && (i[t] = !0);
|
|
425
443
|
let u = null;
|
|
426
|
-
const a =
|
|
444
|
+
const a = Tt({ mutation: i });
|
|
427
445
|
if (o ? (s.append("operations", JSON.stringify({
|
|
428
446
|
query: a
|
|
429
447
|
})), u = await e.post("", s)) : u = await e.post("", {
|
|
@@ -431,8 +449,8 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
431
449
|
}), u.data.errors)
|
|
432
450
|
throw new Error(u.data.errors[0].message);
|
|
433
451
|
return u.data.data[t];
|
|
434
|
-
},
|
|
435
|
-
uploadTempFile: (t) =>
|
|
452
|
+
}, dr = (e) => ({
|
|
453
|
+
uploadTempFile: (t) => f(e, "fsUploadTempFile", {
|
|
436
454
|
file: t
|
|
437
455
|
}, {
|
|
438
456
|
name: !0,
|
|
@@ -441,7 +459,7 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
441
459
|
mime: !0
|
|
442
460
|
}),
|
|
443
461
|
folders: {
|
|
444
|
-
list: async (t) => (await
|
|
462
|
+
list: async (t) => (await w(e, {
|
|
445
463
|
fsListFolders: {
|
|
446
464
|
__args: {
|
|
447
465
|
path: t
|
|
@@ -450,12 +468,12 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
450
468
|
path: !0
|
|
451
469
|
}
|
|
452
470
|
})).fsListFolders,
|
|
453
|
-
create: (t) =>
|
|
454
|
-
delete: (t) =>
|
|
455
|
-
rename: (t, r) =>
|
|
471
|
+
create: (t) => f(e, "fsCreateFolder", { path: t }),
|
|
472
|
+
delete: (t) => f(e, "fsDeleteFolder", { path: t }),
|
|
473
|
+
rename: (t, r) => f(e, "fsRenameFolder", { path: t, name: r })
|
|
456
474
|
},
|
|
457
475
|
files: {
|
|
458
|
-
list: async (t) => (await
|
|
476
|
+
list: async (t) => (await w(e, {
|
|
459
477
|
fsListFiles: {
|
|
460
478
|
__args: {
|
|
461
479
|
path: t
|
|
@@ -469,7 +487,7 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
469
487
|
}
|
|
470
488
|
})).fsListFiles,
|
|
471
489
|
read: async (t) => {
|
|
472
|
-
let r = await
|
|
490
|
+
let r = await w(e, {
|
|
473
491
|
fsFile: {
|
|
474
492
|
__args: {
|
|
475
493
|
path: t
|
|
@@ -479,15 +497,15 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
479
497
|
});
|
|
480
498
|
return window.atob(r.fsFile.base64Content);
|
|
481
499
|
},
|
|
482
|
-
write: (t, r) =>
|
|
500
|
+
write: (t, r) => f(e, "fsWriteFile", {
|
|
483
501
|
path: t,
|
|
484
502
|
content: r
|
|
485
503
|
}),
|
|
486
|
-
delete: (t) =>
|
|
487
|
-
rename: (t, r) =>
|
|
488
|
-
move: (t, r) =>
|
|
504
|
+
delete: (t) => f(e, "fsDeleteFile", { path: t }),
|
|
505
|
+
rename: (t, r) => f(e, "fsRenameFile", { path: t, name: r }),
|
|
506
|
+
move: (t, r) => f(e, "fsMoveFile", { source: t, target: r })
|
|
489
507
|
}
|
|
490
|
-
}),
|
|
508
|
+
}), vr = (e) => ({
|
|
491
509
|
get: async (t) => (await e({
|
|
492
510
|
config: {
|
|
493
511
|
__args: {
|
|
@@ -495,25 +513,24 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
495
513
|
}
|
|
496
514
|
}
|
|
497
515
|
})).config
|
|
498
|
-
}),
|
|
499
|
-
send: (t, r, n) =>
|
|
516
|
+
}), br = (e) => ({
|
|
517
|
+
send: (t, r, n) => f(e, "sendMail", {
|
|
500
518
|
email: t,
|
|
501
519
|
subject: r,
|
|
502
520
|
message: n
|
|
503
521
|
})
|
|
504
|
-
}),
|
|
505
|
-
list: async (
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}), gr = (e) => {
|
|
522
|
+
}), gr = (e) => ({
|
|
523
|
+
list: async (t = {
|
|
524
|
+
user_id: !0,
|
|
525
|
+
username: !0,
|
|
526
|
+
first_name: !0,
|
|
527
|
+
last_name: !0,
|
|
528
|
+
status: !0
|
|
529
|
+
}) => {
|
|
530
|
+
const r = Xt("Users", e, t);
|
|
531
|
+
return r.data_path = "app.users", r.all();
|
|
532
|
+
}
|
|
533
|
+
}), wr = (e) => {
|
|
517
534
|
const t = e, r = {};
|
|
518
535
|
return {
|
|
519
536
|
create(n, i) {
|
|
@@ -533,28 +550,33 @@ const y = async (e, t, r = null, n = []) => {
|
|
|
533
550
|
return a.field && typeof a.field == "function" ? a.field(c) : a.field && typeof a.field == "string" ? c[a.field] : c[this.getName()];
|
|
534
551
|
},
|
|
535
552
|
getFormattedValue(c) {
|
|
536
|
-
const
|
|
537
|
-
return a.format ? a.format(
|
|
553
|
+
const p = this.getValue(c);
|
|
554
|
+
return a.format ? a.format(p) : p;
|
|
538
555
|
}
|
|
539
556
|
});
|
|
540
557
|
}
|
|
541
|
-
r[n] =
|
|
558
|
+
r[n] = hr(t, n, s);
|
|
542
559
|
},
|
|
543
560
|
get(n) {
|
|
544
561
|
return r[n] || this.create(n, {}), r[n];
|
|
545
562
|
}
|
|
546
563
|
};
|
|
547
|
-
},
|
|
548
|
-
list: async (
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}
|
|
552
|
-
|
|
564
|
+
}, Ar = (e) => ({
|
|
565
|
+
list: async (t = {
|
|
566
|
+
name: !0
|
|
567
|
+
}) => {
|
|
568
|
+
const { app: { roles: r } } = await w(e, {
|
|
569
|
+
app: {
|
|
570
|
+
roles: t
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
return r;
|
|
574
|
+
}
|
|
553
575
|
});
|
|
554
|
-
function
|
|
576
|
+
function _r(e) {
|
|
555
577
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
556
578
|
}
|
|
557
|
-
var
|
|
579
|
+
var Mt = { exports: {} }, Or = function() {
|
|
558
580
|
var t = this, r = -1;
|
|
559
581
|
return {
|
|
560
582
|
next: function() {
|
|
@@ -564,7 +586,7 @@ var Kt = { exports: {} }, _r = function() {
|
|
|
564
586
|
};
|
|
565
587
|
}
|
|
566
588
|
};
|
|
567
|
-
},
|
|
589
|
+
}, Sr = function() {
|
|
568
590
|
return this.items;
|
|
569
591
|
};
|
|
570
592
|
function Q(e) {
|
|
@@ -594,9 +616,9 @@ var d = {
|
|
|
594
616
|
isFunction: function(t) {
|
|
595
617
|
return typeof t == "function";
|
|
596
618
|
}
|
|
597
|
-
},
|
|
598
|
-
return t === void 0 ? this.sum() / this.items.length :
|
|
599
|
-
},
|
|
619
|
+
}, $r = d, jr = $r.isFunction, Rt = function(t) {
|
|
620
|
+
return t === void 0 ? this.sum() / this.items.length : jr(t) ? new this.constructor(this.items).sum(t) / this.items.length : new this.constructor(this.items).pluck(t).sum() / this.items.length;
|
|
621
|
+
}, Er = Rt, Ir = Er;
|
|
600
622
|
function z(e) {
|
|
601
623
|
"@babel/helpers - typeof";
|
|
602
624
|
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
@@ -605,7 +627,7 @@ function z(e) {
|
|
|
605
627
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
606
628
|
}, z(e);
|
|
607
629
|
}
|
|
608
|
-
var
|
|
630
|
+
var Cr = function(t) {
|
|
609
631
|
var r = this, n = [], i = 0;
|
|
610
632
|
if (Array.isArray(this.items))
|
|
611
633
|
do {
|
|
@@ -614,9 +636,9 @@ var Ir = function(t) {
|
|
|
614
636
|
} while (i < this.items.length);
|
|
615
637
|
else if (z(this.items) === "object") {
|
|
616
638
|
var u = Object.keys(this.items), a = function() {
|
|
617
|
-
var
|
|
618
|
-
|
|
619
|
-
return v.put(
|
|
639
|
+
var p = u.slice(i, i + t), v = new r.constructor({});
|
|
640
|
+
p.forEach(function(l) {
|
|
641
|
+
return v.put(l, r.items[l]);
|
|
620
642
|
}), n.push(v), i += t;
|
|
621
643
|
};
|
|
622
644
|
do
|
|
@@ -626,14 +648,14 @@ var Ir = function(t) {
|
|
|
626
648
|
n.push(new this.constructor([this.items]));
|
|
627
649
|
return new this.constructor(n);
|
|
628
650
|
};
|
|
629
|
-
function
|
|
630
|
-
return
|
|
651
|
+
function Fr(e) {
|
|
652
|
+
return Nr(e) || Pr(e) || Tr(e) || Dr();
|
|
631
653
|
}
|
|
632
|
-
function
|
|
654
|
+
function Dr() {
|
|
633
655
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
634
656
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
635
657
|
}
|
|
636
|
-
function
|
|
658
|
+
function Tr(e, t) {
|
|
637
659
|
if (e) {
|
|
638
660
|
if (typeof e == "string") return X(e, t);
|
|
639
661
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -641,10 +663,10 @@ function Pr(e, t) {
|
|
|
641
663
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return X(e, t);
|
|
642
664
|
}
|
|
643
665
|
}
|
|
644
|
-
function
|
|
666
|
+
function Pr(e) {
|
|
645
667
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
646
668
|
}
|
|
647
|
-
function
|
|
669
|
+
function Nr(e) {
|
|
648
670
|
if (Array.isArray(e)) return X(e);
|
|
649
671
|
}
|
|
650
672
|
function X(e, t) {
|
|
@@ -653,18 +675,18 @@ function X(e, t) {
|
|
|
653
675
|
n[r] = e[r];
|
|
654
676
|
return n;
|
|
655
677
|
}
|
|
656
|
-
var
|
|
678
|
+
var Br = function() {
|
|
657
679
|
var t;
|
|
658
|
-
return new this.constructor((t = []).concat.apply(t,
|
|
680
|
+
return new this.constructor((t = []).concat.apply(t, Fr(this.items)));
|
|
659
681
|
};
|
|
660
|
-
function
|
|
661
|
-
return
|
|
682
|
+
function qr(e, t) {
|
|
683
|
+
return Kr(e) || Rr(e, t) || Mr(e, t) || Ur();
|
|
662
684
|
}
|
|
663
|
-
function
|
|
685
|
+
function Ur() {
|
|
664
686
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
665
687
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
666
688
|
}
|
|
667
|
-
function
|
|
689
|
+
function Mr(e, t) {
|
|
668
690
|
if (e) {
|
|
669
691
|
if (typeof e == "string") return pt(e, t);
|
|
670
692
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -678,7 +700,7 @@ function pt(e, t) {
|
|
|
678
700
|
n[r] = e[r];
|
|
679
701
|
return n;
|
|
680
702
|
}
|
|
681
|
-
function
|
|
703
|
+
function Rr(e, t) {
|
|
682
704
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
683
705
|
if (r != null) {
|
|
684
706
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -697,7 +719,7 @@ function Kr(e, t) {
|
|
|
697
719
|
return n;
|
|
698
720
|
}
|
|
699
721
|
}
|
|
700
|
-
function
|
|
722
|
+
function Kr(e) {
|
|
701
723
|
if (Array.isArray(e)) return e;
|
|
702
724
|
}
|
|
703
725
|
function B(e) {
|
|
@@ -723,19 +745,19 @@ var Wr = function(t) {
|
|
|
723
745
|
else if (Array.isArray(this.items))
|
|
724
746
|
i[this.items[0]] = n;
|
|
725
747
|
else if (typeof this.items == "string" && Array.isArray(n)) {
|
|
726
|
-
var s = n, o =
|
|
748
|
+
var s = n, o = qr(s, 1);
|
|
727
749
|
i[this.items] = o[0];
|
|
728
750
|
} else typeof this.items == "string" && (i[this.items] = n);
|
|
729
751
|
return new this.constructor(i);
|
|
730
752
|
};
|
|
731
|
-
function
|
|
732
|
-
return
|
|
753
|
+
function Jr(e) {
|
|
754
|
+
return xr(e) || Hr(e) || Lr(e) || Vr();
|
|
733
755
|
}
|
|
734
|
-
function
|
|
756
|
+
function Vr() {
|
|
735
757
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
736
758
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
737
759
|
}
|
|
738
|
-
function
|
|
760
|
+
function Lr(e, t) {
|
|
739
761
|
if (e) {
|
|
740
762
|
if (typeof e == "string") return Y(e, t);
|
|
741
763
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -743,10 +765,10 @@ function Mr(e, t) {
|
|
|
743
765
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Y(e, t);
|
|
744
766
|
}
|
|
745
767
|
}
|
|
746
|
-
function
|
|
768
|
+
function Hr(e) {
|
|
747
769
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
748
770
|
}
|
|
749
|
-
function
|
|
771
|
+
function xr(e) {
|
|
750
772
|
if (Array.isArray(e)) return Y(e);
|
|
751
773
|
}
|
|
752
774
|
function Y(e, t) {
|
|
@@ -755,11 +777,11 @@ function Y(e, t) {
|
|
|
755
777
|
n[r] = e[r];
|
|
756
778
|
return n;
|
|
757
779
|
}
|
|
758
|
-
var
|
|
780
|
+
var Kt = function(t) {
|
|
759
781
|
var r;
|
|
760
782
|
if (Array.isArray(t)) {
|
|
761
783
|
var n;
|
|
762
|
-
r = [], (n = r).push.apply(n,
|
|
784
|
+
r = [], (n = r).push.apply(n, Jr(t));
|
|
763
785
|
} else
|
|
764
786
|
r = {}, Object.keys(t).forEach(function(i) {
|
|
765
787
|
r[i] = t[i];
|
|
@@ -774,12 +796,12 @@ function q(e) {
|
|
|
774
796
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
775
797
|
}, q(e);
|
|
776
798
|
}
|
|
777
|
-
var
|
|
799
|
+
var Gr = Kt, Qr = function(t) {
|
|
778
800
|
var r = t;
|
|
779
801
|
t instanceof this.constructor ? r = t.all() : q(t) === "object" && (r = [], Object.keys(t).forEach(function(i) {
|
|
780
802
|
r.push(t[i]);
|
|
781
803
|
}));
|
|
782
|
-
var n =
|
|
804
|
+
var n = Gr(this.items);
|
|
783
805
|
return r.forEach(function(i) {
|
|
784
806
|
q(i) === "object" ? Object.keys(i).forEach(function(s) {
|
|
785
807
|
return n.push(i[s]);
|
|
@@ -787,13 +809,13 @@ var Hr = Wt, Gr = function(t) {
|
|
|
787
809
|
}), new this.constructor(n);
|
|
788
810
|
};
|
|
789
811
|
function yt(e) {
|
|
790
|
-
return
|
|
812
|
+
return Zr(e) || Yr(e) || Xr(e) || zr();
|
|
791
813
|
}
|
|
792
|
-
function
|
|
814
|
+
function zr() {
|
|
793
815
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
794
816
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
795
817
|
}
|
|
796
|
-
function
|
|
818
|
+
function Xr(e, t) {
|
|
797
819
|
if (e) {
|
|
798
820
|
if (typeof e == "string") return Z(e, t);
|
|
799
821
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -801,10 +823,10 @@ function zr(e, t) {
|
|
|
801
823
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Z(e, t);
|
|
802
824
|
}
|
|
803
825
|
}
|
|
804
|
-
function
|
|
826
|
+
function Yr(e) {
|
|
805
827
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
806
828
|
}
|
|
807
|
-
function
|
|
829
|
+
function Zr(e) {
|
|
808
830
|
if (Array.isArray(e)) return Z(e);
|
|
809
831
|
}
|
|
810
832
|
function Z(e, t) {
|
|
@@ -819,14 +841,14 @@ var $ = function(t) {
|
|
|
819
841
|
return r.push(t[n]);
|
|
820
842
|
}), r;
|
|
821
843
|
};
|
|
822
|
-
function
|
|
823
|
-
return
|
|
844
|
+
function kr(e) {
|
|
845
|
+
return ne(e) || ee(e) || re(e) || te();
|
|
824
846
|
}
|
|
825
|
-
function
|
|
847
|
+
function te() {
|
|
826
848
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
827
849
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
828
850
|
}
|
|
829
|
-
function
|
|
851
|
+
function re(e, t) {
|
|
830
852
|
if (e) {
|
|
831
853
|
if (typeof e == "string") return k(e, t);
|
|
832
854
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -834,10 +856,10 @@ function te(e, t) {
|
|
|
834
856
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return k(e, t);
|
|
835
857
|
}
|
|
836
858
|
}
|
|
837
|
-
function
|
|
859
|
+
function ee(e) {
|
|
838
860
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
839
861
|
}
|
|
840
|
-
function
|
|
862
|
+
function ne(e) {
|
|
841
863
|
if (Array.isArray(e)) return k(e);
|
|
842
864
|
}
|
|
843
865
|
function k(e, t) {
|
|
@@ -846,99 +868,99 @@ function k(e, t) {
|
|
|
846
868
|
n[r] = e[r];
|
|
847
869
|
return n;
|
|
848
870
|
}
|
|
849
|
-
var
|
|
871
|
+
var ie = $, se = d, oe = se.isFunction, Wt = function(t, r) {
|
|
850
872
|
if (r !== void 0)
|
|
851
873
|
return Array.isArray(this.items) ? this.items.filter(function(i) {
|
|
852
874
|
return i[t] !== void 0 && i[t] === r;
|
|
853
875
|
}).length > 0 : this.items[t] !== void 0 && this.items[t] === r;
|
|
854
|
-
if (
|
|
876
|
+
if (oe(t))
|
|
855
877
|
return this.items.filter(function(i, s) {
|
|
856
878
|
return t(i, s);
|
|
857
879
|
}).length > 0;
|
|
858
880
|
if (Array.isArray(this.items))
|
|
859
881
|
return this.items.indexOf(t) !== -1;
|
|
860
|
-
var n =
|
|
861
|
-
return n.push.apply(n,
|
|
862
|
-
}, oe = function() {
|
|
863
|
-
return this.count() === 1;
|
|
882
|
+
var n = ie(this.items);
|
|
883
|
+
return n.push.apply(n, kr(Object.keys(this.items))), n.indexOf(t) !== -1;
|
|
864
884
|
}, ae = function() {
|
|
885
|
+
return this.count() === 1;
|
|
886
|
+
}, ue = function() {
|
|
865
887
|
var t = 0;
|
|
866
888
|
return Array.isArray(this.items) && (t = this.items.length), Math.max(Object.keys(this.items).length, t);
|
|
867
|
-
},
|
|
889
|
+
}, ce = function() {
|
|
868
890
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(r) {
|
|
869
891
|
return r;
|
|
870
892
|
};
|
|
871
893
|
return new this.constructor(this.items).groupBy(t).map(function(r) {
|
|
872
894
|
return r.count();
|
|
873
895
|
});
|
|
874
|
-
},
|
|
896
|
+
}, fe = function() {
|
|
875
897
|
function t(s, o, u) {
|
|
876
898
|
var a = u[0];
|
|
877
899
|
a instanceof o && (a = a.all());
|
|
878
|
-
for (var c = u.slice(1),
|
|
900
|
+
for (var c = u.slice(1), p = !c.length, v = [], l = 0; l < a.length; l += 1) {
|
|
879
901
|
var m = s.slice();
|
|
880
|
-
m.push(a[
|
|
902
|
+
m.push(a[l]), p ? v.push(m) : v = v.concat(t(m, o, c));
|
|
881
903
|
}
|
|
882
904
|
return v;
|
|
883
905
|
}
|
|
884
906
|
for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
885
907
|
n[i] = arguments[i];
|
|
886
908
|
return new this.constructor(t([], this.constructor, [].concat([this.items], n)));
|
|
887
|
-
},
|
|
909
|
+
}, le = function() {
|
|
888
910
|
this.dump(), typeof process < "u" && process.exit(1);
|
|
889
|
-
},
|
|
911
|
+
}, he = function(t) {
|
|
890
912
|
var r;
|
|
891
913
|
t instanceof this.constructor ? r = t.all() : r = t;
|
|
892
914
|
var n = this.items.filter(function(i) {
|
|
893
915
|
return r.indexOf(i) === -1;
|
|
894
916
|
});
|
|
895
917
|
return new this.constructor(n);
|
|
896
|
-
},
|
|
918
|
+
}, pe = function(t) {
|
|
897
919
|
var r = this, n = t;
|
|
898
920
|
t instanceof this.constructor && (n = t.all());
|
|
899
921
|
var i = {};
|
|
900
922
|
return Object.keys(this.items).forEach(function(s) {
|
|
901
923
|
(n[s] === void 0 || n[s] !== r.items[s]) && (i[s] = r.items[s]);
|
|
902
924
|
}), new this.constructor(i);
|
|
903
|
-
},
|
|
925
|
+
}, ye = function(t) {
|
|
904
926
|
var r;
|
|
905
927
|
t instanceof this.constructor ? r = t.all() : r = t;
|
|
906
928
|
var n = Object.keys(r), i = Object.keys(this.items).filter(function(s) {
|
|
907
929
|
return n.indexOf(s) === -1;
|
|
908
930
|
});
|
|
909
931
|
return new this.constructor(this.items).only(i);
|
|
910
|
-
},
|
|
932
|
+
}, me = function(t, r) {
|
|
911
933
|
var n = this.items.filter(function(i) {
|
|
912
934
|
return !(t && t.some(function(s) {
|
|
913
935
|
return r(i, s) === 0;
|
|
914
936
|
}));
|
|
915
937
|
});
|
|
916
938
|
return new this.constructor(n);
|
|
917
|
-
},
|
|
939
|
+
}, de = function(t, r) {
|
|
918
940
|
return !this.contains(t, r);
|
|
919
|
-
},
|
|
941
|
+
}, ve = function() {
|
|
920
942
|
return console.log(this), this;
|
|
921
943
|
};
|
|
922
|
-
function
|
|
944
|
+
function U(e) {
|
|
923
945
|
"@babel/helpers - typeof";
|
|
924
|
-
return
|
|
946
|
+
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
925
947
|
return typeof t;
|
|
926
948
|
} : function(t) {
|
|
927
949
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
928
|
-
},
|
|
950
|
+
}, U(e);
|
|
929
951
|
}
|
|
930
|
-
var
|
|
952
|
+
var be = function() {
|
|
931
953
|
var t = this, r = [], n = {}, i = function(o) {
|
|
932
|
-
return Array.isArray(o) ||
|
|
954
|
+
return Array.isArray(o) || U(o) === "object" ? JSON.stringify(o) : o;
|
|
933
955
|
};
|
|
934
956
|
return Array.isArray(this.items) ? this.items.forEach(function(s, o) {
|
|
935
957
|
var u = i(s);
|
|
936
958
|
r.indexOf(u) === -1 ? r.push(u) : n[o] = s;
|
|
937
|
-
}) :
|
|
959
|
+
}) : U(this.items) === "object" && Object.keys(this.items).forEach(function(s) {
|
|
938
960
|
var o = i(t.items[s]);
|
|
939
961
|
r.indexOf(o) === -1 ? r.push(o) : n[s] = t.items[s];
|
|
940
962
|
}), new this.constructor(n);
|
|
941
|
-
},
|
|
963
|
+
}, ge = function(t) {
|
|
942
964
|
var r = !1;
|
|
943
965
|
if (Array.isArray(this.items))
|
|
944
966
|
for (var n = this.items.length, i = 0; i < n && !r; i += 1)
|
|
@@ -950,14 +972,14 @@ var ve = function() {
|
|
|
950
972
|
}
|
|
951
973
|
return this;
|
|
952
974
|
};
|
|
953
|
-
function
|
|
954
|
-
return
|
|
975
|
+
function we(e) {
|
|
976
|
+
return Se(e) || Oe(e) || _e(e) || Ae();
|
|
955
977
|
}
|
|
956
|
-
function
|
|
978
|
+
function Ae() {
|
|
957
979
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
958
980
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
959
981
|
}
|
|
960
|
-
function
|
|
982
|
+
function _e(e, t) {
|
|
961
983
|
if (e) {
|
|
962
984
|
if (typeof e == "string") return tt(e, t);
|
|
963
985
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -965,10 +987,10 @@ function Ae(e, t) {
|
|
|
965
987
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return tt(e, t);
|
|
966
988
|
}
|
|
967
989
|
}
|
|
968
|
-
function
|
|
990
|
+
function Oe(e) {
|
|
969
991
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
970
992
|
}
|
|
971
|
-
function
|
|
993
|
+
function Se(e) {
|
|
972
994
|
if (Array.isArray(e)) return tt(e);
|
|
973
995
|
}
|
|
974
996
|
function tt(e, t) {
|
|
@@ -977,19 +999,19 @@ function tt(e, t) {
|
|
|
977
999
|
n[r] = e[r];
|
|
978
1000
|
return n;
|
|
979
1001
|
}
|
|
980
|
-
var
|
|
1002
|
+
var $e = function(t) {
|
|
981
1003
|
return this.each(function(r, n) {
|
|
982
|
-
t.apply(void 0,
|
|
1004
|
+
t.apply(void 0, we(r).concat([n]));
|
|
983
1005
|
}), this;
|
|
984
|
-
},
|
|
985
|
-
var r =
|
|
1006
|
+
}, je = $, Ee = function(t) {
|
|
1007
|
+
var r = je(this.items);
|
|
986
1008
|
return r.every(t);
|
|
987
|
-
},
|
|
1009
|
+
}, R = function(t) {
|
|
988
1010
|
return Array.isArray(t[0]) ? t[0] : t;
|
|
989
|
-
},
|
|
1011
|
+
}, Ie = R, Ce = function() {
|
|
990
1012
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
991
1013
|
n[i] = arguments[i];
|
|
992
|
-
var s =
|
|
1014
|
+
var s = Ie(n);
|
|
993
1015
|
if (Array.isArray(this.items)) {
|
|
994
1016
|
var o = this.items.filter(function(a) {
|
|
995
1017
|
return s.indexOf(a) === -1;
|
|
@@ -1020,13 +1042,13 @@ function Jt(e) {
|
|
|
1020
1042
|
return !1;
|
|
1021
1043
|
return !0;
|
|
1022
1044
|
}
|
|
1023
|
-
function
|
|
1045
|
+
function Fe(e, t) {
|
|
1024
1046
|
var r = {};
|
|
1025
1047
|
return Object.keys(t).forEach(function(n) {
|
|
1026
1048
|
e ? e(t[n], n) && (r[n] = t[n]) : Jt(t[n]) || (r[n] = t[n]);
|
|
1027
1049
|
}), r;
|
|
1028
1050
|
}
|
|
1029
|
-
function
|
|
1051
|
+
function De(e, t) {
|
|
1030
1052
|
if (e)
|
|
1031
1053
|
return t.filter(e);
|
|
1032
1054
|
for (var r = [], n = 0; n < t.length; n += 1) {
|
|
@@ -1035,10 +1057,10 @@ function Te(e, t) {
|
|
|
1035
1057
|
}
|
|
1036
1058
|
return r;
|
|
1037
1059
|
}
|
|
1038
|
-
var
|
|
1060
|
+
var Te = function(t) {
|
|
1039
1061
|
var r = t || !1, n = null;
|
|
1040
|
-
return Array.isArray(this.items) ? n =
|
|
1041
|
-
},
|
|
1062
|
+
return Array.isArray(this.items) ? n = De(r, this.items) : n = Fe(r, this.items), new this.constructor(n);
|
|
1063
|
+
}, Pe = d, J = Pe.isFunction, Ne = function(t, r) {
|
|
1042
1064
|
if (J(t)) {
|
|
1043
1065
|
for (var n = Object.keys(this.items), i = 0; i < n.length; i += 1) {
|
|
1044
1066
|
var s = n[i], o = this.items[s];
|
|
@@ -1054,8 +1076,8 @@ var Pe = function(t) {
|
|
|
1054
1076
|
return this.items[u];
|
|
1055
1077
|
}
|
|
1056
1078
|
return J(r) ? r() : r;
|
|
1057
|
-
},
|
|
1058
|
-
if (
|
|
1079
|
+
}, Be = d, qe = Be.isFunction, Ue = function(t, r, n) {
|
|
1080
|
+
if (qe(t))
|
|
1059
1081
|
return this.first(t, function() {
|
|
1060
1082
|
throw new Error("Item not found.");
|
|
1061
1083
|
});
|
|
@@ -1063,22 +1085,22 @@ var Pe = function(t) {
|
|
|
1063
1085
|
if (i.isEmpty())
|
|
1064
1086
|
throw new Error("Item not found.");
|
|
1065
1087
|
return i.first();
|
|
1066
|
-
},
|
|
1088
|
+
}, Me = function(t, r, n) {
|
|
1067
1089
|
return this.where(t, r, n).first() || null;
|
|
1068
|
-
},
|
|
1090
|
+
}, Re = function(t) {
|
|
1069
1091
|
return this.map(t).collapse();
|
|
1070
|
-
},
|
|
1092
|
+
}, Vt = d, V = Vt.isArray, L = Vt.isObject, Ke = function(t) {
|
|
1071
1093
|
var r = t || 1 / 0, n = !1, i = [], s = function(u) {
|
|
1072
|
-
i = [],
|
|
1073
|
-
|
|
1094
|
+
i = [], V(u) ? u.forEach(function(a) {
|
|
1095
|
+
V(a) ? i = i.concat(a) : L(a) ? Object.keys(a).forEach(function(c) {
|
|
1074
1096
|
i = i.concat(a[c]);
|
|
1075
1097
|
}) : i.push(a);
|
|
1076
1098
|
}) : Object.keys(u).forEach(function(a) {
|
|
1077
|
-
|
|
1099
|
+
V(u[a]) ? i = i.concat(u[a]) : L(u[a]) ? Object.keys(u[a]).forEach(function(c) {
|
|
1078
1100
|
i = i.concat(u[a][c]);
|
|
1079
1101
|
}) : i.push(u[a]);
|
|
1080
1102
|
}), n = i.filter(function(a) {
|
|
1081
|
-
return
|
|
1103
|
+
return L(a);
|
|
1082
1104
|
}), n = n.length === 0, r -= 1;
|
|
1083
1105
|
};
|
|
1084
1106
|
for (s(this.items); !n && r > 0; )
|
|
@@ -1091,16 +1113,16 @@ var Pe = function(t) {
|
|
|
1091
1113
|
}) : Object.keys(this.items).forEach(function(n) {
|
|
1092
1114
|
r[t.items[n]] = n;
|
|
1093
1115
|
}), new this.constructor(r);
|
|
1094
|
-
},
|
|
1116
|
+
}, Je = function(t, r) {
|
|
1095
1117
|
var n = this, i = {};
|
|
1096
1118
|
return Array.isArray(this.items) ? i = this.items.slice(t * r - r, t * r) : Object.keys(this.items).slice(t * r - r, t * r).forEach(function(s) {
|
|
1097
1119
|
i[s] = n.items[s];
|
|
1098
1120
|
}), new this.constructor(i);
|
|
1099
|
-
},
|
|
1121
|
+
}, Ve = function(t) {
|
|
1100
1122
|
return Array.isArray(this.items) ? this.items.splice(t, 1) : delete this.items[t], this;
|
|
1101
|
-
},
|
|
1123
|
+
}, Le = d, He = Le.isFunction, xe = function(t) {
|
|
1102
1124
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1103
|
-
return this.items[t] !== void 0 ? this.items[t] :
|
|
1125
|
+
return this.items[t] !== void 0 ? this.items[t] : He(r) ? r() : r !== null ? r : null;
|
|
1104
1126
|
}, j = function(t, r) {
|
|
1105
1127
|
try {
|
|
1106
1128
|
return r.split(".").reduce(function(n, i) {
|
|
@@ -1109,40 +1131,40 @@ var Pe = function(t) {
|
|
|
1109
1131
|
} catch {
|
|
1110
1132
|
return t;
|
|
1111
1133
|
}
|
|
1112
|
-
},
|
|
1134
|
+
}, H = j, Ge = d, Qe = Ge.isFunction, ze = function(t) {
|
|
1113
1135
|
var r = this, n = {};
|
|
1114
1136
|
return this.items.forEach(function(i, s) {
|
|
1115
1137
|
var o;
|
|
1116
|
-
|
|
1138
|
+
Qe(t) ? o = t(i, s) : H(i, t) || H(i, t) === 0 ? o = H(i, t) : o = "", n[o] === void 0 && (n[o] = new r.constructor([])), n[o].push(i);
|
|
1117
1139
|
}), new this.constructor(n);
|
|
1118
|
-
},
|
|
1140
|
+
}, Xe = R, Ye = function() {
|
|
1119
1141
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1120
1142
|
n[i] = arguments[i];
|
|
1121
|
-
var s =
|
|
1143
|
+
var s = Xe(n);
|
|
1122
1144
|
return s.filter(function(o) {
|
|
1123
1145
|
return Object.hasOwnProperty.call(t.items, o);
|
|
1124
1146
|
}).length === s.length;
|
|
1125
|
-
},
|
|
1147
|
+
}, Ze = function(t, r) {
|
|
1126
1148
|
return r === void 0 ? this.items.join(t) : new this.constructor(this.items).pluck(t).all().join(r);
|
|
1127
|
-
},
|
|
1149
|
+
}, ke = function(t) {
|
|
1128
1150
|
var r = t;
|
|
1129
1151
|
t instanceof this.constructor && (r = t.all());
|
|
1130
1152
|
var n = this.items.filter(function(i) {
|
|
1131
1153
|
return r.indexOf(i) !== -1;
|
|
1132
1154
|
});
|
|
1133
1155
|
return new this.constructor(n);
|
|
1134
|
-
},
|
|
1156
|
+
}, tn = function(t) {
|
|
1135
1157
|
var r = this, n = Object.keys(t);
|
|
1136
1158
|
t instanceof this.constructor && (n = Object.keys(t.all()));
|
|
1137
1159
|
var i = {};
|
|
1138
1160
|
return Object.keys(this.items).forEach(function(s) {
|
|
1139
1161
|
n.indexOf(s) !== -1 && (i[s] = r.items[s]);
|
|
1140
1162
|
}), new this.constructor(i);
|
|
1141
|
-
}, tn = function() {
|
|
1142
|
-
return Array.isArray(this.items) ? !this.items.length : !Object.keys(this.items).length;
|
|
1143
1163
|
}, rn = function() {
|
|
1164
|
+
return Array.isArray(this.items) ? !this.items.length : !Object.keys(this.items).length;
|
|
1165
|
+
}, en = function() {
|
|
1144
1166
|
return !this.isEmpty();
|
|
1145
|
-
},
|
|
1167
|
+
}, nn = function(t, r) {
|
|
1146
1168
|
var n = this.values();
|
|
1147
1169
|
if (r === void 0)
|
|
1148
1170
|
return n.implode(t);
|
|
@@ -1153,18 +1175,18 @@ var Pe = function(t) {
|
|
|
1153
1175
|
return n.last();
|
|
1154
1176
|
var s = n.pop();
|
|
1155
1177
|
return n.implode(t) + r + s;
|
|
1156
|
-
},
|
|
1178
|
+
}, sn = j, on = d, an = on.isFunction, un = function(t) {
|
|
1157
1179
|
var r = {};
|
|
1158
|
-
return
|
|
1180
|
+
return an(t) ? this.items.forEach(function(n) {
|
|
1159
1181
|
r[t(n)] = n;
|
|
1160
1182
|
}) : this.items.forEach(function(n) {
|
|
1161
|
-
var i =
|
|
1183
|
+
var i = sn(n, t);
|
|
1162
1184
|
r[i || ""] = n;
|
|
1163
1185
|
}), new this.constructor(r);
|
|
1164
|
-
},
|
|
1186
|
+
}, cn = function() {
|
|
1165
1187
|
var t = Object.keys(this.items);
|
|
1166
1188
|
return Array.isArray(this.items) && (t = t.map(Number)), new this.constructor(t);
|
|
1167
|
-
},
|
|
1189
|
+
}, fn = d, mt = fn.isFunction, ln = function(t, r) {
|
|
1168
1190
|
var n = this.items;
|
|
1169
1191
|
if (mt(t) && (n = this.filter(t).all()), Array.isArray(n) && !n.length || !Object.keys(n).length)
|
|
1170
1192
|
return mt(r) ? r() : r;
|
|
@@ -1172,12 +1194,12 @@ var Pe = function(t) {
|
|
|
1172
1194
|
return n[n.length - 1];
|
|
1173
1195
|
var i = Object.keys(n);
|
|
1174
1196
|
return n[i[i.length - 1]];
|
|
1175
|
-
},
|
|
1197
|
+
}, hn = function(t, r) {
|
|
1176
1198
|
this.constructor.prototype[t] = r;
|
|
1177
|
-
},
|
|
1199
|
+
}, pn = function() {
|
|
1178
1200
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
1179
1201
|
return new this.constructor(t);
|
|
1180
|
-
},
|
|
1202
|
+
}, yn = function(t) {
|
|
1181
1203
|
var r = this;
|
|
1182
1204
|
if (Array.isArray(this.items))
|
|
1183
1205
|
return new this.constructor(this.items.map(t));
|
|
@@ -1186,14 +1208,14 @@ var Pe = function(t) {
|
|
|
1186
1208
|
n[i] = t(r.items[i], i);
|
|
1187
1209
|
}), new this.constructor(n);
|
|
1188
1210
|
};
|
|
1189
|
-
function
|
|
1190
|
-
return
|
|
1211
|
+
function mn(e) {
|
|
1212
|
+
return gn(e) || bn(e) || vn(e) || dn();
|
|
1191
1213
|
}
|
|
1192
|
-
function
|
|
1214
|
+
function dn() {
|
|
1193
1215
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1194
1216
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1195
1217
|
}
|
|
1196
|
-
function
|
|
1218
|
+
function vn(e, t) {
|
|
1197
1219
|
if (e) {
|
|
1198
1220
|
if (typeof e == "string") return et(e, t);
|
|
1199
1221
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1201,10 +1223,10 @@ function dn(e, t) {
|
|
|
1201
1223
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return et(e, t);
|
|
1202
1224
|
}
|
|
1203
1225
|
}
|
|
1204
|
-
function
|
|
1226
|
+
function bn(e) {
|
|
1205
1227
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1206
1228
|
}
|
|
1207
|
-
function
|
|
1229
|
+
function gn(e) {
|
|
1208
1230
|
if (Array.isArray(e)) return et(e);
|
|
1209
1231
|
}
|
|
1210
1232
|
function et(e, t) {
|
|
@@ -1213,19 +1235,19 @@ function et(e, t) {
|
|
|
1213
1235
|
n[r] = e[r];
|
|
1214
1236
|
return n;
|
|
1215
1237
|
}
|
|
1216
|
-
var
|
|
1238
|
+
var wn = function(t) {
|
|
1217
1239
|
return this.map(function(r, n) {
|
|
1218
|
-
return t.apply(void 0,
|
|
1240
|
+
return t.apply(void 0, mn(r).concat([n]));
|
|
1219
1241
|
});
|
|
1220
1242
|
};
|
|
1221
|
-
function
|
|
1222
|
-
return
|
|
1243
|
+
function An(e, t) {
|
|
1244
|
+
return $n(e) || Sn(e, t) || On(e, t) || _n();
|
|
1223
1245
|
}
|
|
1224
|
-
function
|
|
1246
|
+
function _n() {
|
|
1225
1247
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1226
1248
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1227
1249
|
}
|
|
1228
|
-
function
|
|
1250
|
+
function On(e, t) {
|
|
1229
1251
|
if (e) {
|
|
1230
1252
|
if (typeof e == "string") return dt(e, t);
|
|
1231
1253
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1239,7 +1261,7 @@ function dt(e, t) {
|
|
|
1239
1261
|
n[r] = e[r];
|
|
1240
1262
|
return n;
|
|
1241
1263
|
}
|
|
1242
|
-
function
|
|
1264
|
+
function Sn(e, t) {
|
|
1243
1265
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1244
1266
|
if (r != null) {
|
|
1245
1267
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -1258,28 +1280,28 @@ function On(e, t) {
|
|
|
1258
1280
|
return n;
|
|
1259
1281
|
}
|
|
1260
1282
|
}
|
|
1261
|
-
function
|
|
1283
|
+
function $n(e) {
|
|
1262
1284
|
if (Array.isArray(e)) return e;
|
|
1263
1285
|
}
|
|
1264
|
-
var
|
|
1286
|
+
var jn = function(t) {
|
|
1265
1287
|
var r = {};
|
|
1266
1288
|
return this.items.forEach(function(n, i) {
|
|
1267
|
-
var s = t(n, i), o =
|
|
1289
|
+
var s = t(n, i), o = An(s, 2), u = o[0], a = o[1];
|
|
1268
1290
|
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1269
1291
|
}), new this.constructor(r);
|
|
1270
|
-
},
|
|
1292
|
+
}, En = function(t) {
|
|
1271
1293
|
return this.map(function(r, n) {
|
|
1272
1294
|
return new t(r, n);
|
|
1273
1295
|
});
|
|
1274
1296
|
};
|
|
1275
|
-
function
|
|
1276
|
-
return
|
|
1297
|
+
function In(e, t) {
|
|
1298
|
+
return Tn(e) || Dn(e, t) || Fn(e, t) || Cn();
|
|
1277
1299
|
}
|
|
1278
|
-
function
|
|
1300
|
+
function Cn() {
|
|
1279
1301
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1280
1302
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1281
1303
|
}
|
|
1282
|
-
function
|
|
1304
|
+
function Fn(e, t) {
|
|
1283
1305
|
if (e) {
|
|
1284
1306
|
if (typeof e == "string") return vt(e, t);
|
|
1285
1307
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1293,7 +1315,7 @@ function vt(e, t) {
|
|
|
1293
1315
|
n[r] = e[r];
|
|
1294
1316
|
return n;
|
|
1295
1317
|
}
|
|
1296
|
-
function
|
|
1318
|
+
function Dn(e, t) {
|
|
1297
1319
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1298
1320
|
if (r != null) {
|
|
1299
1321
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -1312,24 +1334,24 @@ function Tn(e, t) {
|
|
|
1312
1334
|
return n;
|
|
1313
1335
|
}
|
|
1314
1336
|
}
|
|
1315
|
-
function
|
|
1337
|
+
function Tn(e) {
|
|
1316
1338
|
if (Array.isArray(e)) return e;
|
|
1317
1339
|
}
|
|
1318
|
-
var
|
|
1340
|
+
var Pn = function(t) {
|
|
1319
1341
|
var r = {};
|
|
1320
1342
|
return this.items.forEach(function(n, i) {
|
|
1321
|
-
var s = t(n, i), o =
|
|
1343
|
+
var s = t(n, i), o = In(s, 2), u = o[0], a = o[1];
|
|
1322
1344
|
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1323
1345
|
}), new this.constructor(r);
|
|
1324
1346
|
};
|
|
1325
1347
|
function bt(e, t) {
|
|
1326
|
-
return
|
|
1348
|
+
return Un(e) || qn(e, t) || Bn(e, t) || Nn();
|
|
1327
1349
|
}
|
|
1328
|
-
function
|
|
1350
|
+
function Nn() {
|
|
1329
1351
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1330
1352
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1331
1353
|
}
|
|
1332
|
-
function
|
|
1354
|
+
function Bn(e, t) {
|
|
1333
1355
|
if (e) {
|
|
1334
1356
|
if (typeof e == "string") return gt(e, t);
|
|
1335
1357
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1343,7 +1365,7 @@ function gt(e, t) {
|
|
|
1343
1365
|
n[r] = e[r];
|
|
1344
1366
|
return n;
|
|
1345
1367
|
}
|
|
1346
|
-
function
|
|
1368
|
+
function qn(e, t) {
|
|
1347
1369
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1348
1370
|
if (r != null) {
|
|
1349
1371
|
var n = [], i = !0, s = !1, o, u;
|
|
@@ -1362,10 +1384,10 @@ function Bn(e, t) {
|
|
|
1362
1384
|
return n;
|
|
1363
1385
|
}
|
|
1364
1386
|
}
|
|
1365
|
-
function
|
|
1387
|
+
function Un(e) {
|
|
1366
1388
|
if (Array.isArray(e)) return e;
|
|
1367
1389
|
}
|
|
1368
|
-
var
|
|
1390
|
+
var Mn = function(t) {
|
|
1369
1391
|
var r = this, n = {};
|
|
1370
1392
|
return Array.isArray(this.items) ? this.items.forEach(function(i, s) {
|
|
1371
1393
|
var o = t(i, s), u = bt(o, 2), a = u[0], c = u[1];
|
|
@@ -1376,13 +1398,13 @@ var xn = function(t) {
|
|
|
1376
1398
|
}), new this.constructor(n);
|
|
1377
1399
|
};
|
|
1378
1400
|
function wt(e) {
|
|
1379
|
-
return
|
|
1401
|
+
return Jn(e) || Wn(e) || Kn(e) || Rn();
|
|
1380
1402
|
}
|
|
1381
|
-
function
|
|
1403
|
+
function Rn() {
|
|
1382
1404
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1383
1405
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1384
1406
|
}
|
|
1385
|
-
function
|
|
1407
|
+
function Kn(e, t) {
|
|
1386
1408
|
if (e) {
|
|
1387
1409
|
if (typeof e == "string") return nt(e, t);
|
|
1388
1410
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1393,7 +1415,7 @@ function Un(e, t) {
|
|
|
1393
1415
|
function Wn(e) {
|
|
1394
1416
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1395
1417
|
}
|
|
1396
|
-
function
|
|
1418
|
+
function Jn(e) {
|
|
1397
1419
|
if (Array.isArray(e)) return nt(e);
|
|
1398
1420
|
}
|
|
1399
1421
|
function nt(e, t) {
|
|
@@ -1402,7 +1424,7 @@ function nt(e, t) {
|
|
|
1402
1424
|
n[r] = e[r];
|
|
1403
1425
|
return n;
|
|
1404
1426
|
}
|
|
1405
|
-
var
|
|
1427
|
+
var Vn = function(t) {
|
|
1406
1428
|
if (typeof t == "string") {
|
|
1407
1429
|
var r = this.items.filter(function(n) {
|
|
1408
1430
|
return n[t] !== void 0;
|
|
@@ -1412,10 +1434,10 @@ var Jn = function(t) {
|
|
|
1412
1434
|
})));
|
|
1413
1435
|
}
|
|
1414
1436
|
return Math.max.apply(Math, wt(this.items));
|
|
1415
|
-
},
|
|
1437
|
+
}, Ln = function(t) {
|
|
1416
1438
|
var r = this.items.length;
|
|
1417
1439
|
return t === void 0 ? r % 2 === 0 ? (this.items[r / 2 - 1] + this.items[r / 2]) / 2 : this.items[Math.floor(r / 2)] : r % 2 === 0 ? (this.items[r / 2 - 1][t] + this.items[r / 2][t]) / 2 : this.items[Math.floor(r / 2)][t];
|
|
1418
|
-
},
|
|
1440
|
+
}, Hn = function(t) {
|
|
1419
1441
|
var r = t;
|
|
1420
1442
|
if (typeof r == "string" && (r = [r]), Array.isArray(this.items) && Array.isArray(r))
|
|
1421
1443
|
return new this.constructor(this.items.concat(r));
|
|
@@ -1424,13 +1446,13 @@ var Jn = function(t) {
|
|
|
1424
1446
|
n[i] = r[i];
|
|
1425
1447
|
}), new this.constructor(n);
|
|
1426
1448
|
};
|
|
1427
|
-
function
|
|
1449
|
+
function M(e) {
|
|
1428
1450
|
"@babel/helpers - typeof";
|
|
1429
|
-
return
|
|
1451
|
+
return M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1430
1452
|
return typeof t;
|
|
1431
1453
|
} : function(t) {
|
|
1432
1454
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1433
|
-
},
|
|
1455
|
+
}, M(e);
|
|
1434
1456
|
}
|
|
1435
1457
|
function At(e, t) {
|
|
1436
1458
|
var r = Object.keys(e);
|
|
@@ -1446,33 +1468,33 @@ function _t(e) {
|
|
|
1446
1468
|
for (var t = 1; t < arguments.length; t++) {
|
|
1447
1469
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1448
1470
|
t % 2 ? At(Object(r), !0).forEach(function(n) {
|
|
1449
|
-
|
|
1471
|
+
xn(e, n, r[n]);
|
|
1450
1472
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : At(Object(r)).forEach(function(n) {
|
|
1451
1473
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1452
1474
|
});
|
|
1453
1475
|
}
|
|
1454
1476
|
return e;
|
|
1455
1477
|
}
|
|
1456
|
-
function
|
|
1478
|
+
function xn(e, t, r) {
|
|
1457
1479
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1458
1480
|
}
|
|
1459
|
-
var
|
|
1481
|
+
var Gn = function(t) {
|
|
1460
1482
|
var r = function n(i, s) {
|
|
1461
1483
|
var o = {}, u = Object.keys(_t(_t({}, i), s));
|
|
1462
1484
|
return u.forEach(function(a) {
|
|
1463
|
-
i[a] === void 0 && s[a] !== void 0 ? o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (i[a] === s[a] ? o[a] = i[a] : !Array.isArray(i[a]) &&
|
|
1485
|
+
i[a] === void 0 && s[a] !== void 0 ? o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (i[a] === s[a] ? o[a] = i[a] : !Array.isArray(i[a]) && M(i[a]) === "object" && !Array.isArray(s[a]) && M(s[a]) === "object" ? o[a] = n(i[a], s[a]) : o[a] = [].concat(i[a], s[a]));
|
|
1464
1486
|
}), o;
|
|
1465
1487
|
};
|
|
1466
1488
|
return t ? t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1467
1489
|
};
|
|
1468
1490
|
function Ot(e) {
|
|
1469
|
-
return
|
|
1491
|
+
return Yn(e) || Xn(e) || zn(e) || Qn();
|
|
1470
1492
|
}
|
|
1471
|
-
function
|
|
1493
|
+
function Qn() {
|
|
1472
1494
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1473
1495
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1474
1496
|
}
|
|
1475
|
-
function
|
|
1497
|
+
function zn(e, t) {
|
|
1476
1498
|
if (e) {
|
|
1477
1499
|
if (typeof e == "string") return it(e, t);
|
|
1478
1500
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -1480,10 +1502,10 @@ function Qn(e, t) {
|
|
|
1480
1502
|
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return it(e, t);
|
|
1481
1503
|
}
|
|
1482
1504
|
}
|
|
1483
|
-
function
|
|
1505
|
+
function Xn(e) {
|
|
1484
1506
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1485
1507
|
}
|
|
1486
|
-
function
|
|
1508
|
+
function Yn(e) {
|
|
1487
1509
|
if (Array.isArray(e)) return it(e);
|
|
1488
1510
|
}
|
|
1489
1511
|
function it(e, t) {
|
|
@@ -1492,7 +1514,7 @@ function it(e, t) {
|
|
|
1492
1514
|
n[r] = e[r];
|
|
1493
1515
|
return n;
|
|
1494
1516
|
}
|
|
1495
|
-
var
|
|
1517
|
+
var Zn = function(t) {
|
|
1496
1518
|
if (t !== void 0) {
|
|
1497
1519
|
var r = this.items.filter(function(n) {
|
|
1498
1520
|
return n[t] !== void 0;
|
|
@@ -1502,7 +1524,7 @@ var Yn = function(t) {
|
|
|
1502
1524
|
})));
|
|
1503
1525
|
}
|
|
1504
1526
|
return Math.min.apply(Math, Ot(this.items));
|
|
1505
|
-
},
|
|
1527
|
+
}, kn = function(t) {
|
|
1506
1528
|
var r = [], n = 1;
|
|
1507
1529
|
return this.items.length ? (this.items.forEach(function(i) {
|
|
1508
1530
|
var s = r.filter(function(u) {
|
|
@@ -1526,15 +1548,15 @@ var Yn = function(t) {
|
|
|
1526
1548
|
}).map(function(i) {
|
|
1527
1549
|
return i.key;
|
|
1528
1550
|
})) : null;
|
|
1529
|
-
},
|
|
1530
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n =
|
|
1551
|
+
}, ti = $, ri = function(t) {
|
|
1552
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = ti(this.items), i = n.slice(r).filter(function(s, o) {
|
|
1531
1553
|
return o % t === 0;
|
|
1532
1554
|
});
|
|
1533
1555
|
return new this.constructor(i);
|
|
1534
|
-
},
|
|
1556
|
+
}, ei = R, ni = function() {
|
|
1535
1557
|
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1536
1558
|
n[i] = arguments[i];
|
|
1537
|
-
var s =
|
|
1559
|
+
var s = ei(n);
|
|
1538
1560
|
if (Array.isArray(this.items)) {
|
|
1539
1561
|
var o = this.items.filter(function(a) {
|
|
1540
1562
|
return s.indexOf(a) !== -1;
|
|
@@ -1545,14 +1567,14 @@ var Yn = function(t) {
|
|
|
1545
1567
|
return Object.keys(this.items).forEach(function(a) {
|
|
1546
1568
|
s.indexOf(a) !== -1 && (u[a] = t.items[a]);
|
|
1547
1569
|
}), new this.constructor(u);
|
|
1548
|
-
},
|
|
1570
|
+
}, ii = Kt, si = function(t, r) {
|
|
1549
1571
|
var n = Math.abs(t), i = this.count();
|
|
1550
1572
|
if (n <= i)
|
|
1551
1573
|
return this;
|
|
1552
|
-
for (var s = n - i, o =
|
|
1574
|
+
for (var s = n - i, o = ii(this.items), u = Array.isArray(this.items), a = t < 0, c = 0; c < s; )
|
|
1553
1575
|
u ? a ? o.unshift(r) : o.push(r) : o[c] !== void 0 ? s += 1 : o[c] = r, c += 1;
|
|
1554
1576
|
return new this.constructor(o);
|
|
1555
|
-
},
|
|
1577
|
+
}, oi = function(t) {
|
|
1556
1578
|
var r = this, n;
|
|
1557
1579
|
return Array.isArray(this.items) ? (n = [new this.constructor([]), new this.constructor([])], this.items.forEach(function(i) {
|
|
1558
1580
|
t(i) === !0 ? n[0].push(i) : n[1].push(i);
|
|
@@ -1560,27 +1582,27 @@ var Yn = function(t) {
|
|
|
1560
1582
|
var s = r.items[i];
|
|
1561
1583
|
t(s) === !0 ? n[0].put(i, s) : n[1].put(i, s);
|
|
1562
1584
|
})), new this.constructor(n);
|
|
1563
|
-
},
|
|
1585
|
+
}, ai = function(t) {
|
|
1564
1586
|
return t(this);
|
|
1565
|
-
},
|
|
1587
|
+
}, Lt = d, ui = Lt.isArray, ci = Lt.isObject, T = j, fi = function(t) {
|
|
1566
1588
|
var r = {};
|
|
1567
1589
|
return t.forEach(function(n, i) {
|
|
1568
1590
|
function s(o, u) {
|
|
1569
|
-
|
|
1591
|
+
ci(o) ? Object.keys(o).forEach(function(a) {
|
|
1570
1592
|
s(o[a], "".concat(u, ".").concat(a));
|
|
1571
|
-
}) :
|
|
1593
|
+
}) : ui(o) && o.forEach(function(a, c) {
|
|
1572
1594
|
s(a, "".concat(u, ".").concat(c));
|
|
1573
1595
|
}), r[u] = o;
|
|
1574
1596
|
}
|
|
1575
1597
|
s(n, i);
|
|
1576
1598
|
}), r;
|
|
1577
|
-
},
|
|
1599
|
+
}, li = function(t, r) {
|
|
1578
1600
|
if (t.indexOf("*") !== -1) {
|
|
1579
|
-
var n =
|
|
1601
|
+
var n = fi(this.items), i = [];
|
|
1580
1602
|
if (r !== void 0) {
|
|
1581
1603
|
var s = new RegExp("0.".concat(r), "g"), o = "0.".concat(r).split(".").length;
|
|
1582
|
-
Object.keys(n).forEach(function(
|
|
1583
|
-
var m =
|
|
1604
|
+
Object.keys(n).forEach(function(l) {
|
|
1605
|
+
var m = l.match(s);
|
|
1584
1606
|
if (m) {
|
|
1585
1607
|
var g = m[0];
|
|
1586
1608
|
g.split(".").length === o && i.push(n[g]);
|
|
@@ -1588,42 +1610,42 @@ var Yn = function(t) {
|
|
|
1588
1610
|
});
|
|
1589
1611
|
}
|
|
1590
1612
|
var u = [], a = new RegExp("0.".concat(t), "g"), c = "0.".concat(t).split(".").length;
|
|
1591
|
-
if (Object.keys(n).forEach(function(
|
|
1592
|
-
var m =
|
|
1613
|
+
if (Object.keys(n).forEach(function(l) {
|
|
1614
|
+
var m = l.match(a);
|
|
1593
1615
|
if (m) {
|
|
1594
1616
|
var g = m[0];
|
|
1595
1617
|
g.split(".").length === c && u.push(n[g]);
|
|
1596
1618
|
}
|
|
1597
1619
|
}), r !== void 0) {
|
|
1598
|
-
var
|
|
1599
|
-
return this.items.forEach(function(
|
|
1600
|
-
|
|
1601
|
-
}), new this.constructor(
|
|
1620
|
+
var p = {};
|
|
1621
|
+
return this.items.forEach(function(l, m) {
|
|
1622
|
+
p[i[m] || ""] = u;
|
|
1623
|
+
}), new this.constructor(p);
|
|
1602
1624
|
}
|
|
1603
1625
|
return new this.constructor([u]);
|
|
1604
1626
|
}
|
|
1605
1627
|
if (r !== void 0) {
|
|
1606
1628
|
var v = {};
|
|
1607
|
-
return this.items.forEach(function(
|
|
1608
|
-
|
|
1629
|
+
return this.items.forEach(function(l) {
|
|
1630
|
+
T(l, t) !== void 0 ? v[l[r] || ""] = T(l, t) : v[l[r] || ""] = null;
|
|
1609
1631
|
}), new this.constructor(v);
|
|
1610
1632
|
}
|
|
1611
|
-
return this.map(function(
|
|
1612
|
-
return
|
|
1633
|
+
return this.map(function(l) {
|
|
1634
|
+
return T(l, t) !== void 0 ? T(l, t) : null;
|
|
1613
1635
|
});
|
|
1614
|
-
},
|
|
1636
|
+
}, hi = R, Ht = function(t) {
|
|
1615
1637
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
1616
1638
|
n[i - 1] = arguments[i];
|
|
1617
|
-
|
|
1639
|
+
hi(n).forEach(function(s) {
|
|
1618
1640
|
delete t[s];
|
|
1619
1641
|
});
|
|
1620
|
-
},
|
|
1642
|
+
}, xt = d, pi = xt.isArray, yi = xt.isObject, St = Ht, mi = function() {
|
|
1621
1643
|
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1622
1644
|
if (this.isEmpty())
|
|
1623
1645
|
return null;
|
|
1624
|
-
if (
|
|
1646
|
+
if (pi(this.items))
|
|
1625
1647
|
return r === 1 ? this.items.pop() : new this.constructor(this.items.splice(-r));
|
|
1626
|
-
if (
|
|
1648
|
+
if (yi(this.items)) {
|
|
1627
1649
|
var n = Object.keys(this.items);
|
|
1628
1650
|
if (r === 1) {
|
|
1629
1651
|
var i = n[n.length - 1], s = this.items[i];
|
|
@@ -1635,27 +1657,27 @@ var Yn = function(t) {
|
|
|
1635
1657
|
return St(this.items, o), new this.constructor(u);
|
|
1636
1658
|
}
|
|
1637
1659
|
return null;
|
|
1638
|
-
},
|
|
1660
|
+
}, di = function(t, r) {
|
|
1639
1661
|
return r !== void 0 ? this.put(r, t) : (this.items.unshift(t), this);
|
|
1640
|
-
},
|
|
1662
|
+
}, vi = d, bi = vi.isFunction, gi = function(t, r) {
|
|
1641
1663
|
var n = this.items[t] || null;
|
|
1642
|
-
return !n && r !== void 0 && (
|
|
1643
|
-
},
|
|
1664
|
+
return !n && r !== void 0 && (bi(r) ? n = r() : n = r), delete this.items[t], n;
|
|
1665
|
+
}, wi = function() {
|
|
1644
1666
|
var t;
|
|
1645
1667
|
return (t = this.items).push.apply(t, arguments), this;
|
|
1646
|
-
},
|
|
1668
|
+
}, Ai = function(t, r) {
|
|
1647
1669
|
return this.items[t] = r, this;
|
|
1648
|
-
},
|
|
1649
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, r =
|
|
1670
|
+
}, _i = $, Oi = function() {
|
|
1671
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, r = _i(this.items), n = new this.constructor(r).shuffle();
|
|
1650
1672
|
return t !== parseInt(t, 10) ? n.first() : n.take(t);
|
|
1651
|
-
},
|
|
1673
|
+
}, Si = function(t, r) {
|
|
1652
1674
|
var n = this, i = null;
|
|
1653
1675
|
return r !== void 0 && (i = r), Array.isArray(this.items) ? this.items.forEach(function(s) {
|
|
1654
1676
|
i = t(i, s);
|
|
1655
1677
|
}) : Object.keys(this.items).forEach(function(s) {
|
|
1656
1678
|
i = t(i, n.items[s], s);
|
|
1657
1679
|
}), i;
|
|
1658
|
-
},
|
|
1680
|
+
}, $i = function(t) {
|
|
1659
1681
|
return new this.constructor(this.items).filter(function(r) {
|
|
1660
1682
|
return !t(r);
|
|
1661
1683
|
});
|
|
@@ -1670,21 +1692,21 @@ function $t(e, t) {
|
|
|
1670
1692
|
}
|
|
1671
1693
|
return r;
|
|
1672
1694
|
}
|
|
1673
|
-
function
|
|
1695
|
+
function P(e) {
|
|
1674
1696
|
for (var t = 1; t < arguments.length; t++) {
|
|
1675
1697
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1676
1698
|
t % 2 ? $t(Object(r), !0).forEach(function(n) {
|
|
1677
|
-
|
|
1699
|
+
ji(e, n, r[n]);
|
|
1678
1700
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : $t(Object(r)).forEach(function(n) {
|
|
1679
1701
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1680
1702
|
});
|
|
1681
1703
|
}
|
|
1682
1704
|
return e;
|
|
1683
1705
|
}
|
|
1684
|
-
function
|
|
1706
|
+
function ji(e, t, r) {
|
|
1685
1707
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1686
1708
|
}
|
|
1687
|
-
var
|
|
1709
|
+
var Ei = function(t) {
|
|
1688
1710
|
if (!t)
|
|
1689
1711
|
return this;
|
|
1690
1712
|
if (Array.isArray(t)) {
|
|
@@ -1694,10 +1716,10 @@ var ji = function(t) {
|
|
|
1694
1716
|
return new this.constructor(r);
|
|
1695
1717
|
}
|
|
1696
1718
|
if (t.constructor.name === "Collection") {
|
|
1697
|
-
var n =
|
|
1719
|
+
var n = P(P({}, this.items), t.all());
|
|
1698
1720
|
return new this.constructor(n);
|
|
1699
1721
|
}
|
|
1700
|
-
var i =
|
|
1722
|
+
var i = P(P({}, this.items), t);
|
|
1701
1723
|
return new this.constructor(i);
|
|
1702
1724
|
};
|
|
1703
1725
|
function I(e) {
|
|
@@ -1718,45 +1740,45 @@ function jt(e, t) {
|
|
|
1718
1740
|
}
|
|
1719
1741
|
return r;
|
|
1720
1742
|
}
|
|
1721
|
-
function
|
|
1743
|
+
function F(e) {
|
|
1722
1744
|
for (var t = 1; t < arguments.length; t++) {
|
|
1723
1745
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1724
1746
|
t % 2 ? jt(Object(r), !0).forEach(function(n) {
|
|
1725
|
-
|
|
1747
|
+
Ii(e, n, r[n]);
|
|
1726
1748
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : jt(Object(r)).forEach(function(n) {
|
|
1727
1749
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1728
1750
|
});
|
|
1729
1751
|
}
|
|
1730
1752
|
return e;
|
|
1731
1753
|
}
|
|
1732
|
-
function
|
|
1754
|
+
function Ii(e, t, r) {
|
|
1733
1755
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1734
1756
|
}
|
|
1735
|
-
var
|
|
1757
|
+
var Ci = function(t) {
|
|
1736
1758
|
var r = function n(i, s) {
|
|
1737
|
-
var o =
|
|
1759
|
+
var o = F({}, i), u = Object.keys(F(F({}, i), s));
|
|
1738
1760
|
return u.forEach(function(a) {
|
|
1739
|
-
!Array.isArray(s[a]) && I(s[a]) === "object" ? o[a] = n(i[a], s[a]) : i[a] === void 0 && s[a] !== void 0 ? I(i[a]) === "object" ? o[a] =
|
|
1761
|
+
!Array.isArray(s[a]) && I(s[a]) === "object" ? o[a] = n(i[a], s[a]) : i[a] === void 0 && s[a] !== void 0 ? I(i[a]) === "object" ? o[a] = F({}, s[a]) : o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? I(i[a]) === "object" ? o[a] = F({}, i[a]) : o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (I(s[a]) === "object" ? o[a] = F({}, s[a]) : o[a] = s[a]);
|
|
1740
1762
|
}), o;
|
|
1741
1763
|
};
|
|
1742
1764
|
return t ? !Array.isArray(t) && I(t) !== "object" ? new this.constructor(r(this.items, [t])) : t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1743
|
-
},
|
|
1765
|
+
}, Fi = function() {
|
|
1744
1766
|
var t = [].concat(this.items).reverse();
|
|
1745
1767
|
return new this.constructor(t);
|
|
1746
|
-
}, ut = d,
|
|
1768
|
+
}, ut = d, Di = ut.isArray, Ti = ut.isObject, Pi = ut.isFunction, Ni = function(t, r) {
|
|
1747
1769
|
var n = this, i, s = function(u, a) {
|
|
1748
|
-
return
|
|
1770
|
+
return Pi(t) ? t(n.items[a], a) : r ? n.items[a] === t : n.items[a] == t;
|
|
1749
1771
|
};
|
|
1750
|
-
return
|
|
1772
|
+
return Di(this.items) ? i = this.items.findIndex(s) : Ti(this.items) && (i = Object.keys(this.items).find(function(o) {
|
|
1751
1773
|
return s(n.items[o], o);
|
|
1752
1774
|
})), i === void 0 || i < 0 ? !1 : i;
|
|
1753
|
-
}, Gt = d,
|
|
1775
|
+
}, Gt = d, Bi = Gt.isArray, qi = Gt.isObject, Ui = Ht, Mi = function() {
|
|
1754
1776
|
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1755
1777
|
if (this.isEmpty())
|
|
1756
1778
|
return null;
|
|
1757
|
-
if (
|
|
1779
|
+
if (Bi(this.items))
|
|
1758
1780
|
return r === 1 ? this.items.shift() : new this.constructor(this.items.splice(0, r));
|
|
1759
|
-
if (
|
|
1781
|
+
if (qi(this.items)) {
|
|
1760
1782
|
if (r === 1) {
|
|
1761
1783
|
var n = Object.keys(this.items)[0], i = this.items[n];
|
|
1762
1784
|
return delete this.items[n], i;
|
|
@@ -1764,92 +1786,92 @@ var Ii = function(t) {
|
|
|
1764
1786
|
var s = Object.keys(this.items), o = s.slice(0, r), u = o.reduce(function(a, c) {
|
|
1765
1787
|
return a[c] = t.items[c], a;
|
|
1766
1788
|
}, {});
|
|
1767
|
-
return
|
|
1789
|
+
return Ui(this.items, o), new this.constructor(u);
|
|
1768
1790
|
}
|
|
1769
1791
|
return null;
|
|
1770
|
-
},
|
|
1771
|
-
var t =
|
|
1792
|
+
}, Ri = $, Ki = function() {
|
|
1793
|
+
var t = Ri(this.items), r, n, i;
|
|
1772
1794
|
for (i = t.length; i; i -= 1)
|
|
1773
1795
|
r = Math.floor(Math.random() * i), n = t[i - 1], t[i - 1] = t[r], t[r] = n;
|
|
1774
1796
|
return this.items = t, this;
|
|
1775
|
-
}, Wi = d,
|
|
1797
|
+
}, Wi = d, Ji = Wi.isObject, Vi = function(t) {
|
|
1776
1798
|
var r = this;
|
|
1777
|
-
return
|
|
1799
|
+
return Ji(this.items) ? new this.constructor(Object.keys(this.items).reduce(function(n, i, s) {
|
|
1778
1800
|
return s + 1 > t && (n[i] = r.items[i]), n;
|
|
1779
1801
|
}, {})) : new this.constructor(this.items.slice(t));
|
|
1780
|
-
}, ct = d,
|
|
1802
|
+
}, ct = d, Li = ct.isArray, Hi = ct.isObject, xi = ct.isFunction, Gi = function(t) {
|
|
1781
1803
|
var r = this, n = null, i, s = function(u) {
|
|
1782
1804
|
return u === t;
|
|
1783
1805
|
};
|
|
1784
|
-
return
|
|
1806
|
+
return xi(t) && (s = t), Li(this.items) && (i = this.items.filter(function(o) {
|
|
1785
1807
|
return n !== !0 && (n = s(o)), n;
|
|
1786
|
-
})),
|
|
1808
|
+
})), Hi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1787
1809
|
return n !== !0 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1788
1810
|
}, {})), new this.constructor(i);
|
|
1789
|
-
}, ft = d,
|
|
1811
|
+
}, ft = d, Qi = ft.isArray, zi = ft.isObject, Xi = ft.isFunction, Yi = function(t) {
|
|
1790
1812
|
var r = this, n = null, i, s = function(u) {
|
|
1791
1813
|
return u === t;
|
|
1792
1814
|
};
|
|
1793
|
-
return
|
|
1815
|
+
return Xi(t) && (s = t), Qi(this.items) && (i = this.items.filter(function(o) {
|
|
1794
1816
|
return n !== !0 && (n = !s(o)), n;
|
|
1795
|
-
})),
|
|
1817
|
+
})), zi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1796
1818
|
return n !== !0 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1797
1819
|
}, {})), new this.constructor(i);
|
|
1798
|
-
},
|
|
1820
|
+
}, Zi = function(t, r) {
|
|
1799
1821
|
var n = this.items.slice(t);
|
|
1800
1822
|
return r !== void 0 && (n = n.slice(0, r)), new this.constructor(n);
|
|
1801
|
-
},
|
|
1823
|
+
}, ki = d, ts = ki.isFunction, rs = function(t, r, n) {
|
|
1802
1824
|
var i;
|
|
1803
|
-
if (
|
|
1825
|
+
if (ts(t) ? i = this.filter(t) : i = this.where(t, r, n), i.isEmpty())
|
|
1804
1826
|
throw new Error("Item not found.");
|
|
1805
1827
|
if (i.count() > 1)
|
|
1806
1828
|
throw new Error("Multiple items found.");
|
|
1807
1829
|
return i.first();
|
|
1808
|
-
},
|
|
1830
|
+
}, es = Wt, ns = es, is = function(t) {
|
|
1809
1831
|
var r = [].concat(this.items);
|
|
1810
1832
|
return t === void 0 ? this.every(function(n) {
|
|
1811
1833
|
return typeof n == "number";
|
|
1812
1834
|
}) ? r.sort(function(n, i) {
|
|
1813
1835
|
return n - i;
|
|
1814
1836
|
}) : r.sort() : r.sort(t), new this.constructor(r);
|
|
1815
|
-
},
|
|
1837
|
+
}, ss = function() {
|
|
1816
1838
|
return this.sort().reverse();
|
|
1817
|
-
},
|
|
1839
|
+
}, os = j, as = d, us = as.isFunction, cs = function(t) {
|
|
1818
1840
|
var r = [].concat(this.items), n = function(s) {
|
|
1819
|
-
return
|
|
1841
|
+
return us(t) ? t(s) : os(s, t);
|
|
1820
1842
|
};
|
|
1821
1843
|
return r.sort(function(i, s) {
|
|
1822
1844
|
var o = n(i), u = n(s);
|
|
1823
1845
|
return o == null ? 1 : u == null || o < u ? -1 : o > u ? 1 : 0;
|
|
1824
1846
|
}), new this.constructor(r);
|
|
1825
|
-
},
|
|
1847
|
+
}, fs = function(t) {
|
|
1826
1848
|
return this.sortBy(t).reverse();
|
|
1827
|
-
},
|
|
1849
|
+
}, ls = function() {
|
|
1828
1850
|
var t = this, r = {};
|
|
1829
1851
|
return Object.keys(this.items).sort().forEach(function(n) {
|
|
1830
1852
|
r[n] = t.items[n];
|
|
1831
1853
|
}), new this.constructor(r);
|
|
1832
|
-
},
|
|
1854
|
+
}, hs = function() {
|
|
1833
1855
|
var t = this, r = {};
|
|
1834
1856
|
return Object.keys(this.items).sort().reverse().forEach(function(n) {
|
|
1835
1857
|
r[n] = t.items[n];
|
|
1836
1858
|
}), new this.constructor(r);
|
|
1837
|
-
},
|
|
1859
|
+
}, ps = function(t, r, n) {
|
|
1838
1860
|
var i = this.slice(t, r);
|
|
1839
1861
|
if (this.items = this.diff(i.all()).all(), Array.isArray(n))
|
|
1840
1862
|
for (var s = 0, o = n.length; s < o; s += 1)
|
|
1841
1863
|
this.items.splice(t + s, 0, n[s]);
|
|
1842
1864
|
return i;
|
|
1843
|
-
},
|
|
1865
|
+
}, ys = function(t) {
|
|
1844
1866
|
for (var r = Math.round(this.items.length / t), n = JSON.parse(JSON.stringify(this.items)), i = [], s = 0; s < t; s += 1)
|
|
1845
1867
|
i.push(new this.constructor(n.splice(0, r)));
|
|
1846
1868
|
return new this.constructor(i);
|
|
1847
|
-
},
|
|
1848
|
-
var r =
|
|
1869
|
+
}, ms = $, ds = d, vs = ds.isFunction, bs = function(t) {
|
|
1870
|
+
var r = ms(this.items), n = 0;
|
|
1849
1871
|
if (t === void 0)
|
|
1850
1872
|
for (var i = 0, s = r.length; i < s; i += 1)
|
|
1851
1873
|
n += parseFloat(r[i]);
|
|
1852
|
-
else if (
|
|
1874
|
+
else if (vs(t))
|
|
1853
1875
|
for (var o = 0, u = r.length; o < u; o += 1)
|
|
1854
1876
|
n += parseFloat(t(r[o]));
|
|
1855
1877
|
else
|
|
@@ -1865,7 +1887,7 @@ function st(e) {
|
|
|
1865
1887
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1866
1888
|
}, st(e);
|
|
1867
1889
|
}
|
|
1868
|
-
var
|
|
1890
|
+
var gs = function(t) {
|
|
1869
1891
|
var r = this;
|
|
1870
1892
|
if (!Array.isArray(this.items) && st(this.items) === "object") {
|
|
1871
1893
|
var n = Object.keys(this.items), i;
|
|
@@ -1876,31 +1898,31 @@ var bs = function(t) {
|
|
|
1876
1898
|
}), new this.constructor(s);
|
|
1877
1899
|
}
|
|
1878
1900
|
return t < 0 ? new this.constructor(this.items.slice(t)) : new this.constructor(this.items.slice(0, t));
|
|
1879
|
-
}, lt = d,
|
|
1901
|
+
}, lt = d, ws = lt.isArray, As = lt.isObject, _s = lt.isFunction, Os = function(t) {
|
|
1880
1902
|
var r = this, n = null, i, s = function(u) {
|
|
1881
1903
|
return u === t;
|
|
1882
1904
|
};
|
|
1883
|
-
return
|
|
1905
|
+
return _s(t) && (s = t), ws(this.items) && (i = this.items.filter(function(o) {
|
|
1884
1906
|
return n !== !1 && (n = !s(o)), n;
|
|
1885
|
-
})),
|
|
1907
|
+
})), As(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1886
1908
|
return n !== !1 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1887
1909
|
}, {})), new this.constructor(i);
|
|
1888
|
-
}, ht = d,
|
|
1910
|
+
}, ht = d, Ss = ht.isArray, $s = ht.isObject, js = ht.isFunction, Es = function(t) {
|
|
1889
1911
|
var r = this, n = null, i, s = function(u) {
|
|
1890
1912
|
return u === t;
|
|
1891
1913
|
};
|
|
1892
|
-
return
|
|
1914
|
+
return js(t) && (s = t), Ss(this.items) && (i = this.items.filter(function(o) {
|
|
1893
1915
|
return n !== !1 && (n = s(o)), n;
|
|
1894
|
-
})),
|
|
1916
|
+
})), $s(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1895
1917
|
return n !== !1 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1896
1918
|
}, {})), new this.constructor(i);
|
|
1897
|
-
},
|
|
1919
|
+
}, Is = function(t) {
|
|
1898
1920
|
return t(this), this;
|
|
1899
|
-
},
|
|
1921
|
+
}, Cs = function(t, r) {
|
|
1900
1922
|
for (var n = 1; n <= t; n += 1)
|
|
1901
1923
|
this.items.push(r(n));
|
|
1902
1924
|
return this;
|
|
1903
|
-
},
|
|
1925
|
+
}, Fs = function() {
|
|
1904
1926
|
var t = this.constructor;
|
|
1905
1927
|
function r(i, s) {
|
|
1906
1928
|
var o = [];
|
|
@@ -1926,9 +1948,9 @@ function ot(e) {
|
|
|
1926
1948
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1927
1949
|
}, ot(e);
|
|
1928
1950
|
}
|
|
1929
|
-
var
|
|
1951
|
+
var Ds = function() {
|
|
1930
1952
|
return ot(this.items) === "object" && !Array.isArray(this.items) ? JSON.stringify(this.all()) : JSON.stringify(this.toArray());
|
|
1931
|
-
},
|
|
1953
|
+
}, Ts = function(t) {
|
|
1932
1954
|
var r = this;
|
|
1933
1955
|
if (Array.isArray(this.items))
|
|
1934
1956
|
this.items = this.items.map(t);
|
|
@@ -1954,17 +1976,17 @@ function It(e) {
|
|
|
1954
1976
|
for (var t = 1; t < arguments.length; t++) {
|
|
1955
1977
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1956
1978
|
t % 2 ? Et(Object(r), !0).forEach(function(n) {
|
|
1957
|
-
|
|
1979
|
+
Ps(e, n, r[n]);
|
|
1958
1980
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Et(Object(r)).forEach(function(n) {
|
|
1959
1981
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1960
1982
|
});
|
|
1961
1983
|
}
|
|
1962
1984
|
return e;
|
|
1963
1985
|
}
|
|
1964
|
-
function
|
|
1986
|
+
function Ps(e, t, r) {
|
|
1965
1987
|
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1966
1988
|
}
|
|
1967
|
-
var
|
|
1989
|
+
var Ns = function() {
|
|
1968
1990
|
var t = this;
|
|
1969
1991
|
if (Array.isArray(this.items))
|
|
1970
1992
|
return this;
|
|
@@ -1978,7 +2000,7 @@ var Ds = function() {
|
|
|
1978
2000
|
} else
|
|
1979
2001
|
r[n] = t.items[n];
|
|
1980
2002
|
}), new this.constructor(r);
|
|
1981
|
-
},
|
|
2003
|
+
}, Bs = function(t, r, n) {
|
|
1982
2004
|
t ? n(this) : r(this);
|
|
1983
2005
|
}, Ct = function(t, r) {
|
|
1984
2006
|
if (Array.isArray(this.items) && this.items.length)
|
|
@@ -1992,7 +2014,7 @@ var Ds = function() {
|
|
|
1992
2014
|
return r(this);
|
|
1993
2015
|
}
|
|
1994
2016
|
return this;
|
|
1995
|
-
},
|
|
2017
|
+
}, Ft = function(t, r) {
|
|
1996
2018
|
if (Array.isArray(this.items) && !this.items.length)
|
|
1997
2019
|
return t(this);
|
|
1998
2020
|
if (!Object.keys(this.items).length)
|
|
@@ -2004,12 +2026,12 @@ var Ds = function() {
|
|
|
2004
2026
|
return r(this);
|
|
2005
2027
|
}
|
|
2006
2028
|
return this;
|
|
2007
|
-
},
|
|
2029
|
+
}, qs = function(t) {
|
|
2008
2030
|
var r = this, n = JSON.parse(JSON.stringify(this.items));
|
|
2009
2031
|
return Object.keys(t).forEach(function(i) {
|
|
2010
2032
|
r.items[i] === void 0 && (n[i] = t[i]);
|
|
2011
2033
|
}), new this.constructor(n);
|
|
2012
|
-
},
|
|
2034
|
+
}, Us = d, Ms = Us.isFunction, Rs = function(t) {
|
|
2013
2035
|
var r;
|
|
2014
2036
|
if (t === void 0)
|
|
2015
2037
|
r = this.items.filter(function(u, a, c) {
|
|
@@ -2019,74 +2041,74 @@ var Ds = function() {
|
|
|
2019
2041
|
r = [];
|
|
2020
2042
|
for (var n = [], i = 0, s = this.items.length; i < s; i += 1) {
|
|
2021
2043
|
var o = void 0;
|
|
2022
|
-
|
|
2044
|
+
Ms(t) ? o = t(this.items[i]) : o = this.items[i][t], n.indexOf(o) === -1 && (r.push(this.items[i]), n.push(o));
|
|
2023
2045
|
}
|
|
2024
2046
|
}
|
|
2025
2047
|
return new this.constructor(r);
|
|
2026
|
-
},
|
|
2048
|
+
}, Ks = function(t) {
|
|
2027
2049
|
return t instanceof this.constructor ? t.all() : t;
|
|
2028
|
-
}, Ws = $,
|
|
2050
|
+
}, Ws = $, Js = function() {
|
|
2029
2051
|
return new this.constructor(Ws(this.items));
|
|
2030
|
-
},
|
|
2052
|
+
}, Vs = function(t, r, n) {
|
|
2031
2053
|
return t ? r(this, t) : n ? n(this, t) : this;
|
|
2032
|
-
},
|
|
2033
|
-
var i = r, s = n, o =
|
|
2054
|
+
}, Ls = $, O = j, Hs = function(t, r, n) {
|
|
2055
|
+
var i = r, s = n, o = Ls(this.items);
|
|
2034
2056
|
if (r === void 0 || r === !0)
|
|
2035
2057
|
return new this.constructor(o.filter(function(a) {
|
|
2036
|
-
return
|
|
2058
|
+
return O(a, t);
|
|
2037
2059
|
}));
|
|
2038
2060
|
if (r === !1)
|
|
2039
2061
|
return new this.constructor(o.filter(function(a) {
|
|
2040
|
-
return !
|
|
2062
|
+
return !O(a, t);
|
|
2041
2063
|
}));
|
|
2042
2064
|
n === void 0 && (s = r, i = "===");
|
|
2043
2065
|
var u = o.filter(function(a) {
|
|
2044
2066
|
switch (i) {
|
|
2045
2067
|
case "==":
|
|
2046
|
-
return
|
|
2068
|
+
return O(a, t) === Number(s) || O(a, t) === s.toString();
|
|
2047
2069
|
default:
|
|
2048
2070
|
case "===":
|
|
2049
|
-
return
|
|
2071
|
+
return O(a, t) === s;
|
|
2050
2072
|
case "!=":
|
|
2051
2073
|
case "<>":
|
|
2052
|
-
return
|
|
2074
|
+
return O(a, t) !== Number(s) && O(a, t) !== s.toString();
|
|
2053
2075
|
case "!==":
|
|
2054
|
-
return
|
|
2076
|
+
return O(a, t) !== s;
|
|
2055
2077
|
case "<":
|
|
2056
|
-
return
|
|
2078
|
+
return O(a, t) < s;
|
|
2057
2079
|
case "<=":
|
|
2058
|
-
return
|
|
2080
|
+
return O(a, t) <= s;
|
|
2059
2081
|
case ">":
|
|
2060
|
-
return
|
|
2082
|
+
return O(a, t) > s;
|
|
2061
2083
|
case ">=":
|
|
2062
|
-
return
|
|
2084
|
+
return O(a, t) >= s;
|
|
2063
2085
|
}
|
|
2064
2086
|
});
|
|
2065
2087
|
return new this.constructor(u);
|
|
2066
|
-
},
|
|
2088
|
+
}, xs = function(t, r) {
|
|
2067
2089
|
return this.where(t, ">=", r[0]).where(t, "<=", r[r.length - 1]);
|
|
2068
|
-
},
|
|
2069
|
-
var n =
|
|
2070
|
-
return n.indexOf(
|
|
2090
|
+
}, Gs = $, Qs = j, zs = function(t, r) {
|
|
2091
|
+
var n = Gs(r), i = this.items.filter(function(s) {
|
|
2092
|
+
return n.indexOf(Qs(s, t)) !== -1;
|
|
2071
2093
|
});
|
|
2072
2094
|
return new this.constructor(i);
|
|
2073
|
-
},
|
|
2095
|
+
}, Xs = function(t) {
|
|
2074
2096
|
return this.filter(function(r) {
|
|
2075
2097
|
return r instanceof t;
|
|
2076
2098
|
});
|
|
2077
|
-
},
|
|
2099
|
+
}, Dt = j, Ys = function(t, r) {
|
|
2078
2100
|
return this.filter(function(n) {
|
|
2079
|
-
return
|
|
2101
|
+
return Dt(n, t) < r[0] || Dt(n, t) > r[r.length - 1];
|
|
2080
2102
|
});
|
|
2081
|
-
},
|
|
2082
|
-
var n =
|
|
2083
|
-
return n.indexOf(
|
|
2103
|
+
}, Zs = $, ks = j, to = function(t, r) {
|
|
2104
|
+
var n = Zs(r), i = this.items.filter(function(s) {
|
|
2105
|
+
return n.indexOf(ks(s, t)) === -1;
|
|
2084
2106
|
});
|
|
2085
2107
|
return new this.constructor(i);
|
|
2086
|
-
},
|
|
2108
|
+
}, ro = function() {
|
|
2087
2109
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2088
2110
|
return this.where(t, "===", null);
|
|
2089
|
-
},
|
|
2111
|
+
}, eo = function() {
|
|
2090
2112
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2091
2113
|
return this.where(t, "!==", null);
|
|
2092
2114
|
};
|
|
@@ -2098,9 +2120,9 @@ function at(e) {
|
|
|
2098
2120
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2099
2121
|
}, at(e);
|
|
2100
2122
|
}
|
|
2101
|
-
var
|
|
2123
|
+
var no = function(t) {
|
|
2102
2124
|
return t instanceof this.constructor ? t : at(t) === "object" ? new this.constructor(t) : new this.constructor([t]);
|
|
2103
|
-
},
|
|
2125
|
+
}, io = function(t) {
|
|
2104
2126
|
var r = this, n = t;
|
|
2105
2127
|
n instanceof this.constructor && (n = n.all());
|
|
2106
2128
|
var i = this.items.map(function(s, o) {
|
|
@@ -2120,17 +2142,17 @@ var eo = function(t) {
|
|
|
2120
2142
|
function r(s) {
|
|
2121
2143
|
s !== void 0 && !Array.isArray(s) && t(s) !== "object" ? this.items = [s] : s instanceof this.constructor ? this.items = s.all() : this.items = s || [];
|
|
2122
2144
|
}
|
|
2123
|
-
var n =
|
|
2145
|
+
var n = Or;
|
|
2124
2146
|
typeof Symbol < "u" && (r.prototype[Symbol.iterator] = n), r.prototype.toJSON = function() {
|
|
2125
2147
|
return this.items;
|
|
2126
|
-
}, r.prototype.all =
|
|
2148
|
+
}, r.prototype.all = Sr, r.prototype.average = Rt, r.prototype.avg = Ir, r.prototype.chunk = Cr, r.prototype.collapse = Br, r.prototype.combine = Wr, r.prototype.concat = Qr, r.prototype.contains = Wt, r.prototype.containsOneItem = ae, r.prototype.count = ue, r.prototype.countBy = ce, r.prototype.crossJoin = fe, r.prototype.dd = le, r.prototype.diff = he, r.prototype.diffAssoc = pe, r.prototype.diffKeys = ye, r.prototype.diffUsing = me, r.prototype.doesntContain = de, r.prototype.dump = ve, r.prototype.duplicates = be, r.prototype.each = ge, r.prototype.eachSpread = $e, r.prototype.every = Ee, r.prototype.except = Ce, r.prototype.filter = Te, r.prototype.first = Ne, r.prototype.firstOrFail = Ue, r.prototype.firstWhere = Me, r.prototype.flatMap = Re, r.prototype.flatten = Ke, r.prototype.flip = We, r.prototype.forPage = Je, r.prototype.forget = Ve, r.prototype.get = xe, r.prototype.groupBy = ze, r.prototype.has = Ye, r.prototype.implode = Ze, r.prototype.intersect = ke, r.prototype.intersectByKeys = tn, r.prototype.isEmpty = rn, r.prototype.isNotEmpty = en, r.prototype.join = nn, r.prototype.keyBy = un, r.prototype.keys = cn, r.prototype.last = ln, r.prototype.macro = hn, r.prototype.make = pn, r.prototype.map = yn, r.prototype.mapSpread = wn, r.prototype.mapToDictionary = jn, r.prototype.mapInto = En, r.prototype.mapToGroups = Pn, r.prototype.mapWithKeys = Mn, r.prototype.max = Vn, r.prototype.median = Ln, r.prototype.merge = Hn, r.prototype.mergeRecursive = Gn, r.prototype.min = Zn, r.prototype.mode = kn, r.prototype.nth = ri, r.prototype.only = ni, r.prototype.pad = si, r.prototype.partition = oi, r.prototype.pipe = ai, r.prototype.pluck = li, r.prototype.pop = mi, r.prototype.prepend = di, r.prototype.pull = gi, r.prototype.push = wi, r.prototype.put = Ai, r.prototype.random = Oi, r.prototype.reduce = Si, r.prototype.reject = $i, r.prototype.replace = Ei, r.prototype.replaceRecursive = Ci, r.prototype.reverse = Fi, r.prototype.search = Ni, r.prototype.shift = Mi, r.prototype.shuffle = Ki, r.prototype.skip = Vi, r.prototype.skipUntil = Gi, r.prototype.skipWhile = Yi, r.prototype.slice = Zi, r.prototype.sole = rs, r.prototype.some = ns, r.prototype.sort = is, r.prototype.sortDesc = ss, r.prototype.sortBy = cs, r.prototype.sortByDesc = fs, r.prototype.sortKeys = ls, r.prototype.sortKeysDesc = hs, r.prototype.splice = ps, r.prototype.split = ys, r.prototype.sum = bs, r.prototype.take = gs, r.prototype.takeUntil = Os, r.prototype.takeWhile = Es, r.prototype.tap = Is, r.prototype.times = Cs, r.prototype.toArray = Fs, r.prototype.toJson = Ds, r.prototype.transform = Ts, r.prototype.undot = Ns, r.prototype.unless = Bs, r.prototype.unlessEmpty = Ct, r.prototype.unlessNotEmpty = Ft, r.prototype.union = qs, r.prototype.unique = Rs, r.prototype.unwrap = Ks, r.prototype.values = Js, r.prototype.when = Vs, r.prototype.whenEmpty = Ft, r.prototype.whenNotEmpty = Ct, r.prototype.where = Hs, r.prototype.whereBetween = xs, r.prototype.whereIn = zs, r.prototype.whereInstanceOf = Xs, r.prototype.whereNotBetween = Ys, r.prototype.whereNotIn = to, r.prototype.whereNull = ro, r.prototype.whereNotNull = eo, r.prototype.wrap = no, r.prototype.zip = io;
|
|
2127
2149
|
var i = function(o) {
|
|
2128
2150
|
return new r(o);
|
|
2129
2151
|
};
|
|
2130
2152
|
e.exports = i, e.exports.collect = i, e.exports.default = i, e.exports.Collection = r;
|
|
2131
|
-
})(
|
|
2132
|
-
var
|
|
2133
|
-
const Qt = /* @__PURE__ */
|
|
2153
|
+
})(Mt);
|
|
2154
|
+
var so = Mt.exports;
|
|
2155
|
+
const Qt = /* @__PURE__ */ _r(so), zt = [
|
|
2134
2156
|
"chunk",
|
|
2135
2157
|
"shuffle",
|
|
2136
2158
|
"splice",
|
|
@@ -2149,7 +2171,7 @@ const Qt = /* @__PURE__ */ Ar(io), zt = [
|
|
|
2149
2171
|
"takeUntil",
|
|
2150
2172
|
"takeWhile",
|
|
2151
2173
|
"unique"
|
|
2152
|
-
],
|
|
2174
|
+
], oo = ["forPage", "sortByDesc", "sortBy", "skip", "take", "splice", "whereBetween", "whereIn", "whereNotBetween", "whereNotIn", "first", "where", "whereContains"], ao = [
|
|
2153
2175
|
"avg",
|
|
2154
2176
|
"count",
|
|
2155
2177
|
"countBy",
|
|
@@ -2175,18 +2197,18 @@ const Qt = /* @__PURE__ */ Ar(io), zt = [
|
|
|
2175
2197
|
];
|
|
2176
2198
|
class S {
|
|
2177
2199
|
constructor(t, r) {
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2200
|
+
A(this, "data_path", "");
|
|
2201
|
+
A(this, "axios");
|
|
2202
|
+
A(this, "filters");
|
|
2203
|
+
A(this, "steps");
|
|
2204
|
+
A(this, "fields");
|
|
2205
|
+
A(this, "already_limit", !1);
|
|
2206
|
+
A(this, "already_offset", !1);
|
|
2207
|
+
A(this, "limit", null);
|
|
2208
|
+
A(this, "offset", null);
|
|
2209
|
+
A(this, "_sort", null);
|
|
2210
|
+
A(this, "_sortDesc", !1);
|
|
2211
|
+
A(this, "meta", {});
|
|
2190
2212
|
this.axios = r, this.filters = {}, this.steps = [], this.fields = t;
|
|
2191
2213
|
}
|
|
2192
2214
|
}
|
|
@@ -2223,7 +2245,7 @@ S.prototype.fetchData = async function() {
|
|
|
2223
2245
|
}
|
|
2224
2246
|
n[u] = {}, n = n[u];
|
|
2225
2247
|
}
|
|
2226
|
-
let o = await
|
|
2248
|
+
let o = await w(this.axios, r);
|
|
2227
2249
|
for (const u of t)
|
|
2228
2250
|
o = o[u];
|
|
2229
2251
|
return this.meta = o.meta, Qt(o.data);
|
|
@@ -2250,12 +2272,12 @@ S.prototype.processData = async function() {
|
|
|
2250
2272
|
S.prototype.all = async function() {
|
|
2251
2273
|
return (await this.processData()).all();
|
|
2252
2274
|
};
|
|
2253
|
-
for (const e of [...zt, ...
|
|
2275
|
+
for (const e of [...zt, ...oo])
|
|
2254
2276
|
S.prototype[e] = function(...t) {
|
|
2255
2277
|
const r = this.clone();
|
|
2256
2278
|
return r.steps.push({ type: e, args: t }), r;
|
|
2257
2279
|
};
|
|
2258
|
-
for (const e of
|
|
2280
|
+
for (const e of ao)
|
|
2259
2281
|
S.prototype[e] = async function(...t) {
|
|
2260
2282
|
return (await this.clone().processData())[e](...t);
|
|
2261
2283
|
};
|
|
@@ -2263,41 +2285,134 @@ S.prototype.average = S.prototype.avg;
|
|
|
2263
2285
|
S.prototype.first = async function() {
|
|
2264
2286
|
return this.take(1), (await this.processData()).first();
|
|
2265
2287
|
};
|
|
2266
|
-
const
|
|
2288
|
+
const Xt = (e, t, r) => {
|
|
2267
2289
|
const n = new S(r, t);
|
|
2268
2290
|
return n.data_path = "list" + e, n;
|
|
2269
|
-
},
|
|
2270
|
-
|
|
2291
|
+
}, uo = (e, t) => ({
|
|
2292
|
+
folders: {
|
|
2293
|
+
list: async (r, n = {
|
|
2294
|
+
name: !0,
|
|
2295
|
+
path: !0
|
|
2296
|
+
}) => (await w(t, {
|
|
2297
|
+
app: {
|
|
2298
|
+
drive: {
|
|
2299
|
+
__args: {
|
|
2300
|
+
index: e
|
|
2301
|
+
},
|
|
2302
|
+
folders: {
|
|
2303
|
+
__args: {
|
|
2304
|
+
path: r
|
|
2305
|
+
},
|
|
2306
|
+
...n
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
})).app.drive.folders,
|
|
2311
|
+
create: (r) => f(t, "lightDriveCreateFolder", { index: e, path: r }),
|
|
2312
|
+
delete: (r) => f(t, "lightDriveDeleteFolder", { index: e, path: r }),
|
|
2313
|
+
rename: (r, n) => f(t, "lightDriveRenameFolder", { index: e, path: r, name: n })
|
|
2314
|
+
},
|
|
2315
|
+
files: {
|
|
2316
|
+
list: async (r, n = {
|
|
2317
|
+
name: !0,
|
|
2318
|
+
path: !0,
|
|
2319
|
+
size: !0,
|
|
2320
|
+
mime: !0,
|
|
2321
|
+
url: !0
|
|
2322
|
+
}) => (await w(t, {
|
|
2323
|
+
app: {
|
|
2324
|
+
drive: {
|
|
2325
|
+
__args: {
|
|
2326
|
+
index: e
|
|
2327
|
+
},
|
|
2328
|
+
files: {
|
|
2329
|
+
__args: {
|
|
2330
|
+
path: r
|
|
2331
|
+
},
|
|
2332
|
+
...n
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
})).app.drive.files,
|
|
2337
|
+
get: async (r, n = {
|
|
2338
|
+
name: !0,
|
|
2339
|
+
path: !0,
|
|
2340
|
+
size: !0,
|
|
2341
|
+
mime: !0,
|
|
2342
|
+
url: !0
|
|
2343
|
+
}) => (await w(t, {
|
|
2344
|
+
app: {
|
|
2345
|
+
drive: {
|
|
2346
|
+
__args: {
|
|
2347
|
+
index: e
|
|
2348
|
+
},
|
|
2349
|
+
file: {
|
|
2350
|
+
__args: {
|
|
2351
|
+
path: r
|
|
2352
|
+
},
|
|
2353
|
+
...n
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
})).app.drive.file,
|
|
2358
|
+
read: async (r) => {
|
|
2359
|
+
let n = await w(t, {
|
|
2360
|
+
app: {
|
|
2361
|
+
drive: {
|
|
2362
|
+
__args: {
|
|
2363
|
+
index: e
|
|
2364
|
+
},
|
|
2365
|
+
file: {
|
|
2366
|
+
__args: {
|
|
2367
|
+
path: r
|
|
2368
|
+
},
|
|
2369
|
+
base64Content: !0
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
});
|
|
2374
|
+
return window.atob(n.app.drive.file.base64Content);
|
|
2375
|
+
},
|
|
2376
|
+
write: (r, n) => f(t, "lightDriveWriteFile", { index: e, path: r, content: n }),
|
|
2377
|
+
delete: (r) => f(t, "lightDriveDeleteFile", { index: e, path: r }),
|
|
2378
|
+
rename: (r, n) => f(t, "lightDriveRenameFile", { index: e, path: r, name: n }),
|
|
2379
|
+
move: (r, n) => f(t, "lightDriveMoveFile", { index: e, source: r, destination: n })
|
|
2380
|
+
}
|
|
2381
|
+
}), po = (e) => {
|
|
2382
|
+
const t = kt.create({
|
|
2271
2383
|
baseURL: e,
|
|
2272
2384
|
withCredentials: !0
|
|
2273
|
-
}), r = (s, o = null, u = []) =>
|
|
2385
|
+
}), r = (s, o = null, u = []) => f(t, s, o, u), n = (s) => w(t, s), i = wr(t);
|
|
2274
2386
|
return {
|
|
2275
2387
|
baseURL: e,
|
|
2276
2388
|
axios: t,
|
|
2277
|
-
auth:
|
|
2389
|
+
auth: lr(t),
|
|
2278
2390
|
mutation: r,
|
|
2279
2391
|
query: n,
|
|
2280
|
-
config:
|
|
2281
|
-
mail:
|
|
2282
|
-
users:
|
|
2283
|
-
fs:
|
|
2392
|
+
config: vr(n),
|
|
2393
|
+
mail: br(t),
|
|
2394
|
+
users: gr(t),
|
|
2395
|
+
fs: dr(t),
|
|
2284
2396
|
models: i,
|
|
2285
2397
|
model(s) {
|
|
2286
2398
|
return i.get(s);
|
|
2287
2399
|
},
|
|
2288
|
-
roles:
|
|
2400
|
+
roles: Ar(t),
|
|
2289
2401
|
collect: (s, o) => {
|
|
2290
|
-
const u =
|
|
2402
|
+
const u = Xt(s, t, o);
|
|
2291
2403
|
return u.data_path = i.get(s).getDataPath(), u;
|
|
2404
|
+
},
|
|
2405
|
+
drive(s) {
|
|
2406
|
+
return uo(s, t);
|
|
2292
2407
|
}
|
|
2293
2408
|
};
|
|
2294
2409
|
};
|
|
2295
2410
|
export {
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2411
|
+
ho as File,
|
|
2412
|
+
po as createClient,
|
|
2413
|
+
Xt as createCollection,
|
|
2414
|
+
W as file,
|
|
2415
|
+
f as mutation,
|
|
2416
|
+
w as query,
|
|
2302
2417
|
N as toQuery
|
|
2303
2418
|
};
|