@fox-js/fox 3.0.1-6 → 3.0.1-8

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/libs/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { ref as mr, effectScope as kr, watch as Wr, shallowRef as zr, getCurrentInstance as Ht, onUnmounted as nt, shallowReactive as Jr, defineComponent as vr, inject as G, provide as te, h as ae } from "vue";
1
+ import { ref as mr, getCurrentInstance as Ht, onUnmounted as nt, shallowReactive as kr, effectScope as Wr, watch as zr, shallowRef as Jr, defineComponent as vr, inject as G, provide as te, h as ae } from "vue";
2
2
  /*!
3
- * fox v3.0.0 Thu Oct 27 2022 08:50:23 GMT+0800 (中国标准时间)
3
+ * fox v3.0.0 Wed Nov 02 2022 21:13:26 GMT+0800 (中国标准时间)
4
4
  */
5
5
  const Gr = Array.isArray, gi = (r) => Ut(r) === "[object Map]", wi = (r) => Ut(r) === "[object Set]", bi = (r) => r instanceof Date, S = (r) => typeof r == "function", xi = (r) => typeof r == "string", Ri = (r) => typeof r == "symbol", Qr = (r) => r !== null && typeof r == "object", Si = (r) => Qr(r) && S(r.then) && S(r.catch), Xr = Object.prototype.toString, Ut = (r) => Xr.call(r), _t = (r) => Ut(r) === "[object Object]", Yr = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
6
6
  function gr(r) {
@@ -308,256 +308,7 @@ let Yt = new Proxy(Sr, {
308
308
  return Me(t);
309
309
  }
310
310
  });
311
- function an(r) {
312
- for (var e = [], t = 0; t < r.length; ) {
313
- var n = r[t];
314
- if (n === "*" || n === "+" || n === "?") {
315
- e.push({ type: "MODIFIER", index: t, value: r[t++] });
316
- continue;
317
- }
318
- if (n === "\\") {
319
- e.push({ type: "ESCAPED_CHAR", index: t++, value: r[t++] });
320
- continue;
321
- }
322
- if (n === "{") {
323
- e.push({ type: "OPEN", index: t, value: r[t++] });
324
- continue;
325
- }
326
- if (n === "}") {
327
- e.push({ type: "CLOSE", index: t, value: r[t++] });
328
- continue;
329
- }
330
- if (n === ":") {
331
- for (var s = "", i = t + 1; i < r.length; ) {
332
- var o = r.charCodeAt(i);
333
- if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
334
- s += r[i++];
335
- continue;
336
- }
337
- break;
338
- }
339
- if (!s)
340
- throw new TypeError("Missing parameter name at ".concat(t));
341
- e.push({ type: "NAME", index: t, value: s }), t = i;
342
- continue;
343
- }
344
- if (n === "(") {
345
- var l = 1, a = "", i = t + 1;
346
- if (r[i] === "?")
347
- throw new TypeError('Pattern cannot start with "?" at '.concat(i));
348
- for (; i < r.length; ) {
349
- if (r[i] === "\\") {
350
- a += r[i++] + r[i++];
351
- continue;
352
- }
353
- if (r[i] === ")") {
354
- if (l--, l === 0) {
355
- i++;
356
- break;
357
- }
358
- } else if (r[i] === "(" && (l++, r[i + 1] !== "?"))
359
- throw new TypeError("Capturing groups are not allowed at ".concat(i));
360
- a += r[i++];
361
- }
362
- if (l)
363
- throw new TypeError("Unbalanced pattern at ".concat(t));
364
- if (!a)
365
- throw new TypeError("Missing pattern at ".concat(t));
366
- e.push({ type: "PATTERN", index: t, value: a }), t = i;
367
- continue;
368
- }
369
- e.push({ type: "CHAR", index: t, value: r[t++] });
370
- }
371
- return e.push({ type: "END", index: t, value: "" }), e;
372
- }
373
- function Cr(r, e) {
374
- e === void 0 && (e = {});
375
- for (var t = an(r), n = e.prefixes, s = n === void 0 ? "./" : n, i = "[^".concat(ge(e.delimiter || "/#?"), "]+?"), o = [], l = 0, a = 0, f = "", u = function(x) {
376
- if (a < t.length && t[a].type === x)
377
- return t[a++].value;
378
- }, c = function(x) {
379
- var _ = u(x);
380
- if (_ !== void 0)
381
- return _;
382
- var K = t[a], j = K.type, O = K.index;
383
- throw new TypeError("Unexpected ".concat(j, " at ").concat(O, ", expected ").concat(x));
384
- }, h = function() {
385
- for (var x = "", _; _ = u("CHAR") || u("ESCAPED_CHAR"); )
386
- x += _;
387
- return x;
388
- }; a < t.length; ) {
389
- var d = u("CHAR"), y = u("NAME"), v = u("PATTERN");
390
- if (y || v) {
391
- var p = d || "";
392
- s.indexOf(p) === -1 && (f += p, p = ""), f && (o.push(f), f = ""), o.push({
393
- name: y || l++,
394
- prefix: p,
395
- suffix: "",
396
- pattern: v || i,
397
- modifier: u("MODIFIER") || ""
398
- });
399
- continue;
400
- }
401
- var m = d || u("ESCAPED_CHAR");
402
- if (m) {
403
- f += m;
404
- continue;
405
- }
406
- f && (o.push(f), f = "");
407
- var w = u("OPEN");
408
- if (w) {
409
- var p = h(), T = u("NAME") || "", b = u("PATTERN") || "", C = h();
410
- c("CLOSE"), o.push({
411
- name: T || (b ? l++ : ""),
412
- pattern: T && !b ? i : b,
413
- prefix: p,
414
- suffix: C,
415
- modifier: u("MODIFIER") || ""
416
- });
417
- continue;
418
- }
419
- c("END");
420
- }
421
- return o;
422
- }
423
- function un(r, e) {
424
- return fn(Cr(r, e), e);
425
- }
426
- function fn(r, e) {
427
- e === void 0 && (e = {});
428
- var t = Wt(e), n = e.encode, s = n === void 0 ? function(a) {
429
- return a;
430
- } : n, i = e.validate, o = i === void 0 ? !0 : i, l = r.map(function(a) {
431
- if (typeof a == "object")
432
- return new RegExp("^(?:".concat(a.pattern, ")$"), t);
433
- });
434
- return function(a) {
435
- for (var f = "", u = 0; u < r.length; u++) {
436
- var c = r[u];
437
- if (typeof c == "string") {
438
- f += c;
439
- continue;
440
- }
441
- var h = a ? a[c.name] : void 0, d = c.modifier === "?" || c.modifier === "*", y = c.modifier === "*" || c.modifier === "+";
442
- if (Array.isArray(h)) {
443
- if (!y)
444
- throw new TypeError('Expected "'.concat(c.name, '" to not repeat, but got an array'));
445
- if (h.length === 0) {
446
- if (d)
447
- continue;
448
- throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
449
- }
450
- for (var v = 0; v < h.length; v++) {
451
- var p = s(h[v], c);
452
- if (o && !l[u].test(p))
453
- throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
454
- f += c.prefix + p + c.suffix;
455
- }
456
- continue;
457
- }
458
- if (typeof h == "string" || typeof h == "number") {
459
- var p = s(String(h), c);
460
- if (o && !l[u].test(p))
461
- throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
462
- f += c.prefix + p + c.suffix;
463
- continue;
464
- }
465
- if (!d) {
466
- var m = y ? "an array" : "a string";
467
- throw new TypeError('Expected "'.concat(c.name, '" to be ').concat(m));
468
- }
469
- }
470
- return f;
471
- };
472
- }
473
- function cn(r, e) {
474
- var t = [], n = Pr(r, t, e);
475
- return hn(n, t, e);
476
- }
477
- function hn(r, e, t) {
478
- t === void 0 && (t = {});
479
- var n = t.decode, s = n === void 0 ? function(i) {
480
- return i;
481
- } : n;
482
- return function(i) {
483
- var o = r.exec(i);
484
- if (!o)
485
- return !1;
486
- for (var l = o[0], a = o.index, f = /* @__PURE__ */ Object.create(null), u = function(h) {
487
- if (o[h] === void 0)
488
- return "continue";
489
- var d = e[h - 1];
490
- d.modifier === "*" || d.modifier === "+" ? f[d.name] = o[h].split(d.prefix + d.suffix).map(function(y) {
491
- return s(y, d);
492
- }) : f[d.name] = s(o[h], d);
493
- }, c = 1; c < o.length; c++)
494
- u(c);
495
- return { path: l, index: a, params: f };
496
- };
497
- }
498
- function ge(r) {
499
- return r.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
500
- }
501
- function Wt(r) {
502
- return r && r.sensitive ? "" : "i";
503
- }
504
- function dn(r, e) {
505
- if (!e)
506
- return r;
507
- for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, n = 0, s = t.exec(r.source); s; )
508
- e.push({
509
- name: s[1] || n++,
510
- prefix: "",
511
- suffix: "",
512
- modifier: "",
513
- pattern: ""
514
- }), s = t.exec(r.source);
515
- return r;
516
- }
517
- function yn(r, e, t) {
518
- var n = r.map(function(s) {
519
- return Pr(s, e, t).source;
520
- });
521
- return new RegExp("(?:".concat(n.join("|"), ")"), Wt(t));
522
- }
523
- function pn(r, e, t) {
524
- return mn(Cr(r, t), e, t);
525
- }
526
- function mn(r, e, t) {
527
- t === void 0 && (t = {});
528
- for (var n = t.strict, s = n === void 0 ? !1 : n, i = t.start, o = i === void 0 ? !0 : i, l = t.end, a = l === void 0 ? !0 : l, f = t.encode, u = f === void 0 ? function(O) {
529
- return O;
530
- } : f, c = t.delimiter, h = c === void 0 ? "/#?" : c, d = t.endsWith, y = d === void 0 ? "" : d, v = "[".concat(ge(y), "]|$"), p = "[".concat(ge(h), "]"), m = o ? "^" : "", w = 0, T = r; w < T.length; w++) {
531
- var b = T[w];
532
- if (typeof b == "string")
533
- m += ge(u(b));
534
- else {
535
- var C = ge(u(b.prefix)), x = ge(u(b.suffix));
536
- if (b.pattern)
537
- if (e && e.push(b), C || x)
538
- if (b.modifier === "+" || b.modifier === "*") {
539
- var _ = b.modifier === "*" ? "?" : "";
540
- m += "(?:".concat(C, "((?:").concat(b.pattern, ")(?:").concat(x).concat(C, "(?:").concat(b.pattern, "))*)").concat(x, ")").concat(_);
541
- } else
542
- m += "(?:".concat(C, "(").concat(b.pattern, ")").concat(x, ")").concat(b.modifier);
543
- else
544
- b.modifier === "+" || b.modifier === "*" ? m += "((?:".concat(b.pattern, ")").concat(b.modifier, ")") : m += "(".concat(b.pattern, ")").concat(b.modifier);
545
- else
546
- m += "(?:".concat(C).concat(x, ")").concat(b.modifier);
547
- }
548
- }
549
- if (a)
550
- s || (m += "".concat(p, "?")), m += t.endsWith ? "(?=".concat(v, ")") : "$";
551
- else {
552
- var K = r[r.length - 1], j = typeof K == "string" ? p.indexOf(K[K.length - 1]) > -1 : K === void 0;
553
- s || (m += "(?:".concat(p, "(?=").concat(v, "))?")), j || (m += "(?=".concat(p, "|").concat(v, ")"));
554
- }
555
- return new RegExp(m, Wt(t));
556
- }
557
- function Pr(r, e, t) {
558
- return r instanceof RegExp ? dn(r, e) : Array.isArray(r) ? yn(r, e, t) : pn(r, e, t);
559
- }
560
- const Z = "default", Ar = Symbol("sync"), M = Symbol("resolveRoute");
311
+ const Z = "default", Cr = Symbol("sync"), M = Symbol("resolveRoute");
561
312
  function Zt(r) {
562
313
  let e = !1;
563
314
  return function(...t) {
@@ -565,7 +316,7 @@ function Zt(r) {
565
316
  return e = !0, Reflect.apply(r, {}, t);
566
317
  };
567
318
  }
568
- function vn(r) {
319
+ function an(r) {
569
320
  let e = r.src;
570
321
  return new Promise((t, n) => {
571
322
  const s = Zt((l) => {
@@ -588,7 +339,7 @@ function vn(r) {
588
339
  }
589
340
  });
590
341
  }
591
- class gn {
342
+ class un {
592
343
  name;
593
344
  level;
594
345
  rootName;
@@ -658,7 +409,7 @@ class q {
658
409
  return t;
659
410
  }
660
411
  }
661
- class wn {
412
+ class fn {
662
413
  id;
663
414
  name;
664
415
  props;
@@ -672,7 +423,7 @@ class wn {
672
423
  return this.component !== void 0;
673
424
  }
674
425
  resolve() {
675
- return vn(this);
426
+ return an(this);
676
427
  }
677
428
  }
678
429
  class er {
@@ -685,118 +436,194 @@ class ut {
685
436
  name;
686
437
  layers = [];
687
438
  }
688
- var P = /* @__PURE__ */ ((r) => (r[r.Push = 0] = "Push", r[r.Replace = 1] = "Replace", r[r.Put = 2] = "Put", r[r.Append = 3] = "Append", r[r.Open = 4] = "Open", r))(P || {}), Ge = /* @__PURE__ */ ((r) => (r[r.Part = 0] = "Part", r[r.All = 1] = "All", r))(Ge || {});
689
- const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ue = Symbol("parentNodeKey"), Qe = Symbol("nameKey");
690
- class re {
691
- instance = null;
692
- model;
693
- route;
694
- active = !0;
695
- index = 0;
696
- constructor(e, t, n = 0, s = !0) {
697
- this.route = e, this.model = t, this.index = n, this.active = s;
439
+ const D = Symbol("chainKey"), L = Symbol("cursorKey"), ft = Symbol("$persistentModeKey"), A = Symbol("statusKey"), X = Symbol("argsKey"), Ie = Symbol("exArgsKey"), he = Symbol("successFnsKey"), Pe = Symbol("errorFnsKey"), se = Symbol("sessionKey"), Y = Symbol("_go");
440
+ class tt {
441
+ [D] = [];
442
+ [L] = 0;
443
+ [ft] = !1;
444
+ [A] = "Free";
445
+ [X] = [];
446
+ [Ie] = [];
447
+ [he] = [];
448
+ [Pe] = [];
449
+ [se];
450
+ get session() {
451
+ return this[se];
698
452
  }
699
- }
700
- class Pe {
701
- scope = null;
702
- set compensation(e) {
703
- this.scope !== null && this.scope.stop(), this.scope = kr(), this.scope.run(() => {
704
- Wr(this.slots, () => {
705
- let t = !1;
706
- try {
707
- t = e();
708
- } catch (n) {
709
- console.error(n);
453
+ constructor(e, t = !1) {
454
+ this[se] = e, this[ft] = t;
455
+ }
456
+ [Y](e, ...t) {
457
+ let n = this[A];
458
+ if (this[A] = "Busy", this[L] += e, this[L] < 0 && (this[L] = 0), this[X] = t, n === "Exception" || n === "Reject") {
459
+ let l = [{
460
+ session: this[se]
461
+ }, ...this[Ie]];
462
+ for (; this[Pe].length > 0; )
463
+ try {
464
+ let a = this[Pe].shift();
465
+ typeof a == "function" && Le(() => {
466
+ Reflect.apply(a, {}, l);
467
+ });
468
+ } catch (a) {
469
+ console.error(a.message, a);
710
470
  }
711
- t && this.scope !== null && (this.scope.stop(), this.scope = null);
471
+ return this[A] = n, this[D] = [], this[L] = 0, this;
472
+ } else if (n === "Finished" || this[L] >= this[D].length) {
473
+ let l = [{
474
+ session: this[se]
475
+ }, ...this[X]];
476
+ for (; this[he].length > 0; ) {
477
+ let a = this[he].shift();
478
+ typeof a == "function" && Le(() => {
479
+ Reflect.apply(a, {}, l);
480
+ });
481
+ }
482
+ return this[A] = "Free", this;
483
+ }
484
+ if (this[L] >= this[D].length)
485
+ return this[A] = "Free", this;
486
+ let s = this[D][this[L]];
487
+ this[ft] || (this[D].splice(0, this[L] + 1), this[L] = -1);
488
+ let i = this[L] + 1;
489
+ try {
490
+ let o = !1, l = {
491
+ go: (a, ...f) => {
492
+ o || (o = !0, Reflect.apply(this[Y], this, [a, ...f]));
493
+ },
494
+ resolve: (...a) => {
495
+ o || (o = !0, Reflect.apply(this[Y], this, [1, ...a]));
496
+ },
497
+ reject: (...a) => {
498
+ o || (o = !0, Reflect.apply(this.reject, this, [...a]));
499
+ },
500
+ insert: (a) => {
501
+ o || (this[D].splice(i, 0, a), i++);
502
+ },
503
+ session: this[se]
504
+ };
505
+ Le(() => {
506
+ Reflect.apply(s, {}, [l, ...this[X]]);
712
507
  });
713
- });
714
- }
715
- _slots;
716
- get slots() {
717
- return this._slots == null && (this._slots = zr([])), this._slots;
508
+ } catch (o) {
509
+ this.throw(o);
510
+ }
511
+ return this;
718
512
  }
719
- get empty() {
720
- return this._slots == null || this._slots.value.length == 0;
513
+ go(e, ...t) {
514
+ return Reflect.apply(this[Y], this, [e, ...t]);
721
515
  }
722
- [Qe];
723
- [J];
724
- [z] = null;
725
- [ue] = null;
726
- get name() {
727
- return this[Qe];
516
+ finish(...e) {
517
+ return this[A] = "Finished", this[X] = e, Reflect.apply(this[Y], this, [0]);
728
518
  }
729
- constructor(e, t, n) {
730
- this[Qe] = e, this[J] = t, n && (this[z] = n);
519
+ reject(...e) {
520
+ return this[A] = "Reject", this[Ie] = e, Reflect.apply(this[Y], this, [0]);
731
521
  }
732
- }
733
- class D {
734
- view;
735
- index;
736
- level;
737
- constructor(e, t, n) {
738
- this.view = e, this.index = t, this.level = n;
522
+ throw(...e) {
523
+ return this[A] = "Exception", this[Ie] = e, Reflect.apply(this[Y], this, [0]);
739
524
  }
740
- static include(e, t) {
741
- for (let n = 0; n < e.length; n++) {
742
- let s = e[n];
743
- if (s.view === t.view && (t.index == -1 || s.index === t.index) && s.level === t.level)
744
- return !0;
525
+ reset(...e) {
526
+ this[A] = "Busy", this[X] = e, this[D] = [], this[L] = 0;
527
+ let n = [{
528
+ session: this[se]
529
+ }, ...this[X]];
530
+ for (; this[he].length > 0; ) {
531
+ let s = this[he].shift();
532
+ Le(() => {
533
+ Reflect.apply(s, this, n);
534
+ });
745
535
  }
746
- return !1;
536
+ return this[A] = "Free", this;
537
+ }
538
+ post(e) {
539
+ return this[A] === "Reject" || this[A] === "Exception" ? this : (Array.isArray(e) ? this[D] = [...this[D], ...e] : this[D].push(e), this[A] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this));
540
+ }
541
+ wait(e, t) {
542
+ return e && typeof e == "function" && this[he].push(e), t && typeof t == "function" && this[Pe].push(t), this[A] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this);
543
+ }
544
+ exception(e) {
545
+ return e && typeof e == "function" && this[Pe].push(e), this[A] === "Busy" ? this : Reflect.apply(this[Y], this, [0, ...this[X]]);
546
+ }
547
+ isFinish() {
548
+ return this[A] == "Reject" || this[A] == "Free" && this[L] >= this[D].length;
747
549
  }
748
550
  }
749
- class ft {
750
- views = [];
751
- }
752
- class bn {
753
- layers = [];
754
- }
755
- class xn {
756
- time;
757
- route;
551
+ const de = Symbol("registerKey");
552
+ class cn {
553
+ policy;
554
+ callback;
555
+ constructor(e, t) {
556
+ this.callback = e, this.policy = t;
557
+ }
758
558
  }
759
- class Rn {
760
- forbidTime = 300;
761
- submitRecorder = new xn();
762
- isSameRoute(e, t) {
763
- return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
559
+ class tr {
560
+ [de] = /* @__PURE__ */ new Map();
561
+ constructor() {
764
562
  }
765
- acquire(e) {
766
- let t = new Date().getTime();
767
- if (this.isSameRoute(e, this.submitRecorder.route) && this.submitRecorder.time && t - this.submitRecorder.time <= this.forbidTime) {
768
- this.submitRecorder.time = t;
769
- return;
563
+ on(e, t, n = !1) {
564
+ let s = this[de].get(e);
565
+ s || (s = new Array(), this[de].set(e, s));
566
+ let i = n === !0 ? 1 : 0, o = new cn(t, i);
567
+ return s.push(o), this;
568
+ }
569
+ off(e, t) {
570
+ if (!t)
571
+ return this[de].delete(e), this;
572
+ let n = this[de].get(e);
573
+ if (n) {
574
+ for (let s = 0; s < n.length; s++)
575
+ if (n[s].callback === t) {
576
+ n.splice(s, 1);
577
+ break;
578
+ }
770
579
  }
771
- return this.submitRecorder.route = e, this.submitRecorder.time = t, t;
580
+ return this;
772
581
  }
773
- release(e) {
774
- this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
582
+ bind(e, t, n = !1) {
583
+ return this.on(e, t, n);
584
+ }
585
+ unbind(e, t) {
586
+ return this.off(e, t);
587
+ }
588
+ once(e, t) {
589
+ return this.on(e, t, !0);
590
+ }
591
+ all(...e) {
592
+ let t = e.length;
593
+ if (t < 1)
594
+ return this;
595
+ let n = e[t - 1];
596
+ if (typeof n != "function")
597
+ return console.error("callback can not benn empty"), this;
598
+ let s = t - 1, i = new Array(s), o = [].splice.call(e, 0, s);
599
+ for (let l = 0; l < o.length; l++)
600
+ this.once(o[l], (a) => {
601
+ i[l] = a, s -= 1, s == 0 && Reflect.apply(n, {}, i);
602
+ });
603
+ return this;
604
+ }
605
+ emit(e, ...t) {
606
+ let n = this[de].get(e);
607
+ if (!n)
608
+ return this;
609
+ for (let s = 0; s < n.length; ) {
610
+ let i = n[s];
611
+ if (i.policy == 1 ? n.splice(s, 1) : s++, typeof i.callback == "function")
612
+ try {
613
+ Le(() => {
614
+ Reflect.apply(i.callback, {}, t);
615
+ });
616
+ } catch (o) {
617
+ console.error(o.message, o);
618
+ }
619
+ }
620
+ return this;
621
+ }
622
+ trigger(e, ...t) {
623
+ return Reflect.apply(this.emit, this, [e, ...t]);
775
624
  }
776
625
  }
777
- const xe = typeof window < "u", I = function() {
778
- return window;
779
- }, Ae = function() {
780
- return window.document;
781
- };
782
- function Sn(r) {
783
- let e = r, t = e.lastIndexOf("/");
784
- return t > 0 && t < e.length - 1 ? e = e.substring(0, t + 1) : t === 0 && e.indexOf(".") !== -1 ? e = "/" : t === -1 && (e.indexOf(".") == -1 ? e = `/${e}/` : e = "/"), e.indexOf("/") !== 0 && (e = `/${e}`), e;
785
- }
786
- function Cn() {
787
- if (!xe)
788
- return "/";
789
- let r = I().location, e = `${r.protocol}//${r.host}`;
790
- return e += Sn(r.pathname), e;
791
- }
792
- function qt(r, e, t) {
793
- r.addEventListener ? r.addEventListener(e, t, !1) : r.attachEvent ? r.attachEvent(`on${e}`, t) : r[`on${e}`] = t;
794
- }
795
- function Ot(r, e, t) {
796
- r.removeEventListener ? r.removeEventListener(e, t) : r.detachEvent ? r.detachEvent(`on${e}`, t) : r[`on${e}`] = null;
797
- }
798
- let ct = Cn();
799
- function Pn(r, e = "text") {
626
+ function hn(r, e = "text") {
800
627
  e = e.trim().toLowerCase();
801
628
  let t = "";
802
629
  if (e.indexOf("application/x-www-form-urlencoded") === 0)
@@ -819,7 +646,7 @@ function Pn(r, e = "text") {
819
646
  e.indexOf("text") === 0 ? typeof r == "object" ? t = JSON.stringify(r) : t = r : e.indexOf("application/json") === 0 && typeof r == "object" ? t = JSON.stringify(r) : t = r;
820
647
  return t;
821
648
  }
822
- function An(r, e, t = "text") {
649
+ function dn(r, e, t = "text") {
823
650
  if (e == null)
824
651
  return r;
825
652
  t = t.trim().toLowerCase();
@@ -844,7 +671,7 @@ function An(r, e, t = "text") {
844
671
  n = e;
845
672
  return n.length > 0 && (r.indexOf("?") === -1 ? r = `${r}?${n}` : r = `${r}&${n}`), r;
846
673
  }
847
- const En = {
674
+ const yn = {
848
675
  method: "POST",
849
676
  headers: {
850
677
  "Content-Type": "application/json; charset=UTF-8"
@@ -855,7 +682,7 @@ const En = {
855
682
  redirect: "follow",
856
683
  keepalive: !0
857
684
  }, we = /* @__PURE__ */ new Map();
858
- async function Er(r) {
685
+ async function Pr(r) {
859
686
  let {
860
687
  id: e,
861
688
  method: t = "POST",
@@ -868,8 +695,8 @@ async function Er(r) {
868
695
  if (e && we.has(e))
869
696
  throw new Error("resubmit");
870
697
  t = t.toUpperCase();
871
- let { contentType: a = "application/json; charset=UTF-8" } = s, f = F(!0, { ...En }, { method: t, headers: s });
872
- if (t === "GET" ? n = An(n, i, a) : (o && (i = Pn(i, a)), f.body = i), e || l > 0) {
698
+ let { contentType: a = "application/json; charset=UTF-8" } = s, f = F(!0, { ...yn }, { method: t, headers: s });
699
+ if (t === "GET" ? n = dn(n, i, a) : (o && (i = hn(i, a)), f.body = i), e || l > 0) {
873
700
  e || (e = `fetch_${ee.get()}`);
874
701
  const u = new AbortController();
875
702
  f.signal = u.signal;
@@ -912,174 +739,558 @@ function Pi(r) {
912
739
  let e = we.get(r);
913
740
  return e ? (e.timer && (clearTimeout(e.timer), e.timer = null), e.controller.abort(), we.delete(r), !0) : !1;
914
741
  }
915
- class Fn {
916
- cache = /* @__PURE__ */ new Map();
742
+ const Ae = Symbol("registerKey");
743
+ class pn {
744
+ [Ae] = /* @__PURE__ */ new Map();
917
745
  constructor() {
918
746
  }
919
- async get(e, t = -1) {
920
- if (this.cache.has(e))
921
- return this.cache.get(e);
922
- let n = await Er({
923
- url: e,
924
- method: "GET",
925
- timeout: t,
926
- heaaders: {
927
- "content-type": "text/plain"
928
- }
929
- });
930
- if (n.ok)
931
- return this.cache.set(e, n.data), n.data;
932
- throw Error(n.statusText);
933
- }
934
- remove(e) {
935
- this.cache.delete(e);
936
- }
937
- }
938
- var W = /* @__PURE__ */ ((r) => (r[r.Loading = 0] = "Loading", r[r.Loaded = 1] = "Loaded", r[r.Defining = 2] = "Defining", r[r.Defined = 3] = "Defined", r))(W || {});
939
- class Tn {
940
- exports;
941
- status;
942
- id;
943
- src;
944
- }
945
- class Kn {
946
- register = /* @__PURE__ */ new Map();
947
- constructor() {
747
+ set(e, t) {
748
+ this[Ae].set(e, t);
948
749
  }
949
750
  get(e) {
950
- return this.register.get(e);
751
+ return this[Ae].get(e);
951
752
  }
952
- put(e, t) {
953
- this.register.set(e, t);
753
+ has(e) {
754
+ return this[Ae].has(e);
954
755
  }
955
- remove(e) {
956
- let t = this.register.get(e);
957
- return this.register.delete(e), t;
756
+ delete(e) {
757
+ return this[Ae].delete(e);
958
758
  }
959
- contains(e) {
960
- return this.register.has(e);
759
+ }
760
+ const qt = Symbol("lc");
761
+ function Ge(r, e = !1) {
762
+ let t = r, n = t[qt];
763
+ if (!n)
764
+ if (e)
765
+ n = new pn(), t[qt] = n;
766
+ else
767
+ return null;
768
+ return n;
769
+ }
770
+ function Ar(r, e) {
771
+ let t = r;
772
+ for (; t !== null; ) {
773
+ let n = t[qt];
774
+ if (n && n.has(e))
775
+ return n.get(e);
776
+ t = t.$parent;
961
777
  }
962
- clear() {
963
- this.register.clear();
778
+ return null;
779
+ }
780
+ function rr(r) {
781
+ if (Array.isArray(r.children) && r.children.length > 0) {
782
+ let e = r.children[0];
783
+ if (e != null && e.component != null && e.component.proxy != null)
784
+ return Ge(e.component.proxy, !1);
964
785
  }
786
+ return null;
965
787
  }
966
- const H = Symbol("chainKey"), L = Symbol("cursorKey"), ht = Symbol("$persistentModeKey"), A = Symbol("statusKey"), X = Symbol("argsKey"), Ie = Symbol("exArgsKey"), he = Symbol("successFnsKey"), Ee = Symbol("errorFnsKey"), se = Symbol("sessionKey"), Y = Symbol("_go");
967
- class tt {
968
- [H] = [];
969
- [L] = 0;
970
- [ht] = !1;
971
- [A] = "Free";
972
- [X] = [];
973
- [Ie] = [];
974
- [he] = [];
975
- [Ee] = [];
976
- [se];
977
- get session() {
978
- return this[se];
788
+ const rt = Symbol("hooksKey");
789
+ function mn(r) {
790
+ let e = r.get(rt);
791
+ e || (e = [], r.set(rt, e));
792
+ }
793
+ function nr(r, e) {
794
+ let t = r.get(rt);
795
+ if (t != null)
796
+ for (let n = t.length - 1; n >= 0; n--) {
797
+ let s = t[n];
798
+ if (s.type === e)
799
+ try {
800
+ Reflect.apply(s.hook, s.target, []);
801
+ } catch (i) {
802
+ console.error(i.message, i);
803
+ }
804
+ }
805
+ }
806
+ var Ot = /* @__PURE__ */ ((r) => (r.DEACTIVATED = "da", r.ACTIVATED = "a", r))(Ot || {});
807
+ class vn {
808
+ type;
809
+ hook;
810
+ target;
811
+ constructor(e, t, n) {
812
+ this.target = n, this.hook = t, this.type = e;
979
813
  }
980
- constructor(e, t = !1) {
981
- this[se] = e, this[ht] = t;
814
+ }
815
+ function gn(r, e, t, n) {
816
+ let s = new vn(e, t, n);
817
+ return r.push(s), !0;
818
+ }
819
+ function wn(r, e, t, n) {
820
+ let s = -1;
821
+ for (let i = 0; i < r.length; i++) {
822
+ let o = r[i];
823
+ if (o.type === e && o.hook === t && o.target === n) {
824
+ s = i;
825
+ break;
826
+ }
982
827
  }
983
- [Y](e, ...t) {
984
- let n = this[A];
985
- if (this[A] = "Busy", this[L] += e, this[L] < 0 && (this[L] = 0), this[X] = t, n === "Exception" || n === "Reject") {
986
- let l = [{
987
- session: this[se]
988
- }, ...this[Ie]];
989
- for (; this[Ee].length > 0; )
990
- try {
991
- let a = this[Ee].shift();
992
- typeof a == "function" && Le(() => {
993
- Reflect.apply(a, {}, l);
994
- });
995
- } catch (a) {
996
- console.error(a.message, a);
828
+ return s != -1 ? (r.splice(s, 1), !0) : !1;
829
+ }
830
+ function Er(r) {
831
+ return (e, t) => {
832
+ let n;
833
+ if (t)
834
+ n = t;
835
+ else {
836
+ let i = Ht();
837
+ if (i == null || i.proxy == null) {
838
+ console.error("can not get current instance or proxy");
839
+ return;
840
+ }
841
+ n = i.proxy;
842
+ }
843
+ let s = Ar(n, rt);
844
+ if (s == null) {
845
+ console.warn("can not get hooks context");
846
+ return;
847
+ }
848
+ nt(() => {
849
+ wn(s, r, e, n);
850
+ }), gn(s, r, e, n);
851
+ };
852
+ }
853
+ let Ai = Er("a"), Ei = Er("da");
854
+ function bn() {
855
+ let r = new q();
856
+ return r.path = "", r.name = "", r.params = {}, r.index = -1, kr(r);
857
+ }
858
+ const Lt = Symbol("routeKey");
859
+ function ct(r, e) {
860
+ let t = r.get(Lt);
861
+ if (t) {
862
+ let n = {
863
+ path: "",
864
+ name: "",
865
+ params: {},
866
+ index: -1,
867
+ session: {}
868
+ };
869
+ Object.assign(n, e), Object.assign(t, n);
870
+ } else
871
+ t = bn(), Object.assign(t, e), r.set(Lt, t);
872
+ }
873
+ function Fr(r) {
874
+ let e = Ar(r, Lt);
875
+ return e ?? null;
876
+ }
877
+ const it = Symbol("rk"), ht = Symbol("vd"), ir = Symbol("rv"), dt = Symbol("rvi"), sr = Symbol("pv"), yt = Symbol("pvi");
878
+ function xn(r) {
879
+ for (var e = [], t = 0; t < r.length; ) {
880
+ var n = r[t];
881
+ if (n === "*" || n === "+" || n === "?") {
882
+ e.push({ type: "MODIFIER", index: t, value: r[t++] });
883
+ continue;
884
+ }
885
+ if (n === "\\") {
886
+ e.push({ type: "ESCAPED_CHAR", index: t++, value: r[t++] });
887
+ continue;
888
+ }
889
+ if (n === "{") {
890
+ e.push({ type: "OPEN", index: t, value: r[t++] });
891
+ continue;
892
+ }
893
+ if (n === "}") {
894
+ e.push({ type: "CLOSE", index: t, value: r[t++] });
895
+ continue;
896
+ }
897
+ if (n === ":") {
898
+ for (var s = "", i = t + 1; i < r.length; ) {
899
+ var o = r.charCodeAt(i);
900
+ if (o >= 48 && o <= 57 || o >= 65 && o <= 90 || o >= 97 && o <= 122 || o === 95) {
901
+ s += r[i++];
902
+ continue;
997
903
  }
998
- return this[A] = n, this[H] = [], this[L] = 0, this;
999
- } else if (n === "Finished" || this[L] >= this[H].length) {
1000
- let l = [{
1001
- session: this[se]
1002
- }, ...this[X]];
1003
- for (; this[he].length > 0; ) {
1004
- let a = this[he].shift();
1005
- typeof a == "function" && Le(() => {
1006
- Reflect.apply(a, {}, l);
1007
- });
904
+ break;
1008
905
  }
1009
- return this[A] = "Free", this;
906
+ if (!s)
907
+ throw new TypeError("Missing parameter name at ".concat(t));
908
+ e.push({ type: "NAME", index: t, value: s }), t = i;
909
+ continue;
1010
910
  }
1011
- if (this[L] >= this[H].length)
1012
- return this[A] = "Free", this;
1013
- let s = this[H][this[L]];
1014
- this[ht] || (this[H].splice(0, this[L] + 1), this[L] = -1);
1015
- let i = this[L] + 1;
1016
- try {
1017
- let o = !1, l = {
1018
- go: (a, ...f) => {
1019
- o || (o = !0, Reflect.apply(this[Y], this, [a, ...f]));
1020
- },
1021
- resolve: (...a) => {
1022
- o || (o = !0, Reflect.apply(this[Y], this, [1, ...a]));
1023
- },
1024
- reject: (...a) => {
1025
- o || (o = !0, Reflect.apply(this.reject, this, [...a]));
1026
- },
1027
- insert: (a) => {
1028
- o || (this[H].splice(i, 0, a), i++);
1029
- },
1030
- session: this[se]
1031
- };
1032
- Le(() => {
1033
- Reflect.apply(s, {}, [l, ...this[X]]);
911
+ if (n === "(") {
912
+ var l = 1, a = "", i = t + 1;
913
+ if (r[i] === "?")
914
+ throw new TypeError('Pattern cannot start with "?" at '.concat(i));
915
+ for (; i < r.length; ) {
916
+ if (r[i] === "\\") {
917
+ a += r[i++] + r[i++];
918
+ continue;
919
+ }
920
+ if (r[i] === ")") {
921
+ if (l--, l === 0) {
922
+ i++;
923
+ break;
924
+ }
925
+ } else if (r[i] === "(" && (l++, r[i + 1] !== "?"))
926
+ throw new TypeError("Capturing groups are not allowed at ".concat(i));
927
+ a += r[i++];
928
+ }
929
+ if (l)
930
+ throw new TypeError("Unbalanced pattern at ".concat(t));
931
+ if (!a)
932
+ throw new TypeError("Missing pattern at ".concat(t));
933
+ e.push({ type: "PATTERN", index: t, value: a }), t = i;
934
+ continue;
935
+ }
936
+ e.push({ type: "CHAR", index: t, value: r[t++] });
937
+ }
938
+ return e.push({ type: "END", index: t, value: "" }), e;
939
+ }
940
+ function Tr(r, e) {
941
+ e === void 0 && (e = {});
942
+ for (var t = xn(r), n = e.prefixes, s = n === void 0 ? "./" : n, i = "[^".concat(ge(e.delimiter || "/#?"), "]+?"), o = [], l = 0, a = 0, f = "", u = function(x) {
943
+ if (a < t.length && t[a].type === x)
944
+ return t[a++].value;
945
+ }, c = function(x) {
946
+ var _ = u(x);
947
+ if (_ !== void 0)
948
+ return _;
949
+ var K = t[a], j = K.type, O = K.index;
950
+ throw new TypeError("Unexpected ".concat(j, " at ").concat(O, ", expected ").concat(x));
951
+ }, h = function() {
952
+ for (var x = "", _; _ = u("CHAR") || u("ESCAPED_CHAR"); )
953
+ x += _;
954
+ return x;
955
+ }; a < t.length; ) {
956
+ var d = u("CHAR"), y = u("NAME"), v = u("PATTERN");
957
+ if (y || v) {
958
+ var p = d || "";
959
+ s.indexOf(p) === -1 && (f += p, p = ""), f && (o.push(f), f = ""), o.push({
960
+ name: y || l++,
961
+ prefix: p,
962
+ suffix: "",
963
+ pattern: v || i,
964
+ modifier: u("MODIFIER") || ""
1034
965
  });
1035
- } catch (o) {
1036
- this.throw(o);
966
+ continue;
1037
967
  }
1038
- return this;
968
+ var m = d || u("ESCAPED_CHAR");
969
+ if (m) {
970
+ f += m;
971
+ continue;
972
+ }
973
+ f && (o.push(f), f = "");
974
+ var w = u("OPEN");
975
+ if (w) {
976
+ var p = h(), T = u("NAME") || "", b = u("PATTERN") || "", C = h();
977
+ c("CLOSE"), o.push({
978
+ name: T || (b ? l++ : ""),
979
+ pattern: T && !b ? i : b,
980
+ prefix: p,
981
+ suffix: C,
982
+ modifier: u("MODIFIER") || ""
983
+ });
984
+ continue;
985
+ }
986
+ c("END");
1039
987
  }
1040
- go(e, ...t) {
1041
- return Reflect.apply(this[Y], this, [e, ...t]);
988
+ return o;
989
+ }
990
+ function Rn(r, e) {
991
+ return Sn(Tr(r, e), e);
992
+ }
993
+ function Sn(r, e) {
994
+ e === void 0 && (e = {});
995
+ var t = Wt(e), n = e.encode, s = n === void 0 ? function(a) {
996
+ return a;
997
+ } : n, i = e.validate, o = i === void 0 ? !0 : i, l = r.map(function(a) {
998
+ if (typeof a == "object")
999
+ return new RegExp("^(?:".concat(a.pattern, ")$"), t);
1000
+ });
1001
+ return function(a) {
1002
+ for (var f = "", u = 0; u < r.length; u++) {
1003
+ var c = r[u];
1004
+ if (typeof c == "string") {
1005
+ f += c;
1006
+ continue;
1007
+ }
1008
+ var h = a ? a[c.name] : void 0, d = c.modifier === "?" || c.modifier === "*", y = c.modifier === "*" || c.modifier === "+";
1009
+ if (Array.isArray(h)) {
1010
+ if (!y)
1011
+ throw new TypeError('Expected "'.concat(c.name, '" to not repeat, but got an array'));
1012
+ if (h.length === 0) {
1013
+ if (d)
1014
+ continue;
1015
+ throw new TypeError('Expected "'.concat(c.name, '" to not be empty'));
1016
+ }
1017
+ for (var v = 0; v < h.length; v++) {
1018
+ var p = s(h[v], c);
1019
+ if (o && !l[u].test(p))
1020
+ throw new TypeError('Expected all "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
1021
+ f += c.prefix + p + c.suffix;
1022
+ }
1023
+ continue;
1024
+ }
1025
+ if (typeof h == "string" || typeof h == "number") {
1026
+ var p = s(String(h), c);
1027
+ if (o && !l[u].test(p))
1028
+ throw new TypeError('Expected "'.concat(c.name, '" to match "').concat(c.pattern, '", but got "').concat(p, '"'));
1029
+ f += c.prefix + p + c.suffix;
1030
+ continue;
1031
+ }
1032
+ if (!d) {
1033
+ var m = y ? "an array" : "a string";
1034
+ throw new TypeError('Expected "'.concat(c.name, '" to be ').concat(m));
1035
+ }
1036
+ }
1037
+ return f;
1038
+ };
1039
+ }
1040
+ function Cn(r, e) {
1041
+ var t = [], n = Kr(r, t, e);
1042
+ return Pn(n, t, e);
1043
+ }
1044
+ function Pn(r, e, t) {
1045
+ t === void 0 && (t = {});
1046
+ var n = t.decode, s = n === void 0 ? function(i) {
1047
+ return i;
1048
+ } : n;
1049
+ return function(i) {
1050
+ var o = r.exec(i);
1051
+ if (!o)
1052
+ return !1;
1053
+ for (var l = o[0], a = o.index, f = /* @__PURE__ */ Object.create(null), u = function(h) {
1054
+ if (o[h] === void 0)
1055
+ return "continue";
1056
+ var d = e[h - 1];
1057
+ d.modifier === "*" || d.modifier === "+" ? f[d.name] = o[h].split(d.prefix + d.suffix).map(function(y) {
1058
+ return s(y, d);
1059
+ }) : f[d.name] = s(o[h], d);
1060
+ }, c = 1; c < o.length; c++)
1061
+ u(c);
1062
+ return { path: l, index: a, params: f };
1063
+ };
1064
+ }
1065
+ function ge(r) {
1066
+ return r.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
1067
+ }
1068
+ function Wt(r) {
1069
+ return r && r.sensitive ? "" : "i";
1070
+ }
1071
+ function An(r, e) {
1072
+ if (!e)
1073
+ return r;
1074
+ for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, n = 0, s = t.exec(r.source); s; )
1075
+ e.push({
1076
+ name: s[1] || n++,
1077
+ prefix: "",
1078
+ suffix: "",
1079
+ modifier: "",
1080
+ pattern: ""
1081
+ }), s = t.exec(r.source);
1082
+ return r;
1083
+ }
1084
+ function En(r, e, t) {
1085
+ var n = r.map(function(s) {
1086
+ return Kr(s, e, t).source;
1087
+ });
1088
+ return new RegExp("(?:".concat(n.join("|"), ")"), Wt(t));
1089
+ }
1090
+ function Fn(r, e, t) {
1091
+ return Tn(Tr(r, t), e, t);
1092
+ }
1093
+ function Tn(r, e, t) {
1094
+ t === void 0 && (t = {});
1095
+ for (var n = t.strict, s = n === void 0 ? !1 : n, i = t.start, o = i === void 0 ? !0 : i, l = t.end, a = l === void 0 ? !0 : l, f = t.encode, u = f === void 0 ? function(O) {
1096
+ return O;
1097
+ } : f, c = t.delimiter, h = c === void 0 ? "/#?" : c, d = t.endsWith, y = d === void 0 ? "" : d, v = "[".concat(ge(y), "]|$"), p = "[".concat(ge(h), "]"), m = o ? "^" : "", w = 0, T = r; w < T.length; w++) {
1098
+ var b = T[w];
1099
+ if (typeof b == "string")
1100
+ m += ge(u(b));
1101
+ else {
1102
+ var C = ge(u(b.prefix)), x = ge(u(b.suffix));
1103
+ if (b.pattern)
1104
+ if (e && e.push(b), C || x)
1105
+ if (b.modifier === "+" || b.modifier === "*") {
1106
+ var _ = b.modifier === "*" ? "?" : "";
1107
+ m += "(?:".concat(C, "((?:").concat(b.pattern, ")(?:").concat(x).concat(C, "(?:").concat(b.pattern, "))*)").concat(x, ")").concat(_);
1108
+ } else
1109
+ m += "(?:".concat(C, "(").concat(b.pattern, ")").concat(x, ")").concat(b.modifier);
1110
+ else
1111
+ b.modifier === "+" || b.modifier === "*" ? m += "((?:".concat(b.pattern, ")").concat(b.modifier, ")") : m += "(".concat(b.pattern, ")").concat(b.modifier);
1112
+ else
1113
+ m += "(?:".concat(C).concat(x, ")").concat(b.modifier);
1114
+ }
1115
+ }
1116
+ if (a)
1117
+ s || (m += "".concat(p, "?")), m += t.endsWith ? "(?=".concat(v, ")") : "$";
1118
+ else {
1119
+ var K = r[r.length - 1], j = typeof K == "string" ? p.indexOf(K[K.length - 1]) > -1 : K === void 0;
1120
+ s || (m += "(?:".concat(p, "(?=").concat(v, "))?")), j || (m += "(?=".concat(p, "|").concat(v, ")"));
1121
+ }
1122
+ return new RegExp(m, Wt(t));
1123
+ }
1124
+ function Kr(r, e, t) {
1125
+ return r instanceof RegExp ? An(r, e) : Array.isArray(r) ? En(r, e, t) : Fn(r, e, t);
1126
+ }
1127
+ var P = /* @__PURE__ */ ((r) => (r[r.Push = 0] = "Push", r[r.Replace = 1] = "Replace", r[r.Put = 2] = "Put", r[r.Append = 3] = "Append", r[r.Open = 4] = "Open", r))(P || {}), Qe = /* @__PURE__ */ ((r) => (r[r.Part = 0] = "Part", r[r.All = 1] = "All", r))(Qe || {});
1128
+ const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ue = Symbol("parentNodeKey"), Xe = Symbol("nameKey");
1129
+ class re {
1130
+ instance = null;
1131
+ model;
1132
+ route;
1133
+ active = !0;
1134
+ index = 0;
1135
+ constructor(e, t, n = 0, s = !0) {
1136
+ this.route = e, this.model = t, this.index = n, this.active = s;
1137
+ }
1138
+ }
1139
+ class Ee {
1140
+ scope = null;
1141
+ set compensation(e) {
1142
+ this.scope !== null && this.scope.stop(), this.scope = Wr(), this.scope.run(() => {
1143
+ zr(this.slots, () => {
1144
+ let t = !1;
1145
+ try {
1146
+ t = e();
1147
+ } catch (n) {
1148
+ console.error(n);
1149
+ }
1150
+ t && this.scope !== null && (this.scope.stop(), this.scope = null);
1151
+ });
1152
+ });
1153
+ }
1154
+ _slots;
1155
+ get slots() {
1156
+ return this._slots == null && (this._slots = Jr([])), this._slots;
1157
+ }
1158
+ get empty() {
1159
+ return this._slots == null || this._slots.value.length == 0;
1160
+ }
1161
+ [Xe];
1162
+ [J];
1163
+ [z] = null;
1164
+ [ue] = null;
1165
+ get name() {
1166
+ return this[Xe];
1167
+ }
1168
+ constructor(e, t, n) {
1169
+ this[Xe] = e, this[J] = t, n && (this[z] = n);
1170
+ }
1171
+ }
1172
+ class H {
1173
+ view;
1174
+ index;
1175
+ level;
1176
+ constructor(e, t, n) {
1177
+ this.view = e, this.index = t, this.level = n;
1178
+ }
1179
+ static include(e, t) {
1180
+ for (let n = 0; n < e.length; n++) {
1181
+ let s = e[n];
1182
+ if (s.view === t.view && (t.index == -1 || s.index === t.index) && s.level === t.level)
1183
+ return !0;
1184
+ }
1185
+ return !1;
1186
+ }
1187
+ }
1188
+ class pt {
1189
+ views = [];
1190
+ }
1191
+ class Kn {
1192
+ layers = [];
1193
+ }
1194
+ class jn {
1195
+ time;
1196
+ route;
1197
+ }
1198
+ class _n {
1199
+ forbidTime = 300;
1200
+ submitRecorder = new jn();
1201
+ isSameRoute(e, t) {
1202
+ return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
1203
+ }
1204
+ acquire(e) {
1205
+ let t = new Date().getTime();
1206
+ if (this.isSameRoute(e, this.submitRecorder.route) && this.submitRecorder.time && t - this.submitRecorder.time <= this.forbidTime) {
1207
+ this.submitRecorder.time = t;
1208
+ return;
1209
+ }
1210
+ return this.submitRecorder.route = e, this.submitRecorder.time = t, t;
1211
+ }
1212
+ release(e) {
1213
+ this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
1214
+ }
1215
+ }
1216
+ const xe = typeof window < "u", I = function() {
1217
+ return window;
1218
+ }, Fe = function() {
1219
+ return window.document;
1220
+ };
1221
+ function $n(r) {
1222
+ let e = r, t = e.lastIndexOf("/");
1223
+ return t > 0 && t < e.length - 1 ? e = e.substring(0, t + 1) : t === 0 && e.indexOf(".") !== -1 ? e = "/" : t === -1 && (e.indexOf(".") == -1 ? e = `/${e}/` : e = "/"), e.indexOf("/") !== 0 && (e = `/${e}`), e;
1224
+ }
1225
+ function qn() {
1226
+ if (!xe)
1227
+ return "/";
1228
+ let r = I().location, e = `${r.protocol}//${r.host}`;
1229
+ return e += $n(r.pathname), e;
1230
+ }
1231
+ function Mt(r, e, t) {
1232
+ r.addEventListener ? r.addEventListener(e, t, !1) : r.attachEvent ? r.attachEvent(`on${e}`, t) : r[`on${e}`] = t;
1233
+ }
1234
+ function It(r, e, t) {
1235
+ r.removeEventListener ? r.removeEventListener(e, t) : r.detachEvent ? r.detachEvent(`on${e}`, t) : r[`on${e}`] = null;
1236
+ }
1237
+ let mt = qn();
1238
+ class On {
1239
+ cache = /* @__PURE__ */ new Map();
1240
+ constructor() {
1042
1241
  }
1043
- finish(...e) {
1044
- return this[A] = "Finished", this[X] = e, Reflect.apply(this[Y], this, [0]);
1242
+ async get(e, t = -1) {
1243
+ if (this.cache.has(e))
1244
+ return this.cache.get(e);
1245
+ let n = await Pr({
1246
+ url: e,
1247
+ method: "GET",
1248
+ timeout: t,
1249
+ heaaders: {
1250
+ "content-type": "text/plain"
1251
+ }
1252
+ });
1253
+ if (n.ok)
1254
+ return this.cache.set(e, n.data), n.data;
1255
+ throw Error(n.statusText);
1045
1256
  }
1046
- reject(...e) {
1047
- return this[A] = "Reject", this[Ie] = e, Reflect.apply(this[Y], this, [0]);
1257
+ remove(e) {
1258
+ this.cache.delete(e);
1048
1259
  }
1049
- throw(...e) {
1050
- return this[A] = "Exception", this[Ie] = e, Reflect.apply(this[Y], this, [0]);
1260
+ }
1261
+ var W = /* @__PURE__ */ ((r) => (r[r.Loading = 0] = "Loading", r[r.Loaded = 1] = "Loaded", r[r.Defining = 2] = "Defining", r[r.Defined = 3] = "Defined", r))(W || {});
1262
+ class Ln {
1263
+ exports;
1264
+ status;
1265
+ id;
1266
+ src;
1267
+ }
1268
+ class Mn {
1269
+ register = /* @__PURE__ */ new Map();
1270
+ constructor() {
1051
1271
  }
1052
- reset(...e) {
1053
- this[A] = "Busy", this[X] = e, this[H] = [], this[L] = 0;
1054
- let n = [{
1055
- session: this[se]
1056
- }, ...this[X]];
1057
- for (; this[he].length > 0; ) {
1058
- let s = this[he].shift();
1059
- Le(() => {
1060
- Reflect.apply(s, this, n);
1061
- });
1062
- }
1063
- return this[A] = "Free", this;
1272
+ get(e) {
1273
+ return this.register.get(e);
1064
1274
  }
1065
- post(e) {
1066
- return this[A] === "Reject" || this[A] === "Exception" ? this : (Array.isArray(e) ? this[H] = [...this[H], ...e] : this[H].push(e), this[A] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this));
1275
+ put(e, t) {
1276
+ this.register.set(e, t);
1067
1277
  }
1068
- wait(e, t) {
1069
- return e && typeof e == "function" && this[he].push(e), t && typeof t == "function" && this[Ee].push(t), this[A] === "Busy" ? this : (Reflect.apply(this[Y], this, [0, ...this[X]]), this);
1278
+ remove(e) {
1279
+ let t = this.register.get(e);
1280
+ return this.register.delete(e), t;
1070
1281
  }
1071
- exception(e) {
1072
- return e && typeof e == "function" && this[Ee].push(e), this[A] === "Busy" ? this : Reflect.apply(this[Y], this, [0, ...this[X]]);
1282
+ contains(e) {
1283
+ return this.register.has(e);
1073
1284
  }
1074
- isFinish() {
1075
- return this[A] == "Reject" || this[A] == "Free" && this[L] >= this[H].length;
1285
+ clear() {
1286
+ this.register.clear();
1076
1287
  }
1077
1288
  }
1078
- class jn {
1289
+ class In {
1079
1290
  head;
1080
1291
  isOldWebKit;
1081
- moduleManager = new Kn();
1082
- resource = new Fn();
1292
+ moduleManager = new Mn();
1293
+ resource = new On();
1083
1294
  options;
1084
1295
  _query;
1085
1296
  set query(e) {
@@ -1089,7 +1300,7 @@ class jn {
1089
1300
  return this._query;
1090
1301
  }
1091
1302
  constructor(e = {}) {
1092
- const t = Ae();
1303
+ const t = Fe();
1093
1304
  this.head = t.head || t.getElementsByTagName("head")[0] || t.documentElement, this.isOldWebKit = +navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/, "$1") < 536, this.options = e, this.options.paths || (this.options.paths = {}), this.options.alias || (this.options.alias = {});
1094
1305
  }
1095
1306
  ensure(...e) {
@@ -1107,7 +1318,7 @@ class jn {
1107
1318
  for (let u = 0; u < f.length; u++)
1108
1319
  f[u] !== void 0 && t.push(this.resolvePath(f[u]));
1109
1320
  }
1110
- let o = new _n(t.length, (a, f) => {
1321
+ let o = new Nn(t.length, (a, f) => {
1111
1322
  if (o.isOK())
1112
1323
  try {
1113
1324
  typeof i == "function" && Reflect.apply(i, {}, f);
@@ -1122,7 +1333,7 @@ class jn {
1122
1333
  }
1123
1334
  }), l = new tt();
1124
1335
  for (let a = 0; a < t.length; a++) {
1125
- let f = new $n(a, t[a], s, o);
1336
+ let f = new Dn(a, t[a], s, o);
1126
1337
  this.mount(l, f);
1127
1338
  }
1128
1339
  return this;
@@ -1147,7 +1358,7 @@ class jn {
1147
1358
  }), typeof i == "function" && Reflect.apply(i, {}, []), this;
1148
1359
  }
1149
1360
  mount(e, t) {
1150
- const n = Ae();
1361
+ const n = Fe();
1151
1362
  if (this.isNaturePath(t.src, "js")) {
1152
1363
  let i = t.params.jsPoint;
1153
1364
  i || (i = this.head), this.mountJS(e, t, i);
@@ -1191,7 +1402,7 @@ class jn {
1191
1402
  }
1192
1403
  mountCSS(e, t, n) {
1193
1404
  e.post((s) => {
1194
- const i = Ae(), o = t.src, l = i.createElement("link"), a = "onload" in l;
1405
+ const i = Fe(), o = t.src, l = i.createElement("link"), a = "onload" in l;
1195
1406
  if (this.isOldWebKit || !a) {
1196
1407
  const u = {
1197
1408
  timeout: this.options.time || 3e3,
@@ -1210,7 +1421,7 @@ class jn {
1210
1421
  }
1211
1422
  };
1212
1423
  setTimeout(() => {
1213
- Fr(l, u);
1424
+ jr(l, u);
1214
1425
  }, 1);
1215
1426
  } else
1216
1427
  l.onload = () => {
@@ -1240,8 +1451,8 @@ class jn {
1240
1451
  return;
1241
1452
  }
1242
1453
  }
1243
- o = new Tn(), o.id = i, o.src = i, o.status = W.Loading, this.moduleManager.put(i, o);
1244
- const a = Ae().createElement("script");
1454
+ o = new Ln(), o.id = i, o.src = i, o.status = W.Loading, this.moduleManager.put(i, o);
1455
+ const a = Fe().createElement("script");
1245
1456
  if ("onload" in a)
1246
1457
  a.onload = () => {
1247
1458
  a.onload = a.onerror = null, o.status == W.Loading && (o.status = W.Loaded, t.progress.work(!0, t.index, i)), s.resolve();
@@ -1265,7 +1476,7 @@ class jn {
1265
1476
  });
1266
1477
  }
1267
1478
  unmount(e, t = {}) {
1268
- const n = Ae(), s = this.getFileNamePostfix(e);
1479
+ const n = Fe(), s = this.getFileNamePostfix(e);
1269
1480
  if (s === "js" || s.length === 0) {
1270
1481
  const i = n.querySelector(`script[src="${e}"]`);
1271
1482
  i && i.parentNode && i.parentNode.removeChild(i), this.moduleManager.remove(e);
@@ -1365,9 +1576,9 @@ class jn {
1365
1576
  if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0)
1366
1577
  return e;
1367
1578
  if (e.indexOf("/") == 0)
1368
- return ct + e.slice(1);
1579
+ return mt + e.slice(1);
1369
1580
  if (e.indexOf("./") == 0)
1370
- return ct + e.slice(2);
1581
+ return mt + e.slice(2);
1371
1582
  if (t) {
1372
1583
  let s = this.options.alias[e];
1373
1584
  if (!s) {
@@ -1381,10 +1592,10 @@ class jn {
1381
1592
  }
1382
1593
  return this.parserPath(s, !1);
1383
1594
  }
1384
- return ct + e;
1595
+ return mt + e;
1385
1596
  }
1386
1597
  }
1387
- function Fr(r, e) {
1598
+ function jr(r, e) {
1388
1599
  let t = r.sheet, n = !1;
1389
1600
  if (e.isOldWebKit)
1390
1601
  t && (n = !0);
@@ -1395,10 +1606,10 @@ function Fr(r, e) {
1395
1606
  s.name === "NS_ERROR_DOM_SECURITY_ERR" && (n = !0);
1396
1607
  }
1397
1608
  setTimeout(() => {
1398
- e.time += 20, n ? e.success() : e.time > e.timeout ? e.error() : Fr(r, e);
1609
+ e.time += 20, n ? e.success() : e.time > e.timeout ? e.error() : jr(r, e);
1399
1610
  }, 20);
1400
1611
  }
1401
- class _n {
1612
+ class Nn {
1402
1613
  callback;
1403
1614
  values;
1404
1615
  status;
@@ -1419,7 +1630,7 @@ class _n {
1419
1630
  return this.status;
1420
1631
  }
1421
1632
  }
1422
- class $n {
1633
+ class Dn {
1423
1634
  index;
1424
1635
  src;
1425
1636
  params;
@@ -1429,18 +1640,18 @@ class $n {
1429
1640
  }
1430
1641
  }
1431
1642
  const be = Symbol("_notifyChange");
1432
- class qn {
1643
+ class Hn {
1433
1644
  currentRoute;
1434
1645
  routes;
1435
1646
  constructor(e, t) {
1436
1647
  this.currentRoute = e, this.routes = t;
1437
1648
  }
1438
1649
  }
1439
- const Ne = Symbol("ignoreHistoryChangeOnceKey"), tr = Symbol("_navigateFirstRoute"), De = Symbol("_getRouteMark"), rr = Symbol("_getUrlSearch"), dt = Symbol("_generateLocation"), Fe = Symbol("_setRouteMarkRecorder"), nr = "Symbol(_fox_restore_point)";
1440
- function yt(r, ...e) {
1650
+ const Ne = Symbol("ignoreHistoryChangeOnceKey"), or = Symbol("_navigateFirstRoute"), De = Symbol("_getRouteMark"), lr = Symbol("_getUrlSearch"), vt = Symbol("_generateLocation"), Te = Symbol("_setRouteMarkRecorder"), ar = "Symbol(_fox_restore_point)";
1651
+ function gt(r, ...e) {
1441
1652
  return typeof r == "function" ? Reflect.apply(r, null, [...e]) : r;
1442
1653
  }
1443
- class Tr {
1654
+ class _r {
1444
1655
  base;
1445
1656
  storage;
1446
1657
  mode;
@@ -1461,29 +1672,29 @@ class Tr {
1461
1672
  this[Ne] = !1;
1462
1673
  return;
1463
1674
  }
1464
- if (yt(this.historyMonitor)) {
1675
+ if (gt(this.historyMonitor)) {
1465
1676
  const n = t.history.state;
1466
1677
  this[be](n);
1467
1678
  try {
1468
1679
  let s = [];
1469
1680
  if (typeof n == "string" ? s = JSON.parse(n) : s = n, Array.isArray(s) && s.length > 0) {
1470
1681
  const i = this[De]() ?? "/";
1471
- this[Fe](i, s);
1682
+ this[Te](i, s);
1472
1683
  }
1473
1684
  } catch {
1474
1685
  }
1475
1686
  }
1476
- }), qt(t, "popstate", this.historyChange), this.firstNavigate && e && this[tr](), Promise.resolve();
1687
+ }), Mt(t, "popstate", this.historyChange), this.firstNavigate && e && this[or](), Promise.resolve();
1477
1688
  }
1478
1689
  destroy() {
1479
1690
  if (this.historyChange) {
1480
1691
  const e = I();
1481
- Ot(e, "popstate", this.historyChange);
1692
+ It(e, "popstate", this.historyChange);
1482
1693
  }
1483
1694
  }
1484
- [tr]() {
1695
+ [or]() {
1485
1696
  let e = this[De]() ?? "/";
1486
- const t = this.storage.getItem(nr);
1697
+ const t = this.storage.getItem(ar);
1487
1698
  if (t)
1488
1699
  try {
1489
1700
  const o = JSON.parse(t);
@@ -1497,22 +1708,22 @@ class Tr {
1497
1708
  let s;
1498
1709
  n != -1 ? s = e.substring(n + 1) : s = e;
1499
1710
  const i = new q();
1500
- i.path = s, i.query = this[rr](), this[be]([i]);
1711
+ i.path = s, i.query = this[lr](), this[be]([i]);
1501
1712
  }
1502
- [Fe](e, t) {
1713
+ [Te](e, t) {
1503
1714
  try {
1504
1715
  const n = {
1505
1716
  mark: e,
1506
1717
  routes: t
1507
1718
  }, s = JSON.stringify(n);
1508
- this.storage.setItem(nr, s);
1719
+ this.storage.setItem(ar, s);
1509
1720
  } catch (n) {
1510
1721
  console.error(n.message, n);
1511
1722
  }
1512
1723
  }
1513
1724
  setRestorePoint(e) {
1514
1725
  const t = this[De]() ?? "/";
1515
- this[Fe](t, e);
1726
+ this[Te](t, e);
1516
1727
  }
1517
1728
  [be](e) {
1518
1729
  typeof this.changeHandler == "function" && this.changeHandler(e);
@@ -1529,7 +1740,7 @@ class Tr {
1529
1740
  }
1530
1741
  return null;
1531
1742
  }
1532
- [rr]() {
1743
+ [lr]() {
1533
1744
  return I().location.search;
1534
1745
  }
1535
1746
  listen(e) {
@@ -1540,14 +1751,14 @@ class Tr {
1540
1751
  this[Ne] = !t, n.history.go(e);
1541
1752
  }
1542
1753
  push(e) {
1543
- let t = this[dt](e.currentRoute);
1544
- yt(this.traceless, e.currentRoute) || I().history.pushState(e.routes, "", t), this[Fe](e.currentRoute.fullPath, e.routes);
1754
+ let t = this[vt](e.currentRoute);
1755
+ gt(this.traceless, e.currentRoute) || I().history.pushState(e.routes, "", t), this[Te](e.currentRoute.fullPath, e.routes);
1545
1756
  }
1546
1757
  replace(e) {
1547
- let t = this[dt](e.currentRoute);
1548
- yt(this.traceless, e.currentRoute) || I().history.replaceState(e.routes, "", t), this[Fe](e.currentRoute.fullPath, e.routes);
1758
+ let t = this[vt](e.currentRoute);
1759
+ gt(this.traceless, e.currentRoute) || I().history.replaceState(e.routes, "", t), this[Te](e.currentRoute.fullPath, e.routes);
1549
1760
  }
1550
- [dt](e) {
1761
+ [vt](e) {
1551
1762
  const t = I();
1552
1763
  let n = "";
1553
1764
  if (e.query) {
@@ -1568,13 +1779,13 @@ class Tr {
1568
1779
  return n ? this.mode == "path" ? o = `${this.base}/${i}${n}` : o = `${s.pathname}${n}#${i}` : this.mode == "path" ? o = `${this.base}/${i}` : o = `${s.pathname}#${i}`, `${s.origin}${o}`;
1569
1780
  }
1570
1781
  }
1571
- function Ai(r = !0, e = null, t = "", n = !0, s = !1, i) {
1572
- return e !== null && (e = I().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new Tr("path", e ?? "", t, r, n, s, i);
1782
+ function Fi(r = !0, e = null, t = "", n = !0, s = !1, i) {
1783
+ return e !== null && (e = I().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new _r("path", e ?? "", t, r, n, s, i);
1573
1784
  }
1574
- function On(r = !0, e = "", t = !0, n = !1, s) {
1575
- return new Tr("hash", "", e, r, t, n, s);
1785
+ function Un(r = !0, e = "", t = !0, n = !1, s) {
1786
+ return new _r("hash", "", e, r, t, n, s);
1576
1787
  }
1577
- class Ln {
1788
+ class Vn {
1578
1789
  maxSize = 50;
1579
1790
  cursor = -1;
1580
1791
  queue = [];
@@ -1616,14 +1827,14 @@ class Ln {
1616
1827
  setRestorePoint(e) {
1617
1828
  }
1618
1829
  }
1619
- function Mn(r = "", e = 50) {
1620
- return new Ln(r, e);
1830
+ function Bn(r = "", e = 50) {
1831
+ return new Vn(r, e);
1621
1832
  }
1622
- const He = Symbol("_constructRouteModel"), Ue = Symbol("_findRouteModel"), pt = Symbol("_findRootView"), ir = Symbol("_getFirstView"), oe = Symbol("_removeView"), sr = Symbol("_buildPage"), or = Symbol("_resolveComponent"), lr = Symbol("_update"), ne = Symbol("_merge"), mt = Symbol("_handleHistoryChange"), Ve = Symbol("_handleRouteUpdated"), Be = Symbol("routeUpdatedCallback"), g = Symbol("currentRoutes"), de = Symbol("current"), ar = Symbol("_addRouteRecorder"), ye = Symbol("_removeRouteRecorder"), vt = Symbol("_cloneRouteRecorder"), $ = Symbol("_handleError"), ke = Symbol("errorCallback"), U = Symbol("registerKey"), We = Symbol("notFoundKey"), gt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), E = Symbol("historyKey"), Te = Symbol("beforeFiltersKey"), Ke = Symbol("afterFiltersKey"), je = Symbol("destroyFiltersKey"), pe = Symbol("mainDispatcherKey"), wt = Symbol("initKey"), ze = Symbol("requireKey"), le = Symbol("readyKey"), bt = Symbol("readyHandlersKey"), Je = Symbol("_markReady"), ur = Symbol("_createNextFn"), xt = Symbol("_start"), Rt = Symbol("_before"), St = Symbol("_after"), fr = Symbol("_destroy"), Ct = Symbol("_load"), _e = Symbol("_unload"), Pt = Symbol("_loadDependency"), At = Symbol("resolvedModulesKey"), $e = Symbol("resolveDependencyKey"), qe = Symbol("routerGuardKey");
1623
- function In(r) {
1833
+ const He = Symbol("_constructRouteModel"), Ue = Symbol("_findRouteModel"), wt = Symbol("_findRootView"), ur = Symbol("_getFirstView"), oe = Symbol("_removeView"), fr = Symbol("_buildPage"), cr = Symbol("_resolveComponent"), hr = Symbol("_update"), ne = Symbol("_merge"), bt = Symbol("_handleHistoryChange"), Ve = Symbol("_handleRouteUpdated"), Be = Symbol("routeUpdatedCallback"), g = Symbol("currentRoutes"), ye = Symbol("current"), dr = Symbol("_addRouteRecorder"), pe = Symbol("_removeRouteRecorder"), xt = Symbol("_cloneRouteRecorder"), $ = Symbol("_handleError"), ke = Symbol("errorCallback"), U = Symbol("registerKey"), We = Symbol("notFoundKey"), Rt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), E = Symbol("historyKey"), Ke = Symbol("beforeFiltersKey"), je = Symbol("afterFiltersKey"), _e = Symbol("destroyFiltersKey"), me = Symbol("mainDispatcherKey"), St = Symbol("initKey"), ze = Symbol("requireKey"), le = Symbol("readyKey"), Ct = Symbol("readyHandlersKey"), Je = Symbol("_markReady"), yr = Symbol("_createNextFn"), Pt = Symbol("_start"), At = Symbol("_before"), Et = Symbol("_after"), pr = Symbol("_destroy"), Ft = Symbol("_load"), $e = Symbol("_unload"), Tt = Symbol("_loadDependency"), Kt = Symbol("resolvedModulesKey"), qe = Symbol("resolveDependencyKey"), Oe = Symbol("routerGuardKey");
1834
+ function kn(r) {
1624
1835
  return r.layers.length == 0 || r.layers[0].views.length == 0;
1625
1836
  }
1626
- function Nn(r) {
1837
+ function Wn(r) {
1627
1838
  let e = [];
1628
1839
  return r.layers.forEach((t) => {
1629
1840
  t.models == null || t.models == null || t.models.forEach((n) => {
@@ -1636,45 +1847,45 @@ function Nn(r) {
1636
1847
  });
1637
1848
  }), e;
1638
1849
  }
1639
- class Dn {
1850
+ class zn {
1640
1851
  [U] = new Array();
1641
1852
  [We];
1642
- [gt] = "*";
1853
+ [Rt] = "*";
1643
1854
  [le] = !1;
1644
- [bt] = [];
1645
- [V] = new bn();
1855
+ [Ct] = [];
1856
+ [V] = new Kn();
1646
1857
  [E];
1647
1858
  [g] = new Array();
1648
1859
  [ke] = null;
1649
1860
  [Be] = null;
1650
- [Te] = new Array();
1651
1861
  [Ke] = new Array();
1652
1862
  [je] = new Array();
1653
- [pe] = new tt();
1654
- [At] = /* @__PURE__ */ new Map();
1655
- [$e] = null;
1656
- [qe] = new Rn();
1657
- [wt] = !1;
1658
- [de] = mr(null);
1863
+ [_e] = new Array();
1864
+ [me] = new tt();
1865
+ [Kt] = /* @__PURE__ */ new Map();
1866
+ [qe] = null;
1867
+ [Oe] = new _n();
1868
+ [St] = !1;
1869
+ [ye] = mr(null);
1659
1870
  [ze] = null;
1660
1871
  get require() {
1661
- return xe ? (this[ze] || (this[ze] = new jn()), this[ze]) : null;
1872
+ return xe ? (this[ze] || (this[ze] = new In()), this[ze]) : null;
1662
1873
  }
1663
1874
  get current() {
1664
- return this[de].value;
1875
+ return this[ye].value;
1665
1876
  }
1666
1877
  options;
1667
1878
  constructor(e) {
1668
1879
  this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
1669
1880
  let t = this.options.routes || [];
1670
- this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[E] = e.history : this[E] = xe ? On() : Mn(), this[E]?.listen(async (n) => {
1881
+ this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[E] = e.history : this[E] = xe ? Un() : Bn(), this[E]?.listen(async (n) => {
1671
1882
  let s = !0;
1672
1883
  try {
1673
1884
  if (typeof n == "string") {
1674
1885
  let i = this[M](n);
1675
- i && await this[mt]([i]);
1886
+ i && await this[bt]([i]);
1676
1887
  } else
1677
- await this[mt](n);
1888
+ await this[bt](n);
1678
1889
  } catch (i) {
1679
1890
  console.error(i.message, i), s = !1;
1680
1891
  }
@@ -1695,15 +1906,15 @@ class Dn {
1695
1906
  console.error(e);
1696
1907
  }
1697
1908
  init() {
1698
- this[wt] !== !0 && (this[E]?.init(!this[le]), this[wt] = !0);
1909
+ this[St] !== !0 && (this[E]?.init(!this[le]), this[St] = !0);
1699
1910
  }
1700
1911
  isReady() {
1701
1912
  return this[le] ? Promise.resolve() : new Promise((e, t) => {
1702
- this[bt].push([e, t]);
1913
+ this[Ct].push([e, t]);
1703
1914
  });
1704
1915
  }
1705
1916
  [Je](e) {
1706
- this[le] = !0, this[bt].forEach(([t, n]) => {
1917
+ this[le] = !0, this[Ct].forEach(([t, n]) => {
1707
1918
  try {
1708
1919
  e ? t() : n();
1709
1920
  } catch (s) {
@@ -1711,11 +1922,11 @@ class Dn {
1711
1922
  }
1712
1923
  });
1713
1924
  }
1714
- [mt](e) {
1925
+ [bt](e) {
1715
1926
  try {
1716
1927
  if (!e) {
1717
1928
  let o = [...this[g]].reverse();
1718
- return this[_e](o), xe && I().location.reload(), Promise.resolve();
1929
+ return this[$e](o), xe && I().location.reload(), Promise.resolve();
1719
1930
  }
1720
1931
  let t = null, n = [], s = [], i = 0;
1721
1932
  for (; i < e.length && i < this[g].length && q.isSame(e[i], this[g][i]); i++)
@@ -1724,7 +1935,7 @@ class Dn {
1724
1935
  if (t !== null)
1725
1936
  return this.restore([t]);
1726
1937
  } else if (s.length > 0) {
1727
- if (this[_e](s)) {
1938
+ if (this[$e](s)) {
1728
1939
  if (n.length > 0)
1729
1940
  return this.restore(n);
1730
1941
  if (t !== null)
@@ -1739,21 +1950,21 @@ class Dn {
1739
1950
  }
1740
1951
  [Ve](e) {
1741
1952
  if (e)
1742
- this[de].value = e;
1953
+ this[ye].value = e;
1743
1954
  else {
1744
1955
  let t = this[g].length;
1745
- t > 0 ? this[de].value = this[g][t - 1] : this[de].value = null;
1956
+ t > 0 ? this[ye].value = this[g][t - 1] : this[ye].value = null;
1746
1957
  }
1747
1958
  if (typeof this[Be] == "function")
1748
1959
  try {
1749
- this[Be](this[de].value);
1960
+ this[Be](this[ye].value);
1750
1961
  } catch {
1751
1962
  }
1752
1963
  }
1753
- [ar](e, t = -1) {
1964
+ [dr](e, t = -1) {
1754
1965
  t < 0 || t >= this[g].length ? this[g].push(e) : this[g].splice(t, 0, e);
1755
1966
  }
1756
- [vt]() {
1967
+ [xt]() {
1757
1968
  let e = [];
1758
1969
  for (let t of this[g]) {
1759
1970
  let n = q.clone(t, !0);
@@ -1761,7 +1972,7 @@ class Dn {
1761
1972
  }
1762
1973
  return e;
1763
1974
  }
1764
- [ye](e) {
1975
+ [pe](e) {
1765
1976
  if (this[g] == null)
1766
1977
  return;
1767
1978
  let t = -1;
@@ -1772,7 +1983,7 @@ class Dn {
1772
1983
  }
1773
1984
  if (t != -1) {
1774
1985
  let n = this[g][t];
1775
- this[g].splice(t, 1), this[fr](n, n.session);
1986
+ this[g].splice(t, 1), this[pr](n, n.session);
1776
1987
  }
1777
1988
  }
1778
1989
  set historyMonitor(e) {
@@ -1788,7 +1999,7 @@ class Dn {
1788
1999
  return this[E] ? this[E].traceless : !1;
1789
2000
  }
1790
2001
  setRestorePoint() {
1791
- const e = this[vt]();
2002
+ const e = this[xt]();
1792
2003
  this[E]?.setRestorePoint(e);
1793
2004
  }
1794
2005
  onRouteUpdated(e) {
@@ -1798,35 +2009,35 @@ class Dn {
1798
2009
  this[ke] = e;
1799
2010
  }
1800
2011
  beforeEach(e) {
1801
- this[Te].push(e);
2012
+ this[Ke].push(e);
1802
2013
  }
1803
2014
  removeBeforeEach(e) {
1804
- const t = this[Te].indexOf(e);
1805
- return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
2015
+ const t = this[Ke].indexOf(e);
2016
+ return t !== -1 ? (this[Ke].splice(t, 1), !0) : !1;
1806
2017
  }
1807
2018
  afterEach(e) {
1808
- this[Ke].push(e);
2019
+ this[je].push(e);
1809
2020
  }
1810
2021
  removeAfterEach(e) {
1811
- const t = this[Ke].indexOf(e);
1812
- return t !== -1 ? (this[Ke].splice(t, 1), !0) : !1;
2022
+ const t = this[je].indexOf(e);
2023
+ return t !== -1 ? (this[je].splice(t, 1), !0) : !1;
1813
2024
  }
1814
2025
  destroyEach(e) {
1815
- this[je].push(e);
2026
+ this[_e].push(e);
1816
2027
  }
1817
2028
  removeDestroyEach(e) {
1818
- const t = this[je].indexOf(e);
1819
- return t !== -1 ? (this[je].splice(t, 1), !0) : !1;
2029
+ const t = this[_e].indexOf(e);
2030
+ return t !== -1 ? (this[_e].splice(t, 1), !0) : !1;
1820
2031
  }
1821
2032
  setResolveDependency(e) {
1822
- this[$e] = e;
2033
+ this[qe] = e;
1823
2034
  }
1824
2035
  addRoutes(e) {
1825
2036
  for (let t of e)
1826
2037
  this.addRoute(t);
1827
2038
  }
1828
2039
  addRoute(e, t = -1) {
1829
- if (e.path === this[gt]) {
2040
+ if (e.path === this[Rt]) {
1830
2041
  this.setNotFoundRoute(e);
1831
2042
  return;
1832
2043
  }
@@ -1858,7 +2069,7 @@ class Dn {
1858
2069
  }) !== -1;
1859
2070
  }
1860
2071
  setNotFoundPath(e) {
1861
- this[gt] = e;
2072
+ this[Rt] = e;
1862
2073
  }
1863
2074
  setNotFoundRoute(e) {
1864
2075
  const t = this[He](e);
@@ -1879,7 +2090,7 @@ class Dn {
1879
2090
  for (let l in n) {
1880
2091
  let a = n[l];
1881
2092
  l.length === 0 && (l = Z);
1882
- let f = new wn(l, a, e.props, e.meta);
2093
+ let f = new fn(l, a, e.props, e.meta);
1883
2094
  s.push(f);
1884
2095
  }
1885
2096
  let i = !1, o = [];
@@ -1907,7 +2118,7 @@ class Dn {
1907
2118
  for (let n of this[U])
1908
2119
  if (t.path && n.path) {
1909
2120
  let s = n.match;
1910
- s || (s = n.match = cn(n.path));
2121
+ s || (s = n.match = Cn(n.path));
1911
2122
  let i = s(t.path);
1912
2123
  if (!i)
1913
2124
  continue;
@@ -1938,7 +2149,7 @@ class Dn {
1938
2149
  return e.find = n, !0;
1939
2150
  } else if (t.name === n.name) {
1940
2151
  t.params = t.params ?? {};
1941
- let s = un(n.path);
2152
+ let s = Rn(n.path);
1942
2153
  return t.path = s(t.params), e.find = n, !0;
1943
2154
  }
1944
2155
  } catch (n) {
@@ -1983,7 +2194,7 @@ class Dn {
1983
2194
  }
1984
2195
  remove(e) {
1985
2196
  return new Promise((t) => {
1986
- this[pe].post((n) => {
2197
+ this[me].post((n) => {
1987
2198
  try {
1988
2199
  if (this[g].length === 0) {
1989
2200
  n.resolve(), t(!1);
@@ -2012,7 +2223,7 @@ class Dn {
2012
2223
  }
2013
2224
  } else {
2014
2225
  i = Z;
2015
- let a = this[ir](this[V]);
2226
+ let a = this[ur](this[V]);
2016
2227
  a && (i = a.name);
2017
2228
  for (let f = this[g].length - 1; f > 0; f--) {
2018
2229
  let u = this[g][f];
@@ -2030,7 +2241,7 @@ class Dn {
2030
2241
  let l = 0;
2031
2242
  if (this[g].forEach((a) => {
2032
2243
  a.opsType !== P.Put && l++;
2033
- }), this[_e](o)) {
2244
+ }), this[$e](o)) {
2034
2245
  let a = 0;
2035
2246
  this[g].forEach((u) => {
2036
2247
  u.opsType !== P.Put && a++;
@@ -2049,7 +2260,7 @@ class Dn {
2049
2260
  return t ? (t.opsType = P.Open, this.to(t)) : (this[$]("resolve route fail", t), this);
2050
2261
  }
2051
2262
  close(e) {
2052
- return this[pe].post((t) => {
2263
+ return this[me].post((t) => {
2053
2264
  try {
2054
2265
  let n = this[M](e);
2055
2266
  if (!n) {
@@ -2077,7 +2288,7 @@ class Dn {
2077
2288
  t.resolve();
2078
2289
  return;
2079
2290
  }
2080
- this[_e](s) && this[Ve](), t.resolve();
2291
+ this[$e](s) && this[Ve](), t.resolve();
2081
2292
  } catch (n) {
2082
2293
  this[$](n), t.resolve();
2083
2294
  }
@@ -2088,21 +2299,21 @@ class Dn {
2088
2299
  if (!t)
2089
2300
  return this[$]("resolve route fail", t), this;
2090
2301
  console.debug("route to", t.path, t.root);
2091
- let n = this[qe].acquire(t);
2092
- return n == null ? (this[$]("route forbid", t), this) : (this[pe].post((s) => {
2302
+ let n = this[Oe].acquire(t);
2303
+ return n == null ? (this[$]("route forbid", t), this) : (this[me].post((s) => {
2093
2304
  try {
2094
- let i = this[xt](t);
2095
- this[Rt](i), !i.session?.routeModel && this[$e] && this[Pt](i), this[Ct](i), this[St](i), i.wait(
2305
+ let i = this[Pt](t);
2306
+ this[At](i), !i.session?.routeModel && this[qe] && this[Tt](i), this[Ft](i), this[Et](i), i.wait(
2096
2307
  (o, l) => {
2097
2308
  let a = o.session.to;
2098
2309
  try {
2099
2310
  let f = q.clone(a, !0);
2100
- const u = new qn(f, this[vt]());
2311
+ const u = new Hn(f, this[xt]());
2101
2312
  a.opsType === P.Replace ? this[E]?.replace(u) : this[E]?.push(u);
2102
2313
  } catch (f) {
2103
2314
  console.error(f.message, f);
2104
2315
  }
2105
- if (this[qe].release(n), this[Ve](a), typeof t.success == "function")
2316
+ if (this[Oe].release(n), this[Ve](a), typeof t.success == "function")
2106
2317
  try {
2107
2318
  Reflect.apply(t.success, {}, []);
2108
2319
  } catch (f) {
@@ -2111,18 +2322,18 @@ class Dn {
2111
2322
  this[le] === !1 && this[Je](!0), s.resolve();
2112
2323
  },
2113
2324
  (o, l) => {
2114
- this[qe].release(n), l !== null && this[$](l, t), this[le] === !1 && this[Je](!1), s.resolve();
2325
+ this[Oe].release(n), l !== null && this[$](l, t), this[le] === !1 && this[Je](!1), s.resolve();
2115
2326
  }
2116
2327
  );
2117
2328
  } catch (i) {
2118
- this[qe].release(n), this[$](i, t), s.resolve();
2329
+ this[Oe].release(n), this[$](i, t), s.resolve();
2119
2330
  }
2120
2331
  }), this);
2121
2332
  }
2122
2333
  back(e = 1) {
2123
2334
  this[E]?.go(-e);
2124
2335
  }
2125
- [ur](e) {
2336
+ [yr](e) {
2126
2337
  return (t, n) => {
2127
2338
  if (typeof t == "boolean")
2128
2339
  t ? e.resolve() : e.reject(n ?? null);
@@ -2137,23 +2348,23 @@ class Dn {
2137
2348
  e.resolve();
2138
2349
  };
2139
2350
  }
2140
- [xt](e) {
2351
+ [Pt](e) {
2141
2352
  let t = this[g].length > 0 ? this[g][0] : void 0, n = new et(e, t), s = {
2142
2353
  route: e,
2143
2354
  find: null
2144
2355
  };
2145
- return this[Ue](s), s.find && (n.routeModel = s.find, e.matched = Nn(s.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = s.find.layers[0].models[0].meta)), new tt(n);
2356
+ return this[Ue](s), s.find && (n.routeModel = s.find, e.matched = Wn(s.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = s.find.layers[0].models[0].meta)), new tt(n);
2146
2357
  }
2147
- [Rt](e) {
2148
- for (let t of this[Te])
2358
+ [At](e) {
2359
+ for (let t of this[Ke])
2149
2360
  e.post((n) => {
2150
- let s = this[ur](n);
2361
+ let s = this[yr](n);
2151
2362
  Reflect.apply(t, {}, [n.session.to, n.session.from, s, n.session]);
2152
2363
  });
2153
2364
  }
2154
- [St](e) {
2365
+ [Et](e) {
2155
2366
  e.post((t) => {
2156
- for (let n of this[Ke])
2367
+ for (let n of this[je])
2157
2368
  try {
2158
2369
  Reflect.apply(n, {}, [t.session.to, t.session.from, t.session]);
2159
2370
  } catch (s) {
@@ -2162,8 +2373,8 @@ class Dn {
2162
2373
  t.resolve();
2163
2374
  });
2164
2375
  }
2165
- [fr](e, t) {
2166
- for (let n of this[je])
2376
+ [pr](e, t) {
2377
+ for (let n of this[_e])
2167
2378
  try {
2168
2379
  Reflect.apply(n, {}, [e, t]);
2169
2380
  } catch (s) {
@@ -2171,14 +2382,14 @@ class Dn {
2171
2382
  }
2172
2383
  typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
2173
2384
  }
2174
- [Pt](e) {
2175
- let t = e.session, n = Reflect.apply(this[$e], this, [t?.to]);
2385
+ [Tt](e) {
2386
+ let t = e.session, n = Reflect.apply(this[qe], this, [t?.to]);
2176
2387
  if (n == null)
2177
2388
  return;
2178
2389
  Array.isArray(n) || (n = [n]);
2179
2390
  let s = [];
2180
2391
  for (let i of n)
2181
- this[At].has(i) || s.push(i);
2392
+ this[Kt].has(i) || s.push(i);
2182
2393
  s.length !== 0 && e.post((i) => {
2183
2394
  this.require.ensure(s, (...o) => {
2184
2395
  if (!o) {
@@ -2192,12 +2403,12 @@ class Dn {
2192
2403
  gr(l) ? a = l.default : a = l, Array.isArray(a) && this.addRoutes(a);
2193
2404
  }
2194
2405
  for (let l of s)
2195
- this[At].set(l, !0);
2406
+ this[Kt].set(l, !0);
2196
2407
  i.resolve();
2197
2408
  });
2198
2409
  });
2199
2410
  }
2200
- [Ct](e) {
2411
+ [Ft](e) {
2201
2412
  e.post((t) => {
2202
2413
  let n = t.session.to, s = t.session.routeModel;
2203
2414
  if (s == null) {
@@ -2215,7 +2426,7 @@ class Dn {
2215
2426
  }
2216
2427
  }
2217
2428
  let i = et.from(t.session);
2218
- this[sr](n, s, i).then(
2429
+ this[fr](n, s, i).then(
2219
2430
  (o) => {
2220
2431
  this[V], t.resolve();
2221
2432
  },
@@ -2225,12 +2436,12 @@ class Dn {
2225
2436
  );
2226
2437
  });
2227
2438
  }
2228
- [_e](e) {
2439
+ [$e](e) {
2229
2440
  if (e.length == 0)
2230
2441
  return !0;
2231
2442
  let t = this[V], n = [];
2232
2443
  for (let s of e) {
2233
- let i = this[pt](t, s);
2444
+ let i = this[wt](t, s);
2234
2445
  i != null && n.push({
2235
2446
  ...i,
2236
2447
  route: s
@@ -2244,19 +2455,19 @@ class Dn {
2244
2455
  this[oe](t, { x: s.x, y: s.y }, [s.route.index ?? 0], !0);
2245
2456
  return !0;
2246
2457
  }
2247
- [pt](e, t) {
2458
+ [wt](e, t) {
2248
2459
  let n = t.root ?? Z, s;
2249
2460
  for (let i = 0; i < e.layers.length; i++) {
2250
2461
  let o = e.layers[i];
2251
2462
  for (let l = o.views.length - 1; l >= 0; l--) {
2252
2463
  let a = o.views[l];
2253
- if (a[J] && a[Qe] === n)
2464
+ if (a[J] && a[Xe] === n)
2254
2465
  return s = { x: l, y: i }, s;
2255
2466
  }
2256
2467
  }
2257
2468
  return null;
2258
2469
  }
2259
- [ir](e) {
2470
+ [ur](e) {
2260
2471
  return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
2261
2472
  }
2262
2473
  [oe](e, t, n = null, s = !0) {
@@ -2265,7 +2476,7 @@ class Dn {
2265
2476
  let i = e.layers[t.y].views[t.x], o = !1, l = [], a = !1, f = i.slots.value;
2266
2477
  for (let c = f.length - 1; c >= 0; c--) {
2267
2478
  let h = f[c];
2268
- (n == null || n.indexOf(h.index) != -1) && (h.route && i[J] && (this[ye](h.route), h.active === !0 && h.route.opsType == P.Append && (a = !0)), l.push(new D(i, h.index, t.y)), f.splice(c, 1));
2479
+ (n == null || n.indexOf(h.index) != -1) && (h.route && i[J] && (this[pe](h.route), h.active === !0 && h.route.opsType == P.Append && (a = !0)), l.push(new H(i, h.index, t.y)), f.splice(c, 1));
2269
2480
  }
2270
2481
  if (f.length == 0)
2271
2482
  s ? i.slots.value = [...f] : e.layers[t.y].views.splice(t.x, 1);
@@ -2282,11 +2493,11 @@ class Dn {
2282
2493
  let c = e.layers[u].views, h = [];
2283
2494
  for (let d = c.length - 1; (o || l.length > 0) && d >= 0; d--) {
2284
2495
  let y = c[d];
2285
- if (y[ue] && (o || D.include(l, y[ue]))) {
2496
+ if (y[ue] && (o || H.include(l, y[ue]))) {
2286
2497
  let v = y.slots.value;
2287
2498
  for (let p = v.length - 1; p >= 0; p--) {
2288
2499
  let m = v[p];
2289
- m.route && y[J] && this[ye](m.route), h.push(new D(y, m.index, u)), v.splice(p, 1);
2500
+ m.route && y[J] && this[pe](m.route), h.push(new H(y, m.index, u)), v.splice(p, 1);
2290
2501
  }
2291
2502
  e.layers[u].views.splice(d, 1);
2292
2503
  }
@@ -2306,9 +2517,9 @@ class Dn {
2306
2517
  return new Promise((n, s) => {
2307
2518
  for (let i = 0; i < e.length; i++) {
2308
2519
  let o = e[i];
2309
- this[pe].post((l) => {
2310
- let a = this[xt](o);
2311
- this[Rt](a), !a.session?.routeModel && this[$e] && this[Pt](a), this[Ct](a), this[St](a), a.wait(
2520
+ this[me].post((l) => {
2521
+ let a = this[Pt](o);
2522
+ this[At](a), !a.session?.routeModel && this[qe] && this[Tt](a), this[Ft](a), this[Et](a), a.wait(
2312
2523
  (f, u) => {
2313
2524
  l.resolve();
2314
2525
  },
@@ -2318,18 +2529,18 @@ class Dn {
2318
2529
  );
2319
2530
  });
2320
2531
  }
2321
- this[pe].post((i) => {
2532
+ this[me].post((i) => {
2322
2533
  i.resolve(), n();
2323
2534
  });
2324
2535
  });
2325
2536
  }
2326
- [sr](e, t, n) {
2327
- let s = e.updateType ?? Ge.Part;
2328
- return this[or](t).then(() => {
2329
- this[lr](t, e, n, s);
2537
+ [fr](e, t, n) {
2538
+ let s = e.updateType ?? Qe.Part;
2539
+ return this[cr](t).then(() => {
2540
+ this[hr](t, e, n, s);
2330
2541
  });
2331
2542
  }
2332
- [or](e) {
2543
+ [cr](e) {
2333
2544
  let t = [];
2334
2545
  for (let n = 0; n < e.layers.length; n++) {
2335
2546
  let s = e.layers[n];
@@ -2340,18 +2551,18 @@ class Dn {
2340
2551
  }
2341
2552
  return t.length > 0 ? Promise.all(t) : Promise.resolve();
2342
2553
  }
2343
- [lr](e, t, n, s) {
2554
+ [hr](e, t, n, s) {
2344
2555
  if (e.layers[0].models.length !== 1)
2345
2556
  return Promise.reject("illegal route structure(multil root node)");
2346
2557
  const i = e.layers[0].models[0];
2347
- let o = this[V], l = In(o), a = t.root ?? Z, f;
2348
- !l && s == Ge.Part && (f = this[pt](o, t));
2558
+ let o = this[V], l = kn(o), a = t.root ?? Z, f;
2559
+ !l && s == Qe.Part && (f = this[wt](o, t));
2349
2560
  let u, c = 0;
2350
2561
  if (f == null || f == null)
2351
- if (l || s === Ge.All) {
2352
- if (o.layers.length == 0 && (o.layers[0] = new ft()), o.layers[0].views.length == 0) {
2562
+ if (l || s === Qe.All) {
2563
+ if (o.layers.length == 0 && (o.layers[0] = new pt()), o.layers[0].views.length == 0) {
2353
2564
  let h = t.root ?? Z;
2354
- u = new Pe(h, !0, null), o.layers[0].views = [u];
2565
+ u = new Ee(h, !0, null), o.layers[0].views = [u];
2355
2566
  } else
2356
2567
  u = o.layers[0].views[0];
2357
2568
  f = { x: 0, y: 0 };
@@ -2367,7 +2578,7 @@ class Dn {
2367
2578
  let v = o.layers[d - 1];
2368
2579
  for (let p of v.views) {
2369
2580
  if (p[J] && p.name === h.rootName) {
2370
- y = new D(p, h.rootIndex ?? 0, d - 1);
2581
+ y = new H(p, h.rootIndex ?? 0, d - 1);
2371
2582
  break;
2372
2583
  }
2373
2584
  if (p[z] && p[z].view.name === h.rootName && p[z].index === h.rootIndex) {
@@ -2378,7 +2589,7 @@ class Dn {
2378
2589
  }
2379
2590
  if (!y)
2380
2591
  return Promise.reject("can not insert view(not find root node ref)");
2381
- u = new Pe(a, !0, y), o.layers[d].views.push(u), f = { x: o.layers[d].views.length - 1, y: d };
2592
+ u = new Ee(a, !0, y), o.layers[d].views.push(u), f = { x: o.layers[d].views.length - 1, y: d };
2382
2593
  }
2383
2594
  else
2384
2595
  u = o.layers[f.y].views[f.x];
@@ -2391,7 +2602,7 @@ class Dn {
2391
2602
  }
2392
2603
  let d = new re(t, i, t.index, !0);
2393
2604
  u.slots.value = [...h, d];
2394
- let y = c + 1, v = 1, p = new D(u, t.index, c);
2605
+ let y = c + 1, v = 1, p = new H(u, t.index, c);
2395
2606
  this[ne](o, y, e, v, p);
2396
2607
  } else if (t.opsType === P.Open) {
2397
2608
  let h = u.slots.value, d = !1;
@@ -2399,7 +2610,7 @@ class Dn {
2399
2610
  if (y.route !== null && q.isSameForRouteModel(y.route, t)) {
2400
2611
  if (y.active == !0)
2401
2612
  return t.index = y.index, t.active = y.active, y.route = t, Promise.resolve();
2402
- y.active = !0, d = !0, t.index = y.index, t.active = y.active, y.route = t, this[ye](y.route);
2613
+ y.active = !0, d = !0, t.index = y.index, t.active = y.active, y.route = t, this[pe](y.route);
2403
2614
  } else
2404
2615
  y.active = !1;
2405
2616
  y.route && (y.route.active = y.active);
@@ -2408,7 +2619,7 @@ class Dn {
2408
2619
  t.index = ee.get(), t.active = !0;
2409
2620
  let y = new re(t, i, t.index, !0);
2410
2621
  h.push(y);
2411
- let v = c + 1, p = 1, m = new D(u, t.index, c);
2622
+ let v = c + 1, p = 1, m = new H(u, t.index, c);
2412
2623
  this[ne](o, v, e, p, m);
2413
2624
  }
2414
2625
  u.slots.value = [...h];
@@ -2416,26 +2627,26 @@ class Dn {
2416
2627
  let h = u.slots.value;
2417
2628
  if (h.length == 0) {
2418
2629
  t.index = ee.get(), u.slots.value = [new re(t, i, t.index)];
2419
- let d = c + 1, y = 1, v = new D(u, t.index, c);
2630
+ let d = c + 1, y = 1, v = new H(u, t.index, c);
2420
2631
  this[ne](o, d, e, y, v);
2421
2632
  } else {
2422
2633
  let d = h[0];
2423
2634
  if (d.model !== i) {
2424
2635
  this[oe](o, f, null, !0), t.index = ee.get(), u.slots.value = [new re(t, i, t.index)];
2425
- let y = c + 1, v = 1, p = new D(u, t.index, c);
2636
+ let y = c + 1, v = 1, p = new H(u, t.index, c);
2426
2637
  this[ne](o, y, e, v, p);
2427
2638
  } else {
2428
- d.route !== null && this[ye](d.route);
2639
+ d.route !== null && this[pe](d.route);
2429
2640
  let y = [];
2430
2641
  for (let T = 1; T < h.length; T++)
2431
2642
  y.push(h[T].index);
2432
2643
  y.length > 0 && this[oe](o, f, y, !0), t.index = d.index, d.route = t;
2433
- let v = [new D(u, t.index, c)], p = c + 1, m = 1, w = new D(u, t.index, c);
2644
+ let v = [new H(u, t.index, c)], p = c + 1, m = 1, w = new H(u, t.index, c);
2434
2645
  for (; v.length > 0 && p < o.layers.length && m < e.layers.length; p++, m++) {
2435
2646
  let T = [];
2436
2647
  for (let C = 0; C < o.layers[p].views.length; C++) {
2437
2648
  let x = o.layers[p].views[C];
2438
- x[ue] && D.include(v, x[ue]) && T.unshift(C);
2649
+ x[ue] && H.include(v, x[ue]) && T.unshift(C);
2439
2650
  }
2440
2651
  let b = [];
2441
2652
  for (let C of T) {
@@ -2461,11 +2672,11 @@ class Dn {
2461
2672
  let B = p + 1, k = m + 1;
2462
2673
  this[ne](o, B, e, k, w);
2463
2674
  } else {
2464
- x[J] && O.route !== null && this[ye](O.route);
2675
+ x[J] && O.route !== null && this[pe](O.route);
2465
2676
  let B = [];
2466
2677
  for (let k = 1; k < j.length; k++)
2467
2678
  B.push(j[k].index);
2468
- B.length > 0 && this[oe](o, { x: C, y: p }, B, !0), b.push(new D(x, O.index, p));
2679
+ B.length > 0 && this[oe](o, { x: C, y: p }, B, !0), b.push(new H(x, O.index, p));
2469
2680
  }
2470
2681
  }
2471
2682
  x[J] = !1;
@@ -2479,30 +2690,30 @@ class Dn {
2479
2690
  }
2480
2691
  if (u && u[z]) {
2481
2692
  let h = u[z];
2482
- h && (t.slot = new gn(a, c, h?.view.name, h?.index ?? 0));
2693
+ h && (t.slot = new un(a, c, h?.view.name, h?.index ?? 0));
2483
2694
  }
2484
- n.to = void 0, n.routeModel = void 0, t.session = n, this[ar](t);
2695
+ n.to = void 0, n.routeModel = void 0, t.session = n, this[dr](t);
2485
2696
  }
2486
2697
  [ne](e, t, n, s, i) {
2487
2698
  let o = s, l = t;
2488
2699
  for (; l < e.layers.length && o < n.layers.length; l++, o++) {
2489
2700
  let a = e.layers[l].views;
2490
2701
  for (let f of n.layers[o].models) {
2491
- let u = new Pe(f.name, !1, i), c = new re(null, f);
2702
+ let u = new Ee(f.name, !1, i), c = new re(null, f);
2492
2703
  u.slots.value = [c], a.push(u);
2493
2704
  }
2494
2705
  }
2495
2706
  for (; o < n.layers.length; o++) {
2496
- let a = new ft();
2707
+ let a = new pt();
2497
2708
  a.views = [];
2498
2709
  for (let f of n.layers[o].models) {
2499
- let u = new Pe(f.name, !1, i), c = new re(null, f);
2710
+ let u = new Ee(f.name, !1, i), c = new re(null, f);
2500
2711
  u.slots.value = [c], a.views.push(u);
2501
2712
  }
2502
2713
  e.layers.push(a);
2503
2714
  }
2504
2715
  }
2505
- [Ar](e, t, n, s, i, o) {
2716
+ [Cr](e, t, n, s, i, o) {
2506
2717
  if (t < 0 || t > this[V].layers.length)
2507
2718
  return null;
2508
2719
  if (t < this[V].layers.length) {
@@ -2531,226 +2742,16 @@ class Dn {
2531
2742
  index: o,
2532
2743
  level: t - 1
2533
2744
  });
2534
- let f = new Pe(e, !0, l);
2745
+ let f = new Ee(e, !0, l);
2535
2746
  if (f[ue] = a, t == this[V].layers.length) {
2536
- let u = new ft();
2747
+ let u = new pt();
2537
2748
  u.views = [f], this[V].layers.push(u);
2538
2749
  } else
2539
2750
  this[V].layers[t].views.push(f);
2540
2751
  return f;
2541
2752
  }
2542
2753
  }
2543
- const me = Symbol("registerKey");
2544
- class Hn {
2545
- policy;
2546
- callback;
2547
- constructor(e, t) {
2548
- this.callback = e, this.policy = t;
2549
- }
2550
- }
2551
- class cr {
2552
- [me] = /* @__PURE__ */ new Map();
2553
- constructor() {
2554
- }
2555
- on(e, t, n = !1) {
2556
- let s = this[me].get(e);
2557
- s || (s = new Array(), this[me].set(e, s));
2558
- let i = n === !0 ? 1 : 0, o = new Hn(t, i);
2559
- return s.push(o), this;
2560
- }
2561
- off(e, t) {
2562
- if (!t)
2563
- return this[me].delete(e), this;
2564
- let n = this[me].get(e);
2565
- if (n) {
2566
- for (let s = 0; s < n.length; s++)
2567
- if (n[s].callback === t) {
2568
- n.splice(s, 1);
2569
- break;
2570
- }
2571
- }
2572
- return this;
2573
- }
2574
- bind(e, t, n = !1) {
2575
- return this.on(e, t, n);
2576
- }
2577
- unbind(e, t) {
2578
- return this.off(e, t);
2579
- }
2580
- once(e, t) {
2581
- return this.on(e, t, !0);
2582
- }
2583
- all(...e) {
2584
- let t = e.length;
2585
- if (t < 1)
2586
- return this;
2587
- let n = e[t - 1];
2588
- if (typeof n != "function")
2589
- return console.error("callback can not benn empty"), this;
2590
- let s = t - 1, i = new Array(s), o = [].splice.call(e, 0, s);
2591
- for (let l = 0; l < o.length; l++)
2592
- this.once(o[l], (a) => {
2593
- i[l] = a, s -= 1, s == 0 && Reflect.apply(n, {}, i);
2594
- });
2595
- return this;
2596
- }
2597
- emit(e, ...t) {
2598
- let n = this[me].get(e);
2599
- if (!n)
2600
- return this;
2601
- for (let s = 0; s < n.length; ) {
2602
- let i = n[s];
2603
- if (i.policy == 1 ? n.splice(s, 1) : s++, typeof i.callback == "function")
2604
- try {
2605
- Le(() => {
2606
- Reflect.apply(i.callback, {}, t);
2607
- });
2608
- } catch (o) {
2609
- console.error(o.message, o);
2610
- }
2611
- }
2612
- return this;
2613
- }
2614
- trigger(e, ...t) {
2615
- return Reflect.apply(this.emit, this, [e, ...t]);
2616
- }
2617
- }
2618
- const Oe = Symbol("registerKey");
2619
- class Un {
2620
- [Oe] = /* @__PURE__ */ new Map();
2621
- constructor() {
2622
- }
2623
- set(e, t) {
2624
- this[Oe].set(e, t);
2625
- }
2626
- get(e) {
2627
- return this[Oe].get(e);
2628
- }
2629
- has(e) {
2630
- return this[Oe].has(e);
2631
- }
2632
- delete(e) {
2633
- return this[Oe].delete(e);
2634
- }
2635
- }
2636
- const Lt = Symbol("lc");
2637
- function Xe(r, e = !1) {
2638
- let t = r, n = t[Lt];
2639
- if (!n)
2640
- if (e)
2641
- n = new Un(), t[Lt] = n;
2642
- else
2643
- return null;
2644
- return n;
2645
- }
2646
- function Kr(r, e) {
2647
- let t = r;
2648
- for (; t !== null; ) {
2649
- let n = t[Lt];
2650
- if (n && n.has(e))
2651
- return n.get(e);
2652
- t = t.$parent;
2653
- }
2654
- return null;
2655
- }
2656
- function hr(r) {
2657
- if (Array.isArray(r.children) && r.children.length > 0) {
2658
- let e = r.children[0];
2659
- if (e != null && e.component != null && e.component.proxy != null)
2660
- return Xe(e.component.proxy, !1);
2661
- }
2662
- return null;
2663
- }
2664
- const rt = Symbol("hooksKey");
2665
- function Vn(r) {
2666
- let e = r.get(rt);
2667
- e || (e = [], r.set(rt, e));
2668
- }
2669
- function dr(r, e) {
2670
- let t = r.get(rt);
2671
- if (t != null)
2672
- for (let n = t.length - 1; n >= 0; n--) {
2673
- let s = t[n];
2674
- if (s.type === e)
2675
- try {
2676
- Reflect.apply(s.hook, s.target, []);
2677
- } catch (i) {
2678
- console.error(i.message, i);
2679
- }
2680
- }
2681
- }
2682
- var Mt = /* @__PURE__ */ ((r) => (r.DEACTIVATED = "da", r.ACTIVATED = "a", r))(Mt || {});
2683
- class Bn {
2684
- type;
2685
- hook;
2686
- target;
2687
- constructor(e, t, n) {
2688
- this.target = n, this.hook = t, this.type = e;
2689
- }
2690
- }
2691
- function kn(r, e, t, n) {
2692
- let s = new Bn(e, t, n);
2693
- return r.push(s), !0;
2694
- }
2695
- function Wn(r, e, t, n) {
2696
- let s = -1;
2697
- for (let i = 0; i < r.length; i++) {
2698
- let o = r[i];
2699
- if (o.type === e && o.hook === t && o.target === n) {
2700
- s = i;
2701
- break;
2702
- }
2703
- }
2704
- return s != -1 ? (r.splice(s, 1), !0) : !1;
2705
- }
2706
- function jr(r) {
2707
- return (e, t) => {
2708
- let n;
2709
- if (t)
2710
- n = t;
2711
- else {
2712
- let i = Ht();
2713
- if (i == null || i.proxy == null) {
2714
- console.error("can not get current instance or proxy");
2715
- return;
2716
- }
2717
- n = i.proxy;
2718
- }
2719
- let s = Kr(n, rt);
2720
- if (s == null) {
2721
- console.warn("can not get hooks context");
2722
- return;
2723
- }
2724
- nt(() => {
2725
- Wn(s, r, e, n);
2726
- }), kn(s, r, e, n);
2727
- };
2728
- }
2729
- let Ei = jr("a"), Fi = jr("da");
2730
- function zn() {
2731
- let r = new q();
2732
- return r.path = "", r.name = "", r.params = {}, r.index = -1, Jr(r);
2733
- }
2734
- const It = Symbol("routeKey");
2735
- function Et(r, e) {
2736
- let t = r.get(It);
2737
- if (t) {
2738
- let n = {
2739
- path: "",
2740
- name: "",
2741
- params: {},
2742
- index: -1,
2743
- session: {}
2744
- };
2745
- Object.assign(n, e), Object.assign(t, n);
2746
- } else
2747
- t = zn(), Object.assign(t, e), r.set(It, t);
2748
- }
2749
- function _r(r) {
2750
- let e = Kr(r, It);
2751
- return e ?? null;
2752
- }
2753
- const it = Symbol("rk"), Ft = Symbol("vd"), yr = Symbol("rv"), Tt = Symbol("rvi"), pr = Symbol("pv"), Kt = Symbol("pvi"), Jn = "fox-router-view", Gn = "fox-router-link";
2754
+ const Jn = "fox-router-view", Gn = "fox-router-link";
2754
2755
  function $r(r, e = !1) {
2755
2756
  let t = null;
2756
2757
  return e ? t = r.showFromClass ?? r.enterFromClass : t = r.enterFromClass, t || (t = r.transitionName, t ? e ? `${t}-show-from` : `${t}-enter-from` : null);
@@ -2840,18 +2841,18 @@ function Or(r, e, t, n = -1, s, i, o, l) {
2840
2841
  }
2841
2842
  const a = ["animationend", "transitionend"], f = (u) => {
2842
2843
  a.forEach((c) => {
2843
- Ot(e, c, f);
2844
+ It(e, c, f);
2844
2845
  }), Reflect.apply(i, r, [e, t, n]), l && Reflect.apply(l, r, []);
2845
2846
  };
2846
2847
  a.forEach((u) => {
2847
- qt(e, u, f);
2848
+ Mt(e, u, f);
2848
2849
  });
2849
2850
  }
2850
2851
  if (S(o)) {
2851
2852
  const a = "animationcancel", f = (u) => {
2852
- Reflect.apply(o, r, [e, t, n]), Ot(e, a, f);
2853
+ Reflect.apply(o, r, [e, t, n]), It(e, a, f);
2853
2854
  };
2854
- qt(e, a, f);
2855
+ Mt(e, a, f);
2855
2856
  }
2856
2857
  }
2857
2858
  function Gt(r) {
@@ -3136,42 +3137,42 @@ const Dt = vr({
3136
3137
  console.error("instance or instance.proxy not exist");
3137
3138
  return;
3138
3139
  }
3139
- const n = r.multi === !0, s = G(it, null), i = G(Ft, 0), o = G(yr, null), l = G(Tt, -1);
3140
+ const n = r.multi === !0, s = G(it, null), i = G(ht, 0), o = G(ir, null), l = G(dt, -1);
3140
3141
  let a = null;
3141
3142
  const f = r.modelSlot;
3142
3143
  if (f) {
3143
- te(Ft, i + 1), te(Tt, f.index), te(Kt, f.index);
3144
+ te(ht, i + 1), te(dt, f.index), te(yt, f.index);
3144
3145
  const c = f.route;
3145
3146
  if (!c) {
3146
3147
  console.warn("child view render error, route not exist");
3147
3148
  return;
3148
3149
  }
3149
- const h = Xe(t.proxy, !0);
3150
- Vn(h), Et(h, c);
3150
+ const h = Ge(t.proxy, !0);
3151
+ mn(h), ct(h, c);
3151
3152
  } else {
3152
3153
  if (s == null) {
3153
3154
  console.error("router is not been injected");
3154
3155
  return;
3155
3156
  }
3156
- const c = r.name, h = G(pr, null), d = G(Kt, 0);
3157
- if (a = s[Ar](c, i, o, l, h, d), a === null)
3157
+ const c = r.name, h = G(sr, null), d = G(yt, 0);
3158
+ if (a = s[Cr](c, i, o, l, h, d), a === null)
3158
3159
  return;
3159
- if (te(pr, a), a[J] === !0 && te(yr, a), !n) {
3160
- te(Tt, -1), te(Ft, i + 1), te(Kt, -1);
3160
+ if (te(sr, a), a[J] === !0 && te(ir, a), !n) {
3161
+ te(dt, -1), te(ht, i + 1), te(yt, -1);
3161
3162
  const v = a.slots.value;
3162
3163
  if (v.length > 0) {
3163
3164
  const p = v[0].route;
3164
3165
  if (p) {
3165
- const m = Xe(t.proxy, !0);
3166
- Et(m, p);
3166
+ const m = Ge(t.proxy, !0);
3167
+ ct(m, p);
3167
3168
  }
3168
3169
  } else {
3169
- const p = Xe(t.proxy, !0);
3170
+ const p = Ge(t.proxy, !0);
3170
3171
  a.compensation = () => {
3171
3172
  const m = a.slots.value;
3172
3173
  if (m.length > 0) {
3173
3174
  const w = m[0].route;
3174
- return w && Et(p, w), !0;
3175
+ return w && ct(p, w), !0;
3175
3176
  }
3176
3177
  return !1;
3177
3178
  };
@@ -3195,14 +3196,14 @@ const Dt = vr({
3195
3196
  const ce = B.node;
3196
3197
  w.active ? y.unshift(() => {
3197
3198
  const lt = () => {
3198
- let Ce = hr(ce);
3199
- Ce != null && dr(Ce, Mt.ACTIVATED);
3199
+ let Ce = rr(ce);
3200
+ Ce != null && nr(Ce, Ot.ACTIVATED);
3200
3201
  };
3201
3202
  ai(t, ce, r, w.route, m, b, lt);
3202
3203
  }) : y.push(() => {
3203
3204
  const lt = () => {
3204
- const Ce = hr(ce);
3205
- Ce != null && dr(Ce, Mt.DEACTIVATED);
3205
+ const Ce = rr(ce);
3206
+ Ce != null && nr(Ce, Ot.DEACTIVATED);
3206
3207
  };
3207
3208
  ui(t, ce, r, w.route, m, b, lt);
3208
3209
  });
@@ -3372,7 +3373,7 @@ let pi = vr({
3372
3373
  };
3373
3374
  const Dr = Symbol("fk"), Hr = Symbol("fbk"), Ur = Symbol("fepk");
3374
3375
  function Ti(r = {}) {
3375
- const e = new Dn(r), t = new Yt(), n = new cr(), s = {
3376
+ const e = new zn(r), t = new Yt(), n = new tr(), s = {
3376
3377
  ...mi,
3377
3378
  get router() {
3378
3379
  return e;
@@ -3387,7 +3388,7 @@ function Ti(r = {}) {
3387
3388
  return n;
3388
3389
  },
3389
3390
  get EventProxy() {
3390
- return cr;
3391
+ return tr;
3391
3392
  },
3392
3393
  get EventChain() {
3393
3394
  return tt;
@@ -3396,7 +3397,7 @@ function Ti(r = {}) {
3396
3397
  return e.require;
3397
3398
  },
3398
3399
  get request() {
3399
- return Er;
3400
+ return Pr;
3400
3401
  },
3401
3402
  get extend() {
3402
3403
  return F;
@@ -3443,7 +3444,7 @@ function Ti(r = {}) {
3443
3444
  }, i.mixin({
3444
3445
  computed: {
3445
3446
  $route() {
3446
- return _r(this);
3447
+ return Fr(this);
3447
3448
  }
3448
3449
  }
3449
3450
  }), e.init();
@@ -3455,7 +3456,7 @@ function Vr(r) {
3455
3456
  return r ? r.$router : G(it);
3456
3457
  }
3457
3458
  function Ki(r) {
3458
- return r || (r = Ht()?.proxy ?? void 0), r ? _r(r) : null;
3459
+ return r || (r = Ht()?.proxy ?? void 0), r ? Fr(r) : null;
3459
3460
  }
3460
3461
  function ji(r) {
3461
3462
  return r ? r.$fox : G(Dr);
@@ -3495,15 +3496,14 @@ function Oi(r) {
3495
3496
  export {
3496
3497
  Yt as Bus,
3497
3498
  tt as EventChain,
3498
- cr as EventProxy,
3499
+ tr as EventProxy,
3499
3500
  q as Route,
3500
- Dn as Router,
3501
3501
  Pi as cancel,
3502
3502
  Ye as clone,
3503
3503
  Ti as createFox,
3504
- Mn as createMemoryHistory,
3505
- On as createWebHashHistory,
3506
- Ai as createWebHistory,
3504
+ Bn as createMemoryHistory,
3505
+ Un as createWebHashHistory,
3506
+ Fi as createWebHistory,
3507
3507
  F as extend,
3508
3508
  Hr as foxBusKey,
3509
3509
  Ur as foxEventProxyKey,
@@ -3522,9 +3522,10 @@ export {
3522
3522
  Ri as isSymbol,
3523
3523
  Oi as onAfterRouteUpdate,
3524
3524
  qi as onBeforeRouteUpdate,
3525
- Ei as onFoxActivated,
3526
- Fi as onFoxDeactivated,
3527
- Er as request,
3525
+ Ai as onFoxActivated,
3526
+ Ei as onFoxDeactivated,
3527
+ Pr as request,
3528
+ se as sessionKey,
3528
3529
  wr as toBoolean,
3529
3530
  Ci as toNumber,
3530
3531
  Ut as toTypeString,