@xwadex/fesd 0.0.14-re.21 → 0.0.14-re.23

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