@xwadex/fesd 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image-preview-bundle.js +237 -233
- package/dist/image-preview-bundle.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ var h = (n, i, t) => {
|
|
|
8
8
|
i instanceof WeakSet ? i.add(n) : i.set(n, t);
|
|
9
9
|
};
|
|
10
10
|
var d = (n, i, t) => (fs(n, i, "access private method"), t);
|
|
11
|
-
import { OverlayScrollbars as
|
|
11
|
+
import { OverlayScrollbars as Me } from "overlayscrollbars";
|
|
12
12
|
import v from "jquery";
|
|
13
13
|
import "./vendor-bundle.js";
|
|
14
14
|
import "validator";
|
|
@@ -108,7 +108,7 @@ const Y = {
|
|
|
108
108
|
gap: 30
|
|
109
109
|
// 跑馬燈內容之間的距離 - Number
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, qe = {
|
|
112
112
|
SETTINGS: {
|
|
113
113
|
scrollbar: {
|
|
114
114
|
"scrollbar-track-color": "transparent",
|
|
@@ -301,7 +301,7 @@ const Y = {
|
|
|
301
301
|
aost4: Ye,
|
|
302
302
|
article4: ws,
|
|
303
303
|
collapse4: Je,
|
|
304
|
-
dropdown4:
|
|
304
|
+
dropdown4: qe,
|
|
305
305
|
marquee4: x,
|
|
306
306
|
modal4: I,
|
|
307
307
|
multipurpose4: H,
|
|
@@ -314,7 +314,7 @@ const Y = {
|
|
|
314
314
|
after: "afterend",
|
|
315
315
|
append: "beforeend",
|
|
316
316
|
prepend: "afterbegin"
|
|
317
|
-
}, rt = (n) => typeof n == "string" && n !== "",
|
|
317
|
+
}, rt = (n) => typeof n == "string" && n !== "", we = (n) => n instanceof HTMLElement, lt = (n) => n instanceof NodeList, w = (n) => L(n) !== null, j = (n) => typeof n == "function", L = (n) => we(n) ? n : document.querySelector(n), S = (n) => lt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
|
|
318
318
|
const i = document.createElement("div");
|
|
319
319
|
return i.innerHTML = n, i.childNodes;
|
|
320
320
|
}, As = (n) => {
|
|
@@ -326,7 +326,7 @@ const Y = {
|
|
|
326
326
|
return JSON.parse(n);
|
|
327
327
|
}, E = (n, i) => {
|
|
328
328
|
console.warn(`[${n} warn]: ${i}`);
|
|
329
|
-
},
|
|
329
|
+
}, Pe = (n, i) => {
|
|
330
330
|
console.error(`[${n} error]: ${i}`);
|
|
331
331
|
}, O = {
|
|
332
332
|
on(n, i) {
|
|
@@ -369,33 +369,33 @@ const Y = {
|
|
|
369
369
|
easeOutQuart(n, i, t, e) {
|
|
370
370
|
return -t * ((n = n / e - 1) * n * n * n - 1) + i;
|
|
371
371
|
}
|
|
372
|
-
},
|
|
372
|
+
}, Te = (n, i) => {
|
|
373
373
|
const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? L(e) : document.scrollingElement, f = m[u], b = w(t) ? L(t).getBoundingClientRect()[p] : 0 - f, y = w(s) ? L(s).getBoundingClientRect()[g] : 0, _ = b - a - y, G = 15;
|
|
374
374
|
let D = 0;
|
|
375
375
|
if (_ === 0)
|
|
376
376
|
return;
|
|
377
377
|
const R = (X) => {
|
|
378
|
-
const
|
|
379
|
-
i && i.emit(X,
|
|
378
|
+
const Ne = L(t);
|
|
379
|
+
i && i.emit(X, Ne), !i && n.on && j(n.on[X]) && n.on[X](Ne);
|
|
380
380
|
};
|
|
381
381
|
R("beforeScroll");
|
|
382
|
-
const
|
|
382
|
+
const Oe = () => {
|
|
383
383
|
D += G;
|
|
384
384
|
const X = Ls[r](D, f, _, o);
|
|
385
|
-
m[u] = X, D < o && requestAnimationFrame(
|
|
385
|
+
m[u] = X, D < o && requestAnimationFrame(Oe), D >= o && R("afterScroll");
|
|
386
386
|
};
|
|
387
|
-
requestAnimationFrame(
|
|
387
|
+
requestAnimationFrame(Oe);
|
|
388
388
|
};
|
|
389
|
-
var Z,
|
|
389
|
+
var Z, Ee, mt, Ve, gt, Ke;
|
|
390
390
|
class Qe {
|
|
391
391
|
constructor(i, t = {}) {
|
|
392
392
|
h(this, Z);
|
|
393
|
+
h(this, mt);
|
|
393
394
|
h(this, gt);
|
|
394
|
-
h(this, ft);
|
|
395
395
|
this.__storage__ = {
|
|
396
396
|
el: i,
|
|
397
397
|
options: t
|
|
398
|
-
}, this.active = "data-anchor-active", d(this, Z,
|
|
398
|
+
}, this.active = "data-anchor-active", d(this, Z, Ee).call(this);
|
|
399
399
|
}
|
|
400
400
|
destroy() {
|
|
401
401
|
const { elements: i } = this;
|
|
@@ -405,12 +405,12 @@ class Qe {
|
|
|
405
405
|
}
|
|
406
406
|
update() {
|
|
407
407
|
var i;
|
|
408
|
-
return d(i = this.destroy(), Z,
|
|
408
|
+
return d(i = this.destroy(), Z, Ee).call(i), this.emit("afterUpdate"), this;
|
|
409
409
|
}
|
|
410
410
|
static run(i) {
|
|
411
411
|
const { SETTINGS: t } = dt, e = Object.assign({}, t, i);
|
|
412
412
|
setTimeout(() => {
|
|
413
|
-
|
|
413
|
+
Te(e);
|
|
414
414
|
}, e.delay);
|
|
415
415
|
}
|
|
416
416
|
static url(i) {
|
|
@@ -419,11 +419,11 @@ class Qe {
|
|
|
419
419
|
return;
|
|
420
420
|
const r = Object.assign({}, t, i, { target: a });
|
|
421
421
|
setTimeout(() => {
|
|
422
|
-
|
|
422
|
+
Te(r);
|
|
423
423
|
}, r.delay);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
Z = new WeakSet(),
|
|
426
|
+
Z = new WeakSet(), Ee = function() {
|
|
427
427
|
const { el: i, options: t } = this.__storage__;
|
|
428
428
|
if (!rt(i) || !w(i))
|
|
429
429
|
return;
|
|
@@ -431,13 +431,13 @@ Z = new WeakSet(), Ae = function() {
|
|
|
431
431
|
if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.elements = S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
|
432
432
|
for (const [o, a] of Object.entries(this.options.on))
|
|
433
433
|
this.__events__[o] = [a];
|
|
434
|
-
d(this,
|
|
435
|
-
},
|
|
434
|
+
d(this, mt, Ve).call(this);
|
|
435
|
+
}, mt = new WeakSet(), Ve = function() {
|
|
436
436
|
const { elements: i, options: t } = this;
|
|
437
437
|
i.forEach((e) => {
|
|
438
|
-
e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this,
|
|
438
|
+
e.anchor = {}, e.anchor.instance = this, e.anchor.eventHandler = d(this, gt, Ke), e.anchor.defaultOptions = t, e.anchor.methods = {}, e.anchor.methods.destroy = this.destroy, e.anchor.methods.update = this.update, e.addEventListener("click", e.anchor.eventHandler), e.setAttribute(this.active, "");
|
|
439
439
|
}), this.emit("afterInit");
|
|
440
|
-
},
|
|
440
|
+
}, gt = new WeakSet(), Ke = function() {
|
|
441
441
|
const { defaultOptions: i, eventHandler: t, instance: e } = this.anchor, s = {
|
|
442
442
|
target: this.getAttribute("data-anchor-target") || i.target,
|
|
443
443
|
container: this.getAttribute("data-anchor-container") || i.container,
|
|
@@ -451,7 +451,7 @@ Z = new WeakSet(), Ae = function() {
|
|
|
451
451
|
this.removeEventListener("click", t), setTimeout(() => {
|
|
452
452
|
this.addEventListener("click", t);
|
|
453
453
|
}, s.speed), setTimeout(() => {
|
|
454
|
-
|
|
454
|
+
Te(s, e);
|
|
455
455
|
}, s.delay);
|
|
456
456
|
};
|
|
457
457
|
Object.assign(Qe.prototype, O);
|
|
@@ -464,15 +464,15 @@ const { MODALS: M } = window, Ss = (n) => {
|
|
|
464
464
|
s.append(o);
|
|
465
465
|
}), e.children[0];
|
|
466
466
|
};
|
|
467
|
-
var
|
|
467
|
+
var ft, ei, vt, ii, bt, si, yt, ni, wt, oi;
|
|
468
468
|
class ti extends HTMLElement {
|
|
469
469
|
constructor() {
|
|
470
470
|
super();
|
|
471
|
+
h(this, ft);
|
|
471
472
|
h(this, vt);
|
|
472
473
|
h(this, bt);
|
|
473
474
|
h(this, yt);
|
|
474
475
|
h(this, wt);
|
|
475
|
-
h(this, Tt);
|
|
476
476
|
this.initialize = !1;
|
|
477
477
|
}
|
|
478
478
|
static get observedAttributes() {
|
|
@@ -481,12 +481,12 @@ class ti extends HTMLElement {
|
|
|
481
481
|
attributeChangedCallback(t, e, s) {
|
|
482
482
|
switch (t) {
|
|
483
483
|
case ":state":
|
|
484
|
-
d(this,
|
|
484
|
+
d(this, wt, oi).call(this, s);
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
connectedCallback() {
|
|
489
|
-
this.initialize || (this.initialize = !0, d(this,
|
|
489
|
+
this.initialize || (this.initialize = !0, d(this, ft, ei).call(this));
|
|
490
490
|
}
|
|
491
491
|
open() {
|
|
492
492
|
return this.setAttribute(":state", "open"), this;
|
|
@@ -498,22 +498,22 @@ class ti extends HTMLElement {
|
|
|
498
498
|
return this.setAttribute(":state", "destroy"), this;
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
ft = new WeakSet(), ei = function() {
|
|
502
502
|
const { ATTRS: t } = I;
|
|
503
503
|
this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
|
|
504
504
|
const e = this.getAttribute(t.id) || Ts();
|
|
505
|
-
this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && E(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this,
|
|
506
|
-
},
|
|
507
|
-
this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this,
|
|
508
|
-
},
|
|
505
|
+
this.getAttribute(t.id) || (E(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && E(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, vt, ii).call(this);
|
|
506
|
+
}, vt = new WeakSet(), ii = function() {
|
|
507
|
+
this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, bt, si).call(this);
|
|
508
|
+
}, bt = new WeakSet(), si = function() {
|
|
509
509
|
const t = this.querySelector(".modal-scroller");
|
|
510
|
-
this.__scroller__ =
|
|
510
|
+
this.__scroller__ = Me(t, {
|
|
511
511
|
overflowBehavior: {
|
|
512
512
|
x: "hidden"
|
|
513
513
|
},
|
|
514
514
|
autoUpdate: !0
|
|
515
|
-
}), window.modalScroll = this.__scroller__, d(this,
|
|
516
|
-
},
|
|
515
|
+
}), window.modalScroll = this.__scroller__, d(this, yt, ni).call(this);
|
|
516
|
+
}, yt = new WeakSet(), ni = function() {
|
|
517
517
|
var a, r, l;
|
|
518
518
|
const t = this, { ATTRS: e } = I, { close: s, destroy: o } = e;
|
|
519
519
|
(a = t.querySelectorAll(`[${s}]`)) == null || a.forEach((c) => {
|
|
@@ -529,7 +529,7 @@ vt = new WeakSet(), ei = function() {
|
|
|
529
529
|
}), (l = t.querySelector("[stop-propagation]")) == null || l.addEventListener("click", function(c) {
|
|
530
530
|
c.stopPropagation();
|
|
531
531
|
});
|
|
532
|
-
},
|
|
532
|
+
}, wt = new WeakSet(), oi = function(t) {
|
|
533
533
|
const { __scroller__: e } = this;
|
|
534
534
|
if (t === "open") {
|
|
535
535
|
if (this.style.display = "block", e) {
|
|
@@ -561,18 +561,18 @@ vt = new WeakSet(), ei = function() {
|
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
Object.assign(ti.prototype, O);
|
|
564
|
-
const { MODALS:
|
|
564
|
+
const { MODALS: Ie } = window, ai = (n, i, ...t) => {
|
|
565
565
|
if (!i)
|
|
566
566
|
return;
|
|
567
567
|
const e = n[i];
|
|
568
568
|
e && j(e) && e.apply(n, t);
|
|
569
569
|
}, ri = (n, ...i) => {
|
|
570
570
|
n && j(n) && n.apply(J, i);
|
|
571
|
-
},
|
|
572
|
-
const { target: t } = n, e =
|
|
571
|
+
}, je = (n, i) => {
|
|
572
|
+
const { target: t } = n, e = Ie[t] || L(n.target);
|
|
573
573
|
e && li(n, i), e || Ds(n, i);
|
|
574
574
|
}, li = (n, i) => {
|
|
575
|
-
const { target: t, action: e, on: s, e: o } = n, a =
|
|
575
|
+
const { target: t, action: e, on: s, e: o } = n, a = Ie[t] || L(n.target);
|
|
576
576
|
switch (["open", "close", "destroy"].forEach((l) => {
|
|
577
577
|
a.once(l, () => {
|
|
578
578
|
i && (i.emit(l, a, o), ai(i, s[l], a, o)), i || ri(s[l], a);
|
|
@@ -604,22 +604,22 @@ const { MODALS: Oe } = window, ai = (n, i, ...t) => {
|
|
|
604
604
|
[...c].forEach((g) => {
|
|
605
605
|
u.append(g);
|
|
606
606
|
});
|
|
607
|
-
const p =
|
|
607
|
+
const p = Ie[t] || L(n.target);
|
|
608
608
|
r("complete", p), li(n, i);
|
|
609
609
|
}).catch((l) => {
|
|
610
610
|
r("error", l);
|
|
611
611
|
});
|
|
612
612
|
};
|
|
613
|
-
var Q,
|
|
613
|
+
var Q, Ae, Tt, ci, Et, di;
|
|
614
614
|
const N = class N {
|
|
615
615
|
constructor(i, t = {}) {
|
|
616
616
|
h(this, Q);
|
|
617
|
+
h(this, Tt);
|
|
617
618
|
h(this, Et);
|
|
618
|
-
h(this, At);
|
|
619
619
|
this.__storage__ = {
|
|
620
620
|
el: i,
|
|
621
621
|
options: t
|
|
622
|
-
}, this.active = "data-modal-active", d(this, Q,
|
|
622
|
+
}, this.active = "data-modal-active", d(this, Q, Ae).call(this);
|
|
623
623
|
}
|
|
624
624
|
destroy() {
|
|
625
625
|
const { elements: i } = this;
|
|
@@ -629,12 +629,12 @@ const N = class N {
|
|
|
629
629
|
}
|
|
630
630
|
update() {
|
|
631
631
|
var i;
|
|
632
|
-
return d(i = this.destroy(), Q,
|
|
632
|
+
return d(i = this.destroy(), Q, Ae).call(i), this.emit("update"), this;
|
|
633
633
|
}
|
|
634
634
|
/** static method 'open' */
|
|
635
635
|
static open(i) {
|
|
636
636
|
const { SETTINGS: t } = I, e = Object.assign({}, t, { on: {} }, i);
|
|
637
|
-
|
|
637
|
+
je(e);
|
|
638
638
|
}
|
|
639
639
|
/** static method 'defineMethods' */
|
|
640
640
|
static defineMethods(i) {
|
|
@@ -645,7 +645,7 @@ const N = class N {
|
|
|
645
645
|
Object.assign(N.prototype, N.prototype.__methods__);
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
|
-
Q = new WeakSet(),
|
|
648
|
+
Q = new WeakSet(), Ae = function() {
|
|
649
649
|
const { el: i, options: t } = this.__storage__;
|
|
650
650
|
if (!rt(i) || !w(i))
|
|
651
651
|
return;
|
|
@@ -653,13 +653,13 @@ Q = new WeakSet(), Le = function() {
|
|
|
653
653
|
if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
|
654
654
|
for (const [o, a] of Object.entries(this.options.on))
|
|
655
655
|
this.__events__[o] = [a];
|
|
656
|
-
d(this,
|
|
657
|
-
},
|
|
656
|
+
d(this, Tt, ci).call(this);
|
|
657
|
+
}, Tt = new WeakSet(), ci = function() {
|
|
658
658
|
const { elements: i, options: t } = this;
|
|
659
659
|
i.forEach((e) => {
|
|
660
|
-
e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this,
|
|
660
|
+
e.modal = {}, e.modal.instance = this, e.modal.eventHandler = d(this, Et, di), e.modal.defaultOptions = t, e.modal.methods = {}, e.modal.methods.destroy = this.destroy, e.modal.methods.update = this.update, e.addEventListener("click", e.modal.eventHandler), e.setAttribute(this.active, "");
|
|
661
661
|
}), this.emit("init");
|
|
662
|
-
},
|
|
662
|
+
}, Et = new WeakSet(), di = function(i) {
|
|
663
663
|
const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = As(this.getAttribute("data-modal-on"));
|
|
664
664
|
o && typeof o != "object" && E("modal4", "data-modal-on must be a json string.");
|
|
665
665
|
const a = {
|
|
@@ -672,7 +672,7 @@ Q = new WeakSet(), Le = function() {
|
|
|
672
672
|
};
|
|
673
673
|
this.removeEventListener("click", e), setTimeout(() => {
|
|
674
674
|
this.addEventListener("click", e);
|
|
675
|
-
}, 200),
|
|
675
|
+
}, 200), je(a, s);
|
|
676
676
|
};
|
|
677
677
|
let J = N;
|
|
678
678
|
Object.assign(J.prototype, O);
|
|
@@ -693,15 +693,15 @@ const _s = (n, i) => {
|
|
|
693
693
|
}
|
|
694
694
|
});
|
|
695
695
|
}, ks = (n, i) => n === "up" || n === "down" ? n : n !== null ? n === "true" ? !0 : n === "false" ? !1 : i.repeat : i.repeat;
|
|
696
|
-
var V,
|
|
696
|
+
var V, Le, At, hi;
|
|
697
697
|
class ui {
|
|
698
698
|
constructor(i, t = {}) {
|
|
699
699
|
h(this, V);
|
|
700
|
-
h(this,
|
|
700
|
+
h(this, At);
|
|
701
701
|
this.__storage__ = {
|
|
702
702
|
el: i,
|
|
703
703
|
options: t
|
|
704
|
-
}, this.active = "data-aost-active", d(this, V,
|
|
704
|
+
}, this.active = "data-aost-active", d(this, V, Le).call(this);
|
|
705
705
|
}
|
|
706
706
|
destroy(i) {
|
|
707
707
|
const { elements: t, options: e } = this;
|
|
@@ -717,10 +717,10 @@ class ui {
|
|
|
717
717
|
}
|
|
718
718
|
update(i) {
|
|
719
719
|
var t;
|
|
720
|
-
d(t = this.destroy(i), V,
|
|
720
|
+
d(t = this.destroy(i), V, Le).call(t);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
V = new WeakSet(),
|
|
723
|
+
V = new WeakSet(), Le = function() {
|
|
724
724
|
const { el: i, options: t } = this.__storage__;
|
|
725
725
|
if (!rt(i) || !w(i))
|
|
726
726
|
return;
|
|
@@ -728,8 +728,8 @@ V = new WeakSet(), Se = function() {
|
|
|
728
728
|
if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
|
729
729
|
for (const [o, a] of Object.entries(this.options.on))
|
|
730
730
|
this.__events__[o] = [a];
|
|
731
|
-
d(this,
|
|
732
|
-
},
|
|
731
|
+
d(this, At, hi).call(this);
|
|
732
|
+
}, At = new WeakSet(), hi = function() {
|
|
733
733
|
const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : L(e);
|
|
734
734
|
this.eventHandler = () => {
|
|
735
735
|
_s(s, i);
|
|
@@ -748,25 +748,25 @@ const $s = (n) => {
|
|
|
748
748
|
s.append(o);
|
|
749
749
|
}), e.children[0];
|
|
750
750
|
};
|
|
751
|
-
var
|
|
751
|
+
var Lt, pi, St, mi, Dt, gi, _t, fi, kt, vi, $t, bi, xt, yi, Ct, wi, Ht, Ti;
|
|
752
752
|
class xs extends HTMLElement {
|
|
753
753
|
constructor() {
|
|
754
754
|
super();
|
|
755
|
+
h(this, Lt);
|
|
755
756
|
h(this, St);
|
|
756
757
|
h(this, Dt);
|
|
757
|
-
h(this, _t);
|
|
758
758
|
// youtube iframe
|
|
759
|
-
h(this,
|
|
759
|
+
h(this, _t);
|
|
760
760
|
// vimeo iframe
|
|
761
|
-
h(this,
|
|
761
|
+
h(this, kt);
|
|
762
762
|
// youku iframe
|
|
763
|
+
h(this, $t);
|
|
763
764
|
h(this, xt);
|
|
764
|
-
h(this, Ct);
|
|
765
765
|
// 2025.02.11 新增 ig
|
|
766
|
-
h(this,
|
|
766
|
+
h(this, Ct);
|
|
767
767
|
// 2025.02.11 新增 tiktok
|
|
768
|
-
h(this,
|
|
769
|
-
d(this,
|
|
768
|
+
h(this, Ht);
|
|
769
|
+
d(this, Lt, pi).call(this);
|
|
770
770
|
}
|
|
771
771
|
play() {
|
|
772
772
|
const { videoType: t } = this;
|
|
@@ -803,15 +803,15 @@ class xs extends HTMLElement {
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
|
|
806
|
+
Lt = new WeakSet(), pi = function() {
|
|
807
807
|
if (!this.getAttribute("video-id")) {
|
|
808
808
|
E("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
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,
|
|
812
|
-
},
|
|
813
|
-
this.childDom = this.childNodes, this.template = $s(this), this.innerHTML = "", this.append(this.template), d(this,
|
|
814
|
-
},
|
|
811
|
+
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, St, mi).call(this);
|
|
812
|
+
}, St = new WeakSet(), mi = function() {
|
|
813
|
+
this.childDom = this.childNodes, this.template = $s(this), this.innerHTML = "", this.append(this.template), d(this, Dt, gi).call(this);
|
|
814
|
+
}, Dt = new WeakSet(), gi = function() {
|
|
815
815
|
const { videoType: t } = this;
|
|
816
816
|
let e = "";
|
|
817
817
|
switch (t) {
|
|
@@ -820,53 +820,53 @@ St = new WeakSet(), pi = function() {
|
|
|
820
820
|
case "youtube":
|
|
821
821
|
if (document.body.wd_youtube == !1)
|
|
822
822
|
return;
|
|
823
|
-
e = d(this,
|
|
823
|
+
e = d(this, _t, fi).call(this);
|
|
824
824
|
break;
|
|
825
825
|
case "youkuAPI":
|
|
826
826
|
break;
|
|
827
827
|
case "youku":
|
|
828
828
|
if (document.body.wd_youku == !1)
|
|
829
829
|
return;
|
|
830
|
-
e = d(this,
|
|
830
|
+
e = d(this, $t, bi).call(this);
|
|
831
831
|
break;
|
|
832
832
|
case "vimeo":
|
|
833
833
|
if (document.body.wd_vimeo == !1)
|
|
834
834
|
return;
|
|
835
|
-
e = d(this,
|
|
835
|
+
e = d(this, kt, vi).call(this);
|
|
836
836
|
break;
|
|
837
837
|
case "bilibili":
|
|
838
838
|
if (document.body.wd_bilibili == !1)
|
|
839
839
|
return;
|
|
840
|
-
e = d(this,
|
|
840
|
+
e = d(this, xt, yi).call(this);
|
|
841
841
|
break;
|
|
842
842
|
case "instagram":
|
|
843
843
|
if (document.body.wd_instagram == !1)
|
|
844
844
|
return;
|
|
845
|
-
e = d(this,
|
|
845
|
+
e = d(this, Ct, wi).call(this);
|
|
846
846
|
break;
|
|
847
847
|
case "tiktok":
|
|
848
848
|
if (document.body.wd_tiktok == !1)
|
|
849
849
|
return;
|
|
850
|
-
e = d(this,
|
|
850
|
+
e = d(this, Ht, Ti).call(this);
|
|
851
851
|
break;
|
|
852
852
|
}
|
|
853
853
|
this.querySelector(".player-wrapper").insertAdjacentHTML(A.prepend, e);
|
|
854
|
-
},
|
|
854
|
+
}, _t = new WeakSet(), fi = function() {
|
|
855
855
|
const { videoId: t, autoplay: e, startTime: s } = this;
|
|
856
856
|
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>`;
|
|
857
|
-
},
|
|
857
|
+
}, kt = new WeakSet(), vi = function() {
|
|
858
858
|
const { videoId: t, autoplay: e, hash: s } = this;
|
|
859
859
|
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>`;
|
|
860
|
-
},
|
|
860
|
+
}, $t = new WeakSet(), bi = function() {
|
|
861
861
|
const { videoId: t, autoplay: e } = this;
|
|
862
862
|
return `<iframe src="https://player.youku.com/embed/${t}?rel=0&${e === "on" ? "autoplay=1" : ""}" frameborder=0 "allowfullscreen"></iframe>`;
|
|
863
|
-
},
|
|
863
|
+
}, xt = new WeakSet(), yi = function() {
|
|
864
864
|
const { videoId: t, autoplay: e } = this;
|
|
865
865
|
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>`;
|
|
866
|
-
},
|
|
866
|
+
}, Ct = new WeakSet(), wi = function() {
|
|
867
867
|
const { videoId: t, autoplay: e } = this;
|
|
868
868
|
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>`;
|
|
869
|
-
},
|
|
869
|
+
}, Ht = new WeakSet(), Ti = function() {
|
|
870
870
|
const { videoId: t, autoplay: e } = this;
|
|
871
871
|
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>`;
|
|
872
872
|
};
|
|
@@ -922,7 +922,7 @@ function wn(n, i = () => {
|
|
|
922
922
|
}).siblings("[data-tab-content]").hide(), Cs();
|
|
923
923
|
}
|
|
924
924
|
function Tn() {
|
|
925
|
-
|
|
925
|
+
Me(
|
|
926
926
|
{
|
|
927
927
|
target: document.body,
|
|
928
928
|
cancel: {
|
|
@@ -1098,40 +1098,40 @@ function zn(n) {
|
|
|
1098
1098
|
const i = document.createElement("div");
|
|
1099
1099
|
return i.innerHTML = n, i.childNodes[0];
|
|
1100
1100
|
}
|
|
1101
|
-
const
|
|
1102
|
-
var K,
|
|
1101
|
+
const ze = (n) => n.videoId !== "" || typeof n.videoId < "u", Ms = (n) => n.$selector.getAttribute("video4-active") === "on", ct = (n) => `<video-player video-id="${n.videoId}" video-type="${n.videoType}" video-startTime="${n.videoStartTime}" video-autoplay="${n.videoAutoplay}"></video-player>`;
|
|
1102
|
+
var K, Se, Mt, Li, qt, Si, tt, De, It, Di;
|
|
1103
1103
|
class qs {
|
|
1104
1104
|
constructor(i, t = {}) {
|
|
1105
1105
|
h(this, K);
|
|
1106
|
+
h(this, Mt);
|
|
1106
1107
|
h(this, qt);
|
|
1107
|
-
h(this, It);
|
|
1108
1108
|
h(this, tt);
|
|
1109
|
-
h(this,
|
|
1110
|
-
if (!rt(i) && !
|
|
1111
|
-
|
|
1109
|
+
h(this, It);
|
|
1110
|
+
if (!rt(i) && !we(i) && !lt(i)) {
|
|
1111
|
+
Pe("video4", `找不到該物件 -> ${i}`);
|
|
1112
1112
|
return;
|
|
1113
1113
|
}
|
|
1114
1114
|
this.__storage__ = {
|
|
1115
1115
|
el: i,
|
|
1116
1116
|
options: t
|
|
1117
|
-
}, this.active = "data-video-active", d(this, K,
|
|
1117
|
+
}, this.active = "data-video-active", d(this, K, Se).call(this);
|
|
1118
1118
|
}
|
|
1119
1119
|
update() {
|
|
1120
|
-
d(this, K,
|
|
1120
|
+
d(this, K, Se).call(this);
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
|
-
K = new WeakSet(),
|
|
1123
|
+
K = new WeakSet(), Se = function() {
|
|
1124
1124
|
const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Y;
|
|
1125
1125
|
if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
|
1126
1126
|
for (const [o, a] of Object.entries(this.options.on))
|
|
1127
1127
|
this.__events__[o] = [a];
|
|
1128
|
-
d(this,
|
|
1129
|
-
},
|
|
1128
|
+
d(this, Mt, Li).call(this);
|
|
1129
|
+
}, Mt = new WeakSet(), Li = function() {
|
|
1130
1130
|
const { elements: i, options: t } = this;
|
|
1131
1131
|
i.forEach((e) => {
|
|
1132
|
-
e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this,
|
|
1132
|
+
e.video = {}, e.video.instance = this, e.video.defaultOptions = t, e.video.params = d(this, It, Di).call(this, e), e.video.methods = {}, e.video.methods.update = this.update, e.setAttribute(this.active, ""), ze(e.video.params) && !Ms(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, qt, Si).call(this, e)), ze(e.video.params) || Pe("video4", "無法取得影片 ID");
|
|
1133
1133
|
}), this.emit("init");
|
|
1134
|
-
},
|
|
1134
|
+
}, qt = new WeakSet(), Si = function(i) {
|
|
1135
1135
|
const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c, videoCover: u, videoHighQualityPic: p } = e;
|
|
1136
1136
|
if (l === "onBox") {
|
|
1137
1137
|
let g = null;
|
|
@@ -1147,7 +1147,7 @@ K = new WeakSet(), De = function() {
|
|
|
1147
1147
|
console.log("error");
|
|
1148
1148
|
}) : E("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
|
|
1149
1149
|
}
|
|
1150
|
-
c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt,
|
|
1150
|
+
c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || E("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt, De), g.addEventListener("click", g.video.eventHandler);
|
|
1151
1151
|
} else if (l === "onPage") {
|
|
1152
1152
|
let g = null;
|
|
1153
1153
|
if (u == "on") {
|
|
@@ -1165,9 +1165,9 @@ K = new WeakSet(), De = function() {
|
|
|
1165
1165
|
s.innerHTML = ct(e);
|
|
1166
1166
|
return;
|
|
1167
1167
|
}
|
|
1168
|
-
g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt,
|
|
1168
|
+
g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, tt, De), g.addEventListener("click", g.video.eventHandler);
|
|
1169
1169
|
}
|
|
1170
|
-
}, tt = new WeakSet(),
|
|
1170
|
+
}, tt = new WeakSet(), De = function(i) {
|
|
1171
1171
|
const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a, videoKeep: r, videoTargetRoute: l, videoType: c, videoIgHtml: u } = t.params, p = new Fe({ callback_loaded: (g) => {
|
|
1172
1172
|
} });
|
|
1173
1173
|
if (o == "onBox") {
|
|
@@ -1205,7 +1205,7 @@ K = new WeakSet(), De = function() {
|
|
|
1205
1205
|
(s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", ct(t.params));
|
|
1206
1206
|
return;
|
|
1207
1207
|
}
|
|
1208
|
-
},
|
|
1208
|
+
}, It = new WeakSet(), Di = function(i) {
|
|
1209
1209
|
const { SETTINGS: t } = Y;
|
|
1210
1210
|
return {
|
|
1211
1211
|
$selector: i,
|
|
@@ -2058,7 +2058,7 @@ const Is = {
|
|
|
2058
2058
|
};
|
|
2059
2059
|
let U;
|
|
2060
2060
|
const Os = (n) => {
|
|
2061
|
-
const { TEMPLATE: i } =
|
|
2061
|
+
const { TEMPLATE: i } = qe, { childDom: t } = n.s, e = document.createElement("div"), s = n.classList.contains("filter"), o = n.getAttribute("filter-placeholder"), a = n.getAttribute("d4-icon"), r = n.getAttribute("custom-template");
|
|
2062
2062
|
e.innerHTML = i(
|
|
2063
2063
|
s,
|
|
2064
2064
|
o,
|
|
@@ -2132,7 +2132,7 @@ const Os = (n) => {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
}, Ps = (n) => {
|
|
2134
2134
|
const i = n.s.cityLang;
|
|
2135
|
-
v("#newCityData").val() !== ""
|
|
2135
|
+
v("#newCityData").length > 0 ? v("#newCityData").val() !== "" && (U = JSON.parse(v("#newCityData").val())[0], console.log([0])) : U = Is, n.classList.contains("city") && (n.s.dropdownEl.querySelector(".dropdown-list").innerHTML = "", Object.keys(U[i]).forEach((t) => {
|
|
2136
2136
|
const e = document.createElement("li");
|
|
2137
2137
|
e.textContent = t, e.setAttribute("data-option", t), n.s.dropdownEl.querySelector(".dropdown-list").append(e);
|
|
2138
2138
|
}), n.s.allLi = n.querySelectorAll(".dropdown-list li"));
|
|
@@ -2147,7 +2147,7 @@ const Os = (n) => {
|
|
|
2147
2147
|
i.close();
|
|
2148
2148
|
});
|
|
2149
2149
|
}, zs = () => {
|
|
2150
|
-
const { SETTINGS: n } =
|
|
2150
|
+
const { SETTINGS: n } = qe;
|
|
2151
2151
|
((t, e) => {
|
|
2152
2152
|
Object.keys(e).forEach((s) => {
|
|
2153
2153
|
t.style.setProperty(`--${s}`, e[s]);
|
|
@@ -2158,14 +2158,14 @@ zs();
|
|
|
2158
2158
|
document.addEventListener("click", function() {
|
|
2159
2159
|
_i();
|
|
2160
2160
|
});
|
|
2161
|
-
var
|
|
2161
|
+
var Ot, $i, Nt, xi, Pt, Ci, jt, Hi;
|
|
2162
2162
|
class ki extends HTMLElement {
|
|
2163
2163
|
constructor() {
|
|
2164
2164
|
super();
|
|
2165
|
+
h(this, Ot);
|
|
2165
2166
|
h(this, Nt);
|
|
2166
2167
|
h(this, Pt);
|
|
2167
2168
|
h(this, jt);
|
|
2168
|
-
h(this, zt);
|
|
2169
2169
|
this.initialize = !1;
|
|
2170
2170
|
}
|
|
2171
2171
|
static get observedAttributes() {
|
|
@@ -2211,7 +2211,7 @@ class ki extends HTMLElement {
|
|
|
2211
2211
|
}
|
|
2212
2212
|
connectedCallback() {
|
|
2213
2213
|
const t = this;
|
|
2214
|
-
t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this,
|
|
2214
|
+
t.initialize || t.classList.contains("d4-initialize") || (t.initialize = !0, d(this, Ot, $i).call(this));
|
|
2215
2215
|
}
|
|
2216
2216
|
open() {
|
|
2217
2217
|
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;
|
|
@@ -2237,11 +2237,11 @@ class ki extends HTMLElement {
|
|
|
2237
2237
|
this.__events__.selectOption();
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2241
|
-
this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this,
|
|
2242
|
-
},
|
|
2243
|
-
this.s.childDom = this.childNodes, this.s.template = Os(this), this.innerHTML = "", this.append(this.s.template), d(this,
|
|
2244
|
-
},
|
|
2240
|
+
Ot = new WeakSet(), $i = function() {
|
|
2241
|
+
this.s = {}, this.__events__ = {}, this.hasAttribute("d4-status") || this.setAttribute("d4-status", "close"), this.hasAttribute("d4-value") || this.setAttribute("d4-value", ""), d(this, Nt, xi).call(this);
|
|
2242
|
+
}, Nt = new WeakSet(), xi = function() {
|
|
2243
|
+
this.s.childDom = this.childNodes, this.s.template = Os(this), this.innerHTML = "", this.append(this.s.template), d(this, Pt, Ci).call(this);
|
|
2244
|
+
}, Pt = new WeakSet(), Ci = function() {
|
|
2245
2245
|
var s;
|
|
2246
2246
|
const t = this;
|
|
2247
2247
|
t.s.allLi = t.querySelectorAll(".dropdown-list li"), t.s.selectDisplayEl = t.querySelector(".select-display"), t.s.dropdownEl = t.querySelector(".dropdown"), t.s.selectType = t.hasAttribute("multiple") ? "multiple" : "single", t.s.cityLang = t.hasAttribute("city-lang") ? t.getAttribute("city-lang") : "zh-tw", Ps(t), t.s.subDropdownTotalH = 0;
|
|
@@ -2286,8 +2286,8 @@ Nt = new WeakSet(), $i = function() {
|
|
|
2286
2286
|
};
|
|
2287
2287
|
break;
|
|
2288
2288
|
}
|
|
2289
|
-
C(t, t.s.value.index), d(s = t,
|
|
2290
|
-
},
|
|
2289
|
+
C(t, t.s.value.index), d(s = t, jt, Hi).call(s), t.classList.add("d4-initialize");
|
|
2290
|
+
}, jt = new WeakSet(), Hi = function() {
|
|
2291
2291
|
const t = this;
|
|
2292
2292
|
t.__events__.dropdownToggle = () => {
|
|
2293
2293
|
t.addEventListener("click", function(e) {
|
|
@@ -2333,7 +2333,7 @@ Nt = new WeakSet(), $i = function() {
|
|
|
2333
2333
|
t.s.dropdownEl.addEventListener("transitionend", e);
|
|
2334
2334
|
}, t.__events__.bindScrollbar = (e = this) => {
|
|
2335
2335
|
const s = e.querySelector(".dropdown-scroller");
|
|
2336
|
-
e.__scroller__ =
|
|
2336
|
+
e.__scroller__ = Me(s, {
|
|
2337
2337
|
overflowBehavior: {
|
|
2338
2338
|
x: "hidden"
|
|
2339
2339
|
}
|
|
@@ -2414,7 +2414,7 @@ function ut(n) {
|
|
|
2414
2414
|
}
|
|
2415
2415
|
}), Object.keys(i).length === 0 ? null : i;
|
|
2416
2416
|
}
|
|
2417
|
-
function
|
|
2417
|
+
function We(n) {
|
|
2418
2418
|
if (ut(n)) {
|
|
2419
2419
|
let i;
|
|
2420
2420
|
const t = Object.keys(ut(n)).map((e) => ({
|
|
@@ -2503,14 +2503,14 @@ function Bs(n) {
|
|
|
2503
2503
|
i && clearTimeout(i), i = setTimeout(n, 200, t);
|
|
2504
2504
|
};
|
|
2505
2505
|
}
|
|
2506
|
-
var
|
|
2506
|
+
var zt, Mi, Wt, qi, Bt, Ii, Gt, Oi;
|
|
2507
2507
|
class Gs extends HTMLElement {
|
|
2508
2508
|
constructor() {
|
|
2509
2509
|
super();
|
|
2510
|
+
h(this, zt);
|
|
2510
2511
|
h(this, Wt);
|
|
2511
2512
|
h(this, Bt);
|
|
2512
2513
|
h(this, Gt);
|
|
2513
|
-
h(this, Rt);
|
|
2514
2514
|
this.initialize = !1;
|
|
2515
2515
|
}
|
|
2516
2516
|
static get observedAttributes() {
|
|
@@ -2519,7 +2519,7 @@ class Gs extends HTMLElement {
|
|
|
2519
2519
|
attributeChangedCallback(t, e, s) {
|
|
2520
2520
|
}
|
|
2521
2521
|
connectedCallback() {
|
|
2522
|
-
this.initialize || (this.initialize = !0, d(this,
|
|
2522
|
+
this.initialize || (this.initialize = !0, d(this, zt, Mi).call(this));
|
|
2523
2523
|
}
|
|
2524
2524
|
play() {
|
|
2525
2525
|
this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
|
|
@@ -2528,7 +2528,7 @@ class Gs extends HTMLElement {
|
|
|
2528
2528
|
this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
|
-
|
|
2531
|
+
zt = new WeakSet(), Mi = function() {
|
|
2532
2532
|
const t = {
|
|
2533
2533
|
direction: this.getAttribute("direction") || x.SETTINGS.direction,
|
|
2534
2534
|
// up / down / left / right
|
|
@@ -2545,8 +2545,8 @@ Wt = new WeakSet(), Mi = function() {
|
|
|
2545
2545
|
// true / false
|
|
2546
2546
|
gap: Number(this.getAttribute("gap")) || x.SETTINGS.gap
|
|
2547
2547
|
};
|
|
2548
|
-
this.s = {}, this.s.options = t, this.s.nowDuration =
|
|
2549
|
-
},
|
|
2548
|
+
this.s = {}, this.s.options = t, this.s.nowDuration = We(this), Ws(this), d(this, Wt, qi).call(this);
|
|
2549
|
+
}, Wt = new WeakSet(), qi = function() {
|
|
2550
2550
|
const { direction: t, continual: e, gap: s } = this.s.options;
|
|
2551
2551
|
switch (t) {
|
|
2552
2552
|
case "left":
|
|
@@ -2558,8 +2558,8 @@ Wt = new WeakSet(), Mi = function() {
|
|
|
2558
2558
|
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;`;
|
|
2559
2559
|
break;
|
|
2560
2560
|
}
|
|
2561
|
-
d(this,
|
|
2562
|
-
},
|
|
2561
|
+
d(this, Bt, Ii).call(this), d(this, Gt, Oi).call(this), e && this.classList.add("continual"), this.classList.add("m4-initialize");
|
|
2562
|
+
}, Bt = new WeakSet(), Ii = function() {
|
|
2563
2563
|
const t = this, { direction: e, behavior: s, duration: o, autoplay: a, pauseOnMouseenter: r, continual: l } = t.s.options;
|
|
2564
2564
|
let c;
|
|
2565
2565
|
function u() {
|
|
@@ -2624,11 +2624,11 @@ Wt = new WeakSet(), Mi = function() {
|
|
|
2624
2624
|
}), t.addEventListener("mouseleave", function() {
|
|
2625
2625
|
t.s.animation && r && t.s.animation.playState === "paused" && t.play();
|
|
2626
2626
|
});
|
|
2627
|
-
},
|
|
2627
|
+
}, Gt = new WeakSet(), Oi = function() {
|
|
2628
2628
|
const t = this;
|
|
2629
2629
|
function e() {
|
|
2630
2630
|
const s = t.s.animation.startTime, o = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
|
|
2631
|
-
t.s.nowDuration =
|
|
2631
|
+
t.s.nowDuration = We(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate($(t).animate1, {
|
|
2632
2632
|
duration: t.s.nowDuration,
|
|
2633
2633
|
iterations: 1 / 0
|
|
2634
2634
|
}), t.s.animation.startTime = s, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate($(t).animate2, {
|
|
@@ -2640,7 +2640,7 @@ Wt = new WeakSet(), Mi = function() {
|
|
|
2640
2640
|
window.addEventListener("resize", Bs(e));
|
|
2641
2641
|
};
|
|
2642
2642
|
customElements.define("marquee-el", Gs);
|
|
2643
|
-
const
|
|
2643
|
+
const Be = function(n, i) {
|
|
2644
2644
|
let t;
|
|
2645
2645
|
return function(e) {
|
|
2646
2646
|
t && clearTimeout(t), t = setTimeout(n, 200, e);
|
|
@@ -2662,22 +2662,22 @@ const mt = function(n, i) {
|
|
|
2662
2662
|
}
|
|
2663
2663
|
n.classList.remove(i);
|
|
2664
2664
|
};
|
|
2665
|
-
var
|
|
2665
|
+
var Rt, Ni, Xt, Pi, Ft, ji, et, _e, W, ht, Yt, zi;
|
|
2666
2666
|
class Ge {
|
|
2667
2667
|
constructor(i) {
|
|
2668
2668
|
// 初始化
|
|
2669
|
-
h(this,
|
|
2669
|
+
h(this, Rt);
|
|
2670
2670
|
// 左右箭頭事件綁定
|
|
2671
|
-
h(this,
|
|
2671
|
+
h(this, Xt);
|
|
2672
2672
|
// 左右拖拉事件綁定
|
|
2673
|
-
h(this,
|
|
2673
|
+
h(this, Ft);
|
|
2674
2674
|
// 卷軸位置判斷
|
|
2675
2675
|
h(this, et);
|
|
2676
2676
|
// 隱藏按鈕判斷
|
|
2677
2677
|
h(this, W);
|
|
2678
2678
|
// 選項事件綁定
|
|
2679
|
-
h(this,
|
|
2680
|
-
this.$element = i, this.option = i.s.option.drag, d(this,
|
|
2679
|
+
h(this, Yt);
|
|
2680
|
+
this.$element = i, this.option = i.s.option.drag, d(this, Rt, Ni).call(this);
|
|
2681
2681
|
}
|
|
2682
2682
|
// 更新 active 位置
|
|
2683
2683
|
update(i) {
|
|
@@ -2691,17 +2691,19 @@ class Ge {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
2693
|
}
|
|
2694
|
-
|
|
2695
|
-
var
|
|
2694
|
+
Rt = new WeakSet(), Ni = function() {
|
|
2695
|
+
var s, o, a, r;
|
|
2696
2696
|
const i = this;
|
|
2697
2697
|
if (!i.$element)
|
|
2698
2698
|
return;
|
|
2699
2699
|
i.$container = i.$element.querySelector(".drag-container"), i.$wrapper = i.$container.querySelector(".wrapper");
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2700
|
+
let t = !1;
|
|
2701
|
+
const e = () => {
|
|
2702
|
+
t || (requestAnimationFrame(() => {
|
|
2703
|
+
d(this, et, _e).call(this), d(this, W, ht).call(this), t = !1;
|
|
2704
|
+
}), t = !0);
|
|
2703
2705
|
};
|
|
2704
|
-
i.$wrapper.removeEventListener("scroll",
|
|
2706
|
+
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, Ft, ji).call(s), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
|
|
2705
2707
|
A.prepend,
|
|
2706
2708
|
`<div class="navigation">
|
|
2707
2709
|
<div class="button prev">
|
|
@@ -2711,8 +2713,10 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2711
2713
|
<div></div>
|
|
2712
2714
|
</div>
|
|
2713
2715
|
</div>`
|
|
2714
|
-
), i.$button = (
|
|
2715
|
-
|
|
2716
|
+
), i.$button = (o = i.$container) == null ? void 0 : o.querySelectorAll(".button"), d(a = i, Xt, Pi).call(a)), d(r = i, Yt, zi).call(r), i.update(), requestAnimationFrame(() => {
|
|
2717
|
+
d(this, et, _e).call(this), d(this, W, ht).call(this);
|
|
2718
|
+
});
|
|
2719
|
+
}, Xt = new WeakSet(), Pi = function() {
|
|
2716
2720
|
const i = this, { $wrapper: t, $button: e } = i, s = function() {
|
|
2717
2721
|
const o = this.classList.contains("next"), a = parseInt(t.getBoundingClientRect().width * 0.7);
|
|
2718
2722
|
t.scrollTo({
|
|
@@ -2726,7 +2730,7 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2726
2730
|
e.forEach((o) => {
|
|
2727
2731
|
o.removeEventListener("click", s), o.addEventListener("click", s);
|
|
2728
2732
|
});
|
|
2729
|
-
},
|
|
2733
|
+
}, Ft = new WeakSet(), ji = function() {
|
|
2730
2734
|
const { $wrapper: i } = this;
|
|
2731
2735
|
let t = !1, e = !1, s = 0, o = 0;
|
|
2732
2736
|
const a = function(p) {
|
|
@@ -2756,7 +2760,7 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2756
2760
|
i.querySelectorAll("a").forEach((p) => {
|
|
2757
2761
|
p.removeEventListener("click", u), p.addEventListener("click", u);
|
|
2758
2762
|
});
|
|
2759
|
-
}, et = new WeakSet(),
|
|
2763
|
+
}, et = new WeakSet(), _e = function() {
|
|
2760
2764
|
const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
|
|
2761
2765
|
e <= 0 || (k(i, "scrollable"), s == 0 ? (T(i, "scrollable"), k(t, "start"), T(t, "end")) : s + 1 >= e ? (T(i, "scrollable"), T(t, "start"), k(t, "end")) : (k(t, "center"), T(t, "start"), T(t, "end")));
|
|
2762
2766
|
}, W = new WeakSet(), ht = function() {
|
|
@@ -2765,10 +2769,10 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2765
2769
|
return;
|
|
2766
2770
|
const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
|
|
2767
2771
|
if (s <= 0) {
|
|
2768
|
-
k(t, "hide"), T(t, "active"), k(e, "noScrollable");
|
|
2772
|
+
console.log(s, "gate <= 0"), k(t, "hide"), T(t, "active"), k(e, "noScrollable");
|
|
2769
2773
|
return;
|
|
2770
2774
|
}
|
|
2771
|
-
s > 0 && (k(t, "active"), T(e, "noScrollable")), o == 0 ? t.forEach((a) => {
|
|
2775
|
+
s > 0 && (console.log(s, "gate > 0"), k(t, "active"), T(e, "noScrollable")), o == 0 ? t.forEach((a) => {
|
|
2772
2776
|
if (a.classList.contains("next")) {
|
|
2773
2777
|
T(a, "hide");
|
|
2774
2778
|
return;
|
|
@@ -2781,7 +2785,7 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2781
2785
|
}
|
|
2782
2786
|
T(a, "hide");
|
|
2783
2787
|
}) : T(t, "hide");
|
|
2784
|
-
},
|
|
2788
|
+
}, Yt = new WeakSet(), zi = function() {
|
|
2785
2789
|
const { $element: i } = this, t = (s) => {
|
|
2786
2790
|
if (this.option.selected) {
|
|
2787
2791
|
const o = s.getAttribute("data-option").trim();
|
|
@@ -2795,31 +2799,31 @@ Xt = new WeakSet(), Ni = function() {
|
|
|
2795
2799
|
s.removeEventListener("click", e), s.addEventListener("click", e);
|
|
2796
2800
|
});
|
|
2797
2801
|
};
|
|
2798
|
-
var
|
|
2802
|
+
var Ut, Wi, Jt, Bi, Zt, Gi, Qt, Ri;
|
|
2799
2803
|
class Rs {
|
|
2800
2804
|
constructor(i) {
|
|
2801
2805
|
// 初始化
|
|
2802
|
-
h(this,
|
|
2806
|
+
h(this, Ut);
|
|
2803
2807
|
// 隱藏按鈕判斷
|
|
2804
|
-
h(this,
|
|
2808
|
+
h(this, Jt);
|
|
2805
2809
|
// 展開箭頭事件綁定
|
|
2806
|
-
h(this,
|
|
2810
|
+
h(this, Zt);
|
|
2807
2811
|
// 選項事件綁定
|
|
2808
|
-
h(this,
|
|
2809
|
-
this.$element = i, this.option = i.s.option.collapse, d(this,
|
|
2812
|
+
h(this, Qt);
|
|
2813
|
+
this.$element = i, this.option = i.s.option.collapse, d(this, Ut, Wi).call(this);
|
|
2810
2814
|
}
|
|
2811
2815
|
}
|
|
2812
|
-
|
|
2813
|
-
this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this,
|
|
2814
|
-
},
|
|
2816
|
+
Ut = new WeakSet(), Wi = function() {
|
|
2817
|
+
this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), d(this, Jt, Bi).call(this) && d(this, Zt, Gi).call(this), d(this, Qt, Ri).call(this));
|
|
2818
|
+
}, Jt = new WeakSet(), Bi = function() {
|
|
2815
2819
|
const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
|
|
2816
2820
|
return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(A.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), T(this.$element, "noScrollable"), !0) : (k(this.$element, "noScrollable"), !1);
|
|
2817
|
-
},
|
|
2821
|
+
}, Zt = new WeakSet(), Gi = function() {
|
|
2818
2822
|
const { $element: i, $button: t } = this, e = function() {
|
|
2819
2823
|
i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
|
|
2820
2824
|
};
|
|
2821
2825
|
t.removeEventListener("click", e), t.addEventListener("click", e);
|
|
2822
|
-
},
|
|
2826
|
+
}, Qt = new WeakSet(), Ri = function() {
|
|
2823
2827
|
const { $element: i } = this, t = (s, o) => {
|
|
2824
2828
|
if (i != null && i.classList.contains("expand") ? i == null || i.classList.remove("expand") : i == null || i.classList.add("expand"), this.option.selected) {
|
|
2825
2829
|
const a = s.getAttribute("data-option").trim();
|
|
@@ -2837,12 +2841,12 @@ const Xs = (n) => {
|
|
|
2837
2841
|
const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
|
|
2838
2842
|
return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, e)), i == "collapse" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(A.append, e)), i == "dropdown" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(A.append, e)), s.children;
|
|
2839
2843
|
};
|
|
2840
|
-
var
|
|
2844
|
+
var Vt, Xi, Kt, Fi, it, ke, B, pt;
|
|
2841
2845
|
class Fs extends HTMLElement {
|
|
2842
2846
|
constructor() {
|
|
2843
2847
|
super();
|
|
2848
|
+
h(this, Vt);
|
|
2844
2849
|
h(this, Kt);
|
|
2845
|
-
h(this, te);
|
|
2846
2850
|
// 斷點設定
|
|
2847
2851
|
h(this, it);
|
|
2848
2852
|
// check type
|
|
@@ -2875,13 +2879,13 @@ class Fs extends HTMLElement {
|
|
|
2875
2879
|
}
|
|
2876
2880
|
}
|
|
2877
2881
|
connectedCallback() {
|
|
2878
|
-
this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this,
|
|
2882
|
+
this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, d(this, Vt, Xi).call(this));
|
|
2879
2883
|
}
|
|
2880
2884
|
update() {
|
|
2881
|
-
d(this, it,
|
|
2885
|
+
d(this, it, ke).call(this);
|
|
2882
2886
|
}
|
|
2883
2887
|
}
|
|
2884
|
-
|
|
2888
|
+
Vt = new WeakSet(), Xi = function() {
|
|
2885
2889
|
let t = {};
|
|
2886
2890
|
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"));
|
|
2887
2891
|
const e = (s) => {
|
|
@@ -2892,10 +2896,10 @@ Kt = new WeakSet(), Xi = function() {
|
|
|
2892
2896
|
}
|
|
2893
2897
|
this.update();
|
|
2894
2898
|
};
|
|
2895
|
-
window.removeEventListener("resize",
|
|
2896
|
-
},
|
|
2897
|
-
this.classList.add("m4-init"), d(this, it,
|
|
2898
|
-
}, it = new WeakSet(),
|
|
2899
|
+
window.removeEventListener("resize", Be(e)), window.addEventListener("resize", Be(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, Kt, Fi).call(this);
|
|
2900
|
+
}, Kt = new WeakSet(), Fi = function() {
|
|
2901
|
+
this.classList.add("m4-init"), d(this, it, ke).call(this);
|
|
2902
|
+
}, it = new WeakSet(), ke = function() {
|
|
2899
2903
|
const t = Object.keys(this.s.option.breakpoint);
|
|
2900
2904
|
if (!t.length) {
|
|
2901
2905
|
d(this, B, pt).call(this);
|
|
@@ -2914,7 +2918,7 @@ Kt = new WeakSet(), Xi = function() {
|
|
|
2914
2918
|
const e = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), s = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
|
|
2915
2919
|
switch (e == null || e.classList.add("active"), s == null || s.classList.add("active"), t) {
|
|
2916
2920
|
case "drag":
|
|
2917
|
-
this.drag = new Ge(this);
|
|
2921
|
+
console.log("drag"), this.drag = new Ge(this);
|
|
2918
2922
|
break;
|
|
2919
2923
|
case "collapse":
|
|
2920
2924
|
this.drag = new Ge(this), this.collapse = new Rs(this);
|
|
@@ -2923,53 +2927,53 @@ Kt = new WeakSet(), Xi = function() {
|
|
|
2923
2927
|
(o = this.drag) == null || o.update();
|
|
2924
2928
|
};
|
|
2925
2929
|
customElements.define("multipurpose-nav", Fs);
|
|
2926
|
-
var
|
|
2930
|
+
var te, Ui, ee, Ji, st, $e, P, F, ie, Zi, se, Qi, ne, Vi, oe, Ki, ae, ts, re, es, le, is, ce, ss, de, ns, q, z, ue, os, he, as, pe, rs, me, ls;
|
|
2927
2931
|
class Yi extends HTMLElement {
|
|
2928
2932
|
// 定義組件的初始狀態
|
|
2929
2933
|
constructor(t, e) {
|
|
2930
2934
|
super();
|
|
2935
|
+
h(this, te);
|
|
2931
2936
|
h(this, ee);
|
|
2932
|
-
h(this, ie);
|
|
2933
2937
|
// 第一關 判斷數量以及id設定
|
|
2934
2938
|
h(this, st);
|
|
2935
2939
|
// 第二關 id命名提醒
|
|
2936
2940
|
h(this, P);
|
|
2941
|
+
h(this, ie);
|
|
2937
2942
|
h(this, se);
|
|
2938
2943
|
h(this, ne);
|
|
2939
|
-
h(this, oe);
|
|
2940
2944
|
// 執行函式
|
|
2941
2945
|
// 移動至指定位置
|
|
2942
|
-
h(this,
|
|
2946
|
+
h(this, oe);
|
|
2943
2947
|
// 移動
|
|
2944
|
-
h(this,
|
|
2948
|
+
h(this, ae);
|
|
2945
2949
|
// 步驟狀態
|
|
2946
|
-
h(this,
|
|
2950
|
+
h(this, re);
|
|
2947
2951
|
// next 按鈕狀態
|
|
2948
|
-
h(this,
|
|
2952
|
+
h(this, le);
|
|
2949
2953
|
// prev 按鈕狀態
|
|
2950
|
-
h(this,
|
|
2954
|
+
h(this, ce);
|
|
2951
2955
|
// 頁籤狀態
|
|
2952
|
-
h(this,
|
|
2956
|
+
h(this, de);
|
|
2953
2957
|
// 第三關各種元件判斷 及 執行
|
|
2954
2958
|
h(this, q);
|
|
2955
2959
|
// 消失動畫
|
|
2956
|
-
h(this,
|
|
2960
|
+
h(this, ue);
|
|
2957
2961
|
// 出現動畫
|
|
2958
|
-
h(this,
|
|
2962
|
+
h(this, he);
|
|
2959
2963
|
// 狀態
|
|
2960
|
-
h(this,
|
|
2964
|
+
h(this, pe);
|
|
2961
2965
|
// resize
|
|
2962
|
-
h(this,
|
|
2966
|
+
h(this, me);
|
|
2963
2967
|
}
|
|
2964
2968
|
// 當組件的屬性被更改時會被呼叫
|
|
2965
2969
|
static get observedAttributes() {
|
|
2966
2970
|
return ["t4-active"];
|
|
2967
2971
|
}
|
|
2968
2972
|
attributeChangedCallback(t, e, s) {
|
|
2969
|
-
t === "t4-active" && e !== s && d(this,
|
|
2973
|
+
t === "t4-active" && e !== s && d(this, pe, rs).call(this, s);
|
|
2970
2974
|
}
|
|
2971
2975
|
connectedCallback() {
|
|
2972
|
-
this.classList.contains("t4-initialize") || d(this,
|
|
2976
|
+
this.classList.contains("t4-initialize") || d(this, te, Ui).call(this);
|
|
2973
2977
|
}
|
|
2974
2978
|
// ------------- 我是分隔線呦 -------------
|
|
2975
2979
|
// 頁籤切換
|
|
@@ -2985,7 +2989,7 @@ class Yi extends HTMLElement {
|
|
|
2985
2989
|
e.activeTab = s, this.setAttribute("t4-active", s);
|
|
2986
2990
|
const o = d(this, P, F).call(this, s);
|
|
2987
2991
|
e.tabPanels.forEach((a, r) => {
|
|
2988
|
-
r === o ? d(this,
|
|
2992
|
+
r === o ? d(this, he, as).call(this, r) : d(this, ue, os).call(this, r);
|
|
2989
2993
|
});
|
|
2990
2994
|
}
|
|
2991
2995
|
// 外部呼叫方法 $0.goNext()
|
|
@@ -3000,10 +3004,10 @@ class Yi extends HTMLElement {
|
|
|
3000
3004
|
}
|
|
3001
3005
|
// 外部呼叫方法 $0.update()
|
|
3002
3006
|
update() {
|
|
3003
|
-
this.t.tabs = d(this, st,
|
|
3007
|
+
this.t.tabs = d(this, st, $e).call(this), cs(), console.log("tab update!!!!");
|
|
3004
3008
|
}
|
|
3005
3009
|
}
|
|
3006
|
-
|
|
3010
|
+
te = new WeakSet(), Ui = function() {
|
|
3007
3011
|
const t = this.getAttribute("t4-name"), { SETTINGS: e } = Ue;
|
|
3008
3012
|
document.querySelectorAll(`tab-el[t4-name=${t}]`).length > 1 && console.warn(t, "名字有重複喔!!!"), this.t = {
|
|
3009
3013
|
tabs: [],
|
|
@@ -3023,14 +3027,14 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3023
3027
|
delay: this.getAttribute("t4-delay") || e.transition.delay
|
|
3024
3028
|
},
|
|
3025
3029
|
tabGroup: this.getAttribute("t4-group") || e.tabGroup
|
|
3026
|
-
}, this.__events__ = {}, this.t.tabs = d(this, st,
|
|
3027
|
-
},
|
|
3028
|
-
if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this,
|
|
3030
|
+
}, this.__events__ = {}, this.t.tabs = d(this, st, $e).call(this), this.t.step = document.querySelector(`[t4-control="${this.t.name}"]${this.t.stepOutput}`), d(this, ee, Ji).call(this);
|
|
3031
|
+
}, ee = new WeakSet(), Ji = function() {
|
|
3032
|
+
if (this.t.activeTab = this.t.defaultPage, this.t.display === "swiper" && d(this, ie, Zi).call(this), this.t.recordUrl) {
|
|
3029
3033
|
const e = new URLSearchParams(document.location.search).get(this.t.name), s = document.querySelectorAll(`[t4-name="${this.t.name}"] .tab-panel[t4-id="${e}"]`);
|
|
3030
3034
|
e && s.length === 1 ? this.t.activeTab = e : console.warn(`沒有${e}這頁喔!!`);
|
|
3031
3035
|
}
|
|
3032
|
-
this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this,
|
|
3033
|
-
}, st = new WeakSet(),
|
|
3036
|
+
this.setActiveTab(this.t.activeTab), this.classList.add("t4-initialize"), d(this, me, ls).call(this);
|
|
3037
|
+
}, st = new WeakSet(), $e = function() {
|
|
3034
3038
|
const { t } = this, e = Array.from(document.querySelectorAll(`[t4-control="${t.name}"][t4-role="tab"]`));
|
|
3035
3039
|
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) => {
|
|
3036
3040
|
s.getAttribute("t4-id") || console.warn(s, "請幫我設定id!!");
|
|
@@ -3040,19 +3044,19 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3040
3044
|
s.length > 1 && console.warn("有兩個相同id設定", s);
|
|
3041
3045
|
const o = s[0];
|
|
3042
3046
|
return o ? e.tabPanels.indexOf(o) : (console.warn(`找不到t4-id為${t}的頁籤`), 0);
|
|
3043
|
-
},
|
|
3047
|
+
}, ie = new WeakSet(), Zi = function() {
|
|
3044
3048
|
const t = document.createElement("div");
|
|
3045
3049
|
t.classList.add("swiper-container");
|
|
3046
3050
|
const e = document.createElement("div");
|
|
3047
3051
|
e.classList.add("swiper-wrapper"), this.t.tabPanels.forEach((s) => {
|
|
3048
3052
|
e.appendChild(s.cloneNode(!0));
|
|
3049
|
-
}), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this,
|
|
3050
|
-
},
|
|
3053
|
+
}), this.t.tabPanels = [...e.children], t.appendChild(e), this.innerHTML = "", this.appendChild(t), d(this, se, Qi).call(this);
|
|
3054
|
+
}, se = new WeakSet(), Qi = function() {
|
|
3051
3055
|
const t = this.querySelector(".swiper-container"), e = this.querySelector(".swiper-wrapper"), s = this.t.tabPanels;
|
|
3052
3056
|
t.style.overflow = "hidden", e.style.display = "flex";
|
|
3053
3057
|
const o = s.length * 100 + "%";
|
|
3054
3058
|
e.style.width = o;
|
|
3055
|
-
},
|
|
3059
|
+
}, ne = new WeakSet(), Vi = function(t) {
|
|
3056
3060
|
const { t: e } = this;
|
|
3057
3061
|
if (e.recordUrl === "true") {
|
|
3058
3062
|
const s = new URLSearchParams(document.location.search);
|
|
@@ -3060,28 +3064,28 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3060
3064
|
const o = `${window.location.pathname}?${s.toString()}`;
|
|
3061
3065
|
history.replaceState({ t4Id: t }, "", o);
|
|
3062
3066
|
}
|
|
3063
|
-
},
|
|
3067
|
+
}, oe = new WeakSet(), Ki = function() {
|
|
3064
3068
|
const t = parseInt(this.t.gap, 10), e = window.pageYOffset, o = this.getBoundingClientRect().top + e - t;
|
|
3065
|
-
d(this,
|
|
3066
|
-
},
|
|
3069
|
+
d(this, ae, ts).call(this, o);
|
|
3070
|
+
}, ae = new WeakSet(), ts = function(t) {
|
|
3067
3071
|
window.scrollTo({
|
|
3068
3072
|
top: t,
|
|
3069
3073
|
behavior: "smooth"
|
|
3070
3074
|
});
|
|
3071
|
-
},
|
|
3075
|
+
}, re = new WeakSet(), es = function(t) {
|
|
3072
3076
|
let e = parseInt(t, 10) + 1;
|
|
3073
3077
|
this.t.step.textContent = `${e}`, this.t.step.setAttribute("now-page", e);
|
|
3074
|
-
},
|
|
3078
|
+
}, le = new WeakSet(), is = function(t) {
|
|
3075
3079
|
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;
|
|
3076
3080
|
e.forEach((a) => {
|
|
3077
3081
|
s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
|
|
3078
3082
|
});
|
|
3079
|
-
},
|
|
3083
|
+
}, ce = new WeakSet(), ss = function(t) {
|
|
3080
3084
|
const e = document.querySelectorAll(`[t4-role="prev"][t4-control="${this.t.name}"]`), s = this.t.tabPanels.length === 1, o = t === 0;
|
|
3081
3085
|
e.forEach((a) => {
|
|
3082
3086
|
s || o ? a.setAttribute("disabled", "") : a.removeAttribute("disabled");
|
|
3083
3087
|
});
|
|
3084
|
-
},
|
|
3088
|
+
}, de = new WeakSet(), ns = function(t, e) {
|
|
3085
3089
|
this.t.tabGroup === "true" ? this.t.tabs.forEach((s, o) => {
|
|
3086
3090
|
o == t ? s.setAttribute("aria-selected", !0) : s.setAttribute("aria-selected", !1);
|
|
3087
3091
|
}) : this.t.tabs.forEach((s, o) => {
|
|
@@ -3090,25 +3094,25 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3090
3094
|
}, q = new WeakSet(), z = function(t, e, s) {
|
|
3091
3095
|
switch (t) {
|
|
3092
3096
|
case "step":
|
|
3093
|
-
|
|
3097
|
+
we(this.t.step) && d(this, re, es).call(this, e);
|
|
3094
3098
|
break;
|
|
3095
3099
|
case "eventAnchor":
|
|
3096
|
-
this.t.anchor && d(this,
|
|
3100
|
+
this.t.anchor && d(this, oe, Ki).call(this);
|
|
3097
3101
|
break;
|
|
3098
3102
|
case "tabState":
|
|
3099
|
-
this.t.type == "normal" && d(this,
|
|
3103
|
+
this.t.type == "normal" && d(this, de, ns).call(this, e, s);
|
|
3100
3104
|
break;
|
|
3101
3105
|
case "btnState":
|
|
3102
|
-
d(this,
|
|
3106
|
+
d(this, le, is).call(this, e), d(this, ce, ss).call(this, e);
|
|
3103
3107
|
break;
|
|
3104
3108
|
case "tabUrl":
|
|
3105
|
-
this.t.recordUrl === "true" && d(this,
|
|
3109
|
+
this.t.recordUrl === "true" && d(this, ne, Vi).call(this, e);
|
|
3106
3110
|
break;
|
|
3107
3111
|
default:
|
|
3108
3112
|
console.warn("請增加判斷,謝謝");
|
|
3109
3113
|
break;
|
|
3110
3114
|
}
|
|
3111
|
-
},
|
|
3115
|
+
}, ue = new WeakSet(), os = function(t) {
|
|
3112
3116
|
const { t: e } = this;
|
|
3113
3117
|
this.t.transition;
|
|
3114
3118
|
const s = e.tabPanels[t];
|
|
@@ -3125,7 +3129,7 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3125
3129
|
s.style.display = "none";
|
|
3126
3130
|
break;
|
|
3127
3131
|
}
|
|
3128
|
-
},
|
|
3132
|
+
}, he = new WeakSet(), as = function(t) {
|
|
3129
3133
|
const { duration: e, timing: s, delay: o } = this.t.transition, a = this.t.tabPanels[t];
|
|
3130
3134
|
let r;
|
|
3131
3135
|
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) {
|
|
@@ -3150,10 +3154,10 @@ ee = new WeakSet(), Ui = function() {
|
|
|
3150
3154
|
console.warn(this.t.display, "沒有這個效果請自己想辦法!!!!");
|
|
3151
3155
|
break;
|
|
3152
3156
|
}
|
|
3153
|
-
},
|
|
3157
|
+
}, pe = new WeakSet(), rs = function(t) {
|
|
3154
3158
|
const e = d(this, P, F).call(this, t);
|
|
3155
3159
|
d(this, q, z).call(this, "step", e), d(this, q, z).call(this, "btnState", e), d(this, q, z).call(this, "tabState", e, t), d(this, q, z).call(this, "tabUrl", t), this.emit("change");
|
|
3156
|
-
},
|
|
3160
|
+
}, me = new WeakSet(), ls = function() {
|
|
3157
3161
|
const t = this;
|
|
3158
3162
|
window.addEventListener(
|
|
3159
3163
|
"resize",
|
|
@@ -3208,42 +3212,42 @@ const Re = (n) => {
|
|
|
3208
3212
|
const { defaultOptions: i } = n.collapse, { collapseClass: t, target: e, transition: s } = i, o = n.querySelector(e), a = o.children[0].offsetHeight;
|
|
3209
3213
|
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";
|
|
3210
3214
|
};
|
|
3211
|
-
var nt,
|
|
3215
|
+
var nt, xe, ge, ds, fe, us, ot, Ce;
|
|
3212
3216
|
class Js {
|
|
3213
3217
|
constructor(i, t = {}) {
|
|
3214
3218
|
h(this, nt);
|
|
3219
|
+
h(this, ge);
|
|
3215
3220
|
h(this, fe);
|
|
3216
|
-
h(this, ve);
|
|
3217
3221
|
h(this, ot);
|
|
3218
|
-
!rt(i) && !
|
|
3222
|
+
!rt(i) && !we(i) && !lt(i) && !w(i) || (this.__storage__ = {
|
|
3219
3223
|
el: i,
|
|
3220
3224
|
options: t
|
|
3221
|
-
}, this.active = "data-collapse-active", d(this, nt,
|
|
3225
|
+
}, this.active = "data-collapse-active", d(this, nt, xe).call(this));
|
|
3222
3226
|
}
|
|
3223
3227
|
update() {
|
|
3224
|
-
d(this, nt,
|
|
3228
|
+
d(this, nt, xe).call(this);
|
|
3225
3229
|
}
|
|
3226
3230
|
}
|
|
3227
|
-
nt = new WeakSet(),
|
|
3231
|
+
nt = new WeakSet(), xe = function() {
|
|
3228
3232
|
const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Je;
|
|
3229
3233
|
if (this.elements = t.state == "not active" ? S(i + `:not([${this.active}])`) : S(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
|
3230
3234
|
for (const [o, a] of Object.entries(this.options.on))
|
|
3231
3235
|
this.__events__[o] = [a];
|
|
3232
|
-
d(this,
|
|
3233
|
-
},
|
|
3236
|
+
d(this, ge, ds).call(this);
|
|
3237
|
+
}, ge = new WeakSet(), ds = function() {
|
|
3234
3238
|
const { elements: i, options: t } = this;
|
|
3235
3239
|
i.forEach((e) => {
|
|
3236
|
-
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,
|
|
3240
|
+
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, fe, us).call(this, e);
|
|
3237
3241
|
}), this.emit("init");
|
|
3238
|
-
},
|
|
3242
|
+
}, fe = new WeakSet(), us = function(i) {
|
|
3239
3243
|
const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
|
|
3240
|
-
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,
|
|
3244
|
+
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, Ce)), c.addEventListener("click", d(this, ot, Ce)), r) {
|
|
3241
3245
|
const p = (g) => {
|
|
3242
3246
|
g.stopPropagation();
|
|
3243
3247
|
};
|
|
3244
3248
|
u.removeEventListener("click", p), u.addEventListener("click", p);
|
|
3245
3249
|
}
|
|
3246
|
-
}, ot = new WeakSet(),
|
|
3250
|
+
}, ot = new WeakSet(), Ce = function() {
|
|
3247
3251
|
const { instance: i, defaultOptions: t } = this.collapse, { collapseClass: e, block: s, target: o, single: a } = t, r = this;
|
|
3248
3252
|
r.classList.contains(e) ? (a && r.parentNode.querySelectorAll(`.${r.classList[0]}`).forEach((l) => {
|
|
3249
3253
|
Re(l);
|
|
@@ -3263,25 +3267,25 @@ function hs() {
|
|
|
3263
3267
|
});
|
|
3264
3268
|
}
|
|
3265
3269
|
document.addEventListener("click", hs);
|
|
3266
|
-
var at,
|
|
3270
|
+
var at, He, ve, ps, be, ms, ye, gs;
|
|
3267
3271
|
class Qs extends HTMLElement {
|
|
3268
3272
|
constructor() {
|
|
3269
3273
|
super();
|
|
3270
3274
|
h(this, at);
|
|
3275
|
+
h(this, ve);
|
|
3271
3276
|
h(this, be);
|
|
3272
3277
|
h(this, ye);
|
|
3273
|
-
h(this, we);
|
|
3274
3278
|
this.initialize = !1;
|
|
3275
3279
|
}
|
|
3276
3280
|
connectedCallback() {
|
|
3277
3281
|
const t = this;
|
|
3278
|
-
t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, at,
|
|
3282
|
+
t.initialize || t.classList.contains("r4-initialize") || (t.initialize = !0, d(this, at, He).call(this));
|
|
3279
3283
|
}
|
|
3280
3284
|
update() {
|
|
3281
|
-
this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, at,
|
|
3285
|
+
this.classList.remove("r4-initialize"), this.querySelector("i.hover-ball").remove(), d(this, at, He).call(this);
|
|
3282
3286
|
}
|
|
3283
3287
|
}
|
|
3284
|
-
at = new WeakSet(),
|
|
3288
|
+
at = new WeakSet(), He = function() {
|
|
3285
3289
|
const { SETTINGS: t } = Ze;
|
|
3286
3290
|
this.s = {};
|
|
3287
3291
|
function e(o) {
|
|
@@ -3296,13 +3300,13 @@ at = new WeakSet(), Me = function() {
|
|
|
3296
3300
|
hover: this.getAttribute("r4-hover") ? e(this.getAttribute("r4-hover")) : t.hover,
|
|
3297
3301
|
click: this.getAttribute("r4-hover-click") ? e(this.getAttribute("r4-hover-click")) : t.click
|
|
3298
3302
|
};
|
|
3299
|
-
this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this,
|
|
3300
|
-
},
|
|
3301
|
-
d(this,
|
|
3302
|
-
},
|
|
3303
|
+
this.s.options = s, this.s.options.hover && this.classList.add("hover-btn"), d(this, ve, ps).call(this);
|
|
3304
|
+
}, ve = new WeakSet(), ps = function() {
|
|
3305
|
+
d(this, be, ms).call(this), d(this, ye, gs).call(this), this.classList.add("r4-initialize");
|
|
3306
|
+
}, be = new WeakSet(), ms = function() {
|
|
3303
3307
|
const t = this, e = document.createElement("i");
|
|
3304
3308
|
e.classList.add("hover-ball"), e.style.transitionDuration = `${t.s.options.speed}ms`, t.appendChild(e);
|
|
3305
|
-
},
|
|
3309
|
+
}, ye = new WeakSet(), gs = function() {
|
|
3306
3310
|
const t = this.querySelector("i.hover-ball"), e = this;
|
|
3307
3311
|
e.addEventListener("click", function(a) {
|
|
3308
3312
|
a.stopPropagation(), e.s.options.click && Zs(a, e);
|