@a-drowned-fish/rox-v 1.0.39 → 1.0.40

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.
Files changed (28) hide show
  1. package/README.md +60 -0
  2. package/dist/es/components.js +4 -2
  3. package/dist/es/count-down/count-down.js +5 -0
  4. package/dist/es/count-down/count-down.vue_vue_type_script_setup_true_lang.js +28 -0
  5. package/dist/es/count-down/index.js +7 -0
  6. package/dist/es/count-down/style.css.js +0 -0
  7. package/dist/es/index.js +6 -5
  8. package/dist/es/node_modules/.pnpm/fish-helper@1.0.3/node_modules/fish-helper/dist/es/index.js +369 -0
  9. package/dist/es/toast/toast-item.vue_vue_type_script_setup_true_lang.js +12 -13
  10. package/dist/es/toast/toast.js +38 -21
  11. package/dist/index.js +1 -1
  12. package/dist/lib/components.js +1 -1
  13. package/dist/lib/count-down/count-down.js +1 -0
  14. package/dist/lib/count-down/count-down.vue_vue_type_script_setup_true_lang.js +1 -0
  15. package/dist/lib/count-down/index.js +1 -0
  16. package/dist/lib/count-down/style.css.js +0 -0
  17. package/dist/lib/index.js +1 -1
  18. package/dist/lib/node_modules/.pnpm/fish-helper@1.0.3/node_modules/fish-helper/dist/es/index.js +1 -0
  19. package/dist/lib/toast/toast-item.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/lib/toast/toast.js +1 -1
  21. package/dist/types/components/components.d.ts +2 -0
  22. package/dist/types/components/count-down/count-down.vue.d.ts +12 -0
  23. package/dist/types/components/count-down/index.d.ts +5 -0
  24. package/dist/types/components/count-down/style.css.d.ts +1 -0
  25. package/dist/types/components/count-down/types.d.ts +3 -0
  26. package/dist/types/components/toast/toast.d.ts +6 -5
  27. package/dist/types/components/toast/types.d.ts +2 -0
  28. package/package.json +4 -1
package/README.md CHANGED
@@ -1040,6 +1040,66 @@ interface RoxVSliderCaptchaTrackItem {
1040
1040
  | reset | 重置滑块位置、验证结果 | `() => void` |
1041
1041
  | tracks | 滑块移动轨迹数组 | `RoxVSliderCaptchaTrackItem[]` |
1042
1042
 
1043
+ ### CountDown - 倒计时组件
1044
+
1045
+ 一个基于剩余秒数的倒计时组件,支持自定义显示格式和初始时间。
1046
+
1047
+ #### 基础用法
1048
+
1049
+ ```vue
1050
+ <template>
1051
+ <CountDown v-model="seconds" :tick="formatTime" />
1052
+ </template>
1053
+
1054
+ <script setup lang="ts">
1055
+ import { ref } from "vue";
1056
+ import { CountDown } from "@a-drowned-fish/rox-v";
1057
+
1058
+ const seconds = ref(120);
1059
+
1060
+ const formatTime = (remainingSeconds: number) => {
1061
+ const minutes = Math.floor(remainingSeconds / 60);
1062
+ const secs = remainingSeconds % 60;
1063
+ return `${minutes.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
1064
+ };
1065
+ </script>
1066
+ ```
1067
+
1068
+ #### Props
1069
+
1070
+ | 属性 | 说明 | 类型 | 默认值 |
1071
+ | ------- | ------------------ | ----------------------------- | ------------------------------------------------------------------------------------------------- |
1072
+ | v-model | 当前剩余秒数 | `number \| undefined` | `undefined` (用于区别初始状态、倒计时开始时和结束以及过程中都是 `number`类型,以便于初始化UI界面) |
1073
+ | tick | 自定义显示格式函数 | `(seconds: number) => string` | - |
1074
+
1075
+ #### 示例:OTP 倒计时
1076
+
1077
+ ```vue
1078
+ <template>
1079
+ <div>
1080
+ <CountDown v-model="countdown" :tick="formatCountdown" />
1081
+ <Button @click="resetCountdown" :disabled="countdown > 0">
1082
+ {{ countdown > 0 ? `${countdown}秒后重新获取` : "重新获取" }}
1083
+ </Button>
1084
+ </div>
1085
+ </template>
1086
+
1087
+ <script setup lang="ts">
1088
+ import { ref } from "vue";
1089
+ import { CountDown, Button } from "@a-drowned-fish/rox-v";
1090
+
1091
+ const countdown = ref(60);
1092
+
1093
+ const formatCountdown = (seconds: number) => {
1094
+ return `剩余 ${seconds} 秒`;
1095
+ };
1096
+
1097
+ const resetCountdown = () => {
1098
+ countdown.value = 60;
1099
+ };
1100
+ </script>
1101
+ ```
1102
+
1043
1103
  ## License
1044
1104
 
1045
1105
  MIT
@@ -10,10 +10,12 @@ import { useToast as c } from "./toast/toast.js";
10
10
  import l from "./toast/index.js";
11
11
  import u from "./loading/index.js";
12
12
  import d from "./slider-captcha/index.js";
13
+ import f from "./count-down/index.js";
13
14
  //#region components/components.ts
14
- var f = /* @__PURE__ */ e({
15
+ var p = /* @__PURE__ */ e({
15
16
  Button: () => r,
16
17
  Collapse: () => i,
18
+ CountDown: () => f,
17
19
  Input: () => a,
18
20
  InputOtp: () => t,
19
21
  Loading: () => u,
@@ -25,4 +27,4 @@ var f = /* @__PURE__ */ e({
25
27
  useToast: () => c
26
28
  });
27
29
  //#endregion
28
- export { f as components_exports };
30
+ export { p as components_exports };
@@ -0,0 +1,5 @@
1
+ import e from "./count-down.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/count-down/count-down.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,28 @@
1
+ import { e } from "../node_modules/.pnpm/fish-helper@1.0.3/node_modules/fish-helper/dist/es/index.js";
2
+ import { createElementBlock as t, defineComponent as n, mergeModels as r, openBlock as i, useModel as a, watch as o } from "vue";
3
+ //#region components/count-down/count-down.vue?vue&type=script&setup=true&lang.ts
4
+ var s = ["innerHTML"], c = /* @__PURE__ */ n({
5
+ name: "CountDown",
6
+ __name: "count-down",
7
+ props: /* @__PURE__ */ r({ tick: { type: Function } }, {
8
+ modelValue: {
9
+ type: Number,
10
+ default: void 0
11
+ },
12
+ modelModifiers: {}
13
+ }),
14
+ emits: ["update:modelValue"],
15
+ setup(n) {
16
+ let r = a(n, "modelValue"), c = n;
17
+ function l() {
18
+ r.value !== null && e.count_down_by_remain_seconds(({ remain: e }) => {
19
+ e > 0 && (r.value = Math.floor(e / 1e3));
20
+ }, r.value);
21
+ }
22
+ return o(r, () => {
23
+ l();
24
+ }), (e, n) => (i(), t("div", { innerHTML: r.value !== void 0 && r.value !== null ? c.tick(r.value) : "" }, null, 8, s));
25
+ }
26
+ });
27
+ //#endregion
28
+ export { c as default };
@@ -0,0 +1,7 @@
1
+ import e from "./count-down.js";
2
+ import "./style.css";
3
+ //#region components/count-down/index.ts
4
+ e.install = (t) => (e.name && t.component(e.name, e), t);
5
+ var t = e;
6
+ //#endregion
7
+ export { t as default };
File without changes
package/dist/es/index.js CHANGED
@@ -9,12 +9,13 @@ import { useToast as s } from "./toast/toast.js";
9
9
  import c from "./toast/index.js";
10
10
  import l from "./loading/index.js";
11
11
  import u from "./slider-captcha/index.js";
12
- import { components_exports as d } from "./components.js";
12
+ import d from "./count-down/index.js";
13
+ import { components_exports as f } from "./components.js";
13
14
  /* empty css */
14
15
  //#region components/index.ts
15
- var f = (e) => (Object.keys(d).forEach((t) => {
16
- let n = d[t];
16
+ var p = (e) => (Object.keys(f).forEach((t) => {
17
+ let n = f[t];
17
18
  n.install && e.use(n);
18
- }), e), p = { install: f };
19
+ }), e), m = { install: p };
19
20
  //#endregion
20
- export { n as Button, r as Collapse, i as Input, e as InputOtp, l as Loading, a as Menu, t as Popup, u as SliderCaptcha, o as Tab, c as Toaster, p as default, f as install, s as useToast };
21
+ export { n as Button, r as Collapse, d as CountDown, i as Input, e as InputOtp, l as Loading, a as Menu, t as Popup, u as SliderCaptcha, o as Tab, c as Toaster, m as default, p as install, s as useToast };
@@ -0,0 +1,369 @@
1
+ //#region ../../node_modules/.pnpm/fish-helper@1.0.3/node_modules/fish-helper/dist/es/index.js
2
+ var e = t;
3
+ (function(e, n) {
4
+ let r = t, i = e();
5
+ for (;;) try {
6
+ if (-parseInt(r(212)) / 1 + -parseInt(r(142)) / 2 + -parseInt(r(195)) / 3 + -parseInt(r(189)) / 4 + -parseInt(r(183)) / 5 + -parseInt(r(166)) / 6 * (parseInt(r(147)) / 7) + parseInt(r(127)) / 8 === n) break;
7
+ i.push(i.shift());
8
+ } catch {
9
+ i.push(i.shift());
10
+ }
11
+ })(i, 429233);
12
+ function t(e, t) {
13
+ return e -= 127, i()[e];
14
+ }
15
+ var n = () => null, r = new class {
16
+ constructor() {
17
+ let e = t;
18
+ this[e(172)] = 1e3, this[e(181)] = 36e5, this[e(184)] = null, this[e(165)] = null, this.__get_type = (t) => Object[e(136)][e(141)][e(134)](t)[e(139)](8, -1), this[e(158)] = (t) => {
19
+ let n = e;
20
+ if (!t) return Date[n(217)]();
21
+ let r = null;
22
+ r = typeof t == "string" ? t[n(173)](/(\-|\_)/g, "/") : new Date(t);
23
+ let i = new Date(r);
24
+ return i[n(141)]() === "Invalid Date" && (i = new Date(t)), i.getTime();
25
+ }, this[e(196)] = (t) => e(219) === this[e(200)](t), this.__is_array = (t) => e(190) === this.__get_type(t), this[e(203)] = (t) => this[e(200)](t) === "Object", this[e(191)] = (e) => String(e).padStart(2, "0"), this[e(131)] = ({ date: t, hour: n = 1, type: r = "before_lt_hour" }) => {
26
+ let i = e, a = this.__date2timestamp(t), o = new Date(a)[i(170)](), s = Date[i(217)](), c = o < s, l = o > s;
27
+ return i(156) === r ? c && o + this[i(181)] * n > s : i(223) === r ? c && o + this.__an_hour * n < s : i(135) === r ? l && s + this[i(181)] * n > o : i(137) === r && l && s + this.__an_hour * n < o;
28
+ }, this[e(155)] = (t, n = e(178)) => {
29
+ let r = e, i = Math[r(162)](Date[r(217)]() - this.__date2timestamp(t)), a = this[r(130)](i);
30
+ return n === "day" ? this[r(191)](a[r(220)]) : r(157) === n ? this[r(191)](a[r(157)]) : r(178) === n ? this[r(191)](a[r(178)]) : r(221) === n ? this[r(191)](a.seconds) : "The second parameter has an error";
31
+ }, this[e(133)] = (t = 0, r = n, i = this[e(172)], a = 0, o = Date[e(217)]()) => {
32
+ let s = e;
33
+ if (t <= 0) return clearTimeout(this[s(165)]), void (this[s(165)] = null);
34
+ clearTimeout(this[s(165)]), this[s(165)] = setTimeout(() => {
35
+ let e = s;
36
+ a += 1, t -= this[e(172)];
37
+ let n = this[e(167)](t);
38
+ r({
39
+ remain: t,
40
+ obj: n
41
+ });
42
+ let i = Date[e(217)]() - (o + a * this[e(172)]), c = this[e(172)] - i;
43
+ c < 0 && (c = 0), this[e(133)](t, r, c, a, o);
44
+ }, i);
45
+ }, this.__loop_time = (t = 0, r = n, i = this[e(172)], a = 0, o = Date[e(217)]()) => {
46
+ let s = e;
47
+ if (t <= 0) return clearTimeout(this[s(184)]), void (this[s(184)] = null);
48
+ clearTimeout(this[s(184)]), this[s(184)] = setTimeout(() => {
49
+ let e = s;
50
+ a += 1, t -= this.__interval;
51
+ let n = this.format_num2date(t);
52
+ r({
53
+ remain: t,
54
+ obj: n
55
+ });
56
+ let i = Date[e(217)]() - (o + a * this[e(172)]), c = this[e(172)] - i;
57
+ c < 0 && (c = 0), this[e(207)](t, r, c, a, o);
58
+ }, i);
59
+ }, this[e(208)] = (e) => new Promise((t) => setTimeout(t, e)), this[e(143)] = (t, n = "万") => t < 1e4 ? t : (Math.floor(t / 1e3) / 10)[e(129)](1) + n, this[e(149)] = (t, n, r = !1) => {
60
+ let i = e;
61
+ if (!Array[i(140)](t) || n <= 0) return [];
62
+ let a = [];
63
+ for (let e = 0; e < t[i(159)]; e += n) {
64
+ let o = t[i(139)](e, e + n);
65
+ r ? o[i(159)] === n && a[i(205)](o) : a[i(205)](o);
66
+ }
67
+ return a;
68
+ }, this[e(193)] = (e, n = 200, r = !1) => {
69
+ let i, a = null;
70
+ return function(...o) {
71
+ let s = t, c = this, l = r && !a;
72
+ return a && clearTimeout(a), a = setTimeout(() => {
73
+ let n = t;
74
+ a = null, r || (i = e[n(213)](c, o));
75
+ }, n), l && (i = e[s(213)](c, o)), i;
76
+ };
77
+ }, this[e(211)] = (e, n = !1) => {
78
+ let r = [];
79
+ return e.forEach((e) => {
80
+ let i = t;
81
+ n && Array.isArray(e) ? r = r.concat(this[i(211)](e, n)) : r.push(e);
82
+ }), r;
83
+ }, this[e(177)] = (t, n) => t && t.then ? t.catch ? t.then((e) => [null, e])[e(144)]((e) => (n && Object.assign(e, n), [e, void 0])) : t.then((e) => [null, e]) : Promise.resolve([null, t]), this[e(197)] = (t) => {
84
+ let n = e, { str: r, likeStr: i, separator: a = "-", caseSensitive: o = !1, symbol: s = "" } = t, c = (i || "").split(a), l = (r || "").split(a);
85
+ return c[n(188)]((e, t) => e === s || (o ? e === l[t] : l[t] && e[n(187)]() === l[t][n(187)]()));
86
+ }, this.convertArr2Disable = (t) => {
87
+ let n = e, r = [], { skuObjArr: i = [], skuArrField: a, checkedIndexArr: o = [], combineSkuArr: s = [], disabledArr: c = [], combineSeparator: l = "-", combineSkuField: u = "id" } = t;
88
+ for (let e = 0; e < i[n(159)]; e++) {
89
+ let t = a ? i[e]?.[a] || [] : i[e] || [];
90
+ Array[n(140)](r[e]) || (r[e] = []);
91
+ for (let i = 0; i < t[n(159)]; i++) {
92
+ let t = o.slice(0, e), a = o[n(139)](e + 1), d = t[n(171)](i)[n(171)](a)[n(194)](l), f = s[n(146)]((e) => this.checkPattern({
93
+ str: e[u],
94
+ likeStr: d,
95
+ separator: l
96
+ })), p = c[n(179)]((e) => {
97
+ let t = n, { field: r, disabledFun: i, disabledFieldValue: a } = e, o = f[t(210)]((e) => i(e));
98
+ return { [r]: o ? a : !a };
99
+ }).reduce((e, t) => Object[n(151)](Object[n(151)]({}, e), t), {});
100
+ r[e][i] = p;
101
+ }
102
+ }
103
+ return r;
104
+ }, this[e(186)] = (t) => {
105
+ let n = e, r = null, i = new Proxy(t, { construct: (e, t) => r || (r = n(192) != typeof Reflect && Reflect[n(160)] ? Reflect[n(160)](e, t) : new e(...t), r) });
106
+ return i.prototype[n(161)] = i, i;
107
+ }, this.findDeepValue = (t) => {
108
+ let n = e, { list: r, selected: i, selectedValueInListFieldName: a, childrenFieldName: o } = t;
109
+ if (!i.length) return;
110
+ let s = i[i[n(159)] - 1], c = (e) => {
111
+ let t = n;
112
+ for (let n of e) {
113
+ if (n[a] === s) return n;
114
+ let e = n[o];
115
+ if (Array.isArray(e) && e[t(159)]) {
116
+ let t = c(e);
117
+ if (t) return t;
118
+ }
119
+ }
120
+ };
121
+ return c(r);
122
+ }, this[e(214)] = (t, n = /\{([^}]+)\}/g) => {
123
+ let r = e;
124
+ if (t == null) return [];
125
+ let i = String(t);
126
+ if (!i) return [];
127
+ let a = n instanceof RegExp ? n : new RegExp(n[r(198)]("/") && n[r(182)]("/") ? n.slice(1, -1) : n[r(173)](/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), o = [], s;
128
+ for (; (s = a.exec(i)) !== null;) {
129
+ let e = s[1] || s[0];
130
+ e && !/^\d+$/[r(148)](e) && o.push(e);
131
+ }
132
+ return o;
133
+ }, this[e(209)] = (t, n, r = /\{([^}]+)\}/g) => {
134
+ let i = e;
135
+ if (t == null) return "";
136
+ let a = String(t), o = r instanceof RegExp ? r : new RegExp(r[i(198)]("/") && r.endsWith("/") ? r.slice(1, -1) : r[i(173)](/[.*+?^${}()|[\]\\]/g, i(216)), "g");
137
+ if (i(128) == typeof n) {
138
+ let e = 0;
139
+ return a[i(173)](o, (...t) => {
140
+ let [r, ...i] = t, a = n(r, e, ...i);
141
+ return e++, a;
142
+ });
143
+ }
144
+ if (Array[i(140)](n)) {
145
+ let e = 0;
146
+ return a.replace(o, () => n[e++] ?? "");
147
+ }
148
+ return a[i(173)](o, n);
149
+ };
150
+ }
151
+ before_lt_hour(e = Date.now(), n = 1) {
152
+ let r = t;
153
+ return this[r(131)]({
154
+ date: e,
155
+ hour: n,
156
+ type: r(156)
157
+ });
158
+ }
159
+ before_gt_hour(t = Date[e(217)](), n = 1) {
160
+ let r = e;
161
+ return this.__compare_time({
162
+ date: t,
163
+ hour: n,
164
+ type: r(223)
165
+ });
166
+ }
167
+ [e(135)](t = Date[e(217)](), n = 1) {
168
+ return this.__compare_time({
169
+ date: t,
170
+ hour: n,
171
+ type: "after_lt_hour"
172
+ });
173
+ }
174
+ [e(137)](t = Date.now(), n = 1) {
175
+ let r = e;
176
+ return this.__compare_time({
177
+ date: t,
178
+ hour: n,
179
+ type: r(137)
180
+ });
181
+ }
182
+ [e(163)](t) {
183
+ let n = e, r = this[n(158)](t);
184
+ return (/* @__PURE__ */ new Date()).getFullYear() === new Date(r)[n(168)]();
185
+ }
186
+ get_time_obj(t) {
187
+ let n = e, r = this[n(158)](t), i = new Date(r), a = this[n(191)](i[n(150)]() + 1), o = this[n(191)](i[n(138)]()), s = this[n(191)](i[n(176)]()), c = this[n(191)](i[n(218)]()), l = this[n(191)](i[n(175)]());
188
+ return {
189
+ year: String(i[n(168)]()),
190
+ month: a,
191
+ day: o,
192
+ hour: s,
193
+ minute: c,
194
+ seconds: l,
195
+ day_of_week: String(i[n(132)]())
196
+ };
197
+ }
198
+ [e(185)]({ num: t = 0, decimal: n = 1, divide: r = 1e4, suffix: i = "万", show_suffix_always: a = !1 }) {
199
+ let o = e;
200
+ if (!t) return 0;
201
+ if (r <= 0 || n < 0) return a ? t + " " + i : t;
202
+ let s = parseFloat(t);
203
+ if (s <= 0 || s > 0 && s < r) return a ? s + " " + i : s;
204
+ let [c, l] = (s / r)[o(129)](n)[o(169)](".");
205
+ return l && parseFloat(l) !== 0 ? c + "." + l + " " + i : c + " " + i;
206
+ }
207
+ format_num2date(t = Date[e(217)]()) {
208
+ let n = e, r = parseInt(t / 1e3 / 60 / 60 / 24 % 24), i = parseInt(t / 1e3 / 60 / 60 % 24), a = parseInt(t / 1e3 / 60 % 60), o = parseInt(t / 1e3 % 60);
209
+ return {
210
+ day: this[n(191)](r),
211
+ hour: this[n(191)](i),
212
+ minute: this[n(191)](a),
213
+ seconds: this[n(191)](o)
214
+ };
215
+ }
216
+ [e(201)](r = n, i = 60) {
217
+ let a = e, o;
218
+ clearTimeout(o);
219
+ let s = 1e3 * i, c = this[a(130)](s), l = {
220
+ remain: s,
221
+ obj: c
222
+ };
223
+ r(l);
224
+ let u = this;
225
+ return function e(r = 0, i = n, d = 1e3, f = 0, p = Date[a(217)]()) {
226
+ if (r <= 0) return clearTimeout(o), u = null, o = null, s = null, c = null, l = null, void i({
227
+ remain: 0,
228
+ obj: {
229
+ day: "00",
230
+ hour: "00",
231
+ minute: "00",
232
+ seconds: "00"
233
+ }
234
+ });
235
+ clearTimeout(o), o = setTimeout(() => {
236
+ let n = t;
237
+ f += 1, r -= 1e3;
238
+ let a = u.format_num2date(r);
239
+ i({
240
+ remain: r,
241
+ obj: a
242
+ });
243
+ let o = 1e3 - (Date[n(217)]() - (p + 1e3 * f));
244
+ o < 0 && (o = 0), e(r, i, o, f, p);
245
+ }, d);
246
+ }(s, r, 1e3), () => {
247
+ clearTimeout(o), u = null, o = null, s = null, c = null, l = null;
248
+ };
249
+ }
250
+ format_timestamp_to_day_hour_minute_second(t = Date[e(217)]()) {
251
+ let n = e, r = Math[n(145)](t / 864e5), i = Math[n(145)](t % 864e5 / 36e5), a = Math[n(145)](t % 36e5 / 6e4), o = Math[n(145)](t % 6e4 / 1e3);
252
+ return {
253
+ day: this[n(191)](r),
254
+ hour: this[n(191)](i),
255
+ minute: this[n(191)](a),
256
+ seconds: this[n(191)](o)
257
+ };
258
+ }
259
+ [e(154)](r = Date.now(), i = n) {
260
+ let a = e, o;
261
+ clearTimeout(o);
262
+ let s = this, c = this[a(158)](r), l = c - Date[a(217)](), u = this.format_timestamp_to_day_hour_minute_second(l), d = {
263
+ remain: l,
264
+ obj: u
265
+ };
266
+ return i(d), function e(r = 0, i = n, f = 1e3, p = 0, m = Date[a(217)]()) {
267
+ if (r <= 0) return clearTimeout(o), o = null, s = null, c = null, l = null, u = null, d = null, void i({
268
+ remain: 0,
269
+ obj: {
270
+ day: "00",
271
+ hour: "00",
272
+ minute: "00",
273
+ seconds: "00"
274
+ }
275
+ });
276
+ clearTimeout(o), o = setTimeout(() => {
277
+ let n = t;
278
+ p += 1, r -= 1e3;
279
+ let a = s[n(167)](r);
280
+ i({
281
+ remain: r,
282
+ obj: a
283
+ });
284
+ let o = 1e3 - (Date.now() - (m + 1e3 * p));
285
+ o < 0 && (o = 0), e(r, i, o, p, m);
286
+ }, f);
287
+ }(l, i, 1e3), () => {
288
+ clearTimeout(o), o = null, s = null, c = null, l = null, u = null, d = null;
289
+ };
290
+ }
291
+ [e(174)](t = 1, n = Date[e(217)]()) {
292
+ let r = e;
293
+ return this[r(158)](n) + 60 * t * 60 * 1e3;
294
+ }
295
+ format_thousandth(t, n = 2) {
296
+ let r = e;
297
+ try {
298
+ let e = parseFloat(t), i = e[r(141)]()[r(169)]("."), a = !1, o = "";
299
+ i[1] && (o = i[1][r(173)](/0+$/, ""), a = o[r(159)] > 0);
300
+ let s = 0;
301
+ a && (s = n === void 0 ? o[r(159)] : n);
302
+ let c = e[r(129)](s)[r(169)]("."), l = (c[0] || "")[r(173)](/(\d)(?=(\d{3})+$)/g, r(222));
303
+ return c[1] ? l + "." + c[1] : l;
304
+ } catch {
305
+ return 0;
306
+ }
307
+ }
308
+ [e(180)](t) {
309
+ let n = e;
310
+ try {
311
+ let e = t[n(141)]()[n(169)](".")[1]?.[n(159)] || 0, r = t.toString()[n(173)](/\d+/, function(e) {
312
+ return e.replace(/(\d)(?=(\d{3})+$)/g, function(e) {
313
+ return e + ",";
314
+ });
315
+ });
316
+ return e && (r = r[n(173)](/\d+\.\d+/, function(e) {
317
+ return e[n(173)](/(\d)(?=(\d{3})+\.)/g, function(e) {
318
+ return e + ",";
319
+ });
320
+ })), r;
321
+ } catch {
322
+ return 0;
323
+ }
324
+ }
325
+ is_empty(t) {
326
+ let n = e;
327
+ return t == null || (n(202) === this[n(200)](t) ? !t[n(153)]() : n(190) === this[n(200)](t) ? !t[n(159)] : n(152) === this.__get_type(t) && !Object[n(199)](t)[n(159)]);
328
+ }
329
+ [e(204)](e, t = 1) {
330
+ let n;
331
+ if (!this.__is_function(e)) return () => {
332
+ clearTimeout(n), n = void 0;
333
+ };
334
+ let r = 60 * t * 1e3, i = () => {
335
+ e(), n = setTimeout(i, r);
336
+ };
337
+ return i(), () => {
338
+ clearTimeout(n), n = void 0;
339
+ };
340
+ }
341
+ [e(164)](t, n, r = !1) {
342
+ let i = e, a = this.__is_array(t) || this.__is_object(t), o = this.__is_array(n) || this[i(203)](n);
343
+ if (!a || !o) return r ? t === n : t == n;
344
+ let s = Object[i(199)](t), c = Object[i(199)](n);
345
+ return s.length === 0 && c[i(159)] === 0 || s[i(159)] === c[i(159)] && s[i(188)]((e) => {
346
+ let a = i, o = this[a(215)](t[e]) || this[a(203)](t[e]), s = this[a(215)](n[e]) || this[a(203)](n[e]);
347
+ return o && s ? this[a(164)](t[e], n[e], r) : r ? t[e] === n[e] : t[e] == n[e];
348
+ });
349
+ }
350
+ [e(206)](t, n, r = !1) {
351
+ let i = e, a = this[i(215)](t) || this[i(203)](t), o = this[i(215)](n) || this[i(203)](n);
352
+ if (!a || !o) return r ? t === n : t == n;
353
+ let s = Object[i(199)](t), c = Object[i(199)](n);
354
+ return c[i(159)] === 0 || !(s[i(159)] === 0 || s[i(159)] < c[i(159)]) && c.every((e) => {
355
+ let a = i;
356
+ if (s[a(224)](e) < 0) return !1;
357
+ let o = this[a(215)](t[e]) || this.__is_object(t[e]), c = this[a(215)](n[e]) || this[a(203)](n[e]);
358
+ return o && c ? this.contains(t[e], n[e], r) : r ? t[e] === n[e] : t[e] == n[e];
359
+ });
360
+ }
361
+ }();
362
+ function i() {
363
+ let e = /* @__PURE__ */ "327505sDNCXJ.__ticker.format_count.createSingleTon.toLowerCase.every.3009460DcxozV.Array.__get_suffix2.undefined.debounce.join.2511663bGiTKv.__is_function.checkPattern.startsWith.keys.__get_type.count_down_by_remain_seconds.String.__is_object.poll.push.contains.__loop_time.sleep.replaceTemplate.some.flatten.432270ikWknR.apply.pickList.__is_array.\\$&.now.getMinutes.Function.day.second.$1,.before_gt_hour.indexOf.28183024KiKvfv.function.toFixed.format_num2date.__compare_time.getDay.__loop_time2.call.after_lt_hour.prototype.after_gt_hour.getDate.slice.isArray.toString.549628QoGWVv.roxFormatThousandth.catch.floor.filter.14FPJmRC.test.chunk.getMonth.assign.Object.trim.count_down.offset_time.before_lt_hour.hour.__date2timestamp.length.construct.constructor.abs.is_current_year.is_equal.__ticker2.2194422aEEnvu.format_timestamp_to_day_hour_minute_second.getFullYear.split.getTime.concat.__interval.replace.add.getSeconds.getHours.safeRequest.minute.map.format_thousandth_with_same_dotlen.__an_hour.endsWith".split(".");
364
+ return i = function() {
365
+ return e;
366
+ }, i();
367
+ }
368
+ //#endregion
369
+ export { r as e };
@@ -1,6 +1,6 @@
1
- import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
1
+ import { Fragment as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, toDisplayString as c } from "vue";
2
2
  //#region components/toast/toast-item.vue?vue&type=script&setup=true&lang.ts
3
- var c = { class: "toast-item" }, l = /* @__PURE__ */ r({
3
+ var l = { class: "toast-item" }, u = /* @__PURE__ */ i({
4
4
  name: "ToastItem",
5
5
  __name: "toast-item",
6
6
  props: {
@@ -11,18 +11,17 @@ var c = { class: "toast-item" }, l = /* @__PURE__ */ r({
11
11
  titleClass: {},
12
12
  messageClass: {}
13
13
  },
14
- setup(r) {
15
- return (l, u) => (a(), t("div", c, [r.toast.message ? (a(), t("div", {
14
+ setup(i) {
15
+ return (u, d) => (o(), n("div", l, [i.toast.message ? (o(), n("div", {
16
16
  key: 0,
17
- class: i(["title-box", r.titleClass])
18
- }, [
19
- l.$slots["success-icon"] && r.toast.type === "success" ? o(l.$slots, "success-icon", { key: 0 }) : e("", !0),
20
- l.$slots["error-icon"] && r.toast.type === "error" ? o(l.$slots, "error-icon", { key: 1 }) : e("", !0),
21
- l.$slots["info-icon"] && r.toast.type === "info" ? o(l.$slots, "info-icon", { key: 2 }) : e("", !0),
22
- l.$slots["warning-icon"] && r.toast.type === "warning" ? o(l.$slots, "warning-icon", { key: 3 }) : e("", !0),
23
- n("span", { class: i(["message", r.messageClass]) }, s(r.toast.message), 3)
24
- ], 2)) : e("", !0)]));
17
+ class: a(["title-box", i.titleClass])
18
+ }, [i.toast.iconVisible ? (o(), n(e, { key: 0 }, [
19
+ u.$slots["success-icon"] && i.toast.type === "success" ? s(u.$slots, "success-icon", { key: 0 }) : t("", !0),
20
+ u.$slots["error-icon"] && i.toast.type === "error" ? s(u.$slots, "error-icon", { key: 1 }) : t("", !0),
21
+ u.$slots["info-icon"] && i.toast.type === "info" ? s(u.$slots, "info-icon", { key: 2 }) : t("", !0),
22
+ u.$slots["warning-icon"] && i.toast.type === "warning" ? s(u.$slots, "warning-icon", { key: 3 }) : t("", !0)
23
+ ], 64)) : t("", !0), r("span", { class: a(["message", i.messageClass]) }, c(i.toast.message), 3)], 2)) : t("", !0)]));
25
24
  }
26
25
  });
27
26
  //#endregion
28
- export { l as default };
27
+ export { u as default };
@@ -19,7 +19,8 @@ function o(e) {
19
19
  id: i(),
20
20
  message: e?.message || "",
21
21
  duration: e?.duration || r,
22
- type: e?.type || "info"
22
+ type: e?.type || "info",
23
+ iconVisible: e?.iconVisible || !0
23
24
  };
24
25
  return setTimeout(() => {
25
26
  n.toasts.push(t);
@@ -30,26 +31,42 @@ function o(e) {
30
31
  function s() {
31
32
  return {
32
33
  toast: o,
33
- success: (e, t = r) => o({
34
- message: e,
35
- duration: t,
36
- type: "success"
37
- }),
38
- error: (e, t = r) => o({
39
- message: e,
40
- duration: t,
41
- type: "error"
42
- }),
43
- info: (e, t = r) => o({
44
- message: e,
45
- duration: t,
46
- type: "info"
47
- }),
48
- warning: (e, t = r) => o({
49
- message: e,
50
- duration: t,
51
- type: "warning"
52
- }),
34
+ success: (e, t = {}) => {
35
+ let { duration: n = r, iconVisible: i = !0 } = t;
36
+ return o({
37
+ message: e,
38
+ duration: n,
39
+ type: "success",
40
+ iconVisible: i
41
+ });
42
+ },
43
+ error: (e, t = {}) => {
44
+ let { duration: n = r, iconVisible: i = !0 } = t;
45
+ return o({
46
+ message: e,
47
+ duration: n,
48
+ type: "error",
49
+ iconVisible: i
50
+ });
51
+ },
52
+ info: (e, t = {}) => {
53
+ let { duration: n = r, iconVisible: i = !0 } = t;
54
+ return o({
55
+ message: e,
56
+ duration: n,
57
+ type: "info",
58
+ iconVisible: i
59
+ });
60
+ },
61
+ warning: (e, t = {}) => {
62
+ let { duration: n = r, iconVisible: i = !0 } = t;
63
+ return o({
64
+ message: e,
65
+ duration: n,
66
+ type: "warning",
67
+ iconVisible: i
68
+ });
69
+ },
53
70
  dismiss: a
54
71
  };
55
72
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`rox-v`]={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=Object.defineProperty,r=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},i=[`inputmode`,`maxlength`],a=(0,t.defineComponent)({name:`InputOtp`,__name:`input-otp`,props:{modelValue:{default:``},length:{default:6},itemClass:{default:``},activeItemClass:{default:``},gap:{default:`10px`},hasFilledItemClass:{default:`active`},type:{default:`number`},autoFocus:{type:Boolean,default:!1}},emits:[`update:modelValue`,`complete`,`enter`],setup(e,{emit:n}){let r=[`ArrowLeft`,`ArrowRight`,`Home`,`End`],a=e,o=n,s=(0,t.ref)(null),c=(0,t.ref)(a.modelValue);(0,t.watch)(()=>a.modelValue,e=>{e!==c.value&&(c.value=e)});function l(e){let t=e.target.value;t=a.type===`text`?t.replace(/[^\dA-Za-z]/g,``):t.replace(/\D/g,``),t=t.slice(0,a.length),c.value=t,o(`update:modelValue`,t),t.length===a.length&&o(`complete`,t)}function u(){(0,t.nextTick)(()=>{if(s.value){let e=c.value.length;s.value.setSelectionRange?.(e,e)}})}function d(e){let t=c.value,n=e.key;if(n===`Backspace`||n===`Delete`){if(e.preventDefault(),t.length>0){let e=t.slice(0,-1);c.value=e,o(`update:modelValue`,e),u()}}else r.includes(n)&&e.preventDefault()}function f(){a.modelValue.length>=a.length&&o(`enter`)}function p(){s.value?.focus()}function m(e){return e===c.value.length}function h(e){return e<c.value.length}return(0,t.onMounted)(()=>{a.autoFocus&&p()}),(0,t.watch)(()=>a.autoFocus,e=>{e&&p()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`otp-wrapper`,onClick:p},[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{inputmode:a.type===`text`?`text`:`numeric`,autocomplete:`one-time-code`,ref_key:`inputRef`,ref:s,"onUpdate:modelValue":r[0]||=e=>c.value=e,maxlength:e.length,onInput:l,onKeydown:d,onKeyup:(0,t.withKeys)(f,[`enter`]),onFocus:u,style:{position:`absolute`,opacity:`0`,"pointer-events":`none`,width:`1px`,height:`1px`}},null,40,i),[[t.vModelText,c.value]]),(0,t.createElementVNode)(`div`,{class:`otp-box`,style:(0,t.normalizeStyle)({gap:a.gap})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.length,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n,class:(0,t.normalizeClass)([`otp-item`,[{[a.activeItemClass]:m(n)},{[a.hasFilledItemClass]:h(n)},a.itemClass]])},(0,t.toDisplayString)(c.value[n]||``),3))),128))],4)]))}}),o=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},s=o(a,[[`__scopeId`,`data-v-fd524a3d`]]);s.install=e=>(s.name&&e.component(s.name,s),e);var c=s,l=o((0,t.defineComponent)({name:`Popup`,__name:`popup`,props:(0,t.mergeModels)({to:{default:`body`},bg:{default:`rgba(0, 0, 0, .5)`},duration:{default:150},position:{default:`bottom`},maskClosable:{type:Boolean,default:!0},top:{default:`0px`},left:{default:`0px`},right:{default:`0px`},bottom:{default:`0px`},zIndex:{default:50}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=[`bottom`,`left`,`right`,`top`,`center`],r=(0,t.useModel)(e,`modelValue`),i=e;function a(){i.maskClosable&&(r.value=!1)}return(e,o)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:i.to},[(0,t.createVNode)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[r.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,style:(0,t.normalizeStyle)({"--duration":`${i.duration}ms`,backgroundColor:i.bg,top:i.top,left:i.left,right:i.right,bottom:i.bottom,zIndex:i.zIndex}),class:(0,t.normalizeClass)([`popup-container`,[`popup-container-${i.position}`,{"popup-container-bottom":!n.includes(i.position)}]]),onClick:a},[(0,t.createElementVNode)(`div`,{class:`popup-content`,onClick:o[0]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)])],6)):(0,t.createCommentVNode)(``,!0)]),_:3})],8,[`to`]))}}),[[`__scopeId`,`data-v-49c688c4`]]);l.install=e=>(l.name&&e.component(l.name,l),e);var u=l,d=[`type`],f=o((0,t.defineComponent)({name:`Button`,__name:`button`,props:{padding:{default:`8px 16px`},block:{type:Boolean,default:!1},bg:{default:`transparent`},border:{default:`1px solid #1A171B`},radius:{default:`0`},disabled:{type:Boolean,default:!1},type:{default:`button`},disabledBg:{default:`rgba(26,23,27,0.16)`},enableDisabledClick:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:n}){let r=n,i=e,a=e=>{(!i.disabled||i.enableDisabledClick)&&r(`click`,e)};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{onClick:a,class:(0,t.normalizeClass)([`button-container`,{block:i.block,disabled:i.disabled}]),type:i.type,style:(0,t.normalizeStyle)({padding:i.padding,border:i.border,borderRadius:i.radius,"--bg":i.bg,"--disabled-bg":i.disabledBg})},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],14,d))}}),[[`__scopeId`,`data-v-1d025e54`]]);f.install=e=>(f.name&&e.component(f.name,f),e);var p=f,m=o((0,t.defineComponent)({name:`Collapse`,__name:`collapse`,props:{open:{type:Boolean,default:!1},maxHeight:{default:`100dvh`},duration:{default:200}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:`collapse`},{default:(0,t.withCtx)(()=>[n.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`collapse-content`,style:(0,t.normalizeStyle)({"--max-height":n.maxHeight,"--duration":n.duration+`ms`})},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],4)):(0,t.createCommentVNode)(``,!0)]),_:3}))}}),[[`__scopeId`,`data-v-46a0054a`]]);m.install=e=>(m.name&&e.component(m.name,m),e);var h=m,g={class:`input-box`},_=[`type`,`placeholder`],v=[`src`],y=o((0,t.defineComponent)({name:`Input`,__name:`input`,props:(0,t.mergeModels)({placeholder:{default:``},type:{default:`text`},iconVisible:{type:Boolean,default:!1},icon:{default:``},autoFocus:{type:Boolean,default:!1}},{modelValue:{type:String,default:``},modelModifiers:{}}),emits:(0,t.mergeModels)([`click`,`enter`],[`update:modelValue`]),setup(e,{emit:n}){let r=n,i=(0,t.useTemplateRef)(`input`),a=(0,t.useModel)(e,`modelValue`),o=e,s=()=>{r(`click`),i.value?.focus?.(),setTimeout(()=>{let e=a.value.length;i.value?.setSelectionRange?.(e,e)},0)};return(0,t.onMounted)(()=>{o.autoFocus&&i.value?.focus?.()}),(0,t.watch)(()=>o.autoFocus,e=>{e&&i.value?.focus?.()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,g,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:o.type,"onUpdate:modelValue":n[0]||=e=>a.value=e,ref:`input`,placeholder:o.placeholder,onKeyup:n[1]||=(0,t.withKeys)(t=>e.$emit(`enter`),[`enter`])},null,40,_),[[t.vModelDynamic,a.value]]),o.icon?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:o.icon,alt:`icon`,onClick:s},null,8,v)),[[t.vShow,o.iconVisible]]):(0,t.createCommentVNode)(``,!0)]))}}),[[`__scopeId`,`data-v-238a598a`]]);y.install=e=>(y.name&&e.component(y.name,y),e);var b=y,x={class:`menu-label`},S=[`src`],C=[`src`],w=(0,t.defineComponent)({name:`MenuItem`,__name:`menu-item`,props:(0,t.mergeModels)({checkedIcon:{},checkedIconClass:{},suffixIcon:{},suffixIconClass:{},itemContainerClass:{},itemGap:{},activeItemClass:{},subMenuContainerClass:{},deep:{},item:{},parentValue:{}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.ref)(!1),a=()=>i.value=!0,o=()=>i.value=!1,s=()=>{r.item.children?.length||(n.value=[...r.parentValue,r.item.value])};return(c,l)=>{let u=(0,t.resolveComponent)(`MenuItem`,!0);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{onMouseenter:a,onMouseleave:o,style:{padding:`0 8px`}},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`menu-item-inner`,[r.itemContainerClass,{active:n.value?.[r.deep]===e.item.value},{[r.activeItemClass]:n.value?.[r.deep]===e.item.value}]]),onClick:s},[(0,t.createElementVNode)(`div`,x,(0,t.toDisplayString)(e.item.label),1),e.suffixIcon&&e.item.children?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:r.suffixIcon,class:(0,t.normalizeClass)([`suffix-icon`,r.suffixIconClass]),alt:`suffix-icon`},null,10,S)):(0,t.createCommentVNode)(``,!0),e.checkedIcon&&!e.item.children?.length&&n.value?.[r.deep]===e.item.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:1,src:r.checkedIcon,class:(0,t.normalizeClass)([`checked-icon`,r.checkedIconClass]),alt:`checked-icon`},null,10,C)):(0,t.createCommentVNode)(``,!0)],2),e.item.children?.length?((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{key:0,name:`fade`},{default:(0,t.withCtx)(()=>[i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`sub-menu-box list-box`,e.subMenuContainerClass])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.item.children,(i,a)=>((0,t.openBlock)(),(0,t.createBlock)(u,{key:a,modelValue:n.value,"onUpdate:modelValue":l[0]||=e=>n.value=e,item:i,"suffix-icon":e.suffixIcon,"suffix-icon-class":e.suffixIconClass,"checked-icon":e.checkedIcon,"checked-icon-class":e.checkedIconClass,"item-container-class":e.itemContainerClass,"item-gap":e.itemGap,deep:r.deep+1,"active-item-class":r.activeItemClass,"parent-value":r.parentValue.concat(e.item.value)},null,8,[`modelValue`,`item`,`suffix-icon`,`suffix-icon-class`,`checked-icon`,`checked-icon-class`,`item-container-class`,`item-gap`,`deep`,`active-item-class`,`parent-value`]))),128))],2)):(0,t.createCommentVNode)(``,!0)]),_:1})):(0,t.createCommentVNode)(``,!0)],32)}}}),T={key:0,class:`menu-list-box`},E=o((0,t.defineComponent)({name:`Menu`,__name:`menu`,props:(0,t.mergeModels)({duration:{default:100},items:{default:()=>[]},suffixIcon:{},suffixIconClass:{},checkedIcon:{},checkedIconClass:{},listContainerClass:{default:``},subMenuContainerClass:{default:``},defaultContainerClass:{default:``},itemContainerClass:{},itemGap:{default:`4px`},activeItemClass:{default:``}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:(0,t.mergeModels)([`open`,`close`],[`update:modelValue`]),setup(e,{emit:n}){let r=n,i=(0,t.useModel)(e,`modelValue`),a=e,o=(0,t.ref)(!1),s=()=>o.value=!0,c=()=>o.value=!1;return(0,t.watch)(i,()=>{o.value=!1}),(0,t.watch)(o,e=>{r(e?`open`:`close`)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`menu-box`,style:(0,t.normalizeStyle)({"--duration":a.duration+`ms`})},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`default-box`,a.defaultContainerClass]),onMouseenter:s,onMouseleave:c},[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0),(0,t.createVNode)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,T,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`menu-item-box`,a.listContainerClass]),style:(0,t.normalizeStyle)({"--gap":a.itemGap})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:o,class:`menu-item`},[(0,t.createVNode)(w,{modelValue:i.value,"onUpdate:modelValue":r[0]||=e=>i.value=e,item:n,"suffix-icon":e.suffixIcon,"suffix-icon-class":e.suffixIconClass,"checked-icon":e.checkedIcon,"checked-icon-class":e.checkedIconClass,"item-container-class":e.itemContainerClass,"item-gap":a.itemGap,deep:0,"active-item-class":a.activeItemClass,"sub-menu-container-class":a.subMenuContainerClass,"parent-value":[]},null,8,[`modelValue`,`item`,`suffix-icon`,`suffix-icon-class`,`checked-icon`,`checked-icon-class`,`item-container-class`,`item-gap`,`active-item-class`,`sub-menu-container-class`])]))),128))],6)])):(0,t.createCommentVNode)(``,!0)]),_:1})],34)],4))}}),[[`__scopeId`,`data-v-b7084c6e`]]);E.install=e=>(E.name&&e.component(E.name,E),e);var D=E,O={class:`tab-list-container-inner`},k=[`onClick`],A=o((0,t.defineComponent)({name:`Tab`,__name:`tab`,props:(0,t.mergeModels)({items:{default:()=>[]},gap:{default:`10px`},tabContainerClass:{default:``},tabItemClass:{default:``},panelContainerClass:{default:``},panelItemClass:{default:``},activeLineClass:{default:``}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useTemplateRef)(`item`),r=(0,t.ref)(!0),i=(0,t.useModel)(e,`modelValue`),a=e,o=(0,t.reactive)({left:0,width:0}),s=()=>{if(!n.value)return;let e=n.value[i.value];if(!e)return;let{offsetWidth:t,offsetLeft:r}=e;o.left=r||0,o.width=t||0};return(0,t.watch)(i,()=>{r.value&&n.value?.length&&(r.value=!1),s()}),(0,t.watch)(()=>a.items,()=>{s()},{flush:`post`}),(0,t.onMounted)(()=>{s()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`tab-box-container`,style:(0,t.normalizeStyle)({"--gap":a.gap})},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`tab-list-container`,a.tabContainerClass])},[(0,t.createElementVNode)(`div`,O,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:(0,t.normalizeClass)([`tab-item-box`,a.tabItemClass]),onClick:e=>i.value=r,ref_for:!0,ref:`item`},[(0,t.renderSlot)(e.$slots,`default`,{item:n,index:r,active:i.value===r},void 0,!0)],10,k))),128)),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`active-tab-item-box`,[{initial:r.value},a.activeLineClass]]),style:(0,t.normalizeStyle)({left:o.left+`px`,width:o.width+`px`})},null,6)])],2),(0,t.renderSlot)(e.$slots,`middle`,{},void 0,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`panel-list-container`,a.panelContainerClass])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,r)=>(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:(0,t.normalizeClass)([`panel-item-box`,a.panelItemClass])},[(0,t.renderSlot)(e.$slots,`panel`,{item:n,index:r,active:i.value===r},void 0,!0)],2)),[[t.vShow,i.value===r]])),128))],2)],4))}}),[[`__scopeId`,`data-v-8b1a9a29`]]);A.install=e=>(A.name&&e.component(A.name,A),e);var j=(0,t.reactive)({toasts:[]}),M=3e3;function N(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)})}function P(e){if(e===void 0)j.toasts=[];else{let t=j.toasts.findIndex(t=>t.id===e);t!==-1&&j.toasts.splice(t,1)}}function F(e){let t={id:N(),message:e?.message||``,duration:e?.duration||M,type:e?.type||`info`};return setTimeout(()=>{j.toasts.push(t)},0),setTimeout(()=>{P(t.id)},t.duration),t.id}function I(){return{toast:F,success:(e,t=M)=>F({message:e,duration:t,type:`success`}),error:(e,t=M)=>F({message:e,duration:t,type:`error`}),info:(e,t=M)=>F({message:e,duration:t,type:`info`}),warning:(e,t=M)=>F({message:e,duration:t,type:`warning`}),dismiss:P}}var L=(0,t.readonly)(j),R={class:`toast-item`},z=(0,t.defineComponent)({name:`ToastItem`,__name:`toast-item`,props:{toast:{},bg:{},top:{},toasterClass:{},titleClass:{},messageClass:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,R,[e.toast.message?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`title-box`,e.titleClass])},[n.$slots[`success-icon`]&&e.toast.type===`success`?(0,t.renderSlot)(n.$slots,`success-icon`,{key:0}):(0,t.createCommentVNode)(``,!0),n.$slots[`error-icon`]&&e.toast.type===`error`?(0,t.renderSlot)(n.$slots,`error-icon`,{key:1}):(0,t.createCommentVNode)(``,!0),n.$slots[`info-icon`]&&e.toast.type===`info`?(0,t.renderSlot)(n.$slots,`info-icon`,{key:2}):(0,t.createCommentVNode)(``,!0),n.$slots[`warning-icon`]&&e.toast.type===`warning`?(0,t.renderSlot)(n.$slots,`warning-icon`,{key:3}):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`message`,e.messageClass])},(0,t.toDisplayString)(e.toast.message),3)],2)):(0,t.createCommentVNode)(``,!0)]))}}),B=o((0,t.defineComponent)({name:`Toaster`,__name:`toaster`,props:{to:{default:`body`},bg:{default:`rgba(0, 0, 0, 0.6)`},top:{default:`20px`},toasterClass:{default:``},titleClass:{default:``},messageClass:{default:``}},setup(e){let n=e;return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:e.to},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`toaster-box`,n.toasterClass]),style:(0,t.normalizeStyle)({"--toast-bg":n.bg,top:n.top})},[(0,t.createVNode)(t.TransitionGroup,{name:`toast-fade`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(L).toasts,e=>((0,t.openBlock)(),(0,t.createBlock)(z,{key:e.id,toast:e,"title-class":n.titleClass,"message-class":n.messageClass},{"success-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`success-icon`,{},void 0,!0)]),"error-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`error-icon`,{},void 0,!0)]),"info-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`info-icon`,{},void 0,!0)]),"warning-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`warning-icon`,{},void 0,!0)]),_:3},8,[`toast`,`title-class`,`message-class`]))),128))]),_:3})],6)],8,[`to`]))}}),[[`__scopeId`,`data-v-7faa65fe`]]);B.install=function(e){return B.name&&e.component(B.name,B),e};var V=B,H=o((0,t.defineComponent)({name:`Loading`,__name:`loading`,props:{bg:{default:`transparent`},dotColor:{default:`#1a171b`},dotSize:{default:`8px`},dotGap:{default:`4px`},visible:{type:Boolean,default:!1},amplitude:{default:`15px`}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[n.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{key:0,class:`loading-box`,style:(0,t.normalizeStyle)({"--bg":n.bg,"--dot-color":n.dotColor,"--dot-size":n.dotSize,"--dot-gap":n.dotGap,"--amplitude":n.amplitude})},[...r[0]||=[(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1),(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1),(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-aafc58b1`]]);H.install=e=>(H.name&&e.component(H.name,H),e);var U=H;function W(){return typeof window<`u`&&typeof document<`u`}function G(e){return new Promise((t,n)=>{if(!W()){t({naturalWidth:0,naturalHeight:0});return}let r=new Image,i=!1,a=e=>{i||(i=!0,r.onload=null,r.onerror=null,e())};r.onload=()=>{a(()=>{t({naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight})})},r.onerror=()=>{a(()=>{t({naturalWidth:0,naturalHeight:0})})},r.src=e,r.complete&&setTimeout(()=>{a(()=>{t({naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight})})},0)})}var K={class:`slider-captcha-bg-box`,ref:`box`},q=[`src`],J=[`src`],Y={class:`verify-result-tip`},ee={class:`verify-result-tip`},te={key:1,stroke:`currentColor`,fill:`currentColor`,"stroke-width":`0`,viewBox:`0 0 512 512`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`},X=o((0,t.defineComponent)({__name:`slider-captcha`,props:{background:{},block:{},width:{},blockTop:{default:0},verify:{},trackBlockBg:{default:`#f5f5f5`},trackBg:{default:`rgba(26,23,27,0.1)`}},emits:[`success`,`fail`,`change`],setup(e,{expose:n,emit:r}){let i=r,a=(0,t.ref)(void 0),o=(0,t.ref)(!1),s=(0,t.useTemplateRef)(`box`),c=(0,t.useTemplateRef)(`thumb`),l=e,u=(0,t.reactive)({natureWidth:0,natureHeight:0,boxWidth:0,boxHeight:0}),d=(0,t.reactive)({natureWidth:0,natureHeight:0}),f=(0,t.reactive)({width:0,height:0}),p=(0,t.ref)(0),m=(0,t.ref)(0),h=(0,t.ref)(!1),g=(0,t.ref)([]),_=(0,t.computed)(()=>u.boxWidth?u.natureWidth/u.boxWidth:1),v=(0,t.computed)(()=>u.boxHeight?u.natureHeight/u.boxHeight:1),y=(0,t.computed)(()=>d.natureWidth/_.value),b=(0,t.computed)(()=>l.blockTop/v.value),x=(0,t.computed)(()=>u.boxWidth?u.boxWidth-y.value:0),S=(0,t.computed)(()=>u.boxWidth?u.boxWidth-f.width:0),C=(0,t.computed)(()=>x.value?S.value/x.value:1);function w(e){!W()||o.value||(m.value=e.clientX,h.value=!0,g.value=[],window.addEventListener(`pointermove`,T),window.addEventListener(`pointerup`,E))}function T(e){if(!h.value||o.value)return;let t=e.clientX-m.value;t=Math.min(Math.max(0,t),S.value),p.value=t;let n=t/(S.value||1)*(u.natureWidth-d.natureWidth),r=Date.now(),a=n/(u.natureWidth||1)*100;g.value.push({x:n,t:r,xPercent:a}),i(`change`,g.value)}async function E(){if(!o.value&&(h.value=!1,window.removeEventListener(`pointermove`,T),window.removeEventListener(`pointerup`,E),l.verify)){let e=g.value[g.value.length-1];e||={x:0,xPercent:0,t:Date.now()},o.value=!0;let t=await l.verify(e);t===!0?(i(`success`),o.value=!1,a.value=!0):t===!1&&(i(`fail`),o.value=!1,a.value=!1,p.value=0)}}async function D(){if(!l.background)return;let{naturalWidth:e,naturalHeight:t}=await G(l.background);u.natureWidth=e,u.natureHeight=t,u.boxWidth=s.value?.clientWidth||0,u.boxHeight=s.value?.clientHeight||0}async function O(){if(!l.block)return;let{naturalWidth:e,naturalHeight:t}=await G(l.block);d.natureWidth=e,d.natureHeight=t}function k(){f.width=c.value?.clientWidth||0,f.height=c.value?.clientHeight||0}function A(){p.value=0,a.value=void 0}return(0,t.onMounted)(()=>{D(),O(),k(),A()}),(0,t.watch)(()=>l.background,()=>{D(),A()}),(0,t.watch)(()=>l.block,()=>{O(),A()}),(0,t.watch)(()=>l.width,()=>{D(),O(),k()}),n({reset:A,tracks:g}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`slider-captcha-box`,style:(0,t.normalizeStyle)(l.width?{width:l.width+`px`}:{})},[(0,t.createElementVNode)(`div`,K,[(0,t.createElementVNode)(`img`,{src:l.background,alt:`bg`,class:`slider-captcha-bg`,draggable:!1},null,8,q),(0,t.withDirectives)((0,t.createElementVNode)(`img`,{src:l.block,alt:`block`,class:`slider-captcha-block`,style:(0,t.normalizeStyle)({top:b.value+`px`,width:y.value+`px`,transform:`translateX(${p.value/C.value}px)`}),draggable:!1},null,12,J),[[t.vShow,y.value]]),(0,t.createVNode)(t.Transition,{name:`slide`},{default:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,Y,[(0,t.renderSlot)(e.$slots,`verify-success`,{},void 0,!0)],512),[[t.vShow,a.value===!0]])]),_:3}),(0,t.createVNode)(t.Transition,{name:`slide`},{default:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,ee,[(0,t.renderSlot)(e.$slots,`verify-fail`,{},void 0,!0)],512),[[t.vShow,a.value===!1]])]),_:3})],512),(0,t.createElementVNode)(`div`,{class:`slider-track-box`,style:(0,t.normalizeStyle)({"background-color":l.trackBlockBg})},[(0,t.createElementVNode)(`div`,{class:`slider-track-bg`,style:(0,t.normalizeStyle)({"background-color":l.trackBg,width:`${p.value}px`})},null,4),(0,t.createElementVNode)(`div`,{class:`slider-track-thumb`,onPointerdown:w,ref:`thumb`,style:(0,t.normalizeStyle)({transform:`translateX(${p.value}px)`})},[e.$slots.default?(0,t.renderSlot)(e.$slots,`default`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,te,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l370.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z`},null,-1)]]))],36)],4)],4))}}),[[`__scopeId`,`data-v-e0d9f88d`]]);X.install=e=>(X.name&&e.component(X.name,X),e);var Z=X,Q=r({Button:()=>p,Collapse:()=>h,Input:()=>b,InputOtp:()=>c,Loading:()=>U,Menu:()=>D,Popup:()=>u,SliderCaptcha:()=>Z,Tab:()=>A,Toaster:()=>V,useToast:()=>I}),$=e=>(Object.keys(Q).forEach(t=>{let n=Q[t];n.install&&e.use(n)}),e),ne={install:$};e.Button=p,e.Collapse=h,e.Input=b,e.InputOtp=c,e.Loading=U,e.Menu=D,e.Popup=u,e.SliderCaptcha=Z,e.Tab=A,e.Toaster=V,e.default=ne,e.install=$,e.useToast=I});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`rox-v`]={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=Object.defineProperty,r=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},i=[`inputmode`,`maxlength`],a=(0,t.defineComponent)({name:`InputOtp`,__name:`input-otp`,props:{modelValue:{default:``},length:{default:6},itemClass:{default:``},activeItemClass:{default:``},gap:{default:`10px`},hasFilledItemClass:{default:`active`},type:{default:`number`},autoFocus:{type:Boolean,default:!1}},emits:[`update:modelValue`,`complete`,`enter`],setup(e,{emit:n}){let r=[`ArrowLeft`,`ArrowRight`,`Home`,`End`],a=e,o=n,s=(0,t.ref)(null),c=(0,t.ref)(a.modelValue);(0,t.watch)(()=>a.modelValue,e=>{e!==c.value&&(c.value=e)});function l(e){let t=e.target.value;t=a.type===`text`?t.replace(/[^\dA-Za-z]/g,``):t.replace(/\D/g,``),t=t.slice(0,a.length),c.value=t,o(`update:modelValue`,t),t.length===a.length&&o(`complete`,t)}function u(){(0,t.nextTick)(()=>{if(s.value){let e=c.value.length;s.value.setSelectionRange?.(e,e)}})}function d(e){let t=c.value,n=e.key;if(n===`Backspace`||n===`Delete`){if(e.preventDefault(),t.length>0){let e=t.slice(0,-1);c.value=e,o(`update:modelValue`,e),u()}}else r.includes(n)&&e.preventDefault()}function f(){a.modelValue.length>=a.length&&o(`enter`)}function p(){s.value?.focus()}function m(e){return e===c.value.length}function h(e){return e<c.value.length}return(0,t.onMounted)(()=>{a.autoFocus&&p()}),(0,t.watch)(()=>a.autoFocus,e=>{e&&p()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`otp-wrapper`,onClick:p},[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{inputmode:a.type===`text`?`text`:`numeric`,autocomplete:`one-time-code`,ref_key:`inputRef`,ref:s,"onUpdate:modelValue":r[0]||=e=>c.value=e,maxlength:e.length,onInput:l,onKeydown:d,onKeyup:(0,t.withKeys)(f,[`enter`]),onFocus:u,style:{position:`absolute`,opacity:`0`,"pointer-events":`none`,width:`1px`,height:`1px`}},null,40,i),[[t.vModelText,c.value]]),(0,t.createElementVNode)(`div`,{class:`otp-box`,style:(0,t.normalizeStyle)({gap:a.gap})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.length,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n,class:(0,t.normalizeClass)([`otp-item`,[{[a.activeItemClass]:m(n)},{[a.hasFilledItemClass]:h(n)},a.itemClass]])},(0,t.toDisplayString)(c.value[n]||``),3))),128))],4)]))}}),o=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},s=o(a,[[`__scopeId`,`data-v-fd524a3d`]]);s.install=e=>(s.name&&e.component(s.name,s),e);var c=s,l=o((0,t.defineComponent)({name:`Popup`,__name:`popup`,props:(0,t.mergeModels)({to:{default:`body`},bg:{default:`rgba(0, 0, 0, .5)`},duration:{default:150},position:{default:`bottom`},maskClosable:{type:Boolean,default:!0},top:{default:`0px`},left:{default:`0px`},right:{default:`0px`},bottom:{default:`0px`},zIndex:{default:50}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=[`bottom`,`left`,`right`,`top`,`center`],r=(0,t.useModel)(e,`modelValue`),i=e;function a(){i.maskClosable&&(r.value=!1)}return(e,o)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:i.to},[(0,t.createVNode)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[r.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,style:(0,t.normalizeStyle)({"--duration":`${i.duration}ms`,backgroundColor:i.bg,top:i.top,left:i.left,right:i.right,bottom:i.bottom,zIndex:i.zIndex}),class:(0,t.normalizeClass)([`popup-container`,[`popup-container-${i.position}`,{"popup-container-bottom":!n.includes(i.position)}]]),onClick:a},[(0,t.createElementVNode)(`div`,{class:`popup-content`,onClick:o[0]||=(0,t.withModifiers)(()=>{},[`stop`])},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)])],6)):(0,t.createCommentVNode)(``,!0)]),_:3})],8,[`to`]))}}),[[`__scopeId`,`data-v-49c688c4`]]);l.install=e=>(l.name&&e.component(l.name,l),e);var u=l,d=[`type`],f=o((0,t.defineComponent)({name:`Button`,__name:`button`,props:{padding:{default:`8px 16px`},block:{type:Boolean,default:!1},bg:{default:`transparent`},border:{default:`1px solid #1A171B`},radius:{default:`0`},disabled:{type:Boolean,default:!1},type:{default:`button`},disabledBg:{default:`rgba(26,23,27,0.16)`},enableDisabledClick:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:n}){let r=n,i=e,a=e=>{(!i.disabled||i.enableDisabledClick)&&r(`click`,e)};return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{onClick:a,class:(0,t.normalizeClass)([`button-container`,{block:i.block,disabled:i.disabled}]),type:i.type,style:(0,t.normalizeStyle)({padding:i.padding,border:i.border,borderRadius:i.radius,"--bg":i.bg,"--disabled-bg":i.disabledBg})},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],14,d))}}),[[`__scopeId`,`data-v-1d025e54`]]);f.install=e=>(f.name&&e.component(f.name,f),e);var p=f,m=o((0,t.defineComponent)({name:`Collapse`,__name:`collapse`,props:{open:{type:Boolean,default:!1},maxHeight:{default:`100dvh`},duration:{default:200}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:`collapse`},{default:(0,t.withCtx)(()=>[n.open?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:`collapse-content`,style:(0,t.normalizeStyle)({"--max-height":n.maxHeight,"--duration":n.duration+`ms`})},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],4)):(0,t.createCommentVNode)(``,!0)]),_:3}))}}),[[`__scopeId`,`data-v-46a0054a`]]);m.install=e=>(m.name&&e.component(m.name,m),e);var h=m,g={class:`input-box`},_=[`type`,`placeholder`],v=[`src`],y=o((0,t.defineComponent)({name:`Input`,__name:`input`,props:(0,t.mergeModels)({placeholder:{default:``},type:{default:`text`},iconVisible:{type:Boolean,default:!1},icon:{default:``},autoFocus:{type:Boolean,default:!1}},{modelValue:{type:String,default:``},modelModifiers:{}}),emits:(0,t.mergeModels)([`click`,`enter`],[`update:modelValue`]),setup(e,{emit:n}){let r=n,i=(0,t.useTemplateRef)(`input`),a=(0,t.useModel)(e,`modelValue`),o=e,s=()=>{r(`click`),i.value?.focus?.(),setTimeout(()=>{let e=a.value.length;i.value?.setSelectionRange?.(e,e)},0)};return(0,t.onMounted)(()=>{o.autoFocus&&i.value?.focus?.()}),(0,t.watch)(()=>o.autoFocus,e=>{e&&i.value?.focus?.()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,g,[(0,t.withDirectives)((0,t.createElementVNode)(`input`,{type:o.type,"onUpdate:modelValue":n[0]||=e=>a.value=e,ref:`input`,placeholder:o.placeholder,onKeyup:n[1]||=(0,t.withKeys)(t=>e.$emit(`enter`),[`enter`])},null,40,_),[[t.vModelDynamic,a.value]]),o.icon?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:o.icon,alt:`icon`,onClick:s},null,8,v)),[[t.vShow,o.iconVisible]]):(0,t.createCommentVNode)(``,!0)]))}}),[[`__scopeId`,`data-v-238a598a`]]);y.install=e=>(y.name&&e.component(y.name,y),e);var b=y,x={class:`menu-label`},S=[`src`],C=[`src`],w=(0,t.defineComponent)({name:`MenuItem`,__name:`menu-item`,props:(0,t.mergeModels)({checkedIcon:{},checkedIconClass:{},suffixIcon:{},suffixIconClass:{},itemContainerClass:{},itemGap:{},activeItemClass:{},subMenuContainerClass:{},deep:{},item:{},parentValue:{}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e,i=(0,t.ref)(!1),a=()=>i.value=!0,o=()=>i.value=!1,s=()=>{r.item.children?.length||(n.value=[...r.parentValue,r.item.value])};return(c,l)=>{let u=(0,t.resolveComponent)(`MenuItem`,!0);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,{onMouseenter:a,onMouseleave:o,style:{padding:`0 8px`}},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`menu-item-inner`,[r.itemContainerClass,{active:n.value?.[r.deep]===e.item.value},{[r.activeItemClass]:n.value?.[r.deep]===e.item.value}]]),onClick:s},[(0,t.createElementVNode)(`div`,x,(0,t.toDisplayString)(e.item.label),1),e.suffixIcon&&e.item.children?.length?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:0,src:r.suffixIcon,class:(0,t.normalizeClass)([`suffix-icon`,r.suffixIconClass]),alt:`suffix-icon`},null,10,S)):(0,t.createCommentVNode)(``,!0),e.checkedIcon&&!e.item.children?.length&&n.value?.[r.deep]===e.item.value?((0,t.openBlock)(),(0,t.createElementBlock)(`img`,{key:1,src:r.checkedIcon,class:(0,t.normalizeClass)([`checked-icon`,r.checkedIconClass]),alt:`checked-icon`},null,10,C)):(0,t.createCommentVNode)(``,!0)],2),e.item.children?.length?((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{key:0,name:`fade`},{default:(0,t.withCtx)(()=>[i.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`sub-menu-box list-box`,e.subMenuContainerClass])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.item.children,(i,a)=>((0,t.openBlock)(),(0,t.createBlock)(u,{key:a,modelValue:n.value,"onUpdate:modelValue":l[0]||=e=>n.value=e,item:i,"suffix-icon":e.suffixIcon,"suffix-icon-class":e.suffixIconClass,"checked-icon":e.checkedIcon,"checked-icon-class":e.checkedIconClass,"item-container-class":e.itemContainerClass,"item-gap":e.itemGap,deep:r.deep+1,"active-item-class":r.activeItemClass,"parent-value":r.parentValue.concat(e.item.value)},null,8,[`modelValue`,`item`,`suffix-icon`,`suffix-icon-class`,`checked-icon`,`checked-icon-class`,`item-container-class`,`item-gap`,`deep`,`active-item-class`,`parent-value`]))),128))],2)):(0,t.createCommentVNode)(``,!0)]),_:1})):(0,t.createCommentVNode)(``,!0)],32)}}}),T={key:0,class:`menu-list-box`},E=o((0,t.defineComponent)({name:`Menu`,__name:`menu`,props:(0,t.mergeModels)({duration:{default:100},items:{default:()=>[]},suffixIcon:{},suffixIconClass:{},checkedIcon:{},checkedIconClass:{},listContainerClass:{default:``},subMenuContainerClass:{default:``},defaultContainerClass:{default:``},itemContainerClass:{},itemGap:{default:`4px`},activeItemClass:{default:``}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:(0,t.mergeModels)([`open`,`close`],[`update:modelValue`]),setup(e,{emit:n}){let r=n,i=(0,t.useModel)(e,`modelValue`),a=e,o=(0,t.ref)(!1),s=()=>o.value=!0,c=()=>o.value=!1;return(0,t.watch)(i,()=>{o.value=!1}),(0,t.watch)(o,e=>{r(e?`open`:`close`)}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`menu-box`,style:(0,t.normalizeStyle)({"--duration":a.duration+`ms`})},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`default-box`,a.defaultContainerClass]),onMouseenter:s,onMouseleave:c},[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0),(0,t.createVNode)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,T,[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`menu-item-box`,a.listContainerClass]),style:(0,t.normalizeStyle)({"--gap":a.itemGap})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,o)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:o,class:`menu-item`},[(0,t.createVNode)(w,{modelValue:i.value,"onUpdate:modelValue":r[0]||=e=>i.value=e,item:n,"suffix-icon":e.suffixIcon,"suffix-icon-class":e.suffixIconClass,"checked-icon":e.checkedIcon,"checked-icon-class":e.checkedIconClass,"item-container-class":e.itemContainerClass,"item-gap":a.itemGap,deep:0,"active-item-class":a.activeItemClass,"sub-menu-container-class":a.subMenuContainerClass,"parent-value":[]},null,8,[`modelValue`,`item`,`suffix-icon`,`suffix-icon-class`,`checked-icon`,`checked-icon-class`,`item-container-class`,`item-gap`,`active-item-class`,`sub-menu-container-class`])]))),128))],6)])):(0,t.createCommentVNode)(``,!0)]),_:1})],34)],4))}}),[[`__scopeId`,`data-v-b7084c6e`]]);E.install=e=>(E.name&&e.component(E.name,E),e);var D=E,O={class:`tab-list-container-inner`},k=[`onClick`],A=o((0,t.defineComponent)({name:`Tab`,__name:`tab`,props:(0,t.mergeModels)({items:{default:()=>[]},gap:{default:`10px`},tabContainerClass:{default:``},tabItemClass:{default:``},panelContainerClass:{default:``},panelItemClass:{default:``},activeLineClass:{default:``}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useTemplateRef)(`item`),r=(0,t.ref)(!0),i=(0,t.useModel)(e,`modelValue`),a=e,o=(0,t.reactive)({left:0,width:0}),s=()=>{if(!n.value)return;let e=n.value[i.value];if(!e)return;let{offsetWidth:t,offsetLeft:r}=e;o.left=r||0,o.width=t||0};return(0,t.watch)(i,()=>{r.value&&n.value?.length&&(r.value=!1),s()}),(0,t.watch)(()=>a.items,()=>{s()},{flush:`post`}),(0,t.onMounted)(()=>{s()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`tab-box-container`,style:(0,t.normalizeStyle)({"--gap":a.gap})},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`tab-list-container`,a.tabContainerClass])},[(0,t.createElementVNode)(`div`,O,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:(0,t.normalizeClass)([`tab-item-box`,a.tabItemClass]),onClick:e=>i.value=r,ref_for:!0,ref:`item`},[(0,t.renderSlot)(e.$slots,`default`,{item:n,index:r,active:i.value===r},void 0,!0)],10,k))),128)),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`active-tab-item-box`,[{initial:r.value},a.activeLineClass]]),style:(0,t.normalizeStyle)({left:o.left+`px`,width:o.width+`px`})},null,6)])],2),(0,t.renderSlot)(e.$slots,`middle`,{},void 0,!0),(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`panel-list-container`,a.panelContainerClass])},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.items,(n,r)=>(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:r,class:(0,t.normalizeClass)([`panel-item-box`,a.panelItemClass])},[(0,t.renderSlot)(e.$slots,`panel`,{item:n,index:r,active:i.value===r},void 0,!0)],2)),[[t.vShow,i.value===r]])),128))],2)],4))}}),[[`__scopeId`,`data-v-8b1a9a29`]]);A.install=e=>(A.name&&e.component(A.name,A),e);var j=(0,t.reactive)({toasts:[]}),M=3e3;function N(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)})}function P(e){if(e===void 0)j.toasts=[];else{let t=j.toasts.findIndex(t=>t.id===e);t!==-1&&j.toasts.splice(t,1)}}function F(e){let t={id:N(),message:e?.message||``,duration:e?.duration||M,type:e?.type||`info`,iconVisible:e?.iconVisible||!0};return setTimeout(()=>{j.toasts.push(t)},0),setTimeout(()=>{P(t.id)},t.duration),t.id}function I(){return{toast:F,success:(e,t={})=>{let{duration:n=M,iconVisible:r=!0}=t;return F({message:e,duration:n,type:`success`,iconVisible:r})},error:(e,t={})=>{let{duration:n=M,iconVisible:r=!0}=t;return F({message:e,duration:n,type:`error`,iconVisible:r})},info:(e,t={})=>{let{duration:n=M,iconVisible:r=!0}=t;return F({message:e,duration:n,type:`info`,iconVisible:r})},warning:(e,t={})=>{let{duration:n=M,iconVisible:r=!0}=t;return F({message:e,duration:n,type:`warning`,iconVisible:r})},dismiss:P}}var ee=(0,t.readonly)(j),te={class:`toast-item`},L=(0,t.defineComponent)({name:`ToastItem`,__name:`toast-item`,props:{toast:{},bg:{},top:{},toasterClass:{},titleClass:{},messageClass:{}},setup(e){return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,te,[e.toast.message?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`title-box`,e.titleClass])},[e.toast.iconVisible?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[n.$slots[`success-icon`]&&e.toast.type===`success`?(0,t.renderSlot)(n.$slots,`success-icon`,{key:0}):(0,t.createCommentVNode)(``,!0),n.$slots[`error-icon`]&&e.toast.type===`error`?(0,t.renderSlot)(n.$slots,`error-icon`,{key:1}):(0,t.createCommentVNode)(``,!0),n.$slots[`info-icon`]&&e.toast.type===`info`?(0,t.renderSlot)(n.$slots,`info-icon`,{key:2}):(0,t.createCommentVNode)(``,!0),n.$slots[`warning-icon`]&&e.toast.type===`warning`?(0,t.renderSlot)(n.$slots,`warning-icon`,{key:3}):(0,t.createCommentVNode)(``,!0)],64)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,{class:(0,t.normalizeClass)([`message`,e.messageClass])},(0,t.toDisplayString)(e.toast.message),3)],2)):(0,t.createCommentVNode)(``,!0)]))}}),R=o((0,t.defineComponent)({name:`Toaster`,__name:`toaster`,props:{to:{default:`body`},bg:{default:`rgba(0, 0, 0, 0.6)`},top:{default:`20px`},toasterClass:{default:``},titleClass:{default:``},messageClass:{default:``}},setup(e){let n=e;return(r,i)=>((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{to:e.to},[(0,t.createElementVNode)(`div`,{class:(0,t.normalizeClass)([`toaster-box`,n.toasterClass]),style:(0,t.normalizeStyle)({"--toast-bg":n.bg,top:n.top})},[(0,t.createVNode)(t.TransitionGroup,{name:`toast-fade`},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(ee).toasts,e=>((0,t.openBlock)(),(0,t.createBlock)(L,{key:e.id,toast:e,"title-class":n.titleClass,"message-class":n.messageClass},{"success-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`success-icon`,{},void 0,!0)]),"error-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`error-icon`,{},void 0,!0)]),"info-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`info-icon`,{},void 0,!0)]),"warning-icon":(0,t.withCtx)(()=>[(0,t.renderSlot)(r.$slots,`warning-icon`,{},void 0,!0)]),_:3},8,[`toast`,`title-class`,`message-class`]))),128))]),_:3})],6)],8,[`to`]))}}),[[`__scopeId`,`data-v-7faa65fe`]]);R.install=function(e){return R.name&&e.component(R.name,R),e};var z=R,B=o((0,t.defineComponent)({name:`Loading`,__name:`loading`,props:{bg:{default:`transparent`},dotColor:{default:`#1a171b`},dotSize:{default:`8px`},dotGap:{default:`4px`},visible:{type:Boolean,default:!1},amplitude:{default:`15px`}},setup(e){let n=e;return(e,r)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:`fade`},{default:(0,t.withCtx)(()=>[n.visible?((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{key:0,class:`loading-box`,style:(0,t.normalizeStyle)({"--bg":n.bg,"--dot-color":n.dotColor,"--dot-size":n.dotSize,"--dot-gap":n.dotGap,"--amplitude":n.amplitude})},[...r[0]||=[(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1),(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1),(0,t.createElementVNode)(`div`,{class:`loading-dot`},null,-1)]],4)):(0,t.createCommentVNode)(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-aafc58b1`]]);B.install=e=>(B.name&&e.component(B.name,B),e);var V=B;function H(){return typeof window<`u`&&typeof document<`u`}function U(e){return new Promise((t,n)=>{if(!H()){t({naturalWidth:0,naturalHeight:0});return}let r=new Image,i=!1,a=e=>{i||(i=!0,r.onload=null,r.onerror=null,e())};r.onload=()=>{a(()=>{t({naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight})})},r.onerror=()=>{a(()=>{t({naturalWidth:0,naturalHeight:0})})},r.src=e,r.complete&&setTimeout(()=>{a(()=>{t({naturalWidth:r.naturalWidth,naturalHeight:r.naturalHeight})})},0)})}var ne={class:`slider-captcha-bg-box`,ref:`box`},re=[`src`],ie=[`src`],ae={class:`verify-result-tip`},oe={class:`verify-result-tip`},se={key:1,stroke:`currentColor`,fill:`currentColor`,"stroke-width":`0`,viewBox:`0 0 512 512`,height:`1em`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`},W=o((0,t.defineComponent)({__name:`slider-captcha`,props:{background:{},block:{},width:{},blockTop:{default:0},verify:{},trackBlockBg:{default:`#f5f5f5`},trackBg:{default:`rgba(26,23,27,0.1)`}},emits:[`success`,`fail`,`change`],setup(e,{expose:n,emit:r}){let i=r,a=(0,t.ref)(void 0),o=(0,t.ref)(!1),s=(0,t.useTemplateRef)(`box`),c=(0,t.useTemplateRef)(`thumb`),l=e,u=(0,t.reactive)({natureWidth:0,natureHeight:0,boxWidth:0,boxHeight:0}),d=(0,t.reactive)({natureWidth:0,natureHeight:0}),f=(0,t.reactive)({width:0,height:0}),p=(0,t.ref)(0),m=(0,t.ref)(0),h=(0,t.ref)(!1),g=(0,t.ref)([]),_=(0,t.computed)(()=>u.boxWidth?u.natureWidth/u.boxWidth:1),v=(0,t.computed)(()=>u.boxHeight?u.natureHeight/u.boxHeight:1),y=(0,t.computed)(()=>d.natureWidth/_.value),b=(0,t.computed)(()=>l.blockTop/v.value),x=(0,t.computed)(()=>u.boxWidth?u.boxWidth-y.value:0),S=(0,t.computed)(()=>u.boxWidth?u.boxWidth-f.width:0),C=(0,t.computed)(()=>x.value?S.value/x.value:1);function w(e){!H()||o.value||(m.value=e.clientX,h.value=!0,g.value=[],window.addEventListener(`pointermove`,T),window.addEventListener(`pointerup`,E))}function T(e){if(!h.value||o.value)return;let t=e.clientX-m.value;t=Math.min(Math.max(0,t),S.value),p.value=t;let n=t/(S.value||1)*(u.natureWidth-d.natureWidth),r=Date.now(),a=n/(u.natureWidth||1)*100;g.value.push({x:n,t:r,xPercent:a}),i(`change`,g.value)}async function E(){if(!o.value&&(h.value=!1,window.removeEventListener(`pointermove`,T),window.removeEventListener(`pointerup`,E),l.verify)){let e=g.value[g.value.length-1];e||={x:0,xPercent:0,t:Date.now()},o.value=!0;let t=await l.verify(e);t===!0?(i(`success`),o.value=!1,a.value=!0):t===!1&&(i(`fail`),o.value=!1,a.value=!1,p.value=0)}}async function D(){if(!l.background)return;let{naturalWidth:e,naturalHeight:t}=await U(l.background);u.natureWidth=e,u.natureHeight=t,u.boxWidth=s.value?.clientWidth||0,u.boxHeight=s.value?.clientHeight||0}async function O(){if(!l.block)return;let{naturalWidth:e,naturalHeight:t}=await U(l.block);d.natureWidth=e,d.natureHeight=t}function k(){f.width=c.value?.clientWidth||0,f.height=c.value?.clientHeight||0}function A(){p.value=0,a.value=void 0}return(0,t.onMounted)(()=>{D(),O(),k(),A()}),(0,t.watch)(()=>l.background,()=>{D(),A()}),(0,t.watch)(()=>l.block,()=>{O(),A()}),(0,t.watch)(()=>l.width,()=>{D(),O(),k()}),n({reset:A,tracks:g}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:`slider-captcha-box`,style:(0,t.normalizeStyle)(l.width?{width:l.width+`px`}:{})},[(0,t.createElementVNode)(`div`,ne,[(0,t.createElementVNode)(`img`,{src:l.background,alt:`bg`,class:`slider-captcha-bg`,draggable:!1},null,8,re),(0,t.withDirectives)((0,t.createElementVNode)(`img`,{src:l.block,alt:`block`,class:`slider-captcha-block`,style:(0,t.normalizeStyle)({top:b.value+`px`,width:y.value+`px`,transform:`translateX(${p.value/C.value}px)`}),draggable:!1},null,12,ie),[[t.vShow,y.value]]),(0,t.createVNode)(t.Transition,{name:`slide`},{default:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,ae,[(0,t.renderSlot)(e.$slots,`verify-success`,{},void 0,!0)],512),[[t.vShow,a.value===!0]])]),_:3}),(0,t.createVNode)(t.Transition,{name:`slide`},{default:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,oe,[(0,t.renderSlot)(e.$slots,`verify-fail`,{},void 0,!0)],512),[[t.vShow,a.value===!1]])]),_:3})],512),(0,t.createElementVNode)(`div`,{class:`slider-track-box`,style:(0,t.normalizeStyle)({"background-color":l.trackBlockBg})},[(0,t.createElementVNode)(`div`,{class:`slider-track-bg`,style:(0,t.normalizeStyle)({"background-color":l.trackBg,width:`${p.value}px`})},null,4),(0,t.createElementVNode)(`div`,{class:`slider-track-thumb`,onPointerdown:w,ref:`thumb`,style:(0,t.normalizeStyle)({transform:`translateX(${p.value}px)`})},[e.$slots.default?(0,t.renderSlot)(e.$slots,`default`,{key:0},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`svg`,se,[...n[0]||=[(0,t.createElementVNode)(`path`,{d:`M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l370.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z`},null,-1)]]))],36)],4)],4))}}),[[`__scopeId`,`data-v-e0d9f88d`]]);W.install=e=>(W.name&&e.component(W.name,W),e);var G=W,K=q;(function(e,t){let n=q,r=e();for(;;)try{if(-parseInt(n(212))/1+-parseInt(n(142))/2+-parseInt(n(195))/3+-parseInt(n(189))/4+-parseInt(n(183))/5+-parseInt(n(166))/6*(parseInt(n(147))/7)+parseInt(n(127))/8===t)break;r.push(r.shift())}catch{r.push(r.shift())}})(Y,429233);function q(e,t){return e-=127,Y()[e]}var J=()=>null,ce=new class{constructor(){let e=q;this[e(172)]=1e3,this[e(181)]=36e5,this[e(184)]=null,this[e(165)]=null,this.__get_type=t=>Object[e(136)][e(141)][e(134)](t)[e(139)](8,-1),this[e(158)]=t=>{let n=e;if(!t)return Date[n(217)]();let r=null;r=typeof t==`string`?t[n(173)](/(\-|\_)/g,`/`):new Date(t);let i=new Date(r);return i[n(141)]()===`Invalid Date`&&(i=new Date(t)),i.getTime()},this[e(196)]=t=>e(219)===this[e(200)](t),this.__is_array=t=>e(190)===this.__get_type(t),this[e(203)]=t=>this[e(200)](t)===`Object`,this[e(191)]=e=>String(e).padStart(2,`0`),this[e(131)]=({date:t,hour:n=1,type:r=`before_lt_hour`})=>{let i=e,a=this.__date2timestamp(t),o=new Date(a)[i(170)](),s=Date[i(217)](),c=o<s,l=o>s;return i(156)===r?c&&o+this[i(181)]*n>s:i(223)===r?c&&o+this.__an_hour*n<s:i(135)===r?l&&s+this[i(181)]*n>o:i(137)===r&&l&&s+this.__an_hour*n<o},this[e(155)]=(t,n=e(178))=>{let r=e,i=Math[r(162)](Date[r(217)]()-this.__date2timestamp(t)),a=this[r(130)](i);return n===`day`?this[r(191)](a[r(220)]):r(157)===n?this[r(191)](a[r(157)]):r(178)===n?this[r(191)](a[r(178)]):r(221)===n?this[r(191)](a.seconds):`The second parameter has an error`},this[e(133)]=(t=0,n=J,r=this[e(172)],i=0,a=Date[e(217)]())=>{let o=e;if(t<=0)return clearTimeout(this[o(165)]),void(this[o(165)]=null);clearTimeout(this[o(165)]),this[o(165)]=setTimeout(()=>{let e=o;i+=1,t-=this[e(172)];let r=this[e(167)](t);n({remain:t,obj:r});let s=Date[e(217)]()-(a+i*this[e(172)]),c=this[e(172)]-s;c<0&&(c=0),this[e(133)](t,n,c,i,a)},r)},this.__loop_time=(t=0,n=J,r=this[e(172)],i=0,a=Date[e(217)]())=>{let o=e;if(t<=0)return clearTimeout(this[o(184)]),void(this[o(184)]=null);clearTimeout(this[o(184)]),this[o(184)]=setTimeout(()=>{let e=o;i+=1,t-=this.__interval;let r=this.format_num2date(t);n({remain:t,obj:r});let s=Date[e(217)]()-(a+i*this[e(172)]),c=this[e(172)]-s;c<0&&(c=0),this[e(207)](t,n,c,i,a)},r)},this[e(208)]=e=>new Promise(t=>setTimeout(t,e)),this[e(143)]=(t,n=`万`)=>t<1e4?t:(Math.floor(t/1e3)/10)[e(129)](1)+n,this[e(149)]=(t,n,r=!1)=>{let i=e;if(!Array[i(140)](t)||n<=0)return[];let a=[];for(let e=0;e<t[i(159)];e+=n){let o=t[i(139)](e,e+n);r?o[i(159)]===n&&a[i(205)](o):a[i(205)](o)}return a},this[e(193)]=(e,t=200,n=!1)=>{let r,i=null;return function(...a){let o=q,s=this,c=n&&!i;return i&&clearTimeout(i),i=setTimeout(()=>{let t=q;i=null,n||(r=e[t(213)](s,a))},t),c&&(r=e[o(213)](s,a)),r}},this[e(211)]=(e,t=!1)=>{let n=[];return e.forEach(e=>{let r=q;t&&Array.isArray(e)?n=n.concat(this[r(211)](e,t)):n.push(e)}),n},this[e(177)]=(t,n)=>t&&t.then?t.catch?t.then(e=>[null,e])[e(144)](e=>(n&&Object.assign(e,n),[e,void 0])):t.then(e=>[null,e]):Promise.resolve([null,t]),this[e(197)]=t=>{let n=e,{str:r,likeStr:i,separator:a=`-`,caseSensitive:o=!1,symbol:s=``}=t,c=(i||``).split(a),l=(r||``).split(a);return c[n(188)]((e,t)=>e===s||(o?e===l[t]:l[t]&&e[n(187)]()===l[t][n(187)]()))},this.convertArr2Disable=t=>{let n=e,r=[],{skuObjArr:i=[],skuArrField:a,checkedIndexArr:o=[],combineSkuArr:s=[],disabledArr:c=[],combineSeparator:l=`-`,combineSkuField:u=`id`}=t;for(let e=0;e<i[n(159)];e++){let t=a?i[e]?.[a]||[]:i[e]||[];Array[n(140)](r[e])||(r[e]=[]);for(let i=0;i<t[n(159)];i++){let t=o.slice(0,e),a=o[n(139)](e+1),d=t[n(171)](i)[n(171)](a)[n(194)](l),f=s[n(146)](e=>this.checkPattern({str:e[u],likeStr:d,separator:l})),p=c[n(179)](e=>{let t=n,{field:r,disabledFun:i,disabledFieldValue:a}=e,o=f[t(210)](e=>i(e));return{[r]:o?a:!a}}).reduce((e,t)=>Object[n(151)](Object[n(151)]({},e),t),{});r[e][i]=p}}return r},this[e(186)]=t=>{let n=e,r=null,i=new Proxy(t,{construct:(e,t)=>r||(r=n(192)!=typeof Reflect&&Reflect[n(160)]?Reflect[n(160)](e,t):new e(...t),r)});return i.prototype[n(161)]=i,i},this.findDeepValue=t=>{let n=e,{list:r,selected:i,selectedValueInListFieldName:a,childrenFieldName:o}=t;if(!i.length)return;let s=i[i[n(159)]-1],c=e=>{let t=n;for(let n of e){if(n[a]===s)return n;let e=n[o];if(Array.isArray(e)&&e[t(159)]){let t=c(e);if(t)return t}}};return c(r)},this[e(214)]=(t,n=/\{([^}]+)\}/g)=>{let r=e;if(t==null)return[];let i=String(t);if(!i)return[];let a=n instanceof RegExp?n:new RegExp(n[r(198)](`/`)&&n[r(182)](`/`)?n.slice(1,-1):n[r(173)](/[.*+?^${}()|[\]\\]/g,`\\$&`),`g`),o=[],s;for(;(s=a.exec(i))!==null;){let e=s[1]||s[0];e&&!/^\d+$/[r(148)](e)&&o.push(e)}return o},this[e(209)]=(t,n,r=/\{([^}]+)\}/g)=>{let i=e;if(t==null)return``;let a=String(t),o=r instanceof RegExp?r:new RegExp(r[i(198)](`/`)&&r.endsWith(`/`)?r.slice(1,-1):r[i(173)](/[.*+?^${}()|[\]\\]/g,i(216)),`g`);if(i(128)==typeof n){let e=0;return a[i(173)](o,(...t)=>{let[r,...i]=t,a=n(r,e,...i);return e++,a})}if(Array[i(140)](n)){let e=0;return a.replace(o,()=>n[e++]??``)}return a[i(173)](o,n)}}before_lt_hour(e=Date.now(),t=1){let n=q;return this[n(131)]({date:e,hour:t,type:n(156)})}before_gt_hour(e=Date[K(217)](),t=1){let n=K;return this.__compare_time({date:e,hour:t,type:n(223)})}[K(135)](e=Date[K(217)](),t=1){return this.__compare_time({date:e,hour:t,type:`after_lt_hour`})}[K(137)](e=Date.now(),t=1){let n=K;return this.__compare_time({date:e,hour:t,type:n(137)})}[K(163)](e){let t=K,n=this[t(158)](e);return new Date().getFullYear()===new Date(n)[t(168)]()}get_time_obj(e){let t=K,n=this[t(158)](e),r=new Date(n),i=this[t(191)](r[t(150)]()+1),a=this[t(191)](r[t(138)]()),o=this[t(191)](r[t(176)]()),s=this[t(191)](r[t(218)]()),c=this[t(191)](r[t(175)]());return{year:String(r[t(168)]()),month:i,day:a,hour:o,minute:s,seconds:c,day_of_week:String(r[t(132)]())}}[K(185)]({num:e=0,decimal:t=1,divide:n=1e4,suffix:r=`万`,show_suffix_always:i=!1}){let a=K;if(!e)return 0;if(n<=0||t<0)return i?e+` `+r:e;let o=parseFloat(e);if(o<=0||o>0&&o<n)return i?o+` `+r:o;let[s,c]=(o/n)[a(129)](t)[a(169)](`.`);return c&&parseFloat(c)!==0?s+`.`+c+` `+r:s+` `+r}format_num2date(e=Date[K(217)]()){let t=K,n=parseInt(e/1e3/60/60/24%24),r=parseInt(e/1e3/60/60%24),i=parseInt(e/1e3/60%60),a=parseInt(e/1e3%60);return{day:this[t(191)](n),hour:this[t(191)](r),minute:this[t(191)](i),seconds:this[t(191)](a)}}[K(201)](e=J,t=60){let n=K,r;clearTimeout(r);let i=1e3*t,a=this[n(130)](i),o={remain:i,obj:a};e(o);let s=this;return function e(t=0,c=J,l=1e3,u=0,d=Date[n(217)]()){if(t<=0)return clearTimeout(r),s=null,r=null,i=null,a=null,o=null,void c({remain:0,obj:{day:`00`,hour:`00`,minute:`00`,seconds:`00`}});clearTimeout(r),r=setTimeout(()=>{let n=q;u+=1,t-=1e3;let r=s.format_num2date(t);c({remain:t,obj:r});let i=1e3-(Date[n(217)]()-(d+1e3*u));i<0&&(i=0),e(t,c,i,u,d)},l)}(i,e,1e3),()=>{clearTimeout(r),s=null,r=null,i=null,a=null,o=null}}format_timestamp_to_day_hour_minute_second(e=Date[K(217)]()){let t=K,n=Math[t(145)](e/864e5),r=Math[t(145)](e%864e5/36e5),i=Math[t(145)](e%36e5/6e4),a=Math[t(145)](e%6e4/1e3);return{day:this[t(191)](n),hour:this[t(191)](r),minute:this[t(191)](i),seconds:this[t(191)](a)}}[K(154)](e=Date.now(),t=J){let n=K,r;clearTimeout(r);let i=this,a=this[n(158)](e),o=a-Date[n(217)](),s=this.format_timestamp_to_day_hour_minute_second(o),c={remain:o,obj:s};return t(c),function e(t=0,l=J,u=1e3,d=0,f=Date[n(217)]()){if(t<=0)return clearTimeout(r),r=null,i=null,a=null,o=null,s=null,c=null,void l({remain:0,obj:{day:`00`,hour:`00`,minute:`00`,seconds:`00`}});clearTimeout(r),r=setTimeout(()=>{let n=q;d+=1,t-=1e3;let r=i[n(167)](t);l({remain:t,obj:r});let a=1e3-(Date.now()-(f+1e3*d));a<0&&(a=0),e(t,l,a,d,f)},u)}(o,t,1e3),()=>{clearTimeout(r),r=null,i=null,a=null,o=null,s=null,c=null}}[K(174)](e=1,t=Date[K(217)]()){let n=K;return this[n(158)](t)+60*e*60*1e3}format_thousandth(e,t=2){let n=K;try{let r=parseFloat(e),i=r[n(141)]()[n(169)](`.`),a=!1,o=``;i[1]&&(o=i[1][n(173)](/0+$/,``),a=o[n(159)]>0);let s=0;a&&(s=t===void 0?o[n(159)]:t);let c=r[n(129)](s)[n(169)](`.`),l=(c[0]||``)[n(173)](/(\d)(?=(\d{3})+$)/g,n(222));return c[1]?l+`.`+c[1]:l}catch{return 0}}[K(180)](e){let t=K;try{let n=e[t(141)]()[t(169)](`.`)[1]?.[t(159)]||0,r=e.toString()[t(173)](/\d+/,function(e){return e.replace(/(\d)(?=(\d{3})+$)/g,function(e){return e+`,`})});return n&&(r=r[t(173)](/\d+\.\d+/,function(e){return e[t(173)](/(\d)(?=(\d{3})+\.)/g,function(e){return e+`,`})})),r}catch{return 0}}is_empty(e){let t=K;return e==null||(t(202)===this[t(200)](e)?!e[t(153)]():t(190)===this[t(200)](e)?!e[t(159)]:t(152)===this.__get_type(e)&&!Object[t(199)](e)[t(159)])}[K(204)](e,t=1){let n;if(!this.__is_function(e))return()=>{clearTimeout(n),n=void 0};let r=60*t*1e3,i=()=>{e(),n=setTimeout(i,r)};return i(),()=>{clearTimeout(n),n=void 0}}[K(164)](e,t,n=!1){let r=K,i=this.__is_array(e)||this.__is_object(e),a=this.__is_array(t)||this[r(203)](t);if(!i||!a)return n?e===t:e==t;let o=Object[r(199)](e),s=Object[r(199)](t);return o.length===0&&s[r(159)]===0||o[r(159)]===s[r(159)]&&o[r(188)](i=>{let a=r,o=this[a(215)](e[i])||this[a(203)](e[i]),s=this[a(215)](t[i])||this[a(203)](t[i]);return o&&s?this[a(164)](e[i],t[i],n):n?e[i]===t[i]:e[i]==t[i]})}[K(206)](e,t,n=!1){let r=K,i=this[r(215)](e)||this[r(203)](e),a=this[r(215)](t)||this[r(203)](t);if(!i||!a)return n?e===t:e==t;let o=Object[r(199)](e),s=Object[r(199)](t);return s[r(159)]===0||!(o[r(159)]===0||o[r(159)]<s[r(159)])&&s.every(i=>{let a=r;if(o[a(224)](i)<0)return!1;let s=this[a(215)](e[i])||this.__is_object(e[i]),c=this[a(215)](t[i])||this[a(203)](t[i]);return s&&c?this.contains(e[i],t[i],n):n?e[i]===t[i]:e[i]==t[i]})}};function Y(){let e=`327505sDNCXJ.__ticker.format_count.createSingleTon.toLowerCase.every.3009460DcxozV.Array.__get_suffix2.undefined.debounce.join.2511663bGiTKv.__is_function.checkPattern.startsWith.keys.__get_type.count_down_by_remain_seconds.String.__is_object.poll.push.contains.__loop_time.sleep.replaceTemplate.some.flatten.432270ikWknR.apply.pickList.__is_array.\\$&.now.getMinutes.Function.day.second.$1,.before_gt_hour.indexOf.28183024KiKvfv.function.toFixed.format_num2date.__compare_time.getDay.__loop_time2.call.after_lt_hour.prototype.after_gt_hour.getDate.slice.isArray.toString.549628QoGWVv.roxFormatThousandth.catch.floor.filter.14FPJmRC.test.chunk.getMonth.assign.Object.trim.count_down.offset_time.before_lt_hour.hour.__date2timestamp.length.construct.constructor.abs.is_current_year.is_equal.__ticker2.2194422aEEnvu.format_timestamp_to_day_hour_minute_second.getFullYear.split.getTime.concat.__interval.replace.add.getSeconds.getHours.safeRequest.minute.map.format_thousandth_with_same_dotlen.__an_hour.endsWith`.split(`.`);return Y=function(){return e},Y()}var le=[`innerHTML`],X=(0,t.defineComponent)({name:`CountDown`,__name:`count-down`,props:(0,t.mergeModels)({tick:{type:Function}},{modelValue:{type:Number,default:void 0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=(0,t.useModel)(e,`modelValue`),r=e;function i(){n.value!==null&&ce.count_down_by_remain_seconds(({remain:e})=>{e>0&&(n.value=Math.floor(e/1e3))},n.value)}return(0,t.watch)(n,()=>{i()}),(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{innerHTML:n.value!==void 0&&n.value!==null?r.tick(n.value):``},null,8,le))}});X.install=e=>(X.name&&e.component(X.name,X),e);var Z=X,Q=r({Button:()=>p,Collapse:()=>h,CountDown:()=>Z,Input:()=>b,InputOtp:()=>c,Loading:()=>V,Menu:()=>D,Popup:()=>u,SliderCaptcha:()=>G,Tab:()=>A,Toaster:()=>z,useToast:()=>I}),$=e=>(Object.keys(Q).forEach(t=>{let n=Q[t];n.install&&e.use(n)}),e),ue={install:$};e.Button=p,e.Collapse=h,e.CountDown=Z,e.Input=b,e.InputOtp=c,e.Loading=V,e.Menu=D,e.Popup=u,e.SliderCaptcha=G,e.Tab=A,e.Toaster=z,e.default=ue,e.install=$,e.useToast=I});
@@ -1 +1 @@
1
- const e=require(`./_virtual/_rolldown/runtime.js`),t=require(`./input-otp/index.js`),n=require(`./popup/index.js`),r=require(`./button/index.js`),i=require(`./collapse/index.js`),a=require(`./input/index.js`),o=require(`./menu/index.js`),s=require(`./tab/index.js`),c=require(`./toast/toast.js`),l=require(`./toast/index.js`),u=require(`./loading/index.js`),d=require(`./slider-captcha/index.js`);var f=e.__exportAll({Button:()=>r.default,Collapse:()=>i.default,Input:()=>a.default,InputOtp:()=>t.default,Loading:()=>u.default,Menu:()=>o.default,Popup:()=>n.default,SliderCaptcha:()=>d.default,Tab:()=>s.default,Toaster:()=>l.default,useToast:()=>c.useToast});Object.defineProperty(exports,`components_exports`,{enumerable:!0,get:function(){return f}});
1
+ const e=require(`./_virtual/_rolldown/runtime.js`),t=require(`./input-otp/index.js`),n=require(`./popup/index.js`),r=require(`./button/index.js`),i=require(`./collapse/index.js`),a=require(`./input/index.js`),o=require(`./menu/index.js`),s=require(`./tab/index.js`),c=require(`./toast/toast.js`),l=require(`./toast/index.js`),u=require(`./loading/index.js`),d=require(`./slider-captcha/index.js`),f=require(`./count-down/index.js`);var p=e.__exportAll({Button:()=>r.default,Collapse:()=>i.default,CountDown:()=>f.default,Input:()=>a.default,InputOtp:()=>t.default,Loading:()=>u.default,Menu:()=>o.default,Popup:()=>n.default,SliderCaptcha:()=>d.default,Tab:()=>s.default,Toaster:()=>l.default,useToast:()=>c.useToast});Object.defineProperty(exports,`components_exports`,{enumerable:!0,get:function(){return p}});
@@ -0,0 +1 @@
1
+ var e=require(`./count-down.vue_vue_type_script_setup_true_lang.js`).default;exports.default=e;
@@ -0,0 +1 @@
1
+ const e=require(`../node_modules/.pnpm/fish-helper@1.0.3/node_modules/fish-helper/dist/es/index.js`);let t=require(`vue`);var n=[`innerHTML`],r=(0,t.defineComponent)({name:`CountDown`,__name:`count-down`,props:(0,t.mergeModels)({tick:{type:Function}},{modelValue:{type:Number,default:void 0},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let i=(0,t.useModel)(r,`modelValue`),a=r;function o(){i.value!==null&&e.e.count_down_by_remain_seconds(({remain:e})=>{e>0&&(i.value=Math.floor(e/1e3))},i.value)}return(0,t.watch)(i,()=>{o()}),(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{innerHTML:i.value!==void 0&&i.value!==null?a.tick(i.value):``},null,8,n))}});exports.default=r;
@@ -0,0 +1 @@
1
+ const e=require(`./count-down.js`);require(`./style.css`),e.default.install=t=>(e.default.name&&t.component(e.default.name,e.default),t);var t=e.default;exports.default=t;
File without changes
package/dist/lib/index.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./input-otp/index.js`),t=require(`./popup/index.js`),n=require(`./button/index.js`),r=require(`./collapse/index.js`),i=require(`./input/index.js`),a=require(`./menu/index.js`),o=require(`./tab/index.js`),s=require(`./toast/toast.js`),c=require(`./toast/index.js`),l=require(`./loading/index.js`),u=require(`./slider-captcha/index.js`),d=require(`./components.js`);;/* empty css */var f=e=>(Object.keys(d.components_exports).forEach(t=>{let n=d.components_exports[t];n.install&&e.use(n)}),e),p={install:f};exports.Button=n.default,exports.Collapse=r.default,exports.Input=i.default,exports.InputOtp=e.default,exports.Loading=l.default,exports.Menu=a.default,exports.Popup=t.default,exports.SliderCaptcha=u.default,exports.Tab=o.default,exports.Toaster=c.default,exports.default=p,exports.install=f,exports.useToast=s.useToast;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./input-otp/index.js`),t=require(`./popup/index.js`),n=require(`./button/index.js`),r=require(`./collapse/index.js`),i=require(`./input/index.js`),a=require(`./menu/index.js`),o=require(`./tab/index.js`),s=require(`./toast/toast.js`),c=require(`./toast/index.js`),l=require(`./loading/index.js`),u=require(`./slider-captcha/index.js`),d=require(`./count-down/index.js`),f=require(`./components.js`);;/* empty css */var p=e=>(Object.keys(f.components_exports).forEach(t=>{let n=f.components_exports[t];n.install&&e.use(n)}),e),m={install:p};exports.Button=n.default,exports.Collapse=r.default,exports.CountDown=d.default,exports.Input=i.default,exports.InputOtp=e.default,exports.Loading=l.default,exports.Menu=a.default,exports.Popup=t.default,exports.SliderCaptcha=u.default,exports.Tab=o.default,exports.Toaster=c.default,exports.default=m,exports.install=p,exports.useToast=s.useToast;
@@ -0,0 +1 @@
1
+ var e=t;(function(e,n){let r=t,i=e();for(;;)try{if(-parseInt(r(212))/1+-parseInt(r(142))/2+-parseInt(r(195))/3+-parseInt(r(189))/4+-parseInt(r(183))/5+-parseInt(r(166))/6*(parseInt(r(147))/7)+parseInt(r(127))/8===n)break;i.push(i.shift())}catch{i.push(i.shift())}})(i,429233);function t(e,t){return e-=127,i()[e]}var n=()=>null,r=new class{constructor(){let e=t;this[e(172)]=1e3,this[e(181)]=36e5,this[e(184)]=null,this[e(165)]=null,this.__get_type=t=>Object[e(136)][e(141)][e(134)](t)[e(139)](8,-1),this[e(158)]=t=>{let n=e;if(!t)return Date[n(217)]();let r=null;r=typeof t==`string`?t[n(173)](/(\-|\_)/g,`/`):new Date(t);let i=new Date(r);return i[n(141)]()===`Invalid Date`&&(i=new Date(t)),i.getTime()},this[e(196)]=t=>e(219)===this[e(200)](t),this.__is_array=t=>e(190)===this.__get_type(t),this[e(203)]=t=>this[e(200)](t)===`Object`,this[e(191)]=e=>String(e).padStart(2,`0`),this[e(131)]=({date:t,hour:n=1,type:r=`before_lt_hour`})=>{let i=e,a=this.__date2timestamp(t),o=new Date(a)[i(170)](),s=Date[i(217)](),c=o<s,l=o>s;return i(156)===r?c&&o+this[i(181)]*n>s:i(223)===r?c&&o+this.__an_hour*n<s:i(135)===r?l&&s+this[i(181)]*n>o:i(137)===r&&l&&s+this.__an_hour*n<o},this[e(155)]=(t,n=e(178))=>{let r=e,i=Math[r(162)](Date[r(217)]()-this.__date2timestamp(t)),a=this[r(130)](i);return n===`day`?this[r(191)](a[r(220)]):r(157)===n?this[r(191)](a[r(157)]):r(178)===n?this[r(191)](a[r(178)]):r(221)===n?this[r(191)](a.seconds):`The second parameter has an error`},this[e(133)]=(t=0,r=n,i=this[e(172)],a=0,o=Date[e(217)]())=>{let s=e;if(t<=0)return clearTimeout(this[s(165)]),void(this[s(165)]=null);clearTimeout(this[s(165)]),this[s(165)]=setTimeout(()=>{let e=s;a+=1,t-=this[e(172)];let n=this[e(167)](t);r({remain:t,obj:n});let i=Date[e(217)]()-(o+a*this[e(172)]),c=this[e(172)]-i;c<0&&(c=0),this[e(133)](t,r,c,a,o)},i)},this.__loop_time=(t=0,r=n,i=this[e(172)],a=0,o=Date[e(217)]())=>{let s=e;if(t<=0)return clearTimeout(this[s(184)]),void(this[s(184)]=null);clearTimeout(this[s(184)]),this[s(184)]=setTimeout(()=>{let e=s;a+=1,t-=this.__interval;let n=this.format_num2date(t);r({remain:t,obj:n});let i=Date[e(217)]()-(o+a*this[e(172)]),c=this[e(172)]-i;c<0&&(c=0),this[e(207)](t,r,c,a,o)},i)},this[e(208)]=e=>new Promise(t=>setTimeout(t,e)),this[e(143)]=(t,n=`万`)=>t<1e4?t:(Math.floor(t/1e3)/10)[e(129)](1)+n,this[e(149)]=(t,n,r=!1)=>{let i=e;if(!Array[i(140)](t)||n<=0)return[];let a=[];for(let e=0;e<t[i(159)];e+=n){let o=t[i(139)](e,e+n);r?o[i(159)]===n&&a[i(205)](o):a[i(205)](o)}return a},this[e(193)]=(e,n=200,r=!1)=>{let i,a=null;return function(...o){let s=t,c=this,l=r&&!a;return a&&clearTimeout(a),a=setTimeout(()=>{let n=t;a=null,r||(i=e[n(213)](c,o))},n),l&&(i=e[s(213)](c,o)),i}},this[e(211)]=(e,n=!1)=>{let r=[];return e.forEach(e=>{let i=t;n&&Array.isArray(e)?r=r.concat(this[i(211)](e,n)):r.push(e)}),r},this[e(177)]=(t,n)=>t&&t.then?t.catch?t.then(e=>[null,e])[e(144)](e=>(n&&Object.assign(e,n),[e,void 0])):t.then(e=>[null,e]):Promise.resolve([null,t]),this[e(197)]=t=>{let n=e,{str:r,likeStr:i,separator:a=`-`,caseSensitive:o=!1,symbol:s=``}=t,c=(i||``).split(a),l=(r||``).split(a);return c[n(188)]((e,t)=>e===s||(o?e===l[t]:l[t]&&e[n(187)]()===l[t][n(187)]()))},this.convertArr2Disable=t=>{let n=e,r=[],{skuObjArr:i=[],skuArrField:a,checkedIndexArr:o=[],combineSkuArr:s=[],disabledArr:c=[],combineSeparator:l=`-`,combineSkuField:u=`id`}=t;for(let e=0;e<i[n(159)];e++){let t=a?i[e]?.[a]||[]:i[e]||[];Array[n(140)](r[e])||(r[e]=[]);for(let i=0;i<t[n(159)];i++){let t=o.slice(0,e),a=o[n(139)](e+1),d=t[n(171)](i)[n(171)](a)[n(194)](l),f=s[n(146)](e=>this.checkPattern({str:e[u],likeStr:d,separator:l})),p=c[n(179)](e=>{let t=n,{field:r,disabledFun:i,disabledFieldValue:a}=e,o=f[t(210)](e=>i(e));return{[r]:o?a:!a}}).reduce((e,t)=>Object[n(151)](Object[n(151)]({},e),t),{});r[e][i]=p}}return r},this[e(186)]=t=>{let n=e,r=null,i=new Proxy(t,{construct:(e,t)=>r||(r=n(192)!=typeof Reflect&&Reflect[n(160)]?Reflect[n(160)](e,t):new e(...t),r)});return i.prototype[n(161)]=i,i},this.findDeepValue=t=>{let n=e,{list:r,selected:i,selectedValueInListFieldName:a,childrenFieldName:o}=t;if(!i.length)return;let s=i[i[n(159)]-1],c=e=>{let t=n;for(let n of e){if(n[a]===s)return n;let e=n[o];if(Array.isArray(e)&&e[t(159)]){let t=c(e);if(t)return t}}};return c(r)},this[e(214)]=(t,n=/\{([^}]+)\}/g)=>{let r=e;if(t==null)return[];let i=String(t);if(!i)return[];let a=n instanceof RegExp?n:new RegExp(n[r(198)](`/`)&&n[r(182)](`/`)?n.slice(1,-1):n[r(173)](/[.*+?^${}()|[\]\\]/g,`\\$&`),`g`),o=[],s;for(;(s=a.exec(i))!==null;){let e=s[1]||s[0];e&&!/^\d+$/[r(148)](e)&&o.push(e)}return o},this[e(209)]=(t,n,r=/\{([^}]+)\}/g)=>{let i=e;if(t==null)return``;let a=String(t),o=r instanceof RegExp?r:new RegExp(r[i(198)](`/`)&&r.endsWith(`/`)?r.slice(1,-1):r[i(173)](/[.*+?^${}()|[\]\\]/g,i(216)),`g`);if(i(128)==typeof n){let e=0;return a[i(173)](o,(...t)=>{let[r,...i]=t,a=n(r,e,...i);return e++,a})}if(Array[i(140)](n)){let e=0;return a.replace(o,()=>n[e++]??``)}return a[i(173)](o,n)}}before_lt_hour(e=Date.now(),n=1){let r=t;return this[r(131)]({date:e,hour:n,type:r(156)})}before_gt_hour(t=Date[e(217)](),n=1){let r=e;return this.__compare_time({date:t,hour:n,type:r(223)})}[e(135)](t=Date[e(217)](),n=1){return this.__compare_time({date:t,hour:n,type:`after_lt_hour`})}[e(137)](t=Date.now(),n=1){let r=e;return this.__compare_time({date:t,hour:n,type:r(137)})}[e(163)](t){let n=e,r=this[n(158)](t);return new Date().getFullYear()===new Date(r)[n(168)]()}get_time_obj(t){let n=e,r=this[n(158)](t),i=new Date(r),a=this[n(191)](i[n(150)]()+1),o=this[n(191)](i[n(138)]()),s=this[n(191)](i[n(176)]()),c=this[n(191)](i[n(218)]()),l=this[n(191)](i[n(175)]());return{year:String(i[n(168)]()),month:a,day:o,hour:s,minute:c,seconds:l,day_of_week:String(i[n(132)]())}}[e(185)]({num:t=0,decimal:n=1,divide:r=1e4,suffix:i=`万`,show_suffix_always:a=!1}){let o=e;if(!t)return 0;if(r<=0||n<0)return a?t+` `+i:t;let s=parseFloat(t);if(s<=0||s>0&&s<r)return a?s+` `+i:s;let[c,l]=(s/r)[o(129)](n)[o(169)](`.`);return l&&parseFloat(l)!==0?c+`.`+l+` `+i:c+` `+i}format_num2date(t=Date[e(217)]()){let n=e,r=parseInt(t/1e3/60/60/24%24),i=parseInt(t/1e3/60/60%24),a=parseInt(t/1e3/60%60),o=parseInt(t/1e3%60);return{day:this[n(191)](r),hour:this[n(191)](i),minute:this[n(191)](a),seconds:this[n(191)](o)}}[e(201)](r=n,i=60){let a=e,o;clearTimeout(o);let s=1e3*i,c=this[a(130)](s),l={remain:s,obj:c};r(l);let u=this;return function e(r=0,i=n,d=1e3,f=0,p=Date[a(217)]()){if(r<=0)return clearTimeout(o),u=null,o=null,s=null,c=null,l=null,void i({remain:0,obj:{day:`00`,hour:`00`,minute:`00`,seconds:`00`}});clearTimeout(o),o=setTimeout(()=>{let n=t;f+=1,r-=1e3;let a=u.format_num2date(r);i({remain:r,obj:a});let o=1e3-(Date[n(217)]()-(p+1e3*f));o<0&&(o=0),e(r,i,o,f,p)},d)}(s,r,1e3),()=>{clearTimeout(o),u=null,o=null,s=null,c=null,l=null}}format_timestamp_to_day_hour_minute_second(t=Date[e(217)]()){let n=e,r=Math[n(145)](t/864e5),i=Math[n(145)](t%864e5/36e5),a=Math[n(145)](t%36e5/6e4),o=Math[n(145)](t%6e4/1e3);return{day:this[n(191)](r),hour:this[n(191)](i),minute:this[n(191)](a),seconds:this[n(191)](o)}}[e(154)](r=Date.now(),i=n){let a=e,o;clearTimeout(o);let s=this,c=this[a(158)](r),l=c-Date[a(217)](),u=this.format_timestamp_to_day_hour_minute_second(l),d={remain:l,obj:u};return i(d),function e(r=0,i=n,f=1e3,p=0,m=Date[a(217)]()){if(r<=0)return clearTimeout(o),o=null,s=null,c=null,l=null,u=null,d=null,void i({remain:0,obj:{day:`00`,hour:`00`,minute:`00`,seconds:`00`}});clearTimeout(o),o=setTimeout(()=>{let n=t;p+=1,r-=1e3;let a=s[n(167)](r);i({remain:r,obj:a});let o=1e3-(Date.now()-(m+1e3*p));o<0&&(o=0),e(r,i,o,p,m)},f)}(l,i,1e3),()=>{clearTimeout(o),o=null,s=null,c=null,l=null,u=null,d=null}}[e(174)](t=1,n=Date[e(217)]()){let r=e;return this[r(158)](n)+60*t*60*1e3}format_thousandth(t,n=2){let r=e;try{let e=parseFloat(t),i=e[r(141)]()[r(169)](`.`),a=!1,o=``;i[1]&&(o=i[1][r(173)](/0+$/,``),a=o[r(159)]>0);let s=0;a&&(s=n===void 0?o[r(159)]:n);let c=e[r(129)](s)[r(169)](`.`),l=(c[0]||``)[r(173)](/(\d)(?=(\d{3})+$)/g,r(222));return c[1]?l+`.`+c[1]:l}catch{return 0}}[e(180)](t){let n=e;try{let e=t[n(141)]()[n(169)](`.`)[1]?.[n(159)]||0,r=t.toString()[n(173)](/\d+/,function(e){return e.replace(/(\d)(?=(\d{3})+$)/g,function(e){return e+`,`})});return e&&(r=r[n(173)](/\d+\.\d+/,function(e){return e[n(173)](/(\d)(?=(\d{3})+\.)/g,function(e){return e+`,`})})),r}catch{return 0}}is_empty(t){let n=e;return t==null||(n(202)===this[n(200)](t)?!t[n(153)]():n(190)===this[n(200)](t)?!t[n(159)]:n(152)===this.__get_type(t)&&!Object[n(199)](t)[n(159)])}[e(204)](e,t=1){let n;if(!this.__is_function(e))return()=>{clearTimeout(n),n=void 0};let r=60*t*1e3,i=()=>{e(),n=setTimeout(i,r)};return i(),()=>{clearTimeout(n),n=void 0}}[e(164)](t,n,r=!1){let i=e,a=this.__is_array(t)||this.__is_object(t),o=this.__is_array(n)||this[i(203)](n);if(!a||!o)return r?t===n:t==n;let s=Object[i(199)](t),c=Object[i(199)](n);return s.length===0&&c[i(159)]===0||s[i(159)]===c[i(159)]&&s[i(188)](e=>{let a=i,o=this[a(215)](t[e])||this[a(203)](t[e]),s=this[a(215)](n[e])||this[a(203)](n[e]);return o&&s?this[a(164)](t[e],n[e],r):r?t[e]===n[e]:t[e]==n[e]})}[e(206)](t,n,r=!1){let i=e,a=this[i(215)](t)||this[i(203)](t),o=this[i(215)](n)||this[i(203)](n);if(!a||!o)return r?t===n:t==n;let s=Object[i(199)](t),c=Object[i(199)](n);return c[i(159)]===0||!(s[i(159)]===0||s[i(159)]<c[i(159)])&&c.every(e=>{let a=i;if(s[a(224)](e)<0)return!1;let o=this[a(215)](t[e])||this.__is_object(t[e]),c=this[a(215)](n[e])||this[a(203)](n[e]);return o&&c?this.contains(t[e],n[e],r):r?t[e]===n[e]:t[e]==n[e]})}};function i(){let e=`327505sDNCXJ.__ticker.format_count.createSingleTon.toLowerCase.every.3009460DcxozV.Array.__get_suffix2.undefined.debounce.join.2511663bGiTKv.__is_function.checkPattern.startsWith.keys.__get_type.count_down_by_remain_seconds.String.__is_object.poll.push.contains.__loop_time.sleep.replaceTemplate.some.flatten.432270ikWknR.apply.pickList.__is_array.\\$&.now.getMinutes.Function.day.second.$1,.before_gt_hour.indexOf.28183024KiKvfv.function.toFixed.format_num2date.__compare_time.getDay.__loop_time2.call.after_lt_hour.prototype.after_gt_hour.getDate.slice.isArray.toString.549628QoGWVv.roxFormatThousandth.catch.floor.filter.14FPJmRC.test.chunk.getMonth.assign.Object.trim.count_down.offset_time.before_lt_hour.hour.__date2timestamp.length.construct.constructor.abs.is_current_year.is_equal.__ticker2.2194422aEEnvu.format_timestamp_to_day_hour_minute_second.getFullYear.split.getTime.concat.__interval.replace.add.getSeconds.getHours.safeRequest.minute.map.format_thousandth_with_same_dotlen.__an_hour.endsWith`.split(`.`);return i=function(){return e},i()}exports.e=r;
@@ -1 +1 @@
1
- let e=require(`vue`);var t={class:`toast-item`},n=(0,e.defineComponent)({name:`ToastItem`,__name:`toast-item`,props:{toast:{},bg:{},top:{},toasterClass:{},titleClass:{},messageClass:{}},setup(n){return(r,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,t,[n.toast.message?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`title-box`,n.titleClass])},[r.$slots[`success-icon`]&&n.toast.type===`success`?(0,e.renderSlot)(r.$slots,`success-icon`,{key:0}):(0,e.createCommentVNode)(``,!0),r.$slots[`error-icon`]&&n.toast.type===`error`?(0,e.renderSlot)(r.$slots,`error-icon`,{key:1}):(0,e.createCommentVNode)(``,!0),r.$slots[`info-icon`]&&n.toast.type===`info`?(0,e.renderSlot)(r.$slots,`info-icon`,{key:2}):(0,e.createCommentVNode)(``,!0),r.$slots[`warning-icon`]&&n.toast.type===`warning`?(0,e.renderSlot)(r.$slots,`warning-icon`,{key:3}):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`message`,n.messageClass])},(0,e.toDisplayString)(n.toast.message),3)],2)):(0,e.createCommentVNode)(``,!0)]))}});exports.default=n;
1
+ let e=require(`vue`);var t={class:`toast-item`},n=(0,e.defineComponent)({name:`ToastItem`,__name:`toast-item`,props:{toast:{},bg:{},top:{},toasterClass:{},titleClass:{},messageClass:{}},setup(n){return(r,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,t,[n.toast.message?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`title-box`,n.titleClass])},[n.toast.iconVisible?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[r.$slots[`success-icon`]&&n.toast.type===`success`?(0,e.renderSlot)(r.$slots,`success-icon`,{key:0}):(0,e.createCommentVNode)(``,!0),r.$slots[`error-icon`]&&n.toast.type===`error`?(0,e.renderSlot)(r.$slots,`error-icon`,{key:1}):(0,e.createCommentVNode)(``,!0),r.$slots[`info-icon`]&&n.toast.type===`info`?(0,e.renderSlot)(r.$slots,`info-icon`,{key:2}):(0,e.createCommentVNode)(``,!0),r.$slots[`warning-icon`]&&n.toast.type===`warning`?(0,e.renderSlot)(r.$slots,`warning-icon`,{key:3}):(0,e.createCommentVNode)(``,!0)],64)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`message`,n.messageClass])},(0,e.toDisplayString)(n.toast.message),3)],2)):(0,e.createCommentVNode)(``,!0)]))}});exports.default=n;
@@ -1 +1 @@
1
- let e=require(`vue`);var t=(0,e.reactive)({toasts:[]}),n=3e3;function r(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)})}function i(e){if(e===void 0)t.toasts=[];else{let n=t.toasts.findIndex(t=>t.id===e);n!==-1&&t.toasts.splice(n,1)}}function a(e){let a={id:r(),message:e?.message||``,duration:e?.duration||n,type:e?.type||`info`};return setTimeout(()=>{t.toasts.push(a)},0),setTimeout(()=>{i(a.id)},a.duration),a.id}function o(){return{toast:a,success:(e,t=n)=>a({message:e,duration:t,type:`success`}),error:(e,t=n)=>a({message:e,duration:t,type:`error`}),info:(e,t=n)=>a({message:e,duration:t,type:`info`}),warning:(e,t=n)=>a({message:e,duration:t,type:`warning`}),dismiss:i}}var s=(0,e.readonly)(t);exports.toastStore=s,exports.useToast=o;
1
+ let e=require(`vue`);var t=(0,e.reactive)({toasts:[]}),n=3e3;function r(){return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(e){var t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)})}function i(e){if(e===void 0)t.toasts=[];else{let n=t.toasts.findIndex(t=>t.id===e);n!==-1&&t.toasts.splice(n,1)}}function a(e){let a={id:r(),message:e?.message||``,duration:e?.duration||n,type:e?.type||`info`,iconVisible:e?.iconVisible||!0};return setTimeout(()=>{t.toasts.push(a)},0),setTimeout(()=>{i(a.id)},a.duration),a.id}function o(){return{toast:a,success:(e,t={})=>{let{duration:r=n,iconVisible:i=!0}=t;return a({message:e,duration:r,type:`success`,iconVisible:i})},error:(e,t={})=>{let{duration:r=n,iconVisible:i=!0}=t;return a({message:e,duration:r,type:`error`,iconVisible:i})},info:(e,t={})=>{let{duration:r=n,iconVisible:i=!0}=t;return a({message:e,duration:r,type:`info`,iconVisible:i})},warning:(e,t={})=>{let{duration:r=n,iconVisible:i=!0}=t;return a({message:e,duration:r,type:`warning`,iconVisible:i})},dismiss:i}}var s=(0,e.readonly)(t);exports.toastStore=s,exports.useToast=o;
@@ -18,3 +18,5 @@ export { default as Loading } from './loading';
18
18
  export type { RoxVLoadingProps } from './loading';
19
19
  export { default as SliderCaptcha } from './slider-captcha';
20
20
  export type { RoxVSliderCaptchaProps, RoxVSliderCaptchaTrackItem } from './slider-captcha';
21
+ export { default as CountDown } from './count-down';
22
+ export type { RoxVCountDownProps } from './count-down';
@@ -0,0 +1,12 @@
1
+ import { RoxVCountDownProps } from './types';
2
+ declare const model: import('vue').ModelRef<number, string, number, number>;
3
+ type __VLS_Props = RoxVCountDownProps;
4
+ type __VLS_PublicProps = {
5
+ modelValue?: typeof model['value'];
6
+ } & __VLS_Props;
7
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: number) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
10
+ "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
12
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as CountDown } from './count-down.vue';
3
+ export * from './types';
4
+ declare const _default: typeof CountDown & Plugin;
5
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface RoxVCountDownProps {
2
+ tick: (seconds: number) => string;
3
+ }
@@ -1,12 +1,12 @@
1
- import { ToastOptions } from './types';
1
+ import { ToastMethodTypeOptions, ToastOptions } from './types';
2
2
  declare function dismiss(id?: string): void;
3
3
  declare function createToast(options: ToastOptions): string;
4
4
  export declare function useToast(): {
5
5
  toast: typeof createToast;
6
- success: (message: string, duration?: number) => string;
7
- error: (message: string, duration?: number) => string;
8
- info: (message: string, duration?: number) => string;
9
- warning: (message: string, duration?: number) => string;
6
+ success: (message: string, option?: ToastMethodTypeOptions) => string;
7
+ error: (message: string, option?: ToastMethodTypeOptions) => string;
8
+ info: (message: string, option?: ToastMethodTypeOptions) => string;
9
+ warning: (message: string, option?: ToastMethodTypeOptions) => string;
10
10
  dismiss: typeof dismiss;
11
11
  };
12
12
  export declare const toastStore: {
@@ -15,6 +15,7 @@ export declare const toastStore: {
15
15
  readonly message: string;
16
16
  readonly duration: number;
17
17
  readonly type: import('./types').ToastType;
18
+ readonly iconVisible: boolean;
18
19
  }[];
19
20
  };
20
21
  export {};
@@ -3,6 +3,7 @@ export interface ToastOptions {
3
3
  message?: string;
4
4
  duration?: number;
5
5
  type?: ToastType;
6
+ iconVisible?: boolean;
6
7
  }
7
8
  export interface ToastItem extends Required<ToastOptions> {
8
9
  id: string;
@@ -15,3 +16,4 @@ export interface RoxVToasterProps {
15
16
  titleClass?: string;
16
17
  messageClass?: string;
17
18
  }
19
+ export type ToastMethodTypeOptions = Pick<ToastOptions, "duration" | "iconVisible">;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a-drowned-fish/rox-v",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "vue3 组件库,提供常用的 ui 组件,如按钮、输入框、下拉选择框、选项卡等",
5
5
  "main": "dist/lib/index.js",
6
6
  "module": "dist/es/index.js",
@@ -68,6 +68,9 @@
68
68
  "iOS >= 10",
69
69
  "Android >= 5"
70
70
  ],
71
+ "dependencies": {
72
+ "fish-helper": "^1.0.3"
73
+ },
71
74
  "scripts": {
72
75
  "build:es": "vite build --config vite.build.config.ts",
73
76
  "build:lib": "vite build --config vite.umd.config.ts"