@xwadex/fesd 0.0.23 → 0.0.25
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/fesd-bundle.js +358 -247
- package/dist/fesd-bundle.js.map +1 -1
- package/dist/image-preview-bundle.js +158 -155
- package/dist/image-preview-bundle.js.map +1 -1
- package/dist/tools-bundle.js +4 -4
- package/dist/tools-bundle.js.map +1 -1
- package/dist/vendor-bundle.js +5070 -2958
- package/dist/vendor-bundle.js.map +1 -1
- package/package.json +5 -2
@@ -9,7 +9,7 @@ var h = (n, i, t) => {
|
|
9
9
|
};
|
10
10
|
var d = (n, i, t) => (fs(n, i, "access private method"), t);
|
11
11
|
import { OverlayScrollbars as Me } from "overlayscrollbars";
|
12
|
-
import
|
12
|
+
import v from "jquery";
|
13
13
|
import "./vendor-bundle.js";
|
14
14
|
import "validator";
|
15
15
|
import "flatpickr";
|
@@ -305,12 +305,12 @@ const Y = {
|
|
305
305
|
share4: ys,
|
306
306
|
tab4: Ue,
|
307
307
|
video4: Y
|
308
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
308
|
+
}, Symbol.toStringTag, { value: "Module" })), E = {
|
309
309
|
before: "beforebegin",
|
310
310
|
after: "afterend",
|
311
311
|
append: "beforeend",
|
312
312
|
prepend: "afterbegin"
|
313
|
-
}, at = (n) => typeof n == "string" && n !== "", we = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, w = (n) =>
|
313
|
+
}, at = (n) => typeof n == "string" && n !== "", we = (n) => n instanceof HTMLElement, rt = (n) => n instanceof NodeList, w = (n) => A(n) !== null, j = (n) => typeof n == "function", A = (n) => we(n) ? n : document.querySelector(n), L = (n) => rt(n) ? n : document.querySelectorAll(n), Ts = () => Math.random().toString(36).substr(2, 9), Es = (n) => {
|
314
314
|
const i = document.createElement("div");
|
315
315
|
return i.innerHTML = n, i.childNodes;
|
316
316
|
}, As = (n) => {
|
@@ -320,7 +320,7 @@ const Y = {
|
|
320
320
|
return n;
|
321
321
|
}
|
322
322
|
return JSON.parse(n);
|
323
|
-
},
|
323
|
+
}, T = (n, i) => {
|
324
324
|
console.warn(`[${n} warn]: ${i}`);
|
325
325
|
}, je = (n, i) => {
|
326
326
|
console.error(`[${n} error]: ${i}`);
|
@@ -366,19 +366,19 @@ const Y = {
|
|
366
366
|
return -t * ((n = n / e - 1) * n * n * n - 1) + i;
|
367
367
|
}
|
368
368
|
}, Te = (n, i) => {
|
369
|
-
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",
|
370
|
-
let
|
371
|
-
if (
|
369
|
+
const { target: t, container: e, spacer: s, speed: o, gap: a, easing: r, direction: l } = n, c = l === "horizontal", u = c ? "scrollLeft" : "scrollTop", p = c ? "left" : "top", g = c ? "width" : "height", m = w(e) ? A(e) : document.scrollingElement, f = m[u], b = w(t) ? A(t).getBoundingClientRect()[p] : 0 - f, y = w(s) ? A(s).getBoundingClientRect()[g] : 0, _ = b - a - y, G = 15;
|
370
|
+
let S = 0;
|
371
|
+
if (_ === 0)
|
372
372
|
return;
|
373
373
|
const R = (X) => {
|
374
|
-
const Pe =
|
374
|
+
const Pe = A(t);
|
375
375
|
i && i.emit(X, Pe), !i && n.on && j(n.on[X]) && n.on[X](Pe);
|
376
376
|
};
|
377
377
|
R("beforeScroll");
|
378
378
|
const Ne = () => {
|
379
|
-
|
380
|
-
const X = Ls[r](
|
381
|
-
|
379
|
+
S += G;
|
380
|
+
const X = Ls[r](S, f, _, o);
|
381
|
+
m[u] = X, S < o && requestAnimationFrame(Ne), S >= o && R("afterScroll");
|
382
382
|
};
|
383
383
|
requestAnimationFrame(Ne);
|
384
384
|
};
|
@@ -424,7 +424,7 @@ J = new WeakSet(), Ee = function() {
|
|
424
424
|
if (!at(i) || !w(i))
|
425
425
|
return;
|
426
426
|
const { SETTINGS: e, EVENTS: s } = ct;
|
427
|
-
if (this.elements = t.state == "not active" ?
|
427
|
+
if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.elements = L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
428
428
|
for (const [o, a] of Object.entries(this.options.on))
|
429
429
|
this.__events__[o] = [a];
|
430
430
|
d(this, mt, Ve).call(this);
|
@@ -498,7 +498,7 @@ ft = new WeakSet(), ei = function() {
|
|
498
498
|
const { ATTRS: t } = I;
|
499
499
|
this.__events__ = {}, this.getAttribute(":state") || this.setAttribute(":state", "close");
|
500
500
|
const e = this.getAttribute(t.id) || Ts();
|
501
|
-
this.getAttribute(t.id) || (
|
501
|
+
this.getAttribute(t.id) || (T(`modern-modal needs a ${t.id} attribute with a unique id.`), this.setAttribute(t.id, e)), M[e] && T(`the ${t.id} "${e}" is already be used.`), M[e] = this, d(this, vt, ii).call(this);
|
502
502
|
}, vt = new WeakSet(), ii = function() {
|
503
503
|
this.childDom = this.childNodes, this.template = Ss(this), this.innerHTML = "", this.append(this.template), d(this, bt, si).call(this);
|
504
504
|
}, bt = new WeakSet(), si = function() {
|
@@ -565,10 +565,10 @@ const { MODALS: Ie } = window, ai = (n, i, ...t) => {
|
|
565
565
|
}, ri = (n, ...i) => {
|
566
566
|
n && j(n) && n.apply(U, i);
|
567
567
|
}, ze = (n, i) => {
|
568
|
-
const { target: t } = n, e = Ie[t] ||
|
568
|
+
const { target: t } = n, e = Ie[t] || A(n.target);
|
569
569
|
e && li(n, i), e || Ds(n, i);
|
570
570
|
}, li = (n, i) => {
|
571
|
-
const { target: t, action: e, on: s, e: o } = n, a = Ie[t] ||
|
571
|
+
const { target: t, action: e, on: s, e: o } = n, a = Ie[t] || A(n.target);
|
572
572
|
switch (["open", "close", "destroy"].forEach((l) => {
|
573
573
|
a.once(l, () => {
|
574
574
|
i && (i.emit(l, a, o), ai(i, s[l], a, o)), i || ri(s[l], a);
|
@@ -591,16 +591,16 @@ const { MODALS: Ie } = window, ai = (n, i, ...t) => {
|
|
591
591
|
}, Ds = async (n, i) => {
|
592
592
|
const { target: t, route: e, container: s, on: o, e: a } = n;
|
593
593
|
if (!e)
|
594
|
-
return
|
594
|
+
return T("modal4", "cannot find target or data-modal-route is not defined");
|
595
595
|
const r = (l, ...c) => {
|
596
596
|
i && (i.emit(l, ...c), ai(i, o[l], ...c)), i || ri(o[l], ...c);
|
597
597
|
};
|
598
598
|
fetch(e).then((l) => (r("success", a), l.text())).then((l) => {
|
599
|
-
const c = Es(l), u =
|
600
|
-
[...c].forEach((
|
601
|
-
u.append(
|
599
|
+
const c = Es(l), u = A(s) || A(I.SETTINGS.container);
|
600
|
+
[...c].forEach((g) => {
|
601
|
+
u.append(g);
|
602
602
|
});
|
603
|
-
const p = Ie[t] ||
|
603
|
+
const p = Ie[t] || A(n.target);
|
604
604
|
r("complete", p), li(n, i);
|
605
605
|
}).catch((l) => {
|
606
606
|
r("error", l);
|
@@ -646,7 +646,7 @@ Z = new WeakSet(), Ae = function() {
|
|
646
646
|
if (!at(i) || !w(i))
|
647
647
|
return;
|
648
648
|
const { SETTINGS: e, EVENTS: s } = I;
|
649
|
-
if (this.elements = t.state == "not active" ?
|
649
|
+
if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
650
650
|
for (const [o, a] of Object.entries(this.options.on))
|
651
651
|
this.__events__[o] = [a];
|
652
652
|
d(this, Tt, ci).call(this);
|
@@ -657,7 +657,7 @@ Z = new WeakSet(), Ae = function() {
|
|
657
657
|
}), this.emit("init");
|
658
658
|
}, Et = new WeakSet(), di = function(i) {
|
659
659
|
const { defaultOptions: t, eventHandler: e, instance: s } = this.modal, o = As(this.getAttribute("data-modal-on"));
|
660
|
-
o && typeof o != "object" &&
|
660
|
+
o && typeof o != "object" && T("modal4", "data-modal-on must be a json string.");
|
661
661
|
const a = {
|
662
662
|
target: this.getAttribute("data-modal-target") || t.target,
|
663
663
|
action: this.getAttribute("data-modal-action") || t.action,
|
@@ -676,15 +676,15 @@ customElements.define("modern-modal", ti);
|
|
676
676
|
const _s = (n, i) => {
|
677
677
|
const t = n === window ? n.innerHeight : n.getBoundingClientRect().height, e = n === window ? 0 : n.getBoundingClientRect().top;
|
678
678
|
i.forEach((s) => {
|
679
|
-
const { class: o, delay: a, start: r, end: l, repeat: c, instance: u } = s.aost, { top: p, bottom:
|
680
|
-
if (p - e <=
|
679
|
+
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), f = t * (l / 100);
|
680
|
+
if (p - e <= m && g - e >= f && s.offsetParent)
|
681
681
|
setTimeout(() => {
|
682
682
|
s.classList.add(o);
|
683
683
|
}, a);
|
684
684
|
else {
|
685
|
-
const
|
685
|
+
const y = s.classList.contains(o) && c === "down" && p - e >= m || c === "up" && g - e <= f || c === !0;
|
686
686
|
setTimeout(() => {
|
687
|
-
|
687
|
+
y && s.classList.remove(o);
|
688
688
|
}, a);
|
689
689
|
}
|
690
690
|
});
|
@@ -703,7 +703,7 @@ class ui {
|
|
703
703
|
const { elements: t, options: e } = this;
|
704
704
|
if (!t)
|
705
705
|
return this;
|
706
|
-
const { scroller: s } = e, o = s === window || !w(s) ? window :
|
706
|
+
const { scroller: s } = e, o = s === window || !w(s) ? window : A(s);
|
707
707
|
return o.aost && (o.removeEventListener("scroll", o.aost.eventHandler), delete o.aost), t.forEach((a) => {
|
708
708
|
if (!a.aost)
|
709
709
|
return;
|
@@ -721,12 +721,12 @@ Q = new WeakSet(), Le = function() {
|
|
721
721
|
if (!at(i) || !w(i))
|
722
722
|
return;
|
723
723
|
const { SETTINGS: e, EVENTS: s } = Ye;
|
724
|
-
if (this.elements = t.state == "not active" ?
|
724
|
+
if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
725
725
|
for (const [o, a] of Object.entries(this.options.on))
|
726
726
|
this.__events__[o] = [a];
|
727
727
|
d(this, At, hi).call(this);
|
728
728
|
}, At = new WeakSet(), hi = function() {
|
729
|
-
const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window :
|
729
|
+
const { elements: i, options: t } = this, { scroller: e } = t, s = e === window || !w(e) ? window : A(e);
|
730
730
|
this.eventHandler = () => {
|
731
731
|
_s(s, i);
|
732
732
|
}, i.forEach((a) => {
|
@@ -801,7 +801,7 @@ class xs extends HTMLElement {
|
|
801
801
|
}
|
802
802
|
Lt = new WeakSet(), pi = function() {
|
803
803
|
if (!this.getAttribute("video-id")) {
|
804
|
-
|
804
|
+
T("videoPlayer", "video-render needs a ['video-id'] attribute to creat player.");
|
805
805
|
return;
|
806
806
|
}
|
807
807
|
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);
|
@@ -834,7 +834,7 @@ Lt = new WeakSet(), pi = function() {
|
|
834
834
|
e = d(this, Ht, Ti).call(this);
|
835
835
|
break;
|
836
836
|
}
|
837
|
-
this.querySelector(".player-wrapper").insertAdjacentHTML(
|
837
|
+
this.querySelector(".player-wrapper").insertAdjacentHTML(E.prepend, e);
|
838
838
|
}, _t = new WeakSet(), fi = function() {
|
839
839
|
const { videoId: t, autoplay: e, startTime: s } = this;
|
840
840
|
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>`;
|
@@ -861,18 +861,18 @@ function Ei(n) {
|
|
861
861
|
const i = [];
|
862
862
|
n && n.forEach((t) => {
|
863
863
|
t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
|
864
|
-
}),
|
864
|
+
}), v("html").addClass("scrollLock"), vs(i);
|
865
865
|
}
|
866
866
|
function Ai(n) {
|
867
867
|
const i = [];
|
868
868
|
n && n.forEach((t) => {
|
869
869
|
t instanceof HTMLElement ? i.push(t) : typeof t == "string" && i.push(...document.querySelectorAll(`${t}`));
|
870
|
-
}),
|
870
|
+
}), v("html").removeClass("scrollLock"), bs(i);
|
871
871
|
}
|
872
872
|
async function fn(n = 0) {
|
873
|
-
if (
|
873
|
+
if (v(".loading-wrapper").length)
|
874
874
|
return;
|
875
|
-
|
875
|
+
v("body").append(`
|
876
876
|
<div class="loading-wrapper">
|
877
877
|
<div class="icon-box">
|
878
878
|
<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">
|
@@ -882,13 +882,13 @@ async function fn(n = 0) {
|
|
882
882
|
</svg>
|
883
883
|
</div>
|
884
884
|
</div>
|
885
|
-
`),
|
885
|
+
`), v(".loading-wrapper").delay(n).fadeIn(300).promise().done(function() {
|
886
886
|
Ei();
|
887
887
|
});
|
888
888
|
}
|
889
889
|
function vn() {
|
890
|
-
|
891
|
-
|
890
|
+
v(".loading-wrapper").fadeOut(300).promise().done(function() {
|
891
|
+
v(".loading-wrapper").remove(), Ai();
|
892
892
|
});
|
893
893
|
}
|
894
894
|
function bn(n, i) {
|
@@ -901,7 +901,7 @@ function Cs() {
|
|
901
901
|
}
|
902
902
|
function yn(n, i = () => {
|
903
903
|
}) {
|
904
|
-
|
904
|
+
v(`[data-tab-content=${n}]`).fadeIn(function() {
|
905
905
|
typeof i == "function" && i();
|
906
906
|
}).siblings("[data-tab-content]").hide(), Cs();
|
907
907
|
}
|
@@ -942,13 +942,13 @@ function En() {
|
|
942
942
|
};
|
943
943
|
}
|
944
944
|
function An(n, i) {
|
945
|
-
|
946
|
-
|
945
|
+
v(n).on("click", function() {
|
946
|
+
v(this).toggleClass(i);
|
947
947
|
});
|
948
948
|
}
|
949
949
|
function Ln(n, i) {
|
950
|
-
|
951
|
-
|
950
|
+
v(n).on("click", function() {
|
951
|
+
v(n).not(this).removeClass(i), v(this).addClass(i);
|
952
952
|
});
|
953
953
|
}
|
954
954
|
function Hs(n, i = 250) {
|
@@ -970,12 +970,12 @@ function Sn(n, i = 250) {
|
|
970
970
|
};
|
971
971
|
}
|
972
972
|
function Dn() {
|
973
|
-
window._g.interval = [],
|
974
|
-
const e = Number(
|
973
|
+
window._g.interval = [], v(".countdown").each((i, t) => {
|
974
|
+
const e = Number(v(t).attr("data-seconds")) + 1;
|
975
975
|
let s = Math.floor(e / 60) + ":" + e % 60;
|
976
976
|
window._g.interval[i] = setInterval(function() {
|
977
977
|
var o = s.split(":"), a = parseInt(o[0], 10), r = parseInt(o[1], 10);
|
978
|
-
--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,
|
978
|
+
--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, v(t).html(a + ":" + r), s = a + ":" + r;
|
979
979
|
}, 1e3);
|
980
980
|
});
|
981
981
|
}
|
@@ -994,13 +994,13 @@ function kn() {
|
|
994
994
|
n(), window.addEventListener("resize", Hs(n));
|
995
995
|
}
|
996
996
|
function $n(n, i, t, e, s) {
|
997
|
-
const o = this, r =
|
997
|
+
const o = this, r = v(n).html().split("<br>");
|
998
998
|
let l = "", c = 0;
|
999
999
|
r.forEach((u, p) => {
|
1000
|
-
p !== 0 && (l += "<br>"), u.split("").forEach((
|
1001
|
-
i ? (
|
1000
|
+
p !== 0 && (l += "<br>"), u.split("").forEach((m, f) => {
|
1001
|
+
i ? (f === 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++), f === 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++);
|
1002
1002
|
});
|
1003
|
-
}),
|
1003
|
+
}), v(n).html(l);
|
1004
1004
|
}
|
1005
1005
|
function xn(n, i) {
|
1006
1006
|
const t = Math.pow(10, i);
|
@@ -1023,7 +1023,7 @@ function Cn(n) {
|
|
1023
1023
|
}
|
1024
1024
|
function Hn(n, i) {
|
1025
1025
|
const t = n.$el, e = n.params.grid.rows, s = i || n.params.slidesPerView * e;
|
1026
|
-
(n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"),
|
1026
|
+
(n.loopedSlides ? n.slides.length - n.loopedSlides * 2 : n.slides.length) <= s ? (t.addClass("swiper-no-swiping"), v(n.params.navigation.nextEl).hide(), v(n.params.navigation.prevEl).hide(), v(n.params.pagination.el).hide(), n.params.autoplay.enabled = !1, n.autoplay.stop()) : (t.removeClass("swiper-no-swiping"), v(n.params.navigation.nextEl).show(), v(n.params.navigation.prevEl).show(), v(n.params.pagination.el).show(), n.params.autoplay.enabled && n.autoplay.start());
|
1027
1027
|
}
|
1028
1028
|
function Mn(n) {
|
1029
1029
|
n.el.querySelectorAll("img.detect-shade").forEach((i) => {
|
@@ -1033,36 +1033,36 @@ function Mn(n) {
|
|
1033
1033
|
});
|
1034
1034
|
}
|
1035
1035
|
function qn(n) {
|
1036
|
-
const i = n.el, t =
|
1037
|
-
n.autoplay.stop(),
|
1036
|
+
const i = n.el, t = v(i).find(".swiper-slide-active"), e = v(t).find("video").get(0), s = v(i).find(".swiper-slide video");
|
1037
|
+
n.autoplay.stop(), v(e).off("ended"), e ? (s.each((o, a) => {
|
1038
1038
|
a.currentTime = 0;
|
1039
|
-
}),
|
1039
|
+
}), v(e).on("ended", function() {
|
1040
1040
|
n.slideNext();
|
1041
1041
|
}), e.play()) : n.params.autoplay.enabled && n.autoplay.start();
|
1042
1042
|
}
|
1043
1043
|
function In() {
|
1044
|
-
|
1045
|
-
const t =
|
1044
|
+
v(".number-grow").each(function(n, i) {
|
1045
|
+
const t = v(i), o = t.attr("data-num").replace(/(\d)(?=(?:\d{3})+$)/g, "$1,").split(""), a = () => {
|
1046
1046
|
let r = "";
|
1047
1047
|
for (var l = 0; l <= 9; l++)
|
1048
1048
|
r += String(l) + "<br>";
|
1049
1049
|
return r;
|
1050
1050
|
};
|
1051
|
-
|
1051
|
+
v(o).each(function(r, l) {
|
1052
1052
|
const c = () => l !== "," ? `<div class="num" data-final-num="${l}"><div><br>${a()}<br>${a()}</div></div>` : `<div class="comma">${l}</div>`;
|
1053
1053
|
t.append(c);
|
1054
1054
|
});
|
1055
1055
|
});
|
1056
1056
|
}
|
1057
1057
|
function On() {
|
1058
|
-
|
1059
|
-
const t =
|
1058
|
+
v(".letter-grow").each(function(n, i) {
|
1059
|
+
const t = v(i), s = t.attr("data-letter").split(""), o = () => {
|
1060
1060
|
let a = "";
|
1061
1061
|
for (let r = 65; r <= 90; r++)
|
1062
1062
|
a += String.fromCharCode(r) + "<br>";
|
1063
1063
|
return a;
|
1064
1064
|
};
|
1065
|
-
|
1065
|
+
v(s).each(function(a, r) {
|
1066
1066
|
const l = `<div class="letter" data-final-letter="${r}"><div><br>${o()}<br>${o()}</div></div>`;
|
1067
1067
|
t.append(l);
|
1068
1068
|
});
|
@@ -1106,7 +1106,7 @@ class qs {
|
|
1106
1106
|
}
|
1107
1107
|
V = new WeakSet(), Se = function() {
|
1108
1108
|
const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Y;
|
1109
|
-
if (this.elements = t.state == "not active" ?
|
1109
|
+
if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
1110
1110
|
for (const [o, a] of Object.entries(this.options.on))
|
1111
1111
|
this.__events__[o] = [a];
|
1112
1112
|
d(this, Mt, Li).call(this);
|
@@ -1116,83 +1116,86 @@ V = new WeakSet(), Se = function() {
|
|
1116
1116
|
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, ""), We(e.video.params) && !Ms(e.video.params) && (e.setAttribute("video4-active", "on"), d(this, qt, Si).call(this, e)), We(e.video.params) || je("video4", "無法取得影片 ID");
|
1117
1117
|
}), this.emit("init");
|
1118
1118
|
}, qt = new WeakSet(), Si = function(i) {
|
1119
|
-
const { LAYOUT: t } = Y, e = i.video.params, { $selector: s, videoLayoutNo: o, videoId: a, videoType: r, videoMode: l, videoButton: c,
|
1119
|
+
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;
|
1120
1120
|
if (l === "onBox") {
|
1121
1121
|
let g = null;
|
1122
|
-
if (
|
1123
|
-
i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(
|
1122
|
+
if (u === "on") {
|
1123
|
+
i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(E.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), T("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
|
1124
1124
|
const m = s.querySelector("img");
|
1125
|
-
m.insertAdjacentHTML(
|
1126
|
-
const
|
1127
|
-
!
|
1128
|
-
const
|
1129
|
-
m.setAttribute("src", `${
|
1125
|
+
m.insertAdjacentHTML(E.after, t[o]);
|
1126
|
+
const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
|
1127
|
+
!f && 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`) : !f && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !f && 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) => {
|
1128
|
+
const y = b.thumbnail_url;
|
1129
|
+
m.setAttribute("src", `${y}`);
|
1130
1130
|
}).catch(function(b) {
|
1131
1131
|
console.log("error");
|
1132
|
-
}) :
|
1132
|
+
}) : T("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
|
1133
1133
|
}
|
1134
|
-
c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) ||
|
1134
|
+
c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}' , 點擊物件轉移至 '${this.__storage__.el}'`)), g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
|
1135
1135
|
} else if (l === "onPage") {
|
1136
1136
|
let g = null;
|
1137
|
-
if (
|
1138
|
-
i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(
|
1137
|
+
if (u == "on") {
|
1138
|
+
i.classList.add("video4-cover"), s.querySelector("img") || (s.insertAdjacentHTML(E.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), T("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
|
1139
1139
|
const m = s.querySelector("img");
|
1140
|
-
m.insertAdjacentHTML(
|
1141
|
-
const
|
1142
|
-
!
|
1143
|
-
const
|
1144
|
-
m.setAttribute("src", `${
|
1140
|
+
m.insertAdjacentHTML(E.after, t[o]);
|
1141
|
+
const f = (m == null ? void 0 : m.getAttribute("src")) || (m == null ? void 0 : m.getAttribute("data-src"));
|
1142
|
+
!f && 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`) : !f && r == "vimeo" ? m.setAttribute("src", `https://vumbnail.com/${a}_large.jpg`) : !f && 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) => {
|
1143
|
+
const y = b.thumbnail_url;
|
1144
|
+
m.setAttribute("src", `${y}`);
|
1145
1145
|
}).catch(function(b) {
|
1146
1146
|
console.log("error");
|
1147
|
-
}) :
|
1148
|
-
} else if (u == "off") {
|
1149
|
-
s.innerHTML = lt(e);
|
1150
|
-
return;
|
1147
|
+
}) : f || T("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), c == "off" ? g = s : (g = s.querySelector(c) ?? s, s.querySelector(c) || T("video4", `找不到 videoButton 設定的 element -> '${c}', 點擊物件轉移至 '${this.__storage__.el}'`));
|
1151
1148
|
} else {
|
1152
|
-
|
1149
|
+
s.innerHTML = lt(e);
|
1153
1150
|
return;
|
1154
1151
|
}
|
1155
1152
|
g.video || (g.video = {}, g.video.params = e), g.video.eventHandler = d(this, K, De), g.addEventListener("click", g.video.eventHandler);
|
1156
1153
|
}
|
1157
1154
|
}, K = new WeakSet(), De = function(i) {
|
1158
|
-
const { video: t, emit: e } = this, { $selector: s, videoMode: o, videoTarget: a,
|
1155
|
+
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) => {
|
1159
1156
|
} });
|
1160
1157
|
if (o == "onBox") {
|
1161
|
-
const
|
1158
|
+
const g = {
|
1162
1159
|
target: a,
|
1163
|
-
route:
|
1160
|
+
route: l,
|
1164
1161
|
on: {
|
1165
|
-
complete(
|
1166
|
-
if (
|
1167
|
-
if (
|
1162
|
+
complete(m) {
|
1163
|
+
if (c == "instagram")
|
1164
|
+
if (m.setAttribute("video-typeStyle", `${c}`), window.instgrm)
|
1168
1165
|
window.instgrm.Embeds.process();
|
1169
1166
|
else {
|
1170
|
-
const
|
1171
|
-
|
1167
|
+
const f = document.createElement("script");
|
1168
|
+
f.src = "https://www.instagram.com/embed.js", f.async = !0, document.body.appendChild(f);
|
1172
1169
|
}
|
1173
1170
|
else
|
1174
|
-
|
1171
|
+
m.querySelector(".modal-content").insertAdjacentHTML("beforeend", lt(t.params)), m.setAttribute("video-typeStyle", `${c}`);
|
1175
1172
|
},
|
1176
|
-
open(
|
1177
|
-
const
|
1178
|
-
if (
|
1179
|
-
const
|
1180
|
-
new ResizeObserver((
|
1181
|
-
|
1182
|
-
}).observe(
|
1173
|
+
open(m) {
|
1174
|
+
const f = m.querySelectorAll("[data-overlayscrollbars-viewport]");
|
1175
|
+
if (p.update(), Ei([...f]), c == "instagram") {
|
1176
|
+
const b = document.querySelector("[video-template] .modal-content");
|
1177
|
+
new ResizeObserver((_) => {
|
1178
|
+
_[0].contentRect.height > 50 && b.classList.add("active");
|
1179
|
+
}).observe(b);
|
1183
1180
|
}
|
1184
1181
|
},
|
1185
|
-
close(
|
1186
|
-
const
|
1187
|
-
Ai([...
|
1182
|
+
close(m) {
|
1183
|
+
const f = m.querySelectorAll("[data-overlayscrollbars-viewport]");
|
1184
|
+
Ai([...f]);
|
1188
1185
|
},
|
1189
|
-
destroy(
|
1186
|
+
destroy(m) {
|
1190
1187
|
}
|
1191
1188
|
}
|
1192
1189
|
};
|
1193
|
-
U.open(
|
1194
|
-
} else
|
1195
|
-
|
1190
|
+
U.open(g);
|
1191
|
+
} else if (o == "onPage")
|
1192
|
+
if (t.params.videoAutoplay = "on", r == "off") {
|
1193
|
+
s.innerHTML = lt(t.params);
|
1194
|
+
return;
|
1195
|
+
} else {
|
1196
|
+
(s.querySelector(r) ?? s).insertAdjacentHTML("beforeend", lt(t.params));
|
1197
|
+
return;
|
1198
|
+
}
|
1196
1199
|
}, It = new WeakSet(), Di = function(i) {
|
1197
1200
|
const { SETTINGS: t } = Y;
|
1198
1201
|
return {
|
@@ -2062,7 +2065,7 @@ const Oe = {
|
|
2062
2065
|
const i = (t = n.getAttribute("control-elements")) == null ? void 0 : t.split(",");
|
2063
2066
|
i && i.forEach((e) => {
|
2064
2067
|
const s = document.querySelector(e);
|
2065
|
-
s ||
|
2068
|
+
s || T("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)));
|
2066
2069
|
});
|
2067
2070
|
}, C = (n, i) => {
|
2068
2071
|
const t = n.getAttribute("d4-placeholder"), e = n.querySelectorAll(".dropdown-list li");
|
@@ -2105,7 +2108,7 @@ const Oe = {
|
|
2105
2108
|
const o = n.querySelectorAll(".dropdown-list li.active");
|
2106
2109
|
o.length <= 0 ? n.s.selectDisplayEl.textContent = t.trim() : (n.s.selectDisplayEl.textContent = "", o.forEach((r) => {
|
2107
2110
|
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>`;
|
2108
|
-
n.s.selectDisplayEl.insertAdjacentHTML(
|
2111
|
+
n.s.selectDisplayEl.insertAdjacentHTML(E.append, u);
|
2109
2112
|
})), n.s.activeLi = o, n.s.value = [...o].map((r) => ({
|
2110
2113
|
index: [...e].indexOf(r),
|
2111
2114
|
id: r.getAttribute("data-option"),
|
@@ -2129,7 +2132,7 @@ const Oe = {
|
|
2129
2132
|
o.textContent = e[0], o.setAttribute("data-option", e[0]), n.querySelector(".dropdown-list").append(o);
|
2130
2133
|
});
|
2131
2134
|
}, _i = () => {
|
2132
|
-
|
2135
|
+
L('dropdown-el[d4-status="open"]').forEach((i) => {
|
2133
2136
|
i.close();
|
2134
2137
|
});
|
2135
2138
|
}, js = () => {
|
@@ -2296,9 +2299,9 @@ Ot = new WeakSet(), $i = function() {
|
|
2296
2299
|
if (t.__scroller__) {
|
2297
2300
|
const { viewport: c } = t.__scroller__.elements();
|
2298
2301
|
if (w(t.s.activeLi)) {
|
2299
|
-
const u = t.s.activeLi.clientHeight / 2, p = t.s.activeLi.offsetTop,
|
2302
|
+
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;
|
2300
2303
|
c.scrollTo({
|
2301
|
-
top:
|
2304
|
+
top: g,
|
2302
2305
|
behavior: "smooth"
|
2303
2306
|
});
|
2304
2307
|
} else
|
@@ -2329,31 +2332,31 @@ Ot = new WeakSet(), $i = function() {
|
|
2329
2332
|
const a = e.querySelector(".dropdown-scroller"), r = e.classList.contains("city");
|
2330
2333
|
e.s.allLi = e.querySelectorAll(".dropdown-list li"), e.s.allLi.forEach((l) => {
|
2331
2334
|
l.addEventListener("click", function(c) {
|
2332
|
-
var
|
2333
|
-
const u = this, p = [...e.s.allLi].indexOf(u),
|
2335
|
+
var m;
|
2336
|
+
const u = this, p = [...e.s.allLi].indexOf(u), g = parseInt(e.getAttribute("d4-default-height"));
|
2334
2337
|
if (u.classList.contains("has-sublayer")) {
|
2335
2338
|
c.stopPropagation();
|
2336
|
-
const
|
2337
|
-
|
2338
|
-
const
|
2339
|
-
s =
|
2339
|
+
const f = u.querySelector(".sub-dropdown"), b = f.querySelector(".sub-dropdown-list"), y = parseInt(getComputedStyle(b).marginTop) + parseInt(getComputedStyle(b).marginBottom);
|
2340
|
+
f.style.cssText = `--height: ${b.offsetHeight + y}px`;
|
2341
|
+
const _ = parseInt(f.style.cssText.replace("--height:", "").trim()), G = parseInt(getComputedStyle(a).maxHeight), S = () => {
|
2342
|
+
s = g + e.s.subDropdownTotalH, o = s > G ? G : s, e.style.cssText = `--maxHeight: ${o}px;`, e.s.dropdownEl.style.height = `${o}px`;
|
2340
2343
|
};
|
2341
|
-
u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -=
|
2344
|
+
u.classList.contains("open") ? (u.classList.remove("open"), e.s.subDropdownTotalH -= _, S()) : (u.classList.add("open"), e.s.subDropdownTotalH += _, S());
|
2342
2345
|
const R = () => {
|
2343
|
-
e.__scroller__.update(!0),
|
2346
|
+
e.__scroller__.update(!0), f.removeEventListener("transitionend", R);
|
2344
2347
|
};
|
2345
|
-
|
2348
|
+
f.addEventListener("transitionend", R);
|
2346
2349
|
} else
|
2347
2350
|
switch (Os(e), e.s.selectType) {
|
2348
2351
|
case "single":
|
2349
2352
|
if (e.setAttribute("d4-value", u.getAttribute("data-option")), r) {
|
2350
|
-
const
|
2351
|
-
|
2352
|
-
const
|
2353
|
-
|
2354
|
-
}), e.__events__.selectOption(
|
2353
|
+
const f = e.s.cityLang, b = l.textContent.trim(), y = document.getElementById(e.getAttribute("dist-select"));
|
2354
|
+
y && (y.querySelector(".dropdown-list").textContent = "", C(y, -1), Oe[f][b].forEach((_, G) => {
|
2355
|
+
const S = document.createElement("li");
|
2356
|
+
S.textContent = _[0], S.setAttribute("data-option", _[0]), y.querySelector(".dropdown-list").append(S);
|
2357
|
+
}), e.__events__.selectOption(y));
|
2355
2358
|
}
|
2356
|
-
(
|
2359
|
+
(m = u.parentNode.closest("li")) != null && m.classList.contains("has-sublayer") && (c.stopPropagation(), e.close());
|
2357
2360
|
break;
|
2358
2361
|
case "multiple":
|
2359
2362
|
c.stopPropagation(), u.classList.toggle("active"), C(e, p);
|
@@ -2561,26 +2564,26 @@ zt = new WeakSet(), Mi = function() {
|
|
2561
2564
|
}));
|
2562
2565
|
break;
|
2563
2566
|
case "alternate":
|
2564
|
-
let
|
2565
|
-
let
|
2567
|
+
let m = function() {
|
2568
|
+
let f = [];
|
2566
2569
|
switch (e) {
|
2567
2570
|
case "top":
|
2568
|
-
p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight),
|
2571
|
+
p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollHeight, f = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
|
2569
2572
|
break;
|
2570
2573
|
case "right":
|
2571
|
-
p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth),
|
2574
|
+
p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(t.s.nowDuration / (p * 2)) * t.s.animateEl.scrollWidth, f = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
|
2572
2575
|
break;
|
2573
2576
|
case "bottom":
|
2574
|
-
p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight),
|
2577
|
+
p = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollHeight, f = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
|
2575
2578
|
break;
|
2576
2579
|
case "left":
|
2577
|
-
p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth),
|
2580
|
+
p = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), g = parseInt(o / (p * 2)) * t.s.animateEl.scrollWidth, f = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
|
2578
2581
|
break;
|
2579
2582
|
}
|
2580
|
-
return
|
2581
|
-
}, p,
|
2582
|
-
(t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${
|
2583
|
-
duration:
|
2583
|
+
return f;
|
2584
|
+
}, p, g;
|
2585
|
+
(t.clientHeight > t.s.animateEl.scrollHeight || e === "left" || e === "right") && (t.s.animateEl.style.transform = `${m()[0].transform}`, t.s.animateEl.animate(m(), {
|
2586
|
+
duration: g,
|
2584
2587
|
fill: "forwards"
|
2585
2588
|
}).finished.then(() => {
|
2586
2589
|
t.s.animation = t.s.animateEl.animate(k(t).animate1, {
|
@@ -2639,7 +2642,7 @@ const pt = function(n, i) {
|
|
2639
2642
|
return;
|
2640
2643
|
}
|
2641
2644
|
n.classList.add(i);
|
2642
|
-
},
|
2645
|
+
}, D = (n, i) => {
|
2643
2646
|
if (rt(n)) {
|
2644
2647
|
n.forEach((t) => {
|
2645
2648
|
t.classList.remove(i);
|
@@ -2688,7 +2691,7 @@ Rt = new WeakSet(), Ni = function() {
|
|
2688
2691
|
d(c = i, tt, _e).call(c), d(u = i, W, ut).call(u);
|
2689
2692
|
};
|
2690
2693
|
i.$wrapper.removeEventListener("scroll", t), i.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", pt(t)), window.addEventListener("resize", pt(t)), (i.option.draggable || i.$element.s.type == "collapse") && d(e = i, Ft, ji).call(e), i.option.navigation && i.$element.s.type !== "collapse" && (i.$container.insertAdjacentHTML(
|
2691
|
-
|
2694
|
+
E.prepend,
|
2692
2695
|
`<div class="navigation">
|
2693
2696
|
<div class="button prev">
|
2694
2697
|
<div></div>
|
@@ -2730,9 +2733,9 @@ Rt = new WeakSet(), Ni = function() {
|
|
2730
2733
|
const c = function(p) {
|
2731
2734
|
if (p.preventDefault(), e = !0, !t)
|
2732
2735
|
return;
|
2733
|
-
const
|
2736
|
+
const m = p.pageX - i.offsetLeft - s;
|
2734
2737
|
i.scrollTo({
|
2735
|
-
left: o -
|
2738
|
+
left: o - m
|
2736
2739
|
});
|
2737
2740
|
};
|
2738
2741
|
i.removeEventListener("mousemove", c), i.addEventListener("mousemove", c);
|
@@ -2744,19 +2747,19 @@ Rt = new WeakSet(), Ni = function() {
|
|
2744
2747
|
});
|
2745
2748
|
}, tt = new WeakSet(), _e = function() {
|
2746
2749
|
const { $container: i, $wrapper: t } = this, e = t.scrollWidth - t.clientWidth, s = Math.round(t.scrollLeft);
|
2747
|
-
e <= 0 || ($(i, "scrollable"), s == 0 ? (
|
2750
|
+
e <= 0 || ($(i, "scrollable"), s == 0 ? (D(i, "scrollable"), $(t, "start"), D(t, "end")) : s + 1 >= e ? (D(i, "scrollable"), D(t, "start"), $(t, "end")) : ($(t, "center"), D(t, "start"), D(t, "end")));
|
2748
2751
|
}, W = new WeakSet(), ut = function() {
|
2749
2752
|
const { $wrapper: i, $button: t, $element: e } = this;
|
2750
2753
|
if (!t)
|
2751
2754
|
return;
|
2752
2755
|
const s = i.scrollWidth - i.clientWidth, o = i.scrollLeft;
|
2753
2756
|
if (s <= 0) {
|
2754
|
-
$(t, "hide"),
|
2757
|
+
$(t, "hide"), D(t, "active"), $(e, "noScrollable");
|
2755
2758
|
return;
|
2756
2759
|
}
|
2757
|
-
s > 0 && ($(t, "active"),
|
2760
|
+
s > 0 && ($(t, "active"), D(e, "noScrollable")), o == 0 ? t.forEach((a) => {
|
2758
2761
|
if (a.classList.contains("next")) {
|
2759
|
-
|
2762
|
+
D(a, "hide");
|
2760
2763
|
return;
|
2761
2764
|
}
|
2762
2765
|
$(a, "hide");
|
@@ -2765,8 +2768,8 @@ Rt = new WeakSet(), Ni = function() {
|
|
2765
2768
|
$(a, "hide");
|
2766
2769
|
return;
|
2767
2770
|
}
|
2768
|
-
|
2769
|
-
}) :
|
2771
|
+
D(a, "hide");
|
2772
|
+
}) : D(t, "hide");
|
2770
2773
|
}, Yt = new WeakSet(), zi = function() {
|
2771
2774
|
const { $element: i } = this, t = (s) => {
|
2772
2775
|
if (this.option.selected) {
|
@@ -2799,7 +2802,7 @@ Ut = new WeakSet(), Wi = function() {
|
|
2799
2802
|
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));
|
2800
2803
|
}, Jt = new WeakSet(), Bi = function() {
|
2801
2804
|
const i = this.$element.querySelector(".drag-container"), t = i.querySelector(".wrapper");
|
2802
|
-
return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(
|
2805
|
+
return t.scrollWidth - t.clientWidth > 0 ? (i.insertAdjacentHTML(E.append, '<div class="open-collapse"></div>'), this.$button = i.querySelector(".open-collapse"), !0) : !1;
|
2803
2806
|
}, Zt = new WeakSet(), Gi = function() {
|
2804
2807
|
const { $element: i, $button: t } = this, e = function() {
|
2805
2808
|
i.classList.contains("expand") ? i.classList.remove("expand") : i.classList.add("expand");
|
@@ -2821,7 +2824,7 @@ Ut = new WeakSet(), Wi = function() {
|
|
2821
2824
|
};
|
2822
2825
|
const Rs = (n) => {
|
2823
2826
|
const { type: i, option: t, originalDomString: e } = n.s, s = document.createElement("div");
|
2824
|
-
return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(
|
2827
|
+
return i == "drag" && (s.innerHTML = H.TEMPLATE[i]().trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e)), i == "collapse" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.collapse).trim(), s.querySelector(".drag-container .wrapper").insertAdjacentHTML(E.append, e), s.querySelector(".collapse-container .wrapper").insertAdjacentHTML(E.append, e)), i == "dropdown" && (s.innerHTML = H.TEMPLATE[i](t == null ? void 0 : t.dropdown).trim(), s.querySelector("dropdown-el").insertAdjacentHTML(E.append, e)), s.children;
|
2825
2828
|
};
|
2826
2829
|
var Vt, Xi, Kt, Fi, et, ke, B, ht;
|
2827
2830
|
class Xs extends HTMLElement {
|
@@ -3216,7 +3219,7 @@ class Us {
|
|
3216
3219
|
}
|
3217
3220
|
st = new WeakSet(), xe = function() {
|
3218
3221
|
const { el: i, options: t } = this.__storage__, { SETTINGS: e, EVENTS: s } = Je;
|
3219
|
-
if (this.elements = t.state == "not active" ?
|
3222
|
+
if (this.elements = t.state == "not active" ? L(i + `:not([${this.active}])`) : L(i), this.options = Object.assign({}, e, t), this.__events__ = Object.assign({}, s), this.options.on)
|
3220
3223
|
for (const [o, a] of Object.entries(this.options.on))
|
3221
3224
|
this.__events__[o] = [a];
|
3222
3225
|
d(this, ge, ds).call(this);
|
@@ -3228,8 +3231,8 @@ st = new WeakSet(), xe = function() {
|
|
3228
3231
|
}, fe = new WeakSet(), us = function(i) {
|
3229
3232
|
const { options: t } = this, { collapseClass: e, block: s, target: o, defaultOpen: a, targetStopPropagation: r, defaultActiveMark: l } = t, c = i, u = c.querySelector(o);
|
3230
3233
|
if (c.collapse.height = u.children[0].offsetHeight, a ? (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)) : !c.classList.contains(l) && !c.hasAttribute(l) ? (c.classList.add(e), u.style.height = "0px", u.style.overflow = "hidden") : (u.style.height = `${u.children[0].offsetHeight}px`, c.classList.remove(e)), c.removeEventListener("click", d(this, nt, Ce)), c.addEventListener("click", d(this, nt, Ce)), r) {
|
3231
|
-
const p = (
|
3232
|
-
|
3234
|
+
const p = (g) => {
|
3235
|
+
g.stopPropagation();
|
3233
3236
|
};
|
3234
3237
|
u.removeEventListener("click", p), u.addEventListener("click", p);
|
3235
3238
|
}
|
@@ -3402,8 +3405,8 @@ function Ks(n, i, t, e) {
|
|
3402
3405
|
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);
|
3403
3406
|
break;
|
3404
3407
|
}
|
3405
|
-
const
|
3406
|
-
return o.drawImage(i,
|
3408
|
+
const g = (s.width - u) * 0.5, m = (s.height - p) * 0.5;
|
3409
|
+
return o.drawImage(i, g, m, u, p), s;
|
3407
3410
|
}
|
3408
3411
|
function tn(n, i) {
|
3409
3412
|
return new Promise((t, e) => {
|
@@ -3518,8 +3521,8 @@ export {
|
|
3518
3521
|
Ts as c,
|
3519
3522
|
ws as d,
|
3520
3523
|
Y as e,
|
3521
|
-
|
3522
|
-
|
3524
|
+
E as f,
|
3525
|
+
L as g,
|
3523
3526
|
mn as h,
|
3524
3527
|
at as i,
|
3525
3528
|
ui as j,
|