@euflyapp/one-vue3 0.1.0 → 0.1.2

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.
@@ -1,770 +1,770 @@
1
- var j = (e, t, n) => new Promise((r, o) => {
2
- var s = (a) => {
3
- try {
4
- c(n.next(a));
5
- } catch (l) {
6
- o(l);
7
- }
8
- }, i = (a) => {
9
- try {
10
- c(n.throw(a));
11
- } catch (l) {
12
- o(l);
13
- }
14
- }, c = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(s, i);
15
- c((n = n.apply(e, t)).next());
16
- });
17
- import { inject as W, watch as L, reactive as Y } from "vue";
18
- function q() {
19
- return G().__VUE_DEVTOOLS_GLOBAL_HOOK__;
20
- }
21
- function G() {
22
- return typeof navigator != "undefined" && typeof window != "undefined" ? window : typeof global != "undefined" ? global : {};
23
- }
24
- const X = typeof Proxy == "function", z = "devtools-plugin:setup", Z = "plugin:settings:set";
25
- let b, N;
26
- function tt() {
27
- var e;
28
- return b !== void 0 || (typeof window != "undefined" && window.performance ? (b = !0, N = window.performance) : typeof global != "undefined" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? (b = !0, N = global.perf_hooks.performance) : b = !1), b;
29
- }
30
- function et() {
31
- return tt() ? N.now() : Date.now();
32
- }
33
- class rt {
34
- constructor(t, n) {
35
- this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
36
- const r = {};
37
- if (t.settings)
38
- for (const i in t.settings) {
39
- const c = t.settings[i];
40
- r[i] = c.defaultValue;
41
- }
42
- const o = `__vue-devtools-plugin-settings__${t.id}`;
43
- let s = Object.assign({}, r);
44
- try {
45
- const i = localStorage.getItem(o), c = JSON.parse(i);
46
- Object.assign(s, c);
47
- } catch (i) {
48
- }
49
- this.fallbacks = {
50
- getSettings() {
51
- return s;
52
- },
53
- setSettings(i) {
54
- try {
55
- localStorage.setItem(o, JSON.stringify(i));
56
- } catch (c) {
57
- }
58
- s = i;
59
- },
60
- now() {
61
- return et();
62
- }
63
- }, n && n.on(Z, (i, c) => {
64
- i === this.plugin.id && this.fallbacks.setSettings(c);
65
- }), this.proxiedOn = new Proxy({}, {
66
- get: (i, c) => this.target ? this.target.on[c] : (...a) => {
67
- this.onQueue.push({
68
- method: c,
69
- args: a
70
- });
71
- }
72
- }), this.proxiedTarget = new Proxy({}, {
73
- get: (i, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...a) => (this.targetQueue.push({
74
- method: c,
75
- args: a,
76
- resolve: () => {
77
- }
78
- }), this.fallbacks[c](...a)) : (...a) => new Promise((l) => {
79
- this.targetQueue.push({
80
- method: c,
81
- args: a,
82
- resolve: l
83
- });
84
- })
85
- });
86
- }
87
- setRealTarget(t) {
88
- return j(this, null, function* () {
89
- this.target = t;
90
- for (const n of this.onQueue)
91
- this.target.on[n.method](...n.args);
92
- for (const n of this.targetQueue)
93
- n.resolve(yield this.target[n.method](...n.args));
94
- });
95
- }
96
- }
97
- function nt(e, t) {
98
- const n = e, r = G(), o = q(), s = X && n.enableEarlyProxy;
99
- if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
100
- o.emit(z, e, t);
101
- else {
102
- const i = s ? new rt(n, o) : null;
103
- (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
104
- pluginDescriptor: n,
105
- setupFn: t,
106
- proxy: i
107
- }), i && t(i.proxiedTarget);
108
- }
109
- }
110
- /*!
111
- * vuex v4.0.2
112
- * (c) 2021 Evan You
113
- * @license MIT
114
- */
115
- var P = "store";
116
- function Nt(e) {
117
- return e === void 0 && (e = null), W(e !== null ? e : P);
118
- }
119
- function g(e, t) {
120
- Object.keys(e).forEach(function(n) {
121
- return t(e[n], n);
122
- });
123
- }
124
- function ot(e) {
125
- return e !== null && typeof e == "object";
126
- }
127
- function it(e) {
128
- return e && typeof e.then == "function";
129
- }
130
- function v(e, t) {
131
- if (!e)
132
- throw new Error("[vuex] " + t);
133
- }
134
- function st(e, t) {
135
- return function() {
136
- return e(t);
137
- };
138
- }
139
- function M(e, t, n) {
140
- return t.indexOf(e) < 0 && (n && n.prepend ? t.unshift(e) : t.push(e)), function() {
141
- var r = t.indexOf(e);
142
- r > -1 && t.splice(r, 1);
143
- };
144
- }
145
- function $(e, t) {
146
- e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
147
- var n = e.state;
148
- O(e, n, [], e._modules.root, !0), x(e, n, t);
149
- }
150
- function x(e, t, n) {
151
- var r = e._state;
152
- e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
153
- var o = e._wrappedGetters, s = {};
154
- g(o, function(i, c) {
155
- s[c] = st(i, e), Object.defineProperty(e.getters, c, {
156
- // TODO: use `computed` when it's possible. at the moment we can't due to
157
- // https://github.com/vuejs/vuex/pull/1883
158
- get: function() {
159
- return s[c]();
160
- },
161
- enumerable: !0
162
- // for local getters
163
- });
164
- }), e._state = Y({
165
- data: t
166
- }), e.strict && lt(e), r && n && e._withCommit(function() {
167
- r.data = null;
168
- });
169
- }
170
- function O(e, t, n, r, o) {
171
- var s = !n.length, i = e._modules.getNamespace(n);
172
- if (r.namespaced && (e._modulesNamespaceMap[i] && process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate namespace " + i + " for the namespaced module " + n.join("/")), e._modulesNamespaceMap[i] = r), !s && !o) {
173
- var c = C(t, n.slice(0, -1)), a = n[n.length - 1];
174
- e._withCommit(function() {
175
- process.env.NODE_ENV !== "production" && a in c && console.warn(
176
- '[vuex] state field "' + a + '" was overridden by a module with the same name at "' + n.join(".") + '"'
177
- ), c[a] = r.state;
178
- });
179
- }
180
- var l = r.context = ct(e, i, n);
181
- r.forEachMutation(function(u, f) {
182
- var p = i + f;
183
- at(e, p, u, l);
184
- }), r.forEachAction(function(u, f) {
185
- var p = u.root ? f : i + f, d = u.handler || u;
186
- ut(e, p, d, l);
187
- }), r.forEachGetter(function(u, f) {
188
- var p = i + f;
189
- ft(e, p, u, l);
190
- }), r.forEachChild(function(u, f) {
191
- O(e, t, n.concat(f), u, o);
192
- });
193
- }
194
- function ct(e, t, n) {
195
- var r = t === "", o = {
196
- dispatch: r ? e.dispatch : function(s, i, c) {
197
- var a = E(s, i, c), l = a.payload, u = a.options, f = a.type;
198
- if ((!u || !u.root) && (f = t + f, process.env.NODE_ENV !== "production" && !e._actions[f])) {
199
- console.error("[vuex] unknown local action type: " + a.type + ", global type: " + f);
200
- return;
201
- }
202
- return e.dispatch(f, l);
203
- },
204
- commit: r ? e.commit : function(s, i, c) {
205
- var a = E(s, i, c), l = a.payload, u = a.options, f = a.type;
206
- if ((!u || !u.root) && (f = t + f, process.env.NODE_ENV !== "production" && !e._mutations[f])) {
207
- console.error("[vuex] unknown local mutation type: " + a.type + ", global type: " + f);
208
- return;
209
- }
210
- e.commit(f, l, u);
211
- }
212
- };
213
- return Object.defineProperties(o, {
214
- getters: {
215
- get: r ? function() {
216
- return e.getters;
217
- } : function() {
218
- return k(e, t);
219
- }
220
- },
221
- state: {
222
- get: function() {
223
- return C(e.state, n);
224
- }
225
- }
226
- }), o;
227
- }
228
- function k(e, t) {
229
- if (!e._makeLocalGettersCache[t]) {
230
- var n = {}, r = t.length;
231
- Object.keys(e.getters).forEach(function(o) {
232
- if (o.slice(0, r) === t) {
233
- var s = o.slice(r);
234
- Object.defineProperty(n, s, {
235
- get: function() {
236
- return e.getters[o];
237
- },
238
- enumerable: !0
239
- });
240
- }
241
- }), e._makeLocalGettersCache[t] = n;
242
- }
243
- return e._makeLocalGettersCache[t];
244
- }
245
- function at(e, t, n, r) {
246
- var o = e._mutations[t] || (e._mutations[t] = []);
247
- o.push(function(i) {
248
- n.call(e, r.state, i);
249
- });
250
- }
251
- function ut(e, t, n, r) {
252
- var o = e._actions[t] || (e._actions[t] = []);
253
- o.push(function(i) {
254
- var c = n.call(e, {
255
- dispatch: r.dispatch,
256
- commit: r.commit,
257
- getters: r.getters,
258
- state: r.state,
259
- rootGetters: e.getters,
260
- rootState: e.state
261
- }, i);
262
- return it(c) || (c = Promise.resolve(c)), e._devtoolHook ? c.catch(function(a) {
263
- throw e._devtoolHook.emit("vuex:error", a), a;
264
- }) : c;
265
- });
266
- }
267
- function ft(e, t, n, r) {
268
- if (e._wrappedGetters[t]) {
269
- process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate getter key: " + t);
270
- return;
271
- }
272
- e._wrappedGetters[t] = function(s) {
273
- return n(
274
- r.state,
275
- // local state
276
- r.getters,
277
- // local getters
278
- s.state,
279
- // root state
280
- s.getters
281
- // root getters
282
- );
283
- };
284
- }
285
- function lt(e) {
286
- L(function() {
287
- return e._state.data;
288
- }, function() {
289
- process.env.NODE_ENV !== "production" && v(e._committing, "do not mutate vuex store state outside mutation handlers.");
290
- }, { deep: !0, flush: "sync" });
291
- }
292
- function C(e, t) {
293
- return t.reduce(function(n, r) {
294
- return n[r];
295
- }, e);
296
- }
297
- function E(e, t, n) {
298
- return ot(e) && e.type && (n = t, t = e, e = e.type), process.env.NODE_ENV !== "production" && v(typeof e == "string", "expects string as the type, but found " + typeof e + "."), { type: e, payload: t, options: n };
299
- }
300
- var dt = "vuex bindings", I = "vuex:mutations", w = "vuex:actions", y = "vuex", pt = 0;
301
- function ht(e, t) {
302
- nt(
303
- {
304
- id: "org.vuejs.vuex",
305
- app: e,
306
- label: "Vuex",
307
- homepage: "https://next.vuex.vuejs.org/",
308
- logo: "https://vuejs.org/images/icons/favicon-96x96.png",
309
- packageName: "vuex",
310
- componentStateTypes: [dt]
311
- },
312
- function(n) {
313
- n.addTimelineLayer({
314
- id: I,
315
- label: "Vuex Mutations",
316
- color: A
317
- }), n.addTimelineLayer({
318
- id: w,
319
- label: "Vuex Actions",
320
- color: A
321
- }), n.addInspector({
322
- id: y,
323
- label: "Vuex",
324
- icon: "storage",
325
- treeFilterPlaceholder: "Filter stores..."
326
- }), n.on.getInspectorTree(function(r) {
327
- if (r.app === e && r.inspectorId === y)
328
- if (r.filter) {
329
- var o = [];
330
- Q(o, t._modules.root, r.filter, ""), r.rootNodes = o;
331
- } else
332
- r.rootNodes = [
333
- H(t._modules.root, "")
334
- ];
335
- }), n.on.getInspectorState(function(r) {
336
- if (r.app === e && r.inspectorId === y) {
337
- var o = r.nodeId;
338
- k(t, o), r.state = gt(
339
- bt(t._modules, o),
340
- o === "root" ? t.getters : t._makeLocalGettersCache,
341
- o
342
- );
343
- }
344
- }), n.on.editInspectorState(function(r) {
345
- if (r.app === e && r.inspectorId === y) {
346
- var o = r.nodeId, s = r.path;
347
- o !== "root" && (s = o.split("/").filter(Boolean).concat(s)), t._withCommit(function() {
348
- r.set(t._state.data, s, r.state.value);
349
- });
350
- }
351
- }), t.subscribe(function(r, o) {
352
- var s = {};
353
- r.payload && (s.payload = r.payload), s.state = o, n.notifyComponentUpdate(), n.sendInspectorTree(y), n.sendInspectorState(y), n.addTimelineEvent({
354
- layerId: I,
355
- event: {
356
- time: Date.now(),
357
- title: r.type,
358
- data: s
359
- }
360
- });
361
- }), t.subscribeAction({
362
- before: function(r, o) {
363
- var s = {};
364
- r.payload && (s.payload = r.payload), r._id = pt++, r._time = Date.now(), s.state = o, n.addTimelineEvent({
365
- layerId: w,
366
- event: {
367
- time: r._time,
368
- title: r.type,
369
- groupId: r._id,
370
- subtitle: "start",
371
- data: s
372
- }
373
- });
374
- },
375
- after: function(r, o) {
376
- var s = {}, i = Date.now() - r._time;
377
- s.duration = {
378
- _custom: {
379
- type: "duration",
380
- display: i + "ms",
381
- tooltip: "Action duration",
382
- value: i
383
- }
384
- }, r.payload && (s.payload = r.payload), s.state = o, n.addTimelineEvent({
385
- layerId: w,
386
- event: {
387
- time: Date.now(),
388
- title: r.type,
389
- groupId: r._id,
390
- subtitle: "end",
391
- data: s
392
- }
393
- });
394
- }
395
- });
396
- }
397
- );
398
- }
399
- var A = 8702998, vt = 6710886, _t = 16777215, R = {
400
- label: "namespaced",
401
- textColor: _t,
402
- backgroundColor: vt
403
- };
404
- function U(e) {
405
- return e && e !== "root" ? e.split("/").slice(-2, -1)[0] : "Root";
406
- }
407
- function H(e, t) {
408
- return {
409
- id: t || "root",
410
- // all modules end with a `/`, we want the last segment only
411
- // cart/ -> cart
412
- // nested/cart/ -> cart
413
- label: U(t),
414
- tags: e.namespaced ? [R] : [],
415
- children: Object.keys(e._children).map(
416
- function(n) {
417
- return H(
418
- e._children[n],
419
- t + n + "/"
420
- );
421
- }
422
- )
423
- };
424
- }
425
- function Q(e, t, n, r) {
426
- r.includes(n) && e.push({
427
- id: r || "root",
428
- label: r.endsWith("/") ? r.slice(0, r.length - 1) : r || "Root",
429
- tags: t.namespaced ? [R] : []
430
- }), Object.keys(t._children).forEach(function(o) {
431
- Q(e, t._children[o], n, r + o + "/");
432
- });
433
- }
434
- function gt(e, t, n) {
435
- t = n === "root" ? t : t[n];
436
- var r = Object.keys(t), o = {
437
- state: Object.keys(e.state).map(function(i) {
438
- return {
439
- key: i,
440
- editable: !0,
441
- value: e.state[i]
442
- };
443
- })
444
- };
445
- if (r.length) {
446
- var s = mt(t);
447
- o.getters = Object.keys(s).map(function(i) {
448
- return {
449
- key: i.endsWith("/") ? U(i) : i,
450
- editable: !1,
451
- value: S(function() {
452
- return s[i];
453
- })
454
- };
455
- });
456
- }
457
- return o;
458
- }
459
- function mt(e) {
460
- var t = {};
461
- return Object.keys(e).forEach(function(n) {
462
- var r = n.split("/");
463
- if (r.length > 1) {
464
- var o = t, s = r.pop();
465
- r.forEach(function(i) {
466
- o[i] || (o[i] = {
467
- _custom: {
468
- value: {},
469
- display: i,
470
- tooltip: "Module",
471
- abstract: !0
472
- }
473
- }), o = o[i]._custom.value;
474
- }), o[s] = S(function() {
475
- return e[n];
476
- });
477
- } else
478
- t[n] = S(function() {
479
- return e[n];
480
- });
481
- }), t;
482
- }
483
- function bt(e, t) {
484
- var n = t.split("/").filter(function(r) {
485
- return r;
486
- });
487
- return n.reduce(
488
- function(r, o, s) {
489
- var i = r[o];
490
- if (!i)
491
- throw new Error('Missing module "' + o + '" for path "' + t + '".');
492
- return s === n.length - 1 ? i : i._children;
493
- },
494
- t === "root" ? e : e.root._children
495
- );
496
- }
497
- function S(e) {
498
- try {
499
- return e();
500
- } catch (t) {
501
- return t;
502
- }
503
- }
504
- var _ = function(t, n) {
505
- this.runtime = n, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
506
- var r = t.state;
507
- this.state = (typeof r == "function" ? r() : r) || {};
508
- }, K = { namespaced: { configurable: !0 } };
509
- K.namespaced.get = function() {
510
- return !!this._rawModule.namespaced;
511
- };
512
- _.prototype.addChild = function(t, n) {
513
- this._children[t] = n;
514
- };
515
- _.prototype.removeChild = function(t) {
516
- delete this._children[t];
517
- };
518
- _.prototype.getChild = function(t) {
519
- return this._children[t];
520
- };
521
- _.prototype.hasChild = function(t) {
522
- return t in this._children;
523
- };
524
- _.prototype.update = function(t) {
525
- this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
526
- };
527
- _.prototype.forEachChild = function(t) {
528
- g(this._children, t);
529
- };
530
- _.prototype.forEachGetter = function(t) {
531
- this._rawModule.getters && g(this._rawModule.getters, t);
532
- };
533
- _.prototype.forEachAction = function(t) {
534
- this._rawModule.actions && g(this._rawModule.actions, t);
535
- };
536
- _.prototype.forEachMutation = function(t) {
537
- this._rawModule.mutations && g(this._rawModule.mutations, t);
538
- };
539
- Object.defineProperties(_.prototype, K);
540
- var m = function(t) {
541
- this.register([], t, !1);
542
- };
543
- m.prototype.get = function(t) {
544
- return t.reduce(function(n, r) {
545
- return n.getChild(r);
546
- }, this.root);
547
- };
548
- m.prototype.getNamespace = function(t) {
549
- var n = this.root;
550
- return t.reduce(function(r, o) {
551
- return n = n.getChild(o), r + (n.namespaced ? o + "/" : "");
552
- }, "");
553
- };
554
- m.prototype.update = function(t) {
555
- B([], this.root, t);
556
- };
557
- m.prototype.register = function(t, n, r) {
558
- var o = this;
559
- r === void 0 && (r = !0), process.env.NODE_ENV !== "production" && F(t, n);
560
- var s = new _(n, r);
561
- if (t.length === 0)
562
- this.root = s;
563
- else {
564
- var i = this.get(t.slice(0, -1));
565
- i.addChild(t[t.length - 1], s);
566
- }
567
- n.modules && g(n.modules, function(c, a) {
568
- o.register(t.concat(a), c, r);
569
- });
570
- };
571
- m.prototype.unregister = function(t) {
572
- var n = this.get(t.slice(0, -1)), r = t[t.length - 1], o = n.getChild(r);
573
- if (!o) {
574
- process.env.NODE_ENV !== "production" && console.warn(
575
- "[vuex] trying to unregister module '" + r + "', which is not registered"
576
- );
577
- return;
578
- }
579
- o.runtime && n.removeChild(r);
580
- };
581
- m.prototype.isRegistered = function(t) {
582
- var n = this.get(t.slice(0, -1)), r = t[t.length - 1];
583
- return n ? n.hasChild(r) : !1;
584
- };
585
- function B(e, t, n) {
586
- if (process.env.NODE_ENV !== "production" && F(e, n), t.update(n), n.modules)
587
- for (var r in n.modules) {
588
- if (!t.getChild(r)) {
589
- process.env.NODE_ENV !== "production" && console.warn(
590
- "[vuex] trying to add a new module '" + r + "' on hot reloading, manual reload is needed"
591
- );
592
- return;
593
- }
594
- B(
595
- e.concat(r),
596
- t.getChild(r),
597
- n.modules[r]
598
- );
599
- }
600
- }
601
- var V = {
602
- assert: function(e) {
603
- return typeof e == "function";
604
- },
605
- expected: "function"
606
- }, yt = {
607
- assert: function(e) {
608
- return typeof e == "function" || typeof e == "object" && typeof e.handler == "function";
609
- },
610
- expected: 'function or object with "handler" function'
611
- }, T = {
612
- getters: V,
613
- mutations: V,
614
- actions: yt
615
- };
616
- function F(e, t) {
617
- Object.keys(T).forEach(function(n) {
618
- if (t[n]) {
619
- var r = T[n];
620
- g(t[n], function(o, s) {
621
- v(
622
- r.assert(o),
623
- Et(e, n, s, o, r.expected)
624
- );
625
- });
626
- }
627
- });
628
- }
629
- function Et(e, t, n, r, o) {
630
- var s = t + " should be " + o + ' but "' + t + "." + n + '"';
631
- return e.length > 0 && (s += ' in module "' + e.join(".") + '"'), s += " is " + JSON.stringify(r) + ".", s;
632
- }
633
- function St(e) {
634
- return new h(e);
635
- }
636
- var h = function e(t) {
637
- var n = this;
638
- t === void 0 && (t = {}), process.env.NODE_ENV !== "production" && (v(typeof Promise != "undefined", "vuex requires a Promise polyfill in this browser."), v(this instanceof e, "store must be called with the new operator."));
639
- var r = t.plugins;
640
- r === void 0 && (r = []);
641
- var o = t.strict;
642
- o === void 0 && (o = !1);
643
- var s = t.devtools;
644
- this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new m(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._devtools = s;
645
- var i = this, c = this, a = c.dispatch, l = c.commit;
646
- this.dispatch = function(p, d) {
647
- return a.call(i, p, d);
648
- }, this.commit = function(p, d, J) {
649
- return l.call(i, p, d, J);
650
- }, this.strict = o;
651
- var u = this._modules.root.state;
652
- O(this, u, [], this._modules.root), x(this, u), r.forEach(function(f) {
653
- return f(n);
654
- });
655
- }, D = { state: { configurable: !0 } };
656
- h.prototype.install = function(t, n) {
657
- t.provide(n || P, this), t.config.globalProperties.$store = this;
658
- var r = this._devtools !== void 0 ? this._devtools : process.env.NODE_ENV !== "production" || !1;
659
- r && ht(t, this);
660
- };
661
- D.state.get = function() {
662
- return this._state.data;
663
- };
664
- D.state.set = function(e) {
665
- process.env.NODE_ENV !== "production" && v(!1, "use store.replaceState() to explicit replace store state.");
666
- };
667
- h.prototype.commit = function(t, n, r) {
668
- var o = this, s = E(t, n, r), i = s.type, c = s.payload, a = s.options, l = { type: i, payload: c }, u = this._mutations[i];
669
- if (!u) {
670
- process.env.NODE_ENV !== "production" && console.error("[vuex] unknown mutation type: " + i);
671
- return;
672
- }
673
- this._withCommit(function() {
674
- u.forEach(function(p) {
675
- p(c);
676
- });
677
- }), this._subscribers.slice().forEach(function(f) {
678
- return f(l, o.state);
679
- }), process.env.NODE_ENV !== "production" && a && a.silent && console.warn(
680
- "[vuex] mutation type: " + i + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
681
- );
682
- };
683
- h.prototype.dispatch = function(t, n) {
684
- var r = this, o = E(t, n), s = o.type, i = o.payload, c = { type: s, payload: i }, a = this._actions[s];
685
- if (!a) {
686
- process.env.NODE_ENV !== "production" && console.error("[vuex] unknown action type: " + s);
687
- return;
688
- }
689
- try {
690
- this._actionSubscribers.slice().filter(function(u) {
691
- return u.before;
692
- }).forEach(function(u) {
693
- return u.before(c, r.state);
694
- });
695
- } catch (u) {
696
- process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in before action subscribers: "), console.error(u));
697
- }
698
- var l = a.length > 1 ? Promise.all(a.map(function(u) {
699
- return u(i);
700
- })) : a[0](i);
701
- return new Promise(function(u, f) {
702
- l.then(function(p) {
703
- try {
704
- r._actionSubscribers.filter(function(d) {
705
- return d.after;
706
- }).forEach(function(d) {
707
- return d.after(c, r.state);
708
- });
709
- } catch (d) {
710
- process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in after action subscribers: "), console.error(d));
711
- }
712
- u(p);
713
- }, function(p) {
714
- try {
715
- r._actionSubscribers.filter(function(d) {
716
- return d.error;
717
- }).forEach(function(d) {
718
- return d.error(c, r.state, p);
719
- });
720
- } catch (d) {
721
- process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in error action subscribers: "), console.error(d));
722
- }
723
- f(p);
724
- });
725
- });
726
- };
727
- h.prototype.subscribe = function(t, n) {
728
- return M(t, this._subscribers, n);
729
- };
730
- h.prototype.subscribeAction = function(t, n) {
731
- var r = typeof t == "function" ? { before: t } : t;
732
- return M(r, this._actionSubscribers, n);
733
- };
734
- h.prototype.watch = function(t, n, r) {
735
- var o = this;
736
- return process.env.NODE_ENV !== "production" && v(typeof t == "function", "store.watch only accepts a function."), L(function() {
737
- return t(o.state, o.getters);
738
- }, n, Object.assign({}, r));
739
- };
740
- h.prototype.replaceState = function(t) {
741
- var n = this;
742
- this._withCommit(function() {
743
- n._state.data = t;
744
- });
745
- };
746
- h.prototype.registerModule = function(t, n, r) {
747
- r === void 0 && (r = {}), typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && (v(Array.isArray(t), "module path must be a string or an Array."), v(t.length > 0, "cannot register the root module by using registerModule.")), this._modules.register(t, n), O(this, this.state, t, this._modules.get(t), r.preserveState), x(this, this.state);
748
- };
749
- h.prototype.unregisterModule = function(t) {
750
- var n = this;
751
- typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && v(Array.isArray(t), "module path must be a string or an Array."), this._modules.unregister(t), this._withCommit(function() {
752
- var r = C(n.state, t.slice(0, -1));
753
- delete r[t[t.length - 1]];
754
- }), $(this);
755
- };
756
- h.prototype.hasModule = function(t) {
757
- return typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && v(Array.isArray(t), "module path must be a string or an Array."), this._modules.isRegistered(t);
758
- };
759
- h.prototype.hotUpdate = function(t) {
760
- this._modules.update(t), $(this, !0);
761
- };
762
- h.prototype._withCommit = function(t) {
763
- var n = this._committing;
764
- this._committing = !0, t(), this._committing = n;
765
- };
766
- Object.defineProperties(h.prototype, D);
767
- export {
768
- St as c,
769
- Nt as u
770
- };
1
+ var j = (e, t, n) => new Promise((r, o) => {
2
+ var s = (a) => {
3
+ try {
4
+ c(n.next(a));
5
+ } catch (l) {
6
+ o(l);
7
+ }
8
+ }, i = (a) => {
9
+ try {
10
+ c(n.throw(a));
11
+ } catch (l) {
12
+ o(l);
13
+ }
14
+ }, c = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(s, i);
15
+ c((n = n.apply(e, t)).next());
16
+ });
17
+ import { inject as W, watch as L, reactive as Y } from "vue";
18
+ function q() {
19
+ return G().__VUE_DEVTOOLS_GLOBAL_HOOK__;
20
+ }
21
+ function G() {
22
+ return typeof navigator != "undefined" && typeof window != "undefined" ? window : typeof global != "undefined" ? global : {};
23
+ }
24
+ const X = typeof Proxy == "function", z = "devtools-plugin:setup", Z = "plugin:settings:set";
25
+ let b, N;
26
+ function tt() {
27
+ var e;
28
+ return b !== void 0 || (typeof window != "undefined" && window.performance ? (b = !0, N = window.performance) : typeof global != "undefined" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? (b = !0, N = global.perf_hooks.performance) : b = !1), b;
29
+ }
30
+ function et() {
31
+ return tt() ? N.now() : Date.now();
32
+ }
33
+ class rt {
34
+ constructor(t, n) {
35
+ this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
36
+ const r = {};
37
+ if (t.settings)
38
+ for (const i in t.settings) {
39
+ const c = t.settings[i];
40
+ r[i] = c.defaultValue;
41
+ }
42
+ const o = `__vue-devtools-plugin-settings__${t.id}`;
43
+ let s = Object.assign({}, r);
44
+ try {
45
+ const i = localStorage.getItem(o), c = JSON.parse(i);
46
+ Object.assign(s, c);
47
+ } catch (i) {
48
+ }
49
+ this.fallbacks = {
50
+ getSettings() {
51
+ return s;
52
+ },
53
+ setSettings(i) {
54
+ try {
55
+ localStorage.setItem(o, JSON.stringify(i));
56
+ } catch (c) {
57
+ }
58
+ s = i;
59
+ },
60
+ now() {
61
+ return et();
62
+ }
63
+ }, n && n.on(Z, (i, c) => {
64
+ i === this.plugin.id && this.fallbacks.setSettings(c);
65
+ }), this.proxiedOn = new Proxy({}, {
66
+ get: (i, c) => this.target ? this.target.on[c] : (...a) => {
67
+ this.onQueue.push({
68
+ method: c,
69
+ args: a
70
+ });
71
+ }
72
+ }), this.proxiedTarget = new Proxy({}, {
73
+ get: (i, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...a) => (this.targetQueue.push({
74
+ method: c,
75
+ args: a,
76
+ resolve: () => {
77
+ }
78
+ }), this.fallbacks[c](...a)) : (...a) => new Promise((l) => {
79
+ this.targetQueue.push({
80
+ method: c,
81
+ args: a,
82
+ resolve: l
83
+ });
84
+ })
85
+ });
86
+ }
87
+ setRealTarget(t) {
88
+ return j(this, null, function* () {
89
+ this.target = t;
90
+ for (const n of this.onQueue)
91
+ this.target.on[n.method](...n.args);
92
+ for (const n of this.targetQueue)
93
+ n.resolve(yield this.target[n.method](...n.args));
94
+ });
95
+ }
96
+ }
97
+ function nt(e, t) {
98
+ const n = e, r = G(), o = q(), s = X && n.enableEarlyProxy;
99
+ if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
100
+ o.emit(z, e, t);
101
+ else {
102
+ const i = s ? new rt(n, o) : null;
103
+ (r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
104
+ pluginDescriptor: n,
105
+ setupFn: t,
106
+ proxy: i
107
+ }), i && t(i.proxiedTarget);
108
+ }
109
+ }
110
+ /*!
111
+ * vuex v4.0.2
112
+ * (c) 2021 Evan You
113
+ * @license MIT
114
+ */
115
+ var P = "store";
116
+ function Nt(e) {
117
+ return e === void 0 && (e = null), W(e !== null ? e : P);
118
+ }
119
+ function g(e, t) {
120
+ Object.keys(e).forEach(function(n) {
121
+ return t(e[n], n);
122
+ });
123
+ }
124
+ function ot(e) {
125
+ return e !== null && typeof e == "object";
126
+ }
127
+ function it(e) {
128
+ return e && typeof e.then == "function";
129
+ }
130
+ function v(e, t) {
131
+ if (!e)
132
+ throw new Error("[vuex] " + t);
133
+ }
134
+ function st(e, t) {
135
+ return function() {
136
+ return e(t);
137
+ };
138
+ }
139
+ function M(e, t, n) {
140
+ return t.indexOf(e) < 0 && (n && n.prepend ? t.unshift(e) : t.push(e)), function() {
141
+ var r = t.indexOf(e);
142
+ r > -1 && t.splice(r, 1);
143
+ };
144
+ }
145
+ function $(e, t) {
146
+ e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
147
+ var n = e.state;
148
+ O(e, n, [], e._modules.root, !0), x(e, n, t);
149
+ }
150
+ function x(e, t, n) {
151
+ var r = e._state;
152
+ e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
153
+ var o = e._wrappedGetters, s = {};
154
+ g(o, function(i, c) {
155
+ s[c] = st(i, e), Object.defineProperty(e.getters, c, {
156
+ // TODO: use `computed` when it's possible. at the moment we can't due to
157
+ // https://github.com/vuejs/vuex/pull/1883
158
+ get: function() {
159
+ return s[c]();
160
+ },
161
+ enumerable: !0
162
+ // for local getters
163
+ });
164
+ }), e._state = Y({
165
+ data: t
166
+ }), e.strict && lt(e), r && n && e._withCommit(function() {
167
+ r.data = null;
168
+ });
169
+ }
170
+ function O(e, t, n, r, o) {
171
+ var s = !n.length, i = e._modules.getNamespace(n);
172
+ if (r.namespaced && (e._modulesNamespaceMap[i] && process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate namespace " + i + " for the namespaced module " + n.join("/")), e._modulesNamespaceMap[i] = r), !s && !o) {
173
+ var c = C(t, n.slice(0, -1)), a = n[n.length - 1];
174
+ e._withCommit(function() {
175
+ process.env.NODE_ENV !== "production" && a in c && console.warn(
176
+ '[vuex] state field "' + a + '" was overridden by a module with the same name at "' + n.join(".") + '"'
177
+ ), c[a] = r.state;
178
+ });
179
+ }
180
+ var l = r.context = ct(e, i, n);
181
+ r.forEachMutation(function(u, f) {
182
+ var p = i + f;
183
+ at(e, p, u, l);
184
+ }), r.forEachAction(function(u, f) {
185
+ var p = u.root ? f : i + f, d = u.handler || u;
186
+ ut(e, p, d, l);
187
+ }), r.forEachGetter(function(u, f) {
188
+ var p = i + f;
189
+ ft(e, p, u, l);
190
+ }), r.forEachChild(function(u, f) {
191
+ O(e, t, n.concat(f), u, o);
192
+ });
193
+ }
194
+ function ct(e, t, n) {
195
+ var r = t === "", o = {
196
+ dispatch: r ? e.dispatch : function(s, i, c) {
197
+ var a = E(s, i, c), l = a.payload, u = a.options, f = a.type;
198
+ if ((!u || !u.root) && (f = t + f, process.env.NODE_ENV !== "production" && !e._actions[f])) {
199
+ console.error("[vuex] unknown local action type: " + a.type + ", global type: " + f);
200
+ return;
201
+ }
202
+ return e.dispatch(f, l);
203
+ },
204
+ commit: r ? e.commit : function(s, i, c) {
205
+ var a = E(s, i, c), l = a.payload, u = a.options, f = a.type;
206
+ if ((!u || !u.root) && (f = t + f, process.env.NODE_ENV !== "production" && !e._mutations[f])) {
207
+ console.error("[vuex] unknown local mutation type: " + a.type + ", global type: " + f);
208
+ return;
209
+ }
210
+ e.commit(f, l, u);
211
+ }
212
+ };
213
+ return Object.defineProperties(o, {
214
+ getters: {
215
+ get: r ? function() {
216
+ return e.getters;
217
+ } : function() {
218
+ return k(e, t);
219
+ }
220
+ },
221
+ state: {
222
+ get: function() {
223
+ return C(e.state, n);
224
+ }
225
+ }
226
+ }), o;
227
+ }
228
+ function k(e, t) {
229
+ if (!e._makeLocalGettersCache[t]) {
230
+ var n = {}, r = t.length;
231
+ Object.keys(e.getters).forEach(function(o) {
232
+ if (o.slice(0, r) === t) {
233
+ var s = o.slice(r);
234
+ Object.defineProperty(n, s, {
235
+ get: function() {
236
+ return e.getters[o];
237
+ },
238
+ enumerable: !0
239
+ });
240
+ }
241
+ }), e._makeLocalGettersCache[t] = n;
242
+ }
243
+ return e._makeLocalGettersCache[t];
244
+ }
245
+ function at(e, t, n, r) {
246
+ var o = e._mutations[t] || (e._mutations[t] = []);
247
+ o.push(function(i) {
248
+ n.call(e, r.state, i);
249
+ });
250
+ }
251
+ function ut(e, t, n, r) {
252
+ var o = e._actions[t] || (e._actions[t] = []);
253
+ o.push(function(i) {
254
+ var c = n.call(e, {
255
+ dispatch: r.dispatch,
256
+ commit: r.commit,
257
+ getters: r.getters,
258
+ state: r.state,
259
+ rootGetters: e.getters,
260
+ rootState: e.state
261
+ }, i);
262
+ return it(c) || (c = Promise.resolve(c)), e._devtoolHook ? c.catch(function(a) {
263
+ throw e._devtoolHook.emit("vuex:error", a), a;
264
+ }) : c;
265
+ });
266
+ }
267
+ function ft(e, t, n, r) {
268
+ if (e._wrappedGetters[t]) {
269
+ process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate getter key: " + t);
270
+ return;
271
+ }
272
+ e._wrappedGetters[t] = function(s) {
273
+ return n(
274
+ r.state,
275
+ // local state
276
+ r.getters,
277
+ // local getters
278
+ s.state,
279
+ // root state
280
+ s.getters
281
+ // root getters
282
+ );
283
+ };
284
+ }
285
+ function lt(e) {
286
+ L(function() {
287
+ return e._state.data;
288
+ }, function() {
289
+ process.env.NODE_ENV !== "production" && v(e._committing, "do not mutate vuex store state outside mutation handlers.");
290
+ }, { deep: !0, flush: "sync" });
291
+ }
292
+ function C(e, t) {
293
+ return t.reduce(function(n, r) {
294
+ return n[r];
295
+ }, e);
296
+ }
297
+ function E(e, t, n) {
298
+ return ot(e) && e.type && (n = t, t = e, e = e.type), process.env.NODE_ENV !== "production" && v(typeof e == "string", "expects string as the type, but found " + typeof e + "."), { type: e, payload: t, options: n };
299
+ }
300
+ var dt = "vuex bindings", I = "vuex:mutations", w = "vuex:actions", y = "vuex", pt = 0;
301
+ function ht(e, t) {
302
+ nt(
303
+ {
304
+ id: "org.vuejs.vuex",
305
+ app: e,
306
+ label: "Vuex",
307
+ homepage: "https://next.vuex.vuejs.org/",
308
+ logo: "https://vuejs.org/images/icons/favicon-96x96.png",
309
+ packageName: "vuex",
310
+ componentStateTypes: [dt]
311
+ },
312
+ function(n) {
313
+ n.addTimelineLayer({
314
+ id: I,
315
+ label: "Vuex Mutations",
316
+ color: A
317
+ }), n.addTimelineLayer({
318
+ id: w,
319
+ label: "Vuex Actions",
320
+ color: A
321
+ }), n.addInspector({
322
+ id: y,
323
+ label: "Vuex",
324
+ icon: "storage",
325
+ treeFilterPlaceholder: "Filter stores..."
326
+ }), n.on.getInspectorTree(function(r) {
327
+ if (r.app === e && r.inspectorId === y)
328
+ if (r.filter) {
329
+ var o = [];
330
+ Q(o, t._modules.root, r.filter, ""), r.rootNodes = o;
331
+ } else
332
+ r.rootNodes = [
333
+ H(t._modules.root, "")
334
+ ];
335
+ }), n.on.getInspectorState(function(r) {
336
+ if (r.app === e && r.inspectorId === y) {
337
+ var o = r.nodeId;
338
+ k(t, o), r.state = gt(
339
+ bt(t._modules, o),
340
+ o === "root" ? t.getters : t._makeLocalGettersCache,
341
+ o
342
+ );
343
+ }
344
+ }), n.on.editInspectorState(function(r) {
345
+ if (r.app === e && r.inspectorId === y) {
346
+ var o = r.nodeId, s = r.path;
347
+ o !== "root" && (s = o.split("/").filter(Boolean).concat(s)), t._withCommit(function() {
348
+ r.set(t._state.data, s, r.state.value);
349
+ });
350
+ }
351
+ }), t.subscribe(function(r, o) {
352
+ var s = {};
353
+ r.payload && (s.payload = r.payload), s.state = o, n.notifyComponentUpdate(), n.sendInspectorTree(y), n.sendInspectorState(y), n.addTimelineEvent({
354
+ layerId: I,
355
+ event: {
356
+ time: Date.now(),
357
+ title: r.type,
358
+ data: s
359
+ }
360
+ });
361
+ }), t.subscribeAction({
362
+ before: function(r, o) {
363
+ var s = {};
364
+ r.payload && (s.payload = r.payload), r._id = pt++, r._time = Date.now(), s.state = o, n.addTimelineEvent({
365
+ layerId: w,
366
+ event: {
367
+ time: r._time,
368
+ title: r.type,
369
+ groupId: r._id,
370
+ subtitle: "start",
371
+ data: s
372
+ }
373
+ });
374
+ },
375
+ after: function(r, o) {
376
+ var s = {}, i = Date.now() - r._time;
377
+ s.duration = {
378
+ _custom: {
379
+ type: "duration",
380
+ display: i + "ms",
381
+ tooltip: "Action duration",
382
+ value: i
383
+ }
384
+ }, r.payload && (s.payload = r.payload), s.state = o, n.addTimelineEvent({
385
+ layerId: w,
386
+ event: {
387
+ time: Date.now(),
388
+ title: r.type,
389
+ groupId: r._id,
390
+ subtitle: "end",
391
+ data: s
392
+ }
393
+ });
394
+ }
395
+ });
396
+ }
397
+ );
398
+ }
399
+ var A = 8702998, vt = 6710886, _t = 16777215, R = {
400
+ label: "namespaced",
401
+ textColor: _t,
402
+ backgroundColor: vt
403
+ };
404
+ function U(e) {
405
+ return e && e !== "root" ? e.split("/").slice(-2, -1)[0] : "Root";
406
+ }
407
+ function H(e, t) {
408
+ return {
409
+ id: t || "root",
410
+ // all modules end with a `/`, we want the last segment only
411
+ // cart/ -> cart
412
+ // nested/cart/ -> cart
413
+ label: U(t),
414
+ tags: e.namespaced ? [R] : [],
415
+ children: Object.keys(e._children).map(
416
+ function(n) {
417
+ return H(
418
+ e._children[n],
419
+ t + n + "/"
420
+ );
421
+ }
422
+ )
423
+ };
424
+ }
425
+ function Q(e, t, n, r) {
426
+ r.includes(n) && e.push({
427
+ id: r || "root",
428
+ label: r.endsWith("/") ? r.slice(0, r.length - 1) : r || "Root",
429
+ tags: t.namespaced ? [R] : []
430
+ }), Object.keys(t._children).forEach(function(o) {
431
+ Q(e, t._children[o], n, r + o + "/");
432
+ });
433
+ }
434
+ function gt(e, t, n) {
435
+ t = n === "root" ? t : t[n];
436
+ var r = Object.keys(t), o = {
437
+ state: Object.keys(e.state).map(function(i) {
438
+ return {
439
+ key: i,
440
+ editable: !0,
441
+ value: e.state[i]
442
+ };
443
+ })
444
+ };
445
+ if (r.length) {
446
+ var s = mt(t);
447
+ o.getters = Object.keys(s).map(function(i) {
448
+ return {
449
+ key: i.endsWith("/") ? U(i) : i,
450
+ editable: !1,
451
+ value: S(function() {
452
+ return s[i];
453
+ })
454
+ };
455
+ });
456
+ }
457
+ return o;
458
+ }
459
+ function mt(e) {
460
+ var t = {};
461
+ return Object.keys(e).forEach(function(n) {
462
+ var r = n.split("/");
463
+ if (r.length > 1) {
464
+ var o = t, s = r.pop();
465
+ r.forEach(function(i) {
466
+ o[i] || (o[i] = {
467
+ _custom: {
468
+ value: {},
469
+ display: i,
470
+ tooltip: "Module",
471
+ abstract: !0
472
+ }
473
+ }), o = o[i]._custom.value;
474
+ }), o[s] = S(function() {
475
+ return e[n];
476
+ });
477
+ } else
478
+ t[n] = S(function() {
479
+ return e[n];
480
+ });
481
+ }), t;
482
+ }
483
+ function bt(e, t) {
484
+ var n = t.split("/").filter(function(r) {
485
+ return r;
486
+ });
487
+ return n.reduce(
488
+ function(r, o, s) {
489
+ var i = r[o];
490
+ if (!i)
491
+ throw new Error('Missing module "' + o + '" for path "' + t + '".');
492
+ return s === n.length - 1 ? i : i._children;
493
+ },
494
+ t === "root" ? e : e.root._children
495
+ );
496
+ }
497
+ function S(e) {
498
+ try {
499
+ return e();
500
+ } catch (t) {
501
+ return t;
502
+ }
503
+ }
504
+ var _ = function(t, n) {
505
+ this.runtime = n, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
506
+ var r = t.state;
507
+ this.state = (typeof r == "function" ? r() : r) || {};
508
+ }, K = { namespaced: { configurable: !0 } };
509
+ K.namespaced.get = function() {
510
+ return !!this._rawModule.namespaced;
511
+ };
512
+ _.prototype.addChild = function(t, n) {
513
+ this._children[t] = n;
514
+ };
515
+ _.prototype.removeChild = function(t) {
516
+ delete this._children[t];
517
+ };
518
+ _.prototype.getChild = function(t) {
519
+ return this._children[t];
520
+ };
521
+ _.prototype.hasChild = function(t) {
522
+ return t in this._children;
523
+ };
524
+ _.prototype.update = function(t) {
525
+ this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
526
+ };
527
+ _.prototype.forEachChild = function(t) {
528
+ g(this._children, t);
529
+ };
530
+ _.prototype.forEachGetter = function(t) {
531
+ this._rawModule.getters && g(this._rawModule.getters, t);
532
+ };
533
+ _.prototype.forEachAction = function(t) {
534
+ this._rawModule.actions && g(this._rawModule.actions, t);
535
+ };
536
+ _.prototype.forEachMutation = function(t) {
537
+ this._rawModule.mutations && g(this._rawModule.mutations, t);
538
+ };
539
+ Object.defineProperties(_.prototype, K);
540
+ var m = function(t) {
541
+ this.register([], t, !1);
542
+ };
543
+ m.prototype.get = function(t) {
544
+ return t.reduce(function(n, r) {
545
+ return n.getChild(r);
546
+ }, this.root);
547
+ };
548
+ m.prototype.getNamespace = function(t) {
549
+ var n = this.root;
550
+ return t.reduce(function(r, o) {
551
+ return n = n.getChild(o), r + (n.namespaced ? o + "/" : "");
552
+ }, "");
553
+ };
554
+ m.prototype.update = function(t) {
555
+ B([], this.root, t);
556
+ };
557
+ m.prototype.register = function(t, n, r) {
558
+ var o = this;
559
+ r === void 0 && (r = !0), process.env.NODE_ENV !== "production" && F(t, n);
560
+ var s = new _(n, r);
561
+ if (t.length === 0)
562
+ this.root = s;
563
+ else {
564
+ var i = this.get(t.slice(0, -1));
565
+ i.addChild(t[t.length - 1], s);
566
+ }
567
+ n.modules && g(n.modules, function(c, a) {
568
+ o.register(t.concat(a), c, r);
569
+ });
570
+ };
571
+ m.prototype.unregister = function(t) {
572
+ var n = this.get(t.slice(0, -1)), r = t[t.length - 1], o = n.getChild(r);
573
+ if (!o) {
574
+ process.env.NODE_ENV !== "production" && console.warn(
575
+ "[vuex] trying to unregister module '" + r + "', which is not registered"
576
+ );
577
+ return;
578
+ }
579
+ o.runtime && n.removeChild(r);
580
+ };
581
+ m.prototype.isRegistered = function(t) {
582
+ var n = this.get(t.slice(0, -1)), r = t[t.length - 1];
583
+ return n ? n.hasChild(r) : !1;
584
+ };
585
+ function B(e, t, n) {
586
+ if (process.env.NODE_ENV !== "production" && F(e, n), t.update(n), n.modules)
587
+ for (var r in n.modules) {
588
+ if (!t.getChild(r)) {
589
+ process.env.NODE_ENV !== "production" && console.warn(
590
+ "[vuex] trying to add a new module '" + r + "' on hot reloading, manual reload is needed"
591
+ );
592
+ return;
593
+ }
594
+ B(
595
+ e.concat(r),
596
+ t.getChild(r),
597
+ n.modules[r]
598
+ );
599
+ }
600
+ }
601
+ var V = {
602
+ assert: function(e) {
603
+ return typeof e == "function";
604
+ },
605
+ expected: "function"
606
+ }, yt = {
607
+ assert: function(e) {
608
+ return typeof e == "function" || typeof e == "object" && typeof e.handler == "function";
609
+ },
610
+ expected: 'function or object with "handler" function'
611
+ }, T = {
612
+ getters: V,
613
+ mutations: V,
614
+ actions: yt
615
+ };
616
+ function F(e, t) {
617
+ Object.keys(T).forEach(function(n) {
618
+ if (t[n]) {
619
+ var r = T[n];
620
+ g(t[n], function(o, s) {
621
+ v(
622
+ r.assert(o),
623
+ Et(e, n, s, o, r.expected)
624
+ );
625
+ });
626
+ }
627
+ });
628
+ }
629
+ function Et(e, t, n, r, o) {
630
+ var s = t + " should be " + o + ' but "' + t + "." + n + '"';
631
+ return e.length > 0 && (s += ' in module "' + e.join(".") + '"'), s += " is " + JSON.stringify(r) + ".", s;
632
+ }
633
+ function St(e) {
634
+ return new h(e);
635
+ }
636
+ var h = function e(t) {
637
+ var n = this;
638
+ t === void 0 && (t = {}), process.env.NODE_ENV !== "production" && (v(typeof Promise != "undefined", "vuex requires a Promise polyfill in this browser."), v(this instanceof e, "store must be called with the new operator."));
639
+ var r = t.plugins;
640
+ r === void 0 && (r = []);
641
+ var o = t.strict;
642
+ o === void 0 && (o = !1);
643
+ var s = t.devtools;
644
+ this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new m(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._devtools = s;
645
+ var i = this, c = this, a = c.dispatch, l = c.commit;
646
+ this.dispatch = function(p, d) {
647
+ return a.call(i, p, d);
648
+ }, this.commit = function(p, d, J) {
649
+ return l.call(i, p, d, J);
650
+ }, this.strict = o;
651
+ var u = this._modules.root.state;
652
+ O(this, u, [], this._modules.root), x(this, u), r.forEach(function(f) {
653
+ return f(n);
654
+ });
655
+ }, D = { state: { configurable: !0 } };
656
+ h.prototype.install = function(t, n) {
657
+ t.provide(n || P, this), t.config.globalProperties.$store = this;
658
+ var r = this._devtools !== void 0 ? this._devtools : process.env.NODE_ENV !== "production" || !1;
659
+ r && ht(t, this);
660
+ };
661
+ D.state.get = function() {
662
+ return this._state.data;
663
+ };
664
+ D.state.set = function(e) {
665
+ process.env.NODE_ENV !== "production" && v(!1, "use store.replaceState() to explicit replace store state.");
666
+ };
667
+ h.prototype.commit = function(t, n, r) {
668
+ var o = this, s = E(t, n, r), i = s.type, c = s.payload, a = s.options, l = { type: i, payload: c }, u = this._mutations[i];
669
+ if (!u) {
670
+ process.env.NODE_ENV !== "production" && console.error("[vuex] unknown mutation type: " + i);
671
+ return;
672
+ }
673
+ this._withCommit(function() {
674
+ u.forEach(function(p) {
675
+ p(c);
676
+ });
677
+ }), this._subscribers.slice().forEach(function(f) {
678
+ return f(l, o.state);
679
+ }), process.env.NODE_ENV !== "production" && a && a.silent && console.warn(
680
+ "[vuex] mutation type: " + i + ". Silent option has been removed. Use the filter functionality in the vue-devtools"
681
+ );
682
+ };
683
+ h.prototype.dispatch = function(t, n) {
684
+ var r = this, o = E(t, n), s = o.type, i = o.payload, c = { type: s, payload: i }, a = this._actions[s];
685
+ if (!a) {
686
+ process.env.NODE_ENV !== "production" && console.error("[vuex] unknown action type: " + s);
687
+ return;
688
+ }
689
+ try {
690
+ this._actionSubscribers.slice().filter(function(u) {
691
+ return u.before;
692
+ }).forEach(function(u) {
693
+ return u.before(c, r.state);
694
+ });
695
+ } catch (u) {
696
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in before action subscribers: "), console.error(u));
697
+ }
698
+ var l = a.length > 1 ? Promise.all(a.map(function(u) {
699
+ return u(i);
700
+ })) : a[0](i);
701
+ return new Promise(function(u, f) {
702
+ l.then(function(p) {
703
+ try {
704
+ r._actionSubscribers.filter(function(d) {
705
+ return d.after;
706
+ }).forEach(function(d) {
707
+ return d.after(c, r.state);
708
+ });
709
+ } catch (d) {
710
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in after action subscribers: "), console.error(d));
711
+ }
712
+ u(p);
713
+ }, function(p) {
714
+ try {
715
+ r._actionSubscribers.filter(function(d) {
716
+ return d.error;
717
+ }).forEach(function(d) {
718
+ return d.error(c, r.state, p);
719
+ });
720
+ } catch (d) {
721
+ process.env.NODE_ENV !== "production" && (console.warn("[vuex] error in error action subscribers: "), console.error(d));
722
+ }
723
+ f(p);
724
+ });
725
+ });
726
+ };
727
+ h.prototype.subscribe = function(t, n) {
728
+ return M(t, this._subscribers, n);
729
+ };
730
+ h.prototype.subscribeAction = function(t, n) {
731
+ var r = typeof t == "function" ? { before: t } : t;
732
+ return M(r, this._actionSubscribers, n);
733
+ };
734
+ h.prototype.watch = function(t, n, r) {
735
+ var o = this;
736
+ return process.env.NODE_ENV !== "production" && v(typeof t == "function", "store.watch only accepts a function."), L(function() {
737
+ return t(o.state, o.getters);
738
+ }, n, Object.assign({}, r));
739
+ };
740
+ h.prototype.replaceState = function(t) {
741
+ var n = this;
742
+ this._withCommit(function() {
743
+ n._state.data = t;
744
+ });
745
+ };
746
+ h.prototype.registerModule = function(t, n, r) {
747
+ r === void 0 && (r = {}), typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && (v(Array.isArray(t), "module path must be a string or an Array."), v(t.length > 0, "cannot register the root module by using registerModule.")), this._modules.register(t, n), O(this, this.state, t, this._modules.get(t), r.preserveState), x(this, this.state);
748
+ };
749
+ h.prototype.unregisterModule = function(t) {
750
+ var n = this;
751
+ typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && v(Array.isArray(t), "module path must be a string or an Array."), this._modules.unregister(t), this._withCommit(function() {
752
+ var r = C(n.state, t.slice(0, -1));
753
+ delete r[t[t.length - 1]];
754
+ }), $(this);
755
+ };
756
+ h.prototype.hasModule = function(t) {
757
+ return typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && v(Array.isArray(t), "module path must be a string or an Array."), this._modules.isRegistered(t);
758
+ };
759
+ h.prototype.hotUpdate = function(t) {
760
+ this._modules.update(t), $(this, !0);
761
+ };
762
+ h.prototype._withCommit = function(t) {
763
+ var n = this._committing;
764
+ this._committing = !0, t(), this._committing = n;
765
+ };
766
+ Object.defineProperties(h.prototype, D);
767
+ export {
768
+ St as c,
769
+ Nt as u
770
+ };