@hbis-uni/components 2.0.6 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,25 +1,25 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, useCssVars, nextTick, onUnmounted } from "vue";
2
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementVNode, createCommentVNode, computed, ref, onMounted, watch, Fragment, renderList, normalizeStyle, nextTick, onUnmounted, withModifiers, withDirectives, vModelText, useSlots, useCssVars, resolveComponent, createVNode, withCtx } from "vue";
2
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
3
3
  __name: "C1",
4
4
  props: {
5
5
  title: { default: "C1 Component" },
6
6
  primary: { type: Boolean, default: !1 }
7
7
  },
8
- setup(y) {
9
- return (g, n) => (openBlock(), createElementBlock("div", {
10
- class: normalizeClass(["c1-container", { "c1-primary": y.primary }])
8
+ setup(s) {
9
+ return (g, o) => (openBlock(), createElementBlock("div", {
10
+ class: normalizeClass(["c1-container", { "c1-primary": s.primary }])
11
11
  }, [
12
12
  renderSlot(g.$slots, "default", {}, () => [
13
- createTextVNode(toDisplayString(y.title), 1)
13
+ createTextVNode(toDisplayString(s.title), 1)
14
14
  ], !0)
15
15
  ], 2));
16
16
  }
17
- }), _export_sfc = (y, g) => {
18
- const n = y.__vccOpts || y;
17
+ }), _export_sfc = (s, g) => {
18
+ const o = s.__vccOpts || s;
19
19
  for (const [t, r] of g)
20
- n[t] = r;
21
- return n;
22
- }, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e2028f64"]]), _hoisted_1$2 = { class: "c2-container" }, _hoisted_2$2 = { class: "c2-title" }, _hoisted_3$2 = { class: "c2-content" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
20
+ o[t] = r;
21
+ return o;
22
+ }, C1 = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e2250793"]]), _hoisted_1$6 = { class: "c2-container" }, _hoisted_2$5 = { class: "c2-title" }, _hoisted_3$5 = { class: "c2-content" }, _sfc_main$8 = /* @__PURE__ */ defineComponent({
23
23
  __name: "C2",
24
24
  props: {
25
25
  title: { default: "C2 Component" },
@@ -27,33 +27,33 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
27
27
  buttonText: { default: "Click Me" }
28
28
  },
29
29
  emits: ["click"],
30
- setup(y, { emit: g }) {
31
- const n = g, t = (r) => {
32
- n("click", r);
30
+ setup(s, { emit: g }) {
31
+ const o = g, t = (r) => {
32
+ o("click", r);
33
33
  };
34
- return (r, v) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
35
- createElementVNode("h2", _hoisted_2$2, toDisplayString(y.title), 1),
36
- createElementVNode("div", _hoisted_3$2, [
34
+ return (r, c) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
35
+ createElementVNode("h2", _hoisted_2$5, toDisplayString(s.title), 1),
36
+ createElementVNode("div", _hoisted_3$5, [
37
37
  renderSlot(r.$slots, "default", {}, void 0, !0)
38
38
  ]),
39
- y.showButton ? (openBlock(), createElementBlock("button", {
39
+ s.showButton ? (openBlock(), createElementBlock("button", {
40
40
  key: 0,
41
41
  class: "c2-button",
42
42
  onClick: t
43
- }, toDisplayString(y.buttonText), 1)) : createCommentVNode("", !0)
43
+ }, toDisplayString(s.buttonText), 1)) : createCommentVNode("", !0)
44
44
  ]));
45
45
  }
46
- }), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b1d573ae"]]), _hoisted_1$1 = { key: 0 }, _hoisted_2$1 = { class: "hbis-date-strip__weekdays" }, _hoisted_3$1 = { class: "hbis-date-strip__dates" }, _hoisted_4$1 = ["onClick"], _hoisted_5$1 = { class: "hbis-date-strip__date-number" }, _hoisted_6$1 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$1 = {
46
+ }), C2 = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-ed1086ed"]]), _hoisted_1$5 = { key: 0 }, _hoisted_2$4 = { class: "hbis-date-strip__weekdays" }, _hoisted_3$4 = { class: "hbis-date-strip__dates" }, _hoisted_4$3 = ["onClick"], _hoisted_5$3 = { class: "hbis-date-strip__date-number" }, _hoisted_6$2 = { class: "hbis-date-strip__date-slot" }, _hoisted_7$2 = {
47
47
  key: 1,
48
48
  class: "hbis-date-strip__scroll-wrapper"
49
- }, _hoisted_8$1 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9 = { class: "hbis-date-strip__weekdays" }, _hoisted_10 = { class: "hbis-date-strip__dates" }, _hoisted_11 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
49
+ }, _hoisted_8$1 = { class: "hbis-date-strip__scroll-container" }, _hoisted_9 = { class: "hbis-date-strip__weekdays" }, _hoisted_10 = { class: "hbis-date-strip__dates" }, _hoisted_11 = ["onClick"], _hoisted_12 = { class: "hbis-date-strip__date-number" }, _hoisted_13 = { class: "hbis-date-strip__date-slot" }, _sfc_main$7 = /* @__PURE__ */ defineComponent({
50
50
  __name: "hbis-dateStrip",
51
51
  props: {
52
52
  modelValue: { default: () => /* @__PURE__ */ new Date() },
53
53
  startDate: { default: () => /* @__PURE__ */ new Date() },
54
54
  endDate: { default: () => {
55
- const y = /* @__PURE__ */ new Date();
56
- return y.setDate(y.getDate() + 30), y;
55
+ const s = /* @__PURE__ */ new Date();
56
+ return s.setDate(s.getDate() + 30), s;
57
57
  } },
58
58
  highlightType: { default: "bg" },
59
59
  showToday: { type: Boolean, default: !0 },
@@ -67,33 +67,33 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
67
67
  visibleDays: { default: 7 }
68
68
  },
69
69
  emits: ["update:modelValue", "dateClick"],
70
- setup(y, { emit: g }) {
71
- const n = y, t = g, r = computed(() => {
70
+ setup(s, { emit: g }) {
71
+ const o = s, t = g, r = computed(() => {
72
72
  if (console.log("props:", {
73
- startDate: n.startDate,
74
- endDate: n.endDate,
75
- scrollable: n.scrollable
76
- }), n.scrollable)
73
+ startDate: o.startDate,
74
+ endDate: o.endDate,
75
+ scrollable: o.scrollable
76
+ }), o.scrollable)
77
77
  return console.log("显式设置了scrollable为true,允许滚动"), !0;
78
78
  try {
79
- const a = new Date(n.startDate);
80
- a.setHours(0, 0, 0, 0);
81
- const p = new Date(n.endDate);
82
- if (p.setHours(0, 0, 0, 0), isNaN(a.getTime()) || isNaN(p.getTime()))
79
+ const l = new Date(o.startDate);
80
+ l.setHours(0, 0, 0, 0);
81
+ const p = new Date(o.endDate);
82
+ if (p.setHours(0, 0, 0, 0), isNaN(l.getTime()) || isNaN(p.getTime()))
83
83
  return console.log("无效的日期对象,使用默认滚动行为"), !1;
84
- const e = p.getTime() - a.getTime(), A = Math.ceil(e / (1e3 * 60 * 60 * 24)), d = A + 1;
84
+ const e = p.getTime() - l.getTime(), x = Math.ceil(e / (1e3 * 60 * 60 * 24)), v = x + 1;
85
85
  return console.log("日期范围天数计算:", {
86
- start: a.toLocaleDateString(),
86
+ start: l.toLocaleDateString(),
87
87
  end: p.toLocaleDateString(),
88
88
  diffTime: e,
89
- diffDays: A,
90
- totalDays: d,
91
- shouldScroll: d > 7
92
- }), d > 7;
93
- } catch (a) {
94
- return console.error("计算日期范围时出错:", a), !1;
89
+ diffDays: x,
90
+ totalDays: v,
91
+ shouldScroll: v > 7
92
+ }), v > 7;
93
+ } catch (l) {
94
+ return console.error("计算日期范围时出错:", l), !1;
95
95
  }
96
- }), v = [
96
+ }), c = [
97
97
  { value: 0, label: "日", isWeekend: !0 },
98
98
  { value: 1, label: "一", isWeekend: !1 },
99
99
  { value: 2, label: "二", isWeekend: !1 },
@@ -101,155 +101,155 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
101
101
  { value: 4, label: "四", isWeekend: !1 },
102
102
  { value: 5, label: "五", isWeekend: !1 },
103
103
  { value: 6, label: "六", isWeekend: !0 }
104
- ], h = computed(() => {
105
- const a = s.value[0];
106
- if (!a)
107
- return v;
108
- const p = a.weekday, e = [];
109
- for (let A = 0; A < 7; A++) {
110
- const d = (p + A) % 7;
111
- e.push(v[d]);
104
+ ], u = computed(() => {
105
+ const l = a.value[0];
106
+ if (!l)
107
+ return c;
108
+ const p = l.weekday, e = [];
109
+ for (let x = 0; x < 7; x++) {
110
+ const v = (p + x) % 7;
111
+ e.push(c[v]);
112
112
  }
113
113
  return e;
114
114
  });
115
115
  ref((() => {
116
- const a = n.startDate || /* @__PURE__ */ new Date(), p = a.getDay(), e = a.getDate() - (p === 0 ? 6 : p - 1), A = new Date(a);
117
- return A.setDate(e), A;
116
+ const l = o.startDate || /* @__PURE__ */ new Date(), p = l.getDay(), e = l.getDate() - (p === 0 ? 6 : p - 1), x = new Date(l);
117
+ return x.setDate(e), x;
118
118
  })()), onMounted(() => {
119
- console.log("props:", n), console.log("highlightType:", n.highlightType);
119
+ console.log("props:", o), console.log("highlightType:", o.highlightType);
120
120
  }), watch(
121
- () => n.highlightType,
122
- (a) => {
123
- console.log("highlightType changed:", a);
121
+ () => o.highlightType,
122
+ (l) => {
123
+ console.log("highlightType changed:", l);
124
124
  }
125
125
  ), watch(
126
- () => n.modelValue,
127
- (a) => {
128
- console.log("modelValue changed:", a);
126
+ () => o.modelValue,
127
+ (l) => {
128
+ console.log("modelValue changed:", l);
129
129
  }
130
130
  );
131
- const o = computed(() => {
132
- const a = [];
131
+ const f = computed(() => {
132
+ const l = [];
133
133
  try {
134
- const p = n.startDate, e = n.endDate;
134
+ const p = o.startDate, e = o.endDate;
135
135
  if (isNaN(p.getTime()) || isNaN(e.getTime()))
136
- return console.log("无效的日期对象,返回空数组"), a;
137
- const A = Math.ceil((e.getTime() - p.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
138
- for (let d = 0; d < A; d++) {
139
- const w = new Date(p);
140
- w.setDate(p.getDate() + d), isNaN(w.getTime()) || a.push({
141
- date: w,
142
- dateString: l(w),
143
- day: w.getDate(),
144
- month: w.getMonth() + 1,
145
- year: w.getFullYear(),
146
- isWeekend: w.getDay() === 0 || w.getDay() === 6,
147
- weekday: w.getDay()
136
+ return console.log("无效的日期对象,返回空数组"), l;
137
+ const x = Math.ceil((e.getTime() - p.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
138
+ for (let v = 0; v < x; v++) {
139
+ const _ = new Date(p);
140
+ _.setDate(p.getDate() + v), isNaN(_.getTime()) || l.push({
141
+ date: _,
142
+ dateString: d(_),
143
+ day: _.getDate(),
144
+ month: _.getMonth() + 1,
145
+ year: _.getFullYear(),
146
+ isWeekend: _.getDay() === 0 || _.getDay() === 6,
147
+ weekday: _.getDay()
148
148
  });
149
149
  }
150
150
  } catch (p) {
151
151
  console.error("生成日期数组时出错:", p);
152
152
  }
153
- return a;
154
- }), s = computed(() => o.value.filter((a) => !!(a && a.date && a.dateString && !isNaN(a.date.getTime()) && typeof a.dateString == "string" && typeof a.day == "number"))), l = (a) => `${a.getFullYear()}-${String(a.getMonth() + 1).padStart(2, "0")}-${String(a.getDate()).padStart(2, "0")}`, i = (a) => {
155
- const p = a.dateString;
156
- return n.modelValue ? Array.isArray(n.modelValue) ? n.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : l(e) === p) : isNaN(n.modelValue.getTime()) ? !1 : l(n.modelValue) === p : !1;
157
- }, f = (a) => {
158
- const p = l(/* @__PURE__ */ new Date());
159
- return a.dateString === p;
160
- }, u = (a) => {
161
- const p = a.date;
162
- return n.disablePast && p < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || n.disableFuture && p > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : p >= n.startDate && p <= n.endDate;
163
- }, S = (a) => {
153
+ return l;
154
+ }), a = computed(() => f.value.filter((l) => !!(l && l.date && l.dateString && !isNaN(l.date.getTime()) && typeof l.dateString == "string" && typeof l.day == "number"))), d = (l) => `${l.getFullYear()}-${String(l.getMonth() + 1).padStart(2, "0")}-${String(l.getDate()).padStart(2, "0")}`, i = (l) => {
155
+ const p = l.dateString;
156
+ return o.modelValue ? Array.isArray(o.modelValue) ? o.modelValue.some((e) => !e || isNaN(e.getTime()) ? !1 : d(e) === p) : isNaN(o.modelValue.getTime()) ? !1 : d(o.modelValue) === p : !1;
157
+ }, m = (l) => {
158
+ const p = d(/* @__PURE__ */ new Date());
159
+ return l.dateString === p;
160
+ }, h = (l) => {
161
+ const p = l.date;
162
+ return o.disablePast && p < new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)) || o.disableFuture && p > new Date((/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)) ? !1 : p >= o.startDate && p <= o.endDate;
163
+ }, b = (l) => {
164
164
  var p;
165
- return ((p = v.find((e) => e.value === a)) == null ? void 0 : p.label) || "";
166
- }, k = (a) => {
167
- u(a) && (t("dateClick", a), t("update:modelValue", a.date));
165
+ return ((p = c.find((e) => e.value === l)) == null ? void 0 : p.label) || "";
166
+ }, w = (l) => {
167
+ h(l) && (t("dateClick", l), t("update:modelValue", l.date));
168
168
  };
169
- return (a, p) => (openBlock(), createElementBlock("div", {
169
+ return (l, p) => (openBlock(), createElementBlock("div", {
170
170
  class: normalizeClass(["hbis-date-strip", {
171
- "hbis-date-strip--highlight-bg": y.highlightType === "bg",
172
- "hbis-date-strip--highlight-dot": y.highlightType === "dot",
173
- "hbis-date-strip--highlight-round": y.highlightType === "round",
171
+ "hbis-date-strip--highlight-bg": s.highlightType === "bg",
172
+ "hbis-date-strip--highlight-dot": s.highlightType === "dot",
173
+ "hbis-date-strip--highlight-round": s.highlightType === "round",
174
174
  "hbis-date-strip--scrollable": r.value
175
175
  }])
176
176
  }, [
177
- r.value ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
177
+ r.value ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
178
178
  createElementVNode("div", _hoisted_8$1, [
179
179
  createElementVNode("div", _hoisted_9, [
180
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createElementBlock("div", {
180
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (e) => (openBlock(), createElementBlock("div", {
181
181
  key: e.dateString + "-weekday",
182
182
  class: normalizeClass(["hbis-date-strip__weekday", {
183
183
  "hbis-date-strip__weekday--weekend": e.isWeekend
184
184
  }])
185
- }, toDisplayString(S(e.weekday)), 3))), 128))
185
+ }, toDisplayString(b(e.weekday)), 3))), 128))
186
186
  ]),
187
187
  createElementVNode("div", _hoisted_10, [
188
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createElementBlock("div", {
188
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (e) => (openBlock(), createElementBlock("div", {
189
189
  key: e.dateString,
190
190
  class: normalizeClass(["hbis-date-strip__date", {
191
191
  "hbis-date-strip__date--selected": i(e),
192
- "hbis-date-strip__date--today": f(e),
193
- "hbis-date-strip__date--disabled": !u(e),
192
+ "hbis-date-strip__date--today": m(e),
193
+ "hbis-date-strip__date--disabled": !h(e),
194
194
  "hbis-date-strip__date--weekend": e.isWeekend
195
195
  }]),
196
196
  style: normalizeStyle({
197
- color: i(e) ? y.selectedColor : y.normalColor,
198
- backgroundColor: i(e) ? y.selectedBgColor : y.normalBgColor
197
+ color: i(e) ? s.selectedColor : s.normalColor,
198
+ backgroundColor: i(e) ? s.selectedBgColor : s.normalBgColor
199
199
  }),
200
- onClick: (A) => k(e)
200
+ onClick: (x) => w(e)
201
201
  }, [
202
202
  createElementVNode("div", _hoisted_12, toDisplayString(e.day), 1),
203
203
  createElementVNode("div", _hoisted_13, [
204
- renderSlot(a.$slots, "default", { date: e }, void 0, !0)
204
+ renderSlot(l.$slots, "default", { date: e }, void 0, !0)
205
205
  ])
206
206
  ], 14, _hoisted_11))), 128))
207
207
  ])
208
208
  ])
209
- ])) : (openBlock(), createElementBlock("div", _hoisted_1$1, [
210
- createElementVNode("div", _hoisted_2$1, [
211
- (openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (e) => (openBlock(), createElementBlock("div", {
209
+ ])) : (openBlock(), createElementBlock("div", _hoisted_1$5, [
210
+ createElementVNode("div", _hoisted_2$4, [
211
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (e) => (openBlock(), createElementBlock("div", {
212
212
  key: e.value,
213
213
  class: normalizeClass(["hbis-date-strip__weekday", {
214
214
  "hbis-date-strip__weekday--weekend": e.isWeekend
215
215
  }])
216
216
  }, toDisplayString(e.label), 3))), 128))
217
217
  ]),
218
- createElementVNode("div", _hoisted_3$1, [
219
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (e) => (openBlock(), createElementBlock("div", {
218
+ createElementVNode("div", _hoisted_3$4, [
219
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (e) => (openBlock(), createElementBlock("div", {
220
220
  key: e.dateString,
221
221
  class: normalizeClass(["hbis-date-strip__date", {
222
222
  "hbis-date-strip__date--selected": i(e),
223
- "hbis-date-strip__date--today": f(e),
224
- "hbis-date-strip__date--disabled": !u(e),
223
+ "hbis-date-strip__date--today": m(e),
224
+ "hbis-date-strip__date--disabled": !h(e),
225
225
  "hbis-date-strip__date--weekend": e.isWeekend
226
226
  }]),
227
227
  style: normalizeStyle({
228
- color: i(e) ? y.selectedColor : y.normalColor,
229
- backgroundColor: i(e) ? y.selectedBgColor : y.normalBgColor
228
+ color: i(e) ? s.selectedColor : s.normalColor,
229
+ backgroundColor: i(e) ? s.selectedBgColor : s.normalBgColor
230
230
  }),
231
- onClick: (A) => k(e)
231
+ onClick: (x) => w(e)
232
232
  }, [
233
- createElementVNode("div", _hoisted_5$1, toDisplayString(e.day), 1),
234
- createElementVNode("div", _hoisted_6$1, [
235
- renderSlot(a.$slots, "default", { date: e }, void 0, !0)
233
+ createElementVNode("div", _hoisted_5$3, toDisplayString(e.day), 1),
234
+ createElementVNode("div", _hoisted_6$2, [
235
+ renderSlot(l.$slots, "default", { date: e }, void 0, !0)
236
236
  ])
237
- ], 14, _hoisted_4$1))), 128))
237
+ ], 14, _hoisted_4$3))), 128))
238
238
  ])
239
239
  ]))
240
240
  ], 2));
241
241
  }
242
- }), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2e8258eb"]]), _hoisted_1 = { class: "image-preview" }, _hoisted_2 = {
242
+ }), hbisDateStrip = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-f7fe6423"]]), _hoisted_1$4 = { class: "image-preview" }, _hoisted_2$3 = {
243
243
  key: 0,
244
244
  class: "counter"
245
- }, _hoisted_3 = { class: "counter-text" }, _hoisted_4 = { class: "swiper-container" }, _hoisted_5 = ["onWheel"], _hoisted_6 = ["src", "onLoad"], _hoisted_7 = ["disabled"], _hoisted_8 = ["disabled"], _sfc_main$2 = {
245
+ }, _hoisted_3$3 = { class: "counter-text" }, _hoisted_4$2 = { class: "swiper-container" }, _hoisted_5$2 = ["onWheel"], _hoisted_6$1 = ["src", "onLoad"], _hoisted_7$1 = ["disabled"], _hoisted_8 = ["disabled"], _sfc_main$6 = {
246
246
  __name: "hbis-previewImage",
247
247
  props: {
248
248
  // 图片集合
249
249
  images: {
250
250
  type: Array,
251
251
  required: !0,
252
- validator: (y) => y.every((g) => typeof g == "string")
252
+ validator: (s) => s.every((g) => typeof g == "string")
253
253
  },
254
254
  // 当前显示的图片索引
255
255
  initialIndex: {
@@ -278,129 +278,129 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
278
278
  }
279
279
  },
280
280
  emits: ["close", "change", "update:initialIndex"],
281
- setup(y, { emit: g }) {
282
- const n = y, t = g, r = ref(n.initialIndex), v = ref(null), h = ref(!1), m = ref(!1), o = ref(0), s = ref(0), l = ref(0), i = ref(window.innerWidth), f = ref(window.innerHeight), u = ref(n.images.map(() => ({
281
+ setup(s, { emit: g }) {
282
+ const o = s, t = g, r = ref(o.initialIndex), c = ref(null), u = ref(!1), n = ref(!1), f = ref(0), a = ref(0), d = ref(0), i = ref(window.innerWidth), m = ref(window.innerHeight), h = ref(o.images.map(() => ({
283
283
  scale: 1,
284
284
  translateX: 0,
285
285
  translateY: 0,
286
286
  naturalWidth: 0,
287
287
  naturalHeight: 0,
288
288
  isLoaded: !1
289
- }))), S = ref(0), k = ref(0), a = ref(0), p = ref(0), e = ref(0), A = computed(() => ({
290
- transform: `translateX(${l.value}px)`,
291
- transition: h.value ? "none" : "transform 0.3s ease"
292
- })), d = computed(() => ({
289
+ }))), b = ref(0), w = ref(0), l = ref(0), p = ref(0), e = ref(0), x = computed(() => ({
290
+ transform: `translateX(${d.value}px)`,
291
+ transition: u.value ? "none" : "transform 0.3s ease"
292
+ })), v = computed(() => ({
293
293
  width: `${i.value}px`,
294
- height: `${f.value}px`
294
+ height: `${m.value}px`
295
295
  }));
296
- watch(() => n.initialIndex, (c) => {
297
- c !== r.value && (r.value = c, w());
296
+ watch(() => o.initialIndex, (y) => {
297
+ y !== r.value && (r.value = y, _());
298
298
  }), onMounted(() => {
299
- const c = () => {
300
- i.value = window.innerWidth, f.value = window.innerHeight, w();
299
+ const y = () => {
300
+ i.value = window.innerWidth, m.value = window.innerHeight, _();
301
301
  };
302
- return window.addEventListener("resize", c), c(), () => {
303
- window.removeEventListener("resize", c);
302
+ return window.addEventListener("resize", y), y(), () => {
303
+ window.removeEventListener("resize", y);
304
304
  };
305
305
  });
306
- const w = () => {
307
- l.value = -r.value * i.value;
308
- }, x = () => {
309
- r.value > 0 && (r.value--, w(), N(), t("change", r.value), t("update:initialIndex", r.value));
310
- }, _ = () => {
311
- r.value < n.images.length - 1 && (r.value++, w(), N(), t("change", r.value), t("update:initialIndex", r.value));
312
- }, N = () => {
313
- u.value[r.value] = {
314
- ...u.value[r.value],
306
+ const _ = () => {
307
+ d.value = -r.value * i.value;
308
+ }, E = () => {
309
+ r.value > 0 && (r.value--, _(), T(), t("change", r.value), t("update:initialIndex", r.value));
310
+ }, S = () => {
311
+ r.value < o.images.length - 1 && (r.value++, _(), T(), t("change", r.value), t("update:initialIndex", r.value));
312
+ }, T = () => {
313
+ h.value[r.value] = {
314
+ ...h.value[r.value],
315
315
  scale: 1,
316
316
  translateX: 0,
317
317
  translateY: 0
318
318
  };
319
- }, T = (c) => {
320
- const b = u.value[c];
319
+ }, C = (y) => {
320
+ const k = h.value[y];
321
321
  return {
322
- transform: `scale(${b.scale}) translate(${b.translateX}px, ${b.translateY}px)`,
323
- transition: m.value ? "none" : "transform 0.1s ease",
324
- opacity: b.isLoaded ? 1 : 0
322
+ transform: `scale(${k.scale}) translate(${k.translateX}px, ${k.translateY}px)`,
323
+ transition: n.value ? "none" : "transform 0.1s ease",
324
+ opacity: k.isLoaded ? 1 : 0
325
325
  };
326
- }, F = (c) => {
327
- const b = event.target;
328
- u.value[c] = {
329
- ...u.value[c],
330
- naturalWidth: b.naturalWidth,
331
- naturalHeight: b.naturalHeight,
326
+ }, I = (y) => {
327
+ const k = event.target;
328
+ h.value[y] = {
329
+ ...h.value[y],
330
+ naturalWidth: k.naturalWidth,
331
+ naturalHeight: k.naturalHeight,
332
332
  isLoaded: !0
333
333
  };
334
- }, C = (c) => {
335
- c.target.tagName === "IMG" ? (m.value = !0, o.value = c.clientX - u.value[r.value].translateX, s.value = c.clientY - u.value[r.value].translateY) : (h.value = !0, o.value = c.clientX - l.value), c.preventDefault();
336
- }, D = (c) => {
337
- if (m.value) {
338
- const b = c.clientX - o.value, O = c.clientY - s.value;
339
- u.value[r.value] = {
340
- ...u.value[r.value],
341
- translateX: b,
342
- translateY: O
334
+ }, B = (y) => {
335
+ y.target.tagName === "IMG" ? (n.value = !0, f.value = y.clientX - h.value[r.value].translateX, a.value = y.clientY - h.value[r.value].translateY) : (u.value = !0, f.value = y.clientX - d.value), y.preventDefault();
336
+ }, O = (y) => {
337
+ if (n.value) {
338
+ const k = y.clientX - f.value, A = y.clientY - a.value;
339
+ h.value[r.value] = {
340
+ ...h.value[r.value],
341
+ translateX: k,
342
+ translateY: A
343
343
  };
344
- } else if (h.value && n.enableSwipe) {
345
- const b = c.clientX - o.value;
346
- l.value = b;
344
+ } else if (u.value && o.enableSwipe) {
345
+ const k = y.clientX - f.value;
346
+ d.value = k;
347
347
  }
348
- }, P = () => {
349
- if (h.value && n.enableSwipe) {
350
- const c = i.value * 0.3;
351
- Math.abs(l.value + r.value * i.value) > c ? l.value > 0 ? x() : _() : w();
348
+ }, j = () => {
349
+ if (u.value && o.enableSwipe) {
350
+ const y = i.value * 0.3;
351
+ Math.abs(d.value + r.value * i.value) > y ? d.value > 0 ? E() : S() : _();
352
352
  }
353
- h.value = !1, m.value = !1;
354
- }, L = (c) => {
355
- const b = c.touches[0];
356
- S.value = b.clientX, k.value = b.clientY, a.value = Date.now();
357
- }, V = (c) => {
358
- const b = c.touches[0];
359
- p.value = b.clientX, e.value = b.clientY;
360
- const O = p.value - S.value, E = e.value - k.value;
361
- if (Math.abs(O) > Math.abs(E))
362
- c.preventDefault(), h.value = !0, l.value = -r.value * i.value + O;
363
- else if (u.value[r.value].scale > 1) {
364
- c.preventDefault(), m.value = !0;
365
- const B = O + u.value[r.value].translateX, j = E + u.value[r.value].translateY;
366
- u.value[r.value] = {
367
- ...u.value[r.value],
368
- translateX: B,
369
- translateY: j
353
+ u.value = !1, n.value = !1;
354
+ }, P = (y) => {
355
+ const k = y.touches[0];
356
+ b.value = k.clientX, w.value = k.clientY, l.value = Date.now();
357
+ }, R = (y) => {
358
+ const k = y.touches[0];
359
+ p.value = k.clientX, e.value = k.clientY;
360
+ const A = p.value - b.value, N = e.value - w.value;
361
+ if (Math.abs(A) > Math.abs(N))
362
+ y.preventDefault(), u.value = !0, d.value = -r.value * i.value + A;
363
+ else if (h.value[r.value].scale > 1) {
364
+ y.preventDefault(), n.value = !0;
365
+ const D = A + h.value[r.value].translateX, $ = N + h.value[r.value].translateY;
366
+ h.value[r.value] = {
367
+ ...h.value[r.value],
368
+ translateX: D,
369
+ translateY: $
370
370
  };
371
371
  }
372
372
  }, M = () => {
373
- if (h.value) {
374
- const c = p.value - S.value, b = Date.now() - a.value, O = i.value * 0.2, E = Math.abs(c) / b;
375
- Math.abs(c) > O || E > 0.5 ? c > 0 ? x() : _() : w();
373
+ if (u.value) {
374
+ const y = p.value - b.value, k = Date.now() - l.value, A = i.value * 0.2, N = Math.abs(y) / k;
375
+ Math.abs(y) > A || N > 0.5 ? y > 0 ? E() : S() : _();
376
376
  }
377
- h.value = !1, m.value = !1;
378
- }, I = (c, b) => {
379
- if (b !== r.value) return;
380
- c.preventDefault();
381
- const O = c.deltaY > 0 ? -0.1 : 0.1, E = c.clientX, B = c.clientY;
382
- W(E, B, O);
383
- }, W = (c, b, O) => {
384
- const E = u.value[r.value], B = Math.max(
385
- n.minScale,
386
- Math.min(n.maxScale, E.scale + O)
387
- ), j = event.target.getBoundingClientRect(), $ = c - j.left, R = b - j.top, z = B - E.scale, U = E.translateX + ($ - E.translateX) * (z / E.scale), X = E.translateY + (R - E.translateY) * (z / E.scale);
388
- u.value[r.value] = {
389
- ...E,
390
- scale: B,
391
- translateX: U,
392
- translateY: X
377
+ u.value = !1, n.value = !1;
378
+ }, F = (y, k) => {
379
+ if (k !== r.value) return;
380
+ y.preventDefault();
381
+ const A = y.deltaY > 0 ? -0.1 : 0.1, N = y.clientX, D = y.clientY;
382
+ W(N, D, A);
383
+ }, W = (y, k, A) => {
384
+ const N = h.value[r.value], D = Math.max(
385
+ o.minScale,
386
+ Math.min(o.maxScale, N.scale + A)
387
+ ), $ = event.target.getBoundingClientRect(), L = y - $.left, V = k - $.top, z = D - N.scale, H = N.translateX + (L - N.translateX) * (z / N.scale), U = N.translateY + (V - N.translateY) * (z / N.scale);
388
+ h.value[r.value] = {
389
+ ...N,
390
+ scale: D,
391
+ translateX: H,
392
+ translateY: U
393
393
  };
394
394
  };
395
- return (c, b) => (openBlock(), createElementBlock("div", _hoisted_1, [
396
- y.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2, [
397
- createElementVNode("span", _hoisted_3, toDisplayString(r.value + 1) + "/" + toDisplayString(y.images.length), 1)
395
+ return (y, k) => (openBlock(), createElementBlock("div", _hoisted_1$4, [
396
+ s.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
397
+ createElementVNode("span", _hoisted_3$3, toDisplayString(r.value + 1) + "/" + toDisplayString(s.images.length), 1)
398
398
  ])) : createCommentVNode("", !0),
399
- y.showCloseBtn ? (openBlock(), createElementBlock("button", {
399
+ s.showCloseBtn ? (openBlock(), createElementBlock("button", {
400
400
  key: 1,
401
401
  class: "close-btn",
402
- onClick: b[0] || (b[0] = (O) => t("close"))
403
- }, [...b[1] || (b[1] = [
402
+ onClick: k[0] || (k[0] = (A) => t("close"))
403
+ }, [...k[1] || (k[1] = [
404
404
  createElementVNode("svg", {
405
405
  width: "24",
406
406
  height: "24",
@@ -423,46 +423,46 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
423
423
  })
424
424
  ], -1)
425
425
  ])])) : createCommentVNode("", !0),
426
- createElementVNode("div", _hoisted_4, [
426
+ createElementVNode("div", _hoisted_4$2, [
427
427
  createElementVNode("div", {
428
428
  class: "swiper-wrapper",
429
429
  ref_key: "swiperWrapper",
430
- ref: v,
431
- style: normalizeStyle(A.value),
432
- onTouchstart: L,
433
- onTouchmove: V,
430
+ ref: c,
431
+ style: normalizeStyle(x.value),
432
+ onTouchstart: P,
433
+ onTouchmove: R,
434
434
  onTouchend: M,
435
- onMousedown: C,
436
- onMousemove: D,
437
- onMouseup: P,
438
- onMouseleave: P
435
+ onMousedown: B,
436
+ onMousemove: O,
437
+ onMouseup: j,
438
+ onMouseleave: j
439
439
  }, [
440
- (openBlock(!0), createElementBlock(Fragment, null, renderList(y.images, (O, E) => (openBlock(), createElementBlock("div", {
441
- key: E,
440
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(s.images, (A, N) => (openBlock(), createElementBlock("div", {
441
+ key: N,
442
442
  class: "swiper-slide",
443
- style: normalizeStyle(d.value)
443
+ style: normalizeStyle(v.value)
444
444
  }, [
445
445
  createElementVNode("div", {
446
446
  class: "image-container",
447
- onWheel: (B) => I(B, E)
447
+ onWheel: (D) => F(D, N)
448
448
  }, [
449
449
  createElementVNode("img", {
450
- src: O,
450
+ src: A,
451
451
  alt: "Preview image",
452
452
  class: "preview-image",
453
- style: normalizeStyle(T(E)),
454
- onLoad: (B) => F(E),
453
+ style: normalizeStyle(C(N)),
454
+ onLoad: (D) => I(N),
455
455
  loading: "lazy"
456
- }, null, 44, _hoisted_6)
457
- ], 40, _hoisted_5)
456
+ }, null, 44, _hoisted_6$1)
457
+ ], 40, _hoisted_5$2)
458
458
  ], 4))), 128))
459
459
  ], 36)
460
460
  ]),
461
461
  createElementVNode("button", {
462
462
  class: "nav-btn prev-btn",
463
- onClick: x,
463
+ onClick: E,
464
464
  disabled: r.value === 0
465
- }, [...b[2] || (b[2] = [
465
+ }, [...k[2] || (k[2] = [
466
466
  createElementVNode("svg", {
467
467
  width: "24",
468
468
  height: "24",
@@ -473,12 +473,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
473
473
  }, [
474
474
  createElementVNode("polyline", { points: "15 18 9 12 15 6" })
475
475
  ], -1)
476
- ])], 8, _hoisted_7),
476
+ ])], 8, _hoisted_7$1),
477
477
  createElementVNode("button", {
478
478
  class: "nav-btn next-btn",
479
- onClick: _,
480
- disabled: r.value === y.images.length - 1
481
- }, [...b[3] || (b[3] = [
479
+ onClick: S,
480
+ disabled: r.value === s.images.length - 1
481
+ }, [...k[3] || (k[3] = [
482
482
  createElementVNode("svg", {
483
483
  width: "24",
484
484
  height: "24",
@@ -492,7 +492,592 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
492
492
  ])], 8, _hoisted_8)
493
493
  ]));
494
494
  }
495
- };
495
+ }, _sfc_main$5 = {
496
+ __name: "hbis-auto-scroll-list",
497
+ props: {
498
+ // 列表数据数组
499
+ data: {
500
+ type: Array,
501
+ default: () => []
502
+ },
503
+ // 滚动速度
504
+ speed: {
505
+ type: Number,
506
+ default: 1
507
+ },
508
+ // 滚动方向:vertical(垂直)或horizontal(水平)
509
+ direction: {
510
+ type: String,
511
+ default: "vertical",
512
+ validator: (s) => ["vertical", "horizontal"].includes(s)
513
+ },
514
+ // 鼠标悬停是否暂停
515
+ pauseOnHover: {
516
+ type: Boolean,
517
+ default: !0
518
+ },
519
+ // 列表项高度(垂直滚动时使用)
520
+ itemHeight: {
521
+ type: Number,
522
+ default: 40
523
+ },
524
+ // 列表项宽度(水平滚动时使用)
525
+ itemWidth: {
526
+ type: Number,
527
+ default: 200
528
+ },
529
+ // 容器高度
530
+ containerHeight: {
531
+ type: [Number, String],
532
+ default: 300
533
+ },
534
+ // 容器宽度
535
+ containerWidth: {
536
+ type: [Number, String],
537
+ default: "100%"
538
+ },
539
+ // 是否循环滚动
540
+ loop: {
541
+ type: Boolean,
542
+ default: !0
543
+ },
544
+ // 自定义列表项类名
545
+ customItemClass: {
546
+ type: String,
547
+ default: ""
548
+ },
549
+ // 自定义列表项样式
550
+ itemStyle: {
551
+ type: Object,
552
+ default: () => ({})
553
+ }
554
+ },
555
+ emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
556
+ setup(s, { expose: g, emit: o }) {
557
+ const t = s, r = o, c = ref(null), u = ref(null), n = ref(!1), f = ref(null), a = ref(0), d = ref([]), i = ref(!1), m = ref(0), h = ref(0), b = ref(0), w = ref(!1), l = computed(() => ({
558
+ // 动态设置容器高度和宽度
559
+ height: typeof t.containerHeight == "number" ? `${t.containerHeight}px` : t.containerHeight,
560
+ width: typeof t.containerWidth == "number" ? `${t.containerWidth}px` : t.containerWidth,
561
+ overflow: "hidden",
562
+ // 隐藏超出部分
563
+ position: "relative"
564
+ // 相对定位,为绝对定位的内容容器提供参考
565
+ })), p = computed(() => {
566
+ const y = {
567
+ with: "100%",
568
+ position: "absolute",
569
+ // 绝对定位,实现自由移动
570
+ transition: "none",
571
+ // 禁用过渡,使用transform实现平滑滚动
572
+ willChange: "transform"
573
+ // 告诉浏览器将要变化的属性,优化性能
574
+ };
575
+ return t.direction === "vertical" ? y.transform = `translateY(${a.value}px)` : y.transform = `translateX(${a.value}px)`, y;
576
+ }), e = () => {
577
+ if (!t.data || t.data.length === 0) {
578
+ d.value = [];
579
+ return;
580
+ }
581
+ t.loop ? d.value = [...t.data, ...t.data] : d.value = [...t.data];
582
+ }, x = () => {
583
+ if (n.value || i.value) {
584
+ f.value = requestAnimationFrame(x);
585
+ return;
586
+ }
587
+ const y = c.value, k = u.value;
588
+ if (!y || !k) {
589
+ f.value = requestAnimationFrame(x);
590
+ return;
591
+ }
592
+ const A = t.direction === "vertical" ? y.offsetHeight : y.offsetWidth, D = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
593
+ if (a.value -= t.speed, t.loop)
594
+ Math.abs(a.value) >= D && (a.value = 0);
595
+ else {
596
+ const $ = -(D - A);
597
+ if (a.value <= $) {
598
+ a.value = $, n.value = !0, r("scroll", a.value);
599
+ return;
600
+ }
601
+ }
602
+ r("scroll", a.value), f.value = requestAnimationFrame(x);
603
+ }, v = () => {
604
+ f.value && cancelAnimationFrame(f.value), f.value = requestAnimationFrame(x);
605
+ }, _ = () => {
606
+ f.value && (cancelAnimationFrame(f.value), f.value = null);
607
+ }, E = () => {
608
+ n.value = !0, r("pause");
609
+ }, S = () => {
610
+ n.value = !1, r("resume");
611
+ }, T = () => {
612
+ t.pauseOnHover && E();
613
+ }, C = () => {
614
+ t.pauseOnHover && !i.value && S();
615
+ }, I = (y) => {
616
+ i.value = !0, w.value = n.value, n.value = !0, m.value = t.direction === "vertical" ? y.clientY : y.clientX, h.value = m.value, b.value = a.value, r("dragStart"), document.addEventListener("mousemove", B), document.addEventListener("mouseup", O);
617
+ }, B = (y) => {
618
+ if (!i.value) return;
619
+ h.value = t.direction === "vertical" ? y.clientY : y.clientX;
620
+ const k = h.value - m.value;
621
+ a.value = b.value + k;
622
+ const A = c.value, N = u.value;
623
+ if (A && N) {
624
+ const D = t.direction === "vertical" ? A.offsetHeight : A.offsetWidth, L = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
625
+ if (t.loop)
626
+ a.value > 0 ? a.value = 0 : Math.abs(a.value) > L && (a.value = -L);
627
+ else {
628
+ const V = -(L - D);
629
+ a.value > 0 ? a.value = 0 : a.value < V && (a.value = V);
630
+ }
631
+ }
632
+ r("scroll", a.value);
633
+ }, O = () => {
634
+ i.value && (i.value = !1, document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", O), w.value || (n.value = !1), r("dragEnd"));
635
+ }, j = (y) => {
636
+ const k = y.touches[0];
637
+ i.value = !0, w.value = n.value, n.value = !0, m.value = t.direction === "vertical" ? k.clientY : k.clientX, h.value = m.value, b.value = a.value, r("dragStart");
638
+ }, P = (y) => {
639
+ if (!i.value) return;
640
+ y.preventDefault();
641
+ const k = y.touches[0];
642
+ h.value = t.direction === "vertical" ? k.clientY : k.clientX;
643
+ const A = h.value - m.value;
644
+ a.value = b.value + A;
645
+ const N = c.value, D = u.value;
646
+ if (N && D) {
647
+ const $ = t.direction === "vertical" ? N.offsetHeight : N.offsetWidth, V = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
648
+ if (t.loop)
649
+ a.value > 0 ? a.value = 0 : Math.abs(a.value) > V && (a.value = -V);
650
+ else {
651
+ const z = -(V - $);
652
+ a.value > 0 ? a.value = 0 : a.value < z && (a.value = z);
653
+ }
654
+ }
655
+ r("scroll", a.value);
656
+ }, R = () => {
657
+ i.value && (i.value = !1, w.value || (n.value = !1), r("dragEnd"));
658
+ }, M = (y) => {
659
+ a.value = y;
660
+ }, F = () => {
661
+ a.value = 0;
662
+ }, W = () => {
663
+ const y = c.value;
664
+ if (y) {
665
+ const k = u.value;
666
+ if (k) {
667
+ const A = t.direction === "vertical" ? k.offsetHeight : k.offsetWidth;
668
+ a.value = -(A - y.offsetHeight);
669
+ }
670
+ }
671
+ };
672
+ return watch(() => t.data, () => {
673
+ e(), a.value = 0;
674
+ }, { deep: !0 }), watch(() => t.speed, () => {
675
+ n.value || (_(), v());
676
+ }), onMounted(() => {
677
+ e(), nextTick(() => {
678
+ v();
679
+ const y = c.value;
680
+ y && (y.addEventListener("mouseenter", T), y.addEventListener("mouseleave", C));
681
+ });
682
+ }), onUnmounted(() => {
683
+ _();
684
+ const y = c.value;
685
+ y && (y.removeEventListener("mouseenter", T), y.removeEventListener("mouseleave", C)), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", O);
686
+ }), g({
687
+ pause: E,
688
+ // 暂停滚动
689
+ resume: S,
690
+ // 恢复滚动
691
+ scrollTo: M,
692
+ // 滚动到指定位置
693
+ scrollToTop: F,
694
+ // 滚动到顶部
695
+ scrollToBottom: W,
696
+ // 滚动到底部
697
+ isPaused: n,
698
+ // 是否暂停(响应式)
699
+ isDragging: i
700
+ // 是否正在拖拽(响应式)
701
+ }), (y, k) => (openBlock(), createElementBlock("div", {
702
+ class: "hbis-auto-scroll-list",
703
+ ref_key: "containerRef",
704
+ ref: c,
705
+ style: normalizeStyle(l.value),
706
+ onMousedown: I,
707
+ onTouchstart: j,
708
+ onTouchmove: P,
709
+ onTouchend: R
710
+ }, [
711
+ createElementVNode("div", {
712
+ class: "scroll-content",
713
+ ref_key: "contentRef",
714
+ ref: u,
715
+ style: normalizeStyle(p.value)
716
+ }, [
717
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (A, N) => renderSlot(y.$slots, "item", {
718
+ item: A,
719
+ index: N
720
+ }, () => [
721
+ createElementVNode("div", {
722
+ class: "default-item",
723
+ style: normalizeStyle(s.itemStyle)
724
+ }, toDisplayString(A), 5)
725
+ ], !0)), 256))
726
+ ], 4)
727
+ ], 36));
728
+ }
729
+ }, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-d516a98e"]]), _hoisted_1$3 = {
730
+ key: 0,
731
+ class: "circular-spinner"
732
+ }, _hoisted_2$2 = {
733
+ key: 1,
734
+ class: "dots-spinner"
735
+ }, _hoisted_3$2 = {
736
+ key: 2,
737
+ class: "bars-spinner"
738
+ }, _sfc_main$4 = {
739
+ __name: "hbis-loading",
740
+ props: {
741
+ // 控制加载组件是否显示
742
+ visible: {
743
+ type: Boolean,
744
+ default: !1
745
+ },
746
+ // 是否允许触摸屏幕关闭加载
747
+ touchDismiss: {
748
+ type: Boolean,
749
+ default: !1
750
+ },
751
+ // 加载文字
752
+ text: {
753
+ type: String,
754
+ default: ""
755
+ },
756
+ // 加载动画类型:circular, dots, bars
757
+ spinnerType: {
758
+ type: String,
759
+ default: "circular"
760
+ },
761
+ // 自定义文字样式
762
+ textStyle: {
763
+ type: Object,
764
+ default: () => ({})
765
+ },
766
+ // 自定义容器样式
767
+ containerStyle: {
768
+ type: Object,
769
+ default: () => ({})
770
+ }
771
+ },
772
+ emits: ["update:visible", "close"],
773
+ setup(s, { expose: g, emit: o }) {
774
+ const t = s, r = o, c = () => {
775
+ t.touchDismiss && (r("update:visible", !1), r("close"));
776
+ };
777
+ return watch(() => t.visible, (u) => {
778
+ u ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
779
+ }), onUnmounted(() => {
780
+ document.body.style.overflow = "";
781
+ }), g({
782
+ show: () => r("update:visible", !0),
783
+ hide: () => {
784
+ r("update:visible", !1), r("close");
785
+ }
786
+ }), (u, n) => s.visible ? (openBlock(), createElementBlock("div", {
787
+ key: 0,
788
+ class: normalizeClass(["hbis-loading-container", { "touch-dismissible": s.touchDismiss }]),
789
+ onClick: c
790
+ }, [
791
+ createElementVNode("div", {
792
+ class: "hbis-loading-wrapper",
793
+ onClick: n[0] || (n[0] = withModifiers(() => {
794
+ }, ["stop"]))
795
+ }, [
796
+ renderSlot(u.$slots, "spinner", {}, () => [
797
+ createElementVNode("div", {
798
+ class: normalizeClass(["hbis-loading-spinner", s.spinnerType])
799
+ }, [
800
+ s.spinnerType === "circular" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [...n[1] || (n[1] = [
801
+ createElementVNode("div", { class: "circle" }, null, -1)
802
+ ])])) : s.spinnerType === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$2, [...n[2] || (n[2] = [
803
+ createElementVNode("div", { class: "dot" }, null, -1),
804
+ createElementVNode("div", { class: "dot" }, null, -1),
805
+ createElementVNode("div", { class: "dot" }, null, -1)
806
+ ])])) : s.spinnerType === "bars" ? (openBlock(), createElementBlock("div", _hoisted_3$2, [...n[3] || (n[3] = [
807
+ createElementVNode("div", { class: "bar" }, null, -1),
808
+ createElementVNode("div", { class: "bar" }, null, -1),
809
+ createElementVNode("div", { class: "bar" }, null, -1)
810
+ ])])) : createCommentVNode("", !0)
811
+ ], 2)
812
+ ], !0),
813
+ s.text ? (openBlock(), createElementBlock("div", {
814
+ key: 0,
815
+ class: "hbis-loading-text",
816
+ style: normalizeStyle(s.textStyle)
817
+ }, toDisplayString(s.text), 5)) : createCommentVNode("", !0)
818
+ ])
819
+ ], 2)) : createCommentVNode("", !0);
820
+ }
821
+ }, hbisLoading = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-61aef9bd"]]), _hoisted_1$2 = { class: "parent-view" }, _sfc_main$3 = {
822
+ __name: "hbis-sms-input",
823
+ props: {
824
+ /* 倒计时时间
825
+ */
826
+ countDownTime: {
827
+ type: Number,
828
+ default: 60
829
+ },
830
+ /* 输入框提示输入文本
831
+ */
832
+ inputPlacheHolder: {
833
+ type: String,
834
+ default: "请输入验证码"
835
+ },
836
+ /* 输入框背景色
837
+ */
838
+ inputColor: {
839
+ type: String,
840
+ default: "#F1F7FA"
841
+ },
842
+ /* 输入框输入文本颜色
843
+ */
844
+ inputTextColor: {
845
+ type: String,
846
+ default: "#000"
847
+ },
848
+ /* 输入框提示文本颜色
849
+ */
850
+ inputPlacheHolderColor: {
851
+ type: String,
852
+ default: "#F00"
853
+ },
854
+ /* 倒计时后拼接字符
855
+ */
856
+ smsCodeTimeText: {
857
+ type: String,
858
+ default: "s"
859
+ },
860
+ /* 发送验证码按钮文本
861
+ */
862
+ smsCodeBtnText: {
863
+ type: String,
864
+ default: "发送"
865
+ },
866
+ /* 发送验证码按钮颜色
867
+ */
868
+ smsCodeBtnColor: {
869
+ type: String,
870
+ default: "#FFF"
871
+ },
872
+ /* 发送验证码按钮文本颜色
873
+ */
874
+ smsCodeBtnTextColor: {
875
+ type: String,
876
+ default: "#2E6DFF"
877
+ }
878
+ },
879
+ emits: ["custom-event"],
880
+ setup(s, { expose: g, emit: o }) {
881
+ const t = s, r = o, c = ref(!0), u = ref(""), n = ref(t.countDownTime), f = () => {
882
+ if (console.log("验证码isSendSMS:" + c.value), !c.value) {
883
+ console.log("请" + t.countDownTime + "秒后再重试。");
884
+ return;
885
+ }
886
+ r("custom-event");
887
+ };
888
+ return g({
889
+ countDown: () => {
890
+ n.value = t.countDownTime;
891
+ let d = setInterval(() => {
892
+ c.value = !1, n.value--, n.value === 0 && (c.value = !0, clearInterval(d));
893
+ }, 1e3);
894
+ },
895
+ smsCode: u
896
+ }), (d, i) => (openBlock(), createElementBlock("div", _hoisted_1$2, [
897
+ createElementVNode("div", {
898
+ class: "input_view_sms_code",
899
+ style: normalizeStyle({ background: s.inputColor })
900
+ }, [
901
+ withDirectives(createElementVNode("input", {
902
+ type: "text",
903
+ class: "view_sms_code",
904
+ "placeholder-style": "color:#999",
905
+ placeholder: "请输入验证码",
906
+ "onUpdate:modelValue": i[0] || (i[0] = (m) => u.value = m),
907
+ style: normalizeStyle({ color: s.inputTextColor })
908
+ }, null, 4), [
909
+ [vModelText, u.value]
910
+ ]),
911
+ c.value ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
912
+ key: 0,
913
+ class: normalizeClass(["sms_code_btn", { disabled: !c.value }]),
914
+ style: normalizeStyle({ color: s.smsCodeBtnTextColor, background: s.smsCodeBtnColor }),
915
+ onClick: f
916
+ }, toDisplayString(n.value) + " " + toDisplayString(s.smsCodeTimeText), 7)),
917
+ c.value ? (openBlock(), createElementBlock("div", {
918
+ key: 1,
919
+ class: "sms_code_btn",
920
+ style: normalizeStyle({ color: s.smsCodeBtnTextColor, background: s.smsCodeBtnColor }),
921
+ onClick: f
922
+ }, toDisplayString(s.smsCodeBtnText), 5)) : createCommentVNode("", !0)
923
+ ], 4)
924
+ ]));
925
+ }
926
+ }, HbisSmsInput = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-ef42fb9a"]]), _hoisted_1$1 = { class: "waterfall-debug" }, _hoisted_2$1 = { class: "waterfall-container" }, _hoisted_3$1 = { class: "column-debug" }, _hoisted_4$1 = {
927
+ key: 0,
928
+ class: "waterfall-item-with-slot"
929
+ }, _hoisted_5$1 = ["src"], _hoisted_6 = { class: "waterfall-content" }, _hoisted_7 = ["src"], _sfc_main$2 = /* @__PURE__ */ Object.assign({
930
+ name: "HbisWaterfall"
931
+ }, {
932
+ __name: "hbis-waterfall",
933
+ props: {
934
+ /**
935
+ * 瀑布流数据
936
+ */
937
+ data: {
938
+ type: Array,
939
+ default: () => []
940
+ },
941
+ /**
942
+ * 列数
943
+ */
944
+ column: {
945
+ type: Number,
946
+ default: 2,
947
+ validator: (s) => s >= 2
948
+ },
949
+ /**
950
+ * 最大列数
951
+ */
952
+ maxColumn: {
953
+ type: Number,
954
+ default: 5
955
+ },
956
+ /**
957
+ * 列间距
958
+ */
959
+ columnGap: {
960
+ type: [Number, String],
961
+ default: 10
962
+ },
963
+ /**
964
+ * 行间距
965
+ */
966
+ rowGap: {
967
+ type: [Number, String],
968
+ default: 10
969
+ },
970
+ /**
971
+ * 数据唯一键
972
+ */
973
+ itemKey: {
974
+ type: String,
975
+ default: "id"
976
+ },
977
+ /**
978
+ * 图片字段名
979
+ */
980
+ imageKey: {
981
+ type: String,
982
+ default: "url"
983
+ }
984
+ },
985
+ emits: ["load", "error"],
986
+ setup(s, { expose: g, emit: o }) {
987
+ const t = useSlots(), r = ref(null), c = s, u = o;
988
+ useCssVars(() => ({
989
+ columnGap: String(c.columnGap) + "px",
990
+ rowGap: String(c.rowGap) + "px"
991
+ }));
992
+ const n = ref([]), f = ref(2), a = computed(() => t.default !== void 0), d = (b) => (r.value && r.value.offsetWidth, Math.min(c.column, c.maxColumn), parseInt(c.columnGap), parseInt(c.rowGap), 200 + Math.floor(Math.random() * 100) + 20), i = () => {
993
+ console.log("开始分配数据,总数据量:", c.data.length);
994
+ const b = Math.min(c.column, c.maxColumn);
995
+ f.value = b;
996
+ const w = [];
997
+ for (let l = 0; l < b; l++)
998
+ w.push({
999
+ items: [],
1000
+ height: 0
1001
+ });
1002
+ n.value = w, c.data.forEach((l, p) => {
1003
+ const e = d();
1004
+ let x = 1 / 0, v = 0;
1005
+ for (let _ = 0; _ < b; _++)
1006
+ n.value[_].height < x && (x = n.value[_].height, v = _);
1007
+ n.value[v].items.push(l), n.value[v].height += e, console.log("分配数据到列:", { itemIndex: p, columnIndex: v, itemHeight: e, columnHeight: n.value[v].height });
1008
+ }), console.log("分配完成,各列数据量:", n.value.map((l, p) => `列${p + 1}: ${l.items.length}个`)), console.log("分配完成,各列高度:", n.value.map((l, p) => `列${p + 1}: ${l.height}px`));
1009
+ }, m = (b) => {
1010
+ u("load", b);
1011
+ }, h = (b) => {
1012
+ u("error", b);
1013
+ };
1014
+ return watch(() => c.data, () => {
1015
+ console.log("数据变化,重新分配数据"), i();
1016
+ }, { deep: !0 }), watch(() => [c.column, c.maxColumn], () => {
1017
+ console.log("列数变化,更新列数"), f.value = Math.min(c.column, c.maxColumn), i();
1018
+ }), watch(() => [c.columnGap, c.rowGap], () => {
1019
+ console.log("间距变化,重新计算高度和分配数据"), i();
1020
+ }), onMounted(() => {
1021
+ console.log("===== 组件挂载 ====="), console.log("组件挂载,初始化数据"), console.log("初始数据量:", c.data.length);
1022
+ try {
1023
+ i(), console.log("===== 组件挂载完成 =====");
1024
+ } catch (b) {
1025
+ console.error("refresh函数执行失败:", b), console.log("===== 组件挂载失败 =====");
1026
+ }
1027
+ }), g({
1028
+ refresh: i
1029
+ }), (b, w) => (openBlock(), createElementBlock("div", {
1030
+ ref_key: "waterfallRef",
1031
+ ref: r
1032
+ }, [
1033
+ createElementVNode("div", _hoisted_1$1, [
1034
+ createTextVNode(" 列数: " + toDisplayString(f.value) + " ", 1),
1035
+ w[1] || (w[1] = createElementVNode("br", null, null, -1)),
1036
+ createTextVNode(" 数据总量: " + toDisplayString(s.data.length) + " ", 1),
1037
+ w[2] || (w[2] = createElementVNode("br", null, null, -1)),
1038
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (l, p) => (openBlock(), createElementBlock(Fragment, { key: p }, [
1039
+ createTextVNode(" 列" + toDisplayString(p + 1) + "数据量: " + toDisplayString(l.items.length), 1),
1040
+ w[0] || (w[0] = createElementVNode("br", null, null, -1))
1041
+ ], 64))), 128))
1042
+ ]),
1043
+ createElementVNode("div", _hoisted_2$1, [
1044
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (l, p) => (openBlock(), createElementBlock("div", {
1045
+ key: p,
1046
+ class: "waterfall-column"
1047
+ }, [
1048
+ createElementVNode("div", _hoisted_3$1, " 列" + toDisplayString(p + 1) + ": " + toDisplayString(l.items.length) + "个元素 ", 1),
1049
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(l.items, (e, x) => (openBlock(), createElementBlock("div", {
1050
+ key: e[s.itemKey] || `col${p}-${x}`,
1051
+ class: "waterfall-item"
1052
+ }, [
1053
+ a.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
1054
+ createElementVNode("img", {
1055
+ src: e[s.imageKey],
1056
+ class: "waterfall-image",
1057
+ style: normalizeStyle({ height: d() + "px" }),
1058
+ onLoad: m,
1059
+ onError: h
1060
+ }, null, 44, _hoisted_5$1),
1061
+ createElementVNode("div", _hoisted_6, [
1062
+ renderSlot(b.$slots, "default", {
1063
+ item: e,
1064
+ index: x
1065
+ }, void 0, !0)
1066
+ ])
1067
+ ])) : (openBlock(), createElementBlock("img", {
1068
+ key: 1,
1069
+ src: e[s.imageKey],
1070
+ class: "waterfall-image",
1071
+ style: normalizeStyle({ height: d() + "px" }),
1072
+ onLoad: m,
1073
+ onError: h
1074
+ }, null, 44, _hoisted_7))
1075
+ ]))), 128))
1076
+ ]))), 128))
1077
+ ])
1078
+ ], 512));
1079
+ }
1080
+ }), HbisWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cae450ae"]]);
496
1081
  var svga_lite_min = { exports: {} };
497
1082
  /*!
498
1083
  * svga.lite
@@ -503,63 +1088,63 @@ var svga_lite_min = { exports: {} };
503
1088
  * Released under the MIT License.
504
1089
  */
505
1090
  (function(module, exports$1) {
506
- (function(y, g) {
1091
+ (function(s, g) {
507
1092
  module.exports = g();
508
1093
  })(window, function() {
509
- return function(y) {
1094
+ return function(s) {
510
1095
  var g = {};
511
- function n(t) {
1096
+ function o(t) {
512
1097
  if (g[t]) return g[t].exports;
513
1098
  var r = g[t] = { i: t, l: !1, exports: {} };
514
- return y[t].call(r.exports, r, r.exports, n), r.l = !0, r.exports;
1099
+ return s[t].call(r.exports, r, r.exports, o), r.l = !0, r.exports;
515
1100
  }
516
- return n.m = y, n.c = g, n.d = function(t, r, v) {
517
- n.o(t, r) || Object.defineProperty(t, r, { enumerable: !0, get: v });
518
- }, n.r = function(t) {
1101
+ return o.m = s, o.c = g, o.d = function(t, r, c) {
1102
+ o.o(t, r) || Object.defineProperty(t, r, { enumerable: !0, get: c });
1103
+ }, o.r = function(t) {
519
1104
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 });
520
- }, n.t = function(t, r) {
521
- if (1 & r && (t = n(t)), 8 & r || 4 & r && typeof t == "object" && t && t.__esModule) return t;
522
- var v = /* @__PURE__ */ Object.create(null);
523
- if (n.r(v), Object.defineProperty(v, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string") for (var h in t) n.d(v, h, (function(m) {
524
- return t[m];
525
- }).bind(null, h));
526
- return v;
527
- }, n.n = function(t) {
1105
+ }, o.t = function(t, r) {
1106
+ if (1 & r && (t = o(t)), 8 & r || 4 & r && typeof t == "object" && t && t.__esModule) return t;
1107
+ var c = /* @__PURE__ */ Object.create(null);
1108
+ if (o.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: t }), 2 & r && typeof t != "string") for (var u in t) o.d(c, u, (function(n) {
1109
+ return t[n];
1110
+ }).bind(null, u));
1111
+ return c;
1112
+ }, o.n = function(t) {
528
1113
  var r = t && t.__esModule ? function() {
529
1114
  return t.default;
530
1115
  } : function() {
531
1116
  return t;
532
1117
  };
533
- return n.d(r, "a", r), r;
534
- }, n.o = function(t, r) {
1118
+ return o.d(r, "a", r), r;
1119
+ }, o.o = function(t, r) {
535
1120
  return Object.prototype.hasOwnProperty.call(t, r);
536
- }, n.p = "", n(n.s = 1);
537
- }([function(y, g, n) {
1121
+ }, o.p = "", o(o.s = 1);
1122
+ }([function(s, g, o) {
538
1123
  Object.defineProperty(g, "__esModule", { value: !0 });
539
- var t = function(r, v, h) {
540
- this._d = r, this._transform = v, this._styles = h;
1124
+ var t = function(r, c, u) {
1125
+ this._d = r, this._transform = c, this._styles = u;
541
1126
  };
542
1127
  g.default = t;
543
- }, function(y, g, n) {
1128
+ }, function(s, g, o) {
544
1129
  Object.defineProperty(g, "__esModule", { value: !0 });
545
- var t = n(2), r = n(3), v = n(4), h = { Downloader: t.default, Parser: r.default, Player: v.default };
546
- g.default = h;
547
- }, function(y, g, n) {
1130
+ var t = o(2), r = o(3), c = o(4), u = { Downloader: t.default, Parser: r.default, Player: c.default };
1131
+ g.default = u;
1132
+ }, function(s, g, o) {
548
1133
  Object.defineProperty(g, "__esModule", { value: !0 });
549
1134
  var t = function() {
550
1135
  function r() {
551
1136
  this.request = null;
552
1137
  }
553
- return r.prototype.get = function(v) {
554
- var h = this;
555
- if (!v) throw new Error("download link undefined");
556
- return new Promise(function(m, o) {
557
- var s = new XMLHttpRequest();
558
- s.open("GET", v, !0), s.responseType = "arraybuffer", s.onloadend = function() {
559
- !s.response || s.status !== 200 && s.status !== 304 ? o(s) : m(s.response);
560
- }, s.onerror = function() {
561
- return o(s.response);
562
- }, s.send(), h.request = s;
1138
+ return r.prototype.get = function(c) {
1139
+ var u = this;
1140
+ if (!c) throw new Error("download link undefined");
1141
+ return new Promise(function(n, f) {
1142
+ var a = new XMLHttpRequest();
1143
+ a.open("GET", c, !0), a.responseType = "arraybuffer", a.onloadend = function() {
1144
+ !a.response || a.status !== 200 && a.status !== 304 ? f(a) : n(a.response);
1145
+ }, a.onerror = function() {
1146
+ return f(a.response);
1147
+ }, a.send(), u.request = a;
563
1148
  });
564
1149
  }, r.prototype.cancel = function() {
565
1150
  this.request && this.request.abort();
@@ -577,39 +1162,39 @@ var svga_lite_min = { exports: {} };
577
1162
  var disableWorker = (_a === void 0 ? { disableWorker: !1 } : _a).disableWorker;
578
1163
  disableWorker ? (eval(WORKER), this.worker = window.SVGAParserMockWorker) : this.worker = new Worker(window.URL.createObjectURL(new Blob([WORKER])));
579
1164
  }
580
- return Parser.prototype.do = function(y) {
581
- var g = this, n = new Uint8Array(y, 0, 4);
582
- if (n[0] == 80 && n[1] == 75 && n[2] == 3 && n[3] == 4) throw "this parser not support version@1.x of svga.";
583
- if (!y) throw new Error("Parser Data not found");
1165
+ return Parser.prototype.do = function(s) {
1166
+ var g = this, o = new Uint8Array(s, 0, 4);
1167
+ if (o[0] == 80 && o[1] == 75 && o[2] == 3 && o[3] == 4) throw "this parser not support version@1.x of svga.";
1168
+ if (!s) throw new Error("Parser Data not found");
584
1169
  if (!this.worker) throw new Error("Parser Worker not found");
585
1170
  return new Promise(function(t, r) {
586
- var v;
587
- g.worker.disableWorker ? ((v = g.worker).onmessageCallback = function(h) {
588
- t(h);
589
- }, v.onmessage({ data: y })) : ((v = g.worker).postMessage(y), v.onmessage = function(h) {
590
- var m = h.data;
591
- t(m);
1171
+ var c;
1172
+ g.worker.disableWorker ? ((c = g.worker).onmessageCallback = function(u) {
1173
+ t(u);
1174
+ }, c.onmessage({ data: s })) : ((c = g.worker).postMessage(s), c.onmessage = function(u) {
1175
+ var n = u.data;
1176
+ t(n);
592
1177
  });
593
1178
  });
594
1179
  }, Parser.prototype.destroy = function() {
595
- var y = this.worker;
596
- y.terminate && y.terminate();
1180
+ var s = this.worker;
1181
+ s.terminate && s.terminate();
597
1182
  }, Parser;
598
1183
  }();
599
1184
  exports$1.default = Parser;
600
- }, function(y, g, n) {
1185
+ }, function(s, g, o) {
601
1186
  Object.defineProperty(g, "__esModule", { value: !0 });
602
- var t, r, v, h = n(5), m = n(9);
603
- (function(l) {
604
- l.START = "start", l.RESUME = "resume", l.PROCESS = "process", l.PAUSE = "pause", l.STOP = "stop", l.END = "end", l.CLEAR = "clear";
605
- })(t || (t = {})), function(l) {
606
- l.FORWARDS = "forwards", l.BACKWARDS = "backwards";
607
- }(r || (r = {})), function(l) {
608
- l.FORWARDS = "forwards", l.FALLBACKS = "fallbacks";
609
- }(v || (v = {}));
610
- var o = typeof window < "u" && "IntersectionObserver" in window, s = function() {
611
- function l(i, f, u) {
612
- if (this.videoItem = f, this.loop = !0, this.fillMode = r.FORWARDS, this.playMode = v.FORWARDS, this.progress = 0, this.currentFrame = 0, this.totalFramesCount = 0, this.startFrame = 0, this.endFrame = 0, this.cacheFrames = !1, this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0, this._intersectionObserver = null, this.$onEvent = { start: function() {
1187
+ var t, r, c, u = o(5), n = o(9);
1188
+ (function(d) {
1189
+ d.START = "start", d.RESUME = "resume", d.PROCESS = "process", d.PAUSE = "pause", d.STOP = "stop", d.END = "end", d.CLEAR = "clear";
1190
+ })(t || (t = {})), function(d) {
1191
+ d.FORWARDS = "forwards", d.BACKWARDS = "backwards";
1192
+ }(r || (r = {})), function(d) {
1193
+ d.FORWARDS = "forwards", d.FALLBACKS = "fallbacks";
1194
+ }(c || (c = {}));
1195
+ var f = typeof window < "u" && "IntersectionObserver" in window, a = function() {
1196
+ function d(i, m, h) {
1197
+ if (this.videoItem = m, this.loop = !0, this.fillMode = r.FORWARDS, this.playMode = c.FORWARDS, this.progress = 0, this.currentFrame = 0, this.totalFramesCount = 0, this.startFrame = 0, this.endFrame = 0, this.cacheFrames = !1, this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0, this._intersectionObserver = null, this.$onEvent = { start: function() {
613
1198
  }, resume: function() {
614
1199
  }, process: function() {
615
1200
  }, pause: function() {
@@ -618,160 +1203,160 @@ var svga_lite_min = { exports: {} };
618
1203
  }, clear: function() {
619
1204
  } }, this.container = typeof i == "string" ? document.body.querySelector(i) : i, !this.container) throw new Error("container undefined.");
620
1205
  if (!this.container.getContext) throw new Error("container should be HTMLCanvasElement.");
621
- this._renderer = new h.default(this), this._animator = new m.default(), this.videoItem && this.mount(f), u && this.set(u);
1206
+ this._renderer = new u.default(this), this._animator = new n.default(), this.videoItem && this.mount(m), h && this.set(h);
622
1207
  }
623
- return l.prototype.set = function(i) {
624
- var f = this;
625
- i.loop !== void 0 && (this.loop = i.loop), i.fillMode && (this.fillMode = i.fillMode), i.playMode && (this.playMode = i.playMode), i.cacheFrames !== void 0 && (this.cacheFrames = i.cacheFrames), this.startFrame = i.startFrame ? i.startFrame : this.startFrame, this.endFrame = i.endFrame ? i.endFrame : this.endFrame, i.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = i.intersectionObserverRender), o && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(u) {
626
- u[0].intersectionRatio <= 0 ? f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !1) : !f.intersectionObserverRenderShow && (f.intersectionObserverRenderShow = !0);
1208
+ return d.prototype.set = function(i) {
1209
+ var m = this;
1210
+ i.loop !== void 0 && (this.loop = i.loop), i.fillMode && (this.fillMode = i.fillMode), i.playMode && (this.playMode = i.playMode), i.cacheFrames !== void 0 && (this.cacheFrames = i.cacheFrames), this.startFrame = i.startFrame ? i.startFrame : this.startFrame, this.endFrame = i.endFrame ? i.endFrame : this.endFrame, i.intersectionObserverRender !== void 0 && (this.intersectionObserverRender = i.intersectionObserverRender), f && this.intersectionObserverRender ? (this._intersectionObserver = new IntersectionObserver(function(h) {
1211
+ h[0].intersectionRatio <= 0 ? m.intersectionObserverRenderShow && (m.intersectionObserverRenderShow = !1) : !m.intersectionObserverRenderShow && (m.intersectionObserverRenderShow = !0);
627
1212
  }, { rootMargin: "0px", threshold: [0, 0.5, 1] }), this._intersectionObserver.observe(this.container)) : (this._intersectionObserver && this._intersectionObserver.disconnect(), this.intersectionObserverRender = !1, this.intersectionObserverRenderShow = !0), this._animator.noExecutionDelay = i.noExecutionDelay;
628
- }, l.prototype.mount = function(i) {
629
- var f = this;
630
- return new Promise(function(u, S) {
631
- f.currentFrame = 0, f.progress = 0, f.totalFramesCount = i.frames - 1, f.videoItem = i, f._renderer.prepare().then(u), f._renderer.clear(), f._setSize();
1213
+ }, d.prototype.mount = function(i) {
1214
+ var m = this;
1215
+ return new Promise(function(h, b) {
1216
+ m.currentFrame = 0, m.progress = 0, m.totalFramesCount = i.frames - 1, m.videoItem = i, m._renderer.prepare().then(h), m._renderer.clear(), m._setSize();
632
1217
  });
633
- }, l.prototype.start = function() {
1218
+ }, d.prototype.start = function() {
634
1219
  if (!this.videoItem) throw new Error("video item undefined.");
635
1220
  this._renderer.clear(), this._startAnimation(), this.$onEvent.start();
636
- }, l.prototype.resume = function() {
1221
+ }, d.prototype.resume = function() {
637
1222
  if (!this.videoItem) throw new Error("video item undefined.");
638
1223
  this._startAnimation(), this.$onEvent.resume();
639
- }, l.prototype.pause = function() {
1224
+ }, d.prototype.pause = function() {
640
1225
  this._animator && this._animator.stop(), this.$onEvent.pause();
641
- }, l.prototype.stop = function() {
1226
+ }, d.prototype.stop = function() {
642
1227
  this._animator && this._animator.stop(), this.currentFrame = 0, this._renderer.drawFrame(this.currentFrame), this.$onEvent.stop();
643
- }, l.prototype.clear = function() {
1228
+ }, d.prototype.clear = function() {
644
1229
  this._animator && this._animator.stop(), this._renderer.clear(), this.$onEvent.clear();
645
- }, l.prototype.destroy = function() {
1230
+ }, d.prototype.destroy = function() {
646
1231
  this._animator && this._animator.stop(), this._renderer.clear(), this._animator = null, this._renderer = null, this.videoItem = null;
647
- }, l.prototype.$on = function(i, f) {
648
- var u = this;
649
- return this.$onEvent[i] = f, i === "end" && (this._animator.onEnd = function() {
650
- return u.$onEvent.end();
1232
+ }, d.prototype.$on = function(i, m) {
1233
+ var h = this;
1234
+ return this.$onEvent[i] = m, i === "end" && (this._animator.onEnd = function() {
1235
+ return h.$onEvent.end();
651
1236
  }), this;
652
- }, l.prototype._startAnimation = function() {
653
- var i = this, f = this, u = f.playMode, S = f.totalFramesCount, k = f.startFrame, a = f.endFrame, p = f.videoItem;
654
- this.currentFrame === S && (this.currentFrame = k || 0), this._animator.startValue = u === "fallbacks" ? a || S : k || 0, this._animator.endValue = u === "fallbacks" ? k || 0 : a || S;
1237
+ }, d.prototype._startAnimation = function() {
1238
+ var i = this, m = this, h = m.playMode, b = m.totalFramesCount, w = m.startFrame, l = m.endFrame, p = m.videoItem;
1239
+ this.currentFrame === b && (this.currentFrame = w || 0), this._animator.startValue = h === "fallbacks" ? l || b : w || 0, this._animator.endValue = h === "fallbacks" ? w || 0 : l || b;
655
1240
  var e = p.frames;
656
- a > 0 && a > k ? e = a - k : a <= 0 && k > 0 && (e = p.frames - k), this._animator.duration = e * (1 / p.FPS) * 1e3, this._animator.loop = this.loop === !0 || this.loop <= 0 ? 1 / 0 : this.loop === !1 ? 1 : this.loop, this._animator.fillRule = this.fillMode === "backwards" ? 1 : 0, this._animator.onUpdate = function(A) {
657
- A = Math.floor(A), i.currentFrame !== A && (i.currentFrame = A, i.progress = parseFloat((A + 1).toString()) / parseFloat(p.frames.toString()) * 100, i._renderer.drawFrame(i.currentFrame), i.$onEvent.process());
1241
+ l > 0 && l > w ? e = l - w : l <= 0 && w > 0 && (e = p.frames - w), this._animator.duration = e * (1 / p.FPS) * 1e3, this._animator.loop = this.loop === !0 || this.loop <= 0 ? 1 / 0 : this.loop === !1 ? 1 : this.loop, this._animator.fillRule = this.fillMode === "backwards" ? 1 : 0, this._animator.onUpdate = function(x) {
1242
+ x = Math.floor(x), i.currentFrame !== x && (i.currentFrame = x, i.progress = parseFloat((x + 1).toString()) / parseFloat(p.frames.toString()) * 100, i._renderer.drawFrame(i.currentFrame), i.$onEvent.process());
658
1243
  }, this._animator.start(this.currentFrame);
659
- }, l.prototype._setSize = function() {
1244
+ }, d.prototype._setSize = function() {
660
1245
  var i = this.videoItem.videoSize;
661
1246
  this.container.width = i.width, this.container.height = i.height;
662
- }, l;
1247
+ }, d;
663
1248
  }();
664
- g.default = s;
665
- }, function(y, g, n) {
1249
+ g.default = a;
1250
+ }, function(s, g, o) {
666
1251
  Object.defineProperty(g, "__esModule", { value: !0 });
667
- var t = n(6), r = function() {
668
- function v(h) {
669
- this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = h;
670
- var m = this._player.container;
671
- this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(m.width, m.height) : document.createElement("canvas");
1252
+ var t = o(6), r = function() {
1253
+ function c(u) {
1254
+ this._bitmapCache = {}, this._dynamicElements = {}, this._frames = {}, this._player = u;
1255
+ var n = this._player.container;
1256
+ this._ofsCanvas = window.OffscreenCanvas ? new window.OffscreenCanvas(n.width, n.height) : document.createElement("canvas");
672
1257
  }
673
- return v.prototype.prepare = function() {
674
- var h = this;
675
- return new Promise(function(m, o) {
676
- if (h._bitmapCache = {}, h._player.videoItem.images && Object.keys(h._player.videoItem.images).length != 0) {
677
- h._player.videoItem.dynamicElements && (h._dynamicElements = h._player.videoItem.dynamicElements);
678
- var s = 0, l = 0;
679
- for (var i in h._player.videoItem.images) {
680
- var f = h._player.videoItem.images[i];
681
- if (typeof f != "string" || f.indexOf("iVBO") !== 0 && f.indexOf("/9j/2w") !== 0) h._bitmapCache[i] = f;
1258
+ return c.prototype.prepare = function() {
1259
+ var u = this;
1260
+ return new Promise(function(n, f) {
1261
+ if (u._bitmapCache = {}, u._player.videoItem.images && Object.keys(u._player.videoItem.images).length != 0) {
1262
+ u._player.videoItem.dynamicElements && (u._dynamicElements = u._player.videoItem.dynamicElements);
1263
+ var a = 0, d = 0;
1264
+ for (var i in u._player.videoItem.images) {
1265
+ var m = u._player.videoItem.images[i];
1266
+ if (typeof m != "string" || m.indexOf("iVBO") !== 0 && m.indexOf("/9j/2w") !== 0) u._bitmapCache[i] = m;
682
1267
  else {
683
- s++;
684
- var u = document.createElement("img");
685
- u.src = "data:image/png;base64," + f, h._bitmapCache[i] = u, u.onload = function() {
686
- ++l === s && m();
1268
+ a++;
1269
+ var h = document.createElement("img");
1270
+ h.src = "data:image/png;base64," + m, u._bitmapCache[i] = h, h.onload = function() {
1271
+ ++d === a && n();
687
1272
  };
688
1273
  }
689
1274
  }
690
- } else m();
1275
+ } else n();
691
1276
  });
692
- }, v.prototype.clear = function() {
1277
+ }, c.prototype.clear = function() {
693
1278
  this._player.container.width = this._player.container.width;
694
- }, v.prototype.drawFrame = function(h) {
695
- var m = this._player;
696
- if (!m.intersectionObserverRender || m.intersectionObserverRenderShow) {
1279
+ }, c.prototype.drawFrame = function(u) {
1280
+ var n = this._player;
1281
+ if (!n.intersectionObserverRender || n.intersectionObserverRenderShow) {
697
1282
  this.clear();
698
- var o = m.container.getContext("2d");
699
- if (this._player.cacheFrames && this._frames[h]) {
700
- var s = this._frames[h];
701
- o.drawImage(s, 0, 0, s.width, s.height, 0, 0, s.width, s.height);
1283
+ var f = n.container.getContext("2d");
1284
+ if (this._player.cacheFrames && this._frames[u]) {
1285
+ var a = this._frames[u];
1286
+ f.drawImage(a, 0, 0, a.width, a.height, 0, 0, a.width, a.height);
702
1287
  } else {
703
- var l = this._ofsCanvas;
704
- if (l.width = this._player.container.width, l.height = this._player.container.height, t.default(l, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), o.drawImage(l, 0, 0, l.width, l.height, 0, 0, l.width, l.height), this._player.cacheFrames) if ("toDataURL" in l) {
705
- var i = l.toDataURL(), f = new Image();
706
- f.src = i, this._frames[h] = f;
707
- } else this._frames[h] = l.transferToImageBitmap();
1288
+ var d = this._ofsCanvas;
1289
+ if (d.width = this._player.container.width, d.height = this._player.container.height, t.default(d, this._bitmapCache, this._dynamicElements, this._player.videoItem, this._player.currentFrame), f.drawImage(d, 0, 0, d.width, d.height, 0, 0, d.width, d.height), this._player.cacheFrames) if ("toDataURL" in d) {
1290
+ var i = d.toDataURL(), m = new Image();
1291
+ m.src = i, this._frames[u] = m;
1292
+ } else this._frames[u] = d.transferToImageBitmap();
708
1293
  }
709
1294
  }
710
- }, v;
1295
+ }, c;
711
1296
  }();
712
1297
  g.default = r;
713
- }, function(y, g, n) {
1298
+ }, function(s, g, o) {
714
1299
  Object.defineProperty(g, "__esModule", { value: !0 }), g.default = void 0;
715
- var t = h(n(0)), r = h(n(7)), v = h(n(8));
716
- function h(i) {
1300
+ var t = u(o(0)), r = u(o(7)), c = u(o(8));
1301
+ function u(i) {
717
1302
  return i && i.__esModule ? i : { default: i };
718
1303
  }
719
- var m = "MLHVCSQRZmlhvcsqrz";
720
- function o(i, f) {
721
- var u = f._styles;
722
- u !== void 0 && (u && u.stroke ? i.strokeStyle = "rgba(".concat(parseInt((255 * u.stroke[0]).toString()), ", ").concat(parseInt((255 * u.stroke[1]).toString()), ", ").concat(parseInt((255 * u.stroke[2]).toString()), ", ").concat(u.stroke[3], ")") : i.strokeStyle = "transparent", u && (i.lineWidth = u.strokeWidth || void 0, i.lineCap = u.lineCap || void 0, i.lineJoin = u.lineJoin || void 0, i.miterLimit = u.miterLimit || void 0), u && u.fill ? i.fillStyle = "rgba(".concat(parseInt((255 * u.fill[0]).toString()), ", ").concat(parseInt((255 * u.fill[1]).toString()), ", ").concat(parseInt((255 * u.fill[2]).toString()), ", ").concat(u.fill[3], ")") : i.fillStyle = "transparent", u && u.lineDash && i.setLineDash(u.lineDash));
1304
+ var n = "MLHVCSQRZmlhvcsqrz";
1305
+ function f(i, m) {
1306
+ var h = m._styles;
1307
+ h !== void 0 && (h && h.stroke ? i.strokeStyle = "rgba(".concat(parseInt((255 * h.stroke[0]).toString()), ", ").concat(parseInt((255 * h.stroke[1]).toString()), ", ").concat(parseInt((255 * h.stroke[2]).toString()), ", ").concat(h.stroke[3], ")") : i.strokeStyle = "transparent", h && (i.lineWidth = h.strokeWidth || void 0, i.lineCap = h.lineCap || void 0, i.lineJoin = h.lineJoin || void 0, i.miterLimit = h.miterLimit || void 0), h && h.fill ? i.fillStyle = "rgba(".concat(parseInt((255 * h.fill[0]).toString()), ", ").concat(parseInt((255 * h.fill[1]).toString()), ", ").concat(parseInt((255 * h.fill[2]).toString()), ", ").concat(h.fill[3], ")") : i.fillStyle = "transparent", h && h.lineDash && i.setLineDash(h.lineDash));
723
1308
  }
724
- function s(i, f) {
725
- i.save(), o(i, f), f._transform !== void 0 && f._transform !== null && i.transform(f._transform.a || 1, f._transform.b || 0, f._transform.c || 0, f._transform.d || 1, f._transform.tx || 0, f._transform.ty || 0);
726
- var u = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
727
- i.beginPath(), f._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(S) {
728
- if (S.length != 0) {
729
- var k = S.substr(0, 1);
730
- if (m.indexOf(k) >= 0) {
731
- var a = S.substr(1).trim().split(" ");
732
- (function(p, e, A, d) {
733
- switch (A) {
1309
+ function a(i, m) {
1310
+ i.save(), f(i, m), m._transform !== void 0 && m._transform !== null && i.transform(m._transform.a || 1, m._transform.b || 0, m._transform.c || 0, m._transform.d || 1, m._transform.tx || 0, m._transform.ty || 0);
1311
+ var h = { x: 0, y: 0, x1: 0, y1: 0, x2: 0, y2: 0 };
1312
+ i.beginPath(), m._d.replace(/([a-zA-Z])/g, "|||$1 ").replace(/,/g, " ").split("|||").forEach(function(b) {
1313
+ if (b.length != 0) {
1314
+ var w = b.substr(0, 1);
1315
+ if (n.indexOf(w) >= 0) {
1316
+ var l = b.substr(1).trim().split(" ");
1317
+ (function(p, e, x, v) {
1318
+ switch (x) {
734
1319
  case "M":
735
- e.x = Number(d[0]), e.y = Number(d[1]), p.moveTo(e.x, e.y);
1320
+ e.x = Number(v[0]), e.y = Number(v[1]), p.moveTo(e.x, e.y);
736
1321
  break;
737
1322
  case "m":
738
- e.x += Number(d[0]), e.y += Number(d[1]), p.moveTo(e.x, e.y);
1323
+ e.x += Number(v[0]), e.y += Number(v[1]), p.moveTo(e.x, e.y);
739
1324
  break;
740
1325
  case "L":
741
- e.x = Number(d[0]), e.y = Number(d[1]), p.lineTo(e.x, e.y);
1326
+ e.x = Number(v[0]), e.y = Number(v[1]), p.lineTo(e.x, e.y);
742
1327
  break;
743
1328
  case "l":
744
- e.x += Number(d[0]), e.y += Number(d[1]), p.lineTo(e.x, e.y);
1329
+ e.x += Number(v[0]), e.y += Number(v[1]), p.lineTo(e.x, e.y);
745
1330
  break;
746
1331
  case "H":
747
- e.x = Number(d[0]), p.lineTo(e.x, e.y);
1332
+ e.x = Number(v[0]), p.lineTo(e.x, e.y);
748
1333
  break;
749
1334
  case "h":
750
- e.x += Number(d[0]), p.lineTo(e.x, e.y);
1335
+ e.x += Number(v[0]), p.lineTo(e.x, e.y);
751
1336
  break;
752
1337
  case "V":
753
- e.y = Number(d[0]), p.lineTo(e.x, e.y);
1338
+ e.y = Number(v[0]), p.lineTo(e.x, e.y);
754
1339
  break;
755
1340
  case "v":
756
- e.y += Number(d[0]), p.lineTo(e.x, e.y);
1341
+ e.y += Number(v[0]), p.lineTo(e.x, e.y);
757
1342
  break;
758
1343
  case "C":
759
- e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x2 = Number(d[2]), e.y2 = Number(d[3]), e.x = Number(d[4]), e.y = Number(d[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
1344
+ e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x2 = Number(v[2]), e.y2 = Number(v[3]), e.x = Number(v[4]), e.y = Number(v[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
760
1345
  break;
761
1346
  case "c":
762
- e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x2 = e.x + Number(d[2]), e.y2 = e.y + Number(d[3]), e.x += Number(d[4]), e.y += Number(d[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
1347
+ e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x2 = e.x + Number(v[2]), e.y2 = e.y + Number(v[3]), e.x += Number(v[4]), e.y += Number(v[5]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y);
763
1348
  break;
764
1349
  case "S":
765
- e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(d[0]), e.y2 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
1350
+ e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = Number(v[0]), e.y2 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
766
1351
  break;
767
1352
  case "s":
768
- e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(d[0]), e.y2 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
1353
+ e.x1 && e.y1 && e.x2 && e.y2 ? (e.x1 = e.x - e.x2 + e.x, e.y1 = e.y - e.y2 + e.y, e.x2 = e.x + Number(v[0]), e.y2 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), p.bezierCurveTo(e.x1, e.y1, e.x2, e.y2, e.x, e.y)) : (e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y));
769
1354
  break;
770
1355
  case "Q":
771
- e.x1 = Number(d[0]), e.y1 = Number(d[1]), e.x = Number(d[2]), e.y = Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
1356
+ e.x1 = Number(v[0]), e.y1 = Number(v[1]), e.x = Number(v[2]), e.y = Number(v[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
772
1357
  break;
773
1358
  case "q":
774
- e.x1 = e.x + Number(d[0]), e.y1 = e.y + Number(d[1]), e.x += Number(d[2]), e.y += Number(d[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
1359
+ e.x1 = e.x + Number(v[0]), e.y1 = e.y + Number(v[1]), e.x += Number(v[2]), e.y += Number(v[3]), p.quadraticCurveTo(e.x1, e.y1, e.x, e.y);
775
1360
  break;
776
1361
  case "A":
777
1362
  case "a":
@@ -780,80 +1365,80 @@ var svga_lite_min = { exports: {} };
780
1365
  case "z":
781
1366
  p.closePath();
782
1367
  }
783
- })(i, u, k, a);
1368
+ })(i, h, w, l);
784
1369
  }
785
1370
  }
786
- }), f._styles && f._styles.fill ? i.fill() : f._styles && f._styles.stroke && i.stroke(), i.restore();
1371
+ }), m._styles && m._styles.fill ? i.fill() : m._styles && m._styles.stroke && i.stroke(), i.restore();
787
1372
  }
788
- var l = function(i, f, u, S, k) {
789
- var a = i.getContext("2d");
790
- return S.sprites.forEach(function(p) {
791
- var e = p.frames[k];
1373
+ var d = function(i, m, h, b, w) {
1374
+ var l = i.getContext("2d");
1375
+ return b.sprites.forEach(function(p) {
1376
+ var e = p.frames[w];
792
1377
  if (!(e.alpha < 0.05)) {
793
- a.save(), a.globalAlpha = e.alpha, a.transform(e.transform.a || 1, e.transform.b || 0, e.transform.c || 0, e.transform.d || 1, e.transform.tx || 0, e.transform.ty || 0);
794
- var A = f[p.imageKey];
795
- A && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, s(a, e.maskPath), a.clip()), a.drawImage(A, 0, 0));
796
- var d = u[p.imageKey];
797
- d && a.drawImage(d, (e.layout.width - d.width) / 2, (e.layout.height - d.height) / 2), e.shapes && e.shapes.forEach(function(w) {
798
- w.type === "shape" && w.pathArgs && w.pathArgs.d ? s(a, new t.default(w.pathArgs.d, w.transform, w.styles)) : w.type === "ellipse" && w.pathArgs ? function(x, _) {
799
- x.save(), o(x, _), _._transform !== void 0 && _._transform !== null && x.transform(_._transform.a || 1, _._transform.b || 0, _._transform.c || 0, _._transform.d || 1, _._transform.tx || 0, _._transform.ty || 0);
800
- var N = _._x - _._radiusX, T = _._y - _._radiusY, F = 2 * _._radiusX, C = 2 * _._radiusY, D = F / 2 * 0.5522848, P = C / 2 * 0.5522848, L = N + F, V = T + C, M = N + F / 2, I = T + C / 2;
801
- x.beginPath(), x.moveTo(N, I), x.bezierCurveTo(N, I - P, M - D, T, M, T), x.bezierCurveTo(M + D, T, L, I - P, L, I), x.bezierCurveTo(L, I + P, M + D, V, M, V), x.bezierCurveTo(M - D, V, N, I + P, N, I), _._styles && _._styles.fill ? x.fill() : _._styles && _._styles.stroke && x.stroke(), x.restore();
802
- }(a, new r.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.radiusX) || 0, parseFloat(w.pathArgs.radiusY) || 0, w.transform, w.styles)) : w.type === "rect" && w.pathArgs && function(x, _) {
803
- x.save(), o(x, _), _._transform !== void 0 && _._transform !== null && x.transform(_._transform.a || 1, _._transform.b || 0, _._transform.c || 0, _._transform.d || 1, _._transform.tx || 0, _._transform.ty || 0);
804
- var N = _._x, T = _._y, F = _._width, C = _._height, D = _._cornerRadius;
805
- F < 2 * D && (D = F / 2), C < 2 * D && (D = C / 2), x.beginPath(), x.moveTo(N + D, T), x.arcTo(N + F, T, N + F, T + C, D), x.arcTo(N + F, T + C, N, T + C, D), x.arcTo(N, T + C, N, T, D), x.arcTo(N, T, N + F, T, D), x.closePath(), _._styles && _._styles.fill ? x.fill() : _._styles && _._styles.stroke && x.stroke(), x.restore();
806
- }(a, new v.default(parseFloat(w.pathArgs.x) || 0, parseFloat(w.pathArgs.y) || 0, parseFloat(w.pathArgs.width) || 0, parseFloat(w.pathArgs.height) || 0, parseFloat(w.pathArgs.cornerRadius) || 0, w.transform, w.styles));
807
- }), a.restore();
1378
+ l.save(), l.globalAlpha = e.alpha, l.transform(e.transform.a || 1, e.transform.b || 0, e.transform.c || 0, e.transform.d || 1, e.transform.tx || 0, e.transform.ty || 0);
1379
+ var x = m[p.imageKey];
1380
+ x && (e.maskPath !== void 0 && e.maskPath !== null && (e.maskPath._styles = void 0, a(l, e.maskPath), l.clip()), l.drawImage(x, 0, 0));
1381
+ var v = h[p.imageKey];
1382
+ v && l.drawImage(v, (e.layout.width - v.width) / 2, (e.layout.height - v.height) / 2), e.shapes && e.shapes.forEach(function(_) {
1383
+ _.type === "shape" && _.pathArgs && _.pathArgs.d ? a(l, new t.default(_.pathArgs.d, _.transform, _.styles)) : _.type === "ellipse" && _.pathArgs ? function(E, S) {
1384
+ E.save(), f(E, S), S._transform !== void 0 && S._transform !== null && E.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
1385
+ var T = S._x - S._radiusX, C = S._y - S._radiusY, I = 2 * S._radiusX, B = 2 * S._radiusY, O = I / 2 * 0.5522848, j = B / 2 * 0.5522848, P = T + I, R = C + B, M = T + I / 2, F = C + B / 2;
1386
+ E.beginPath(), E.moveTo(T, F), E.bezierCurveTo(T, F - j, M - O, C, M, C), E.bezierCurveTo(M + O, C, P, F - j, P, F), E.bezierCurveTo(P, F + j, M + O, R, M, R), E.bezierCurveTo(M - O, R, T, F + j, T, F), S._styles && S._styles.fill ? E.fill() : S._styles && S._styles.stroke && E.stroke(), E.restore();
1387
+ }(l, new r.default(parseFloat(_.pathArgs.x) || 0, parseFloat(_.pathArgs.y) || 0, parseFloat(_.pathArgs.radiusX) || 0, parseFloat(_.pathArgs.radiusY) || 0, _.transform, _.styles)) : _.type === "rect" && _.pathArgs && function(E, S) {
1388
+ E.save(), f(E, S), S._transform !== void 0 && S._transform !== null && E.transform(S._transform.a || 1, S._transform.b || 0, S._transform.c || 0, S._transform.d || 1, S._transform.tx || 0, S._transform.ty || 0);
1389
+ var T = S._x, C = S._y, I = S._width, B = S._height, O = S._cornerRadius;
1390
+ I < 2 * O && (O = I / 2), B < 2 * O && (O = B / 2), E.beginPath(), E.moveTo(T + O, C), E.arcTo(T + I, C, T + I, C + B, O), E.arcTo(T + I, C + B, T, C + B, O), E.arcTo(T, C + B, T, C, O), E.arcTo(T, C, T + I, C, O), E.closePath(), S._styles && S._styles.fill ? E.fill() : S._styles && S._styles.stroke && E.stroke(), E.restore();
1391
+ }(l, new c.default(parseFloat(_.pathArgs.x) || 0, parseFloat(_.pathArgs.y) || 0, parseFloat(_.pathArgs.width) || 0, parseFloat(_.pathArgs.height) || 0, parseFloat(_.pathArgs.cornerRadius) || 0, _.transform, _.styles));
1392
+ }), l.restore();
808
1393
  }
809
1394
  }), i;
810
1395
  };
811
- g.default = l;
812
- }, function(y, g, n) {
813
- var t, r = (t = function(h, m) {
814
- return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, s) {
815
- o.__proto__ = s;
816
- } || function(o, s) {
817
- for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
818
- })(h, m);
819
- }, function(h, m) {
820
- function o() {
821
- this.constructor = h;
1396
+ g.default = d;
1397
+ }, function(s, g, o) {
1398
+ var t, r = (t = function(u, n) {
1399
+ return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, a) {
1400
+ f.__proto__ = a;
1401
+ } || function(f, a) {
1402
+ for (var d in a) Object.prototype.hasOwnProperty.call(a, d) && (f[d] = a[d]);
1403
+ })(u, n);
1404
+ }, function(u, n) {
1405
+ function f() {
1406
+ this.constructor = u;
822
1407
  }
823
- t(h, m), h.prototype = m === null ? Object.create(m) : (o.prototype = m.prototype, new o());
1408
+ t(u, n), u.prototype = n === null ? Object.create(n) : (f.prototype = n.prototype, new f());
824
1409
  });
825
1410
  Object.defineProperty(g, "__esModule", { value: !0 });
826
- var v = function(h) {
827
- function m(o, s, l, i, f, u) {
828
- var S = h.call(this) || this;
829
- return S._x = o, S._y = s, S._radiusX = l, S._radiusY = i, S._transform = f, S._styles = u, S;
1411
+ var c = function(u) {
1412
+ function n(f, a, d, i, m, h) {
1413
+ var b = u.call(this) || this;
1414
+ return b._x = f, b._y = a, b._radiusX = d, b._radiusY = i, b._transform = m, b._styles = h, b;
830
1415
  }
831
- return r(m, h), m;
832
- }(n(0).default);
833
- g.default = v;
834
- }, function(y, g, n) {
835
- var t, r = (t = function(h, m) {
836
- return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, s) {
837
- o.__proto__ = s;
838
- } || function(o, s) {
839
- for (var l in s) Object.prototype.hasOwnProperty.call(s, l) && (o[l] = s[l]);
840
- })(h, m);
841
- }, function(h, m) {
842
- function o() {
843
- this.constructor = h;
1416
+ return r(n, u), n;
1417
+ }(o(0).default);
1418
+ g.default = c;
1419
+ }, function(s, g, o) {
1420
+ var t, r = (t = function(u, n) {
1421
+ return (t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, a) {
1422
+ f.__proto__ = a;
1423
+ } || function(f, a) {
1424
+ for (var d in a) Object.prototype.hasOwnProperty.call(a, d) && (f[d] = a[d]);
1425
+ })(u, n);
1426
+ }, function(u, n) {
1427
+ function f() {
1428
+ this.constructor = u;
844
1429
  }
845
- t(h, m), h.prototype = m === null ? Object.create(m) : (o.prototype = m.prototype, new o());
1430
+ t(u, n), u.prototype = n === null ? Object.create(n) : (f.prototype = n.prototype, new f());
846
1431
  });
847
1432
  Object.defineProperty(g, "__esModule", { value: !0 });
848
- var v = function(h) {
849
- function m(o, s, l, i, f, u, S) {
850
- var k = h.call(this) || this;
851
- return k._x = o, k._y = s, k._width = l, k._height = i, k._cornerRadius = f, k._transform = u, k._styles = S, k;
1433
+ var c = function(u) {
1434
+ function n(f, a, d, i, m, h, b) {
1435
+ var w = u.call(this) || this;
1436
+ return w._x = f, w._y = a, w._width = d, w._height = i, w._cornerRadius = m, w._transform = h, w._styles = b, w;
852
1437
  }
853
- return r(m, h), m;
854
- }(n(0).default);
855
- g.default = v;
856
- }, function(y, g, n) {
1438
+ return r(n, u), n;
1439
+ }(o(0).default);
1440
+ g.default = c;
1441
+ }, function(s, g, o) {
857
1442
  Object.defineProperty(g, "__esModule", { value: !0 });
858
1443
  var t = function() {
859
1444
  function r() {
@@ -864,22 +1449,22 @@ var svga_lite_min = { exports: {} };
864
1449
  }, this.onEnd = function() {
865
1450
  }, this._isRunning = !1, this._mStartTime = 0, this._currentFrication = 0, this._worker = null;
866
1451
  }
867
- return r.prototype.start = function(v) {
868
- this.doStart(v);
1452
+ return r.prototype.start = function(c) {
1453
+ this.doStart(c);
869
1454
  }, r.prototype.stop = function() {
870
1455
  this._doStop();
871
1456
  }, Object.defineProperty(r.prototype, "animatedValue", { get: function() {
872
1457
  return (this.endValue - this.startValue) * this._currentFrication + this.startValue;
873
- }, enumerable: !1, configurable: !0 }), r.prototype.doStart = function(v) {
874
- this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), v && (this._mStartTime -= v / (this.endValue - this.startValue) * this.duration), this._currentFrication = 0, this.noExecutionDelay && this._worker === null && (this._worker = new Worker(window.URL.createObjectURL(new Blob([`onmessage = function () {
1458
+ }, enumerable: !1, configurable: !0 }), r.prototype.doStart = function(c) {
1459
+ this._isRunning = !0, this._mStartTime = this._currentTimeMillsecond(), c && (this._mStartTime -= c / (this.endValue - this.startValue) * this.duration), this._currentFrication = 0, this.noExecutionDelay && this._worker === null && (this._worker = new Worker(window.URL.createObjectURL(new Blob([`onmessage = function () {
875
1460
  setTimeout(function() {postMessage(null)}, 1 / 60)
876
1461
  }`])))), this.onStart(), this._doFrame();
877
1462
  }, r.prototype._doStop = function() {
878
1463
  this._isRunning = !1, this._worker !== null && (this._worker.terminate(), this._worker = null);
879
1464
  }, r.prototype._doFrame = function() {
880
1465
  this._isRunning && (this._doDeltaTime(this._currentTimeMillsecond() - this._mStartTime), this._isRunning && (this._worker ? (this._worker.onmessage = this._doFrame.bind(this), this._worker.postMessage(null)) : window.requestAnimationFrame(this._doFrame.bind(this))));
881
- }, r.prototype._doDeltaTime = function(v) {
882
- v >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = v % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
1466
+ }, r.prototype._doDeltaTime = function(c) {
1467
+ c >= this.duration * this.loop ? (this._currentFrication = this.fillRule === 1 ? 0 : 1, this._isRunning = !1) : this._currentFrication = c % this.duration / this.duration, this.onUpdate(this.animatedValue), this._isRunning === !1 && (this._worker !== null && (this._worker.terminate(), this._worker = null), this.onEnd());
883
1468
  }, r;
884
1469
  }();
885
1470
  g.default = t;
@@ -966,308 +1551,177 @@ const _sfc_main$1 = {
966
1551
  */
967
1552
  "error"
968
1553
  ],
969
- setup(y, { expose: g, emit: n }) {
1554
+ setup(s, { expose: g, emit: o }) {
970
1555
  useCssVars((e) => ({
971
- v5ce75b7f: y.width,
972
- v26351a8e: y.height
1556
+ v404d30eb: s.width,
1557
+ a0ec1abc: s.height
973
1558
  }));
974
- const t = y, r = n, v = ref(null), h = ref(null);
975
- let m = null, o = null, s = null;
976
- const l = async () => {
1559
+ const t = s, r = o, c = ref(null), u = ref(null);
1560
+ let n = null, f = null, a = null;
1561
+ const d = async () => {
977
1562
  try {
978
- m = new svga_lite_minExports.Parser(), s = await m.load(t.src), o = new svga_lite_minExports.Player(h.value), o.loop = t.loop, o.speed = t.speed, o.onStart = () => r("play"), o.onPause = () => r("pause"), o.onEnd = () => r("ended"), o.onFrame = () => r("progress", o.progress), await o.setAnimationData(s), t.progress > 0 && (o.progress = t.progress), t.autoplay && o.start(), r("loaded");
1563
+ n = new svga_lite_minExports.Parser(), a = await n.load(t.src), f = new svga_lite_minExports.Player(u.value), f.loop = t.loop, f.speed = t.speed, f.onStart = () => r("play"), f.onPause = () => r("pause"), f.onEnd = () => r("ended"), f.onFrame = () => r("progress", f.progress), await f.setAnimationData(a), t.progress > 0 && (f.progress = t.progress), t.autoplay && f.start(), r("loaded");
979
1564
  } catch (e) {
980
1565
  console.error("SVGA 加载失败:", e), r("error", e);
981
1566
  }
982
1567
  }, i = () => {
983
- o && o.start();
984
- }, f = () => {
985
- o && o.pause();
986
- }, u = () => {
987
- o && o.stop();
988
- }, S = () => {
989
- o && (o.stop(), o.start());
990
- }, k = (e) => {
991
- o && (o.progress = e);
992
- }, a = (e) => {
993
- o && (o.speed = e);
1568
+ f && f.start();
1569
+ }, m = () => {
1570
+ f && f.pause();
1571
+ }, h = () => {
1572
+ f && f.stop();
1573
+ }, b = () => {
1574
+ f && (f.stop(), f.start());
1575
+ }, w = (e) => {
1576
+ f && (f.progress = e);
1577
+ }, l = (e) => {
1578
+ f && (f.speed = e);
994
1579
  }, p = (e) => {
995
- o && (o.loop = e);
1580
+ f && (f.loop = e);
996
1581
  };
997
1582
  return g({
998
1583
  play: i,
999
- pause: f,
1000
- stop: u,
1001
- restart: S,
1002
- setProgress: k,
1003
- setSpeed: a,
1584
+ pause: m,
1585
+ stop: h,
1586
+ restart: b,
1587
+ setProgress: w,
1588
+ setSpeed: l,
1004
1589
  setLoop: p
1005
1590
  }), watch(() => t.src, async (e) => {
1006
- e && await l();
1591
+ e && await d();
1007
1592
  }), watch(() => t.loop, (e) => {
1008
1593
  p(e);
1009
1594
  }), watch(() => t.speed, (e) => {
1010
- a(e);
1595
+ l(e);
1011
1596
  }), watch(() => t.progress, (e) => {
1012
- k(e);
1597
+ w(e);
1013
1598
  }), onMounted(async () => {
1014
- await nextTick(), await l();
1599
+ await nextTick(), await d();
1015
1600
  }), onUnmounted(() => {
1016
- o && (o.stop(), o = null), m && (m = null), s = null;
1017
- }), (e, A) => (openBlock(), createElementBlock("div", {
1601
+ f && (f.stop(), f = null), n && (n = null), a = null;
1602
+ }), (e, x) => (openBlock(), createElementBlock("div", {
1018
1603
  ref_key: "containerRef",
1019
- ref: v,
1604
+ ref: c,
1020
1605
  class: "svga-player-container"
1021
1606
  }, [
1022
1607
  createElementVNode("canvas", {
1023
1608
  ref_key: "canvasRef",
1024
- ref: h,
1609
+ ref: u,
1025
1610
  class: "svga-player-canvas"
1026
1611
  }, null, 512)
1027
1612
  ], 512));
1028
1613
  }
1029
- }, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6b83dcf1"]]), _sfc_main = {
1030
- __name: "hbis-auto-scroll-list",
1614
+ }, HbisSvgaPlayer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-94c319f8"]]), _hoisted_1 = { class: "search-dropdown" }, _hoisted_2 = ["placeholder"], _hoisted_3 = {
1615
+ key: 0,
1616
+ class: "dropdown-list"
1617
+ }, _hoisted_4 = ["onClick"], _hoisted_5 = { class: "item-text" }, _sfc_main = {
1618
+ __name: "hbis-search-input",
1031
1619
  props: {
1032
- // 列表数据数组
1033
- data: {
1620
+ list: {
1034
1621
  type: Array,
1035
1622
  default: () => []
1036
1623
  },
1037
- // 滚动速度
1038
- speed: {
1039
- type: Number,
1040
- default: 1
1041
- },
1042
- // 滚动方向:vertical(垂直)或horizontal(水平)
1043
- direction: {
1624
+ placeholder: {
1044
1625
  type: String,
1045
- default: "vertical",
1046
- validator: (y) => ["vertical", "horizontal"].includes(y)
1047
- },
1048
- // 鼠标悬停是否暂停
1049
- pauseOnHover: {
1050
- type: Boolean,
1051
- default: !0
1626
+ default: "请输入关键词搜索"
1052
1627
  },
1053
- // 列表项高度(垂直滚动时使用)
1054
- itemHeight: {
1055
- type: Number,
1056
- default: 40
1628
+ defaultValue: {
1629
+ type: String,
1630
+ default: ""
1057
1631
  },
1058
- // 列表项宽度(水平滚动时使用)
1059
- itemWidth: {
1632
+ maxHeight: {
1060
1633
  type: Number,
1061
- default: 200
1062
- },
1063
- // 容器高度
1064
- containerHeight: {
1065
- type: [Number, String],
1066
- default: 300
1067
- },
1068
- // 容器宽度
1069
- containerWidth: {
1070
- type: [Number, String],
1071
- default: "100%"
1634
+ default: 400
1072
1635
  },
1073
- // 是否循环滚动
1074
- loop: {
1636
+ showClear: {
1075
1637
  type: Boolean,
1076
1638
  default: !0
1077
- },
1078
- // 自定义列表项类名
1079
- customItemClass: {
1080
- type: String,
1081
- default: ""
1082
- },
1083
- // 自定义列表项样式
1084
- itemStyle: {
1085
- type: Object,
1086
- default: () => ({})
1087
1639
  }
1088
1640
  },
1089
- emits: ["scroll", "pause", "resume", "dragStart", "dragEnd"],
1090
- setup(y, { expose: g, emit: n }) {
1091
- const t = y, r = n, v = ref(null), h = ref(null), m = ref(!1), o = ref(null), s = ref(0), l = ref([]), i = ref(!1), f = ref(0), u = ref(0), S = ref(0), k = ref(!1), a = computed(() => ({
1092
- // 动态设置容器高度和宽度
1093
- height: typeof t.containerHeight == "number" ? `${t.containerHeight}px` : t.containerHeight,
1094
- width: typeof t.containerWidth == "number" ? `${t.containerWidth}px` : t.containerWidth,
1095
- overflow: "hidden",
1096
- // 隐藏超出部分
1097
- position: "relative"
1098
- // 相对定位,为绝对定位的内容容器提供参考
1099
- })), p = computed(() => {
1100
- const c = {
1101
- position: "absolute",
1102
- // 绝对定位,实现自由移动
1103
- transition: "none",
1104
- // 禁用过渡,使用transform实现平滑滚动
1105
- willChange: "transform"
1106
- // 告诉浏览器将要变化的属性,优化性能
1107
- };
1108
- return t.direction === "vertical" ? c.transform = `translateY(${s.value}px)` : c.transform = `translateX(${s.value}px)`, c;
1109
- }), e = () => {
1110
- if (!t.data || t.data.length === 0) {
1111
- l.value = [];
1112
- return;
1113
- }
1114
- t.loop ? l.value = [...t.data, ...t.data] : l.value = [...t.data];
1115
- }, A = () => {
1116
- if (m.value || i.value) {
1117
- o.value = requestAnimationFrame(A);
1118
- return;
1119
- }
1120
- const c = v.value, b = h.value;
1121
- if (!c || !b) {
1122
- o.value = requestAnimationFrame(A);
1123
- return;
1124
- }
1125
- const O = t.direction === "vertical" ? c.offsetHeight : c.offsetWidth, B = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1126
- if (s.value -= t.speed, t.loop)
1127
- Math.abs(s.value) >= B && (s.value = 0);
1128
- else {
1129
- const j = -(B - O);
1130
- if (s.value <= j) {
1131
- s.value = j, m.value = !0, r("scroll", s.value);
1132
- return;
1133
- }
1134
- }
1135
- r("scroll", s.value), o.value = requestAnimationFrame(A);
1136
- }, d = () => {
1137
- o.value && cancelAnimationFrame(o.value), o.value = requestAnimationFrame(A);
1138
- }, w = () => {
1139
- o.value && (cancelAnimationFrame(o.value), o.value = null);
1140
- }, x = () => {
1141
- m.value = !0, r("pause");
1142
- }, _ = () => {
1143
- m.value = !1, r("resume");
1144
- }, N = () => {
1145
- t.pauseOnHover && x();
1146
- }, T = () => {
1147
- t.pauseOnHover && !i.value && _();
1148
- }, F = (c) => {
1149
- i.value = !0, k.value = m.value, m.value = !0, f.value = t.direction === "vertical" ? c.clientY : c.clientX, u.value = f.value, S.value = s.value, r("dragStart"), document.addEventListener("mousemove", C), document.addEventListener("mouseup", D);
1150
- }, C = (c) => {
1151
- if (!i.value) return;
1152
- u.value = t.direction === "vertical" ? c.clientY : c.clientX;
1153
- const b = u.value - f.value;
1154
- s.value = S.value + b;
1155
- const O = v.value, E = h.value;
1156
- if (O && E) {
1157
- const B = t.direction === "vertical" ? O.offsetHeight : O.offsetWidth, $ = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1158
- if (t.loop)
1159
- s.value > 0 ? s.value = 0 : Math.abs(s.value) > $ && (s.value = -$);
1160
- else {
1161
- const R = -($ - B);
1162
- s.value > 0 ? s.value = 0 : s.value < R && (s.value = R);
1163
- }
1164
- }
1165
- r("scroll", s.value);
1166
- }, D = () => {
1167
- i.value && (i.value = !1, document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", D), k.value || (m.value = !1), r("dragEnd"));
1168
- }, P = (c) => {
1169
- const b = c.touches[0];
1170
- i.value = !0, k.value = m.value, m.value = !0, f.value = t.direction === "vertical" ? b.clientY : b.clientX, u.value = f.value, S.value = s.value, r("dragStart");
1171
- }, L = (c) => {
1172
- if (!i.value) return;
1173
- c.preventDefault();
1174
- const b = c.touches[0];
1175
- u.value = t.direction === "vertical" ? b.clientY : b.clientX;
1176
- const O = u.value - f.value;
1177
- s.value = S.value + O;
1178
- const E = v.value, B = h.value;
1179
- if (E && B) {
1180
- const j = t.direction === "vertical" ? E.offsetHeight : E.offsetWidth, R = (t.direction === "vertical" ? t.itemHeight : t.itemWidth) * t.data.length;
1181
- if (t.loop)
1182
- s.value > 0 ? s.value = 0 : Math.abs(s.value) > R && (s.value = -R);
1183
- else {
1184
- const z = -(R - j);
1185
- s.value > 0 ? s.value = 0 : s.value < z && (s.value = z);
1186
- }
1187
- }
1188
- r("scroll", s.value);
1189
- }, V = () => {
1190
- i.value && (i.value = !1, k.value || (m.value = !1), r("dragEnd"));
1191
- }, M = (c) => {
1192
- s.value = c;
1193
- }, I = () => {
1194
- s.value = 0;
1195
- }, W = () => {
1196
- const c = v.value;
1197
- if (c) {
1198
- const b = h.value;
1199
- if (b) {
1200
- const O = t.direction === "vertical" ? b.offsetHeight : b.offsetWidth;
1201
- s.value = -(O - c.offsetHeight);
1202
- }
1203
- }
1641
+ emits: ["clearIcon", "search", "select"],
1642
+ setup(s, { emit: g }) {
1643
+ const o = s, t = g, r = ref(o.defaultValue), c = ref(!1), u = ref(!1), n = ref([]);
1644
+ function f() {
1645
+ r.value = "", n.value = [], u.value = !1, t("clearIcon", "", []);
1646
+ }
1647
+ function a() {
1648
+ const h = r.value;
1649
+ n.value = o.list.filter(
1650
+ (b) => b.name && b.name.includes(h)
1651
+ ), u.value = n.value.length > 0, t("search", h, n.value);
1652
+ }
1653
+ function d() {
1654
+ n.value = o.list.filter(
1655
+ (h) => h.name && h.name.includes(r.value)
1656
+ ), c.value = !0, u.value = !0;
1657
+ }
1658
+ function i() {
1659
+ setTimeout(() => {
1660
+ c.value = !1, u.value = !1;
1661
+ }, 150);
1662
+ }
1663
+ function m(h) {
1664
+ r.value = h.name, u.value = !1, t("select", h);
1665
+ }
1666
+ return onMounted(() => {
1667
+ o.defaultValue && (r.value = o.defaultValue);
1668
+ }), (h, b) => {
1669
+ const w = resolveComponent("scroll-view");
1670
+ return openBlock(), createElementBlock("div", _hoisted_1, [
1671
+ createElementVNode("div", {
1672
+ class: normalizeClass(["input-wrapper", { focus: c.value }])
1673
+ }, [
1674
+ withDirectives(createElementVNode("input", {
1675
+ class: "search-input",
1676
+ placeholder: s.placeholder,
1677
+ "onUpdate:modelValue": b[0] || (b[0] = (l) => r.value = l),
1678
+ onInput: a,
1679
+ onFocus: d,
1680
+ onBlur: i
1681
+ }, null, 40, _hoisted_2), [
1682
+ [vModelText, r.value]
1683
+ ]),
1684
+ r.value && s.showClear ? (openBlock(), createElementBlock("div", {
1685
+ key: 0,
1686
+ class: "clear-icon",
1687
+ onClick: f
1688
+ }, "×")) : createCommentVNode("", !0)
1689
+ ], 2),
1690
+ u.value && n.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
1691
+ createVNode(w, {
1692
+ "scroll-y": "",
1693
+ style: normalizeStyle({ maxHeight: s.maxHeight + "px" })
1694
+ }, {
1695
+ default: withCtx(() => [
1696
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (l, p) => (openBlock(), createElementBlock("div", {
1697
+ key: p,
1698
+ class: "dropdown-item",
1699
+ onClick: (e) => m(l)
1700
+ }, [
1701
+ createElementVNode("span", _hoisted_5, toDisplayString(l.name), 1)
1702
+ ], 8, _hoisted_4))), 128))
1703
+ ]),
1704
+ _: 1
1705
+ }, 8, ["style"])
1706
+ ])) : createCommentVNode("", !0)
1707
+ ]);
1204
1708
  };
1205
- return watch(() => t.data, () => {
1206
- e(), s.value = 0;
1207
- }, { deep: !0 }), watch(() => t.speed, () => {
1208
- m.value || (w(), d());
1209
- }), onMounted(() => {
1210
- e(), nextTick(() => {
1211
- d();
1212
- const c = v.value;
1213
- c && (c.addEventListener("mouseenter", N), c.addEventListener("mouseleave", T));
1214
- });
1215
- }), onUnmounted(() => {
1216
- w();
1217
- const c = v.value;
1218
- c && (c.removeEventListener("mouseenter", N), c.removeEventListener("mouseleave", T)), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", D);
1219
- }), g({
1220
- pause: x,
1221
- // 暂停滚动
1222
- resume: _,
1223
- // 恢复滚动
1224
- scrollTo: M,
1225
- // 滚动到指定位置
1226
- scrollToTop: I,
1227
- // 滚动到顶部
1228
- scrollToBottom: W,
1229
- // 滚动到底部
1230
- isPaused: m,
1231
- // 是否暂停(响应式)
1232
- isDragging: i
1233
- // 是否正在拖拽(响应式)
1234
- }), (c, b) => (openBlock(), createElementBlock("div", {
1235
- class: "hbis-auto-scroll-list",
1236
- ref_key: "containerRef",
1237
- ref: v,
1238
- style: normalizeStyle(a.value),
1239
- onMousedown: F,
1240
- onTouchstart: P,
1241
- onTouchmove: L,
1242
- onTouchend: V
1243
- }, [
1244
- createElementVNode("div", {
1245
- class: "scroll-content",
1246
- ref_key: "contentRef",
1247
- ref: h,
1248
- style: normalizeStyle(p.value)
1249
- }, [
1250
- (openBlock(!0), createElementBlock(Fragment, null, renderList(l.value, (O, E) => renderSlot(c.$slots, "item", {
1251
- item: O,
1252
- index: E
1253
- }, () => [
1254
- createElementVNode("div", {
1255
- class: "default-item",
1256
- style: normalizeStyle(y.itemStyle)
1257
- }, toDisplayString(O), 5)
1258
- ], !0)), 256))
1259
- ], 4)
1260
- ], 36));
1261
1709
  }
1262
- }, HbisAutoScrollList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d23f102b"]]);
1710
+ };
1263
1711
  export {
1264
1712
  C1,
1265
1713
  C2,
1266
1714
  HbisAutoScrollList,
1715
+ HbisSmsInput,
1267
1716
  HbisSvgaPlayer,
1717
+ HbisWaterfall,
1268
1718
  HbisAutoScrollList as hbisAutoScrollList,
1269
1719
  hbisDateStrip,
1270
- _sfc_main$2 as hbisPreviewImage,
1271
- HbisSvgaPlayer as hbisSvgaPlayer
1720
+ hbisLoading,
1721
+ _sfc_main$6 as hbisPreviewImage,
1722
+ _sfc_main as hbisSearchInput,
1723
+ HbisSmsInput as hbisSmsInput,
1724
+ HbisSvgaPlayer as hbisSvgaPlayer,
1725
+ HbisWaterfall as hbisWaterfall
1272
1726
  };
1273
1727
  //# sourceMappingURL=index.es.js.map