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

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