@xingtukeji/micro 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1913 @@
1
+ var hn = Object.defineProperty, mn = Object.defineProperties;
2
+ var _n = Object.getOwnPropertyDescriptors;
3
+ var at = Object.getOwnPropertySymbols;
4
+ var gn = Object.prototype.hasOwnProperty, wn = Object.prototype.propertyIsEnumerable;
5
+ var Me = (e, t, n) => t in e ? hn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, B = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ gn.call(t, n) && Me(e, n, t[n]);
8
+ if (at)
9
+ for (var n of at(t))
10
+ wn.call(t, n) && Me(e, n, t[n]);
11
+ return e;
12
+ }, Ve = (e, t) => mn(e, _n(t));
13
+ var fe = (e, t, n) => (Me(e, typeof t != "symbol" ? t + "" : t, n), n);
14
+ var lt = (e, t, n) => new Promise((o, r) => {
15
+ var s = (l) => {
16
+ try {
17
+ c(n.next(l));
18
+ } catch (u) {
19
+ r(u);
20
+ }
21
+ }, i = (l) => {
22
+ try {
23
+ c(n.throw(l));
24
+ } catch (u) {
25
+ r(u);
26
+ }
27
+ }, c = (l) => l.done ? o(l.value) : Promise.resolve(l.value).then(s, i);
28
+ c((n = n.apply(e, t)).next());
29
+ });
30
+ function En(e, t) {
31
+ const n = /* @__PURE__ */ Object.create(null), o = e.split(",");
32
+ for (let r = 0; r < o.length; r++)
33
+ n[o[r]] = !0;
34
+ return t ? (r) => !!n[r.toLowerCase()] : (r) => !!n[r];
35
+ }
36
+ const D = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {}, On = process.env.NODE_ENV !== "production" ? Object.freeze([]) : [], xt = () => {
37
+ }, Nn = /^on[^a-z]/, bn = (e) => Nn.test(e), x = Object.assign, Sn = (e, t) => {
38
+ const n = e.indexOf(t);
39
+ n > -1 && e.splice(n, 1);
40
+ }, yn = Object.prototype.hasOwnProperty, g = (e, t) => yn.call(e, t), h = Array.isArray, k = (e) => Ce(e) === "[object Map]", In = (e) => Ce(e) === "[object Set]", E = (e) => typeof e == "function", V = (e) => typeof e == "string", qe = (e) => typeof e == "symbol", y = (e) => e !== null && typeof e == "object", Rn = (e) => y(e) && E(e.then) && E(e.catch), vn = Object.prototype.toString, Ce = (e) => vn.call(e), Ct = (e) => Ce(e).slice(8, -1), xn = (e) => Ce(e) === "[object Object]", Ge = (e) => V(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Pt = (e) => {
41
+ const t = /* @__PURE__ */ Object.create(null);
42
+ return (n) => t[n] || (t[n] = e(n));
43
+ }, Mt = Pt(
44
+ (e) => e.charAt(0).toUpperCase() + e.slice(1)
45
+ ), Cn = Pt(
46
+ (e) => e ? `on${Mt(e)}` : ""
47
+ ), ie = (e, t) => !Object.is(e, t), Pn = (e, t, n) => {
48
+ Object.defineProperty(e, t, {
49
+ configurable: !0,
50
+ enumerable: !1,
51
+ value: n
52
+ });
53
+ };
54
+ let ut;
55
+ const Ue = () => ut || (ut = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
56
+ function Je(e) {
57
+ if (h(e)) {
58
+ const t = {};
59
+ for (let n = 0; n < e.length; n++) {
60
+ const o = e[n], r = V(o) ? Dn(o) : Je(o);
61
+ if (r)
62
+ for (const s in r)
63
+ t[s] = r[s];
64
+ }
65
+ return t;
66
+ } else {
67
+ if (V(e))
68
+ return e;
69
+ if (y(e))
70
+ return e;
71
+ }
72
+ }
73
+ const Mn = /;(?![^(]*\))/g, Vn = /:([^]+)/, Tn = /\/\*[^]*?\*\//g;
74
+ function Dn(e) {
75
+ const t = {};
76
+ return e.replace(Tn, "").split(Mn).forEach((n) => {
77
+ if (n) {
78
+ const o = n.split(Vn);
79
+ o.length > 1 && (t[o[0].trim()] = o[1].trim());
80
+ }
81
+ }), t;
82
+ }
83
+ function Xe(e) {
84
+ let t = "";
85
+ if (V(e))
86
+ t = e;
87
+ else if (h(e))
88
+ for (let n = 0; n < e.length; n++) {
89
+ const o = Xe(e[n]);
90
+ o && (t += o + " ");
91
+ }
92
+ else if (y(e))
93
+ for (const n in e)
94
+ e[n] && (t += n + " ");
95
+ return t.trim();
96
+ }
97
+ function ft(e, ...t) {
98
+ console.warn(`[Vue warn] ${e}`, ...t);
99
+ }
100
+ let Vt;
101
+ function $n(e, t = Vt) {
102
+ t && t.active && t.effects.push(e);
103
+ }
104
+ function An() {
105
+ return Vt;
106
+ }
107
+ const ce = (e) => {
108
+ const t = new Set(e);
109
+ return t.w = 0, t.n = 0, t;
110
+ }, Tt = (e) => (e.w & H) > 0, Dt = (e) => (e.n & H) > 0, Un = ({ deps: e }) => {
111
+ if (e.length)
112
+ for (let t = 0; t < e.length; t++)
113
+ e[t].w |= H;
114
+ }, Fn = (e) => {
115
+ const { deps: t } = e;
116
+ if (t.length) {
117
+ let n = 0;
118
+ for (let o = 0; o < t.length; o++) {
119
+ const r = t[o];
120
+ Tt(r) && !Dt(r) ? r.delete(e) : t[n++] = r, r.w &= ~H, r.n &= ~H;
121
+ }
122
+ t.length = n;
123
+ }
124
+ }, Fe = /* @__PURE__ */ new WeakMap();
125
+ let ne = 0, H = 1;
126
+ const je = 30;
127
+ let N;
128
+ const q = Symbol(process.env.NODE_ENV !== "production" ? "iterate" : ""), He = Symbol(process.env.NODE_ENV !== "production" ? "Map key iterate" : "");
129
+ class jn {
130
+ constructor(t, n = null, o) {
131
+ this.fn = t, this.scheduler = n, this.active = !0, this.deps = [], this.parent = void 0, $n(this, o);
132
+ }
133
+ run() {
134
+ if (!this.active)
135
+ return this.fn();
136
+ let t = N, n = j;
137
+ for (; t; ) {
138
+ if (t === this)
139
+ return;
140
+ t = t.parent;
141
+ }
142
+ try {
143
+ return this.parent = N, N = this, j = !0, H = 1 << ++ne, ne <= je ? Un(this) : pt(this), this.fn();
144
+ } finally {
145
+ ne <= je && Fn(this), H = 1 << --ne, N = this.parent, j = n, this.parent = void 0, this.deferStop && this.stop();
146
+ }
147
+ }
148
+ stop() {
149
+ N === this ? this.deferStop = !0 : this.active && (pt(this), this.onStop && this.onStop(), this.active = !1);
150
+ }
151
+ }
152
+ function pt(e) {
153
+ const { deps: t } = e;
154
+ if (t.length) {
155
+ for (let n = 0; n < t.length; n++)
156
+ t[n].delete(e);
157
+ t.length = 0;
158
+ }
159
+ }
160
+ let j = !0;
161
+ const $t = [];
162
+ function Ye() {
163
+ $t.push(j), j = !1;
164
+ }
165
+ function Qe() {
166
+ const e = $t.pop();
167
+ j = e === void 0 ? !0 : e;
168
+ }
169
+ function I(e, t, n) {
170
+ if (j && N) {
171
+ let o = Fe.get(e);
172
+ o || Fe.set(e, o = /* @__PURE__ */ new Map());
173
+ let r = o.get(n);
174
+ r || o.set(n, r = ce());
175
+ const s = process.env.NODE_ENV !== "production" ? { effect: N, target: e, type: t, key: n } : void 0;
176
+ Ke(r, s);
177
+ }
178
+ }
179
+ function Ke(e, t) {
180
+ let n = !1;
181
+ ne <= je ? Dt(e) || (e.n |= H, n = !Tt(e)) : n = !e.has(N), n && (e.add(N), N.deps.push(e), process.env.NODE_ENV !== "production" && N.onTrack && N.onTrack(
182
+ x(
183
+ {
184
+ effect: N
185
+ },
186
+ t
187
+ )
188
+ ));
189
+ }
190
+ function K(e, t, n, o, r, s) {
191
+ const i = Fe.get(e);
192
+ if (!i)
193
+ return;
194
+ let c = [];
195
+ if (t === "clear")
196
+ c = [...i.values()];
197
+ else if (n === "length" && h(e)) {
198
+ const u = Number(o);
199
+ i.forEach((d, a) => {
200
+ (a === "length" || a >= u) && c.push(d);
201
+ });
202
+ } else
203
+ switch (n !== void 0 && c.push(i.get(n)), t) {
204
+ case "add":
205
+ h(e) ? Ge(n) && c.push(i.get("length")) : (c.push(i.get(q)), k(e) && c.push(i.get(He)));
206
+ break;
207
+ case "delete":
208
+ h(e) || (c.push(i.get(q)), k(e) && c.push(i.get(He)));
209
+ break;
210
+ case "set":
211
+ k(e) && c.push(i.get(q));
212
+ break;
213
+ }
214
+ const l = process.env.NODE_ENV !== "production" ? { target: e, type: t, key: n, newValue: o, oldValue: r, oldTarget: s } : void 0;
215
+ if (c.length === 1)
216
+ c[0] && (process.env.NODE_ENV !== "production" ? Q(c[0], l) : Q(c[0]));
217
+ else {
218
+ const u = [];
219
+ for (const d of c)
220
+ d && u.push(...d);
221
+ process.env.NODE_ENV !== "production" ? Q(ce(u), l) : Q(ce(u));
222
+ }
223
+ }
224
+ function Q(e, t) {
225
+ const n = h(e) ? e : [...e];
226
+ for (const o of n)
227
+ o.computed && dt(o, t);
228
+ for (const o of n)
229
+ o.computed || dt(o, t);
230
+ }
231
+ function dt(e, t) {
232
+ (e !== N || e.allowRecurse) && (process.env.NODE_ENV !== "production" && e.onTrigger && e.onTrigger(x({ effect: e }, t)), e.scheduler ? e.scheduler() : e.run());
233
+ }
234
+ const Hn = /* @__PURE__ */ En("__proto__,__v_isRef,__isVue"), At = new Set(
235
+ /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(qe)
236
+ ), Kn = /* @__PURE__ */ Ze(), Ln = /* @__PURE__ */ Ze(!0), zn = /* @__PURE__ */ Ze(!0, !0), ht = /* @__PURE__ */ Wn();
237
+ function Wn() {
238
+ const e = {};
239
+ return ["includes", "indexOf", "lastIndexOf"].forEach((t) => {
240
+ e[t] = function(...n) {
241
+ const o = p(this);
242
+ for (let s = 0, i = this.length; s < i; s++)
243
+ I(o, "get", s + "");
244
+ const r = o[t](...n);
245
+ return r === -1 || r === !1 ? o[t](...n.map(p)) : r;
246
+ };
247
+ }), ["push", "pop", "shift", "unshift", "splice"].forEach((t) => {
248
+ e[t] = function(...n) {
249
+ Ye();
250
+ const o = p(this)[t].apply(this, n);
251
+ return Qe(), o;
252
+ };
253
+ }), e;
254
+ }
255
+ function Bn(e) {
256
+ const t = p(this);
257
+ return I(t, "has", e), t.hasOwnProperty(e);
258
+ }
259
+ function Ze(e = !1, t = !1) {
260
+ return function(o, r, s) {
261
+ if (r === "__v_isReactive")
262
+ return !e;
263
+ if (r === "__v_isReadonly")
264
+ return e;
265
+ if (r === "__v_isShallow")
266
+ return t;
267
+ if (r === "__v_raw" && s === (e ? t ? Kt : Ht : t ? cr : jt).get(o))
268
+ return o;
269
+ const i = h(o);
270
+ if (!e) {
271
+ if (i && g(ht, r))
272
+ return Reflect.get(ht, r, s);
273
+ if (r === "hasOwnProperty")
274
+ return Bn;
275
+ }
276
+ const c = Reflect.get(o, r, s);
277
+ return (qe(r) ? At.has(r) : Hn(r)) || (e || I(o, "get", r), t) ? c : S(c) ? i && Ge(r) ? c : c.value : y(c) ? e ? zt(c) : Lt(c) : c;
278
+ };
279
+ }
280
+ const qn = /* @__PURE__ */ Gn();
281
+ function Gn(e = !1) {
282
+ return function(n, o, r, s) {
283
+ let i = n[o];
284
+ if (L(i) && S(i) && !S(r))
285
+ return !1;
286
+ if (!e && (!be(r) && !L(r) && (i = p(i), r = p(r)), !h(n) && S(i) && !S(r)))
287
+ return i.value = r, !0;
288
+ const c = h(n) && Ge(o) ? Number(o) < n.length : g(n, o), l = Reflect.set(n, o, r, s);
289
+ return n === p(s) && (c ? ie(r, i) && K(n, "set", o, r, i) : K(n, "add", o, r)), l;
290
+ };
291
+ }
292
+ function Jn(e, t) {
293
+ const n = g(e, t), o = e[t], r = Reflect.deleteProperty(e, t);
294
+ return r && n && K(e, "delete", t, void 0, o), r;
295
+ }
296
+ function Xn(e, t) {
297
+ const n = Reflect.has(e, t);
298
+ return (!qe(t) || !At.has(t)) && I(e, "has", t), n;
299
+ }
300
+ function Yn(e) {
301
+ return I(e, "iterate", h(e) ? "length" : q), Reflect.ownKeys(e);
302
+ }
303
+ const Qn = {
304
+ get: Kn,
305
+ set: qn,
306
+ deleteProperty: Jn,
307
+ has: Xn,
308
+ ownKeys: Yn
309
+ }, Ut = {
310
+ get: Ln,
311
+ set(e, t) {
312
+ return process.env.NODE_ENV !== "production" && ft(
313
+ `Set operation on key "${String(t)}" failed: target is readonly.`,
314
+ e
315
+ ), !0;
316
+ },
317
+ deleteProperty(e, t) {
318
+ return process.env.NODE_ENV !== "production" && ft(
319
+ `Delete operation on key "${String(t)}" failed: target is readonly.`,
320
+ e
321
+ ), !0;
322
+ }
323
+ }, Zn = /* @__PURE__ */ x(
324
+ {},
325
+ Ut,
326
+ {
327
+ get: zn
328
+ }
329
+ ), ke = (e) => e, Pe = (e) => Reflect.getPrototypeOf(e);
330
+ function pe(e, t, n = !1, o = !1) {
331
+ e = e.__v_raw;
332
+ const r = p(e), s = p(t);
333
+ n || (t !== s && I(r, "get", t), I(r, "get", s));
334
+ const { has: i } = Pe(r), c = o ? ke : n ? nt : ae;
335
+ if (i.call(r, t))
336
+ return c(e.get(t));
337
+ if (i.call(r, s))
338
+ return c(e.get(s));
339
+ e !== r && e.get(t);
340
+ }
341
+ function de(e, t = !1) {
342
+ const n = this.__v_raw, o = p(n), r = p(e);
343
+ return t || (e !== r && I(o, "has", e), I(o, "has", r)), e === r ? n.has(e) : n.has(e) || n.has(r);
344
+ }
345
+ function he(e, t = !1) {
346
+ return e = e.__v_raw, !t && I(p(e), "iterate", q), Reflect.get(e, "size", e);
347
+ }
348
+ function mt(e) {
349
+ e = p(e);
350
+ const t = p(this);
351
+ return Pe(t).has.call(t, e) || (t.add(e), K(t, "add", e, e)), this;
352
+ }
353
+ function _t(e, t) {
354
+ t = p(t);
355
+ const n = p(this), { has: o, get: r } = Pe(n);
356
+ let s = o.call(n, e);
357
+ s ? process.env.NODE_ENV !== "production" && Ft(n, o, e) : (e = p(e), s = o.call(n, e));
358
+ const i = r.call(n, e);
359
+ return n.set(e, t), s ? ie(t, i) && K(n, "set", e, t, i) : K(n, "add", e, t), this;
360
+ }
361
+ function gt(e) {
362
+ const t = p(this), { has: n, get: o } = Pe(t);
363
+ let r = n.call(t, e);
364
+ r ? process.env.NODE_ENV !== "production" && Ft(t, n, e) : (e = p(e), r = n.call(t, e));
365
+ const s = o ? o.call(t, e) : void 0, i = t.delete(e);
366
+ return r && K(t, "delete", e, void 0, s), i;
367
+ }
368
+ function wt() {
369
+ const e = p(this), t = e.size !== 0, n = process.env.NODE_ENV !== "production" ? k(e) ? new Map(e) : new Set(e) : void 0, o = e.clear();
370
+ return t && K(e, "clear", void 0, void 0, n), o;
371
+ }
372
+ function me(e, t) {
373
+ return function(o, r) {
374
+ const s = this, i = s.__v_raw, c = p(i), l = t ? ke : e ? nt : ae;
375
+ return !e && I(c, "iterate", q), i.forEach((u, d) => o.call(r, l(u), l(d), s));
376
+ };
377
+ }
378
+ function _e(e, t, n) {
379
+ return function(...o) {
380
+ const r = this.__v_raw, s = p(r), i = k(s), c = e === "entries" || e === Symbol.iterator && i, l = e === "keys" && i, u = r[e](...o), d = n ? ke : t ? nt : ae;
381
+ return !t && I(
382
+ s,
383
+ "iterate",
384
+ l ? He : q
385
+ ), {
386
+ // iterator protocol
387
+ next() {
388
+ const { value: a, done: f } = u.next();
389
+ return f ? { value: a, done: f } : {
390
+ value: c ? [d(a[0]), d(a[1])] : d(a),
391
+ done: f
392
+ };
393
+ },
394
+ // iterable protocol
395
+ [Symbol.iterator]() {
396
+ return this;
397
+ }
398
+ };
399
+ };
400
+ }
401
+ function $(e) {
402
+ return function(...t) {
403
+ if (process.env.NODE_ENV !== "production") {
404
+ const n = t[0] ? `on key "${t[0]}" ` : "";
405
+ console.warn(
406
+ `${Mt(e)} operation ${n}failed: target is readonly.`,
407
+ p(this)
408
+ );
409
+ }
410
+ return e === "delete" ? !1 : this;
411
+ };
412
+ }
413
+ function kn() {
414
+ const e = {
415
+ get(s) {
416
+ return pe(this, s);
417
+ },
418
+ get size() {
419
+ return he(this);
420
+ },
421
+ has: de,
422
+ add: mt,
423
+ set: _t,
424
+ delete: gt,
425
+ clear: wt,
426
+ forEach: me(!1, !1)
427
+ }, t = {
428
+ get(s) {
429
+ return pe(this, s, !1, !0);
430
+ },
431
+ get size() {
432
+ return he(this);
433
+ },
434
+ has: de,
435
+ add: mt,
436
+ set: _t,
437
+ delete: gt,
438
+ clear: wt,
439
+ forEach: me(!1, !0)
440
+ }, n = {
441
+ get(s) {
442
+ return pe(this, s, !0);
443
+ },
444
+ get size() {
445
+ return he(this, !0);
446
+ },
447
+ has(s) {
448
+ return de.call(this, s, !0);
449
+ },
450
+ add: $("add"),
451
+ set: $("set"),
452
+ delete: $("delete"),
453
+ clear: $("clear"),
454
+ forEach: me(!0, !1)
455
+ }, o = {
456
+ get(s) {
457
+ return pe(this, s, !0, !0);
458
+ },
459
+ get size() {
460
+ return he(this, !0);
461
+ },
462
+ has(s) {
463
+ return de.call(this, s, !0);
464
+ },
465
+ add: $("add"),
466
+ set: $("set"),
467
+ delete: $("delete"),
468
+ clear: $("clear"),
469
+ forEach: me(!0, !0)
470
+ };
471
+ return ["keys", "values", "entries", Symbol.iterator].forEach((s) => {
472
+ e[s] = _e(
473
+ s,
474
+ !1,
475
+ !1
476
+ ), n[s] = _e(
477
+ s,
478
+ !0,
479
+ !1
480
+ ), t[s] = _e(
481
+ s,
482
+ !1,
483
+ !0
484
+ ), o[s] = _e(
485
+ s,
486
+ !0,
487
+ !0
488
+ );
489
+ }), [
490
+ e,
491
+ n,
492
+ t,
493
+ o
494
+ ];
495
+ }
496
+ const [
497
+ er,
498
+ tr,
499
+ nr,
500
+ rr
501
+ ] = /* @__PURE__ */ kn();
502
+ function et(e, t) {
503
+ const n = t ? e ? rr : nr : e ? tr : er;
504
+ return (o, r, s) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? o : Reflect.get(
505
+ g(n, r) && r in o ? n : o,
506
+ r,
507
+ s
508
+ );
509
+ }
510
+ const or = {
511
+ get: /* @__PURE__ */ et(!1, !1)
512
+ }, sr = {
513
+ get: /* @__PURE__ */ et(!0, !1)
514
+ }, ir = {
515
+ get: /* @__PURE__ */ et(!0, !0)
516
+ };
517
+ function Ft(e, t, n) {
518
+ const o = p(n);
519
+ if (o !== n && t.call(e, o)) {
520
+ const r = Ct(e);
521
+ console.warn(
522
+ `Reactive ${r} contains both the raw and reactive versions of the same object${r === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
523
+ );
524
+ }
525
+ }
526
+ const jt = /* @__PURE__ */ new WeakMap(), cr = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap();
527
+ function ar(e) {
528
+ switch (e) {
529
+ case "Object":
530
+ case "Array":
531
+ return 1;
532
+ case "Map":
533
+ case "Set":
534
+ case "WeakMap":
535
+ case "WeakSet":
536
+ return 2;
537
+ default:
538
+ return 0;
539
+ }
540
+ }
541
+ function lr(e) {
542
+ return e.__v_skip || !Object.isExtensible(e) ? 0 : ar(Ct(e));
543
+ }
544
+ function Lt(e) {
545
+ return L(e) ? e : tt(
546
+ e,
547
+ !1,
548
+ Qn,
549
+ or,
550
+ jt
551
+ );
552
+ }
553
+ function zt(e) {
554
+ return tt(
555
+ e,
556
+ !0,
557
+ Ut,
558
+ sr,
559
+ Ht
560
+ );
561
+ }
562
+ function ge(e) {
563
+ return tt(
564
+ e,
565
+ !0,
566
+ Zn,
567
+ ir,
568
+ Kt
569
+ );
570
+ }
571
+ function tt(e, t, n, o, r) {
572
+ if (!y(e))
573
+ return process.env.NODE_ENV !== "production" && console.warn(`value cannot be made reactive: ${String(e)}`), e;
574
+ if (e.__v_raw && !(t && e.__v_isReactive))
575
+ return e;
576
+ const s = r.get(e);
577
+ if (s)
578
+ return s;
579
+ const i = lr(e);
580
+ if (i === 0)
581
+ return e;
582
+ const c = new Proxy(
583
+ e,
584
+ i === 2 ? o : n
585
+ );
586
+ return r.set(e, c), c;
587
+ }
588
+ function G(e) {
589
+ return L(e) ? G(e.__v_raw) : !!(e && e.__v_isReactive);
590
+ }
591
+ function L(e) {
592
+ return !!(e && e.__v_isReadonly);
593
+ }
594
+ function be(e) {
595
+ return !!(e && e.__v_isShallow);
596
+ }
597
+ function Le(e) {
598
+ return G(e) || L(e);
599
+ }
600
+ function p(e) {
601
+ const t = e && e.__v_raw;
602
+ return t ? p(t) : e;
603
+ }
604
+ function ur(e) {
605
+ return Pn(e, "__v_skip", !0), e;
606
+ }
607
+ const ae = (e) => y(e) ? Lt(e) : e, nt = (e) => y(e) ? zt(e) : e;
608
+ function fr(e) {
609
+ j && N && (e = p(e), process.env.NODE_ENV !== "production" ? Ke(e.dep || (e.dep = ce()), {
610
+ target: e,
611
+ type: "get",
612
+ key: "value"
613
+ }) : Ke(e.dep || (e.dep = ce())));
614
+ }
615
+ function pr(e, t) {
616
+ e = p(e);
617
+ const n = e.dep;
618
+ n && (process.env.NODE_ENV !== "production" ? Q(n, {
619
+ target: e,
620
+ type: "set",
621
+ key: "value",
622
+ newValue: t
623
+ }) : Q(n));
624
+ }
625
+ function S(e) {
626
+ return !!(e && e.__v_isRef === !0);
627
+ }
628
+ function Wt(e) {
629
+ return dr(e, !1);
630
+ }
631
+ function dr(e, t) {
632
+ return S(e) ? e : new hr(e, t);
633
+ }
634
+ class hr {
635
+ constructor(t, n) {
636
+ this.__v_isShallow = n, this.dep = void 0, this.__v_isRef = !0, this._rawValue = n ? t : p(t), this._value = n ? t : ae(t);
637
+ }
638
+ get value() {
639
+ return fr(this), this._value;
640
+ }
641
+ set value(t) {
642
+ const n = this.__v_isShallow || be(t) || L(t);
643
+ t = n ? t : p(t), ie(t, this._rawValue) && (this._rawValue = t, this._value = n ? t : ae(t), pr(this, t));
644
+ }
645
+ }
646
+ function mr(e) {
647
+ return S(e) ? e.value : e;
648
+ }
649
+ const _r = {
650
+ get: (e, t, n) => mr(Reflect.get(e, t, n)),
651
+ set: (e, t, n, o) => {
652
+ const r = e[t];
653
+ return S(r) && !S(n) ? (r.value = n, !0) : Reflect.set(e, t, n, o);
654
+ }
655
+ };
656
+ function gr(e) {
657
+ return G(e) ? e : new Proxy(e, _r);
658
+ }
659
+ const J = [];
660
+ function wr(e) {
661
+ J.push(e);
662
+ }
663
+ function Er() {
664
+ J.pop();
665
+ }
666
+ function w(e, ...t) {
667
+ if (process.env.NODE_ENV === "production")
668
+ return;
669
+ Ye();
670
+ const n = J.length ? J[J.length - 1].component : null, o = n && n.appContext.config.warnHandler, r = Or();
671
+ if (o)
672
+ X(
673
+ o,
674
+ n,
675
+ 11,
676
+ [
677
+ e + t.join(""),
678
+ n && n.proxy,
679
+ r.map(
680
+ ({ vnode: s }) => `at <${ln(n, s.type)}>`
681
+ ).join(`
682
+ `),
683
+ r
684
+ ]
685
+ );
686
+ else {
687
+ const s = [`[Vue warn]: ${e}`, ...t];
688
+ r.length && s.push(`
689
+ `, ...Nr(r)), console.warn(...s);
690
+ }
691
+ Qe();
692
+ }
693
+ function Or() {
694
+ let e = J[J.length - 1];
695
+ if (!e)
696
+ return [];
697
+ const t = [];
698
+ for (; e; ) {
699
+ const n = t[0];
700
+ n && n.vnode === e ? n.recurseCount++ : t.push({
701
+ vnode: e,
702
+ recurseCount: 0
703
+ });
704
+ const o = e.component && e.component.parent;
705
+ e = o && o.vnode;
706
+ }
707
+ return t;
708
+ }
709
+ function Nr(e) {
710
+ const t = [];
711
+ return e.forEach((n, o) => {
712
+ t.push(...o === 0 ? [] : [`
713
+ `], ...br(n));
714
+ }), t;
715
+ }
716
+ function br({ vnode: e, recurseCount: t }) {
717
+ const n = t > 0 ? `... (${t} recursive calls)` : "", o = e.component ? e.component.parent == null : !1, r = ` at <${ln(
718
+ e.component,
719
+ e.type,
720
+ o
721
+ )}`, s = ">" + n;
722
+ return e.props ? [r, ...Sr(e.props), s] : [r + s];
723
+ }
724
+ function Sr(e) {
725
+ const t = [], n = Object.keys(e);
726
+ return n.slice(0, 3).forEach((o) => {
727
+ t.push(...Bt(o, e[o]));
728
+ }), n.length > 3 && t.push(" ..."), t;
729
+ }
730
+ function Bt(e, t, n) {
731
+ return V(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : S(t) ? (t = Bt(e, p(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : E(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = p(t), n ? t : [`${e}=`, t]);
732
+ }
733
+ const rt = {
734
+ sp: "serverPrefetch hook",
735
+ bc: "beforeCreate hook",
736
+ c: "created hook",
737
+ bm: "beforeMount hook",
738
+ m: "mounted hook",
739
+ bu: "beforeUpdate hook",
740
+ u: "updated",
741
+ bum: "beforeUnmount hook",
742
+ um: "unmounted hook",
743
+ a: "activated hook",
744
+ da: "deactivated hook",
745
+ ec: "errorCaptured hook",
746
+ rtc: "renderTracked hook",
747
+ rtg: "renderTriggered hook",
748
+ [0]: "setup function",
749
+ [1]: "render function",
750
+ [2]: "watcher getter",
751
+ [3]: "watcher callback",
752
+ [4]: "watcher cleanup function",
753
+ [5]: "native event handler",
754
+ [6]: "component event handler",
755
+ [7]: "vnode hook",
756
+ [8]: "directive hook",
757
+ [9]: "transition hook",
758
+ [10]: "app errorHandler",
759
+ [11]: "app warnHandler",
760
+ [12]: "ref function",
761
+ [13]: "async component loader",
762
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
763
+ };
764
+ function X(e, t, n, o) {
765
+ let r;
766
+ try {
767
+ r = o ? e(...o) : e();
768
+ } catch (s) {
769
+ qt(s, t, n);
770
+ }
771
+ return r;
772
+ }
773
+ function Se(e, t, n, o) {
774
+ if (E(e)) {
775
+ const s = X(e, t, n, o);
776
+ return s && Rn(s) && s.catch((i) => {
777
+ qt(i, t, n);
778
+ }), s;
779
+ }
780
+ const r = [];
781
+ for (let s = 0; s < e.length; s++)
782
+ r.push(Se(e[s], t, n, o));
783
+ return r;
784
+ }
785
+ function qt(e, t, n, o = !0) {
786
+ const r = t ? t.vnode : null;
787
+ if (t) {
788
+ let s = t.parent;
789
+ const i = t.proxy, c = process.env.NODE_ENV !== "production" ? rt[n] : n;
790
+ for (; s; ) {
791
+ const u = s.ec;
792
+ if (u) {
793
+ for (let d = 0; d < u.length; d++)
794
+ if (u[d](e, i, c) === !1)
795
+ return;
796
+ }
797
+ s = s.parent;
798
+ }
799
+ const l = t.appContext.config.errorHandler;
800
+ if (l) {
801
+ X(
802
+ l,
803
+ null,
804
+ 10,
805
+ [e, i, c]
806
+ );
807
+ return;
808
+ }
809
+ }
810
+ yr(e, n, r, o);
811
+ }
812
+ function yr(e, t, n, o = !0) {
813
+ if (process.env.NODE_ENV !== "production") {
814
+ const r = rt[t];
815
+ if (n && wr(n), w(`Unhandled error${r ? ` during execution of ${r}` : ""}`), n && Er(), o)
816
+ throw e;
817
+ console.error(e);
818
+ } else
819
+ console.error(e);
820
+ }
821
+ let ye = !1, ze = !1;
822
+ const P = [];
823
+ let U = 0;
824
+ const ee = [];
825
+ let T = null, A = 0;
826
+ const Gt = /* @__PURE__ */ Promise.resolve();
827
+ let ot = null;
828
+ const Ir = 100;
829
+ function Rr(e) {
830
+ const t = ot || Gt;
831
+ return e ? t.then(this ? e.bind(this) : e) : t;
832
+ }
833
+ function vr(e) {
834
+ let t = U + 1, n = P.length;
835
+ for (; t < n; ) {
836
+ const o = t + n >>> 1;
837
+ le(P[o]) < e ? t = o + 1 : n = o;
838
+ }
839
+ return t;
840
+ }
841
+ function st(e) {
842
+ (!P.length || !P.includes(
843
+ e,
844
+ ye && e.allowRecurse ? U + 1 : U
845
+ )) && (e.id == null ? P.push(e) : P.splice(vr(e.id), 0, e), Jt());
846
+ }
847
+ function Jt() {
848
+ !ye && !ze && (ze = !0, ot = Gt.then(Yt));
849
+ }
850
+ function Xt(e) {
851
+ h(e) ? ee.push(...e) : (!T || !T.includes(
852
+ e,
853
+ e.allowRecurse ? A + 1 : A
854
+ )) && ee.push(e), Jt();
855
+ }
856
+ function xr(e) {
857
+ if (ee.length) {
858
+ const t = [...new Set(ee)];
859
+ if (ee.length = 0, T) {
860
+ T.push(...t);
861
+ return;
862
+ }
863
+ for (T = t, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), T.sort((n, o) => le(n) - le(o)), A = 0; A < T.length; A++)
864
+ process.env.NODE_ENV !== "production" && Qt(e, T[A]) || T[A]();
865
+ T = null, A = 0;
866
+ }
867
+ }
868
+ const le = (e) => e.id == null ? 1 / 0 : e.id, Cr = (e, t) => {
869
+ const n = le(e) - le(t);
870
+ if (n === 0) {
871
+ if (e.pre && !t.pre)
872
+ return -1;
873
+ if (t.pre && !e.pre)
874
+ return 1;
875
+ }
876
+ return n;
877
+ };
878
+ function Yt(e) {
879
+ ze = !1, ye = !0, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), P.sort(Cr);
880
+ const t = process.env.NODE_ENV !== "production" ? (n) => Qt(e, n) : xt;
881
+ try {
882
+ for (U = 0; U < P.length; U++) {
883
+ const n = P[U];
884
+ if (n && n.active !== !1) {
885
+ if (process.env.NODE_ENV !== "production" && t(n))
886
+ continue;
887
+ X(n, null, 14);
888
+ }
889
+ }
890
+ } finally {
891
+ U = 0, P.length = 0, xr(e), ye = !1, ot = null, (P.length || ee.length) && Yt(e);
892
+ }
893
+ }
894
+ function Qt(e, t) {
895
+ if (!e.has(t))
896
+ e.set(t, 1);
897
+ else {
898
+ const n = e.get(t);
899
+ if (n > Ir) {
900
+ const o = t.ownerInstance, r = o && an(o.type);
901
+ return w(
902
+ `Maximum recursive updates exceeded${r ? ` in component <${r}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
903
+ ), !0;
904
+ } else
905
+ e.set(t, n + 1);
906
+ }
907
+ }
908
+ const te = /* @__PURE__ */ new Set();
909
+ process.env.NODE_ENV !== "production" && (Ue().__VUE_HMR_RUNTIME__ = {
910
+ createRecord: Te(Pr),
911
+ rerender: Te(Mr),
912
+ reload: Te(Vr)
913
+ });
914
+ const Ie = /* @__PURE__ */ new Map();
915
+ function Pr(e, t) {
916
+ return Ie.has(e) ? !1 : (Ie.set(e, {
917
+ initialDef: oe(t),
918
+ instances: /* @__PURE__ */ new Set()
919
+ }), !0);
920
+ }
921
+ function oe(e) {
922
+ return un(e) ? e.__vccOpts : e;
923
+ }
924
+ function Mr(e, t) {
925
+ const n = Ie.get(e);
926
+ n && (n.initialDef.render = t, [...n.instances].forEach((o) => {
927
+ t && (o.render = t, oe(o.type).render = t), o.renderCache = [], o.update();
928
+ }));
929
+ }
930
+ function Vr(e, t) {
931
+ const n = Ie.get(e);
932
+ if (!n)
933
+ return;
934
+ t = oe(t), Et(n.initialDef, t);
935
+ const o = [...n.instances];
936
+ for (const r of o) {
937
+ const s = oe(r.type);
938
+ te.has(s) || (s !== n.initialDef && Et(s, t), te.add(s)), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (te.add(s), r.ceReload(t.styles), te.delete(s)) : r.parent ? st(r.parent.update) : r.appContext.reload ? r.appContext.reload() : typeof window != "undefined" ? window.location.reload() : console.warn(
939
+ "[HMR] Root or manually mounted instance modified. Full reload required."
940
+ );
941
+ }
942
+ Xt(() => {
943
+ for (const r of o)
944
+ te.delete(
945
+ oe(r.type)
946
+ );
947
+ });
948
+ }
949
+ function Et(e, t) {
950
+ x(e, t);
951
+ for (const n in e)
952
+ n !== "__file" && !(n in t) && delete e[n];
953
+ }
954
+ function Te(e) {
955
+ return (t, n) => {
956
+ try {
957
+ return e(t, n);
958
+ } catch (o) {
959
+ console.error(o), console.warn(
960
+ "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
961
+ );
962
+ }
963
+ };
964
+ }
965
+ let F = null, Tr = null;
966
+ const Dr = (e) => e.__isSuspense;
967
+ function $r(e, t) {
968
+ t && t.pendingBranch ? h(e) ? t.effects.push(...e) : t.effects.push(e) : Xt(e);
969
+ }
970
+ const we = {};
971
+ function Ar(e, t, n) {
972
+ return process.env.NODE_ENV !== "production" && !E(t) && w(
973
+ "`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."
974
+ ), Zt(e, t, n);
975
+ }
976
+ function Zt(e, t, { immediate: n, deep: o, flush: r, onTrack: s, onTrigger: i } = D) {
977
+ var c;
978
+ process.env.NODE_ENV !== "production" && !t && (n !== void 0 && w(
979
+ 'watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'
980
+ ), o !== void 0 && w(
981
+ 'watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'
982
+ ));
983
+ const l = (_) => {
984
+ w(
985
+ "Invalid watch source: ",
986
+ _,
987
+ "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
988
+ );
989
+ }, u = An() === ((c = z) == null ? void 0 : c.scope) ? z : null;
990
+ let d, a = !1, f = !1;
991
+ if (S(e) ? (d = () => e.value, a = be(e)) : G(e) ? (d = () => e, o = !0) : h(e) ? (f = !0, a = e.some((_) => G(_) || be(_)), d = () => e.map((_) => {
992
+ if (S(_))
993
+ return _.value;
994
+ if (G(_))
995
+ return Z(_);
996
+ if (E(_))
997
+ return X(_, u, 2);
998
+ process.env.NODE_ENV !== "production" && l(_);
999
+ })) : E(e) ? t ? d = () => X(e, u, 2) : d = () => {
1000
+ if (!(u && u.isUnmounted))
1001
+ return m && m(), Se(
1002
+ e,
1003
+ u,
1004
+ 3,
1005
+ [R]
1006
+ );
1007
+ } : (d = xt, process.env.NODE_ENV !== "production" && l(e)), t && o) {
1008
+ const _ = d;
1009
+ d = () => Z(_());
1010
+ }
1011
+ let m, R = (_) => {
1012
+ m = C.onStop = () => {
1013
+ X(_, u, 4);
1014
+ };
1015
+ }, v = f ? new Array(e.length).fill(we) : we;
1016
+ const W = () => {
1017
+ if (C.active)
1018
+ if (t) {
1019
+ const _ = C.run();
1020
+ (o || a || (f ? _.some(
1021
+ (pn, dn) => ie(pn, v[dn])
1022
+ ) : ie(_, v))) && (m && m(), Se(t, u, 3, [
1023
+ _,
1024
+ // pass undefined as the old value when it's changed for the first time
1025
+ v === we ? void 0 : f && v[0] === we ? [] : v,
1026
+ R
1027
+ ]), v = _);
1028
+ } else
1029
+ C.run();
1030
+ };
1031
+ W.allowRecurse = !!t;
1032
+ let ue;
1033
+ r === "sync" ? ue = W : r === "post" ? ue = () => yt(W, u && u.suspense) : (W.pre = !0, u && (W.id = u.uid), ue = () => st(W));
1034
+ const C = new jn(d, ue);
1035
+ return process.env.NODE_ENV !== "production" && (C.onTrack = s, C.onTrigger = i), t ? n ? W() : v = C.run() : r === "post" ? yt(
1036
+ C.run.bind(C),
1037
+ u && u.suspense
1038
+ ) : C.run(), () => {
1039
+ C.stop(), u && u.scope && Sn(u.scope.effects, C);
1040
+ };
1041
+ }
1042
+ function Ur(e, t, n) {
1043
+ const o = this.proxy, r = V(e) ? e.includes(".") ? Fr(o, e) : () => o[e] : e.bind(o, o);
1044
+ let s;
1045
+ E(t) ? s = t : (s = t.handler, n = t);
1046
+ const i = z;
1047
+ Be(this);
1048
+ const c = Zt(r, s.bind(o), n);
1049
+ return i ? Be(i) : cn(), c;
1050
+ }
1051
+ function Fr(e, t) {
1052
+ const n = t.split(".");
1053
+ return () => {
1054
+ let o = e;
1055
+ for (let r = 0; r < n.length && o; r++)
1056
+ o = o[n[r]];
1057
+ return o;
1058
+ };
1059
+ }
1060
+ function Z(e, t) {
1061
+ if (!y(e) || e.__v_skip || (t = t || /* @__PURE__ */ new Set(), t.has(e)))
1062
+ return e;
1063
+ if (t.add(e), S(e))
1064
+ Z(e.value, t);
1065
+ else if (h(e))
1066
+ for (let n = 0; n < e.length; n++)
1067
+ Z(e[n], t);
1068
+ else if (In(e) || k(e))
1069
+ e.forEach((n) => {
1070
+ Z(n, t);
1071
+ });
1072
+ else if (xn(e))
1073
+ for (const n in e)
1074
+ Z(e[n], t);
1075
+ return e;
1076
+ }
1077
+ function jr(e, t) {
1078
+ return E(e) ? (
1079
+ // #8326: extend call and options.name access are considered side-effects
1080
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1081
+ /* @__PURE__ */ (() => x({ name: e.name }, t, { setup: e }))()
1082
+ ) : e;
1083
+ }
1084
+ function Hr(e, t, n = z, o = !1) {
1085
+ if (n) {
1086
+ const r = n[e] || (n[e] = []), s = t.__weh || (t.__weh = (...i) => {
1087
+ if (n.isUnmounted)
1088
+ return;
1089
+ Ye(), Be(n);
1090
+ const c = Se(t, n, e, i);
1091
+ return cn(), Qe(), c;
1092
+ });
1093
+ return o ? r.unshift(s) : r.push(s), s;
1094
+ } else if (process.env.NODE_ENV !== "production") {
1095
+ const r = Cn(rt[e].replace(/ hook$/, ""));
1096
+ w(
1097
+ `${r} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
1098
+ );
1099
+ }
1100
+ }
1101
+ const kt = (e) => (t, n = z) => (
1102
+ // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
1103
+ Hr(e, (...o) => t(...o), n)
1104
+ ), Kr = kt("m"), Lr = kt("um"), zr = Symbol.for("v-ndc"), We = (e) => e ? lo(e) ? uo(e) || e.proxy : We(e.parent) : null, se = (
1105
+ // Move PURE marker to new line to workaround compiler discarding it
1106
+ // due to type annotation
1107
+ /* @__PURE__ */ x(/* @__PURE__ */ Object.create(null), {
1108
+ $: (e) => e,
1109
+ $el: (e) => e.vnode.el,
1110
+ $data: (e) => e.data,
1111
+ $props: (e) => process.env.NODE_ENV !== "production" ? ge(e.props) : e.props,
1112
+ $attrs: (e) => process.env.NODE_ENV !== "production" ? ge(e.attrs) : e.attrs,
1113
+ $slots: (e) => process.env.NODE_ENV !== "production" ? ge(e.slots) : e.slots,
1114
+ $refs: (e) => process.env.NODE_ENV !== "production" ? ge(e.refs) : e.refs,
1115
+ $parent: (e) => We(e.parent),
1116
+ $root: (e) => We(e.root),
1117
+ $emit: (e) => e.emit,
1118
+ $options: (e) => qr(e),
1119
+ $forceUpdate: (e) => e.f || (e.f = () => st(e.update)),
1120
+ $nextTick: (e) => e.n || (e.n = Rr.bind(e.proxy)),
1121
+ $watch: (e) => Ur.bind(e)
1122
+ })
1123
+ ), Wr = (e) => e === "_" || e === "$", De = (e, t) => e !== D && !e.__isScriptSetup && g(e, t), Br = {
1124
+ get({ _: e }, t) {
1125
+ const { ctx: n, setupState: o, data: r, props: s, accessCache: i, type: c, appContext: l } = e;
1126
+ if (process.env.NODE_ENV !== "production" && t === "__isVue")
1127
+ return !0;
1128
+ let u;
1129
+ if (t[0] !== "$") {
1130
+ const m = i[t];
1131
+ if (m !== void 0)
1132
+ switch (m) {
1133
+ case 1:
1134
+ return o[t];
1135
+ case 2:
1136
+ return r[t];
1137
+ case 4:
1138
+ return n[t];
1139
+ case 3:
1140
+ return s[t];
1141
+ }
1142
+ else {
1143
+ if (De(o, t))
1144
+ return i[t] = 1, o[t];
1145
+ if (r !== D && g(r, t))
1146
+ return i[t] = 2, r[t];
1147
+ if (
1148
+ // only cache other properties when instance has declared (thus stable)
1149
+ // props
1150
+ (u = e.propsOptions[0]) && g(u, t)
1151
+ )
1152
+ return i[t] = 3, s[t];
1153
+ if (n !== D && g(n, t))
1154
+ return i[t] = 4, n[t];
1155
+ i[t] = 0;
1156
+ }
1157
+ }
1158
+ const d = se[t];
1159
+ let a, f;
1160
+ if (d)
1161
+ return t === "$attrs" ? (I(e, "get", t), process.env.NODE_ENV !== "production" && void 0) : process.env.NODE_ENV !== "production" && t === "$slots" && I(e, "get", t), d(e);
1162
+ if (
1163
+ // css module (injected by vue-loader)
1164
+ (a = c.__cssModules) && (a = a[t])
1165
+ )
1166
+ return a;
1167
+ if (n !== D && g(n, t))
1168
+ return i[t] = 4, n[t];
1169
+ if (
1170
+ // global properties
1171
+ f = l.config.globalProperties, g(f, t)
1172
+ )
1173
+ return f[t];
1174
+ process.env.NODE_ENV !== "production" && F && (!V(t) || // #1091 avoid internal isRef/isVNode checks on component instance leading
1175
+ // to infinite warning loop
1176
+ t.indexOf("__v") !== 0) && (r !== D && Wr(t[0]) && g(r, t) ? w(
1177
+ `Property ${JSON.stringify(
1178
+ t
1179
+ )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
1180
+ ) : e === F && w(
1181
+ `Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`
1182
+ ));
1183
+ },
1184
+ set({ _: e }, t, n) {
1185
+ const { data: o, setupState: r, ctx: s } = e;
1186
+ return De(r, t) ? (r[t] = n, !0) : process.env.NODE_ENV !== "production" && r.__isScriptSetup && g(r, t) ? (w(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : o !== D && g(o, t) ? (o[t] = n, !0) : g(e.props, t) ? (process.env.NODE_ENV !== "production" && w(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && w(
1187
+ `Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`
1188
+ ), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(s, t, {
1189
+ enumerable: !0,
1190
+ configurable: !0,
1191
+ value: n
1192
+ }) : s[t] = n, !0);
1193
+ },
1194
+ has({
1195
+ _: { data: e, setupState: t, accessCache: n, ctx: o, appContext: r, propsOptions: s }
1196
+ }, i) {
1197
+ let c;
1198
+ return !!n[i] || e !== D && g(e, i) || De(t, i) || (c = s[0]) && g(c, i) || g(o, i) || g(se, i) || g(r.config.globalProperties, i);
1199
+ },
1200
+ defineProperty(e, t, n) {
1201
+ return n.get != null ? e._.accessCache[t] = 0 : g(n, "value") && this.set(e, t, n.value, null), Reflect.defineProperty(e, t, n);
1202
+ }
1203
+ };
1204
+ process.env.NODE_ENV !== "production" && (Br.ownKeys = (e) => (w(
1205
+ "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
1206
+ ), Reflect.ownKeys(e)));
1207
+ function Ot(e) {
1208
+ return h(e) ? e.reduce(
1209
+ (t, n) => (t[n] = null, t),
1210
+ {}
1211
+ ) : e;
1212
+ }
1213
+ function qr(e) {
1214
+ const t = e.type, { mixins: n, extends: o } = t, {
1215
+ mixins: r,
1216
+ optionsCache: s,
1217
+ config: { optionMergeStrategies: i }
1218
+ } = e.appContext, c = s.get(t);
1219
+ let l;
1220
+ return c ? l = c : !r.length && !n && !o ? l = t : (l = {}, r.length && r.forEach(
1221
+ (u) => Re(l, u, i, !0)
1222
+ ), Re(l, t, i)), y(t) && s.set(t, l), l;
1223
+ }
1224
+ function Re(e, t, n, o = !1) {
1225
+ const { mixins: r, extends: s } = t;
1226
+ s && Re(e, s, n, !0), r && r.forEach(
1227
+ (i) => Re(e, i, n, !0)
1228
+ );
1229
+ for (const i in t)
1230
+ if (o && i === "expose")
1231
+ process.env.NODE_ENV !== "production" && w(
1232
+ '"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.'
1233
+ );
1234
+ else {
1235
+ const c = Gr[i] || n && n[i];
1236
+ e[i] = c ? c(e[i], t[i]) : t[i];
1237
+ }
1238
+ return e;
1239
+ }
1240
+ const Gr = {
1241
+ data: Nt,
1242
+ props: St,
1243
+ emits: St,
1244
+ // objects
1245
+ methods: re,
1246
+ computed: re,
1247
+ // lifecycle
1248
+ beforeCreate: O,
1249
+ created: O,
1250
+ beforeMount: O,
1251
+ mounted: O,
1252
+ beforeUpdate: O,
1253
+ updated: O,
1254
+ beforeDestroy: O,
1255
+ beforeUnmount: O,
1256
+ destroyed: O,
1257
+ unmounted: O,
1258
+ activated: O,
1259
+ deactivated: O,
1260
+ errorCaptured: O,
1261
+ serverPrefetch: O,
1262
+ // assets
1263
+ components: re,
1264
+ directives: re,
1265
+ // watch
1266
+ watch: Xr,
1267
+ // provide / inject
1268
+ provide: Nt,
1269
+ inject: Jr
1270
+ };
1271
+ function Nt(e, t) {
1272
+ return t ? e ? function() {
1273
+ return x(
1274
+ E(e) ? e.call(this, this) : e,
1275
+ E(t) ? t.call(this, this) : t
1276
+ );
1277
+ } : t : e;
1278
+ }
1279
+ function Jr(e, t) {
1280
+ return re(bt(e), bt(t));
1281
+ }
1282
+ function bt(e) {
1283
+ if (h(e)) {
1284
+ const t = {};
1285
+ for (let n = 0; n < e.length; n++)
1286
+ t[e[n]] = e[n];
1287
+ return t;
1288
+ }
1289
+ return e;
1290
+ }
1291
+ function O(e, t) {
1292
+ return e ? [...new Set([].concat(e, t))] : t;
1293
+ }
1294
+ function re(e, t) {
1295
+ return e ? x(/* @__PURE__ */ Object.create(null), e, t) : t;
1296
+ }
1297
+ function St(e, t) {
1298
+ return e ? h(e) && h(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : x(
1299
+ /* @__PURE__ */ Object.create(null),
1300
+ Ot(e),
1301
+ Ot(t != null ? t : {})
1302
+ ) : t;
1303
+ }
1304
+ function Xr(e, t) {
1305
+ if (!e)
1306
+ return t;
1307
+ if (!t)
1308
+ return e;
1309
+ const n = x(/* @__PURE__ */ Object.create(null), e);
1310
+ for (const o in t)
1311
+ n[o] = O(e[o], t[o]);
1312
+ return n;
1313
+ }
1314
+ const yt = $r, Yr = (e) => e.__isTeleport, en = Symbol.for("v-fgt"), Qr = Symbol.for("v-txt"), Zr = Symbol.for("v-cmt"), Ee = [];
1315
+ let M = null;
1316
+ function kr(e = !1) {
1317
+ Ee.push(M = e ? null : []);
1318
+ }
1319
+ function eo() {
1320
+ Ee.pop(), M = Ee[Ee.length - 1] || null;
1321
+ }
1322
+ function to(e) {
1323
+ return e.dynamicChildren = M || On, eo(), M && M.push(e), e;
1324
+ }
1325
+ function no(e, t, n, o, r, s) {
1326
+ return to(
1327
+ rn(
1328
+ e,
1329
+ t,
1330
+ n,
1331
+ o,
1332
+ r,
1333
+ s,
1334
+ !0
1335
+ /* isBlock */
1336
+ )
1337
+ );
1338
+ }
1339
+ function ro(e) {
1340
+ return e ? e.__v_isVNode === !0 : !1;
1341
+ }
1342
+ const oo = (...e) => on(
1343
+ ...e
1344
+ ), tn = "__vInternal", nn = ({ key: e }) => e != null ? e : null, Oe = ({
1345
+ ref: e,
1346
+ ref_key: t,
1347
+ ref_for: n
1348
+ }) => (typeof e == "number" && (e = "" + e), e != null ? V(e) || S(e) || E(e) ? { i: F, r: e, k: t, f: !!n } : e : null);
1349
+ function rn(e, t = null, n = null, o = 0, r = null, s = e === en ? 0 : 1, i = !1, c = !1) {
1350
+ const l = {
1351
+ __v_isVNode: !0,
1352
+ __v_skip: !0,
1353
+ type: e,
1354
+ props: t,
1355
+ key: t && nn(t),
1356
+ ref: t && Oe(t),
1357
+ scopeId: Tr,
1358
+ slotScopeIds: null,
1359
+ children: n,
1360
+ component: null,
1361
+ suspense: null,
1362
+ ssContent: null,
1363
+ ssFallback: null,
1364
+ dirs: null,
1365
+ transition: null,
1366
+ el: null,
1367
+ anchor: null,
1368
+ target: null,
1369
+ targetAnchor: null,
1370
+ staticCount: 0,
1371
+ shapeFlag: s,
1372
+ patchFlag: o,
1373
+ dynamicProps: r,
1374
+ dynamicChildren: null,
1375
+ appContext: null,
1376
+ ctx: F
1377
+ };
1378
+ return c ? (it(l, n), s & 128 && e.normalize(l)) : n && (l.shapeFlag |= V(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && w("VNode created with invalid key (NaN). VNode type:", l.type), // avoid a block node from tracking itself
1379
+ !i && // has current parent block
1380
+ M && // presence of a patch flag indicates this node needs patching on updates.
1381
+ // component nodes also should always be patched, because even if the
1382
+ // component doesn't need to update, it needs to persist the instance on to
1383
+ // the next vnode so that it can be properly unmounted later.
1384
+ (l.patchFlag > 0 || s & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
1385
+ // vnode should not be considered dynamic due to handler caching.
1386
+ l.patchFlag !== 32 && M.push(l), l;
1387
+ }
1388
+ const so = process.env.NODE_ENV !== "production" ? oo : on;
1389
+ function on(e, t = null, n = null, o = 0, r = null, s = !1) {
1390
+ if ((!e || e === zr) && (process.env.NODE_ENV !== "production" && !e && w(`Invalid vnode type when creating vnode: ${e}.`), e = Zr), ro(e)) {
1391
+ const c = ve(
1392
+ e,
1393
+ t,
1394
+ !0
1395
+ /* mergeRef: true */
1396
+ );
1397
+ return n && it(c, n), !s && M && (c.shapeFlag & 6 ? M[M.indexOf(e)] = c : M.push(c)), c.patchFlag |= -2, c;
1398
+ }
1399
+ if (un(e) && (e = e.__vccOpts), t) {
1400
+ t = io(t);
1401
+ let { class: c, style: l } = t;
1402
+ c && !V(c) && (t.class = Xe(c)), y(l) && (Le(l) && !h(l) && (l = x({}, l)), t.style = Je(l));
1403
+ }
1404
+ const i = V(e) ? 1 : Dr(e) ? 128 : Yr(e) ? 64 : y(e) ? 4 : E(e) ? 2 : 0;
1405
+ return process.env.NODE_ENV !== "production" && i & 4 && Le(e) && (e = p(e), w(
1406
+ "Vue received a Component which was made a reactive object. This can lead to unnecessary performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
1407
+ `
1408
+ Component that was made reactive: `,
1409
+ e
1410
+ )), rn(
1411
+ e,
1412
+ t,
1413
+ n,
1414
+ o,
1415
+ r,
1416
+ i,
1417
+ s,
1418
+ !0
1419
+ );
1420
+ }
1421
+ function io(e) {
1422
+ return e ? Le(e) || tn in e ? x({}, e) : e : null;
1423
+ }
1424
+ function ve(e, t, n = !1) {
1425
+ const { props: o, ref: r, patchFlag: s, children: i } = e, c = t ? ao(o || {}, t) : o;
1426
+ return {
1427
+ __v_isVNode: !0,
1428
+ __v_skip: !0,
1429
+ type: e.type,
1430
+ props: c,
1431
+ key: c && nn(c),
1432
+ ref: t && t.ref ? (
1433
+ // #2078 in the case of <component :is="vnode" ref="extra"/>
1434
+ // if the vnode itself already has a ref, cloneVNode will need to merge
1435
+ // the refs so the single vnode can be set on multiple refs
1436
+ n && r ? h(r) ? r.concat(Oe(t)) : [r, Oe(t)] : Oe(t)
1437
+ ) : r,
1438
+ scopeId: e.scopeId,
1439
+ slotScopeIds: e.slotScopeIds,
1440
+ children: process.env.NODE_ENV !== "production" && s === -1 && h(i) ? i.map(sn) : i,
1441
+ target: e.target,
1442
+ targetAnchor: e.targetAnchor,
1443
+ staticCount: e.staticCount,
1444
+ shapeFlag: e.shapeFlag,
1445
+ // if the vnode is cloned with extra props, we can no longer assume its
1446
+ // existing patch flag to be reliable and need to add the FULL_PROPS flag.
1447
+ // note: preserve flag for fragments since they use the flag for children
1448
+ // fast paths only.
1449
+ patchFlag: t && e.type !== en ? s === -1 ? 16 : s | 16 : s,
1450
+ dynamicProps: e.dynamicProps,
1451
+ dynamicChildren: e.dynamicChildren,
1452
+ appContext: e.appContext,
1453
+ dirs: e.dirs,
1454
+ transition: e.transition,
1455
+ // These should technically only be non-null on mounted VNodes. However,
1456
+ // they *should* be copied for kept-alive vnodes. So we just always copy
1457
+ // them since them being non-null during a mount doesn't affect the logic as
1458
+ // they will simply be overwritten.
1459
+ component: e.component,
1460
+ suspense: e.suspense,
1461
+ ssContent: e.ssContent && ve(e.ssContent),
1462
+ ssFallback: e.ssFallback && ve(e.ssFallback),
1463
+ el: e.el,
1464
+ anchor: e.anchor,
1465
+ ctx: e.ctx,
1466
+ ce: e.ce
1467
+ };
1468
+ }
1469
+ function sn(e) {
1470
+ const t = ve(e);
1471
+ return h(e.children) && (t.children = e.children.map(sn)), t;
1472
+ }
1473
+ function co(e = " ", t = 0) {
1474
+ return so(Qr, null, e, t);
1475
+ }
1476
+ function it(e, t) {
1477
+ let n = 0;
1478
+ const { shapeFlag: o } = e;
1479
+ if (t == null)
1480
+ t = null;
1481
+ else if (h(t))
1482
+ n = 16;
1483
+ else if (typeof t == "object")
1484
+ if (o & 65) {
1485
+ const r = t.default;
1486
+ r && (r._c && (r._d = !1), it(e, r()), r._c && (r._d = !0));
1487
+ return;
1488
+ } else {
1489
+ n = 32;
1490
+ const r = t._;
1491
+ !r && !(tn in t) ? t._ctx = F : r === 3 && F && (F.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
1492
+ }
1493
+ else
1494
+ E(t) ? (t = { default: t, _ctx: F }, n = 32) : (t = String(t), o & 64 ? (n = 16, t = [co(t)]) : n = 8);
1495
+ e.children = t, e.shapeFlag |= n;
1496
+ }
1497
+ function ao(...e) {
1498
+ const t = {};
1499
+ for (let n = 0; n < e.length; n++) {
1500
+ const o = e[n];
1501
+ for (const r in o)
1502
+ if (r === "class")
1503
+ t.class !== o.class && (t.class = Xe([t.class, o.class]));
1504
+ else if (r === "style")
1505
+ t.style = Je([t.style, o.style]);
1506
+ else if (bn(r)) {
1507
+ const s = t[r], i = o[r];
1508
+ i && s !== i && !(h(s) && s.includes(i)) && (t[r] = s ? [].concat(s, i) : i);
1509
+ } else
1510
+ r !== "" && (t[r] = o[r]);
1511
+ }
1512
+ return t;
1513
+ }
1514
+ let z = null, ct, Y, It = "__VUE_INSTANCE_SETTERS__";
1515
+ (Y = Ue()[It]) || (Y = Ue()[It] = []), Y.push((e) => z = e), ct = (e) => {
1516
+ Y.length > 1 ? Y.forEach((t) => t(e)) : Y[0](e);
1517
+ };
1518
+ const Be = (e) => {
1519
+ ct(e), e.scope.on();
1520
+ }, cn = () => {
1521
+ z && z.scope.off(), ct(null);
1522
+ };
1523
+ function lo(e) {
1524
+ return e.vnode.shapeFlag & 4;
1525
+ }
1526
+ function uo(e) {
1527
+ if (e.exposed)
1528
+ return e.exposeProxy || (e.exposeProxy = new Proxy(gr(ur(e.exposed)), {
1529
+ get(t, n) {
1530
+ if (n in t)
1531
+ return t[n];
1532
+ if (n in se)
1533
+ return se[n](e);
1534
+ },
1535
+ has(t, n) {
1536
+ return n in t || n in se;
1537
+ }
1538
+ }));
1539
+ }
1540
+ const fo = /(?:^|[-_])(\w)/g, po = (e) => e.replace(fo, (t) => t.toUpperCase()).replace(/[-_]/g, "");
1541
+ function an(e, t = !0) {
1542
+ return E(e) ? e.displayName || e.name : e.name || t && e.__name;
1543
+ }
1544
+ function ln(e, t, n = !1) {
1545
+ let o = an(t);
1546
+ if (!o && t.__file) {
1547
+ const r = t.__file.match(/([^/\\]+)\.\w+$/);
1548
+ r && (o = r[1]);
1549
+ }
1550
+ if (!o && e && e.parent) {
1551
+ const r = (s) => {
1552
+ for (const i in s)
1553
+ if (s[i] === t)
1554
+ return i;
1555
+ };
1556
+ o = r(
1557
+ e.components || e.parent.type.components
1558
+ ) || r(e.appContext.components);
1559
+ }
1560
+ return o ? po(o) : n ? "App" : "Anonymous";
1561
+ }
1562
+ function un(e) {
1563
+ return E(e) && "__vccOpts" in e;
1564
+ }
1565
+ function $e(e) {
1566
+ return !!(e && e.__v_isShallow);
1567
+ }
1568
+ function ho() {
1569
+ if (process.env.NODE_ENV === "production" || typeof window == "undefined")
1570
+ return;
1571
+ const e = { style: "color:#3ba776" }, t = { style: "color:#0b1bc9" }, n = { style: "color:#b62e24" }, o = { style: "color:#9d288c" }, r = {
1572
+ header(a) {
1573
+ return y(a) ? a.__isVue ? ["div", e, "VueInstance"] : S(a) ? [
1574
+ "div",
1575
+ {},
1576
+ ["span", e, d(a)],
1577
+ "<",
1578
+ c(a.value),
1579
+ ">"
1580
+ ] : G(a) ? [
1581
+ "div",
1582
+ {},
1583
+ ["span", e, $e(a) ? "ShallowReactive" : "Reactive"],
1584
+ "<",
1585
+ c(a),
1586
+ `>${L(a) ? " (readonly)" : ""}`
1587
+ ] : L(a) ? [
1588
+ "div",
1589
+ {},
1590
+ ["span", e, $e(a) ? "ShallowReadonly" : "Readonly"],
1591
+ "<",
1592
+ c(a),
1593
+ ">"
1594
+ ] : null : null;
1595
+ },
1596
+ hasBody(a) {
1597
+ return a && a.__isVue;
1598
+ },
1599
+ body(a) {
1600
+ if (a && a.__isVue)
1601
+ return [
1602
+ "div",
1603
+ {},
1604
+ ...s(a.$)
1605
+ ];
1606
+ }
1607
+ };
1608
+ function s(a) {
1609
+ const f = [];
1610
+ a.type.props && a.props && f.push(i("props", p(a.props))), a.setupState !== D && f.push(i("setup", a.setupState)), a.data !== D && f.push(i("data", p(a.data)));
1611
+ const m = l(a, "computed");
1612
+ m && f.push(i("computed", m));
1613
+ const R = l(a, "inject");
1614
+ return R && f.push(i("injected", R)), f.push([
1615
+ "div",
1616
+ {},
1617
+ [
1618
+ "span",
1619
+ {
1620
+ style: o.style + ";opacity:0.66"
1621
+ },
1622
+ "$ (internal): "
1623
+ ],
1624
+ ["object", { object: a }]
1625
+ ]), f;
1626
+ }
1627
+ function i(a, f) {
1628
+ return f = x({}, f), Object.keys(f).length ? [
1629
+ "div",
1630
+ { style: "line-height:1.25em;margin-bottom:0.6em" },
1631
+ [
1632
+ "div",
1633
+ {
1634
+ style: "color:#476582"
1635
+ },
1636
+ a
1637
+ ],
1638
+ [
1639
+ "div",
1640
+ {
1641
+ style: "padding-left:1.25em"
1642
+ },
1643
+ ...Object.keys(f).map((m) => [
1644
+ "div",
1645
+ {},
1646
+ ["span", o, m + ": "],
1647
+ c(f[m], !1)
1648
+ ])
1649
+ ]
1650
+ ] : ["span", {}];
1651
+ }
1652
+ function c(a, f = !0) {
1653
+ return typeof a == "number" ? ["span", t, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", o, a] : y(a) ? ["object", { object: f ? p(a) : a }] : ["span", n, String(a)];
1654
+ }
1655
+ function l(a, f) {
1656
+ const m = a.type;
1657
+ if (E(m))
1658
+ return;
1659
+ const R = {};
1660
+ for (const v in a.ctx)
1661
+ u(m, v, f) && (R[v] = a.ctx[v]);
1662
+ return R;
1663
+ }
1664
+ function u(a, f, m) {
1665
+ const R = a[m];
1666
+ if (h(R) && R.includes(f) || y(R) && f in R || a.extends && u(a.extends, f, m) || a.mixins && a.mixins.some((v) => u(v, f, m)))
1667
+ return !0;
1668
+ }
1669
+ function d(a) {
1670
+ return $e(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
1671
+ }
1672
+ window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
1673
+ }
1674
+ function mo() {
1675
+ ho();
1676
+ }
1677
+ process.env.NODE_ENV !== "production" && mo();
1678
+ const b = {
1679
+ KEY: "$xtm",
1680
+ // 父应用注入子应用实例的key
1681
+ IS_MICRO: "__XT_MICRO",
1682
+ // 是否在微应用中
1683
+ MICRO_NAME: "__XT_MICRO_NAME",
1684
+ // 微应用名称
1685
+ MICRO_TOKEN: "__XT_MICRO_TOKEN",
1686
+ // 微应用token
1687
+ MICRO_APP: "__XT_MICRO_APP",
1688
+ // 微应用实例
1689
+ DOM_ID_PREFIX: "xt-micro-ifr-"
1690
+ // dom id前缀
1691
+ };
1692
+ function Ne(e, t = window.location.href) {
1693
+ e = e.replace(/[\[\]]/g, "\\$&");
1694
+ var n = new RegExp("[?&]" + e + "(=([^&#]*)|&|#|$)"), o = n.exec(t);
1695
+ return o ? o[2] ? decodeURIComponent(o[2].replace(/\+/g, " ")).trim() : "" : null;
1696
+ }
1697
+ function _o(e, t, n) {
1698
+ try {
1699
+ return e && (n && e.startsWith("#") ? e : new URL(e, t).href);
1700
+ } catch (o) {
1701
+ return e;
1702
+ }
1703
+ }
1704
+ function go(e, t, n) {
1705
+ const [o, r] = e.split("#"), s = new URL(o), i = s.searchParams;
1706
+ return i.has(t) ? i.set(t, n) : i.append(t, n), r && (s.hash = r), s.search = i.toString(), s.toString();
1707
+ }
1708
+ const Rt = Wt(!1);
1709
+ Object.defineProperty(window, b.IS_MICRO, {
1710
+ get: function() {
1711
+ return Rt.value;
1712
+ },
1713
+ set: function(e) {
1714
+ Rt.value = e;
1715
+ }
1716
+ });
1717
+ const Ae = (e) => `${b.DOM_ID_PREFIX}${e}`, wo = (e) => {
1718
+ function t(c) {
1719
+ return c !== null && typeof c == "object" && !Array.isArray(c);
1720
+ }
1721
+ const n = typeof e.params == "function" ? e.params() : t(e.params) ? e.params : {}, o = typeof e.token == "function" ? e.token() : t(e.token) ? e.token : "", r = new URL(e.url.indexOf("http") > -1 ? e.url : window.location.origin + e.url), s = Ne(e.name);
1722
+ if (s) {
1723
+ const c = _o(s, e.url, !0);
1724
+ if (c) {
1725
+ const l = new URL(c);
1726
+ l.searchParams.forEach((d, a) => {
1727
+ r.searchParams.set(a, d);
1728
+ }), r.hash = l.hash;
1729
+ }
1730
+ }
1731
+ if (r.searchParams.set(b.IS_MICRO, !0 + ""), r.searchParams.set(b.MICRO_NAME, e.name), o && r.searchParams.set(b.MICRO_TOKEN, o), n)
1732
+ for (let c of Object.keys(n))
1733
+ r.searchParams.set(c, n[c]);
1734
+ const i = new URL(window.location.href);
1735
+ return i.searchParams.delete(e.name), window.history.replaceState({}, "", i.href), r.href;
1736
+ };
1737
+ class Eo {
1738
+ constructor(t) {
1739
+ fe(this, "app");
1740
+ fe(this, "dom");
1741
+ fe(this, "panel");
1742
+ return this.app = t, t.preload && this.preload(), this.dom = void 0, this.panel = void 0, this;
1743
+ }
1744
+ mount(t, n = !1) {
1745
+ let o;
1746
+ if (t ? (typeof t == "string" ? o = document.querySelector(t) : o = t, o.innerHTML = "") : o = document.body, o) {
1747
+ let r = document.getElementById(Ae(this.app.name));
1748
+ if (!r) {
1749
+ r = document.createElement("iframe"), r.id = Ae(this.app.name);
1750
+ const s = wo(this.app);
1751
+ r.src = s, r.classList.add("micro-iframe"), r.addEventListener("load", (i) => {
1752
+ this.onLoad.call(this, i);
1753
+ }), r.addEventListener("error", this.onError), r.addEventListener("unload", this.onUnload), this.dom = r;
1754
+ }
1755
+ n ? r.style.display = "none" : r.style.removeProperty("display"), this.panel = o, o.appendChild(r);
1756
+ } else
1757
+ throw new Error("el not found");
1758
+ }
1759
+ unmount() {
1760
+ var n;
1761
+ const t = document.getElementById(Ae(this.app.name));
1762
+ if (t)
1763
+ this.app.preload ? (t.style.display = "none", document.body.appendChild(t)) : (n = this.panel) == null || n.removeChild(t);
1764
+ else
1765
+ throw new Error("app dom not found");
1766
+ }
1767
+ /**
1768
+ * 预加载渲染
1769
+ * TODO 还差用户切走之后,如何将ifr还原回去,等待下次载入
1770
+ * @param el 挂载dom对象
1771
+ */
1772
+ preloadRender(t) {
1773
+ this.mount(t);
1774
+ }
1775
+ /**
1776
+ * 预加载app,先放到body,待启动时,挪过来
1777
+ */
1778
+ preload() {
1779
+ this.mount(void 0, !0);
1780
+ }
1781
+ changeOptions(t) {
1782
+ this.app = B(B({}, this.app), t);
1783
+ }
1784
+ onLoad(t) {
1785
+ Oo(this);
1786
+ }
1787
+ onUnload(t) {
1788
+ }
1789
+ onError() {
1790
+ }
1791
+ }
1792
+ const Oo = (e) => {
1793
+ var t, n;
1794
+ (n = (t = e.dom) == null ? void 0 : t.contentWindow) == null || n.postMessage(
1795
+ {
1796
+ cmd: `$xt/micro/${e.app.name}`,
1797
+ data: {
1798
+ name: e.app.name,
1799
+ url: e.app.url,
1800
+ preload: e.app.preload,
1801
+ sync: e.app.sync || !0
1802
+ // params: app.params
1803
+ }
1804
+ },
1805
+ "*"
1806
+ );
1807
+ }, No = () => {
1808
+ window.addEventListener("message", (e) => {
1809
+ if (e.data.cmd === "$xt/micro/sync") {
1810
+ const t = [b.IS_MICRO, b.MICRO_NAME, b.MICRO_TOKEN], n = new URL(window.decodeURIComponent(e.data.data.url), e.origin);
1811
+ for (let r of t)
1812
+ n.searchParams.delete(r);
1813
+ console.log("tempUrl", n.href);
1814
+ const o = go(window.location.href, e.data.data.name, n.href);
1815
+ window.history.replaceState(null, "", o);
1816
+ }
1817
+ });
1818
+ }, Po = (...t) => lt(void 0, [...t], function* (e = {}) {
1819
+ const n = Ne(b.IS_MICRO), o = Ne(b.MICRO_NAME);
1820
+ n && (window[b.IS_MICRO] = !0);
1821
+ function r(i) {
1822
+ var c = document.styleSheets[0];
1823
+ if (!c) {
1824
+ var l = document.createElement("style");
1825
+ document.head.appendChild(l), c = l.sheet;
1826
+ }
1827
+ c.insertRule(i, c.cssRules.length);
1828
+ }
1829
+ e.hideHeaderCssSelector && r(`${e.hideHeaderCssSelector} { display: none !important; }`), window.addEventListener("message", (i) => {
1830
+ i.data.cmd === `$xt/micro/${o}` && (console.log("子应用收到消息:", o), window[b.MICRO_APP] = Ve(B({}, i.data.data), { mainBaseURL: i.origin }));
1831
+ }), bo(window);
1832
+ const s = Ne(b.MICRO_TOKEN);
1833
+ e.authHandler && s && (yield e.authHandler(s));
1834
+ });
1835
+ function bo(e) {
1836
+ const t = e.history, n = t.pushState, o = t.replaceState;
1837
+ t.pushState = function(r, s, i) {
1838
+ n.call(t, r, s, i), vt();
1839
+ }, t.replaceState = function(r, s, i) {
1840
+ o.call(t, r, s, i), vt();
1841
+ };
1842
+ }
1843
+ function vt() {
1844
+ if (!window[b.MICRO_APP])
1845
+ return;
1846
+ const { name: e, sync: t, mainBaseURL: n } = window[b.MICRO_APP];
1847
+ console.trace("syncUrlToWindow");
1848
+ const o = window.location.pathname + window.location.search + window.location.hash;
1849
+ window.parent.postMessage({
1850
+ cmd: "$xt/micro/sync",
1851
+ data: {
1852
+ name: e,
1853
+ url: window.encodeURIComponent(o)
1854
+ }
1855
+ }, n);
1856
+ }
1857
+ let xe = {};
1858
+ const So = {
1859
+ url: "",
1860
+ name: "",
1861
+ sync: !0
1862
+ }, Mo = (e) => {
1863
+ if (!e.url || e.url === "" || e.url === "undefined") {
1864
+ console.error("app url is required", e);
1865
+ return;
1866
+ }
1867
+ const t = Object.assign({}, e, So);
1868
+ return xe[e.name] = Ve(B({}, t), {
1869
+ instance: new Eo(e)
1870
+ }), xe[e.name];
1871
+ }, fn = (e) => xe[e], yo = (e, t) => xe[e.name] = B(B({}, e), t), Io = (e, t) => new Promise((n, o) => {
1872
+ let r = fn(e);
1873
+ r ? (t && (r.instance.changeOptions(t), r = yo(r, t)), r.preload ? r.instance.preloadRender(r.el) : r.instance.mount(r.el), n(r)) : o("app not found");
1874
+ }), Ro = (e) => {
1875
+ let t = fn(e);
1876
+ t && t.instance.unmount();
1877
+ }, vo = /* @__PURE__ */ jr({
1878
+ __name: "XTMicroView",
1879
+ props: {
1880
+ appId: String
1881
+ },
1882
+ setup(e) {
1883
+ const t = e, n = Wt(), o = () => {
1884
+ t.appId && Io(t.appId, {
1885
+ el: n.value
1886
+ });
1887
+ };
1888
+ return Ar(() => t.appId, (r, s) => {
1889
+ r !== s && s && Ro(s), o();
1890
+ }), Kr(() => {
1891
+ o();
1892
+ }), Lr(() => {
1893
+ console.log("微应用销毁", t.appId);
1894
+ }), (r, s) => (kr(), no("div", {
1895
+ ref_key: "refPanel",
1896
+ ref: n,
1897
+ class: "xt-micro w-100% h-100% overflow-hidden"
1898
+ }, null, 512));
1899
+ }
1900
+ });
1901
+ const Vo = {
1902
+ install: (e, t = {}) => {
1903
+ e.component("xt-micro-view", vo), No();
1904
+ }
1905
+ };
1906
+ export {
1907
+ Vo as default,
1908
+ fn as getApp,
1909
+ Po as microInit,
1910
+ Mo as setupApp,
1911
+ Io as startApp,
1912
+ Ro as stopApp
1913
+ };