@xwadex/fesd 0.0.14-re.17 → 0.0.14-re.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- var Ft = (i, e, t) => {
2
- if (!e.has(i))
1
+ var be = (a, e, t) => {
2
+ if (!e.has(a))
3
3
  throw TypeError("Cannot " + t);
4
4
  };
5
- var d = (i, e, t) => {
6
- if (e.has(i))
5
+ var h = (a, e, t) => {
6
+ if (e.has(a))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(i) : e.set(i, t);
8
+ e instanceof WeakSet ? e.add(a) : e.set(a, t);
9
9
  };
10
- var o = (i, e, t) => (Ft(i, e, "access private method"), t);
11
- import { i as $t, a as ut, g as Lt, v as Ut, c as Vt, S as Jt, b as bt, d as Kt, e as Yt, f as A, s as Qt, m as y, h as $ } from "./image-preview-bundle.js";
12
- import { A as we, k as ye, C as Ee, j as $e, D as Le, l as Ae, I as Se, M as xe, R as ke, T as Te } from "./image-preview-bundle.js";
13
- const I = () => {
14
- const i = navigator.userAgent, e = {
10
+ var o = (a, e, t) => (be(a, e, "access private method"), t);
11
+ import { E as Pt, i as wt, a as Gt, b as j, e as It, g as Et, c as g, w as x, d as ye, M as we, v as X, s as Ee, f as $e, h as U, j as Ae, S as Le, k as Se, l as Te, m as E, n as A, o as xe } from "./image-preview-bundle.js";
12
+ import { A as Qe, q as Ze, p as ts, D as es, r as ss, I as is, R as as, T as rs } from "./image-preview-bundle.js";
13
+ const D = () => {
14
+ const a = navigator.userAgent, e = {
15
15
  // Firefox 1.0+
16
16
  isFirefox: typeof InstallTrigger < "u",
17
17
  // Opera 8.0+
18
- isOpera: !!window.opr && !!opr.addons || !!window.opera || i.indexOf(" OPR/") >= 0,
18
+ isOpera: !!window.opr && !!opr.addons || !!window.opera || a.indexOf(" OPR/") >= 0,
19
19
  // Internet Explorer 6-11
20
20
  isIE: (
21
21
  /*@cc_on!@*/
@@ -24,95 +24,196 @@ const I = () => {
24
24
  // Edge 20+
25
25
  isEdge: !document.documentMode && !!window.StyleMedia,
26
26
  // Edge (based on chromium) detection
27
- isEdgeChromium: /\sedg\//i.test(i) || /edg([ea]|ios)/i.test(i),
27
+ isEdgeChromium: /\sedg\//i.test(a) || /edg([ea]|ios)/i.test(a),
28
28
  // Safari 3.0+ "[object HTMLElementConstructor]"
29
- isSafari: !/chrome|crios|crmo/i.test(i) && /safari/i.test(i),
29
+ isSafari: !/chrome|crios|crmo/i.test(a) && /safari/i.test(a),
30
30
  // Chrome 1 - 79
31
- isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(i)
31
+ isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(a)
32
32
  }, t = {
33
33
  // Android
34
- isAndroid: i.indexOf("Android") > -1 || i.indexOf("Adr") > -1,
34
+ isAndroid: a.indexOf("Android") > -1 || a.indexOf("Adr") > -1,
35
35
  // iOS | ipad
36
- isiOS: i.indexOf("Mac") > -1 && "ontouchend" in document
36
+ isiOS: a.indexOf("Mac") > -1 && "ontouchend" in document
37
37
  }, s = {
38
38
  // window
39
- isWindows: i.indexOf("Win") > -1,
39
+ isWindows: a.indexOf("Win") > -1,
40
40
  // macos
41
- isMacOS: i.indexOf("Mac") > -1,
41
+ isMacOS: a.indexOf("Mac") > -1,
42
42
  // UNIX
43
- isUNIX: i.indexOf("X11") > -1,
43
+ isUNIX: a.indexOf("X11") > -1,
44
44
  // Linux
45
- isLinux: i.indexOf("Linux") > -1
45
+ isLinux: a.indexOf("Linux") > -1
46
46
  };
47
47
  return { browser: e, mobile: t, os: s };
48
- }, Zt = () => {
49
- const { browser: i } = I();
50
- return Object.keys(i).find((e) => {
51
- if (i[e])
52
- return i[e];
48
+ }, ke = () => {
49
+ const { browser: a } = D();
50
+ return Object.keys(a).find((e) => {
51
+ if (a[e])
52
+ return a[e];
53
53
  });
54
- }, te = () => {
55
- const { mobile: i } = I();
56
- return Object.keys(i).some((e) => {
57
- if (i[e])
58
- return i[e];
54
+ }, qe = () => {
55
+ const { mobile: a } = D();
56
+ return Object.keys(a).some((e) => {
57
+ if (a[e])
58
+ return a[e];
59
59
  });
60
- }, ee = () => {
61
- const { os: i } = I();
62
- return Object.keys(i).find((e) => {
63
- if (i[e])
64
- return i[e];
60
+ }, _e = () => {
61
+ const { os: a } = D();
62
+ return Object.keys(a).find((e) => {
63
+ if (a[e])
64
+ return a[e];
65
65
  });
66
- }, se = () => console.dir(I());
67
- function ue() {
66
+ }, Ce = () => console.dir(D());
67
+ function Pe() {
68
68
  return {
69
- init: I,
70
- isBrowser4: Zt,
71
- isMobile4: te,
72
- isOs4: ee,
73
- logs: se
69
+ init: D,
70
+ isBrowser4: ke,
71
+ isMobile4: qe,
72
+ isOs4: _e,
73
+ logs: Ce
74
74
  };
75
75
  }
76
- const g = (i, e, t) => {
77
- i && (bt(i) ? i.forEach((s) => s.style[e] = t) : i.style[e] = t);
76
+ const Ot = (a) => a.videoId !== "" || typeof a.videoId < "u", We = (a) => a.$selector.getAttribute("video4-active") === "on", Lt = (a) => `<video-player video-id="${a.videoId}" video-type="${a.videoType}" video-autoplay="${a.videoAutoplay}"></video-player>`;
77
+ var _, xt, V, zt, Y, Ut, C, kt, J, Ft;
78
+ class Me extends Pt {
79
+ constructor(t, s = {}) {
80
+ super();
81
+ h(this, _);
82
+ h(this, V);
83
+ h(this, Y);
84
+ h(this, C);
85
+ h(this, J);
86
+ if (!wt(t) && !Gt(t) && !j(t)) {
87
+ It("video4", `找不到該物件 -> ${t}`);
88
+ return;
89
+ }
90
+ this.__storage__ = {
91
+ el: t,
92
+ options: s
93
+ }, o(this, _, xt).call(this);
94
+ }
95
+ update() {
96
+ o(this, _, xt).call(this);
97
+ }
98
+ }
99
+ _ = new WeakSet(), xt = function() {
100
+ const { el: t, options: s } = this.__storage__, { SETTINGS: i, EVENTS: r } = X;
101
+ if (this.elements = Et(t), this.options = Object.assign({}, i, s), this.__events__ = Object.assign({}, r), this.options.on)
102
+ for (const [n, l] of Object.entries(this.options.on))
103
+ this.__events__[n] = [l];
104
+ o(this, V, zt).call(this);
105
+ }, V = new WeakSet(), zt = function() {
106
+ const { elements: t, options: s } = this;
107
+ t.forEach((i) => {
108
+ i.video = {}, i.video.instance = this, i.video.defaultOptions = s, i.video.params = o(this, J, Ft).call(this, i), i.video.methods = {}, i.video.methods.update = this.update, Ot(i.video.params) && !We(i.video.params) && (i.setAttribute("video4-active", "on"), o(this, Y, Ut).call(this, i)), Ot(i.video.params) || It("video4", "無法取得影片 ID");
109
+ }), this.emit("init");
110
+ }, Y = new WeakSet(), Ut = function(t) {
111
+ const { LAYOUT: s } = X, i = t.video.params, { $selector: r, videoLayoutNo: n, videoId: l, videoType: u, videoMode: p, videoButton: d, videoCover: c } = i;
112
+ if (p === "onBox") {
113
+ let m = null;
114
+ if (c === "on") {
115
+ t.classList.add("video4-cover"), r.querySelector("img") || (r.insertAdjacentHTML(g.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), x("video4", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構,若無結構則自動加入圖片結構"));
116
+ const f = r.querySelector("img");
117
+ f.insertAdjacentHTML(g.after, s[n]);
118
+ const v = (f == null ? void 0 : f.getAttribute("src")) || (f == null ? void 0 : f.getAttribute("data-src"));
119
+ !v && u == "youtube" ? f.setAttribute("src", `https://img.youtube.com/vi/${l}/0.jpg`) : !v && u == "vimeo" ? f.setAttribute("src", `https://vumbnail.com/${l}_large.jpg`) : x("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片");
120
+ }
121
+ d == "off" ? m = r : (m = r.querySelector(d) ?? r, r.querySelector(d) || x("video4", `找不到 videoButton 設定的 element -> '${d}' , 點擊物件轉移至 '${this.__storage__.el}'`)), m.video || (m.video = {}, m.video.params = i), m.video.eventHandler = o(this, C, kt), m.addEventListener("click", m.video.eventHandler);
122
+ } else if (p === "onPage") {
123
+ let m = null;
124
+ if (c == "on") {
125
+ t.classList.add("video4-cover"), r.querySelector("img") || (r.insertAdjacentHTML(g.prepend, '<picture><source srcset="" type="image/webp"><source srcset="" type="image/jpeg"><img src="" alt></picture>'), x("video", "若啟用 [videoCover] 且選擇 onBox 模式必須於 video-target 內放置 img 結構"));
126
+ const f = r.querySelector("img");
127
+ f.insertAdjacentHTML(g.after, s[n]);
128
+ const v = (f == null ? void 0 : f.getAttribute("src")) || (f == null ? void 0 : f.getAttribute("data-src"));
129
+ !v && u == "youtube" ? f.setAttribute("src", `https://img.youtube.com/vi/${l}/0.jpg`) : !v && u == "vimeo" ? f.setAttribute("src", `https://vumbnail.com/${l}_large.jpg`) : v || x("video4", "僅 youtube & vimeo 提供,無圖片時放置預設封面畫面,其他影片平台請自行上傳封面照片"), d == "off" ? m = r : (m = r.querySelector(d) ?? r, r.querySelector(d) || x("video4", `找不到 videoButton 設定的 element -> '${d}', 點擊物件轉移至 '${this.__storage__.el}'`));
130
+ } else {
131
+ r.innerHTML = Lt(i);
132
+ return;
133
+ }
134
+ m.video || (m.video = {}, m.video.params = i), m.video.eventHandler = o(this, C, kt), m.addEventListener("click", m.video.eventHandler);
135
+ }
136
+ }, C = new WeakSet(), kt = function(t) {
137
+ const { video: s } = this, { $selector: i, videoMode: r, videoTarget: n, videoTargetRoute: l } = s.params, u = new ye({ callback_loaded: (p) => {
138
+ } });
139
+ if (r == "onBox") {
140
+ const p = {
141
+ target: n,
142
+ route: l,
143
+ on: {
144
+ complete(d) {
145
+ d.querySelector(".modal-content").insertAdjacentHTML("beforeend", Lt(s.params));
146
+ },
147
+ open(d) {
148
+ const c = d.querySelectorAll("[data-overlayscrollbars-viewport]");
149
+ u.update(), Ee([...c]);
150
+ },
151
+ close(d) {
152
+ const c = d.querySelectorAll("[data-overlayscrollbars-viewport]");
153
+ $e([...c]);
154
+ },
155
+ destroy(d) {
156
+ }
157
+ }
158
+ };
159
+ we.open(p);
160
+ } else
161
+ r == "onPage" && (s.params.videoAutoplay = "on", i.innerHTML = Lt(s.params));
162
+ }, J = new WeakSet(), Ft = function(t) {
163
+ const { SETTINGS: s } = X;
164
+ return {
165
+ $selector: t,
166
+ videoId: t.getAttribute("video-id"),
167
+ videoType: t.getAttribute("video-type"),
168
+ videoAutoplay: t.getAttribute("video-autoplay") || s.videoAutoplay,
169
+ videoMode: t.getAttribute("video-mode") || s.videoMode,
170
+ videoButton: t.getAttribute("video-button") || s.videoButton,
171
+ videoCover: t.getAttribute("video-cover") || s.videoCover,
172
+ videoLayoutNo: t.getAttribute("video-layout-no") || s.videoLayoutNo,
173
+ videoTarget: t.getAttribute("video-target") || s.videoTarget,
174
+ videoTargetRoute: t.getAttribute("video-target-route") || s.videoTargetRoute
175
+ };
78
176
  };
79
- var B, At, X, St, W, pt, R, xt, q, mt, G, kt;
80
- class pe {
177
+ const b = (a, e, t) => {
178
+ a && (j(a) ? a.forEach((s) => s.style[e] = t) : a.style[e] = t);
179
+ };
180
+ var K, Vt, Q, Yt, W, qt, Z, Jt, M, _t, tt, Kt;
181
+ class Ge {
81
182
  constructor(e, t = {}) {
82
- d(this, B);
83
- d(this, X);
183
+ h(this, K);
184
+ h(this, Q);
84
185
  // 取得元件上的設定值
85
- d(this, W);
186
+ h(this, W);
86
187
  // 設置設定值的 CSS 樣式
87
- d(this, R);
88
- d(this, q);
89
- d(this, G);
90
- !$t(e) || !ut(e) || (this.__storage__ = {
188
+ h(this, Z);
189
+ h(this, M);
190
+ h(this, tt);
191
+ !wt(e) || !U(e) || (this.__storage__ = {
91
192
  el: e,
92
193
  options: t
93
- }, o(this, B, At).call(this));
194
+ }, o(this, K, Vt).call(this));
94
195
  }
95
196
  update() {
96
197
  const { elements: e } = this;
97
198
  e.forEach((t) => {
98
199
  t.querySelectorAll("._article").forEach((s) => {
99
- s.article = {}, s.article.parent = t, s.article.params = o(this, W, pt).call(this, s), o(this, q, mt).call(this, s);
200
+ s.article = {}, s.article.parent = t, s.article.params = o(this, W, qt).call(this, s), o(this, M, _t).call(this, s);
100
201
  });
101
202
  });
102
203
  }
103
204
  }
104
- B = new WeakSet(), At = function() {
105
- const { el: e, options: t } = this.__storage__, { SETTINGS: s } = Kt;
106
- this.elements = Lt(e), this.options = Object.assign({}, s, t), o(this, X, St).call(this);
107
- }, X = new WeakSet(), St = function() {
205
+ K = new WeakSet(), Vt = function() {
206
+ const { el: e, options: t } = this.__storage__, { SETTINGS: s } = Se;
207
+ this.elements = Et(e), this.options = Object.assign({}, s, t), o(this, Q, Yt).call(this);
208
+ }, Q = new WeakSet(), Yt = function() {
108
209
  const { elements: e } = this;
109
210
  e.forEach((t) => {
110
211
  t.querySelectorAll("._article").forEach((s) => {
111
- var a, n;
112
- s.article = {}, s.article.parent = t, s.article.params = o(this, W, pt).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, o(n = o(a = o(this, R, xt).call(this, s), q, mt).call(a, s), G, kt).call(n, s);
212
+ var i, r;
213
+ s.article = {}, s.article.parent = t, s.article.params = o(this, W, qt).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, o(r = o(i = o(this, Z, Jt).call(this, s), M, _t).call(i, s), tt, Kt).call(r, s);
113
214
  });
114
215
  });
115
- }, W = new WeakSet(), pt = function(e) {
216
+ }, W = new WeakSet(), qt = function(e) {
116
217
  return {
117
218
  // 元件本身
118
219
  $selector: e,
@@ -144,171 +245,171 @@ B = new WeakSet(), At = function() {
144
245
  buttonTextColor: e.getAttribute("button-textcolor"),
145
246
  descriptionColor: e.getAttribute("description-color")
146
247
  };
147
- }, R = new WeakSet(), xt = function(e) {
248
+ }, Z = new WeakSet(), Jt = function(e) {
148
249
  const { params: t } = e.article;
149
- return g(t.$h, "color", t.hColor), g(t.$subH, "color", t.subHColor), g(t.$p, "color", t.pColor), g(t.$description, "color", t.descriptionColor), g(t.$button, "backgroundColor", t.buttonColor), g(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), g(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), g(t.$backgroundWrap, "backgroundColor", t.typeFullColor), g(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), this;
150
- }, q = new WeakSet(), mt = function(e) {
250
+ return b(t.$h, "color", t.hColor), b(t.$subH, "color", t.subHColor), b(t.$p, "color", t.pColor), b(t.$description, "color", t.descriptionColor), b(t.$button, "backgroundColor", t.buttonColor), b(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), b(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), b(t.$backgroundWrap, "backgroundColor", t.typeFullColor), b(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), this;
251
+ }, M = new WeakSet(), _t = function(e) {
151
252
  const { params: t } = e.article;
152
- return t.$video.length && new Ut(t.$video), this;
153
- }, G = new WeakSet(), kt = function(e) {
253
+ return t.$video.length && new Me(t.$video), this;
254
+ }, tt = new WeakSet(), Kt = function(e) {
154
255
  const { basic_rwd: t } = this.options, { params: s } = e.article;
155
256
  if (!s.$swiper)
156
257
  return;
157
- const a = Vt(), n = this;
158
- let r = {
258
+ const i = Ae(), r = this;
259
+ let n = {
159
260
  on: {
160
- init(c) {
161
- const h = c.$el[0];
162
- s.$video.length && ([...h.querySelectorAll("[video4-active]")].forEach((f) => {
163
- var b, m;
164
- (b = f.querySelector(Yt.SETTINGS.videoButton)) == null || b.remove(), (m = f.querySelector(".overlay")) == null || m.remove(), f.removeAttribute("video4-active");
165
- }), n.update());
261
+ init(p) {
262
+ const d = p.$el[0];
263
+ s.$video.length && ([...d.querySelectorAll("[video4-active]")].forEach((m) => {
264
+ var f, v;
265
+ (f = m.querySelector(X.SETTINGS.videoButton)) == null || f.remove(), (v = m.querySelector(".overlay")) == null || v.remove(), m.removeAttribute("video4-active");
266
+ }), r.update());
166
267
  },
167
- observerUpdate(c) {
168
- c.params.autoplay.enabled && (c.autoplay.start(), c.update());
268
+ observerUpdate(p) {
269
+ p.params.autoplay.enabled && (p.autoplay.start(), p.update());
169
270
  }
170
271
  },
171
272
  observer: !0,
172
273
  breakpoints: {}
173
274
  };
174
- if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${a}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
175
- const c = document.createElement("div");
176
- c.className = `swiper-button-next swiper-${a}`, s.$swiperButtonCover.appendChild(c);
177
- const h = document.createElement("div");
178
- h.className = `swiper-button-prev swiper-${a}`, s.$swiperButtonCover.appendChild(h), r.navigation = {
179
- nextEl: `.swiper-button-next.swiper-${a}`,
180
- prevEl: `.swiper-button-prev.swiper-${a}`
275
+ if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${i}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
276
+ const p = document.createElement("div");
277
+ p.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(p);
278
+ const d = document.createElement("div");
279
+ d.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(d), n.navigation = {
280
+ nextEl: `.swiper-button-next.swiper-${i}`,
281
+ prevEl: `.swiper-button-prev.swiper-${i}`
181
282
  };
182
283
  }
183
284
  if (s.$selector.getAttribute("swiper-nav") !== "off" || !s.$selector.getAttribute("swiper-nav")) {
184
- const c = document.createElement("div");
185
- c.className = `swiper-pagination swiper-${a}`, s.$swiper.appendChild(c), r.pagination = {
186
- el: `.swiper-pagination.swiper-${a}`,
285
+ const p = document.createElement("div");
286
+ p.className = `swiper-pagination swiper-${i}`, s.$swiper.appendChild(p), n.pagination = {
287
+ el: `.swiper-pagination.swiper-${i}`,
187
288
  clickable: !0
188
289
  };
189
290
  }
190
- Number.parseInt(s.$selector.getAttribute("swiper-num")) && (r.breakpoints[t] = {
291
+ Number.parseInt(s.$selector.getAttribute("swiper-num")) && (n.breakpoints[t] = {
191
292
  slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
192
- }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (r.autoplay = {
293
+ }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (n.autoplay = {
193
294
  delay: 3e3,
194
295
  disableOnInteraction: !1
195
- }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (r.loop = !0), s.$selector.getAttribute("swiper-speed") && (r.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (r.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (r.pagination.dynamicBullets = !0);
296
+ }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (n.loop = !0), s.$selector.getAttribute("swiper-speed") && (n.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (n.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (n.pagination.dynamicBullets = !0);
196
297
  let l = () => window.innerWidth > this.basic_rwd && Number(s.$selector.getAttribute("swiper-num")) || 1;
197
- s.$swiper.querySelectorAll(".swiper-slide").length <= l() && (r.navigation = !1, r.pagination = !1, r.autoplay = !1, r.loop = !1, s.$selector.querySelector(".swiper-button-cover").style.display = "none", s.$selector.querySelector(".swiper-pagination").style.display = "none", s.$swiper.classList.add("swiper-no-swiping"));
198
- const p = new Jt(s.$swiper, r);
199
- return e.article.swiperList = [], e.article.swiperList.push(p), this;
298
+ s.$swiper.querySelectorAll(".swiper-slide").length <= l() && (n.navigation = !1, n.pagination = !1, n.autoplay = !1, n.loop = !1, s.$selector.querySelector(".swiper-button-cover").style.display = "none", s.$selector.querySelector(".swiper-pagination").style.display = "none", s.$swiper.classList.add("swiper-no-swiping"));
299
+ const u = new Le(s.$swiper, n);
300
+ return e.article.swiperList = [], e.article.swiperList.push(u), this;
200
301
  };
201
- let gt = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", vt = "ontouchend" in document.documentElement ? "touchend" : "mouseup", ct = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
202
- function L(i) {
203
- const e = window.getComputedStyle(i), t = e.transform || e.mozTransform;
302
+ let Nt = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", jt = "ontouchend" in document.documentElement ? "touchend" : "mouseup", St = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
303
+ function L(a) {
304
+ const e = window.getComputedStyle(a), t = e.transform || e.mozTransform;
204
305
  if (t === "none")
205
306
  return {
206
307
  x: 0,
207
308
  y: 0,
208
309
  z: 0
209
310
  };
210
- const s = t.includes("3d") ? "3d" : "2d", a = t.match(/matrix.*\((.+)\)/)[1].split(", ");
311
+ const s = t.includes("3d") ? "3d" : "2d", i = t.match(/matrix.*\((.+)\)/)[1].split(", ");
211
312
  if (s === "2d")
212
313
  return {
213
- x: Number(a[4]),
214
- y: Number(a[5]),
314
+ x: Number(i[4]),
315
+ y: Number(i[5]),
215
316
  z: 0
216
317
  };
217
318
  if (s === "3d")
218
319
  return {
219
- x: Number(a[12]),
220
- y: Number(a[13]),
221
- z: Number(a[14])
320
+ x: Number(i[12]),
321
+ y: Number(i[13]),
322
+ z: Number(i[14])
222
323
  };
223
324
  }
224
- function H(i) {
225
- const t = i.querySelector(".wrapper").querySelectorAll(".item");
325
+ function R(a) {
326
+ const t = a.querySelector(".wrapper").querySelectorAll(".item");
226
327
  let s = 0;
227
- return t.forEach((a) => {
228
- const n = getComputedStyle(a), r = parseInt(n.marginLeft), l = parseInt(n.marginRight);
229
- s += a.getBoundingClientRect().width + r + l;
328
+ return t.forEach((i) => {
329
+ const r = getComputedStyle(i), n = parseInt(r.marginLeft), l = parseInt(r.marginRight);
330
+ s += i.getBoundingClientRect().width + n + l;
230
331
  }), s;
231
332
  }
232
- function dt(i) {
233
- if (L(i.slideWrapEl).x >= i.translateMin)
333
+ function Tt(a) {
334
+ if (L(a.slideWrapEl).x >= a.translateMin)
234
335
  return "is-start";
235
- if (L(i.slideWrapEl).x <= i.translateMax)
336
+ if (L(a.slideWrapEl).x <= a.translateMax)
236
337
  return "is-end";
237
- if (L(i.slideWrapEl).x < i.translateMin && L(i.slideWrapEl).x > i.translateMax)
338
+ if (L(a.slideWrapEl).x < a.translateMin && L(a.slideWrapEl).x > a.translateMax)
238
339
  return "is-middle";
239
340
  }
240
- function ie(i) {
241
- const e = i.el, t = e.querySelector(".wrapper");
242
- t.addEventListener(gt, function(s) {
243
- switch (i.isDown = !0, i.slidable && t.classList.add("dragging"), gt) {
341
+ function He(a) {
342
+ const e = a.el, t = e.querySelector(".wrapper");
343
+ t.addEventListener(Nt, function(s) {
344
+ switch (a.isDown = !0, a.slidable && t.classList.add("dragging"), Nt) {
244
345
  case "mousedown":
245
- i.startX = s.pageX;
346
+ a.startX = s.pageX;
246
347
  break;
247
348
  case "touchstart":
248
- i.startX = s.changedTouches[0].pageX;
349
+ a.startX = s.changedTouches[0].pageX;
249
350
  break;
250
351
  }
251
- i.nowTranslateX = L(t).x;
252
- }), t.addEventListener(vt, function(s) {
253
- i.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
254
- let a;
255
- switch (ct) {
352
+ a.nowTranslateX = L(t).x;
353
+ }), t.addEventListener(jt, function(s) {
354
+ a.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
355
+ let i;
356
+ switch (St) {
256
357
  case "mousemove":
257
- a = s.pageX - i.startX;
358
+ i = s.pageX - a.startX;
258
359
  break;
259
360
  case "touchmove":
260
- a = s.changedTouches[0].pageX - i.startX;
361
+ i = s.changedTouches[0].pageX - a.startX;
261
362
  break;
262
363
  }
263
- if (a === 0 && s.target.closest(".item")) {
264
- if (vt === "mouseup" && s.button !== 0)
364
+ if (i === 0 && s.target.closest(".item")) {
365
+ if (jt === "mouseup" && s.button !== 0)
265
366
  return;
266
- t.querySelectorAll(".item").forEach((r) => {
267
- r.classList.remove("active");
268
- }), s.target.closest(".item").classList.add("active"), i.moveActive(i.params.speed);
367
+ t.querySelectorAll(".item").forEach((n) => {
368
+ n.classList.remove("active");
369
+ }), s.target.closest(".item").classList.add("active"), a.moveActive(a.params.speed);
269
370
  } else
270
- i.slidable && i.resetPos(e);
371
+ a.slidable && a.resetPos(e);
271
372
  }), t.addEventListener("mouseleave", function() {
272
- i.isDown && i.slidable && (i.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), i.resetPos(e));
273
- }), t.addEventListener(ct, function(s) {
274
- if (i.draggable && i.slidable) {
275
- if (!i.isDown)
373
+ a.isDown && a.slidable && (a.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), a.resetPos(e));
374
+ }), t.addEventListener(St, function(s) {
375
+ if (a.draggable && a.slidable) {
376
+ if (!a.isDown)
276
377
  return;
277
378
  s.preventDefault();
278
- let a;
279
- switch (ct) {
379
+ let i;
380
+ switch (St) {
280
381
  case "mousemove":
281
- a = s.pageX - i.startX;
382
+ i = s.pageX - a.startX;
282
383
  break;
283
384
  case "touchmove":
284
- a = s.changedTouches[0].pageX - i.startX;
385
+ i = s.changedTouches[0].pageX - a.startX;
285
386
  break;
286
387
  }
287
- if (a !== 0) {
388
+ if (i !== 0) {
288
389
  t.classList.add("moving");
289
- const n = {
390
+ const r = {
290
391
  transition: "all 0ms ease 0s",
291
- transform: `translate3d(${i.nowTranslateX + a}px,0,0)`
392
+ transform: `translate3d(${a.nowTranslateX + i}px,0,0)`
292
393
  };
293
- Object.assign(t.style, n);
394
+ Object.assign(t.style, r);
294
395
  }
295
396
  }
296
397
  });
297
398
  }
298
- function ae(i) {
299
- const e = i.querySelectorAll("a");
399
+ function Ie(a) {
400
+ const e = a.querySelectorAll("a");
300
401
  for (var t = 0, s = e.length; t < s; t++)
301
402
  e[t].draggable = !1;
302
403
  }
303
- class me {
404
+ class ze {
304
405
  constructor(e, t) {
305
406
  this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
306
407
  speed: 300,
307
408
  clickSwitch: !0,
308
409
  breakpoint: !1
309
- }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = L(this.slideWrapEl).x, this.slideTotalWidth = H(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
410
+ }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = L(this.slideWrapEl).x, this.slideTotalWidth = R(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
310
411
  Math.abs(
311
- H(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
412
+ R(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
312
413
  )
313
414
  ), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
314
415
  }
@@ -316,35 +417,35 @@ class me {
316
417
  const e = this;
317
418
  e.slidable && (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()), window.addEventListener("resize", function() {
318
419
  e.update();
319
- }), ie(e), ae(e.el);
420
+ }), He(e), Ie(e.el);
320
421
  }
321
422
  moveActive(e) {
322
- const t = this, s = t.slideWrapEl.querySelector(".item.active"), n = s.previousElementSibling ? s.offsetLeft - t.el.clientWidth / 2 + s.clientWidth / 2 : 0;
423
+ const t = this, s = t.slideWrapEl.querySelector(".item.active"), r = s.previousElementSibling ? s.offsetLeft - t.el.clientWidth / 2 + s.clientWidth / 2 : 0;
323
424
  if (t.slidable) {
324
- if (-n < 0 && -n > t.translateMax) {
325
- const r = {
425
+ if (-r < 0 && -r > t.translateMax) {
426
+ const n = {
326
427
  transition: `all ${e || 0}ms ease 0s`,
327
- transform: `translate3d(-${n}px,0,0)`
428
+ transform: `translate3d(-${r}px,0,0)`
328
429
  };
329
- Object.assign(t.slideWrapEl.style, r);
330
- } else if (-n >= 0) {
331
- const r = {
430
+ Object.assign(t.slideWrapEl.style, n);
431
+ } else if (-r >= 0) {
432
+ const n = {
332
433
  transition: `all ${e || 0}ms ease 0s`,
333
434
  transform: "translate3d(0,0,0)"
334
435
  };
335
- Object.assign(t.slideWrapEl.style, r);
436
+ Object.assign(t.slideWrapEl.style, n);
336
437
  } else {
337
- const r = {
438
+ const n = {
338
439
  transition: `all ${e || 0}ms ease 0s`,
339
440
  transform: `translate3d(${t.translateMax}px,0,0)`
340
441
  };
341
- Object.assign(t.slideWrapEl.style, r);
442
+ Object.assign(t.slideWrapEl.style, n);
342
443
  }
343
444
  if (e)
344
445
  t.slideWrapEl.addEventListener(
345
446
  "transitionend",
346
447
  function() {
347
- switch (t.nowTranslateX = L(t.slideWrapEl).x, dt(t)) {
448
+ switch (t.nowTranslateX = L(t.slideWrapEl).x, Tt(t)) {
348
449
  case "is-start":
349
450
  t.el.classList.add("is-start"), t.el.classList.remove("is-end");
350
451
  break;
@@ -359,7 +460,7 @@ class me {
359
460
  !1
360
461
  );
361
462
  else
362
- switch (t.nowTranslateX = L(t.slideWrapEl).x, dt(t)) {
463
+ switch (t.nowTranslateX = L(t.slideWrapEl).x, Tt(t)) {
363
464
  case "is-start":
364
465
  t.el.classList.add("is-start"), t.el.classList.remove("is-end");
365
466
  break;
@@ -374,7 +475,7 @@ class me {
374
475
  }
375
476
  resetPos() {
376
477
  const e = this;
377
- switch (dt(e)) {
478
+ switch (Tt(e)) {
378
479
  case "is-start":
379
480
  e.el.classList.add("is-start"), e.el.classList.remove("is-end"), Object.assign(e.slideWrapEl.style, {
380
481
  transition: `all ${e.params.speed}ms ease 0s`,
@@ -394,212 +495,212 @@ class me {
394
495
  }
395
496
  update() {
396
497
  const e = this;
397
- e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = H(e.el), e.translateMax = -Math.floor(
498
+ e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = R(e.el), e.translateMax = -Math.floor(
398
499
  Math.abs(
399
- H(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
500
+ R(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
400
501
  )
401
502
  ), e.slidable = e.slideTotalWidth > Math.round(e.el.getBoundingClientRect().width) && (!e.params.breakpoint || window.innerWidth <= e.params.breakpoint), e.slidable ? (e.slideWrapEl.style.width = `${e.slideTotalWidth}px`, e.el.classList.add("slidable"), e.slideWrapEl.querySelector(".item.active") && e.moveActive()) : (e.el.classList.remove("slidable"), e.el.classList.remove("is-start"), e.el.classList.remove("is-end"), e.slideWrapEl.removeAttribute("style"));
402
503
  }
403
504
  }
404
- const wt = (i) => {
405
- if (i == "facebook")
505
+ const Dt = (a) => {
506
+ if (a == "facebook")
406
507
  return "https://www.facebook.com/sharer/sharer.php?u=";
407
- if (i == "line")
508
+ if (a == "line")
408
509
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? "http://line.naver.jp/R/msg/text/?" : "https://lineit.line.me/share/ui?url=";
409
- if (i == "twitter")
510
+ if (a == "twitter")
410
511
  return "https://twitter.com/intent/tweet?url=";
411
- if (i == "linkedin")
512
+ if (a == "linkedin")
412
513
  return `http://www.linkedin.com/shareArticle?mini=true&title=${document.title}&source=${document.title}&url=`;
413
- if (i == "telegram")
514
+ if (a == "telegram")
414
515
  return "https://telegram.me/share/url?url=";
415
516
  };
416
- var P, Tt, z, Wt, F, qt;
417
- class he {
517
+ var et, Qt, st, Zt, it, te;
518
+ class Ue {
418
519
  constructor(e, t = {}) {
419
- d(this, P);
420
- d(this, z);
421
- d(this, F);
520
+ h(this, et);
521
+ h(this, st);
522
+ h(this, it);
422
523
  this.__storage__ = {
423
524
  el: e,
424
525
  options: t
425
- }, o(this, P, Tt).call(this);
526
+ }, o(this, et, Qt).call(this);
426
527
  }
427
528
  }
428
- P = new WeakSet(), Tt = function() {
429
- const { el: e, options: t } = this.__storage__, { SETTINGS: s } = Qt;
430
- !$t(e) || !ut(e) || (this.elements = Lt(e), this.options = Object.assign({}, s, t), o(this, z, Wt).call(this));
431
- }, z = new WeakSet(), Wt = function() {
529
+ et = new WeakSet(), Qt = function() {
530
+ const { el: e, options: t } = this.__storage__, { SETTINGS: s } = Te;
531
+ !wt(e) || !U(e) || (this.elements = Et(e), this.options = Object.assign({}, s, t), o(this, st, Zt).call(this));
532
+ }, st = new WeakSet(), Zt = function() {
432
533
  const { elements: e, options: t } = this;
433
534
  e.forEach((s) => {
434
- s.querySelectorAll("[share-target]").forEach((a) => {
435
- a.share = {}, a.share.instance = this, a.share.params = t, a.share.eventHandler = o(this, F, qt), a.addEventListener("click", a.share.eventHandler);
535
+ s.querySelectorAll("[share-target]").forEach((i) => {
536
+ i.share = {}, i.share.instance = this, i.share.params = t, i.share.eventHandler = o(this, it, te), i.addEventListener("click", i.share.eventHandler);
436
537
  });
437
538
  });
438
- }, F = new WeakSet(), qt = function() {
439
- const { eventHandler: e, params: t } = this.share, s = this.getAttribute("share-target"), a = {
539
+ }, it = new WeakSet(), te = function() {
540
+ const { eventHandler: e, params: t } = this.share, s = this.getAttribute("share-target"), i = {
440
541
  source: this.getAttribute("utm-source"),
441
542
  medium: this.getAttribute("utm-medium"),
442
543
  campaign: this.getAttribute("utm-campaign")
443
- }, n = {
544
+ }, r = {
444
545
  success: this.getAttribute("copy-success") || t.success,
445
546
  text: this.getAttribute("copy-text") || t.text,
446
547
  className: this.getAttribute("copy-class") || t.className,
447
548
  duration: this.getAttribute("copy-duration") || t.duration
448
- }, r = encodeURIComponent(document.URL);
449
- let l = r;
549
+ }, n = encodeURIComponent(document.URL);
550
+ let l = n;
450
551
  if (s == "wechat") {
451
- window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${r}&size=250x250`, "share to wechat", "width=300,height=300");
552
+ window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${n}&size=250x250`, "share to wechat", "width=300,height=300");
452
553
  return;
453
554
  }
454
555
  if (s == "url") {
455
- if (ut(".copied-wrapper"))
556
+ if (U(".copied-wrapper"))
456
557
  return;
457
- document.querySelector("body").insertAdjacentHTML(A.append, `<div class='copied-wrapper'><div class='text'>${n.success ? n.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
458
- const p = document.querySelector(".copied-wrapper");
459
- n.className && p.classList.add(n.className), p.style.top = this.getBoundingClientRect().top + window.scrollY + "px", p.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", p.style.display = "block";
460
- const c = document.querySelector("#clipboard");
461
- if (c.value = n.text ?? window.location.href, c.setSelectionRange(0, 9999), c.select(), document.execCommand("copy")) {
558
+ document.querySelector("body").insertAdjacentHTML(g.append, `<div class='copied-wrapper'><div class='text'>${r.success ? r.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
559
+ const u = document.querySelector(".copied-wrapper");
560
+ r.className && u.classList.add(r.className), u.style.top = this.getBoundingClientRect().top + window.scrollY + "px", u.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", u.style.display = "block";
561
+ const p = document.querySelector("#clipboard");
562
+ if (p.value = r.text ?? window.location.href, p.setSelectionRange(0, 9999), p.select(), document.execCommand("copy")) {
462
563
  document.execCommand("copy");
463
- const h = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
464
- u.style.display = "block", u.style.opacity = 0;
465
- const f = (m, ot) => {
564
+ const d = document.querySelector(".copied-wrapper"), c = document.querySelector(".copied-wrapper .text");
565
+ c.style.display = "block", c.style.opacity = 0;
566
+ const m = (v, $t) => {
466
567
  let S = 0;
467
- const x = 50, O = x / ot, lt = setInterval(function() {
468
- S += O, m.style.opacity = S, S >= 1 && (clearInterval(lt), setTimeout(function() {
469
- b(m, 300, function() {
470
- h.remove();
568
+ const T = 50, B = T / $t, At = setInterval(function() {
569
+ S += B, v.style.opacity = S, S >= 1 && (clearInterval(At), setTimeout(function() {
570
+ f(v, 300, function() {
571
+ d.remove();
471
572
  });
472
- }, n.duration));
473
- }, x);
474
- }, b = (m, ot, S) => {
475
- let x = 1;
476
- const O = 50, lt = O / ot, zt = setInterval(() => {
477
- x -= lt, m.style.opacity = x, x <= 0 && (clearInterval(zt), m.style.display = "none", S && S());
478
- }, O);
573
+ }, r.duration));
574
+ }, T);
575
+ }, f = (v, $t, S) => {
576
+ let T = 1;
577
+ const B = 50, At = B / $t, ge = setInterval(() => {
578
+ T -= At, v.style.opacity = T, T <= 0 && (clearInterval(ge), v.style.display = "none", S && S());
579
+ }, B);
479
580
  };
480
- f(u, 300);
581
+ m(c, 300);
481
582
  }
482
583
  return;
483
584
  }
484
- l = `${l}${a.source ? `?utm_source=${a.source}` : ""}${a.medium ? `&utm_medium${a.medium}` : ""}${a.campaign ? `&utm_campaign${a.campaign}` : ""}`, l = l.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${wt(s)}${r}`) : window.open(`${wt(s)}${l}&quote=${l}`), this.removeEventListener("click", e), setTimeout(() => {
585
+ l = `${l}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, l = l.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${Dt(s)}${n}`) : window.open(`${Dt(s)}${l}&quote=${l}`), this.removeEventListener("click", e), setTimeout(() => {
485
586
  this.addEventListener("click", e);
486
587
  }, 100);
487
588
  };
488
- function D(i) {
589
+ function P(a) {
489
590
  const e = {};
490
- return [...i.attributes].forEach((t) => {
591
+ return [...a.attributes].forEach((t) => {
491
592
  if (t.name.includes("duration-")) {
492
- const s = t.name.replace("duration-", ""), a = t.nodeValue;
493
- e[s] = Number(a);
593
+ const s = t.name.replace("duration-", ""), i = t.nodeValue;
594
+ e[s] = Number(i);
494
595
  }
495
596
  }), Object.keys(e).length === 0 ? null : e;
496
597
  }
497
- function yt(i) {
498
- if (D(i)) {
598
+ function Bt(a) {
599
+ if (P(a)) {
499
600
  let e;
500
- const t = Object.keys(D(i)).map((s) => ({
601
+ const t = Object.keys(P(a)).map((s) => ({
501
602
  value: s,
502
603
  point: s
503
604
  }));
504
- t.sort((s, a) => parseInt(a.value, 10) - parseInt(s.value, 10));
605
+ t.sort((s, i) => parseInt(i.value, 10) - parseInt(s.value, 10));
505
606
  for (let s = 0; s < t.length; s += 1) {
506
- const { point: a, value: n } = t[s];
507
- window.matchMedia(`(max-width: ${n}px)`).matches && (e = a);
607
+ const { point: i, value: r } = t[s];
608
+ window.matchMedia(`(max-width: ${r}px)`).matches && (e = i);
508
609
  }
509
- return e ? Number(D(i)[e]) : i.s.options.duration;
610
+ return e ? Number(P(a)[e]) : a.s.options.duration;
510
611
  } else
511
- return i.s.options.duration;
612
+ return a.s.options.duration;
512
613
  }
513
- function re(i) {
514
- const { behavior: e, continual: t, gap: s } = i.s.options, a = i.childNodes, n = document.createElement("div"), r = document.createElement("div");
515
- n.className = "animate-container", r.className = "animate-item", [...a].forEach((p) => {
516
- r.append(p);
614
+ function Oe(a) {
615
+ const { behavior: e, continual: t, gap: s } = a.s.options, i = a.childNodes, r = document.createElement("div"), n = document.createElement("div");
616
+ r.className = "animate-container", n.className = "animate-item", [...i].forEach((u) => {
617
+ n.append(u);
517
618
  });
518
619
  function l() {
519
- const p = r.cloneNode(!0);
520
- return p.classList.add("clone"), i.s.cloneAnimation = null, i.s.cloneAnimateEl = p, p;
620
+ const u = n.cloneNode(!0);
621
+ return u.classList.add("clone"), a.s.cloneAnimation = null, a.s.cloneAnimateEl = u, u;
521
622
  }
522
- i.s.animation = null, i.s.animateEl = r, i.textContent = "", n.append(r), i.append(n), r.clientWidth * 2 + s >= i.clientWidth ? e === "normal" && t && n.append(l()) : i.s.options.continual = !1;
623
+ a.s.animation = null, a.s.animateEl = n, a.textContent = "", r.append(n), a.append(r), n.clientWidth * 2 + s >= a.clientWidth ? e === "normal" && t && r.append(l()) : a.s.options.continual = !1;
523
624
  }
524
- function v(i) {
525
- const { behavior: e, direction: t, continual: s } = i.s.options;
526
- let a = {};
625
+ function y(a) {
626
+ const { behavior: e, direction: t, continual: s } = a.s.options;
627
+ let i = {};
527
628
  switch (e) {
528
629
  case "normal":
529
- let n, r;
630
+ let r, n;
530
631
  switch (t) {
531
632
  case "top":
532
- n = s ? "translate3d(0,100%,0)" : `translate3d(0,${i.clientHeight}px,0)`, r = "translate3d(0,-100%,0)", a.animate1 = [{ transform: n }, { transform: r }], s && (a.animate2 = [{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(0,-200%,0)" }]);
633
+ r = s ? "translate3d(0,100%,0)" : `translate3d(0,${a.clientHeight}px,0)`, n = "translate3d(0,-100%,0)", i.animate1 = [{ transform: r }, { transform: n }], s && (i.animate2 = [{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(0,-200%,0)" }]);
533
634
  break;
534
635
  case "right":
535
- n = s ? "translate3d(0,0,0)" : "translate3d(-100%,0,0)", r = s ? "translate3d(200%,0,0)" : `translate3d(${i.clientWidth}px,0,0)`, a.animate1 = [{ transform: n }, { transform: r }], s && (a.animate2 = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(100%,0,0)" }]);
636
+ r = s ? "translate3d(0,0,0)" : "translate3d(-100%,0,0)", n = s ? "translate3d(200%,0,0)" : `translate3d(${a.clientWidth}px,0,0)`, i.animate1 = [{ transform: r }, { transform: n }], s && (i.animate2 = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(100%,0,0)" }]);
536
637
  break;
537
638
  case "bottom":
538
- n = "translate3d(0,-100%,0)", r = s ? "translate3d(0,100%,0)" : `translate3d(0,${i.clientHeight}px,0)`, a.animate1 = [{ transform: n }, { transform: r }], s && (a.animate2 = [{ transform: "translate3d(0,-200%,0)" }, { transform: "translate3d(0,0,0)" }]);
639
+ r = "translate3d(0,-100%,0)", n = s ? "translate3d(0,100%,0)" : `translate3d(0,${a.clientHeight}px,0)`, i.animate1 = [{ transform: r }, { transform: n }], s && (i.animate2 = [{ transform: "translate3d(0,-200%,0)" }, { transform: "translate3d(0,0,0)" }]);
539
640
  break;
540
641
  case "left":
541
- n = s ? "translate3d(100%,0,0)" : `translate3d(${i.clientWidth}px,0,0)`, r = "translate3d(-100%,0,0)", a.animate1 = [{ transform: n }, { transform: r }], s && (a.animate2 = [{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(-200%,0,0)" }]);
642
+ r = s ? "translate3d(100%,0,0)" : `translate3d(${a.clientWidth}px,0,0)`, n = "translate3d(-100%,0,0)", i.animate1 = [{ transform: r }, { transform: n }], s && (i.animate2 = [{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(-200%,0,0)" }]);
542
643
  break;
543
644
  }
544
645
  break;
545
646
  case "alternate":
546
647
  switch (t) {
547
648
  case "top":
548
- a.animate1 = [{ transform: `translate3d(0,calc(${i.clientHeight}px - 100%),0)` }, { transform: "translate3d(0,0,0)" }, { transform: `translate3d(0,calc(${i.clientHeight}px - 100%),0)` }];
649
+ i.animate1 = [{ transform: `translate3d(0,calc(${a.clientHeight}px - 100%),0)` }, { transform: "translate3d(0,0,0)" }, { transform: `translate3d(0,calc(${a.clientHeight}px - 100%),0)` }];
549
650
  break;
550
651
  case "right":
551
- a.animate1 = [{ transform: "translate3d(0,0,0)" }, { transform: `translate3d(calc(-100% + ${i.clientWidth}px),0,0)` }, { transform: "translate3d(0,0,0)" }];
652
+ i.animate1 = [{ transform: "translate3d(0,0,0)" }, { transform: `translate3d(calc(-100% + ${a.clientWidth}px),0,0)` }, { transform: "translate3d(0,0,0)" }];
552
653
  break;
553
654
  case "bottom":
554
- a.animate1 = [{ transform: "translate3d(0,0,0)" }, { transform: `translate3d(0,calc(${i.clientHeight}px - 100%),0)` }, { transform: "translate3d(0,0,0)" }];
655
+ i.animate1 = [{ transform: "translate3d(0,0,0)" }, { transform: `translate3d(0,calc(${a.clientHeight}px - 100%),0)` }, { transform: "translate3d(0,0,0)" }];
555
656
  break;
556
657
  case "left":
557
- a.animate1 = [{ transform: `translate3d(calc(-100% + ${i.clientWidth}px),0,0)` }, { transform: "translate3d(0,0,0)" }, { transform: `translate3d(calc(-100% + ${i.clientWidth}px),0,0)` }];
658
+ i.animate1 = [{ transform: `translate3d(calc(-100% + ${a.clientWidth}px),0,0)` }, { transform: "translate3d(0,0,0)" }, { transform: `translate3d(calc(-100% + ${a.clientWidth}px),0,0)` }];
558
659
  break;
559
660
  }
560
661
  break;
561
662
  case "endStop":
562
663
  switch (t) {
563
664
  case "top":
564
- a.animate1 = [{ transform: `translate3d(0,${i.clientHeight}px,0)` }, { transform: "translate3d(0,0,0)" }];
665
+ i.animate1 = [{ transform: `translate3d(0,${a.clientHeight}px,0)` }, { transform: "translate3d(0,0,0)" }];
565
666
  break;
566
667
  case "right":
567
- a.animate1 = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
668
+ i.animate1 = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
568
669
  break;
569
670
  case "bottom":
570
- a.animate1 = [{ transform: "translate3d(0,-100%,0)" }, { transform: `translate3d(0,calc(${i.clientHeight}px - 100%),0)` }];
671
+ i.animate1 = [{ transform: "translate3d(0,-100%,0)" }, { transform: `translate3d(0,calc(${a.clientHeight}px - 100%),0)` }];
571
672
  break;
572
673
  case "left":
573
- a.animate1 = [{ transform: `translate3d(${i.clientWidth}px,0,0)` }, { transform: `translate3d(calc(${i.clientWidth}px - 100%),0,0)` }];
674
+ i.animate1 = [{ transform: `translate3d(${a.clientWidth}px,0,0)` }, { transform: `translate3d(calc(${a.clientWidth}px - 100%),0,0)` }];
574
675
  break;
575
676
  }
576
677
  break;
577
678
  }
578
- return a;
679
+ return i;
579
680
  }
580
- function ne(i) {
681
+ function Ne(a) {
581
682
  let e;
582
683
  return function(t) {
583
- e && clearTimeout(e), e = setTimeout(i, 200, t);
684
+ e && clearTimeout(e), e = setTimeout(a, 200, t);
584
685
  };
585
686
  }
586
- var U, Ct, V, Mt, J, It, K, Ot;
587
- class fe extends HTMLElement {
687
+ var at, ee, rt, se, nt, ie, ot, ae;
688
+ class Fe extends HTMLElement {
588
689
  constructor() {
589
690
  super();
590
- d(this, U);
591
- d(this, V);
592
- d(this, J);
593
- d(this, K);
691
+ h(this, at);
692
+ h(this, rt);
693
+ h(this, nt);
694
+ h(this, ot);
594
695
  this.initialize = !1;
595
696
  }
596
697
  static get observedAttributes() {
597
698
  return [];
598
699
  }
599
- attributeChangedCallback(t, s, a) {
700
+ attributeChangedCallback(t, s, i) {
600
701
  }
601
702
  connectedCallback() {
602
- this.initialize || (this.initialize = !0, o(this, U, Ct).call(this));
703
+ this.initialize || (this.initialize = !0, o(this, at, ee).call(this));
603
704
  }
604
705
  play() {
605
706
  this.s.animation.play(), this.s.animateEl.classList.add("start"), this.s.options.continual && (this.s.cloneAnimation.play(), this.s.cloneAnimateEl.classList.add("start"));
@@ -608,76 +709,76 @@ class fe extends HTMLElement {
608
709
  this.s.animation.pause(), this.s.options.continual && this.s.cloneAnimation.pause();
609
710
  }
610
711
  }
611
- U = new WeakSet(), Ct = function() {
712
+ at = new WeakSet(), ee = function() {
612
713
  const t = {
613
- direction: this.getAttribute("direction") || y.SETTINGS.direction,
714
+ direction: this.getAttribute("direction") || E.SETTINGS.direction,
614
715
  // up / down / left / right
615
- behavior: this.getAttribute("behavior") || y.SETTINGS.behavior,
716
+ behavior: this.getAttribute("behavior") || E.SETTINGS.behavior,
616
717
  // normal / alternate / endStop
617
- duration: Number(this.getAttribute("duration")) || y.SETTINGS.duration,
718
+ duration: Number(this.getAttribute("duration")) || E.SETTINGS.duration,
618
719
  // ms
619
- durationBreakpoints: D(this) || y.SETTINGS.durationBreakpoints,
620
- autoplay: this.getAttribute("autoplay") || y.SETTINGS.autoplay,
720
+ durationBreakpoints: P(this) || E.SETTINGS.durationBreakpoints,
721
+ autoplay: this.getAttribute("autoplay") || E.SETTINGS.autoplay,
621
722
  // normal / alternate / endStop
622
- pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : y.SETTINGS.pauseOnMouseenter,
723
+ pauseOnMouseenter: this.getAttribute("pauseOnMouseEnter") ? this.getAttribute("pauseOnMouseEnter") === "true" : E.SETTINGS.pauseOnMouseenter,
623
724
  // true / false
624
- continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : y.SETTINGS.continual,
725
+ continual: this.getAttribute("continual") ? this.getAttribute("continual") === "true" : E.SETTINGS.continual,
625
726
  // true / false
626
- gap: Number(this.getAttribute("gap")) || y.SETTINGS.gap
727
+ gap: Number(this.getAttribute("gap")) || E.SETTINGS.gap
627
728
  };
628
- this.s = {}, this.s.options = t, this.s.nowDuration = yt(this), re(this), o(this, V, Mt).call(this);
629
- }, V = new WeakSet(), Mt = function() {
630
- const { direction: t, continual: s, gap: a } = this.s.options;
729
+ this.s = {}, this.s.options = t, this.s.nowDuration = Bt(this), Oe(this), o(this, rt, se).call(this);
730
+ }, rt = new WeakSet(), se = function() {
731
+ const { direction: t, continual: s, gap: i } = this.s.options;
631
732
  switch (t) {
632
733
  case "left":
633
734
  case "right":
634
- this.style.cssText = `--continual-gap: ${a}px;`;
735
+ this.style.cssText = `--continual-gap: ${i}px;`;
635
736
  break;
636
737
  case "top":
637
738
  case "bottom":
638
- s ? this.style.cssText = `height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${a}px;` : this.style.cssText = `min-height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${a}px;`;
739
+ s ? this.style.cssText = `height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${i}px;` : this.style.cssText = `min-height: ${this.s.animateEl.clientHeight}px;--continual-gap: ${i}px;`;
639
740
  break;
640
741
  }
641
- o(this, J, It).call(this), o(this, K, Ot).call(this), s && this.classList.add("continual"), this.classList.add("m4-initialize");
642
- }, J = new WeakSet(), It = function() {
643
- const t = this, { direction: s, behavior: a, duration: n, autoplay: r, pauseOnMouseenter: l, continual: p } = t.s.options;
644
- let c;
645
- function h() {
646
- switch (a) {
742
+ o(this, nt, ie).call(this), o(this, ot, ae).call(this), s && this.classList.add("continual"), this.classList.add("m4-initialize");
743
+ }, nt = new WeakSet(), ie = function() {
744
+ const t = this, { direction: s, behavior: i, duration: r, autoplay: n, pauseOnMouseenter: l, continual: u } = t.s.options;
745
+ let p;
746
+ function d() {
747
+ switch (i) {
647
748
  case "normal":
648
- t.s.animateEl.style.transform = `${v(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(v(t).animate1, {
749
+ t.s.animateEl.style.transform = `${y(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(y(t).animate1, {
649
750
  duration: t.s.nowDuration,
650
751
  iterations: 1 / 0
651
- }), p && (t.s.cloneAnimateEl.style.transform = `${v(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(v(t).animate2, {
752
+ }), u && (t.s.cloneAnimateEl.style.transform = `${y(t).animate2[0].transform}`, t.s.cloneAnimation = t.s.cloneAnimateEl.animate(y(t).animate2, {
652
753
  duration: t.s.nowDuration,
653
754
  delay: -t.s.nowDuration / 2,
654
755
  iterations: 1 / 0
655
756
  }));
656
757
  break;
657
758
  case "alternate":
658
- let b = function() {
659
- let m = [];
759
+ let f = function() {
760
+ let v = [];
660
761
  switch (s) {
661
762
  case "top":
662
- u = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), f = parseInt(t.s.nowDuration / (u * 2)) * t.s.animateEl.scrollHeight, m = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
763
+ c = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), m = parseInt(t.s.nowDuration / (c * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: `translate3d(0,${t.clientHeight}px,0)` }, { transform: `translate3d(0,calc(${t.clientHeight}px - 100%),0)` }];
663
764
  break;
664
765
  case "right":
665
- u = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), f = parseInt(t.s.nowDuration / (u * 2)) * t.s.animateEl.scrollWidth, m = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
766
+ c = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), m = parseInt(t.s.nowDuration / (c * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: "translate3d(-100%,0,0)" }, { transform: "translate3d(0,0,0)" }];
666
767
  break;
667
768
  case "bottom":
668
- u = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), f = parseInt(n / (u * 2)) * t.s.animateEl.scrollHeight, m = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
769
+ c = Math.abs(t.s.animateEl.scrollHeight - t.clientHeight), m = parseInt(r / (c * 2)) * t.s.animateEl.scrollHeight, v = [{ transform: "translate3d(0,-100%,0)" }, { transform: "translate3d(0,0,0)" }];
669
770
  break;
670
771
  case "left":
671
- u = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), f = parseInt(n / (u * 2)) * t.s.animateEl.scrollWidth, m = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
772
+ c = Math.abs(t.s.animateEl.scrollWidth - t.clientWidth), m = parseInt(r / (c * 2)) * t.s.animateEl.scrollWidth, v = [{ transform: `translate3d(${t.clientWidth}px,0,0)` }, { transform: `translate3d(calc(-100% + ${t.clientWidth}px),0,0)` }];
672
773
  break;
673
774
  }
674
- return m;
675
- }, u, f;
676
- (t.clientHeight > t.s.animateEl.scrollHeight || s === "left" || s === "right") && (t.s.animateEl.style.transform = `${b()[0].transform}`, t.s.animateEl.animate(b(), {
677
- duration: f,
775
+ return v;
776
+ }, c, m;
777
+ (t.clientHeight > t.s.animateEl.scrollHeight || s === "left" || s === "right") && (t.s.animateEl.style.transform = `${f()[0].transform}`, t.s.animateEl.animate(f(), {
778
+ duration: m,
678
779
  fill: "forwards"
679
780
  }).finished.then(() => {
680
- t.s.animation = t.s.animateEl.animate(v(t).animate1, {
781
+ t.s.animation = t.s.animateEl.animate(y(t).animate1, {
681
782
  duration: t.s.nowDuration,
682
783
  iterations: 1 / 0
683
784
  });
@@ -686,102 +787,102 @@ U = new WeakSet(), Ct = function() {
686
787
  });
687
788
  break;
688
789
  case "endStop":
689
- t.s.animateEl.style.transform = `${v(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(v(t).animate1, {
790
+ t.s.animateEl.style.transform = `${y(t).animate1[0].transform}`, t.s.animation = t.s.animateEl.animate(y(t).animate1, {
690
791
  duration: t.s.nowDuration,
691
792
  fill: "forwards"
692
793
  });
693
794
  break;
694
795
  }
695
- t.s.animateEl.classList.add("start"), r === !1 && (t.s.animateEl.classList.remove("start"), t.s.animation.cancel());
796
+ t.s.animateEl.classList.add("start"), n === !1 && (t.s.animateEl.classList.remove("start"), t.s.animation.cancel());
696
797
  }
697
- clearTimeout(c), c = setTimeout(
798
+ clearTimeout(p), p = setTimeout(
698
799
  () => {
699
- h();
800
+ d();
700
801
  },
701
- r || 0
802
+ n || 0
702
803
  ), t.addEventListener("mouseenter", function() {
703
804
  t.s.animation && l && t.s.animation.playState === "running" && t.pause();
704
805
  }), t.addEventListener("mouseleave", function() {
705
806
  t.s.animation && l && t.s.animation.playState === "paused" && t.play();
706
807
  });
707
- }, K = new WeakSet(), Ot = function() {
808
+ }, ot = new WeakSet(), ae = function() {
708
809
  const t = this;
709
810
  function s() {
710
- const a = t.s.animation.startTime, n = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
711
- t.s.nowDuration = yt(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(v(t).animate1, {
811
+ const i = t.s.animation.startTime, r = t.s.cloneAnimation ? t.s.cloneAnimation.startTime : null;
812
+ t.s.nowDuration = Bt(t), t.s.animation.cancel(), t.s.cloneAnimation && t.s.cloneAnimation.cancel(), t.s.animation = t.s.animateEl.animate(y(t).animate1, {
712
813
  duration: t.s.nowDuration,
713
814
  iterations: 1 / 0
714
- }), t.s.animation.startTime = a, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(v(t).animate2, {
815
+ }), t.s.animation.startTime = i, t.s.cloneAnimation && (t.s.cloneAnimation = t.s.cloneAnimateEl.animate(y(t).animate2, {
715
816
  duration: t.s.nowDuration,
716
817
  delay: -t.s.nowDuration / 2,
717
818
  iterations: 1 / 0
718
- }), t.s.cloneAnimation.startTime = n);
819
+ }), t.s.cloneAnimation.startTime = r);
719
820
  }
720
- window.addEventListener("resize", ne(s));
821
+ window.addEventListener("resize", Ne(s));
721
822
  };
722
- const j = function(i) {
823
+ const F = function(a) {
723
824
  let e;
724
825
  return function(t) {
725
- e && clearTimeout(e), e = setTimeout(i, 200, t);
826
+ e && clearTimeout(e), e = setTimeout(a, 200, t);
726
827
  };
727
- }, E = (i, e) => {
728
- if (bt(i)) {
729
- i.forEach((t) => {
828
+ }, $ = (a, e) => {
829
+ if (j(a)) {
830
+ a.forEach((t) => {
730
831
  t.classList.add(e);
731
832
  });
732
833
  return;
733
834
  }
734
- i.classList.add(e);
735
- }, w = (i, e) => {
736
- if (bt(i)) {
737
- i.forEach((t) => {
835
+ a.classList.add(e);
836
+ }, w = (a, e) => {
837
+ if (j(a)) {
838
+ a.forEach((t) => {
738
839
  t.classList.remove(e);
739
840
  });
740
841
  return;
741
842
  }
742
- i.classList.remove(e);
843
+ a.classList.remove(e);
743
844
  };
744
- var Y, Ht, Q, Dt, Z, Nt, C, ht, k, N, tt, _t;
745
- class Et {
845
+ var lt, re, ct, ne, dt, oe, H, Ct, k, G, ut, le;
846
+ class Rt {
746
847
  constructor(e) {
747
848
  // 初始化
748
- d(this, Y);
849
+ h(this, lt);
749
850
  // 左右箭頭事件綁定
750
- d(this, Q);
851
+ h(this, ct);
751
852
  // 左右拖拉事件綁定
752
- d(this, Z);
853
+ h(this, dt);
753
854
  // 卷軸位置判斷
754
- d(this, C);
855
+ h(this, H);
755
856
  // 隱藏按鈕判斷
756
- d(this, k);
857
+ h(this, k);
757
858
  // 選項事件綁定
758
- d(this, tt);
759
- this.$element = e, this.option = e.s.option.drag, o(this, Y, Ht).call(this);
859
+ h(this, ut);
860
+ this.$element = e, this.option = e.s.option.drag, o(this, lt, re).call(this);
760
861
  }
761
862
  // 更新 active 位置
762
863
  update(e) {
763
864
  const t = e.querySelector(".wrapper"), s = t == null ? void 0 : t.querySelector(".active");
764
865
  if (s) {
765
- const a = s.offsetLeft + s.getBoundingClientRect().width / 2 - t.getBoundingClientRect().width / 2;
866
+ const i = s.offsetLeft + s.getBoundingClientRect().width / 2 - t.getBoundingClientRect().width / 2;
766
867
  t.scrollTo({
767
- left: a,
868
+ left: i,
768
869
  behavior: "smooth"
769
870
  });
770
871
  }
771
872
  }
772
873
  }
773
- Y = new WeakSet(), Ht = function() {
774
- var s, a, n, r, l, p;
874
+ lt = new WeakSet(), re = function() {
875
+ var s, i, r, n, l, u;
775
876
  const e = this;
776
877
  if (!e.$element)
777
878
  return;
778
879
  e.$container = e.$element.querySelector(".drag-container"), e.$wrapper = e.$container.querySelector(".wrapper");
779
880
  const t = () => {
780
- var c, h;
781
- o(c = e, C, ht).call(c), o(h = e, k, N).call(h);
881
+ var p, d;
882
+ o(p = e, H, Ct).call(p), o(d = e, k, G).call(d);
782
883
  };
783
- e.$wrapper.removeEventListener("scroll", t), e.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", j(t)), window.addEventListener("resize", j(t)), (e.option.draggable || e.$element.s.type == "collapse") && o(s = e, Z, Nt).call(s), e.option.navigation && e.$element.s.type !== "collapse" && (e.$container.insertAdjacentHTML(
784
- A.prepend,
884
+ e.$wrapper.removeEventListener("scroll", t), e.$wrapper.addEventListener("scroll", t), window.removeEventListener("resize", F(t)), window.addEventListener("resize", F(t)), (e.option.draggable || e.$element.s.type == "collapse") && o(s = e, dt, oe).call(s), e.option.navigation && e.$element.s.type !== "collapse" && (e.$container.insertAdjacentHTML(
885
+ g.prepend,
785
886
  `<div class="navigation">
786
887
  <div class="button prev">
787
888
  <div></div>
@@ -790,234 +891,284 @@ Y = new WeakSet(), Ht = function() {
790
891
  <div></div>
791
892
  </div>
792
893
  </div>`
793
- ), e.$button = (a = e.$container) == null ? void 0 : a.querySelectorAll(".button"), o(n = e, Q, Dt).call(n)), o(r = e, C, ht).call(r), o(l = e, k, N).call(l), o(p = e, tt, _t).call(p);
794
- }, Q = new WeakSet(), Dt = function() {
795
- const e = this, { $wrapper: t, $button: s } = e, a = function() {
796
- const n = this.classList.contains("next"), r = parseInt(t.getBoundingClientRect().width * 0.7);
894
+ ), e.$button = (i = e.$container) == null ? void 0 : i.querySelectorAll(".button"), o(r = e, ct, ne).call(r)), o(n = e, H, Ct).call(n), o(l = e, k, G).call(l), o(u = e, ut, le).call(u);
895
+ }, ct = new WeakSet(), ne = function() {
896
+ const e = this, { $wrapper: t, $button: s } = e, i = function() {
897
+ const r = this.classList.contains("next"), n = parseInt(t.getBoundingClientRect().width * 0.7);
797
898
  t.scrollTo({
798
- left: n ? t.scrollLeft + r : t.scrollLeft - r,
899
+ left: r ? t.scrollLeft + n : t.scrollLeft - n,
799
900
  behavior: "smooth"
800
901
  }), setTimeout(() => {
801
902
  var l;
802
- o(l = e, k, N).call(l);
903
+ o(l = e, k, G).call(l);
803
904
  }, 100);
804
905
  };
805
- s.forEach((n) => {
806
- n.removeEventListener("click", a), n.addEventListener("click", a);
906
+ s.forEach((r) => {
907
+ r.removeEventListener("click", i), r.addEventListener("click", i);
807
908
  });
808
- }, Z = new WeakSet(), Nt = function() {
909
+ }, dt = new WeakSet(), oe = function() {
809
910
  const { $wrapper: e } = this;
810
- let t = !1, s = !1, a = 0, n = 0;
811
- const r = function(u) {
812
- u.preventDefault(), s = !1, t = !0, a = u.pageX - e.offsetLeft, n = e.scrollLeft;
911
+ let t = !1, s = !1, i = 0, r = 0;
912
+ const n = function(c) {
913
+ c.preventDefault(), s = !1, t = !0, i = c.pageX - e.offsetLeft, r = e.scrollLeft;
813
914
  };
814
- e.removeEventListener("mousedown", r), e.addEventListener("mousedown", r);
915
+ e.removeEventListener("mousedown", n), e.addEventListener("mousedown", n);
815
916
  const l = function() {
816
917
  s = !1, t = !1;
817
918
  };
818
919
  e.removeEventListener("mouseleave", l), e.addEventListener("mouseleave", l);
819
- const p = function(u) {
820
- u.preventDefault(), t = !1;
920
+ const u = function(c) {
921
+ c.preventDefault(), t = !1;
821
922
  };
822
- e.removeEventListener("mouseup", p), e.addEventListener("mouseup", p);
823
- const c = function(u) {
824
- if (u.preventDefault(), s = !0, !t)
923
+ e.removeEventListener("mouseup", u), e.addEventListener("mouseup", u);
924
+ const p = function(c) {
925
+ if (c.preventDefault(), s = !0, !t)
825
926
  return;
826
- const b = u.pageX - e.offsetLeft - a;
927
+ const f = c.pageX - e.offsetLeft - i;
827
928
  e.scrollTo({
828
- left: n - b
929
+ left: r - f
829
930
  });
830
931
  };
831
- e.removeEventListener("mousemove", c), e.addEventListener("mousemove", c);
832
- const h = function(u) {
833
- s && (u.preventDefault(), u.stopPropagation());
932
+ e.removeEventListener("mousemove", p), e.addEventListener("mousemove", p);
933
+ const d = function(c) {
934
+ s && (c.preventDefault(), c.stopPropagation());
834
935
  };
835
- e.querySelectorAll("a").forEach((u) => {
836
- u.removeEventListener("click", h), u.addEventListener("click", h);
936
+ e.querySelectorAll("a").forEach((c) => {
937
+ c.removeEventListener("click", d), c.addEventListener("click", d);
837
938
  });
838
- }, C = new WeakSet(), ht = function() {
839
- const { $container: e, $wrapper: t } = this, s = t.scrollWidth - t.clientWidth, a = t.scrollLeft;
840
- s <= 0 || (E(e, "scrollable"), a == 0 ? (w(e, "scrollable"), E(t, "start"), w(t, "end")) : a >= s ? (w(e, "scrollable"), w(t, "start"), E(t, "end")) : (E(t, "center"), w(t, "start"), w(t, "end")));
841
- }, k = new WeakSet(), N = function() {
939
+ }, H = new WeakSet(), Ct = function() {
940
+ const { $container: e, $wrapper: t } = this, s = t.scrollWidth - t.clientWidth, i = t.scrollLeft;
941
+ s <= 0 || ($(e, "scrollable"), i == 0 ? (w(e, "scrollable"), $(t, "start"), w(t, "end")) : i >= s ? (w(e, "scrollable"), w(t, "start"), $(t, "end")) : ($(t, "center"), w(t, "start"), w(t, "end")));
942
+ }, k = new WeakSet(), G = function() {
842
943
  const { $wrapper: e, $button: t, $element: s } = this;
843
944
  if (!t)
844
945
  return;
845
- const a = e.scrollWidth - e.clientWidth, n = e.scrollLeft;
846
- if (a <= 0) {
847
- E(t, "hide"), E(s, "noScrollable");
946
+ const i = e.scrollWidth - e.clientWidth, r = e.scrollLeft;
947
+ if (i <= 0) {
948
+ $(t, "hide"), $(s, "noScrollable");
848
949
  return;
849
950
  }
850
- n == 0 ? t.forEach((r) => {
851
- if (r.classList.contains("next")) {
852
- w(r, "hide");
951
+ r == 0 ? t.forEach((n) => {
952
+ if (n.classList.contains("next")) {
953
+ w(n, "hide");
853
954
  return;
854
955
  }
855
- E(r, "hide");
856
- }) : n >= a ? t.forEach((r) => {
857
- if (r.classList.contains("next")) {
858
- E(r, "hide");
956
+ $(n, "hide");
957
+ }) : r >= i ? t.forEach((n) => {
958
+ if (n.classList.contains("next")) {
959
+ $(n, "hide");
859
960
  return;
860
961
  }
861
- w(r, "hide");
962
+ w(n, "hide");
862
963
  }) : w(t, "hide");
863
- }, tt = new WeakSet(), _t = function() {
864
- const { $element: e } = this, t = (a) => {
964
+ }, ut = new WeakSet(), le = function() {
965
+ const { $element: e } = this, t = (i) => {
865
966
  if (this.option.selected) {
866
- const n = a.getAttribute("data-option").trim();
867
- e.setAttribute("m4-status", n);
967
+ const r = i.getAttribute("data-option").trim();
968
+ e.setAttribute("m4-status", r);
868
969
  }
869
970
  };
870
971
  function s() {
871
972
  t(this);
872
973
  }
873
- this.$container.querySelectorAll(".item").forEach((a) => {
874
- a.removeEventListener("click", s), a.addEventListener("click", s);
974
+ this.$container.querySelectorAll(".item").forEach((i) => {
975
+ i.removeEventListener("click", s), i.addEventListener("click", s);
875
976
  });
876
977
  };
877
- var et, jt, st, Bt, it, Xt, at, Rt;
878
- class oe {
978
+ var pt, ce, ht, de, mt, ue, ft, pe;
979
+ class je {
879
980
  constructor(e) {
880
981
  // 初始化
881
- d(this, et);
982
+ h(this, pt);
882
983
  // 隱藏按鈕判斷
883
- d(this, st);
984
+ h(this, ht);
884
985
  // 展開箭頭事件綁定
885
- d(this, it);
986
+ h(this, mt);
886
987
  // 選項事件綁定
887
- d(this, at);
888
- this.$element = e, this.option = e.s.option.collapse, o(this, et, jt).call(this);
988
+ h(this, ft);
989
+ this.$element = e, this.option = e.s.option.collapse, o(this, pt, ce).call(this);
889
990
  }
890
991
  }
891
- et = new WeakSet(), jt = function() {
892
- this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), o(this, st, Bt).call(this) && o(this, it, Xt).call(this), o(this, at, Rt).call(this));
893
- }, st = new WeakSet(), Bt = function() {
992
+ pt = new WeakSet(), ce = function() {
993
+ this.$element && (this.$container = this.$element.querySelector(".collapse-container"), this.$wrapper = this.$container.querySelector(".wrapper"), o(this, ht, de).call(this) && o(this, mt, ue).call(this), o(this, ft, pe).call(this));
994
+ }, ht = new WeakSet(), de = function() {
894
995
  const e = this.$element.querySelector(".drag-container"), t = e.querySelector(".wrapper");
895
- return t.scrollWidth - t.clientWidth > 0 ? (e.insertAdjacentHTML(A.append, '<div class="open-collapse"></div>'), this.$button = e.querySelector(".open-collapse"), !0) : !1;
896
- }, it = new WeakSet(), Xt = function() {
996
+ return t.scrollWidth - t.clientWidth > 0 ? (e.insertAdjacentHTML(g.append, '<div class="open-collapse"></div>'), this.$button = e.querySelector(".open-collapse"), !0) : !1;
997
+ }, mt = new WeakSet(), ue = function() {
897
998
  const { $element: e, $button: t } = this, s = function() {
898
999
  e.classList.contains("expand") ? e.classList.remove("expand") : e.classList.add("expand");
899
1000
  };
900
1001
  t.removeEventListener("click", s), t.addEventListener("click", s);
901
- }, at = new WeakSet(), Rt = function() {
902
- const { $element: e } = this, t = (a, n) => {
1002
+ }, ft = new WeakSet(), pe = function() {
1003
+ const { $element: e } = this, t = (i, r) => {
903
1004
  if (e != null && e.classList.contains("expand") ? e == null || e.classList.remove("expand") : e == null || e.classList.add("expand"), this.option.selected) {
904
- const r = a.getAttribute("data-option").trim();
905
- e.setAttribute("m4-status", r);
1005
+ const n = i.getAttribute("data-option").trim();
1006
+ e.setAttribute("m4-status", n);
906
1007
  }
907
1008
  };
908
1009
  function s() {
909
1010
  t(this);
910
1011
  }
911
- this.$container.querySelectorAll(".item").forEach((a) => {
912
- a.removeEventListener("click", s), a.addEventListener("click", s);
1012
+ this.$container.querySelectorAll(".item").forEach((i) => {
1013
+ i.removeEventListener("click", s), i.addEventListener("click", s);
913
1014
  });
914
1015
  };
915
- const le = (i) => {
916
- const { type: e, option: t, originalDomString: s } = i.s, a = document.createElement("div");
917
- return e == "drag" && (a.innerHTML = $.TEMPLATE[e]().trim(), a.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, s)), e == "collapse" && (a.innerHTML = $.TEMPLATE[e](t == null ? void 0 : t.collapse).trim(), a.querySelector(".drag-container .wrapper").insertAdjacentHTML(A.append, s), a.querySelector(".collapse-container .wrapper").insertAdjacentHTML(A.append, s)), e == "dropdown" && (a.innerHTML = $.TEMPLATE[e](t == null ? void 0 : t.dropdown).trim(), a.querySelector("dropdown-el").insertAdjacentHTML(A.append, s)), a.children;
1016
+ const De = (a) => {
1017
+ const { type: e, option: t, originalDomString: s } = a.s, i = document.createElement("div");
1018
+ return e == "drag" && (i.innerHTML = A.TEMPLATE[e]().trim(), i.querySelector(".drag-container .wrapper").insertAdjacentHTML(g.append, s)), e == "collapse" && (i.innerHTML = A.TEMPLATE[e](t == null ? void 0 : t.collapse).trim(), i.querySelector(".drag-container .wrapper").insertAdjacentHTML(g.append, s), i.querySelector(".collapse-container .wrapper").insertAdjacentHTML(g.append, s)), e == "dropdown" && (i.innerHTML = A.TEMPLATE[e](t == null ? void 0 : t.dropdown).trim(), i.querySelector("dropdown-el").insertAdjacentHTML(g.append, s)), i.children;
918
1019
  };
919
- var rt, Gt, nt, Pt, M, ft, T, _;
920
- class be extends HTMLElement {
1020
+ var vt, he, gt, me, I, Wt, q, z;
1021
+ class Ve extends HTMLElement {
921
1022
  constructor() {
922
1023
  super();
923
- d(this, rt);
924
- d(this, nt);
1024
+ h(this, vt);
1025
+ h(this, gt);
925
1026
  // 斷點設定
926
- d(this, M);
1027
+ h(this, I);
927
1028
  // check type
928
- d(this, T);
1029
+ h(this, q);
929
1030
  this.initialize = !1, this.__events__ = {}, this.s = {}, this.s.originalDomString = this.innerHTML.trim().replace(/\n/g, ""), this.previousWidth = window.innerWidth;
930
1031
  }
931
1032
  static get observedAttributes() {
932
1033
  return ["m4-type", "m4-status"];
933
1034
  }
934
- attributeChangedCallback(t, s, a) {
935
- var n, r, l;
1035
+ attributeChangedCallback(t, s, i) {
1036
+ var r, n, l;
936
1037
  switch (t) {
937
1038
  case "m4-type":
938
- if (s === null || s === a)
1039
+ if (s === null || s === i)
939
1040
  return;
940
- this.s.type = a, o(this, T, _).call(this);
1041
+ this.s.type = i, o(this, q, z).call(this);
941
1042
  break;
942
1043
  case "m4-status":
943
- if (s === a)
1044
+ if (s === i)
944
1045
  return;
945
- const p = this.getAttribute("m4-type");
946
- if (p !== "drag" && p !== "collapse")
1046
+ const u = this.getAttribute("m4-type");
1047
+ if (u !== "drag" && u !== "collapse")
947
1048
  return;
948
- this.querySelectorAll(".drag-container .item").forEach((c) => {
949
- c.classList.remove("active");
950
- }), (n = this.querySelector(`.drag-container .item[data-option="${a}"]`)) == null || n.classList.add("active"), p === "collapse" && (this.querySelectorAll(".collapse-container .item").forEach((c) => {
951
- c.classList.remove("active");
952
- }), (r = this.querySelector(`.collapse-container .item[data-option="${a}"]`)) == null || r.classList.add("active")), (l = this.constructor.drag) == null || l.update(this);
1049
+ this.querySelectorAll(".drag-container .item").forEach((p) => {
1050
+ p.classList.remove("active");
1051
+ }), (r = this.querySelector(`.drag-container .item[data-option="${i}"]`)) == null || r.classList.add("active"), u === "collapse" && (this.querySelectorAll(".collapse-container .item").forEach((p) => {
1052
+ p.classList.remove("active");
1053
+ }), (n = this.querySelector(`.collapse-container .item[data-option="${i}"]`)) == null || n.classList.add("active")), (l = this.constructor.drag) == null || l.update(this);
953
1054
  break;
954
1055
  }
955
1056
  }
956
1057
  connectedCallback() {
957
- this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, o(this, rt, Gt).call(this));
1058
+ this.initialize || this.classList.contains("m4-init") || (this.initialize = !0, o(this, vt, he).call(this));
958
1059
  }
959
1060
  update() {
960
- o(this, M, ft).call(this);
1061
+ o(this, I, Wt).call(this);
961
1062
  }
962
1063
  }
963
- rt = new WeakSet(), Gt = function() {
1064
+ vt = new WeakSet(), he = function() {
964
1065
  let t = {};
965
- this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? $.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
966
- const s = (a) => {
967
- if (a.type === "resize") {
1066
+ this.hasAttribute("m4-value") || this.setAttribute("m4-value", ""), this.s.type = this.getAttribute("m4-type") ?? A.SETTINGS.type, this.hasAttribute("m4-option") && (t = this.getAttribute("m4-option") ? JSON.parse(this.getAttribute("m4-option")) : {}, this.removeAttribute("m4-option"));
1067
+ const s = (i) => {
1068
+ if (i.type === "resize") {
968
1069
  if (window.innerWidth === this.previousWidth)
969
1070
  return;
970
1071
  this.previousWidth = window.innerWidth;
971
1072
  }
972
1073
  this.update();
973
1074
  };
974
- window.removeEventListener("resize", j(s)), window.addEventListener("resize", j(s)), this.s.option = {}, this.s.option.drag = Object.assign({}, $.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, $.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, $.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, $.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), o(this, nt, Pt).call(this);
975
- }, nt = new WeakSet(), Pt = function() {
976
- this.classList.add("m4-init"), o(this, M, ft).call(this);
977
- }, M = new WeakSet(), ft = function() {
1075
+ window.removeEventListener("resize", F(s)), window.addEventListener("resize", F(s)), this.s.option = {}, this.s.option.drag = Object.assign({}, A.SETTINGS.drag, t == null ? void 0 : t.drag), this.s.option.collapse = Object.assign({}, A.SETTINGS.collapse, t == null ? void 0 : t.collapse), this.s.option.dropdown = Object.assign({}, A.SETTINGS.dropdown, t == null ? void 0 : t.dropdown), this.s.option.breakpoint = Object.assign({}, A.SETTINGS.breakpoint, t == null ? void 0 : t.breakpoint), o(this, gt, me).call(this);
1076
+ }, gt = new WeakSet(), me = function() {
1077
+ this.classList.add("m4-init"), o(this, I, Wt).call(this);
1078
+ }, I = new WeakSet(), Wt = function() {
978
1079
  const t = Object.keys(this.s.option.breakpoint);
979
1080
  if (!t.length) {
980
- o(this, T, _).call(this);
1081
+ o(this, q, z).call(this);
981
1082
  return;
982
1083
  }
983
- t.map((s) => Number(s)).sort((s, a) => a - s).some((s) => {
984
- var a, n, r, l;
985
- return window.innerWidth >= s && (this.s.type = (a = this.s.option.breakpoint[s]) == null ? void 0 : a.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (n = this.s.option.breakpoint[s]) == null ? void 0 : n.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (r = this.s.option.breakpoint[s]) == null ? void 0 : r.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (l = this.s.option.breakpoint[s]) == null ? void 0 : l.dropdown)), o(this, T, _).call(this), window.innerWidth >= s;
1084
+ t.map((s) => Number(s)).sort((s, i) => i - s).some((s) => {
1085
+ var i, r, n, l;
1086
+ return window.innerWidth >= s && (this.s.type = (i = this.s.option.breakpoint[s]) == null ? void 0 : i.type, this.setAttribute("m4-type", this.s.type), this.s.option.drag = Object.assign({}, this.s.option.drag, (r = this.s.option.breakpoint[s]) == null ? void 0 : r.drag), this.s.option.collapse = Object.assign({}, this.s.option.collapse, (n = this.s.option.breakpoint[s]) == null ? void 0 : n.collapse), this.s.option.dropdown = Object.assign({}, this.s.option.dropdown, (l = this.s.option.breakpoint[s]) == null ? void 0 : l.dropdown)), o(this, q, z).call(this), window.innerWidth >= s;
986
1087
  });
987
- }, T = new WeakSet(), _ = function() {
988
- var n;
1088
+ }, q = new WeakSet(), z = function() {
1089
+ var r;
989
1090
  const { type: t } = this.s;
990
- this.innerHTML = "", [...le(this)].forEach((r) => {
991
- this.append(r);
1091
+ this.innerHTML = "", [...De(this)].forEach((n) => {
1092
+ this.append(n);
992
1093
  });
993
- const s = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), a = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
994
- switch (s == null || s.classList.add("active"), a == null || a.classList.add("active"), t) {
1094
+ const s = this.querySelector(`.drag-container .item[data-option="${this.getAttribute("m4-status")}"]`), i = this.querySelector(`.collapse-container .item[data-option="${this.getAttribute("m4-status")}"]`);
1095
+ switch (s == null || s.classList.add("active"), i == null || i.classList.add("active"), t) {
995
1096
  case "drag":
996
- this.constructor.drag = new Et(this);
1097
+ this.constructor.drag = new Rt(this);
997
1098
  break;
998
1099
  case "collapse":
999
- this.constructor.drag = new Et(this), this.constructor.collapse = new oe(this);
1100
+ this.constructor.drag = new Rt(this), this.constructor.collapse = new je(this);
1000
1101
  break;
1001
1102
  }
1002
- (n = this.constructor.drag) == null || n.update(this);
1103
+ (r = this.constructor.drag) == null || r.update(this);
1104
+ };
1105
+ const Xt = (a) => {
1106
+ const { defaultOptions: e } = a.collapse, { collapseClass: t, target: s, transition: i } = e, r = a.querySelector(s);
1107
+ a.classList.add(t), r.style.height = 0, r.style["transition-property"] = i.property, r.style["transition-duration"] = i.duration, r.style["transition-timing-function"] = i.function, r.style["transition-delay"] = i.delay, r.style.overflow = "hidden";
1108
+ }, Be = (a) => {
1109
+ const { defaultOptions: e } = a.collapse, { collapseClass: t, target: s, transition: i } = e, r = a.querySelector(s), n = r.children[0].offsetHeight;
1110
+ a.collapse.height = n, a.classList.remove(t), r.style.display = "block", r.style.height = `${n}px`, r.style["transition-property"] = i.property, r.style["transition-duration"] = i.duration, r.style["transition-timing-function"] = i.function, r.style["transition-delay"] = i.delay, r.style.overflow = "hidden";
1111
+ };
1112
+ var O, Mt, bt, fe, yt, ve, N, Ht;
1113
+ class Ye extends Pt {
1114
+ constructor(t, s = {}) {
1115
+ super();
1116
+ h(this, O);
1117
+ h(this, bt);
1118
+ h(this, yt);
1119
+ h(this, N);
1120
+ !(!wt(t) && !Gt(t) && !j(t) && !U(t)) && (this.__storage__ = {
1121
+ el: t,
1122
+ options: s
1123
+ }, o(this, O, Mt).call(this));
1124
+ }
1125
+ update() {
1126
+ o(this, O, Mt).call(this);
1127
+ }
1128
+ }
1129
+ O = new WeakSet(), Mt = function() {
1130
+ const { el: t, options: s } = this.__storage__, { SETTINGS: i, EVENTS: r } = xe;
1131
+ if (this.elements = Et(t), this.options = Object.assign({}, i, s), this.__events__ = Object.assign({}, r), this.options.on)
1132
+ for (const [n, l] of Object.entries(this.options.on))
1133
+ this.__events__[n] = [l];
1134
+ o(this, bt, fe).call(this);
1135
+ }, bt = new WeakSet(), fe = function() {
1136
+ const { elements: t, options: s } = this;
1137
+ t.forEach((i) => {
1138
+ i.collapse = {}, i.collapse.instance = this, i.collapse.defaultOptions = s, i.collapse.methods = {}, i.collapse.methods.update = this.update, o(this, yt, ve).call(this, i);
1139
+ }), this.emit("init");
1140
+ }, yt = new WeakSet(), ve = function(t) {
1141
+ const { options: s } = this, { collapseClass: i, block: r, target: n, defaultOpen: l, targetStopPropagation: u, defaultActiveMark: p } = s, d = t, c = d.querySelector(n);
1142
+ if (d.collapse.height = c.children[0].offsetHeight, l ? (c.style.height = `${c.children[0].offsetHeight}px`, d.classList.remove(i)) : !d.classList.contains(p) && !d.hasAttribute(p) ? (d.classList.add(i), c.style.height = "0px", c.style.overflow = "hidden") : (c.style.height = `${c.children[0].offsetHeight}px`, d.classList.remove(i)), d.removeEventListener("click", o(this, N, Ht)), d.addEventListener("click", o(this, N, Ht)), u) {
1143
+ const m = (f) => {
1144
+ f.stopPropagation();
1145
+ };
1146
+ c.removeEventListener("click", m), c.addEventListener("click", m);
1147
+ }
1148
+ }, N = new WeakSet(), Ht = function() {
1149
+ const { instance: t, defaultOptions: s } = this.collapse, { collapseClass: i, block: r, target: n, single: l } = s, u = this;
1150
+ u.classList.contains(i) ? (l && u.parentNode.querySelectorAll(`.${u.classList[0]}`).forEach((p) => {
1151
+ Xt(p);
1152
+ }), Be(u)) : Xt(u), t.emit("afterCollapse");
1003
1153
  };
1004
1154
  export {
1005
- we as Anchor4,
1006
- ye as Aost4,
1007
- pe as Article4,
1008
- me as CategorySlider,
1009
- Ee as Collapse4,
1010
- $e as Configs,
1011
- ue as Detect4,
1012
- Le as Dropdown4,
1013
- Ae as ImagePreview,
1014
- Se as ImageValidate,
1015
- fe as Marquee4,
1016
- xe as Modal4,
1017
- be as Multipurpose4,
1018
- ke as Ripple4,
1019
- he as Share4,
1020
- Te as Tab4,
1021
- Ut as Video4
1155
+ Qe as Anchor4,
1156
+ Ze as Aost4,
1157
+ Ge as Article4,
1158
+ ze as CategorySlider,
1159
+ Ye as Collapse4,
1160
+ ts as Configs,
1161
+ Pe as Detect4,
1162
+ es as Dropdown4,
1163
+ Pt as Events4,
1164
+ ss as ImagePreview,
1165
+ is as ImageValidate,
1166
+ Fe as Marquee4,
1167
+ we as Modal4,
1168
+ Ve as Multipurpose4,
1169
+ as as Ripple4,
1170
+ Ue as Share4,
1171
+ rs as Tab4,
1172
+ Me as Video4
1022
1173
  };
1023
1174
  //# sourceMappingURL=fesd-bundle.js.map