@dashx/react 0.0.2 → 0.0.4

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 CHANGED
@@ -1,1129 +1,153 @@
1
- import Q from "react";
2
- function jt(s) {
3
- return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
4
- }
5
- function $t(s) {
6
- if (s.__esModule)
7
- return s;
8
- var o = s.default;
9
- if (typeof o == "function") {
10
- var r = function t() {
11
- return this instanceof t ? Reflect.construct(o, arguments, this.constructor) : o.apply(this, arguments);
12
- };
13
- r.prototype = o.prototype;
14
- } else
15
- r = {};
16
- return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(s).forEach(function(t) {
17
- var a = Object.getOwnPropertyDescriptor(s, t);
18
- Object.defineProperty(r, t, a.get ? a : {
19
- enumerable: !0,
20
- get: function() {
21
- return s[t];
22
- }
23
- });
24
- }), r;
25
- }
26
- var Ue = { exports: {} }, ve = {};
27
- /**
28
- * @license React
29
- * react-jsx-runtime.production.min.js
30
- *
31
- * Copyright (c) Facebook, Inc. and its affiliates.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE file in the root directory of this source tree.
35
- */
36
- var Ze;
37
- function xt() {
38
- if (Ze)
39
- return ve;
40
- Ze = 1;
41
- var s = Q, o = Symbol.for("react.element"), r = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, a = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
42
- function p(c, l, n) {
43
- var m, b = {}, R = null, O = null;
44
- n !== void 0 && (R = "" + n), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (O = l.ref);
45
- for (m in l)
46
- t.call(l, m) && !d.hasOwnProperty(m) && (b[m] = l[m]);
47
- if (c && c.defaultProps)
48
- for (m in l = c.defaultProps, l)
49
- b[m] === void 0 && (b[m] = l[m]);
50
- return { $$typeof: o, type: c, key: R, ref: O, props: b, _owner: a.current };
51
- }
52
- return ve.Fragment = r, ve.jsx = p, ve.jsxs = p, ve;
53
- }
54
- var me = {};
55
- /**
56
- * @license React
57
- * react-jsx-runtime.development.js
58
- *
59
- * Copyright (c) Facebook, Inc. and its affiliates.
60
- *
61
- * This source code is licensed under the MIT license found in the
62
- * LICENSE file in the root directory of this source tree.
63
- */
64
- var Qe;
65
- function Ut() {
66
- return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && function() {
67
- var s = Q, o = Symbol.for("react.element"), r = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), n = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), z = Symbol.iterator, Y = "@@iterator";
68
- function Z(e) {
69
- if (e === null || typeof e != "object")
70
- return null;
71
- var u = z && e[z] || e[Y];
72
- return typeof u == "function" ? u : null;
73
- }
74
- var F = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
75
- function I(e) {
76
- {
77
- for (var u = arguments.length, h = new Array(u > 1 ? u - 1 : 0), w = 1; w < u; w++)
78
- h[w - 1] = arguments[w];
79
- ee("error", e, h);
80
- }
81
- }
82
- function ee(e, u, h) {
83
- {
84
- var w = F.ReactDebugCurrentFrame, P = w.getStackAddendum();
85
- P !== "" && (u += "%s", h = h.concat([P]));
86
- var A = h.map(function(E) {
87
- return String(E);
88
- });
89
- A.unshift("Warning: " + u), Function.prototype.apply.call(console[e], console, A);
90
- }
91
- }
92
- var ce = !1, X = !1, ae = !1, re = !1, te = !1, ne;
93
- ne = Symbol.for("react.module.reference");
94
- function f(e) {
95
- return !!(typeof e == "string" || typeof e == "function" || e === t || e === d || te || e === a || e === n || e === m || re || e === O || ce || X || ae || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === b || e.$$typeof === p || e.$$typeof === c || e.$$typeof === l || // This needs to include all possible module reference object
96
- // types supported by any Flight configuration anywhere since
97
- // we don't know which Flight build this will end up being used
98
- // with.
99
- e.$$typeof === ne || e.getModuleId !== void 0));
100
- }
101
- function i(e, u, h) {
102
- var w = e.displayName;
103
- if (w)
104
- return w;
105
- var P = u.displayName || u.name || "";
106
- return P !== "" ? h + "(" + P + ")" : h;
107
- }
108
- function y(e) {
109
- return e.displayName || "Context";
110
- }
111
- function g(e) {
112
- if (e == null)
113
- return null;
114
- if (typeof e.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
115
- return e.displayName || e.name || null;
116
- if (typeof e == "string")
117
- return e;
118
- switch (e) {
119
- case t:
120
- return "Fragment";
121
- case r:
122
- return "Portal";
123
- case d:
124
- return "Profiler";
125
- case a:
126
- return "StrictMode";
127
- case n:
128
- return "Suspense";
129
- case m:
130
- return "SuspenseList";
131
- }
132
- if (typeof e == "object")
133
- switch (e.$$typeof) {
134
- case c:
135
- var u = e;
136
- return y(u) + ".Consumer";
137
- case p:
138
- var h = e;
139
- return y(h._context) + ".Provider";
140
- case l:
141
- return i(e, e.render, "ForwardRef");
142
- case b:
143
- var w = e.displayName || null;
144
- return w !== null ? w : g(e.type) || "Memo";
145
- case R: {
146
- var P = e, A = P._payload, E = P._init;
147
- try {
148
- return g(E(A));
149
- } catch {
150
- return null;
151
- }
152
- }
153
- }
154
- return null;
155
- }
156
- var v = Object.assign, j = 0, U, H, K, T, q, V, le;
157
- function fe() {
158
- }
159
- fe.__reactDisabledLog = !0;
160
- function de() {
161
- {
162
- if (j === 0) {
163
- U = console.log, H = console.info, K = console.warn, T = console.error, q = console.group, V = console.groupCollapsed, le = console.groupEnd;
164
- var e = {
165
- configurable: !0,
166
- enumerable: !0,
167
- value: fe,
168
- writable: !0
169
- };
170
- Object.defineProperties(console, {
171
- info: e,
172
- log: e,
173
- warn: e,
174
- error: e,
175
- group: e,
176
- groupCollapsed: e,
177
- groupEnd: e
178
- });
179
- }
180
- j++;
181
- }
182
- }
183
- function ie() {
184
- {
185
- if (j--, j === 0) {
186
- var e = {
187
- configurable: !0,
188
- enumerable: !0,
189
- writable: !0
190
- };
191
- Object.defineProperties(console, {
192
- log: v({}, e, {
193
- value: U
194
- }),
195
- info: v({}, e, {
196
- value: H
197
- }),
198
- warn: v({}, e, {
199
- value: K
200
- }),
201
- error: v({}, e, {
202
- value: T
203
- }),
204
- group: v({}, e, {
205
- value: q
206
- }),
207
- groupCollapsed: v({}, e, {
208
- value: V
209
- }),
210
- groupEnd: v({}, e, {
211
- value: le
212
- })
213
- });
214
- }
215
- j < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
216
- }
217
- }
218
- var Re = F.ReactCurrentDispatcher, Ee;
219
- function ge(e, u, h) {
220
- {
221
- if (Ee === void 0)
222
- try {
223
- throw Error();
224
- } catch (P) {
225
- var w = P.stack.trim().match(/\n( *(at )?)/);
226
- Ee = w && w[1] || "";
227
- }
228
- return `
229
- ` + Ee + e;
230
- }
231
- }
232
- var _e = !1, we;
233
- {
234
- var ut = typeof WeakMap == "function" ? WeakMap : Map;
235
- we = new ut();
236
- }
237
- function Fe(e, u) {
238
- if (!e || _e)
239
- return "";
240
- {
241
- var h = we.get(e);
242
- if (h !== void 0)
243
- return h;
244
- }
245
- var w;
246
- _e = !0;
247
- var P = Error.prepareStackTrace;
248
- Error.prepareStackTrace = void 0;
249
- var A;
250
- A = Re.current, Re.current = null, de();
251
- try {
252
- if (u) {
253
- var E = function() {
254
- throw Error();
255
- };
256
- if (Object.defineProperty(E.prototype, "props", {
257
- set: function() {
258
- throw Error();
259
- }
260
- }), typeof Reflect == "object" && Reflect.construct) {
261
- try {
262
- Reflect.construct(E, []);
263
- } catch (W) {
264
- w = W;
265
- }
266
- Reflect.construct(e, [], E);
267
- } else {
268
- try {
269
- E.call();
270
- } catch (W) {
271
- w = W;
272
- }
273
- e.call(E.prototype);
274
- }
275
- } else {
276
- try {
277
- throw Error();
278
- } catch (W) {
279
- w = W;
280
- }
281
- e();
282
- }
283
- } catch (W) {
284
- if (W && w && typeof W.stack == "string") {
285
- for (var C = W.stack.split(`
286
- `), M = w.stack.split(`
287
- `), $ = C.length - 1, x = M.length - 1; $ >= 1 && x >= 0 && C[$] !== M[x]; )
288
- x--;
289
- for (; $ >= 1 && x >= 0; $--, x--)
290
- if (C[$] !== M[x]) {
291
- if ($ !== 1 || x !== 1)
292
- do
293
- if ($--, x--, x < 0 || C[$] !== M[x]) {
294
- var J = `
295
- ` + C[$].replace(" at new ", " at ");
296
- return e.displayName && J.includes("<anonymous>") && (J = J.replace("<anonymous>", e.displayName)), typeof e == "function" && we.set(e, J), J;
297
- }
298
- while ($ >= 1 && x >= 0);
299
- break;
300
- }
301
- }
302
- } finally {
303
- _e = !1, Re.current = A, ie(), Error.prepareStackTrace = P;
304
- }
305
- var se = e ? e.displayName || e.name : "", oe = se ? ge(se) : "";
306
- return typeof e == "function" && we.set(e, oe), oe;
307
- }
308
- function st(e, u, h) {
309
- return Fe(e, !1);
310
- }
311
- function ct(e) {
312
- var u = e.prototype;
313
- return !!(u && u.isReactComponent);
314
- }
315
- function be(e, u, h) {
316
- if (e == null)
317
- return "";
318
- if (typeof e == "function")
319
- return Fe(e, ct(e));
320
- if (typeof e == "string")
321
- return ge(e);
322
- switch (e) {
323
- case n:
324
- return ge("Suspense");
325
- case m:
326
- return ge("SuspenseList");
327
- }
328
- if (typeof e == "object")
329
- switch (e.$$typeof) {
330
- case l:
331
- return st(e.render);
332
- case b:
333
- return be(e.type, u, h);
334
- case R: {
335
- var w = e, P = w._payload, A = w._init;
336
- try {
337
- return be(A(P), u, h);
338
- } catch {
339
- }
340
- }
341
- }
342
- return "";
343
- }
344
- var pe = Object.prototype.hasOwnProperty, qe = {}, Me = F.ReactDebugCurrentFrame;
345
- function Ce(e) {
346
- if (e) {
347
- var u = e._owner, h = be(e.type, e._source, u ? u.type : null);
348
- Me.setExtraStackFrame(h);
349
- } else
350
- Me.setExtraStackFrame(null);
351
- }
352
- function lt(e, u, h, w, P) {
353
- {
354
- var A = Function.call.bind(pe);
355
- for (var E in e)
356
- if (A(e, E)) {
357
- var C = void 0;
358
- try {
359
- if (typeof e[E] != "function") {
360
- var M = Error((w || "React class") + ": " + h + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
361
- throw M.name = "Invariant Violation", M;
362
- }
363
- C = e[E](u, E, w, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
364
- } catch ($) {
365
- C = $;
366
- }
367
- C && !(C instanceof Error) && (Ce(P), I("%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).", w || "React class", h, E, typeof C), Ce(null)), C instanceof Error && !(C.message in qe) && (qe[C.message] = !0, Ce(P), I("Failed %s type: %s", h, C.message), Ce(null));
368
- }
369
- }
370
- }
371
- var ft = Array.isArray;
372
- function Te(e) {
373
- return ft(e);
374
- }
375
- function dt(e) {
376
- {
377
- var u = typeof Symbol == "function" && Symbol.toStringTag, h = u && e[Symbol.toStringTag] || e.constructor.name || "Object";
378
- return h;
379
- }
380
- }
381
- function pt(e) {
382
- try {
383
- return Be(e), !1;
384
- } catch {
385
- return !0;
386
- }
387
- }
388
- function Be(e) {
389
- return "" + e;
390
- }
391
- function Ne(e) {
392
- if (pt(e))
393
- return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dt(e)), Be(e);
394
- }
395
- var he = F.ReactCurrentOwner, ht = {
396
- key: !0,
397
- ref: !0,
398
- __self: !0,
399
- __source: !0
400
- }, He, We, Pe;
401
- Pe = {};
402
- function vt(e) {
403
- if (pe.call(e, "ref")) {
404
- var u = Object.getOwnPropertyDescriptor(e, "ref").get;
405
- if (u && u.isReactWarning)
406
- return !1;
407
- }
408
- return e.ref !== void 0;
409
- }
410
- function mt(e) {
411
- if (pe.call(e, "key")) {
412
- var u = Object.getOwnPropertyDescriptor(e, "key").get;
413
- if (u && u.isReactWarning)
414
- return !1;
415
- }
416
- return e.key !== void 0;
417
- }
418
- function yt(e, u) {
419
- if (typeof e.ref == "string" && he.current && u && he.current.stateNode !== u) {
420
- var h = g(he.current.type);
421
- Pe[h] || (I('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', g(he.current.type), e.ref), Pe[h] = !0);
422
- }
423
- }
424
- function gt(e, u) {
425
- {
426
- var h = function() {
427
- He || (He = !0, I("%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)", u));
428
- };
429
- h.isReactWarning = !0, Object.defineProperty(e, "key", {
430
- get: h,
431
- configurable: !0
432
- });
433
- }
434
- }
435
- function wt(e, u) {
436
- {
437
- var h = function() {
438
- We || (We = !0, I("%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)", u));
439
- };
440
- h.isReactWarning = !0, Object.defineProperty(e, "ref", {
441
- get: h,
442
- configurable: !0
443
- });
444
- }
445
- }
446
- var bt = function(e, u, h, w, P, A, E) {
447
- var C = {
448
- // This tag allows us to uniquely identify this as a React Element
449
- $$typeof: o,
450
- // Built-in properties that belong on the element
451
- type: e,
452
- key: u,
453
- ref: h,
454
- props: E,
455
- // Record the component responsible for creating this element.
456
- _owner: A
457
- };
458
- return C._store = {}, Object.defineProperty(C._store, "validated", {
459
- configurable: !1,
460
- enumerable: !1,
461
- writable: !0,
462
- value: !1
463
- }), Object.defineProperty(C, "_self", {
464
- configurable: !1,
465
- enumerable: !1,
466
- writable: !1,
467
- value: w
468
- }), Object.defineProperty(C, "_source", {
469
- configurable: !1,
470
- enumerable: !1,
471
- writable: !1,
472
- value: P
473
- }), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
474
- };
475
- function Ct(e, u, h, w, P) {
476
- {
477
- var A, E = {}, C = null, M = null;
478
- h !== void 0 && (Ne(h), C = "" + h), mt(u) && (Ne(u.key), C = "" + u.key), vt(u) && (M = u.ref, yt(u, P));
479
- for (A in u)
480
- pe.call(u, A) && !ht.hasOwnProperty(A) && (E[A] = u[A]);
481
- if (e && e.defaultProps) {
482
- var $ = e.defaultProps;
483
- for (A in $)
484
- E[A] === void 0 && (E[A] = $[A]);
485
- }
486
- if (C || M) {
487
- var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
488
- C && gt(E, x), M && wt(E, x);
489
- }
490
- return bt(e, C, M, P, w, he.current, E);
491
- }
492
- }
493
- var Se = F.ReactCurrentOwner, Ye = F.ReactDebugCurrentFrame;
494
- function ue(e) {
495
- if (e) {
496
- var u = e._owner, h = be(e.type, e._source, u ? u.type : null);
497
- Ye.setExtraStackFrame(h);
498
- } else
499
- Ye.setExtraStackFrame(null);
500
- }
501
- var ke;
502
- ke = !1;
503
- function Ae(e) {
504
- return typeof e == "object" && e !== null && e.$$typeof === o;
505
- }
506
- function Ve() {
507
- {
508
- if (Se.current) {
509
- var e = g(Se.current.type);
510
- if (e)
511
- return `
512
-
513
- Check the render method of \`` + e + "`.";
514
- }
515
- return "";
516
- }
517
- }
518
- function Rt(e) {
519
- return "";
520
- }
521
- var Ge = {};
522
- function Et(e) {
523
- {
524
- var u = Ve();
525
- if (!u) {
526
- var h = typeof e == "string" ? e : e.displayName || e.name;
527
- h && (u = `
528
-
529
- Check the top-level render call using <` + h + ">.");
530
- }
531
- return u;
532
- }
533
- }
534
- function Xe(e, u) {
535
- {
536
- if (!e._store || e._store.validated || e.key != null)
537
- return;
538
- e._store.validated = !0;
539
- var h = Et(u);
540
- if (Ge[h])
541
- return;
542
- Ge[h] = !0;
543
- var w = "";
544
- e && e._owner && e._owner !== Se.current && (w = " It was passed a child from " + g(e._owner.type) + "."), ue(e), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, w), ue(null);
545
- }
546
- }
547
- function Ke(e, u) {
548
- {
549
- if (typeof e != "object")
550
- return;
551
- if (Te(e))
552
- for (var h = 0; h < e.length; h++) {
553
- var w = e[h];
554
- Ae(w) && Xe(w, u);
555
- }
556
- else if (Ae(e))
557
- e._store && (e._store.validated = !0);
558
- else if (e) {
559
- var P = Z(e);
560
- if (typeof P == "function" && P !== e.entries)
561
- for (var A = P.call(e), E; !(E = A.next()).done; )
562
- Ae(E.value) && Xe(E.value, u);
563
- }
564
- }
565
- }
566
- function _t(e) {
567
- {
568
- var u = e.type;
569
- if (u == null || typeof u == "string")
570
- return;
571
- var h;
572
- if (typeof u == "function")
573
- h = u.propTypes;
574
- else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
575
- // Inner props are checked in the reconciler.
576
- u.$$typeof === b))
577
- h = u.propTypes;
578
- else
579
- return;
580
- if (h) {
581
- var w = g(u);
582
- lt(h, e.props, "prop", w, e);
583
- } else if (u.PropTypes !== void 0 && !ke) {
584
- ke = !0;
585
- var P = g(u);
586
- I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
587
- }
588
- typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
589
- }
590
- }
591
- function Tt(e) {
592
- {
593
- for (var u = Object.keys(e.props), h = 0; h < u.length; h++) {
594
- var w = u[h];
595
- if (w !== "children" && w !== "key") {
596
- ue(e), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), ue(null);
597
- break;
598
- }
599
- }
600
- e.ref !== null && (ue(e), I("Invalid attribute `ref` supplied to `React.Fragment`."), ue(null));
601
- }
602
- }
603
- var Je = {};
604
- function ze(e, u, h, w, P, A) {
605
- {
606
- var E = f(e);
607
- if (!E) {
608
- var C = "";
609
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
610
- var M = Rt();
611
- M ? C += M : C += Ve();
612
- var $;
613
- e === null ? $ = "null" : Te(e) ? $ = "array" : e !== void 0 && e.$$typeof === o ? ($ = "<" + (g(e.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, C);
614
- }
615
- var x = Ct(e, u, h, P, A);
616
- if (x == null)
617
- return x;
618
- if (E) {
619
- var J = u.children;
620
- if (J !== void 0)
621
- if (w)
622
- if (Te(J)) {
623
- for (var se = 0; se < J.length; se++)
624
- Ke(J[se], e);
625
- Object.freeze && Object.freeze(J);
626
- } else
627
- I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
628
- else
629
- Ke(J, e);
630
- }
631
- if (pe.call(u, "key")) {
632
- var oe = g(e), W = Object.keys(u).filter(function(It) {
633
- return It !== "key";
634
- }), Oe = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
635
- if (!Je[oe + Oe]) {
636
- var Ot = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
637
- I(`A props object containing a "key" prop is being spread into JSX:
638
- let props = %s;
639
- <%s {...props} />
640
- React keys must be passed directly to JSX without using spread:
641
- let props = %s;
642
- <%s key={someKey} {...props} />`, Oe, oe, Ot, oe), Je[oe + Oe] = !0;
643
- }
644
- }
645
- return e === t ? Tt(x) : _t(x), x;
646
- }
647
- }
648
- function Pt(e, u, h) {
649
- return ze(e, u, h, !0);
650
- }
651
- function St(e, u, h) {
652
- return ze(e, u, h, !1);
653
- }
654
- var kt = St, At = Pt;
655
- me.Fragment = t, me.jsx = kt, me.jsxs = At;
656
- }()), me;
657
- }
658
- process.env.NODE_ENV === "production" ? Ue.exports = xt() : Ue.exports = Ut();
659
- var L = Ue.exports;
660
- function et(s, o) {
661
- return o = o || {}, new Promise(function(r, t) {
662
- var a = new XMLHttpRequest(), d = [], p = [], c = {}, l = function() {
1
+ import * as C from "react";
2
+ import O, { useState as Se, useEffect as ct, useCallback as Qt } from "react";
3
+ import * as Jr from "react-dom";
4
+ import zr from "react-dom";
5
+ var Gr = Object.defineProperty, Xr = (e, t, r) => t in e ? Gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ee = (e, t, r) => (Xr(e, typeof t != "symbol" ? t + "" : t, r), r), br = (e, t, r) => {
6
+ if (!t.has(e))
7
+ throw TypeError("Cannot " + r);
8
+ }, A = (e, t, r) => (br(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ge = (e, t, r) => {
9
+ if (t.has(e))
10
+ throw TypeError("Cannot add the same private member more than once");
11
+ t instanceof WeakSet ? t.add(e) : t.set(e, r);
12
+ }, oe = (e, t, r, n) => (br(e, t, "write to private field"), t.set(e, r), r);
13
+ function Zt(e, t) {
14
+ return t = t || {}, new Promise(function(r, n) {
15
+ var a = new XMLHttpRequest(), o = [], c = [], u = {}, s = function() {
663
16
  return { ok: (a.status / 100 | 0) == 2, statusText: a.statusText, status: a.status, url: a.responseURL, text: function() {
664
17
  return Promise.resolve(a.responseText);
665
18
  }, json: function() {
666
19
  return Promise.resolve(a.responseText).then(JSON.parse);
667
20
  }, blob: function() {
668
21
  return Promise.resolve(new Blob([a.response]));
669
- }, clone: l, headers: { keys: function() {
670
- return d;
22
+ }, clone: s, headers: { keys: function() {
23
+ return o;
671
24
  }, entries: function() {
672
- return p;
673
- }, get: function(m) {
674
- return c[m.toLowerCase()];
675
- }, has: function(m) {
676
- return m.toLowerCase() in c;
25
+ return c;
26
+ }, get: function(l) {
27
+ return u[l.toLowerCase()];
28
+ }, has: function(l) {
29
+ return l.toLowerCase() in u;
677
30
  } } };
678
31
  };
679
- for (var n in a.open(o.method || "get", s, !0), a.onload = function() {
680
- a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(m, b, R) {
681
- d.push(b = b.toLowerCase()), p.push([b, R]), c[b] = c[b] ? c[b] + "," + R : R;
682
- }), r(l());
683
- }, a.onerror = t, a.withCredentials = o.credentials == "include", o.headers)
684
- a.setRequestHeader(n, o.headers[n]);
685
- a.send(o.body || null);
32
+ for (var i in a.open(t.method || "get", e, !0), a.onload = function() {
33
+ a.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(l, d, f) {
34
+ o.push(d = d.toLowerCase()), c.push([d, f]), u[d] = u[d] ? u[d] + "," + f : f;
35
+ }), r(s());
36
+ }, a.onerror = n, a.withCredentials = t.credentials == "include", t.headers)
37
+ a.setRequestHeader(i, t.headers[i]);
38
+ a.send(t.body || null);
686
39
  });
687
40
  }
688
- function Dt(s) {
689
- throw new Error('Could not dynamically require "' + s + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
41
+ function Yr(e) {
42
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
43
+ }
44
+ function Kr(e) {
45
+ if (e.__esModule)
46
+ return e;
47
+ var t = e.default;
48
+ if (typeof t == "function") {
49
+ var r = function n() {
50
+ return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
51
+ };
52
+ r.prototype = t.prototype;
53
+ } else
54
+ r = {};
55
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
56
+ var a = Object.getOwnPropertyDescriptor(e, n);
57
+ Object.defineProperty(r, n, a.get ? a : {
58
+ enumerable: !0,
59
+ get: function() {
60
+ return e[n];
61
+ }
62
+ });
63
+ }), r;
64
+ }
65
+ function Qr(e) {
66
+ throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
690
67
  }
691
- var at = { exports: {} };
692
- const Lt = {}, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
+ var wr = { exports: {} };
69
+ const Zr = {}, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
693
70
  __proto__: null,
694
- default: Lt
695
- }, Symbol.toStringTag, { value: "Module" })), qt = /* @__PURE__ */ $t(Ft);
696
- (function(s) {
71
+ default: Zr
72
+ }, Symbol.toStringTag, { value: "Module" })), tn = /* @__PURE__ */ Kr(en);
73
+ (function(e) {
697
74
  (function() {
698
- var o, r = 0, t = [], a;
75
+ var t, r = 0, n = [], a;
699
76
  for (a = 0; a < 256; a++)
700
- t[a] = (a + 256).toString(16).substr(1);
701
- l.BUFFER_SIZE = 4096, l.bin = c, l.clearBuffer = function() {
702
- o = null, r = 0;
703
- }, l.test = function(n) {
704
- return typeof n == "string" ? /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(n) : !1;
77
+ n[a] = (a + 256).toString(16).substr(1);
78
+ s.BUFFER_SIZE = 4096, s.bin = u, s.clearBuffer = function() {
79
+ t = null, r = 0;
80
+ }, s.test = function(i) {
81
+ return typeof i == "string" ? /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(i) : !1;
705
82
  };
706
- var d;
707
- typeof crypto < "u" ? d = crypto : typeof window < "u" && typeof window.msCrypto < "u" && (d = window.msCrypto), typeof Dt == "function" ? (d = d || qt, s.exports = l) : typeof window < "u" && (window.uuid = l), l.randomBytes = function() {
708
- if (d) {
709
- if (d.randomBytes)
710
- return d.randomBytes;
711
- if (d.getRandomValues)
712
- return typeof Uint8Array.prototype.slice != "function" ? function(n) {
713
- var m = new Uint8Array(n);
714
- return d.getRandomValues(m), Array.from(m);
715
- } : function(n) {
716
- var m = new Uint8Array(n);
717
- return d.getRandomValues(m), m;
83
+ var o;
84
+ typeof crypto < "u" ? o = crypto : typeof window < "u" && typeof window.msCrypto < "u" && (o = window.msCrypto), typeof Qr == "function" ? (o = o || tn, e.exports = s) : typeof window < "u" && (window.uuid = s), s.randomBytes = function() {
85
+ if (o) {
86
+ if (o.randomBytes)
87
+ return o.randomBytes;
88
+ if (o.getRandomValues)
89
+ return typeof Uint8Array.prototype.slice != "function" ? function(i) {
90
+ var l = new Uint8Array(i);
91
+ return o.getRandomValues(l), Array.from(l);
92
+ } : function(i) {
93
+ var l = new Uint8Array(i);
94
+ return o.getRandomValues(l), l;
718
95
  };
719
96
  }
720
- return function(n) {
721
- var m, b = [];
722
- for (m = 0; m < n; m++)
723
- b.push(Math.floor(Math.random() * 256));
724
- return b;
97
+ return function(i) {
98
+ var l, d = [];
99
+ for (l = 0; l < i; l++)
100
+ d.push(Math.floor(Math.random() * 256));
101
+ return d;
725
102
  };
726
103
  }();
727
- function p(n) {
728
- return (!o || r + n > l.BUFFER_SIZE) && (r = 0, o = l.randomBytes(l.BUFFER_SIZE)), o.slice(r, r += n);
104
+ function c(i) {
105
+ return (!t || r + i > s.BUFFER_SIZE) && (r = 0, t = s.randomBytes(s.BUFFER_SIZE)), t.slice(r, r += i);
729
106
  }
730
- function c() {
731
- var n = p(16);
732
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, n;
107
+ function u() {
108
+ var i = c(16);
109
+ return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, i;
733
110
  }
734
- function l() {
735
- var n = c();
736
- return t[n[0]] + t[n[1]] + t[n[2]] + t[n[3]] + "-" + t[n[4]] + t[n[5]] + "-" + t[n[6]] + t[n[7]] + "-" + t[n[8]] + t[n[9]] + "-" + t[n[10]] + t[n[11]] + t[n[12]] + t[n[13]] + t[n[14]] + t[n[15]];
111
+ function s() {
112
+ var i = u();
113
+ return n[i[0]] + n[i[1]] + n[i[2]] + n[i[3]] + "-" + n[i[4]] + n[i[5]] + "-" + n[i[6]] + n[i[7]] + "-" + n[i[8]] + n[i[9]] + "-" + n[i[10]] + n[i[11]] + n[i[12]] + n[i[13]] + n[i[14]] + n[i[15]];
737
114
  }
738
115
  })();
739
- })(at);
740
- var Mt = at.exports;
741
- const Ie = /* @__PURE__ */ jt(Mt);
742
- function _() {
743
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
744
- _ = function() {
745
- return s;
746
- };
747
- var s = {}, o = Object.prototype, r = o.hasOwnProperty, t = typeof Symbol == "function" ? Symbol : {}, a = t.iterator || "@@iterator", d = t.asyncIterator || "@@asyncIterator", p = t.toStringTag || "@@toStringTag";
748
- function c(f, i, y) {
749
- return Object.defineProperty(f, i, {
750
- value: y,
751
- enumerable: !0,
752
- configurable: !0,
753
- writable: !0
754
- }), f[i];
755
- }
756
- try {
757
- c({}, "");
758
- } catch {
759
- c = function(i, y, g) {
760
- return i[y] = g;
761
- };
762
- }
763
- function l(f, i, y, g) {
764
- var v = i && i.prototype instanceof b ? i : b, j = Object.create(v.prototype), U = new re(g || []);
765
- return j._invoke = /* @__PURE__ */ function(H, K, T) {
766
- var q = "suspendedStart";
767
- return function(V, le) {
768
- if (q === "executing")
769
- throw new Error("Generator is already running");
770
- if (q === "completed") {
771
- if (V === "throw")
772
- throw le;
773
- return ne();
774
- }
775
- for (T.method = V, T.arg = le; ; ) {
776
- var fe = T.delegate;
777
- if (fe) {
778
- var de = ce(fe, T);
779
- if (de) {
780
- if (de === m)
781
- continue;
782
- return de;
783
- }
784
- }
785
- if (T.method === "next")
786
- T.sent = T._sent = T.arg;
787
- else if (T.method === "throw") {
788
- if (q === "suspendedStart")
789
- throw q = "completed", T.arg;
790
- T.dispatchException(T.arg);
791
- } else
792
- T.method === "return" && T.abrupt("return", T.arg);
793
- q = "executing";
794
- var ie = n(H, K, T);
795
- if (ie.type === "normal") {
796
- if (q = T.done ? "completed" : "suspendedYield", ie.arg === m)
797
- continue;
798
- return {
799
- value: ie.arg,
800
- done: T.done
801
- };
802
- }
803
- ie.type === "throw" && (q = "completed", T.method = "throw", T.arg = ie.arg);
804
- }
805
- };
806
- }(f, y, U), j;
807
- }
808
- function n(f, i, y) {
809
- try {
810
- return {
811
- type: "normal",
812
- arg: f.call(i, y)
813
- };
814
- } catch (g) {
815
- return {
816
- type: "throw",
817
- arg: g
818
- };
819
- }
820
- }
821
- s.wrap = l;
822
- var m = {};
823
- function b() {
824
- }
825
- function R() {
826
- }
827
- function O() {
828
- }
829
- var z = {};
830
- c(z, a, function() {
831
- return this;
832
- });
833
- var Y = Object.getPrototypeOf, Z = Y && Y(Y(te([])));
834
- Z && Z !== o && r.call(Z, a) && (z = Z);
835
- var F = O.prototype = b.prototype = Object.create(z);
836
- function I(f) {
837
- ["next", "throw", "return"].forEach(function(i) {
838
- c(f, i, function(y) {
839
- return this._invoke(i, y);
840
- });
841
- });
842
- }
843
- function ee(f, i) {
844
- function y(v, j, U, H) {
845
- var K = n(f[v], f, j);
846
- if (K.type !== "throw") {
847
- var T = K.arg, q = T.value;
848
- return q && typeof q == "object" && r.call(q, "__await") ? i.resolve(q.__await).then(function(V) {
849
- y("next", V, U, H);
850
- }, function(V) {
851
- y("throw", V, U, H);
852
- }) : i.resolve(q).then(function(V) {
853
- T.value = V, U(T);
854
- }, function(V) {
855
- return y("throw", V, U, H);
856
- });
857
- }
858
- H(K.arg);
859
- }
860
- var g;
861
- this._invoke = function(v, j) {
862
- function U() {
863
- return new i(function(H, K) {
864
- y(v, j, H, K);
865
- });
866
- }
867
- return g = g ? g.then(U, U) : U();
868
- };
869
- }
870
- function ce(f, i) {
871
- var y = f.iterator[i.method];
872
- if (y === void 0) {
873
- if (i.delegate = null, i.method === "throw") {
874
- if (f.iterator.return && (i.method = "return", i.arg = void 0, ce(f, i), i.method === "throw"))
875
- return m;
876
- i.method = "throw", i.arg = new TypeError("The iterator does not provide a 'throw' method");
877
- }
878
- return m;
116
+ })(wr);
117
+ var rn = wr.exports;
118
+ const Ot = /* @__PURE__ */ Yr(rn), nn = `
119
+ mutation TrackEvent($input: TrackEventInput!) {
120
+ trackEvent(input: $input) {
121
+ success
879
122
  }
880
- var g = n(y, f.iterator, i.arg);
881
- if (g.type === "throw")
882
- return i.method = "throw", i.arg = g.arg, i.delegate = null, m;
883
- var v = g.arg;
884
- return v ? v.done ? (i[f.resultName] = v.value, i.next = f.nextLoc, i.method !== "return" && (i.method = "next", i.arg = void 0), i.delegate = null, m) : v : (i.method = "throw", i.arg = new TypeError("iterator result is not an object"), i.delegate = null, m);
885
123
  }
886
- function X(f) {
887
- var i = {
888
- tryLoc: f[0]
889
- };
890
- 1 in f && (i.catchLoc = f[1]), 2 in f && (i.finallyLoc = f[2], i.afterLoc = f[3]), this.tryEntries.push(i);
891
- }
892
- function ae(f) {
893
- var i = f.completion || {};
894
- i.type = "normal", delete i.arg, f.completion = i;
895
- }
896
- function re(f) {
897
- this.tryEntries = [{
898
- tryLoc: "root"
899
- }], f.forEach(X, this), this.reset(!0);
900
- }
901
- function te(f) {
902
- if (f) {
903
- var i = f[a];
904
- if (i)
905
- return i.call(f);
906
- if (typeof f.next == "function")
907
- return f;
908
- if (!isNaN(f.length)) {
909
- var y = -1, g = function v() {
910
- for (; ++y < f.length; )
911
- if (r.call(f, y))
912
- return v.value = f[y], v.done = !1, v;
913
- return v.value = void 0, v.done = !0, v;
914
- };
915
- return g.next = g;
916
- }
124
+ `, an = `
125
+ mutation TrackNotification($input: TrackNotificationInput!) {
126
+ trackNotification(input: $input) {
127
+ success
917
128
  }
918
- return {
919
- next: ne
920
- };
921
- }
922
- function ne() {
923
- return {
924
- value: void 0,
925
- done: !0
926
- };
927
129
  }
928
- return R.prototype = O, c(F, "constructor", O), c(O, "constructor", R), R.displayName = c(O, p, "GeneratorFunction"), s.isGeneratorFunction = function(f) {
929
- var i = typeof f == "function" && f.constructor;
930
- return !!i && (i === R || (i.displayName || i.name) === "GeneratorFunction");
931
- }, s.mark = function(f) {
932
- return Object.setPrototypeOf ? Object.setPrototypeOf(f, O) : (f.__proto__ = O, c(f, p, "GeneratorFunction")), f.prototype = Object.create(F), f;
933
- }, s.awrap = function(f) {
934
- return {
935
- __await: f
936
- };
937
- }, I(ee.prototype), c(ee.prototype, d, function() {
938
- return this;
939
- }), s.AsyncIterator = ee, s.async = function(f, i, y, g, v) {
940
- v === void 0 && (v = Promise);
941
- var j = new ee(l(f, i, y, g), v);
942
- return s.isGeneratorFunction(i) ? j : j.next().then(function(U) {
943
- return U.done ? U.value : j.next();
944
- });
945
- }, I(F), c(F, p, "Generator"), c(F, a, function() {
946
- return this;
947
- }), c(F, "toString", function() {
948
- return "[object Generator]";
949
- }), s.keys = function(f) {
950
- var i = [];
951
- for (var y in f)
952
- i.push(y);
953
- return i.reverse(), function g() {
954
- for (; i.length; ) {
955
- var v = i.pop();
956
- if (v in f)
957
- return g.value = v, g.done = !1, g;
958
- }
959
- return g.done = !0, g;
960
- };
961
- }, s.values = te, re.prototype = {
962
- constructor: re,
963
- reset: function(f) {
964
- if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(ae), !f)
965
- for (var i in this)
966
- i.charAt(0) === "t" && r.call(this, i) && !isNaN(+i.slice(1)) && (this[i] = void 0);
967
- },
968
- stop: function() {
969
- this.done = !0;
970
- var f = this.tryEntries[0].completion;
971
- if (f.type === "throw")
972
- throw f.arg;
973
- return this.rval;
974
- },
975
- dispatchException: function(f) {
976
- if (this.done)
977
- throw f;
978
- var i = this;
979
- function y(K, T) {
980
- return j.type = "throw", j.arg = f, i.next = K, T && (i.method = "next", i.arg = void 0), !!T;
981
- }
982
- for (var g = this.tryEntries.length - 1; g >= 0; --g) {
983
- var v = this.tryEntries[g], j = v.completion;
984
- if (v.tryLoc === "root")
985
- return y("end");
986
- if (v.tryLoc <= this.prev) {
987
- var U = r.call(v, "catchLoc"), H = r.call(v, "finallyLoc");
988
- if (U && H) {
989
- if (this.prev < v.catchLoc)
990
- return y(v.catchLoc, !0);
991
- if (this.prev < v.finallyLoc)
992
- return y(v.finallyLoc);
993
- } else if (U) {
994
- if (this.prev < v.catchLoc)
995
- return y(v.catchLoc, !0);
996
- } else {
997
- if (!H)
998
- throw new Error("try statement without catch or finally");
999
- if (this.prev < v.finallyLoc)
1000
- return y(v.finallyLoc);
1001
- }
1002
- }
1003
- }
1004
- },
1005
- abrupt: function(f, i) {
1006
- for (var y = this.tryEntries.length - 1; y >= 0; --y) {
1007
- var g = this.tryEntries[y];
1008
- if (g.tryLoc <= this.prev && r.call(g, "finallyLoc") && this.prev < g.finallyLoc) {
1009
- var v = g;
1010
- break;
1011
- }
1012
- }
1013
- v && (f === "break" || f === "continue") && v.tryLoc <= i && i <= v.finallyLoc && (v = null);
1014
- var j = v ? v.completion : {};
1015
- return j.type = f, j.arg = i, v ? (this.method = "next", this.next = v.finallyLoc, m) : this.complete(j);
1016
- },
1017
- complete: function(f, i) {
1018
- if (f.type === "throw")
1019
- throw f.arg;
1020
- return f.type === "break" || f.type === "continue" ? this.next = f.arg : f.type === "return" ? (this.rval = this.arg = f.arg, this.method = "return", this.next = "end") : f.type === "normal" && i && (this.next = i), m;
1021
- },
1022
- finish: function(f) {
1023
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1024
- var y = this.tryEntries[i];
1025
- if (y.finallyLoc === f)
1026
- return this.complete(y.completion, y.afterLoc), ae(y), m;
1027
- }
1028
- },
1029
- catch: function(f) {
1030
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1031
- var y = this.tryEntries[i];
1032
- if (y.tryLoc === f) {
1033
- var g = y.completion;
1034
- if (g.type === "throw") {
1035
- var v = g.arg;
1036
- ae(y);
1037
- }
1038
- return v;
130
+ `, on = `
131
+ query NotificationRecipientsList($filter: JSON!) {
132
+ notificationRecipientsList(filter: $filter) {
133
+ id
134
+ notificationId
135
+ contact
136
+ readAt
137
+
138
+ notification {
139
+ id
140
+ renderedContent
1039
141
  }
1040
- }
1041
- throw new Error("illegal catch attempt");
1042
- },
1043
- delegateYield: function(f, i, y) {
1044
- return this.delegate = {
1045
- iterator: te(f),
1046
- resultName: i,
1047
- nextLoc: y
1048
- }, this.method === "next" && (this.arg = void 0), m;
1049
- }
1050
- }, s;
1051
- }
1052
- function tt(s, o, r, t, a, d, p) {
1053
- try {
1054
- var c = s[d](p), l = c.value;
1055
- } catch (n) {
1056
- r(n);
1057
- return;
1058
- }
1059
- c.done ? o(l) : Promise.resolve(l).then(t, a);
1060
- }
1061
- function B(s) {
1062
- return function() {
1063
- var o = this, r = arguments;
1064
- return new Promise(function(t, a) {
1065
- var d = s.apply(o, r);
1066
- function p(l) {
1067
- tt(d, t, a, p, c, "next", l);
1068
- }
1069
- function c(l) {
1070
- tt(d, t, a, p, c, "throw", l);
1071
- }
1072
- p(void 0);
1073
- });
1074
- };
1075
- }
1076
- function Bt(s, o) {
1077
- for (var r = 0; r < o.length; r++) {
1078
- var t = o[r];
1079
- t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(s, t.key, t);
1080
- }
1081
- }
1082
- function Nt(s, o, r) {
1083
- return o && Bt(s.prototype, o), Object.defineProperty(s, "prototype", {
1084
- writable: !1
1085
- }), s;
1086
- }
1087
- function N() {
1088
- return N = Object.assign ? Object.assign.bind() : function(s) {
1089
- for (var o = 1; o < arguments.length; o++) {
1090
- var r = arguments[o];
1091
- for (var t in r)
1092
- Object.prototype.hasOwnProperty.call(r, t) && (s[t] = r[t]);
1093
- }
1094
- return s;
1095
- }, N.apply(this, arguments);
1096
- }
1097
- function Ht(s, o) {
1098
- if (s == null)
1099
- return {};
1100
- var r = {}, t = Object.keys(s), a, d;
1101
- for (d = 0; d < t.length; d++)
1102
- a = t[d], !(o.indexOf(a) >= 0) && (r[a] = s[a]);
1103
- return r;
1104
- }
1105
- var Wt = 0;
1106
- function Le(s) {
1107
- return "__private_" + Wt++ + "_" + s;
1108
- }
1109
- function S(s, o) {
1110
- if (!Object.prototype.hasOwnProperty.call(s, o))
1111
- throw new TypeError("attempted to use private field on non-instance");
1112
- return s;
1113
- }
1114
- var Yt = `
1115
- mutation TrackEvent($input: TrackEventInput!) {
1116
- trackEvent(input: $input) {
1117
- success
1118
142
  }
1119
143
  }
1120
- `, Vt = `
144
+ `, sn = `
1121
145
  mutation IdentifyAccount($input: IdentifyAccountInput!) {
1122
146
  identifyAccount(input: $input) {
1123
147
  id
1124
148
  }
1125
149
  }
1126
- `, Gt = `
150
+ `, un = `
1127
151
  mutation AddContent($input: AddContentInput!) {
1128
152
  addContent(input: $input) {
1129
153
  id
@@ -1134,7 +158,7 @@ var Yt = `
1134
158
  updatedAt
1135
159
  }
1136
160
  }
1137
- `, Xt = `
161
+ `, cn = `
1138
162
  mutation EditContent($input: EditContentInput!) {
1139
163
  editContent(input: $input) {
1140
164
  id
@@ -1145,15 +169,15 @@ var Yt = `
1145
169
  updatedAt
1146
170
  }
1147
171
  }
1148
- `, rt = `
172
+ `, er = `
1149
173
  query SearchContent($input: SearchContentInput!) {
1150
174
  searchContent(input: $input)
1151
175
  }
1152
- `, Kt = `
176
+ `, ln = `
1153
177
  query FetchContent($input: FetchContentInput!) {
1154
178
  fetchContent(input: $input)
1155
179
  }
1156
- `, Jt = `
180
+ `, fn = `
1157
181
  id
1158
182
  name
1159
183
  identifier
@@ -1174,7 +198,7 @@ var Yt = `
1174
198
  createdAt
1175
199
  updatedAt
1176
200
  }
1177
- `, ye = `
201
+ `, je = `
1178
202
  id
1179
203
  status
1180
204
  subtotal
@@ -1196,7 +220,7 @@ var Yt = `
1196
220
  currencyCode
1197
221
 
1198
222
  item {
1199
- ` + Jt + `
223
+ ${fn}
1200
224
  }
1201
225
  }
1202
226
 
@@ -1210,49 +234,49 @@ var Yt = `
1210
234
  expiresAt
1211
235
  }
1212
236
  }
1213
- `, zt = `
237
+ `, dn = `
1214
238
  mutation AddItemToCart($input: AddItemToCartInput) {
1215
239
  addItemToCart(input:$input) {
1216
- ` + ye + `
240
+ ${je}
1217
241
  }
1218
242
  }
1219
- `, Zt = `
243
+ `, pn = `
1220
244
  mutation ApplyCouponToCart($input: ApplyCouponToCartInput) {
1221
245
  applyCouponToCart(input:$input) {
1222
- ` + ye + `
246
+ ${je}
1223
247
  }
1224
248
  }
1225
- `, Qt = `
249
+ `, vn = `
1226
250
  mutation RemoveCouponFromCart($input: RemoveCouponFromCartInput) {
1227
251
  removeCouponFromCart(input:$input) {
1228
- ` + ye + `
252
+ ${je}
1229
253
  }
1230
254
  }
1231
- `, er = `
255
+ `, hn = `
1232
256
  query FetchCart($input: FetchCartInput!) {
1233
257
  fetchCart(input: $input) {
1234
- ` + ye + `
258
+ ${je}
1235
259
  }
1236
260
  }
1237
- `, tr = `
261
+ `, mn = `
1238
262
  mutation TransferCart($input: TransferCartInput!) {
1239
263
  transferCart(input: $input) {
1240
- ` + ye + `
264
+ ${je}
1241
265
  }
1242
266
  }
1243
- `, rr = `
267
+ `, yn = `
1244
268
  query FetchStoredPreferences($input: FetchStoredPreferencesInput!) {
1245
269
  fetchStoredPreferences(input: $input) {
1246
270
  preferenceData
1247
271
  }
1248
272
  }
1249
- `, nr = `
273
+ `, gn = `
1250
274
  mutation SaveStoredPreferences($input: SaveStoredPreferencesInput!) {
1251
275
  saveStoredPreferences(input: $input) {
1252
276
  success
1253
277
  }
1254
278
  }
1255
- `, ar = `
279
+ `, bn = `
1256
280
  query FetchContacts($input: FetchContactsInput!) {
1257
281
  fetchContacts(input: $input) {
1258
282
  contacts {
@@ -1270,7 +294,7 @@ var Yt = `
1270
294
  }
1271
295
  }
1272
296
  }
1273
- `, ir = `
297
+ `, wn = `
1274
298
  mutation SaveContacts($input: SaveContactsInput!) {
1275
299
  saveContacts(input: $input) {
1276
300
  contacts {
@@ -1288,7 +312,7 @@ var Yt = `
1288
312
  }
1289
313
  }
1290
314
  }
1291
- `, or = `
315
+ `, Sn = `
1292
316
  mutation prepareAsset($input: PrepareAssetInput!) {
1293
317
  prepareAsset(input: $input) {
1294
318
  attributeId
@@ -1308,7 +332,7 @@ var Yt = `
1308
332
  workspaceId
1309
333
  }
1310
334
  }
1311
- `, ur = `
335
+ `, En = `
1312
336
  query Asset($id: ID!) {
1313
337
  asset(id: $id) {
1314
338
  attributeId
@@ -1328,820 +352,2782 @@ var Yt = `
1328
352
  workspaceId
1329
353
  }
1330
354
  }
1331
- `, sr = "@dashx/browser", cr = "dashx-browser", lr = "0.1.29", fr = "DashX SDK for Browser", dr = "dist/index.js", pr = "dist/browser.esm.js", hr = [
1332
- "dist"
1333
- ], vr = {
1334
- build: "tsdx build --tsconfig tsconfig.json",
1335
- start: "tsdx watch --tsconfig tsconfig.json --verbose --noClean",
1336
- release: "yarn build && npm publish"
1337
- }, mr = {
1338
- type: "git",
1339
- url: "git+https://github.com/dashxhq/dashx-browser"
1340
- }, yr = [
1341
- "dashx"
1342
- ], gr = "MIT", wr = {
1343
- unfetch: "^4.2.0",
1344
- "uuid-random": "^1.3.2"
1345
- }, br = {
1346
- "@typescript-eslint/eslint-plugin": "^5.29.0",
1347
- "@typescript-eslint/parser": "^5.29.0",
1348
- eslint: "^8.18.0",
1349
- "eslint-config-airbnb-typescript": "^17.0.0",
1350
- "eslint-plugin-import": "^2.26.0",
1351
- tsdx: "^0.14.1",
1352
- typescript: "^4.7.4"
1353
- }, nt = {
1354
- name: sr,
1355
- title: cr,
1356
- version: lr,
1357
- description: fr,
1358
- main: dr,
1359
- module: pr,
1360
- files: hr,
1361
- scripts: vr,
1362
- repository: mr,
1363
- keywords: yr,
1364
- license: gr,
1365
- dependencies: wr,
1366
- devDependencies: br
1367
- };
1368
- function Cr() {
1369
- return {
355
+ `;
356
+ function Sr(e = {}) {
357
+ const t = {};
358
+ return Object.keys(e).forEach((r) => {
359
+ if (r.startsWith("_")) {
360
+ t[r.substring(1)] = e[r];
361
+ return;
362
+ }
363
+ t.data = {
364
+ [r]: e[r],
365
+ ...t.data
366
+ };
367
+ }), t;
368
+ }
369
+ class On {
370
+ constructor(t) {
371
+ Ee(this, "options"), Ee(this, "callback"), this.options = {}, this.callback = t;
372
+ }
373
+ limit(t) {
374
+ return this.options.limit = t, this;
375
+ }
376
+ filter(t) {
377
+ return this.options.filter = Sr(t), this;
378
+ }
379
+ order(t) {
380
+ return this.options.order = t, this;
381
+ }
382
+ language(t) {
383
+ return this.options.language = t, this;
384
+ }
385
+ fields(t) {
386
+ return this.options.fields = t, this;
387
+ }
388
+ include(t) {
389
+ return this.options.include = t, this;
390
+ }
391
+ exclude(t) {
392
+ return this.options.exclude = t, this;
393
+ }
394
+ preview(t = !0) {
395
+ return this.options.preview = t, this;
396
+ }
397
+ all(t) {
398
+ return this.options = { ...this.options, ...t, returnType: "all" }, this.callback(this.options);
399
+ }
400
+ async one(t) {
401
+ this.options = { ...this.options, ...t, returnType: "one" };
402
+ const r = await this.callback(this.options);
403
+ return Array.isArray(r) ? r[0] : null;
404
+ }
405
+ }
406
+ const Cn = "@dashx/browser", _n = "dashx-browser", An = "0.1.30", Tn = "DashX SDK for Browser", Pn = "module", kn = [
407
+ "dist"
408
+ ], In = "./dist/index.umd.js", xn = "./dist/index.es.js", $n = "./dist/index.es.d.ts", Nn = {
409
+ ".": {
410
+ import: "./dist/index.es.js",
411
+ require: "./dist/index.umd.c.jsjs",
412
+ types: "./dist/index.es.d.ts"
413
+ }
414
+ }, Rn = {
415
+ dev: "vite",
416
+ build: "tsc && vite build",
417
+ preview: "vite preview"
418
+ }, Mn = {
419
+ type: "git",
420
+ url: "git+https://github.com/dashxhq/dashx-browser"
421
+ }, Dn = [
422
+ "dashx"
423
+ ], Un = "MIT", jn = {
424
+ unfetch: "4.2.0",
425
+ "uuid-random": "^1.3.2"
426
+ }, Ln = {
427
+ "@types/node": "^20.12.12",
428
+ "@typescript-eslint/eslint-plugin": "^7.9.0",
429
+ "@typescript-eslint/parser": "^7.9.0",
430
+ eslint: "^9.2.0",
431
+ "eslint-config-airbnb-typescript": "^18.0.0",
432
+ "eslint-plugin-import": "^2.29.1",
433
+ typescript: "^5.4.5",
434
+ vite: "^5.2.0",
435
+ "vite-plugin-dts": "^3.9.1"
436
+ }, tr = {
437
+ name: Cn,
438
+ title: _n,
439
+ version: An,
440
+ description: Tn,
441
+ type: Pn,
442
+ files: kn,
443
+ main: In,
444
+ module: xn,
445
+ types: $n,
446
+ exports: Nn,
447
+ scripts: Rn,
448
+ repository: Mn,
449
+ keywords: Dn,
450
+ license: Un,
451
+ dependencies: jn,
452
+ devDependencies: Ln
453
+ };
454
+ function Wn() {
455
+ return {
1370
456
  height: window.screen.height,
1371
457
  width: window.screen.width
1372
458
  };
1373
459
  }
1374
- function Rr() {
1375
- return {
1376
- name: nt.name,
1377
- version: nt.version
460
+ function Fn() {
461
+ return { name: tr.name, version: tr.version };
462
+ }
463
+ function Bn() {
464
+ return navigator.language;
465
+ }
466
+ function Hn() {
467
+ return {
468
+ path: window.location.pathname,
469
+ search: window.location.search,
470
+ title: window.document.title,
471
+ url: window.location.href
472
+ };
473
+ }
474
+ function qn() {
475
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
476
+ }
477
+ function Vn() {
478
+ return {
479
+ displayMetrics: Wn(),
480
+ library: Fn(),
481
+ locale: Bn(),
482
+ page: Hn(),
483
+ timezone: qn()
484
+ };
485
+ }
486
+ const kt = "dashx-sdk";
487
+ function Ct(e) {
488
+ const t = window.localStorage.getItem(kt);
489
+ return t ? JSON.parse(t)[e] : null;
490
+ }
491
+ function _t(e, t) {
492
+ const r = window.localStorage.getItem(kt), n = r ? JSON.parse(r) : {};
493
+ n[e] = t, window.localStorage.setItem(kt, JSON.stringify(n));
494
+ }
495
+ const Jn = 5, zn = 3e3;
496
+ var xe = /* @__PURE__ */ ((e) => (e.SUBSCRIBE = "SUBSCRIBE", e.IN_APP_NOTIFICATION = "IN_APP_NOTIFICATION", e.INVALID = "INVALID", e))(xe || {}), B, R, te, we;
497
+ class Gn {
498
+ constructor({ publicKey: t, baseUri: r = "https://api.dashx.com/graphql", targetEnvironment: n }) {
499
+ Ge(this, B, void 0), Ge(this, R, null), Ge(this, te, null), Ge(this, we, null), Ee(this, "targetEnvironment"), Ee(this, "context"), Ee(this, "publicKey"), Ee(this, "baseUri"), this.baseUri = r, this.publicKey = t, this.targetEnvironment = n, this.context = Vn(), this.loadIdentity();
500
+ }
501
+ get accountAnonymousUid() {
502
+ return A(this, B);
503
+ }
504
+ set accountAnonymousUid(t) {
505
+ if (!Ot.test(t))
506
+ throw new Error("Anonymous UID must be a valid UUID");
507
+ oe(this, B, t), _t("accountAnonymousUid", A(this, B));
508
+ }
509
+ get accountUid() {
510
+ return A(this, R);
511
+ }
512
+ set accountUid(t) {
513
+ t == null ? oe(this, R, t) : oe(this, R, String(t)), _t("accountUid", A(this, R));
514
+ }
515
+ get identityToken() {
516
+ return A(this, te);
517
+ }
518
+ set identityToken(t) {
519
+ t == null ? oe(this, te, t) : oe(this, te, String(t)), _t("identityToken", A(this, te));
520
+ }
521
+ get inAppChannel() {
522
+ return A(this, we);
523
+ }
524
+ set inAppChannel(t) {
525
+ t == null ? oe(this, we, t) : oe(this, te, String(t));
526
+ }
527
+ async makeHttpRequest(t, r) {
528
+ const n = await Zt(this.baseUri, {
529
+ method: "POST",
530
+ headers: {
531
+ "Content-Type": "application/json",
532
+ "X-Public-Key": this.publicKey,
533
+ ...this.targetEnvironment ? { "X-Target-Environment": this.targetEnvironment } : {},
534
+ ...A(this, te) ? { "X-Identity-Token": A(this, te) } : {}
535
+ },
536
+ body: JSON.stringify({
537
+ query: t,
538
+ variables: r
539
+ })
540
+ }).then((a) => a.json());
541
+ return n.data ? Promise.resolve(n.data) : Promise.reject(n.errors);
542
+ }
543
+ loadIdentity() {
544
+ this.accountAnonymousUid = Ct("accountAnonymousUid") || Ot(), this.accountUid = Ct("accountUid") || null, this.identityToken = Ct("identityToken") || null;
545
+ }
546
+ identify(t) {
547
+ if (typeof t == "string") {
548
+ this.accountUid = t;
549
+ return;
550
+ }
551
+ this.accountUid = t == null ? void 0 : t.uid;
552
+ const r = {
553
+ uid: t == null ? void 0 : t.uid,
554
+ anonymousUid: A(this, B),
555
+ ...t
556
+ };
557
+ return this.makeHttpRequest(sn, { input: r }).then((n) => n == null ? void 0 : n.identifyAccount);
558
+ }
559
+ setIdentity(t, r) {
560
+ this.accountUid = t, this.identityToken = r, this.inAppChannel = `dashx:account:${r}`;
561
+ }
562
+ setAnonymousIdentity(t) {
563
+ this.accountAnonymousUid = t;
564
+ }
565
+ reset() {
566
+ this.accountAnonymousUid = Ot(), this.accountUid = null, this.identityToken = null, oe(this, we, null);
567
+ }
568
+ track(t, r) {
569
+ const n = {
570
+ event: t,
571
+ data: r,
572
+ accountUid: A(this, R),
573
+ accountAnonymousUid: A(this, B)
574
+ };
575
+ return this.makeHttpRequest(nn, { input: n });
576
+ }
577
+ trackNotification({ id: t, status: r, timestamp: n }) {
578
+ return this.makeHttpRequest(an, { input: { id: t, status: r, timestamp: n || /* @__PURE__ */ new Date() } });
579
+ }
580
+ listInAppNotifications() {
581
+ return this.inAppChannel ? this.makeHttpRequest(on, { filter: { channel: A(this, we) } }) : (console.error("InApp notifications can be fetched only for identified users."), Promise.resolve([]));
582
+ }
583
+ addContent(t, r) {
584
+ let n, a;
585
+ t.includes("/") ? [a, n] = t.split("/") : a = t;
586
+ const o = { content: n, contentType: a, data: r };
587
+ return this.makeHttpRequest(un, { input: o });
588
+ }
589
+ editContent(t, r) {
590
+ let n, a;
591
+ t.includes("/") ? [a, n] = t.split("/") : a = t;
592
+ const o = { content: n, contentType: a, data: r };
593
+ return this.makeHttpRequest(cn, { input: o });
594
+ }
595
+ searchContent(t, r) {
596
+ if (!r)
597
+ return new On(
598
+ (o) => this.makeHttpRequest(
599
+ er,
600
+ { input: { ...o, contentType: t } }
601
+ ).then((c) => c == null ? void 0 : c.searchContent)
602
+ );
603
+ const n = Sr(r.filter), a = this.makeHttpRequest(
604
+ er,
605
+ { input: { ...r, contentType: t, filter: n } }
606
+ ).then((o) => o == null ? void 0 : o.searchContent);
607
+ return r.returnType === "all" ? a : a.then((o) => Array.isArray(o) ? o[0] : null);
608
+ }
609
+ async fetchContent(t, r) {
610
+ if (!t.includes("/"))
611
+ throw new Error("URN must be of form: {contentType}/{content}");
612
+ const [n, a] = t.split("/"), o = { content: a, contentType: n, ...r }, c = await this.makeHttpRequest(ln, { input: o });
613
+ return c == null ? void 0 : c.fetchContent;
614
+ }
615
+ async addItemToCart({ custom: t = {}, ...r }) {
616
+ const n = {
617
+ custom: t,
618
+ ...r,
619
+ accountUid: A(this, R),
620
+ accountAnonymousUid: A(this, B)
621
+ }, a = await this.makeHttpRequest(dn, { input: n });
622
+ return a == null ? void 0 : a.addItemToCart;
623
+ }
624
+ async applyCouponToCart(t) {
625
+ const r = {
626
+ ...t,
627
+ accountUid: A(this, R),
628
+ accountAnonymousUid: A(this, B)
629
+ }, n = await this.makeHttpRequest(pn, { input: r });
630
+ return n == null ? void 0 : n.applyCouponToCart;
631
+ }
632
+ async removeCouponFromCart(t) {
633
+ const r = {
634
+ ...t,
635
+ accountUid: A(this, R),
636
+ accountAnonymousUid: A(this, B)
637
+ }, n = await this.makeHttpRequest(vn, { input: r });
638
+ return n == null ? void 0 : n.removeCouponFromCart;
639
+ }
640
+ async fetchCart(t) {
641
+ const r = {
642
+ ...t,
643
+ accountUid: A(this, R),
644
+ accountAnonymousUid: A(this, B)
645
+ }, n = await this.makeHttpRequest(hn, { input: r });
646
+ return n == null ? void 0 : n.fetchCart;
647
+ }
648
+ async transferCart(t) {
649
+ const r = {
650
+ ...t,
651
+ accountUid: A(this, R),
652
+ accountAnonymousUid: A(this, B)
653
+ }, n = await this.makeHttpRequest(mn, { input: r });
654
+ return n == null ? void 0 : n.transferCart;
655
+ }
656
+ async fetchStoredPreferences() {
657
+ const t = {
658
+ accountUid: A(this, R)
659
+ }, r = await this.makeHttpRequest(yn, { input: t });
660
+ return r == null ? void 0 : r.fetchStoredPreferences.preferenceData;
661
+ }
662
+ async saveStoredPreferences(t) {
663
+ const r = {
664
+ accountUid: A(this, R),
665
+ preferenceData: t
666
+ }, n = await this.makeHttpRequest(gn, { input: r });
667
+ return n == null ? void 0 : n.saveStoredPreferences;
668
+ }
669
+ async fetchContacts() {
670
+ const t = { uid: A(this, R) }, r = await this.makeHttpRequest(bn, { input: t });
671
+ return r == null ? void 0 : r.fetchContacts.contacts;
672
+ }
673
+ async saveContacts(t) {
674
+ const r = {
675
+ uid: A(this, R),
676
+ contacts: t
677
+ }, n = await this.makeHttpRequest(wn, { input: r });
678
+ return n == null ? void 0 : n.saveContacts;
679
+ }
680
+ async upload(t) {
681
+ var r, n, a, o;
682
+ const { file: c, attribute: u, resource: s } = t, i = {
683
+ name: c.name,
684
+ size: c.size,
685
+ mimeType: c.type,
686
+ attribute: u,
687
+ resource: s,
688
+ targetEnvironment: this.targetEnvironment
689
+ }, l = await this.makeHttpRequest(Sn, { input: i }), d = (r = l == null ? void 0 : l.prepareAsset) == null ? void 0 : r.id, f = (o = (a = (n = l == null ? void 0 : l.prepareAsset) == null ? void 0 : n.data) == null ? void 0 : a.upload) == null ? void 0 : o.url;
690
+ if (!f || !d)
691
+ throw new Error("Something went wrong");
692
+ await Zt(f, {
693
+ method: "PUT",
694
+ body: c,
695
+ headers: {
696
+ "Content-Type": c.type,
697
+ "x-goog-meta-origin-id": d
698
+ }
699
+ });
700
+ let p = Jn;
701
+ const m = async () => {
702
+ const h = await this.getAsset({ id: d });
703
+ return (h == null ? void 0 : h.uploadStatus) === "UPLOADED" ? Promise.resolve(h) : (await new Promise((v) => setTimeout(v, zn)), p--, p ? m() : Promise.reject("Something went wrong."));
704
+ };
705
+ return m();
706
+ }
707
+ async getAsset(t) {
708
+ const { id: r } = t, n = await this.makeHttpRequest(En, { id: r });
709
+ return n == null ? void 0 : n.asset;
710
+ }
711
+ }
712
+ B = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap();
713
+ const Xn = (e) => new Gn(e), Er = O.createContext(null);
714
+ function ts({
715
+ children: e,
716
+ publicKey: t,
717
+ baseUri: r,
718
+ targetEnvironment: n
719
+ }) {
720
+ const a = O.useMemo(
721
+ () => Xn({
722
+ publicKey: t,
723
+ baseUri: r,
724
+ targetEnvironment: n
725
+ }),
726
+ [t, r, n]
727
+ );
728
+ return /* @__PURE__ */ O.createElement(Er.Provider, { value: a }, e);
729
+ }
730
+ const Or = () => {
731
+ const e = O.useContext(Er);
732
+ if (!e)
733
+ throw new Error(
734
+ "DashXProvider not initialized. Make sure your app is wrapped in DashXProvider."
735
+ );
736
+ return e;
737
+ }, Yn = () => {
738
+ let e = Or();
739
+ const [t, r] = Se([]);
740
+ return ct(() => {
741
+ e.listInAppNotifications().then((n) => r(n)).catch((n) => console.error(n));
742
+ }, [e]), { client: e, notifications: t };
743
+ };
744
+ let Kn = { data: "" }, Qn = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || Kn, Zn = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ea = /\/\*[^]*?\*\/| +/g, rr = /\n+/g, ue = (e, t) => {
745
+ let r = "", n = "", a = "";
746
+ for (let o in e) {
747
+ let c = e[o];
748
+ o[0] == "@" ? o[1] == "i" ? r = o + " " + c + ";" : n += o[1] == "f" ? ue(c, o) : o + "{" + ue(c, o[1] == "k" ? "" : t) + "}" : typeof c == "object" ? n += ue(c, t ? t.replace(/([^,])+/g, (u) => o.replace(/(^:.*)|([^,])+/g, (s) => /&/.test(s) ? s.replace(/&/g, u) : u ? u + " " + s : s)) : o) : c != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), a += ue.p ? ue.p(o, c) : o + ":" + c + ";");
749
+ }
750
+ return r + (t && a ? t + "{" + a + "}" : a) + n;
751
+ }, ee = {}, Cr = (e) => {
752
+ if (typeof e == "object") {
753
+ let t = "";
754
+ for (let r in e)
755
+ t += r + Cr(e[r]);
756
+ return t;
757
+ }
758
+ return e;
759
+ }, ta = (e, t, r, n, a) => {
760
+ let o = Cr(e), c = ee[o] || (ee[o] = ((s) => {
761
+ let i = 0, l = 11;
762
+ for (; i < s.length; )
763
+ l = 101 * l + s.charCodeAt(i++) >>> 0;
764
+ return "go" + l;
765
+ })(o));
766
+ if (!ee[c]) {
767
+ let s = o !== e ? e : ((i) => {
768
+ let l, d, f = [{}];
769
+ for (; l = Zn.exec(i.replace(ea, "")); )
770
+ l[4] ? f.shift() : l[3] ? (d = l[3].replace(rr, " ").trim(), f.unshift(f[0][d] = f[0][d] || {})) : f[0][l[1]] = l[2].replace(rr, " ").trim();
771
+ return f[0];
772
+ })(e);
773
+ ee[c] = ue(a ? { ["@keyframes " + c]: s } : s, r ? "" : "." + c);
774
+ }
775
+ let u = r && ee.g ? ee.g : null;
776
+ return r && (ee.g = ee[c]), ((s, i, l, d) => {
777
+ d ? i.data = i.data.replace(d, s) : i.data.indexOf(s) === -1 && (i.data = l ? s + i.data : i.data + s);
778
+ })(ee[c], t, n, u), c;
779
+ }, ra = (e, t, r) => e.reduce((n, a, o) => {
780
+ let c = t[o];
781
+ if (c && c.call) {
782
+ let u = c(r), s = u && u.props && u.props.className || /^go/.test(u) && u;
783
+ c = s ? "." + s : u && typeof u == "object" ? u.props ? "" : ue(u, "") : u === !1 ? "" : u;
784
+ }
785
+ return n + a + (c ?? "");
786
+ }, "");
787
+ function lt(e) {
788
+ let t = this || {}, r = e.call ? e(t.p) : e;
789
+ return ta(r.unshift ? r.raw ? ra(r, [].slice.call(arguments, 1), t.p) : r.reduce((n, a) => Object.assign(n, a && a.call ? a(t.p) : a), {}) : r, Qn(t.target), t.g, t.o, t.k);
790
+ }
791
+ let _r, It, xt;
792
+ lt.bind({ g: 1 });
793
+ let re = lt.bind({ k: 1 });
794
+ function na(e, t, r, n) {
795
+ ue.p = t, _r = e, It = r, xt = n;
796
+ }
797
+ function le(e, t) {
798
+ let r = this || {};
799
+ return function() {
800
+ let n = arguments;
801
+ function a(o, c) {
802
+ let u = Object.assign({}, o), s = u.className || a.className;
803
+ r.p = Object.assign({ theme: It && It() }, u), r.o = / *go\d+/.test(s), u.className = lt.apply(r, n) + (s ? " " + s : "");
804
+ let i = e;
805
+ return e[0] && (i = u.as || e, delete u.as), xt && i[0] && xt(u), _r(i, u);
806
+ }
807
+ return a;
808
+ };
809
+ }
810
+ var aa = (e) => typeof e == "function", rt = (e, t) => aa(e) ? e(t) : e, oa = /* @__PURE__ */ (() => {
811
+ let e = 0;
812
+ return () => (++e).toString();
813
+ })(), Ar = /* @__PURE__ */ (() => {
814
+ let e;
815
+ return () => {
816
+ if (e === void 0 && typeof window < "u") {
817
+ let t = matchMedia("(prefers-reduced-motion: reduce)");
818
+ e = !t || t.matches;
819
+ }
820
+ return e;
821
+ };
822
+ })(), ia = 20, Ke = /* @__PURE__ */ new Map(), sa = 1e3, nr = (e) => {
823
+ if (Ke.has(e))
824
+ return;
825
+ let t = setTimeout(() => {
826
+ Ke.delete(e), ge({ type: 4, toastId: e });
827
+ }, sa);
828
+ Ke.set(e, t);
829
+ }, ua = (e) => {
830
+ let t = Ke.get(e);
831
+ t && clearTimeout(t);
832
+ }, $t = (e, t) => {
833
+ switch (t.type) {
834
+ case 0:
835
+ return { ...e, toasts: [t.toast, ...e.toasts].slice(0, ia) };
836
+ case 1:
837
+ return t.toast.id && ua(t.toast.id), { ...e, toasts: e.toasts.map((o) => o.id === t.toast.id ? { ...o, ...t.toast } : o) };
838
+ case 2:
839
+ let { toast: r } = t;
840
+ return e.toasts.find((o) => o.id === r.id) ? $t(e, { type: 1, toast: r }) : $t(e, { type: 0, toast: r });
841
+ case 3:
842
+ let { toastId: n } = t;
843
+ return n ? nr(n) : e.toasts.forEach((o) => {
844
+ nr(o.id);
845
+ }), { ...e, toasts: e.toasts.map((o) => o.id === n || n === void 0 ? { ...o, visible: !1 } : o) };
846
+ case 4:
847
+ return t.toastId === void 0 ? { ...e, toasts: [] } : { ...e, toasts: e.toasts.filter((o) => o.id !== t.toastId) };
848
+ case 5:
849
+ return { ...e, pausedAt: t.time };
850
+ case 6:
851
+ let a = t.time - (e.pausedAt || 0);
852
+ return { ...e, pausedAt: void 0, toasts: e.toasts.map((o) => ({ ...o, pauseDuration: o.pauseDuration + a })) };
853
+ }
854
+ }, Qe = [], Ze = { toasts: [], pausedAt: void 0 }, ge = (e) => {
855
+ Ze = $t(Ze, e), Qe.forEach((t) => {
856
+ t(Ze);
857
+ });
858
+ }, ca = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, la = (e = {}) => {
859
+ let [t, r] = Se(Ze);
860
+ ct(() => (Qe.push(r), () => {
861
+ let a = Qe.indexOf(r);
862
+ a > -1 && Qe.splice(a, 1);
863
+ }), [t]);
864
+ let n = t.toasts.map((a) => {
865
+ var o, c;
866
+ return { ...e, ...e[a.type], ...a, duration: a.duration || ((o = e[a.type]) == null ? void 0 : o.duration) || (e == null ? void 0 : e.duration) || ca[a.type], style: { ...e.style, ...(c = e[a.type]) == null ? void 0 : c.style, ...a.style } };
867
+ });
868
+ return { ...t, toasts: n };
869
+ }, fa = (e, t = "blank", r) => ({ createdAt: Date.now(), visible: !0, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...r, id: (r == null ? void 0 : r.id) || oa() }), Le = (e) => (t, r) => {
870
+ let n = fa(t, e, r);
871
+ return ge({ type: 2, toast: n }), n.id;
872
+ }, W = (e, t) => Le("blank")(e, t);
873
+ W.error = Le("error");
874
+ W.success = Le("success");
875
+ W.loading = Le("loading");
876
+ W.custom = Le("custom");
877
+ W.dismiss = (e) => {
878
+ ge({ type: 3, toastId: e });
879
+ };
880
+ W.remove = (e) => ge({ type: 4, toastId: e });
881
+ W.promise = (e, t, r) => {
882
+ let n = W.loading(t.loading, { ...r, ...r == null ? void 0 : r.loading });
883
+ return e.then((a) => (W.success(rt(t.success, a), { id: n, ...r, ...r == null ? void 0 : r.success }), a)).catch((a) => {
884
+ W.error(rt(t.error, a), { id: n, ...r, ...r == null ? void 0 : r.error });
885
+ }), e;
886
+ };
887
+ var da = (e, t) => {
888
+ ge({ type: 1, toast: { id: e, height: t } });
889
+ }, pa = () => {
890
+ ge({ type: 5, time: Date.now() });
891
+ }, va = (e) => {
892
+ let { toasts: t, pausedAt: r } = la(e);
893
+ ct(() => {
894
+ if (r)
895
+ return;
896
+ let o = Date.now(), c = t.map((u) => {
897
+ if (u.duration === 1 / 0)
898
+ return;
899
+ let s = (u.duration || 0) + u.pauseDuration - (o - u.createdAt);
900
+ if (s < 0) {
901
+ u.visible && W.dismiss(u.id);
902
+ return;
903
+ }
904
+ return setTimeout(() => W.dismiss(u.id), s);
905
+ });
906
+ return () => {
907
+ c.forEach((u) => u && clearTimeout(u));
908
+ };
909
+ }, [t, r]);
910
+ let n = Qt(() => {
911
+ r && ge({ type: 6, time: Date.now() });
912
+ }, [r]), a = Qt((o, c) => {
913
+ let { reverseOrder: u = !1, gutter: s = 8, defaultPosition: i } = c || {}, l = t.filter((p) => (p.position || i) === (o.position || i) && p.height), d = l.findIndex((p) => p.id === o.id), f = l.filter((p, m) => m < d && p.visible).length;
914
+ return l.filter((p) => p.visible).slice(...u ? [f + 1] : [0, f]).reduce((p, m) => p + (m.height || 0) + s, 0);
915
+ }, [t]);
916
+ return { toasts: t, handlers: { updateHeight: da, startPause: pa, endPause: n, calculateOffset: a } };
917
+ }, ha = re`
918
+ from {
919
+ transform: scale(0) rotate(45deg);
920
+ opacity: 0;
921
+ }
922
+ to {
923
+ transform: scale(1) rotate(45deg);
924
+ opacity: 1;
925
+ }`, ma = re`
926
+ from {
927
+ transform: scale(0);
928
+ opacity: 0;
929
+ }
930
+ to {
931
+ transform: scale(1);
932
+ opacity: 1;
933
+ }`, ya = re`
934
+ from {
935
+ transform: scale(0) rotate(90deg);
936
+ opacity: 0;
937
+ }
938
+ to {
939
+ transform: scale(1) rotate(90deg);
940
+ opacity: 1;
941
+ }`, ga = le("div")`
942
+ width: 20px;
943
+ opacity: 0;
944
+ height: 20px;
945
+ border-radius: 10px;
946
+ background: ${(e) => e.primary || "#ff4b4b"};
947
+ position: relative;
948
+ transform: rotate(45deg);
949
+
950
+ animation: ${ha} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
951
+ forwards;
952
+ animation-delay: 100ms;
953
+
954
+ &:after,
955
+ &:before {
956
+ content: '';
957
+ animation: ${ma} 0.15s ease-out forwards;
958
+ animation-delay: 150ms;
959
+ position: absolute;
960
+ border-radius: 3px;
961
+ opacity: 0;
962
+ background: ${(e) => e.secondary || "#fff"};
963
+ bottom: 9px;
964
+ left: 4px;
965
+ height: 2px;
966
+ width: 12px;
967
+ }
968
+
969
+ &:before {
970
+ animation: ${ya} 0.15s ease-out forwards;
971
+ animation-delay: 180ms;
972
+ transform: rotate(90deg);
973
+ }
974
+ `, ba = re`
975
+ from {
976
+ transform: rotate(0deg);
977
+ }
978
+ to {
979
+ transform: rotate(360deg);
980
+ }
981
+ `, wa = le("div")`
982
+ width: 12px;
983
+ height: 12px;
984
+ box-sizing: border-box;
985
+ border: 2px solid;
986
+ border-radius: 100%;
987
+ border-color: ${(e) => e.secondary || "#e0e0e0"};
988
+ border-right-color: ${(e) => e.primary || "#616161"};
989
+ animation: ${ba} 1s linear infinite;
990
+ `, Sa = re`
991
+ from {
992
+ transform: scale(0) rotate(45deg);
993
+ opacity: 0;
994
+ }
995
+ to {
996
+ transform: scale(1) rotate(45deg);
997
+ opacity: 1;
998
+ }`, Ea = re`
999
+ 0% {
1000
+ height: 0;
1001
+ width: 0;
1002
+ opacity: 0;
1003
+ }
1004
+ 40% {
1005
+ height: 0;
1006
+ width: 6px;
1007
+ opacity: 1;
1008
+ }
1009
+ 100% {
1010
+ opacity: 1;
1011
+ height: 10px;
1012
+ }`, Oa = le("div")`
1013
+ width: 20px;
1014
+ opacity: 0;
1015
+ height: 20px;
1016
+ border-radius: 10px;
1017
+ background: ${(e) => e.primary || "#61d345"};
1018
+ position: relative;
1019
+ transform: rotate(45deg);
1020
+
1021
+ animation: ${Sa} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
1022
+ forwards;
1023
+ animation-delay: 100ms;
1024
+ &:after {
1025
+ content: '';
1026
+ box-sizing: border-box;
1027
+ animation: ${Ea} 0.2s ease-out forwards;
1028
+ opacity: 0;
1029
+ animation-delay: 200ms;
1030
+ position: absolute;
1031
+ border-right: 2px solid;
1032
+ border-bottom: 2px solid;
1033
+ border-color: ${(e) => e.secondary || "#fff"};
1034
+ bottom: 6px;
1035
+ left: 6px;
1036
+ height: 10px;
1037
+ width: 6px;
1038
+ }
1039
+ `, Ca = le("div")`
1040
+ position: absolute;
1041
+ `, _a = le("div")`
1042
+ position: relative;
1043
+ display: flex;
1044
+ justify-content: center;
1045
+ align-items: center;
1046
+ min-width: 20px;
1047
+ min-height: 20px;
1048
+ `, Aa = re`
1049
+ from {
1050
+ transform: scale(0.6);
1051
+ opacity: 0.4;
1052
+ }
1053
+ to {
1054
+ transform: scale(1);
1055
+ opacity: 1;
1056
+ }`, Ta = le("div")`
1057
+ position: relative;
1058
+ transform: scale(0.6);
1059
+ opacity: 0.4;
1060
+ min-width: 20px;
1061
+ animation: ${Aa} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
1062
+ forwards;
1063
+ `, Pa = ({ toast: e }) => {
1064
+ let { icon: t, type: r, iconTheme: n } = e;
1065
+ return t !== void 0 ? typeof t == "string" ? C.createElement(Ta, null, t) : t : r === "blank" ? null : C.createElement(_a, null, C.createElement(wa, { ...n }), r !== "loading" && C.createElement(Ca, null, r === "error" ? C.createElement(ga, { ...n }) : C.createElement(Oa, { ...n })));
1066
+ }, ka = (e) => `
1067
+ 0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
1068
+ 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
1069
+ `, Ia = (e) => `
1070
+ 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
1071
+ 100% {transform: translate3d(0,${e * -150}%,-1px) scale(.6); opacity:0;}
1072
+ `, xa = "0%{opacity:0;} 100%{opacity:1;}", $a = "0%{opacity:1;} 100%{opacity:0;}", Na = le("div")`
1073
+ display: flex;
1074
+ align-items: center;
1075
+ background: #fff;
1076
+ color: #363636;
1077
+ line-height: 1.3;
1078
+ will-change: transform;
1079
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
1080
+ max-width: 350px;
1081
+ pointer-events: auto;
1082
+ padding: 8px 10px;
1083
+ border-radius: 8px;
1084
+ `, Ra = le("div")`
1085
+ display: flex;
1086
+ justify-content: center;
1087
+ margin: 4px 10px;
1088
+ color: inherit;
1089
+ flex: 1 1 auto;
1090
+ white-space: pre-line;
1091
+ `, Ma = (e, t) => {
1092
+ let r = e.includes("top") ? 1 : -1, [n, a] = Ar() ? [xa, $a] : [ka(r), Ia(r)];
1093
+ return { animation: t ? `${re(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${re(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
1094
+ }, Da = C.memo(({ toast: e, position: t, style: r, children: n }) => {
1095
+ let a = e.height ? Ma(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = C.createElement(Pa, { toast: e }), c = C.createElement(Ra, { ...e.ariaProps }, rt(e.message, e));
1096
+ return C.createElement(Na, { className: e.className, style: { ...a, ...r, ...e.style } }, typeof n == "function" ? n({ icon: o, message: c }) : C.createElement(C.Fragment, null, o, c));
1097
+ });
1098
+ na(C.createElement);
1099
+ var Ua = ({ id: e, className: t, style: r, onHeightUpdate: n, children: a }) => {
1100
+ let o = C.useCallback((c) => {
1101
+ if (c) {
1102
+ let u = () => {
1103
+ let s = c.getBoundingClientRect().height;
1104
+ n(e, s);
1105
+ };
1106
+ u(), new MutationObserver(u).observe(c, { subtree: !0, childList: !0, characterData: !0 });
1107
+ }
1108
+ }, [e, n]);
1109
+ return C.createElement("div", { ref: o, className: t, style: r }, a);
1110
+ }, ja = (e, t) => {
1111
+ let r = e.includes("top"), n = r ? { top: 0 } : { bottom: 0 }, a = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
1112
+ return { left: 0, right: 0, display: "flex", position: "absolute", transition: Ar() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (r ? 1 : -1)}px)`, ...n, ...a };
1113
+ }, La = lt`
1114
+ z-index: 9999;
1115
+ > * {
1116
+ pointer-events: auto;
1117
+ }
1118
+ `, Xe = 16, Wa = ({ reverseOrder: e, position: t = "top-center", toastOptions: r, gutter: n, children: a, containerStyle: o, containerClassName: c }) => {
1119
+ let { toasts: u, handlers: s } = va(r);
1120
+ return C.createElement("div", { style: { position: "fixed", zIndex: 9999, top: Xe, left: Xe, right: Xe, bottom: Xe, pointerEvents: "none", ...o }, className: c, onMouseEnter: s.startPause, onMouseLeave: s.endPause }, u.map((i) => {
1121
+ let l = i.position || t, d = s.calculateOffset(i, { reverseOrder: e, gutter: n, defaultPosition: t }), f = ja(l, d);
1122
+ return C.createElement(Ua, { id: i.id, key: i.id, onHeightUpdate: s.updateHeight, className: i.visible ? La : "", style: f }, i.type === "custom" ? rt(i.message, i) : a ? a(i) : C.createElement(Da, { toast: i, position: l }));
1123
+ }));
1124
+ }, Fa = W, I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1125
+ function Tr(e) {
1126
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1127
+ }
1128
+ var Pr = {}, Te = {}, z = {};
1129
+ (function(e) {
1130
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.isEventSourceSupported = e.isReactNative = e.ReadyState = e.DEFAULT_HEARTBEAT = e.UNPARSABLE_JSON_OBJECT = e.DEFAULT_RECONNECT_INTERVAL_MS = e.DEFAULT_RECONNECT_LIMIT = e.SOCKET_IO_PING_CODE = e.SOCKET_IO_PATH = e.SOCKET_IO_PING_INTERVAL = e.DEFAULT_EVENT_SOURCE_OPTIONS = e.EMPTY_EVENT_HANDLERS = e.DEFAULT_OPTIONS = void 0;
1131
+ var t = 1, r = 1e3 * t;
1132
+ e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
1133
+ withCredentials: !1,
1134
+ events: e.EMPTY_EVENT_HANDLERS
1135
+ }, e.SOCKET_IO_PING_INTERVAL = 25 * r, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
1136
+ message: "ping",
1137
+ timeout: 6e4,
1138
+ interval: 25e3
1139
+ }, function(a) {
1140
+ a[a.UNINSTANTIATED = -1] = "UNINSTANTIATED", a[a.CONNECTING = 0] = "CONNECTING", a[a.OPEN = 1] = "OPEN", a[a.CLOSING = 2] = "CLOSING", a[a.CLOSED = 3] = "CLOSED";
1141
+ }(e.ReadyState || (e.ReadyState = {}));
1142
+ var n = function() {
1143
+ try {
1144
+ return "EventSource" in globalThis;
1145
+ } catch {
1146
+ return !1;
1147
+ }
1148
+ };
1149
+ e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && n();
1150
+ })(z);
1151
+ var ft = {}, dt = {};
1152
+ (function(e) {
1153
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
1154
+ var t = function(r) {
1155
+ if (r && e.sharedWebSockets.hasOwnProperty(r))
1156
+ delete e.sharedWebSockets[r];
1157
+ else
1158
+ for (var n in e.sharedWebSockets)
1159
+ e.sharedWebSockets.hasOwnProperty(n) && delete e.sharedWebSockets[n];
1160
+ };
1161
+ e.resetWebSockets = t;
1162
+ })(dt);
1163
+ var pt = {}, Y = {};
1164
+ Object.defineProperty(Y, "__esModule", { value: !0 });
1165
+ Y.setUpSocketIOPing = Y.appendQueryParams = Y.parseSocketIOUrl = void 0;
1166
+ var nt = z, Ba = function(e) {
1167
+ if (e) {
1168
+ var t = /^https|wss/.test(e), r = e.replace(/^(https?|wss?)(:\/\/)?/, ""), n = r.replace(/\/$/, ""), a = t ? "wss" : "ws";
1169
+ return "".concat(a, "://").concat(n).concat(nt.SOCKET_IO_PATH);
1170
+ } else if (e === "") {
1171
+ var t = /^https/.test(window.location.protocol), a = t ? "wss" : "ws", o = window.location.port ? ":".concat(window.location.port) : "";
1172
+ return "".concat(a, "://").concat(window.location.hostname).concat(o).concat(nt.SOCKET_IO_PATH);
1173
+ }
1174
+ return e;
1175
+ };
1176
+ Y.parseSocketIOUrl = Ba;
1177
+ var Ha = function(e, t) {
1178
+ t === void 0 && (t = {});
1179
+ var r = /\?([\w]+=[\w]+)/, n = r.test(e), a = "".concat(Object.entries(t).reduce(function(o, c) {
1180
+ var u = c[0], s = c[1];
1181
+ return o + "".concat(u, "=").concat(s, "&");
1182
+ }, "").slice(0, -1));
1183
+ return "".concat(e).concat(n ? "&" : "?").concat(a);
1184
+ };
1185
+ Y.appendQueryParams = Ha;
1186
+ var qa = function(e, t) {
1187
+ t === void 0 && (t = nt.SOCKET_IO_PING_INTERVAL);
1188
+ var r = function() {
1189
+ return e(nt.SOCKET_IO_PING_CODE);
1190
+ };
1191
+ return window.setInterval(r, t);
1192
+ };
1193
+ Y.setUpSocketIOPing = qa;
1194
+ var We = {};
1195
+ Object.defineProperty(We, "__esModule", { value: !0 });
1196
+ We.heartbeat = void 0;
1197
+ var At = z;
1198
+ function Va(e, t) {
1199
+ var r = t || {}, n = r.interval, a = n === void 0 ? At.DEFAULT_HEARTBEAT.interval : n, o = r.timeout, c = o === void 0 ? At.DEFAULT_HEARTBEAT.timeout : o, u = r.message, s = u === void 0 ? At.DEFAULT_HEARTBEAT.message : u, i = !1, l = setInterval(function() {
1200
+ try {
1201
+ typeof s == "function" ? e.send(s()) : e.send(s);
1202
+ } catch {
1203
+ }
1204
+ }, a), d = setInterval(function() {
1205
+ i ? i = !1 : e.close();
1206
+ }, c);
1207
+ return e.addEventListener("close", function() {
1208
+ clearInterval(l), clearInterval(d);
1209
+ }), function() {
1210
+ i = !0;
1211
+ };
1212
+ }
1213
+ We.heartbeat = Va;
1214
+ var ce = {}, vt = {};
1215
+ (function(e) {
1216
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
1217
+ var t = {}, r = [], n = function(s) {
1218
+ return (0, e.hasSubscribers)(s) ? Array.from(t[s]) : r;
1219
+ };
1220
+ e.getSubscribers = n;
1221
+ var a = function(s) {
1222
+ var i;
1223
+ return ((i = t[s]) === null || i === void 0 ? void 0 : i.size) > 0;
1224
+ };
1225
+ e.hasSubscribers = a;
1226
+ var o = function(s, i) {
1227
+ t[s] = t[s] || /* @__PURE__ */ new Set(), t[s].add(i);
1228
+ };
1229
+ e.addSubscriber = o;
1230
+ var c = function(s, i) {
1231
+ t[s].delete(i);
1232
+ };
1233
+ e.removeSubscriber = c;
1234
+ var u = function(s) {
1235
+ if (s && t.hasOwnProperty(s))
1236
+ delete t[s];
1237
+ else
1238
+ for (var i in t)
1239
+ t.hasOwnProperty(i) && delete t[i];
1240
+ };
1241
+ e.resetSubscribers = u;
1242
+ })(vt);
1243
+ Object.defineProperty(ce, "__esModule", { value: !0 });
1244
+ ce.resetGlobalState = ce.assertIsWebSocket = void 0;
1245
+ var Ja = dt, za = vt;
1246
+ function Ga(e, t) {
1247
+ if (!t && !(e instanceof WebSocket))
1248
+ throw new Error("");
1249
+ }
1250
+ ce.assertIsWebSocket = Ga;
1251
+ function Xa(e) {
1252
+ (0, za.resetSubscribers)(e), (0, Ja.resetWebSockets)(e);
1253
+ }
1254
+ ce.resetGlobalState = Xa;
1255
+ var at = I && I.__assign || function() {
1256
+ return at = Object.assign || function(e) {
1257
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1258
+ t = arguments[r];
1259
+ for (var a in t)
1260
+ Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
1261
+ }
1262
+ return e;
1263
+ }, at.apply(this, arguments);
1264
+ };
1265
+ Object.defineProperty(pt, "__esModule", { value: !0 });
1266
+ pt.attachListeners = void 0;
1267
+ var Ya = Y, Ka = We, X = z, Qa = ce, Za = function(e, t, r) {
1268
+ var n;
1269
+ if (t.current.heartbeat && e instanceof WebSocket) {
1270
+ var a = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
1271
+ n = (0, Ka.heartbeat)(e, a);
1272
+ }
1273
+ e.onmessage = function(o) {
1274
+ var c;
1275
+ n == null || n(), t.current.onMessage && t.current.onMessage(o), !(typeof t.current.filter == "function" && t.current.filter(o) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((c = t.current.heartbeat) === null || c === void 0 ? void 0 : c.returnMessage) === o.data || r(o));
1276
+ };
1277
+ }, eo = function(e, t, r, n) {
1278
+ e.onopen = function(a) {
1279
+ t.current.onOpen && t.current.onOpen(a), n.current = 0, r(X.ReadyState.OPEN);
1280
+ };
1281
+ }, to = function(e, t, r, n, a) {
1282
+ if (X.isEventSourceSupported && e instanceof EventSource)
1283
+ return function() {
1284
+ };
1285
+ (0, Qa.assertIsWebSocket)(e, t.current.skipAssert);
1286
+ var o;
1287
+ return e.onclose = function(c) {
1288
+ var u;
1289
+ if (t.current.onClose && t.current.onClose(c), r(X.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(c)) {
1290
+ var s = (u = t.current.reconnectAttempts) !== null && u !== void 0 ? u : X.DEFAULT_RECONNECT_LIMIT;
1291
+ if (a.current < s) {
1292
+ var i = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(a.current) : t.current.reconnectInterval;
1293
+ o = window.setTimeout(function() {
1294
+ a.current++, n();
1295
+ }, i ?? X.DEFAULT_RECONNECT_INTERVAL_MS);
1296
+ } else
1297
+ t.current.onReconnectStop && t.current.onReconnectStop(s), console.warn("Max reconnect attempts of ".concat(s, " exceeded"));
1298
+ }
1299
+ }, function() {
1300
+ return o && window.clearTimeout(o);
1301
+ };
1302
+ }, ro = function(e, t, r, n, a) {
1303
+ var o;
1304
+ return e.onerror = function(c) {
1305
+ var u;
1306
+ if (t.current.onError && t.current.onError(c), X.isEventSourceSupported && e instanceof EventSource && (t.current.onClose && t.current.onClose(at(at({}, c), { code: 1006, reason: "An error occurred with the EventSource: ".concat(c), wasClean: !1 })), r(X.ReadyState.CLOSED), e.close()), t.current.retryOnError)
1307
+ if (a.current < ((u = t.current.reconnectAttempts) !== null && u !== void 0 ? u : X.DEFAULT_RECONNECT_LIMIT)) {
1308
+ var s = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(a.current) : t.current.reconnectInterval;
1309
+ o = window.setTimeout(function() {
1310
+ a.current++, n();
1311
+ }, s ?? X.DEFAULT_RECONNECT_INTERVAL_MS);
1312
+ } else
1313
+ t.current.onReconnectStop && t.current.onReconnectStop(t.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts, " exceeded"));
1314
+ }, function() {
1315
+ return o && window.clearTimeout(o);
1316
+ };
1317
+ }, no = function(e, t, r, n, a, o) {
1318
+ var c = t.setLastMessage, u = t.setReadyState, s, i, l;
1319
+ return r.current.fromSocketIO && (s = (0, Ya.setUpSocketIOPing)(o)), Za(e, r, c), eo(e, r, u, a), i = to(e, r, u, n, a), l = ro(e, r, u, n, a), function() {
1320
+ u(X.ReadyState.CLOSING), i(), l(), e.close(), s && clearInterval(s);
1321
+ };
1322
+ };
1323
+ pt.attachListeners = no;
1324
+ var ht = {}, ot = I && I.__assign || function() {
1325
+ return ot = Object.assign || function(e) {
1326
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1327
+ t = arguments[r];
1328
+ for (var a in t)
1329
+ Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
1330
+ }
1331
+ return e;
1332
+ }, ot.apply(this, arguments);
1333
+ };
1334
+ Object.defineProperty(ht, "__esModule", { value: !0 });
1335
+ ht.attachSharedListeners = void 0;
1336
+ var ao = dt, he = z, Me = vt, oo = Y, io = We, so = function(e, t, r) {
1337
+ var n;
1338
+ r && e instanceof WebSocket && (n = (0, io.heartbeat)(e, typeof r == "boolean" ? void 0 : r)), e.onmessage = function(a) {
1339
+ n == null || n(), (0, Me.getSubscribers)(t).forEach(function(o) {
1340
+ o.optionsRef.current.onMessage && o.optionsRef.current.onMessage(a), !(typeof o.optionsRef.current.filter == "function" && o.optionsRef.current.filter(a) !== !0) && (r && typeof r != "boolean" && (r == null ? void 0 : r.returnMessage) === a.data || o.setLastMessage(a));
1341
+ });
1342
+ };
1343
+ }, uo = function(e, t) {
1344
+ e.onopen = function(r) {
1345
+ (0, Me.getSubscribers)(t).forEach(function(n) {
1346
+ n.reconnectCount.current = 0, n.optionsRef.current.onOpen && n.optionsRef.current.onOpen(r), n.setReadyState(he.ReadyState.OPEN);
1347
+ });
1348
+ };
1349
+ }, co = function(e, t) {
1350
+ e instanceof WebSocket && (e.onclose = function(r) {
1351
+ (0, Me.getSubscribers)(t).forEach(function(n) {
1352
+ n.optionsRef.current.onClose && n.optionsRef.current.onClose(r), n.setReadyState(he.ReadyState.CLOSED);
1353
+ }), delete ao.sharedWebSockets[t], (0, Me.getSubscribers)(t).forEach(function(n) {
1354
+ var a;
1355
+ if (n.optionsRef.current.shouldReconnect && n.optionsRef.current.shouldReconnect(r)) {
1356
+ var o = (a = n.optionsRef.current.reconnectAttempts) !== null && a !== void 0 ? a : he.DEFAULT_RECONNECT_LIMIT;
1357
+ if (n.reconnectCount.current < o) {
1358
+ var c = typeof n.optionsRef.current.reconnectInterval == "function" ? n.optionsRef.current.reconnectInterval(n.reconnectCount.current) : n.optionsRef.current.reconnectInterval;
1359
+ setTimeout(function() {
1360
+ n.reconnectCount.current++, n.reconnect.current();
1361
+ }, c ?? he.DEFAULT_RECONNECT_INTERVAL_MS);
1362
+ } else
1363
+ n.optionsRef.current.onReconnectStop && n.optionsRef.current.onReconnectStop(n.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(o, " exceeded"));
1364
+ }
1365
+ });
1366
+ });
1367
+ }, lo = function(e, t) {
1368
+ e.onerror = function(r) {
1369
+ (0, Me.getSubscribers)(t).forEach(function(n) {
1370
+ n.optionsRef.current.onError && n.optionsRef.current.onError(r), he.isEventSourceSupported && e instanceof EventSource && (n.optionsRef.current.onClose && n.optionsRef.current.onClose(ot(ot({}, r), { code: 1006, reason: "An error occurred with the EventSource: ".concat(r), wasClean: !1 })), n.setReadyState(he.ReadyState.CLOSED));
1371
+ }), he.isEventSourceSupported && e instanceof EventSource && e.close();
1372
+ };
1373
+ }, fo = function(e, t, r, n) {
1374
+ var a;
1375
+ return r.current.fromSocketIO && (a = (0, oo.setUpSocketIOPing)(n)), so(e, t, r.current.heartbeat), co(e, t), uo(e, t), lo(e, t), function() {
1376
+ a && clearInterval(a);
1377
+ };
1378
+ };
1379
+ ht.attachSharedListeners = fo;
1380
+ Object.defineProperty(ft, "__esModule", { value: !0 });
1381
+ ft.createOrJoinSocket = void 0;
1382
+ var ie = dt, $e = z, po = pt, vo = ht, Nt = vt, ho = function(e, t, r, n, a) {
1383
+ return function() {
1384
+ if ((0, Nt.removeSubscriber)(e, t), !(0, Nt.hasSubscribers)(e)) {
1385
+ try {
1386
+ var o = ie.sharedWebSockets[e];
1387
+ o instanceof WebSocket && (o.onclose = function(c) {
1388
+ r.current.onClose && r.current.onClose(c), n($e.ReadyState.CLOSED);
1389
+ }), o.close();
1390
+ } catch {
1391
+ }
1392
+ a && a(), delete ie.sharedWebSockets[e];
1393
+ }
1394
+ };
1395
+ }, mo = function(e, t, r, n, a, o, c, u) {
1396
+ if (!$e.isEventSourceSupported && n.current.eventSourceOptions)
1397
+ throw $e.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
1398
+ if (n.current.share) {
1399
+ var s = null;
1400
+ ie.sharedWebSockets[t] === void 0 ? (ie.sharedWebSockets[t] = n.current.eventSourceOptions ? new EventSource(t, n.current.eventSourceOptions) : new WebSocket(t, n.current.protocols), e.current = ie.sharedWebSockets[t], r($e.ReadyState.CONNECTING), s = (0, vo.attachSharedListeners)(ie.sharedWebSockets[t], t, n, u)) : (e.current = ie.sharedWebSockets[t], r(ie.sharedWebSockets[t].readyState));
1401
+ var i = {
1402
+ setLastMessage: a,
1403
+ setReadyState: r,
1404
+ optionsRef: n,
1405
+ reconnectCount: c,
1406
+ reconnect: o
1407
+ };
1408
+ return (0, Nt.addSubscriber)(t, i), ho(t, i, n, r, s);
1409
+ } else {
1410
+ if (e.current = n.current.eventSourceOptions ? new EventSource(t, n.current.eventSourceOptions) : new WebSocket(t, n.current.protocols), r($e.ReadyState.CONNECTING), !e.current)
1411
+ throw new Error("WebSocket failed to be created");
1412
+ return (0, po.attachListeners)(e.current, {
1413
+ setLastMessage: a,
1414
+ setReadyState: r
1415
+ }, n, o.current, c, u);
1416
+ }
1417
+ };
1418
+ ft.createOrJoinSocket = mo;
1419
+ var kr = {};
1420
+ (function(e) {
1421
+ var t = I && I.__awaiter || function(u, s, i, l) {
1422
+ function d(f) {
1423
+ return f instanceof i ? f : new i(function(p) {
1424
+ p(f);
1425
+ });
1426
+ }
1427
+ return new (i || (i = Promise))(function(f, p) {
1428
+ function m(y) {
1429
+ try {
1430
+ v(l.next(y));
1431
+ } catch (w) {
1432
+ p(w);
1433
+ }
1434
+ }
1435
+ function h(y) {
1436
+ try {
1437
+ v(l.throw(y));
1438
+ } catch (w) {
1439
+ p(w);
1440
+ }
1441
+ }
1442
+ function v(y) {
1443
+ y.done ? f(y.value) : d(y.value).then(m, h);
1444
+ }
1445
+ v((l = l.apply(u, s || [])).next());
1446
+ });
1447
+ }, r = I && I.__generator || function(u, s) {
1448
+ var i = { label: 0, sent: function() {
1449
+ if (f[0] & 1)
1450
+ throw f[1];
1451
+ return f[1];
1452
+ }, trys: [], ops: [] }, l, d, f, p;
1453
+ return p = { next: m(0), throw: m(1), return: m(2) }, typeof Symbol == "function" && (p[Symbol.iterator] = function() {
1454
+ return this;
1455
+ }), p;
1456
+ function m(v) {
1457
+ return function(y) {
1458
+ return h([v, y]);
1459
+ };
1460
+ }
1461
+ function h(v) {
1462
+ if (l)
1463
+ throw new TypeError("Generator is already executing.");
1464
+ for (; i; )
1465
+ try {
1466
+ if (l = 1, d && (f = v[0] & 2 ? d.return : v[0] ? d.throw || ((f = d.return) && f.call(d), 0) : d.next) && !(f = f.call(d, v[1])).done)
1467
+ return f;
1468
+ switch (d = 0, f && (v = [v[0] & 2, f.value]), v[0]) {
1469
+ case 0:
1470
+ case 1:
1471
+ f = v;
1472
+ break;
1473
+ case 4:
1474
+ return i.label++, { value: v[1], done: !1 };
1475
+ case 5:
1476
+ i.label++, d = v[1], v = [0];
1477
+ continue;
1478
+ case 7:
1479
+ v = i.ops.pop(), i.trys.pop();
1480
+ continue;
1481
+ default:
1482
+ if (f = i.trys, !(f = f.length > 0 && f[f.length - 1]) && (v[0] === 6 || v[0] === 2)) {
1483
+ i = 0;
1484
+ continue;
1485
+ }
1486
+ if (v[0] === 3 && (!f || v[1] > f[0] && v[1] < f[3])) {
1487
+ i.label = v[1];
1488
+ break;
1489
+ }
1490
+ if (v[0] === 6 && i.label < f[1]) {
1491
+ i.label = f[1], f = v;
1492
+ break;
1493
+ }
1494
+ if (f && i.label < f[2]) {
1495
+ i.label = f[2], i.ops.push(v);
1496
+ break;
1497
+ }
1498
+ f[2] && i.ops.pop(), i.trys.pop();
1499
+ continue;
1500
+ }
1501
+ v = s.call(u, i);
1502
+ } catch (y) {
1503
+ v = [6, y], d = 0;
1504
+ } finally {
1505
+ l = f = 0;
1506
+ }
1507
+ if (v[0] & 5)
1508
+ throw v[1];
1509
+ return { value: v[0] ? v[1] : void 0, done: !0 };
1510
+ }
1511
+ };
1512
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
1513
+ var n = Y, a = z, o = function(u) {
1514
+ return new Promise(function(s) {
1515
+ return window.setTimeout(s, u);
1516
+ });
1517
+ }, c = function(u, s, i) {
1518
+ return i === void 0 && (i = 0), t(void 0, void 0, void 0, function() {
1519
+ var l, d, f, p, m, h, v, y;
1520
+ return r(this, function(w) {
1521
+ switch (w.label) {
1522
+ case 0:
1523
+ if (typeof u != "function")
1524
+ return [3, 10];
1525
+ w.label = 1;
1526
+ case 1:
1527
+ return w.trys.push([1, 3, , 9]), [4, u()];
1528
+ case 2:
1529
+ return l = w.sent(), [3, 9];
1530
+ case 3:
1531
+ return w.sent(), s.current.retryOnError ? (d = (h = s.current.reconnectAttempts) !== null && h !== void 0 ? h : a.DEFAULT_RECONNECT_LIMIT, i < d ? (f = typeof s.current.reconnectInterval == "function" ? s.current.reconnectInterval(i) : s.current.reconnectInterval, [4, o(f ?? a.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
1532
+ case 4:
1533
+ return w.sent(), [2, (0, e.getUrl)(u, s, i + 1)];
1534
+ case 5:
1535
+ return (y = (v = s.current).onReconnectStop) === null || y === void 0 || y.call(v, i), [2, null];
1536
+ case 6:
1537
+ return [3, 8];
1538
+ case 7:
1539
+ return [2, null];
1540
+ case 8:
1541
+ return [3, 9];
1542
+ case 9:
1543
+ return [3, 11];
1544
+ case 10:
1545
+ l = u, w.label = 11;
1546
+ case 11:
1547
+ return p = s.current.fromSocketIO ? (0, n.parseSocketIOUrl)(l) : l, m = s.current.queryParams ? (0, n.appendQueryParams)(p, s.current.queryParams) : p, [2, m];
1548
+ }
1549
+ });
1550
+ });
1551
+ };
1552
+ e.getUrl = c;
1553
+ })(kr);
1554
+ var Ir = {};
1555
+ (function(e) {
1556
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
1557
+ var t = function(r, n) {
1558
+ return new Proxy(r, {
1559
+ get: function(a, o) {
1560
+ var c = a[o];
1561
+ return o === "reconnect" ? n : typeof c == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
1562
+ }) : c;
1563
+ },
1564
+ set: function(a, o, c) {
1565
+ return /^on/.test(o) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (a[o] = c, !0);
1566
+ }
1567
+ });
1568
+ };
1569
+ e.websocketWrapper = t, e.default = e.websocketWrapper;
1570
+ })(Ir);
1571
+ var se = I && I.__assign || function() {
1572
+ return se = Object.assign || function(e) {
1573
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1574
+ t = arguments[r];
1575
+ for (var a in t)
1576
+ Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
1577
+ }
1578
+ return e;
1579
+ }, se.apply(this, arguments);
1580
+ }, yo = I && I.__awaiter || function(e, t, r, n) {
1581
+ function a(o) {
1582
+ return o instanceof r ? o : new r(function(c) {
1583
+ c(o);
1584
+ });
1585
+ }
1586
+ return new (r || (r = Promise))(function(o, c) {
1587
+ function u(l) {
1588
+ try {
1589
+ i(n.next(l));
1590
+ } catch (d) {
1591
+ c(d);
1592
+ }
1593
+ }
1594
+ function s(l) {
1595
+ try {
1596
+ i(n.throw(l));
1597
+ } catch (d) {
1598
+ c(d);
1599
+ }
1600
+ }
1601
+ function i(l) {
1602
+ l.done ? o(l.value) : a(l.value).then(u, s);
1603
+ }
1604
+ i((n = n.apply(e, t || [])).next());
1605
+ });
1606
+ }, go = I && I.__generator || function(e, t) {
1607
+ var r = { label: 0, sent: function() {
1608
+ if (o[0] & 1)
1609
+ throw o[1];
1610
+ return o[1];
1611
+ }, trys: [], ops: [] }, n, a, o, c;
1612
+ return c = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
1613
+ return this;
1614
+ }), c;
1615
+ function u(i) {
1616
+ return function(l) {
1617
+ return s([i, l]);
1618
+ };
1619
+ }
1620
+ function s(i) {
1621
+ if (n)
1622
+ throw new TypeError("Generator is already executing.");
1623
+ for (; r; )
1624
+ try {
1625
+ if (n = 1, a && (o = i[0] & 2 ? a.return : i[0] ? a.throw || ((o = a.return) && o.call(a), 0) : a.next) && !(o = o.call(a, i[1])).done)
1626
+ return o;
1627
+ switch (a = 0, o && (i = [i[0] & 2, o.value]), i[0]) {
1628
+ case 0:
1629
+ case 1:
1630
+ o = i;
1631
+ break;
1632
+ case 4:
1633
+ return r.label++, { value: i[1], done: !1 };
1634
+ case 5:
1635
+ r.label++, a = i[1], i = [0];
1636
+ continue;
1637
+ case 7:
1638
+ i = r.ops.pop(), r.trys.pop();
1639
+ continue;
1640
+ default:
1641
+ if (o = r.trys, !(o = o.length > 0 && o[o.length - 1]) && (i[0] === 6 || i[0] === 2)) {
1642
+ r = 0;
1643
+ continue;
1644
+ }
1645
+ if (i[0] === 3 && (!o || i[1] > o[0] && i[1] < o[3])) {
1646
+ r.label = i[1];
1647
+ break;
1648
+ }
1649
+ if (i[0] === 6 && r.label < o[1]) {
1650
+ r.label = o[1], o = i;
1651
+ break;
1652
+ }
1653
+ if (o && r.label < o[2]) {
1654
+ r.label = o[2], r.ops.push(i);
1655
+ break;
1656
+ }
1657
+ o[2] && r.ops.pop(), r.trys.pop();
1658
+ continue;
1659
+ }
1660
+ i = t.call(e, r);
1661
+ } catch (l) {
1662
+ i = [6, l], a = 0;
1663
+ } finally {
1664
+ n = o = 0;
1665
+ }
1666
+ if (i[0] & 5)
1667
+ throw i[1];
1668
+ return { value: i[0] ? i[1] : void 0, done: !0 };
1669
+ }
1670
+ }, bo = I && I.__importDefault || function(e) {
1671
+ return e && e.__esModule ? e : { default: e };
1672
+ };
1673
+ Object.defineProperty(Te, "__esModule", { value: !0 });
1674
+ Te.useWebSocket = void 0;
1675
+ var M = O, Tt = zr, G = z, wo = ft, So = kr, Eo = bo(Ir), ar = ce, Oo = function(e, t, r) {
1676
+ t === void 0 && (t = G.DEFAULT_OPTIONS), r === void 0 && (r = !0);
1677
+ var n = (0, M.useState)(null), a = n[0], o = n[1], c = (0, M.useState)({}), u = c[0], s = c[1], i = (0, M.useMemo)(function() {
1678
+ if (a)
1679
+ try {
1680
+ return JSON.parse(a.data);
1681
+ } catch {
1682
+ return G.UNPARSABLE_JSON_OBJECT;
1683
+ }
1684
+ return null;
1685
+ }, [a]), l = (0, M.useRef)(null), d = (0, M.useRef)(null), f = (0, M.useRef)(function() {
1686
+ }), p = (0, M.useRef)(0), m = (0, M.useRef)([]), h = (0, M.useRef)(null), v = (0, M.useRef)(t);
1687
+ v.current = t;
1688
+ var y = l.current && u[l.current] !== void 0 ? u[l.current] : e !== null && r === !0 ? G.ReadyState.CONNECTING : G.ReadyState.UNINSTANTIATED, w = t.queryParams ? JSON.stringify(t.queryParams) : null, _ = (0, M.useCallback)(function(g, S) {
1689
+ var T;
1690
+ if (S === void 0 && (S = !0), G.isEventSourceSupported && d.current instanceof EventSource) {
1691
+ console.warn("Unable to send a message from an eventSource");
1692
+ return;
1693
+ }
1694
+ ((T = d.current) === null || T === void 0 ? void 0 : T.readyState) === G.ReadyState.OPEN ? ((0, ar.assertIsWebSocket)(d.current, v.current.skipAssert), d.current.send(g)) : S && m.current.push(g);
1695
+ }, []), b = (0, M.useCallback)(function(g, S) {
1696
+ S === void 0 && (S = !0), _(JSON.stringify(g), S);
1697
+ }, [_]), E = (0, M.useCallback)(function() {
1698
+ return v.current.share !== !0 || G.isEventSourceSupported && d.current instanceof EventSource ? d.current : (h.current === null && d.current && ((0, ar.assertIsWebSocket)(d.current, v.current.skipAssert), h.current = (0, Eo.default)(d.current, f)), h.current);
1699
+ }, []);
1700
+ return (0, M.useEffect)(function() {
1701
+ if (e !== null && r === !0) {
1702
+ var g, S = !1, T = !0, x = function() {
1703
+ return yo(void 0, void 0, void 0, function() {
1704
+ var P, k, D;
1705
+ return go(this, function($) {
1706
+ switch ($.label) {
1707
+ case 0:
1708
+ return P = l, [4, (0, So.getUrl)(e, v)];
1709
+ case 1:
1710
+ return P.current = $.sent(), l.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), l.current = "ABORTED", (0, Tt.flushSync)(function() {
1711
+ return s(function(L) {
1712
+ return se(se({}, L), { ABORTED: G.ReadyState.CLOSED });
1713
+ });
1714
+ }), [
1715
+ 2
1716
+ /*return*/
1717
+ ]) : (k = function(L) {
1718
+ S || (0, Tt.flushSync)(function() {
1719
+ return o(L);
1720
+ });
1721
+ }, D = function(L) {
1722
+ S || (0, Tt.flushSync)(function() {
1723
+ return s(function(Z) {
1724
+ var N;
1725
+ return se(se({}, Z), l.current && (N = {}, N[l.current] = L, N));
1726
+ });
1727
+ });
1728
+ }, T && (g = (0, wo.createOrJoinSocket)(d, l.current, D, v, k, f, p, _)), [
1729
+ 2
1730
+ /*return*/
1731
+ ]);
1732
+ }
1733
+ });
1734
+ });
1735
+ };
1736
+ return f.current = function() {
1737
+ S || (h.current && (h.current = null), g == null || g(), x());
1738
+ }, x(), function() {
1739
+ S = !0, T = !1, h.current && (h.current = null), g == null || g(), o(null);
1740
+ };
1741
+ } else
1742
+ (e === null || r === !1) && (p.current = 0, s(function(P) {
1743
+ var k;
1744
+ return se(se({}, P), l.current && (k = {}, k[l.current] = G.ReadyState.CLOSED, k));
1745
+ }));
1746
+ }, [e, r, w, _]), (0, M.useEffect)(function() {
1747
+ y === G.ReadyState.OPEN && m.current.splice(0).forEach(function(g) {
1748
+ _(g);
1749
+ });
1750
+ }, [y]), {
1751
+ sendMessage: _,
1752
+ sendJsonMessage: b,
1753
+ lastMessage: a,
1754
+ lastJsonMessage: i,
1755
+ readyState: y,
1756
+ getWebSocket: E
1757
+ };
1758
+ };
1759
+ Te.useWebSocket = Oo;
1760
+ var mt = {}, it = I && I.__assign || function() {
1761
+ return it = Object.assign || function(e) {
1762
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1763
+ t = arguments[r];
1764
+ for (var a in t)
1765
+ Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
1766
+ }
1767
+ return e;
1768
+ }, it.apply(this, arguments);
1769
+ };
1770
+ Object.defineProperty(mt, "__esModule", { value: !0 });
1771
+ mt.useSocketIO = void 0;
1772
+ var or = O, Co = Te, _o = z, Pt = {
1773
+ type: "empty",
1774
+ payload: null
1775
+ }, Ao = function(e) {
1776
+ if (!e || !e.data)
1777
+ return Pt;
1778
+ var t = e.data.match(/\[.*]/);
1779
+ if (!t)
1780
+ return Pt;
1781
+ var r = JSON.parse(t);
1782
+ return !Array.isArray(r) || !r[1] ? Pt : {
1783
+ type: r[0],
1784
+ payload: r[1]
1785
+ };
1786
+ }, To = function(e, t, r) {
1787
+ t === void 0 && (t = _o.DEFAULT_OPTIONS), r === void 0 && (r = !0);
1788
+ var n = (0, or.useMemo)(function() {
1789
+ return it(it({}, t), { fromSocketIO: !0 });
1790
+ }, []), a = (0, Co.useWebSocket)(e, n, r), o = a.sendMessage, c = a.sendJsonMessage, u = a.lastMessage, s = a.readyState, i = a.getWebSocket, l = (0, or.useMemo)(function() {
1791
+ return Ao(u);
1792
+ }, [u]);
1793
+ return {
1794
+ sendMessage: o,
1795
+ sendJsonMessage: c,
1796
+ lastMessage: l,
1797
+ lastJsonMessage: l,
1798
+ readyState: s,
1799
+ getWebSocket: i
1800
+ };
1801
+ };
1802
+ mt.useSocketIO = To;
1803
+ var yt = {}, st = I && I.__assign || function() {
1804
+ return st = Object.assign || function(e) {
1805
+ for (var t, r = 1, n = arguments.length; r < n; r++) {
1806
+ t = arguments[r];
1807
+ for (var a in t)
1808
+ Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
1809
+ }
1810
+ return e;
1811
+ }, st.apply(this, arguments);
1812
+ }, Po = I && I.__rest || function(e, t) {
1813
+ var r = {};
1814
+ for (var n in e)
1815
+ Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
1816
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
1817
+ for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
1818
+ t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (r[n[a]] = e[n[a]]);
1819
+ return r;
1820
+ };
1821
+ Object.defineProperty(yt, "__esModule", { value: !0 });
1822
+ yt.useEventSource = void 0;
1823
+ var ir = O, ko = Te, sr = z, Io = function(e, t, r) {
1824
+ t === void 0 && (t = sr.DEFAULT_EVENT_SOURCE_OPTIONS);
1825
+ var n = t.withCredentials, a = t.events, o = Po(t, ["withCredentials", "events"]);
1826
+ r === void 0 && (r = !0);
1827
+ var c = st(st({}, o), { eventSourceOptions: {
1828
+ withCredentials: n
1829
+ } }), u = (0, ir.useRef)(sr.EMPTY_EVENT_HANDLERS);
1830
+ a && (u.current = a);
1831
+ var s = (0, ko.useWebSocket)(e, c, r), i = s.lastMessage, l = s.readyState, d = s.getWebSocket;
1832
+ return (0, ir.useEffect)(function() {
1833
+ i != null && i.type && Object.entries(u.current).forEach(function(f) {
1834
+ var p = f[0], m = f[1];
1835
+ p === i.type && m(i);
1836
+ });
1837
+ }, [i]), {
1838
+ lastEvent: i,
1839
+ readyState: l,
1840
+ getEventSource: d
1841
+ };
1842
+ };
1843
+ yt.useEventSource = Io;
1844
+ (function(e) {
1845
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
1846
+ var t = Te;
1847
+ Object.defineProperty(e, "default", { enumerable: !0, get: function() {
1848
+ return t.useWebSocket;
1849
+ } });
1850
+ var r = mt;
1851
+ Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
1852
+ return r.useSocketIO;
1853
+ } });
1854
+ var n = z;
1855
+ Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
1856
+ return n.ReadyState;
1857
+ } });
1858
+ var a = yt;
1859
+ Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
1860
+ return a.useEventSource;
1861
+ } });
1862
+ var o = ce;
1863
+ Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
1864
+ return o.resetGlobalState;
1865
+ } });
1866
+ })(Pr);
1867
+ const xo = /* @__PURE__ */ Tr(Pr);
1868
+ function $o({
1869
+ title: e,
1870
+ titleId: t,
1871
+ ...r
1872
+ }, n) {
1873
+ return /* @__PURE__ */ C.createElement("svg", Object.assign({
1874
+ xmlns: "http://www.w3.org/2000/svg",
1875
+ viewBox: "0 0 24 24",
1876
+ fill: "currentColor",
1877
+ "aria-hidden": "true",
1878
+ "data-slot": "icon",
1879
+ ref: n,
1880
+ "aria-labelledby": t
1881
+ }, r), e ? /* @__PURE__ */ C.createElement("title", {
1882
+ id: t
1883
+ }, e) : null, /* @__PURE__ */ C.createElement("path", {
1884
+ fillRule: "evenodd",
1885
+ d: "M5.25 9a6.75 6.75 0 0 1 13.5 0v.75c0 2.123.8 4.057 2.118 5.52a.75.75 0 0 1-.297 1.206c-1.544.57-3.16.99-4.831 1.243a3.75 3.75 0 1 1-7.48 0 24.585 24.585 0 0 1-4.831-1.244.75.75 0 0 1-.298-1.205A8.217 8.217 0 0 0 5.25 9.75V9Zm4.502 8.9a2.25 2.25 0 1 0 4.496 0 25.057 25.057 0 0 1-4.496 0Z",
1886
+ clipRule: "evenodd"
1887
+ }));
1888
+ }
1889
+ const No = C.forwardRef($o);
1890
+ var ur = function(t) {
1891
+ return t.reduce(function(r, n) {
1892
+ var a = n[0], o = n[1];
1893
+ return r[a] = o, r;
1894
+ }, {});
1895
+ }, cr = typeof window < "u" && window.document && window.document.createElement ? C.useLayoutEffect : C.useEffect, U = "top", q = "bottom", V = "right", j = "left", Dt = "auto", Fe = [U, q, V, j], Oe = "start", De = "end", Ro = "clippingParents", xr = "viewport", Ie = "popper", Mo = "reference", lr = /* @__PURE__ */ Fe.reduce(function(e, t) {
1896
+ return e.concat([t + "-" + Oe, t + "-" + De]);
1897
+ }, []), $r = /* @__PURE__ */ [].concat(Fe, [Dt]).reduce(function(e, t) {
1898
+ return e.concat([t, t + "-" + Oe, t + "-" + De]);
1899
+ }, []), Do = "beforeRead", Uo = "read", jo = "afterRead", Lo = "beforeMain", Wo = "main", Fo = "afterMain", Bo = "beforeWrite", Ho = "write", qo = "afterWrite", Vo = [Do, Uo, jo, Lo, Wo, Fo, Bo, Ho, qo];
1900
+ function Q(e) {
1901
+ return e ? (e.nodeName || "").toLowerCase() : null;
1902
+ }
1903
+ function F(e) {
1904
+ if (e == null)
1905
+ return window;
1906
+ if (e.toString() !== "[object Window]") {
1907
+ var t = e.ownerDocument;
1908
+ return t && t.defaultView || window;
1909
+ }
1910
+ return e;
1911
+ }
1912
+ function ye(e) {
1913
+ var t = F(e).Element;
1914
+ return e instanceof t || e instanceof Element;
1915
+ }
1916
+ function H(e) {
1917
+ var t = F(e).HTMLElement;
1918
+ return e instanceof t || e instanceof HTMLElement;
1919
+ }
1920
+ function Ut(e) {
1921
+ if (typeof ShadowRoot > "u")
1922
+ return !1;
1923
+ var t = F(e).ShadowRoot;
1924
+ return e instanceof t || e instanceof ShadowRoot;
1925
+ }
1926
+ function Jo(e) {
1927
+ var t = e.state;
1928
+ Object.keys(t.elements).forEach(function(r) {
1929
+ var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
1930
+ !H(o) || !Q(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(c) {
1931
+ var u = a[c];
1932
+ u === !1 ? o.removeAttribute(c) : o.setAttribute(c, u === !0 ? "" : u);
1933
+ }));
1934
+ });
1935
+ }
1936
+ function zo(e) {
1937
+ var t = e.state, r = {
1938
+ popper: {
1939
+ position: t.options.strategy,
1940
+ left: "0",
1941
+ top: "0",
1942
+ margin: "0"
1943
+ },
1944
+ arrow: {
1945
+ position: "absolute"
1946
+ },
1947
+ reference: {}
1948
+ };
1949
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
1950
+ Object.keys(t.elements).forEach(function(n) {
1951
+ var a = t.elements[n], o = t.attributes[n] || {}, c = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), u = c.reduce(function(s, i) {
1952
+ return s[i] = "", s;
1953
+ }, {});
1954
+ !H(a) || !Q(a) || (Object.assign(a.style, u), Object.keys(o).forEach(function(s) {
1955
+ a.removeAttribute(s);
1956
+ }));
1957
+ });
1958
+ };
1959
+ }
1960
+ const Go = {
1961
+ name: "applyStyles",
1962
+ enabled: !0,
1963
+ phase: "write",
1964
+ fn: Jo,
1965
+ effect: zo,
1966
+ requires: ["computeStyles"]
1967
+ };
1968
+ function K(e) {
1969
+ return e.split("-")[0];
1970
+ }
1971
+ var me = Math.max, ut = Math.min, Ce = Math.round;
1972
+ function Rt() {
1973
+ var e = navigator.userAgentData;
1974
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
1975
+ return t.brand + "/" + t.version;
1976
+ }).join(" ") : navigator.userAgent;
1977
+ }
1978
+ function Nr() {
1979
+ return !/^((?!chrome|android).)*safari/i.test(Rt());
1980
+ }
1981
+ function _e(e, t, r) {
1982
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
1983
+ var n = e.getBoundingClientRect(), a = 1, o = 1;
1984
+ t && H(e) && (a = e.offsetWidth > 0 && Ce(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Ce(n.height) / e.offsetHeight || 1);
1985
+ var c = ye(e) ? F(e) : window, u = c.visualViewport, s = !Nr() && r, i = (n.left + (s && u ? u.offsetLeft : 0)) / a, l = (n.top + (s && u ? u.offsetTop : 0)) / o, d = n.width / a, f = n.height / o;
1986
+ return {
1987
+ width: d,
1988
+ height: f,
1989
+ top: l,
1990
+ right: i + d,
1991
+ bottom: l + f,
1992
+ left: i,
1993
+ x: i,
1994
+ y: l
1995
+ };
1996
+ }
1997
+ function jt(e) {
1998
+ var t = _e(e), r = e.offsetWidth, n = e.offsetHeight;
1999
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
2000
+ x: e.offsetLeft,
2001
+ y: e.offsetTop,
2002
+ width: r,
2003
+ height: n
2004
+ };
2005
+ }
2006
+ function Rr(e, t) {
2007
+ var r = t.getRootNode && t.getRootNode();
2008
+ if (e.contains(t))
2009
+ return !0;
2010
+ if (r && Ut(r)) {
2011
+ var n = t;
2012
+ do {
2013
+ if (n && e.isSameNode(n))
2014
+ return !0;
2015
+ n = n.parentNode || n.host;
2016
+ } while (n);
2017
+ }
2018
+ return !1;
2019
+ }
2020
+ function ne(e) {
2021
+ return F(e).getComputedStyle(e);
2022
+ }
2023
+ function Xo(e) {
2024
+ return ["table", "td", "th"].indexOf(Q(e)) >= 0;
2025
+ }
2026
+ function fe(e) {
2027
+ return ((ye(e) ? e.ownerDocument : (
2028
+ // $FlowFixMe[prop-missing]
2029
+ e.document
2030
+ )) || window.document).documentElement;
2031
+ }
2032
+ function gt(e) {
2033
+ return Q(e) === "html" ? e : (
2034
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
2035
+ // $FlowFixMe[incompatible-return]
2036
+ // $FlowFixMe[prop-missing]
2037
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
2038
+ e.parentNode || // DOM Element detected
2039
+ (Ut(e) ? e.host : null) || // ShadowRoot detected
2040
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
2041
+ fe(e)
2042
+ );
2043
+ }
2044
+ function fr(e) {
2045
+ return !H(e) || // https://github.com/popperjs/popper-core/issues/837
2046
+ ne(e).position === "fixed" ? null : e.offsetParent;
2047
+ }
2048
+ function Yo(e) {
2049
+ var t = /firefox/i.test(Rt()), r = /Trident/i.test(Rt());
2050
+ if (r && H(e)) {
2051
+ var n = ne(e);
2052
+ if (n.position === "fixed")
2053
+ return null;
2054
+ }
2055
+ var a = gt(e);
2056
+ for (Ut(a) && (a = a.host); H(a) && ["html", "body"].indexOf(Q(a)) < 0; ) {
2057
+ var o = ne(a);
2058
+ if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
2059
+ return a;
2060
+ a = a.parentNode;
2061
+ }
2062
+ return null;
2063
+ }
2064
+ function Be(e) {
2065
+ for (var t = F(e), r = fr(e); r && Xo(r) && ne(r).position === "static"; )
2066
+ r = fr(r);
2067
+ return r && (Q(r) === "html" || Q(r) === "body" && ne(r).position === "static") ? t : r || Yo(e) || t;
2068
+ }
2069
+ function Lt(e) {
2070
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
2071
+ }
2072
+ function Ne(e, t, r) {
2073
+ return me(e, ut(t, r));
2074
+ }
2075
+ function Ko(e, t, r) {
2076
+ var n = Ne(e, t, r);
2077
+ return n > r ? r : n;
2078
+ }
2079
+ function Mr() {
2080
+ return {
2081
+ top: 0,
2082
+ right: 0,
2083
+ bottom: 0,
2084
+ left: 0
2085
+ };
2086
+ }
2087
+ function Dr(e) {
2088
+ return Object.assign({}, Mr(), e);
2089
+ }
2090
+ function Ur(e, t) {
2091
+ return t.reduce(function(r, n) {
2092
+ return r[n] = e, r;
2093
+ }, {});
2094
+ }
2095
+ var Qo = function(t, r) {
2096
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
2097
+ placement: r.placement
2098
+ })) : t, Dr(typeof t != "number" ? t : Ur(t, Fe));
2099
+ };
2100
+ function Zo(e) {
2101
+ var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, c = r.modifiersData.popperOffsets, u = K(r.placement), s = Lt(u), i = [j, V].indexOf(u) >= 0, l = i ? "height" : "width";
2102
+ if (!(!o || !c)) {
2103
+ var d = Qo(a.padding, r), f = jt(o), p = s === "y" ? U : j, m = s === "y" ? q : V, h = r.rects.reference[l] + r.rects.reference[s] - c[s] - r.rects.popper[l], v = c[s] - r.rects.reference[s], y = Be(o), w = y ? s === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, _ = h / 2 - v / 2, b = d[p], E = w - f[l] - d[m], g = w / 2 - f[l] / 2 + _, S = Ne(b, g, E), T = s;
2104
+ r.modifiersData[n] = (t = {}, t[T] = S, t.centerOffset = S - g, t);
2105
+ }
2106
+ }
2107
+ function ei(e) {
2108
+ var t = e.state, r = e.options, n = r.element, a = n === void 0 ? "[data-popper-arrow]" : n;
2109
+ a != null && (typeof a == "string" && (a = t.elements.popper.querySelector(a), !a) || Rr(t.elements.popper, a) && (t.elements.arrow = a));
2110
+ }
2111
+ const ti = {
2112
+ name: "arrow",
2113
+ enabled: !0,
2114
+ phase: "main",
2115
+ fn: Zo,
2116
+ effect: ei,
2117
+ requires: ["popperOffsets"],
2118
+ requiresIfExists: ["preventOverflow"]
2119
+ };
2120
+ function Ae(e) {
2121
+ return e.split("-")[1];
2122
+ }
2123
+ var ri = {
2124
+ top: "auto",
2125
+ right: "auto",
2126
+ bottom: "auto",
2127
+ left: "auto"
2128
+ };
2129
+ function ni(e, t) {
2130
+ var r = e.x, n = e.y, a = t.devicePixelRatio || 1;
2131
+ return {
2132
+ x: Ce(r * a) / a || 0,
2133
+ y: Ce(n * a) / a || 0
2134
+ };
2135
+ }
2136
+ function dr(e) {
2137
+ var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, c = e.offsets, u = e.position, s = e.gpuAcceleration, i = e.adaptive, l = e.roundOffsets, d = e.isFixed, f = c.x, p = f === void 0 ? 0 : f, m = c.y, h = m === void 0 ? 0 : m, v = typeof l == "function" ? l({
2138
+ x: p,
2139
+ y: h
2140
+ }) : {
2141
+ x: p,
2142
+ y: h
2143
+ };
2144
+ p = v.x, h = v.y;
2145
+ var y = c.hasOwnProperty("x"), w = c.hasOwnProperty("y"), _ = j, b = U, E = window;
2146
+ if (i) {
2147
+ var g = Be(r), S = "clientHeight", T = "clientWidth";
2148
+ if (g === F(r) && (g = fe(r), ne(g).position !== "static" && u === "absolute" && (S = "scrollHeight", T = "scrollWidth")), g = g, a === U || (a === j || a === V) && o === De) {
2149
+ b = q;
2150
+ var x = d && g === E && E.visualViewport ? E.visualViewport.height : (
2151
+ // $FlowFixMe[prop-missing]
2152
+ g[S]
2153
+ );
2154
+ h -= x - n.height, h *= s ? 1 : -1;
2155
+ }
2156
+ if (a === j || (a === U || a === q) && o === De) {
2157
+ _ = V;
2158
+ var P = d && g === E && E.visualViewport ? E.visualViewport.width : (
2159
+ // $FlowFixMe[prop-missing]
2160
+ g[T]
2161
+ );
2162
+ p -= P - n.width, p *= s ? 1 : -1;
2163
+ }
2164
+ }
2165
+ var k = Object.assign({
2166
+ position: u
2167
+ }, i && ri), D = l === !0 ? ni({
2168
+ x: p,
2169
+ y: h
2170
+ }, F(r)) : {
2171
+ x: p,
2172
+ y: h
2173
+ };
2174
+ if (p = D.x, h = D.y, s) {
2175
+ var $;
2176
+ return Object.assign({}, k, ($ = {}, $[b] = w ? "0" : "", $[_] = y ? "0" : "", $.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + h + "px)" : "translate3d(" + p + "px, " + h + "px, 0)", $));
2177
+ }
2178
+ return Object.assign({}, k, (t = {}, t[b] = w ? h + "px" : "", t[_] = y ? p + "px" : "", t.transform = "", t));
2179
+ }
2180
+ function ai(e) {
2181
+ var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, c = o === void 0 ? !0 : o, u = r.roundOffsets, s = u === void 0 ? !0 : u, i = {
2182
+ placement: K(t.placement),
2183
+ variation: Ae(t.placement),
2184
+ popper: t.elements.popper,
2185
+ popperRect: t.rects.popper,
2186
+ gpuAcceleration: a,
2187
+ isFixed: t.options.strategy === "fixed"
2188
+ };
2189
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, dr(Object.assign({}, i, {
2190
+ offsets: t.modifiersData.popperOffsets,
2191
+ position: t.options.strategy,
2192
+ adaptive: c,
2193
+ roundOffsets: s
2194
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, dr(Object.assign({}, i, {
2195
+ offsets: t.modifiersData.arrow,
2196
+ position: "absolute",
2197
+ adaptive: !1,
2198
+ roundOffsets: s
2199
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
2200
+ "data-popper-placement": t.placement
2201
+ });
2202
+ }
2203
+ const oi = {
2204
+ name: "computeStyles",
2205
+ enabled: !0,
2206
+ phase: "beforeWrite",
2207
+ fn: ai,
2208
+ data: {}
2209
+ };
2210
+ var Ye = {
2211
+ passive: !0
2212
+ };
2213
+ function ii(e) {
2214
+ var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, c = n.resize, u = c === void 0 ? !0 : c, s = F(t.elements.popper), i = [].concat(t.scrollParents.reference, t.scrollParents.popper);
2215
+ return o && i.forEach(function(l) {
2216
+ l.addEventListener("scroll", r.update, Ye);
2217
+ }), u && s.addEventListener("resize", r.update, Ye), function() {
2218
+ o && i.forEach(function(l) {
2219
+ l.removeEventListener("scroll", r.update, Ye);
2220
+ }), u && s.removeEventListener("resize", r.update, Ye);
2221
+ };
2222
+ }
2223
+ const si = {
2224
+ name: "eventListeners",
2225
+ enabled: !0,
2226
+ phase: "write",
2227
+ fn: function() {
2228
+ },
2229
+ effect: ii,
2230
+ data: {}
2231
+ };
2232
+ var ui = {
2233
+ left: "right",
2234
+ right: "left",
2235
+ bottom: "top",
2236
+ top: "bottom"
2237
+ };
2238
+ function et(e) {
2239
+ return e.replace(/left|right|bottom|top/g, function(t) {
2240
+ return ui[t];
2241
+ });
2242
+ }
2243
+ var ci = {
2244
+ start: "end",
2245
+ end: "start"
2246
+ };
2247
+ function pr(e) {
2248
+ return e.replace(/start|end/g, function(t) {
2249
+ return ci[t];
2250
+ });
2251
+ }
2252
+ function Wt(e) {
2253
+ var t = F(e), r = t.pageXOffset, n = t.pageYOffset;
2254
+ return {
2255
+ scrollLeft: r,
2256
+ scrollTop: n
2257
+ };
2258
+ }
2259
+ function Ft(e) {
2260
+ return _e(fe(e)).left + Wt(e).scrollLeft;
2261
+ }
2262
+ function li(e, t) {
2263
+ var r = F(e), n = fe(e), a = r.visualViewport, o = n.clientWidth, c = n.clientHeight, u = 0, s = 0;
2264
+ if (a) {
2265
+ o = a.width, c = a.height;
2266
+ var i = Nr();
2267
+ (i || !i && t === "fixed") && (u = a.offsetLeft, s = a.offsetTop);
2268
+ }
2269
+ return {
2270
+ width: o,
2271
+ height: c,
2272
+ x: u + Ft(e),
2273
+ y: s
2274
+ };
2275
+ }
2276
+ function fi(e) {
2277
+ var t, r = fe(e), n = Wt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = me(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), c = me(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), u = -n.scrollLeft + Ft(e), s = -n.scrollTop;
2278
+ return ne(a || r).direction === "rtl" && (u += me(r.clientWidth, a ? a.clientWidth : 0) - o), {
2279
+ width: o,
2280
+ height: c,
2281
+ x: u,
2282
+ y: s
1378
2283
  };
1379
2284
  }
1380
- function Er() {
1381
- return navigator.language;
2285
+ function Bt(e) {
2286
+ var t = ne(e), r = t.overflow, n = t.overflowX, a = t.overflowY;
2287
+ return /auto|scroll|overlay|hidden/.test(r + a + n);
1382
2288
  }
1383
- function _r() {
1384
- return {
1385
- path: window.location.pathname,
1386
- search: window.location.search,
1387
- title: window.document.title,
1388
- url: window.location.href
2289
+ function jr(e) {
2290
+ return ["html", "body", "#document"].indexOf(Q(e)) >= 0 ? e.ownerDocument.body : H(e) && Bt(e) ? e : jr(gt(e));
2291
+ }
2292
+ function Re(e, t) {
2293
+ var r;
2294
+ t === void 0 && (t = []);
2295
+ var n = jr(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = F(n), c = a ? [o].concat(o.visualViewport || [], Bt(n) ? n : []) : n, u = t.concat(c);
2296
+ return a ? u : (
2297
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
2298
+ u.concat(Re(gt(c)))
2299
+ );
2300
+ }
2301
+ function Mt(e) {
2302
+ return Object.assign({}, e, {
2303
+ left: e.x,
2304
+ top: e.y,
2305
+ right: e.x + e.width,
2306
+ bottom: e.y + e.height
2307
+ });
2308
+ }
2309
+ function di(e, t) {
2310
+ var r = _e(e, !1, t === "fixed");
2311
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
2312
+ }
2313
+ function vr(e, t, r) {
2314
+ return t === xr ? Mt(li(e, r)) : ye(t) ? di(t, r) : Mt(fi(fe(e)));
2315
+ }
2316
+ function pi(e) {
2317
+ var t = Re(gt(e)), r = ["absolute", "fixed"].indexOf(ne(e).position) >= 0, n = r && H(e) ? Be(e) : e;
2318
+ return ye(n) ? t.filter(function(a) {
2319
+ return ye(a) && Rr(a, n) && Q(a) !== "body";
2320
+ }) : [];
2321
+ }
2322
+ function vi(e, t, r, n) {
2323
+ var a = t === "clippingParents" ? pi(e) : [].concat(t), o = [].concat(a, [r]), c = o[0], u = o.reduce(function(s, i) {
2324
+ var l = vr(e, i, n);
2325
+ return s.top = me(l.top, s.top), s.right = ut(l.right, s.right), s.bottom = ut(l.bottom, s.bottom), s.left = me(l.left, s.left), s;
2326
+ }, vr(e, c, n));
2327
+ return u.width = u.right - u.left, u.height = u.bottom - u.top, u.x = u.left, u.y = u.top, u;
2328
+ }
2329
+ function Lr(e) {
2330
+ var t = e.reference, r = e.element, n = e.placement, a = n ? K(n) : null, o = n ? Ae(n) : null, c = t.x + t.width / 2 - r.width / 2, u = t.y + t.height / 2 - r.height / 2, s;
2331
+ switch (a) {
2332
+ case U:
2333
+ s = {
2334
+ x: c,
2335
+ y: t.y - r.height
2336
+ };
2337
+ break;
2338
+ case q:
2339
+ s = {
2340
+ x: c,
2341
+ y: t.y + t.height
2342
+ };
2343
+ break;
2344
+ case V:
2345
+ s = {
2346
+ x: t.x + t.width,
2347
+ y: u
2348
+ };
2349
+ break;
2350
+ case j:
2351
+ s = {
2352
+ x: t.x - r.width,
2353
+ y: u
2354
+ };
2355
+ break;
2356
+ default:
2357
+ s = {
2358
+ x: t.x,
2359
+ y: t.y
2360
+ };
2361
+ }
2362
+ var i = a ? Lt(a) : null;
2363
+ if (i != null) {
2364
+ var l = i === "y" ? "height" : "width";
2365
+ switch (o) {
2366
+ case Oe:
2367
+ s[i] = s[i] - (t[l] / 2 - r[l] / 2);
2368
+ break;
2369
+ case De:
2370
+ s[i] = s[i] + (t[l] / 2 - r[l] / 2);
2371
+ break;
2372
+ }
2373
+ }
2374
+ return s;
2375
+ }
2376
+ function Ue(e, t) {
2377
+ t === void 0 && (t = {});
2378
+ var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, c = o === void 0 ? e.strategy : o, u = r.boundary, s = u === void 0 ? Ro : u, i = r.rootBoundary, l = i === void 0 ? xr : i, d = r.elementContext, f = d === void 0 ? Ie : d, p = r.altBoundary, m = p === void 0 ? !1 : p, h = r.padding, v = h === void 0 ? 0 : h, y = Dr(typeof v != "number" ? v : Ur(v, Fe)), w = f === Ie ? Mo : Ie, _ = e.rects.popper, b = e.elements[m ? w : f], E = vi(ye(b) ? b : b.contextElement || fe(e.elements.popper), s, l, c), g = _e(e.elements.reference), S = Lr({
2379
+ reference: g,
2380
+ element: _,
2381
+ strategy: "absolute",
2382
+ placement: a
2383
+ }), T = Mt(Object.assign({}, _, S)), x = f === Ie ? T : g, P = {
2384
+ top: E.top - x.top + y.top,
2385
+ bottom: x.bottom - E.bottom + y.bottom,
2386
+ left: E.left - x.left + y.left,
2387
+ right: x.right - E.right + y.right
2388
+ }, k = e.modifiersData.offset;
2389
+ if (f === Ie && k) {
2390
+ var D = k[a];
2391
+ Object.keys(P).forEach(function($) {
2392
+ var L = [V, q].indexOf($) >= 0 ? 1 : -1, Z = [U, q].indexOf($) >= 0 ? "y" : "x";
2393
+ P[$] += D[Z] * L;
2394
+ });
2395
+ }
2396
+ return P;
2397
+ }
2398
+ function hi(e, t) {
2399
+ t === void 0 && (t = {});
2400
+ var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, c = r.padding, u = r.flipVariations, s = r.allowedAutoPlacements, i = s === void 0 ? $r : s, l = Ae(n), d = l ? u ? lr : lr.filter(function(m) {
2401
+ return Ae(m) === l;
2402
+ }) : Fe, f = d.filter(function(m) {
2403
+ return i.indexOf(m) >= 0;
2404
+ });
2405
+ f.length === 0 && (f = d);
2406
+ var p = f.reduce(function(m, h) {
2407
+ return m[h] = Ue(e, {
2408
+ placement: h,
2409
+ boundary: a,
2410
+ rootBoundary: o,
2411
+ padding: c
2412
+ })[K(h)], m;
2413
+ }, {});
2414
+ return Object.keys(p).sort(function(m, h) {
2415
+ return p[m] - p[h];
2416
+ });
2417
+ }
2418
+ function mi(e) {
2419
+ if (K(e) === Dt)
2420
+ return [];
2421
+ var t = et(e);
2422
+ return [pr(e), t, pr(t)];
2423
+ }
2424
+ function yi(e) {
2425
+ var t = e.state, r = e.options, n = e.name;
2426
+ if (!t.modifiersData[n]._skip) {
2427
+ for (var a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, u = c === void 0 ? !0 : c, s = r.fallbackPlacements, i = r.padding, l = r.boundary, d = r.rootBoundary, f = r.altBoundary, p = r.flipVariations, m = p === void 0 ? !0 : p, h = r.allowedAutoPlacements, v = t.options.placement, y = K(v), w = y === v, _ = s || (w || !m ? [et(v)] : mi(v)), b = [v].concat(_).reduce(function(be, ae) {
2428
+ return be.concat(K(ae) === Dt ? hi(t, {
2429
+ placement: ae,
2430
+ boundary: l,
2431
+ rootBoundary: d,
2432
+ padding: i,
2433
+ flipVariations: m,
2434
+ allowedAutoPlacements: h
2435
+ }) : ae);
2436
+ }, []), E = t.rects.reference, g = t.rects.popper, S = /* @__PURE__ */ new Map(), T = !0, x = b[0], P = 0; P < b.length; P++) {
2437
+ var k = b[P], D = K(k), $ = Ae(k) === Oe, L = [U, q].indexOf(D) >= 0, Z = L ? "width" : "height", N = Ue(t, {
2438
+ placement: k,
2439
+ boundary: l,
2440
+ rootBoundary: d,
2441
+ altBoundary: f,
2442
+ padding: i
2443
+ }), J = L ? $ ? V : j : $ ? q : U;
2444
+ E[Z] > g[Z] && (J = et(J));
2445
+ var He = et(J), de = [];
2446
+ if (o && de.push(N[D] <= 0), u && de.push(N[J] <= 0, N[He] <= 0), de.every(function(be) {
2447
+ return be;
2448
+ })) {
2449
+ x = k, T = !1;
2450
+ break;
2451
+ }
2452
+ S.set(k, de);
2453
+ }
2454
+ if (T)
2455
+ for (var qe = m ? 3 : 1, bt = function(ae) {
2456
+ var ke = b.find(function(Je) {
2457
+ var pe = S.get(Je);
2458
+ if (pe)
2459
+ return pe.slice(0, ae).every(function(wt) {
2460
+ return wt;
2461
+ });
2462
+ });
2463
+ if (ke)
2464
+ return x = ke, "break";
2465
+ }, Pe = qe; Pe > 0; Pe--) {
2466
+ var Ve = bt(Pe);
2467
+ if (Ve === "break")
2468
+ break;
2469
+ }
2470
+ t.placement !== x && (t.modifiersData[n]._skip = !0, t.placement = x, t.reset = !0);
2471
+ }
2472
+ }
2473
+ const gi = {
2474
+ name: "flip",
2475
+ enabled: !0,
2476
+ phase: "main",
2477
+ fn: yi,
2478
+ requiresIfExists: ["offset"],
2479
+ data: {
2480
+ _skip: !1
2481
+ }
2482
+ };
2483
+ function hr(e, t, r) {
2484
+ return r === void 0 && (r = {
2485
+ x: 0,
2486
+ y: 0
2487
+ }), {
2488
+ top: e.top - t.height - r.y,
2489
+ right: e.right - t.width + r.x,
2490
+ bottom: e.bottom - t.height + r.y,
2491
+ left: e.left - t.width - r.x
1389
2492
  };
1390
2493
  }
1391
- function Tr() {
1392
- return Intl.DateTimeFormat().resolvedOptions().timeZone;
2494
+ function mr(e) {
2495
+ return [U, V, q, j].some(function(t) {
2496
+ return e[t] >= 0;
2497
+ });
2498
+ }
2499
+ function bi(e) {
2500
+ var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, c = Ue(t, {
2501
+ elementContext: "reference"
2502
+ }), u = Ue(t, {
2503
+ altBoundary: !0
2504
+ }), s = hr(c, n), i = hr(u, a, o), l = mr(s), d = mr(i);
2505
+ t.modifiersData[r] = {
2506
+ referenceClippingOffsets: s,
2507
+ popperEscapeOffsets: i,
2508
+ isReferenceHidden: l,
2509
+ hasPopperEscaped: d
2510
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
2511
+ "data-popper-reference-hidden": l,
2512
+ "data-popper-escaped": d
2513
+ });
2514
+ }
2515
+ const wi = {
2516
+ name: "hide",
2517
+ enabled: !0,
2518
+ phase: "main",
2519
+ requiresIfExists: ["preventOverflow"],
2520
+ fn: bi
2521
+ };
2522
+ function Si(e, t, r) {
2523
+ var n = K(e), a = [j, U].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
2524
+ placement: e
2525
+ })) : r, c = o[0], u = o[1];
2526
+ return c = c || 0, u = (u || 0) * a, [j, V].indexOf(n) >= 0 ? {
2527
+ x: u,
2528
+ y: c
2529
+ } : {
2530
+ x: c,
2531
+ y: u
2532
+ };
2533
+ }
2534
+ function Ei(e) {
2535
+ var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, c = $r.reduce(function(l, d) {
2536
+ return l[d] = Si(d, t.rects, o), l;
2537
+ }, {}), u = c[t.placement], s = u.x, i = u.y;
2538
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += i), t.modifiersData[n] = c;
2539
+ }
2540
+ const Oi = {
2541
+ name: "offset",
2542
+ enabled: !0,
2543
+ phase: "main",
2544
+ requires: ["popperOffsets"],
2545
+ fn: Ei
2546
+ };
2547
+ function Ci(e) {
2548
+ var t = e.state, r = e.name;
2549
+ t.modifiersData[r] = Lr({
2550
+ reference: t.rects.reference,
2551
+ element: t.rects.popper,
2552
+ strategy: "absolute",
2553
+ placement: t.placement
2554
+ });
2555
+ }
2556
+ const _i = {
2557
+ name: "popperOffsets",
2558
+ enabled: !0,
2559
+ phase: "read",
2560
+ fn: Ci,
2561
+ data: {}
2562
+ };
2563
+ function Ai(e) {
2564
+ return e === "x" ? "y" : "x";
2565
+ }
2566
+ function Ti(e) {
2567
+ var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, c = r.altAxis, u = c === void 0 ? !1 : c, s = r.boundary, i = r.rootBoundary, l = r.altBoundary, d = r.padding, f = r.tether, p = f === void 0 ? !0 : f, m = r.tetherOffset, h = m === void 0 ? 0 : m, v = Ue(t, {
2568
+ boundary: s,
2569
+ rootBoundary: i,
2570
+ padding: d,
2571
+ altBoundary: l
2572
+ }), y = K(t.placement), w = Ae(t.placement), _ = !w, b = Lt(y), E = Ai(b), g = t.modifiersData.popperOffsets, S = t.rects.reference, T = t.rects.popper, x = typeof h == "function" ? h(Object.assign({}, t.rects, {
2573
+ placement: t.placement
2574
+ })) : h, P = typeof x == "number" ? {
2575
+ mainAxis: x,
2576
+ altAxis: x
2577
+ } : Object.assign({
2578
+ mainAxis: 0,
2579
+ altAxis: 0
2580
+ }, x), k = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, D = {
2581
+ x: 0,
2582
+ y: 0
2583
+ };
2584
+ if (g) {
2585
+ if (o) {
2586
+ var $, L = b === "y" ? U : j, Z = b === "y" ? q : V, N = b === "y" ? "height" : "width", J = g[b], He = J + v[L], de = J - v[Z], qe = p ? -T[N] / 2 : 0, bt = w === Oe ? S[N] : T[N], Pe = w === Oe ? -T[N] : -S[N], Ve = t.elements.arrow, be = p && Ve ? jt(Ve) : {
2587
+ width: 0,
2588
+ height: 0
2589
+ }, ae = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Mr(), ke = ae[L], Je = ae[Z], pe = Ne(0, S[N], be[N]), wt = _ ? S[N] / 2 - qe - pe - ke - P.mainAxis : bt - pe - ke - P.mainAxis, Wr = _ ? -S[N] / 2 + qe + pe + Je + P.mainAxis : Pe + pe + Je + P.mainAxis, St = t.elements.arrow && Be(t.elements.arrow), Fr = St ? b === "y" ? St.clientTop || 0 : St.clientLeft || 0 : 0, Ht = ($ = k == null ? void 0 : k[b]) != null ? $ : 0, Br = J + wt - Ht - Fr, Hr = J + Wr - Ht, qt = Ne(p ? ut(He, Br) : He, J, p ? me(de, Hr) : de);
2590
+ g[b] = qt, D[b] = qt - J;
2591
+ }
2592
+ if (u) {
2593
+ var Vt, qr = b === "x" ? U : j, Vr = b === "x" ? q : V, ve = g[E], ze = E === "y" ? "height" : "width", Jt = ve + v[qr], zt = ve - v[Vr], Et = [U, j].indexOf(y) !== -1, Gt = (Vt = k == null ? void 0 : k[E]) != null ? Vt : 0, Xt = Et ? Jt : ve - S[ze] - T[ze] - Gt + P.altAxis, Yt = Et ? ve + S[ze] + T[ze] - Gt - P.altAxis : zt, Kt = p && Et ? Ko(Xt, ve, Yt) : Ne(p ? Xt : Jt, ve, p ? Yt : zt);
2594
+ g[E] = Kt, D[E] = Kt - ve;
2595
+ }
2596
+ t.modifiersData[n] = D;
2597
+ }
1393
2598
  }
1394
- function Pr() {
2599
+ const Pi = {
2600
+ name: "preventOverflow",
2601
+ enabled: !0,
2602
+ phase: "main",
2603
+ fn: Ti,
2604
+ requiresIfExists: ["offset"]
2605
+ };
2606
+ function ki(e) {
1395
2607
  return {
1396
- displayMetrics: Cr(),
1397
- library: Rr(),
1398
- locale: Er(),
1399
- page: _r(),
1400
- timezone: Tr()
2608
+ scrollLeft: e.scrollLeft,
2609
+ scrollTop: e.scrollTop
1401
2610
  };
1402
2611
  }
1403
- function it(s) {
1404
- s === void 0 && (s = {});
1405
- var o = {};
1406
- return Object.keys(s).forEach(function(r) {
1407
- var t;
1408
- if (r.startsWith("_")) {
1409
- o[r.substring(1)] = s[r];
1410
- return;
1411
- }
1412
- o.data = N((t = {}, t[r] = s[r], t), o.data);
1413
- }), o;
2612
+ function Ii(e) {
2613
+ return e === F(e) || !H(e) ? Wt(e) : ki(e);
2614
+ }
2615
+ function xi(e) {
2616
+ var t = e.getBoundingClientRect(), r = Ce(t.width) / e.offsetWidth || 1, n = Ce(t.height) / e.offsetHeight || 1;
2617
+ return r !== 1 || n !== 1;
2618
+ }
2619
+ function $i(e, t, r) {
2620
+ r === void 0 && (r = !1);
2621
+ var n = H(t), a = H(t) && xi(t), o = fe(t), c = _e(e, a, r), u = {
2622
+ scrollLeft: 0,
2623
+ scrollTop: 0
2624
+ }, s = {
2625
+ x: 0,
2626
+ y: 0
2627
+ };
2628
+ return (n || !n && !r) && ((Q(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2629
+ Bt(o)) && (u = Ii(t)), H(t) ? (s = _e(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : o && (s.x = Ft(o))), {
2630
+ x: c.left + u.scrollLeft - s.x,
2631
+ y: c.top + u.scrollTop - s.y,
2632
+ width: c.width,
2633
+ height: c.height
2634
+ };
1414
2635
  }
1415
- var Sr = /* @__PURE__ */ function() {
1416
- function s(r) {
1417
- this.options = {}, this.callback = r;
2636
+ function Ni(e) {
2637
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
2638
+ e.forEach(function(o) {
2639
+ t.set(o.name, o);
2640
+ });
2641
+ function a(o) {
2642
+ r.add(o.name);
2643
+ var c = [].concat(o.requires || [], o.requiresIfExists || []);
2644
+ c.forEach(function(u) {
2645
+ if (!r.has(u)) {
2646
+ var s = t.get(u);
2647
+ s && a(s);
2648
+ }
2649
+ }), n.push(o);
1418
2650
  }
1419
- var o = s.prototype;
1420
- return o.limit = function(t) {
1421
- return this.options.limit = t, this;
1422
- }, o.filter = function(t) {
1423
- return this.options.filter = it(t), this;
1424
- }, o.order = function(t) {
1425
- return this.options.order = t, this;
1426
- }, o.language = function(t) {
1427
- return this.options.language = t, this;
1428
- }, o.fields = function(t) {
1429
- return this.options.fields = t, this;
1430
- }, o.include = function(t) {
1431
- return this.options.include = t, this;
1432
- }, o.exclude = function(t) {
1433
- return this.options.exclude = t, this;
1434
- }, o.preview = function(t) {
1435
- return t === void 0 && (t = !0), this.options.preview = t, this;
1436
- }, o.all = function(t) {
1437
- return this.options = N({}, this.options, t, {
1438
- returnType: "all"
1439
- }), this.callback(this.options);
1440
- }, o.one = /* @__PURE__ */ function() {
1441
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1442
- var p;
1443
- return _().wrap(function(l) {
1444
- for (; ; )
1445
- switch (l.prev = l.next) {
1446
- case 0:
1447
- return this.options = N({}, this.options, d, {
1448
- returnType: "one"
1449
- }), l.next = 3, this.callback(this.options);
1450
- case 3:
1451
- return p = l.sent, l.abrupt("return", Array.isArray(p) ? p[0] : null);
1452
- case 5:
1453
- case "end":
1454
- return l.stop();
1455
- }
1456
- }, a, this);
2651
+ return e.forEach(function(o) {
2652
+ r.has(o.name) || a(o);
2653
+ }), n;
2654
+ }
2655
+ function Ri(e) {
2656
+ var t = Ni(e);
2657
+ return Vo.reduce(function(r, n) {
2658
+ return r.concat(t.filter(function(a) {
2659
+ return a.phase === n;
1457
2660
  }));
1458
- function t(a) {
1459
- return r.apply(this, arguments);
1460
- }
1461
- return t;
1462
- }(), s;
1463
- }(), De = "dashx-sdk";
1464
- function je(s) {
1465
- var o = window.localStorage.getItem(De);
1466
- if (!o)
1467
- return null;
1468
- var r = JSON.parse(o);
1469
- return r[s];
1470
- }
1471
- function $e(s, o) {
1472
- var r = window.localStorage.getItem(De), t = r ? JSON.parse(r) : {};
1473
- t[s] = o, window.localStorage.setItem(De, JSON.stringify(t));
1474
- }
1475
- var kr = ["custom"], Ar = 5, Or = 3e3, D = /* @__PURE__ */ Le("accountAnonymousUid"), k = /* @__PURE__ */ Le("accountUid"), G = /* @__PURE__ */ Le("identityToken"), Ir = /* @__PURE__ */ function() {
1476
- function s(r) {
1477
- var t = r.publicKey, a = r.baseUri, d = a === void 0 ? "https://api.dashx.com/graphql" : a, p = r.targetEnvironment;
1478
- Object.defineProperty(this, D, {
1479
- writable: !0,
1480
- value: void 0
1481
- }), Object.defineProperty(this, k, {
1482
- writable: !0,
1483
- value: void 0
1484
- }), Object.defineProperty(this, G, {
1485
- writable: !0,
1486
- value: void 0
1487
- }), S(this, k)[k] = null, S(this, G)[G] = null, this.baseUri = d, this.publicKey = t, this.targetEnvironment = p, this.context = Pr(), this.loadIdentity();
1488
- }
1489
- var o = s.prototype;
1490
- return o.makeHttpRequest = /* @__PURE__ */ function() {
1491
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d, p) {
1492
- var c;
1493
- return _().wrap(function(n) {
1494
- for (; ; )
1495
- switch (n.prev = n.next) {
1496
- case 0:
1497
- return n.next = 2, et(this.baseUri, {
1498
- method: "POST",
1499
- headers: N({
1500
- "Content-Type": "application/json",
1501
- "X-Public-Key": this.publicKey
1502
- }, this.targetEnvironment ? {
1503
- "X-Target-Environment": this.targetEnvironment
1504
- } : {}, S(this, G)[G] ? {
1505
- "X-Identity-Token": S(this, G)[G]
1506
- } : {}),
1507
- body: JSON.stringify({
1508
- query: d,
1509
- variables: p
1510
- })
1511
- }).then(function(m) {
1512
- return m.json();
1513
- });
1514
- case 2:
1515
- if (c = n.sent, !c.data) {
1516
- n.next = 5;
1517
- break;
2661
+ }, []);
2662
+ }
2663
+ function Mi(e) {
2664
+ var t;
2665
+ return function() {
2666
+ return t || (t = new Promise(function(r) {
2667
+ Promise.resolve().then(function() {
2668
+ t = void 0, r(e());
2669
+ });
2670
+ })), t;
2671
+ };
2672
+ }
2673
+ function Di(e) {
2674
+ var t = e.reduce(function(r, n) {
2675
+ var a = r[n.name];
2676
+ return r[n.name] = a ? Object.assign({}, a, n, {
2677
+ options: Object.assign({}, a.options, n.options),
2678
+ data: Object.assign({}, a.data, n.data)
2679
+ }) : n, r;
2680
+ }, {});
2681
+ return Object.keys(t).map(function(r) {
2682
+ return t[r];
2683
+ });
2684
+ }
2685
+ var yr = {
2686
+ placement: "bottom",
2687
+ modifiers: [],
2688
+ strategy: "absolute"
2689
+ };
2690
+ function gr() {
2691
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
2692
+ t[r] = arguments[r];
2693
+ return !t.some(function(n) {
2694
+ return !(n && typeof n.getBoundingClientRect == "function");
2695
+ });
2696
+ }
2697
+ function Ui(e) {
2698
+ e === void 0 && (e = {});
2699
+ var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? yr : a;
2700
+ return function(u, s, i) {
2701
+ i === void 0 && (i = o);
2702
+ var l = {
2703
+ placement: "bottom",
2704
+ orderedModifiers: [],
2705
+ options: Object.assign({}, yr, o),
2706
+ modifiersData: {},
2707
+ elements: {
2708
+ reference: u,
2709
+ popper: s
2710
+ },
2711
+ attributes: {},
2712
+ styles: {}
2713
+ }, d = [], f = !1, p = {
2714
+ state: l,
2715
+ setOptions: function(y) {
2716
+ var w = typeof y == "function" ? y(l.options) : y;
2717
+ h(), l.options = Object.assign({}, o, l.options, w), l.scrollParents = {
2718
+ reference: ye(u) ? Re(u) : u.contextElement ? Re(u.contextElement) : [],
2719
+ popper: Re(s)
2720
+ };
2721
+ var _ = Ri(Di([].concat(n, l.options.modifiers)));
2722
+ return l.orderedModifiers = _.filter(function(b) {
2723
+ return b.enabled;
2724
+ }), m(), p.update();
2725
+ },
2726
+ // Sync update – it will always be executed, even if not necessary. This
2727
+ // is useful for low frequency updates where sync behavior simplifies the
2728
+ // logic.
2729
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
2730
+ // prefer the async Popper#update method
2731
+ forceUpdate: function() {
2732
+ if (!f) {
2733
+ var y = l.elements, w = y.reference, _ = y.popper;
2734
+ if (gr(w, _)) {
2735
+ l.rects = {
2736
+ reference: $i(w, Be(_), l.options.strategy === "fixed"),
2737
+ popper: jt(_)
2738
+ }, l.reset = !1, l.placement = l.options.placement, l.orderedModifiers.forEach(function(P) {
2739
+ return l.modifiersData[P.name] = Object.assign({}, P.data);
2740
+ });
2741
+ for (var b = 0; b < l.orderedModifiers.length; b++) {
2742
+ if (l.reset === !0) {
2743
+ l.reset = !1, b = -1;
2744
+ continue;
1518
2745
  }
1519
- return n.abrupt("return", Promise.resolve(c.data));
1520
- case 5:
1521
- return n.abrupt("return", Promise.reject(c.errors));
1522
- case 6:
1523
- case "end":
1524
- return n.stop();
2746
+ var E = l.orderedModifiers[b], g = E.fn, S = E.options, T = S === void 0 ? {} : S, x = E.name;
2747
+ typeof g == "function" && (l = g({
2748
+ state: l,
2749
+ options: T,
2750
+ name: x,
2751
+ instance: p
2752
+ }) || l);
2753
+ }
1525
2754
  }
1526
- }, a, this);
1527
- }));
1528
- function t(a, d) {
1529
- return r.apply(this, arguments);
1530
- }
1531
- return t;
1532
- }(), o.loadIdentity = function() {
1533
- this.accountAnonymousUid = je("accountAnonymousUid") || Ie(), this.accountUid = je("accountUid") || null, this.identityToken = je("identityToken") || null;
1534
- }, o.identify = function(t) {
1535
- if (typeof t == "string") {
1536
- this.accountUid = t;
1537
- return;
1538
- }
1539
- this.accountUid = t == null ? void 0 : t.uid;
1540
- var a = N({
1541
- uid: t == null ? void 0 : t.uid,
1542
- anonymousUid: S(this, D)[D]
1543
- }, t);
1544
- return this.makeHttpRequest(Vt, {
1545
- input: a
1546
- }).then(function(d) {
1547
- return d == null ? void 0 : d.identifyAccount;
1548
- });
1549
- }, o.setIdentity = function(t, a) {
1550
- this.accountUid = t, this.identityToken = a;
1551
- }, o.setAnonymousIdentity = function(t) {
1552
- this.accountAnonymousUid = t;
1553
- }, o.reset = function() {
1554
- this.accountAnonymousUid = Ie(), this.accountUid = null, this.identityToken = null;
1555
- }, o.track = function(t, a) {
1556
- var d = {
1557
- event: t,
1558
- data: a,
1559
- accountUid: S(this, k)[k],
1560
- accountAnonymousUid: S(this, D)[D]
1561
- };
1562
- return this.makeHttpRequest(Yt, {
1563
- input: d
1564
- });
1565
- }, o.addContent = function(t, a) {
1566
- var d, p;
1567
- if (t.includes("/")) {
1568
- var c = t.split("/");
1569
- p = c[0], d = c[1];
1570
- } else
1571
- p = t;
1572
- var l = {
1573
- content: d,
1574
- contentType: p,
1575
- data: a
1576
- };
1577
- return this.makeHttpRequest(Gt, {
1578
- input: l
1579
- });
1580
- }, o.editContent = function(t, a) {
1581
- var d, p;
1582
- if (t.includes("/")) {
1583
- var c = t.split("/");
1584
- p = c[0], d = c[1];
1585
- } else
1586
- p = t;
1587
- var l = {
1588
- content: d,
1589
- contentType: p,
1590
- data: a
2755
+ }
2756
+ },
2757
+ // Async and optimistically optimized update – it will not be executed if
2758
+ // not necessary (debounced to run at most once-per-tick)
2759
+ update: Mi(function() {
2760
+ return new Promise(function(v) {
2761
+ p.forceUpdate(), v(l);
2762
+ });
2763
+ }),
2764
+ destroy: function() {
2765
+ h(), f = !0;
2766
+ }
1591
2767
  };
1592
- return this.makeHttpRequest(Xt, {
1593
- input: l
2768
+ if (!gr(u, s))
2769
+ return p;
2770
+ p.setOptions(i).then(function(v) {
2771
+ !f && i.onFirstUpdate && i.onFirstUpdate(v);
1594
2772
  });
1595
- }, o.searchContent = function(t, a) {
1596
- var d = this;
1597
- if (!a)
1598
- return new Sr(function(l) {
1599
- return d.makeHttpRequest(rt, {
1600
- input: N({}, l, {
1601
- contentType: t
1602
- })
1603
- }).then(function(n) {
1604
- return n == null ? void 0 : n.searchContent;
1605
- });
2773
+ function m() {
2774
+ l.orderedModifiers.forEach(function(v) {
2775
+ var y = v.name, w = v.options, _ = w === void 0 ? {} : w, b = v.effect;
2776
+ if (typeof b == "function") {
2777
+ var E = b({
2778
+ state: l,
2779
+ name: y,
2780
+ instance: p,
2781
+ options: _
2782
+ }), g = function() {
2783
+ };
2784
+ d.push(E || g);
2785
+ }
1606
2786
  });
1607
- var p = it(a.filter), c = this.makeHttpRequest(rt, {
1608
- input: N({}, a, {
1609
- contentType: t,
1610
- filter: p
1611
- })
1612
- }).then(function(l) {
1613
- return l == null ? void 0 : l.searchContent;
1614
- });
1615
- return a.returnType === "all" ? c : c.then(function(l) {
1616
- return Array.isArray(l) ? l[0] : null;
1617
- });
1618
- }, o.fetchContent = /* @__PURE__ */ function() {
1619
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d, p) {
1620
- var c, l, n, m, b;
1621
- return _().wrap(function(O) {
1622
- for (; ; )
1623
- switch (O.prev = O.next) {
1624
- case 0:
1625
- if (d.includes("/")) {
1626
- O.next = 2;
1627
- break;
1628
- }
1629
- throw new Error("URN must be of form: {contentType}/{content}");
1630
- case 2:
1631
- return c = d.split("/"), l = c[0], n = c[1], m = N({
1632
- content: n,
1633
- contentType: l
1634
- }, p), O.next = 6, this.makeHttpRequest(Kt, {
1635
- input: m
1636
- });
1637
- case 6:
1638
- return b = O.sent, O.abrupt("return", b == null ? void 0 : b.fetchContent);
1639
- case 8:
1640
- case "end":
1641
- return O.stop();
1642
- }
1643
- }, a, this);
1644
- }));
1645
- function t(a, d) {
1646
- return r.apply(this, arguments);
1647
- }
1648
- return t;
1649
- }(), o.addItemToCart = /* @__PURE__ */ function() {
1650
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1651
- var p, c, l, n, m;
1652
- return _().wrap(function(R) {
1653
- for (; ; )
1654
- switch (R.prev = R.next) {
1655
- case 0:
1656
- return p = d.custom, c = p === void 0 ? {} : p, l = /* @__PURE__ */ Ht(d, kr), n = N({
1657
- custom: c
1658
- }, l, {
1659
- accountUid: S(this, k)[k],
1660
- accountAnonymousUid: S(this, D)[D]
1661
- }), R.next = 4, this.makeHttpRequest(zt, {
1662
- input: n
1663
- });
1664
- case 4:
1665
- return m = R.sent, R.abrupt("return", m == null ? void 0 : m.addItemToCart);
1666
- case 6:
1667
- case "end":
1668
- return R.stop();
1669
- }
1670
- }, a, this);
1671
- }));
1672
- function t(a) {
1673
- return r.apply(this, arguments);
1674
- }
1675
- return t;
1676
- }(), o.applyCouponToCart = /* @__PURE__ */ function() {
1677
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1678
- var p, c;
1679
- return _().wrap(function(n) {
1680
- for (; ; )
1681
- switch (n.prev = n.next) {
1682
- case 0:
1683
- return p = N({}, d, {
1684
- accountUid: S(this, k)[k],
1685
- accountAnonymousUid: S(this, D)[D]
1686
- }), n.next = 3, this.makeHttpRequest(Zt, {
1687
- input: p
1688
- });
1689
- case 3:
1690
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.applyCouponToCart);
1691
- case 5:
1692
- case "end":
1693
- return n.stop();
1694
- }
1695
- }, a, this);
1696
- }));
1697
- function t(a) {
1698
- return r.apply(this, arguments);
1699
2787
  }
1700
- return t;
1701
- }(), o.removeCouponFromCart = /* @__PURE__ */ function() {
1702
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1703
- var p, c;
1704
- return _().wrap(function(n) {
1705
- for (; ; )
1706
- switch (n.prev = n.next) {
1707
- case 0:
1708
- return p = N({}, d, {
1709
- accountUid: S(this, k)[k],
1710
- accountAnonymousUid: S(this, D)[D]
1711
- }), n.next = 3, this.makeHttpRequest(Qt, {
1712
- input: p
1713
- });
1714
- case 3:
1715
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.removeCouponFromCart);
1716
- case 5:
1717
- case "end":
1718
- return n.stop();
1719
- }
1720
- }, a, this);
1721
- }));
1722
- function t(a) {
1723
- return r.apply(this, arguments);
1724
- }
1725
- return t;
1726
- }(), o.fetchCart = /* @__PURE__ */ function() {
1727
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1728
- var p, c;
1729
- return _().wrap(function(n) {
1730
- for (; ; )
1731
- switch (n.prev = n.next) {
1732
- case 0:
1733
- return p = N({}, d, {
1734
- accountUid: S(this, k)[k],
1735
- accountAnonymousUid: S(this, D)[D]
1736
- }), n.next = 3, this.makeHttpRequest(er, {
1737
- input: p
1738
- });
1739
- case 3:
1740
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.fetchCart);
1741
- case 5:
1742
- case "end":
1743
- return n.stop();
1744
- }
1745
- }, a, this);
1746
- }));
1747
- function t(a) {
1748
- return r.apply(this, arguments);
2788
+ function h() {
2789
+ d.forEach(function(v) {
2790
+ return v();
2791
+ }), d = [];
1749
2792
  }
1750
- return t;
1751
- }(), o.transferCart = /* @__PURE__ */ function() {
1752
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1753
- var p, c;
1754
- return _().wrap(function(n) {
1755
- for (; ; )
1756
- switch (n.prev = n.next) {
1757
- case 0:
1758
- return p = N({}, d, {
1759
- accountUid: S(this, k)[k],
1760
- accountAnonymousUid: S(this, D)[D]
1761
- }), n.next = 3, this.makeHttpRequest(tr, {
1762
- input: p
1763
- });
1764
- case 3:
1765
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.transferCart);
1766
- case 5:
1767
- case "end":
1768
- return n.stop();
1769
- }
1770
- }, a, this);
1771
- }));
1772
- function t(a) {
1773
- return r.apply(this, arguments);
2793
+ return p;
2794
+ };
2795
+ }
2796
+ var ji = [si, _i, oi, Go, Oi, gi, Pi, ti, wi], Li = /* @__PURE__ */ Ui({
2797
+ defaultModifiers: ji
2798
+ }), Wi = typeof Element < "u", Fi = typeof Map == "function", Bi = typeof Set == "function", Hi = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
2799
+ function tt(e, t) {
2800
+ if (e === t)
2801
+ return !0;
2802
+ if (e && t && typeof e == "object" && typeof t == "object") {
2803
+ if (e.constructor !== t.constructor)
2804
+ return !1;
2805
+ var r, n, a;
2806
+ if (Array.isArray(e)) {
2807
+ if (r = e.length, r != t.length)
2808
+ return !1;
2809
+ for (n = r; n-- !== 0; )
2810
+ if (!tt(e[n], t[n]))
2811
+ return !1;
2812
+ return !0;
2813
+ }
2814
+ var o;
2815
+ if (Fi && e instanceof Map && t instanceof Map) {
2816
+ if (e.size !== t.size)
2817
+ return !1;
2818
+ for (o = e.entries(); !(n = o.next()).done; )
2819
+ if (!t.has(n.value[0]))
2820
+ return !1;
2821
+ for (o = e.entries(); !(n = o.next()).done; )
2822
+ if (!tt(n.value[1], t.get(n.value[0])))
2823
+ return !1;
2824
+ return !0;
1774
2825
  }
1775
- return t;
1776
- }(), o.fetchStoredPreferences = /* @__PURE__ */ function() {
1777
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a() {
1778
- var d, p;
1779
- return _().wrap(function(l) {
1780
- for (; ; )
1781
- switch (l.prev = l.next) {
1782
- case 0:
1783
- return d = {
1784
- accountUid: S(this, k)[k]
1785
- }, l.next = 3, this.makeHttpRequest(rr, {
1786
- input: d
1787
- });
1788
- case 3:
1789
- return p = l.sent, l.abrupt("return", p == null ? void 0 : p.fetchStoredPreferences.preferenceData);
1790
- case 5:
1791
- case "end":
1792
- return l.stop();
1793
- }
1794
- }, a, this);
1795
- }));
1796
- function t() {
1797
- return r.apply(this, arguments);
2826
+ if (Bi && e instanceof Set && t instanceof Set) {
2827
+ if (e.size !== t.size)
2828
+ return !1;
2829
+ for (o = e.entries(); !(n = o.next()).done; )
2830
+ if (!t.has(n.value[0]))
2831
+ return !1;
2832
+ return !0;
1798
2833
  }
1799
- return t;
1800
- }(), o.saveStoredPreferences = /* @__PURE__ */ function() {
1801
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1802
- var p, c;
1803
- return _().wrap(function(n) {
1804
- for (; ; )
1805
- switch (n.prev = n.next) {
1806
- case 0:
1807
- return p = {
1808
- accountUid: S(this, k)[k],
1809
- preferenceData: d
1810
- }, n.next = 3, this.makeHttpRequest(nr, {
1811
- input: p
1812
- });
1813
- case 3:
1814
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.saveStoredPreferences);
1815
- case 5:
1816
- case "end":
1817
- return n.stop();
1818
- }
1819
- }, a, this);
1820
- }));
1821
- function t(a) {
1822
- return r.apply(this, arguments);
2834
+ if (Hi && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
2835
+ if (r = e.length, r != t.length)
2836
+ return !1;
2837
+ for (n = r; n-- !== 0; )
2838
+ if (e[n] !== t[n])
2839
+ return !1;
2840
+ return !0;
2841
+ }
2842
+ if (e.constructor === RegExp)
2843
+ return e.source === t.source && e.flags === t.flags;
2844
+ if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function")
2845
+ return e.valueOf() === t.valueOf();
2846
+ if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function")
2847
+ return e.toString() === t.toString();
2848
+ if (a = Object.keys(e), r = a.length, r !== Object.keys(t).length)
2849
+ return !1;
2850
+ for (n = r; n-- !== 0; )
2851
+ if (!Object.prototype.hasOwnProperty.call(t, a[n]))
2852
+ return !1;
2853
+ if (Wi && e instanceof Element)
2854
+ return !1;
2855
+ for (n = r; n-- !== 0; )
2856
+ if (!((a[n] === "_owner" || a[n] === "__v" || a[n] === "__o") && e.$$typeof) && !tt(e[a[n]], t[a[n]]))
2857
+ return !1;
2858
+ return !0;
2859
+ }
2860
+ return e !== e && t !== t;
2861
+ }
2862
+ var qi = function(t, r) {
2863
+ try {
2864
+ return tt(t, r);
2865
+ } catch (n) {
2866
+ if ((n.message || "").match(/stack|recursion/i))
2867
+ return console.warn("react-fast-compare cannot handle circular refs"), !1;
2868
+ throw n;
2869
+ }
2870
+ };
2871
+ const Vi = /* @__PURE__ */ Tr(qi);
2872
+ var Ji = [], zi = function(t, r, n) {
2873
+ n === void 0 && (n = {});
2874
+ var a = C.useRef(null), o = {
2875
+ onFirstUpdate: n.onFirstUpdate,
2876
+ placement: n.placement || "bottom",
2877
+ strategy: n.strategy || "absolute",
2878
+ modifiers: n.modifiers || Ji
2879
+ }, c = C.useState({
2880
+ styles: {
2881
+ popper: {
2882
+ position: o.strategy,
2883
+ left: "0",
2884
+ top: "0"
2885
+ },
2886
+ arrow: {
2887
+ position: "absolute"
2888
+ }
2889
+ },
2890
+ attributes: {}
2891
+ }), u = c[0], s = c[1], i = C.useMemo(function() {
2892
+ return {
2893
+ name: "updateState",
2894
+ enabled: !0,
2895
+ phase: "write",
2896
+ fn: function(p) {
2897
+ var m = p.state, h = Object.keys(m.elements);
2898
+ Jr.flushSync(function() {
2899
+ s({
2900
+ styles: ur(h.map(function(v) {
2901
+ return [v, m.styles[v] || {}];
2902
+ })),
2903
+ attributes: ur(h.map(function(v) {
2904
+ return [v, m.attributes[v]];
2905
+ }))
2906
+ });
2907
+ });
2908
+ },
2909
+ requires: ["computeStyles"]
2910
+ };
2911
+ }, []), l = C.useMemo(function() {
2912
+ var f = {
2913
+ onFirstUpdate: o.onFirstUpdate,
2914
+ placement: o.placement,
2915
+ strategy: o.strategy,
2916
+ modifiers: [].concat(o.modifiers, [i, {
2917
+ name: "applyStyles",
2918
+ enabled: !1
2919
+ }])
2920
+ };
2921
+ return Vi(a.current, f) ? a.current || f : (a.current = f, f);
2922
+ }, [o.onFirstUpdate, o.placement, o.strategy, o.modifiers, i]), d = C.useRef();
2923
+ return cr(function() {
2924
+ d.current && d.current.setOptions(l);
2925
+ }, [l]), cr(function() {
2926
+ if (!(t == null || r == null)) {
2927
+ var f = n.createPopper || Li, p = f(t, r, l);
2928
+ return d.current = p, function() {
2929
+ p.destroy(), d.current = null;
2930
+ };
1823
2931
  }
1824
- return t;
1825
- }(), o.fetchContacts = /* @__PURE__ */ function() {
1826
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a() {
1827
- var d, p;
1828
- return _().wrap(function(l) {
1829
- for (; ; )
1830
- switch (l.prev = l.next) {
1831
- case 0:
1832
- return d = {
1833
- uid: S(this, k)[k]
1834
- }, l.next = 3, this.makeHttpRequest(ar, {
1835
- input: d
1836
- });
1837
- case 3:
1838
- return p = l.sent, l.abrupt("return", p == null ? void 0 : p.fetchContacts.contacts);
1839
- case 5:
1840
- case "end":
1841
- return l.stop();
1842
- }
1843
- }, a, this);
1844
- }));
1845
- function t() {
1846
- return r.apply(this, arguments);
2932
+ }, [t, r, n.createPopper]), {
2933
+ state: d.current ? d.current.state : null,
2934
+ styles: u.styles,
2935
+ attributes: u.attributes,
2936
+ update: d.current ? d.current.update : null,
2937
+ forceUpdate: d.current ? d.current.forceUpdate : null
2938
+ };
2939
+ };
2940
+ let Gi = new Proxy(
2941
+ {},
2942
+ {
2943
+ get: (e, t) => {
2944
+ if (t === "__esModule")
2945
+ return {};
2946
+ throw new Error(
2947
+ `You're trying to import \`@heroicons/react/solid/${t}\` from Heroicons v1 but have installed Heroicons v2. Install \`@heroicons/react@v1\` to resolve this error.`
2948
+ );
1847
2949
  }
1848
- return t;
1849
- }(), o.saveContacts = /* @__PURE__ */ function() {
1850
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1851
- var p, c;
1852
- return _().wrap(function(n) {
1853
- for (; ; )
1854
- switch (n.prev = n.next) {
1855
- case 0:
1856
- return p = {
1857
- uid: S(this, k)[k],
1858
- contacts: d
1859
- }, n.next = 3, this.makeHttpRequest(ir, {
1860
- input: p
1861
- });
1862
- case 3:
1863
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.saveContacts);
1864
- case 5:
1865
- case "end":
1866
- return n.stop();
1867
- }
1868
- }, a, this);
1869
- }));
1870
- function t(a) {
1871
- return r.apply(this, arguments);
2950
+ }
2951
+ );
2952
+ var Xi = Gi;
2953
+ const rs = () => {
2954
+ let { client: e } = Yn();
2955
+ const [t, r] = Se(null), [n, a] = Se(null), { styles: o, attributes: c } = zi(t, n, {
2956
+ placement: "bottom-end"
2957
+ }), [u, s] = Se(!1), [i, l] = Se(!1);
2958
+ let { sendJsonMessage: d } = xo("ws://localhost:8082/websocket", {
2959
+ queryParams: {
2960
+ publicKey: e.publicKey,
2961
+ ...e.targetEnvironment && { targetEnvironment: e.targetEnvironment }
2962
+ },
2963
+ shouldReconnect: (f) => !0,
2964
+ onError: (f) => console.error({ errorEvent: f }),
2965
+ onClose: (f) => console.log({ closeEvent: f }),
2966
+ onMessage: (f) => {
2967
+ let p = {};
2968
+ try {
2969
+ p = JSON.parse(f.data);
2970
+ } catch (m) {
2971
+ console.error(m);
2972
+ }
2973
+ switch (p == null ? void 0 : p.type) {
2974
+ case xe.SUBSCRIBE:
2975
+ break;
2976
+ case xe.IN_APP_NOTIFICATION:
2977
+ e.trackNotification({ id: p.data.notificationId, status: "DELIVERED" }), Fa(p.data.body);
2978
+ break;
2979
+ case xe.INVALID:
2980
+ console.error(p.data.message);
2981
+ break;
2982
+ default:
2983
+ console.error("Unknown message type");
2984
+ }
2985
+ },
2986
+ onOpen: (f) => {
2987
+ let p = {
2988
+ type: xe.SUBSCRIBE,
2989
+ data: {
2990
+ accountUid: e.accountUid
2991
+ // accountUid should exist by this point
2992
+ }
2993
+ };
2994
+ d(p);
1872
2995
  }
1873
- return t;
1874
- }(), o.upload = /* @__PURE__ */ function() {
1875
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1876
- var p, c, l, n, m = this, b, R, O, z, Y, Z, F, I, ee;
1877
- return _().wrap(function(X) {
1878
- for (; ; )
1879
- switch (X.prev = X.next) {
1880
- case 0:
1881
- return b = d.file, R = d.attribute, O = d.resource, z = {
1882
- name: b.name,
1883
- size: b.size,
1884
- mimeType: b.type,
1885
- attribute: R,
1886
- resource: O,
1887
- targetEnvironment: this.targetEnvironment
1888
- }, X.next = 4, this.makeHttpRequest(or, {
1889
- input: z
1890
- });
1891
- case 4:
1892
- if (Y = X.sent, Z = Y == null || (p = Y.prepareAsset) == null ? void 0 : p.id, F = Y == null || (c = Y.prepareAsset) == null || (l = c.data) == null || (n = l.upload) == null ? void 0 : n.url, !(!F || !Z)) {
1893
- X.next = 9;
1894
- break;
1895
- }
1896
- throw new Error("Something went wrong");
1897
- case 9:
1898
- return X.next = 11, et(F, {
1899
- method: "PUT",
1900
- body: b,
1901
- headers: {
1902
- "Content-Type": b.type,
1903
- "x-goog-meta-origin-id": Z
1904
- }
1905
- });
1906
- case 11:
1907
- return I = Ar, ee = /* @__PURE__ */ function() {
1908
- var ae = B(/* @__PURE__ */ _().mark(function re() {
1909
- var te, ne;
1910
- return _().wrap(function(i) {
1911
- for (; ; )
1912
- switch (i.prev = i.next) {
1913
- case 0:
1914
- return i.next = 2, m.getAsset({
1915
- id: Z
1916
- });
1917
- case 2:
1918
- if (te = i.sent, ne = te == null ? void 0 : te.uploadStatus, ne !== "UPLOADED") {
1919
- i.next = 6;
1920
- break;
1921
- }
1922
- return i.abrupt("return", Promise.resolve(te));
1923
- case 6:
1924
- return i.next = 8, new Promise(function(y) {
1925
- return setTimeout(y, Or);
1926
- });
1927
- case 8:
1928
- if (I--, I) {
1929
- i.next = 11;
1930
- break;
1931
- }
1932
- return i.abrupt("return", Promise.reject("Something went wrong."));
1933
- case 11:
1934
- return i.abrupt("return", ee());
1935
- case 12:
1936
- case "end":
1937
- return i.stop();
1938
- }
1939
- }, re);
1940
- }));
1941
- return function() {
1942
- return ae.apply(this, arguments);
1943
- };
1944
- }(), X.abrupt("return", ee());
1945
- case 14:
1946
- case "end":
1947
- return X.stop();
1948
- }
1949
- }, a, this);
1950
- }));
1951
- function t(a) {
1952
- return r.apply(this, arguments);
2996
+ }, i);
2997
+ return ct(() => {
2998
+ l(!0);
2999
+ }, []), /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement(
3000
+ No,
3001
+ {
3002
+ "aria-hidden": "true",
3003
+ className: "h-6 w-6",
3004
+ onClick: () => s(!u),
3005
+ ref: r
1953
3006
  }
1954
- return t;
1955
- }(), o.getAsset = /* @__PURE__ */ function() {
1956
- var r = /* @__PURE__ */ B(/* @__PURE__ */ _().mark(function a(d) {
1957
- var p, c;
1958
- return _().wrap(function(n) {
1959
- for (; ; )
1960
- switch (n.prev = n.next) {
1961
- case 0:
1962
- return p = d.id, n.next = 3, this.makeHttpRequest(ur, {
1963
- id: p
1964
- });
1965
- case 3:
1966
- return c = n.sent, n.abrupt("return", c == null ? void 0 : c.asset);
1967
- case 5:
1968
- case "end":
1969
- return n.stop();
1970
- }
1971
- }, a, this);
1972
- }));
1973
- function t(a) {
1974
- return r.apply(this, arguments);
3007
+ ), u && /* @__PURE__ */ O.createElement(
3008
+ "div",
3009
+ {
3010
+ ref: a,
3011
+ style: o.popper,
3012
+ ...c.popper,
3013
+ className: "bg-gray-800 rounded-xl text-white w-96 h-96"
3014
+ },
3015
+ /* @__PURE__ */ O.createElement("div", { className: "flex justify-between items-center border-y-2 border-white px-4 py-4" }, /* @__PURE__ */ O.createElement("p", null, "Notifications"), /* @__PURE__ */ O.createElement(Xi.XIcon, { height: 20, width: 20, onClick: () => s(!1) }))
3016
+ ));
3017
+ }, Yi = ({
3018
+ preference: e,
3019
+ onChange: t
3020
+ }) => {
3021
+ const r = (n) => {
3022
+ t(n, e);
3023
+ };
3024
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", null, e[0]), /* @__PURE__ */ React.createElement("label", null, "Email", /* @__PURE__ */ React.createElement(
3025
+ "input",
3026
+ {
3027
+ name: "email",
3028
+ type: "checkbox",
3029
+ defaultChecked: e[1].email,
3030
+ onChange: r
1975
3031
  }
1976
- return t;
1977
- }(), Nt(s, [{
1978
- key: "accountAnonymousUid",
1979
- set: function(t) {
1980
- if (!Ie.test(t))
1981
- throw new Error("Anonymous UID must be a valid UUID");
1982
- S(this, D)[D] = t, $e("accountAnonymousUid", S(this, D)[D]);
3032
+ )), /* @__PURE__ */ React.createElement("label", null, "Push", /* @__PURE__ */ React.createElement(
3033
+ "input",
3034
+ {
3035
+ name: "push",
3036
+ type: "checkbox",
3037
+ defaultChecked: e[1].push,
3038
+ onChange: r
1983
3039
  }
1984
- }, {
1985
- key: "accountUid",
1986
- set: function(t) {
1987
- t == null ? S(this, k)[k] = t : S(this, k)[k] = String(t), $e("accountUid", S(this, k)[k]);
3040
+ )), /* @__PURE__ */ React.createElement("label", null, "SMS", /* @__PURE__ */ React.createElement(
3041
+ "input",
3042
+ {
3043
+ name: "sms",
3044
+ type: "checkbox",
3045
+ defaultChecked: e[1].sms,
3046
+ onChange: r
1988
3047
  }
1989
- }, {
1990
- key: "identityToken",
1991
- set: function(t) {
1992
- t == null ? S(this, G)[G] = t : S(this, G)[G] = String(t), $e("identityToken", S(this, G)[G]);
3048
+ )), /* @__PURE__ */ React.createElement("label", null, "Whatsapp", /* @__PURE__ */ React.createElement(
3049
+ "input",
3050
+ {
3051
+ name: "whatsapp",
3052
+ type: "checkbox",
3053
+ defaultChecked: e[1].whatsapp,
3054
+ onChange: r
1993
3055
  }
1994
- }]), s;
1995
- }(), jr = function(s) {
1996
- return new Ir(s);
1997
- }, xe = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
1998
- const ot = Q.createContext(null);
1999
- function Fr({
2000
- children: s,
2001
- publicKey: o,
2002
- baseUri: r,
2003
- targetEnvironment: t
2004
- }) {
2005
- const a = Q.useMemo(
2006
- () => jr({
2007
- publicKey: o || xe.REACT_APP_DASHX_PUBLIC_KEY,
2008
- baseUri: r || xe.REACT_APP_DASHX_BASE_URI,
2009
- targetEnvironment: t || xe.REACT_APP_TARGET_ENVIRONMENT
2010
- }),
2011
- [o, r, t]
2012
- );
2013
- return /* @__PURE__ */ L.jsx(ot.Provider, { value: a, children: s });
2014
- }
2015
- const $r = () => {
2016
- const s = Q.useContext(ot);
2017
- if (!s)
2018
- throw new Error(
2019
- "DashXProvider not initialized. Make sure your app is wrapped in DashXProvider."
2020
- );
2021
- return s;
2022
- }, xr = ({
2023
- preference: s,
2024
- onChange: o
2025
- }) => {
2026
- const r = (t) => {
2027
- o(t, s);
2028
- };
2029
- return /* @__PURE__ */ L.jsxs("div", { children: [
2030
- /* @__PURE__ */ L.jsx("p", { children: s[0] }),
2031
- /* @__PURE__ */ L.jsxs("label", { children: [
2032
- "Email",
2033
- /* @__PURE__ */ L.jsx(
2034
- "input",
2035
- {
2036
- name: "email",
2037
- type: "checkbox",
2038
- defaultChecked: s[1].email,
2039
- onChange: r
2040
- }
2041
- )
2042
- ] }),
2043
- /* @__PURE__ */ L.jsxs("label", { children: [
2044
- "Push",
2045
- /* @__PURE__ */ L.jsx(
2046
- "input",
2047
- {
2048
- name: "push",
2049
- type: "checkbox",
2050
- defaultChecked: s[1].push,
2051
- onChange: r
2052
- }
2053
- )
2054
- ] }),
2055
- /* @__PURE__ */ L.jsxs("label", { children: [
2056
- "SMS",
2057
- /* @__PURE__ */ L.jsx(
2058
- "input",
2059
- {
2060
- name: "sms",
2061
- type: "checkbox",
2062
- defaultChecked: s[1].sms,
2063
- onChange: r
2064
- }
2065
- )
2066
- ] }),
2067
- /* @__PURE__ */ L.jsxs("label", { children: [
2068
- "Whatsapp",
2069
- /* @__PURE__ */ L.jsx(
2070
- "input",
2071
- {
2072
- name: "whatsapp",
2073
- type: "checkbox",
2074
- defaultChecked: s[1].whatsapp,
2075
- onChange: r
2076
- }
2077
- )
2078
- ] }),
2079
- /* @__PURE__ */ L.jsx("br", {})
2080
- ] });
3056
+ )), /* @__PURE__ */ React.createElement("br", null));
2081
3057
  };
2082
- function Ur({
2083
- preference: s,
2084
- onChange: o,
2085
- renderPreference: r = xr
3058
+ function Ki({
3059
+ preference: e,
3060
+ onChange: t,
3061
+ renderPreference: r = Yi
2086
3062
  }) {
2087
- return r({ preference: s, onChange: o });
3063
+ return r({ preference: e, onChange: t });
2088
3064
  }
2089
- const Dr = ({
2090
- preferences: s,
2091
- onChange: o,
3065
+ const Qi = ({
3066
+ preferences: e,
3067
+ onChange: t,
2092
3068
  loading: r
2093
- }) => s ? /* @__PURE__ */ L.jsx(L.Fragment, { children: s.map((t) => /* @__PURE__ */ L.jsx(
2094
- Ur,
3069
+ }) => e ? /* @__PURE__ */ O.createElement(O.Fragment, null, e.map((n) => /* @__PURE__ */ O.createElement(
3070
+ Ki,
2095
3071
  {
2096
- preference: t,
2097
- onChange: o
2098
- },
2099
- t[0]
2100
- )) }) : r ? /* @__PURE__ */ L.jsx(L.Fragment, { children: "Loading..." }) : /* @__PURE__ */ L.jsx(L.Fragment, { children: "An unexpected error ocurred" });
2101
- function qr({
2102
- renderPreferences: s = Dr
3072
+ key: n[0],
3073
+ preference: n,
3074
+ onChange: t
3075
+ }
3076
+ ))) : r ? /* @__PURE__ */ O.createElement(O.Fragment, null, "Loading...") : /* @__PURE__ */ O.createElement(O.Fragment, null, "An unexpected error ocurred");
3077
+ function ns({
3078
+ renderPreferences: e = Qi
2103
3079
  }) {
2104
- const o = $r(), [r, t] = Q.useState(null), [a, d] = Q.useState(!0), [p, c] = Q.useState(null), [l, n] = Q.useState(!1), m = (b, R) => {
2105
- n(!0);
2106
- const [O, z] = R;
2107
- t((Y) => ({
2108
- ...Y || {},
2109
- [O]: {
2110
- ...z,
2111
- [b.target.name]: b.target.checked
3080
+ const t = Or(), [r, n] = O.useState(null), [a, o] = O.useState(!0), [c, u] = O.useState(null), [s, i] = O.useState(!1), l = (d, f) => {
3081
+ i(!0);
3082
+ const [p, m] = f;
3083
+ n((h) => ({
3084
+ ...h || {},
3085
+ [p]: {
3086
+ ...m,
3087
+ [d.target.name]: d.target.checked
2112
3088
  }
2113
3089
  }));
2114
3090
  };
2115
- return Q.useEffect(() => {
2116
- if (!l)
3091
+ return O.useEffect(() => {
3092
+ if (!s)
2117
3093
  return;
2118
- const b = setTimeout(async () => {
2119
- await o.saveStoredPreferences(r), n(!1);
3094
+ const d = setTimeout(async () => {
3095
+ await t.saveStoredPreferences(r), i(!1);
2120
3096
  }, 100);
2121
- return () => clearTimeout(b);
2122
- }, [r, l, o]), Q.useEffect(() => {
2123
- async function b() {
2124
- d(!0);
3097
+ return () => clearTimeout(d);
3098
+ }, [r, s, t]), O.useEffect(() => {
3099
+ async function d() {
3100
+ o(!0);
2125
3101
  try {
2126
- const R = await o.fetchStoredPreferences();
2127
- t(R);
2128
- } catch (R) {
2129
- c(R);
3102
+ const f = await t.fetchStoredPreferences();
3103
+ n(f);
3104
+ } catch (f) {
3105
+ u(f);
2130
3106
  } finally {
2131
- d(!1);
3107
+ o(!1);
2132
3108
  }
2133
3109
  }
2134
- b();
2135
- }, [o]), s({
2136
- preferences: r && Object.entries(r).map(([b, R]) => [b, R]),
2137
- onChange: m,
3110
+ d();
3111
+ }, [t]), e({
3112
+ preferences: r && Object.entries(r).map(([d, f]) => [d, f]),
3113
+ onChange: l,
2138
3114
  loading: a,
2139
- error: p
3115
+ error: c
2140
3116
  });
2141
3117
  }
3118
+ const as = (e) => /* @__PURE__ */ O.createElement(O.Fragment, null, /* @__PURE__ */ O.createElement(
3119
+ Wa,
3120
+ {
3121
+ position: "top-right",
3122
+ ...e
3123
+ }
3124
+ ));
2142
3125
  export {
2143
- Fr as DashXProvider,
2144
- Ur as Preference,
2145
- qr as Preferences,
2146
- $r as useDashXProvider
3126
+ ts as DashXProvider,
3127
+ rs as NotificationBell,
3128
+ Ki as Preference,
3129
+ ns as Preferences,
3130
+ as as Toast,
3131
+ Or as useDashXProvider,
3132
+ Yn as useInApp
2147
3133
  };