@xwadex/fesd 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var Es = Object.defineProperty;
2
- var Ls = (n, i, t) => i in n ? Es(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
- var We = (n, i, t) => (Ls(n, typeof i != "symbol" ? i + "" : i, t), t), As = (n, i, t) => {
2
+ var As = (n, i, t) => i in n ? Es(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t;
3
+ var We = (n, i, t) => (As(n, typeof i != "symbol" ? i + "" : i, t), t), Ls = (n, i, t) => {
4
4
  if (!i.has(n))
5
5
  throw TypeError("Cannot " + t);
6
6
  };
@@ -9,15 +9,15 @@ var h = (n, i, t) => {
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  i instanceof WeakSet ? i.add(n) : i.set(n, t);
11
11
  };
12
- var d = (n, i, t) => (As(n, i, "access private method"), t);
13
- import { OverlayScrollbars as Ie } from "overlayscrollbars";
14
- import g from "jquery";
12
+ var d = (n, i, t) => (Ls(n, i, "access private method"), t);
13
+ import { OverlayScrollbars as Ne } from "overlayscrollbars";
14
+ import f from "jquery";
15
15
  import "./vendor-bundle.js";
16
16
  import "validator";
17
17
  import "flatpickr";
18
18
  import Qe from "vanilla-lazyload";
19
19
  import { lock as Ss, unlock as Ds } from "tua-body-scroll-lock";
20
- const Ne = {
20
+ const Pe = {
21
21
  SETTINGS: {
22
22
  videoId: null,
23
23
  videoType: null,
@@ -60,7 +60,7 @@ const Ne = {
60
60
  className: null,
61
61
  duration: 1500
62
62
  }
63
- }, O = {
63
+ }, P = {
64
64
  SETTINGS: {
65
65
  target: null,
66
66
  route: null,
@@ -110,7 +110,7 @@ const Ne = {
110
110
  gap: 30
111
111
  // 跑馬燈內容之間的距離 - Number
112
112
  }
113
- }, Pe = {
113
+ }, je = {
114
114
  SETTINGS: {
115
115
  scrollbar: {
116
116
  "scrollbar-track-color": "transparent",
@@ -138,7 +138,7 @@ const Ne = {
138
138
  </div>`;
139
139
  return t || r;
140
140
  }
141
- }, _s = {
141
+ }, xs = {
142
142
  SETTINGS: {
143
143
  basic_rwd: 900,
144
144
  markdownLink: !1,
@@ -170,7 +170,7 @@ const Ne = {
170
170
  enter: null,
171
171
  leave: null
172
172
  }
173
- }, ut = {
173
+ }, ht = {
174
174
  SETTINGS: {
175
175
  target: null,
176
176
  container: null,
@@ -300,24 +300,24 @@ const Ne = {
300
300
  }
301
301
  }, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
302
302
  __proto__: null,
303
- anchor4: ut,
303
+ anchor4: ht,
304
304
  aost4: Ve,
305
- article4: _s,
305
+ article4: xs,
306
306
  collapse4: ti,
307
- dropdown4: Pe,
307
+ dropdown4: je,
308
308
  marquee4: $,
309
- modal4: O,
309
+ modal4: P,
310
310
  multipurpose4: H,
311
311
  ripple4: ei,
312
312
  share4: ks,
313
313
  tab4: Ke,
314
- video4: Ne
315
- }, Symbol.toStringTag, { value: "Module" })), S = {
314
+ video4: Pe
315
+ }, Symbol.toStringTag, { value: "Module" })), L = {
316
316
  before: "beforebegin",
317
317
  after: "afterend",
318
318
  append: "beforeend",
319
319
  prepend: "afterbegin"
320
- }, rt = (n) => typeof n == "string" && n !== "", Ee = (n) => n instanceof HTMLElement, lt = (n) => n instanceof NodeList, T = (n) => D(n) !== null, j = (n) => typeof n == "function", D = (n) => Ee(n) ? n : document.querySelector(n), k = (n) => lt(n) ? n : document.querySelectorAll(n), xs = () => Math.random().toString(36).substr(2, 9), $s = (n) => {
320
+ }, lt = (n) => typeof n == "string" && n !== "", Ae = (n) => n instanceof HTMLElement, ct = (n) => n instanceof NodeList, E = (n) => D(n) !== null, W = (n) => typeof n == "function", D = (n) => Ae(n) ? n : document.querySelector(n), k = (n) => ct(n) ? n : document.querySelectorAll(n), _s = () => Math.random().toString(36).substr(2, 9), $s = (n) => {
321
321
  const i = document.createElement("div");
322
322
  return i.innerHTML = n, i.childNodes;
323
323
  }, Cs = (n) => {
@@ -327,13 +327,13 @@ const Ne = {
327
327
  return n;
328
328
  }
329
329
  return JSON.parse(n);
330
- }, L = (n, i) => {
330
+ }, A = (n, i) => {
331
331
  console.warn(`[${n} warn]: ${i}`);
332
332
  }, Ge = (n, i) => {
333
333
  console.error(`[${n} error]: ${i}`);
334
- }, I = {
334
+ }, j = {
335
335
  on(n, i) {
336
- if (!j(i))
336
+ if (!W(i))
337
337
  return this;
338
338
  const { __events__: t } = this;
339
339
  return n.split(" ").forEach((e) => {
@@ -349,7 +349,7 @@ const Ne = {
349
349
  }), this;
350
350
  },
351
351
  once(n, i) {
352
- if (!j(i))
352
+ if (!W(i))
353
353
  return this;
354
354
  const t = (...e) => {
355
355
  this.off(n, t), i.apply(this, e);
@@ -359,7 +359,7 @@ const Ne = {
359
359
  emit(...n) {
360
360
  const { __events__: i } = this, t = n[0], e = n.slice(1, n.length);
361
361
  return i[t] ? (i[t].forEach((s) => {
362
- j(s) && s.apply(this, e);
362
+ W(s) && s.apply(this, e);
363
363
  }), this) : this;
364
364
  }
365
365
  }, Hs = {
@@ -373,32 +373,32 @@ const Ne = {
373
373
  return -t * ((n = n / e - 1) * n * n * n - 1) + i;
374
374
  }
375
375
  }, Le = (n, i) => {
376
- 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", f = c ? "width" : "height", m = T(e) ? D(e) : document.scrollingElement, v = m[u], b = T(t) ? D(t).getBoundingClientRect()[p] : 0 - v, y = T(s) ? D(s).getBoundingClientRect()[f] : 0, w = b - a - y, z = 15;
377
- let E = 0;
378
- if (w === 0)
376
+ 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 = E(e) ? D(e) : document.scrollingElement, v = m[u], y = E(t) ? D(t).getBoundingClientRect()[p] : 0 - v, b = E(s) ? D(s).getBoundingClientRect()[g] : 0, T = y - a - b, M = 15;
377
+ let w = 0;
378
+ if (T === 0)
379
379
  return;
380
- const X = (Y) => {
380
+ const q = (I) => {
381
381
  const Be = D(t);
382
- i && i.emit(Y, Be), !i && n.on && j(n.on[Y]) && n.on[Y](Be);
382
+ i && i.emit(I, Be), !i && n.on && W(n.on[I]) && n.on[I](Be);
383
383
  };
384
- X("beforeScroll");
385
- const ze = () => {
386
- E += z;
387
- const Y = Hs[r](E, v, w, o);
388
- m[u] = Y, E < o && requestAnimationFrame(ze), E >= o && X("afterScroll");
384
+ q("beforeScroll");
385
+ const F = () => {
386
+ w += M;
387
+ const I = Hs[r](w, v, T, o);
388
+ m[u] = I, w < o && requestAnimationFrame(F), w >= o && q("afterScroll");
389
389
  };
390
- requestAnimationFrame(ze);
390
+ requestAnimationFrame(F);
391
391
  };
392
- var Z, Ae, ft, si, gt, ni;
392
+ var Q, Se, ft, si, vt, ni;
393
393
  class ii {
394
394
  constructor(i, t = {}) {
395
- h(this, Z);
395
+ h(this, Q);
396
396
  h(this, ft);
397
- h(this, gt);
397
+ h(this, vt);
398
398
  this.__storage__ = {
399
399
  el: i,
400
400
  options: t
401
- }, this.active = "data-anchor-active", d(this, Z, Ae).call(this);
401
+ }, this.active = "data-anchor-active", d(this, Q, Se).call(this);
402
402
  }
403
403
  destroy() {
404
404
  const { elements: i } = this;
@@ -408,16 +408,16 @@ class ii {
408
408
  }
409
409
  update() {
410
410
  var i;
411
- return d(i = this.destroy(), Z, Ae).call(i), this.emit("afterUpdate"), this;
411
+ return d(i = this.destroy(), Q, Se).call(i), this.emit("afterUpdate"), this;
412
412
  }
413
413
  static run(i) {
414
- const { SETTINGS: t } = ut, e = Object.assign({}, t, i);
414
+ const { SETTINGS: t } = ht, e = Object.assign({}, t, i);
415
415
  setTimeout(() => {
416
416
  Le(e);
417
417
  }, e.delay);
418
418
  }
419
419
  static url(i) {
420
- const { SETTINGS: t } = ut, { 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()}"]`);
420
+ const { SETTINGS: t } = ht, { 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()}"]`);
421
421
  if (!a)
422
422
  return;
423
423
  const r = Object.assign({}, t, i, { target: a });
@@ -426,11 +426,11 @@ class ii {
426
426
  }, r.delay);
427
427
  }
428
428
  }
429
- Z = new WeakSet(), Ae = function() {
429
+ Q = new WeakSet(), Se = function() {
430
430
  const { el: i, options: t } = this.__storage__;
431
- if (!rt(i) || !T(i))
431
+ if (!lt(i) || !E(i))
432
432
  return;
433
- const { SETTINGS: e, EVENTS: s } = ut;
433
+ const { SETTINGS: e, EVENTS: s } = ht;
434
434
  if (this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.elements = k(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
435
435
  for (const [o, a] of Object.entries(this.options.on))
436
436
  this.__events__[o] = [a];
@@ -438,9 +438,9 @@ Z = new WeakSet(), Ae = function() {
438
438
  }, ft = new WeakSet(), si = function() {
439
439
  const { elements: i, options: t } = this;
440
440
  i.forEach((e) => {
441
- e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, gt, ni), 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, "");
441
+ e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, vt, ni), 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, "");
442
442
  }), this.emit("afterInit");
443
- }, gt = new WeakSet(), ni = function() {
443
+ }, vt = new WeakSet(), ni = function() {
444
444
  const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
445
445
  target: this.getAttribute("data-anchor-target") || i.target,
446
446
  container: this.getAttribute("data-anchor-container") || i.container,
@@ -457,25 +457,25 @@ Z = new WeakSet(), Ae = function() {
457
457
  Le(s, e);
458
458
  }, s.delay);
459
459
  };
460
- Object.assign(ii.prototype, I);
460
+ Object.assign(ii.prototype, j);
461
461
  window.MODALS || (window.MODALS = {});
462
- const { MODALS: M } = window, Ms = (n) => {
463
- const { TEMPLATE: i } = O, { childDom: t } = n, e = document.createElement("div");
462
+ const { MODALS: O } = window, Ms = (n) => {
463
+ const { TEMPLATE: i } = P, { childDom: t } = n, e = document.createElement("div");
464
464
  e.innerHTML = i(n.getAttribute("data-modal-template-setting"));
465
465
  const s = e.querySelector(".modal-content");
466
466
  return [...t].forEach((o) => {
467
467
  s.append(o);
468
468
  }), e.children[0];
469
469
  };
470
- var vt, ai, bt, ri, yt, li, wt, ci, Tt, di;
470
+ var bt, ai, yt, ri, wt, li, Tt, ci, Et, di;
471
471
  class oi extends HTMLElement {
472
472
  constructor() {
473
473
  super();
474
- h(this, vt);
475
474
  h(this, bt);
476
475
  h(this, yt);
477
476
  h(this, wt);
478
477
  h(this, Tt);
478
+ h(this, Et);
479
479
  this.initialize = !1;
480
480
  }
481
481
  static get observedAttributes() {
@@ -484,12 +484,12 @@ class oi extends HTMLElement {
484
484
  attributeChangedCallback(t, e, s) {
485
485
  switch (t) {
486
486
  case ":state":
487
- d(this, Tt, di).call(this, s);
487
+ d(this, Et, di).call(this, s);
488
488
  break;
489
489
  }
490
490
  }
491
491
  connectedCallback() {
492
- this.initialize || (this.initialize = !0, d(this, vt, ai).call(this));
492
+ this.initialize || (this.initialize = !0, d(this, bt, ai).call(this));
493
493
  }
494
494
  open() {
495
495
  return this.setAttribute(":state", "open"), this;
@@ -501,38 +501,38 @@ class oi extends HTMLElement {
501
501
  return this.setAttribute(":state", "destroy"), this;
502
502
  }
503
503
  }
504
- vt = new WeakSet(), ai = function() {
505
- const { ATTRS: t } = O;
504
+ bt = new WeakSet(), ai = function() {
505
+ const { ATTRS: t } = P;
506
506
  this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
507
- const e = this.getAttribute(t.id) || xs();
508
- this.getAttribute(t.id) || (L(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && L(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, bt, ri).call(this);
509
- }, bt = new WeakSet(), ri = function() {
510
- this.childDom = this.childNodes, this.template = Ms(this), this.innerHTML = "", this.append(this.template), d(this, yt, li).call(this);
511
- }, yt = new WeakSet(), li = function() {
507
+ const e = this.getAttribute(t.id) || _s();
508
+ this.getAttribute(t.id) || (A(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), O[e] && A(`the ${t.id} "${e}" is already be used.`), O[e] = this, d(this, yt, ri).call(this);
509
+ }, yt = new WeakSet(), ri = function() {
510
+ this.childDom = this.childNodes, this.template = Ms(this), this.innerHTML = "", this.append(this.template), d(this, wt, li).call(this);
511
+ }, wt = new WeakSet(), li = function() {
512
512
  const t = this.querySelector(".modal-scroller");
513
- this.__scroller__ = Ie(t, {
513
+ this.__scroller__ = Ne(t, {
514
514
  overflowBehavior: {
515
515
  x: "hidden"
516
516
  },
517
517
  autoUpdate: !0
518
- }), window.modalScroll = this.__scroller__, d(this, wt, ci).call(this);
519
- }, wt = new WeakSet(), ci = function() {
518
+ }), window.modalScroll = this.__scroller__, d(this, Tt, ci).call(this);
519
+ }, Tt = new WeakSet(), ci = function() {
520
520
  var a, r, l;
521
- const t = this, { ATTRS: e } = O, { close: s, destroy: o } = e;
521
+ const t = this, { ATTRS: e } = P, { close: s, destroy: o } = e;
522
522
  (a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
523
523
  c.addEventListener("click", function() {
524
524
  const u = this.getAttribute(s);
525
- (u && M[u] ? M[u] : t).close();
525
+ (u && O[u] ? O[u] : t).close();
526
526
  });
527
527
  }), (r = t.querySelectorAll(`[${o}]`)) == null || r.forEach((c) => {
528
528
  c.addEventListener("click", function() {
529
529
  const u = this.getAttribute(o);
530
- (u && M[u] ? M[u] : t).destroy();
530
+ (u && O[u] ? O[u] : t).destroy();
531
531
  });
532
532
  }), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
533
533
  c.stopPropagation();
534
534
  });
535
- }, Tt = new WeakSet(), di = function(t) {
535
+ }, Et = new WeakSet(), di = function(t) {
536
536
  const { __scroller__: e } = this;
537
537
  if (t === "open") {
538
538
  if (this.style.display = "block", e) {
@@ -557,25 +557,25 @@ vt = new WeakSet(), ai = function() {
557
557
  if (t === "destroy") {
558
558
  this.classList.remove("show");
559
559
  const s = () => {
560
- const { ATTRS: o } = O, a = this.getAttribute(o.id);
561
- this.style.removeProperty("display"), this.emit("close"), this.remove(), this.emit("destroy"), M[a] && delete M[a];
560
+ const { ATTRS: o } = P, a = this.getAttribute(o.id);
561
+ this.style.removeProperty("display"), this.emit("close"), this.remove(), this.emit("destroy"), O[a] && delete O[a];
562
562
  };
563
563
  this.addEventListener("transitionend", s);
564
564
  }
565
565
  };
566
- Object.assign(oi.prototype, I);
567
- const { MODALS: je } = window, ct = {}, ui = (n, i, ...t) => {
566
+ Object.assign(oi.prototype, j);
567
+ const { MODALS: ze } = window, dt = {}, ui = (n, i, ...t) => {
568
568
  if (!i)
569
569
  return;
570
570
  const e = n[i];
571
- e && j(e) && e.apply(n, t);
571
+ e && W(e) && e.apply(n, t);
572
572
  }, hi = (n, ...i) => {
573
- n && j(n) && n.apply(J, i);
573
+ n && W(n) && n.apply(Z, i);
574
574
  }, Re = (n, i) => {
575
- const { target: t } = n, e = je[t] || D(n.target);
575
+ const { target: t } = n, e = ze[t] || D(n.target);
576
576
  e && pi(n, i), e || qs(n, i);
577
577
  }, pi = (n, i) => {
578
- const { target: t, action: e, on: s, e: o } = n, a = je[t] || D(n.target);
578
+ const { target: t, action: e, on: s, e: o } = n, a = ze[t] || D(n.target);
579
579
  switch (["open", "close", "destroy"].forEach((l) => {
580
580
  a.once(l, () => {
581
581
  i && (i.emit(l, a, o), ui(i, s[l], a, o)), i || hi(s[l], a);
@@ -598,31 +598,31 @@ const { MODALS: je } = window, ct = {}, ui = (n, i, ...t) => {
598
598
  }, qs = async (n, i) => {
599
599
  const { target: t, route: e, container: s, on: o, e: a } = n;
600
600
  if (!e)
601
- return L("modal4", "cannot find target or data-modal-route is not defined");
601
+ return A("modal4", "cannot find target or data-modal-route is not defined");
602
602
  const r = (l, ...c) => {
603
603
  i && (i.emit(l, ...c), ui(i, o[l], ...c)), i || hi(o[l], ...c);
604
604
  };
605
- ct[t] || (ct[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
606
- const c = $s(l), u = D(s) || D(O.SETTINGS.container);
607
- [...c].forEach((f) => {
608
- u.append(f);
605
+ dt[t] || (dt[t] = !0, fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
606
+ const c = $s(l), u = D(s) || D(P.SETTINGS.container);
607
+ [...c].forEach((g) => {
608
+ u.append(g);
609
609
  });
610
- const p = je[t] || D(n.target);
611
- r("complete", p), pi(n, i), delete ct[t];
610
+ const p = ze[t] || D(n.target);
611
+ r("complete", p), pi(n, i), delete dt[t];
612
612
  }).catch((l) => {
613
- r("error", l), delete ct[t];
613
+ r("error", l), delete dt[t];
614
614
  }));
615
615
  };
616
- var Q, Se, Et, mi, Lt, fi;
617
- const N = class N {
616
+ var V, De, At, mi, Lt, gi;
617
+ const z = class z {
618
618
  constructor(i, t = {}) {
619
- h(this, Q);
620
- h(this, Et);
619
+ h(this, V);
620
+ h(this, At);
621
621
  h(this, Lt);
622
622
  this.__storage__ = {
623
623
  el: i,
624
624
  options: t
625
- }, this.active = "data-modal-active", d(this, Q, Se).call(this);
625
+ }, this.active = "data-modal-active", d(this, V, De).call(this);
626
626
  }
627
627
  destroy() {
628
628
  const { elements: i } = this;
@@ -632,39 +632,39 @@ const N = class N {
632
632
  }
633
633
  update() {
634
634
  var i;
635
- return d(i = this.destroy(), Q, Se).call(i), this.emit("update"), this;
635
+ return d(i = this.destroy(), V, De).call(i), this.emit("update"), this;
636
636
  }
637
637
  /** static method 'open' */
638
638
  static open(i) {
639
- const { SETTINGS: t } = O, e = Object.assign({}, t, { on: {} }, i);
639
+ const { SETTINGS: t } = P, e = Object.assign({}, t, { on: {} }, i);
640
640
  Re(e);
641
641
  }
642
642
  /** static method 'defineMethods' */
643
643
  static defineMethods(i) {
644
- N.prototype.__methods__ || (N.prototype.__methods__ = {});
645
- const t = N.prototype.__methods__;
644
+ z.prototype.__methods__ || (z.prototype.__methods__ = {});
645
+ const t = z.prototype.__methods__;
646
646
  for (const [e, s] of Object.entries(i))
647
- j(s) && (t[e] = s);
648
- Object.assign(N.prototype, N.prototype.__methods__);
647
+ W(s) && (t[e] = s);
648
+ Object.assign(z.prototype, z.prototype.__methods__);
649
649
  }
650
650
  };
651
- Q = new WeakSet(), Se = function() {
651
+ V = new WeakSet(), De = function() {
652
652
  const { el: i, options: t } = this.__storage__;
653
- if (!rt(i) || !T(i))
653
+ if (!lt(i) || !E(i))
654
654
  return;
655
- const { SETTINGS: e, EVENTS: s } = O;
655
+ const { SETTINGS: e, EVENTS: s } = P;
656
656
  if (this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
657
657
  for (const [o, a] of Object.entries(this.options.on))
658
658
  this.__events__[o] = [a];
659
- d(this, Et, mi).call(this);
660
- }, Et = new WeakSet(), mi = function() {
659
+ d(this, At, mi).call(this);
660
+ }, At = new WeakSet(), mi = function() {
661
661
  const { elements: i, options: t } = this;
662
662
  i.forEach((e) => {
663
- e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Lt, fi), 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, "");
663
+ e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Lt, gi), 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, "");
664
664
  }), this.emit("init");
665
- }, Lt = new WeakSet(), fi = function(i) {
665
+ }, Lt = new WeakSet(), gi = function(i) {
666
666
  const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = Cs(this.getAttribute("data-modal-on"));
667
- o && typeof o != "object" && L("modal4", "data-modal-on must be a json string.");
667
+ o && typeof o != "object" && A("modal4", "data-modal-on must be a json string.");
668
668
  const a = {
669
669
  target: this.getAttribute("data-modal-target") || t.target,
670
670
  action: this.getAttribute("data-modal-action") || t.action,
@@ -677,40 +677,40 @@ Q = new WeakSet(), Se = function() {
677
677
  this.addEventListener("click", e);
678
678
  }, 200), Re(a, s);
679
679
  };
680
- let J = N;
681
- Object.assign(J.prototype, I);
680
+ let Z = z;
681
+ Object.assign(Z.prototype, j);
682
682
  customElements.define("modern-modal", oi);
683
- const Os = (n, i) => {
683
+ const Is = (n, i) => {
684
684
  const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
685
685
  i.forEach((s) => {
686
- const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom: f } = s.getBoundingClientRect(), m = t * (r / 100), v = t * (l / 100);
687
- if (p - e <= m && f - e >= v && s.offsetParent)
686
+ const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom: g } = s.getBoundingClientRect(), m = t * (r / 100), v = t * (l / 100);
687
+ if (p - e <= m && g - e >= v && s.offsetParent)
688
688
  setTimeout(() => {
689
689
  s.classList.add(o);
690
690
  }, a);
691
691
  else {
692
- const y = s.classList.contains(o) && c === "down" && p - e >= m || c === "up" && f - e <= v || c === !0;
692
+ const b = s.classList.contains(o) && c === "down" && p - e >= m || c === "up" && g - e <= v || c === !0;
693
693
  setTimeout(() => {
694
- y && s.classList.remove(o);
694
+ b && s.classList.remove(o);
695
695
  }, a);
696
696
  }
697
697
  });
698
- }, Is = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
699
- var V, De, At, vi;
700
- class gi {
698
+ }, Os = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
699
+ var K, ke, St, vi;
700
+ class fi {
701
701
  constructor(i, t = {}) {
702
- h(this, V);
703
- h(this, At);
702
+ h(this, K);
703
+ h(this, St);
704
704
  this.__storage__ = {
705
705
  el: i,
706
706
  options: t
707
- }, this.active = "data-aost-active", d(this, V, De).call(this);
707
+ }, this.active = "data-aost-active", d(this, K, ke).call(this);
708
708
  }
709
709
  destroy(i) {
710
710
  const { elements: t, options: e } = this;
711
711
  if (!t)
712
712
  return this;
713
- const { scroller: s } = e, o = s === window || !T(s) ? window : D(s);
713
+ const { scroller: s } = e, o = s === window || !E(s) ? window : D(s);
714
714
  return o.aost && (o.removeEventListener("scroll", o.aost.eventHandler), delete o.aost), t.forEach((a) => {
715
715
  if (!a.aost)
716
716
  return;
@@ -720,58 +720,58 @@ class gi {
720
720
  }
721
721
  update(i) {
722
722
  var t;
723
- d(t = this.destroy(i), V, De).call(t);
723
+ d(t = this.destroy(i), K, ke).call(t);
724
724
  }
725
725
  }
726
- V = new WeakSet(), De = function() {
726
+ K = new WeakSet(), ke = function() {
727
727
  const { el: i, options: t } = this.__storage__;
728
- if (!rt(i) || !T(i))
728
+ if (!lt(i) || !E(i))
729
729
  return;
730
730
  const { SETTINGS: e, EVENTS: s } = Ve;
731
731
  if (this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
732
732
  for (const [o, a] of Object.entries(this.options.on))
733
733
  this.__events__[o] = [a];
734
- d(this, At, vi).call(this);
735
- }, At = new WeakSet(), vi = function() {
736
- const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !T(e) ? window : D(e);
734
+ d(this, St, vi).call(this);
735
+ }, St = new WeakSet(), vi = function() {
736
+ const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !E(e) ? window : D(e);
737
737
  this.eventHandler = () => {
738
- Os(s, i);
738
+ Is(s, i);
739
739
  }, i.forEach((a) => {
740
- a.aost = {}, a.aost.class = a.getAttribute("data-aost-class") || t.class, a.aost.delay = parseInt(a.getAttribute("data-aost-delay")) || t.delay, a.aost.start = parseInt(a.getAttribute("data-aost-start")) || t.start, a.aost.end = parseInt(a.getAttribute("data-aost-end")) || t.end, a.aost.repeat = Is(a.getAttribute("data-aost-repeat"), t), a.aost.methods = {}, a.aost.methods.destroy = this.destroy, a.aost.methods.update = this.update, a.aost.instance = this, a.setAttribute(this.active, "");
740
+ a.aost = {}, a.aost.class = a.getAttribute("data-aost-class") || t.class, a.aost.delay = parseInt(a.getAttribute("data-aost-delay")) || t.delay, a.aost.start = parseInt(a.getAttribute("data-aost-start")) || t.start, a.aost.end = parseInt(a.getAttribute("data-aost-end")) || t.end, a.aost.repeat = Os(a.getAttribute("data-aost-repeat"), t), a.aost.methods = {}, a.aost.methods.destroy = this.destroy, a.aost.methods.update = this.update, a.aost.instance = this, a.setAttribute(this.active, "");
741
741
  });
742
742
  const { eventHandler: o } = this;
743
743
  o(), s.aost = {}, s.aost.eventHandler = o, s.addEventListener("scroll", s.aost.eventHandler, !1);
744
744
  };
745
- Object.assign(gi.prototype, I);
745
+ Object.assign(fi.prototype, j);
746
746
  const Ns = (n) => {
747
- const { TEMPLATE: i } = Ne, { childDom: t } = n, e = document.createElement("div");
747
+ const { TEMPLATE: i } = Pe, { childDom: t } = n, e = document.createElement("div");
748
748
  e.innerHTML = i();
749
749
  const s = e.querySelector(".player-wrapper");
750
750
  return [...t].forEach((o) => {
751
751
  s.append(o);
752
752
  }), e.children[0];
753
753
  };
754
- var St, bi, Dt, yi, kt, wi, _t, Ti, xt, Ei, $t, Li, Ct, Ai, Ht, Si, Mt, Di, qt, ki;
754
+ var Dt, bi, kt, yi, xt, wi, _t, Ti, $t, Ei, Ct, Ai, Ht, Li, Mt, Si, qt, Di, It, ki;
755
755
  class Ps extends HTMLElement {
756
756
  constructor() {
757
757
  super();
758
- h(this, St);
759
758
  h(this, Dt);
760
759
  h(this, kt);
760
+ h(this, xt);
761
761
  // youtube iframe
762
762
  h(this, _t);
763
763
  // vimeo iframe
764
- h(this, xt);
765
- // youku iframe
766
764
  h(this, $t);
765
+ // youku iframe
767
766
  h(this, Ct);
768
- // 2025.02.11 新增 ig
769
767
  h(this, Ht);
770
- // 2025.02.11 新增 tiktok
768
+ // 2025.02.11 新增 ig
771
769
  h(this, Mt);
772
- // 2026.01.15 新增 tiktok
770
+ // 2025.02.11 新增 tiktok
773
771
  h(this, qt);
774
- d(this, St, bi).call(this);
772
+ // 2026.01.15 新增 tiktok
773
+ h(this, It);
774
+ d(this, Dt, bi).call(this);
775
775
  }
776
776
  play() {
777
777
  const { videoType: t } = this;
@@ -808,19 +808,21 @@ class Ps extends HTMLElement {
808
808
  }
809
809
  }
810
810
  }
811
- St = new WeakSet(), bi = function() {
811
+ Dt = new WeakSet(), bi = function() {
812
812
  if (!this.getAttribute("video-id")) {
813
- L("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
813
+ A("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
814
814
  return;
815
815
  }
816
- 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, Dt, yi).call(this);
817
- }, Dt = new WeakSet(), yi = function() {
818
- this.childDom = this.childNodes, this.template = Ns(this), this.innerHTML = "", this.append(this.template), d(this, kt, wi).call(this);
819
- }, kt = new WeakSet(), wi = function() {
820
- const { videoType: t } = this;
821
- let e = "";
822
- function s(o) {
823
- g(o).addClass("cookie-disagree"), g(".cookie-disagree").append(`
816
+ this.videoId = this.getAttribute("video-id"), this.videoType = this.getAttribute("video-type"), this.videoMode = this.getAttribute("video-mode"), this.autoplay = this.getAttribute("video-autoplay"), this.startTime = this.getAttribute("video-starttime"), this.videoInboxImg = this.getAttribute("video-inbox-img"), d(this, kt, yi).call(this);
817
+ }, kt = new WeakSet(), yi = function() {
818
+ this.childDom = this.childNodes, this.template = Ns(this), this.innerHTML = "", this.append(this.template), d(this, xt, wi).call(this);
819
+ }, xt = new WeakSet(), wi = function() {
820
+ const { videoType: t, videoMode: e } = this;
821
+ console.log(e, "...");
822
+ let s = "";
823
+ function o(a) {
824
+ f(a).addClass("cookie-disagree"), f(".cookie-disagree").append(
825
+ `
824
826
  <div class="disagree-inner">
825
827
  <div class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="7" height="25" viewBox="0 0 7 25"
826
828
  fill="none">
@@ -834,79 +836,80 @@ St = new WeakSet(), bi = function() {
834
836
  <div class="box"><span>您可前往 </span><span data-cookie-open>Cookie 偏好設定</span><span> 進行修改</span></div>
835
837
  <div class="box"><span>Modify your </span><span data-cookie-open>cookie preferences.</span></div>
836
838
  </div>
837
- </div>`);
839
+ </div>`
840
+ );
838
841
  }
839
842
  switch (t) {
840
843
  case "youtubeAPI":
841
844
  break;
842
845
  case "youtube":
843
- document.body.wd_youtube == !1 ? s("video-player") : e = d(this, _t, Ti).call(this);
846
+ document.body.wd_youtube == !1 ? o("video-player") : s = d(this, _t, Ti).call(this);
844
847
  break;
845
848
  case "youkuAPI":
846
849
  break;
847
850
  case "youku":
848
- document.body.wd_youku == !1 ? s("video-player") : e = d(this, $t, Li).call(this);
851
+ document.body.wd_youku == !1 ? o("video-player") : s = d(this, Ct, Ai).call(this);
849
852
  break;
850
853
  case "vimeo":
851
- document.body.wd_vimeo == !1 ? s("video-player") : e = d(this, xt, Ei).call(this);
854
+ document.body.wd_vimeo == !1 ? o("video-player") : s = d(this, $t, Ei).call(this);
852
855
  break;
853
856
  case "bilibili":
854
- document.body.wd_bilibili == !1 ? s("video-player") : e = d(this, Ct, Ai).call(this);
857
+ document.body.wd_bilibili == !1 ? o("video-player") : s = d(this, Ht, Li).call(this);
855
858
  break;
856
859
  case "instagram":
857
- document.body.wd_instagram == !1 ? s(".instagram-media") : e = d(this, Ht, Si).call(this);
860
+ document.body.wd_instagram == !1 ? o(".instagram-media") : s = d(this, Mt, Si).call(this);
858
861
  break;
859
862
  case "tiktok":
860
- document.body.wd_tiktok == !1 ? s("video-player") : e = d(this, Mt, Di).call(this);
863
+ document.body.wd_tiktok == !1 ? o("video-player") : s = d(this, qt, Di).call(this);
861
864
  break;
862
865
  case "videojs":
863
866
  break;
864
867
  case "video":
865
- e = d(this, qt, ki).call(this);
868
+ s = d(this, It, ki).call(this);
866
869
  break;
867
870
  }
868
- this.querySelector(".player-wrapper").insertAdjacentHTML(S.prepend, e);
871
+ this.querySelector(".player-wrapper").insertAdjacentHTML(L.prepend, s);
869
872
  }, _t = new WeakSet(), Ti = function() {
870
873
  const { videoId: t, autoplay: e, startTime: s } = this;
871
874
  return `<iframe src="https://www.youtube.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}&start=${s}&mute=1&loop=1&enablejsapi=1" frameborder="0" allowfullscreen="0" volumn="0" allow="${e === "on" ? "autoplay;" : ""} encrypted-media; gyroscope; picture-in-picture;"></iframe>`;
872
- }, xt = new WeakSet(), Ei = function() {
875
+ }, $t = new WeakSet(), Ei = function() {
873
876
  const { videoId: t, autoplay: e, hash: s } = this;
874
877
  return `<iframe src="https://player.vimeo.com/video/${t}?h=${s}&${e === "on" ? "autoplay=1" : ""}&loop=1&color=ffffff&title=0&byline=0&portrait=0" frameborder="0" allow="${e === "on" ? "autoplay;" : ""} fullscreen; picture-in-picture" allowfullscreen></iframe><script src="https://player.vimeo.com/api/player.js"><\/script>`;
875
- }, $t = new WeakSet(), Li = function() {
878
+ }, Ct = new WeakSet(), Ai = function() {
876
879
  const { videoId: t, autoplay: e } = this;
877
880
  return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
878
- }, Ct = new WeakSet(), Ai = function() {
881
+ }, Ht = new WeakSet(), Li = function() {
879
882
  const { videoId: t, autoplay: e } = this;
880
883
  return `<iframe src="//player.bilibili.com/player.html?bvid=${t}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`;
881
- }, Ht = new WeakSet(), Si = function() {
884
+ }, Mt = new WeakSet(), Si = function() {
882
885
  const { videoId: t, autoplay: e } = this;
883
886
  return `<iframe class="instagram-media instagram-media-rendered" id="instagram-embed-0" src="https://www.instagram.com/p/${t}/embed/" width="num-w" height=" num-h" scrolling="auto" frameborder="0" data-instgrm-payload-id="instagram-media-payload-0"></iframe>`;
884
- }, Mt = new WeakSet(), Di = function() {
887
+ }, qt = new WeakSet(), Di = function() {
885
888
  const { videoId: t, autoplay: e } = this;
886
889
  return `<iframe name="__tt_embed__v79271677875424740" sandbox="allow-popups allow-popups-to-escape-sandbox allow-scripts allow-top-navigation allow-same-origin" src="https://www.tiktok.com/player/v1/${t}?&${e === "on" ? "autoplay=1" : ""}"></iframe>`;
887
- }, qt = new WeakSet(), ki = function() {
890
+ }, It = new WeakSet(), ki = function() {
888
891
  const { videoId: t, autoplay: e } = this;
889
892
  return `<video src="${t}" autoplay muted playsinline controls></video>`;
890
893
  };
891
- const Ln = (n) => new Promise((i) => {
894
+ const An = (n) => new Promise((i) => {
892
895
  let t = setTimeout(() => (clearTimeout(t), i()), n);
893
896
  });
894
- function _i(n) {
897
+ function xi(n) {
895
898
  const i = [];
896
899
  n && n.forEach((t) => {
897
900
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
898
- }), g("html").addClass("scrollLock"), Ss(i);
901
+ }), f("html").addClass("scrollLock"), Ss(i);
899
902
  }
900
- function xi(n) {
903
+ function _i(n) {
901
904
  const i = [];
902
905
  n && n.forEach((t) => {
903
906
  t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
904
- }), g("html").removeClass("scrollLock"), Ds(i);
907
+ }), f("html").removeClass("scrollLock"), Ds(i);
905
908
  }
906
- async function An(n = 0) {
907
- if (g(".loading-wrapper").length)
909
+ async function Ln(n = 0) {
910
+ if (f(".loading-wrapper").length)
908
911
  return;
909
- g("body").append(`
912
+ f("body").append(`
910
913
  <div class="loading-wrapper">
911
914
  <div class="icon-box">
912
915
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><path d="M10 50A40 40 0 0 0 90 50A40 42 0 0 1 10 50" fill="#ffffff" stroke="none">
@@ -916,31 +919,31 @@ async function An(n = 0) {
916
919
  </svg>
917
920
  </div>
918
921
  </div>
919
- `), g(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
920
- _i();
922
+ `), f(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
923
+ xi();
921
924
  });
922
925
  }
923
926
  function Sn() {
924
- g(".loading-wrapper").fadeOut(300).promise().done(function() {
925
- g(".loading-wrapper").remove(), xi();
927
+ f(".loading-wrapper").fadeOut(300).promise().done(function() {
928
+ f(".loading-wrapper").remove(), _i();
926
929
  });
927
930
  }
928
931
  function Dn(n, i) {
929
932
  new pn(n, i);
930
933
  }
931
934
  function js() {
932
- const n = document.querySelector("[data-aost]") && new gi("[data-aost]"), i = document.querySelector("[data-anchor-target]") && new ii("[data-anchor-target]"), t = new Qe({ callback_loaded: () => {
935
+ const n = document.querySelector("[data-aost]") && new fi("[data-aost]"), i = document.querySelector("[data-anchor-target]") && new ii("[data-anchor-target]"), t = new Qe({ callback_loaded: () => {
933
936
  } }), e = new an();
934
937
  n == null || n.update(), t.update(), e.reValidate(), i == null || i.update();
935
938
  }
936
939
  function kn(n, i = () => {
937
940
  }) {
938
- g(`[data-tab-content=${n}]`).fadeIn(function() {
941
+ f(`[data-tab-content=${n}]`).fadeIn(function() {
939
942
  typeof i == "function" && i();
940
943
  }).siblings("[data-tab-content]").hide(), js();
941
944
  }
942
- function _n() {
943
- Ie(
945
+ function xn() {
946
+ Ne(
944
947
  {
945
948
  target: document.body,
946
949
  cancel: {
@@ -964,7 +967,7 @@ function _n() {
964
967
  }
965
968
  );
966
969
  }
967
- function xn() {
970
+ function _n() {
968
971
  window.onpageshow = function(n) {
969
972
  n.persisted && window.location.reload();
970
973
  };
@@ -976,13 +979,13 @@ function $n() {
976
979
  };
977
980
  }
978
981
  function Cn(n, i) {
979
- g(n).on("click", function() {
980
- g(this).toggleClass(i);
982
+ f(n).on("click", function() {
983
+ f(this).toggleClass(i);
981
984
  });
982
985
  }
983
986
  function Hn(n, i) {
984
- g(n).on("click", function() {
985
- g(n).not(this).removeClass(i), g(this).addClass(i);
987
+ f(n).on("click", function() {
988
+ f(n).not(this).removeClass(i), f(this).addClass(i);
986
989
  });
987
990
  }
988
991
  function zs(n, i = 250) {
@@ -1004,23 +1007,23 @@ function Mn(n, i = 250) {
1004
1007
  };
1005
1008
  }
1006
1009
  function qn() {
1007
- window._g.interval = [], g(".countdown").each((i, t) => {
1008
- const e = Number(g(t).attr("data-seconds")) + 1;
1010
+ window._g.interval = [], f(".countdown").each((i, t) => {
1011
+ const e = Number(f(t).attr("data-seconds")) + 1;
1009
1012
  let s = Math.floor(e / 60) + ":" + e % 60;
1010
1013
  window._g.interval[i] = setInterval(function() {
1011
1014
  var o = s.split(":"), a = parseInt(o[0], 10), r = parseInt(o[1], 10);
1012
- --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, g(t).html(a + ":" + r), s = a + ":" + r;
1015
+ --r, a = r < 0 ? --a : a, a = a < 10 ? a = "0" + a : a, a == 0 && r == 0 && clearInterval(window._g.interval[i]), r = r < 0 ? 59 : r, r = r < 10 ? "0" + r : r, f(t).html(a + ":" + r), s = a + ":" + r;
1013
1016
  }, 1e3);
1014
1017
  });
1015
1018
  }
1016
- function On(n = 500) {
1019
+ function In(n = 500) {
1017
1020
  return new Promise((i, t) => {
1018
1021
  let e = setTimeout(() => {
1019
1022
  clearTimeout(e), i();
1020
1023
  }, n);
1021
1024
  });
1022
1025
  }
1023
- function In() {
1026
+ function On() {
1024
1027
  const n = function() {
1025
1028
  let i = window.innerHeight * 0.01;
1026
1029
  document.documentElement.style.setProperty("--vh", i + "px");
@@ -1028,13 +1031,13 @@ function In() {
1028
1031
  n(), window.addEventListener("resize", zs(n));
1029
1032
  }
1030
1033
  function Nn(n, i, t, e, s) {
1031
- const o = this, r = g(n).html().split("<br>");
1034
+ const o = this, r = f(n).html().split("<br>");
1032
1035
  let l = "", c = 0;
1033
1036
  r.forEach((u, p) => {
1034
1037
  p !== 0 && (l += "<br>"), u.split("").forEach((m, v) => {
1035
1038
  i ? (v === 0 && (l += '<span class="letter-wrap" style="display: inline-block">'), m === " " ? l += '</span> <span class="letter-wrap" style="display: inline-block">' : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++), v === u.length - 1 && (l += "</span>")) : m === " " ? l += " " : (l += `<span class="letter"${s || t ? ` style="${s ? `transition: ${o.formatFloat(Math.random(), 2) * s}s;` : ""}${t ? t === "random" ? `transition-delay: ${o.formatFloat(Math.random(), 2)}s;` : `transition-delay: ${t + c * e}s;` : ""}"` : ""}>${m}</span>`, c++);
1036
1039
  });
1037
- }), g(n).html(l);
1040
+ }), f(n).html(l);
1038
1041
  }
1039
1042
  function Pn(n, i) {
1040
1043
  const t = Math.pow(10, i);
@@ -1057,7 +1060,7 @@ function jn(n) {
1057
1060
  }
1058
1061
  function zn(n, i) {
1059
1062
  const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
1060
- (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), g(n.params.navigation.nextEl).hide(), g(n.params.navigation.prevEl).hide(), g(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), g(n.params.navigation.nextEl).show(), g(n.params.navigation.prevEl).show(), g(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
1063
+ (n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), f(n.params.navigation.nextEl).hide(), f(n.params.navigation.prevEl).hide(), f(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), f(n.params.navigation.nextEl).show(), f(n.params.navigation.prevEl).show(), f(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
1061
1064
  }
1062
1065
  function Bn(n) {
1063
1066
  n.el.querySelectorAll("img.detect-shade").forEach((i) => {
@@ -1067,36 +1070,36 @@ function Bn(n) {
1067
1070
  });
1068
1071
  }
1069
1072
  function Wn(n) {
1070
- const i = n.el, t = g(i).find(".swiper-slide-active"), e = g(t).find("video").get(0), s = g(i).find(".swiper-slide video");
1071
- n.autoplay.stop(), g(e).off("ended"), e ? (s.each((o, a) => {
1073
+ const i = n.el, t = f(i).find(".swiper-slide-active"), e = f(t).find("video").get(0), s = f(i).find(".swiper-slide video");
1074
+ n.autoplay.stop(), f(e).off("ended"), e ? (s.each((o, a) => {
1072
1075
  a.currentTime = 0;
1073
- }), g(e).on("ended", function() {
1076
+ }), f(e).on("ended", function() {
1074
1077
  n.slideNext();
1075
1078
  }), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
1076
1079
  }
1077
1080
  function Gn() {
1078
- g(".number-grow").each(function(n, i) {
1079
- const t = g(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1081
+ f(".number-grow").each(function(n, i) {
1082
+ const t = f(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
1080
1083
  let r = "";
1081
1084
  for (var l = 0; l <= 9; l++)
1082
1085
  r += String(l) + "<br>";
1083
1086
  return r;
1084
1087
  };
1085
- g(o).each(function(r, l) {
1088
+ f(o).each(function(r, l) {
1086
1089
  const c = () => l !== "," ? `<div class="num" data-final-num="${l}"><div><br>${a()}<br>${a()}</div></div>` : `<div class="comma">${l}</div>`;
1087
1090
  t.append(c);
1088
1091
  });
1089
1092
  });
1090
1093
  }
1091
1094
  function Rn() {
1092
- g(".letter-grow").each(function(n, i) {
1093
- const t = g(i), s = t.attr("data-letter").split(""), o = () => {
1095
+ f(".letter-grow").each(function(n, i) {
1096
+ const t = f(i), s = t.attr("data-letter").split(""), o = () => {
1094
1097
  let a = "";
1095
1098
  for (let r = 65; r <= 90; r++)
1096
1099
  a += String.fromCharCode(r) + "<br>";
1097
1100
  return a;
1098
1101
  };
1099
- g(s).each(function(a, r) {
1102
+ f(s).each(function(a, r) {
1100
1103
  const l = `<div class="letter" data-final-letter="${r}"><div><br>${o()}<br>${o()}</div></div>`;
1101
1104
  t.append(l);
1102
1105
  });
@@ -1116,38 +1119,38 @@ function Fn(n) {
1116
1119
  const i = document.createElement("div");
1117
1120
  return i.innerHTML = n, i.childNodes[0];
1118
1121
  }
1119
- const Xe = (n) => n.videoId !== "" || typeof n.videoId < "u", Bs = (n) => n.$selector.getAttribute("video4-active") === "on", dt = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1120
- var K, _e, Ot, $i, It, Ci, tt, xe, Nt, Hi;
1121
- const W = class W {
1122
+ const Xe = (n) => n.videoId !== "" || typeof n.videoId < "u", Bs = (n) => n.$selector.getAttribute("video4-active") === "on", ut = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
1123
+ var tt, _e, Ot, $i, Nt, Ci, et, $e, Pt, Hi;
1124
+ const R = class R {
1122
1125
  //*-* 給Article4用的 **//
1123
1126
  constructor(i, t = {}) {
1124
- h(this, K);
1125
- h(this, Ot);
1126
- h(this, It);
1127
1127
  h(this, tt);
1128
+ h(this, Ot);
1128
1129
  h(this, Nt);
1129
- if (!rt(i) && !Ee(i) && !lt(i)) {
1130
+ h(this, et);
1131
+ h(this, Pt);
1132
+ if (!lt(i) && !Ae(i) && !ct(i)) {
1130
1133
  Ge("video4", `找不到該物件 -> ${i}`);
1131
1134
  return;
1132
1135
  }
1133
1136
  this.__storage__ = {
1134
1137
  el: i,
1135
1138
  options: t
1136
- }, this.active = "data-video-active", d(this, K, _e).call(this);
1139
+ }, this.active = "data-video-active", d(this, tt, _e).call(this);
1137
1140
  }
1138
1141
  update() {
1139
- d(this, K, _e).call(this);
1142
+ d(this, tt, _e).call(this);
1140
1143
  }
1141
1144
  };
1142
- K = new WeakSet(), _e = function() {
1143
- const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = Ne;
1144
- if (t.isGlobal && (W.globalOptions = t), this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.options = Object.assign(
1145
+ tt = new WeakSet(), _e = function() {
1146
+ const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s, LAYOUT: o } = Pe;
1147
+ if (t.isGlobal && (R.globalOptions = t), this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.options = Object.assign(
1145
1148
  {},
1146
1149
  { LAYOUT: o },
1147
1150
  // 原始 configs 的 LAYOUT
1148
1151
  e,
1149
1152
  // 原始 configs 的 SETTINGS
1150
- W.globalOptions,
1153
+ R.globalOptions,
1151
1154
  // 全站 A 設定
1152
1155
  t
1153
1156
  // 個別傳入的設定 (優先級最高)
@@ -1158,91 +1161,116 @@ K = new WeakSet(), _e = function() {
1158
1161
  }, Ot = new WeakSet(), $i = function() {
1159
1162
  const { elements: i, options: t } = this;
1160
1163
  i.forEach((e) => {
1161
- e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Nt, Hi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Xe(e.video.params) && !Bs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, It, Ci).call(this, e)), Xe(e.video.params) || Ge("video4", "無法取得影片 ID");
1164
+ e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, Pt, Hi).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), Xe(e.video.params) && !Bs(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, Nt, Ci).call(this, e)), Xe(e.video.params) || Ge("video4", "無法取得影片 ID");
1162
1165
  }), this.emit("init");
1163
- }, It = new WeakSet(), Ci = function(i) {
1166
+ }, Nt = new WeakSet(), Ci = function(i) {
1164
1167
  const { LAYOUT: t } = this.options, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: p } = e;
1165
1168
  if (l === "onBox" || l === "inBox") {
1166
- let f = null;
1169
+ let g = null;
1167
1170
  if (u === "on") {
1168
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), L("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1169
- const m = s.querySelector("img"), v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src")), b = t[o] ? t[o] : t[0] || "";
1170
- b ? m.insertAdjacentHTML(S.after, b) : L("video4", `找不到對應的 LAYOUT 設定 (No: ${o}),且無預設樣式。`), !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((y) => y.json()).then((y) => {
1171
- const w = y.thumbnail_url;
1172
- m.setAttribute("src", `${w}`);
1173
- }).catch(function(y) {
1171
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(L.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), A("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
1172
+ const m = s.querySelector("img"), v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src")), y = t[o] ? t[o] : t[0] || "";
1173
+ y ? m.insertAdjacentHTML(L.after, y) : A("video4", `找不到對應的 LAYOUT 設定 (No: ${o}),且無預設樣式。`), !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `https://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1174
+ const T = b.thumbnail_url;
1175
+ m.setAttribute("src", `${T}`);
1176
+ }).catch(function(b) {
1174
1177
  console.log("error");
1175
- }) : L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1178
+ }) : A("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
1176
1179
  }
1177
- c == "off" ? f = s : (f = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), f.video || (f.video = {}, f.video.params = e), f.video.eventHandler = d(this, tt, xe), f.addEventListener("click", f.video.eventHandler);
1180
+ c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || A("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, et, $e), g.addEventListener("click", g.video.eventHandler);
1178
1181
  } else if (l === "onPage") {
1179
- let f = null;
1182
+ let g = null;
1180
1183
  if (u == "on") {
1181
- i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(S.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), L("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1184
+ i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(L.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), A("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
1182
1185
  const m = s.querySelector("img");
1183
- m.insertAdjacentHTML(S.after, t[o]);
1186
+ m.insertAdjacentHTML(L.after, t[o]);
1184
1187
  const v = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
1185
- !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((b) => b.json()).then((b) => {
1186
- const y = b.thumbnail_url;
1187
- m.setAttribute("src", `${y}`);
1188
- }).catch(function(b) {
1188
+ !v && r == "youtube" ? p == "on" ? m.setAttribute("src", `http://img.youtube.com/vi/${a}/maxresdefault.jpg `) : m.setAttribute("src", `https://img.youtube.com/vi/${a}/0.jpg`) : !v && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !v && r == "tiktok" ? fetch(`https://www.tiktok.com/oembed?url=https://www.tiktok.com/@/video/${a}`, { method: "GET", redirect: "follow" }).then((y) => y.json()).then((y) => {
1189
+ const b = y.thumbnail_url;
1190
+ m.setAttribute("src", `${b}`);
1191
+ }).catch(function(y) {
1189
1192
  console.log("error");
1190
- }) : v || L("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? f = s : (f = s.querySelector(c) ?? s, s.querySelector(c) || L("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1193
+ }) : v || A("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || A("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
1191
1194
  } else {
1192
- s.innerHTML = dt(e);
1195
+ s.innerHTML = ut(e);
1193
1196
  return;
1194
1197
  }
1195
- f.video || (f.video = {}, f.video.params = e), f.video.eventHandler = d(this, tt, xe), f.addEventListener("click", f.video.eventHandler);
1198
+ g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, et, $e), g.addEventListener("click", g.video.eventHandler);
1196
1199
  }
1197
- }, tt = new WeakSet(), xe = function(i) {
1198
- const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoKeep: r, videoId: l, videoTargetRoute: c, videoType: u, videoIgHtml: p } = t.params, f = new Qe({ callback_loaded: (v) => {
1199
- } }), m = new URLSearchParams({
1200
+ }, et = new WeakSet(), $e = function(i) {
1201
+ const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoKeep: r, videoId: l, videoTargetRoute: c, videoType: u, videoIgHtml: p, videoInboxImg: g } = t.params, m = new Qe({ callback_loaded: (y) => {
1202
+ } }), v = new URLSearchParams({
1200
1203
  video_mode: o,
1201
1204
  video_type: u,
1202
1205
  video_id: l
1203
1206
  });
1204
1207
  if (o == "onBox" || o == "inBox") {
1205
- const v = {
1208
+ const y = {
1206
1209
  target: a,
1207
- route: c + `?${m.toString()}`,
1210
+ route: c + `?${v.toString()}`,
1208
1211
  on: {
1209
1212
  complete(b) {
1210
- var y;
1211
- o == "onBox" && (u == "instagram" ? (b.setAttribute("video-typeStyle", `${u}`), (y = window.instgrm) != null && y.Embeds ? window.instgrm.Embeds.process() : console.log("window.instgrm is undefined")) : (b.querySelector(".modal-content").insertAdjacentHTML("beforeend", dt(t.params)), b.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && b.setAttribute("video-typeStyle", `${u}`);
1213
+ var T;
1214
+ o == "onBox" && (u == "instagram" ? (b.setAttribute("video-typeStyle", `${u}`), (T = window.instgrm) != null && T.Embeds ? window.instgrm.Embeds.process() : console.log("window.instgrm is undefined")) : (b.querySelector(".modal-content").insertAdjacentHTML("beforeend", ut(t.params)), b.setAttribute("video-typeStyle", `${u}`))), o == "inBox" && b.setAttribute("video-typeStyle", `${u}`);
1212
1215
  },
1213
1216
  open(b) {
1214
- const y = b.querySelectorAll("[data-overlayscrollbars-viewport]");
1215
- if (f.update(), _i([...y]), o == "onBox" && u == "instagram") {
1217
+ var M;
1218
+ const T = b.querySelectorAll("[data-overlayscrollbars-viewport]");
1219
+ if (m.update(), xi([...T]), o == "onBox" && u == "instagram") {
1216
1220
  const w = document.querySelector("[video-template] .modal-content");
1217
- new ResizeObserver((E) => {
1218
- E[0].contentRect.height > 50 && w.classList.add("active");
1221
+ new ResizeObserver((F) => {
1222
+ F[0].contentRect.height > 50 && w.classList.add("active");
1219
1223
  }).observe(w);
1220
1224
  }
1221
1225
  if (o == "inBox") {
1222
- const w = b.querySelectorAll("[video-target]");
1223
- w.length > 0 && new W(w, { LAYOUT: t.params.LAYOUT, videoLayoutNo: t.params.videoLayoutNo });
1226
+ const w = g || ((M = s.querySelector("img")) == null ? void 0 : M.src), q = `
1227
+ <div
1228
+ class="photo-box"
1229
+ video-target
1230
+ video-mode="onPage"
1231
+ video-type="${u}"
1232
+ video-id="${l}"
1233
+ >
1234
+ <picture>
1235
+ <source
1236
+ srcset="${w}"
1237
+ type="image/webp"
1238
+ />
1239
+ <source
1240
+ srcset="${w}"
1241
+ type="image/jpeg"
1242
+ />
1243
+ <img src="${w}" alt="" />
1244
+ </picture>
1245
+ </div>`;
1246
+ b.querySelector(".video-content").insertAdjacentHTML(L.prepend, q);
1247
+ const I = b.querySelectorAll("[video-target]");
1248
+ I.length > 0 && new R(I, {
1249
+ LAYOUT: t.params.LAYOUT,
1250
+ videoLayoutNo: t.params.videoLayoutNo
1251
+ });
1224
1252
  }
1225
1253
  },
1226
1254
  close(b) {
1227
- const y = b.querySelectorAll("[data-overlayscrollbars-viewport]");
1228
- xi([...y]);
1255
+ const T = b.querySelectorAll("[data-overlayscrollbars-viewport]");
1256
+ _i([...T]);
1229
1257
  },
1230
1258
  destroy(b) {
1231
1259
  }
1232
1260
  }
1233
1261
  };
1234
- J.open(v);
1262
+ Z.open(y);
1235
1263
  } else if (o == "onPage")
1236
1264
  if (t.params.videoAutoplay = "on", r == "off") {
1237
1265
  if (s.querySelector("video-player"))
1238
1266
  return;
1239
- s.innerHTML = dt(t.params);
1267
+ s.innerHTML = ut(t.params);
1240
1268
  return;
1241
1269
  } else {
1242
- (s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", dt(t.params));
1270
+ (s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", ut(t.params));
1243
1271
  return;
1244
1272
  }
1245
- }, Nt = new WeakSet(), Hi = function(i) {
1273
+ }, Pt = new WeakSet(), Hi = function(i) {
1246
1274
  const t = this.options;
1247
1275
  return {
1248
1276
  $selector: i,
@@ -1259,11 +1287,12 @@ K = new WeakSet(), _e = function() {
1259
1287
  videoStartTime: i.getAttribute("video-starttime") || t.videoStartTime,
1260
1288
  videoHighQualityPic: i.getAttribute("video-highquality") || t.videoHighQuality,
1261
1289
  videoIgHtml: i.getAttribute("video-ig") || t.videoIgHtml,
1290
+ videoInboxImg: i.getAttribute("video-inbox-img") || t.videoInboxImgHtml,
1262
1291
  LAYOUT: t.LAYOUT || []
1263
1292
  };
1264
- }, We(W, "globalOptions", {});
1265
- let ke = W;
1266
- Object.assign(ke.prototype, I);
1293
+ }, We(R, "globalOptions", {});
1294
+ let xe = R;
1295
+ Object.assign(xe.prototype, j);
1267
1296
  customElements.define("video-player", Ps);
1268
1297
  const Ws = {
1269
1298
  "zh-tw": {
@@ -2095,9 +2124,9 @@ const Ws = {
2095
2124
  ]
2096
2125
  }
2097
2126
  };
2098
- let U;
2127
+ let J;
2099
2128
  const Gs = (n) => {
2100
- const { TEMPLATE: i } = Pe, { 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");
2129
+ const { TEMPLATE: i } = je, { 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");
2101
2130
  e.innerHTML = i(
2102
2131
  s,
2103
2132
  o,
@@ -2115,7 +2144,7 @@ const Gs = (n) => {
2115
2144
  const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
2116
2145
  i && i.forEach((e) => {
2117
2146
  const s = document.querySelector(e);
2118
- s || L("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && C(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2147
+ s || A("dropdown", `Can't not find control element(${e})`), s && s.classList.contains("disabled") && (s.classList.remove("disabled"), s.tagName === "DROPDOWN-EL" && s.s.activeLi && C(s, [...s.s.allLi].indexOf(s.s.activeLi)));
2119
2148
  });
2120
2149
  }, C = (n, i) => {
2121
2150
  const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
@@ -2158,7 +2187,7 @@ const Gs = (n) => {
2158
2187
  const o = n.querySelectorAll(".dropdown-list li.active");
2159
2188
  o.length <= 0 ? n.s.selectDisplayEl.textContent = t.trim() : (n.s.selectDisplayEl.textContent = "", o.forEach((r) => {
2160
2189
  const l = r.getAttribute("data-option"), c = r.textContent.trim(), u = `<div class="option-btn" data-option="${l}"><div class="text">${c}</div><div class="remove-icon"></div></div>`;
2161
- n.s.selectDisplayEl.insertAdjacentHTML(S.append, u);
2190
+ n.s.selectDisplayEl.insertAdjacentHTML(L.append, u);
2162
2191
  })), n.s.activeLi = o, n.s.value = [...o].map((r) => ({
2163
2192
  index: [...e].indexOf(r),
2164
2193
  id: r.getAttribute("data-option"),
@@ -2171,13 +2200,13 @@ const Gs = (n) => {
2171
2200
  }
2172
2201
  }, Xs = (n) => {
2173
2202
  const i = n.s.cityLang;
2174
- g("#newCityData").length > 0 ? g("#newCityData").val() !== "" && (U = JSON.parse(g("#newCityData").val())[0], console.log([0])) : U = Ws, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(U[i]).forEach((t) => {
2203
+ f("#newCityData").length > 0 ? f("#newCityData").val() !== "" && (J = JSON.parse(f("#newCityData").val())[0], console.log([0])) : J = Ws, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(J[i]).forEach((t) => {
2175
2204
  const e = document.createElement("li");
2176
2205
  e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
2177
2206
  }), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
2178
2207
  }, Ys = (n, i) => {
2179
2208
  const t = n.s.cityLang;
2180
- U[t][i].forEach((e, s) => {
2209
+ J[t][i].forEach((e, s) => {
2181
2210
  const o = document.createElement("li");
2182
2211
  o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
2183
2212
  });
@@ -2186,7 +2215,7 @@ const Gs = (n) => {
2186
2215
  i.close();
2187
2216
  });
2188
2217
  }, Fs = () => {
2189
- const { SETTINGS: n } = Pe;
2218
+ const { SETTINGS: n } = je;
2190
2219
  ((t, e) => {
2191
2220
  Object.keys(e).forEach((s) => {
2192
2221
  t.style.setProperty(`--${s}`, e[s]);
@@ -2197,14 +2226,14 @@ Fs();
2197
2226
  document.addEventListener("click", function() {
2198
2227
  Mi();
2199
2228
  });
2200
- var Pt, Oi, jt, Ii, zt, Ni, Bt, Pi;
2229
+ var jt, Ii, zt, Oi, Bt, Ni, Wt, Pi;
2201
2230
  class qi extends HTMLElement {
2202
2231
  constructor() {
2203
2232
  super();
2204
- h(this, Pt);
2205
2233
  h(this, jt);
2206
2234
  h(this, zt);
2207
2235
  h(this, Bt);
2236
+ h(this, Wt);
2208
2237
  this.initialize = !1;
2209
2238
  }
2210
2239
  static get observedAttributes() {
@@ -2225,13 +2254,13 @@ class qi extends HTMLElement {
2225
2254
  switch (o.hasAttribute("multiple") ? "multiple" : "single") {
2226
2255
  case "single":
2227
2256
  const r = o.querySelector(`.dropdown-list li[data-option="${s}"]`);
2228
- T(r) ? C(o, [...o.s.allLi].indexOf(r)) : C(o, -1);
2257
+ E(r) ? C(o, [...o.s.allLi].indexOf(r)) : C(o, -1);
2229
2258
  break;
2230
2259
  case "multiple":
2231
2260
  const l = [];
2232
2261
  o.querySelector(".dropdown-list li").classList.remove("active"), s.split(",").forEach((u) => {
2233
2262
  const p = o.querySelector(`.dropdown-list li[data-option="${u}"]`);
2234
- T(p) && (p.classList.add("active"), l.push(p));
2263
+ E(p) && (p.classList.add("active"), l.push(p));
2235
2264
  });
2236
2265
  const c = l.map((u) => [...o.s.allLi].indexOf(u));
2237
2266
  C(o, c);
@@ -2250,7 +2279,7 @@ class qi extends HTMLElement {
2250
2279
  }
2251
2280
  connectedCallback() {
2252
2281
  const t = this;
2253
- t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Pt, Oi).call(this));
2282
+ t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, jt, Ii).call(this));
2254
2283
  }
2255
2284
  open() {
2256
2285
  const t = this, e = t.querySelector(".dropdown-scroller").clientHeight, s = t.classList.contains("filter"), o = () => s ? t.querySelector(".dropdown-scroller .filter-bar") ? e : t.querySelector(".filter-bar").clientHeight + e : e;
@@ -2276,11 +2305,11 @@ class qi extends HTMLElement {
2276
2305
  this.__events__.selectOption();
2277
2306
  }
2278
2307
  }
2279
- Pt = new WeakSet(), Oi = function() {
2280
- this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, jt, Ii).call(this);
2281
- }, jt = new WeakSet(), Ii = function() {
2282
- this.s.childDom = this.childNodes, this.s.template = Gs(this), this.innerHTML = "", this.append(this.s.template), d(this, zt, Ni).call(this);
2283
- }, zt = new WeakSet(), Ni = function() {
2308
+ jt = new WeakSet(), Ii = function() {
2309
+ this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, zt, Oi).call(this);
2310
+ }, zt = new WeakSet(), Oi = function() {
2311
+ this.s.childDom = this.childNodes, this.s.template = Gs(this), this.innerHTML = "", this.append(this.s.template), d(this, Bt, Ni).call(this);
2312
+ }, Bt = new WeakSet(), Ni = function() {
2284
2313
  var s;
2285
2314
  const t = this;
2286
2315
  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", Xs(t), t.s.subDropdownTotalH = 0;
@@ -2299,7 +2328,7 @@ Pt = new WeakSet(), Oi = function() {
2299
2328
  }
2300
2329
  } else
2301
2330
  o = t.querySelector(`.dropdown-list li[data-option="${e}"]`);
2302
- T(o) ? (o.classList.add("active"), t.s.activeLi = o, t.s.value = {
2331
+ E(o) ? (o.classList.add("active"), t.s.activeLi = o, t.s.value = {
2303
2332
  index: [...t.s.allLi].indexOf(o),
2304
2333
  id: e,
2305
2334
  el: o
@@ -2313,7 +2342,7 @@ Pt = new WeakSet(), Oi = function() {
2313
2342
  const a = [];
2314
2343
  e.split(",").forEach((r) => {
2315
2344
  const l = t.querySelector(`.dropdown-list li[data-option="${r}"]`);
2316
- T(l) && a.push(l);
2345
+ E(l) && a.push(l);
2317
2346
  }), a.length > 0 ? t.s.value = {
2318
2347
  index: a.map((r) => [...t.s.allLi].indexOf(r)),
2319
2348
  id: a.map((r) => r.getAttribute("data-option")),
@@ -2325,8 +2354,8 @@ Pt = new WeakSet(), Oi = function() {
2325
2354
  };
2326
2355
  break;
2327
2356
  }
2328
- C(t, t.s.value.index), d(s = t, Bt, Pi).call(s), t.classList.add("d4-initialize");
2329
- }, Bt = new WeakSet(), Pi = function() {
2357
+ C(t, t.s.value.index), d(s = t, Wt, Pi).call(s), t.classList.add("d4-initialize");
2358
+ }, Wt = new WeakSet(), Pi = function() {
2330
2359
  const t = this;
2331
2360
  t.__events__.dropdownToggle = () => {
2332
2361
  t.addEventListener("click", function(e) {
@@ -2348,10 +2377,10 @@ Pt = new WeakSet(), Oi = function() {
2348
2377
  const r = t.querySelector(".dropdown-scroller"), l = () => {
2349
2378
  if (t.__scroller__) {
2350
2379
  const { viewport: c } = t.__scroller__.elements();
2351
- if (T(t.s.activeLi)) {
2352
- const u = t.s.activeLi.clientHeight / 2, p = t.s.activeLi.offsetTop, f = p - r.clientHeight / 2 + u > 0 ? p - r.clientHeight / 2 + u : 0;
2380
+ if (E(t.s.activeLi)) {
2381
+ const u = t.s.activeLi.clientHeight / 2, p = t.s.activeLi.offsetTop, g = p - r.clientHeight / 2 + u > 0 ? p - r.clientHeight / 2 + u : 0;
2353
2382
  c.scrollTo({
2354
- top: f,
2383
+ top: g,
2355
2384
  behavior: "smooth"
2356
2385
  });
2357
2386
  } else
@@ -2372,7 +2401,7 @@ Pt = new WeakSet(), Oi = function() {
2372
2401
  t.s.dropdownEl.addEventListener("transitionend", e);
2373
2402
  }, t.__events__.bindScrollbar = (e = this) => {
2374
2403
  const s = e.querySelector(".dropdown-scroller");
2375
- e.__scroller__ = Ie(s, {
2404
+ e.__scroller__ = Ne(s, {
2376
2405
  overflowBehavior: {
2377
2406
  x: "hidden"
2378
2407
  }
@@ -2383,28 +2412,28 @@ Pt = new WeakSet(), Oi = function() {
2383
2412
  e.s.allLi = e.querySelectorAll(".dropdown-list li"), e.s.allLi.forEach((l) => {
2384
2413
  l.addEventListener("click", function(c) {
2385
2414
  var m;
2386
- const u = this, p = [...e.s.allLi].indexOf(u), f = parseInt(e.getAttribute("d4-default-height"));
2415
+ const u = this, p = [...e.s.allLi].indexOf(u), g = parseInt(e.getAttribute("d4-default-height"));
2387
2416
  if (u.classList.contains("has-sublayer")) {
2388
2417
  c.stopPropagation();
2389
- const v = u.querySelector(".sub-dropdown"), b = v.querySelector(".sub-dropdown-list"), y = parseInt(getComputedStyle(b).marginTop) + parseInt(getComputedStyle(b).marginBottom);
2390
- v.style.cssText = `--height: ${b.offsetHeight + y}px`;
2391
- const w = parseInt(v.style.cssText.replace("--height:", "").trim()), z = parseInt(getComputedStyle(a).maxHeight), E = () => {
2392
- s = f + e.s.subDropdownTotalH, o = s > z ? z : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2418
+ const v = u.querySelector(".sub-dropdown"), y = v.querySelector(".sub-dropdown-list"), b = parseInt(getComputedStyle(y).marginTop) + parseInt(getComputedStyle(y).marginBottom);
2419
+ v.style.cssText = `--height: ${y.offsetHeight + b}px`;
2420
+ const T = parseInt(v.style.cssText.replace("--height:", "").trim()), M = parseInt(getComputedStyle(a).maxHeight), w = () => {
2421
+ s = g + e.s.subDropdownTotalH, o = s > M ? M : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
2393
2422
  };
2394
- u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= w, E()) : (u.classList.add("open"), e.s.subDropdownTotalH += w, E());
2395
- const X = () => {
2396
- e.__scroller__.update(!0), v.removeEventListener("transitionend", X);
2423
+ u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= T, w()) : (u.classList.add("open"), e.s.subDropdownTotalH += T, w());
2424
+ const q = () => {
2425
+ e.__scroller__.update(!0), v.removeEventListener("transitionend", q);
2397
2426
  };
2398
- v.addEventListener("transitionend", X);
2427
+ v.addEventListener("transitionend", q);
2399
2428
  } else
2400
2429
  switch (Rs(e), e.s.selectType) {
2401
2430
  case "single":
2402
2431
  if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
2403
- const v = e.s.cityLang, b = l.textContent.trim(), y = document.getElementById(e.getAttribute("dist-select"));
2404
- y && (y.querySelector(".dropdown-list").textContent = "", C(y, -1), U[v][b].forEach((w, z) => {
2405
- const E = document.createElement("li");
2406
- E.textContent = w[0], E.setAttribute("data-option", w[0]), y.querySelector(".dropdown-list").append(E);
2407
- }), e.__events__.selectOption(y));
2432
+ const v = e.s.cityLang, y = l.textContent.trim(), b = document.getElementById(e.getAttribute("dist-select"));
2433
+ b && (b.querySelector(".dropdown-list").textContent = "", C(b, -1), J[v][y].forEach((T, M) => {
2434
+ const w = document.createElement("li");
2435
+ w.textContent = T[0], w.setAttribute("data-option", T[0]), b.querySelector(".dropdown-list").append(w);
2436
+ }), e.__events__.selectOption(b));
2408
2437
  }
2409
2438
  (m = u.parentNode.closest("li")) != null && m.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
2410
2439
  break;
@@ -2442,9 +2471,9 @@ Pt = new WeakSet(), Oi = function() {
2442
2471
  });
2443
2472
  }, t.__events__.dropdownToggle(), t.__events__.bindScrollbar(), t.__events__.selectOption(), t.__events__.filterHandler(), t.__events__.removeTag(), t.__events__.transitionend();
2444
2473
  };
2445
- Object.assign(qi.prototype, I);
2474
+ Object.assign(qi.prototype, j);
2446
2475
  customElements.define("dropdown-el", qi);
2447
- function ht(n) {
2476
+ function pt(n) {
2448
2477
  const i = {};
2449
2478
  return [...n.attributes].forEach((t) => {
2450
2479
  if (t.name.includes("duration-")) {
@@ -2454,9 +2483,9 @@ function ht(n) {
2454
2483
  }), Object.keys(i).length === 0 ? null : i;
2455
2484
  }
2456
2485
  function Ye(n) {
2457
- if (ht(n)) {
2486
+ if (pt(n)) {
2458
2487
  let i;
2459
- const t = Object.keys(ht(n)).map((e) => ({
2488
+ const t = Object.keys(pt(n)).map((e) => ({
2460
2489
  value: e,
2461
2490
  point: e
2462
2491
  }));
@@ -2465,7 +2494,7 @@ function Ye(n) {
2465
2494
  const { point: s, value: o } = t[e];
2466
2495
  window.matchMedia(`(max-width: ${o}px)`).matches && (i = s);
2467
2496
  }
2468
- return i ? Number(ht(n)[i]) : n.s.options.duration;
2497
+ return i ? Number(pt(n)[i]) : n.s.options.duration;
2469
2498
  } else
2470
2499
  return n.s.options.duration;
2471
2500
  }
@@ -2480,7 +2509,7 @@ function Us(n) {
2480
2509
  }
2481
2510
  n.s.animation = null, n.s.animateEl = a, n.textContent = "", o.append(a), n.append(o), a.clientWidth * 2 + e >= n.clientWidth ? i === "normal" && t && o.append(r()) : n.s.options.continual = !1;
2482
2511
  }
2483
- function x(n) {
2512
+ function _(n) {
2484
2513
  const { behavior: i, direction: t, continual: e } = n.s.options;
2485
2514
  let s = {};
2486
2515
  switch (i) {
@@ -2542,14 +2571,14 @@ function Js(n) {
2542
2571
  i && clearTimeout(i), i = setTimeout(n, 200, t);
2543
2572
  };
2544
2573
  }
2545
- var Wt, ji, Gt, zi, Rt, Bi, Xt, Wi;
2574
+ var Gt, ji, Rt, zi, Xt, Bi, Yt, Wi;
2546
2575
  class Zs extends HTMLElement {
2547
2576
  constructor() {
2548
2577
  super();
2549
- h(this, Wt);
2550
2578
  h(this, Gt);
2551
2579
  h(this, Rt);
2552
2580
  h(this, Xt);
2581
+ h(this, Yt);
2553
2582
  this.initialize = !1;
2554
2583
  }
2555
2584
  static get observedAttributes() {
@@ -2558,7 +2587,7 @@ class Zs extends HTMLElement {
2558
2587
  attributeChangedCallback(t, e, s) {
2559
2588
  }
2560
2589
  connectedCallback() {
2561
- this.initialize || (this.initialize = !0, d(this, Wt, ji).call(this));
2590
+ this.initialize || (this.initialize = !0, d(this, Gt, ji).call(this));
2562
2591
  }
2563
2592
  play() {
2564
2593
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -2567,7 +2596,7 @@ class Zs extends HTMLElement {
2567
2596
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
2568
2597
  }
2569
2598
  }
2570
- Wt = new WeakSet(), ji = function() {
2599
+ Gt = new WeakSet(), ji = function() {
2571
2600
  const t = {
2572
2601
  direction: this.getAttribute("direction") || $.SETTINGS.direction,
2573
2602
  // up / down / left / right
@@ -2575,7 +2604,7 @@ Wt = new WeakSet(), ji = function() {
2575
2604
  // normal / alternate / endStop
2576
2605
  duration: Number(this.getAttribute("duration")) || $.SETTINGS.duration,
2577
2606
  // ms
2578
- durationBreakpoints: ht(this) || $.SETTINGS.durationBreakpoints,
2607
+ durationBreakpoints: pt(this) || $.SETTINGS.durationBreakpoints,
2579
2608
  autoplay: this.getAttribute("autoplay") || $.SETTINGS.autoplay,
2580
2609
  // normal / alternate / endStop
2581
2610
  pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : $.SETTINGS.pauseOnMouseenter,
@@ -2584,8 +2613,8 @@ Wt = new WeakSet(), ji = function() {
2584
2613
  // true / false
2585
2614
  gap: Number(this.getAttribute("gap")) || $.SETTINGS.gap
2586
2615
  };
2587
- this.s = {}, this.s.options = t, this.s.nowDuration = Ye(this), Us(this), d(this, Gt, zi).call(this);
2588
- }, Gt = new WeakSet(), zi = function() {
2616
+ this.s = {}, this.s.options = t, this.s.nowDuration = Ye(this), Us(this), d(this, Rt, zi).call(this);
2617
+ }, Rt = new WeakSet(), zi = function() {
2589
2618
  const { direction: t, continual: e, gap: s } = this.s.options;
2590
2619
  switch (t) {
2591
2620
  case "left":
@@ -2597,17 +2626,17 @@ Wt = new WeakSet(), ji = function() {
2597
2626
  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;`;
2598
2627
  break;
2599
2628
  }
2600
- d(this, Rt, Bi).call(this), d(this, Xt, Wi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2601
- }, Rt = new WeakSet(), Bi = function() {
2629
+ d(this, Xt, Bi).call(this), d(this, Yt, Wi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
2630
+ }, Xt = new WeakSet(), Bi = function() {
2602
2631
  const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
2603
2632
  let c;
2604
2633
  function u() {
2605
2634
  switch (s) {
2606
2635
  case "normal":
2607
- t.s.animateEl.style.transform = `${x(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(x(t).animate1, {
2636
+ t.s.animateEl.style.transform = `${_(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2608
2637
  duration: t.s.nowDuration,
2609
2638
  iterations: 1 / 0
2610
- }), l && (t.s.cloneAnimateEl.style.transform = `${x(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(x(t).animate2, {
2639
+ }), l && (t.s.cloneAnimateEl.style.transform = `${_(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(_(t).animate2, {
2611
2640
  duration: t.s.nowDuration,
2612
2641
  delay: -t.s.nowDuration / 2,
2613
2642
  iterations: 1 / 0
@@ -2618,25 +2647,25 @@ Wt = new WeakSet(), ji = function() {
2618
2647
  let v = [];
2619
2648
  switch (e) {
2620
2649
  case "top":
2621
- p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), f = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
2650
+ p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
2622
2651
  break;
2623
2652
  case "right":
2624
- p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), f = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
2653
+ p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
2625
2654
  break;
2626
2655
  case "bottom":
2627
- p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), f = parseInt(o / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
2656
+ p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
2628
2657
  break;
2629
2658
  case "left":
2630
- p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), f = parseInt(o / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
2659
+ p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
2631
2660
  break;
2632
2661
  }
2633
2662
  return v;
2634
- }, p, f;
2663
+ }, p, g;
2635
2664
  (t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${m()[0].transform}`, t.s.animateEl.animate(m(), {
2636
- duration: f,
2665
+ duration: g,
2637
2666
  fill: "forwards"
2638
2667
  }).finished.then(() => {
2639
- t.s.animation = t.s.animateEl.animate(x(t).animate1, {
2668
+ t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2640
2669
  duration: t.s.nowDuration,
2641
2670
  iterations: 1 / 0
2642
2671
  });
@@ -2645,7 +2674,7 @@ Wt = new WeakSet(), ji = function() {
2645
2674
  });
2646
2675
  break;
2647
2676
  case "endStop":
2648
- t.s.animateEl.style.transform = `${x(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(x(t).animate1, {
2677
+ t.s.animateEl.style.transform = `${_(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2649
2678
  duration: t.s.nowDuration,
2650
2679
  fill: "forwards"
2651
2680
  });
@@ -2663,14 +2692,14 @@ Wt = new WeakSet(), ji = function() {
2663
2692
  }), t.addEventListener("mouseleave", function() {
2664
2693
  t.s.animation && r && t.s.animation.playState === "paused" && t.play();
2665
2694
  });
2666
- }, Xt = new WeakSet(), Wi = function() {
2695
+ }, Yt = new WeakSet(), Wi = function() {
2667
2696
  const t = this;
2668
2697
  function e() {
2669
2698
  const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
2670
- t.s.nowDuration = Ye(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(x(t).animate1, {
2699
+ t.s.nowDuration = Ye(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(_(t).animate1, {
2671
2700
  duration: t.s.nowDuration,
2672
2701
  iterations: 1 / 0
2673
- }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(x(t).animate2, {
2702
+ }), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(_(t).animate2, {
2674
2703
  duration: t.s.nowDuration,
2675
2704
  delay: -t.s.nowDuration / 2,
2676
2705
  iterations: 1 / 0
@@ -2684,16 +2713,16 @@ const Fe = function(n, i) {
2684
2713
  return function(e) {
2685
2714
  t && clearTimeout(t), t = setTimeout(n, 200, e);
2686
2715
  };
2687
- }, _ = (n, i) => {
2688
- if (lt(n)) {
2716
+ }, x = (n, i) => {
2717
+ if (ct(n)) {
2689
2718
  n.forEach((t) => {
2690
2719
  t.classList.add(i);
2691
2720
  });
2692
2721
  return;
2693
2722
  }
2694
2723
  n.classList.add(i);
2695
- }, A = (n, i) => {
2696
- if (lt(n)) {
2724
+ }, S = (n, i) => {
2725
+ if (ct(n)) {
2697
2726
  n.forEach((t) => {
2698
2727
  t.classList.remove(i);
2699
2728
  });
@@ -2701,22 +2730,22 @@ const Fe = function(n, i) {
2701
2730
  }
2702
2731
  n.classList.remove(i);
2703
2732
  };
2704
- var Yt, Gi, Ft, Ri, Ut, Xi, et, $e, G, pt, Jt, Yi;
2733
+ var Ft, Gi, Ut, Ri, Jt, Xi, it, Ce, X, mt, Zt, Yi;
2705
2734
  class Ue {
2706
2735
  constructor(i) {
2707
2736
  // 初始化
2708
- h(this, Yt);
2709
- // 左右箭頭事件綁定
2710
2737
  h(this, Ft);
2711
- // 左右拖拉事件綁定
2738
+ // 左右箭頭事件綁定
2712
2739
  h(this, Ut);
2740
+ // 左右拖拉事件綁定
2741
+ h(this, Jt);
2713
2742
  // 卷軸位置判斷
2714
- h(this, et);
2743
+ h(this, it);
2715
2744
  // 隱藏按鈕判斷
2716
- h(this, G);
2745
+ h(this, X);
2717
2746
  // 選項事件綁定
2718
- h(this, Jt);
2719
- this.$element = i, this.option = i.s.option.drag, d(this, Yt, Gi).call(this);
2747
+ h(this, Zt);
2748
+ this.$element = i, this.option = i.s.option.drag, d(this, Ft, Gi).call(this);
2720
2749
  }
2721
2750
  // 更新 active 位置
2722
2751
  update(i) {
@@ -2730,7 +2759,7 @@ class Ue {
2730
2759
  }
2731
2760
  }
2732
2761
  }
2733
- Yt = new WeakSet(), Gi = function() {
2762
+ Ft = new WeakSet(), Gi = function() {
2734
2763
  var s, o, a, r;
2735
2764
  const i = this;
2736
2765
  if (!i.$element)
@@ -2739,11 +2768,11 @@ Yt = new WeakSet(), Gi = function() {
2739
2768
  let t = !1;
2740
2769
  const e = () => {
2741
2770
  t || (requestAnimationFrame(() => {
2742
- d(this, et, $e).call(this), d(this, G, pt).call(this), t = !1;
2771
+ d(this, it, Ce).call(this), d(this, X, mt).call(this), t = !1;
2743
2772
  }), t = !0);
2744
2773
  };
2745
- i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, Ut, Xi).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2746
- S.prepend,
2774
+ i.$wrapper.removeEventListener("scroll", e), i.$wrapper.addEventListener("scroll", e), window.removeEventListener("resize", e), window.addEventListener("resize", e), (i.option.draggable || i.$element.s.type == "collapse") && d(s = i, Jt, Xi).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
2775
+ L.prepend,
2747
2776
  `<div class="navigation">
2748
2777
  <div class="button prev">
2749
2778
  <div></div>
@@ -2752,10 +2781,10 @@ Yt = new WeakSet(), Gi = function() {
2752
2781
  <div></div>
2753
2782
  </div>
2754
2783
  </div>`
2755
- ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Ft, Ri).call(a)), d(r = i, Jt, Yi).call(r), i.update(), requestAnimationFrame(() => {
2756
- d(this, et, $e).call(this), d(this, G, pt).call(this);
2784
+ ), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Ut, Ri).call(a)), d(r = i, Zt, Yi).call(r), i.update(), requestAnimationFrame(() => {
2785
+ d(this, it, Ce).call(this), d(this, X, mt).call(this);
2757
2786
  });
2758
- }, Ft = new WeakSet(), Ri = function() {
2787
+ }, Ut = new WeakSet(), Ri = function() {
2759
2788
  const i = this, { $wrapper: t, $button: e } = i, s = function() {
2760
2789
  const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
2761
2790
  t.scrollTo({
@@ -2763,13 +2792,13 @@ Yt = new WeakSet(), Gi = function() {
2763
2792
  behavior: "smooth"
2764
2793
  }), setTimeout(() => {
2765
2794
  var r;
2766
- d(r = i, G, pt).call(r);
2795
+ d(r = i, X, mt).call(r);
2767
2796
  }, 100);
2768
2797
  };
2769
2798
  e.forEach((o) => {
2770
2799
  o.removeEventListener("click", s), o.addEventListener("click", s);
2771
2800
  });
2772
- }, Ut = new WeakSet(), Xi = function() {
2801
+ }, Jt = new WeakSet(), Xi = function() {
2773
2802
  const { $wrapper: i } = this;
2774
2803
  let t = !1, e = !1, s = 0, o = 0;
2775
2804
  const a = function(p) {
@@ -2799,32 +2828,32 @@ Yt = new WeakSet(), Gi = function() {
2799
2828
  i.querySelectorAll("a").forEach((p) => {
2800
2829
  p.removeEventListener("click", u), p.addEventListener("click", u);
2801
2830
  });
2802
- }, et = new WeakSet(), $e = function() {
2831
+ }, it = new WeakSet(), Ce = function() {
2803
2832
  const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
2804
- e <= 0 || (_(i, "scrollable"), s == 0 ? (A(i, "scrollable"), _(t, "start"), A(t, "end")) : s + 1 >= e ? (A(i, "scrollable"), A(t, "start"), _(t, "end")) : (_(t, "center"), A(t, "start"), A(t, "end")));
2805
- }, G = new WeakSet(), pt = function() {
2833
+ e <= 0 || (x(i, "scrollable"), s == 0 ? (S(i, "scrollable"), x(t, "start"), S(t, "end")) : s + 1 >= e ? (S(i, "scrollable"), S(t, "start"), x(t, "end")) : (x(t, "center"), S(t, "start"), S(t, "end")));
2834
+ }, X = new WeakSet(), mt = function() {
2806
2835
  const { $wrapper: i, $button: t, $element: e } = this;
2807
2836
  if (!t)
2808
2837
  return;
2809
2838
  const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
2810
2839
  if (s <= 0) {
2811
- _(t, "hide"), A(t, "active"), _(e, "noScrollable");
2840
+ x(t, "hide"), S(t, "active"), x(e, "noScrollable");
2812
2841
  return;
2813
2842
  }
2814
- s > 0 && (_(t, "active"), A(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2843
+ s > 0 && (x(t, "active"), S(e, "noScrollable")), o == 0 ? t.forEach((a) => {
2815
2844
  if (a.classList.contains("next")) {
2816
- A(a, "hide");
2845
+ S(a, "hide");
2817
2846
  return;
2818
2847
  }
2819
- _(a, "hide");
2848
+ x(a, "hide");
2820
2849
  }) : o + 1 >= s ? t.forEach((a) => {
2821
2850
  if (a.classList.contains("next")) {
2822
- _(a, "hide");
2851
+ x(a, "hide");
2823
2852
  return;
2824
2853
  }
2825
- A(a, "hide");
2826
- }) : A(t, "hide");
2827
- }, Jt = new WeakSet(), Yi = function() {
2854
+ S(a, "hide");
2855
+ }) : S(t, "hide");
2856
+ }, Zt = new WeakSet(), Yi = function() {
2828
2857
  const { $element: i } = this, t = (s) => {
2829
2858
  if (this.option.selected) {
2830
2859
  const o = s.getAttribute("data-option").trim();
@@ -2838,31 +2867,31 @@ Yt = new WeakSet(), Gi = function() {
2838
2867
  s.removeEventListener("click", e), s.addEventListener("click", e);
2839
2868
  });
2840
2869
  };
2841
- var Zt, Fi, Qt, Ui, Vt, Ji, Kt, Zi;
2870
+ var Qt, Fi, Vt, Ui, Kt, Ji, te, Zi;
2842
2871
  class Qs {
2843
2872
  constructor(i) {
2844
2873
  // 初始化
2845
- h(this, Zt);
2846
- // 隱藏按鈕判斷
2847
2874
  h(this, Qt);
2848
- // 展開箭頭事件綁定
2875
+ // 隱藏按鈕判斷
2849
2876
  h(this, Vt);
2850
- // 選項事件綁定
2877
+ // 展開箭頭事件綁定
2851
2878
  h(this, Kt);
2852
- this.$element = i, this.option = i.s.option.collapse, d(this, Zt, Fi).call(this);
2879
+ // 選項事件綁定
2880
+ h(this, te);
2881
+ this.$element = i, this.option = i.s.option.collapse, d(this, Qt, Fi).call(this);
2853
2882
  }
2854
2883
  }
2855
- Zt = new WeakSet(), Fi = function() {
2856
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Qt, Ui).call(this) && d(this, Vt, Ji).call(this), d(this, Kt, Zi).call(this));
2857
- }, Qt = new WeakSet(), Ui = function() {
2884
+ Qt = new WeakSet(), Fi = function() {
2885
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Vt, Ui).call(this) && d(this, Kt, Ji).call(this), d(this, te, Zi).call(this));
2886
+ }, Vt = new WeakSet(), Ui = function() {
2858
2887
  const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
2859
- return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(S.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), A(this.$element, "noScrollable"), !0) : (_(this.$element, "noScrollable"), !1);
2860
- }, Vt = new WeakSet(), Ji = function() {
2888
+ return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(L.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), S(this.$element, "noScrollable"), !0) : (x(this.$element, "noScrollable"), !1);
2889
+ }, Kt = new WeakSet(), Ji = function() {
2861
2890
  const { $element: i, $button: t } = this, e = function() {
2862
2891
  i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
2863
2892
  };
2864
2893
  t.removeEventListener("click", e), t.addEventListener("click", e);
2865
- }, Kt = new WeakSet(), Zi = function() {
2894
+ }, te = new WeakSet(), Zi = function() {
2866
2895
  const { $element: i } = this, t = (s, o) => {
2867
2896
  if (i != null && i.classList.contains("expand") ? i == null || i.classList.remove("expand") : i == null || i.classList.add("expand"), this.option.selected) {
2868
2897
  const a = s.getAttribute("data-option").trim();
@@ -2878,18 +2907,18 @@ Zt = new WeakSet(), Fi = function() {
2878
2907
  };
2879
2908
  const Vs = (n) => {
2880
2909
  const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
2881
- return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e)), i == "collapse" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(S.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(S.append, e)), i == "dropdown" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(S.append, e)), s.children;
2910
+ return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(L.append, e)), i == "collapse" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(L.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(L.append, e)), i == "dropdown" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(L.append, e)), s.children;
2882
2911
  };
2883
- var te, Qi, ee, Vi, it, Ce, R, mt;
2912
+ var ee, Qi, ie, Vi, st, He, Y, gt;
2884
2913
  class Ks extends HTMLElement {
2885
2914
  constructor() {
2886
2915
  super();
2887
- h(this, te);
2888
2916
  h(this, ee);
2917
+ h(this, ie);
2889
2918
  // 斷點設定
2890
- h(this, it);
2919
+ h(this, st);
2891
2920
  // check type
2892
- h(this, R);
2921
+ h(this, Y);
2893
2922
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
2894
2923
  }
2895
2924
  static get observedAttributes() {
@@ -2901,7 +2930,7 @@ class Ks extends HTMLElement {
2901
2930
  case "m4-type":
2902
2931
  if (e === null || e === s)
2903
2932
  return;
2904
- this.s.type = s, d(this, R, mt).call(this);
2933
+ this.s.type = s, d(this, Y, gt).call(this);
2905
2934
  break;
2906
2935
  case "m4-status":
2907
2936
  if (e === s)
@@ -2918,13 +2947,13 @@ class Ks extends HTMLElement {
2918
2947
  }
2919
2948
  }
2920
2949
  connectedCallback() {
2921
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, te, Qi).call(this));
2950
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, ee, Qi).call(this));
2922
2951
  }
2923
2952
  update() {
2924
- d(this, it, Ce).call(this);
2953
+ d(this, st, He).call(this);
2925
2954
  }
2926
2955
  }
2927
- te = new WeakSet(), Qi = function() {
2956
+ ee = new WeakSet(), Qi = function() {
2928
2957
  let t = {};
2929
2958
  this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? H.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
2930
2959
  const e = (s) => {
@@ -2935,20 +2964,20 @@ te = new WeakSet(), Qi = function() {
2935
2964
  }
2936
2965
  this.update();
2937
2966
  };
2938
- window.removeEventListener("resize", Fe(e)), window.addEventListener("resize", Fe(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, H.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, H.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, H.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, H.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, ee, Vi).call(this);
2939
- }, ee = new WeakSet(), Vi = function() {
2940
- this.classList.add("m4-init"), d(this, it, Ce).call(this);
2941
- }, it = new WeakSet(), Ce = function() {
2967
+ window.removeEventListener("resize", Fe(e)), window.addEventListener("resize", Fe(e)), this.s.option = {}, this.s.option.drag = Object.assign({}, H.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, H.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, H.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, H.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), d(this, ie, Vi).call(this);
2968
+ }, ie = new WeakSet(), Vi = function() {
2969
+ this.classList.add("m4-init"), d(this, st, He).call(this);
2970
+ }, st = new WeakSet(), He = function() {
2942
2971
  const t = Object.keys(this.s.option.breakpoint);
2943
2972
  if (!t.length) {
2944
- d(this, R, mt).call(this);
2973
+ d(this, Y, gt).call(this);
2945
2974
  return;
2946
2975
  }
2947
2976
  t.map((e) => Number(e)).sort((e, s) => s - e).some((e) => {
2948
2977
  var s, o, a, r;
2949
- 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, R, mt).call(this), window.innerWidth >= e;
2978
+ 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, Y, gt).call(this), window.innerWidth >= e;
2950
2979
  });
2951
- }, R = new WeakSet(), mt = function() {
2980
+ }, Y = new WeakSet(), gt = function() {
2952
2981
  var o;
2953
2982
  const { type: t } = this.s;
2954
2983
  this.innerHTML = "", [...Vs(this)].forEach((a) => {
@@ -2966,43 +2995,43 @@ te = new WeakSet(), Qi = function() {
2966
2995
  (o = this.drag) == null || o.update();
2967
2996
  };
2968
2997
  customElements.define("multipurpose-nav", Ks);
2969
- var ie, ts, se, es, st, He, P, F, ne, is, oe, ss, ae, ns, re, os, le, as, ce, rs, de, ls, ue, cs, he, ds, q, B, pe, us, me, hs, fe, ps, ge, ms;
2998
+ var se, ts, ne, es, nt, Me, B, U, oe, is, ae, ss, re, ns, le, os, ce, as, de, rs, ue, ls, he, cs, pe, ds, N, G, me, us, ge, hs, fe, ps, ve, ms;
2970
2999
  class Ki extends HTMLElement {
2971
3000
  // 定義組件的初始狀態
2972
3001
  constructor(t, e) {
2973
3002
  super();
2974
- h(this, ie);
2975
3003
  h(this, se);
3004
+ h(this, ne);
2976
3005
  // 第一關 判斷數量以及id設定
2977
- h(this, st);
3006
+ h(this, nt);
2978
3007
  // 第二關 id命名提醒
2979
- h(this, P);
2980
- h(this, ne);
3008
+ h(this, B);
2981
3009
  h(this, oe);
2982
3010
  h(this, ae);
3011
+ h(this, re);
2983
3012
  // 執行函式
2984
3013
  // 移動至指定位置
2985
- h(this, re);
2986
- // 移動
2987
3014
  h(this, le);
2988
- // 步驟狀態
3015
+ // 移動
2989
3016
  h(this, ce);
2990
- // next 按鈕狀態
3017
+ // 步驟狀態
2991
3018
  h(this, de);
2992
- // prev 按鈕狀態
3019
+ // next 按鈕狀態
2993
3020
  h(this, ue);
2994
- // 頁籤狀態
3021
+ // prev 按鈕狀態
2995
3022
  h(this, he);
3023
+ // 頁籤狀態
3024
+ h(this, pe);
2996
3025
  // 第三關各種元件判斷 及 執行
2997
- h(this, q);
3026
+ h(this, N);
2998
3027
  // 消失動畫
2999
- h(this, pe);
3000
- // 出現動畫
3001
3028
  h(this, me);
3029
+ // 出現動畫
3030
+ h(this, ge);
3002
3031
  // 狀態
3003
3032
  h(this, fe);
3004
3033
  // resize
3005
- h(this, ge);
3034
+ h(this, ve);
3006
3035
  }
3007
3036
  // 當組件的屬性被更改時會被呼叫
3008
3037
  static get observedAttributes() {
@@ -3012,41 +3041,41 @@ class Ki extends HTMLElement {
3012
3041
  t === "t4-active" && e !== s && d(this, fe, ps).call(this, s);
3013
3042
  }
3014
3043
  connectedCallback() {
3015
- this.classList.contains("t4-initialize") || d(this, ie, ts).call(this);
3044
+ this.classList.contains("t4-initialize") || d(this, se, ts).call(this);
3016
3045
  }
3017
3046
  // ------------- 我是分隔線呦 -------------
3018
3047
  // 頁籤切換
3019
3048
  tabClick(t) {
3020
3049
  const { t: e } = this, s = e.tabs.indexOf(t) % e.tabPanels.length, o = e.tabGroup === "true" ? String(s) : t.getAttribute("t4-id");
3021
3050
  this.setActiveTab(o), setTimeout(() => {
3022
- d(this, q, B).call(this, "eventAnchor");
3051
+ d(this, N, G).call(this, "eventAnchor");
3023
3052
  }, e.transition.duration);
3024
3053
  }
3025
3054
  // 外部呼叫方法 $0.setActiveTab(0)
3026
3055
  setActiveTab(t) {
3027
3056
  const { t: e } = this, s = t === "" ? e.tabPanels[0].getAttribute("t4-id") : t;
3028
3057
  e.activeTab = s, this.setAttribute("t4-active", s);
3029
- const o = d(this, P, F).call(this, s);
3058
+ const o = d(this, B, U).call(this, s);
3030
3059
  e.tabPanels.forEach((a, r) => {
3031
- r === o ? d(this, me, hs).call(this, r) : d(this, pe, us).call(this, r);
3060
+ r === o ? d(this, ge, hs).call(this, r) : d(this, me, us).call(this, r);
3032
3061
  });
3033
3062
  }
3034
3063
  // 外部呼叫方法 $0.goNext()
3035
3064
  goNext() {
3036
- 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");
3065
+ const t = d(this, B, U).call(this, this.t.activeTab), e = Math.min(this.t.tabPanels.length - 1, t + 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3037
3066
  this.setActiveTab(s);
3038
3067
  }
3039
3068
  // 外部呼叫方法 $0.goPrev()
3040
3069
  goPrev() {
3041
- 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");
3070
+ const t = d(this, B, U).call(this, this.t.activeTab), e = Math.max(0, t - 1), s = this.t.tabPanels[e].getAttribute("t4-id");
3042
3071
  this.setActiveTab(s);
3043
3072
  }
3044
3073
  // 外部呼叫方法 $0.update()
3045
3074
  update() {
3046
- this.t.tabs = d(this, st, He).call(this), fs(), console.log("tab update!!!!");
3075
+ this.t.tabs = d(this, nt, Me).call(this), gs(), console.log("tab update!!!!");
3047
3076
  }
3048
3077
  }
3049
- ie = new WeakSet(), ts = function() {
3078
+ se = new WeakSet(), ts = function() {
3050
3079
  const t = this.getAttribute("t4-name"), { SETTINGS: e } = Ke;
3051
3080
  document.querySelectorAll(`tab-el[t4-name=${t}]`).length > 1 && console.warn(t, "名字有重複喔!!!"), this.t = {
3052
3081
  tabs: [],
@@ -3066,36 +3095,36 @@ ie = new WeakSet(), ts = function() {
3066
3095
  delay: this.getAttribute("t4-delay") || e.transition.delay
3067
3096
  },
3068
3097
  tabGroup: this.getAttribute("t4-group") || e.tabGroup
3069
- }, this.__events__ = {}, this.t.tabs = d(this, st, He).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, se, es).call(this);
3070
- }, se = new WeakSet(), es = function() {
3071
- if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, ne, is).call(this), this.t.recordUrl) {
3098
+ }, this.__events__ = {}, this.t.tabs = d(this, nt, Me).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, ne, es).call(this);
3099
+ }, ne = new WeakSet(), es = function() {
3100
+ if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, oe, is).call(this), this.t.recordUrl) {
3072
3101
  const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
3073
3102
  e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
3074
3103
  }
3075
- this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, ge, ms).call(this);
3076
- }, st = new WeakSet(), He = function() {
3104
+ this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, ve, ms).call(this);
3105
+ }, nt = new WeakSet(), Me = function() {
3077
3106
  const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
3078
3107
  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) => {
3079
3108
  s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
3080
3109
  }), e;
3081
- }, P = new WeakSet(), F = function(t) {
3110
+ }, B = new WeakSet(), U = function(t) {
3082
3111
  const { t: e } = this, s = e.tabPanels.filter((a) => a.getAttribute("t4-id") === t);
3083
3112
  s.length > 1 && console.warn("有兩個相同id設定", s);
3084
3113
  const o = s[0];
3085
3114
  return o ? e.tabPanels.indexOf(o) : (console.warn(`找不到t4-id為${t}的頁籤`), 0);
3086
- }, ne = new WeakSet(), is = function() {
3115
+ }, oe = new WeakSet(), is = function() {
3087
3116
  const t = document.createElement("div");
3088
3117
  t.classList.add("swiper-container");
3089
3118
  const e = document.createElement("div");
3090
3119
  e.classList.add("swiper-wrapper"), this.t.tabPanels.forEach((s) => {
3091
3120
  e.appendChild(s.cloneNode(!0));
3092
- }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, oe, ss).call(this);
3093
- }, oe = new WeakSet(), ss = function() {
3121
+ }), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, ae, ss).call(this);
3122
+ }, ae = new WeakSet(), ss = function() {
3094
3123
  const t = this.querySelector(".swiper-container"), e = this.querySelector(".swiper-wrapper"), s = this.t.tabPanels;
3095
3124
  t.style.overflow = "hidden", e.style.display = "flex";
3096
3125
  const o = s.length * 100 + "%";
3097
3126
  e.style.width = o;
3098
- }, ae = new WeakSet(), ns = function(t) {
3127
+ }, re = new WeakSet(), ns = function(t) {
3099
3128
  const { t: e } = this;
3100
3129
  if (e.recordUrl === "true") {
3101
3130
  const s = new URLSearchParams(document.location.search);
@@ -3103,55 +3132,55 @@ ie = new WeakSet(), ts = function() {
3103
3132
  const o = `${window.location.pathname}?${s.toString()}`;
3104
3133
  history.replaceState({ t4Id: t }, "", o);
3105
3134
  }
3106
- }, re = new WeakSet(), os = function() {
3135
+ }, le = new WeakSet(), os = function() {
3107
3136
  const t = parseInt(this.t.gap, 10), e = window.pageYOffset, o = this.getBoundingClientRect().top + e - t;
3108
- d(this, le, as).call(this, o);
3109
- }, le = new WeakSet(), as = function(t) {
3137
+ d(this, ce, as).call(this, o);
3138
+ }, ce = new WeakSet(), as = function(t) {
3110
3139
  window.scrollTo({
3111
3140
  top: t,
3112
3141
  behavior: "smooth"
3113
3142
  });
3114
- }, ce = new WeakSet(), rs = function(t) {
3143
+ }, de = new WeakSet(), rs = function(t) {
3115
3144
  let e = parseInt(t, 10) + 1;
3116
3145
  this.t.step.textContent = `${e}`, this.t.step.setAttribute("now-page", e);
3117
- }, de = new WeakSet(), ls = function(t) {
3146
+ }, ue = new WeakSet(), ls = function(t) {
3118
3147
  const e = document.querySelectorAll(`[t4-role="next"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === this.t.tabPanels.length - 1;
3119
3148
  e.forEach((a) => {
3120
3149
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3121
3150
  });
3122
- }, ue = new WeakSet(), cs = function(t) {
3151
+ }, he = new WeakSet(), cs = function(t) {
3123
3152
  const e = document.querySelectorAll(`[t4-role="prev"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === 0;
3124
3153
  e.forEach((a) => {
3125
3154
  s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
3126
3155
  });
3127
- }, he = new WeakSet(), ds = function(t, e) {
3156
+ }, pe = new WeakSet(), ds = function(t, e) {
3128
3157
  this.t.tabGroup === "true" ? this.t.tabs.forEach((s, o) => {
3129
3158
  o == t ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3130
3159
  }) : this.t.tabs.forEach((s, o) => {
3131
3160
  s.getAttribute("t4-id") === e ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
3132
3161
  });
3133
- }, q = new WeakSet(), B = function(t, e, s) {
3162
+ }, N = new WeakSet(), G = function(t, e, s) {
3134
3163
  switch (t) {
3135
3164
  case "step":
3136
- Ee(this.t.step) && d(this, ce, rs).call(this, e);
3165
+ Ae(this.t.step) && d(this, de, rs).call(this, e);
3137
3166
  break;
3138
3167
  case "eventAnchor":
3139
- this.t.anchor && d(this, re, os).call(this);
3168
+ this.t.anchor && d(this, le, os).call(this);
3140
3169
  break;
3141
3170
  case "tabState":
3142
- this.t.type == "normal" && d(this, he, ds).call(this, e, s);
3171
+ this.t.type == "normal" && d(this, pe, ds).call(this, e, s);
3143
3172
  break;
3144
3173
  case "btnState":
3145
- d(this, de, ls).call(this, e), d(this, ue, cs).call(this, e);
3174
+ d(this, ue, ls).call(this, e), d(this, he, cs).call(this, e);
3146
3175
  break;
3147
3176
  case "tabUrl":
3148
- this.t.recordUrl === "true" && d(this, ae, ns).call(this, e);
3177
+ this.t.recordUrl === "true" && d(this, re, ns).call(this, e);
3149
3178
  break;
3150
3179
  default:
3151
3180
  console.warn("請增加判斷,謝謝");
3152
3181
  break;
3153
3182
  }
3154
- }, pe = new WeakSet(), us = function(t) {
3183
+ }, me = new WeakSet(), us = function(t) {
3155
3184
  const { t: e } = this;
3156
3185
  this.t.transition;
3157
3186
  const s = e.tabPanels[t];
@@ -3168,7 +3197,7 @@ ie = new WeakSet(), ts = function() {
3168
3197
  s.style.display = "none";
3169
3198
  break;
3170
3199
  }
3171
- }, me = new WeakSet(), hs = function(t) {
3200
+ }, ge = new WeakSet(), hs = function(t) {
3172
3201
  const { duration: e, timing: s, delay: o } = this.t.transition, a = this.t.tabPanels[t];
3173
3202
  let r;
3174
3203
  switch (a.classList.add("show"), a.classList.remove("hide"), a.style.transition = `opacity ${e}ms ${s} ${o}ms`, a.style.display = "block", this.t.display) {
@@ -3194,9 +3223,9 @@ ie = new WeakSet(), ts = function() {
3194
3223
  break;
3195
3224
  }
3196
3225
  }, fe = new WeakSet(), ps = function(t) {
3197
- const e = d(this, P, F).call(this, t);
3198
- d(this, q, B).call(this, "step", e), d(this, q, B).call(this, "btnState", e), d(this, q, B).call(this, "tabState", e, t), d(this, q, B).call(this, "tabUrl", t), this.emit("change");
3199
- }, ge = new WeakSet(), ms = function() {
3226
+ const e = d(this, B, U).call(this, t);
3227
+ d(this, N, G).call(this, "step", e), d(this, N, G).call(this, "btnState", e), d(this, N, G).call(this, "tabState", e, t), d(this, N, G).call(this, "tabUrl", t), this.emit("change");
3228
+ }, ve = new WeakSet(), ms = function() {
3200
3229
  const t = this;
3201
3230
  window.addEventListener(
3202
3231
  "resize",
@@ -3211,7 +3240,7 @@ function tn(n, i = 1e3) {
3211
3240
  t && clearTimeout(t), t = setTimeout(n, i, e);
3212
3241
  };
3213
3242
  }
3214
- function fs() {
3243
+ function gs() {
3215
3244
  const n = document.querySelectorAll("[t4-control]");
3216
3245
  document.addEventListener("click", function(i) {
3217
3246
  let t = !1;
@@ -3241,8 +3270,8 @@ function fs() {
3241
3270
  }
3242
3271
  });
3243
3272
  }
3244
- fs();
3245
- Object.assign(Ki.prototype, I);
3273
+ gs();
3274
+ Object.assign(Ki.prototype, j);
3246
3275
  customElements.define("tab-el", Ki);
3247
3276
  const Je = (n) => {
3248
3277
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e);
@@ -3251,48 +3280,48 @@ const Je = (n) => {
3251
3280
  const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
3252
3281
  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";
3253
3282
  };
3254
- var nt, Me, ve, gs, be, vs, ot, qe;
3283
+ var ot, qe, be, fs, ye, vs, at, Ie;
3255
3284
  class sn {
3256
3285
  constructor(i, t = {}) {
3257
- h(this, nt);
3258
- h(this, ve);
3259
- h(this, be);
3260
3286
  h(this, ot);
3261
- !rt(i) && !Ee(i) && !lt(i) && !T(i) || (this.__storage__ = {
3287
+ h(this, be);
3288
+ h(this, ye);
3289
+ h(this, at);
3290
+ !lt(i) && !Ae(i) && !ct(i) && !E(i) || (this.__storage__ = {
3262
3291
  el: i,
3263
3292
  options: t
3264
- }, this.active = "data-collapse-active", d(this, nt, Me).call(this));
3293
+ }, this.active = "data-collapse-active", d(this, ot, qe).call(this));
3265
3294
  }
3266
3295
  update() {
3267
- d(this, nt, Me).call(this);
3296
+ d(this, ot, qe).call(this);
3268
3297
  }
3269
3298
  }
3270
- nt = new WeakSet(), Me = function() {
3299
+ ot = new WeakSet(), qe = function() {
3271
3300
  const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = ti;
3272
3301
  if (this.elements = t.state == "not active" ? k(i + `:not([${this.active}])`) : k(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
3273
3302
  for (const [o, a] of Object.entries(this.options.on))
3274
3303
  this.__events__[o] = [a];
3275
- d(this, ve, gs).call(this);
3276
- }, ve = new WeakSet(), gs = function() {
3304
+ d(this, be, fs).call(this);
3305
+ }, be = new WeakSet(), fs = function() {
3277
3306
  const { elements: i, options: t } = this;
3278
3307
  i.forEach((e) => {
3279
- e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), d(this, be, vs).call(this, e);
3308
+ e.collapse = {}, e.collapse.instance = this, e.collapse.defaultOptions = t, e.collapse.methods = {}, e.collapse.methods.update = this.update, e.setAttribute(this.active, ""), d(this, ye, vs).call(this, e);
3280
3309
  }), this.emit("init");
3281
- }, be = new WeakSet(), vs = function(i) {
3310
+ }, ye = new WeakSet(), vs = function(i) {
3282
3311
  const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
3283
- 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, qe)), c.addEventListener("click", d(this, ot, qe)), r) {
3284
- const p = (f) => {
3285
- f.stopPropagation();
3312
+ 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, at, Ie)), c.addEventListener("click", d(this, at, Ie)), r) {
3313
+ const p = (g) => {
3314
+ g.stopPropagation();
3286
3315
  };
3287
3316
  u.removeEventListener("click", p), u.addEventListener("click", p);
3288
3317
  }
3289
- }, ot = new WeakSet(), qe = function() {
3318
+ }, at = new WeakSet(), Ie = function() {
3290
3319
  const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
3291
3320
  r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
3292
3321
  Je(l);
3293
3322
  }), en(r)) : Je(r), i.emit("afterCollapse");
3294
3323
  };
3295
- Object.assign(sn.prototype, I);
3324
+ Object.assign(sn.prototype, j);
3296
3325
  function nn(n, i) {
3297
3326
  const t = i, { color: e, opacity: s, duration: o } = i.s.options;
3298
3327
  let a = document.createElement("span"), r = n.clientX - t.getBoundingClientRect().left, l = n.clientY - t.getBoundingClientRect().top;
@@ -3306,25 +3335,25 @@ function bs() {
3306
3335
  });
3307
3336
  }
3308
3337
  document.addEventListener("click", bs);
3309
- var at, Oe, ye, ys, we, ws, Te, Ts;
3338
+ var rt, Oe, we, ys, Te, ws, Ee, Ts;
3310
3339
  class on extends HTMLElement {
3311
3340
  constructor() {
3312
3341
  super();
3313
- h(this, at);
3314
- h(this, ye);
3342
+ h(this, rt);
3315
3343
  h(this, we);
3316
3344
  h(this, Te);
3345
+ h(this, Ee);
3317
3346
  this.initialize = !1;
3318
3347
  }
3319
3348
  connectedCallback() {
3320
3349
  const t = this;
3321
- t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, at, Oe).call(this));
3350
+ t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, rt, Oe).call(this));
3322
3351
  }
3323
3352
  update() {
3324
- this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, at, Oe).call(this);
3353
+ this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, rt, Oe).call(this);
3325
3354
  }
3326
3355
  }
3327
- at = new WeakSet(), Oe = function() {
3356
+ rt = new WeakSet(), Oe = function() {
3328
3357
  const { SETTINGS: t } = ei;
3329
3358
  this.s = {};
3330
3359
  function e(o) {
@@ -3339,13 +3368,13 @@ at = new WeakSet(), Oe = function() {
3339
3368
  hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
3340
3369
  click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
3341
3370
  };
3342
- this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, ye, ys).call(this);
3343
- }, ye = new WeakSet(), ys = function() {
3344
- d(this, we, ws).call(this), d(this, Te, Ts).call(this), this.classList.add("r4-initialize");
3345
- }, we = new WeakSet(), ws = function() {
3371
+ this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, we, ys).call(this);
3372
+ }, we = new WeakSet(), ys = function() {
3373
+ d(this, Te, ws).call(this), d(this, Ee, Ts).call(this), this.classList.add("r4-initialize");
3374
+ }, Te = new WeakSet(), ws = function() {
3346
3375
  const t = this, e = document.createElement("i");
3347
3376
  e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
3348
- }, Te = new WeakSet(), Ts = function() {
3377
+ }, Ee = new WeakSet(), Ts = function() {
3349
3378
  const t = this.querySelector("i.hover-ball"), e = this;
3350
3379
  e.addEventListener("click", function(a) {
3351
3380
  a.stopPropagation(), e.s.options.click && nn(a, e);
@@ -3455,8 +3484,8 @@ function ln(n, i, t, e) {
3455
3484
  l < c ? (u = e / l * 100, p = s.height) : l > c ? (u = s.width, p = t * l / 100) : l === c && (u = s.width, p = s.height);
3456
3485
  break;
3457
3486
  }
3458
- const f = (s.width - u) * 0.5, m = (s.height - p) * 0.5;
3459
- return o.drawImage(i, f, m, u, p), s;
3487
+ const g = (s.width - u) * 0.5, m = (s.height - p) * 0.5;
3488
+ return o.drawImage(i, g, m, u, p), s;
3460
3489
  }
3461
3490
  function cn(n, i) {
3462
3491
  return new Promise((t, e) => {
@@ -3542,7 +3571,7 @@ class pn {
3542
3571
  }
3543
3572
  export {
3544
3573
  ii as A,
3545
- xn as B,
3574
+ _n as B,
3546
3575
  sn as C,
3547
3576
  qi as D,
3548
3577
  $n as E,
@@ -3551,9 +3580,9 @@ export {
3551
3580
  Mn as H,
3552
3581
  an as I,
3553
3582
  qn as J,
3554
- On as K,
3555
- In as L,
3556
- J as M,
3583
+ In as K,
3584
+ On as L,
3585
+ Z as M,
3557
3586
  Nn as N,
3558
3587
  Pn as O,
3559
3588
  jn as P,
@@ -3566,31 +3595,31 @@ export {
3566
3595
  Rn as W,
3567
3596
  Xn as X,
3568
3597
  Yn as Y,
3569
- T as a,
3570
- lt as b,
3571
- xs as c,
3572
- _s as d,
3573
- Ne as e,
3574
- S as f,
3598
+ E as a,
3599
+ ct as b,
3600
+ _s as c,
3601
+ xs as d,
3602
+ Pe as e,
3603
+ L as f,
3575
3604
  k as g,
3576
3605
  En as h,
3577
- rt as i,
3578
- gi as j,
3606
+ lt as i,
3607
+ fi as j,
3579
3608
  Zs as k,
3580
3609
  Ks as l,
3581
3610
  pn as m,
3582
3611
  zs as n,
3583
3612
  Fn as o,
3584
- Ln as p,
3585
- _i as q,
3586
- xi as r,
3613
+ An as p,
3614
+ xi as q,
3615
+ _i as r,
3587
3616
  ks as s,
3588
- An as t,
3617
+ Ln as t,
3589
3618
  Sn as u,
3590
- ke as v,
3619
+ xe as v,
3591
3620
  Dn as w,
3592
3621
  js as x,
3593
3622
  kn as y,
3594
- _n as z
3623
+ xn as z
3595
3624
  };
3596
3625
  //# sourceMappingURL=image-preview-bundle.js.map