@xwadex/fesd 0.0.18 → 0.0.20

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,18 +1,18 @@
1
- var Z = (r, e, t) => {
2
- if (!e.has(r))
3
- throw TypeError("Cannot " + t);
1
+ var ot = (r, t, e) => {
2
+ if (!t.has(r))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var d = (r, e, t) => {
6
- if (e.has(r))
5
+ var g = (r, t, e) => {
6
+ if (t.has(r))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(r) : e.set(r, t);
8
+ t instanceof WeakSet ? t.add(r) : t.set(r, e);
9
9
  };
10
- var l = (r, e, t) => (Z(r, e, "access private method"), t);
11
- import { i as F, a as B, g as C, v as ee, c as te, b as se, d as re, e as ie, f as oe, s as ae } from "./image-preview-bundle.js";
12
- import { A as xe, j as Se, C as Ee, h as Ce, D as Le, m as qe, I as We, k as ke, M as Te, l as _e, R as Me, T as Oe } from "./image-preview-bundle.js";
13
- import { S as ne } from "./vendor-bundle.js";
14
- const $ = () => {
15
- const r = navigator.userAgent, e = {
10
+ var p = (r, t, e) => (ot(r, t, "access private method"), e);
11
+ import { i as Y, a as z, g as q, v as at, c as nt, b as lt, d as ct, e as dt, f as ut, s as pt } from "./image-preview-bundle.js";
12
+ import { A as Wt, j as kt, C as Tt, h as _t, D as Ot, m as Mt, I as It, k as Xt, M as Rt, l as Bt, R as Nt, T as Dt } from "./image-preview-bundle.js";
13
+ import { S as mt } from "./vendor-bundle.js";
14
+ const E = () => {
15
+ const r = navigator.userAgent, t = {
16
16
  // Firefox 1.0+
17
17
  isFirefox: typeof InstallTrigger < "u",
18
18
  // Opera 8.0+
@@ -30,7 +30,7 @@ const $ = () => {
30
30
  isSafari: !/chrome|crios|crmo/i.test(r) && /safari/i.test(r),
31
31
  // Chrome 1 - 79
32
32
  isChrome: !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) || /chrome|crios|crmo/i.test(r)
33
- }, t = {
33
+ }, e = {
34
34
  // Android
35
35
  isAndroid: r.indexOf("Android") > -1 || r.indexOf("Adr") > -1,
36
36
  // iOS | ipad
@@ -45,124 +45,169 @@ const $ = () => {
45
45
  // Linux
46
46
  isLinux: r.indexOf("Linux") > -1
47
47
  };
48
- return { browser: e, mobile: t, os: s };
49
- }, le = () => {
50
- const { browser: r } = $();
51
- return Object.keys(r).find((e) => {
52
- if (r[e])
53
- return r[e];
48
+ return { browser: t, mobile: e, os: s };
49
+ }, ht = () => {
50
+ const { browser: r } = E();
51
+ return Object.keys(r).find((t) => {
52
+ if (r[t])
53
+ return r[t];
54
54
  });
55
- }, ce = () => {
56
- const { mobile: r } = $();
57
- return Object.keys(r).some((e) => {
58
- if (r[e])
59
- return r[e];
55
+ }, gt = () => {
56
+ const { mobile: r } = E();
57
+ return Object.keys(r).some((t) => {
58
+ if (r[t])
59
+ return r[t];
60
60
  });
61
- }, de = () => {
62
- const { os: r } = $();
63
- return Object.keys(r).find((e) => {
64
- if (r[e])
65
- return r[e];
61
+ }, bt = () => {
62
+ const { os: r } = E();
63
+ return Object.keys(r).find((t) => {
64
+ if (r[t])
65
+ return r[t];
66
66
  });
67
- }, ue = () => console.dir($());
68
- function we() {
67
+ }, ft = () => console.dir(E());
68
+ function At() {
69
69
  return {
70
- init: $,
71
- isBrowser4: le,
72
- isMobile4: ce,
73
- isOs4: de,
74
- logs: ue
70
+ init: E,
71
+ isBrowser4: ht,
72
+ isMobile4: gt,
73
+ isOs4: bt,
74
+ logs: ft
75
75
  };
76
76
  }
77
- const u = (r, e, t) => {
78
- r && (se(r) ? r.forEach((s) => s.style[e] = t) : r.style[e] = t);
77
+ const f = (r, t, e) => {
78
+ r && (lt(r) ? r.forEach((s) => s.style[t] = e) : r.style[t] = e);
79
79
  };
80
- var L, U, q, V, f, R, W, z, y, j, k, G;
81
- class ve {
82
- constructor(e, t = {}) {
83
- d(this, L);
84
- d(this, q);
80
+ var W, G, k, J, S, j, T, K, _, Q, O, Z, A, H, M, tt, x, P;
81
+ class xt {
82
+ constructor(t, e = {}) {
83
+ g(this, W);
84
+ g(this, k);
85
85
  // 取得元件上的設定值
86
- d(this, f);
86
+ g(this, S);
87
87
  // 設置設定值的 CSS 樣式
88
- d(this, W);
89
- d(this, y);
90
- d(this, k);
91
- !F(e) || !B(e) || (this.__storage__ = {
92
- el: e,
93
- options: t
94
- }, this.active = "data-article-active", l(this, L, U).call(this));
88
+ g(this, T);
89
+ // 表格拖曳功能
90
+ g(this, _);
91
+ // 設置表格凍結
92
+ g(this, O);
93
+ g(this, A);
94
+ g(this, M);
95
+ g(this, x);
96
+ !Y(t) || !z(t) || (this.__storage__ = {
97
+ el: t,
98
+ options: e
99
+ }, this.active = "data-article-active", p(this, W, G).call(this));
95
100
  }
96
101
  update() {
97
- const { elements: e } = this;
98
- e.forEach((t) => {
99
- t.querySelectorAll("._article").forEach((s) => {
100
- s.article = {}, s.article.parent = t, s.article.params = l(this, f, R).call(this, s), l(this, y, j).call(this, s);
102
+ const { elements: t } = this;
103
+ t.forEach((e) => {
104
+ e.querySelectorAll("._article").forEach((s) => {
105
+ s.article = {}, s.article.parent = e, s.article.params = p(this, S, j).call(this, s), p(this, A, H).call(this, s), p(this, x, P).call(this, s);
101
106
  });
102
107
  });
103
108
  }
104
109
  }
105
- L = new WeakSet(), U = function() {
106
- const { el: e, options: t } = this.__storage__, { SETTINGS: s } = re;
107
- this.elements = t.state == "not active" ? C(e + `:not([${this.active}])`) : C(e), this.elements = C(e), this.options = Object.assign({}, s, t), l(this, q, V).call(this);
108
- }, q = new WeakSet(), V = function() {
109
- const { elements: e } = this;
110
- e.forEach((t) => {
111
- t.setAttribute(this.active, ""), t.querySelectorAll("._article").forEach((s) => {
110
+ W = new WeakSet(), G = function() {
111
+ const { el: t, options: e } = this.__storage__, { SETTINGS: s } = ct;
112
+ this.elements = e.state == "not active" ? q(t + `:not([${this.active}])`) : q(t), this.elements = q(t), this.options = Object.assign({}, s, e), p(this, k, J).call(this);
113
+ }, k = new WeakSet(), J = function() {
114
+ const { elements: t } = this;
115
+ t.forEach((e) => {
116
+ e.setAttribute(this.active, ""), e.querySelectorAll("._article").forEach((s) => {
112
117
  var i, a;
113
- s.article = {}, s.article.parent = t, s.article.params = l(this, f, R).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, l(a = l(i = l(this, W, z).call(this, s), y, j).call(i, s), k, G).call(a, s);
118
+ s.article = {}, s.article.parent = e, s.article.params = p(this, S, j).call(this, s), s.article.methods = {}, s.article.methods.update = this.update, p(a = p(i = p(this, T, K).call(this, s), A, H).call(i, s), M, tt).call(a, s), p(this, x, P).call(this, s);
114
119
  });
115
120
  });
116
- }, f = new WeakSet(), R = function(e) {
121
+ }, S = new WeakSet(), j = function(t) {
117
122
  return {
118
123
  // 元件本身
119
- $selector: e,
124
+ $selector: t,
120
125
  // 父層元件
121
- $backgroundWrap: e.querySelector("._backgroundWrap"),
122
- $contentWrap: e.querySelector("._contentWrap"),
123
- $wordCover: e.querySelector("._wordCover"),
124
- $buttonCover: e.querySelector("._buttonCover"),
125
- $imgCover: e.querySelector("._imgCover"),
126
- $cover: e.querySelectorAll("._cover"),
127
- $swiper: e.querySelector(".swiper"),
128
- $swiperButtonCover: e.querySelector(".swiper-button-cover"),
126
+ $backgroundWrap: t.querySelector("._backgroundWrap"),
127
+ $contentWrap: t.querySelector("._contentWrap"),
128
+ $wordCover: t.querySelector("._wordCover"),
129
+ $buttonCover: t.querySelector("._buttonCover"),
130
+ $imgCover: t.querySelector("._imgCover"),
131
+ $cover: t.querySelectorAll("._cover"),
132
+ $swiper: t.querySelector(".swiper"),
133
+ $table: t.querySelector("._table"),
134
+ $swiperButtonCover: t.querySelector(".swiper-button-cover"),
129
135
  // 子層元件
130
- $h: e.querySelector("._H"),
131
- $subH: e.querySelector("._subH"),
132
- $p: e.querySelector("._P"),
133
- $button: e.querySelector("._button"),
134
- $description: e.querySelectorAll("._description"),
135
- $video: e.querySelectorAll("[video-id]"),
136
+ $h: t.querySelector("._H"),
137
+ $subH: t.querySelector("._subH"),
138
+ $p: t.querySelector("._P"),
139
+ $button: t.querySelector("._button"),
140
+ $description: t.querySelectorAll("._description"),
141
+ $video: t.querySelectorAll("[video-id]"),
136
142
  // 父層設定
137
- typeFullColor: e.getAttribute("typeFull-color"),
138
- typeFullBoxColor: e.getAttribute("typeFull-boxcolor"),
143
+ typeFullColor: t.getAttribute("typeFull-color"),
144
+ typeFullBoxColor: t.getAttribute("typeFull-boxcolor"),
139
145
  // 子層設定
140
- hColor: e.getAttribute("h-color"),
141
- subHColor: e.getAttribute("subh-color"),
142
- pColor: e.getAttribute("p-color"),
143
- buttonColor: e.getAttribute("button-color"),
144
- buttonColorHover: e.getAttribute("button-color-hover"),
145
- buttonTextColor: e.getAttribute("button-textcolor"),
146
- descriptionColor: e.getAttribute("description-color")
146
+ hColor: t.getAttribute("h-color"),
147
+ subHColor: t.getAttribute("subh-color"),
148
+ pColor: t.getAttribute("p-color"),
149
+ buttonColor: t.getAttribute("button-color"),
150
+ buttonColorHover: t.getAttribute("button-color-hover"),
151
+ buttonTextColor: t.getAttribute("button-textcolor"),
152
+ descriptionColor: t.getAttribute("description-color")
147
153
  };
148
- }, W = new WeakSet(), z = function(e) {
149
- const { params: t } = e.article;
150
- return u(t.$h, "color", t.hColor), u(t.$subH, "color", t.subHColor), u(t.$p, "color", t.pColor), u(t.$description, "color", t.descriptionColor), u(t.$button, "backgroundColor", t.buttonColor), u(t.$button, "color", t.buttonTextColor), t.buttonColorHover && t.$button && (t.$button.appendChild(document.createElement("span")), u(t.$button.querySelector("span"), "backgroundColor", t.buttonColorHover)), u(t.$backgroundWrap, "backgroundColor", t.typeFullColor), u(t.$contentWrap, "backgroundColor", t.typeFullBoxColor), this;
151
- }, y = new WeakSet(), j = function(e) {
152
- const { params: t } = e.article;
153
- return t.$video.length && new ee(t.$video), this;
154
- }, k = new WeakSet(), G = function(e) {
155
- const { basic_rwd: t } = this.options, { params: s } = e.article;
154
+ }, T = new WeakSet(), K = function(t) {
155
+ const { params: e } = t.article;
156
+ return f(e.$h, "color", e.hColor), f(e.$subH, "color", e.subHColor), f(e.$p, "color", e.pColor), f(e.$description, "color", e.descriptionColor), f(e.$button, "backgroundColor", e.buttonColor), f(e.$button, "color", e.buttonTextColor), e.buttonColorHover && e.$button && (e.$button.appendChild(document.createElement("span")), f(e.$button.querySelector("span"), "backgroundColor", e.buttonColorHover)), f(e.$backgroundWrap, "backgroundColor", e.typeFullColor), f(e.$contentWrap, "backgroundColor", e.typeFullBoxColor), this;
157
+ }, _ = new WeakSet(), Q = function(t) {
158
+ const { params: e } = t.article, s = e.$table;
159
+ let i = !1, a, o, d, m;
160
+ s.addEventListener("mousedown", function(n) {
161
+ n.preventDefault(), i = !0;
162
+ const c = s.getBoundingClientRect();
163
+ a = n.pageX - c.left, o = n.pageY - c.top, d = s.scrollLeft, m = s.scrollTop;
164
+ }), s.addEventListener("mouseleave", function() {
165
+ i = !1;
166
+ }), s.addEventListener("mouseup", function() {
167
+ i = !1;
168
+ }), s.addEventListener("mousemove", function(n) {
169
+ if (!i)
170
+ return;
171
+ n.preventDefault();
172
+ const c = s.getBoundingClientRect(), u = n.pageX - c.left, h = n.pageY - c.top, v = u - a, l = h - o;
173
+ s.scrollLeft = d - v, s.scrollTop = m - l;
174
+ });
175
+ }, O = new WeakSet(), Z = function(t, e, s) {
176
+ const { basic_rwd: i } = this.options, a = [...t.querySelectorAll("tr")];
177
+ if (a.length === 0)
178
+ return;
179
+ const d = window.innerWidth < i ? 0 : s, m = [], n = a[0].querySelectorAll("th, td");
180
+ for (let c = 0; c < d; c++) {
181
+ let u = 0;
182
+ for (let h = 0; h < c; h++)
183
+ u += n[h].offsetWidth;
184
+ m[c] = u;
185
+ }
186
+ a.forEach((c, u) => {
187
+ let h = 0;
188
+ for (let l = 0; l < u; l++)
189
+ h += a[l].offsetHeight;
190
+ c.querySelectorAll("th, td").forEach((l, y) => {
191
+ l.style.zIndex = 0;
192
+ const b = getComputedStyle(l).backgroundColor;
193
+ u < e && (l.style.position = "sticky", l.style.top = `${h}px`, l.style.zIndex = 2, l.style.backgroundColor = b), y < d && (l.style.position = "sticky", l.style.left = `${m[y]}px`, l.style.zIndex = u < e ? 3 : 1, l.style.backgroundColor = b);
194
+ });
195
+ });
196
+ }, A = new WeakSet(), H = function(t) {
197
+ const { params: e } = t.article;
198
+ return e.$video.length && new at(e.$video), this;
199
+ }, M = new WeakSet(), tt = function(t) {
200
+ const { basic_rwd: e } = this.options, { params: s } = t.article;
156
201
  if (!s.$swiper)
157
202
  return;
158
- const i = te(), a = this;
203
+ const i = nt(), a = this;
159
204
  let o = {
160
205
  on: {
161
206
  init(n) {
162
- const g = n.$el[0];
163
- s.$video.length && ([...g.querySelectorAll("[video4-active]")].forEach((v) => {
164
- var x, p;
165
- (x = v.querySelector(ie.SETTINGS.videoButton)) == null || x.remove(), (p = v.querySelector(".overlay")) == null || p.remove(), v.removeAttribute("video4-active");
207
+ const c = n.$el[0];
208
+ s.$video.length && ([...c.querySelectorAll("[video4-active]")].forEach((h) => {
209
+ var v, l;
210
+ (v = h.querySelector(dt.SETTINGS.videoButton)) == null || v.remove(), (l = h.querySelector(".overlay")) == null || l.remove(), h.removeAttribute("video4-active");
166
211
  }), a.update());
167
212
  },
168
213
  observerUpdate(n) {
@@ -175,8 +220,8 @@ L = new WeakSet(), U = function() {
175
220
  if (s.$selector.setAttribute("img-swiper", "on"), s.$selector.classList.add(`swiper-${i}`), s.$selector.getAttribute("swiper-arrow") !== "off" && s.$selector.getAttribute("swiper-arrow")) {
176
221
  const n = document.createElement("div");
177
222
  n.className = `swiper-button-next swiper-${i}`, s.$swiperButtonCover.appendChild(n);
178
- const g = document.createElement("div");
179
- g.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(g), o.navigation = {
223
+ const c = document.createElement("div");
224
+ c.className = `swiper-button-prev swiper-${i}`, s.$swiperButtonCover.appendChild(c), o.navigation = {
180
225
  nextEl: `.swiper-button-next.swiper-${i}`,
181
226
  prevEl: `.swiper-button-prev.swiper-${i}`
182
227
  };
@@ -188,27 +233,35 @@ L = new WeakSet(), U = function() {
188
233
  clickable: !0
189
234
  };
190
235
  }
191
- Number.parseInt(s.$selector.getAttribute("swiper-num")) && (o.breakpoints[t] = {
236
+ Number.parseInt(s.$selector.getAttribute("swiper-num")) && (o.breakpoints[e] = {
192
237
  slidesPerView: s.$selector.getAttribute("swiper-num") ? Number.parseInt(s.$selector.getAttribute("swiper-num")) > 5 ? 5 : Number.parseInt(s.$selector.getAttribute("swiper-num")) : 1
193
238
  }), (s.$selector.getAttribute("swiper-autoplay") !== "off" || !s.$selector.getAttribute("swiper-autoplay")) && (o.autoplay = {
194
239
  delay: 3e3,
195
240
  disableOnInteraction: !1
196
241
  }), (s.$selector.getAttribute("swiper-loop") !== "off" || !s.$selector.getAttribute("swiper-loop")) && (o.loop = !0), s.$selector.getAttribute("swiper-speed") && (o.speed = parseInt(s.$selector.getAttribute("swiper-speed"))), s.$selector.getAttribute("swiper-parallax") !== "off" && !s.$selector.getAttribute("swiper-loop") && (o.parallax = !0), s.$selector.getAttribute("swiper-pagination-dynamic") === "on" && (o.pagination.dynamicBullets = !0, o.pagination ? o.pagination.dynamicBullets = !0 : console.warn("pagination undefined"));
197
- let c = () => window.innerWidth > t && Number(s.$selector.getAttribute("swiper-num")) || 1;
198
- s.$swiper.querySelectorAll(".swiper-slide").length <= c() && (o.navigation = !1, o.pagination = !1, o.autoplay = !1, o.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"));
199
- const h = new ne(s.$swiper, o);
200
- return e.article.swiperList = [], e.article.swiperList.push(h), this;
242
+ let d = () => window.innerWidth > e && Number(s.$selector.getAttribute("swiper-num")) || 1;
243
+ s.$swiper.querySelectorAll(".swiper-slide").length <= d() && (o.navigation = !1, o.pagination = !1, o.autoplay = !1, o.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"));
244
+ const m = new mt(s.$swiper, o);
245
+ return t.article.swiperList = [], t.article.swiperList.push(m), this;
246
+ }, x = new WeakSet(), P = function(t) {
247
+ const { params: e } = t.article;
248
+ if (!e.$table)
249
+ return;
250
+ const s = t.getAttribute("freeze-table") === "on", i = parseInt(t.getAttribute("freeze-table-row") ?? "1", 10), a = parseInt(t.getAttribute("freeze-table-col") ?? "1", 10), o = t.querySelector("table"), d = t.querySelector("._tipText"), m = t.offsetWidth, n = o.offsetWidth, c = m < n, u = () => {
251
+ s && p(this, O, Z).call(this, o, i, a), (s || c) && p(this, _, Q).call(this, t), c ? (t.classList.add("overflow"), d.style.display = "flex") : (t.classList.remove("overflow"), d.style.display = "none");
252
+ };
253
+ return u(), window.addEventListener("resize", u), this;
201
254
  };
202
- let D = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", H = "ontouchend" in document.documentElement ? "touchend" : "mouseup", N = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
203
- function m(r) {
204
- const e = window.getComputedStyle(r), t = e.transform || e.mozTransform;
205
- if (t === "none")
255
+ let F = "ontouchstart" in document.documentElement ? "touchstart" : "mousedown", U = "ontouchend" in document.documentElement ? "touchend" : "mouseup", N = "ontouchmove" in document.documentElement ? "touchmove" : "mousemove";
256
+ function w(r) {
257
+ const t = window.getComputedStyle(r), e = t.transform || t.mozTransform;
258
+ if (e === "none")
206
259
  return {
207
260
  x: 0,
208
261
  y: 0,
209
262
  z: 0
210
263
  };
211
- const s = t.includes("3d") ? "3d" : "2d", i = t.match(/matrix.*\((.+)\)/)[1].split(", ");
264
+ const s = e.includes("3d") ? "3d" : "2d", i = e.match(/matrix.*\((.+)\)/)[1].split(", ");
212
265
  if (s === "2d")
213
266
  return {
214
267
  x: Number(i[4]),
@@ -222,26 +275,26 @@ function m(r) {
222
275
  z: Number(i[14])
223
276
  };
224
277
  }
225
- function E(r) {
226
- const t = r.querySelector(".wrapper").querySelectorAll(".item");
278
+ function L(r) {
279
+ const e = r.querySelector(".wrapper").querySelectorAll(".item");
227
280
  let s = 0;
228
- return t.forEach((i) => {
229
- const a = getComputedStyle(i), o = parseInt(a.marginLeft), c = parseInt(a.marginRight);
230
- s += i.getBoundingClientRect().width + o + c;
281
+ return e.forEach((i) => {
282
+ const a = getComputedStyle(i), o = parseInt(a.marginLeft), d = parseInt(a.marginRight);
283
+ s += i.getBoundingClientRect().width + o + d;
231
284
  }), s;
232
285
  }
233
- function X(r) {
234
- if (m(r.slideWrapEl).x >= r.translateMin)
286
+ function D(r) {
287
+ if (w(r.slideWrapEl).x >= r.translateMin)
235
288
  return "is-start";
236
- if (m(r.slideWrapEl).x <= r.translateMax)
289
+ if (w(r.slideWrapEl).x <= r.translateMax)
237
290
  return "is-end";
238
- if (m(r.slideWrapEl).x < r.translateMin && m(r.slideWrapEl).x > r.translateMax)
291
+ if (w(r.slideWrapEl).x < r.translateMin && w(r.slideWrapEl).x > r.translateMax)
239
292
  return "is-middle";
240
293
  }
241
- function pe(r) {
242
- const e = r.el, t = e.querySelector(".wrapper");
243
- t.addEventListener(D, function(s) {
244
- switch (r.isDown = !0, r.slidable && t.classList.add("dragging"), D) {
294
+ function wt(r) {
295
+ const t = r.el, e = t.querySelector(".wrapper");
296
+ e.addEventListener(F, function(s) {
297
+ switch (r.isDown = !0, r.slidable && e.classList.add("dragging"), F) {
245
298
  case "mousedown":
246
299
  r.startX = s.pageX;
247
300
  break;
@@ -249,9 +302,9 @@ function pe(r) {
249
302
  r.startX = s.changedTouches[0].pageX;
250
303
  break;
251
304
  }
252
- r.nowTranslateX = m(t).x;
253
- }), t.addEventListener(H, function(s) {
254
- r.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving");
305
+ r.nowTranslateX = w(e).x;
306
+ }), e.addEventListener(U, function(s) {
307
+ r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving");
255
308
  let i;
256
309
  switch (N) {
257
310
  case "mousemove":
@@ -262,16 +315,16 @@ function pe(r) {
262
315
  break;
263
316
  }
264
317
  if (i === 0 && s.target.closest(".item")) {
265
- if (H === "mouseup" && s.button !== 0)
318
+ if (U === "mouseup" && s.button !== 0)
266
319
  return;
267
- t.querySelectorAll(".item").forEach((o) => {
320
+ e.querySelectorAll(".item").forEach((o) => {
268
321
  o.classList.remove("active");
269
322
  }), s.target.closest(".item").classList.add("active"), r.moveActive(r.params.speed);
270
323
  } else
271
- r.slidable && r.resetPos(e);
272
- }), t.addEventListener("mouseleave", function() {
273
- r.isDown && r.slidable && (r.isDown = !1, t.classList.remove("dragging"), t.classList.remove("moving"), r.resetPos(e));
274
- }), t.addEventListener(N, function(s) {
324
+ r.slidable && r.resetPos(t);
325
+ }), e.addEventListener("mouseleave", function() {
326
+ r.isDown && r.slidable && (r.isDown = !1, e.classList.remove("dragging"), e.classList.remove("moving"), r.resetPos(t));
327
+ }), e.addEventListener(N, function(s) {
275
328
  if (r.draggable && r.slidable) {
276
329
  if (!r.isDown)
277
330
  return;
@@ -286,123 +339,123 @@ function pe(r) {
286
339
  break;
287
340
  }
288
341
  if (i !== 0) {
289
- t.classList.add("moving");
342
+ e.classList.add("moving");
290
343
  const a = {
291
344
  transition: "all 0ms ease 0s",
292
345
  transform: `translate3d(${r.nowTranslateX + i}px,0,0)`
293
346
  };
294
- Object.assign(t.style, a);
347
+ Object.assign(e.style, a);
295
348
  }
296
349
  }
297
350
  });
298
351
  }
299
- function me(r) {
300
- const e = r.querySelectorAll("a");
301
- for (var t = 0, s = e.length; t < s; t++)
302
- e[t].draggable = !1;
352
+ function vt(r) {
353
+ const t = r.querySelectorAll("a");
354
+ for (var e = 0, s = t.length; e < s; e++)
355
+ t[e].draggable = !1;
303
356
  }
304
- class fe {
305
- constructor(e, t) {
306
- this.el = typeof e == "string" ? document.querySelector(e) : e, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
357
+ class Et {
358
+ constructor(t, e) {
359
+ this.el = typeof t == "string" ? document.querySelector(t) : t, this.slideWrapEl = this.el.querySelector(".wrapper"), this.params = {
307
360
  speed: 300,
308
361
  clickSwitch: !0,
309
362
  breakpoint: !1
310
- }, Object.assign(this.params, t), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = m(this.slideWrapEl).x, this.slideTotalWidth = E(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
363
+ }, Object.assign(this.params, e), this.draggable = !0, this.isDown = !1, this.startX = 0, this.nowTranslateX = w(this.slideWrapEl).x, this.slideTotalWidth = L(this.el), this.translateMin = 0, this.translateMax = -Math.floor(
311
364
  Math.abs(
312
- E(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
365
+ L(this.el) - this.el.querySelector(".wrapper").getBoundingClientRect().width
313
366
  )
314
367
  ), this.slidable = this.slideTotalWidth > Math.round(this.el.getBoundingClientRect().width) && (!this.params.breakpoint || window.innerWidth <= this.params.breakpoint), this.init();
315
368
  }
316
369
  init() {
317
- const e = this;
318
- 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() {
319
- e.update();
320
- }), pe(e), me(e.el);
370
+ const t = this;
371
+ t.slidable && (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()), window.addEventListener("resize", function() {
372
+ t.update();
373
+ }), wt(t), vt(t.el);
321
374
  }
322
- moveActive(e) {
323
- const t = this, s = t.slideWrapEl.querySelector(".item.active"), a = s.previousElementSibling ? s.offsetLeft - t.el.clientWidth / 2 + s.clientWidth / 2 : 0;
324
- if (t.slidable) {
325
- if (-a < 0 && -a > t.translateMax) {
375
+ moveActive(t) {
376
+ const e = this, s = e.slideWrapEl.querySelector(".item.active"), a = s.previousElementSibling ? s.offsetLeft - e.el.clientWidth / 2 + s.clientWidth / 2 : 0;
377
+ if (e.slidable) {
378
+ if (-a < 0 && -a > e.translateMax) {
326
379
  const o = {
327
- transition: `all ${e || 0}ms ease 0s`,
380
+ transition: `all ${t || 0}ms ease 0s`,
328
381
  transform: `translate3d(-${a}px,0,0)`
329
382
  };
330
- Object.assign(t.slideWrapEl.style, o);
383
+ Object.assign(e.slideWrapEl.style, o);
331
384
  } else if (-a >= 0) {
332
385
  const o = {
333
- transition: `all ${e || 0}ms ease 0s`,
386
+ transition: `all ${t || 0}ms ease 0s`,
334
387
  transform: "translate3d(0,0,0)"
335
388
  };
336
- Object.assign(t.slideWrapEl.style, o);
389
+ Object.assign(e.slideWrapEl.style, o);
337
390
  } else {
338
391
  const o = {
339
- transition: `all ${e || 0}ms ease 0s`,
340
- transform: `translate3d(${t.translateMax}px,0,0)`
392
+ transition: `all ${t || 0}ms ease 0s`,
393
+ transform: `translate3d(${e.translateMax}px,0,0)`
341
394
  };
342
- Object.assign(t.slideWrapEl.style, o);
395
+ Object.assign(e.slideWrapEl.style, o);
343
396
  }
344
- if (e)
345
- t.slideWrapEl.addEventListener(
397
+ if (t)
398
+ e.slideWrapEl.addEventListener(
346
399
  "transitionend",
347
400
  function() {
348
- switch (t.nowTranslateX = m(t.slideWrapEl).x, X(t)) {
401
+ switch (e.nowTranslateX = w(e.slideWrapEl).x, D(e)) {
349
402
  case "is-start":
350
- t.el.classList.add("is-start"), t.el.classList.remove("is-end");
403
+ e.el.classList.add("is-start"), e.el.classList.remove("is-end");
351
404
  break;
352
405
  case "is-middle":
353
- t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
406
+ e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
354
407
  break;
355
408
  case "is-end":
356
- t.el.classList.remove("is-start"), t.el.classList.add("is-end");
409
+ e.el.classList.remove("is-start"), e.el.classList.add("is-end");
357
410
  break;
358
411
  }
359
412
  },
360
413
  !1
361
414
  );
362
415
  else
363
- switch (t.nowTranslateX = m(t.slideWrapEl).x, X(t)) {
416
+ switch (e.nowTranslateX = w(e.slideWrapEl).x, D(e)) {
364
417
  case "is-start":
365
- t.el.classList.add("is-start"), t.el.classList.remove("is-end");
418
+ e.el.classList.add("is-start"), e.el.classList.remove("is-end");
366
419
  break;
367
420
  case "is-middle":
368
- t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
421
+ e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
369
422
  break;
370
423
  case "is-end":
371
- t.el.classList.remove("is-start"), t.el.classList.add("is-end");
424
+ e.el.classList.remove("is-start"), e.el.classList.add("is-end");
372
425
  break;
373
426
  }
374
427
  }
375
428
  }
376
429
  resetPos() {
377
- const e = this;
378
- switch (X(e)) {
430
+ const t = this;
431
+ switch (D(t)) {
379
432
  case "is-start":
380
- e.el.classList.add("is-start"), e.el.classList.remove("is-end"), Object.assign(e.slideWrapEl.style, {
381
- transition: `all ${e.params.speed}ms ease 0s`,
433
+ t.el.classList.add("is-start"), t.el.classList.remove("is-end"), Object.assign(t.slideWrapEl.style, {
434
+ transition: `all ${t.params.speed}ms ease 0s`,
382
435
  transform: "translate3d(0,0,0)"
383
436
  });
384
437
  break;
385
438
  case "is-middle":
386
- e.el.classList.remove("is-start"), e.el.classList.remove("is-end");
439
+ t.el.classList.remove("is-start"), t.el.classList.remove("is-end");
387
440
  break;
388
441
  case "is-end":
389
- e.el.classList.remove("is-start"), e.el.classList.add("is-end"), Object.assign(e.slideWrapEl.style, {
390
- transition: `all ${e.params.speed}ms ease 0s`,
391
- transform: `translate3d(${e.translateMax}px,0,0)`
442
+ t.el.classList.remove("is-start"), t.el.classList.add("is-end"), Object.assign(t.slideWrapEl.style, {
443
+ transition: `all ${t.params.speed}ms ease 0s`,
444
+ transform: `translate3d(${t.translateMax}px,0,0)`
392
445
  });
393
446
  break;
394
447
  }
395
448
  }
396
449
  update() {
397
- const e = this;
398
- e.el.querySelector(".wrapper").removeAttribute("style"), e.slideTotalWidth = E(e.el), e.translateMax = -Math.floor(
450
+ const t = this;
451
+ t.el.querySelector(".wrapper").removeAttribute("style"), t.slideTotalWidth = L(t.el), t.translateMax = -Math.floor(
399
452
  Math.abs(
400
- E(e.el) - e.el.querySelector(".wrapper").getBoundingClientRect().width
453
+ L(t.el) - t.el.querySelector(".wrapper").getBoundingClientRect().width
401
454
  )
402
- ), 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"));
455
+ ), t.slidable = t.slideTotalWidth > Math.round(t.el.getBoundingClientRect().width) && (!t.params.breakpoint || window.innerWidth <= t.params.breakpoint), t.slidable ? (t.slideWrapEl.style.width = `${t.slideTotalWidth}px`, t.el.classList.add("slidable"), t.slideWrapEl.querySelector(".item.active") && t.moveActive()) : (t.el.classList.remove("slidable"), t.el.classList.remove("is-start"), t.el.classList.remove("is-end"), t.slideWrapEl.removeAttribute("style"));
403
456
  }
404
457
  }
405
- const P = (r) => {
458
+ const V = (r) => {
406
459
  if (r == "facebook")
407
460
  return "https://www.facebook.com/sharer/sharer.php?u=";
408
461
  if (r == "line")
@@ -414,95 +467,95 @@ const P = (r) => {
414
467
  if (r == "telegram")
415
468
  return "https://telegram.me/share/url?url=";
416
469
  };
417
- var T, Y, _, J, M, K;
418
- class ye {
419
- constructor(e, t = {}) {
420
- d(this, T);
421
- d(this, _);
422
- d(this, M);
470
+ var I, et, X, st, R, rt;
471
+ class Ct {
472
+ constructor(t, e = {}) {
473
+ g(this, I);
474
+ g(this, X);
475
+ g(this, R);
423
476
  this.__storage__ = {
424
- el: e,
425
- options: t
426
- }, l(this, T, Y).call(this);
477
+ el: t,
478
+ options: e
479
+ }, p(this, I, et).call(this);
427
480
  }
428
481
  }
429
- T = new WeakSet(), Y = function() {
430
- const { el: e, options: t } = this.__storage__, { SETTINGS: s } = ae;
431
- !F(e) || !B(e) || (this.elements = C(e), this.options = Object.assign({}, s, t), l(this, _, J).call(this));
432
- }, _ = new WeakSet(), J = function() {
433
- const { elements: e, options: t } = this;
434
- e.forEach((s) => {
482
+ I = new WeakSet(), et = function() {
483
+ const { el: t, options: e } = this.__storage__, { SETTINGS: s } = pt;
484
+ !Y(t) || !z(t) || (this.elements = q(t), this.options = Object.assign({}, s, e), p(this, X, st).call(this));
485
+ }, X = new WeakSet(), st = function() {
486
+ const { elements: t, options: e } = this;
487
+ t.forEach((s) => {
435
488
  s.querySelectorAll("[share-target]").forEach((i) => {
436
- i.share = {}, i.share.instance = this, i.share.params = t, i.share.eventHandler = l(this, M, K), i.addEventListener("click", i.share.eventHandler);
489
+ i.share = {}, i.share.instance = this, i.share.params = e, i.share.eventHandler = p(this, R, rt), i.addEventListener("click", i.share.eventHandler);
437
490
  });
438
491
  });
439
- }, M = new WeakSet(), K = function() {
440
- const { eventHandler: e, params: t } = this.share, s = this.getAttribute("share-target"), i = {
492
+ }, R = new WeakSet(), rt = function() {
493
+ const { eventHandler: t, params: e } = this.share, s = this.getAttribute("share-target"), i = {
441
494
  source: this.getAttribute("utm-source"),
442
495
  medium: this.getAttribute("utm-medium"),
443
496
  campaign: this.getAttribute("utm-campaign")
444
497
  }, a = {
445
- success: this.getAttribute("copy-success") || t.success,
446
- text: this.getAttribute("copy-text") || t.text,
447
- className: this.getAttribute("copy-class") || t.className,
448
- duration: this.getAttribute("copy-duration") || t.duration
498
+ success: this.getAttribute("copy-success") || e.success,
499
+ text: this.getAttribute("copy-text") || e.text,
500
+ className: this.getAttribute("copy-class") || e.className,
501
+ duration: this.getAttribute("copy-duration") || e.duration
449
502
  }, o = encodeURIComponent(document.URL);
450
- let c = o;
503
+ let d = o;
451
504
  if (s == "wechat") {
452
505
  window.open(`https://api.qrserver.com/v1/create-qr-code/?data=${o}&size=250x250`, "share to wechat", "width=300,height=300");
453
506
  return;
454
507
  }
455
508
  if (s == "url") {
456
- if (B(".copied-wrapper"))
509
+ if (z(".copied-wrapper"))
457
510
  return;
458
- document.querySelector("body").insertAdjacentHTML(oe.append, `<div class='copied-wrapper'><div class='text'>${a.success ? a.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
459
- const h = document.querySelector(".copied-wrapper");
460
- a.className && h.classList.add(a.className), h.style.top = this.getBoundingClientRect().top + window.scrollY + "px", h.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", h.style.display = "block";
511
+ document.querySelector("body").insertAdjacentHTML(ut.append, `<div class='copied-wrapper'><div class='text'>${a.success ? a.success : ""}</div><input id='clipboard' type='text' readonly></div>`);
512
+ const m = document.querySelector(".copied-wrapper");
513
+ a.className && m.classList.add(a.className), m.style.top = this.getBoundingClientRect().top + window.scrollY + "px", m.style.left = this.getBoundingClientRect().left + this.getBoundingClientRect().width / 2 + "px", m.style.display = "block";
461
514
  const n = document.querySelector("#clipboard");
462
515
  if (n.value = a.text ?? window.location.href, n.setSelectionRange(0, 9999), n.select(), document.execCommand("copy")) {
463
516
  document.execCommand("copy");
464
- const g = document.querySelector(".copied-wrapper"), A = document.querySelector(".copied-wrapper .text");
465
- A.style.display = "block", A.style.opacity = 0;
466
- const v = (p, O) => {
517
+ const c = document.querySelector(".copied-wrapper"), u = document.querySelector(".copied-wrapper .text");
518
+ u.style.display = "block", u.style.opacity = 0;
519
+ const h = (l, y) => {
467
520
  let b = 0;
468
- const w = 50, S = w / O, I = setInterval(function() {
469
- b += S, p.style.opacity = b, b >= 1 && (clearInterval(I), setTimeout(function() {
470
- x(p, 300, function() {
471
- g.remove();
521
+ const $ = 50, C = $ / y, B = setInterval(function() {
522
+ b += C, l.style.opacity = b, b >= 1 && (clearInterval(B), setTimeout(function() {
523
+ v(l, 300, function() {
524
+ c.remove();
472
525
  });
473
526
  }, a.duration));
474
- }, w);
475
- }, x = (p, O, b) => {
476
- let w = 1;
477
- const S = 50, I = S / O, Q = setInterval(() => {
478
- w -= I, p.style.opacity = w, w <= 0 && (clearInterval(Q), p.style.display = "none", b && b());
479
- }, S);
527
+ }, $);
528
+ }, v = (l, y, b) => {
529
+ let $ = 1;
530
+ const C = 50, B = C / y, it = setInterval(() => {
531
+ $ -= B, l.style.opacity = $, $ <= 0 && (clearInterval(it), l.style.display = "none", b && b());
532
+ }, C);
480
533
  };
481
- v(A, 300);
534
+ h(u, 300);
482
535
  }
483
536
  return;
484
537
  }
485
- c = `${c}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, c = c.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${P(s)}${o}`) : window.open(`${P(s)}${c}&quote=${c}`), this.removeEventListener("click", e), setTimeout(() => {
486
- this.addEventListener("click", e);
538
+ d = `${d}${i.source ? `?utm_source=${i.source}` : ""}${i.medium ? `&utm_medium${i.medium}` : ""}${i.campaign ? `&utm_campaign${i.campaign}` : ""}`, d = d.replace("?", "%3F").replace(new RegExp("&", "g"), "%26"), s == "line" ? window.open(`${V(s)}${o}`) : window.open(`${V(s)}${d}&quote=${d}`), this.removeEventListener("click", t), setTimeout(() => {
539
+ this.addEventListener("click", t);
487
540
  }, 100);
488
541
  };
489
542
  export {
490
- xe as Anchor4,
491
- Se as Aost4,
492
- ve as Article4,
493
- fe as CategorySlider,
494
- Ee as Collapse4,
495
- Ce as Configs,
496
- we as Detect4,
497
- Le as Dropdown4,
498
- qe as ImagePreview,
499
- We as ImageValidate,
500
- ke as Marquee4,
501
- Te as Modal4,
502
- _e as Multipurpose4,
503
- Me as Ripple4,
504
- ye as Share4,
505
- Oe as Tab4,
506
- ee as Video4
543
+ Wt as Anchor4,
544
+ kt as Aost4,
545
+ xt as Article4,
546
+ Et as CategorySlider,
547
+ Tt as Collapse4,
548
+ _t as Configs,
549
+ At as Detect4,
550
+ Ot as Dropdown4,
551
+ Mt as ImagePreview,
552
+ It as ImageValidate,
553
+ Xt as Marquee4,
554
+ Rt as Modal4,
555
+ Bt as Multipurpose4,
556
+ Nt as Ripple4,
557
+ Ct as Share4,
558
+ Dt as Tab4,
559
+ at as Video4
507
560
  };
508
561
  //# sourceMappingURL=fesd-bundle.js.map