@nizza/core 0.1.0 → 0.1.1-beta.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/index.es.js +1115 -3
- package/dist/lib/domain/errors/DomainError.d.ts +0 -1
- package/package.json +4 -5
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,1124 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Tn = Object.defineProperty;
|
|
2
|
+
var wn = (e, t, n) => t in e ? Tn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var U = (e, t, n) => (wn(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
import * as On from "react";
|
|
5
|
+
import { createContext as Pn, useContext as He, useMemo as jn, lazy as An, Suspense as Dn } from "react";
|
|
6
|
+
class In {
|
|
7
|
+
constructor(t) {
|
|
8
|
+
U(this, "aggregate");
|
|
9
|
+
U(this, "_numSetPropsApplied", 0);
|
|
10
|
+
this.aggregate = t;
|
|
11
|
+
}
|
|
12
|
+
setProps(t) {
|
|
13
|
+
for (const [n, r] of Object.entries(t))
|
|
14
|
+
n in this.aggregate && (this.aggregate[n] = r);
|
|
15
|
+
this._numSetPropsApplied++;
|
|
16
|
+
}
|
|
17
|
+
get isFirstSetProps() {
|
|
18
|
+
return this._numSetPropsApplied === 1;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
class Ne extends Error {
|
|
22
|
+
constructor(t, n, r) {
|
|
23
|
+
super(n), this.value = r, this.name = t;
|
|
24
|
+
}
|
|
25
|
+
toDTO() {
|
|
26
|
+
return {
|
|
27
|
+
name: this.name,
|
|
28
|
+
message: this.message,
|
|
29
|
+
...this.value && { value: this.value }
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
class Ra extends Ne {
|
|
34
|
+
constructor(t) {
|
|
35
|
+
super(
|
|
36
|
+
"RESOURCE_NOT_FOUND_ERROR",
|
|
37
|
+
`Resource with id '${t}' not found.`,
|
|
38
|
+
t
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class Ta extends Ne {
|
|
43
|
+
constructor(t) {
|
|
44
|
+
var n;
|
|
45
|
+
super(
|
|
46
|
+
"APP_UNEXPECTED_ERROR",
|
|
47
|
+
(n = t.message) != null ? n : "An unexpected error occurred.",
|
|
48
|
+
t
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
class wa extends Ne {
|
|
53
|
+
constructor() {
|
|
54
|
+
super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
var Ke = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, he = Object.getOwnPropertyNames, Vn = Object.prototype.hasOwnProperty, Mn = (e, t) => function() {
|
|
58
|
+
return e && (t = (0, e[he(e)[0]])(e = 0)), t;
|
|
59
|
+
}, Se = (e, t) => function() {
|
|
60
|
+
return t || (0, e[he(e)[0]])((t = { exports: {} }).exports, t), t.exports;
|
|
61
|
+
}, fe = (e, t, n, r) => {
|
|
62
|
+
if (t && typeof t == "object" || typeof t == "function")
|
|
63
|
+
for (let i of he(t))
|
|
64
|
+
!Vn.call(e, i) && i !== n && Ke(e, i, { get: () => t[i], enumerable: !(r = Un(t, i)) || r.enumerable });
|
|
65
|
+
return e;
|
|
66
|
+
}, Ln = (e, t, n) => (fe(e, t, "default"), n && fe(n, t, "default")), $n = (e) => fe(Ke({}, "__esModule", { value: !0 }), e), Yn = Se({
|
|
67
|
+
"node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"(e, t) {
|
|
68
|
+
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
69
|
+
function o(m) {
|
|
70
|
+
if (m == null)
|
|
71
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
72
|
+
return Object(m);
|
|
73
|
+
}
|
|
74
|
+
function l() {
|
|
75
|
+
try {
|
|
76
|
+
if (!Object.assign)
|
|
77
|
+
return !1;
|
|
78
|
+
var m = new String("abc");
|
|
79
|
+
if (m[5] = "de", Object.getOwnPropertyNames(m)[0] === "5")
|
|
80
|
+
return !1;
|
|
81
|
+
for (var c = {}, k = 0; k < 10; k++)
|
|
82
|
+
c["_" + String.fromCharCode(k)] = k;
|
|
83
|
+
var N = Object.getOwnPropertyNames(c).map(function(S) {
|
|
84
|
+
return c[S];
|
|
85
|
+
});
|
|
86
|
+
if (N.join("") !== "0123456789")
|
|
87
|
+
return !1;
|
|
88
|
+
var C = {};
|
|
89
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(S) {
|
|
90
|
+
C[S] = S;
|
|
91
|
+
}), Object.keys(Object.assign({}, C)).join("") === "abcdefghijklmnopqrst";
|
|
92
|
+
} catch {
|
|
93
|
+
return !1;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
t.exports = l() ? Object.assign : function(m, c) {
|
|
97
|
+
for (var k, N = o(m), C, S = 1; S < arguments.length; S++) {
|
|
98
|
+
k = Object(arguments[S]);
|
|
99
|
+
for (var j in k)
|
|
100
|
+
r.call(k, j) && (N[j] = k[j]);
|
|
101
|
+
if (n) {
|
|
102
|
+
C = n(k);
|
|
103
|
+
for (var E = 0; E < C.length; E++)
|
|
104
|
+
i.call(k, C[E]) && (N[C[E]] = k[C[E]]);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return N;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}), xe = {}, Gn = Mn({
|
|
111
|
+
"external:react"() {
|
|
112
|
+
Ln(xe, On);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
/*
|
|
2
116
|
object-assign
|
|
3
117
|
(c) Sindre Sorhus
|
|
4
118
|
@license MIT
|
|
5
|
-
*/
|
|
119
|
+
*/
|
|
120
|
+
var Wn = Se({
|
|
121
|
+
"node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react-jsx-runtime.development.js"(e) {
|
|
122
|
+
(function() {
|
|
123
|
+
var t = (Gn(), $n(xe)), n = Yn(), r = 60103, i = 60106;
|
|
124
|
+
e.Fragment = 60107;
|
|
125
|
+
var o = 60108, l = 60114, m = 60109, c = 60110, k = 60112, N = 60113, C = 60120, S = 60115, j = 60116, E = 60121, M = 60122, L = 60117, $ = 60129, Y = 60131;
|
|
126
|
+
if (typeof Symbol == "function" && Symbol.for) {
|
|
127
|
+
var h = Symbol.for;
|
|
128
|
+
r = h("react.element"), i = h("react.portal"), e.Fragment = h("react.fragment"), o = h("react.strict_mode"), l = h("react.profiler"), m = h("react.provider"), c = h("react.context"), k = h("react.forward_ref"), N = h("react.suspense"), C = h("react.suspense_list"), S = h("react.memo"), j = h("react.lazy"), E = h("react.block"), M = h("react.server.block"), L = h("react.fundamental"), h("react.scope"), h("react.opaque.id"), $ = h("react.debug_trace_mode"), h("react.offscreen"), Y = h("react.legacy_hidden");
|
|
129
|
+
}
|
|
130
|
+
var G = typeof Symbol == "function" && Symbol.iterator, K = "@@iterator";
|
|
131
|
+
function re(a) {
|
|
132
|
+
if (a === null || typeof a != "object")
|
|
133
|
+
return null;
|
|
134
|
+
var d = G && a[G] || a[K];
|
|
135
|
+
return typeof d == "function" ? d : null;
|
|
136
|
+
}
|
|
137
|
+
var W = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
138
|
+
function P(a) {
|
|
139
|
+
{
|
|
140
|
+
for (var d = arguments.length, u = new Array(d > 1 ? d - 1 : 0), s = 1; s < d; s++)
|
|
141
|
+
u[s - 1] = arguments[s];
|
|
142
|
+
an("error", a, u);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function an(a, d, u) {
|
|
146
|
+
{
|
|
147
|
+
var s = W.ReactDebugCurrentFrame, p = s.getStackAddendum();
|
|
148
|
+
p !== "" && (d += "%s", u = u.concat([p]));
|
|
149
|
+
var g = u.map(function(f) {
|
|
150
|
+
return "" + f;
|
|
151
|
+
});
|
|
152
|
+
g.unshift("Warning: " + d), Function.prototype.apply.call(console[a], console, g);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
var tn = !1;
|
|
156
|
+
function rn(a) {
|
|
157
|
+
return !!(typeof a == "string" || typeof a == "function" || a === e.Fragment || a === l || a === $ || a === o || a === N || a === C || a === Y || tn || typeof a == "object" && a !== null && (a.$$typeof === j || a.$$typeof === S || a.$$typeof === m || a.$$typeof === c || a.$$typeof === k || a.$$typeof === L || a.$$typeof === E || a[0] === M));
|
|
158
|
+
}
|
|
159
|
+
function on(a, d, u) {
|
|
160
|
+
var s = d.displayName || d.name || "";
|
|
161
|
+
return a.displayName || (s !== "" ? u + "(" + s + ")" : u);
|
|
162
|
+
}
|
|
163
|
+
function Ce(a) {
|
|
164
|
+
return a.displayName || "Context";
|
|
165
|
+
}
|
|
166
|
+
function A(a) {
|
|
167
|
+
if (a == null)
|
|
168
|
+
return null;
|
|
169
|
+
if (typeof a.tag == "number" && P("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
|
170
|
+
return a.displayName || a.name || null;
|
|
171
|
+
if (typeof a == "string")
|
|
172
|
+
return a;
|
|
173
|
+
switch (a) {
|
|
174
|
+
case e.Fragment:
|
|
175
|
+
return "Fragment";
|
|
176
|
+
case i:
|
|
177
|
+
return "Portal";
|
|
178
|
+
case l:
|
|
179
|
+
return "Profiler";
|
|
180
|
+
case o:
|
|
181
|
+
return "StrictMode";
|
|
182
|
+
case N:
|
|
183
|
+
return "Suspense";
|
|
184
|
+
case C:
|
|
185
|
+
return "SuspenseList";
|
|
186
|
+
}
|
|
187
|
+
if (typeof a == "object")
|
|
188
|
+
switch (a.$$typeof) {
|
|
189
|
+
case c:
|
|
190
|
+
var d = a;
|
|
191
|
+
return Ce(d) + ".Consumer";
|
|
192
|
+
case m:
|
|
193
|
+
var u = a;
|
|
194
|
+
return Ce(u._context) + ".Provider";
|
|
195
|
+
case k:
|
|
196
|
+
return on(a, a.render, "ForwardRef");
|
|
197
|
+
case S:
|
|
198
|
+
return A(a.type);
|
|
199
|
+
case E:
|
|
200
|
+
return A(a._render);
|
|
201
|
+
case j: {
|
|
202
|
+
var s = a, p = s._payload, g = s._init;
|
|
203
|
+
try {
|
|
204
|
+
return A(g(p));
|
|
205
|
+
} catch {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
var z = 0, Ee, Fe, be, Re, Te, we, Oe;
|
|
213
|
+
function Pe() {
|
|
214
|
+
}
|
|
215
|
+
Pe.__reactDisabledLog = !0;
|
|
216
|
+
function ln() {
|
|
217
|
+
{
|
|
218
|
+
if (z === 0) {
|
|
219
|
+
Ee = console.log, Fe = console.info, be = console.warn, Re = console.error, Te = console.group, we = console.groupCollapsed, Oe = console.groupEnd;
|
|
220
|
+
var a = {
|
|
221
|
+
configurable: !0,
|
|
222
|
+
enumerable: !0,
|
|
223
|
+
value: Pe,
|
|
224
|
+
writable: !0
|
|
225
|
+
};
|
|
226
|
+
Object.defineProperties(console, {
|
|
227
|
+
info: a,
|
|
228
|
+
log: a,
|
|
229
|
+
warn: a,
|
|
230
|
+
error: a,
|
|
231
|
+
group: a,
|
|
232
|
+
groupCollapsed: a,
|
|
233
|
+
groupEnd: a
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
z++;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function dn() {
|
|
240
|
+
{
|
|
241
|
+
if (z--, z === 0) {
|
|
242
|
+
var a = {
|
|
243
|
+
configurable: !0,
|
|
244
|
+
enumerable: !0,
|
|
245
|
+
writable: !0
|
|
246
|
+
};
|
|
247
|
+
Object.defineProperties(console, {
|
|
248
|
+
log: n({}, a, {
|
|
249
|
+
value: Ee
|
|
250
|
+
}),
|
|
251
|
+
info: n({}, a, {
|
|
252
|
+
value: Fe
|
|
253
|
+
}),
|
|
254
|
+
warn: n({}, a, {
|
|
255
|
+
value: be
|
|
256
|
+
}),
|
|
257
|
+
error: n({}, a, {
|
|
258
|
+
value: Re
|
|
259
|
+
}),
|
|
260
|
+
group: n({}, a, {
|
|
261
|
+
value: Te
|
|
262
|
+
}),
|
|
263
|
+
groupCollapsed: n({}, a, {
|
|
264
|
+
value: we
|
|
265
|
+
}),
|
|
266
|
+
groupEnd: n({}, a, {
|
|
267
|
+
value: Oe
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
z < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
var ie = W.ReactCurrentDispatcher, oe;
|
|
275
|
+
function x(a, d, u) {
|
|
276
|
+
{
|
|
277
|
+
if (oe === void 0)
|
|
278
|
+
try {
|
|
279
|
+
throw Error();
|
|
280
|
+
} catch (p) {
|
|
281
|
+
var s = p.stack.trim().match(/\n( *(at )?)/);
|
|
282
|
+
oe = s && s[1] || "";
|
|
283
|
+
}
|
|
284
|
+
return `
|
|
285
|
+
` + oe + a;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
var le = !1, Q;
|
|
289
|
+
{
|
|
290
|
+
var un = typeof WeakMap == "function" ? WeakMap : Map;
|
|
291
|
+
Q = new un();
|
|
292
|
+
}
|
|
293
|
+
function je(a, d) {
|
|
294
|
+
if (!a || le)
|
|
295
|
+
return "";
|
|
296
|
+
{
|
|
297
|
+
var u = Q.get(a);
|
|
298
|
+
if (u !== void 0)
|
|
299
|
+
return u;
|
|
300
|
+
}
|
|
301
|
+
var s;
|
|
302
|
+
le = !0;
|
|
303
|
+
var p = Error.prepareStackTrace;
|
|
304
|
+
Error.prepareStackTrace = void 0;
|
|
305
|
+
var g;
|
|
306
|
+
g = ie.current, ie.current = null, ln();
|
|
307
|
+
try {
|
|
308
|
+
if (d) {
|
|
309
|
+
var f = function() {
|
|
310
|
+
throw Error();
|
|
311
|
+
};
|
|
312
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
313
|
+
set: function() {
|
|
314
|
+
throw Error();
|
|
315
|
+
}
|
|
316
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
317
|
+
try {
|
|
318
|
+
Reflect.construct(f, []);
|
|
319
|
+
} catch (I) {
|
|
320
|
+
s = I;
|
|
321
|
+
}
|
|
322
|
+
Reflect.construct(a, [], f);
|
|
323
|
+
} else {
|
|
324
|
+
try {
|
|
325
|
+
f.call();
|
|
326
|
+
} catch (I) {
|
|
327
|
+
s = I;
|
|
328
|
+
}
|
|
329
|
+
a.call(f.prototype);
|
|
330
|
+
}
|
|
331
|
+
} else {
|
|
332
|
+
try {
|
|
333
|
+
throw Error();
|
|
334
|
+
} catch (I) {
|
|
335
|
+
s = I;
|
|
336
|
+
}
|
|
337
|
+
a();
|
|
338
|
+
}
|
|
339
|
+
} catch (I) {
|
|
340
|
+
if (I && s && typeof I.stack == "string") {
|
|
341
|
+
for (var v = I.stack.split(`
|
|
342
|
+
`), O = s.stack.split(`
|
|
343
|
+
`), y = v.length - 1, _ = O.length - 1; y >= 1 && _ >= 0 && v[y] !== O[_]; )
|
|
344
|
+
_--;
|
|
345
|
+
for (; y >= 1 && _ >= 0; y--, _--)
|
|
346
|
+
if (v[y] !== O[_]) {
|
|
347
|
+
if (y !== 1 || _ !== 1)
|
|
348
|
+
do
|
|
349
|
+
if (y--, _--, _ < 0 || v[y] !== O[_]) {
|
|
350
|
+
var D = `
|
|
351
|
+
` + v[y].replace(" at new ", " at ");
|
|
352
|
+
return typeof a == "function" && Q.set(a, D), D;
|
|
353
|
+
}
|
|
354
|
+
while (y >= 1 && _ >= 0);
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
} finally {
|
|
359
|
+
le = !1, ie.current = g, dn(), Error.prepareStackTrace = p;
|
|
360
|
+
}
|
|
361
|
+
var q = a ? a.displayName || a.name : "", Be = q ? x(q) : "";
|
|
362
|
+
return typeof a == "function" && Q.set(a, Be), Be;
|
|
363
|
+
}
|
|
364
|
+
function Ae(a, d, u) {
|
|
365
|
+
return je(a, !1);
|
|
366
|
+
}
|
|
367
|
+
function sn(a) {
|
|
368
|
+
var d = a.prototype;
|
|
369
|
+
return !!(d && d.isReactComponent);
|
|
370
|
+
}
|
|
371
|
+
function X(a, d, u) {
|
|
372
|
+
if (a == null)
|
|
373
|
+
return "";
|
|
374
|
+
if (typeof a == "function")
|
|
375
|
+
return je(a, sn(a));
|
|
376
|
+
if (typeof a == "string")
|
|
377
|
+
return x(a);
|
|
378
|
+
switch (a) {
|
|
379
|
+
case N:
|
|
380
|
+
return x("Suspense");
|
|
381
|
+
case C:
|
|
382
|
+
return x("SuspenseList");
|
|
383
|
+
}
|
|
384
|
+
if (typeof a == "object")
|
|
385
|
+
switch (a.$$typeof) {
|
|
386
|
+
case k:
|
|
387
|
+
return Ae(a.render);
|
|
388
|
+
case S:
|
|
389
|
+
return X(a.type, d, u);
|
|
390
|
+
case E:
|
|
391
|
+
return Ae(a._render);
|
|
392
|
+
case j: {
|
|
393
|
+
var s = a, p = s._payload, g = s._init;
|
|
394
|
+
try {
|
|
395
|
+
return X(g(p), d, u);
|
|
396
|
+
} catch {
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return "";
|
|
401
|
+
}
|
|
402
|
+
var De = {}, Ie = W.ReactDebugCurrentFrame;
|
|
403
|
+
function J(a) {
|
|
404
|
+
if (a) {
|
|
405
|
+
var d = a._owner, u = X(a.type, a._source, d ? d.type : null);
|
|
406
|
+
Ie.setExtraStackFrame(u);
|
|
407
|
+
} else
|
|
408
|
+
Ie.setExtraStackFrame(null);
|
|
409
|
+
}
|
|
410
|
+
function cn(a, d, u, s, p) {
|
|
411
|
+
{
|
|
412
|
+
var g = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
413
|
+
for (var f in a)
|
|
414
|
+
if (g(a, f)) {
|
|
415
|
+
var v = void 0;
|
|
416
|
+
try {
|
|
417
|
+
if (typeof a[f] != "function") {
|
|
418
|
+
var O = Error((s || "React class") + ": " + u + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
419
|
+
throw O.name = "Invariant Violation", O;
|
|
420
|
+
}
|
|
421
|
+
v = a[f](d, f, s, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
422
|
+
} catch (y) {
|
|
423
|
+
v = y;
|
|
424
|
+
}
|
|
425
|
+
v && !(v instanceof Error) && (J(p), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", u, f, typeof v), J(null)), v instanceof Error && !(v.message in De) && (De[v.message] = !0, J(p), P("Failed %s type: %s", u, v.message), J(null));
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
var H = W.ReactCurrentOwner, de = Object.prototype.hasOwnProperty, mn = {
|
|
430
|
+
key: !0,
|
|
431
|
+
ref: !0,
|
|
432
|
+
__self: !0,
|
|
433
|
+
__source: !0
|
|
434
|
+
}, Ue, Ve, ue;
|
|
435
|
+
ue = {};
|
|
436
|
+
function vn(a) {
|
|
437
|
+
if (de.call(a, "ref")) {
|
|
438
|
+
var d = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
439
|
+
if (d && d.isReactWarning)
|
|
440
|
+
return !1;
|
|
441
|
+
}
|
|
442
|
+
return a.ref !== void 0;
|
|
443
|
+
}
|
|
444
|
+
function fn(a) {
|
|
445
|
+
if (de.call(a, "key")) {
|
|
446
|
+
var d = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
447
|
+
if (d && d.isReactWarning)
|
|
448
|
+
return !1;
|
|
449
|
+
}
|
|
450
|
+
return a.key !== void 0;
|
|
451
|
+
}
|
|
452
|
+
function kn(a, d) {
|
|
453
|
+
if (typeof a.ref == "string" && H.current && d && H.current.stateNode !== d) {
|
|
454
|
+
var u = A(H.current.type);
|
|
455
|
+
ue[u] || (P('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', A(H.current.type), a.ref), ue[u] = !0);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
function pn(a, d) {
|
|
459
|
+
{
|
|
460
|
+
var u = function() {
|
|
461
|
+
Ue || (Ue = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
462
|
+
};
|
|
463
|
+
u.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
464
|
+
get: u,
|
|
465
|
+
configurable: !0
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
function gn(a, d) {
|
|
470
|
+
{
|
|
471
|
+
var u = function() {
|
|
472
|
+
Ve || (Ve = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
473
|
+
};
|
|
474
|
+
u.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
|
475
|
+
get: u,
|
|
476
|
+
configurable: !0
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
var Nn = function(a, d, u, s, p, g, f) {
|
|
481
|
+
var v = {
|
|
482
|
+
$$typeof: r,
|
|
483
|
+
type: a,
|
|
484
|
+
key: d,
|
|
485
|
+
ref: u,
|
|
486
|
+
props: f,
|
|
487
|
+
_owner: g
|
|
488
|
+
};
|
|
489
|
+
return v._store = {}, Object.defineProperty(v._store, "validated", {
|
|
490
|
+
configurable: !1,
|
|
491
|
+
enumerable: !1,
|
|
492
|
+
writable: !0,
|
|
493
|
+
value: !1
|
|
494
|
+
}), Object.defineProperty(v, "_self", {
|
|
495
|
+
configurable: !1,
|
|
496
|
+
enumerable: !1,
|
|
497
|
+
writable: !1,
|
|
498
|
+
value: s
|
|
499
|
+
}), Object.defineProperty(v, "_source", {
|
|
500
|
+
configurable: !1,
|
|
501
|
+
enumerable: !1,
|
|
502
|
+
writable: !1,
|
|
503
|
+
value: p
|
|
504
|
+
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
|
|
505
|
+
};
|
|
506
|
+
function hn(a, d, u, s, p) {
|
|
507
|
+
{
|
|
508
|
+
var g, f = {}, v = null, O = null;
|
|
509
|
+
u !== void 0 && (v = "" + u), fn(d) && (v = "" + d.key), vn(d) && (O = d.ref, kn(d, p));
|
|
510
|
+
for (g in d)
|
|
511
|
+
de.call(d, g) && !mn.hasOwnProperty(g) && (f[g] = d[g]);
|
|
512
|
+
if (a && a.defaultProps) {
|
|
513
|
+
var y = a.defaultProps;
|
|
514
|
+
for (g in y)
|
|
515
|
+
f[g] === void 0 && (f[g] = y[g]);
|
|
516
|
+
}
|
|
517
|
+
if (v || O) {
|
|
518
|
+
var _ = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
519
|
+
v && pn(f, _), O && gn(f, _);
|
|
520
|
+
}
|
|
521
|
+
return Nn(a, v, O, p, s, H.current, f);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
var se = W.ReactCurrentOwner, Me = W.ReactDebugCurrentFrame;
|
|
525
|
+
function B(a) {
|
|
526
|
+
if (a) {
|
|
527
|
+
var d = a._owner, u = X(a.type, a._source, d ? d.type : null);
|
|
528
|
+
Me.setExtraStackFrame(u);
|
|
529
|
+
} else
|
|
530
|
+
Me.setExtraStackFrame(null);
|
|
531
|
+
}
|
|
532
|
+
var ce;
|
|
533
|
+
ce = !1;
|
|
534
|
+
function me(a) {
|
|
535
|
+
return typeof a == "object" && a !== null && a.$$typeof === r;
|
|
536
|
+
}
|
|
537
|
+
function Le() {
|
|
538
|
+
{
|
|
539
|
+
if (se.current) {
|
|
540
|
+
var a = A(se.current.type);
|
|
541
|
+
if (a)
|
|
542
|
+
return `
|
|
543
|
+
|
|
544
|
+
Check the render method of \`` + a + "`.";
|
|
545
|
+
}
|
|
546
|
+
return "";
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
function Sn(a) {
|
|
550
|
+
{
|
|
551
|
+
if (a !== void 0) {
|
|
552
|
+
var d = a.fileName.replace(/^.*[\\\/]/, ""), u = a.lineNumber;
|
|
553
|
+
return `
|
|
554
|
+
|
|
555
|
+
Check your code at ` + d + ":" + u + ".";
|
|
556
|
+
}
|
|
557
|
+
return "";
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
var $e = {};
|
|
561
|
+
function yn(a) {
|
|
562
|
+
{
|
|
563
|
+
var d = Le();
|
|
564
|
+
if (!d) {
|
|
565
|
+
var u = typeof a == "string" ? a : a.displayName || a.name;
|
|
566
|
+
u && (d = `
|
|
567
|
+
|
|
568
|
+
Check the top-level render call using <` + u + ">.");
|
|
569
|
+
}
|
|
570
|
+
return d;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function Ye(a, d) {
|
|
574
|
+
{
|
|
575
|
+
if (!a._store || a._store.validated || a.key != null)
|
|
576
|
+
return;
|
|
577
|
+
a._store.validated = !0;
|
|
578
|
+
var u = yn(d);
|
|
579
|
+
if ($e[u])
|
|
580
|
+
return;
|
|
581
|
+
$e[u] = !0;
|
|
582
|
+
var s = "";
|
|
583
|
+
a && a._owner && a._owner !== se.current && (s = " It was passed a child from " + A(a._owner.type) + "."), B(a), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, s), B(null);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
function Ge(a, d) {
|
|
587
|
+
{
|
|
588
|
+
if (typeof a != "object")
|
|
589
|
+
return;
|
|
590
|
+
if (Array.isArray(a))
|
|
591
|
+
for (var u = 0; u < a.length; u++) {
|
|
592
|
+
var s = a[u];
|
|
593
|
+
me(s) && Ye(s, d);
|
|
594
|
+
}
|
|
595
|
+
else if (me(a))
|
|
596
|
+
a._store && (a._store.validated = !0);
|
|
597
|
+
else if (a) {
|
|
598
|
+
var p = re(a);
|
|
599
|
+
if (typeof p == "function" && p !== a.entries)
|
|
600
|
+
for (var g = p.call(a), f; !(f = g.next()).done; )
|
|
601
|
+
me(f.value) && Ye(f.value, d);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
function _n(a) {
|
|
606
|
+
{
|
|
607
|
+
var d = a.type;
|
|
608
|
+
if (d == null || typeof d == "string")
|
|
609
|
+
return;
|
|
610
|
+
var u;
|
|
611
|
+
if (typeof d == "function")
|
|
612
|
+
u = d.propTypes;
|
|
613
|
+
else if (typeof d == "object" && (d.$$typeof === k || d.$$typeof === S))
|
|
614
|
+
u = d.propTypes;
|
|
615
|
+
else
|
|
616
|
+
return;
|
|
617
|
+
if (u) {
|
|
618
|
+
var s = A(d);
|
|
619
|
+
cn(u, a.props, "prop", s, a);
|
|
620
|
+
} else if (d.PropTypes !== void 0 && !ce) {
|
|
621
|
+
ce = !0;
|
|
622
|
+
var p = A(d);
|
|
623
|
+
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
624
|
+
}
|
|
625
|
+
typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
function Cn(a) {
|
|
629
|
+
{
|
|
630
|
+
for (var d = Object.keys(a.props), u = 0; u < d.length; u++) {
|
|
631
|
+
var s = d[u];
|
|
632
|
+
if (s !== "children" && s !== "key") {
|
|
633
|
+
B(a), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), B(null);
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
a.ref !== null && (B(a), P("Invalid attribute `ref` supplied to `React.Fragment`."), B(null));
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
function We(a, d, u, s, p, g) {
|
|
641
|
+
{
|
|
642
|
+
var f = rn(a);
|
|
643
|
+
if (!f) {
|
|
644
|
+
var v = "";
|
|
645
|
+
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
646
|
+
var O = Sn(p);
|
|
647
|
+
O ? v += O : v += Le();
|
|
648
|
+
var y;
|
|
649
|
+
a === null ? y = "null" : Array.isArray(a) ? y = "array" : a !== void 0 && a.$$typeof === r ? (y = "<" + (A(a.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : y = typeof a, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, v);
|
|
650
|
+
}
|
|
651
|
+
var _ = hn(a, d, u, p, g);
|
|
652
|
+
if (_ == null)
|
|
653
|
+
return _;
|
|
654
|
+
if (f) {
|
|
655
|
+
var D = d.children;
|
|
656
|
+
if (D !== void 0)
|
|
657
|
+
if (s)
|
|
658
|
+
if (Array.isArray(D)) {
|
|
659
|
+
for (var q = 0; q < D.length; q++)
|
|
660
|
+
Ge(D[q], a);
|
|
661
|
+
Object.freeze && Object.freeze(D);
|
|
662
|
+
} else
|
|
663
|
+
P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
664
|
+
else
|
|
665
|
+
Ge(D, a);
|
|
666
|
+
}
|
|
667
|
+
return a === e.Fragment ? Cn(_) : _n(_), _;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
function En(a, d, u) {
|
|
671
|
+
return We(a, d, u, !0);
|
|
672
|
+
}
|
|
673
|
+
function Fn(a, d, u) {
|
|
674
|
+
return We(a, d, u, !1);
|
|
675
|
+
}
|
|
676
|
+
var bn = Fn, Rn = En;
|
|
677
|
+
e.jsx = bn, e.jsxs = Rn;
|
|
678
|
+
})();
|
|
679
|
+
}
|
|
680
|
+
}), Bn = Se({
|
|
681
|
+
"node_modules/.pnpm/react@17.0.2/node_modules/react/jsx-runtime.js"(e, t) {
|
|
682
|
+
t.exports = Wn();
|
|
683
|
+
}
|
|
684
|
+
}), qn = Bn();
|
|
685
|
+
/** @license React v17.0.2
|
|
686
|
+
* react-jsx-runtime.development.js
|
|
687
|
+
*
|
|
688
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
689
|
+
*
|
|
690
|
+
* This source code is licensed under the MIT license found in the
|
|
691
|
+
* LICENSE file in the root directory of this source tree.
|
|
692
|
+
*/
|
|
693
|
+
/** @license React v17.0.2
|
|
6
694
|
* react-jsx-runtime.production.min.js
|
|
7
695
|
*
|
|
8
696
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
697
|
*
|
|
10
698
|
* This source code is licensed under the MIT license found in the
|
|
11
699
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var W=U,O=60103;if(u.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var D=Symbol.for;O=D("react.element"),u.Fragment=D("react.fragment")}var Y=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Z=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,i){var a,t={},d=null,l=null;i!==void 0&&(d=""+i),n.key!==void 0&&(d=""+n.key),n.ref!==void 0&&(l=n.ref);for(a in n)Z.call(n,a)&&!K.hasOwnProperty(a)&&(t[a]=n[a]);if(e&&e.defaultProps)for(a in n=e.defaultProps,n)t[a]===void 0&&(t[a]=n[a]);return{$$typeof:O,type:e,key:d,ref:l,props:t,_owner:Y.current}}u.jsx=T,u.jsxs=T,b.exports=u;const f=b.exports.jsx;let S=new Map;const g=G(S),ee=({children:e,stores:n})=>{const i=C(g),a=M(()=>{if(!n.length)return i;const t=new Map;return n.forEach(d=>{let l;try{l=d()}catch{l=new d}t.set(d,l)}),S=new Map([...i,...t])},[n]);return f(g.Provider,{value:a,children:e})};function ne(e){return C(g).get(e)}function ie(e){return S.get(e)}var I=(e=>(e.Add="add",e.Remove="remove",e))(I||{}),_=(e=>(e.Active="active",e.Inactive="inactive",e))(_||{});const ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},te={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},de={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},le={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},oe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},re={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},me={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]};var se=Object.freeze(Object.defineProperty({__proto__:null,Methods:I,Status:_,AddCollectionDocument:ae,DeleteCollectionDocument:te,FindCollectionDocument:de,GetAllCollectionsDocument:le,ManageCollectionProductDocument:oe,SearchCollectionsDocument:re,UpdateCollectionDocument:me},Symbol.toStringTag,{value:"Module"}));async function ue({url:e,method:n="GET",raw:i=!1,...a}){var r;const t={"Content-Type":"application/json",...a.headers},d=await fetch(e,{method:n,...a,headers:t});if(i)return d;const l=await d.json();if(!d.ok){const m=(r=l==null?void 0:l.message)!=null?r:d.statusText;throw new Error(m)}return l}function ke(e=8){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";const a=n.length;for(let t=0;t<e;t++)i+=n.charAt(Math.floor(Math.random()*a));return i}function ce(e){return new h(e)}const ve=e=>{const n=Object.entries(e).map(([i,a])=>`${i}=${a}`).join("&");return n?`?${n}`:""},pe=(e,n,i={fallback:null})=>{let a=e;n&&(a=()=>e().then(d=>({default:n(d)})));const t=q(a);return d=>f($,{fallback:i.fallback,children:f(t,{...d})})};class k{constructor(n,i,a){s(this,"isOk");s(this,"isErr");s(this,"error");s(this,"_value");if(n&&i)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!n&&!i)throw new Error("InvalidOperation: A failing result needs to contain an error message");this.isOk=n,this.isErr=!n,this.error=i,this._value=a,Object.freeze(this)}get value(){if(this.isErr)throw new Error("Can't get the value of an error result. Use 'errorValue' instead.");return this._value}static ok(n){return new k(!0,void 0,n)}static fail(n){return new k(!1,n)}static combine(n){for(const i of n)if(i.isErr)return i;return k.ok()}}class w{constructor(n){s(this,"value");this.value=n}isErr(){return!0}isOk(){return!1}}class A{constructor(n){s(this,"value");this.value=n}isErr(){return!1}isOk(){return!0}}const Ne=e=>new w(e),fe=e=>new A(e);/*! js-cookie v3.0.1 | MIT */function v(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var a in i)e[a]=i[a]}return e}var Se={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function F(e,n){function i(t,d,l){if(typeof document!="undefined"){l=v({},n,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var m in l)!l[m]||(r+="; "+m,l[m]!==!0&&(r+="="+l[m].split(";")[0]));return document.cookie=t+"="+e.write(d,t)+r}}function a(t){if(!(typeof document=="undefined"||arguments.length&&!t)){for(var d=document.cookie?document.cookie.split("; "):[],l={},r=0;r<d.length;r++){var m=d[r].split("="),x=m.slice(1).join("=");try{var N=decodeURIComponent(m[0]);if(l[N]=e.read(x,N),t===N)break}catch{}}return t?l[t]:l}}return Object.create({set:i,get:a,remove:function(t,d){i(t,"",v({},d,{expires:-1}))},withAttributes:function(t){return F(this.converter,v({},this.attributes,t))},withConverter:function(t){return F(v({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}var j=F(Se,{path:"/"}),p,ge=new Uint8Array(16);function Fe(){if(!p&&(p=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(ge)}var ye=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ce(e){return typeof e=="string"&&ye.test(e)}for(var o=[],y=0;y<256;++y)o.push((y+256).toString(16).substr(1));function he(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=(o[e[n+0]]+o[e[n+1]]+o[e[n+2]]+o[e[n+3]]+"-"+o[e[n+4]]+o[e[n+5]]+"-"+o[e[n+6]]+o[e[n+7]]+"-"+o[e[n+8]]+o[e[n+9]]+"-"+o[e[n+10]]+o[e[n+11]]+o[e[n+12]]+o[e[n+13]]+o[e[n+14]]+o[e[n+15]]).toLowerCase();if(!Ce(i))throw TypeError("Stringified UUID is invalid");return i}function be(e,n,i){e=e||{};var a=e.random||(e.rng||Fe)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){i=i||0;for(var t=0;t<16;++t)n[i+t]=a[t];return n}return he(a)}const R="FINGERPRINT_LIVE_SHOPPING",Ee=()=>{let e=j.get(R);return e||(e=be(),j.set(R,e,{expires:1}),e)};export{B as AccountInvalidError,h as AggregateRoot,se as ApiGraphqlTypes,c as DomainError,w as Err,A as Ok,L as ResourceNotFoundError,k as Result,ee as StoreProvider,z as UnexpectedError,ue as apiCall,ce as createAggregateRoot,fe as err,Ee as getFingerprint,ie as getStore,pe as lazyLoad,Ne as ok,ve as searchParams,ke as shortId,ne as useStore};
|
|
700
|
+
*/
|
|
701
|
+
const ye = qn;
|
|
702
|
+
ye.Fragment;
|
|
703
|
+
const ke = ye.jsx;
|
|
704
|
+
ye.jsxs;
|
|
705
|
+
let _e = /* @__PURE__ */ new Map();
|
|
706
|
+
const pe = Pn(_e), Oa = ({
|
|
707
|
+
children: e,
|
|
708
|
+
stores: t
|
|
709
|
+
}) => {
|
|
710
|
+
const n = He(pe), r = jn(() => {
|
|
711
|
+
if (!t.length)
|
|
712
|
+
return n;
|
|
713
|
+
const i = /* @__PURE__ */ new Map();
|
|
714
|
+
return t.forEach((o) => {
|
|
715
|
+
let l;
|
|
716
|
+
try {
|
|
717
|
+
l = o();
|
|
718
|
+
} catch {
|
|
719
|
+
l = new o();
|
|
720
|
+
}
|
|
721
|
+
i.set(o, l);
|
|
722
|
+
}), _e = new Map([...n, ...i]);
|
|
723
|
+
}, [t]);
|
|
724
|
+
return /* @__PURE__ */ ke(pe.Provider, {
|
|
725
|
+
value: r,
|
|
726
|
+
children: e
|
|
727
|
+
});
|
|
728
|
+
};
|
|
729
|
+
function Pa(e) {
|
|
730
|
+
return He(pe).get(e);
|
|
731
|
+
}
|
|
732
|
+
function ja(e) {
|
|
733
|
+
return _e.get(e);
|
|
734
|
+
}
|
|
735
|
+
var Qe = /* @__PURE__ */ ((e) => (e.Add = "add", e.Remove = "remove", e))(Qe || {}), Xe = /* @__PURE__ */ ((e) => (e.Active = "active", e.Inactive = "inactive", e))(Xe || {});
|
|
736
|
+
const zn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Hn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Kn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, xn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Qn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Xn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Jn = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
737
|
+
__proto__: null,
|
|
738
|
+
Methods: Qe,
|
|
739
|
+
Status: Xe,
|
|
740
|
+
AddCollectionDocument: zn,
|
|
741
|
+
DeleteCollectionDocument: Hn,
|
|
742
|
+
FindCollectionDocument: Kn,
|
|
743
|
+
GetAllCollectionsDocument: xn,
|
|
744
|
+
ManageCollectionProductDocument: Qn,
|
|
745
|
+
SearchCollectionsDocument: Xn,
|
|
746
|
+
UpdateCollectionDocument: Jn
|
|
747
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
748
|
+
async function Da({
|
|
749
|
+
url: e,
|
|
750
|
+
method: t = "GET",
|
|
751
|
+
raw: n = !1,
|
|
752
|
+
...r
|
|
753
|
+
}) {
|
|
754
|
+
var m;
|
|
755
|
+
const i = {
|
|
756
|
+
"Content-Type": "application/json",
|
|
757
|
+
...r.headers
|
|
758
|
+
}, o = await fetch(e, { method: t, ...r, headers: i });
|
|
759
|
+
if (n)
|
|
760
|
+
return o;
|
|
761
|
+
const l = await o.json();
|
|
762
|
+
if (!o.ok) {
|
|
763
|
+
const c = (m = l == null ? void 0 : l.message) != null ? m : o.statusText;
|
|
764
|
+
throw new Error(c);
|
|
765
|
+
}
|
|
766
|
+
return l;
|
|
767
|
+
}
|
|
768
|
+
function Ia(e = 8) {
|
|
769
|
+
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
770
|
+
let n = "";
|
|
771
|
+
const r = t.length;
|
|
772
|
+
for (let i = 0; i < e; i++)
|
|
773
|
+
n += t.charAt(Math.floor(Math.random() * r));
|
|
774
|
+
return n;
|
|
775
|
+
}
|
|
776
|
+
function Ua(e) {
|
|
777
|
+
return new In(e);
|
|
778
|
+
}
|
|
779
|
+
const Va = (e) => {
|
|
780
|
+
const t = Object.entries(e).map(([n, r]) => `${n}=${r}`).join("&");
|
|
781
|
+
return t ? `?${t}` : "";
|
|
782
|
+
}, Ma = (e, t, n = {
|
|
783
|
+
fallback: null
|
|
784
|
+
}) => {
|
|
785
|
+
let r = e;
|
|
786
|
+
t && (r = () => e().then((o) => ({
|
|
787
|
+
default: t(o)
|
|
788
|
+
})));
|
|
789
|
+
const i = An(r);
|
|
790
|
+
return (o) => /* @__PURE__ */ ke(Dn, {
|
|
791
|
+
fallback: n.fallback,
|
|
792
|
+
children: /* @__PURE__ */ ke(i, {
|
|
793
|
+
...o
|
|
794
|
+
})
|
|
795
|
+
});
|
|
796
|
+
};
|
|
797
|
+
class ae {
|
|
798
|
+
constructor(t, n, r) {
|
|
799
|
+
U(this, "isOk");
|
|
800
|
+
U(this, "isErr");
|
|
801
|
+
U(this, "error");
|
|
802
|
+
U(this, "_value");
|
|
803
|
+
if (t && n)
|
|
804
|
+
throw new Error(
|
|
805
|
+
"InvalidOperation: A result cannot be successful and contain an error"
|
|
806
|
+
);
|
|
807
|
+
if (!t && !n)
|
|
808
|
+
throw new Error(
|
|
809
|
+
"InvalidOperation: A failing result needs to contain an error message"
|
|
810
|
+
);
|
|
811
|
+
this.isOk = t, this.isErr = !t, this.error = n, this._value = r, Object.freeze(this);
|
|
812
|
+
}
|
|
813
|
+
get value() {
|
|
814
|
+
if (this.isErr)
|
|
815
|
+
throw new Error(
|
|
816
|
+
"Can't get the value of an error result. Use 'errorValue' instead."
|
|
817
|
+
);
|
|
818
|
+
return this._value;
|
|
819
|
+
}
|
|
820
|
+
static ok(t) {
|
|
821
|
+
return new ae(!0, void 0, t);
|
|
822
|
+
}
|
|
823
|
+
static fail(t) {
|
|
824
|
+
return new ae(!1, t);
|
|
825
|
+
}
|
|
826
|
+
static combine(t) {
|
|
827
|
+
for (const n of t)
|
|
828
|
+
if (n.isErr)
|
|
829
|
+
return n;
|
|
830
|
+
return ae.ok();
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
class Zn {
|
|
834
|
+
constructor(t) {
|
|
835
|
+
U(this, "value");
|
|
836
|
+
this.value = t;
|
|
837
|
+
}
|
|
838
|
+
isErr() {
|
|
839
|
+
return !0;
|
|
840
|
+
}
|
|
841
|
+
isOk() {
|
|
842
|
+
return !1;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
class ea {
|
|
846
|
+
constructor(t) {
|
|
847
|
+
U(this, "value");
|
|
848
|
+
this.value = t;
|
|
849
|
+
}
|
|
850
|
+
isErr() {
|
|
851
|
+
return !1;
|
|
852
|
+
}
|
|
853
|
+
isOk() {
|
|
854
|
+
return !0;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
const La = (e) => new Zn(e), $a = (e) => new ea(e);
|
|
858
|
+
function Z(e) {
|
|
859
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
860
|
+
var n = arguments[t];
|
|
861
|
+
for (var r in n)
|
|
862
|
+
e[r] = n[r];
|
|
863
|
+
}
|
|
864
|
+
return e;
|
|
865
|
+
}
|
|
866
|
+
var na = {
|
|
867
|
+
read: function(e) {
|
|
868
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
869
|
+
},
|
|
870
|
+
write: function(e) {
|
|
871
|
+
return encodeURIComponent(e).replace(
|
|
872
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
873
|
+
decodeURIComponent
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
function ge(e, t) {
|
|
878
|
+
function n(i, o, l) {
|
|
879
|
+
if (!(typeof document > "u")) {
|
|
880
|
+
l = Z({}, t, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), i = encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
881
|
+
var m = "";
|
|
882
|
+
for (var c in l)
|
|
883
|
+
!l[c] || (m += "; " + c, l[c] !== !0 && (m += "=" + l[c].split(";")[0]));
|
|
884
|
+
return document.cookie = i + "=" + e.write(o, i) + m;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
function r(i) {
|
|
888
|
+
if (!(typeof document > "u" || arguments.length && !i)) {
|
|
889
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], l = {}, m = 0; m < o.length; m++) {
|
|
890
|
+
var c = o[m].split("="), k = c.slice(1).join("=");
|
|
891
|
+
try {
|
|
892
|
+
var N = decodeURIComponent(c[0]);
|
|
893
|
+
if (l[N] = e.read(k, N), i === N)
|
|
894
|
+
break;
|
|
895
|
+
} catch {
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
return i ? l[i] : l;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
return Object.create(
|
|
902
|
+
{
|
|
903
|
+
set: n,
|
|
904
|
+
get: r,
|
|
905
|
+
remove: function(i, o) {
|
|
906
|
+
n(
|
|
907
|
+
i,
|
|
908
|
+
"",
|
|
909
|
+
Z({}, o, {
|
|
910
|
+
expires: -1
|
|
911
|
+
})
|
|
912
|
+
);
|
|
913
|
+
},
|
|
914
|
+
withAttributes: function(i) {
|
|
915
|
+
return ge(this.converter, Z({}, this.attributes, i));
|
|
916
|
+
},
|
|
917
|
+
withConverter: function(i) {
|
|
918
|
+
return ge(Z({}, this.converter, i), this.attributes);
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
attributes: { value: Object.freeze(t) },
|
|
923
|
+
converter: { value: Object.freeze(e) }
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
var aa = ge(na, { path: "/" }), ta = aa, qe = ta;
|
|
928
|
+
/*! js-cookie v3.0.1 | MIT */
|
|
929
|
+
var ee, ra = new Uint8Array(16);
|
|
930
|
+
function ia() {
|
|
931
|
+
if (!ee && (ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !ee))
|
|
932
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
933
|
+
return ee(ra);
|
|
934
|
+
}
|
|
935
|
+
var oa = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
936
|
+
function la(e) {
|
|
937
|
+
return typeof e == "string" && oa.test(e);
|
|
938
|
+
}
|
|
939
|
+
var Je = la, F = [];
|
|
940
|
+
for (ne = 0; ne < 256; ++ne)
|
|
941
|
+
F.push((ne + 256).toString(16).substr(1));
|
|
942
|
+
var ne;
|
|
943
|
+
function da(e) {
|
|
944
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = (F[e[t + 0]] + F[e[t + 1]] + F[e[t + 2]] + F[e[t + 3]] + "-" + F[e[t + 4]] + F[e[t + 5]] + "-" + F[e[t + 6]] + F[e[t + 7]] + "-" + F[e[t + 8]] + F[e[t + 9]] + "-" + F[e[t + 10]] + F[e[t + 11]] + F[e[t + 12]] + F[e[t + 13]] + F[e[t + 14]] + F[e[t + 15]]).toLowerCase();
|
|
945
|
+
if (!Je(n))
|
|
946
|
+
throw TypeError("Stringified UUID is invalid");
|
|
947
|
+
return n;
|
|
948
|
+
}
|
|
949
|
+
var Ze = da;
|
|
950
|
+
function ua(e) {
|
|
951
|
+
if (!Je(e))
|
|
952
|
+
throw TypeError("Invalid UUID");
|
|
953
|
+
var t, n = new Uint8Array(16);
|
|
954
|
+
return n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = t & 255, n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8, n[5] = t & 255, n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8, n[7] = t & 255, n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8, n[9] = t & 255, n[10] = (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = t & 255, n;
|
|
955
|
+
}
|
|
956
|
+
var sa = ua;
|
|
957
|
+
function ca(e) {
|
|
958
|
+
e = unescape(encodeURIComponent(e));
|
|
959
|
+
for (var t = [], n = 0; n < e.length; ++n)
|
|
960
|
+
t.push(e.charCodeAt(n));
|
|
961
|
+
return t;
|
|
962
|
+
}
|
|
963
|
+
var ma = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", va = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
964
|
+
function en(e, t, n) {
|
|
965
|
+
function r(i, o, l, m) {
|
|
966
|
+
if (typeof i == "string" && (i = ca(i)), typeof o == "string" && (o = sa(o)), o.length !== 16)
|
|
967
|
+
throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
|
|
968
|
+
var c = new Uint8Array(16 + i.length);
|
|
969
|
+
if (c.set(o), c.set(i, o.length), c = n(c), c[6] = c[6] & 15 | t, c[8] = c[8] & 63 | 128, l) {
|
|
970
|
+
m = m || 0;
|
|
971
|
+
for (var k = 0; k < 16; ++k)
|
|
972
|
+
l[m + k] = c[k];
|
|
973
|
+
return l;
|
|
974
|
+
}
|
|
975
|
+
return Ze(c);
|
|
976
|
+
}
|
|
977
|
+
try {
|
|
978
|
+
r.name = e;
|
|
979
|
+
} catch {
|
|
980
|
+
}
|
|
981
|
+
return r.DNS = ma, r.URL = va, r;
|
|
982
|
+
}
|
|
983
|
+
function fa(e) {
|
|
984
|
+
if (typeof e == "string") {
|
|
985
|
+
var t = unescape(encodeURIComponent(e));
|
|
986
|
+
e = new Uint8Array(t.length);
|
|
987
|
+
for (var n = 0; n < t.length; ++n)
|
|
988
|
+
e[n] = t.charCodeAt(n);
|
|
989
|
+
}
|
|
990
|
+
return ka(pa(ga(e), e.length * 8));
|
|
991
|
+
}
|
|
992
|
+
function ka(e) {
|
|
993
|
+
for (var t = [], n = e.length * 32, r = "0123456789abcdef", i = 0; i < n; i += 8) {
|
|
994
|
+
var o = e[i >> 5] >>> i % 32 & 255, l = parseInt(r.charAt(o >>> 4 & 15) + r.charAt(o & 15), 16);
|
|
995
|
+
t.push(l);
|
|
996
|
+
}
|
|
997
|
+
return t;
|
|
998
|
+
}
|
|
999
|
+
function nn(e) {
|
|
1000
|
+
return (e + 64 >>> 9 << 4) + 14 + 1;
|
|
1001
|
+
}
|
|
1002
|
+
function pa(e, t) {
|
|
1003
|
+
e[t >> 5] |= 128 << t % 32, e[nn(t) - 1] = t;
|
|
1004
|
+
for (var n = 1732584193, r = -271733879, i = -1732584194, o = 271733878, l = 0; l < e.length; l += 16) {
|
|
1005
|
+
var m = n, c = r, k = i, N = o;
|
|
1006
|
+
n = b(n, r, i, o, e[l], 7, -680876936), o = b(o, n, r, i, e[l + 1], 12, -389564586), i = b(i, o, n, r, e[l + 2], 17, 606105819), r = b(r, i, o, n, e[l + 3], 22, -1044525330), n = b(n, r, i, o, e[l + 4], 7, -176418897), o = b(o, n, r, i, e[l + 5], 12, 1200080426), i = b(i, o, n, r, e[l + 6], 17, -1473231341), r = b(r, i, o, n, e[l + 7], 22, -45705983), n = b(n, r, i, o, e[l + 8], 7, 1770035416), o = b(o, n, r, i, e[l + 9], 12, -1958414417), i = b(i, o, n, r, e[l + 10], 17, -42063), r = b(r, i, o, n, e[l + 11], 22, -1990404162), n = b(n, r, i, o, e[l + 12], 7, 1804603682), o = b(o, n, r, i, e[l + 13], 12, -40341101), i = b(i, o, n, r, e[l + 14], 17, -1502002290), r = b(r, i, o, n, e[l + 15], 22, 1236535329), n = R(n, r, i, o, e[l + 1], 5, -165796510), o = R(o, n, r, i, e[l + 6], 9, -1069501632), i = R(i, o, n, r, e[l + 11], 14, 643717713), r = R(r, i, o, n, e[l], 20, -373897302), n = R(n, r, i, o, e[l + 5], 5, -701558691), o = R(o, n, r, i, e[l + 10], 9, 38016083), i = R(i, o, n, r, e[l + 15], 14, -660478335), r = R(r, i, o, n, e[l + 4], 20, -405537848), n = R(n, r, i, o, e[l + 9], 5, 568446438), o = R(o, n, r, i, e[l + 14], 9, -1019803690), i = R(i, o, n, r, e[l + 3], 14, -187363961), r = R(r, i, o, n, e[l + 8], 20, 1163531501), n = R(n, r, i, o, e[l + 13], 5, -1444681467), o = R(o, n, r, i, e[l + 2], 9, -51403784), i = R(i, o, n, r, e[l + 7], 14, 1735328473), r = R(r, i, o, n, e[l + 12], 20, -1926607734), n = T(n, r, i, o, e[l + 5], 4, -378558), o = T(o, n, r, i, e[l + 8], 11, -2022574463), i = T(i, o, n, r, e[l + 11], 16, 1839030562), r = T(r, i, o, n, e[l + 14], 23, -35309556), n = T(n, r, i, o, e[l + 1], 4, -1530992060), o = T(o, n, r, i, e[l + 4], 11, 1272893353), i = T(i, o, n, r, e[l + 7], 16, -155497632), r = T(r, i, o, n, e[l + 10], 23, -1094730640), n = T(n, r, i, o, e[l + 13], 4, 681279174), o = T(o, n, r, i, e[l], 11, -358537222), i = T(i, o, n, r, e[l + 3], 16, -722521979), r = T(r, i, o, n, e[l + 6], 23, 76029189), n = T(n, r, i, o, e[l + 9], 4, -640364487), o = T(o, n, r, i, e[l + 12], 11, -421815835), i = T(i, o, n, r, e[l + 15], 16, 530742520), r = T(r, i, o, n, e[l + 2], 23, -995338651), n = w(n, r, i, o, e[l], 6, -198630844), o = w(o, n, r, i, e[l + 7], 10, 1126891415), i = w(i, o, n, r, e[l + 14], 15, -1416354905), r = w(r, i, o, n, e[l + 5], 21, -57434055), n = w(n, r, i, o, e[l + 12], 6, 1700485571), o = w(o, n, r, i, e[l + 3], 10, -1894986606), i = w(i, o, n, r, e[l + 10], 15, -1051523), r = w(r, i, o, n, e[l + 1], 21, -2054922799), n = w(n, r, i, o, e[l + 8], 6, 1873313359), o = w(o, n, r, i, e[l + 15], 10, -30611744), i = w(i, o, n, r, e[l + 6], 15, -1560198380), r = w(r, i, o, n, e[l + 13], 21, 1309151649), n = w(n, r, i, o, e[l + 4], 6, -145523070), o = w(o, n, r, i, e[l + 11], 10, -1120210379), i = w(i, o, n, r, e[l + 2], 15, 718787259), r = w(r, i, o, n, e[l + 9], 21, -343485551), n = V(n, m), r = V(r, c), i = V(i, k), o = V(o, N);
|
|
1007
|
+
}
|
|
1008
|
+
return [n, r, i, o];
|
|
1009
|
+
}
|
|
1010
|
+
function ga(e) {
|
|
1011
|
+
if (e.length === 0)
|
|
1012
|
+
return [];
|
|
1013
|
+
for (var t = e.length * 8, n = new Uint32Array(nn(t)), r = 0; r < t; r += 8)
|
|
1014
|
+
n[r >> 5] |= (e[r / 8] & 255) << r % 32;
|
|
1015
|
+
return n;
|
|
1016
|
+
}
|
|
1017
|
+
function V(e, t) {
|
|
1018
|
+
var n = (e & 65535) + (t & 65535), r = (e >> 16) + (t >> 16) + (n >> 16);
|
|
1019
|
+
return r << 16 | n & 65535;
|
|
1020
|
+
}
|
|
1021
|
+
function Na(e, t) {
|
|
1022
|
+
return e << t | e >>> 32 - t;
|
|
1023
|
+
}
|
|
1024
|
+
function te(e, t, n, r, i, o) {
|
|
1025
|
+
return V(Na(V(V(t, e), V(r, o)), i), n);
|
|
1026
|
+
}
|
|
1027
|
+
function b(e, t, n, r, i, o, l) {
|
|
1028
|
+
return te(t & n | ~t & r, e, t, i, o, l);
|
|
1029
|
+
}
|
|
1030
|
+
function R(e, t, n, r, i, o, l) {
|
|
1031
|
+
return te(t & r | n & ~r, e, t, i, o, l);
|
|
1032
|
+
}
|
|
1033
|
+
function T(e, t, n, r, i, o, l) {
|
|
1034
|
+
return te(t ^ n ^ r, e, t, i, o, l);
|
|
1035
|
+
}
|
|
1036
|
+
function w(e, t, n, r, i, o, l) {
|
|
1037
|
+
return te(n ^ (t | ~r), e, t, i, o, l);
|
|
1038
|
+
}
|
|
1039
|
+
var ha = fa;
|
|
1040
|
+
en("v3", 48, ha);
|
|
1041
|
+
function Sa(e, t, n) {
|
|
1042
|
+
e = e || {};
|
|
1043
|
+
var r = e.random || (e.rng || ia)();
|
|
1044
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
1045
|
+
n = n || 0;
|
|
1046
|
+
for (var i = 0; i < 16; ++i)
|
|
1047
|
+
t[n + i] = r[i];
|
|
1048
|
+
return t;
|
|
1049
|
+
}
|
|
1050
|
+
return Ze(r);
|
|
1051
|
+
}
|
|
1052
|
+
var ya = Sa;
|
|
1053
|
+
function _a(e, t, n, r) {
|
|
1054
|
+
switch (e) {
|
|
1055
|
+
case 0:
|
|
1056
|
+
return t & n ^ ~t & r;
|
|
1057
|
+
case 1:
|
|
1058
|
+
return t ^ n ^ r;
|
|
1059
|
+
case 2:
|
|
1060
|
+
return t & n ^ t & r ^ n & r;
|
|
1061
|
+
case 3:
|
|
1062
|
+
return t ^ n ^ r;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
function ve(e, t) {
|
|
1066
|
+
return e << t | e >>> 32 - t;
|
|
1067
|
+
}
|
|
1068
|
+
function Ca(e) {
|
|
1069
|
+
var t = [1518500249, 1859775393, 2400959708, 3395469782], n = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
|
|
1070
|
+
if (typeof e == "string") {
|
|
1071
|
+
var r = unescape(encodeURIComponent(e));
|
|
1072
|
+
e = [];
|
|
1073
|
+
for (var i = 0; i < r.length; ++i)
|
|
1074
|
+
e.push(r.charCodeAt(i));
|
|
1075
|
+
} else
|
|
1076
|
+
Array.isArray(e) || (e = Array.prototype.slice.call(e));
|
|
1077
|
+
e.push(128);
|
|
1078
|
+
for (var o = e.length / 4 + 2, l = Math.ceil(o / 16), m = new Array(l), c = 0; c < l; ++c) {
|
|
1079
|
+
for (var k = new Uint32Array(16), N = 0; N < 16; ++N)
|
|
1080
|
+
k[N] = e[c * 64 + N * 4] << 24 | e[c * 64 + N * 4 + 1] << 16 | e[c * 64 + N * 4 + 2] << 8 | e[c * 64 + N * 4 + 3];
|
|
1081
|
+
m[c] = k;
|
|
1082
|
+
}
|
|
1083
|
+
m[l - 1][14] = (e.length - 1) * 8 / Math.pow(2, 32), m[l - 1][14] = Math.floor(m[l - 1][14]), m[l - 1][15] = (e.length - 1) * 8 & 4294967295;
|
|
1084
|
+
for (var C = 0; C < l; ++C) {
|
|
1085
|
+
for (var S = new Uint32Array(80), j = 0; j < 16; ++j)
|
|
1086
|
+
S[j] = m[C][j];
|
|
1087
|
+
for (var E = 16; E < 80; ++E)
|
|
1088
|
+
S[E] = ve(S[E - 3] ^ S[E - 8] ^ S[E - 14] ^ S[E - 16], 1);
|
|
1089
|
+
for (var M = n[0], L = n[1], $ = n[2], Y = n[3], h = n[4], G = 0; G < 80; ++G) {
|
|
1090
|
+
var K = Math.floor(G / 20), re = ve(M, 5) + _a(K, L, $, Y) + h + t[K] + S[G] >>> 0;
|
|
1091
|
+
h = Y, Y = $, $ = ve(L, 30) >>> 0, L = M, M = re;
|
|
1092
|
+
}
|
|
1093
|
+
n[0] = n[0] + M >>> 0, n[1] = n[1] + L >>> 0, n[2] = n[2] + $ >>> 0, n[3] = n[3] + Y >>> 0, n[4] = n[4] + h >>> 0;
|
|
1094
|
+
}
|
|
1095
|
+
return [n[0] >> 24 & 255, n[0] >> 16 & 255, n[0] >> 8 & 255, n[0] & 255, n[1] >> 24 & 255, n[1] >> 16 & 255, n[1] >> 8 & 255, n[1] & 255, n[2] >> 24 & 255, n[2] >> 16 & 255, n[2] >> 8 & 255, n[2] & 255, n[3] >> 24 & 255, n[3] >> 16 & 255, n[3] >> 8 & 255, n[3] & 255, n[4] >> 24 & 255, n[4] >> 16 & 255, n[4] >> 8 & 255, n[4] & 255];
|
|
1096
|
+
}
|
|
1097
|
+
var Ea = Ca;
|
|
1098
|
+
en("v5", 80, Ea);
|
|
1099
|
+
const ze = "FINGERPRINT_LIVE_SHOPPING", Ya = () => {
|
|
1100
|
+
let e = qe.get(ze);
|
|
1101
|
+
return e || (e = ya(), qe.set(ze, e, { expires: 1 }), e);
|
|
1102
|
+
};
|
|
1103
|
+
export {
|
|
1104
|
+
wa as AccountInvalidError,
|
|
1105
|
+
In as AggregateRoot,
|
|
1106
|
+
Aa as ApiGraphqlTypes,
|
|
1107
|
+
Ne as DomainError,
|
|
1108
|
+
Zn as Err,
|
|
1109
|
+
ea as Ok,
|
|
1110
|
+
Ra as ResourceNotFoundError,
|
|
1111
|
+
ae as Result,
|
|
1112
|
+
Oa as StoreProvider,
|
|
1113
|
+
Ta as UnexpectedError,
|
|
1114
|
+
Da as apiCall,
|
|
1115
|
+
Ua as createAggregateRoot,
|
|
1116
|
+
$a as err,
|
|
1117
|
+
Ya as getFingerprint,
|
|
1118
|
+
ja as getStore,
|
|
1119
|
+
Ma as lazyLoad,
|
|
1120
|
+
La as ok,
|
|
1121
|
+
Va as searchParams,
|
|
1122
|
+
Ia as shortId,
|
|
1123
|
+
Pa as useStore
|
|
1124
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nizza/core",
|
|
3
|
-
"version": "0.1.0",
|
|
3
|
+
"version": "0.1.1-beta.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"main": "dist/index.es.js",
|
|
5
6
|
"module": "dist/index.es.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,12 +10,10 @@
|
|
|
9
10
|
"dist"
|
|
10
11
|
],
|
|
11
12
|
"dependencies": {
|
|
12
|
-
"js-cookie": "^3.0.1"
|
|
13
|
-
"uuid": "^8.3.2"
|
|
13
|
+
"js-cookie": "^3.0.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/js-cookie": "^3.0.2"
|
|
17
|
-
"@types/uuid": "^8.3.1"
|
|
16
|
+
"@types/js-cookie": "^3.0.2"
|
|
18
17
|
},
|
|
19
18
|
"scripts": {
|
|
20
19
|
"clean": "rimraf dist"
|