@xwadex/fesd 0.0.14-re.92 → 0.0.14-re.93

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.
@@ -8,12 +8,12 @@ var h = (n, i, t) => {
8
8
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
9
9
  };
10
10
  var d = (n, i, t) => (fs(n, i, "access private method"), t);
11
- import { OverlayScrollbars as qe } from "overlayscrollbars";
11
+ import { OverlayScrollbars as Me } from "overlayscrollbars";
12
12
  import v from "jquery";
13
13
  import "./vendor-bundle.js";
14
14
  import "validator";
15
15
  import "flatpickr";
16
- import Ye from "vanilla-lazyload";
16
+ import Fe from "vanilla-lazyload";
17
17
  import { lock as vs, unlock as bs } from "tua-body-scroll-lock";
18
18
  const Y = {
19
19
  SETTINGS: {
@@ -107,7 +107,7 @@ const Y = {
107
107
  gap: 30
108
108
  // 跑馬燈內容之間的距離 - Number
109
109
  }
110
- }, Ie = {
110
+ }, qe = {
111
111
  SETTINGS: {
112
112
  scrollbar: {
113
113
  "scrollbar-track-color": "transparent",
@@ -139,7 +139,7 @@ const Y = {
139
139
  SETTINGS: {
140
140
  basic_rwd: 900
141
141
  }
142
- }, Ue = {
142
+ }, Ye = {
143
143
  SETTINGS: {
144
144
  scroller: window,
145
145
  class: "aost-show",
@@ -162,7 +162,7 @@ const Y = {
162
162
  enter: null,
163
163
  leave: null
164
164
  }
165
- }, ct = {
165
+ }, lt = {
166
166
  SETTINGS: {
167
167
  target: null,
168
168
  container: null,
@@ -222,7 +222,7 @@ const Y = {
222
222
  return `<dropdown-el${n.placeholder ? ` d4-placeholder="${n.placeholder}"` : ""}${n.value ? ` d4-value="${n.value}"` : ""}></dropdown-el>`;
223
223
  }
224
224
  }
225
- }, Je = {
225
+ }, Ue = {
226
226
  SETTINGS: {
227
227
  // 樣式 normal / process
228
228
  type: "normal",
@@ -242,7 +242,7 @@ const Y = {
242
242
  // 步驟狀態綁定
243
243
  stepOutput: ".step-show"
244
244
  }
245
- }, Ze = {
245
+ }, Je = {
246
246
  SETTINGS: {
247
247
  collapseClass: "collapse",
248
248
  block: "[collapse-block]",
@@ -275,7 +275,7 @@ const Y = {
275
275
  update: null,
276
276
  afterUpdate: null
277
277
  }
278
- }, Qe = {
278
+ }, Ze = {
279
279
  SETTINGS: {
280
280
  // 是否要加 hover 效果?
281
281
  hover: !0,
@@ -292,27 +292,27 @@ const Y = {
292
292
  }
293
293
  }, mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
294
294
  __proto__: null,
295
- anchor4: ct,
296
- aost4: Ue,
295
+ anchor4: lt,
296
+ aost4: Ye,
297
297
  article4: ws,
298
- collapse4: Ze,
299
- dropdown4: Ie,
298
+ collapse4: Je,
299
+ dropdown4: qe,
300
300
  marquee4: $,
301
301
  modal4: I,
302
302
  multipurpose4: C,
303
- ripple4: Qe,
303
+ ripple4: Ze,
304
304
  share4: ys,
305
- tab4: Je,
305
+ tab4: Ue,
306
306
  video4: Y
307
307
  }, Symbol.toStringTag, { value: "Module" })), E = {
308
308
  before: "beforebegin",
309
309
  after: "afterend",
310
310
  append: "beforeend",
311
311
  prepend: "afterbegin"
312
- }, rt = (n) => typeof n == "string" && n !== "", ye = (n) => n instanceof HTMLElement, lt = (n) => n instanceof NodeList, w = (n) => L(n) !== null, j = (n) => typeof n == "function", L = (n) => ye(n) ? n : document.querySelector(n), A = (n) => lt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
312
+ }, at = (n) => typeof n == "string" && n !== "", ye = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, w = (n) => A(n) !== null, j = (n) => typeof n == "function", A = (n) => ye(n) ? n : document.querySelector(n), L = (n) => rt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
313
313
  const i = document.createElement("div");
314
314
  return i.innerHTML = n, i.childNodes;
315
- }, Ls = (n) => {
315
+ }, As = (n) => {
316
316
  try {
317
317
  JSON.parse(n);
318
318
  } catch {
@@ -321,7 +321,7 @@ const Y = {
321
321
  return JSON.parse(n);
322
322
  }, T = (n, i) => {
323
323
  console.warn(`[${n} warn]: ${i}`);
324
- }, ze = (n, i) => {
324
+ }, je = (n, i) => {
325
325
  console.error(`[${n} error]: ${i}`);
326
326
  }, O = {
327
327
  on(n, i) {
@@ -354,7 +354,7 @@ const Y = {
354
354
  j(s) && s.apply(this, e);
355
355
  }), this) : this;
356
356
  }
357
- }, As = {
357
+ }, Ls = {
358
358
  easeInOutCirc(n, i, t, e) {
359
359
  return (n /= e / 2) < 1 ? -t / 2 * (Math.sqrt(1 - n * n) - 1) + i : t / 2 * (Math.sqrt(1 - (n -= 2) * n) + 1) + i;
360
360
  },
@@ -365,28 +365,28 @@ const Y = {
365
365
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
366
366
  }
367
367
  }, we = (n, i) => {
368
- const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? L(e) : document.scrollingElement, f = m[u], b = w(t) ? L(t).getBoundingClientRect()[p] : 0 - f, y = w(s) ? L(s).getBoundingClientRect()[g] : 0, H = b - a - y, B = 15;
368
+ const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? A(e) : document.scrollingElement, f = m[u], b = w(t) ? A(t).getBoundingClientRect()[p] : 0 - f, y = w(s) ? A(s).getBoundingClientRect()[g] : 0, H = b - a - y, G = 15;
369
369
  let S = 0;
370
370
  if (H === 0)
371
371
  return;
372
372
  const R = (X) => {
373
- const je = L(t);
374
- i && i.emit(X, je), !i && n.on && j(n.on[X]) && n.on[X](je);
373
+ const Ne = A(t);
374
+ i && i.emit(X, Ne), !i && n.on && j(n.on[X]) && n.on[X](Ne);
375
375
  };
376
376
  R("beforeScroll");
377
377
  const Pe = () => {
378
- S += B;
379
- const X = As[r](S, f, H, o);
378
+ S += G;
379
+ const X = Ls[r](S, f, H, o);
380
380
  m[u] = X, S < o && requestAnimationFrame(Pe), S >= o && R("afterScroll");
381
381
  };
382
382
  requestAnimationFrame(Pe);
383
383
  };
384
- var J, Ee, mt, Ke, gt, ti;
385
- class Ve {
384
+ var J, Ee, pt, Ve, mt, Ke;
385
+ class Qe {
386
386
  constructor(i, t = {}) {
387
387
  h(this, J);
388
+ h(this, pt);
388
389
  h(this, mt);
389
- h(this, gt);
390
390
  this.__storage__ = {
391
391
  el: i,
392
392
  options: t
@@ -403,13 +403,13 @@ class Ve {
403
403
  return d(i = this.destroy(), J, Ee).call(i), this.emit("afterUpdate"), this;
404
404
  }
405
405
  static run(i) {
406
- const { SETTINGS: t } = ct, e = Object.assign({}, t, i);
406
+ const { SETTINGS: t } = lt, e = Object.assign({}, t, i);
407
407
  setTimeout(() => {
408
408
  we(e);
409
409
  }, e.delay);
410
410
  }
411
411
  static url(i) {
412
- const { SETTINGS: t } = ct, { hashName: e } = i, s = window.location.search || window.location.hash, { searchParams: o } = new URL(window.location), a = document.querySelector(`[data-anchor-id="${e ? o.get(e) : s.split("?").pop()}"]`);
412
+ const { SETTINGS: t } = lt, { hashName: e } = i, s = window.location.search || window.location.hash, { searchParams: o } = new URL(window.location), a = document.querySelector(`[data-anchor-id="${e ? o.get(e) : s.split("?").pop()}"]`);
413
413
  if (!a)
414
414
  return;
415
415
  const r = Object.assign({}, t, i, { target: a });
@@ -420,19 +420,19 @@ class Ve {
420
420
  }
421
421
  J = new WeakSet(), Ee = function() {
422
422
  const { el: i, options: t } = this.__storage__;
423
- if (!rt(i) || !w(i))
423
+ if (!at(i) || !w(i))
424
424
  return;
425
- const { SETTINGS: e, EVENTS: s } = ct;
426
- if (this.elements = t.state == "not active" ? A(i + `:not([${this.active}])`) : A(i), this.elements = A(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
425
+ const { SETTINGS: e, EVENTS: s } = lt;
426
+ if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.elements = L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
427
427
  for (const [o, a] of Object.entries(this.options.on))
428
428
  this.__events__[o] = [a];
429
- d(this, mt, Ke).call(this);
430
- }, mt = new WeakSet(), Ke = function() {
429
+ d(this, pt, Ve).call(this);
430
+ }, pt = new WeakSet(), Ve = function() {
431
431
  const { elements: i, options: t } = this;
432
432
  i.forEach((e) => {
433
- e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, gt, ti), e.anchor.defaultOptions = t, e.anchor.methods = {}, e.anchor.methods.destroy = this.destroy, e.anchor.methods.update = this.update, e.addEventListener("click", e.anchor.eventHandler), e.setAttribute(this.active, "");
433
+ e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, mt, Ke), e.anchor.defaultOptions = t, e.anchor.methods = {}, e.anchor.methods.destroy = this.destroy, e.anchor.methods.update = this.update, e.addEventListener("click", e.anchor.eventHandler), e.setAttribute(this.active, "");
434
434
  }), this.emit("afterInit");
435
- }, gt = new WeakSet(), ti = function() {
435
+ }, mt = new WeakSet(), Ke = function() {
436
436
  const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
437
437
  target: this.getAttribute("data-anchor-target") || i.target,
438
438
  container: this.getAttribute("data-anchor-container") || i.container,
@@ -449,7 +449,7 @@ J = new WeakSet(), Ee = function() {
449
449
  we(s, e);
450
450
  }, s.delay);
451
451
  };
452
- Object.assign(Ve.prototype, O);
452
+ Object.assign(Qe.prototype, O);
453
453
  window.MODALS || (window.MODALS = {});
454
454
  const { MODALS: M } = window, Ss = (n) => {
455
455
  const { TEMPLATE: i } = I, { childDom: t } = n, e = document.createElement("div");
@@ -459,15 +459,15 @@ const { MODALS: M } = window, Ss = (n) => {
459
459
  s.append(o);
460
460
  }), e.children[0];
461
461
  };
462
- var ft, ii, vt, si, bt, ni, yt, oi, Z, Le;
463
- class ei extends HTMLElement {
462
+ var gt, ei, ft, ii, vt, si, bt, ni, yt, oi;
463
+ class ti extends HTMLElement {
464
464
  constructor() {
465
465
  super();
466
+ h(this, gt);
466
467
  h(this, ft);
467
468
  h(this, vt);
468
469
  h(this, bt);
469
470
  h(this, yt);
470
- h(this, Z);
471
471
  this.initialize = !1;
472
472
  }
473
473
  static get observedAttributes() {
@@ -476,12 +476,12 @@ class ei extends HTMLElement {
476
476
  attributeChangedCallback(t, e, s) {
477
477
  switch (t) {
478
478
  case ":state":
479
- d(this, Z, Le).call(this, s);
479
+ d(this, yt, oi).call(this, s);
480
480
  break;
481
481
  }
482
482
  }
483
483
  connectedCallback() {
484
- this.initialize || (this.initialize = !0, d(this, ft, ii).call(this));
484
+ this.initialize || (this.initialize = !0, d(this, gt, ei).call(this));
485
485
  }
486
486
  open() {
487
487
  return this.setAttribute(":state", "open"), this;
@@ -493,22 +493,22 @@ class ei extends HTMLElement {
493
493
  return this.setAttribute(":state", "destroy"), this;
494
494
  }
495
495
  }
496
- ft = new WeakSet(), ii = function() {
496
+ gt = new WeakSet(), ei = function() {
497
497
  const { ATTRS: t } = I;
498
498
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
499
499
  const e = this.getAttribute(t.id) || Ts();
500
- this.getAttribute(t.id) || (T(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && T(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, vt, si).call(this);
500
+ this.getAttribute(t.id) || (T(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && T(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, ft, ii).call(this);
501
+ }, ft = new WeakSet(), ii = function() {
502
+ this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, vt, si).call(this);
501
503
  }, vt = new WeakSet(), si = function() {
502
- this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, bt, ni).call(this);
503
- }, bt = new WeakSet(), ni = function() {
504
504
  const t = this.querySelector(".modal-scroller");
505
- this.__scroller__ = qe(t, {
505
+ this.__scroller__ = Me(t, {
506
506
  overflowBehavior: {
507
507
  x: "hidden"
508
508
  },
509
509
  autoUpdate: !0
510
- }), window.modalScroll = this.__scroller__, d(this, yt, oi).call(this);
511
- }, yt = new WeakSet(), oi = function() {
510
+ }), window.modalScroll = this.__scroller__, d(this, bt, ni).call(this);
511
+ }, bt = new WeakSet(), ni = function() {
512
512
  var a, r, l;
513
513
  const t = this, { ATTRS: e } = I, { close: s, destroy: o } = e;
514
514
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
@@ -524,11 +524,9 @@ ft = new WeakSet(), ii = function() {
524
524
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
525
525
  c.stopPropagation();
526
526
  });
527
- }, Z = new WeakSet(), Le = function(t) {
527
+ }, yt = new WeakSet(), oi = function(t) {
528
528
  const { __scroller__: e } = this;
529
529
  if (t === "open") {
530
- if (this.classList.contains("ING"))
531
- return;
532
530
  if (this.style.display = "block", e) {
533
531
  const { viewport: s } = e.elements();
534
532
  s.scrollTo({
@@ -536,15 +534,15 @@ ft = new WeakSet(), ii = function() {
536
534
  });
537
535
  }
538
536
  setTimeout(() => {
539
- this.classList.add("show", "ING"), this.emit("open");
537
+ this.classList.add("show"), this.emit("open");
540
538
  }, 100);
541
539
  }
542
540
  if (t === "close") {
543
- if (!this.classList.contains("ING"))
541
+ if (!this.classList.contains("show"))
544
542
  return;
545
543
  this.classList.remove("show");
546
544
  const s = () => {
547
- this.style.removeProperty("display"), this.emit("close"), this.classList.remove("ING"), this.removeEventListener("transitionend", s), this.getAttribute(":state") === "open" && d(this, Z, Le).call(this, "open");
545
+ this.style.removeProperty("display"), this.emit("close"), this.removeEventListener("transitionend", s);
548
546
  };
549
547
  this.addEventListener("transitionend", s);
550
548
  }
@@ -557,19 +555,19 @@ ft = new WeakSet(), ii = function() {
557
555
  this.addEventListener("transitionend", s);
558
556
  }
559
557
  };
560
- Object.assign(ei.prototype, O);
561
- const { MODALS: Oe } = window, ai = (n, i, ...t) => {
558
+ Object.assign(ti.prototype, O);
559
+ const { MODALS: Ie } = window, ai = (n, i, ...t) => {
562
560
  if (!i)
563
561
  return;
564
562
  const e = n[i];
565
563
  e && j(e) && e.apply(n, t);
566
564
  }, ri = (n, ...i) => {
567
565
  n && j(n) && n.apply(U, i);
568
- }, We = (n, i) => {
569
- const { target: t } = n, e = Oe[t] || L(n.target);
566
+ }, ze = (n, i) => {
567
+ const { target: t } = n, e = Ie[t] || A(n.target);
570
568
  e && li(n, i), e || Ds(n, i);
571
569
  }, li = (n, i) => {
572
- const { target: t, action: e, on: s, e: o } = n, a = Oe[t] || L(n.target);
570
+ const { target: t, action: e, on: s, e: o } = n, a = Ie[t] || A(n.target);
573
571
  switch (["open", "close", "destroy"].forEach((l) => {
574
572
  a.once(l, () => {
575
573
  i && (i.emit(l, a, o), ai(i, s[l], a, o)), i || ri(s[l], a);
@@ -597,26 +595,26 @@ const { MODALS: Oe } = window, ai = (n, i, ...t) => {
597
595
  i && (i.emit(l, ...c), ai(i, o[l], ...c)), i || ri(o[l], ...c);
598
596
  };
599
597
  fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
600
- const c = Es(l), u = L(s) || L(I.SETTINGS.container);
598
+ const c = Es(l), u = A(s) || A(I.SETTINGS.container);
601
599
  [...c].forEach((g) => {
602
600
  u.append(g);
603
601
  });
604
- const p = Oe[t] || L(n.target);
602
+ const p = Ie[t] || A(n.target);
605
603
  r("complete", p), li(n, i);
606
604
  }).catch((l) => {
607
605
  r("error", l);
608
606
  });
609
607
  };
610
- var Q, Ae, wt, ci, Tt, di;
611
- const N = class N {
608
+ var Z, Ae, wt, ci, Tt, di;
609
+ const P = class P {
612
610
  constructor(i, t = {}) {
613
- h(this, Q);
611
+ h(this, Z);
614
612
  h(this, wt);
615
613
  h(this, Tt);
616
614
  this.__storage__ = {
617
615
  el: i,
618
616
  options: t
619
- }, this.active = "data-modal-active", d(this, Q, Ae).call(this);
617
+ }, this.active = "data-modal-active", d(this, Z, Ae).call(this);
620
618
  }
621
619
  destroy() {
622
620
  const { elements: i } = this;
@@ -626,28 +624,28 @@ const N = class N {
626
624
  }
627
625
  update() {
628
626
  var i;
629
- return d(i = this.destroy(), Q, Ae).call(i), this.emit("update"), this;
627
+ return d(i = this.destroy(), Z, Ae).call(i), this.emit("update"), this;
630
628
  }
631
629
  /** static method 'open' */
632
630
  static open(i) {
633
631
  const { SETTINGS: t } = I, e = Object.assign({}, t, { on: {} }, i);
634
- We(e);
632
+ ze(e);
635
633
  }
636
634
  /** static method 'defineMethods' */
637
635
  static defineMethods(i) {
638
- N.prototype.__methods__ || (N.prototype.__methods__ = {});
639
- const t = N.prototype.__methods__;
636
+ P.prototype.__methods__ || (P.prototype.__methods__ = {});
637
+ const t = P.prototype.__methods__;
640
638
  for (const [e, s] of Object.entries(i))
641
639
  j(s) && (t[e] = s);
642
- Object.assign(N.prototype, N.prototype.__methods__);
640
+ Object.assign(P.prototype, P.prototype.__methods__);
643
641
  }
644
642
  };
645
- Q = new WeakSet(), Ae = function() {
643
+ Z = new WeakSet(), Ae = function() {
646
644
  const { el: i, options: t } = this.__storage__;
647
- if (!rt(i) || !w(i))
645
+ if (!at(i) || !w(i))
648
646
  return;
649
647
  const { SETTINGS: e, EVENTS: s } = I;
650
- if (this.elements = t.state == "not active" ? A(i + `:not([${this.active}])`) : A(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
648
+ if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
651
649
  for (const [o, a] of Object.entries(this.options.on))
652
650
  this.__events__[o] = [a];
653
651
  d(this, wt, ci).call(this);
@@ -657,7 +655,7 @@ Q = new WeakSet(), Ae = function() {
657
655
  e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Tt, di), e.modal.defaultOptions = t, e.modal.methods = {}, e.modal.methods.destroy = this.destroy, e.modal.methods.update = this.update, e.addEventListener("click", e.modal.eventHandler), e.setAttribute(this.active, "");
658
656
  }), this.emit("init");
659
657
  }, Tt = new WeakSet(), di = function(i) {
660
- const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = Ls(this.getAttribute("data-modal-on"));
658
+ const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = As(this.getAttribute("data-modal-on"));
661
659
  o && typeof o != "object" && T("modal4", "data-modal-on must be a json string.");
662
660
  const a = {
663
661
  target: this.getAttribute("data-modal-target") || t.target,
@@ -669,11 +667,11 @@ Q = new WeakSet(), Ae = function() {
669
667
  };
670
668
  this.removeEventListener("click", e), setTimeout(() => {
671
669
  this.addEventListener("click", e);
672
- }, 200), We(a, s);
670
+ }, 200), ze(a, s);
673
671
  };
674
- let U = N;
672
+ let U = P;
675
673
  Object.assign(U.prototype, O);
676
- customElements.define("modern-modal", ei);
674
+ customElements.define("modern-modal", ti);
677
675
  const _s = (n, i) => {
678
676
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
679
677
  i.forEach((s) => {
@@ -690,21 +688,21 @@ const _s = (n, i) => {
690
688
  }
691
689
  });
692
690
  }, ks = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
693
- var V, Se, Et, hi;
691
+ var Q, Le, Et, hi;
694
692
  class ui {
695
693
  constructor(i, t = {}) {
696
- h(this, V);
694
+ h(this, Q);
697
695
  h(this, Et);
698
696
  this.__storage__ = {
699
697
  el: i,
700
698
  options: t
701
- }, this.active = "data-aost-active", d(this, V, Se).call(this);
699
+ }, this.active = "data-aost-active", d(this, Q, Le).call(this);
702
700
  }
703
701
  destroy(i) {
704
702
  const { elements: t, options: e } = this;
705
703
  if (!t)
706
704
  return this;
707
- const { scroller: s } = e, o = s === window || !w(s) ? window : L(s);
705
+ const { scroller: s } = e, o = s === window || !w(s) ? window : A(s);
708
706
  return o.aost && (o.removeEventListener("scroll", o.aost.eventHandler), delete o.aost), t.forEach((a) => {
709
707
  if (!a.aost)
710
708
  return;
@@ -714,20 +712,20 @@ class ui {
714
712
  }
715
713
  update(i) {
716
714
  var t;
717
- d(t = this.destroy(i), V, Se).call(t);
715
+ d(t = this.destroy(i), Q, Le).call(t);
718
716
  }
719
717
  }
720
- V = new WeakSet(), Se = function() {
718
+ Q = new WeakSet(), Le = function() {
721
719
  const { el: i, options: t } = this.__storage__;
722
- if (!rt(i) || !w(i))
720
+ if (!at(i) || !w(i))
723
721
  return;
724
- const { SETTINGS: e, EVENTS: s } = Ue;
725
- if (this.elements = t.state == "not active" ? A(i + `:not([${this.active}])`) : A(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
722
+ const { SETTINGS: e, EVENTS: s } = Ye;
723
+ if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
726
724
  for (const [o, a] of Object.entries(this.options.on))
727
725
  this.__events__[o] = [a];
728
726
  d(this, Et, hi).call(this);
729
727
  }, Et = new WeakSet(), hi = function() {
730
- const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : L(e);
728
+ const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : A(e);
731
729
  this.eventHandler = () => {
732
730
  _s(s, i);
733
731
  }, i.forEach((a) => {
@@ -745,12 +743,12 @@ const $s = (n) => {
745
743
  s.append(o);
746
744
  }), e.children[0];
747
745
  };
748
- var Lt, pi, At, mi, St, gi, Dt, fi, _t, vi, kt, bi, $t, yi, xt, wi, Ct, Ti;
746
+ var At, pi, Lt, mi, St, gi, Dt, fi, _t, vi, kt, bi, $t, yi, xt, wi, Ct, Ti;
749
747
  class xs extends HTMLElement {
750
748
  constructor() {
751
749
  super();
752
- h(this, Lt);
753
750
  h(this, At);
751
+ h(this, Lt);
754
752
  h(this, St);
755
753
  // youtube iframe
756
754
  h(this, Dt);
@@ -763,7 +761,7 @@ class xs extends HTMLElement {
763
761
  h(this, xt);
764
762
  // 2025.02.11 新增 tiktok
765
763
  h(this, Ct);
766
- d(this, Lt, pi).call(this);
764
+ d(this, At, pi).call(this);
767
765
  }
768
766
  play() {
769
767
  const { videoType: t } = this;
@@ -800,13 +798,13 @@ class xs extends HTMLElement {
800
798
  }
801
799
  }
802
800
  }
803
- Lt = new WeakSet(), pi = function() {
801
+ At = new WeakSet(), pi = function() {
804
802
  if (!this.getAttribute("video-id")) {
805
803
  T("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
806
804
  return;
807
805
  }
808
- this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), d(this, At, mi).call(this);
809
- }, At = new WeakSet(), mi = function() {
806
+ this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), d(this, Lt, mi).call(this);
807
+ }, Lt = new WeakSet(), mi = function() {
810
808
  this.childDom = this.childNodes, this.template = $s(this), this.innerHTML = "", this.append(this.template), d(this, St, gi).call(this);
811
809
  }, St = new WeakSet(), gi = function() {
812
810
  const { videoType: t } = this;
@@ -864,7 +862,7 @@ function Ei(n) {
864
862
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
865
863
  }), v("html").addClass("scrollLock"), vs(i);
866
864
  }
867
- function Li(n) {
865
+ function Ai(n) {
868
866
  const i = [];
869
867
  n && n.forEach((t) => {
870
868
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
@@ -889,15 +887,15 @@ async function fn(n = 0) {
889
887
  }
890
888
  function vn() {
891
889
  v(".loading-wrapper").fadeOut(300).promise().done(function() {
892
- v(".loading-wrapper").remove(), Li();
890
+ v(".loading-wrapper").remove(), Ai();
893
891
  });
894
892
  }
895
893
  function bn(n, i) {
896
894
  new on(n, i);
897
895
  }
898
896
  function Cs() {
899
- const n = new ui("[data-aost]"), i = new Ye({ callback_loaded: (s) => {
900
- } }), t = new Qs(), e = new Ve("[data-anchor-target]");
897
+ const n = new ui("[data-aost]"), i = new Fe({ callback_loaded: (s) => {
898
+ } }), t = new Qs(), e = new Qe("[data-anchor-target]");
901
899
  n.update(), i.update(), t.reValidate(), e.update();
902
900
  }
903
901
  function yn(n, i = () => {
@@ -907,11 +905,11 @@ function yn(n, i = () => {
907
905
  }).siblings("[data-tab-content]").hide(), Cs();
908
906
  }
909
907
  function wn() {
910
- qe(
908
+ Me(
911
909
  {
912
910
  target: document.body,
913
911
  cancel: {
914
- nativeScrollbarsOverlaid: !1,
912
+ nativeScrollbarsOverlaid: !0,
915
913
  body: null
916
914
  }
917
915
  },
@@ -942,12 +940,12 @@ function En() {
942
940
  BigSurUP: /Mac OS X 10.15/.test(n) || /Mac OS X 10_15_7/.test(n) || /Mac OS X 10_15_8/.test(n) || /Mac OS X 10_15_9/.test(n) || /Mac OS X 11_/.test(n) || /Mac OS X 12_/.test(n)
943
941
  };
944
942
  }
945
- function Ln(n, i) {
943
+ function An(n, i) {
946
944
  v(n).on("click", function() {
947
945
  v(this).toggleClass(i);
948
946
  });
949
947
  }
950
- function An(n, i) {
948
+ function Ln(n, i) {
951
949
  v(n).on("click", function() {
952
950
  v(n).not(this).removeClass(i), v(this).addClass(i);
953
951
  });
@@ -1069,12 +1067,12 @@ function On() {
1069
1067
  });
1070
1068
  });
1071
1069
  }
1072
- function Nn(n) {
1070
+ function Pn(n) {
1073
1071
  const i = getComputedStyle(n).transform;
1074
1072
  let t = i.match(/^matrix3d\((.+)\)$/);
1075
1073
  return t ? parseFloat(t[1].split(", ")[12]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[4]) : 0);
1076
1074
  }
1077
- function Pn(n) {
1075
+ function Nn(n) {
1078
1076
  const i = getComputedStyle(n).transform;
1079
1077
  let t = i.match(/^matrix3d\((.+)\)$/);
1080
1078
  return t ? parseFloat(t[1].split(", ")[13]) : (t = i.match(/^matrix\((.+)\)$/), t ? parseFloat(t[1].split(", ")[5]) : 0);
@@ -1083,38 +1081,38 @@ function jn(n) {
1083
1081
  const i = document.createElement("div");
1084
1082
  return i.innerHTML = n, i.childNodes[0];
1085
1083
  }
1086
- const Ge = (n) => n.videoId !== "" || typeof n.videoId < "u", Ms = (n) => n.$selector.getAttribute("video4-active") === "on", Te = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1087
- var K, De, Ht, Ai, Mt, Si, tt, _e, qt, Di;
1084
+ const We = (n) => n.videoId !== "" || typeof n.videoId < "u", Ms = (n) => n.$selector.getAttribute("video4-active") === "on", Te = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1085
+ var V, Se, Ht, Li, Mt, Si, K, De, qt, Di;
1088
1086
  class qs {
1089
1087
  constructor(i, t = {}) {
1090
- h(this, K);
1088
+ h(this, V);
1091
1089
  h(this, Ht);
1092
1090
  h(this, Mt);
1093
- h(this, tt);
1091
+ h(this, K);
1094
1092
  h(this, qt);
1095
- if (!rt(i) && !ye(i) && !lt(i)) {
1096
- ze("video4", `找不到該物件 -> ${i}`);
1093
+ if (!at(i) && !ye(i) && !rt(i)) {
1094
+ je("video4", `找不到該物件 -> ${i}`);
1097
1095
  return;
1098
1096
  }
1099
1097
  this.__storage__ = {
1100
1098
  el: i,
1101
1099
  options: t
1102
- }, this.active = "data-video-active", d(this, K, De).call(this);
1100
+ }, this.active = "data-video-active", d(this, V, Se).call(this);
1103
1101
  }
1104
1102
  update() {
1105
- d(this, K, De).call(this);
1103
+ d(this, V, Se).call(this);
1106
1104
  }
1107
1105
  }
1108
- K = new WeakSet(), De = function() {
1106
+ V = new WeakSet(), Se = function() {
1109
1107
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Y;
1110
- if (this.elements = t.state == "not active" ? A(i + `:not([${this.active}])`) : A(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1108
+ if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
1111
1109
  for (const [o, a] of Object.entries(this.options.on))
1112
1110
  this.__events__[o] = [a];
1113
- d(this, Ht, Ai).call(this);
1114
- }, Ht = new WeakSet(), Ai = function() {
1111
+ d(this, Ht, Li).call(this);
1112
+ }, Ht = new WeakSet(), Li = function() {
1115
1113
  const { elements: i, options: t } = this;
1116
1114
  i.forEach((e) => {
1117
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, qt, Di).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Ge(e.video.params) && !Ms(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Mt, Si).call(this, e)), Ge(e.video.params) || ze("video4", "無法取得影片 ID");
1115
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, qt, Di).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), We(e.video.params) && !Ms(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Mt, Si).call(this, e)), We(e.video.params) || je("video4", "無法取得影片 ID");
1118
1116
  }), this.emit("init");
1119
1117
  }, Mt = new WeakSet(), Si = function(i) {
1120
1118
  const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: p } = e;
@@ -1132,7 +1130,7 @@ K = new WeakSet(), De = function() {
1132
1130
  console.log("error");
1133
1131
  }) : T("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1134
1132
  }
1135
- c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt, _e), g.addEventListener("click", g.video.eventHandler);
1133
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
1136
1134
  } else if (l === "onPage") {
1137
1135
  let g = null;
1138
1136
  if (u == "on") {
@@ -1150,10 +1148,10 @@ K = new WeakSet(), De = function() {
1150
1148
  s.innerHTML = Te(e);
1151
1149
  return;
1152
1150
  }
1153
- g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt, _e), g.addEventListener("click", g.video.eventHandler);
1151
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
1154
1152
  }
1155
- }, tt = new WeakSet(), _e = function(i) {
1156
- const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoTargetRoute: r, videoType: l, videoIgHtml: c } = t.params, u = new Ye({ callback_loaded: (p) => {
1153
+ }, K = new WeakSet(), De = function(i) {
1154
+ const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoTargetRoute: r, videoType: l, videoIgHtml: c } = t.params, u = new Fe({ callback_loaded: (p) => {
1157
1155
  } });
1158
1156
  if (o == "onBox") {
1159
1157
  const p = {
@@ -1182,7 +1180,7 @@ K = new WeakSet(), De = function() {
1182
1180
  },
1183
1181
  close(g) {
1184
1182
  const m = g.querySelectorAll("[data-overlayscrollbars-viewport]");
1185
- Li([...m]);
1183
+ Ai([...m]);
1186
1184
  },
1187
1185
  destroy(g) {
1188
1186
  }
@@ -1211,7 +1209,7 @@ K = new WeakSet(), De = function() {
1211
1209
  };
1212
1210
  Object.assign(qs.prototype, O);
1213
1211
  customElements.define("video-player", xs);
1214
- const Ne = {
1212
+ const Oe = {
1215
1213
  "zh-tw": {
1216
1214
  臺北市: [
1217
1215
  ["中正區", "100"],
@@ -2041,7 +2039,7 @@ const Ne = {
2041
2039
  ]
2042
2040
  }
2043
2041
  }, Is = (n) => {
2044
- const { TEMPLATE: i } = Ie, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
2042
+ const { TEMPLATE: i } = qe, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
2045
2043
  e.innerHTML = i(
2046
2044
  s,
2047
2045
  o,
@@ -2113,24 +2111,24 @@ const Ne = {
2113
2111
  break;
2114
2112
  }
2115
2113
  }
2116
- }, Ns = (n) => {
2114
+ }, Ps = (n) => {
2117
2115
  const i = n.s.cityLang;
2118
- n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Ne[i]).forEach((t) => {
2116
+ n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(Oe[i]).forEach((t) => {
2119
2117
  const e = document.createElement("li");
2120
2118
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2121
2119
  }), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
2122
- }, Ps = (n, i) => {
2120
+ }, Ns = (n, i) => {
2123
2121
  const t = n.s.cityLang;
2124
- Ne[t][i].forEach((e, s) => {
2122
+ Oe[t][i].forEach((e, s) => {
2125
2123
  const o = document.createElement("li");
2126
2124
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2127
2125
  });
2128
2126
  }, _i = () => {
2129
- A('dropdown-el[d4-status="open"]').forEach((i) => {
2127
+ L('dropdown-el[d4-status="open"]').forEach((i) => {
2130
2128
  i.close();
2131
2129
  });
2132
2130
  }, js = () => {
2133
- const { SETTINGS: n } = Ie;
2131
+ const { SETTINGS: n } = qe;
2134
2132
  ((t, e) => {
2135
2133
  Object.keys(e).forEach((s) => {
2136
2134
  t.style.setProperty(`--${s}`, e[s]);
@@ -2141,14 +2139,14 @@ js();
2141
2139
  document.addEventListener("click", function() {
2142
2140
  _i();
2143
2141
  });
2144
- var It, $i, Ot, xi, Nt, Ci, Pt, Hi;
2142
+ var It, $i, Ot, xi, Pt, Ci, Nt, Hi;
2145
2143
  class ki extends HTMLElement {
2146
2144
  constructor() {
2147
2145
  super();
2148
2146
  h(this, It);
2149
2147
  h(this, Ot);
2150
- h(this, Nt);
2151
2148
  h(this, Pt);
2149
+ h(this, Nt);
2152
2150
  this.initialize = !1;
2153
2151
  }
2154
2152
  static get observedAttributes() {
@@ -2223,11 +2221,11 @@ class ki extends HTMLElement {
2223
2221
  It = new WeakSet(), $i = function() {
2224
2222
  this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Ot, xi).call(this);
2225
2223
  }, Ot = new WeakSet(), xi = function() {
2226
- this.s.childDom = this.childNodes, this.s.template = Is(this), this.innerHTML = "", this.append(this.s.template), d(this, Nt, Ci).call(this);
2227
- }, Nt = new WeakSet(), Ci = function() {
2224
+ this.s.childDom = this.childNodes, this.s.template = Is(this), this.innerHTML = "", this.append(this.s.template), d(this, Pt, Ci).call(this);
2225
+ }, Pt = new WeakSet(), Ci = function() {
2228
2226
  var s;
2229
2227
  const t = this;
2230
- t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Ns(t), t.s.subDropdownTotalH = 0;
2228
+ t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Ps(t), t.s.subDropdownTotalH = 0;
2231
2229
  const e = t.getAttribute("d4-value");
2232
2230
  switch (t.s.selectType) {
2233
2231
  case "single":
@@ -2236,7 +2234,7 @@ It = new WeakSet(), $i = function() {
2236
2234
  const r = document.querySelector(`dropdown-el[dist-select="${t.id}"]`), l = r ? r.getAttribute("d4-value") !== "" : !1;
2237
2235
  if (r && l) {
2238
2236
  const c = r.getAttribute("d4-value");
2239
- if (Ps(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2237
+ if (Ns(t, c), t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.classList.remove("disabled"), t.getAttribute("d4-value") !== "") {
2240
2238
  const u = e.split(",")[1];
2241
2239
  o = t.querySelector(`.dropdown-list li[data-option="${u}"]`), t.setAttribute("d4-value", u);
2242
2240
  }
@@ -2269,8 +2267,8 @@ It = new WeakSet(), $i = function() {
2269
2267
  };
2270
2268
  break;
2271
2269
  }
2272
- x(t, t.s.value.index), d(s = t, Pt, Hi).call(s), t.classList.add("d4-initialize");
2273
- }, Pt = new WeakSet(), Hi = function() {
2270
+ x(t, t.s.value.index), d(s = t, Nt, Hi).call(s), t.classList.add("d4-initialize");
2271
+ }, Nt = new WeakSet(), Hi = function() {
2274
2272
  const t = this;
2275
2273
  t.__events__.dropdownToggle = () => {
2276
2274
  t.addEventListener("click", function(e) {
@@ -2316,7 +2314,7 @@ It = new WeakSet(), $i = function() {
2316
2314
  t.s.dropdownEl.addEventListener("transitionend", e);
2317
2315
  }, t.__events__.bindScrollbar = (e = this) => {
2318
2316
  const s = e.querySelector(".dropdown-scroller");
2319
- e.__scroller__ = qe(s, {
2317
+ e.__scroller__ = Me(s, {
2320
2318
  overflowBehavior: {
2321
2319
  x: "hidden"
2322
2320
  }
@@ -2332,8 +2330,8 @@ It = new WeakSet(), $i = function() {
2332
2330
  c.stopPropagation();
2333
2331
  const f = u.querySelector(".sub-dropdown"), b = f.querySelector(".sub-dropdown-list"), y = parseInt(getComputedStyle(b).marginTop) + parseInt(getComputedStyle(b).marginBottom);
2334
2332
  f.style.cssText = `--height: ${b.offsetHeight + y}px`;
2335
- const H = parseInt(f.style.cssText.replace("--height:", "").trim()), B = parseInt(getComputedStyle(a).maxHeight), S = () => {
2336
- s = g + e.s.subDropdownTotalH, o = s > B ? B : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2333
+ const H = parseInt(f.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), S = () => {
2334
+ s = g + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2337
2335
  };
2338
2336
  u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= H, S()) : (u.classList.add("open"), e.s.subDropdownTotalH += H, S());
2339
2337
  const R = () => {
@@ -2345,7 +2343,7 @@ It = new WeakSet(), $i = function() {
2345
2343
  case "single":
2346
2344
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2347
2345
  const f = e.s.cityLang, b = l.textContent.trim(), y = document.getElementById(e.getAttribute("dist-select"));
2348
- y && (y.querySelector(".dropdown-list").textContent = "", x(y, -1), Ne[f][b].forEach((H, B) => {
2346
+ y && (y.querySelector(".dropdown-list").textContent = "", x(y, -1), Oe[f][b].forEach((H, G) => {
2349
2347
  const S = document.createElement("li");
2350
2348
  S.textContent = H[0], S.setAttribute("data-option", H[0]), y.querySelector(".dropdown-list").append(S);
2351
2349
  }), e.__events__.selectOption(y));
@@ -2388,7 +2386,7 @@ It = new WeakSet(), $i = function() {
2388
2386
  };
2389
2387
  Object.assign(ki.prototype, O);
2390
2388
  customElements.define("dropdown-el", ki);
2391
- function dt(n) {
2389
+ function ct(n) {
2392
2390
  const i = {};
2393
2391
  return [...n.attributes].forEach((t) => {
2394
2392
  if (t.name.includes("duration-")) {
@@ -2398,9 +2396,9 @@ function dt(n) {
2398
2396
  }), Object.keys(i).length === 0 ? null : i;
2399
2397
  }
2400
2398
  function Be(n) {
2401
- if (dt(n)) {
2399
+ if (ct(n)) {
2402
2400
  let i;
2403
- const t = Object.keys(dt(n)).map((e) => ({
2401
+ const t = Object.keys(ct(n)).map((e) => ({
2404
2402
  value: e,
2405
2403
  point: e
2406
2404
  }));
@@ -2409,7 +2407,7 @@ function Be(n) {
2409
2407
  const { point: s, value: o } = t[e];
2410
2408
  window.matchMedia(`(max-width: ${o}px)`).matches && (i = s);
2411
2409
  }
2412
- return i ? Number(dt(n)[i]) : n.s.options.duration;
2410
+ return i ? Number(ct(n)[i]) : n.s.options.duration;
2413
2411
  } else
2414
2412
  return n.s.options.duration;
2415
2413
  }
@@ -2486,14 +2484,14 @@ function Ws(n) {
2486
2484
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2487
2485
  };
2488
2486
  }
2489
- var jt, Mi, zt, qi, Wt, Ii, Gt, Oi;
2490
- class Gs extends HTMLElement {
2487
+ var jt, Mi, zt, qi, Wt, Ii, Bt, Oi;
2488
+ class Bs extends HTMLElement {
2491
2489
  constructor() {
2492
2490
  super();
2493
2491
  h(this, jt);
2494
2492
  h(this, zt);
2495
2493
  h(this, Wt);
2496
- h(this, Gt);
2494
+ h(this, Bt);
2497
2495
  this.initialize = !1;
2498
2496
  }
2499
2497
  static get observedAttributes() {
@@ -2519,7 +2517,7 @@ jt = new WeakSet(), Mi = function() {
2519
2517
  // normal / alternate / endStop
2520
2518
  duration: Number(this.getAttribute("duration")) || $.SETTINGS.duration,
2521
2519
  // ms
2522
- durationBreakpoints: dt(this) || $.SETTINGS.durationBreakpoints,
2520
+ durationBreakpoints: ct(this) || $.SETTINGS.durationBreakpoints,
2523
2521
  autoplay: this.getAttribute("autoplay") || $.SETTINGS.autoplay,
2524
2522
  // normal / alternate / endStop
2525
2523
  pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : $.SETTINGS.pauseOnMouseenter,
@@ -2541,7 +2539,7 @@ jt = new WeakSet(), Mi = function() {
2541
2539
  e ? this.style.cssText = `height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;` : this.style.cssText = `min-height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${s}px;`;
2542
2540
  break;
2543
2541
  }
2544
- d(this, Wt, Ii).call(this), d(this, Gt, Oi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2542
+ d(this, Wt, Ii).call(this), d(this, Bt, Oi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2545
2543
  }, Wt = new WeakSet(), Ii = function() {
2546
2544
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2547
2545
  let c;
@@ -2607,7 +2605,7 @@ jt = new WeakSet(), Mi = function() {
2607
2605
  }), t.addEventListener("mouseleave", function() {
2608
2606
  t.s.animation && r && t.s.animation.playState === "paused" && t.play();
2609
2607
  });
2610
- }, Gt = new WeakSet(), Oi = function() {
2608
+ }, Bt = new WeakSet(), Oi = function() {
2611
2609
  const t = this;
2612
2610
  function e() {
2613
2611
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
@@ -2622,14 +2620,14 @@ jt = new WeakSet(), Mi = function() {
2622
2620
  }
2623
2621
  window.addEventListener("resize", Ws(e));
2624
2622
  };
2625
- customElements.define("marquee-el", Gs);
2626
- const pt = function(n, i) {
2623
+ customElements.define("marquee-el", Bs);
2624
+ const ht = function(n, i) {
2627
2625
  let t;
2628
2626
  return function(e) {
2629
2627
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2630
2628
  };
2631
2629
  }, k = (n, i) => {
2632
- if (lt(n)) {
2630
+ if (rt(n)) {
2633
2631
  n.forEach((t) => {
2634
2632
  t.classList.add(i);
2635
2633
  });
@@ -2637,7 +2635,7 @@ const pt = function(n, i) {
2637
2635
  }
2638
2636
  n.classList.add(i);
2639
2637
  }, D = (n, i) => {
2640
- if (lt(n)) {
2638
+ if (rt(n)) {
2641
2639
  n.forEach((t) => {
2642
2640
  t.classList.remove(i);
2643
2641
  });
@@ -2645,22 +2643,22 @@ const pt = function(n, i) {
2645
2643
  }
2646
2644
  n.classList.remove(i);
2647
2645
  };
2648
- var Bt, Ni, Rt, Pi, Xt, ji, et, ke, W, ut, Ft, zi;
2649
- class Re {
2646
+ var Gt, Pi, Rt, Ni, Xt, ji, tt, _e, W, dt, Ft, zi;
2647
+ class Ge {
2650
2648
  constructor(i) {
2651
2649
  // 初始化
2652
- h(this, Bt);
2650
+ h(this, Gt);
2653
2651
  // 左右箭頭事件綁定
2654
2652
  h(this, Rt);
2655
2653
  // 左右拖拉事件綁定
2656
2654
  h(this, Xt);
2657
2655
  // 卷軸位置判斷
2658
- h(this, et);
2656
+ h(this, tt);
2659
2657
  // 隱藏按鈕判斷
2660
2658
  h(this, W);
2661
2659
  // 選項事件綁定
2662
2660
  h(this, Ft);
2663
- this.$element = i, this.option = i.s.option.drag, d(this, Bt, Ni).call(this);
2661
+ this.$element = i, this.option = i.s.option.drag, d(this, Gt, Pi).call(this);
2664
2662
  }
2665
2663
  // 更新 active 位置
2666
2664
  update(i) {
@@ -2674,7 +2672,7 @@ class Re {
2674
2672
  }
2675
2673
  }
2676
2674
  }
2677
- Bt = new WeakSet(), Ni = function() {
2675
+ Gt = new WeakSet(), Pi = function() {
2678
2676
  var e, s, o, a, r, l;
2679
2677
  const i = this;
2680
2678
  if (!i.$element)
@@ -2682,9 +2680,9 @@ Bt = new WeakSet(), Ni = function() {
2682
2680
  i.$container = i.$element.querySelector(".drag-container"), i.$wrapper = i.$container.querySelector(".wrapper");
2683
2681
  const t = () => {
2684
2682
  var c, u;
2685
- d(c = i, et, ke).call(c), d(u = i, W, ut).call(u);
2683
+ d(c = i, tt, _e).call(c), d(u = i, W, dt).call(u);
2686
2684
  };
2687
- i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", pt(t)), window.addEventListener("resize", pt(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Xt, ji).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2685
+ i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", ht(t)), window.addEventListener("resize", ht(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Xt, ji).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2688
2686
  E.prepend,
2689
2687
  `<div class="navigation">
2690
2688
  <div class="button prev">
@@ -2694,10 +2692,8 @@ Bt = new WeakSet(), Ni = function() {
2694
2692
  <div></div>
2695
2693
  </div>
2696
2694
  </div>`
2697
- ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Rt, Pi).call(o)), d(a = i, et, ke).call(a), d(r = i, W, ut).call(r), d(l = i, Ft, zi).call(l), setTimeout(() => {
2698
- i.update();
2699
- }, 10);
2700
- }, Rt = new WeakSet(), Pi = function() {
2695
+ ), i.$button = (s = i.$container) == null ? void 0 : s.querySelectorAll(".button"), d(o = i, Rt, Ni).call(o)), d(a = i, tt, _e).call(a), d(r = i, W, dt).call(r), d(l = i, Ft, zi).call(l), i.update();
2696
+ }, Rt = new WeakSet(), Ni = function() {
2701
2697
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2702
2698
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
2703
2699
  t.scrollTo({
@@ -2705,7 +2701,7 @@ Bt = new WeakSet(), Ni = function() {
2705
2701
  behavior: "smooth"
2706
2702
  }), setTimeout(() => {
2707
2703
  var r;
2708
- d(r = i, W, ut).call(r);
2704
+ d(r = i, W, dt).call(r);
2709
2705
  }, 100);
2710
2706
  };
2711
2707
  e.forEach((o) => {
@@ -2736,15 +2732,15 @@ Bt = new WeakSet(), Ni = function() {
2736
2732
  };
2737
2733
  i.removeEventListener("mousemove", c), i.addEventListener("mousemove", c);
2738
2734
  const u = function(p) {
2739
- e && Math.abs(p.pageX - s) > 5 && (p.preventDefault(), p.stopPropagation());
2735
+ e && (p.preventDefault(), p.stopPropagation());
2740
2736
  };
2741
2737
  i.querySelectorAll("a").forEach((p) => {
2742
2738
  p.removeEventListener("click", u), p.addEventListener("click", u);
2743
2739
  });
2744
- }, et = new WeakSet(), ke = function() {
2740
+ }, tt = new WeakSet(), _e = function() {
2745
2741
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = t.scrollLeft;
2746
2742
  e <= 0 || (k(i, "scrollable"), s == 0 ? (D(i, "scrollable"), k(t, "start"), D(t, "end")) : s >= e ? (D(i, "scrollable"), D(t, "start"), k(t, "end")) : (k(t, "center"), D(t, "start"), D(t, "end")));
2747
- }, W = new WeakSet(), ut = function() {
2743
+ }, W = new WeakSet(), dt = function() {
2748
2744
  const { $wrapper: i, $button: t, $element: e } = this;
2749
2745
  if (!t)
2750
2746
  return;
@@ -2780,8 +2776,8 @@ Bt = new WeakSet(), Ni = function() {
2780
2776
  s.removeEventListener("click", e), s.addEventListener("click", e);
2781
2777
  });
2782
2778
  };
2783
- var Yt, Wi, Ut, Gi, Jt, Bi, Zt, Ri;
2784
- class Bs {
2779
+ var Yt, Wi, Ut, Bi, Jt, Gi, Zt, Ri;
2780
+ class Gs {
2785
2781
  constructor(i) {
2786
2782
  // 初始化
2787
2783
  h(this, Yt);
@@ -2795,11 +2791,11 @@ class Bs {
2795
2791
  }
2796
2792
  }
2797
2793
  Yt = new WeakSet(), Wi = function() {
2798
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Ut, Gi).call(this) && d(this, Jt, Bi).call(this), d(this, Zt, Ri).call(this));
2799
- }, Ut = new WeakSet(), Gi = function() {
2794
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Ut, Bi).call(this) && d(this, Jt, Gi).call(this), d(this, Zt, Ri).call(this));
2795
+ }, Ut = new WeakSet(), Bi = function() {
2800
2796
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2801
2797
  return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(E.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), !0) : !1;
2802
- }, Jt = new WeakSet(), Bi = function() {
2798
+ }, Jt = new WeakSet(), Gi = function() {
2803
2799
  const { $element: i, $button: t } = this, e = function() {
2804
2800
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
2805
2801
  };
@@ -2822,16 +2818,16 @@ const Rs = (n) => {
2822
2818
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2823
2819
  return i == "drag" && (s.innerHTML = C.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e)), i == "collapse" && (s.innerHTML = C.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(E.append, e)), i == "dropdown" && (s.innerHTML = C.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(E.append, e)), s.children;
2824
2820
  };
2825
- var Qt, Xi, Vt, Fi, it, $e, G, ht;
2821
+ var Qt, Xi, Vt, Fi, et, ke, B, ut;
2826
2822
  class Xs extends HTMLElement {
2827
2823
  constructor() {
2828
2824
  super();
2829
2825
  h(this, Qt);
2830
2826
  h(this, Vt);
2831
2827
  // 斷點設定
2832
- h(this, it);
2828
+ h(this, et);
2833
2829
  // check type
2834
- h(this, G);
2830
+ h(this, B);
2835
2831
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2836
2832
  }
2837
2833
  static get observedAttributes() {
@@ -2843,7 +2839,7 @@ class Xs extends HTMLElement {
2843
2839
  case "m4-type":
2844
2840
  if (e === null || e === s)
2845
2841
  return;
2846
- this.s.type = s, d(this, G, ht).call(this);
2842
+ this.s.type = s, d(this, B, ut).call(this);
2847
2843
  break;
2848
2844
  case "m4-status":
2849
2845
  if (e === s)
@@ -2855,7 +2851,7 @@ class Xs extends HTMLElement {
2855
2851
  c.classList.remove("active");
2856
2852
  }), (o = this.querySelector(`.drag-container .item[data-option="${s}"]`)) == null || o.classList.add("active"), l === "collapse" && (this.querySelectorAll(".collapse-container .item").forEach((c) => {
2857
2853
  c.classList.remove("active");
2858
- }), (a = this.querySelector(`.collapse-container .item[data-option="${s}"]`)) == null || a.classList.add("active")), (r = this.drag) == null || r.update(this);
2854
+ }), (a = this.querySelector(`.collapse-container .item[data-option="${s}"]`)) == null || a.classList.add("active")), (r = this.constructor.drag) == null || r.update(this);
2859
2855
  break;
2860
2856
  }
2861
2857
  }
@@ -2863,7 +2859,7 @@ class Xs extends HTMLElement {
2863
2859
  this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, Qt, Xi).call(this));
2864
2860
  }
2865
2861
  update() {
2866
- d(this, it, $e).call(this);
2862
+ d(this, et, ke).call(this);
2867
2863
  }
2868
2864
  }
2869
2865
  Qt = new WeakSet(), Xi = function() {
@@ -2877,42 +2873,42 @@ Qt = new WeakSet(), Xi = function() {
2877
2873
  }
2878
2874
  this.update();
2879
2875
  };
2880
- window.removeEventListener("resize", pt(e)), window.addEventListener("resize", pt(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, C.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, C.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, C.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, C.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Vt, Fi).call(this);
2876
+ window.removeEventListener("resize", ht(e)), window.addEventListener("resize", ht(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, C.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, C.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, C.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, C.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, Vt, Fi).call(this);
2881
2877
  }, Vt = new WeakSet(), Fi = function() {
2882
- this.classList.add("m4-init"), d(this, it, $e).call(this);
2883
- }, it = new WeakSet(), $e = function() {
2878
+ this.classList.add("m4-init"), d(this, et, ke).call(this);
2879
+ }, et = new WeakSet(), ke = function() {
2884
2880
  const t = Object.keys(this.s.option.breakpoint);
2885
2881
  if (!t.length) {
2886
- d(this, G, ht).call(this);
2882
+ d(this, B, ut).call(this);
2887
2883
  return;
2888
2884
  }
2889
2885
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
2890
2886
  var s, o, a, r;
2891
- return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, console.log(this.s.type, "123"), this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown), d(this, G, ht).call(this)), window.innerWidth >= e;
2887
+ return window.innerWidth >= e && (this.s.type = (s = this.s.option.breakpoint[e]) == null ? void 0 : s.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (o = this.s.option.breakpoint[e]) == null ? void 0 : o.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (a = this.s.option.breakpoint[e]) == null ? void 0 : a.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (r = this.s.option.breakpoint[e]) == null ? void 0 : r.dropdown)), d(this, B, ut).call(this), window.innerWidth >= e;
2892
2888
  });
2893
- }, G = new WeakSet(), ht = function() {
2889
+ }, B = new WeakSet(), ut = function() {
2894
2890
  var o;
2895
2891
  const { type: t } = this.s;
2896
- console.log(t, "type"), this.innerHTML = "", [...Rs(this)].forEach((a) => {
2892
+ this.innerHTML = "", [...Rs(this)].forEach((a) => {
2897
2893
  this.append(a);
2898
2894
  });
2899
2895
  const e = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), s = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
2900
2896
  switch (e == null || e.classList.add("active"), s == null || s.classList.add("active"), t) {
2901
2897
  case "drag":
2902
2898
  setTimeout(() => {
2903
- this.drag = new Re(this);
2899
+ this.constructor.drag = new Ge(this);
2904
2900
  }, 10);
2905
2901
  break;
2906
2902
  case "collapse":
2907
2903
  setTimeout(() => {
2908
- this.drag = new Re(this), this.collapse = new Bs(this);
2904
+ this.constructor.drag = new Ge(this), this.constructor.collapse = new Gs(this);
2909
2905
  }, 10);
2910
2906
  break;
2911
2907
  }
2912
- (o = this.drag) == null || o.update(this);
2908
+ (o = this.constructor.drag) == null || o.update(this);
2913
2909
  };
2914
2910
  customElements.define("multipurpose-nav", Xs);
2915
- var Kt, Ui, te, Ji, st, xe, P, F, ee, Zi, ie, Qi, se, Vi, ne, Ki, oe, ts, ae, es, re, is, le, ss, ce, ns, q, z, de, os, ue, as, he, rs, pe, ls;
2911
+ var Kt, Ui, te, Ji, it, $e, N, F, ee, Zi, ie, Qi, se, Vi, ne, Ki, oe, ts, ae, es, re, is, le, ss, ce, ns, q, z, de, os, ue, as, he, rs, pe, ls;
2916
2912
  class Yi extends HTMLElement {
2917
2913
  // 定義組件的初始狀態
2918
2914
  constructor(t, e) {
@@ -2920,9 +2916,9 @@ class Yi extends HTMLElement {
2920
2916
  h(this, Kt);
2921
2917
  h(this, te);
2922
2918
  // 第一關 判斷數量以及id設定
2923
- h(this, st);
2919
+ h(this, it);
2924
2920
  // 第二關 id命名提醒
2925
- h(this, P);
2921
+ h(this, N);
2926
2922
  h(this, ee);
2927
2923
  h(this, ie);
2928
2924
  h(this, se);
@@ -2972,28 +2968,28 @@ class Yi extends HTMLElement {
2972
2968
  setActiveTab(t) {
2973
2969
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
2974
2970
  e.activeTab = s, this.setAttribute("t4-active", s);
2975
- const o = d(this, P, F).call(this, s);
2971
+ const o = d(this, N, F).call(this, s);
2976
2972
  e.tabPanels.forEach((a, r) => {
2977
2973
  r === o ? d(this, ue, as).call(this, r) : d(this, de, os).call(this, r);
2978
2974
  });
2979
2975
  }
2980
2976
  // 外部呼叫方法 $0.goNext()
2981
2977
  goNext() {
2982
- const t = d(this, P, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2978
+ const t = d(this, N, F).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2983
2979
  this.setActiveTab(s);
2984
2980
  }
2985
2981
  // 外部呼叫方法 $0.goPrev()
2986
2982
  goPrev() {
2987
- const t = d(this, P, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2983
+ const t = d(this, N, F).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
2988
2984
  this.setActiveTab(s);
2989
2985
  }
2990
2986
  // 外部呼叫方法 $0.update()
2991
2987
  update() {
2992
- this.t.tabs = d(this, st, xe).call(this), cs(), console.log("tab update!!!!");
2988
+ this.t.tabs = d(this, it, $e).call(this), cs(), console.log("tab update!!!!");
2993
2989
  }
2994
2990
  }
2995
2991
  Kt = new WeakSet(), Ui = function() {
2996
- const t = this.getAttribute("t4-name"), { SETTINGS: e } = Je;
2992
+ const t = this.getAttribute("t4-name"), { SETTINGS: e } = Ue;
2997
2993
  document.querySelectorAll(`tab-el[t4-name=${t}]`).length > 1 && console.warn(t, "名字有重複喔!!!"), this.t = {
2998
2994
  tabs: [],
2999
2995
  name: t,
@@ -3012,19 +3008,19 @@ Kt = new WeakSet(), Ui = function() {
3012
3008
  delay: this.getAttribute("t4-delay") || e.transition.delay
3013
3009
  },
3014
3010
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
3015
- }, this.__events__ = {}, this.t.tabs = d(this, st, xe).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, te, Ji).call(this);
3011
+ }, this.__events__ = {}, this.t.tabs = d(this, it, $e).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, te, Ji).call(this);
3016
3012
  }, te = new WeakSet(), Ji = function() {
3017
3013
  if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, ee, Zi).call(this), this.t.recordUrl) {
3018
3014
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
3019
3015
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
3020
3016
  }
3021
3017
  this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, pe, ls).call(this);
3022
- }, st = new WeakSet(), xe = function() {
3018
+ }, it = new WeakSet(), $e = function() {
3023
3019
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
3024
3020
  return t.type === "normal" && t.tabGroup === "true" && t.tabPanels.length !== e.length && console.warn("按鈕與內容數量不同喔", t.tabPanels.length, e.length), t.tabGroup === "true" ? t.tabPanels.forEach((s, o) => s.setAttribute("t4-id", o)) : t.tabPanels.forEach((s) => {
3025
3021
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
3026
3022
  }), e;
3027
- }, P = new WeakSet(), F = function(t) {
3023
+ }, N = new WeakSet(), F = function(t) {
3028
3024
  const { t: e } = this, s = e.tabPanels.filter((a) => a.getAttribute("t4-id") === t);
3029
3025
  s.length > 1 && console.warn("有兩個相同id設定", s);
3030
3026
  const o = s[0];
@@ -3140,7 +3136,7 @@ Kt = new WeakSet(), Ui = function() {
3140
3136
  break;
3141
3137
  }
3142
3138
  }, he = new WeakSet(), rs = function(t) {
3143
- const e = d(this, P, F).call(this, t);
3139
+ const e = d(this, N, F).call(this, t);
3144
3140
  d(this, q, z).call(this, "step", e), d(this, q, z).call(this, "btnState", e), d(this, q, z).call(this, "tabState", e, t), d(this, q, z).call(this, "tabUrl", t), this.emit("change");
3145
3141
  }, pe = new WeakSet(), ls = function() {
3146
3142
  const t = this;
@@ -3190,32 +3186,32 @@ function cs() {
3190
3186
  cs();
3191
3187
  Object.assign(Yi.prototype, O);
3192
3188
  customElements.define("tab-el", Yi);
3193
- const Xe = (n) => {
3189
+ const Re = (n) => {
3194
3190
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
3195
3191
  n.classList.add(t), o.style.height = 0, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3196
3192
  }, Ys = (n) => {
3197
3193
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3198
3194
  n.collapse.height = a, n.classList.remove(t), o.style.display = "block", o.style.height = `${a}px`, o.style["transition-property"] = s.property, o.style["transition-duration"] = s.duration, o.style["transition-timing-function"] = s.function, o.style["transition-delay"] = s.delay, o.style.overflow = "hidden";
3199
3195
  };
3200
- var nt, Ce, me, ds, ge, us, ot, He;
3196
+ var st, xe, me, ds, ge, us, nt, Ce;
3201
3197
  class Us {
3202
3198
  constructor(i, t = {}) {
3203
- h(this, nt);
3199
+ h(this, st);
3204
3200
  h(this, me);
3205
3201
  h(this, ge);
3206
- h(this, ot);
3207
- !rt(i) && !ye(i) && !lt(i) && !w(i) || (this.__storage__ = {
3202
+ h(this, nt);
3203
+ !at(i) && !ye(i) && !rt(i) && !w(i) || (this.__storage__ = {
3208
3204
  el: i,
3209
3205
  options: t
3210
- }, this.active = "data-collapse-active", d(this, nt, Ce).call(this));
3206
+ }, this.active = "data-collapse-active", d(this, st, xe).call(this));
3211
3207
  }
3212
3208
  update() {
3213
- d(this, nt, Ce).call(this);
3209
+ d(this, st, xe).call(this);
3214
3210
  }
3215
3211
  }
3216
- nt = new WeakSet(), Ce = function() {
3217
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Ze;
3218
- if (this.elements = t.state == "not active" ? A(i + `:not([${this.active}])`) : A(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3212
+ st = new WeakSet(), xe = function() {
3213
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Je;
3214
+ if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3219
3215
  for (const [o, a] of Object.entries(this.options.on))
3220
3216
  this.__events__[o] = [a];
3221
3217
  d(this, me, ds).call(this);
@@ -3226,17 +3222,17 @@ nt = new WeakSet(), Ce = function() {
3226
3222
  }), this.emit("init");
3227
3223
  }, ge = new WeakSet(), us = function(i) {
3228
3224
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3229
- if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, ot, He)), c.addEventListener("click", d(this, ot, He)), r) {
3225
+ if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, Ce)), c.addEventListener("click", d(this, nt, Ce)), r) {
3230
3226
  const p = (g) => {
3231
3227
  g.stopPropagation();
3232
3228
  };
3233
3229
  u.removeEventListener("click", p), u.addEventListener("click", p);
3234
3230
  }
3235
- }, ot = new WeakSet(), He = function() {
3231
+ }, nt = new WeakSet(), Ce = function() {
3236
3232
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3237
3233
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3238
- Xe(l);
3239
- }), Ys(r)) : Xe(r), i.emit("afterCollapse");
3234
+ Re(l);
3235
+ }), Ys(r)) : Re(r), i.emit("afterCollapse");
3240
3236
  };
3241
3237
  Object.assign(Us.prototype, O);
3242
3238
  function Js(n, i) {
@@ -3252,11 +3248,11 @@ function hs() {
3252
3248
  });
3253
3249
  }
3254
3250
  document.addEventListener("click", hs);
3255
- var at, Me, fe, ps, ve, ms, be, gs;
3251
+ var ot, He, fe, ps, ve, ms, be, gs;
3256
3252
  class Zs extends HTMLElement {
3257
3253
  constructor() {
3258
3254
  super();
3259
- h(this, at);
3255
+ h(this, ot);
3260
3256
  h(this, fe);
3261
3257
  h(this, ve);
3262
3258
  h(this, be);
@@ -3264,14 +3260,14 @@ class Zs extends HTMLElement {
3264
3260
  }
3265
3261
  connectedCallback() {
3266
3262
  const t = this;
3267
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, at, Me).call(this));
3263
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, ot, He).call(this));
3268
3264
  }
3269
3265
  update() {
3270
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, at, Me).call(this);
3266
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, ot, He).call(this);
3271
3267
  }
3272
3268
  }
3273
- at = new WeakSet(), Me = function() {
3274
- const { SETTINGS: t } = Qe;
3269
+ ot = new WeakSet(), He = function() {
3270
+ const { SETTINGS: t } = Ze;
3275
3271
  this.s = {};
3276
3272
  function e(o) {
3277
3273
  let a = !!o;
@@ -3362,7 +3358,7 @@ class Qs {
3362
3358
  this.init();
3363
3359
  }
3364
3360
  }
3365
- function Fe(n, i) {
3361
+ function Xe(n, i) {
3366
3362
  return n ? function(t, e) {
3367
3363
  Function(n)(t, e);
3368
3364
  } : i;
@@ -3476,8 +3472,8 @@ class on {
3476
3472
  previewSize: e.dataset.previewSize || i.params.previewSize,
3477
3473
  compress: e.dataset.compress || i.params.compress,
3478
3474
  on: {
3479
- changeAfter: Fe(e.dataset.changeAfter, i.params.on.changeAfter),
3480
- overLimit: Fe(e.dataset.overLimit, i.params.on.overLimit)
3475
+ changeAfter: Xe(e.dataset.changeAfter, i.params.on.changeAfter),
3476
+ overLimit: Xe(e.dataset.overLimit, i.params.on.overLimit)
3481
3477
  }
3482
3478
  };
3483
3479
  i.params = o, typeof uploadImage[`${o.group}`] > "u" && (uploadImage[`${o.group}`] = []), e.dataset.group || (e.dataset.group = o.group), e.dataset.index = document.querySelectorAll(`[data-group="${o.group}"]`).length - 1, e.addEventListener("change", function(a) {
@@ -3487,13 +3483,13 @@ class on {
3487
3483
  }
3488
3484
  }
3489
3485
  export {
3490
- Ve as A,
3486
+ Qe as A,
3491
3487
  Tn as B,
3492
3488
  Us as C,
3493
3489
  ki as D,
3494
3490
  En as E,
3495
- Ln as F,
3496
- An as G,
3491
+ An as F,
3492
+ Ln as G,
3497
3493
  Sn as H,
3498
3494
  Qs as I,
3499
3495
  Dn as J,
@@ -3510,26 +3506,26 @@ export {
3510
3506
  qn as U,
3511
3507
  In as V,
3512
3508
  On as W,
3513
- Nn as X,
3514
- Pn as Y,
3509
+ Pn as X,
3510
+ Nn as Y,
3515
3511
  w as a,
3516
- lt as b,
3512
+ rt as b,
3517
3513
  Ts as c,
3518
3514
  ws as d,
3519
3515
  Y as e,
3520
3516
  E as f,
3521
- A as g,
3517
+ L as g,
3522
3518
  mn as h,
3523
- rt as i,
3519
+ at as i,
3524
3520
  ui as j,
3525
- Gs as k,
3521
+ Bs as k,
3526
3522
  Xs as l,
3527
3523
  on as m,
3528
3524
  Hs as n,
3529
3525
  jn as o,
3530
3526
  gn as p,
3531
3527
  Ei as q,
3532
- Li as r,
3528
+ Ai as r,
3533
3529
  ys as s,
3534
3530
  fn as t,
3535
3531
  vn as u,