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