@nizza/core 0.3.0-alpha.3 → 0.3.0-alpha.5

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.
Files changed (189) hide show
  1. package/README.md +3 -0
  2. package/dist/index.cjs +2 -0
  3. package/dist/index.mjs +2798 -0
  4. package/{src → dist}/lib/stores/NizzaStore.d.ts +1 -0
  5. package/{src → dist}/lib/types/api-graphql-types.d.ts +57 -57
  6. package/dist/lib/types/mobx-store.d.ts +3 -0
  7. package/dist/lib/types/products/product.d.ts +16 -0
  8. package/{src → dist}/lib/types/utils.d.ts +3 -3
  9. package/{src → dist}/lib/utils/Result.d.ts +1 -1
  10. package/{src → dist}/lib/utils/customStorage/utils.d.ts +1 -1
  11. package/dist/lib/utils/fingerprint.d.ts +1 -0
  12. package/{src → dist}/lib/utils/helpers.d.ts +1 -1
  13. package/{src → dist}/lib/utils/lazyLoad.d.ts +1 -1
  14. package/dist/package.json +21 -0
  15. package/package.json +11 -11
  16. package/src/environments/environment.d.js +0 -3
  17. package/src/environments/environment.d.js.map +0 -1
  18. package/src/environments/environment.js +0 -28
  19. package/src/environments/environment.js.map +0 -1
  20. package/src/environments/environment.prod.d.js +0 -3
  21. package/src/environments/environment.prod.d.js.map +0 -1
  22. package/src/environments/environment.prod.d.ts +0 -20
  23. package/src/environments/environment.prod.js +0 -27
  24. package/src/environments/environment.prod.js.map +0 -1
  25. package/src/environments/environment.staging.d.js +0 -3
  26. package/src/environments/environment.staging.d.js.map +0 -1
  27. package/src/environments/environment.staging.d.ts +0 -20
  28. package/src/environments/environment.staging.js +0 -27
  29. package/src/environments/environment.staging.js.map +0 -1
  30. package/src/index.d.js +0 -8
  31. package/src/index.d.js.map +0 -1
  32. package/src/index.js +0 -8
  33. package/src/index.js.map +0 -1
  34. package/src/lib/constants/index.d.js +0 -3
  35. package/src/lib/constants/index.d.js.map +0 -1
  36. package/src/lib/constants/index.js +0 -3
  37. package/src/lib/constants/index.js.map +0 -1
  38. package/src/lib/constants/products.d.js +0 -3
  39. package/src/lib/constants/products.d.js.map +0 -1
  40. package/src/lib/constants/products.js +0 -6
  41. package/src/lib/constants/products.js.map +0 -1
  42. package/src/lib/domain/AggregateRoot.d.js +0 -3
  43. package/src/lib/domain/AggregateRoot.d.js.map +0 -1
  44. package/src/lib/domain/AggregateRoot.js +0 -33
  45. package/src/lib/domain/AggregateRoot.js.map +0 -1
  46. package/src/lib/domain/BaseMobxStore.d.js +0 -3
  47. package/src/lib/domain/BaseMobxStore.d.js.map +0 -1
  48. package/src/lib/domain/BaseMobxStore.js +0 -5
  49. package/src/lib/domain/BaseMobxStore.js.map +0 -1
  50. package/src/lib/domain/ValueObject.d.js +0 -3
  51. package/src/lib/domain/ValueObject.d.js.map +0 -1
  52. package/src/lib/domain/ValueObject.js +0 -20
  53. package/src/lib/domain/ValueObject.js.map +0 -1
  54. package/src/lib/domain/errors/DomainError.d.js +0 -3
  55. package/src/lib/domain/errors/DomainError.d.js.map +0 -1
  56. package/src/lib/domain/errors/DomainError.js +0 -26
  57. package/src/lib/domain/errors/DomainError.js.map +0 -1
  58. package/src/lib/domain/errors/api.d.js +0 -3
  59. package/src/lib/domain/errors/api.d.js.map +0 -1
  60. package/src/lib/domain/errors/api.js +0 -12
  61. package/src/lib/domain/errors/api.js.map +0 -1
  62. package/src/lib/domain/errors/app.d.js +0 -3
  63. package/src/lib/domain/errors/app.d.js.map +0 -1
  64. package/src/lib/domain/errors/app.js +0 -21
  65. package/src/lib/domain/errors/app.js.map +0 -1
  66. package/src/lib/domain/errors/index.d.js +0 -5
  67. package/src/lib/domain/errors/index.d.js.map +0 -1
  68. package/src/lib/domain/errors/index.js +0 -5
  69. package/src/lib/domain/errors/index.js.map +0 -1
  70. package/src/lib/domain/index.d.js +0 -6
  71. package/src/lib/domain/index.d.js.map +0 -1
  72. package/src/lib/domain/index.js +0 -6
  73. package/src/lib/domain/index.js.map +0 -1
  74. package/src/lib/providers/StoreProvider.d.js +0 -3
  75. package/src/lib/providers/StoreProvider.d.js.map +0 -1
  76. package/src/lib/providers/StoreProvider.js +0 -37
  77. package/src/lib/providers/StoreProvider.js.map +0 -1
  78. package/src/lib/providers/index.d.js +0 -3
  79. package/src/lib/providers/index.d.js.map +0 -1
  80. package/src/lib/providers/index.js +0 -3
  81. package/src/lib/providers/index.js.map +0 -1
  82. package/src/lib/stores/NizzaStore.d.js +0 -3
  83. package/src/lib/stores/NizzaStore.d.js.map +0 -1
  84. package/src/lib/stores/NizzaStore.js +0 -27
  85. package/src/lib/stores/NizzaStore.js.map +0 -1
  86. package/src/lib/stores/index.d.js +0 -3
  87. package/src/lib/stores/index.d.js.map +0 -1
  88. package/src/lib/stores/index.js +0 -3
  89. package/src/lib/stores/index.js.map +0 -1
  90. package/src/lib/types/api-graphql-types.d.js +0 -3
  91. package/src/lib/types/api-graphql-types.d.js.map +0 -1
  92. package/src/lib/types/api-graphql-types.js +0 -2003
  93. package/src/lib/types/api-graphql-types.js.map +0 -1
  94. package/src/lib/types/app-module.d.js +0 -3
  95. package/src/lib/types/app-module.d.js.map +0 -1
  96. package/src/lib/types/app-module.js +0 -3
  97. package/src/lib/types/app-module.js.map +0 -1
  98. package/src/lib/types/index.d.js +0 -9
  99. package/src/lib/types/index.d.js.map +0 -1
  100. package/src/lib/types/index.js +0 -9
  101. package/src/lib/types/index.js.map +0 -1
  102. package/src/lib/types/mobx-store.d.js +0 -3
  103. package/src/lib/types/mobx-store.d.js.map +0 -1
  104. package/src/lib/types/mobx-store.d.ts +0 -3
  105. package/src/lib/types/mobx-store.js +0 -3
  106. package/src/lib/types/mobx-store.js.map +0 -1
  107. package/src/lib/types/nizzaGlobalObject.d.js +0 -3
  108. package/src/lib/types/nizzaGlobalObject.d.js.map +0 -1
  109. package/src/lib/types/nizzaGlobalObject.js +0 -3
  110. package/src/lib/types/nizzaGlobalObject.js.map +0 -1
  111. package/src/lib/types/products/base.d.js +0 -8
  112. package/src/lib/types/products/base.d.js.map +0 -1
  113. package/src/lib/types/products/base.js +0 -8
  114. package/src/lib/types/products/base.js.map +0 -1
  115. package/src/lib/types/products/index.d.js +0 -4
  116. package/src/lib/types/products/index.d.js.map +0 -1
  117. package/src/lib/types/products/index.js +0 -4
  118. package/src/lib/types/products/index.js.map +0 -1
  119. package/src/lib/types/products/product.d.js +0 -3
  120. package/src/lib/types/products/product.d.js.map +0 -1
  121. package/src/lib/types/products/product.d.ts +0 -16
  122. package/src/lib/types/products/product.js +0 -3
  123. package/src/lib/types/products/product.js.map +0 -1
  124. package/src/lib/types/utils.d.js +0 -3
  125. package/src/lib/types/utils.d.js.map +0 -1
  126. package/src/lib/types/utils.js +0 -5
  127. package/src/lib/types/utils.js.map +0 -1
  128. package/src/lib/utils/Result.d.js +0 -3
  129. package/src/lib/utils/Result.d.js.map +0 -1
  130. package/src/lib/utils/Result.js +0 -78
  131. package/src/lib/utils/Result.js.map +0 -1
  132. package/src/lib/utils/apiCall.d.js +0 -3
  133. package/src/lib/utils/apiCall.d.js.map +0 -1
  134. package/src/lib/utils/apiCall.js +0 -57
  135. package/src/lib/utils/apiCall.js.map +0 -1
  136. package/src/lib/utils/customStorage/MemoryStorage.d.js +0 -3
  137. package/src/lib/utils/customStorage/MemoryStorage.d.js.map +0 -1
  138. package/src/lib/utils/customStorage/MemoryStorage.js +0 -53
  139. package/src/lib/utils/customStorage/MemoryStorage.js.map +0 -1
  140. package/src/lib/utils/customStorage/index.d.js +0 -3
  141. package/src/lib/utils/customStorage/index.d.js.map +0 -1
  142. package/src/lib/utils/customStorage/index.js +0 -46
  143. package/src/lib/utils/customStorage/index.js.map +0 -1
  144. package/src/lib/utils/customStorage/utils.d.js +0 -3
  145. package/src/lib/utils/customStorage/utils.d.js.map +0 -1
  146. package/src/lib/utils/customStorage/utils.js +0 -24
  147. package/src/lib/utils/customStorage/utils.js.map +0 -1
  148. package/src/lib/utils/fingerprint.d.js +0 -3
  149. package/src/lib/utils/fingerprint.d.js.map +0 -1
  150. package/src/lib/utils/fingerprint.d.ts +0 -1
  151. package/src/lib/utils/fingerprint.js +0 -14
  152. package/src/lib/utils/fingerprint.js.map +0 -1
  153. package/src/lib/utils/helpers.d.js +0 -3
  154. package/src/lib/utils/helpers.d.js.map +0 -1
  155. package/src/lib/utils/helpers.js +0 -20
  156. package/src/lib/utils/helpers.js.map +0 -1
  157. package/src/lib/utils/index.d.js +0 -8
  158. package/src/lib/utils/index.d.js.map +0 -1
  159. package/src/lib/utils/index.js +0 -8
  160. package/src/lib/utils/index.js.map +0 -1
  161. package/src/lib/utils/lazyLoad.d.js +0 -3
  162. package/src/lib/utils/lazyLoad.d.js.map +0 -1
  163. package/src/lib/utils/lazyLoad.js +0 -24
  164. package/src/lib/utils/lazyLoad.js.map +0 -1
  165. /package/{src → dist}/environments/environment.d.ts +0 -0
  166. /package/{src → dist}/index.d.ts +0 -0
  167. /package/{src → dist}/lib/constants/index.d.ts +0 -0
  168. /package/{src → dist}/lib/constants/products.d.ts +0 -0
  169. /package/{src → dist}/lib/domain/AggregateRoot.d.ts +0 -0
  170. /package/{src → dist}/lib/domain/BaseMobxStore.d.ts +0 -0
  171. /package/{src → dist}/lib/domain/ValueObject.d.ts +0 -0
  172. /package/{src → dist}/lib/domain/errors/DomainError.d.ts +0 -0
  173. /package/{src → dist}/lib/domain/errors/api.d.ts +0 -0
  174. /package/{src → dist}/lib/domain/errors/app.d.ts +0 -0
  175. /package/{src → dist}/lib/domain/errors/index.d.ts +0 -0
  176. /package/{src → dist}/lib/domain/index.d.ts +0 -0
  177. /package/{src → dist}/lib/providers/StoreProvider.d.ts +0 -0
  178. /package/{src → dist}/lib/providers/index.d.ts +0 -0
  179. /package/{src → dist}/lib/stores/index.d.ts +0 -0
  180. /package/{src → dist}/lib/types/app-module.d.ts +0 -0
  181. /package/{src → dist}/lib/types/index.d.ts +0 -0
  182. /package/{src → dist}/lib/types/nizzaGlobalObject.d.ts +0 -0
  183. /package/{src → dist}/lib/types/products/base.d.ts +0 -0
  184. /package/{src → dist}/lib/types/products/index.d.ts +0 -0
  185. /package/{src → dist}/lib/utils/apiCall.d.ts +0 -0
  186. /package/{src → dist}/lib/utils/customStorage/MemoryStorage.d.ts +0 -0
  187. /package/{src → dist}/lib/utils/customStorage/index.d.ts +0 -0
  188. /package/{src → dist}/lib/utils/index.d.ts +0 -0
  189. /package/{src/typings/libs.d.js → dist/typings/libs.d.ts} +0 -0
package/dist/index.mjs ADDED
@@ -0,0 +1,2798 @@
1
+ import { jsx as et } from "react/jsx-runtime";
2
+ import { createContext as $n, useContext as Mt, useMemo as Kn, lazy as zn, Suspense as qn } from "react";
3
+ var Wn = /* @__PURE__ */ ((e) => (e.COMBO = "Combo", e))(Wn || {});
4
+ class Hn {
5
+ aggregate;
6
+ _numSetPropsApplied = 0;
7
+ constructor(t) {
8
+ this.aggregate = t;
9
+ }
10
+ setProps(t) {
11
+ for (const [i, n] of Object.entries(t))
12
+ i in this.aggregate && (this.aggregate[i] = n);
13
+ this._numSetPropsApplied++;
14
+ }
15
+ get isFirstSetProps() {
16
+ return this._numSetPropsApplied === 1;
17
+ }
18
+ }
19
+ function Zr(e) {
20
+ return new Hn(e);
21
+ }
22
+ class ea {
23
+ }
24
+ class dt extends Error {
25
+ constructor(t, i, n) {
26
+ super(i), this.value = n, this.name = t;
27
+ }
28
+ toDTO() {
29
+ return {
30
+ name: this.name,
31
+ message: this.message,
32
+ ...this.value && { value: this.value }
33
+ };
34
+ }
35
+ }
36
+ class ta extends dt {
37
+ constructor(t) {
38
+ super(
39
+ "RESOURCE_NOT_FOUND_ERROR",
40
+ `Resource with id '${t}' not found.`,
41
+ t
42
+ );
43
+ }
44
+ }
45
+ class na extends dt {
46
+ constructor(t) {
47
+ super(
48
+ "APP_UNEXPECTED_ERROR",
49
+ t.message ?? "An unexpected error occurred.",
50
+ t
51
+ );
52
+ }
53
+ }
54
+ class ia extends dt {
55
+ constructor() {
56
+ super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
57
+ }
58
+ }
59
+ class ra {
60
+ _value;
61
+ constructor(t) {
62
+ t !== void 0 && (this._value = t);
63
+ }
64
+ get value() {
65
+ return this._value;
66
+ }
67
+ }
68
+ let ct = /* @__PURE__ */ new Map();
69
+ const tt = $n(ct), aa = ({ children: e, stores: t, instances: i }) => {
70
+ const n = Mt(tt), r = Kn(() => {
71
+ const a = /* @__PURE__ */ new Map();
72
+ return t.forEach((o) => {
73
+ let s;
74
+ try {
75
+ s = o();
76
+ } catch {
77
+ s = new o();
78
+ }
79
+ a.set(o, s);
80
+ }), i?.forEach(
81
+ (o) => a.set(o.constructor, o)
82
+ ), ct = new Map([...n, ...a]);
83
+ }, []);
84
+ return /* @__PURE__ */ et(tt.Provider, { value: r, children: e });
85
+ };
86
+ function oa(e) {
87
+ return Mt(tt).get(e);
88
+ }
89
+ function sa(e) {
90
+ return ct.get(e);
91
+ }
92
+ function m(e) {
93
+ for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
94
+ i[n - 1] = arguments[n];
95
+ throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (i.length ? " " + i.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e);
96
+ }
97
+ var Xn = {};
98
+ function Gt() {
99
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Xn;
100
+ }
101
+ var Jn = Object.assign, De = Object.getOwnPropertyDescriptor, x = Object.defineProperty, Le = Object.prototype, nt = [];
102
+ Object.freeze(nt);
103
+ var $t = {};
104
+ Object.freeze($t);
105
+ var Yn = typeof Proxy < "u", Qn = /* @__PURE__ */ Object.toString();
106
+ function Kt() {
107
+ Yn || m("Proxy not available");
108
+ }
109
+ function zt(e) {
110
+ var t = !1;
111
+ return function() {
112
+ if (!t)
113
+ return t = !0, e.apply(this, arguments);
114
+ };
115
+ }
116
+ var J = function() {
117
+ };
118
+ function C(e) {
119
+ return typeof e == "function";
120
+ }
121
+ function K(e) {
122
+ var t = typeof e;
123
+ switch (t) {
124
+ case "string":
125
+ case "symbol":
126
+ case "number":
127
+ return !0;
128
+ }
129
+ return !1;
130
+ }
131
+ function Ue(e) {
132
+ return e !== null && typeof e == "object";
133
+ }
134
+ function R(e) {
135
+ if (!Ue(e))
136
+ return !1;
137
+ var t = Object.getPrototypeOf(e);
138
+ if (t == null)
139
+ return !0;
140
+ var i = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
141
+ return typeof i == "function" && i.toString() === Qn;
142
+ }
143
+ function qt(e) {
144
+ var t = e?.constructor;
145
+ return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1;
146
+ }
147
+ function Me(e, t, i) {
148
+ x(e, t, {
149
+ enumerable: !1,
150
+ writable: !0,
151
+ configurable: !0,
152
+ value: i
153
+ });
154
+ }
155
+ function Wt(e, t, i) {
156
+ x(e, t, {
157
+ enumerable: !1,
158
+ writable: !1,
159
+ configurable: !0,
160
+ value: i
161
+ });
162
+ }
163
+ function q(e, t) {
164
+ var i = "isMobX" + e;
165
+ return t.prototype[i] = !0, function(n) {
166
+ return Ue(n) && n[i] === !0;
167
+ };
168
+ }
169
+ function ie(e) {
170
+ return e instanceof Map;
171
+ }
172
+ function _e(e) {
173
+ return e instanceof Set;
174
+ }
175
+ var Ht = typeof Object.getOwnPropertySymbols < "u";
176
+ function Zn(e) {
177
+ var t = Object.keys(e);
178
+ if (!Ht)
179
+ return t;
180
+ var i = Object.getOwnPropertySymbols(e);
181
+ return i.length ? [].concat(t, i.filter(function(n) {
182
+ return Le.propertyIsEnumerable.call(e, n);
183
+ })) : t;
184
+ }
185
+ var le = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Ht ? function(e) {
186
+ return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
187
+ } : (
188
+ /* istanbul ignore next */
189
+ Object.getOwnPropertyNames
190
+ );
191
+ function Xt(e) {
192
+ return e === null ? null : typeof e == "object" ? "" + e : e;
193
+ }
194
+ function L(e, t) {
195
+ return Le.hasOwnProperty.call(e, t);
196
+ }
197
+ var ei = Object.getOwnPropertyDescriptors || function(t) {
198
+ var i = {};
199
+ return le(t).forEach(function(n) {
200
+ i[n] = De(t, n);
201
+ }), i;
202
+ };
203
+ function yt(e, t) {
204
+ for (var i = 0; i < t.length; i++) {
205
+ var n = t[i];
206
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
207
+ }
208
+ }
209
+ function ft(e, t, i) {
210
+ return t && yt(e.prototype, t), i && yt(e, i), Object.defineProperty(e, "prototype", {
211
+ writable: !1
212
+ }), e;
213
+ }
214
+ function de() {
215
+ return de = Object.assign || function(e) {
216
+ for (var t = 1; t < arguments.length; t++) {
217
+ var i = arguments[t];
218
+ for (var n in i)
219
+ Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]);
220
+ }
221
+ return e;
222
+ }, de.apply(this, arguments);
223
+ }
224
+ function Jt(e, t) {
225
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, it(e, t);
226
+ }
227
+ function it(e, t) {
228
+ return it = Object.setPrototypeOf || function(n, r) {
229
+ return n.__proto__ = r, n;
230
+ }, it(e, t);
231
+ }
232
+ function St(e) {
233
+ if (e === void 0)
234
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
235
+ return e;
236
+ }
237
+ function ti(e, t) {
238
+ if (e) {
239
+ if (typeof e == "string")
240
+ return Nt(e, t);
241
+ var i = Object.prototype.toString.call(e).slice(8, -1);
242
+ if (i === "Object" && e.constructor && (i = e.constructor.name), i === "Map" || i === "Set")
243
+ return Array.from(e);
244
+ if (i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))
245
+ return Nt(e, t);
246
+ }
247
+ }
248
+ function Nt(e, t) {
249
+ (t == null || t > e.length) && (t = e.length);
250
+ for (var i = 0, n = new Array(t); i < t; i++)
251
+ n[i] = e[i];
252
+ return n;
253
+ }
254
+ function Y(e, t) {
255
+ var i = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
256
+ if (i)
257
+ return (i = i.call(e)).next.bind(i);
258
+ if (Array.isArray(e) || (i = ti(e)) || t && e && typeof e.length == "number") {
259
+ i && (e = i);
260
+ var n = 0;
261
+ return function() {
262
+ return n >= e.length ? {
263
+ done: !0
264
+ } : {
265
+ done: !1,
266
+ value: e[n++]
267
+ };
268
+ };
269
+ }
270
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
271
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
272
+ }
273
+ var Q = /* @__PURE__ */ Symbol("mobx-stored-annotations");
274
+ function T(e) {
275
+ function t(i, n) {
276
+ pe(i, n, e);
277
+ }
278
+ return Object.assign(t, e);
279
+ }
280
+ function pe(e, t, i) {
281
+ L(e, Q) || Me(e, Q, de({}, e[Q])), li(i) || (e[Q][t] = i);
282
+ }
283
+ var f = /* @__PURE__ */ Symbol("mobx administration"), ge = /* @__PURE__ */ function() {
284
+ function e(i) {
285
+ i === void 0 && (i = "Atom"), this.name_ = void 0, this.isPendingUnobservation_ = !1, this.isBeingObserved_ = !1, this.observers_ = /* @__PURE__ */ new Set(), this.diffValue_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = v.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = i;
286
+ }
287
+ var t = e.prototype;
288
+ return t.onBO = function() {
289
+ this.onBOL && this.onBOL.forEach(function(n) {
290
+ return n();
291
+ });
292
+ }, t.onBUO = function() {
293
+ this.onBUOL && this.onBUOL.forEach(function(n) {
294
+ return n();
295
+ });
296
+ }, t.reportObserved = function() {
297
+ return _n(this);
298
+ }, t.reportChanged = function() {
299
+ y(), pn(this), S();
300
+ }, t.toString = function() {
301
+ return this.name_;
302
+ }, e;
303
+ }(), vt = /* @__PURE__ */ q("Atom", ge);
304
+ function Yt(e, t, i) {
305
+ t === void 0 && (t = J), i === void 0 && (i = J);
306
+ var n = new ge(e);
307
+ return t !== J && ur(n, t), i !== J && On(n, i), n;
308
+ }
309
+ function ni(e, t) {
310
+ return e === t;
311
+ }
312
+ function ii(e, t) {
313
+ return bt(e, t);
314
+ }
315
+ function ri(e, t) {
316
+ return bt(e, t, 1);
317
+ }
318
+ function ai(e, t) {
319
+ return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
320
+ }
321
+ var Pe = {
322
+ identity: ni,
323
+ structural: ii,
324
+ default: ai,
325
+ shallow: ri
326
+ };
327
+ function te(e, t, i) {
328
+ return En(e) ? e : Array.isArray(e) ? b.array(e, {
329
+ name: i
330
+ }) : R(e) ? b.object(e, void 0, {
331
+ name: i
332
+ }) : ie(e) ? b.map(e, {
333
+ name: i
334
+ }) : _e(e) ? b.set(e, {
335
+ name: i
336
+ }) : typeof e == "function" && !_t(e) && !Ve(e) ? qt(e) ? ve(e) : fe(i, e) : e;
337
+ }
338
+ function oi(e, t, i) {
339
+ if (e == null || me(e) || qe(e) || W(e) || ae(e))
340
+ return e;
341
+ if (Array.isArray(e))
342
+ return b.array(e, {
343
+ name: i,
344
+ deep: !1
345
+ });
346
+ if (R(e))
347
+ return b.object(e, void 0, {
348
+ name: i,
349
+ deep: !1
350
+ });
351
+ if (ie(e))
352
+ return b.map(e, {
353
+ name: i,
354
+ deep: !1
355
+ });
356
+ if (_e(e))
357
+ return b.set(e, {
358
+ name: i,
359
+ deep: !1
360
+ });
361
+ }
362
+ function Ge(e) {
363
+ return e;
364
+ }
365
+ function si(e, t) {
366
+ return bt(e, t) ? t : e;
367
+ }
368
+ var ui = "override";
369
+ function li(e) {
370
+ return e.annotationType_ === ui;
371
+ }
372
+ function be(e, t) {
373
+ return {
374
+ annotationType_: e,
375
+ options_: t,
376
+ make_: di,
377
+ extend_: ci
378
+ };
379
+ }
380
+ function di(e, t, i, n) {
381
+ var r;
382
+ if ((r = this.options_) != null && r.bound)
383
+ return this.extend_(e, t, i, !1) === null ? 0 : 1;
384
+ if (n === e.target_)
385
+ return this.extend_(e, t, i, !1) === null ? 0 : 2;
386
+ if (_t(i.value))
387
+ return 1;
388
+ var a = Qt(e, this, t, i, !1);
389
+ return x(n, t, a), 2;
390
+ }
391
+ function ci(e, t, i, n) {
392
+ var r = Qt(e, this, t, i);
393
+ return e.defineProperty_(t, r, n);
394
+ }
395
+ function fi(e, t, i, n) {
396
+ t.annotationType_, n.value;
397
+ }
398
+ function Qt(e, t, i, n, r) {
399
+ var a, o, s, u, l, c, h;
400
+ r === void 0 && (r = d.safeDescriptors), fi(e, t, i, n);
401
+ var _ = n.value;
402
+ if ((a = t.options_) != null && a.bound) {
403
+ var P;
404
+ _ = _.bind((P = e.proxy_) != null ? P : e.target_);
405
+ }
406
+ return {
407
+ value: ne(
408
+ (o = (s = t.options_) == null ? void 0 : s.name) != null ? o : i.toString(),
409
+ _,
410
+ (u = (l = t.options_) == null ? void 0 : l.autoAction) != null ? u : !1,
411
+ // https://github.com/mobxjs/mobx/discussions/3140
412
+ (c = t.options_) != null && c.bound ? (h = e.proxy_) != null ? h : e.target_ : void 0
413
+ ),
414
+ // Non-configurable for classes
415
+ // prevents accidental field redefinition in subclass
416
+ configurable: r ? e.isPlainObject_ : !0,
417
+ // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058
418
+ enumerable: !1,
419
+ // Non-obsevable, therefore non-writable
420
+ // Also prevents rewriting in subclass constructor
421
+ writable: !r
422
+ };
423
+ }
424
+ function Zt(e, t) {
425
+ return {
426
+ annotationType_: e,
427
+ options_: t,
428
+ make_: vi,
429
+ extend_: mi
430
+ };
431
+ }
432
+ function vi(e, t, i, n) {
433
+ var r;
434
+ if (n === e.target_)
435
+ return this.extend_(e, t, i, !1) === null ? 0 : 2;
436
+ if ((r = this.options_) != null && r.bound && (!L(e.target_, t) || !Ve(e.target_[t])) && this.extend_(e, t, i, !1) === null)
437
+ return 0;
438
+ if (Ve(i.value))
439
+ return 1;
440
+ var a = en(e, this, t, i, !1, !1);
441
+ return x(n, t, a), 2;
442
+ }
443
+ function mi(e, t, i, n) {
444
+ var r, a = en(e, this, t, i, (r = this.options_) == null ? void 0 : r.bound);
445
+ return e.defineProperty_(t, a, n);
446
+ }
447
+ function hi(e, t, i, n) {
448
+ t.annotationType_, n.value;
449
+ }
450
+ function en(e, t, i, n, r, a) {
451
+ a === void 0 && (a = d.safeDescriptors), hi(e, t, i, n);
452
+ var o = n.value;
453
+ if (Ve(o) || (o = ve(o)), r) {
454
+ var s;
455
+ o = o.bind((s = e.proxy_) != null ? s : e.target_), o.isMobXFlow = !0;
456
+ }
457
+ return {
458
+ value: o,
459
+ // Non-configurable for classes
460
+ // prevents accidental field redefinition in subclass
461
+ configurable: a ? e.isPlainObject_ : !0,
462
+ // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058
463
+ enumerable: !1,
464
+ // Non-obsevable, therefore non-writable
465
+ // Also prevents rewriting in subclass constructor
466
+ writable: !a
467
+ };
468
+ }
469
+ function mt(e, t) {
470
+ return {
471
+ annotationType_: e,
472
+ options_: t,
473
+ make_: _i,
474
+ extend_: pi
475
+ };
476
+ }
477
+ function _i(e, t, i) {
478
+ return this.extend_(e, t, i, !1) === null ? 0 : 1;
479
+ }
480
+ function pi(e, t, i, n) {
481
+ return gi(e, this, t, i), e.defineComputedProperty_(t, de({}, this.options_, {
482
+ get: i.get,
483
+ set: i.set
484
+ }), n);
485
+ }
486
+ function gi(e, t, i, n) {
487
+ t.annotationType_, n.get;
488
+ }
489
+ function $e(e, t) {
490
+ return {
491
+ annotationType_: e,
492
+ options_: t,
493
+ make_: bi,
494
+ extend_: ki
495
+ };
496
+ }
497
+ function bi(e, t, i) {
498
+ return this.extend_(e, t, i, !1) === null ? 0 : 1;
499
+ }
500
+ function ki(e, t, i, n) {
501
+ var r, a;
502
+ return yi(e, this), e.defineObservableProperty_(t, i.value, (r = (a = this.options_) == null ? void 0 : a.enhancer) != null ? r : te, n);
503
+ }
504
+ function yi(e, t, i, n) {
505
+ t.annotationType_;
506
+ }
507
+ var Si = "true", Ni = /* @__PURE__ */ tn();
508
+ function tn(e) {
509
+ return {
510
+ annotationType_: Si,
511
+ options_: e,
512
+ make_: Oi,
513
+ extend_: Ai
514
+ };
515
+ }
516
+ function Oi(e, t, i, n) {
517
+ var r, a;
518
+ if (i.get)
519
+ return Ke.make_(e, t, i, n);
520
+ if (i.set) {
521
+ var o = ne(t.toString(), i.set);
522
+ return n === e.target_ ? e.defineProperty_(t, {
523
+ configurable: d.safeDescriptors ? e.isPlainObject_ : !0,
524
+ set: o
525
+ }) === null ? 0 : 2 : (x(n, t, {
526
+ configurable: !0,
527
+ set: o
528
+ }), 2);
529
+ }
530
+ if (n !== e.target_ && typeof i.value == "function") {
531
+ var s;
532
+ if (qt(i.value)) {
533
+ var u, l = (u = this.options_) != null && u.autoBind ? ve.bound : ve;
534
+ return l.make_(e, t, i, n);
535
+ }
536
+ var c = (s = this.options_) != null && s.autoBind ? fe.bound : fe;
537
+ return c.make_(e, t, i, n);
538
+ }
539
+ var h = ((r = this.options_) == null ? void 0 : r.deep) === !1 ? b.ref : b;
540
+ if (typeof i.value == "function" && (a = this.options_) != null && a.autoBind) {
541
+ var _;
542
+ i.value = i.value.bind((_ = e.proxy_) != null ? _ : e.target_);
543
+ }
544
+ return h.make_(e, t, i, n);
545
+ }
546
+ function Ai(e, t, i, n) {
547
+ var r, a;
548
+ if (i.get)
549
+ return Ke.extend_(e, t, i, n);
550
+ if (i.set)
551
+ return e.defineProperty_(t, {
552
+ configurable: d.safeDescriptors ? e.isPlainObject_ : !0,
553
+ set: ne(t.toString(), i.set)
554
+ }, n);
555
+ if (typeof i.value == "function" && (r = this.options_) != null && r.autoBind) {
556
+ var o;
557
+ i.value = i.value.bind((o = e.proxy_) != null ? o : e.target_);
558
+ }
559
+ var s = ((a = this.options_) == null ? void 0 : a.deep) === !1 ? b.ref : b;
560
+ return s.extend_(e, t, i, n);
561
+ }
562
+ var wi = "observable", Ci = "observable.ref", Ei = "observable.shallow", Fi = "observable.struct", nn = {
563
+ deep: !0,
564
+ name: void 0,
565
+ defaultDecorator: void 0,
566
+ proxy: !0
567
+ };
568
+ Object.freeze(nn);
569
+ function Ae(e) {
570
+ return e || nn;
571
+ }
572
+ var rn = /* @__PURE__ */ $e(wi), Ti = /* @__PURE__ */ $e(Ci, {
573
+ enhancer: Ge
574
+ }), Di = /* @__PURE__ */ $e(Ei, {
575
+ enhancer: oi
576
+ }), Pi = /* @__PURE__ */ $e(Fi, {
577
+ enhancer: si
578
+ }), an = /* @__PURE__ */ T(rn);
579
+ function we(e) {
580
+ return e.deep === !0 ? te : e.deep === !1 ? Ge : xi(e.defaultDecorator);
581
+ }
582
+ function ji(e) {
583
+ var t;
584
+ return e ? (t = e.defaultDecorator) != null ? t : tn(e) : void 0;
585
+ }
586
+ function xi(e) {
587
+ var t, i;
588
+ return e && (t = (i = e.options_) == null ? void 0 : i.enhancer) != null ? t : te;
589
+ }
590
+ function on(e, t, i) {
591
+ if (K(t)) {
592
+ pe(e, t, rn);
593
+ return;
594
+ }
595
+ return En(e) ? e : R(e) ? b.object(e, t, i) : Array.isArray(e) ? b.array(e, t) : ie(e) ? b.map(e, t) : _e(e) ? b.set(e, t) : typeof e == "object" && e !== null ? e : b.box(e, t);
596
+ }
597
+ Object.assign(on, an);
598
+ var Ri = {
599
+ box: function(t, i) {
600
+ var n = Ae(i);
601
+ return new ee(t, we(n), n.name, !0, n.equals);
602
+ },
603
+ array: function(t, i) {
604
+ var n = Ae(i);
605
+ return (d.useProxies === !1 || n.proxy === !1 ? Er : br)(t, we(n), n.name);
606
+ },
607
+ map: function(t, i) {
608
+ var n = Ae(i);
609
+ return new Pn(t, we(n), n.name);
610
+ },
611
+ set: function(t, i) {
612
+ var n = Ae(i);
613
+ return new Rn(t, we(n), n.name);
614
+ },
615
+ object: function(t, i, n) {
616
+ return wn(d.useProxies === !1 || n?.proxy === !1 ? We({}, n) : hr({}, n), t, i);
617
+ },
618
+ ref: /* @__PURE__ */ T(Ti),
619
+ shallow: /* @__PURE__ */ T(Di),
620
+ deep: an,
621
+ struct: /* @__PURE__ */ T(Pi)
622
+ }, b = /* @__PURE__ */ Jn(on, Ri), sn = "computed", Vi = "computed.struct", un = /* @__PURE__ */ mt(sn), Ii = /* @__PURE__ */ mt(Vi, {
623
+ equals: Pe.structural
624
+ }), Ke = function(t, i) {
625
+ if (K(i))
626
+ return pe(t, i, un);
627
+ if (R(t))
628
+ return T(mt(sn, t));
629
+ var n = R(i) ? i : {};
630
+ return n.get = t, n.name || (n.name = t.name || ""), new ce(n);
631
+ };
632
+ Object.assign(Ke, un);
633
+ Ke.struct = /* @__PURE__ */ T(Ii);
634
+ var Ot, At, je = 0, Bi = 1, Li = (Ot = (At = /* @__PURE__ */ De(function() {
635
+ }, "name")) == null ? void 0 : At.configurable) != null ? Ot : !1, wt = {
636
+ value: "action",
637
+ configurable: !0,
638
+ writable: !1,
639
+ enumerable: !1
640
+ };
641
+ function ne(e, t, i, n) {
642
+ i === void 0 && (i = !1);
643
+ function r() {
644
+ return Ui(e, i, t, n || this, arguments);
645
+ }
646
+ return r.isMobxAction = !0, Li && (wt.value = e, Object.defineProperty(r, "name", wt)), r;
647
+ }
648
+ function Ui(e, t, i, n, r) {
649
+ var a = Mi(e, t);
650
+ try {
651
+ return i.apply(n, r);
652
+ } catch (o) {
653
+ throw a.error_ = o, o;
654
+ } finally {
655
+ Gi(a);
656
+ }
657
+ }
658
+ function Mi(e, t, i, n) {
659
+ var r = !1, a = 0, o = d.trackingDerivation, s = !t || !o;
660
+ y();
661
+ var u = d.allowStateChanges;
662
+ s && (re(), u = ke(!0));
663
+ var l = ht(!0), c = {
664
+ runAsAction_: s,
665
+ prevDerivation_: o,
666
+ prevAllowStateChanges_: u,
667
+ prevAllowStateReads_: l,
668
+ notifySpy_: r,
669
+ startTime_: a,
670
+ actionId_: Bi++,
671
+ parentActionId_: je
672
+ };
673
+ return je = c.actionId_, c;
674
+ }
675
+ function Gi(e) {
676
+ je !== e.actionId_ && m(30), je = e.parentActionId_, e.error_ !== void 0 && (d.suppressReactionErrors = !0), ye(e.prevAllowStateChanges_), se(e.prevAllowStateReads_), S(), e.runAsAction_ && U(e.prevDerivation_), d.suppressReactionErrors = !1;
677
+ }
678
+ function $i(e, t) {
679
+ var i = ke(e);
680
+ try {
681
+ return t();
682
+ } finally {
683
+ ye(i);
684
+ }
685
+ }
686
+ function ke(e) {
687
+ var t = d.allowStateChanges;
688
+ return d.allowStateChanges = e, t;
689
+ }
690
+ function ye(e) {
691
+ d.allowStateChanges = e;
692
+ }
693
+ var ln;
694
+ ln = Symbol.toPrimitive;
695
+ var ee = /* @__PURE__ */ function(e) {
696
+ Jt(t, e);
697
+ function t(n, r, a, o, s) {
698
+ var u;
699
+ return a === void 0 && (a = "ObservableValue"), s === void 0 && (s = Pe.default), u = e.call(this, a) || this, u.enhancer = void 0, u.name_ = void 0, u.equals = void 0, u.hasUnreportedChange_ = !1, u.interceptors_ = void 0, u.changeListeners_ = void 0, u.value_ = void 0, u.dehancer = void 0, u.enhancer = r, u.name_ = a, u.equals = s, u.value_ = r(n, void 0, a), u;
700
+ }
701
+ var i = t.prototype;
702
+ return i.dehanceValue = function(r) {
703
+ return this.dehancer !== void 0 ? this.dehancer(r) : r;
704
+ }, i.set = function(r) {
705
+ this.value_, r = this.prepareNewValue_(r), r !== d.UNCHANGED && this.setNewValue_(r);
706
+ }, i.prepareNewValue_ = function(r) {
707
+ if (N(this)) {
708
+ var a = O(this, {
709
+ object: this,
710
+ type: D,
711
+ newValue: r
712
+ });
713
+ if (!a)
714
+ return d.UNCHANGED;
715
+ r = a.newValue;
716
+ }
717
+ return r = this.enhancer(r, this.value_, this.name_), this.equals(this.value_, r) ? d.UNCHANGED : r;
718
+ }, i.setNewValue_ = function(r) {
719
+ var a = this.value_;
720
+ this.value_ = r, this.reportChanged(), A(this) && w(this, {
721
+ type: D,
722
+ object: this,
723
+ newValue: r,
724
+ oldValue: a
725
+ });
726
+ }, i.get = function() {
727
+ return this.reportObserved(), this.dehanceValue(this.value_);
728
+ }, i.intercept_ = function(r) {
729
+ return Se(this, r);
730
+ }, i.observe_ = function(r, a) {
731
+ return a && r({
732
+ observableKind: "value",
733
+ debugObjectName: this.name_,
734
+ object: this,
735
+ type: D,
736
+ newValue: this.value_,
737
+ oldValue: void 0
738
+ }), Ne(this, r);
739
+ }, i.raw = function() {
740
+ return this.value_;
741
+ }, i.toJSON = function() {
742
+ return this.get();
743
+ }, i.toString = function() {
744
+ return this.name_ + "[" + this.value_ + "]";
745
+ }, i.valueOf = function() {
746
+ return Xt(this.get());
747
+ }, i[ln] = function() {
748
+ return this.valueOf();
749
+ }, t;
750
+ }(ge), dn;
751
+ dn = Symbol.toPrimitive;
752
+ var ce = /* @__PURE__ */ function() {
753
+ function e(i) {
754
+ this.dependenciesState_ = v.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.isBeingObserved_ = !1, this.isPendingUnobservation_ = !1, this.observers_ = /* @__PURE__ */ new Set(), this.diffValue_ = 0, this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = v.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new xe(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.isComputing_ = !1, this.isRunningSetter_ = !1, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = $.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, i.get || m(31), this.derivation = i.get, this.name_ = i.name || "ComputedValue", i.set && (this.setter_ = ne("ComputedValue-setter", i.set)), this.equals_ = i.equals || (i.compareStructural || i.struct ? Pe.structural : Pe.default), this.scope_ = i.context, this.requiresReaction_ = i.requiresReaction, this.keepAlive_ = !!i.keepAlive;
755
+ }
756
+ var t = e.prototype;
757
+ return t.onBecomeStale_ = function() {
758
+ Wi(this);
759
+ }, t.onBO = function() {
760
+ this.onBOL && this.onBOL.forEach(function(n) {
761
+ return n();
762
+ });
763
+ }, t.onBUO = function() {
764
+ this.onBUOL && this.onBUOL.forEach(function(n) {
765
+ return n();
766
+ });
767
+ }, t.get = function() {
768
+ if (this.isComputing_ && m(32, this.name_, this.derivation), d.inBatch === 0 && // !globalState.trackingDerivatpion &&
769
+ this.observers_.size === 0 && !this.keepAlive_)
770
+ rt(this) && (this.warnAboutUntrackedRead_(), y(), this.value_ = this.computeValue_(!1), S());
771
+ else if (_n(this), rt(this)) {
772
+ var n = d.trackingContext;
773
+ this.keepAlive_ && !n && (d.trackingContext = this), this.trackAndCompute() && qi(this), d.trackingContext = n;
774
+ }
775
+ var r = this.value_;
776
+ if (Fe(r))
777
+ throw r.cause;
778
+ return r;
779
+ }, t.set = function(n) {
780
+ if (this.setter_) {
781
+ this.isRunningSetter_ && m(33, this.name_), this.isRunningSetter_ = !0;
782
+ try {
783
+ this.setter_.call(this.scope_, n);
784
+ } finally {
785
+ this.isRunningSetter_ = !1;
786
+ }
787
+ } else
788
+ m(34, this.name_);
789
+ }, t.trackAndCompute = function() {
790
+ var n = this.value_, r = (
791
+ /* see #1208 */
792
+ this.dependenciesState_ === v.NOT_TRACKING_
793
+ ), a = this.computeValue_(!0), o = r || Fe(n) || Fe(a) || !this.equals_(n, a);
794
+ return o && (this.value_ = a), o;
795
+ }, t.computeValue_ = function(n) {
796
+ this.isComputing_ = !0;
797
+ var r = ke(!1), a;
798
+ if (n)
799
+ a = cn(this, this.derivation, this.scope_);
800
+ else if (d.disableErrorBoundaries === !0)
801
+ a = this.derivation.call(this.scope_);
802
+ else
803
+ try {
804
+ a = this.derivation.call(this.scope_);
805
+ } catch (o) {
806
+ a = new xe(o);
807
+ }
808
+ return ye(r), this.isComputing_ = !1, a;
809
+ }, t.suspend_ = function() {
810
+ this.keepAlive_ || (at(this), this.value_ = void 0);
811
+ }, t.observe_ = function(n, r) {
812
+ var a = this, o = !0, s = void 0;
813
+ return ir(function() {
814
+ var u = a.get();
815
+ if (!o || r) {
816
+ var l = re();
817
+ n({
818
+ observableKind: "computed",
819
+ debugObjectName: a.name_,
820
+ type: D,
821
+ object: a,
822
+ newValue: u,
823
+ oldValue: s
824
+ }), U(l);
825
+ }
826
+ o = !1, s = u;
827
+ });
828
+ }, t.warnAboutUntrackedRead_ = function() {
829
+ }, t.toString = function() {
830
+ return this.name_ + "[" + this.derivation.toString() + "]";
831
+ }, t.valueOf = function() {
832
+ return Xt(this.get());
833
+ }, t[dn] = function() {
834
+ return this.valueOf();
835
+ }, e;
836
+ }(), ze = /* @__PURE__ */ q("ComputedValue", ce), v;
837
+ (function(e) {
838
+ e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_";
839
+ })(v || (v = {}));
840
+ var $;
841
+ (function(e) {
842
+ e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
843
+ })($ || ($ = {}));
844
+ var xe = function(t) {
845
+ this.cause = void 0, this.cause = t;
846
+ };
847
+ function Fe(e) {
848
+ return e instanceof xe;
849
+ }
850
+ function rt(e) {
851
+ switch (e.dependenciesState_) {
852
+ case v.UP_TO_DATE_:
853
+ return !1;
854
+ case v.NOT_TRACKING_:
855
+ case v.STALE_:
856
+ return !0;
857
+ case v.POSSIBLY_STALE_: {
858
+ for (var t = ht(!0), i = re(), n = e.observing_, r = n.length, a = 0; a < r; a++) {
859
+ var o = n[a];
860
+ if (ze(o)) {
861
+ if (d.disableErrorBoundaries)
862
+ o.get();
863
+ else
864
+ try {
865
+ o.get();
866
+ } catch {
867
+ return U(i), se(t), !0;
868
+ }
869
+ if (e.dependenciesState_ === v.STALE_)
870
+ return U(i), se(t), !0;
871
+ }
872
+ }
873
+ return vn(e), U(i), se(t), !1;
874
+ }
875
+ }
876
+ }
877
+ function cn(e, t, i) {
878
+ var n = ht(!0);
879
+ vn(e), e.newObserving_ = new Array(e.observing_.length + 100), e.unboundDepsCount_ = 0, e.runId_ = ++d.runId;
880
+ var r = d.trackingDerivation;
881
+ d.trackingDerivation = e, d.inBatch++;
882
+ var a;
883
+ if (d.disableErrorBoundaries === !0)
884
+ a = t.call(i);
885
+ else
886
+ try {
887
+ a = t.call(i);
888
+ } catch (o) {
889
+ a = new xe(o);
890
+ }
891
+ return d.inBatch--, d.trackingDerivation = r, Ki(e), se(n), a;
892
+ }
893
+ function Ki(e) {
894
+ for (var t = e.observing_, i = e.observing_ = e.newObserving_, n = v.UP_TO_DATE_, r = 0, a = e.unboundDepsCount_, o = 0; o < a; o++) {
895
+ var s = i[o];
896
+ s.diffValue_ === 0 && (s.diffValue_ = 1, r !== o && (i[r] = s), r++), s.dependenciesState_ > n && (n = s.dependenciesState_);
897
+ }
898
+ for (i.length = r, e.newObserving_ = null, a = t.length; a--; ) {
899
+ var u = t[a];
900
+ u.diffValue_ === 0 && mn(u, e), u.diffValue_ = 0;
901
+ }
902
+ for (; r--; ) {
903
+ var l = i[r];
904
+ l.diffValue_ === 1 && (l.diffValue_ = 0, zi(l, e));
905
+ }
906
+ n !== v.UP_TO_DATE_ && (e.dependenciesState_ = n, e.onBecomeStale_());
907
+ }
908
+ function at(e) {
909
+ var t = e.observing_;
910
+ e.observing_ = [];
911
+ for (var i = t.length; i--; )
912
+ mn(t[i], e);
913
+ e.dependenciesState_ = v.NOT_TRACKING_;
914
+ }
915
+ function fn(e) {
916
+ var t = re();
917
+ try {
918
+ return e();
919
+ } finally {
920
+ U(t);
921
+ }
922
+ }
923
+ function re() {
924
+ var e = d.trackingDerivation;
925
+ return d.trackingDerivation = null, e;
926
+ }
927
+ function U(e) {
928
+ d.trackingDerivation = e;
929
+ }
930
+ function ht(e) {
931
+ var t = d.allowStateReads;
932
+ return d.allowStateReads = e, t;
933
+ }
934
+ function se(e) {
935
+ d.allowStateReads = e;
936
+ }
937
+ function vn(e) {
938
+ if (e.dependenciesState_ !== v.UP_TO_DATE_) {
939
+ e.dependenciesState_ = v.UP_TO_DATE_;
940
+ for (var t = e.observing_, i = t.length; i--; )
941
+ t[i].lowestObserverState_ = v.UP_TO_DATE_;
942
+ }
943
+ }
944
+ var Xe = function() {
945
+ this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0;
946
+ }, Je = !0, d = /* @__PURE__ */ function() {
947
+ var e = /* @__PURE__ */ Gt();
948
+ return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Je = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Xe().version && (Je = !1), Je ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new Xe()) : (setTimeout(function() {
949
+ m(35);
950
+ }, 1), new Xe());
951
+ }();
952
+ function zi(e, t) {
953
+ e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_);
954
+ }
955
+ function mn(e, t) {
956
+ e.observers_.delete(t), e.observers_.size === 0 && hn(e);
957
+ }
958
+ function hn(e) {
959
+ e.isPendingUnobservation_ === !1 && (e.isPendingUnobservation_ = !0, d.pendingUnobservations.push(e));
960
+ }
961
+ function y() {
962
+ d.inBatch++;
963
+ }
964
+ function S() {
965
+ if (--d.inBatch === 0) {
966
+ gn();
967
+ for (var e = d.pendingUnobservations, t = 0; t < e.length; t++) {
968
+ var i = e[t];
969
+ i.isPendingUnobservation_ = !1, i.observers_.size === 0 && (i.isBeingObserved_ && (i.isBeingObserved_ = !1, i.onBUO()), i instanceof ce && i.suspend_());
970
+ }
971
+ d.pendingUnobservations = [];
972
+ }
973
+ }
974
+ function _n(e) {
975
+ var t = d.trackingDerivation;
976
+ return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved_ && d.trackingContext && (e.isBeingObserved_ = !0, e.onBO())), !0) : (e.observers_.size === 0 && d.inBatch > 0 && hn(e), !1);
977
+ }
978
+ function pn(e) {
979
+ e.lowestObserverState_ !== v.STALE_ && (e.lowestObserverState_ = v.STALE_, e.observers_.forEach(function(t) {
980
+ t.dependenciesState_ === v.UP_TO_DATE_ && t.onBecomeStale_(), t.dependenciesState_ = v.STALE_;
981
+ }));
982
+ }
983
+ function qi(e) {
984
+ e.lowestObserverState_ !== v.STALE_ && (e.lowestObserverState_ = v.STALE_, e.observers_.forEach(function(t) {
985
+ t.dependenciesState_ === v.POSSIBLY_STALE_ ? t.dependenciesState_ = v.STALE_ : t.dependenciesState_ === v.UP_TO_DATE_ && (e.lowestObserverState_ = v.UP_TO_DATE_);
986
+ }));
987
+ }
988
+ function Wi(e) {
989
+ e.lowestObserverState_ === v.UP_TO_DATE_ && (e.lowestObserverState_ = v.POSSIBLY_STALE_, e.observers_.forEach(function(t) {
990
+ t.dependenciesState_ === v.UP_TO_DATE_ && (t.dependenciesState_ = v.POSSIBLY_STALE_, t.onBecomeStale_());
991
+ }));
992
+ }
993
+ var ot = /* @__PURE__ */ function() {
994
+ function e(i, n, r, a) {
995
+ i === void 0 && (i = "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = v.NOT_TRACKING_, this.diffValue_ = 0, this.runId_ = 0, this.unboundDepsCount_ = 0, this.isDisposed_ = !1, this.isScheduled_ = !1, this.isTrackPending_ = !1, this.isRunning_ = !1, this.isTracing_ = $.NONE, this.name_ = i, this.onInvalidate_ = n, this.errorHandler_ = r, this.requiresObservable_ = a;
996
+ }
997
+ var t = e.prototype;
998
+ return t.onBecomeStale_ = function() {
999
+ this.schedule_();
1000
+ }, t.schedule_ = function() {
1001
+ this.isScheduled_ || (this.isScheduled_ = !0, d.pendingReactions.push(this), gn());
1002
+ }, t.isScheduled = function() {
1003
+ return this.isScheduled_;
1004
+ }, t.runReaction_ = function() {
1005
+ if (!this.isDisposed_) {
1006
+ y(), this.isScheduled_ = !1;
1007
+ var n = d.trackingContext;
1008
+ if (d.trackingContext = this, rt(this)) {
1009
+ this.isTrackPending_ = !0;
1010
+ try {
1011
+ this.onInvalidate_();
1012
+ } catch (r) {
1013
+ this.reportExceptionInDerivation_(r);
1014
+ }
1015
+ }
1016
+ d.trackingContext = n, S();
1017
+ }
1018
+ }, t.track = function(n) {
1019
+ if (!this.isDisposed_) {
1020
+ y(), this.isRunning_ = !0;
1021
+ var r = d.trackingContext;
1022
+ d.trackingContext = this;
1023
+ var a = cn(this, n, void 0);
1024
+ d.trackingContext = r, this.isRunning_ = !1, this.isTrackPending_ = !1, this.isDisposed_ && at(this), Fe(a) && this.reportExceptionInDerivation_(a.cause), S();
1025
+ }
1026
+ }, t.reportExceptionInDerivation_ = function(n) {
1027
+ var r = this;
1028
+ if (this.errorHandler_) {
1029
+ this.errorHandler_(n, this);
1030
+ return;
1031
+ }
1032
+ if (d.disableErrorBoundaries)
1033
+ throw n;
1034
+ var a = "[mobx] uncaught error in '" + this + "'";
1035
+ d.suppressReactionErrors || console.error(a, n), d.globalReactionErrorHandlers.forEach(function(o) {
1036
+ return o(n, r);
1037
+ });
1038
+ }, t.dispose = function() {
1039
+ this.isDisposed_ || (this.isDisposed_ = !0, this.isRunning_ || (y(), at(this), S()));
1040
+ }, t.getDisposer_ = function() {
1041
+ var n = this.dispose.bind(this);
1042
+ return n[f] = this, n;
1043
+ }, t.toString = function() {
1044
+ return "Reaction[" + this.name_ + "]";
1045
+ }, t.trace = function(n) {
1046
+ n === void 0 && (n = !1), fr(this, n);
1047
+ }, e;
1048
+ }(), Hi = 100, Xi = function(t) {
1049
+ return t();
1050
+ };
1051
+ function gn() {
1052
+ d.inBatch > 0 || d.isRunningReactions || Xi(Ji);
1053
+ }
1054
+ function Ji() {
1055
+ d.isRunningReactions = !0;
1056
+ for (var e = d.pendingReactions, t = 0; e.length > 0; ) {
1057
+ ++t === Hi && (console.error("[mobx] cycle in reaction: " + e[0]), e.splice(0));
1058
+ for (var i = e.splice(0), n = 0, r = i.length; n < r; n++)
1059
+ i[n].runReaction_();
1060
+ }
1061
+ d.isRunningReactions = !1;
1062
+ }
1063
+ var Re = /* @__PURE__ */ q("Reaction", ot);
1064
+ function ue() {
1065
+ return !1;
1066
+ }
1067
+ function Yi(e) {
1068
+ return console.warn("[mobx.spy] Is a no-op in production builds"), function() {
1069
+ };
1070
+ }
1071
+ var bn = "action", Qi = "action.bound", kn = "autoAction", Zi = "autoAction.bound", er = "<unnamed action>", yn = /* @__PURE__ */ be(bn), tr = /* @__PURE__ */ be(Qi, {
1072
+ bound: !0
1073
+ }), Sn = /* @__PURE__ */ be(kn, {
1074
+ autoAction: !0
1075
+ }), nr = /* @__PURE__ */ be(Zi, {
1076
+ autoAction: !0,
1077
+ bound: !0
1078
+ });
1079
+ function Nn(e) {
1080
+ var t = function(n, r) {
1081
+ if (C(n))
1082
+ return ne(n.name || er, n, e);
1083
+ if (C(r))
1084
+ return ne(n, r, e);
1085
+ if (K(r))
1086
+ return pe(n, r, e ? Sn : yn);
1087
+ if (K(n))
1088
+ return T(be(e ? kn : bn, {
1089
+ name: n,
1090
+ autoAction: e
1091
+ }));
1092
+ };
1093
+ return t;
1094
+ }
1095
+ var Z = /* @__PURE__ */ Nn(!1);
1096
+ Object.assign(Z, yn);
1097
+ var fe = /* @__PURE__ */ Nn(!0);
1098
+ Object.assign(fe, Sn);
1099
+ Z.bound = /* @__PURE__ */ T(tr);
1100
+ fe.bound = /* @__PURE__ */ T(nr);
1101
+ function _t(e) {
1102
+ return C(e) && e.isMobxAction === !0;
1103
+ }
1104
+ function ir(e, t) {
1105
+ var i, n;
1106
+ t === void 0 && (t = $t);
1107
+ var r = (i = (n = t) == null ? void 0 : n.name) != null ? i : "Autorun", a = !t.scheduler && !t.delay, o;
1108
+ if (a)
1109
+ o = new ot(r, function() {
1110
+ this.track(l);
1111
+ }, t.onError, t.requiresObservable);
1112
+ else {
1113
+ var s = ar(t), u = !1;
1114
+ o = new ot(r, function() {
1115
+ u || (u = !0, s(function() {
1116
+ u = !1, o.isDisposed_ || o.track(l);
1117
+ }));
1118
+ }, t.onError, t.requiresObservable);
1119
+ }
1120
+ function l() {
1121
+ e(o);
1122
+ }
1123
+ return o.schedule_(), o.getDisposer_();
1124
+ }
1125
+ var rr = function(t) {
1126
+ return t();
1127
+ };
1128
+ function ar(e) {
1129
+ return e.scheduler ? e.scheduler : e.delay ? function(t) {
1130
+ return setTimeout(t, e.delay);
1131
+ } : rr;
1132
+ }
1133
+ var or = "onBO", sr = "onBUO";
1134
+ function ur(e, t, i) {
1135
+ return An(or, e, t, i);
1136
+ }
1137
+ function On(e, t, i) {
1138
+ return An(sr, e, t, i);
1139
+ }
1140
+ function An(e, t, i, n) {
1141
+ var r = typeof n == "function" ? z(t, i) : z(t), a = C(n) ? n : i, o = e + "L";
1142
+ return r[o] ? r[o].add(a) : r[o] = /* @__PURE__ */ new Set([a]), function() {
1143
+ var s = r[o];
1144
+ s && (s.delete(a), s.size === 0 && delete r[o]);
1145
+ };
1146
+ }
1147
+ function wn(e, t, i, n) {
1148
+ var r = ei(t), a = We(e, n)[f];
1149
+ y();
1150
+ try {
1151
+ le(r).forEach(function(o) {
1152
+ a.extend_(
1153
+ o,
1154
+ r[o],
1155
+ // must pass "undefined" for { key: undefined }
1156
+ i && o in i ? i[o] : !0
1157
+ );
1158
+ });
1159
+ } finally {
1160
+ S();
1161
+ }
1162
+ return e;
1163
+ }
1164
+ var lr = 0;
1165
+ function Cn() {
1166
+ this.message = "FLOW_CANCELLED";
1167
+ }
1168
+ Cn.prototype = /* @__PURE__ */ Object.create(Error.prototype);
1169
+ var Ct = /* @__PURE__ */ Zt("flow"), dr = /* @__PURE__ */ Zt("flow.bound", {
1170
+ bound: !0
1171
+ }), ve = /* @__PURE__ */ Object.assign(function(t, i) {
1172
+ if (K(i))
1173
+ return pe(t, i, Ct);
1174
+ var n = t, r = n.name || "<unnamed flow>", a = function() {
1175
+ var s = this, u = arguments, l = ++lr, c = Z(r + " - runid: " + l + " - init", n).apply(s, u), h, _ = void 0, P = new Promise(function(H, E) {
1176
+ var F = 0;
1177
+ h = E;
1178
+ function Oe(k) {
1179
+ _ = void 0;
1180
+ var I;
1181
+ try {
1182
+ I = Z(r + " - runid: " + l + " - yield " + F++, c.next).call(c, k);
1183
+ } catch (G) {
1184
+ return E(G);
1185
+ }
1186
+ oe(I);
1187
+ }
1188
+ function He(k) {
1189
+ _ = void 0;
1190
+ var I;
1191
+ try {
1192
+ I = Z(r + " - runid: " + l + " - yield " + F++, c.throw).call(c, k);
1193
+ } catch (G) {
1194
+ return E(G);
1195
+ }
1196
+ oe(I);
1197
+ }
1198
+ function oe(k) {
1199
+ if (C(k?.then)) {
1200
+ k.then(oe, E);
1201
+ return;
1202
+ }
1203
+ return k.done ? H(k.value) : (_ = Promise.resolve(k.value), _.then(Oe, He));
1204
+ }
1205
+ Oe(void 0);
1206
+ });
1207
+ return P.cancel = Z(r + " - runid: " + l + " - cancel", function() {
1208
+ try {
1209
+ _ && Et(_);
1210
+ var H = c.return(void 0), E = Promise.resolve(H.value);
1211
+ E.then(J, J), Et(E), h(new Cn());
1212
+ } catch (F) {
1213
+ h(F);
1214
+ }
1215
+ }), P;
1216
+ };
1217
+ return a.isMobXFlow = !0, a;
1218
+ }, Ct);
1219
+ ve.bound = /* @__PURE__ */ T(dr);
1220
+ function Et(e) {
1221
+ C(e.cancel) && e.cancel();
1222
+ }
1223
+ function Ve(e) {
1224
+ return e?.isMobXFlow === !0;
1225
+ }
1226
+ function cr(e, t) {
1227
+ return e ? t !== void 0 ? me(e) ? e[f].values_.has(t) : !1 : me(e) || !!e[f] || vt(e) || Re(e) || ze(e) : !1;
1228
+ }
1229
+ function En(e) {
1230
+ return cr(e);
1231
+ }
1232
+ function fr() {
1233
+ m("trace() is not available in production builds");
1234
+ for (var e = !1, t = arguments.length, i = new Array(t), n = 0; n < t; n++)
1235
+ i[n] = arguments[n];
1236
+ typeof i[i.length - 1] == "boolean" && (e = i.pop());
1237
+ var r = vr(i);
1238
+ if (!r)
1239
+ return m("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");
1240
+ r.isTracing_ === $.NONE && console.log("[mobx.trace] '" + r.name_ + "' tracing enabled"), r.isTracing_ = e ? $.BREAK : $.LOG;
1241
+ }
1242
+ function vr(e) {
1243
+ switch (e.length) {
1244
+ case 0:
1245
+ return d.trackingDerivation;
1246
+ case 1:
1247
+ return z(e[0]);
1248
+ case 2:
1249
+ return z(e[0], e[1]);
1250
+ }
1251
+ }
1252
+ function j(e, t) {
1253
+ t === void 0 && (t = void 0), y();
1254
+ try {
1255
+ return e.apply(t);
1256
+ } finally {
1257
+ S();
1258
+ }
1259
+ }
1260
+ function X(e) {
1261
+ return e[f];
1262
+ }
1263
+ var mr = {
1264
+ has: function(t, i) {
1265
+ return X(t).has_(i);
1266
+ },
1267
+ get: function(t, i) {
1268
+ return X(t).get_(i);
1269
+ },
1270
+ set: function(t, i, n) {
1271
+ var r;
1272
+ return K(i) ? (r = X(t).set_(i, n, !0)) != null ? r : !0 : !1;
1273
+ },
1274
+ deleteProperty: function(t, i) {
1275
+ var n;
1276
+ return K(i) ? (n = X(t).delete_(i, !0)) != null ? n : !0 : !1;
1277
+ },
1278
+ defineProperty: function(t, i, n) {
1279
+ var r;
1280
+ return (r = X(t).defineProperty_(i, n)) != null ? r : !0;
1281
+ },
1282
+ ownKeys: function(t) {
1283
+ return X(t).ownKeys_();
1284
+ },
1285
+ preventExtensions: function(t) {
1286
+ m(13);
1287
+ }
1288
+ };
1289
+ function hr(e, t) {
1290
+ var i, n;
1291
+ return Kt(), e = We(e, t), (n = (i = e[f]).proxy_) != null ? n : i.proxy_ = new Proxy(e, mr);
1292
+ }
1293
+ function N(e) {
1294
+ return e.interceptors_ !== void 0 && e.interceptors_.length > 0;
1295
+ }
1296
+ function Se(e, t) {
1297
+ var i = e.interceptors_ || (e.interceptors_ = []);
1298
+ return i.push(t), zt(function() {
1299
+ var n = i.indexOf(t);
1300
+ n !== -1 && i.splice(n, 1);
1301
+ });
1302
+ }
1303
+ function O(e, t) {
1304
+ var i = re();
1305
+ try {
1306
+ for (var n = [].concat(e.interceptors_ || []), r = 0, a = n.length; r < a && (t = n[r](t), t && !t.type && m(14), !!t); r++)
1307
+ ;
1308
+ return t;
1309
+ } finally {
1310
+ U(i);
1311
+ }
1312
+ }
1313
+ function A(e) {
1314
+ return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0;
1315
+ }
1316
+ function Ne(e, t) {
1317
+ var i = e.changeListeners_ || (e.changeListeners_ = []);
1318
+ return i.push(t), zt(function() {
1319
+ var n = i.indexOf(t);
1320
+ n !== -1 && i.splice(n, 1);
1321
+ });
1322
+ }
1323
+ function w(e, t) {
1324
+ var i = re(), n = e.changeListeners_;
1325
+ if (n) {
1326
+ n = n.slice();
1327
+ for (var r = 0, a = n.length; r < a; r++)
1328
+ n[r](t);
1329
+ U(i);
1330
+ }
1331
+ }
1332
+ var Ye = /* @__PURE__ */ Symbol("mobx-keys");
1333
+ function _r(e, t, i) {
1334
+ if (R(e))
1335
+ return wn(e, e, t, i);
1336
+ var n = We(e, i)[f];
1337
+ if (!e[Ye]) {
1338
+ var r = Object.getPrototypeOf(e), a = new Set([].concat(le(e), le(r)));
1339
+ a.delete("constructor"), a.delete(f), Me(r, Ye, a);
1340
+ }
1341
+ y();
1342
+ try {
1343
+ e[Ye].forEach(function(o) {
1344
+ return n.make_(
1345
+ o,
1346
+ // must pass "undefined" for { key: undefined }
1347
+ t && o in t ? t[o] : !0
1348
+ );
1349
+ });
1350
+ } finally {
1351
+ S();
1352
+ }
1353
+ return e;
1354
+ }
1355
+ var Ft = "splice", D = "update", pr = 1e4, gr = {
1356
+ get: function(t, i) {
1357
+ var n = t[f];
1358
+ return i === f ? n : i === "length" ? n.getArrayLength_() : typeof i == "string" && !isNaN(i) ? n.get_(parseInt(i)) : L(Ie, i) ? Ie[i] : t[i];
1359
+ },
1360
+ set: function(t, i, n) {
1361
+ var r = t[f];
1362
+ return i === "length" && r.setArrayLength_(n), typeof i == "symbol" || isNaN(i) ? t[i] = n : r.set_(parseInt(i), n), !0;
1363
+ },
1364
+ preventExtensions: function() {
1365
+ m(15);
1366
+ }
1367
+ }, pt = /* @__PURE__ */ function() {
1368
+ function e(i, n, r, a) {
1369
+ i === void 0 && (i = "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = r, this.legacyMode_ = a, this.atom_ = new ge(i), this.enhancer_ = function(o, s) {
1370
+ return n(o, s, "ObservableArray[..]");
1371
+ };
1372
+ }
1373
+ var t = e.prototype;
1374
+ return t.dehanceValue_ = function(n) {
1375
+ return this.dehancer !== void 0 ? this.dehancer(n) : n;
1376
+ }, t.dehanceValues_ = function(n) {
1377
+ return this.dehancer !== void 0 && n.length > 0 ? n.map(this.dehancer) : n;
1378
+ }, t.intercept_ = function(n) {
1379
+ return Se(this, n);
1380
+ }, t.observe_ = function(n, r) {
1381
+ return r === void 0 && (r = !1), r && n({
1382
+ observableKind: "array",
1383
+ object: this.proxy_,
1384
+ debugObjectName: this.atom_.name_,
1385
+ type: "splice",
1386
+ index: 0,
1387
+ added: this.values_.slice(),
1388
+ addedCount: this.values_.length,
1389
+ removed: [],
1390
+ removedCount: 0
1391
+ }), Ne(this, n);
1392
+ }, t.getArrayLength_ = function() {
1393
+ return this.atom_.reportObserved(), this.values_.length;
1394
+ }, t.setArrayLength_ = function(n) {
1395
+ (typeof n != "number" || isNaN(n) || n < 0) && m("Out of range: " + n);
1396
+ var r = this.values_.length;
1397
+ if (n !== r)
1398
+ if (n > r) {
1399
+ for (var a = new Array(n - r), o = 0; o < n - r; o++)
1400
+ a[o] = void 0;
1401
+ this.spliceWithArray_(r, 0, a);
1402
+ } else
1403
+ this.spliceWithArray_(n, r - n);
1404
+ }, t.updateArrayLength_ = function(n, r) {
1405
+ n !== this.lastKnownLength_ && m(16), this.lastKnownLength_ += r, this.legacyMode_ && r > 0 && Bn(n + r + 1);
1406
+ }, t.spliceWithArray_ = function(n, r, a) {
1407
+ var o = this;
1408
+ this.atom_;
1409
+ var s = this.values_.length;
1410
+ if (n === void 0 ? n = 0 : n > s ? n = s : n < 0 && (n = Math.max(0, s + n)), arguments.length === 1 ? r = s - n : r == null ? r = 0 : r = Math.max(0, Math.min(r, s - n)), a === void 0 && (a = nt), N(this)) {
1411
+ var u = O(this, {
1412
+ object: this.proxy_,
1413
+ type: Ft,
1414
+ index: n,
1415
+ removedCount: r,
1416
+ added: a
1417
+ });
1418
+ if (!u)
1419
+ return nt;
1420
+ r = u.removedCount, a = u.added;
1421
+ }
1422
+ if (a = a.length === 0 ? a : a.map(function(h) {
1423
+ return o.enhancer_(h, void 0);
1424
+ }), this.legacyMode_) {
1425
+ var l = a.length - r;
1426
+ this.updateArrayLength_(s, l);
1427
+ }
1428
+ var c = this.spliceItemsIntoValues_(n, r, a);
1429
+ return (r !== 0 || a.length !== 0) && this.notifyArraySplice_(n, a, c), this.dehanceValues_(c);
1430
+ }, t.spliceItemsIntoValues_ = function(n, r, a) {
1431
+ if (a.length < pr) {
1432
+ var o;
1433
+ return (o = this.values_).splice.apply(o, [n, r].concat(a));
1434
+ } else {
1435
+ var s = this.values_.slice(n, n + r), u = this.values_.slice(n + r);
1436
+ this.values_.length += a.length - r;
1437
+ for (var l = 0; l < a.length; l++)
1438
+ this.values_[n + l] = a[l];
1439
+ for (var c = 0; c < u.length; c++)
1440
+ this.values_[n + a.length + c] = u[c];
1441
+ return s;
1442
+ }
1443
+ }, t.notifyArrayChildUpdate_ = function(n, r, a) {
1444
+ var o = !this.owned_ && ue(), s = A(this), u = s || o ? {
1445
+ observableKind: "array",
1446
+ object: this.proxy_,
1447
+ type: D,
1448
+ debugObjectName: this.atom_.name_,
1449
+ index: n,
1450
+ newValue: r,
1451
+ oldValue: a
1452
+ } : null;
1453
+ this.atom_.reportChanged(), s && w(this, u);
1454
+ }, t.notifyArraySplice_ = function(n, r, a) {
1455
+ var o = !this.owned_ && ue(), s = A(this), u = s || o ? {
1456
+ observableKind: "array",
1457
+ object: this.proxy_,
1458
+ debugObjectName: this.atom_.name_,
1459
+ type: Ft,
1460
+ index: n,
1461
+ removed: a,
1462
+ added: r,
1463
+ removedCount: a.length,
1464
+ addedCount: r.length
1465
+ } : null;
1466
+ this.atom_.reportChanged(), s && w(this, u);
1467
+ }, t.get_ = function(n) {
1468
+ if (n < this.values_.length)
1469
+ return this.atom_.reportObserved(), this.dehanceValue_(this.values_[n]);
1470
+ console.warn("[mobx.array] Attempt to read an array index (" + n + ") that is out of bounds (" + this.values_.length + "). Please check length first. Out of bound indices will not be tracked by MobX");
1471
+ }, t.set_ = function(n, r) {
1472
+ var a = this.values_;
1473
+ if (n < a.length) {
1474
+ this.atom_;
1475
+ var o = a[n];
1476
+ if (N(this)) {
1477
+ var s = O(this, {
1478
+ type: D,
1479
+ object: this.proxy_,
1480
+ index: n,
1481
+ newValue: r
1482
+ });
1483
+ if (!s)
1484
+ return;
1485
+ r = s.newValue;
1486
+ }
1487
+ r = this.enhancer_(r, o);
1488
+ var u = r !== o;
1489
+ u && (a[n] = r, this.notifyArrayChildUpdate_(n, r, o));
1490
+ } else
1491
+ n === a.length ? this.spliceWithArray_(n, 0, [r]) : m(17, n, a.length);
1492
+ }, e;
1493
+ }();
1494
+ function br(e, t, i, n) {
1495
+ i === void 0 && (i = "ObservableArray"), n === void 0 && (n = !1), Kt();
1496
+ var r = new pt(i, t, n, !1);
1497
+ Wt(r.values_, f, r);
1498
+ var a = new Proxy(r.values_, gr);
1499
+ if (r.proxy_ = a, e && e.length) {
1500
+ var o = ke(!0);
1501
+ r.spliceWithArray_(0, 0, e), ye(o);
1502
+ }
1503
+ return a;
1504
+ }
1505
+ var Ie = {
1506
+ clear: function() {
1507
+ return this.splice(0);
1508
+ },
1509
+ replace: function(t) {
1510
+ var i = this[f];
1511
+ return i.spliceWithArray_(0, i.values_.length, t);
1512
+ },
1513
+ // Used by JSON.stringify
1514
+ toJSON: function() {
1515
+ return this.slice();
1516
+ },
1517
+ /*
1518
+ * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)
1519
+ * since these functions alter the inner structure of the array, the have side effects.
1520
+ * Because the have side effects, they should not be used in computed function,
1521
+ * and for that reason the do not call dependencyState.notifyObserved
1522
+ */
1523
+ splice: function(t, i) {
1524
+ for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++)
1525
+ r[a - 2] = arguments[a];
1526
+ var o = this[f];
1527
+ switch (arguments.length) {
1528
+ case 0:
1529
+ return [];
1530
+ case 1:
1531
+ return o.spliceWithArray_(t);
1532
+ case 2:
1533
+ return o.spliceWithArray_(t, i);
1534
+ }
1535
+ return o.spliceWithArray_(t, i, r);
1536
+ },
1537
+ spliceWithArray: function(t, i, n) {
1538
+ return this[f].spliceWithArray_(t, i, n);
1539
+ },
1540
+ push: function() {
1541
+ for (var t = this[f], i = arguments.length, n = new Array(i), r = 0; r < i; r++)
1542
+ n[r] = arguments[r];
1543
+ return t.spliceWithArray_(t.values_.length, 0, n), t.values_.length;
1544
+ },
1545
+ pop: function() {
1546
+ return this.splice(Math.max(this[f].values_.length - 1, 0), 1)[0];
1547
+ },
1548
+ shift: function() {
1549
+ return this.splice(0, 1)[0];
1550
+ },
1551
+ unshift: function() {
1552
+ for (var t = this[f], i = arguments.length, n = new Array(i), r = 0; r < i; r++)
1553
+ n[r] = arguments[r];
1554
+ return t.spliceWithArray_(0, 0, n), t.values_.length;
1555
+ },
1556
+ reverse: function() {
1557
+ return d.trackingDerivation && m(37, "reverse"), this.replace(this.slice().reverse()), this;
1558
+ },
1559
+ sort: function() {
1560
+ d.trackingDerivation && m(37, "sort");
1561
+ var t = this.slice();
1562
+ return t.sort.apply(t, arguments), this.replace(t), this;
1563
+ },
1564
+ remove: function(t) {
1565
+ var i = this[f], n = i.dehanceValues_(i.values_).indexOf(t);
1566
+ return n > -1 ? (this.splice(n, 1), !0) : !1;
1567
+ }
1568
+ };
1569
+ p("concat", V);
1570
+ p("flat", V);
1571
+ p("includes", V);
1572
+ p("indexOf", V);
1573
+ p("join", V);
1574
+ p("lastIndexOf", V);
1575
+ p("slice", V);
1576
+ p("toString", V);
1577
+ p("toLocaleString", V);
1578
+ p("every", M);
1579
+ p("filter", M);
1580
+ p("find", M);
1581
+ p("findIndex", M);
1582
+ p("flatMap", M);
1583
+ p("forEach", M);
1584
+ p("map", M);
1585
+ p("some", M);
1586
+ p("reduce", Fn);
1587
+ p("reduceRight", Fn);
1588
+ function p(e, t) {
1589
+ typeof Array.prototype[e] == "function" && (Ie[e] = t(e));
1590
+ }
1591
+ function V(e) {
1592
+ return function() {
1593
+ var t = this[f];
1594
+ t.atom_.reportObserved();
1595
+ var i = t.dehanceValues_(t.values_);
1596
+ return i[e].apply(i, arguments);
1597
+ };
1598
+ }
1599
+ function M(e) {
1600
+ return function(t, i) {
1601
+ var n = this, r = this[f];
1602
+ r.atom_.reportObserved();
1603
+ var a = r.dehanceValues_(r.values_);
1604
+ return a[e](function(o, s) {
1605
+ return t.call(i, o, s, n);
1606
+ });
1607
+ };
1608
+ }
1609
+ function Fn(e) {
1610
+ return function() {
1611
+ var t = this, i = this[f];
1612
+ i.atom_.reportObserved();
1613
+ var n = i.dehanceValues_(i.values_), r = arguments[0];
1614
+ return arguments[0] = function(a, o, s) {
1615
+ return r(a, o, s, t);
1616
+ }, n[e].apply(n, arguments);
1617
+ };
1618
+ }
1619
+ var kr = /* @__PURE__ */ q("ObservableArrayAdministration", pt);
1620
+ function qe(e) {
1621
+ return Ue(e) && kr(e[f]);
1622
+ }
1623
+ var Tn, Dn, yr = {}, B = "add", Be = "delete";
1624
+ Tn = Symbol.iterator;
1625
+ Dn = Symbol.toStringTag;
1626
+ var Pn = /* @__PURE__ */ function() {
1627
+ function e(i, n, r) {
1628
+ var a = this;
1629
+ n === void 0 && (n = te), r === void 0 && (r = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[f] = yr, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = n, this.name_ = r, C(Map) || m(18), this.keysAtom_ = Yt("ObservableMap.keys()"), this.data_ = /* @__PURE__ */ new Map(), this.hasMap_ = /* @__PURE__ */ new Map(), $i(!0, function() {
1630
+ a.merge(i);
1631
+ });
1632
+ }
1633
+ var t = e.prototype;
1634
+ return t.has_ = function(n) {
1635
+ return this.data_.has(n);
1636
+ }, t.has = function(n) {
1637
+ var r = this;
1638
+ if (!d.trackingDerivation)
1639
+ return this.has_(n);
1640
+ var a = this.hasMap_.get(n);
1641
+ if (!a) {
1642
+ var o = a = new ee(this.has_(n), Ge, "ObservableMap.key?", !1);
1643
+ this.hasMap_.set(n, o), On(o, function() {
1644
+ return r.hasMap_.delete(n);
1645
+ });
1646
+ }
1647
+ return a.get();
1648
+ }, t.set = function(n, r) {
1649
+ var a = this.has_(n);
1650
+ if (N(this)) {
1651
+ var o = O(this, {
1652
+ type: a ? D : B,
1653
+ object: this,
1654
+ newValue: r,
1655
+ name: n
1656
+ });
1657
+ if (!o)
1658
+ return this;
1659
+ r = o.newValue;
1660
+ }
1661
+ return a ? this.updateValue_(n, r) : this.addValue_(n, r), this;
1662
+ }, t.delete = function(n) {
1663
+ var r = this;
1664
+ if (this.keysAtom_, N(this)) {
1665
+ var a = O(this, {
1666
+ type: Be,
1667
+ object: this,
1668
+ name: n
1669
+ });
1670
+ if (!a)
1671
+ return !1;
1672
+ }
1673
+ if (this.has_(n)) {
1674
+ var o = ue(), s = A(this), u = s || o ? {
1675
+ observableKind: "map",
1676
+ debugObjectName: this.name_,
1677
+ type: Be,
1678
+ object: this,
1679
+ oldValue: this.data_.get(n).value_,
1680
+ name: n
1681
+ } : null;
1682
+ return j(function() {
1683
+ var l;
1684
+ r.keysAtom_.reportChanged(), (l = r.hasMap_.get(n)) == null || l.setNewValue_(!1);
1685
+ var c = r.data_.get(n);
1686
+ c.setNewValue_(void 0), r.data_.delete(n);
1687
+ }), s && w(this, u), !0;
1688
+ }
1689
+ return !1;
1690
+ }, t.updateValue_ = function(n, r) {
1691
+ var a = this.data_.get(n);
1692
+ if (r = a.prepareNewValue_(r), r !== d.UNCHANGED) {
1693
+ var o = ue(), s = A(this), u = s || o ? {
1694
+ observableKind: "map",
1695
+ debugObjectName: this.name_,
1696
+ type: D,
1697
+ object: this,
1698
+ oldValue: a.value_,
1699
+ name: n,
1700
+ newValue: r
1701
+ } : null;
1702
+ a.setNewValue_(r), s && w(this, u);
1703
+ }
1704
+ }, t.addValue_ = function(n, r) {
1705
+ var a = this;
1706
+ this.keysAtom_, j(function() {
1707
+ var l, c = new ee(r, a.enhancer_, "ObservableMap.key", !1);
1708
+ a.data_.set(n, c), r = c.value_, (l = a.hasMap_.get(n)) == null || l.setNewValue_(!0), a.keysAtom_.reportChanged();
1709
+ });
1710
+ var o = ue(), s = A(this), u = s || o ? {
1711
+ observableKind: "map",
1712
+ debugObjectName: this.name_,
1713
+ type: B,
1714
+ object: this,
1715
+ name: n,
1716
+ newValue: r
1717
+ } : null;
1718
+ s && w(this, u);
1719
+ }, t.get = function(n) {
1720
+ return this.has(n) ? this.dehanceValue_(this.data_.get(n).get()) : this.dehanceValue_(void 0);
1721
+ }, t.dehanceValue_ = function(n) {
1722
+ return this.dehancer !== void 0 ? this.dehancer(n) : n;
1723
+ }, t.keys = function() {
1724
+ return this.keysAtom_.reportObserved(), this.data_.keys();
1725
+ }, t.values = function() {
1726
+ var n = this, r = this.keys();
1727
+ return he({
1728
+ next: function() {
1729
+ var o = r.next(), s = o.done, u = o.value;
1730
+ return {
1731
+ done: s,
1732
+ value: s ? void 0 : n.get(u)
1733
+ };
1734
+ }
1735
+ });
1736
+ }, t.entries = function() {
1737
+ var n = this, r = this.keys();
1738
+ return he({
1739
+ next: function() {
1740
+ var o = r.next(), s = o.done, u = o.value;
1741
+ return {
1742
+ done: s,
1743
+ value: s ? void 0 : [u, n.get(u)]
1744
+ };
1745
+ }
1746
+ });
1747
+ }, t[Tn] = function() {
1748
+ return this.entries();
1749
+ }, t.forEach = function(n, r) {
1750
+ for (var a = Y(this), o; !(o = a()).done; ) {
1751
+ var s = o.value, u = s[0], l = s[1];
1752
+ n.call(r, l, u, this);
1753
+ }
1754
+ }, t.merge = function(n) {
1755
+ var r = this;
1756
+ return W(n) && (n = new Map(n)), j(function() {
1757
+ R(n) ? Zn(n).forEach(function(a) {
1758
+ return r.set(a, n[a]);
1759
+ }) : Array.isArray(n) ? n.forEach(function(a) {
1760
+ var o = a[0], s = a[1];
1761
+ return r.set(o, s);
1762
+ }) : ie(n) ? (n.constructor !== Map && m(19, n), n.forEach(function(a, o) {
1763
+ return r.set(o, a);
1764
+ })) : n != null && m(20, n);
1765
+ }), this;
1766
+ }, t.clear = function() {
1767
+ var n = this;
1768
+ j(function() {
1769
+ fn(function() {
1770
+ for (var r = Y(n.keys()), a; !(a = r()).done; ) {
1771
+ var o = a.value;
1772
+ n.delete(o);
1773
+ }
1774
+ });
1775
+ });
1776
+ }, t.replace = function(n) {
1777
+ var r = this;
1778
+ return j(function() {
1779
+ for (var a = Sr(n), o = /* @__PURE__ */ new Map(), s = !1, u = Y(r.data_.keys()), l; !(l = u()).done; ) {
1780
+ var c = l.value;
1781
+ if (!a.has(c)) {
1782
+ var h = r.delete(c);
1783
+ if (h)
1784
+ s = !0;
1785
+ else {
1786
+ var _ = r.data_.get(c);
1787
+ o.set(c, _);
1788
+ }
1789
+ }
1790
+ }
1791
+ for (var P = Y(a.entries()), H; !(H = P()).done; ) {
1792
+ var E = H.value, F = E[0], Oe = E[1], He = r.data_.has(F);
1793
+ if (r.set(F, Oe), r.data_.has(F)) {
1794
+ var oe = r.data_.get(F);
1795
+ o.set(F, oe), He || (s = !0);
1796
+ }
1797
+ }
1798
+ if (!s)
1799
+ if (r.data_.size !== o.size)
1800
+ r.keysAtom_.reportChanged();
1801
+ else
1802
+ for (var k = r.data_.keys(), I = o.keys(), G = k.next(), kt = I.next(); !G.done; ) {
1803
+ if (G.value !== kt.value) {
1804
+ r.keysAtom_.reportChanged();
1805
+ break;
1806
+ }
1807
+ G = k.next(), kt = I.next();
1808
+ }
1809
+ r.data_ = o;
1810
+ }), this;
1811
+ }, t.toString = function() {
1812
+ return "[object ObservableMap]";
1813
+ }, t.toJSON = function() {
1814
+ return Array.from(this);
1815
+ }, t.observe_ = function(n, r) {
1816
+ return Ne(this, n);
1817
+ }, t.intercept_ = function(n) {
1818
+ return Se(this, n);
1819
+ }, ft(e, [{
1820
+ key: "size",
1821
+ get: function() {
1822
+ return this.keysAtom_.reportObserved(), this.data_.size;
1823
+ }
1824
+ }, {
1825
+ key: Dn,
1826
+ get: function() {
1827
+ return "Map";
1828
+ }
1829
+ }]), e;
1830
+ }(), W = /* @__PURE__ */ q("ObservableMap", Pn);
1831
+ function Sr(e) {
1832
+ if (ie(e) || W(e))
1833
+ return e;
1834
+ if (Array.isArray(e))
1835
+ return new Map(e);
1836
+ if (R(e)) {
1837
+ var t = /* @__PURE__ */ new Map();
1838
+ for (var i in e)
1839
+ t.set(i, e[i]);
1840
+ return t;
1841
+ } else
1842
+ return m(21, e);
1843
+ }
1844
+ var jn, xn, Nr = {};
1845
+ jn = Symbol.iterator;
1846
+ xn = Symbol.toStringTag;
1847
+ var Rn = /* @__PURE__ */ function() {
1848
+ function e(i, n, r) {
1849
+ n === void 0 && (n = te), r === void 0 && (r = "ObservableSet"), this.name_ = void 0, this[f] = Nr, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = r, C(Set) || m(22), this.atom_ = Yt(this.name_), this.enhancer_ = function(a, o) {
1850
+ return n(a, o, r);
1851
+ }, i && this.replace(i);
1852
+ }
1853
+ var t = e.prototype;
1854
+ return t.dehanceValue_ = function(n) {
1855
+ return this.dehancer !== void 0 ? this.dehancer(n) : n;
1856
+ }, t.clear = function() {
1857
+ var n = this;
1858
+ j(function() {
1859
+ fn(function() {
1860
+ for (var r = Y(n.data_.values()), a; !(a = r()).done; ) {
1861
+ var o = a.value;
1862
+ n.delete(o);
1863
+ }
1864
+ });
1865
+ });
1866
+ }, t.forEach = function(n, r) {
1867
+ for (var a = Y(this), o; !(o = a()).done; ) {
1868
+ var s = o.value;
1869
+ n.call(r, s, s, this);
1870
+ }
1871
+ }, t.add = function(n) {
1872
+ var r = this;
1873
+ if (this.atom_, N(this)) {
1874
+ var a = O(this, {
1875
+ type: B,
1876
+ object: this,
1877
+ newValue: n
1878
+ });
1879
+ if (!a)
1880
+ return this;
1881
+ }
1882
+ if (!this.has(n)) {
1883
+ j(function() {
1884
+ r.data_.add(r.enhancer_(n, void 0)), r.atom_.reportChanged();
1885
+ });
1886
+ var o = !1, s = A(this), u = s || o ? {
1887
+ observableKind: "set",
1888
+ debugObjectName: this.name_,
1889
+ type: B,
1890
+ object: this,
1891
+ newValue: n
1892
+ } : null;
1893
+ s && w(this, u);
1894
+ }
1895
+ return this;
1896
+ }, t.delete = function(n) {
1897
+ var r = this;
1898
+ if (N(this)) {
1899
+ var a = O(this, {
1900
+ type: Be,
1901
+ object: this,
1902
+ oldValue: n
1903
+ });
1904
+ if (!a)
1905
+ return !1;
1906
+ }
1907
+ if (this.has(n)) {
1908
+ var o = !1, s = A(this), u = s || o ? {
1909
+ observableKind: "set",
1910
+ debugObjectName: this.name_,
1911
+ type: Be,
1912
+ object: this,
1913
+ oldValue: n
1914
+ } : null;
1915
+ return j(function() {
1916
+ r.atom_.reportChanged(), r.data_.delete(n);
1917
+ }), s && w(this, u), !0;
1918
+ }
1919
+ return !1;
1920
+ }, t.has = function(n) {
1921
+ return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(n));
1922
+ }, t.entries = function() {
1923
+ var n = 0, r = Array.from(this.keys()), a = Array.from(this.values());
1924
+ return he({
1925
+ next: function() {
1926
+ var s = n;
1927
+ return n += 1, s < a.length ? {
1928
+ value: [r[s], a[s]],
1929
+ done: !1
1930
+ } : {
1931
+ done: !0
1932
+ };
1933
+ }
1934
+ });
1935
+ }, t.keys = function() {
1936
+ return this.values();
1937
+ }, t.values = function() {
1938
+ this.atom_.reportObserved();
1939
+ var n = this, r = 0, a = Array.from(this.data_.values());
1940
+ return he({
1941
+ next: function() {
1942
+ return r < a.length ? {
1943
+ value: n.dehanceValue_(a[r++]),
1944
+ done: !1
1945
+ } : {
1946
+ done: !0
1947
+ };
1948
+ }
1949
+ });
1950
+ }, t.replace = function(n) {
1951
+ var r = this;
1952
+ return ae(n) && (n = new Set(n)), j(function() {
1953
+ Array.isArray(n) ? (r.clear(), n.forEach(function(a) {
1954
+ return r.add(a);
1955
+ })) : _e(n) ? (r.clear(), n.forEach(function(a) {
1956
+ return r.add(a);
1957
+ })) : n != null && m("Cannot initialize set from " + n);
1958
+ }), this;
1959
+ }, t.observe_ = function(n, r) {
1960
+ return Ne(this, n);
1961
+ }, t.intercept_ = function(n) {
1962
+ return Se(this, n);
1963
+ }, t.toJSON = function() {
1964
+ return Array.from(this);
1965
+ }, t.toString = function() {
1966
+ return "[object ObservableSet]";
1967
+ }, t[jn] = function() {
1968
+ return this.values();
1969
+ }, ft(e, [{
1970
+ key: "size",
1971
+ get: function() {
1972
+ return this.atom_.reportObserved(), this.data_.size;
1973
+ }
1974
+ }, {
1975
+ key: xn,
1976
+ get: function() {
1977
+ return "Set";
1978
+ }
1979
+ }]), e;
1980
+ }(), ae = /* @__PURE__ */ q("ObservableSet", Rn), Tt = /* @__PURE__ */ Object.create(null), Dt = "remove", Vn = /* @__PURE__ */ function() {
1981
+ function e(i, n, r, a) {
1982
+ n === void 0 && (n = /* @__PURE__ */ new Map()), a === void 0 && (a = Ni), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = i, this.values_ = n, this.name_ = r, this.defaultAnnotation_ = a, this.keysAtom_ = new ge("ObservableObject.keys"), this.isPlainObject_ = R(this.target_);
1983
+ }
1984
+ var t = e.prototype;
1985
+ return t.getObservablePropValue_ = function(n) {
1986
+ return this.values_.get(n).get();
1987
+ }, t.setObservablePropValue_ = function(n, r) {
1988
+ var a = this.values_.get(n);
1989
+ if (a instanceof ce)
1990
+ return a.set(r), !0;
1991
+ if (N(this)) {
1992
+ var o = O(this, {
1993
+ type: D,
1994
+ object: this.proxy_ || this.target_,
1995
+ name: n,
1996
+ newValue: r
1997
+ });
1998
+ if (!o)
1999
+ return null;
2000
+ r = o.newValue;
2001
+ }
2002
+ if (r = a.prepareNewValue_(r), r !== d.UNCHANGED) {
2003
+ var s = A(this), u = !1, l = s || u ? {
2004
+ type: D,
2005
+ observableKind: "object",
2006
+ debugObjectName: this.name_,
2007
+ object: this.proxy_ || this.target_,
2008
+ oldValue: a.value_,
2009
+ name: n,
2010
+ newValue: r
2011
+ } : null;
2012
+ a.setNewValue_(r), s && w(this, l);
2013
+ }
2014
+ return !0;
2015
+ }, t.get_ = function(n) {
2016
+ return d.trackingDerivation && !L(this.target_, n) && this.has_(n), this.target_[n];
2017
+ }, t.set_ = function(n, r, a) {
2018
+ return a === void 0 && (a = !1), L(this.target_, n) ? this.values_.has(n) ? this.setObservablePropValue_(n, r) : a ? Reflect.set(this.target_, n, r) : (this.target_[n] = r, !0) : this.extend_(n, {
2019
+ value: r,
2020
+ enumerable: !0,
2021
+ writable: !0,
2022
+ configurable: !0
2023
+ }, this.defaultAnnotation_, a);
2024
+ }, t.has_ = function(n) {
2025
+ if (!d.trackingDerivation)
2026
+ return n in this.target_;
2027
+ this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map());
2028
+ var r = this.pendingKeys_.get(n);
2029
+ return r || (r = new ee(n in this.target_, Ge, "ObservableObject.key?", !1), this.pendingKeys_.set(n, r)), r.get();
2030
+ }, t.make_ = function(n, r) {
2031
+ if (r === !0 && (r = this.defaultAnnotation_), r !== !1) {
2032
+ if (!(n in this.target_)) {
2033
+ var a;
2034
+ if ((a = this.target_[Q]) != null && a[n])
2035
+ return;
2036
+ m(1, r.annotationType_, this.name_ + "." + n.toString());
2037
+ }
2038
+ for (var o = this.target_; o && o !== Le; ) {
2039
+ var s = De(o, n);
2040
+ if (s) {
2041
+ var u = r.make_(this, n, s, o);
2042
+ if (u === 0)
2043
+ return;
2044
+ if (u === 1)
2045
+ break;
2046
+ }
2047
+ o = Object.getPrototypeOf(o);
2048
+ }
2049
+ jt(this, r, n);
2050
+ }
2051
+ }, t.extend_ = function(n, r, a, o) {
2052
+ if (o === void 0 && (o = !1), a === !0 && (a = this.defaultAnnotation_), a === !1)
2053
+ return this.defineProperty_(n, r, o);
2054
+ var s = a.extend_(this, n, r, o);
2055
+ return s && jt(this, a, n), s;
2056
+ }, t.defineProperty_ = function(n, r, a) {
2057
+ a === void 0 && (a = !1);
2058
+ try {
2059
+ y();
2060
+ var o = this.delete_(n);
2061
+ if (!o)
2062
+ return o;
2063
+ if (N(this)) {
2064
+ var s = O(this, {
2065
+ object: this.proxy_ || this.target_,
2066
+ name: n,
2067
+ type: B,
2068
+ newValue: r.value
2069
+ });
2070
+ if (!s)
2071
+ return null;
2072
+ var u = s.newValue;
2073
+ r.value !== u && (r = de({}, r, {
2074
+ value: u
2075
+ }));
2076
+ }
2077
+ if (a) {
2078
+ if (!Reflect.defineProperty(this.target_, n, r))
2079
+ return !1;
2080
+ } else
2081
+ x(this.target_, n, r);
2082
+ this.notifyPropertyAddition_(n, r.value);
2083
+ } finally {
2084
+ S();
2085
+ }
2086
+ return !0;
2087
+ }, t.defineObservableProperty_ = function(n, r, a, o) {
2088
+ o === void 0 && (o = !1);
2089
+ try {
2090
+ y();
2091
+ var s = this.delete_(n);
2092
+ if (!s)
2093
+ return s;
2094
+ if (N(this)) {
2095
+ var u = O(this, {
2096
+ object: this.proxy_ || this.target_,
2097
+ name: n,
2098
+ type: B,
2099
+ newValue: r
2100
+ });
2101
+ if (!u)
2102
+ return null;
2103
+ r = u.newValue;
2104
+ }
2105
+ var l = Pt(n), c = {
2106
+ configurable: d.safeDescriptors ? this.isPlainObject_ : !0,
2107
+ enumerable: !0,
2108
+ get: l.get,
2109
+ set: l.set
2110
+ };
2111
+ if (o) {
2112
+ if (!Reflect.defineProperty(this.target_, n, c))
2113
+ return !1;
2114
+ } else
2115
+ x(this.target_, n, c);
2116
+ var h = new ee(r, a, "ObservableObject.key", !1);
2117
+ this.values_.set(n, h), this.notifyPropertyAddition_(n, h.value_);
2118
+ } finally {
2119
+ S();
2120
+ }
2121
+ return !0;
2122
+ }, t.defineComputedProperty_ = function(n, r, a) {
2123
+ a === void 0 && (a = !1);
2124
+ try {
2125
+ y();
2126
+ var o = this.delete_(n);
2127
+ if (!o)
2128
+ return o;
2129
+ if (N(this)) {
2130
+ var s = O(this, {
2131
+ object: this.proxy_ || this.target_,
2132
+ name: n,
2133
+ type: B,
2134
+ newValue: void 0
2135
+ });
2136
+ if (!s)
2137
+ return null;
2138
+ }
2139
+ r.name || (r.name = "ObservableObject.key"), r.context = this.proxy_ || this.target_;
2140
+ var u = Pt(n), l = {
2141
+ configurable: d.safeDescriptors ? this.isPlainObject_ : !0,
2142
+ enumerable: !1,
2143
+ get: u.get,
2144
+ set: u.set
2145
+ };
2146
+ if (a) {
2147
+ if (!Reflect.defineProperty(this.target_, n, l))
2148
+ return !1;
2149
+ } else
2150
+ x(this.target_, n, l);
2151
+ this.values_.set(n, new ce(r)), this.notifyPropertyAddition_(n, void 0);
2152
+ } finally {
2153
+ S();
2154
+ }
2155
+ return !0;
2156
+ }, t.delete_ = function(n, r) {
2157
+ if (r === void 0 && (r = !1), !L(this.target_, n))
2158
+ return !0;
2159
+ if (N(this)) {
2160
+ var a = O(this, {
2161
+ object: this.proxy_ || this.target_,
2162
+ name: n,
2163
+ type: Dt
2164
+ });
2165
+ if (!a)
2166
+ return null;
2167
+ }
2168
+ try {
2169
+ var o, s;
2170
+ y();
2171
+ var u = A(this), l = !1, c = this.values_.get(n), h = void 0;
2172
+ if (!c && (u || l)) {
2173
+ var _;
2174
+ h = (_ = De(this.target_, n)) == null ? void 0 : _.value;
2175
+ }
2176
+ if (r) {
2177
+ if (!Reflect.deleteProperty(this.target_, n))
2178
+ return !1;
2179
+ } else
2180
+ delete this.target_[n];
2181
+ if (c && (this.values_.delete(n), c instanceof ee && (h = c.value_), pn(c)), this.keysAtom_.reportChanged(), (o = this.pendingKeys_) == null || (s = o.get(n)) == null || s.set(n in this.target_), u || l) {
2182
+ var P = {
2183
+ type: Dt,
2184
+ observableKind: "object",
2185
+ object: this.proxy_ || this.target_,
2186
+ debugObjectName: this.name_,
2187
+ oldValue: h,
2188
+ name: n
2189
+ };
2190
+ u && w(this, P);
2191
+ }
2192
+ } finally {
2193
+ S();
2194
+ }
2195
+ return !0;
2196
+ }, t.observe_ = function(n, r) {
2197
+ return Ne(this, n);
2198
+ }, t.intercept_ = function(n) {
2199
+ return Se(this, n);
2200
+ }, t.notifyPropertyAddition_ = function(n, r) {
2201
+ var a, o, s = A(this), u = !1;
2202
+ if (s || u) {
2203
+ var l = s || u ? {
2204
+ type: B,
2205
+ observableKind: "object",
2206
+ debugObjectName: this.name_,
2207
+ object: this.proxy_ || this.target_,
2208
+ name: n,
2209
+ newValue: r
2210
+ } : null;
2211
+ s && w(this, l);
2212
+ }
2213
+ (a = this.pendingKeys_) == null || (o = a.get(n)) == null || o.set(!0), this.keysAtom_.reportChanged();
2214
+ }, t.ownKeys_ = function() {
2215
+ return this.keysAtom_.reportObserved(), le(this.target_);
2216
+ }, t.keys_ = function() {
2217
+ return this.keysAtom_.reportObserved(), Object.keys(this.target_);
2218
+ }, e;
2219
+ }();
2220
+ function We(e, t) {
2221
+ var i;
2222
+ if (L(e, f))
2223
+ return e;
2224
+ var n = (i = t?.name) != null ? i : "ObservableObject", r = new Vn(e, /* @__PURE__ */ new Map(), String(n), ji(t));
2225
+ return Me(e, f, r), e;
2226
+ }
2227
+ var Or = /* @__PURE__ */ q("ObservableObjectAdministration", Vn);
2228
+ function Pt(e) {
2229
+ return Tt[e] || (Tt[e] = {
2230
+ get: function() {
2231
+ return this[f].getObservablePropValue_(e);
2232
+ },
2233
+ set: function(i) {
2234
+ return this[f].setObservablePropValue_(e, i);
2235
+ }
2236
+ });
2237
+ }
2238
+ function me(e) {
2239
+ return Ue(e) ? Or(e[f]) : !1;
2240
+ }
2241
+ function jt(e, t, i) {
2242
+ var n;
2243
+ (n = e.target_[Q]) == null || delete n[i];
2244
+ }
2245
+ var Qe = 0, In = function() {
2246
+ };
2247
+ function Ar(e, t) {
2248
+ Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t;
2249
+ }
2250
+ Ar(In, Array.prototype);
2251
+ var gt = /* @__PURE__ */ function(e, t, i) {
2252
+ Jt(n, e);
2253
+ function n(a, o, s, u) {
2254
+ var l;
2255
+ s === void 0 && (s = "ObservableArray"), u === void 0 && (u = !1), l = e.call(this) || this;
2256
+ var c = new pt(s, o, u, !0);
2257
+ if (c.proxy_ = St(l), Wt(St(l), f, c), a && a.length) {
2258
+ var h = ke(!0);
2259
+ l.spliceWithArray(0, 0, a), ye(h);
2260
+ }
2261
+ return l;
2262
+ }
2263
+ var r = n.prototype;
2264
+ return r.concat = function() {
2265
+ this[f].atom_.reportObserved();
2266
+ for (var o = arguments.length, s = new Array(o), u = 0; u < o; u++)
2267
+ s[u] = arguments[u];
2268
+ return Array.prototype.concat.apply(
2269
+ this.slice(),
2270
+ //@ts-ignore
2271
+ s.map(function(l) {
2272
+ return qe(l) ? l.slice() : l;
2273
+ })
2274
+ );
2275
+ }, r[i] = function() {
2276
+ var a = this, o = 0;
2277
+ return he({
2278
+ next: function() {
2279
+ return o < a.length ? {
2280
+ value: a[o++],
2281
+ done: !1
2282
+ } : {
2283
+ done: !0,
2284
+ value: void 0
2285
+ };
2286
+ }
2287
+ });
2288
+ }, ft(n, [{
2289
+ key: "length",
2290
+ get: function() {
2291
+ return this[f].getArrayLength_();
2292
+ },
2293
+ set: function(o) {
2294
+ this[f].setArrayLength_(o);
2295
+ }
2296
+ }, {
2297
+ key: t,
2298
+ get: function() {
2299
+ return "Array";
2300
+ }
2301
+ }]), n;
2302
+ }(In, Symbol.toStringTag, Symbol.iterator);
2303
+ Object.entries(Ie).forEach(function(e) {
2304
+ var t = e[0], i = e[1];
2305
+ t !== "concat" && Me(gt.prototype, t, i);
2306
+ });
2307
+ function wr(e) {
2308
+ return {
2309
+ enumerable: !1,
2310
+ configurable: !0,
2311
+ get: function() {
2312
+ return this[f].get_(e);
2313
+ },
2314
+ set: function(i) {
2315
+ this[f].set_(e, i);
2316
+ }
2317
+ };
2318
+ }
2319
+ function Cr(e) {
2320
+ x(gt.prototype, "" + e, wr(e));
2321
+ }
2322
+ function Bn(e) {
2323
+ if (e > Qe) {
2324
+ for (var t = Qe; t < e + 100; t++)
2325
+ Cr(t);
2326
+ Qe = e;
2327
+ }
2328
+ }
2329
+ Bn(1e3);
2330
+ function Er(e, t, i) {
2331
+ return new gt(e, t, i);
2332
+ }
2333
+ function z(e, t) {
2334
+ if (typeof e == "object" && e !== null) {
2335
+ if (qe(e))
2336
+ return t !== void 0 && m(23), e[f].atom_;
2337
+ if (ae(e))
2338
+ return e[f];
2339
+ if (W(e)) {
2340
+ if (t === void 0)
2341
+ return e.keysAtom_;
2342
+ var i = e.data_.get(t) || e.hasMap_.get(t);
2343
+ return i || m(25, t, st(e)), i;
2344
+ }
2345
+ if (me(e)) {
2346
+ if (!t)
2347
+ return m(26);
2348
+ var n = e[f].values_.get(t);
2349
+ return n || m(27, t, st(e)), n;
2350
+ }
2351
+ if (vt(e) || ze(e) || Re(e))
2352
+ return e;
2353
+ } else if (C(e) && Re(e[f]))
2354
+ return e[f];
2355
+ m(28);
2356
+ }
2357
+ function Ln(e, t) {
2358
+ if (e || m(29), t !== void 0)
2359
+ return Ln(z(e, t));
2360
+ if (vt(e) || ze(e) || Re(e) || W(e) || ae(e))
2361
+ return e;
2362
+ if (e[f])
2363
+ return e[f];
2364
+ m(24, e);
2365
+ }
2366
+ function st(e, t) {
2367
+ var i;
2368
+ if (t !== void 0)
2369
+ i = z(e, t);
2370
+ else {
2371
+ if (_t(e))
2372
+ return e.name;
2373
+ me(e) || W(e) || ae(e) ? i = Ln(e) : i = z(e);
2374
+ }
2375
+ return i.name_;
2376
+ }
2377
+ var xt = Le.toString;
2378
+ function bt(e, t, i) {
2379
+ return i === void 0 && (i = -1), ut(e, t, i);
2380
+ }
2381
+ function ut(e, t, i, n, r) {
2382
+ if (e === t)
2383
+ return e !== 0 || 1 / e === 1 / t;
2384
+ if (e == null || t == null)
2385
+ return !1;
2386
+ if (e !== e)
2387
+ return t !== t;
2388
+ var a = typeof e;
2389
+ if (a !== "function" && a !== "object" && typeof t != "object")
2390
+ return !1;
2391
+ var o = xt.call(e);
2392
+ if (o !== xt.call(t))
2393
+ return !1;
2394
+ switch (o) {
2395
+ case "[object RegExp]":
2396
+ case "[object String]":
2397
+ return "" + e == "" + t;
2398
+ case "[object Number]":
2399
+ return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t;
2400
+ case "[object Date]":
2401
+ case "[object Boolean]":
2402
+ return +e == +t;
2403
+ case "[object Symbol]":
2404
+ return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
2405
+ case "[object Map]":
2406
+ case "[object Set]":
2407
+ i >= 0 && i++;
2408
+ break;
2409
+ }
2410
+ e = Rt(e), t = Rt(t);
2411
+ var s = o === "[object Array]";
2412
+ if (!s) {
2413
+ if (typeof e != "object" || typeof t != "object")
2414
+ return !1;
2415
+ var u = e.constructor, l = t.constructor;
2416
+ if (u !== l && !(C(u) && u instanceof u && C(l) && l instanceof l) && "constructor" in e && "constructor" in t)
2417
+ return !1;
2418
+ }
2419
+ if (i === 0)
2420
+ return !1;
2421
+ i < 0 && (i = -1), n = n || [], r = r || [];
2422
+ for (var c = n.length; c--; )
2423
+ if (n[c] === e)
2424
+ return r[c] === t;
2425
+ if (n.push(e), r.push(t), s) {
2426
+ if (c = e.length, c !== t.length)
2427
+ return !1;
2428
+ for (; c--; )
2429
+ if (!ut(e[c], t[c], i - 1, n, r))
2430
+ return !1;
2431
+ } else {
2432
+ var h = Object.keys(e), _;
2433
+ if (c = h.length, Object.keys(t).length !== c)
2434
+ return !1;
2435
+ for (; c--; )
2436
+ if (_ = h[c], !(L(t, _) && ut(e[_], t[_], i - 1, n, r)))
2437
+ return !1;
2438
+ }
2439
+ return n.pop(), r.pop(), !0;
2440
+ }
2441
+ function Rt(e) {
2442
+ return qe(e) ? e.slice() : ie(e) || W(e) || _e(e) || ae(e) ? Array.from(e.entries()) : e;
2443
+ }
2444
+ function he(e) {
2445
+ return e[Symbol.iterator] = Fr, e;
2446
+ }
2447
+ function Fr() {
2448
+ return this;
2449
+ }
2450
+ ["Symbol", "Map", "Set"].forEach(function(e) {
2451
+ var t = Gt();
2452
+ typeof t[e] > "u" && m("MobX requires global '" + e + "' to be available or polyfilled");
2453
+ });
2454
+ typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
2455
+ spy: Yi,
2456
+ extras: {
2457
+ getDebugName: st
2458
+ },
2459
+ $mobx: f
2460
+ });
2461
+ class Tr {
2462
+ _config;
2463
+ constructor() {
2464
+ _r(this, {}, { name: "NizzaStore", autoBind: !0 });
2465
+ }
2466
+ configure(t) {
2467
+ this._config = t;
2468
+ }
2469
+ createGlobalObject() {
2470
+ window.nizza = this, console.log("Global object created");
2471
+ }
2472
+ get config() {
2473
+ return this._config;
2474
+ }
2475
+ }
2476
+ const ua = new Tr();
2477
+ var Un = /* @__PURE__ */ ((e) => (e.Add = "add", e.Remove = "remove", e))(Un || {}), Mn = /* @__PURE__ */ ((e) => (e.Active = "active", e.Inactive = "inactive", e))(Mn || {});
2478
+ const Dr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "deleteAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInputAccount" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Pr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "getAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "section" } }, { kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, jr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "updateCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, xr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Rr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Vr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ir = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Br = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Lr = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Ur = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2479
+ __proto__: null,
2480
+ AddCollectionDocument: xr,
2481
+ DeleteAllCustomizationDocument: Dr,
2482
+ DeleteCollectionDocument: Rr,
2483
+ FindCollectionDocument: Vr,
2484
+ GetAllCollectionsDocument: Ir,
2485
+ GetAllCustomizationDocument: Pr,
2486
+ ManageCollectionProductDocument: Br,
2487
+ Methods: Un,
2488
+ SearchCollectionsDocument: Lr,
2489
+ Status: Mn,
2490
+ UpdateCollectionDocument: Ur,
2491
+ UpdateCustomizationDocument: jr
2492
+ }, Symbol.toStringTag, { value: "Module" }));
2493
+ class da {
2494
+ }
2495
+ async function ca({
2496
+ url: e,
2497
+ method: t = "GET",
2498
+ raw: i = !1,
2499
+ ...n
2500
+ }) {
2501
+ const r = {
2502
+ "Content-Type": "application/json",
2503
+ ...n.headers
2504
+ }, a = await fetch(e, { method: t, ...n, headers: r });
2505
+ if (i)
2506
+ return a;
2507
+ const o = await a.json();
2508
+ if (!a.ok) {
2509
+ const s = o?.message ?? a.statusText;
2510
+ throw new Error(s);
2511
+ }
2512
+ return o;
2513
+ }
2514
+ class Vt {
2515
+ store;
2516
+ constructor() {
2517
+ this.store = this.getStoreFromWindow();
2518
+ }
2519
+ getStoreFromWindow() {
2520
+ let t = {};
2521
+ try {
2522
+ t = JSON.parse(window.self.name);
2523
+ } catch {
2524
+ return {};
2525
+ }
2526
+ return t && typeof t == "object" ? t : {};
2527
+ }
2528
+ setStoreToWindow(t) {
2529
+ const i = JSON.stringify(t);
2530
+ window.self.name = i;
2531
+ }
2532
+ setItem(t, i) {
2533
+ this.store[t] = i, this.setStoreToWindow(this.store);
2534
+ }
2535
+ getItem(t) {
2536
+ return this.store[t] ?? null;
2537
+ }
2538
+ removeItem(t) {
2539
+ delete this.store[t], this.setStoreToWindow(this.store);
2540
+ }
2541
+ clear() {
2542
+ this.setStoreToWindow({});
2543
+ }
2544
+ key(t) {
2545
+ return Object.keys(this.store)[t] ?? null;
2546
+ }
2547
+ get length() {
2548
+ return Object.keys(this.store).length;
2549
+ }
2550
+ }
2551
+ function It(e) {
2552
+ try {
2553
+ const t = window[e], i = "__custom-storage__";
2554
+ return t.setItem(i, i), t.removeItem(i), !0;
2555
+ } catch {
2556
+ return !1;
2557
+ }
2558
+ }
2559
+ function Bt(e, t, i) {
2560
+ const n = {
2561
+ configurable: !1,
2562
+ enumerable: !1,
2563
+ writable: !1
2564
+ };
2565
+ typeof i < "u" && (n.value = i), Object.defineProperty(e, t, n);
2566
+ }
2567
+ class Gn {
2568
+ static init() {
2569
+ return new Gn();
2570
+ }
2571
+ constructor() {
2572
+ window.top === window.self ? console.log("[CustomStorage] This is the main window") : console.log("[CustomStorage] This is NOT the main window"), this.replaceStorages();
2573
+ }
2574
+ replaceStorages() {
2575
+ if (!this.isAvailable.localStorage) {
2576
+ const t = new Vt();
2577
+ Bt(window, "localStorage", t), console.log(
2578
+ "[CustomStorage] LocalStorage is not available, custom implementation is defined"
2579
+ );
2580
+ }
2581
+ if (!this.isAvailable.sessionStorage) {
2582
+ const t = new Vt();
2583
+ Bt(window, "sessionStorage", t), console.log(
2584
+ "[CustomStorage] SessionStorage is not available, custom implementation is defined"
2585
+ );
2586
+ }
2587
+ }
2588
+ get isAvailable() {
2589
+ return {
2590
+ localStorage: It("localStorage"),
2591
+ sessionStorage: It("sessionStorage")
2592
+ };
2593
+ }
2594
+ }
2595
+ /*! js-cookie v3.0.1 | MIT */
2596
+ function Ce(e) {
2597
+ for (var t = 1; t < arguments.length; t++) {
2598
+ var i = arguments[t];
2599
+ for (var n in i)
2600
+ e[n] = i[n];
2601
+ }
2602
+ return e;
2603
+ }
2604
+ var Mr = {
2605
+ read: function(e) {
2606
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
2607
+ },
2608
+ write: function(e) {
2609
+ return encodeURIComponent(e).replace(
2610
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
2611
+ decodeURIComponent
2612
+ );
2613
+ }
2614
+ };
2615
+ function lt(e, t) {
2616
+ function i(r, a, o) {
2617
+ if (!(typeof document > "u")) {
2618
+ o = Ce({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
2619
+ var s = "";
2620
+ for (var u in o)
2621
+ o[u] && (s += "; " + u, o[u] !== !0 && (s += "=" + o[u].split(";")[0]));
2622
+ return document.cookie = r + "=" + e.write(a, r) + s;
2623
+ }
2624
+ }
2625
+ function n(r) {
2626
+ if (!(typeof document > "u" || arguments.length && !r)) {
2627
+ for (var a = document.cookie ? document.cookie.split("; ") : [], o = {}, s = 0; s < a.length; s++) {
2628
+ var u = a[s].split("="), l = u.slice(1).join("=");
2629
+ try {
2630
+ var c = decodeURIComponent(u[0]);
2631
+ if (o[c] = e.read(l, c), r === c)
2632
+ break;
2633
+ } catch {
2634
+ }
2635
+ }
2636
+ return r ? o[r] : o;
2637
+ }
2638
+ }
2639
+ return Object.create(
2640
+ {
2641
+ set: i,
2642
+ get: n,
2643
+ remove: function(r, a) {
2644
+ i(
2645
+ r,
2646
+ "",
2647
+ Ce({}, a, {
2648
+ expires: -1
2649
+ })
2650
+ );
2651
+ },
2652
+ withAttributes: function(r) {
2653
+ return lt(this.converter, Ce({}, this.attributes, r));
2654
+ },
2655
+ withConverter: function(r) {
2656
+ return lt(Ce({}, this.converter, r), this.attributes);
2657
+ }
2658
+ },
2659
+ {
2660
+ attributes: { value: Object.freeze(t) },
2661
+ converter: { value: Object.freeze(e) }
2662
+ }
2663
+ );
2664
+ }
2665
+ var Lt = lt(Mr, { path: "/" }), Ee, Gr = new Uint8Array(16);
2666
+ function $r() {
2667
+ if (!Ee && (Ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !Ee))
2668
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2669
+ return Ee(Gr);
2670
+ }
2671
+ const Kr = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
2672
+ function zr(e) {
2673
+ return typeof e == "string" && Kr.test(e);
2674
+ }
2675
+ var g = [];
2676
+ for (var Ze = 0; Ze < 256; ++Ze)
2677
+ g.push((Ze + 256).toString(16).substr(1));
2678
+ function qr(e) {
2679
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = (g[e[t + 0]] + g[e[t + 1]] + g[e[t + 2]] + g[e[t + 3]] + "-" + g[e[t + 4]] + g[e[t + 5]] + "-" + g[e[t + 6]] + g[e[t + 7]] + "-" + g[e[t + 8]] + g[e[t + 9]] + "-" + g[e[t + 10]] + g[e[t + 11]] + g[e[t + 12]] + g[e[t + 13]] + g[e[t + 14]] + g[e[t + 15]]).toLowerCase();
2680
+ if (!zr(i))
2681
+ throw TypeError("Stringified UUID is invalid");
2682
+ return i;
2683
+ }
2684
+ function Wr(e, t, i) {
2685
+ e = e || {};
2686
+ var n = e.random || (e.rng || $r)();
2687
+ if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, t) {
2688
+ i = i || 0;
2689
+ for (var r = 0; r < 16; ++r)
2690
+ t[i + r] = n[r];
2691
+ return t;
2692
+ }
2693
+ return qr(n);
2694
+ }
2695
+ const Ut = "FINGERPRINT_LIVE_SHOPPING", fa = () => {
2696
+ let e = Lt.get(Ut);
2697
+ return e || (e = Wr(), Lt.set(Ut, e, { expires: 1 }), e);
2698
+ };
2699
+ let Hr = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, i) => (i &= 63, i < 36 ? t += i.toString(36) : i < 62 ? t += (i - 26).toString(36).toUpperCase() : i > 62 ? t += "-" : t += "_", t), "");
2700
+ const va = (e = 8) => Hr(e), ma = (e) => {
2701
+ const t = Object.entries(e).map(([i, n]) => `${i}=${n}`).join("&");
2702
+ return t ? `?${t}` : "";
2703
+ }, ha = (e, t, i = { fallback: null }) => {
2704
+ let n = e;
2705
+ t && (n = () => e().then((a) => ({ default: t(a) })));
2706
+ const r = zn(n);
2707
+ return (a) => /* @__PURE__ */ et(qn, { fallback: i.fallback, children: /* @__PURE__ */ et(r, { ...a }) });
2708
+ };
2709
+ class Te {
2710
+ isOk;
2711
+ isErr;
2712
+ error;
2713
+ _value;
2714
+ constructor(t, i, n) {
2715
+ if (t && i)
2716
+ throw new Error(
2717
+ "InvalidOperation: A result cannot be successful and contain an error"
2718
+ );
2719
+ if (!t && !i)
2720
+ throw new Error(
2721
+ "InvalidOperation: A failing result needs to contain an error message"
2722
+ );
2723
+ this.isOk = t, this.isErr = !t, this.error = i, this._value = n, Object.freeze(this);
2724
+ }
2725
+ get value() {
2726
+ if (this.isErr)
2727
+ throw new Error(
2728
+ "Can't get the value of an error result. Use 'errorValue' instead."
2729
+ );
2730
+ return this._value;
2731
+ }
2732
+ static ok(t) {
2733
+ return new Te(!0, void 0, t);
2734
+ }
2735
+ static fail(t) {
2736
+ return new Te(!1, t);
2737
+ }
2738
+ static combine(t) {
2739
+ for (const i of t)
2740
+ if (i.isErr)
2741
+ return i;
2742
+ return Te.ok();
2743
+ }
2744
+ }
2745
+ class Xr {
2746
+ value;
2747
+ constructor(t) {
2748
+ this.value = t;
2749
+ }
2750
+ isErr() {
2751
+ return !0;
2752
+ }
2753
+ isOk() {
2754
+ return !1;
2755
+ }
2756
+ }
2757
+ class Jr {
2758
+ value;
2759
+ constructor(t) {
2760
+ this.value = t;
2761
+ }
2762
+ isErr() {
2763
+ return !1;
2764
+ }
2765
+ isOk() {
2766
+ return !0;
2767
+ }
2768
+ }
2769
+ const _a = (e) => new Xr(e), pa = (e) => new Jr(e);
2770
+ export {
2771
+ ia as AccountInvalidError,
2772
+ Hn as AggregateRoot,
2773
+ la as ApiGraphqlTypes,
2774
+ ea as BaseMobxStore,
2775
+ da as BaseStore,
2776
+ Gn as CustomStorage,
2777
+ dt as DomainError,
2778
+ Xr as Err,
2779
+ Tr as NizzaStore,
2780
+ Wn as NizzaVariationTypes,
2781
+ Jr as Ok,
2782
+ ta as ResourceNotFoundError,
2783
+ Te as Result,
2784
+ aa as StoreProvider,
2785
+ na as UnexpectedError,
2786
+ ra as ValueObject,
2787
+ ca as apiCall,
2788
+ Zr as createAggregateRoot,
2789
+ pa as err,
2790
+ fa as getFingerprint,
2791
+ sa as getStore,
2792
+ ha as lazyLoad,
2793
+ ua as nizza,
2794
+ _a as ok,
2795
+ ma as searchParams,
2796
+ va as shortId,
2797
+ oa as useStore
2798
+ };